@opencloud-eu/web-pkg 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{TextEditor-CJgYG8Kl.js → TextEditor-D-HQDUkm.js} +3 -5
  2. package/dist/assets/worker-CVwKToFD.js +21 -0
  3. package/dist/assets/worker-DJbU-qfq.js +21 -0
  4. package/dist/assets/worker-DyU7W9CZ.js +21 -0
  5. package/dist/index-OU30YA6H.js +25032 -0
  6. package/dist/src/apps/types.d.ts +0 -3
  7. package/dist/src/components/AppBar/AppBar.vue.d.ts +2 -9
  8. package/dist/src/components/AppBar/index.d.ts +0 -1
  9. package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +1 -1
  10. package/dist/src/components/AppTopBar.vue.d.ts +1 -1
  11. package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +409 -11
  12. package/dist/src/components/CreateShortcutModal.vue.d.ts +222 -0
  13. package/dist/src/components/CustomComponentTarget.vue.d.ts +4 -14
  14. package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +1 -1
  15. package/dist/src/components/FilesList/ResourceTable.vue.d.ts +0 -1
  16. package/dist/src/components/Filters/DateFilter.vue.d.ts +500 -0
  17. package/dist/src/components/Navigation/MobileNav.vue.d.ts +2 -0
  18. package/dist/src/components/Navigation/index.d.ts +1 -0
  19. package/dist/src/components/NoContentMessage.vue.d.ts +3 -2
  20. package/dist/src/components/SideBar/FileSideBar.vue.d.ts +4 -13
  21. package/dist/src/components/SideBar/SideBar.vue.d.ts +3 -9
  22. package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +38 -0
  23. package/dist/src/components/SideBar/index.d.ts +1 -0
  24. package/dist/src/components/index.d.ts +1 -1
  25. package/dist/src/composables/actions/files/index.d.ts +1 -0
  26. package/dist/src/composables/actions/files/useFileActionFallbackToDownload.d.ts +4 -0
  27. package/dist/src/composables/actions/spaces/index.d.ts +1 -0
  28. package/dist/src/composables/actions/spaces/useSpaceActionsCreate.d.ts +7 -0
  29. package/dist/src/composables/folderLink/useFolderLink.d.ts +1 -1
  30. package/dist/src/composables/index.d.ts +1 -2
  31. package/dist/src/composables/navItems/index.d.ts +1 -0
  32. package/dist/src/composables/navItems/useNavItems.d.ts +13 -0
  33. package/dist/src/composables/piniaStores/auth.d.ts +8 -2
  34. package/dist/src/composables/piniaStores/avatars.d.ts +1 -1
  35. package/dist/src/composables/piniaStores/extensionRegistry/types.d.ts +14 -1
  36. package/dist/src/composables/piniaStores/index.d.ts +4 -3
  37. package/dist/src/composables/piniaStores/sideBar.d.ts +32 -0
  38. package/dist/src/composables/piniaStores/user.d.ts +1 -1
  39. package/dist/src/composables/resources/index.d.ts +1 -0
  40. package/dist/src/composables/resources/useResourceIndicators.d.ts +19 -0
  41. package/dist/src/composables/resources/useResourceViewContextMenu.d.ts +4 -3
  42. package/dist/src/composables/resources/useResourceViewHelpers.d.ts +2 -2
  43. package/dist/src/composables/spaces/useCreateSpace.d.ts +1 -0
  44. package/dist/src/constants.d.ts +0 -6
  45. package/dist/src/extensionPoints.d.ts +3 -0
  46. package/dist/src/helpers/filesize.d.ts +0 -7
  47. package/dist/src/helpers/index.d.ts +1 -2
  48. package/dist/src/helpers/versions.d.ts +5 -0
  49. package/dist/src/index.d.ts +1 -0
  50. package/dist/web-pkg.js +301 -300
  51. package/dist/web-pkg.umd.cjs +14 -66
  52. package/package.json +5 -7
  53. package/src/index.ts +1 -0
  54. package/dist/assets/worker-Bc2UmjVr.js +0 -40
  55. package/dist/assets/worker-BeDmEhWu.js +0 -40
  56. package/dist/assets/worker-DWoO7i6z.js +0 -40
  57. package/dist/index-D-EuklHo.js +0 -33782
  58. package/dist/src/components/AppBar/CreateSpace.vue.d.ts +0 -18
  59. package/dist/src/components/PortalTarget.vue.d.ts +0 -41
  60. package/dist/src/components/TextEditor/TextEditor.vue.d.ts +0 -165
  61. package/dist/src/components/TextEditor/index.d.ts +0 -161
  62. package/dist/src/composables/portalTarget/eventTopics.d.ts +0 -3
  63. package/dist/src/composables/portalTarget/index.d.ts +0 -2
  64. package/dist/src/composables/portalTarget/usePortalTarget.d.ts +0 -4
  65. package/dist/src/composables/sideBar/eventTopics.d.ts +0 -7
  66. package/dist/src/composables/sideBar/index.d.ts +0 -2
  67. package/dist/src/composables/sideBar/useSideBar.d.ts +0 -12
  68. package/dist/src/helpers/contextMenuDropdown.d.ts +0 -7
  69. package/dist/src/helpers/statusIndicators.d.ts +0 -23
  70. package/dist/src/services/passwordPolicy/rules.d.ts +0 -69
@@ -0,0 +1,21 @@
1
+ (function(){"use strict";function Hn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _r={exports:{}},zn;function Zo(){return zn||(zn=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,a){this.fn=l,this.context=c,this.once=a||!1}function s(l,c,a,h,p){if(typeof a!="function")throw new TypeError("The listener must be a function");var b=new i(a,h||l,p),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],b]:l._events[g].push(b):(l._events[g]=b,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],a,h;if(this._eventsCount===0)return c;for(h in a=this._events)e.call(a,h)&&c.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},u.prototype.listeners=function(c){var a=r?r+c:c,h=this._events[a];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,b=h.length,g=new Array(b);p<b;p++)g[p]=h[p].fn;return g},u.prototype.listenerCount=function(c){var a=r?r+c:c,h=this._events[a];return h?h.fn?1:h.length:0},u.prototype.emit=function(c,a,h,p,b,g){var m=r?r+c:c;if(!this._events[m])return!1;var y=this._events[m],v=arguments.length,E,T;if(y.fn){switch(y.once&&this.removeListener(c,y.fn,void 0,!0),v){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,a),!0;case 3:return y.fn.call(y.context,a,h),!0;case 4:return y.fn.call(y.context,a,h,p),!0;case 5:return y.fn.call(y.context,a,h,p,b),!0;case 6:return y.fn.call(y.context,a,h,p,b,g),!0}for(T=1,E=new Array(v-1);T<v;T++)E[T-1]=arguments[T];y.fn.apply(y.context,E)}else{var P=y.length,S;for(T=0;T<P;T++)switch(y[T].once&&this.removeListener(c,y[T].fn,void 0,!0),v){case 1:y[T].fn.call(y[T].context);break;case 2:y[T].fn.call(y[T].context,a);break;case 3:y[T].fn.call(y[T].context,a,h);break;case 4:y[T].fn.call(y[T].context,a,h,p);break;default:if(!E)for(S=1,E=new Array(v-1);S<v;S++)E[S-1]=arguments[S];y[T].fn.apply(y[T].context,E)}}return!0},u.prototype.on=function(c,a,h){return s(this,c,a,h,!1)},u.prototype.once=function(c,a,h){return s(this,c,a,h,!0)},u.prototype.removeListener=function(c,a,h,p){var b=r?r+c:c;if(!this._events[b])return this;if(!a)return o(this,b),this;var g=this._events[b];if(g.fn)g.fn===a&&(!p||g.once)&&(!h||g.context===h)&&o(this,b);else{for(var m=0,y=[],v=g.length;m<v;m++)(g[m].fn!==a||p&&!g[m].once||h&&g[m].context!==h)&&y.push(g[m]);y.length?this._events[b]=y.length===1?y[0]:y:o(this,b)}return this},u.prototype.removeAllListeners=function(c){var a;return c?(a=r?r+c:c,this._events[a]&&o(this,a)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(_r)),_r.exports}var Qo=Zo(),ea=Hn(Qo);class Ur extends Error{name="TimeoutError";constructor(e,r){super(e,r),Error.captureStackTrace?.(this,Ur)}}const qn=t=>t.reason??new DOMException("This operation was aborted.","AbortError");function ta(t,e){const{milliseconds:r,fallback:n,message:i,customTimers:s={setTimeout,clearTimeout},signal:o}=e;let u,l;const a=new Promise((h,p)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(o?.aborted){p(qn(o));return}if(o&&(l=()=>{p(qn(o))},o.addEventListener("abort",l,{once:!0})),t.then(h,p),r===Number.POSITIVE_INFINITY)return;const b=new Ur;u=s.setTimeout.call(void 0,()=>{if(n){try{h(n())}catch(g){p(g)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?h():i instanceof Error?p(i):(b.message=i??`Promise timed out after ${r} milliseconds`,p(b))},r)}).finally(()=>{a.clear(),l&&o&&o.removeEventListener("abort",l)});return a.clear=()=>{s.clearTimeout.call(void 0,u),u=void 0},a}function ra(t,e,r){let n=0,i=t.length;for(;i>0;){const s=Math.trunc(i/2);let o=n+s;r(t[o],e)<=0?(n=++o,i-=s+1):i=s}return n}class na{#e=[];enqueue(e,r){const{priority:n=0,id:i}=r??{},s={priority:n,id:i,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(s);return}const o=ra(this.#e,s,(u,l)=>l.priority-u.priority);this.#e.splice(o,0,s)}setPriority(e,r){const n=this.#e.findIndex(s=>s.id===e);if(n===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[i]=this.#e.splice(n,1);this.enqueue(i.run,{priority:r,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(r=>r.priority===e.priority).map(r=>r.run)}get size(){return this.#e.length}}class ia extends ea{#e;#r;#s=0;#t;#n=!1;#d=!1;#l;#g=0;#f=0;#c;#p;#h;#o=[];#a=0;#i;#I;#u=0;#w;#m;#F=1n;#x=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:na,strict:!1,...e},!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);if(e.strict&&e.interval===0)throw new TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===Number.POSITIVE_INFINITY)throw new TypeError("The `strict` option requires a finite `intervalCap`");if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#r=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#t=e.intervalCap,this.#l=e.interval,this.#h=e.strict,this.#i=new e.queueClass,this.#I=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#m=e.autoStart===!1,this.#M()}#E(e){for(;this.#a<this.#o.length;){const n=this.#o[this.#a];if(n!==void 0&&e-n>=this.#l)this.#a++;else break}(this.#a>100&&this.#a>this.#o.length/2||this.#a===this.#o.length)&&(this.#o=this.#o.slice(this.#a),this.#a=0)}#L(e){this.#h?this.#o.push(e):this.#s++}#_(){this.#h?this.#o.length>this.#a&&this.#o.pop():this.#s>0&&this.#s--}#v(){return this.#o.length-this.#a}get#U(){return this.#r?!0:this.#h?this.#v()<this.#t:this.#s<this.#t}get#B(){return this.#u<this.#w}#$(){this.#u--,this.#u===0&&this.emit("pendingZero"),this.#N(),this.emit("next")}#k(){this.#p=void 0,this.#C(),this.#O()}#j(e){if(this.#h){if(this.#E(e),this.#v()>=this.#t){const n=this.#o[this.#a],i=this.#l-(e-n);return this.#T(i),!0}return!1}if(this.#c===void 0){const r=this.#g-e;if(r<0){if(this.#f>0){const n=e-this.#f;if(n<this.#l)return this.#T(this.#l-n),!0}this.#s=this.#e?this.#u:0}else return this.#T(r),!0}return!1}#T(e){this.#p===void 0&&(this.#p=setTimeout(()=>{this.#k()},e))}#A(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}#S(){this.#p&&(clearTimeout(this.#p),this.#p=void 0)}#N(){if(this.#i.size===0){if(this.#A(),this.emit("empty"),this.#u===0){if(this.#S(),this.#h&&this.#a>0){const r=Date.now();this.#E(r)}this.emit("idle")}return!1}let e=!1;if(!this.#m){const r=Date.now(),n=!this.#j(r);if(this.#U&&this.#B){const i=this.#i.dequeue();this.#r||(this.#L(r),this.#b()),this.emit("active"),i(),n&&this.#O(),e=!0}}return e}#O(){this.#r||this.#c!==void 0||this.#h||(this.#c=setInterval(()=>{this.#C()},this.#l),this.#g=Date.now()+this.#l)}#C(){this.#h||(this.#s===0&&this.#u===0&&this.#c&&this.#A(),this.#s=this.#e?this.#u:0),this.#P(),this.#b()}#P(){for(;this.#N(););}get concurrency(){return this.#w}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#w=e,this.#P()}setPriority(e,r){if(typeof r!="number"||!Number.isFinite(r))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${r}\` (${typeof r})`);this.#i.setPriority(e,r)}async add(e,r={}){return r={timeout:this.timeout,...r,id:r.id??(this.#F++).toString()},new Promise((n,i)=>{const s=Symbol(`task-${r.id}`);this.#i.enqueue(async()=>{this.#u++,this.#x.set(s,{id:r.id,priority:r.priority??0,startTime:Date.now(),timeout:r.timeout});let o;try{try{r.signal?.throwIfAborted()}catch(c){throw this.#D(),this.#x.delete(s),c}this.#f=Date.now();let u=e({signal:r.signal});if(r.timeout&&(u=ta(Promise.resolve(u),{milliseconds:r.timeout,message:`Task timed out after ${r.timeout}ms (queue has ${this.#u} running, ${this.#i.size} waiting)`})),r.signal){const{signal:c}=r;u=Promise.race([u,new Promise((a,h)=>{o=()=>{h(c.reason)},c.addEventListener("abort",o,{once:!0})})])}const l=await u;n(l),this.emit("completed",l)}catch(u){i(u),this.emit("error",u)}finally{o&&r.signal?.removeEventListener("abort",o),this.#x.delete(s),queueMicrotask(()=>{this.#$()})}},r),this.emit("add"),this.#N()})}async addAll(e,r){return Promise.all(e.map(async n=>this.add(n,r)))}start(){return this.#m?(this.#m=!1,this.#P(),this):this}pause(){this.#m=!0}clear(){this.#i=new this.#I,this.#A(),this.#R(),this.emit("empty"),this.#u===0&&(this.#S(),this.emit("idle")),this.emit("next")}async onEmpty(){this.#i.size!==0&&await this.#y("empty")}async onSizeLessThan(e){this.#i.size<e||await this.#y("next",()=>this.#i.size<e)}async onIdle(){this.#u===0&&this.#i.size===0||await this.#y("idle")}async onPendingZero(){this.#u!==0&&await this.#y("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#y("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#y("rateLimitCleared")}onError(){return new Promise((e,r)=>{const n=i=>{this.off("error",n),r(i)};this.on("error",n)})}async#y(e,r){return new Promise(n=>{const i=()=>{r&&!r()||(this.off(e,i),n())};this.on(e,i)})}get size(){return this.#i.size}sizeBy(e){return this.#i.filter(e).length}get pending(){return this.#u}get isPaused(){return this.#m}#M(){this.#r||(this.on("add",()=>{this.#i.size>0&&this.#b()}),this.on("next",()=>{this.#b()}))}#b(){this.#r||this.#d||(this.#d=!0,queueMicrotask(()=>{this.#d=!1,this.#R()}))}#D(){this.#r||(this.#_(),this.#b())}#R(){const e=this.#n;if(this.#r||this.#i.size===0){e&&(this.#n=!1,this.emit("rateLimitCleared"));return}let r;if(this.#h){const i=Date.now();this.#E(i),r=this.#v()}else r=this.#s;const n=r>=this.#t;n!==e&&(this.#n=n,this.emit(n?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#n}get isSaturated(){return this.#u===this.#w&&this.#i.size>0||this.isRateLimited&&this.#i.size>0}get runningTasks(){return[...this.#x.values()].map(e=>({...e}))}}const Re=globalThis||void 0||self;function sa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wn={exports:{}},Z=Wn.exports={},_e,Ue;function Br(){throw new Error("setTimeout has not been defined")}function $r(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_e=setTimeout:_e=Br}catch{_e=Br}try{typeof clearTimeout=="function"?Ue=clearTimeout:Ue=$r}catch{Ue=$r}})();function Gn(t){if(_e===setTimeout)return setTimeout(t,0);if((_e===Br||!_e)&&setTimeout)return _e=setTimeout,setTimeout(t,0);try{return _e(t,0)}catch{try{return _e.call(null,t,0)}catch{return _e.call(this,t,0)}}}function oa(t){if(Ue===clearTimeout)return clearTimeout(t);if((Ue===$r||!Ue)&&clearTimeout)return Ue=clearTimeout,clearTimeout(t);try{return Ue(t)}catch{try{return Ue.call(null,t)}catch{return Ue.call(this,t)}}}var Me=[],dt=!1,tt,Zt=-1;function aa(){!dt||!tt||(dt=!1,tt.length?Me=tt.concat(Me):Zt=-1,Me.length&&Kn())}function Kn(){if(!dt){var t=Gn(aa);dt=!0;for(var e=Me.length;e;){for(tt=Me,Me=[];++Zt<e;)tt&&tt[Zt].run();Zt=-1,e=Me.length}tt=null,dt=!1,oa(t)}}Z.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Me.push(new Jn(t,e)),Me.length===1&&!dt&&Gn(Kn)};function Jn(t,e){this.fun=t,this.array=e}Jn.prototype.run=function(){this.fun.apply(null,this.array)},Z.title="browser",Z.browser=!0,Z.env={},Z.argv=[],Z.version="",Z.versions={};function De(){}Z.on=De,Z.addListener=De,Z.once=De,Z.off=De,Z.removeListener=De,Z.removeAllListeners=De,Z.emit=De,Z.prependListener=De,Z.prependOnceListener=De,Z.listeners=function(t){return[]},Z.binding=function(t){throw new Error("process.binding is not supported")},Z.cwd=function(){return"/"},Z.chdir=function(t){throw new Error("process.chdir is not supported")},Z.umask=function(){return 0};var ua=Wn.exports;const Be=sa(ua);function Xn(t,e){return function(){return t.apply(e,arguments)}}const{toString:la}=Object.prototype,{getPrototypeOf:kr}=Object,{iterator:Qt,toStringTag:Yn}=Symbol,er=(t=>e=>{const r=la.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Fe=t=>(t=t.toLowerCase(),e=>er(e)===t),tr=t=>e=>typeof e===t,{isArray:pt}=Array,gt=tr("undefined");function St(t){return t!==null&&!gt(t)&&t.constructor!==null&&!gt(t.constructor)&&xe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Zn=Fe("ArrayBuffer");function ca(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Zn(t.buffer),e}const fa=tr("string"),xe=tr("function"),Qn=tr("number"),Ot=t=>t!==null&&typeof t=="object",ha=t=>t===!0||t===!1,rr=t=>{if(er(t)!=="object")return!1;const e=kr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Yn in t)&&!(Qt in t)},da=t=>{if(!Ot(t)||St(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},pa=Fe("Date"),ga=Fe("File"),ma=t=>!!(t&&typeof t.uri<"u"),ya=t=>t&&typeof t.getParts<"u",ba=Fe("Blob"),wa=Fe("FileList"),xa=t=>Ot(t)&&xe(t.pipe);function Ea(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Re<"u"?Re:{}}const ei=Ea(),ti=typeof ei.FormData<"u"?ei.FormData:void 0,va=t=>{let e;return t&&(ti&&t instanceof ti||xe(t.append)&&((e=er(t))==="formdata"||e==="object"&&xe(t.toString)&&t.toString()==="[object FormData]"))},Ta=Fe("URLSearchParams"),[Aa,Na,Pa,Ia]=["ReadableStream","Request","Response","Headers"].map(Fe),Sa=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ct(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),pt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(St(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let u;for(n=0;n<o;n++)u=s[n],e.call(null,t[u],u,t)}}function ri(t,e){if(St(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const rt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Re,ni=t=>!gt(t)&&t!==rt;function jr(){const{caseless:t,skipUndefined:e}=ni(this)&&this||{},r={},n=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&ri(r,s)||s;rr(r[o])&&rr(i)?r[o]=jr(r[o],i):rr(i)?r[o]=jr({},i):pt(i)?r[o]=i.slice():(!e||!gt(i))&&(r[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Ct(arguments[i],n);return r}const Oa=(t,e,r,{allOwnKeys:n}={})=>(Ct(e,(i,s)=>{r&&xe(i)?Object.defineProperty(t,s,{value:Xn(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Ca=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Ra=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Fa=(t,e,r,n)=>{let i,s,o;const u={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!u[o]&&(e[o]=t[o],u[o]=!0);t=r!==!1&&kr(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},La=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},_a=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!Qn(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Ua=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&kr(Uint8Array)),Ba=(t,e)=>{const n=(t&&t[Qt]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},$a=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},ka=Fe("HTMLFormElement"),ja=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ii=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ma=Fe("RegExp"),si=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ct(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},Da=t=>{si(t,(e,r)=>{if(xe(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(xe(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Va=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return pt(t)?n(t):n(String(t).split(e)),r},Ha=()=>{},za=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function qa(t){return!!(t&&xe(t.append)&&t[Yn]==="FormData"&&t[Qt])}const Wa=t=>{const e=new Array(10),r=(n,i)=>{if(Ot(n)){if(e.indexOf(n)>=0)return;if(St(n))return n;if(!("toJSON"in n)){e[i]=n;const s=pt(n)?[]:{};return Ct(n,(o,u)=>{const l=r(o,i+1);!gt(l)&&(s[u]=l)}),e[i]=void 0,s}}return n};return r(t,0)},Ga=Fe("AsyncFunction"),Ka=t=>t&&(Ot(t)||xe(t))&&xe(t.then)&&xe(t.catch),oi=((t,e)=>t?setImmediate:e?((r,n)=>(rt.addEventListener("message",({source:i,data:s})=>{i===rt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),rt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",xe(rt.postMessage)),Ja=typeof queueMicrotask<"u"?queueMicrotask.bind(rt):typeof Be<"u"&&Be.nextTick||oi;var N={isArray:pt,isArrayBuffer:Zn,isBuffer:St,isFormData:va,isArrayBufferView:ca,isString:fa,isNumber:Qn,isBoolean:ha,isObject:Ot,isPlainObject:rr,isEmptyObject:da,isReadableStream:Aa,isRequest:Na,isResponse:Pa,isHeaders:Ia,isUndefined:gt,isDate:pa,isFile:ga,isReactNativeBlob:ma,isReactNative:ya,isBlob:ba,isRegExp:Ma,isFunction:xe,isStream:xa,isURLSearchParams:Ta,isTypedArray:Ua,isFileList:wa,forEach:Ct,merge:jr,extend:Oa,trim:Sa,stripBOM:Ca,inherits:Ra,toFlatObject:Fa,kindOf:er,kindOfTest:Fe,endsWith:La,toArray:_a,forEachEntry:Ba,matchAll:$a,isHTMLForm:ka,hasOwnProperty:ii,hasOwnProp:ii,reduceDescriptors:si,freezeMethods:Da,toObjectSet:Va,toCamelCase:ja,noop:Ha,toFiniteNumber:za,findKey:ri,global:rt,isContextDefined:ni,isSpecCompliantForm:qa,toJSONObject:Wa,isAsyncFn:Ga,isThenable:Ka,setImmediate:oi,asap:Ja,isIterable:t=>t!=null&&xe(t[Qt])},ai={},nr={};nr.byteLength=Za,nr.toByteArray=eu,nr.fromByteArray=nu;for(var $e=[],Ie=[],Xa=typeof Uint8Array<"u"?Uint8Array:Array,Mr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mt=0,Ya=Mr.length;mt<Ya;++mt)$e[mt]=Mr[mt],Ie[Mr.charCodeAt(mt)]=mt;Ie[45]=62,Ie[95]=63;function ui(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Za(t){var e=ui(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Qa(t,e,r){return(e+r)*3/4-r}function eu(t){var e,r=ui(t),n=r[0],i=r[1],s=new Xa(Qa(t,n,i)),o=0,u=i>0?n-4:n,l;for(l=0;l<u;l+=4)e=Ie[t.charCodeAt(l)]<<18|Ie[t.charCodeAt(l+1)]<<12|Ie[t.charCodeAt(l+2)]<<6|Ie[t.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Ie[t.charCodeAt(l)]<<2|Ie[t.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=Ie[t.charCodeAt(l)]<<10|Ie[t.charCodeAt(l+1)]<<4|Ie[t.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function tu(t){return $e[t>>18&63]+$e[t>>12&63]+$e[t>>6&63]+$e[t&63]}function ru(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(tu(n));return i.join("")}function nu(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,u=r-n;o<u;o+=s)i.push(ru(t,o,o+s>u?u:o+s));return n===1?(e=t[r-1],i.push($e[e>>2]+$e[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+"=")),i.join("")}var Dr={};Dr.read=function(t,e,r,n,i){var s,o,u=i*8-n-1,l=(1<<u)-1,c=l>>1,a=-7,h=r?i-1:0,p=r?-1:1,b=t[e+h];for(h+=p,s=b&(1<<-a)-1,b>>=-a,a+=u;a>0;s=s*256+t[e+h],h+=p,a-=8);for(o=s&(1<<-a)-1,s>>=-a,a+=n;a>0;o=o*256+t[e+h],h+=p,a-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(b?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(b?-1:1)*o*Math.pow(2,s-n)},Dr.write=function(t,e,r,n,i,s){var o,u,l,c=s*8-i-1,a=(1<<c)-1,h=a>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:s-1,g=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=a):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?e+=p/l:e+=p*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=a?(u=0,o=a):o+h>=1?(u=(e*l-1)*Math.pow(2,i),o=o+h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+b]=u&255,b+=g,u/=256,i-=8);for(o=o<<i|u,c+=i;c>0;t[r+b]=o&255,b+=g,o/=256,c-=8);t[r+b-g]|=m*128};(function(t){const e=nr,r=Dr,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=S,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:u}=globalThis;a.TYPED_ARRAY_SUPPORT=l(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const w=new s(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,s.prototype),Object.setPrototypeOf(w,f),w.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function c(w){if(w>i)throw new RangeError('The value "'+w+'" is invalid for option "size"');const f=new s(w);return Object.setPrototypeOf(f,a.prototype),f}function a(w,f,d){if(typeof w=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(w)}return h(w,f,d)}a.poolSize=8192;function h(w,f,d){if(typeof w=="string")return m(w,f);if(o.isView(w))return v(w);if(w==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w);if(je(w,o)||w&&je(w.buffer,o)||typeof u<"u"&&(je(w,u)||w&&je(w.buffer,u)))return E(w,f,d);if(typeof w=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=w.valueOf&&w.valueOf();if(x!=null&&x!==w)return a.from(x,f,d);const A=T(w);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof w[Symbol.toPrimitive]=="function")return a.from(w[Symbol.toPrimitive]("string"),f,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w)}a.from=function(w,f,d){return h(w,f,d)},Object.setPrototypeOf(a.prototype,s.prototype),Object.setPrototypeOf(a,s);function p(w){if(typeof w!="number")throw new TypeError('"size" argument must be of type number');if(w<0)throw new RangeError('The value "'+w+'" is invalid for option "size"')}function b(w,f,d){return p(w),w<=0?c(w):f!==void 0?typeof d=="string"?c(w).fill(f,d):c(w).fill(f):c(w)}a.alloc=function(w,f,d){return b(w,f,d)};function g(w){return p(w),c(w<0?0:P(w)|0)}a.allocUnsafe=function(w){return g(w)},a.allocUnsafeSlow=function(w){return g(w)};function m(w,f){if((typeof f!="string"||f==="")&&(f="utf8"),!a.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const d=F(w,f)|0;let x=c(d);const A=x.write(w,f);return A!==d&&(x=x.slice(0,A)),x}function y(w){const f=w.length<0?0:P(w.length)|0,d=c(f);for(let x=0;x<f;x+=1)d[x]=w[x]&255;return d}function v(w){if(je(w,s)){const f=new s(w);return E(f.buffer,f.byteOffset,f.byteLength)}return y(w)}function E(w,f,d){if(f<0||w.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(w.byteLength<f+(d||0))throw new RangeError('"length" is outside of buffer bounds');let x;return f===void 0&&d===void 0?x=new s(w):d===void 0?x=new s(w,f):x=new s(w,f,d),Object.setPrototypeOf(x,a.prototype),x}function T(w){if(a.isBuffer(w)){const f=P(w.length)|0,d=c(f);return d.length===0||w.copy(d,0,0,f),d}if(w.length!==void 0)return typeof w.length!="number"||Vn(w.length)?c(0):y(w);if(w.type==="Buffer"&&Array.isArray(w.data))return y(w.data)}function P(w){if(w>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return w|0}function S(w){return+w!=w&&(w=0),a.alloc(+w)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,d){if(je(f,s)&&(f=a.from(f,f.offset,f.byteLength)),je(d,s)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(f)||!a.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===d)return 0;let x=f.length,A=d.length;for(let I=0,O=Math.min(x,A);I<O;++I)if(f[I]!==d[I]){x=f[I],A=d[I];break}return x<A?-1:A<x?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,d){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);let x;if(d===void 0)for(d=0,x=0;x<f.length;++x)d+=f[x].length;const A=a.allocUnsafe(d);let I=0;for(x=0;x<f.length;++x){let O=f[x];if(je(O,s))I+O.length>A.length?(a.isBuffer(O)||(O=a.from(O)),O.copy(A,I)):s.prototype.set.call(A,O,I);else if(a.isBuffer(O))O.copy(A,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=O.length}return A};function F(w,f){if(a.isBuffer(w))return w.length;if(o.isView(w)||je(w,o))return w.byteLength;if(typeof w!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof w);const d=w.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&d===0)return 0;let A=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return Dn(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Jo(w).length;default:if(A)return x?-1:Dn(w).length;f=(""+f).toLowerCase(),A=!0}}a.byteLength=F;function L(w,f,d){let x=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,f>>>=0,d<=f))return"";for(w||(w="utf8");;)switch(w){case"hex":return ce(this,f,d);case"utf8":case"utf-8":return ae(this,f,d);case"ascii":return Ze(this,f,d);case"latin1":case"binary":return re(this,f,d);case"base64":return J(this,f,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qe(this,f,d);default:if(x)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function U(w,f,d){const x=w[f];w[f]=w[d],w[d]=x}a.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<f;d+=2)U(this,d,d+1);return this},a.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<f;d+=4)U(this,d,d+3),U(this,d+1,d+2);return this},a.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<f;d+=8)U(this,d,d+7),U(this,d+1,d+6),U(this,d+2,d+5),U(this,d+3,d+4);return this},a.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?ae(this,0,f):L.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){let f="";const d=t.INSPECT_MAX_BYTES;return f=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(f+=" ... "),"<Buffer "+f+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(f,d,x,A,I){if(je(f,s)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(d===void 0&&(d=0),x===void 0&&(x=f?f.length:0),A===void 0&&(A=0),I===void 0&&(I=this.length),d<0||x>f.length||A<0||I>this.length)throw new RangeError("out of range index");if(A>=I&&d>=x)return 0;if(A>=I)return-1;if(d>=x)return 1;if(d>>>=0,x>>>=0,A>>>=0,I>>>=0,this===f)return 0;let O=I-A,$=x-d;const X=Math.min(O,$),q=this.slice(A,I),Y=f.slice(d,x);for(let D=0;D<X;++D)if(q[D]!==Y[D]){O=q[D],$=Y[D];break}return O<$?-1:$<O?1:0};function _(w,f,d,x,A){if(w.length===0)return-1;if(typeof d=="string"?(x=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,Vn(d)&&(d=A?0:w.length-1),d<0&&(d=w.length+d),d>=w.length){if(A)return-1;d=w.length-1}else if(d<0)if(A)d=0;else return-1;if(typeof f=="string"&&(f=a.from(f,x)),a.isBuffer(f))return f.length===0?-1:j(w,f,d,x,A);if(typeof f=="number")return f=f&255,typeof s.prototype.indexOf=="function"?A?s.prototype.indexOf.call(w,f,d):s.prototype.lastIndexOf.call(w,f,d):j(w,[f],d,x,A);throw new TypeError("val must be string, number or Buffer")}function j(w,f,d,x,A){let I=1,O=w.length,$=f.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(w.length<2||f.length<2)return-1;I=2,O/=2,$/=2,d/=2}function X(Y,D){return I===1?Y[D]:Y.readUInt16BE(D*I)}let q;if(A){let Y=-1;for(q=d;q<O;q++)if(X(w,q)===X(f,Y===-1?0:q-Y)){if(Y===-1&&(Y=q),q-Y+1===$)return Y*I}else Y!==-1&&(q-=q-Y),Y=-1}else for(d+$>O&&(d=O-$),q=d;q>=0;q--){let Y=!0;for(let D=0;D<$;D++)if(X(w,q+D)!==X(f,D)){Y=!1;break}if(Y)return q}return-1}a.prototype.includes=function(f,d,x){return this.indexOf(f,d,x)!==-1},a.prototype.indexOf=function(f,d,x){return _(this,f,d,x,!0)},a.prototype.lastIndexOf=function(f,d,x){return _(this,f,d,x,!1)};function pe(w,f,d,x){d=Number(d)||0;const A=w.length-d;x?(x=Number(x),x>A&&(x=A)):x=A;const I=f.length;x>I/2&&(x=I/2);let O;for(O=0;O<x;++O){const $=parseInt(f.substr(O*2,2),16);if(Vn($))return O;w[d+O]=$}return O}function oe(w,f,d,x){return Lr(Dn(f,w.length-d),w,d,x)}function R(w,f,d,x){return Lr(Kg(f),w,d,x)}function le(w,f,d,x){return Lr(Jo(f),w,d,x)}function Pe(w,f,d,x){return Lr(Jg(f,w.length-d),w,d,x)}a.prototype.write=function(f,d,x,A){if(d===void 0)A="utf8",x=this.length,d=0;else if(x===void 0&&typeof d=="string")A=d,x=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(x)?(x=x>>>0,A===void 0&&(A="utf8")):(A=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const I=this.length-d;if((x===void 0||x>I)&&(x=I),f.length>0&&(x<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let O=!1;for(;;)switch(A){case"hex":return pe(this,f,d,x);case"utf8":case"utf-8":return oe(this,f,d,x);case"ascii":case"latin1":case"binary":return R(this,f,d,x);case"base64":return le(this,f,d,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,f,d,x);default:if(O)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),O=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(w,f,d){return f===0&&d===w.length?e.fromByteArray(w):e.fromByteArray(w.slice(f,d))}function ae(w,f,d){d=Math.min(w.length,d);const x=[];let A=f;for(;A<d;){const I=w[A];let O=null,$=I>239?4:I>223?3:I>191?2:1;if(A+$<=d){let X,q,Y,D;switch($){case 1:I<128&&(O=I);break;case 2:X=w[A+1],(X&192)===128&&(D=(I&31)<<6|X&63,D>127&&(O=D));break;case 3:X=w[A+1],q=w[A+2],(X&192)===128&&(q&192)===128&&(D=(I&15)<<12|(X&63)<<6|q&63,D>2047&&(D<55296||D>57343)&&(O=D));break;case 4:X=w[A+1],q=w[A+2],Y=w[A+3],(X&192)===128&&(q&192)===128&&(Y&192)===128&&(D=(I&15)<<18|(X&63)<<12|(q&63)<<6|Y&63,D>65535&&D<1114112&&(O=D))}}O===null?(O=65533,$=1):O>65535&&(O-=65536,x.push(O>>>10&1023|55296),O=56320|O&1023),x.push(O),A+=$}return ke(x)}const K=4096;function ke(w){const f=w.length;if(f<=K)return String.fromCharCode.apply(String,w);let d="",x=0;for(;x<f;)d+=String.fromCharCode.apply(String,w.slice(x,x+=K));return d}function Ze(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]&127);return x}function re(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]);return x}function ce(w,f,d){const x=w.length;(!f||f<0)&&(f=0),(!d||d<0||d>x)&&(d=x);let A="";for(let I=f;I<d;++I)A+=Xg[w[I]];return A}function Qe(w,f,d){const x=w.slice(f,d);let A="";for(let I=0;I<x.length-1;I+=2)A+=String.fromCharCode(x[I]+x[I+1]*256);return A}a.prototype.slice=function(f,d){const x=this.length;f=~~f,d=d===void 0?x:~~d,f<0?(f+=x,f<0&&(f=0)):f>x&&(f=x),d<0?(d+=x,d<0&&(d=0)):d>x&&(d=x),d<f&&(d=f);const A=this.subarray(f,d);return Object.setPrototypeOf(A,a.prototype),A};function V(w,f,d){if(w%1!==0||w<0)throw new RangeError("offset is not uint");if(w+f>d)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||V(f,d,this.length);let A=this[f],I=1,O=0;for(;++O<d&&(I*=256);)A+=this[f+O]*I;return A},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||V(f,d,this.length);let A=this[f+--d],I=1;for(;d>0&&(I*=256);)A+=this[f+--d]*I;return A},a.prototype.readUint8=a.prototype.readUInt8=function(f,d){return f=f>>>0,d||V(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,d){return f=f>>>0,d||V(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,d){return f=f>>>0,d||V(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,d){return f=f>>>0,d||V(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,d){return f=f>>>0,d||V(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readBigUInt64LE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Yt(f,this.length-8);const A=d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,I=this[++f]+this[++f]*2**8+this[++f]*2**16+x*2**24;return BigInt(A)+(BigInt(I)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Yt(f,this.length-8);const A=d*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],I=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x;return(BigInt(A)<<BigInt(32))+BigInt(I)}),a.prototype.readIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||V(f,d,this.length);let A=this[f],I=1,O=0;for(;++O<d&&(I*=256);)A+=this[f+O]*I;return I*=128,A>=I&&(A-=Math.pow(2,8*d)),A},a.prototype.readIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||V(f,d,this.length);let A=d,I=1,O=this[f+--A];for(;A>0&&(I*=256);)O+=this[f+--A]*I;return I*=128,O>=I&&(O-=Math.pow(2,8*d)),O},a.prototype.readInt8=function(f,d){return f=f>>>0,d||V(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,d){f=f>>>0,d||V(f,2,this.length);const x=this[f]|this[f+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(f,d){f=f>>>0,d||V(f,2,this.length);const x=this[f+1]|this[f]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(f,d){return f=f>>>0,d||V(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,d){return f=f>>>0,d||V(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readBigInt64LE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Yt(f,this.length-8);const A=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(x<<24);return(BigInt(A)<<BigInt(32))+BigInt(d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),a.prototype.readBigInt64BE=et(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Yt(f,this.length-8);const A=(d<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(A)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x)}),a.prototype.readFloatLE=function(f,d){return f=f>>>0,d||V(f,4,this.length),r.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,d){return f=f>>>0,d||V(f,4,this.length),r.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,d){return f=f>>>0,d||V(f,8,this.length),r.read(this,f,!0,52,8)},a.prototype.readDoubleBE=function(f,d){return f=f>>>0,d||V(f,8,this.length),r.read(this,f,!1,52,8)};function z(w,f,d,x,A,I){if(!a.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>A||f<I)throw new RangeError('"value" argument is out of bounds');if(d+x>w.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const $=Math.pow(2,8*x)-1;z(this,f,d,x,$,0)}let I=1,O=0;for(this[d]=f&255;++O<x&&(I*=256);)this[d+O]=f/I&255;return d+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const $=Math.pow(2,8*x)-1;z(this,f,d,x,$,0)}let I=x-1,O=1;for(this[d+I]=f&255;--I>=0&&(O*=256);)this[d+I]=f/O&255;return d+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,1,255,0),this[d]=f&255,d+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,65535,0),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,65535,0),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,4294967295,0),this[d+3]=f>>>24,this[d+2]=f>>>16,this[d+1]=f>>>8,this[d]=f&255,d+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,4294967295,0),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4};function Fr(w,f,d,x,A){Ko(f,x,A,w,d,7);let I=Number(f&BigInt(4294967295));w[d++]=I,I=I>>8,w[d++]=I,I=I>>8,w[d++]=I,I=I>>8,w[d++]=I;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,d}function Ho(w,f,d,x,A){Ko(f,x,A,w,d,7);let I=Number(f&BigInt(4294967295));w[d+7]=I,I=I>>8,w[d+6]=I,I=I>>8,w[d+5]=I,I=I>>8,w[d+4]=I;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d+3]=O,O=O>>8,w[d+2]=O,O=O>>8,w[d+1]=O,O=O>>8,w[d]=O,d+8}a.prototype.writeBigUInt64LE=et(function(f,d=0){return Fr(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(f,d=0){return Ho(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const X=Math.pow(2,8*x-1);z(this,f,d,x,X-1,-X)}let I=0,O=1,$=0;for(this[d]=f&255;++I<x&&(O*=256);)f<0&&$===0&&this[d+I-1]!==0&&($=1),this[d+I]=(f/O>>0)-$&255;return d+x},a.prototype.writeIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const X=Math.pow(2,8*x-1);z(this,f,d,x,X-1,-X)}let I=x-1,O=1,$=0;for(this[d+I]=f&255;--I>=0&&(O*=256);)f<0&&$===0&&this[d+I+1]!==0&&($=1),this[d+I]=(f/O>>0)-$&255;return d+x},a.prototype.writeInt8=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,1,127,-128),f<0&&(f=255+f+1),this[d]=f&255,d+1},a.prototype.writeInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,32767,-32768),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,2,32767,-32768),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,2147483647,-2147483648),this[d]=f&255,this[d+1]=f>>>8,this[d+2]=f>>>16,this[d+3]=f>>>24,d+4},a.prototype.writeInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||z(this,f,d,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4},a.prototype.writeBigInt64LE=et(function(f,d=0){return Fr(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(f,d=0){return Ho(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function zo(w,f,d,x,A,I){if(d+x>w.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function qo(w,f,d,x,A){return f=+f,d=d>>>0,A||zo(w,f,d,4),r.write(w,f,d,x,23,4),d+4}a.prototype.writeFloatLE=function(f,d,x){return qo(this,f,d,!0,x)},a.prototype.writeFloatBE=function(f,d,x){return qo(this,f,d,!1,x)};function Wo(w,f,d,x,A){return f=+f,d=d>>>0,A||zo(w,f,d,8),r.write(w,f,d,x,52,8),d+8}a.prototype.writeDoubleLE=function(f,d,x){return Wo(this,f,d,!0,x)},a.prototype.writeDoubleBE=function(f,d,x){return Wo(this,f,d,!1,x)},a.prototype.copy=function(f,d,x,A){if(!a.isBuffer(f))throw new TypeError("argument should be a Buffer");if(x||(x=0),!A&&A!==0&&(A=this.length),d>=f.length&&(d=f.length),d||(d=0),A>0&&A<x&&(A=x),A===x||f.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),f.length-d<A-x&&(A=f.length-d+x);const I=A-x;return this===f&&typeof s.prototype.copyWithin=="function"?this.copyWithin(d,x,A):s.prototype.set.call(f,this.subarray(x,A),d),I},a.prototype.fill=function(f,d,x,A){if(typeof f=="string"){if(typeof d=="string"?(A=d,d=0,x=this.length):typeof x=="string"&&(A=x,x=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!a.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(f.length===1){const O=f.charCodeAt(0);(A==="utf8"&&O<128||A==="latin1")&&(f=O)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(d<0||this.length<d||this.length<x)throw new RangeError("Out of range index");if(x<=d)return this;d=d>>>0,x=x===void 0?this.length:x>>>0,f||(f=0);let I;if(typeof f=="number")for(I=d;I<x;++I)this[I]=f;else{const O=a.isBuffer(f)?f:a.from(f,A),$=O.length;if($===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(I=0;I<x-d;++I)this[I+d]=O[I%$]}return this};const Pt={};function Mn(w,f,d){Pt[w]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${w}]`,this.stack,delete this.name}get code(){return w}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${w}]: ${this.message}`}}}Mn("ERR_BUFFER_OUT_OF_BOUNDS",function(w){return w?`${w} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Mn("ERR_INVALID_ARG_TYPE",function(w,f){return`The "${w}" argument must be of type number. Received type ${typeof f}`},TypeError),Mn("ERR_OUT_OF_RANGE",function(w,f,d){let x=`The value of "${w}" is out of range.`,A=d;return Number.isInteger(d)&&Math.abs(d)>2**32?A=Go(String(d)):typeof d=="bigint"&&(A=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(A=Go(A)),A+="n"),x+=` It must be ${f}. Received ${A}`,x},RangeError);function Go(w){let f="",d=w.length;const x=w[0]==="-"?1:0;for(;d>=x+4;d-=3)f=`_${w.slice(d-3,d)}${f}`;return`${w.slice(0,d)}${f}`}function qg(w,f,d){It(f,"offset"),(w[f]===void 0||w[f+d]===void 0)&&Yt(f,w.length-(d+1))}function Ko(w,f,d,x,A,I){if(w>d||w<f){const O=typeof f=="bigint"?"n":"";let $;throw f===0||f===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(I+1)*8}${O}`:$=`>= -(2${O} ** ${(I+1)*8-1}${O}) and < 2 ** ${(I+1)*8-1}${O}`,new Pt.ERR_OUT_OF_RANGE("value",$,w)}qg(x,A,I)}function It(w,f){if(typeof w!="number")throw new Pt.ERR_INVALID_ARG_TYPE(f,"number",w)}function Yt(w,f,d){throw Math.floor(w)!==w?(It(w,d),new Pt.ERR_OUT_OF_RANGE("offset","an integer",w)):f<0?new Pt.ERR_BUFFER_OUT_OF_BOUNDS:new Pt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,w)}const Wg=/[^+/0-9A-Za-z-_]/g;function Gg(w){if(w=w.split("=")[0],w=w.trim().replace(Wg,""),w.length<2)return"";for(;w.length%4!==0;)w=w+"=";return w}function Dn(w,f){f=f||1/0;let d;const x=w.length;let A=null;const I=[];for(let O=0;O<x;++O){if(d=w.charCodeAt(O),d>55295&&d<57344){if(!A){if(d>56319){(f-=3)>-1&&I.push(239,191,189);continue}else if(O+1===x){(f-=3)>-1&&I.push(239,191,189);continue}A=d;continue}if(d<56320){(f-=3)>-1&&I.push(239,191,189),A=d;continue}d=(A-55296<<10|d-56320)+65536}else A&&(f-=3)>-1&&I.push(239,191,189);if(A=null,d<128){if((f-=1)<0)break;I.push(d)}else if(d<2048){if((f-=2)<0)break;I.push(d>>6|192,d&63|128)}else if(d<65536){if((f-=3)<0)break;I.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((f-=4)<0)break;I.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return I}function Kg(w){const f=[];for(let d=0;d<w.length;++d)f.push(w.charCodeAt(d)&255);return f}function Jg(w,f){let d,x,A;const I=[];for(let O=0;O<w.length&&!((f-=2)<0);++O)d=w.charCodeAt(O),x=d>>8,A=d%256,I.push(A),I.push(x);return I}function Jo(w){return e.toByteArray(Gg(w))}function Lr(w,f,d,x){let A;for(A=0;A<x&&!(A+d>=f.length||A>=w.length);++A)f[A+d]=w[A];return A}function je(w,f){return w instanceof f||w!=null&&w.constructor!=null&&w.constructor.name!=null&&w.constructor.name===f.name}function Vn(w){return w!==w}const Xg=(function(){const w="0123456789abcdef",f=new Array(256);for(let d=0;d<16;++d){const x=d*16;for(let A=0;A<16;++A)f[x+A]=w[d]+w[A]}return f})();function et(w){return typeof BigInt>"u"?Yg:w}function Yg(){throw new Error("BigInt not supported")}})(ai);const li=ai.Buffer;let B=class Xo extends Error{static from(e,r,n,i,s,o){const u=new Xo(e.message,r||e.code,n,i,s);return u.cause=e,u.name=e.name,e.status!=null&&u.status==null&&(u.status=e.status),o&&Object.assign(u,o),u}constructor(e,r,n,i,s){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}};B.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",B.ERR_BAD_OPTION="ERR_BAD_OPTION",B.ECONNABORTED="ECONNABORTED",B.ETIMEDOUT="ETIMEDOUT",B.ERR_NETWORK="ERR_NETWORK",B.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",B.ERR_DEPRECATED="ERR_DEPRECATED",B.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",B.ERR_BAD_REQUEST="ERR_BAD_REQUEST",B.ERR_CANCELED="ERR_CANCELED",B.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",B.ERR_INVALID_URL="ERR_INVALID_URL";var iu=null;function Vr(t){return N.isPlainObject(t)||N.isArray(t)}function ci(t){return N.endsWith(t,"[]")?t.slice(0,-2):t}function Hr(t,e,r){return t?t.concat(e).map(function(i,s){return i=ci(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function su(t){return N.isArray(t)&&!t.some(Vr)}const ou=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function ir(t,e,r){if(!N.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=N.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!N.isUndefined(y[m])});const n=r.metaTokens,i=r.visitor||a,s=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(N.isDate(g))return g.toISOString();if(N.isBoolean(g))return g.toString();if(!l&&N.isBlob(g))throw new B("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(g)||N.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):li.from(g):g}function a(g,m,y){let v=g;if(N.isReactNative(e)&&N.isReactNativeBlob(g))return e.append(Hr(y,m,s),c(g)),!1;if(g&&!y&&typeof g=="object"){if(N.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(N.isArray(g)&&su(g)||(N.isFileList(g)||N.endsWith(m,"[]"))&&(v=N.toArray(g)))return m=ci(m),v.forEach(function(T,P){!(N.isUndefined(T)||T===null)&&e.append(o===!0?Hr([m],P,s):o===null?m:m+"[]",c(T))}),!1}return Vr(g)?!0:(e.append(Hr(y,m,s),c(g)),!1)}const h=[],p=Object.assign(ou,{defaultVisitor:a,convertValue:c,isVisitable:Vr});function b(g,m){if(!N.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),N.forEach(g,function(v,E){(!(N.isUndefined(v)||v===null)&&i.call(e,v,N.isString(E)?E.trim():E,m,p))===!0&&b(v,m?m.concat(E):[E])}),h.pop()}}if(!N.isObject(t))throw new TypeError("data must be an object");return b(t),e}function fi(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function zr(t,e){this._pairs=[],t&&ir(t,this,e)}const hi=zr.prototype;hi.append=function(e,r){this._pairs.push([e,r])},hi.toString=function(e){const r=e?function(n){return e.call(this,n,fi)}:fi;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function au(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function di(t,e,r){if(!e)return t;const n=r&&r.encode||au,i=N.isFunction(r)?{serialize:r}:r,s=i&&i.serialize;let o;if(s?o=s(e,i):o=N.isURLSearchParams(e)?e.toString():new zr(e,i).toString(n),o){const u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class pi{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}var qr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},uu=typeof URLSearchParams<"u"?URLSearchParams:zr,lu=typeof FormData<"u"?FormData:null,cu=typeof Blob<"u"?Blob:null,fu={isBrowser:!0,classes:{URLSearchParams:uu,FormData:lu,Blob:cu},protocols:["http","https","file","blob","url","data"]};const Wr=typeof window<"u"&&typeof document<"u",Gr=typeof navigator=="object"&&navigator||void 0,hu=Wr&&(!Gr||["ReactNative","NativeScript","NS"].indexOf(Gr.product)<0),du=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pu=Wr&&window.location.href||"http://localhost";var gu=Object.freeze({__proto__:null,hasBrowserEnv:Wr,hasStandardBrowserEnv:hu,hasStandardBrowserWebWorkerEnv:du,navigator:Gr,origin:pu}),fe={...gu,...fu};function mu(t,e){return ir(t,new fe.classes.URLSearchParams,{visitor:function(r,n,i,s){return fe.isNode&&N.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function yu(t){return N.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function bu(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function gi(t){function e(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),l=s>=r.length;return o=!o&&N.isArray(i)?i.length:o,l?(N.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!u):((!i[o]||!N.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&N.isArray(i[o])&&(i[o]=bu(i[o])),!u)}if(N.isFormData(t)&&N.isFunction(t.entries)){const r={};return N.forEachEntry(t,(n,i)=>{e(yu(n),i,r,0)}),r}return null}function wu(t,e,r){if(N.isString(t))try{return(e||JSON.parse)(t),N.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Rt={transitional:qr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(e);if(s&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i?JSON.stringify(gi(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return mu(e,this.formSerializer).toString();if((u=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ir(u?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),wu(e)):e}],transformResponse:[function(e){const r=this.transitional||Rt.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(u){if(o)throw u.name==="SyntaxError"?B.from(u,B.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],t=>{Rt.headers[t]={}});const xu=N.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 Eu=t=>{const e={};let r,n,i;return t&&t.split(`
2
+ `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&xu[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};const mi=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function sr(t){return t===!1||t==null?t:N.isArray(t)?t.map(sr):String(t)}function vu(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Tu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Kr(t,e,r,n,i){if(N.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function Au(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Nu(t,e){const r=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}let Ee=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(u,l,c){const a=Ft(l);if(!a)throw new Error("header name must be a non-empty string");const h=N.findKey(i,a);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||l]=sr(u))}const o=(u,l)=>N.forEach(u,(c,a)=>s(c,a,l));if(N.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(N.isString(e)&&(e=e.trim())&&!Tu(e))o(Eu(e),r);else if(N.isObject(e)&&N.isIterable(e)){let u={},l,c;for(const a of e){if(!N.isArray(a))throw TypeError("Object iterator must return a key-value pair");u[c=a[0]]=(l=u[c])?N.isArray(l)?[...l,a[1]]:[l,a[1]]:a[1]}o(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Ft(e),e){const n=N.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return vu(i);if(N.isFunction(r))return r.call(this,i,n);if(N.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ft(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Kr(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(o){if(o=Ft(o),o){const u=N.findKey(n,o);u&&(!r||Kr(n,n[u],u,r))&&(delete n[u],i=!0)}}return N.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||Kr(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return N.forEach(this,(i,s)=>{const o=N.findKey(n,s);if(o){r[o]=sr(i),delete r[s];return}const u=e?Au(s):String(s).trim();u!==s&&delete r[s],r[u]=sr(i),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&N.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[mi]=this[mi]={accessors:{}}).accessors,i=this.prototype;function s(o){const u=Ft(o);n[u]||(Nu(i,o),n[u]=!0)}return N.isArray(e)?e.forEach(s):s(e),this}};Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(Ee.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),N.freezeMethods(Ee);function Jr(t,e){const r=this||Rt,n=e||r,i=Ee.from(n.headers);let s=n.data;return N.forEach(t,function(u){s=u.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function yi(t){return!!(t&&t.__CANCEL__)}let Lt=class extends B{constructor(e,r,n){super(e??"canceled",B.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function bi(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new B("Request failed with status code "+r.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Pu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Iu(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),a=n[s];o||(o=c),r[i]=l,n[i]=c;let h=s,p=0;for(;h!==i;)p+=r[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const b=a&&c-a;return b?Math.round(p*1e3/b):void 0}}function Su(t,e){let r=0,n=1e3/e,i,s;const o=(c,a=Date.now())=>{r=a,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const a=Date.now(),h=a-r;h>=n?o(c,a):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},n-h)))},()=>i&&o(i)]}const or=(t,e,r=3)=>{let n=0;const i=Iu(50,250);return Su(s=>{const o=s.loaded,u=s.lengthComputable?s.total:void 0,l=o-n,c=i(l),a=o<=u;n=o;const h={loaded:o,total:u,progress:u?o/u:void 0,bytes:l,rate:c||void 0,estimated:c&&u&&a?(u-o)/c:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(h)},r)},wi=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},xi=t=>(...e)=>N.asap(()=>t(...e));var Ou=fe.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,fe.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Cu=fe.hasStandardBrowserEnv?{write(t,e,r,n,i,s,o){if(typeof document>"u")return;const u=[`${t}=${encodeURIComponent(e)}`];N.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),N.isString(n)&&u.push(`path=${n}`),N.isString(i)&&u.push(`domain=${i}`),s===!0&&u.push("secure"),N.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ru(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Fu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ei(t,e,r){let n=!Ru(e);return t&&(n||r==!1)?Fu(t,e):e}const vi=t=>t instanceof Ee?{...t}:t;function nt(t,e){e=e||{};const r={};function n(c,a,h,p){return N.isPlainObject(c)&&N.isPlainObject(a)?N.merge.call({caseless:p},c,a):N.isPlainObject(a)?N.merge({},a):N.isArray(a)?a.slice():a}function i(c,a,h,p){if(N.isUndefined(a)){if(!N.isUndefined(c))return n(void 0,c,h,p)}else return n(c,a,h,p)}function s(c,a){if(!N.isUndefined(a))return n(void 0,a)}function o(c,a){if(N.isUndefined(a)){if(!N.isUndefined(c))return n(void 0,c)}else return n(void 0,a)}function u(c,a,h){if(h in e)return n(c,a);if(h in t)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,a,h)=>i(vi(c),vi(a),h,!0)};return N.forEach(Object.keys({...t,...e}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const h=N.hasOwnProp(l,a)?l[a]:i,p=h(t[a],e[a],a);N.isUndefined(p)&&h!==u||(r[a]=p)}),r}var Ti=t=>{const e=nt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:u}=e;if(e.headers=o=Ee.from(o),e.url=di(Ei(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),N.isFormData(r)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(N.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([a,h])=>{c.includes(a.toLowerCase())&&o.set(a,h)})}}if(fe.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(e)),n||n!==!1&&Ou(e.url))){const l=i&&s&&Cu.read(s);l&&o.set(i,l)}return e},Lu=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const i=Ti(t);let s=i.data;const o=Ee.from(i.headers).normalize();let{responseType:u,onUploadProgress:l,onDownloadProgress:c}=i,a,h,p,b,g;function m(){b&&b(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function v(){if(!y)return;const T=Ee.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!u||u==="text"||u==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:t,request:y};bi(function(L){r(L),m()},function(L){n(L),m()},S),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(v)},y.onabort=function(){y&&(n(new B("Request aborted",B.ECONNABORTED,t,y)),y=null)},y.onerror=function(P){const S=P&&P.message?P.message:"Network Error",F=new B(S,B.ERR_NETWORK,t,y);F.event=P||null,n(F),y=null},y.ontimeout=function(){let P=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||qr;i.timeoutErrorMessage&&(P=i.timeoutErrorMessage),n(new B(P,S.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,t,y)),y=null},s===void 0&&o.setContentType(null),"setRequestHeader"in y&&N.forEach(o.toJSON(),function(P,S){y.setRequestHeader(S,P)}),N.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),u&&u!=="json"&&(y.responseType=i.responseType),c&&([p,g]=or(c,!0),y.addEventListener("progress",p)),l&&y.upload&&([h,b]=or(l),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(a=T=>{y&&(n(!T||T.type?new Lt(null,t,y):T),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const E=Pu(i.url);if(E&&fe.protocols.indexOf(E)===-1){n(new B("Unsupported protocol "+E+":",B.ERR_BAD_REQUEST,t));return}y.send(s||null)})};const _u=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,u();const a=c instanceof Error?c:this.reason;n.abort(a instanceof B?a:new Lt(a instanceof Error?a.message:a))}};let o=e&&setTimeout(()=>{o=null,s(new B(`timeout of ${e}ms exceeded`,B.ETIMEDOUT))},e);const u=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>N.asap(u),l}},Uu=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},Bu=async function*(t,e){for await(const r of $u(t))yield*Uu(r,e)},$u=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Ai=(t,e,r,n)=>{const i=Bu(t,e);let s=0,o,u=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:a}=await i.next();if(c){u(),l.close();return}let h=a.byteLength;if(r){let p=s+=h;r(p)}l.enqueue(new Uint8Array(a))}catch(c){throw u(c),c}},cancel(l){return u(l),i.return()}},{highWaterMark:2})},Ni=64*1024,{isFunction:ar}=N,ku=(({Request:t,Response:e})=>({Request:t,Response:e}))(N.global),{ReadableStream:Pi,TextEncoder:Ii}=N.global,Si=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ju=t=>{t=N.merge.call({skipUndefined:!0},ku,t);const{fetch:e,Request:r,Response:n}=t,i=e?ar(e):typeof fetch=="function",s=ar(r),o=ar(n);if(!i)return!1;const u=i&&ar(Pi),l=i&&(typeof Ii=="function"?(g=>m=>g.encode(m))(new Ii):async g=>new Uint8Array(await new r(g).arrayBuffer())),c=s&&u&&Si(()=>{let g=!1;const m=new r(fe.origin,{body:new Pi,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),a=o&&u&&Si(()=>N.isReadableStream(new n("").body)),h={stream:a&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(m,y)=>{let v=m&&m[g];if(v)return v.call(m);throw new B(`Response type '${g}' is not supported`,B.ERR_NOT_SUPPORT,y)})});const p=async g=>{if(g==null)return 0;if(N.isBlob(g))return g.size;if(N.isSpecCompliantForm(g))return(await new r(fe.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(N.isArrayBufferView(g)||N.isArrayBuffer(g))return g.byteLength;if(N.isURLSearchParams(g)&&(g=g+""),N.isString(g))return(await l(g)).byteLength},b=async(g,m)=>{const y=N.toFiniteNumber(g.getContentLength());return y??p(m)};return async g=>{let{url:m,method:y,data:v,signal:E,cancelToken:T,timeout:P,onDownloadProgress:S,onUploadProgress:F,responseType:L,headers:U,withCredentials:_="same-origin",fetchOptions:j}=Ti(g),pe=e||fetch;L=L?(L+"").toLowerCase():"text";let oe=_u([E,T&&T.toAbortSignal()],P),R=null;const le=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()});let Pe;try{if(F&&c&&y!=="get"&&y!=="head"&&(Pe=await b(U,v))!==0){let re=new r(m,{method:"POST",body:v,duplex:"half"}),ce;if(N.isFormData(v)&&(ce=re.headers.get("content-type"))&&U.setContentType(ce),re.body){const[Qe,V]=wi(Pe,or(xi(F)));v=Ai(re.body,Ni,Qe,V)}}N.isString(_)||(_=_?"include":"omit");const J=s&&"credentials"in r.prototype,ae={...j,signal:oe,method:y.toUpperCase(),headers:U.normalize().toJSON(),body:v,duplex:"half",credentials:J?_:void 0};R=s&&new r(m,ae);let K=await(s?pe(R,j):pe(m,ae));const ke=a&&(L==="stream"||L==="response");if(a&&(S||ke&&le)){const re={};["status","statusText","headers"].forEach(z=>{re[z]=K[z]});const ce=N.toFiniteNumber(K.headers.get("content-length")),[Qe,V]=S&&wi(ce,or(xi(S),!0))||[];K=new n(Ai(K.body,Ni,Qe,()=>{V&&V(),le&&le()}),re)}L=L||"text";let Ze=await h[N.findKey(h,L)||"text"](K,g);return!ke&&le&&le(),await new Promise((re,ce)=>{bi(re,ce,{data:Ze,headers:Ee.from(K.headers),status:K.status,statusText:K.statusText,config:g,request:R})})}catch(J){throw le&&le(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new B("Network Error",B.ERR_NETWORK,g,R,J&&J.response),{cause:J.cause||J}):B.from(J,J&&J.code,g,R,J&&J.response)}}},Mu=new Map,Oi=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,s=[n,i,r];let o=s.length,u=o,l,c,a=Mu;for(;u--;)l=s[u],c=a.get(l),c===void 0&&a.set(l,c=u?new Map:ju(e)),a=c;return c};Oi();const Xr={http:iu,xhr:Lu,fetch:{get:Oi}};N.forEach(Xr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ci=t=>`- ${t}`,Du=t=>N.isFunction(t)||t===null||t===!1;function Vu(t,e){t=N.isArray(t)?t:[t];const{length:r}=t;let n,i;const s={};for(let o=0;o<r;o++){n=t[o];let u;if(i=n,!Du(n)&&(i=Xr[(u=String(n)).toLowerCase()],i===void 0))throw new B(`Unknown adapter '${u}'`);if(i&&(N.isFunction(i)||(i=i.get(e))))break;s[u||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let u=r?o.length>1?`since :
4
+ `+o.map(Ci).join(`
5
+ `):" "+Ci(o[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i}var Ri={getAdapter:Vu,adapters:Xr};function Yr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lt(null,t)}function Fi(t){return Yr(t),t.headers=Ee.from(t.headers),t.data=Jr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ri.getAdapter(t.adapter||Rt.adapter,t)(t).then(function(n){return Yr(t),n.data=Jr.call(t,t.transformResponse,n),n.headers=Ee.from(n.headers),n},function(n){return yi(n)||(Yr(t),n&&n.response&&(n.response.data=Jr.call(t,t.transformResponse,n.response),n.response.headers=Ee.from(n.response.headers))),Promise.reject(n)})}const Li="1.13.6",ur={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ur[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const _i={};ur.transitional=function(e,r,n){function i(s,o){return"[Axios v"+Li+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,u)=>{if(e===!1)throw new B(i(o," has been removed"+(r?" in "+r:"")),B.ERR_DEPRECATED);return r&&!_i[o]&&(_i[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,u):!0}},ur.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Hu(t,e,r){if(typeof t!="object")throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],o=e[s];if(o){const u=t[s],l=u===void 0||o(u,s,t);if(l!==!0)throw new B("option "+s+" must be "+l,B.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}}var lr={assertOptions:Hu,validators:ur};const Se=lr.validators;let it=class{constructor(e){this.defaults=e||{},this.interceptors={request:new pi,response:new pi}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=nt(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&lr.assertOptions(n,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean)},!1),i!=null&&(N.isFunction(i)?r.paramsSerializer={serialize:i}:lr.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),lr.assertOptions(r,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&N.merge(s.common,s[r.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),r.headers=Ee.concat(o,s);const u=[];let l=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(r)===!1)return;l=l&&m.synchronous;const y=r.transitional||qr;y&&y.legacyInterceptorReqResOrdering?u.unshift(m.fulfilled,m.rejected):u.push(m.fulfilled,m.rejected)});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let a,h=0,p;if(!l){const g=[Fi.bind(this),void 0];for(g.unshift(...u),g.push(...c),p=g.length,a=Promise.resolve(r);h<p;)a=a.then(g[h++],g[h++]);return a}p=u.length;let b=r;for(;h<p;){const g=u[h++],m=u[h++];try{b=g(b)}catch(y){m.call(this,y);break}}try{a=Fi.call(this,b)}catch(g){return Promise.reject(g)}for(h=0,p=c.length;h<p;)a=a.then(c[h++],c[h++]);return a}getUri(e){e=nt(this.defaults,e);const r=Ei(e.baseURL,e.url,e.allowAbsoluteUrls);return di(r,e.params,e.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(e){it.prototype[e]=function(r,n){return this.request(nt(n||{},{method:e,url:r,data:(n||{}).data}))}}),N.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,u){return this.request(nt(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}it.prototype[e]=r(),it.prototype[e+"Form"]=r(!0)});let zu=class Yo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u),s=u}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,u){n.reason||(n.reason=new Lt(s,o,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Yo(function(i){e=i}),cancel:e}}};function qu(t){return function(r){return t.apply(null,r)}}function Wu(t){return N.isObject(t)&&t.isAxiosError===!0}const Zr={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(Zr).forEach(([t,e])=>{Zr[e]=t});function Ui(t){const e=new it(t),r=Xn(it.prototype.request,e);return N.extend(r,it.prototype,e,{allOwnKeys:!0}),N.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Ui(nt(t,i))},r}const Q=Ui(Rt);Q.Axios=it,Q.CanceledError=Lt,Q.CancelToken=zu,Q.isCancel=yi,Q.VERSION=Li,Q.toFormData=ir,Q.AxiosError=B,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=qu,Q.isAxiosError=Wu,Q.mergeConfig=nt,Q.AxiosHeaders=Ee,Q.formToJSON=t=>gi(N.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=Ri.getAdapter,Q.HttpStatusCode=Zr,Q.default=Q;const{Axios:e0,AxiosError:t0,CanceledError:r0,isCancel:n0,CancelToken:i0,VERSION:s0,all:o0,Cancel:a0,isAxiosError:u0,spread:l0,toFormData:c0,AxiosHeaders:f0,HttpStatusCode:h0,formToJSON:d0,getAdapter:p0,mergeConfig:g0}=Q,cr=t=>encodeURIComponent(t).split("%2F").join("/"),Gu=/^(\w+:\/\/[^/?]+)?(.*?)$/,Ku=t=>t.filter(e=>typeof e=="string"||typeof e=="number").map(e=>`${e}`).filter(e=>e),Ju=t=>{const e=t.join("/"),[,r="",n=""]=e.match(Gu)||[];return{prefix:r,pathname:{parts:n.split("/").filter(i=>i!==""),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},Xu=(t,e)=>{const{prefix:r,pathname:n}=t,{parts:i,hasLeading:s,hasTrailing:o}=n,{leadingSlash:u,trailingSlash:l}=e,c=u===!0||u==="keep"&&s,a=l===!0||l==="keep"&&o;let h=r;return i.length>0&&((h||c)&&(h+="/"),h+=i.join("/")),a&&(h+="/"),!h&&c&&(h+="/"),h},k=(...t)=>{const e=t[t.length-1];let r;e&&typeof e=="object"&&(r=e,t=t.slice(0,-1)),r={leadingSlash:!0,trailingSlash:!1,...r},t=Ku(t);const n=Ju(t);return Xu(n,r)};class Bi extends Error{response;statusCode;constructor(e,r,n=null){super(e),this.response=r,this.statusCode=n}}class Yu extends Bi{errorCode;constructor(e,r,n,i=null){super(e,n,i),this.errorCode=r}}function Zu(t,e=""){return`/public-files/${t}/${e}`.split("/").filter(Boolean).join("/")}function Qu(t,e=""){return`/ocm/${t}/${e}`.split("/").filter(Boolean).join("/")}var Qr,$i;function el(){if($i)return Qr;$i=1;function t(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,s){for(var o="",u=0,l=-1,c=0,a,h=0;h<=i.length;++h){if(h<i.length)a=i.charCodeAt(h);else{if(a===47)break;a=47}if(a===47){if(!(l===h-1||c===1))if(l!==h-1&&c===2){if(o.length<2||u!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var p=o.lastIndexOf("/");if(p!==o.length-1){p===-1?(o="",u=0):(o=o.slice(0,p),u=o.length-1-o.lastIndexOf("/")),l=h,c=0;continue}}else if(o.length===2||o.length===1){o="",u=0,l=h,c=0;continue}}s&&(o.length>0?o+="/..":o="..",u=2)}else o.length>0?o+="/"+i.slice(l+1,h):o=i.slice(l+1,h),u=h-l-1;l=h,c=0}else a===46&&c!==-1?++c:c=-1}return o}function r(i,s){var o=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return o?o===s.root?o+u:o+i+u:u}var n={resolve:function(){for(var s="",o=!1,u,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(u===void 0&&(u=Be.cwd()),c=u),t(c),c.length!==0&&(s=c+"/"+s,o=c.charCodeAt(0)===47)}return s=e(s,!o),o?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(t(s),s.length===0)return".";var o=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=e(s,!o),s.length===0&&!o&&(s="."),s.length>0&&u&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return t(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var u=arguments[o];t(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":n.normalize(s)},relative:function(s,o){if(t(s),t(o),s===o||(s=n.resolve(s),o=n.resolve(o),s===o))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var l=s.length,c=l-u,a=1;a<o.length&&o.charCodeAt(a)===47;++a);for(var h=o.length,p=h-a,b=c<p?c:p,g=-1,m=0;m<=b;++m){if(m===b){if(p>b){if(o.charCodeAt(a+m)===47)return o.slice(a+m+1);if(m===0)return o.slice(a+m)}else c>b&&(s.charCodeAt(u+m)===47?g=m:m===0&&(g=0));break}var y=s.charCodeAt(u+m),v=o.charCodeAt(a+m);if(y!==v)break;y===47&&(g=m)}var E="";for(m=u+g+1;m<=l;++m)(m===l||s.charCodeAt(m)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+o.slice(a+g):(a+=g,o.charCodeAt(a)===47&&++a,o.slice(a))},_makeLong:function(s){return s},dirname:function(s){if(t(s),s.length===0)return".";for(var o=s.charCodeAt(0),u=o===47,l=-1,c=!0,a=s.length-1;a>=1;--a)if(o=s.charCodeAt(a),o===47){if(!c){l=a;break}}else c=!1;return l===-1?u?"/":".":u&&l===1?"//":s.slice(0,l)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');t(s);var u=0,l=-1,c=!0,a;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var h=o.length-1,p=-1;for(a=s.length-1;a>=0;--a){var b=s.charCodeAt(a);if(b===47){if(!c){u=a+1;break}}else p===-1&&(c=!1,p=a+1),h>=0&&(b===o.charCodeAt(h)?--h===-1&&(l=a):(h=-1,l=p))}return u===l?l=p:l===-1&&(l=s.length),s.slice(u,l)}else{for(a=s.length-1;a>=0;--a)if(s.charCodeAt(a)===47){if(!c){u=a+1;break}}else l===-1&&(c=!1,l=a+1);return l===-1?"":s.slice(u,l)}},extname:function(s){t(s);for(var o=-1,u=0,l=-1,c=!0,a=0,h=s.length-1;h>=0;--h){var p=s.charCodeAt(h);if(p===47){if(!c){u=h+1;break}continue}l===-1&&(c=!1,l=h+1),p===46?o===-1?o=h:a!==1&&(a=1):o!==-1&&(a=-1)}return o===-1||l===-1||a===0||a===1&&o===l-1&&o===u+1?"":s.slice(o,l)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return r("/",s)},parse:function(s){t(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var u=s.charCodeAt(0),l=u===47,c;l?(o.root="/",c=1):c=0;for(var a=-1,h=0,p=-1,b=!0,g=s.length-1,m=0;g>=c;--g){if(u=s.charCodeAt(g),u===47){if(!b){h=g+1;break}continue}p===-1&&(b=!1,p=g+1),u===46?a===-1?a=g:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||p===-1||m===0||m===1&&a===p-1&&a===h+1?p!==-1&&(h===0&&l?o.base=o.name=s.slice(1,p):o.base=o.name=s.slice(h,p)):(h===0&&l?(o.name=s.slice(1,a),o.base=s.slice(1,p)):(o.name=s.slice(h,a),o.base=s.slice(h,p)),o.ext=s.slice(a,p)),h>0?o.dir=s.slice(0,h-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,Qr=n,Qr}var ki=el(),ji=Hn(ki);class Le{static Shared="S";static Shareable="R";static Mounted="M";static Deletable="D";static Renameable="N";static Moveable="V";static Updateable="NV";static FileUpdateable="W";static FolderCreateable="CK";static Deny="Z";static SecureView="X"}var Ve=(t=>(t.copy="COPY",t.delete="DELETE",t.lock="LOCK",t.mkcol="MKCOL",t.move="MOVE",t.propfind="PROPFIND",t.proppatch="PROPPATCH",t.put="PUT",t.report="REPORT",t.unlock="UNLOCK",t))(Ve||{});const fr=t=>({value:t,type:null}),tl=t=>fr(t),M=t=>fr(t),hr=t=>fr(t),rl=t=>fr(t),nl={Permissions:M("permissions"),IsFavorite:hr("favorite"),FileId:M("fileid"),FileParent:M("file-parent"),Name:M("name"),OwnerId:M("owner-id"),OwnerDisplayName:M("owner-display-name"),PrivateLink:M("privatelink"),ContentLength:hr("getcontentlength"),ContentSize:hr("size"),LastModifiedDate:M("getlastmodified"),Tags:tl("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:M("getetag"),MimeType:M("getcontenttype"),ResourceType:rl("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:M("owner"),LockTime:M("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:M("downloadURL"),Highlights:M("highlights"),MetaPathForUser:M("meta-path-for-user"),RemoteItemId:M("remote-item-id"),HasPreview:hr("has-preview"),ShareId:M("shareid"),ShareRoot:M("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:M("share-permissions"),TrashbinOriginalFilename:M("trashbin-original-filename"),TrashbinOriginalLocation:M("trashbin-original-location"),TrashbinDeletedDate:M("trashbin-delete-datetime"),PublicLinkItemType:M("public-link-item-type"),PublicLinkPermission:M("public-link-permission"),PublicLinkExpiration:M("public-link-expiration"),PublicLinkShareDate:M("public-link-share-datetime"),PublicLinkShareOwner:M("public-link-share-owner")},C=Object.fromEntries(Object.entries(nl).map(([t,e])=>[t,e.value]));class st{static Default=[C.Permissions,C.IsFavorite,C.FileId,C.FileParent,C.Name,C.LockDiscovery,C.ActiveLock,C.OwnerId,C.OwnerDisplayName,C.RemoteItemId,C.ShareRoot,C.ShareTypes,C.PrivateLink,C.ContentLength,C.ContentSize,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.Tags,C.Audio,C.Location,C.Image,C.Photo,C.HasPreview];static PublicLink=st.Default.concat([C.PublicLinkItemType,C.PublicLinkPermission,C.PublicLinkExpiration,C.PublicLinkShareDate,C.PublicLinkShareOwner]);static Trashbin=[C.ContentLength,C.ResourceType,C.TrashbinOriginalLocation,C.TrashbinOriginalFilename,C.TrashbinDeletedDate,C.Permissions,C.FileParent];static DavNamespace=[C.ContentLength,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.LockDiscovery,C.ActiveLock]}var il=typeof Re=="object"&&Re&&Re.Object===Object&&Re,sl=typeof self=="object"&&self&&self.Object===Object&&self,en=il||sl||Function("return this")(),yt=en.Symbol,Mi=Object.prototype,ol=Mi.hasOwnProperty,al=Mi.toString,_t=yt?yt.toStringTag:void 0;function ul(t){var e=ol.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch{}var i=al.call(t);return n&&(e?t[_t]=r:delete t[_t]),i}var ll=Object.prototype,cl=ll.toString;function fl(t){return cl.call(t)}var hl="[object Null]",dl="[object Undefined]",Di=yt?yt.toStringTag:void 0;function Vi(t){return t==null?t===void 0?dl:hl:Di&&Di in Object(t)?ul(t):fl(t)}function pl(t){return t!=null&&typeof t=="object"}var gl="[object Symbol]";function tn(t){return typeof t=="symbol"||pl(t)&&Vi(t)==gl}function ml(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var rn=Array.isArray,Hi=yt?yt.prototype:void 0,zi=Hi?Hi.toString:void 0;function qi(t){if(typeof t=="string")return t;if(rn(t))return ml(t,qi)+"";if(tn(t))return zi?zi.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Wi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var yl="[object AsyncFunction]",bl="[object Function]",wl="[object GeneratorFunction]",xl="[object Proxy]";function El(t){if(!Wi(t))return!1;var e=Vi(t);return e==bl||e==wl||e==yl||e==xl}var nn=en["__core-js_shared__"],Gi=(function(){var t=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function vl(t){return!!Gi&&Gi in t}var Tl=Function.prototype,Al=Tl.toString;function Nl(t){if(t!=null){try{return Al.call(t)}catch{}try{return t+""}catch{}}return""}var Pl=/[\\^$.*+?()[\]{}|]/g,Il=/^\[object .+?Constructor\]$/,Sl=Function.prototype,Ol=Object.prototype,Cl=Sl.toString,Rl=Ol.hasOwnProperty,Fl=RegExp("^"+Cl.call(Rl).replace(Pl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ll(t){if(!Wi(t)||vl(t))return!1;var e=El(t)?Fl:Il;return e.test(Nl(t))}function _l(t,e){return t?.[e]}function Ki(t,e){var r=_l(t,e);return Ll(r)?r:void 0}function Ul(t,e){return t===e||t!==t&&e!==e}var Bl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$l=/^\w*$/;function kl(t,e){if(rn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||tn(t)?!0:$l.test(t)||!Bl.test(t)||e!=null&&t in Object(e)}var Ut=Ki(Object,"create");function jl(){this.__data__=Ut?Ut(null):{},this.size=0}function Ml(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Dl="__lodash_hash_undefined__",Vl=Object.prototype,Hl=Vl.hasOwnProperty;function zl(t){var e=this.__data__;if(Ut){var r=e[t];return r===Dl?void 0:r}return Hl.call(e,t)?e[t]:void 0}var ql=Object.prototype,Wl=ql.hasOwnProperty;function Gl(t){var e=this.__data__;return Ut?e[t]!==void 0:Wl.call(e,t)}var Kl="__lodash_hash_undefined__";function Jl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ut&&e===void 0?Kl:e,this}function ot(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ot.prototype.clear=jl,ot.prototype.delete=Ml,ot.prototype.get=zl,ot.prototype.has=Gl,ot.prototype.set=Jl;function Xl(){this.__data__=[],this.size=0}function dr(t,e){for(var r=t.length;r--;)if(Ul(t[r][0],e))return r;return-1}var Yl=Array.prototype,Zl=Yl.splice;function Ql(t){var e=this.__data__,r=dr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Zl.call(e,r,1),--this.size,!0}function ec(t){var e=this.__data__,r=dr(e,t);return r<0?void 0:e[r][1]}function tc(t){return dr(this.__data__,t)>-1}function rc(t,e){var r=this.__data__,n=dr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function bt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}bt.prototype.clear=Xl,bt.prototype.delete=Ql,bt.prototype.get=ec,bt.prototype.has=tc,bt.prototype.set=rc;var nc=Ki(en,"Map");function ic(){this.size=0,this.__data__={hash:new ot,map:new(nc||bt),string:new ot}}function sc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function pr(t,e){var r=t.__data__;return sc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function oc(t){var e=pr(this,t).delete(t);return this.size-=e?1:0,e}function ac(t){return pr(this,t).get(t)}function uc(t){return pr(this,t).has(t)}function lc(t,e){var r=pr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function at(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}at.prototype.clear=ic,at.prototype.delete=oc,at.prototype.get=ac,at.prototype.has=uc,at.prototype.set=lc;var cc="Expected a function";function sn(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(cc);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(sn.Cache||at),r}sn.Cache=at;var fc=500;function hc(t){var e=sn(t,function(n){return r.size===fc&&r.clear(),n}),r=e.cache;return e}var dc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pc=/\\(\\)?/g,gc=hc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dc,function(r,n,i,s){e.push(i?s.replace(pc,"$1"):n||r)}),e});function Bt(t){return t==null?"":qi(t)}function mc(t,e){return rn(t)?t:kl(t,e)?[t]:gc(Bt(t))}function yc(t){if(typeof t=="string"||tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function bc(t,e){e=mc(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[yc(e[r++])];return r&&r==n?t:void 0}function wc(t,e,r){var n=t==null?void 0:bc(t,e);return n===void 0?r:n}function xc(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(i);++n<i;)s[n]=t[n+e];return s}function Ec(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:xc(t,e,r)}var vc="\\ud800-\\udfff",Tc="\\u0300-\\u036f",Ac="\\ufe20-\\ufe2f",Nc="\\u20d0-\\u20ff",Pc=Tc+Ac+Nc,Ic="\\ufe0e\\ufe0f",Sc="\\u200d",Oc=RegExp("["+Sc+vc+Pc+Ic+"]");function Ji(t){return Oc.test(t)}function Cc(t){return t.split("")}var Xi="\\ud800-\\udfff",Rc="\\u0300-\\u036f",Fc="\\ufe20-\\ufe2f",Lc="\\u20d0-\\u20ff",_c=Rc+Fc+Lc,Uc="\\ufe0e\\ufe0f",Bc="["+Xi+"]",on="["+_c+"]",an="\\ud83c[\\udffb-\\udfff]",$c="(?:"+on+"|"+an+")",Yi="[^"+Xi+"]",Zi="(?:\\ud83c[\\udde6-\\uddff]){2}",Qi="[\\ud800-\\udbff][\\udc00-\\udfff]",kc="\\u200d",es=$c+"?",ts="["+Uc+"]?",jc="(?:"+kc+"(?:"+[Yi,Zi,Qi].join("|")+")"+ts+es+")*",Mc=ts+es+jc,Dc="(?:"+[Yi+on+"?",on,Zi,Qi,Bc].join("|")+")",Vc=RegExp(an+"(?="+an+")|"+Dc+Mc,"g");function Hc(t){return t.match(Vc)||[]}function zc(t){return Ji(t)?Hc(t):Cc(t)}function qc(t){return function(e){e=Bt(e);var r=Ji(e)?zc(e):void 0,n=r?r[0]:e.charAt(0),i=r?Ec(r,1).join(""):e.slice(1);return n[t]()+i}}var Wc=qc("toUpperCase");function Gc(t){return Wc(Bt(t).toLowerCase())}function Kc(t,e,r,n){for(var i=-1,s=t==null?0:t.length;++i<s;)r=e(r,t[i],i,t);return r}function Jc(t){return function(e){return t?.[e]}}var Xc={À:"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"},Yc=Jc(Xc),Zc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qc="\\u0300-\\u036f",ef="\\ufe20-\\ufe2f",tf="\\u20d0-\\u20ff",rf=Qc+ef+tf,nf="["+rf+"]",sf=RegExp(nf,"g");function of(t){return t=Bt(t),t&&t.replace(Zc,Yc).replace(sf,"")}var af=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function uf(t){return t.match(af)||[]}var lf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function cf(t){return lf.test(t)}var rs="\\ud800-\\udfff",ff="\\u0300-\\u036f",hf="\\ufe20-\\ufe2f",df="\\u20d0-\\u20ff",pf=ff+hf+df,ns="\\u2700-\\u27bf",is="a-z\\xdf-\\xf6\\xf8-\\xff",gf="\\xac\\xb1\\xd7\\xf7",mf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yf="\\u2000-\\u206f",bf=" \\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",ss="A-Z\\xc0-\\xd6\\xd8-\\xde",wf="\\ufe0e\\ufe0f",os=gf+mf+yf+bf,as="['’]",us="["+os+"]",xf="["+pf+"]",ls="\\d+",Ef="["+ns+"]",cs="["+is+"]",fs="[^"+rs+os+ls+ns+is+ss+"]",vf="\\ud83c[\\udffb-\\udfff]",Tf="(?:"+xf+"|"+vf+")",Af="[^"+rs+"]",hs="(?:\\ud83c[\\udde6-\\uddff]){2}",ds="[\\ud800-\\udbff][\\udc00-\\udfff]",wt="["+ss+"]",Nf="\\u200d",ps="(?:"+cs+"|"+fs+")",Pf="(?:"+wt+"|"+fs+")",gs="(?:"+as+"(?:d|ll|m|re|s|t|ve))?",ms="(?:"+as+"(?:D|LL|M|RE|S|T|VE))?",ys=Tf+"?",bs="["+wf+"]?",If="(?:"+Nf+"(?:"+[Af,hs,ds].join("|")+")"+bs+ys+")*",Sf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Of="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Cf=bs+ys+If,Rf="(?:"+[Ef,hs,ds].join("|")+")"+Cf,Ff=RegExp([wt+"?"+cs+"+"+gs+"(?="+[us,wt,"$"].join("|")+")",Pf+"+"+ms+"(?="+[us,wt+ps,"$"].join("|")+")",wt+"?"+ps+"+"+gs,wt+"+"+ms,Of,Sf,ls,Rf].join("|"),"g");function Lf(t){return t.match(Ff)||[]}function _f(t,e,r){return t=Bt(t),e=e,e===void 0?cf(t)?Lf(t):uf(t):t.match(e)||[]}var Uf="['’]",Bf=RegExp(Uf,"g");function $f(t){return function(e){return Kc(_f(of(e).replace(Bf,"")),t,"")}}var kf=$f(function(t,e,r){return e=e.toLowerCase(),t+(r?Gc(e):e)});const jf={complex:["tar.bz2","tar.gz","tar.xz"]},un=t=>t.replace(/[^A-Za-z0-9\-_]/g,""),ws=(t,e)=>!t||typeof t!="string"?"":t.indexOf("!")>=0?t.split("!")[e]:"",Mf=t=>ws(t,0),xs=t=>ws(t,1),Es=t=>{const r=t.name.split(".");if(r.length>2)for(let n=0;n<r.length;n++){const i=r.slice(n,r.length).join(".");if(jf.complex.includes(i))return i}return r.length<2?"":r[r.length-1]},gr=t=>{if(!t)return t;const e={};return Object.keys(t).forEach(r=>{e[kf(r)]=t[r]}),e};function xt(t,e=[]){const r=t.props[C.Name]?.toString()||ki.basename(t.filename),n=t.props[C.FileId],i=t.type==="directory";let s;t.filename.startsWith("/files")||t.filename.startsWith("/space")?s=t.filename.split("/").slice(3).join("/"):s=t.filename,s.startsWith("/")||(s=`/${s}`);const o=Es({...t,name:r}),u=t.props[C.LockDiscovery];let l,c,a;u&&(l=u[C.ActiveLock],c=l[C.LockOwner],a=l[C.LockTime]);let h=[];t.props[C.ShareTypes]&&(h=t.props[C.ShareTypes]["share-type"],Array.isArray(h)||(h=[h]));const p={};for(const g of e||[]){const m=g.split(":").pop();t.props[m]&&(p[g]=t.props[m])}const b={id:n,fileId:n,storageId:Mf(n),parentFolderId:t.props[C.FileParent],mimeType:t.props[C.MimeType],name:r,extension:o,path:s,webDavPath:t.filename,type:i?"folder":t.type,isFolder:i,locked:!!l,lockOwner:c,lockTime:a,processing:t.processing||!1,mdate:t.props[C.LastModifiedDate],size:i?t.props[C.ContentSize]?.toString()||"0":t.props[C.ContentLength]?.toString()||"0",permissions:t.props[C.Permissions]||"",starred:t.props[C.IsFavorite]!==0,etag:t.props[C.ETag],shareTypes:h,privateLink:t.props[C.PrivateLink],downloadURL:t.props[C.DownloadURL],remoteItemId:t.props[C.RemoteItemId],remoteItemPath:t.props[C.ShareRoot],owner:{id:t.props[C.OwnerId],displayName:t.props[C.OwnerDisplayName]},tags:(t.props[C.Tags]||"").toString().split(",").filter(Boolean),audio:gr(t.props[C.Audio]),location:gr(t.props[C.Location]),image:gr(t.props[C.Image]),photo:gr(t.props[C.Photo]),extraProps:p,hasPreview:()=>t.props[C.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(Le.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(Le.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(Le.Deletable)>=0},canRename:function(){return this.permissions.indexOf(Le.Renameable)>=0},canShare:function({ability:g}){return g.can("create-all","Share")&&this.permissions.indexOf(Le.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(Le.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(Le.Updateable)>=0||this.permissions.indexOf(Le.FileUpdateable)>=0||this.permissions.indexOf(Le.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(Le.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(Le.Shared)>=0},isShareRoot(){return t.props[C.ShareRoot]?t.filename.split("/").length===3:!1},getDomSelector:()=>un(n)};return Object.defineProperty(b,"nodeId",{get(){return xs(this.id)}}),b}function Df(t){const e=t.type==="directory",r=t.props[C.TrashbinOriginalFilename]?.toString(),n=Es({name:r,type:t.type}),i=ji.basename(t.filename);return{type:e?"folder":t.type,isFolder:e,ddate:t.props[C.TrashbinDeletedDate],name:ji.basename(r),extension:n,path:k(t.props[C.TrashbinOriginalLocation],{leadingSlash:!0}),id:i,parentFolderId:t.props[C.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,hasPreview:()=>!1,isShareRoot:()=>!1,getDomSelector:()=>un(i)}}var Ne=(t=>(t.createUpload="libre.graph/driveItem/upload/create",t.createPermissions="libre.graph/driveItem/permissions/create",t.createChildren="libre.graph/driveItem/children/create",t.readBasic="libre.graph/driveItem/basic/read",t.readPath="libre.graph/driveItem/path/read",t.readQuota="libre.graph/driveItem/quota/read",t.readContent="libre.graph/driveItem/content/read",t.readChildren="libre.graph/driveItem/children/read",t.readDeleted="libre.graph/driveItem/deleted/read",t.readPermissions="libre.graph/driveItem/permissions/read",t.readVersions="libre.graph/driveItem/versions/read",t.updatePath="libre.graph/driveItem/path/update",t.updateDeleted="libre.graph/driveItem/deleted/update",t.updatePermissions="libre.graph/driveItem/permissions/update",t.updateVersions="libre.graph/driveItem/versions/update",t.deleteStandard="libre.graph/driveItem/standard/delete",t.deleteDeleted="libre.graph/driveItem/deleted/delete",t.deletePermissions="libre.graph/driveItem/permissions/delete",t))(Ne||{});const ln=t=>t?.driveType==="personal",cn=t=>t?.driveType==="public";function Vf(t,e){return k("spaces",t,e,{leadingSlash:!0})}function fn(t,e=""){return k("spaces","trash-bin",t,e,{leadingSlash:!0})}function Hf(t){const e=t.publicLinkPassword,r=t.props?.[C.FileId],n=t.props?.[C.PublicLinkItemType],i=t.props?.[C.PublicLinkPermission],s=t.props?.[C.PublicLinkExpiration],o=t.props?.[C.PublicLinkShareDate],u=t.props?.[C.PublicLinkShareOwner],l=t.publicLinkType;let c,a;return l==="ocm"?(c=`ocm/${t.id}`,a=Qu(t.id)):(c=`public/${t.id}`,a=Zu(t.id)),Object.assign(zf({...t,driveType:"public",driveAlias:c,webDavPath:a}),{...r&&{fileId:r},...e&&{publicLinkPassword:e},...n&&{publicLinkItemType:n},...i&&{publicLinkPermission:parseInt(i)},...s&&{publicLinkExpiration:s},...o&&{publicLinkShareDate:o},...u&&{publicLinkShareOwner:u},publicLinkType:l})}function zf(t){let e,r;t.special&&(e=t.special.find(c=>c.specialFolder.name==="image"),r=t.special.find(c=>c.specialFolder.name==="readme"),e&&(e.webDavUrl=decodeURI(e.webDavUrl)),r&&(r.webDavUrl=decodeURI(r.webDavUrl)));const n=t.root?.deleted?.state==="trashed",i=k(t.webDavPath||Vf(t.id),{leadingSlash:!0}),s=k(t.serverUrl,"remote.php/dav",i),o=k(t.webDavTrashPath||fn(t.id),{leadingSlash:!0}),u=k(t.serverUrl,"remote.php/dav",o),l={id:t.id,fileId:t.id,storageId:t.id,mimeType:"",name:t.name,description:t.description,extension:"",path:"/",webDavPath:i,webDavTrashPath:o,driveAlias:t.driveAlias,driveType:t.driveType,type:"space",isFolder:!0,mdate:t.lastModifiedDateTime,size:t.quota?.used||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:t.webUrl,downloadURL:"",owner:t.owner?.user,disabled:n,root:t.root,spaceQuota:t.quota,spaceImageData:e,spaceReadmeData:r,hasTrashedItems:t["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:c}={}){return this.disabled?c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canRename:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canEditDescription:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canRestore:function({ability:c}={}){return this.disabled?c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canDisable:function({ability:c}={}){return this.disabled?!1:c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(Ne.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(Ne.updateDeleted)},canDeleteFromTrashBin:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canListVersions:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(t.driveType)},getDomSelector:()=>un(t.id),getDriveAliasAndItem({path:c}){return k(this.driveAlias,c,{leadingSlash:!1})},getWebDavUrl({path:c}){return k(s,c)},getWebDavTrashUrl({path:c}){return k(u,c)},isOwner(c){return c?.id===this.owner?.id}};return Object.defineProperty(l,"nodeId",{get(){return xs(this.id)}}),l}const qf=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"cloud","capabilities"].filter(Boolean).join("/"),r.searchParams.append("format","json");const n=r.href;return{async getCapabilities(){const i=await e.get(n);return wc(i,"data.ocs.data",{capabilities:null,version:null})}}};function Wf(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function $t(t,e=""){if(!Number.isSafeInteger(t)||t<0){const r=e&&`"${e}" `;throw new Error(`${r}expected integer >= 0, got ${t}`)}}function kt(t,e,r=""){const n=Wf(t),i=t?.length,s=e!==void 0;if(!n||s&&i!==e){const o=r&&`"${r}" `,u=s?` of length ${e}`:"",l=n?`length=${i}`:`type=${typeof t}`;throw new Error(o+"expected Uint8Array"+u+", got "+l)}return t}function vs(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash must wrapped by utils.createHasher");$t(t.outputLen),$t(t.blockLen)}function mr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Gf(t,e){kt(t,void 0,"digestInto() output");const r=e.outputLen;if(t.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function jt(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function yr(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Kf(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Ts(t,e=""){return typeof t=="string"?Kf(t):kt(t,void 0,e)}function Jf(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options must be object or undefined");return Object.assign(t,e)}function Xf(t,e={}){const r=(i,s)=>t(s).update(i).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>t(i),Object.assign(r,e),Object.freeze(r)}const Yf=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});class As{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,r){if(vs(e),kt(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),jt(i)}update(e){return mr(this),this.iHash.update(e),this}digestInto(e){mr(this),kt(e,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:u}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=u,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Ns=(t,e,r)=>new As(t,e).update(r).digest();Ns.create=(t,e)=>new As(t,e);function Zf(t,e,r,n){vs(t);const i=Jf({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:u}=i;if($t(s,"c"),$t(o,"dkLen"),$t(u,"asyncTick"),s<1)throw new Error("iterations (c) must be >= 1");const l=Ts(e,"password"),c=Ts(r,"salt"),a=new Uint8Array(o),h=Ns.create(t,l),p=h._cloneInto().update(c);return{c:s,dkLen:o,asyncTick:u,DK:a,PRF:h,PRFSalt:p}}function Qf(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),jt(i),r}function eh(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:u,PRFSalt:l}=Zf(t,e,r,n);let c;const a=new Uint8Array(4),h=yr(a),p=new Uint8Array(u.outputLen);for(let b=1,g=0;g<s;b++,g+=u.outputLen){const m=o.subarray(g,g+u.outputLen);h.setInt32(0,b,!1),(c=l._cloneInto(c)).update(a).digestInto(p),m.set(p.subarray(0,m.length));for(let y=1;y<i;y++){u._cloneInto(c).update(p).digestInto(p);for(let v=0;v<m.length;v++)m[v]^=p[v]}}return Qf(u,l,o,c,p)}class th{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,i){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=yr(this.buffer)}update(e){mr(this),kt(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const u=Math.min(i-this.pos,s-o);if(u===i){const l=yr(e);for(;i<=s-o;o+=i)this.process(l,o);continue}n.set(e.subarray(o,o+u),this.pos),this.pos+=u,o+=u,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){mr(this),Gf(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,jt(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let h=o;h<i;h++)r[h]=0;n.setBigUint64(i-8,BigInt(this.length*8),s),this.process(n,0);const u=yr(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,a=this.get();if(c>a.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<c;h++)u.setUint32(4*h,a[h],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:u}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=u,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const he=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),br=BigInt(2**32-1),Ps=BigInt(32);function rh(t,e=!1){return e?{h:Number(t&br),l:Number(t>>Ps&br)}:{h:Number(t>>Ps&br)|0,l:Number(t&br)|0}}function nh(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:u}=rh(t[s],e);[n[s],i[s]]=[o,u]}return[n,i]}const Is=(t,e,r)=>t>>>r,Ss=(t,e,r)=>t<<32-r|e>>>r,Et=(t,e,r)=>t>>>r|e<<32-r,vt=(t,e,r)=>t<<32-r|e>>>r,wr=(t,e,r)=>t<<64-r|e>>>r-32,xr=(t,e,r)=>t>>>r-32|e<<64-r;function He(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const ih=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),sh=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,oh=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),ah=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,uh=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),lh=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Os=nh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),ch=Os[0],fh=Os[1],Ge=new Uint32Array(80),Ke=new Uint32Array(80);class hh extends th{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:u,Dl:l,Eh:c,El:a,Fh:h,Fl:p,Gh:b,Gl:g,Hh:m,Hl:y}=this;return[e,r,n,i,s,o,u,l,c,a,h,p,b,g,m,y]}set(e,r,n,i,s,o,u,l,c,a,h,p,b,g,m,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=u|0,this.Dl=l|0,this.Eh=c|0,this.El=a|0,this.Fh=h|0,this.Fl=p|0,this.Gh=b|0,this.Gl=g|0,this.Hh=m|0,this.Hl=y|0}process(e,r){for(let T=0;T<16;T++,r+=4)Ge[T]=e.getUint32(r),Ke[T]=e.getUint32(r+=4);for(let T=16;T<80;T++){const P=Ge[T-15]|0,S=Ke[T-15]|0,F=Et(P,S,1)^Et(P,S,8)^Is(P,S,7),L=vt(P,S,1)^vt(P,S,8)^Ss(P,S,7),U=Ge[T-2]|0,_=Ke[T-2]|0,j=Et(U,_,19)^wr(U,_,61)^Is(U,_,6),pe=vt(U,_,19)^xr(U,_,61)^Ss(U,_,6),oe=oh(L,pe,Ke[T-7],Ke[T-16]),R=ah(oe,F,j,Ge[T-7],Ge[T-16]);Ge[T]=R|0,Ke[T]=oe|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:u,Cl:l,Dh:c,Dl:a,Eh:h,El:p,Fh:b,Fl:g,Gh:m,Gl:y,Hh:v,Hl:E}=this;for(let T=0;T<80;T++){const P=Et(h,p,14)^Et(h,p,18)^wr(h,p,41),S=vt(h,p,14)^vt(h,p,18)^xr(h,p,41),F=h&b^~h&m,L=p&g^~p&y,U=uh(E,S,L,fh[T],Ke[T]),_=lh(U,v,P,F,ch[T],Ge[T]),j=U|0,pe=Et(n,i,28)^wr(n,i,34)^wr(n,i,39),oe=vt(n,i,28)^xr(n,i,34)^xr(n,i,39),R=n&s^n&u^s&u,le=i&o^i&l^o&l;v=m|0,E=y|0,m=b|0,y=g|0,b=h|0,g=p|0,{h,l:p}=He(c|0,a|0,_|0,j|0),c=u|0,a=l|0,u=s|0,l=o|0,s=n|0,o=i|0;const Pe=ih(j,oe,le);n=sh(Pe,_,pe,R),i=Pe|0}({h:n,l:i}=He(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=He(this.Bh|0,this.Bl|0,s|0,o|0),{h:u,l}=He(this.Ch|0,this.Cl|0,u|0,l|0),{h:c,l:a}=He(this.Dh|0,this.Dl|0,c|0,a|0),{h,l:p}=He(this.Eh|0,this.El|0,h|0,p|0),{h:b,l:g}=He(this.Fh|0,this.Fl|0,b|0,g|0),{h:m,l:y}=He(this.Gh|0,this.Gl|0,m|0,y|0),{h:v,l:E}=He(this.Hh|0,this.Hl|0,v|0,E|0),this.set(n,i,s,o,u,l,c,a,h,p,b,g,m,y,v,E)}roundClean(){jt(Ge,Ke)}destroy(){jt(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class dh extends hh{Ah=he[0]|0;Al=he[1]|0;Bh=he[2]|0;Bl=he[3]|0;Ch=he[4]|0;Cl=he[5]|0;Dh=he[6]|0;Dl=he[7]|0;Eh=he[8]|0;El=he[9]|0;Fh=he[10]|0;Fl=he[11]|0;Gh=he[12]|0;Gl=he[13]|0;Hh=he[14]|0;Hl=he[15]|0;constructor(){super(64)}}const ph=Xf(()=>new dh,Yf(3)),gh=(t,e,r,n)=>li.from(eh(ph,t,e,{c:r,dkLen:n})),Cs=":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",mh=Cs+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",yh="["+Cs+"]["+mh+"]*",bh=new RegExp("^"+yh+"$");function Rs(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const Er=function(t){const e=bh.exec(t);return!(e===null||typeof e>"u")};function wh(t){return typeof t<"u"}const xh={allowBooleanAttributes:!1,unpairedTags:[]};function Eh(t,e){e=Object.assign({},xh,e);const r=[];let n=!1,i=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let s=0;s<t.length;s++)if(t[s]==="<"&&t[s+1]==="?"){if(s+=2,s=Ls(t,s),s.err)return s}else if(t[s]==="<"){let o=s;if(s++,t[s]==="!"){s=_s(t,s);continue}else{let u=!1;t[s]==="/"&&(u=!0,s++);let l="";for(;s<t.length&&t[s]!==">"&&t[s]!==" "&&t[s]!==" "&&t[s]!==`
7
+ `&&t[s]!=="\r";s++)l+=t[s];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),s--),!Oh(l)){let h;return l.trim().length===0?h="Invalid space after '<'.":h="Tag '"+l+"' is an invalid name.",ee("InvalidTag",h,ge(t,s))}const c=Ah(t,s);if(c===!1)return ee("InvalidAttr","Attributes for '"+l+"' have open quote.",ge(t,s));let a=c.value;if(s=c.index,a[a.length-1]==="/"){const h=s-a.length;a=a.substring(0,a.length-1);const p=Us(a,e);if(p===!0)n=!0;else return ee(p.err.code,p.err.msg,ge(t,h+p.err.line))}else if(u)if(c.tagClosed){if(a.trim().length>0)return ee("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ge(t,o));if(r.length===0)return ee("InvalidTag","Closing tag '"+l+"' has not been opened.",ge(t,o));{const h=r.pop();if(l!==h.tagName){let p=ge(t,h.tagStartPos);return ee("InvalidTag","Expected closing tag '"+h.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",ge(t,o))}r.length==0&&(i=!0)}}else return ee("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ge(t,s));else{const h=Us(a,e);if(h!==!0)return ee(h.err.code,h.err.msg,ge(t,s-a.length+h.err.line));if(i===!0)return ee("InvalidXml","Multiple possible root nodes found.",ge(t,s));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=_s(t,s);continue}else if(t[s+1]==="?"){if(s=Ls(t,++s),s.err)return s}else break;else if(t[s]==="&"){const h=Ih(t,s);if(h==-1)return ee("InvalidChar","char '&' is not expected.",ge(t,s));s=h}else if(i===!0&&!Fs(t[s]))return ee("InvalidXml","Extra text at the end",ge(t,s));t[s]==="<"&&s--}}else{if(Fs(t[s]))continue;return ee("InvalidChar","char '"+t[s]+"' is not expected.",ge(t,s))}if(n){if(r.length==1)return ee("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ge(t,r[0].tagStartPos));if(r.length>0)return ee("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return ee("InvalidXml","Start tag expected.",1);return!0}function Fs(t){return t===" "||t===" "||t===`
8
+ `||t==="\r"}function Ls(t,e){const r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){const n=t.substr(r,e-r);if(e>5&&n==="xml")return ee("InvalidXml","XML declaration allowed only at the start of the document.",ge(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function _s(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}const vh='"',Th="'";function Ah(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===vh||t[e]===Th)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:i}}const Nh=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Us(t,e){const r=Rs(t,Nh),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Mt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Mt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return ee("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Mt(r[i]));const s=r[i][2];if(!Sh(s))return ee("InvalidAttr","Attribute '"+s+"' is an invalid name.",Mt(r[i]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return ee("InvalidAttr","Attribute '"+s+"' is repeated.",Mt(r[i]))}return!0}function Ph(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Ih(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Ph(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function ee(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Sh(t){return Er(t)}function Oh(t){return Er(t)}function ge(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Mt(t){return t.startIndex+t[1].length}const Ch={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0};function Bs(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:t.maxEntitySize??1e4,maxExpansionDepth:t.maxExpansionDepth??10,maxTotalExpansions:t.maxTotalExpansions??1e3,maxExpandedLength:t.maxExpandedLength??1e5,maxEntityCount:t.maxEntityCount??100,allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:Bs(!0)}const Rh=function(t){const e=Object.assign({},Ch,t);return e.processEntities=Bs(e.processEntities),e};let vr;typeof Symbol!="function"?vr="@@xmlMetadata":vr=Symbol("XML Node Metadata");class Je{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][vr]={startIndex:r})}static getMetaDataSymbol(){return vr}}class Fh{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,r){const n=Object.create(null);let i=0;if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let s=1,o=!1,u=!1,l="";for(;r<e.length;r++)if(e[r]==="<"&&!u){if(o&&ut(e,"!ENTITY",r)){r+=7;let c,a;if([c,a,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),a.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&i>=this.options.maxEntityCount)throw new Error(`Entity count (${i+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const h=c.replace(/[.\-+*:]/g,"\\.");n[c]={regx:RegExp(`&${h};`,"g"),val:a},i++}}else if(o&&ut(e,"!ELEMENT",r)){r+=8;const{index:c}=this.readElementExp(e,r+1);r=c}else if(o&&ut(e,"!ATTLIST",r))r+=8;else if(o&&ut(e,"!NOTATION",r)){r+=9;const{index:c}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=c}else if(ut(e,"!--",r))u=!0;else throw new Error("Invalid DOCTYPE");s++,l=""}else if(e[r]===">"){if(u?e[r-1]==="-"&&e[r-2]==="-"&&(u=!1,s--):s--,s===0)break}else e[r]==="["?o=!0:l+=e[r];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:r}}readEntityExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Dt(n),r=ve(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";if([r,i]=this.readIdentifierVal(e,r,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&i.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return r--,[n,i,r]}readNotationExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Dt(n),r=ve(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=ve(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),r=ve(e,r),(e[r]==='"'||e[r]==="'")&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return r++,[r,i]}readElementExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!Er(n))throw new Error(`Invalid element name: "${n}"`);r=ve(e,r);let i="";if(e[r]==="E"&&ut(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ut(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Dt(n),r=ve(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Dt(i))throw new Error(`Invalid attribute name: "${i}"`);r=ve(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",r+=8,r=ve(e,r),e[r]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Dt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=ve(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=ve(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const ve=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ut(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Dt(t){if(Er(t))return t;throw new Error(`Invalid entity name ${t}`)}const Lh=/^[-+]?0x[a-fA-F0-9]+$/,_h=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Uh={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function Bh(t,e={}){if(e=Object.assign({},Uh,e),!t||typeof t!="string")return t;let r=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(r))return t;if(t==="0")return 0;if(e.hex&&Lh.test(r))return Mh(r,16);if(isFinite(r)){if(r.includes("e")||r.includes("E"))return kh(t,r,e);{const n=_h.exec(r);if(n){const i=n[1]||"",s=n[2];let o=jh(n[3]);const u=i?t[s.length+1]===".":t[s.length]===".";if(!e.leadingZeros&&(s.length>1||s.length===1&&!u))return t;{const l=Number(r),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return e.eNotation?l:t;if(r.indexOf(".")!==-1)return c==="0"||c===o||c===`${i}${o}`?l:t;let a=s?o:r;return s?a===c||i+a===c?l:t:a===c||a===i+c?l:t}}else return t}}else return Dh(t,Number(r),e)}const $h=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function kh(t,e,r){if(!r.eNotation)return t;const n=e.match($h);if(n){let i=n[1]||"";const s=n[3].indexOf("e")===-1?"E":"e",o=n[2],u=i?t[o.length+1]===s:t[o.length]===s;return o.length>1&&u?t:o.length===1&&(n[3].startsWith(`.${s}`)||n[3][0]===s)?Number(e):r.leadingZeros&&!u?(e=(n[1]||"")+n[3],Number(e)):t}else return t}function jh(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substring(0,t.length-1))),t}function Mh(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Dh(t,e,r){const n=e===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}function Vh(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class Hh{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>$s(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>$s(n,16,"&#x")}},this.addExternalEntities=zh,this.parseXml=Jh,this.parseTextData=qh,this.resolveNameSpace=Wh,this.buildAttributesMap=Kh,this.isItStopNode=Qh,this.replaceEntitiesValue=Yh,this.readStopNodeData=td,this.saveTextToParentTag=Zh,this.addChild=Xh,this.ignoreAttributesFn=Vh(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function zh(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r],i=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+i+";","g"),val:t[n]}}}function qh(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t,e,r));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues?dn(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?dn(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Wh(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Gh=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Kh(t,e,r){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const n=Rs(t,Gh),i=n.length,s={};for(let o=0;o<i;o++){const u=this.resolveNameSpace(n[o][1]);if(this.ignoreAttributesFn(u,e))continue;let l=n[o][4],c=this.options.attributeNamePrefix+u;if(u.length)if(this.options.transformAttributeName&&(c=this.options.transformAttributeName(c)),c==="__proto__"&&(c="#__proto__"),l!==void 0){this.options.trimValues&&(l=l.trim()),l=this.replaceEntitiesValue(l,r,e);const a=this.options.attributeValueProcessor(u,l,e);a==null?s[c]=l:typeof a!=typeof l||a!==l?s[c]=a:s[c]=dn(l,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[c]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const o={};return o[this.options.attributesGroupName]=s,o}return s}}const Jh=function(t){t=t.replace(/\r\n?/g,`
9
+ `);const e=new Je("!xml");let r=e,n="",i="";this.entityExpansionCount=0,this.currentExpandedLength=0;const s=new Fh(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const l=lt(t,">",o,"Closing Tag is not closed.");let c=t.substring(o+2,l).trim();if(this.options.removeNSPrefix){const p=c.indexOf(":");p!==-1&&(c=c.substr(p+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&(n=this.saveTextToParentTag(n,r,i));const a=i.substring(i.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let h=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(h=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):h=i.lastIndexOf("."),i=i.substring(0,h),r=this.tagsNodeStack.pop(),n="",o=l}else if(t[o+1]==="?"){let l=hn(t,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const c=new Je(l.tagName);c.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(c[":@"]=this.buildAttributesMap(l.tagExp,i,l.tagName)),this.addChild(r,c,i,o)}o=l.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const l=lt(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=t.substring(o+4,l-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=l}else if(t.substr(o+1,2)==="!D"){const l=s.readDocType(t,o);this.docTypeEntities=l.entities,o=l.i}else if(t.substr(o+1,2)==="!["){const l=lt(t,"]]>",o,"CDATA is not closed.")-2,c=t.substring(o+9,l);n=this.saveTextToParentTag(n,r,i);let a=this.parseTextData(c,r.tagname,i,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):r.add(this.options.textNodeName,a),o=l+2}else{let l=hn(t,o,this.options.removeNSPrefix),c=l.tagName;const a=l.rawTagName;let h=l.tagExp,p=l.attrExpPresent,b=l.closeIndex;if(this.options.transformTagName){const y=this.options.transformTagName(c);h===c&&(h=y),c=y}if(this.options.strictReservedNames&&(c===this.options.commentPropName||c===this.options.cdataPropName))throw new Error(`Invalid tag name: ${c}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const g=r;g&&this.options.unpairedTags.indexOf(g.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),c!==e.tagname&&(i+=i?"."+c:c);const m=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,c)){let y="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),o=l.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=l.closeIndex;else{const E=this.readStopNodeData(t,a,b+1);if(!E)throw new Error(`Unexpected end of ${a}`);o=E.i,y=E.tagContent}const v=new Je(c);c!==h&&p&&(v[":@"]=this.buildAttributesMap(h,i,c)),y&&(y=this.parseTextData(y,c,i,!0,p,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),v.add(this.options.textNodeName,y),this.addChild(r,v,i,m)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){if(c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),this.options.transformTagName){const v=this.options.transformTagName(c);h===c&&(h=v),c=v}const y=new Je(c);c!==h&&p&&(y[":@"]=this.buildAttributesMap(h,i,c)),this.addChild(r,y,i,m),i=i.substr(0,i.lastIndexOf("."))}else if(this.options.unpairedTags.indexOf(c)!==-1){const y=new Je(c);c!==h&&p&&(y[":@"]=this.buildAttributesMap(h,i)),this.addChild(r,y,i,m),i=i.substr(0,i.lastIndexOf(".")),o=l.closeIndex;continue}else{const y=new Je(c);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),c!==h&&p&&(y[":@"]=this.buildAttributesMap(h,i,c)),this.addChild(r,y,i,m),r=y}n="",o=b}}else n+=t[o];return e.child};function Xh(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const Yh=function(t,e,r){if(t.indexOf("&")===-1)return t;const n=this.options.processEntities;if(!n.enabled||n.allowedTags&&!n.allowedTags.includes(e)||n.tagFilter&&!n.tagFilter(e,r))return t;for(let i in this.docTypeEntities){const s=this.docTypeEntities[i],o=t.match(s.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const u=t.length;if(t=t.replace(s.regx,s.val),n.maxExpandedLength&&(this.currentExpandedLength+=t.length-u,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(t.indexOf("&")===-1)return t;for(let i in this.lastEntities){const s=this.lastEntities[i];t=t.replace(s.regex,s.val)}if(t.indexOf("&")===-1)return t;if(this.options.htmlEntities)for(let i in this.htmlEntities){const s=this.htmlEntities[i];t=t.replace(s.regex,s.val)}return t=t.replace(this.ampEntity.regex,this.ampEntity.val),t};function Zh(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Qh(t,e,r,n){return!!(e&&e.has(n)||t&&t.has(r))}function ed(t,e,r=">"){let n,i="";for(let s=e;s<t.length;s++){let o=t[s];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===r[0])if(r[1]){if(t[s+1]===r[1])return{data:i,index:s}}else return{data:i,index:s};else o===" "&&(o=" ");i+=o}}function lt(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function hn(t,e,r,n=">"){const i=ed(t,e+1,n);if(!i)return;let s=i.data;const o=i.index,u=s.search(/\s/);let l=s,c=!0;u!==-1&&(l=s.substring(0,u),s=s.substring(u+1).trimStart());const a=l;if(r){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1),c=l!==i.data.substr(h+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:c,rawTagName:a}}function td(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=lt(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=lt(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=lt(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=lt(t,"]]>",r,"StopNode is not closed.")-2;else{const s=hn(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function dn(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"?!0:n==="false"?!1:Bh(t,r)}else return wh(t)?t:""}function $s(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const pn=Je.getMetaDataSymbol();function rd(t,e){return ks(t,e)}function ks(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=nd(o);let l="";if(r===void 0?l=u:l=r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=ks(o[u],e,l);const a=sd(c,e);o[":@"]?id(c,o[":@"],l,e):Object.keys(c).length===1&&c[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?c=c[e.textNodeName]:Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""),o[pn]!==void 0&&typeof c=="object"&&c!==null&&(c[pn]=o[pn]),i[u]!==void 0&&Object.prototype.hasOwnProperty.call(i,u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function nd(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function id(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function sd(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return!!(n===0||n===1&&(t[r]||typeof t[r]=="boolean"||t[r]===0))}class js{constructor(e){this.externalEntities={},this.options=Rh(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=Eh(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new Hh(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:rd(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return Je.getMetaDataSymbol()}}const od=`
10
+ `;function ad(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=od),Ms(t,e,"",r)}function Ms(t,e,r,n){let i="",s=!1;if(!Array.isArray(t)){if(t!=null){let o=t.toString();return o=gn(o,e),o}return""}for(let o=0;o<t.length;o++){const u=t[o],l=ud(u);if(l===void 0)continue;let c="";if(r.length===0?c=l:c=`${r}.${l}`,l===e.textNodeName){let g=u[l];ld(c,e)||(g=e.tagValueProcessor(l,g),g=gn(g,e)),s&&(i+=n),i+=g,s=!1;continue}else if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}else if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}else if(l[0]==="?"){const g=Ds(u[":@"],e),m=l==="?xml"?"":n;let y=u[l][0][e.textNodeName];y=y.length!==0?" "+y:"",i+=m+`<${l}${y}${g}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=Ds(u[":@"],e),p=n+`<${l}${h}`,b=Ms(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=p+">":i+=p+"/>":(!b||b.length===0)&&e.suppressEmptyNode?i+=p+"/>":b&&b.endsWith(">")?i+=p+`>${b}${n}</${l}>`:(i+=p+">",b&&n!==""&&(b.includes("/>")||b.includes("</"))?i+=n+e.indentBy+b+n:i+=b,i+=`</${l}>`),s=!0}return i}function ud(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}function Ds(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e.attributeValueProcessor(n,t[n]);i=gn(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function ld(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function gn(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}function cd(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}const fd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ze(t){this.options=Object.assign({},fd,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=cd(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=pd),this.processTextOrObjNode=hd,this.options.format?(this.indentate=dd,this.tagEndChar=`>
11
+ `,this.newLine=`
12
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}ze.prototype.build=function(t){return this.options.preserveOrder?ad(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ze.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(typeof t[o]>"u")this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(!(typeof h>"u"))if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},ze.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function hd(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}ze.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(n)+"<"+e+r+s+">"+t+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i}},ze.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e},ze.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},ze.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function dd(t){return this.options.indentBy.repeat(t)}function pd(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}class gd{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM="sha512";TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:r}){this.axiosClient=e,this.baseURI=r,this.xmlParser=new js}async signUrl(e,r){const n=new URL(e);n.searchParams.set("OC-Credential",r),n.searchParams.set("OC-Date",new Date().toISOString()),n.searchParams.set("OC-Expires",this.TTL.toString()),n.searchParams.set("OC-Verb","GET");const i=await this.createHashedKey(n.toString());return n.searchParams.set("OC-Algo",`PBKDF2/${this.ITERATION_COUNT}-SHA512`),n.searchParams.set("OC-Signature",i),n.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;const e=await this.axiosClient.get(k(this.baseURI,"ocs/v1.php/cloud/user/signing-key"),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),r=this.xmlParser.parse(e.data);return this.signingKey=r.ocs.data["signing-key"],this.signingKey}async createHashedKey(e){const r=await this.getSignKey();return gh(e,r,this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString("hex")}}const md=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"ocs","v1.php"].filter(Boolean).join("/");const n=r.href,i=qf(n,e),s=new gd({baseURI:t,axiosClient:e});return{getCapabilities:()=>i.getCapabilities(),signUrl:(o,u)=>s.signUrl(o,u)}},qe=(t,{fileId:e,path:r,name:n})=>{if(r!==void 0)return k(t.webDavPath,r);if(e!==void 0){if(cn(t))throw new Error("public spaces need a path provided");return k("spaces",e,n||"")}return t.webDavPath},yd=(t,e)=>({copyFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=qe(r,{fileId:i,path:n}),p=qe(s,{fileId:u,path:o,name:l});return t.copy(h,p,{overwrite:c||!1,...a})}}),bd=(t,e,r)=>({async createFolder(n,{path:i,parentFolderId:s,folderName:o,fetchFolder:u=!0,...l}){const c=qe(n,{fileId:s,path:i,name:o});if(await t.mkcol(c),u)return e.getFileInfo(n,{path:i},l)}}),wd=(t,{axiosClient:e})=>({async getFileContents(r,{fileId:n,path:i},{responseType:s="text",noCache:o=!0,headers:u,...l}={}){try{const c=qe(r,{fileId:n,path:i}),a=await e.get(t.getFileUrl(c),{responseType:s,headers:{...o&&{"Cache-Control":"no-cache"},...u||{}},...l});return{response:a,body:a.data,headers:{ETag:a.headers.etag,"OC-ETag":a.headers["oc-etag"],"OC-FileId":a.headers["oc-fileid"]}}}catch(c){const{message:a,response:h}=c;throw new Bi(a,h,h.status)}}}),xd=(t,e)=>({async getFileInfo(r,n,i){return(await t.listFiles(r,n,{depth:0,...i})).resource}}),Ed=(t,e,r,{axiosClient:n,baseUrl:i})=>({async getFileUrl(s,o,{disposition:u="attachment",version:l=null,username:c="",...a}){if(u==="inline"){const p=await e.getFileContents(s,o,{responseType:"blob",...a});return URL.createObjectURL(p.body)}if(l){if(!c)throw new Error("username is required for URL signing");const p=t.getFileUrl(k("meta",o.fileId,"v",l));return await md(i,n).signUrl(p,c)}if(o.downloadURL)return o.downloadURL;const{downloadURL:h}=await r.getFileInfo(s,o,{davProperties:[C.DownloadURL]});return h},revokeUrl:s=>{s&&s.startsWith("blob:")&&URL.revokeObjectURL(s)}}),vd=(t,e)=>({getPublicFileUrl(r,n){return t.getFileUrl(k("public-files",n))}}),Td=(t,e,r)=>({async listFiles(n,{path:i,fileId:s}={},{depth:o=1,davProperties:u,isTrash:l=!1,...c}={}){let a;if(cn(n)){a=await t.propfind(k(n.webDavPath,i),{depth:o,properties:u||st.PublicLink,...c}),a.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),a.length===1&&(a[0].filename=k(n.id,i,{leadingSlash:!0})),a.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")});const p=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!i||i==="/")&&o>0&&p==="ocm"&&a[0].props[C.PublicLinkItemType]==="file"&&(a=[{basename:n.fileId,type:"directory",filename:"",props:{}},...a]),!i){const[g,...m]=a;return{resource:Hf({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:p}),children:m.map(y=>xt(y,t.extraProps))}}const b=a.map(g=>xt(g,t.extraProps));return{resource:b[0],children:b.slice(1)}}const h=async()=>{const p=await e.getPathForFileId(s);return this.listFiles(n,{path:p},{depth:o,davProperties:u})};try{let p="";if(l?p=fn(n.id):p=qe(n,{fileId:s,path:i}),a=await t.propfind(p,{depth:o,properties:u||st.Default,...c}),l)return{resource:xt(a[0],t.extraProps),children:a.slice(1).map(Df)};const b=a.map(m=>xt(m,t.extraProps)),g=s===n.id;return s&&!g&&b[0].fileId&&s!==b[0].fileId?h():{resource:b[0],children:b.slice(1)}}catch(p){if(p.statusCode===404&&s)return h();throw p}}}),Ad=(t,e)=>({moveFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=qe(r,{fileId:i,path:n}),p=qe(s,{fileId:u,path:o,name:l});return t.move(h,p,{overwrite:c||!1,...a})}}),Nd=(t,e,r)=>({async putFileContents(n,{fileName:i,path:s,parentFolderId:o,content:u="",previousEntityTag:l="",overwrite:c,onUploadProgress:a=null,...h}){const p=qe(n,{fileId:o,name:i,path:s}),{result:b}=await t.put(p,u,{previousEntityTag:l,overwrite:c,onUploadProgress:a,...h});return e.getFileInfo(n,{fileId:b.headers.get("Oc-Fileid"),path:s})}}),Pd=(t,e)=>({deleteFile(r,{path:n,...i}){return t.delete(k(r.webDavPath,n),i)}}),Id=(t,e)=>({restoreFile(r,{id:n},{path:i},{overwrite:s,...o}={}){if(cn(r))return;const u=k(r.webDavPath,i);return t.move(k(r.webDavTrashPath,n),u,{overwrite:s,...o})}}),Sd=(t,e)=>({restoreFileVersion(r,{parentFolderId:n,name:i,path:s},o,u={}){const l=qe(r,{path:s,fileId:n,name:i}),c=k("meta",n,"v",o,{leadingSlash:!0}),a=k("files",l,{leadingSlash:!0});return t.copy(c,a,u)}}),Od=(t,e)=>({clearTrashBin(r,{id:n,...i}={}){let s=fn(r.id);return n&&(s=k(s,n)),t.delete(s,i)}}),Cd=(t,e)=>({async search(r,{davProperties:n=st.Default,searchLimit:i,...s}){const o="/spaces/",{range:u,results:l}=await t.report(o,{pattern:r,limit:i,properties:n,...s});return{resources:l.map(c=>({...xt(c,t.extraProps),highlights:c.props[C.Highlights]||""})),totalResults:u?parseInt(u?.split("/")[1]):null}}}),Rd=(t,e)=>({async getPathForFileId(r,n={}){return(await t.propfind(k("meta",r,{leadingSlash:!0}),{properties:[C.MetaPathForUser],...n}))[0].props[C.MetaPathForUser]}});var Fd={2:t=>{function e(i,s,o){i instanceof RegExp&&(i=r(i,o)),s instanceof RegExp&&(s=r(s,o));var u=n(i,s,o);return u&&{start:u[0],end:u[1],pre:o.slice(0,u[0]),body:o.slice(u[0]+i.length,u[1]),post:o.slice(u[1]+s.length)}}function r(i,s){var o=s.match(i);return o?o[0]:null}function n(i,s,o){var u,l,c,a,h,p=o.indexOf(i),b=o.indexOf(s,p+1),g=p;if(p>=0&&b>0){for(u=[],c=o.length;g>=0&&!h;)g==p?(u.push(g),p=o.indexOf(i,g+1)):u.length==1?h=[u.pop(),b]:((l=u.pop())<c&&(c=l,a=b),b=o.indexOf(s,g+1)),g=p<b&&p>=0?p:b;u.length&&(h=[c,a])}return h}t.exports=e,e.range=n},47:(t,e,r)=>{var n=r(410),i=function(c){return typeof c=="string"};function s(c,a){for(var h=[],p=0;p<c.length;p++){var b=c[p];b&&b!=="."&&(b===".."?h.length&&h[h.length-1]!==".."?h.pop():a&&h.push(".."):h.push(b))}return h}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u={};function l(c){return o.exec(c).slice(1)}u.resolve=function(){for(var c="",a=!1,h=arguments.length-1;h>=-1&&!a;h--){var p=h>=0?arguments[h]:Be.cwd();if(!i(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(c=p+"/"+c,a=p.charAt(0)==="/")}return(a?"/":"")+(c=s(c.split("/"),!a).join("/"))||"."},u.normalize=function(c){var a=u.isAbsolute(c),h=c.substr(-1)==="/";return(c=s(c.split("/"),!a).join("/"))||a||(c="."),c&&h&&(c+="/"),(a?"/":"")+c},u.isAbsolute=function(c){return c.charAt(0)==="/"},u.join=function(){for(var c="",a=0;a<arguments.length;a++){var h=arguments[a];if(!i(h))throw new TypeError("Arguments to path.join must be strings");h&&(c+=c?"/"+h:h)}return u.normalize(c)},u.relative=function(c,a){function h(E){for(var T=0;T<E.length&&E[T]==="";T++);for(var P=E.length-1;P>=0&&E[P]==="";P--);return T>P?[]:E.slice(T,P+1)}c=u.resolve(c).substr(1),a=u.resolve(a).substr(1);for(var p=h(c.split("/")),b=h(a.split("/")),g=Math.min(p.length,b.length),m=g,y=0;y<g;y++)if(p[y]!==b[y]){m=y;break}var v=[];for(y=m;y<p.length;y++)v.push("..");return(v=v.concat(b.slice(m))).join("/")},u._makeLong=function(c){return c},u.dirname=function(c){var a=l(c),h=a[0],p=a[1];return h||p?(p&&(p=p.substr(0,p.length-1)),h+p):"."},u.basename=function(c,a){var h=l(c)[2];return a&&h.substr(-1*a.length)===a&&(h=h.substr(0,h.length-a.length)),h},u.extname=function(c){return l(c)[3]},u.format=function(c){if(!n.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var a=c.root||"";if(!i(a))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+u.sep:"")+(c.base||"")},u.parse=function(c){if(!i(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var a=l(c);if(!a||a.length!==4)throw new TypeError("Invalid path '"+c+"'");return a[1]=a[1]||"",a[2]=a[2]||"",a[3]=a[3]||"",{root:a[0],dir:a[0]+a[1].slice(0,a[1].length-1),base:a[2],ext:a[3],name:a[2].slice(0,a[2].length-a[3].length)}},u.sep="/",u.delimiter=":",t.exports=u},101:function(t,e,r){var n;t=r.nmd(t),(function(){var i=(t&&t.exports,typeof Re=="object"&&Re);i.global!==i&&i.window;var s=function(a){this.message=a};(s.prototype=new Error).name="InvalidCharacterError";var o=function(a){throw new s(a)},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(a){a=String(a),/[^\0-\xFF]/.test(a)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var h,p,b,g,m=a.length%3,y="",v=-1,E=a.length-m;++v<E;)h=a.charCodeAt(v)<<16,p=a.charCodeAt(++v)<<8,b=a.charCodeAt(++v),y+=u.charAt((g=h+p+b)>>18&63)+u.charAt(g>>12&63)+u.charAt(g>>6&63)+u.charAt(63&g);return m==2?(h=a.charCodeAt(v)<<8,p=a.charCodeAt(++v),y+=u.charAt((g=h+p)>>10)+u.charAt(g>>4&63)+u.charAt(g<<2&63)+"="):m==1&&(g=a.charCodeAt(v),y+=u.charAt(g>>2)+u.charAt(g<<4&63)+"=="),y},decode:function(a){var h=(a=String(a).replace(l,"")).length;h%4==0&&(h=(a=a.replace(/==?$/,"")).length),(h%4==1||/[^+a-zA-Z0-9/]/.test(a))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var p,b,g=0,m="",y=-1;++y<h;)b=u.indexOf(a.charAt(y)),p=g%4?64*p+b:b,g++%4&&(m+=String.fromCharCode(255&p>>(-2*g&6)));return m},version:"1.0.0"};(n=(function(){return c}).call(e,r,e,t))===void 0||(t.exports=n)})()},135:t=>{function e(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}t.exports=function(r){return r!=null&&(e(r)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))})(r)||!!r._isBuffer)}},172:(t,e)=>{e.d=function(r){if(!r)return 0;for(var n=(r=r.toString()).length,i=r.length;i--;){var s=r.charCodeAt(i);56320<=s&&s<=57343&&i--,127<s&&s<=2047?n++:2047<s&&s<=65535&&(n+=2)}return n}},285:(t,e,r)=>{var n=r(2);t.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),y((function(E){return E.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(u).split("\\.").join(l)})(v),!0).map(a)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function a(v){return v.split(i).join("\\").split(s).join("{").split(o).join("}").split(u).join(",").split(l).join(".")}function h(v){if(!v)return[""];var E=[],T=n("{","}",v);if(!T)return v.split(",");var P=T.pre,S=T.body,F=T.post,L=P.split(",");L[L.length-1]+="{"+S+"}";var U=h(F);return F.length&&(L[L.length-1]+=U.shift(),L.push.apply(L,U)),E.push.apply(E,L),E}function p(v){return"{"+v+"}"}function b(v){return/^-?0\d/.test(v)}function g(v,E){return v<=E}function m(v,E){return v>=E}function y(v,E){var T=[],P=n("{","}",v);if(!P)return[v];var S=P.pre,F=P.post.length?y(P.post,!1):[""];if(/\$$/.test(P.pre))for(var L=0;L<F.length;L++){var U=S+"{"+P.body+"}"+F[L];T.push(U)}else{var _,j,pe=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(P.body),oe=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(P.body),R=pe||oe,le=P.body.indexOf(",")>=0;if(!R&&!le)return P.post.match(/,(?!,).*\}/)?y(v=P.pre+"{"+P.body+o+P.post):[v];if(R)_=P.body.split(/\.\./);else if((_=h(P.body)).length===1&&(_=y(_[0],!1).map(p)).length===1)return F.map((function(Fr){return P.pre+_[0]+Fr}));if(R){var Pe=c(_[0]),J=c(_[1]),ae=Math.max(_[0].length,_[1].length),K=_.length==3?Math.abs(c(_[2])):1,ke=g;J<Pe&&(K*=-1,ke=m);var Ze=_.some(b);j=[];for(var re=Pe;ke(re,J);re+=K){var ce;if(oe)(ce=String.fromCharCode(re))==="\\"&&(ce="");else if(ce=String(re),Ze){var Qe=ae-ce.length;if(Qe>0){var V=new Array(Qe+1).join("0");ce=re<0?"-"+V+ce.slice(1):V+ce}}j.push(ce)}}else{j=[];for(var z=0;z<_.length;z++)j.push.apply(j,y(_[z],!1))}for(z=0;z<j.length;z++)for(L=0;L<F.length;L++)U=S+j[z]+F[L],(!E||R||U)&&T.push(U)}return T}},298:t=>{var e,r;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return 16711935&r.rotl(n,8)|4278255360&r.rotl(n,24);for(var i=0;i<n.length;i++)n[i]=r.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(256*Math.random()));return i},bytesToWords:function(n){for(var i=[],s=0,o=0;s<n.length;s++,o+=8)i[o>>>5]|=n[s]<<24-o%32;return i},wordsToBytes:function(n){for(var i=[],s=0;s<32*n.length;s+=8)i.push(n[s>>>5]>>>24-s%32&255);return i},bytesToHex:function(n){for(var i=[],s=0;s<n.length;s++)i.push((n[s]>>>4).toString(16)),i.push((15&n[s]).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],s=0;s<n.length;s+=2)i.push(parseInt(n.substr(s,2),16));return i},bytesToBase64:function(n){for(var i=[],s=0;s<n.length;s+=3)for(var o=n[s]<<16|n[s+1]<<8|n[s+2],u=0;u<4;u++)8*s+6*u<=8*n.length?i.push(e.charAt(o>>>6*(3-u)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],s=0,o=0;s<n.length;o=++s%4)o!=0&&i.push((e.indexOf(n.charAt(s-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(n.charAt(s))>>>6-2*o);return i}},t.exports=r},345:()=>{},388:()=>{},410:()=>{},526:t=>{var e={utf8:{stringToBytes:function(r){return e.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(e.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var n=[],i=0;i<r.length;i++)n.push(255&r.charCodeAt(i));return n},bytesToString:function(r){for(var n=[],i=0;i<r.length;i++)n.push(String.fromCharCode(r[i]));return n.join("")}}};t.exports=e},542:(t,e,r)=>{(function(){var n=r(298),i=r(526).utf8,s=r(135),o=r(526).bin,u=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?o.stringToBytes(l):i.stringToBytes(l):s(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var a=n.bytesToWords(l),h=8*l.length,p=1732584193,b=-271733879,g=-1732584194,m=271733878,y=0;y<a.length;y++)a[y]=16711935&(a[y]<<8|a[y]>>>24)|4278255360&(a[y]<<24|a[y]>>>8);a[h>>>5]|=128<<h%32,a[14+(h+64>>>9<<4)]=h;var v=u._ff,E=u._gg,T=u._hh,P=u._ii;for(y=0;y<a.length;y+=16){var S=p,F=b,L=g,U=m;p=v(p,b,g,m,a[y+0],7,-680876936),m=v(m,p,b,g,a[y+1],12,-389564586),g=v(g,m,p,b,a[y+2],17,606105819),b=v(b,g,m,p,a[y+3],22,-1044525330),p=v(p,b,g,m,a[y+4],7,-176418897),m=v(m,p,b,g,a[y+5],12,1200080426),g=v(g,m,p,b,a[y+6],17,-1473231341),b=v(b,g,m,p,a[y+7],22,-45705983),p=v(p,b,g,m,a[y+8],7,1770035416),m=v(m,p,b,g,a[y+9],12,-1958414417),g=v(g,m,p,b,a[y+10],17,-42063),b=v(b,g,m,p,a[y+11],22,-1990404162),p=v(p,b,g,m,a[y+12],7,1804603682),m=v(m,p,b,g,a[y+13],12,-40341101),g=v(g,m,p,b,a[y+14],17,-1502002290),p=E(p,b=v(b,g,m,p,a[y+15],22,1236535329),g,m,a[y+1],5,-165796510),m=E(m,p,b,g,a[y+6],9,-1069501632),g=E(g,m,p,b,a[y+11],14,643717713),b=E(b,g,m,p,a[y+0],20,-373897302),p=E(p,b,g,m,a[y+5],5,-701558691),m=E(m,p,b,g,a[y+10],9,38016083),g=E(g,m,p,b,a[y+15],14,-660478335),b=E(b,g,m,p,a[y+4],20,-405537848),p=E(p,b,g,m,a[y+9],5,568446438),m=E(m,p,b,g,a[y+14],9,-1019803690),g=E(g,m,p,b,a[y+3],14,-187363961),b=E(b,g,m,p,a[y+8],20,1163531501),p=E(p,b,g,m,a[y+13],5,-1444681467),m=E(m,p,b,g,a[y+2],9,-51403784),g=E(g,m,p,b,a[y+7],14,1735328473),p=T(p,b=E(b,g,m,p,a[y+12],20,-1926607734),g,m,a[y+5],4,-378558),m=T(m,p,b,g,a[y+8],11,-2022574463),g=T(g,m,p,b,a[y+11],16,1839030562),b=T(b,g,m,p,a[y+14],23,-35309556),p=T(p,b,g,m,a[y+1],4,-1530992060),m=T(m,p,b,g,a[y+4],11,1272893353),g=T(g,m,p,b,a[y+7],16,-155497632),b=T(b,g,m,p,a[y+10],23,-1094730640),p=T(p,b,g,m,a[y+13],4,681279174),m=T(m,p,b,g,a[y+0],11,-358537222),g=T(g,m,p,b,a[y+3],16,-722521979),b=T(b,g,m,p,a[y+6],23,76029189),p=T(p,b,g,m,a[y+9],4,-640364487),m=T(m,p,b,g,a[y+12],11,-421815835),g=T(g,m,p,b,a[y+15],16,530742520),p=P(p,b=T(b,g,m,p,a[y+2],23,-995338651),g,m,a[y+0],6,-198630844),m=P(m,p,b,g,a[y+7],10,1126891415),g=P(g,m,p,b,a[y+14],15,-1416354905),b=P(b,g,m,p,a[y+5],21,-57434055),p=P(p,b,g,m,a[y+12],6,1700485571),m=P(m,p,b,g,a[y+3],10,-1894986606),g=P(g,m,p,b,a[y+10],15,-1051523),b=P(b,g,m,p,a[y+1],21,-2054922799),p=P(p,b,g,m,a[y+8],6,1873313359),m=P(m,p,b,g,a[y+15],10,-30611744),g=P(g,m,p,b,a[y+6],15,-1560198380),b=P(b,g,m,p,a[y+13],21,1309151649),p=P(p,b,g,m,a[y+4],6,-145523070),m=P(m,p,b,g,a[y+11],10,-1120210379),g=P(g,m,p,b,a[y+2],15,718787259),b=P(b,g,m,p,a[y+9],21,-343485551),p=p+S>>>0,b=b+F>>>0,g=g+L>>>0,m=m+U>>>0}return n.endian([p,b,g,m])};u._ff=function(l,c,a,h,p,b,g){var m=l+(c&a|~c&h)+(p>>>0)+g;return(m<<b|m>>>32-b)+c},u._gg=function(l,c,a,h,p,b,g){var m=l+(c&h|a&~h)+(p>>>0)+g;return(m<<b|m>>>32-b)+c},u._hh=function(l,c,a,h,p,b,g){var m=l+(c^a^h)+(p>>>0)+g;return(m<<b|m>>>32-b)+c},u._ii=function(l,c,a,h,p,b,g){var m=l+(a^(c|~h))+(p>>>0)+g;return(m<<b|m>>>32-b)+c},u._blocksize=16,u._digestsize=16,t.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var a=n.wordsToBytes(u(l,c));return c&&c.asBytes?a:c&&c.asString?o.bytesToString(a):n.bytesToHex(a)}})()},647:(t,e)=>{var r=Object.prototype.hasOwnProperty;function n(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function i(s){try{return encodeURIComponent(s)}catch{return null}}e.stringify=function(s,o){o=o||"";var u,l,c=[];for(l in typeof o!="string"&&(o="?"),s)if(r.call(s,l)){if((u=s[l])||u!=null&&!isNaN(u)||(u=""),l=i(l),u=i(u),l===null||u===null)continue;c.push(l+"="+u)}return c.length?o+c.join("&"):""},e.parse=function(s){for(var o,u=/([^=?#&]+)=?([^&]*)/g,l={};o=u.exec(s);){var c=n(o[1]),a=n(o[2]);c===null||a===null||c in l||(l[c]=a)}return l}},670:t=>{t.exports=function(e,r){if(r=r.split(":")[0],!(e=+e))return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},737:(t,e,r)=>{var n=r(670),i=r(647),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,a=/^[a-zA-Z]:/;function h(E){return(E||"").toString().replace(s,"")}var p=[["#","hash"],["?","query"],function(E,T){return m(T.protocol)?E.replace(/\\/g,"/"):E},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],b={hash:1,query:1};function g(E){var T,P=(typeof window<"u"?window:typeof Re<"u"?Re:typeof self<"u"?self:{}).location||{},S={},F=typeof(E=E||P);if(E.protocol==="blob:")S=new v(unescape(E.pathname),{});else if(F==="string")for(T in S=new v(E,{}),b)delete S[T];else if(F==="object"){for(T in E)T in b||(S[T]=E[T]);S.slashes===void 0&&(S.slashes=u.test(E.href))}return S}function m(E){return E==="file:"||E==="ftp:"||E==="http:"||E==="https:"||E==="ws:"||E==="wss:"}function y(E,T){E=(E=h(E)).replace(o,""),T=T||{};var P,S=c.exec(E),F=S[1]?S[1].toLowerCase():"",L=!!S[2],U=!!S[3],_=0;return L?U?(P=S[2]+S[3]+S[4],_=S[2].length+S[3].length):(P=S[2]+S[4],_=S[2].length):U?(P=S[3]+S[4],_=S[3].length):P=S[4],F==="file:"?_>=2&&(P=P.slice(2)):m(F)?P=S[4]:F?L&&(P=P.slice(2)):_>=2&&m(T.protocol)&&(P=S[4]),{protocol:F,slashes:L||m(F),slashesCount:_,rest:P}}function v(E,T,P){if(E=(E=h(E)).replace(o,""),!(this instanceof v))return new v(E,T,P);var S,F,L,U,_,j,pe=p.slice(),oe=typeof T,R=this,le=0;for(oe!=="object"&&oe!=="string"&&(P=T,T=null),P&&typeof P!="function"&&(P=i.parse),S=!(F=y(E||"",T=g(T))).protocol&&!F.slashes,R.slashes=F.slashes||S&&T.slashes,R.protocol=F.protocol||T.protocol||"",E=F.rest,(F.protocol==="file:"&&(F.slashesCount!==2||a.test(E))||!F.slashes&&(F.protocol||F.slashesCount<2||!m(R.protocol)))&&(pe[3]=[/(.*)/,"pathname"]);le<pe.length;le++)typeof(U=pe[le])!="function"?(L=U[0],j=U[1],L!=L?R[j]=E:typeof L=="string"?~(_=L==="@"?E.lastIndexOf(L):E.indexOf(L))&&(typeof U[2]=="number"?(R[j]=E.slice(0,_),E=E.slice(_+U[2])):(R[j]=E.slice(_),E=E.slice(0,_))):(_=L.exec(E))&&(R[j]=_[1],E=E.slice(0,_.index)),R[j]=R[j]||S&&U[3]&&T[j]||"",U[4]&&(R[j]=R[j].toLowerCase())):E=U(E,R);P&&(R.query=P(R.query)),S&&T.slashes&&R.pathname.charAt(0)!=="/"&&(R.pathname!==""||T.pathname!=="")&&(R.pathname=(function(Pe,J){if(Pe==="")return J;for(var ae=(J||"/").split("/").slice(0,-1).concat(Pe.split("/")),K=ae.length,ke=ae[K-1],Ze=!1,re=0;K--;)ae[K]==="."?ae.splice(K,1):ae[K]===".."?(ae.splice(K,1),re++):re&&(K===0&&(Ze=!0),ae.splice(K,1),re--);return Ze&&ae.unshift(""),ke!=="."&&ke!==".."||ae.push(""),ae.join("/")})(R.pathname,T.pathname)),R.pathname.charAt(0)!=="/"&&m(R.protocol)&&(R.pathname="/"+R.pathname),n(R.port,R.protocol)||(R.host=R.hostname,R.port=""),R.username=R.password="",R.auth&&(~(_=R.auth.indexOf(":"))?(R.username=R.auth.slice(0,_),R.username=encodeURIComponent(decodeURIComponent(R.username)),R.password=R.auth.slice(_+1),R.password=encodeURIComponent(decodeURIComponent(R.password))):R.username=encodeURIComponent(decodeURIComponent(R.auth)),R.auth=R.password?R.username+":"+R.password:R.username),R.origin=R.protocol!=="file:"&&m(R.protocol)&&R.host?R.protocol+"//"+R.host:"null",R.href=R.toString()}v.prototype={set:function(E,T,P){var S=this;switch(E){case"query":typeof T=="string"&&T.length&&(T=(P||i.parse)(T)),S[E]=T;break;case"port":S[E]=T,n(T,S.protocol)?T&&(S.host=S.hostname+":"+T):(S.host=S.hostname,S[E]="");break;case"hostname":S[E]=T,S.port&&(T+=":"+S.port),S.host=T;break;case"host":S[E]=T,l.test(T)?(T=T.split(":"),S.port=T.pop(),S.hostname=T.join(":")):(S.hostname=T,S.port="");break;case"protocol":S.protocol=T.toLowerCase(),S.slashes=!P;break;case"pathname":case"hash":if(T){var F=E==="pathname"?"/":"#";S[E]=T.charAt(0)!==F?F+T:T}else S[E]=T;break;case"username":case"password":S[E]=encodeURIComponent(T);break;case"auth":var L=T.indexOf(":");~L?(S.username=T.slice(0,L),S.username=encodeURIComponent(decodeURIComponent(S.username)),S.password=T.slice(L+1),S.password=encodeURIComponent(decodeURIComponent(S.password))):S.username=encodeURIComponent(decodeURIComponent(T))}for(var U=0;U<p.length;U++){var _=p[U];_[4]&&(S[_[1]]=S[_[1]].toLowerCase())}return S.auth=S.password?S.username+":"+S.password:S.username,S.origin=S.protocol!=="file:"&&m(S.protocol)&&S.host?S.protocol+"//"+S.host:"null",S.href=S.toString(),S},toString:function(E){E&&typeof E=="function"||(E=i.stringify);var T,P=this,S=P.host,F=P.protocol;F&&F.charAt(F.length-1)!==":"&&(F+=":");var L=F+(P.protocol&&P.slashes||m(P.protocol)?"//":"");return P.username?(L+=P.username,P.password&&(L+=":"+P.password),L+="@"):P.password?(L+=":"+P.password,L+="@"):P.protocol!=="file:"&&m(P.protocol)&&!S&&P.pathname!=="/"&&(L+="@"),(S[S.length-1]===":"||l.test(P.hostname)&&!P.port)&&(S+=":"),L+=S+P.pathname,(T=typeof P.query=="object"?E(P.query):P.query)&&(L+=T.charAt(0)!=="?"?"?"+T:T),P.hash&&(L+=P.hash),L}},v.extractProtocol=y,v.location=g,v.trimLeft=h,v.qs=i,t.exports=v},800:()=>{},805:()=>{},829:t=>{function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(c)}function r(c){var a=typeof Map=="function"?new Map:void 0;return r=function(h){if(h===null||(p=h,Function.toString.call(p).indexOf("[native code]")===-1))return h;var p;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(h))return a.get(h);a.set(h,b)}function b(){return n(h,arguments,s(this).constructor)}return b.prototype=Object.create(h.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),i(b,h)},r(c)}function n(c,a,h){return n=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(p,b,g){var m=[null];m.push.apply(m,b);var y=new(Function.bind.apply(p,m));return g&&i(y,g.prototype),y},n.apply(null,arguments)}function i(c,a){return i=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},i(c,a)}function s(c){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},s(c)}var o=(function(c){function a(h){var p;return(function(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")})(this,a),(p=(function(b,g){return!g||e(g)!=="object"&&typeof g!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(b):g})(this,s(a).call(this,h))).name="ObjectPrototypeMutationError",p}return(function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),p&&i(h,p)})(a,c),a})(r(Error));function u(c,a){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},p=a.split("."),b=p.length,g=function(v){var E=p[v];if(!c)return{v:void 0};if(E==="+"){if(Array.isArray(c))return{v:c.map((function(P,S){var F=p.slice(v+1);return F.length>0?u(P,F.join("."),h):h(c,S,p,v)}))};var T=p.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(T,") is not an array"))}c=h(c,E,p,v)},m=0;m<b;m++){var y=g(m);if(e(y)==="object")return y.v}return c}function l(c,a){return c.length===a+1}t.exports={set:function(c,a,h){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a]=h,c[a];try{return u(c,a,(function(p,b,g,m){if(p===Reflect.getPrototypeOf({}))throw new o("Attempting to mutate Object.prototype");if(!p[b]){var y=Number.isInteger(Number(g[m+1])),v=g[m+1]==="+";p[b]=y||v?[]:{}}return l(g,m)&&(p[b]=h),p[b]}))}catch(p){if(p instanceof o)throw p;return c}},get:function(c,a){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a];try{return u(c,a,(function(h,p){return h[p]}))}catch{return c}},has:function(c,a){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(c)!="object"||c===null||a===void 0)return!1;if(typeof a=="number")return a in c;try{var p=!1;return u(c,a,(function(b,g,m,y){if(!l(m,y))return b&&b[g];p=h.own?b.hasOwnProperty(g):g in b})),p}catch{return!1}},hasOwn:function(c,a,h){return this.has(c,a,h||{own:!0})},isIn:function(c,a,h){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(c)!="object"||c===null||a===void 0)return!1;try{var b=!1,g=!1;return u(c,a,(function(m,y,v,E){return b=b||m===h||!!m&&m[y]===h,g=l(v,E)&&e(m)==="object"&&y in m,m&&m[y]})),p.validPath?b&&g:b}catch{return!1}},ObjectPrototypeMutationError:o}}},Vs={};function H(t){var e=Vs[t];if(e!==void 0)return e.exports;var r=Vs[t]={id:t,loaded:!1,exports:{}};return Fd[t].call(r.exports,r,r.exports,H),r.loaded=!0,r.exports}H.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return H.d(e,{a:e}),e},H.d=(t,e)=>{for(var r in e)H.o(e,r)&&!H.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},H.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),H.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var Ld=H(737),_d=H.n(Ld);function mn(t){if(!yn(t))throw new Error("Parameter was not an error")}function yn(t){return!!t&&typeof t=="object"&&(e=t,Object.prototype.toString.call(e)==="[object Error]")||t instanceof Error;var e}class me extends Error{constructor(e,r){const n=[...arguments],{options:i,shortMessage:s}=(function(u){let l,c="";if(u.length===0)l={};else if(yn(u[0]))l={cause:u[0]},c=u.slice(1).join(" ")||"";else if(u[0]&&typeof u[0]=="object")l=Object.assign({},u[0]),c=u.slice(1).join(" ")||"";else{if(typeof u[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=u.join(" ")||""}return{options:l,shortMessage:c}})(n);let o=s;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&typeof i.name=="string"?this.name=i.name:this.name="Layerr",i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&typeof i.info=="object"&&Object.assign(this._info,i.info),Error.captureStackTrace){const u=i.constructorOpt||this.constructor;Error.captureStackTrace(this,u)}}static cause(e){return mn(e),e._cause&&yn(e._cause)?e._cause:null}static fullStack(e){mn(e);const r=me.cause(e);return r?`${e.stack}
13
+ caused by: ${me.fullStack(r)}`:e.stack??""}static info(e){mn(e);const r={},n=me.cause(e);return n&&Object.assign(r,me.info(n)),e._info&&Object.assign(r,e._info),r}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var Ud=H(47),Tr=H.n(Ud);const Hs="__PATH_SEPARATOR_POSIX__",zs="__PATH_SEPARATOR_WINDOWS__";function W(t){try{const e=t.replace(/\//g,Hs).replace(/\\\\/g,zs);return encodeURIComponent(e).split(zs).join("\\\\").split(Hs).join("/")}catch(e){throw new me(e,"Failed encoding path")}}function qs(t){return t.startsWith("/")?t:"/"+t}function Vt(t){let e=t;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function Bd(t){let e=new(_d())(t).pathname;return e.length<=0&&(e="/"),Vt(e)}function G(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(function(){return(function(n){var i=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var s=n.shift();n[0]=s+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var u=n[o];if(typeof u!="string")throw new TypeError("Url must be a string. Received "+u);u!==""&&(o>0&&(u=u.replace(/^[\/]+/,"")),u=o<n.length-1?u.replace(/[\/]+$/,""):u.replace(/[\/]+$/,"/"),i.push(u))}var l=i.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(e.reduce(((n,i,s)=>((s===0||i!=="/"||i==="/"&&n[n.length-1]!=="/")&&n.push(i),n)),[]))}var $d=H(542),Ht=H.n($d);function Ws(t,e){const r=t.url.replace("//",""),n=r.indexOf("/")==-1?"/":r.slice(r.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",o=`00000000${e.nc}`.slice(-8),u=(function(p,b,g,m,y,v,E){const T=E||Ht()(`${b}:${g}:${m}`);return p&&p.toLowerCase()==="md5-sess"?Ht()(`${T}:${y}:${v}`):T})(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),l=Ht()(`${i}:${n}`),c=s?Ht()(`${u}:${e.nonce}:${o}:${e.cnonce}:${s}:${l}`):Ht()(`${u}:${e.nonce}:${l}`),a={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:s,response:c,nc:o,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const p in a)a[p]&&(p==="qop"||p==="nc"||p==="algorithm"?h.push(`${p}=${a[p]}`):h.push(`${p}="${a[p]}"`));return`Digest ${h.join(", ")}`}function Gs(t){return(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var kd=H(101),Ks=H.n(kd);function Js(t){return Ks().decode(t)}function Xs(t,e){var r;return`Basic ${r=`${t}:${e}`,Ks().encode(r)}`}const Ys=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,jd=Ys.fetch.bind(Ys);let Te=(function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t})({}),Xe=(function(t){return t.DataTypeNoLength="data-type-no-length",t.InvalidAuthType="invalid-auth-type",t.InvalidOutputFormat="invalid-output-format",t.LinkUnsupportedAuthType="link-unsupported-auth",t.InvalidUpdateRange="invalid-update-range",t.NotSupported="not-supported",t})({});function Zs(t,e,r,n,i){switch(t.authType){case Te.Auto:e&&r&&(t.headers.Authorization=Xs(e,r));break;case Te.Digest:t.digest=(function(o,u,l){return{username:o,password:u,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(e,r,i);break;case Te.None:break;case Te.Password:t.headers.Authorization=Xs(e,r);break;case Te.Token:t.headers.Authorization=`${(s=n).token_type} ${s.access_token}`;break;default:throw new me({info:{code:Xe.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var s}H(345),H(800);const Qs="@@HOTPATCHER",Md=()=>{};function bn(t){return{original:t,methods:[t],final:!1}}class Dd{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Qs}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==Qs)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?r&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e){const r=this.get(e)||Md;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r(...i)}get(e){const r=this.configuration.registry[e];if(!r)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(i.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];let c=u;const a=this;for(;i.length>0;)c=[i.shift().apply(a,c)];return c[0]}})(...r.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:i=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof r!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(r):this.configuration.registry[e]=bn(r);else if(this.isPatched(e)){const{original:s}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(bn(r),{original:s})}else this.configuration.registry[e]=bn(r);return this}patchInline(e,r){this.isPatched(e)||this.patch(e,r);for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return this.execute(e,...i)}plugin(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach((s=>{this.patch(e,s,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let wn=null;function Vd(){return wn||(wn=new Dd),wn}function Ar(t){return(function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r})(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function eo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];let n=null,i=[...e];for(;i.length>0;){const s=i.shift();n=n?to(n,s):Ar(s)}return n}function to(t,e){const r=Ar(t);return Object.keys(e).forEach((n=>{r.hasOwnProperty(n)?Array.isArray(e[n])?r[n]=Array.isArray(r[n])?[...r[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?r[n]=typeof r[n]=="object"&&r[n]?to(r[n],e[n]):Ar(e[n]):r[n]=e[n]:r[n]=e[n]})),r}function Hd(t){const e={};for(const r of t.keys())e[r]=t.get(r);return e}function xn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(e.length===0)return{};const n={};return e.reduce(((i,s)=>(Object.keys(s).forEach((o=>{const u=o.toLowerCase();n.hasOwnProperty(u)?i[n[u]]=s[o]:(n[u]=o,i[o]=s[o])})),i)),{})}H(805);const zd=typeof ArrayBuffer=="function",{toString:qd}=Object.prototype;function ro(t){return zd&&(t instanceof ArrayBuffer||qd.call(t)==="[object ArrayBuffer]")}function no(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function En(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function vn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const io=En((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=eo(t,{headers:{Authorization:Ws(t,e)}})),vn(Nr(t),(function(r){let n=!1;return i=function(o){return n?o:r},(s=(function(){if(r.status==401)return e.hasDigestAuth=(function(o,u){if(!Gs(o))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=o.headers&&o.headers.get("www-authenticate")||"",a=l.exec(c);if(!a)break;u[a[1]]=a[2]||a[3]}return u.nc+=1,u.cnonce=(function(){let c="";for(let a=0;a<32;++a)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(r,e),(function(){if(e.hasDigestAuth)return vn(Nr(t=eo(t,{headers:{Authorization:Ws(t,e)}})),(function(o){return o.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,o}))})();e.nc++})())&&s.then?s.then(i):i(s);var i,s}))})),Wd=En((function(t,e){return vn(Nr(t),(function(r){return r.ok?(e.authType=Te.Password,r):r.status==401&&Gs(r)?(e.authType=Te.Digest,Zs(e,e.username,e.password,void 0,void 0),t._digest=e.digest,io(t)):r}))})),ne=En((function(t,e){return e.authType===Te.Auto?Wd(t,e):t._digest?io(t):Nr(t)}));function ie(t,e,r){const n=Ar(t);return n.headers=xn(e.headers,n.headers||{},r.headers||{}),r.data!==void 0&&(n.data=r.data),r.signal&&(n.signal=r.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function Nr(t){const e=Vd();return e.patchInline("request",(r=>e.patchInline("fetch",jd,r.url,(function(n){let i={};const s={method:n.method};if(n.headers&&(i=xn(i,n.headers)),n.data!==void 0){const[o,u]=(function(l){if(typeof l=="string")return[l,{}];if(no(l))return[l,{}];if(ro(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(n.data);s.body=o,i=xn(i,u)}return n.signal&&(s.signal=n.signal),n.withCredentials&&(s.credentials="include"),s.headers=i,s})(r))),t)}var Gd=H(285);const Pr=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Kd={"[: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]},zt=t=>t.replace(/[[\]\\-]/g,"\\$&"),so=t=>t.join(""),Jd=(t,e)=>{const r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,u=!1,l=!1,c=!1,a=r,h="";e:for(;s<t.length;){const m=t.charAt(s);if(m!=="!"&&m!=="^"||s!==r+1){if(m==="]"&&o&&!l){a=s+1;break}if(o=!0,m!=="\\"||l){if(m==="["&&!l){for(const[y,[v,E,T]]of Object.entries(Kd))if(t.startsWith(y,s)){if(h)return["$.",!1,t.length-r,!0];s+=y.length,T?i.push(v):n.push(v),u=u||E;continue e}}l=!1,h?(m>h?n.push(zt(h)+"-"+zt(m)):m===h&&n.push(zt(m)),h="",s++):t.startsWith("-]",s+1)?(n.push(zt(m+"-")),s+=2):t.startsWith("-",s+1)?(h=m,s+=2):(n.push(zt(m)),s++)}else l=!0,s++}else c=!0,s++}if(a<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c)return[(p=n[0].length===2?n[0].slice(-1):n[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,a-r,!1];var p;const b="["+(c?"^":"")+so(n)+"]",g="["+(c?"":"^")+so(i)+"]";return[n.length&&i.length?"("+b+"|"+g+")":n.length?b:g,u,a-r,!0]},qt=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Xd=new Set(["!","?","+","*","@"]),oo=t=>Xd.has(t),Tn="(?!\\.)",Yd=new Set(["[","."]),Zd=new Set(["..","."]),Qd=new Set("().*{}+?[]^$\\!"),An="[^/]",ao=An+"*?",uo=An+"+?";class ye{type;#e;#r;#s=!1;#t=[];#n;#d;#l;#g=!1;#f;#c;#p=!1;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#r=!0),this.#n=r,this.#e=this.#n?this.#n.#e:this,this.#f=this.#e===this?n:this.#e.#f,this.#l=this.#e===this?[]:this.#e.#l,e!=="!"||this.#e.#g||this.#l.push(this),this.#d=this.#n?this.#n.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map((e=>String(e))).join("|")+")":this.#c=this.#t.map((e=>String(e))).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#g)return this;let e;for(this.toString(),this.#g=!0;e=this.#l.pop();){if(e.type!=="!")continue;let r=e,n=r.#n;for(;n;){for(let i=r.#d+1;!n.type&&i<n.#t.length;i++)for(const s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#n}}return this}push(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const i of r)if(i!==""){if(typeof i!="string"&&!(i instanceof ye&&i.#n===this))throw new Error("invalid part: "+i);this.#t.push(i)}}toJSON(){const e=this.type===null?this.#t.slice().map((r=>typeof r=="string"?r:r.toJSON())):[this.type,...this.#t.map((r=>r.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#g&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#d===0)return!0;const e=this.#n;for(let r=0;r<this.#d;r++){const n=e.#t[r];if(!(n instanceof ye&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const e=this.#n?this.#n.#t.length:0;return this.#d===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const r=new ye(this.type,e);for(const n of this.#t)r.copyIn(n);return r}static#o(e,r,n,i){let s=!1,o=!1,u=-1,l=!1;if(r.type===null){let b=n,g="";for(;b<e.length;){const m=e.charAt(b++);if(s||m==="\\")s=!s,g+=m;else if(o)b===u+1?m!=="^"&&m!=="!"||(l=!0):m!=="]"||b===u+2&&l||(o=!1),g+=m;else if(m!=="[")if(i.noext||!oo(m)||e.charAt(b)!=="(")g+=m;else{r.push(g),g="";const y=new ye(m,r);b=ye.#o(e,y,b,i),r.push(y)}else o=!0,u=b,l=!1,g+=m}return r.push(g),b}let c=n+1,a=new ye(null,r);const h=[];let p="";for(;c<e.length;){const b=e.charAt(c++);if(s||b==="\\")s=!s,p+=b;else if(o)c===u+1?b!=="^"&&b!=="!"||(l=!0):b!=="]"||c===u+2&&l||(o=!1),p+=b;else if(b!=="[")if(oo(b)&&e.charAt(c)==="("){a.push(p),p="";const g=new ye(b,a);a.push(g),c=ye.#o(e,g,c,i)}else if(b!=="|"){if(b===")")return p===""&&r.#t.length===0&&(r.#p=!0),a.push(p),p="",r.push(...h,a),c;p+=b}else a.push(p),p="",h.push(a),a=new ye(null,r);else o=!0,u=c,l=!1,p+=b}return r.type=null,r.#r=void 0,r.#t=[e.substring(n-1)],c}static fromGlob(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new ye(null,void 0,r);return ye.#o(e,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#f.nocase&&!this.#f.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(this.#f.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#f}toRegExpSource(e){const r=e??!!this.#f.dot;if(this.#e===this&&this.#h(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((p=>{const[b,g,m,y]=typeof p=="string"?ye.#i(p,this.#r,l):p.toRegExpSource(e);return this.#r=this.#r||m,this.#s=this.#s||y,b})).join("");let a="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Zd.has(this.#t[0]))){const p=Yd,b=r&&p.has(c.charAt(0))||c.startsWith("\\.")&&p.has(c.charAt(2))||c.startsWith("\\.\\.")&&p.has(c.charAt(4)),g=!r&&!e&&p.has(c.charAt(0));a=b?"(?!(?:^|/)\\.\\.?(?:$|/))":g?Tn:""}let h="";return this.isEnd()&&this.#e.#g&&this.#n?.type==="!"&&(h="(?:$|\\/)"),[a+c+h,qt(c),this.#r=!!this.#r,this.#s]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#a(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#r=void 0,[l,qt(this.toString()),!1,!1]}let o=!n||e||r?"":this.#a(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let u="";return u=this.type==="!"&&this.#p?(this.isStart()&&!r?Tn:"")+uo:i+s+(this.type==="!"?"))"+(!this.isStart()||r||e?"":Tn)+ao+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`),[u,qt(s),this.#r=!!this.#r,this.#s]}#a(e){return this.#t.map((r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[n,i,s,o]=r.toRegExpSource(e);return this.#s=this.#s||o,n})).filter((r=>!(this.isStart()&&this.isEnd()&&!r))).join("|")}static#i(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=!1,s="",o=!1;for(let u=0;u<e.length;u++){const l=e.charAt(u);if(i)i=!1,s+=(Qd.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,a,h,p]=Jd(e,u);if(h){s+=c,o=o||a,u+=h-1,r=r||p;continue}}l!=="*"?l!=="?"?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=An,r=!0):(s+=n&&e==="*"?uo:ao,r=!0)}else u===e.length-1?s+="\\\\":i=!0}return[s,qt(e),!!r,o]}}const de=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Pr(e),!(!r.nocomment&&e.charAt(0)==="#")&&new Ir(e,r).match(t)},ep=/^\*+([^+@!?\*\[\(]*)$/,tp=t=>e=>!e.startsWith(".")&&e.endsWith(t),rp=t=>e=>e.endsWith(t),np=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),ip=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),sp=/^\*+\.\*+$/,op=t=>!t.startsWith(".")&&t.includes("."),ap=t=>t!=="."&&t!==".."&&t.includes("."),up=/^\.\*+$/,lp=t=>t!=="."&&t!==".."&&t.startsWith("."),cp=/^\*+$/,fp=t=>t.length!==0&&!t.startsWith("."),hp=t=>t.length!==0&&t!=="."&&t!=="..",dp=/^\?+([^+@!?\*\[\(]*)?$/,pp=t=>{let[e,r=""]=t;const n=lo([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},gp=t=>{let[e,r=""]=t;const n=co([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},mp=t=>{let[e,r=""]=t;const n=co([e]);return r?i=>n(i)&&i.endsWith(r):n},yp=t=>{let[e,r=""]=t;const n=lo([e]);return r?i=>n(i)&&i.endsWith(r):n},lo=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&!n.startsWith(".")},co=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&n!=="."&&n!==".."},fo=typeof Be=="object"&&Be?typeof Be.env=="object"&&Be.env&&Be.env.__MINIMATCH_TESTING_PLATFORM__||Be.platform:"posix";de.sep=fo==="win32"?"\\":"/";const Oe=Symbol("globstar **");de.GLOBSTAR=Oe,de.filter=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=>de(r,t,e)};const Ce=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},t,e)};de.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return de;const e=de;return Object.assign((function(r,n){return e(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(r){super(r,Ce(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(r){return e.defaults(Ce(t,r)).Minimatch}},AST:class extends e.AST{constructor(r,n){super(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(r,Ce(t,n))}},unescape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(r,Ce(t,n))},escape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(r,Ce(t,n))},filter:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(r,Ce(t,n))},defaults:r=>e.defaults(Ce(t,r)),makeRe:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(r,Ce(t,n))},braceExpand:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(r,Ce(t,n))},match:function(r,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(r,n,Ce(t,i))},sep:e.sep,GLOBSTAR:Oe})};const ho=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Pr(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Gd(t)};de.braceExpand=ho,de.makeRe=function(t){return new Ir(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},de.match=function(t,e){const r=new Ir(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return t=t.filter((n=>r.match(n))),r.options.nonull&&!t.length&&t.push(e),t};const po=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ir{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pr(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||fo,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const r of e)if(typeof r!="string")return!0;return!1}debug(){}make(){const e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((s=>this.slashSplit(s)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((s,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(s[0]!==""||s[1]!==""||s[2]!=="?"&&po.test(s[2])||po.test(s[3])),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map((a=>this.parse(a)))];if(c)return[s[0],...s.slice(1).map((a=>this.parse(a)))]}return s.map((l=>this.parse(l)))}));if(this.debug(this.pattern,i),this.set=i.filter((s=>s.indexOf(!1)===-1)),this.isWindows)for(let s=0;s<this.set.length;s++){const o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let i=0;i<e[n].length;i++)e[n][i]==="**"&&(e[n][i]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=r>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r}))}levelOneOptimize(e){return e.map((r=>(r=r.reduce(((n,i)=>{const s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)}),[])).length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const s=e[i];i===1&&s===""&&e[0]===""||s!=="."&&s!==""||(r=!0,e.splice(i,1),i--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let u=n[i+1];const l=n[i+2],c=n[i+3];if(u!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);const a=n.slice(0);a[i]="**",e.push(a),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const u=n[o];o===1&&u===""&&n[0]===""||u!=="."&&u!==""||(r=!0,n.splice(o,1),o--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){const o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;const u=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...u),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){const i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter((r=>r.length))}partsMatch(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=0,s=0,o=[],u="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])o.push(u==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])o.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])o.push(r[s]),s++;else if(e[i]!=="*"||!r[s]||!this.options.dot&&r[s].startsWith(".")||r[s]==="**"){if(r[s]!=="*"||!e[i]||!this.options.dot&&e[i].startsWith(".")||e[i]==="**"||u==="a")return!1;u="b",o.push(r[s]),i++,s++}else{if(u==="b")return!1;u="a",o.push(e[i]),i++,s++}return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const i=this.options;if(this.isWindows){const m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),v=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),E=y?3:m?0:void 0,T=!v&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3])?3:v?0:void 0;if(typeof E=="number"&&typeof T=="number"){const[P,S]=[e[E],r[T]];P.toLowerCase()===S.toLowerCase()&&(r[T]=P,T>E?r=r.slice(T):E>T&&(e=e.slice(E)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,u=0,l=e.length,c=r.length;o<l&&u<c;o++,u++){this.debug("matchOne loop");var a=r[u],h=e[o];if(this.debug(r,a,h),a===!1)return!1;if(a===Oe){this.debug("GLOBSTAR",[r,a,h]);var p=o,b=u+1;if(b===c){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!i.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<l;){var g=e[p];if(this.debug(`
14
+ globstar while`,e,p,r,b,g),this.matchOne(e.slice(p),r.slice(b),n))return this.debug("globstar found match!",p,l,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,p,r,b);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug(`
15
+ >>> no match, partial?`,e,p,r,b),p!==l))}let m;if(typeof a=="string"?(m=h===a,this.debug("string match",a,h,m)):(m=a.test(h),this.debug("pattern match",a,h,m)),!m)return!1}if(o===l&&u===c)return!0;if(o===l)return n;if(u===c)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return ho(this.pattern,this.options)}parse(e){Pr(e);const r=this.options;if(e==="**")return Oe;if(e==="")return"";let n,i=null;(n=e.match(cp))?i=r.dot?hp:fp:(n=e.match(ep))?i=(r.nocase?r.dot?ip:np:r.dot?rp:tp)(n[1]):(n=e.match(dp))?i=(r.nocase?r.dot?gp:pp:r.dot?mp:yp)(n):(n=e.match(sp))?i=r.dot?ap:op:(n=e.match(up))&&(i=lp);const s=ye.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const r=this.options,n=r.noglobstar?"[^/]*?":r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(r.nocase?["i"]:[]);let s=e.map((l=>{const c=l.map((a=>{if(a instanceof RegExp)for(const h of a.flags.split(""))i.add(h);return typeof a=="string"?a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):a===Oe?Oe:a._src}));return c.forEach(((a,h)=>{const p=c[h+1],b=c[h-1];a===Oe&&b!==Oe&&(b===void 0?p!==void 0&&p!==Oe?c[h+1]="(?:\\/|"+n+"\\/)?"+p:c[h]=n:p===void 0?c[h-1]=b+"(?:\\/|"+n+")?":p!==Oe&&(c[h-1]=b+"(?:\\/|\\/"+n+"\\/)"+p,c[h+1]=Oe))})),c.filter((a=>a!==Oe)).join("/")})).join("|");const[o,u]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+u+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let u=i.length-2;!o&&u>=0;u--)o=i[u];for(let u=0;u<s.length;u++){const l=s[u];let c=i;if(n.matchBase&&l.length===1&&(c=[o]),this.matchOne(c,l,r))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return de.defaults(e).Minimatch}}function Nn(t){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function se(t,e){const{status:r}=e;if(r===401&&t.digest)return e;if(r>=400)throw Nn(e);return e}function Tt(t,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:t.headers?Hd(t.headers):{},status:t.status,statusText:t.statusText}:e}de.AST=ye,de.Minimatch=Ir,de.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},de.unescape=qt;const bp=(go=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"COPY",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(go.apply(this,t))}catch(r){return Promise.reject(r)}});var go;const wp={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},mo=":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",xp=new RegExp("^["+mo+"]["+mo+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function yo(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const Sr=function(t){return xp.exec(t)!=null};let Pn;Pn=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class ct{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][Pn]={startIndex:r})}static getMetaDataSymbol(){return Pn}}class Ep{constructor(e){this.suppressValidationErr=!e}readDocType(e,r){const n={};if(e[r+3]!=="O"||e[r+4]!=="C"||e[r+5]!=="T"||e[r+6]!=="Y"||e[r+7]!=="P"||e[r+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{r+=9;let i=1,s=!1,o=!1,u="";for(;r<e.length;r++)if(e[r]!=="<"||o)if(e[r]===">"){if(o?e[r-1]==="-"&&e[r-2]==="-"&&(o=!1,i--):i--,i===0)break}else e[r]==="["?s=!0:u+=e[r];else{if(s&&ft(e,"!ENTITY",r)){let l,c;r+=7,[l,c,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(s&&ft(e,"!ELEMENT",r)){r+=8;const{index:l}=this.readElementExp(e,r+1);r=l}else if(s&&ft(e,"!ATTLIST",r))r+=8;else if(s&&ft(e,"!NOTATION",r)){r+=9;const{index:l}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=l}else{if(!ft(e,"!--",r))throw new Error("Invalid DOCTYPE");o=!0}i++,u=""}if(i!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:r}}readEntityExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Wt(n),r=Ae(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(e,r,"entity"),[n,i,--r]}readNotationExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Wt(n),r=Ae(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=Ae(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),e[r=Ae(e,r)]!=='"'&&e[r]!=="'"||([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return[++r,i]}readElementExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!Sr(n))throw new Error(`Invalid element name: "${n}"`);let i="";if(e[r=Ae(e,r)]==="E"&&ft(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ft(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Wt(n),r=Ae(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Wt(i))throw new Error(`Invalid attribute name: "${i}"`);r=Ae(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",e[r=Ae(e,r+=8)]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Wt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=Ae(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=Ae(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const Ae=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ft(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Wt(t){if(Sr(t))return t;throw new Error(`Invalid entity name ${t}`)}const vp=/^[-+]?0x[a-fA-F0-9]+$/,Tp=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Ap={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},Np=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function bo(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class Pp{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,n)=>xo(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>xo(n,16,"&#x")}},this.addExternalEntities=Ip,this.parseXml=Fp,this.parseTextData=Sp,this.resolveNameSpace=Op,this.buildAttributesMap=Rp,this.isItStopNode=Bp,this.replaceEntitiesValue=_p,this.readStopNodeData=$p,this.saveTextToParentTag=Up,this.addChild=Lp,this.ignoreAttributesFn=bo(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function Ip(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function Sp(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues||t.trim()===t?wo(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Op(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Cp=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Rp(t,e){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const r=yo(t,Cp),n=r.length,i={};for(let s=0;s<n;s++){const o=this.resolveNameSpace(r[s][1]);if(this.ignoreAttributesFn(o,e))continue;let u=r[s][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),u!==void 0){this.options.trimValues&&(u=u.trim()),u=this.replaceEntitiesValue(u);const c=this.options.attributeValueProcessor(o,u,e);i[l]=c==null?u:typeof c!=typeof u||c!==u?c:wo(u,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[l]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const s={};return s[this.options.attributesGroupName]=i,s}return i}}const Fp=function(t){t=t.replace(/\r\n?/g,`
16
+ `);const e=new ct("!xml");let r=e,n="",i="";const s=new Ep(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const u=ht(t,">",o,"Closing Tag is not closed.");let l=t.substring(o+2,u).trim();if(this.options.removeNSPrefix){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&(n=this.saveTextToParentTag(n,r,i));const c=i.substring(i.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let a=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(a=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):a=i.lastIndexOf("."),i=i.substring(0,a),r=this.tagsNodeStack.pop(),n="",o=u}else if(t[o+1]==="?"){let u=In(t,o,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&u.tagName==="?xml"||this.options.ignorePiTags)){const l=new ct(u.tagName);l.add(this.options.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&(l[":@"]=this.buildAttributesMap(u.tagExp,i)),this.addChild(r,l,i,o)}o=u.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const u=ht(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const l=t.substring(o+4,u-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}o=u}else if(t.substr(o+1,2)==="!D"){const u=s.readDocType(t,o);this.docTypeEntities=u.entities,o=u.i}else if(t.substr(o+1,2)==="!["){const u=ht(t,"]]>",o,"CDATA is not closed.")-2,l=t.substring(o+9,u);n=this.saveTextToParentTag(n,r,i);let c=this.parseTextData(l,r.tagname,i,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):r.add(this.options.textNodeName,c),o=u+2}else{let u=In(t,o,this.options.removeNSPrefix),l=u.tagName;const c=u.rawTagName;let a=u.tagExp,h=u.attrExpPresent,p=u.closeIndex;if(this.options.transformTagName){const m=this.options.transformTagName(l);a===l&&(a=m),l=m}r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const b=r;b&&this.options.unpairedTags.indexOf(b.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),l!==e.tagname&&(i+=i?"."+l:l);const g=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,l)){let m="";if(a.length>0&&a.lastIndexOf("/")===a.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),o=u.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)o=u.closeIndex;else{const v=this.readStopNodeData(t,c,p+1);if(!v)throw new Error(`Unexpected end of ${c}`);o=v.i,m=v.tagContent}const y=new ct(l);l!==a&&h&&(y[":@"]=this.buildAttributesMap(a,i)),m&&(m=this.parseTextData(m,l,i,!0,h,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),y.add(this.options.textNodeName,m),this.addChild(r,y,i,g)}else{if(a.length>0&&a.lastIndexOf("/")===a.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),this.options.transformTagName){const y=this.options.transformTagName(l);a===l&&(a=y),l=y}const m=new ct(l);l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),i=i.substr(0,i.lastIndexOf("."))}else{const m=new ct(l);this.tagsNodeStack.push(r),l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),r=m}n="",o=p}}else n+=t[o];return e.child};function Lp(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const _p=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Up(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&Object.keys(e[":@"]).length!==0,n))!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Bp(t,e,r,n){return!(!e||!e.has(n))||!(!t||!t.has(r))}function ht(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function In(t,e,r){const n=(function(a,h){let p,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",g="";for(let m=h;m<a.length;m++){let y=a[m];if(p)y===p&&(p="");else if(y==='"'||y==="'")p=y;else if(y===b[0]){if(!b[1])return{data:g,index:m};if(a[m+1]===b[1])return{data:g,index:m}}else y===" "&&(y=" ");g+=y}})(t,e+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!n)return;let i=n.data;const s=n.index,o=i.search(/\s/);let u=i,l=!0;o!==-1&&(u=i.substring(0,o),i=i.substring(o+1).trimStart());const c=u;if(r){const a=u.indexOf(":");a!==-1&&(u=u.substr(a+1),l=u!==n.data.substr(a+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:c}}function $p(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=ht(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=ht(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=ht(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=ht(t,"]]>",r,"StopNode is not closed.")-2;else{const s=In(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function wo(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"||n!=="false"&&(function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s=Object.assign({},Ap,s),!i||typeof i!="string")return i;let o=i.trim();if(s.skipLike!==void 0&&s.skipLike.test(o))return i;if(i==="0")return 0;if(s.hex&&vp.test(o))return(function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(o);if(o.includes("e")||o.includes("E"))return(function(l,c,a){if(!a.eNotation)return l;const h=c.match(Np);if(h){let p=h[1]||"";const b=h[3].indexOf("e")===-1?"E":"e",g=h[2],m=p?l[g.length+1]===b:l[g.length]===b;return g.length>1&&m?l:g.length!==1||!h[3].startsWith(`.${b}`)&&h[3][0]!==b?a.leadingZeros&&!m?(c=(h[1]||"")+h[3],Number(c)):l:Number(c)}return l})(i,o,s);{const l=Tp.exec(o);if(l){const c=l[1]||"",a=l[2];let h=((u=l[3])&&u.indexOf(".")!==-1&&((u=u.replace(/0+$/,""))==="."?u="0":u[0]==="."?u="0"+u:u[u.length-1]==="."&&(u=u.substring(0,u.length-1))),u);const p=c?i[a.length+1]===".":i[a.length]===".";if(!s.leadingZeros&&(a.length>1||a.length===1&&!p))return i;{const b=Number(o),g=String(b);if(b===0)return b;if(g.search(/[eE]/)!==-1)return s.eNotation?b:i;if(o.indexOf(".")!==-1)return g==="0"||g===h||g===`${c}${h}`?b:i;let m=a?h:o;return a?m===g||c+m===g?b:i:m===g||m===c+g?b:i}}return i}var u})(t,r)}return t!==void 0?t:""}function xo(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const Sn=ct.getMetaDataSymbol();function kp(t,e){return Eo(t,e)}function Eo(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=jp(o);let l="";if(l=r===void 0?u:r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=Eo(o[u],e,l);const a=Dp(c,e);o[Sn]!==void 0&&(c[Sn]=o[Sn]),o[":@"]?Mp(c,o[":@"],l,e):Object.keys(c).length!==1||c[e.textNodeName]===void 0||e.alwaysCreateTextNode?Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""):c=c[e.textNodeName],i[u]!==void 0&&i.hasOwnProperty(u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function jp(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function Mp(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function Dp(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return n===0||!(n!==1||!t[r]&&typeof t[r]!="boolean"&&t[r]!==0)}const Vp={allowBooleanAttributes:!1,unpairedTags:[]};function vo(t){return t===" "||t===" "||t===`
17
+ `||t==="\r"}function To(t,e){const r=e;for(;e<t.length;e++)if(!(t[e]!="?"&&t[e]!=" ")){const n=t.substr(r,e-r);if(e>5&&n==="xml")return te("InvalidXml","XML declaration allowed only at the start of the document.",be(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}}return e}function Ao(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}function Hp(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]==='"'||t[e]==="'")n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n===""&&{value:r,index:e,tagClosed:i}}const zp=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function No(t,e){const r=yo(t,zp),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return te("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Gt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return te("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Gt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return te("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Gt(r[i]));const s=r[i][2];if(!Wp(s))return te("InvalidAttr","Attribute '"+s+"' is an invalid name.",Gt(r[i]));if(n.hasOwnProperty(s))return te("InvalidAttr","Attribute '"+s+"' is repeated.",Gt(r[i]));n[s]=1}return!0}function qp(t,e){if(t[++e]===";")return-1;if(t[e]==="#")return(function(n,i){let s=/\d/;for(n[i]==="x"&&(i++,s=/[\da-fA-F]/);i<n.length;i++){if(n[i]===";")return i;if(!n[i].match(s))break}return-1})(t,++e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function te(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Wp(t){return Sr(t)}function be(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Gt(t){return t.startIndex+t[1].length}class Po{constructor(e){this.externalEntities={},this.options=(function(r){return Object.assign({},wp,r)})(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=(function(o,u){u=Object.assign({},Vp,u);const l=[];let c=!1,a=!1;o[0]==="\uFEFF"&&(o=o.substr(1));for(let h=0;h<o.length;h++)if(o[h]==="<"&&o[h+1]==="?"){if(h+=2,h=To(o,h),h.err)return h}else{if(o[h]!=="<"){if(vo(o[h]))continue;return te("InvalidChar","char '"+o[h]+"' is not expected.",be(o,h))}{let p=h;if(h++,o[h]==="!"){h=Ao(o,h);continue}{let b=!1;o[h]==="/"&&(b=!0,h++);let g="";for(;h<o.length&&o[h]!==">"&&o[h]!==" "&&o[h]!==" "&&o[h]!==`
18
+ `&&o[h]!=="\r";h++)g+=o[h];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),h--),!Sr(g)){let v;return v=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",te("InvalidTag",v,be(o,h))}const m=Hp(o,h);if(m===!1)return te("InvalidAttr","Attributes for '"+g+"' have open quote.",be(o,h));let y=m.value;if(h=m.index,y[y.length-1]==="/"){const v=h-y.length;y=y.substring(0,y.length-1);const E=No(y,u);if(E!==!0)return te(E.err.code,E.err.msg,be(o,v+E.err.line));c=!0}else if(b){if(!m.tagClosed)return te("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",be(o,h));if(y.trim().length>0)return te("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",be(o,p));if(l.length===0)return te("InvalidTag","Closing tag '"+g+"' has not been opened.",be(o,p));{const v=l.pop();if(g!==v.tagName){let E=be(o,v.tagStartPos);return te("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+g+"'.",be(o,p))}l.length==0&&(a=!0)}}else{const v=No(y,u);if(v!==!0)return te(v.err.code,v.err.msg,be(o,h-y.length+v.err.line));if(a===!0)return te("InvalidXml","Multiple possible root nodes found.",be(o,h));u.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:p}),c=!0}for(h++;h<o.length;h++)if(o[h]==="<"){if(o[h+1]==="!"){h++,h=Ao(o,h);continue}if(o[h+1]!=="?")break;if(h=To(o,++h),h.err)return h}else if(o[h]==="&"){const v=qp(o,h);if(v==-1)return te("InvalidChar","char '&' is not expected.",be(o,h));h=v}else if(a===!0&&!vo(o[h]))return te("InvalidXml","Extra text at the end",be(o,h));o[h]==="<"&&h--}}}return c?l.length==1?te("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",be(o,l[0].tagStartPos)):!(l.length>0)||te("InvalidXml","Invalid '"+JSON.stringify(l.map((h=>h.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):te("InvalidXml","Start tag expected.",1)})(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new Pp(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:kp(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return ct.getMetaDataSymbol()}}var Gp=H(829),We=H.n(Gp),At=(function(t){return t.Array="array",t.Object="object",t.Original="original",t})(At||{});function Io(t,e){if(!t.endsWith("propstat.prop.displayname"))return e}function Or(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At.Original;const n=We().get(t,e);return r==="array"&&Array.isArray(n)===!1?[n]:r==="object"&&Array.isArray(n)?n[0]:n}function Kt(t,e){return e=e??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[Io]},new Promise((r=>{r((function(n){const{multistatus:i}=n;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(i)?i[0]:i};return We().set(s,"multistatus.response",Or(s,"multistatus.response",At.Array)),We().set(s,"multistatus.response",We().get(s,"multistatus.response").map((o=>(function(u){const l=Object.assign({},u);return l.status?We().set(l,"status",Or(l,"status",At.Object)):(We().set(l,"propstat",Or(l,"propstat",At.Object)),We().set(l,"propstat.prop",Or(l,"propstat.prop",At.Object))),l})(o)))),s})((function(n){let{attributeNamePrefix:i,attributeParsers:s,tagParsers:o}=n;return new Po({allowBooleanAttributes:!0,attributeNamePrefix:i,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(u,l,c){for(const a of s)try{const h=a(c,l);if(h!==l)return h}catch{}return l},tagValueProcessor(u,l,c){for(const a of o)try{const h=a(c,l);if(h!==l)return h}catch{}return l}})})(e).parse(t)))}))}function Cr(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:i="0",resourcetype:s=null,getcontenttype:o=null,getetag:u=null}=t,l=s&&typeof s=="object"&&s.collection!==void 0?"directory":"file",c={filename:e,basename:Tr().basename(e),lastmod:n,size:parseInt(i,10),type:l,etag:typeof u=="string"?u.replace(/"/g,""):null};return l==="file"&&(c.mime=o&&typeof o=="string"?o.split(";")[0]:""),r&&(t.displayname!==void 0&&(t.displayname=String(t.displayname)),c.props=t),c}function Kp(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{t.multistatus.response[0].propstat&&(n=t.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:s}}=n,[o,u,l]=s.split(" ",3),c=parseInt(u,10);if(c>=400){const a=new Error(`Invalid response: ${c} ${l}`);throw a.status=c,a}return Cr(i,Vt(e),r)}function Jp(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function On(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Cn=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,r);return On(ne(i,t),(function(s){return se(t,s),On(s.text(),(function(o){return On(Kt(o,t.parsing),(function(u){const l=Kp(u,e,n);return Tt(s,l,n)}))}))}))}));function So(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Xp=Oo((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(s){if(!s||s==="/")return[];let o=s;const u=[];do u.push(o),o=Tr().dirname(o);while(o&&o!=="/");return u})(Vt(e));n.sort(((s,o)=>s.length>o.length?1:o.length>s.length?-1:0));let i=!1;return(function(s,o,u){if(typeof s[Ro]=="function"){let m=function(y){try{for(;!(l=h.next()).done;)if((y=o(l.value))&&y.then){if(!Fo(y))return void y.then(m,a||(a=we.bind(null,c=new Nt,2)));y=y.v}c?we(c,1,y):c=y}catch(v){we(c||(c=new Nt),2,v)}};var l,c,a,h=s[Ro]();if(m(),h.return){var p=function(y){try{l.done||h.return()}catch{}return y};if(c&&c.then)return c.then(p,(function(y){throw p(y)}));p()}return c}if(!("length"in s))throw new TypeError("Object is not iterable");for(var b=[],g=0;g<s.length;g++)b.push(s[g]);return(function(m,y,v){var E,T,P=-1;return(function S(F){try{for(;++P<m.length&&(!v||!v());)if((F=y(P))&&F.then){if(!Fo(F))return void F.then(S,T||(T=we.bind(null,E=new Nt,2)));F=F.v}E?we(E,1,F):E=F}catch(L){we(E||(E=new Nt),2,L)}})(),E})(b,(function(m){return o(b[m])}),u)})(n,(function(s){return o=function(){return(function(l,c){try{var a=So(Cn(t,s),(function(h){if(h.type!=="directory")throw new Error(`Path includes a file: ${e}`)}))}catch(h){return c(h)}return a&&a.then?a.then(void 0,c):a})(0,(function(l){const c=l;return(function(){if(c.status===404)return i=!0,Co(Rn(t,s,{...r,recursive:!1}));throw l})()}))},(u=(function(){if(i)return Co(Rn(t,s,{...r,recursive:!1}))})())&&u.then?u.then(o):o();var o,u}),(function(){return!1}))}));function Oo(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function Yp(){}function Co(t,e){return t&&t.then?t.then(Yp):Promise.resolve()}const Ro=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function we(t,e,r){if(!t.s){if(r instanceof Nt){if(!r.s)return void(r.o=we.bind(null,t,e));1&e&&(e=r.s),r=r.v}if(r&&r.then)return void r.then(we.bind(null,t,e),we.bind(null,t,2));t.s=e,t.v=r;const n=t.o;n&&n(t)}}const Nt=(function(){function t(){}return t.prototype.then=function(e,r){const n=new t,i=this.s;if(i){const s=1&i?e:r;if(s){try{we(n,1,s(this.v))}catch(o){we(n,2,o)}return n}return this}return this.o=function(s){try{const o=s.v;1&s.s?we(n,1,e?e(o):o):r?we(n,1,r(o)):we(n,2,o)}catch(o){we(n,2,o)}},n},t})();function Fo(t){return t instanceof Nt&&1&t.s}const Rn=Oo((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r.recursive===!0)return Xp(t,e,r);const n=ie({url:G(t.remoteURL,(i=W(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,r);var i;return So(ne(n,t),(function(s){se(t,s)}))}));var Zp=H(388),Lo=H.n(Zp);const Qp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof r.range=="object"&&typeof r.range.start=="number"){let u=`bytes=${r.range.start}-`;typeof r.range.end=="number"&&(u=`${u}${r.range.end}`),n.Range=u}const i=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:n},t,r);return o=function(u){if(se(t,u),n.Range&&u.status!==206){const l=new Error(`Invalid response code for partial request: ${u.status}`);throw l.status=u.status,l}return r.callback&&setTimeout((()=>{r.callback(u)}),0),u.body},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),eg=()=>{},tg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){r.url||(r.url=G(t.remoteURL,W(e)));const n=ie(r,t,{});return s=function(o){return se(t,o),o},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),rg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"DELETE"},t,r);return s=function(o){se(t,o)},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),ng=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,i){try{var s=(o=Cn(t,e,r),u=function(){return!0},l?u?u(o):o:(o&&o.then||(o=Promise.resolve(o)),u?o.then(u):o))}catch(c){return i(c)}var o,u,l;return s&&s.then?s.then(void 0,i):s})(0,(function(n){if(n.status===404)return!1;throw n}))}));function Fn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const ig=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},t,r);return Fn(ne(n,t),(function(i){return se(t,i),Fn(i.text(),(function(s){if(!s)throw new Error("Failed parsing directory contents: Empty response");return Fn(Kt(s,t.parsing),(function(o){const u=qs(e);let l=(function(c,a,h){let p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=Tr().join(a,"/"),{multistatus:{response:m}}=c,y=m.map((v=>{const E=(function(P){try{return P.replace(/^https?:\/\/[^\/]+/,"")}catch(S){throw new me(S,"Failed normalising HREF")}})(v.href),{propstat:{prop:T}}=v;return Cr(T,g==="/"?decodeURIComponent(Vt(E)):Vt(Tr().relative(decodeURIComponent(g),decodeURIComponent(E))),p)}));return b?y:y.filter((v=>v.basename&&(v.type==="file"||v.filename!==h.replace(/\/$/,""))))})(o,qs(t.remoteBasePath||t.remotePath),u,r.details,r.includeSelf);return r.glob&&(l=(function(c,a){return c.filter((h=>de(h.filename,a,{matchBase:!0})))})(l,r.glob)),Tt(i,l,r.details)}))}))}))}));function Ln(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const sg=Ln((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ug]},t,r);return Rr(ne(n,t),(function(i){return se(t,i),Rr(i.text(),(function(s){return Tt(i,s,r.details)}))}))}));function Rr(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const og=Ln((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET"},t,r);return Rr(ne(n,t),(function(i){let s;return se(t,i),(function(o,u){var l=o();return l&&l.then?l.then(u):u()})((function(){return Rr(i.arrayBuffer(),(function(o){s=o}))}),(function(){return Tt(i,s,r.details)}))}))})),ag=Ln((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=r;if(n!=="binary"&&n!=="text")throw new me({info:{code:Xe.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?sg(t,e,r):og(t,e,r)})),ug=t=>t;function lg(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=`
19
+ `),_o(t,e,"",r)}function _o(t,e,r,n){let i="",s=!1;for(let o=0;o<t.length;o++){const u=t[o],l=cg(u);if(l===void 0)continue;let c="";if(c=r.length===0?l:`${r}.${l}`,l===e.textNodeName){let b=u[l];fg(c,e)||(b=e.tagValueProcessor(l,b),b=Bo(b,e)),s&&(i+=n),i+=b,s=!1;continue}if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}if(l[0]==="?"){const b=Uo(u[":@"],e),g=l==="?xml"?"":n;let m=u[l][0][e.textNodeName];m=m.length!==0?" "+m:"",i+=g+`<${l}${m}${b}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=n+`<${l}${Uo(u[":@"],e)}`,p=_o(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=h+">":i+=h+"/>":p&&p.length!==0||!e.suppressEmptyNode?p&&p.endsWith(">")?i+=h+`>${p}${n}</${l}>`:(i+=h+">",p&&n!==""&&(p.includes("/>")||p.includes("</"))?i+=n+e.indentBy+p+n:i+=p,i+=`</${l}>`):i+=h+"/>",s=!0}return i}function cg(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function Uo(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=Bo(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function fg(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function Bo(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}const hg={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Ye(t){this.options=Object.assign({},hg,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=bo(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gg),this.processTextOrObjNode=dg,this.options.format?(this.indentate=pg,this.tagEndChar=`>
20
+ `,this.newLine=`
21
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function dg(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function pg(t){return this.options.indentBy.repeat(t)}function gg(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function mg(t){return new Ye({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build($o({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function $o(t,e){const r={...t};for(const n in r)r.hasOwnProperty(n)&&(r[n]&&typeof r[n]=="object"&&n.indexOf(":")===-1?(r[`${e}:${n}`]=$o(r[n],e),delete r[n]):/^@_/.test(n)===!1&&(r[`${e}:${n}`]=r[n],delete r[n]));return r}function _n(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function ko(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}Ye.prototype.build=function(t){return this.options.preserveOrder?lg(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Ye.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(t[o]===void 0)this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(h!==void 0)if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},Ye.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'},Ye.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),!r&&r!==""||t.indexOf("<")!==-1?this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+s+">"+t+i}},Ye.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Ye.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},Ye.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};const yg=ko((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"UNLOCK",headers:{"Lock-Token":r}},t,n);return _n(ne(i,t),(function(s){if(se(t,s),s.status!==204&&s.status!==200)throw Nn(s)}))})),bg=ko((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:i=wg}=r,s={Accept:"text/plain,application/xml",Timeout:i};n&&(s.If=n);const o=ie({url:G(t.remoteURL,W(e)),method:"LOCK",headers:s,data:mg(t.contactHref)},t,r);return _n(ne(o,t),(function(u){return se(t,u),_n(u.text(),(function(l){const c=(p=l,new Po({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),a=We().get(c,"prop.lockdiscovery.activelock.locktoken.href"),h=We().get(c,"prop.lockdiscovery.activelock.timeout");var p;if(!a)throw Nn(u,"No lock token received: ");return{token:a,serverTimeout:h}}))}))})),wg="Infinite, Second-4100000000";function Un(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const xg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=e.path||"/",n=ie({url:G(t.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return Un(ne(n,t),(function(i){return se(t,i),Un(i.text(),(function(s){return Un(Kt(s,t.parsing),(function(o){const u=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":a,"quota-available-bytes":h}}}=c;return a!==void 0&&h!==void 0?{used:parseInt(String(a),10),available:Jp(h)}:null}catch{}return null})(o);return Tt(i,u,e.details)}))}))}))}));function Bn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Eg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,r);return Bn(ne(i,t),(function(s){return se(t,s),Bn(s.text(),(function(o){return Bn(Kt(o,t.parsing),(function(u){const l=(function(c,a,h){const p={truncated:!1,results:[]};return p.truncated=c.multistatus.response.some((b=>(b.status||b.propstat?.status).split(" ",3)?.[1]==="507"&&b.href.replace(/\/$/,"").endsWith(W(a).replace(/\/$/,"")))),c.multistatus.response.forEach((b=>{if(b.propstat===void 0)return;const g=b.href.split("/").map(decodeURIComponent).join("/");p.results.push(Cr(b.propstat.prop,g,h))})),p})(u,e,n);return Tt(s,l,n)}))}))}))})),vg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"MOVE",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));var Tg=H(172);function Ag(t){if(ro(t))return t.byteLength;if(no(t))return t.length;if(typeof t=="string")return(0,Tg.d)(t);throw new me({info:{code:Xe.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const Ng=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:i=!0,overwrite:s=!0}=n,o={"Content-Type":"application/octet-stream"};i===!1||(o["Content-Length"]=typeof i=="number"?`${i}`:`${Ag(r)}`),s||(o["If-None-Match"]="*");const u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:r},t,n);return c=function(a){try{se(t,a)}catch(h){const p=h;if(p.status!==412||s)throw p;return!1}return!0},(l=ne(u,t))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),jo=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"OPTIONS"},t,r);return s=function(o){try{se(t,o)}catch(u){throw u}return{compliance:(o.headers.get("DAV")??"").split(",").map((u=>u.trim())),server:o.headers.get("Server")??""}},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s}));function Jt(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Pg=$n((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Xe.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/octet-stream","Content-Length":""+(n-r+1),"Content-Range":`bytes ${r}-${n}/*`},u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function Mo(t,e){var r=t();return r&&r.then?r.then(e):e(r)}const Ig=$n((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Xe.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-r+1),"X-Update-Range":`bytes=${r}-${n}`},u=ie({url:G(t.remoteURL,W(e)),method:"PATCH",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function $n(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const Sg=$n((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Jt(jo(t,e,s),(function(o){let u=!1;return Mo((function(){if(o.compliance.includes("sabredav-partialupdate"))return Jt(Ig(t,e,r,n,i,s),(function(l){return u=!0,l}))}),(function(l){let c=!1;return u?l:Mo((function(){if(o.server.includes("Apache")&&o.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Jt(Pg(t,e,r,n,i,s),(function(a){return c=!0,a}))}),(function(a){if(c)return a;throw new me({info:{code:Xe.NotSupported}},"Not supported")}))}))}))})),Og="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Cg(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:r=null,remoteBasePath:n,contactHref:i=Og,ha1:s,headers:o={},httpAgent:u,httpsAgent:l,password:c,token:a,username:h,withCredentials:p}=e;let b=r;b||(b=h||c?Te.Password:Te.None);const g={authType:b,remoteBasePath:n,contactHref:i,ha1:s,headers:Object.assign({},o),httpAgent:u,httpsAgent:l,password:c,parsing:{attributeNamePrefix:e.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[Io]},remotePath:Bd(t),remoteURL:t,token:a,username:h,withCredentials:p};return Zs(g,h,c,a,s),{copyFile:(m,y,v)=>bp(g,m,y,v),createDirectory:(m,y)=>Rn(g,m,y),createReadStream:(m,y)=>(function(v,E){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const P=new(Lo()).PassThrough;return Qp(v,E,T).then((S=>{S.pipe(P)})).catch((S=>{P.emit("error",S)})),P})(g,m,y),createWriteStream:(m,y,v)=>(function(E,T){let P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:eg;const F=new(Lo()).PassThrough,L={};P.overwrite===!1&&(L["If-None-Match"]="*");const U=ie({url:G(E.remoteURL,W(T)),method:"PUT",headers:L,data:F,maxRedirects:0},E,P);return ne(U,E).then((_=>se(E,_))).then((_=>{setTimeout((()=>{S(_)}),0)})).catch((_=>{F.emit("error",_)})),F})(g,m,y,v),customRequest:(m,y)=>tg(g,m,y),deleteFile:(m,y)=>rg(g,m,y),exists:(m,y)=>ng(g,m,y),getDirectoryContents:(m,y)=>ig(g,m,y),getFileContents:(m,y)=>ag(g,m,y),getFileDownloadLink:m=>(function(y,v){let E=G(y.remoteURL,W(v));const T=/^https:/i.test(E)?"https":"http";switch(y.authType){case Te.None:break;case Te.Password:{const P=Js(y.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${P}@`);break}default:throw new me({info:{code:Xe.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${y.authType}`)}return E})(g,m),getFileUploadLink:m=>(function(y,v){let E=`${G(y.remoteURL,W(v))}?Content-Type=application/octet-stream`;const T=/^https:/i.test(E)?"https":"http";switch(y.authType){case Te.None:break;case Te.Password:{const P=Js(y.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${P}@`);break}default:throw new me({info:{code:Xe.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${y.authType}`)}return E})(g,m),getHeaders:()=>Object.assign({},g.headers),getQuota:m=>xg(g,m),lock:(m,y)=>bg(g,m,y),moveFile:(m,y,v)=>vg(g,m,y,v),putFileContents:(m,y,v)=>Ng(g,m,y,v),partialUpdateFileContents:(m,y,v,E,T)=>Sg(g,m,y,v,E,T),getDAVCompliance:m=>jo(g,m),search:(m,y)=>Eg(g,m,y),setHeaders:m=>{g.headers=Object.assign({},m)},stat:(m,y)=>Cn(g,m,y),unlock:(m,y,v)=>yg(g,m,y,v),registerAttributeParser:m=>{g.parsing.attributeParsers.push(m)},registerTagParser:m=>{g.parsing.tagParsers.push(m)}}}const ue=[];for(let t=0;t<256;++t)ue.push((t+256).toString(16).slice(1));function Rg(t,e=0){return(ue[t[e+0]]+ue[t[e+1]]+ue[t[e+2]]+ue[t[e+3]]+"-"+ue[t[e+4]]+ue[t[e+5]]+"-"+ue[t[e+6]]+ue[t[e+7]]+"-"+ue[t[e+8]]+ue[t[e+9]]+"-"+ue[t[e+10]]+ue[t[e+11]]+ue[t[e+12]]+ue[t[e+13]]+ue[t[e+14]]+ue[t[e+15]]).toLowerCase()}let kn;const Fg=new Uint8Array(16);function Lg(){if(!kn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");kn=crypto.getRandomValues.bind(crypto)}return kn(Fg)}var Do={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _g(t,e,r){t=t||{};const n=t.random??t.rng?.()??Lg();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Rg(n)}function Ug(t,e,r){return Do.randomUUID&&!t?Do.randomUUID():_g(t)}const jn=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>e.includes(r)?[r,n||""]:[st.DavNamespace.includes(r)?`d:${r}`:`oc:${r}`,n||""])),Vo=(t=[],{pattern:e,filterRules:r,limit:n=0,extraProps:i=[]})=>{let s="d:propfind";e&&(s="oc:search-files"),r&&(s="oc:filter-files");const o=t.reduce((a,h)=>Object.assign(a,{[h]:null}),{}),u=jn(o,i),l={[s]:{"d:prop":u,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...e&&{"oc:search":{"oc:pattern":e,"oc:limit":n}},...r&&{"oc:filter-rules":jn(r,[])}}};return new ze({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(l)},Bg=t=>{const e={"d:propertyupdate":{"d:set":{"d:prop":jn(t,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new ze({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},$g=t=>{const e={},r=t.get("tus-version");return r?(e.version=r.split(","),t.get("tus-extension")&&(e.extension=t.get("tus-extension").split(",")),t.get("tus-resumable")&&(e.resumable=t.get("tus-resumable")),t.get("tus-max-size")&&(e.maxSize=parseInt(t.get("tus-max-size"),10)),e):null},kg=async t=>{const e=n=>{const i=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?k(i.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):i};return(await Kt(t)).multistatus.response.map(({href:n,propstat:i})=>{const s={...Cr(i.prop,e(n),!0),processing:i.status==="HTTP/1.1 425 TOO EARLY"};return s.props.name&&(s.props.name=s.props.name.toString()),s})},jg=t=>{const e=new js,r={message:"Unknown error",errorCode:void 0};try{const n=e.parse(t);if(!n["d:error"])return r;if(n["d:error"]["s:message"]){const i=n["d:error"]["s:message"];typeof i=="string"&&(r.message=i)}if(n["d:error"]["s:errorcode"]){const i=n["d:error"]["s:errorcode"];typeof i=="string"&&(r.errorCode=i)}}catch{return r}return r};class Mg{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:r}){this.davPath=k(e,"remote.php/dav"),this.client=Cg(this.davPath,{}),this.headers=r,this.extraProps=[]}mkcol(e,r={}){return this.request(e,{method:Ve.mkcol,...r})}async propfind(e,{depth:r=1,properties:n=[],headers:i={},...s}={}){const o={...i,Depth:r.toString()},{body:u,result:l}=await this.request(e,{method:Ve.propfind,data:Vo(n,{extraProps:this.extraProps}),headers:o,...s});return u?.length&&(u[0].tusSupport=$g(l.headers)),u}async report(e,{pattern:r="",filterRules:n=null,limit:i=30,properties:s,...o}={}){const{body:u,result:l}=await this.request(e,{method:Ve.report,data:Vo(s,{pattern:r,filterRules:n,limit:i,extraProps:this.extraProps}),...o});return{results:u,range:l.headers.get("content-range")}}copy(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=k(this.davPath,cr(r));return this.request(e,{method:Ve.copy,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}move(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=k(this.davPath,cr(r));return this.request(e,{method:Ve.move,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}put(e,r,{headers:n={},onUploadProgress:i,previousEntityTag:s,overwrite:o,...u}={}){const l={...n};return s?l["If-Match"]=s:o||(l["If-None-Match"]="*"),this.request(e,{method:Ve.put,data:r,headers:l,onUploadProgress:i,...u})}delete(e,r={}){return this.request(e,{method:Ve.delete,...r})}propPatch(e,r,n={}){const i=Bg(r);return this.request(e,{method:Ve.proppatch,data:i,...n})}getFileUrl(e){return k(this.davPath,cr(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":Ug(),...this.headers&&{...this.headers()},...e}}async request(e,r){const n=k(this.davPath,cr(e),{leadingSlash:!0}),i={...r,url:n,headers:this.buildHeaders(r.headers||{})};try{const s=await this.client.customRequest("",i);let o;if(s.status===207){const u=await s.text();o=await kg(u)}return{body:o,status:s.status,result:s}}catch(s){const{response:o}=s,u=await o.text(),l=jg(u);throw new Yu(l.message,l.errorCode,o,o.status)}}}const Dg=(t,e)=>({async listFileVersions(r,n={}){const[i,...s]=await t.propfind(k("meta",r,"v",{leadingSlash:!0}),n);return s.map(o=>xt(o,t.extraProps))}}),Vg=(t,e)=>({setFavorite(r,{path:n},i,s={}){const o={[C.IsFavorite]:i?"true":"false"};return t.propPatch(k(r.webDavPath,n),o,s)}}),Hg=(t,e)=>({listFavoriteFiles({davProperties:r=st.Default,username:n="",...i}={}){return t.report(k("files",n),{properties:r,filterRules:{favorite:1},...i})}}),zg=(t,e)=>{const r=Q.create();e&&r.interceptors.request.use(R=>(Object.assign(R.headers,e()),R));const n={axiosClient:r,baseUrl:t},i=new Mg({baseUrl:t,headers:e}),s=R=>{i.extraProps.push(R)},o=Rd(i),{getPathForFileId:u}=o,l=Td(i,o),{listFiles:c}=l,a=xd(l),{getFileInfo:h}=a,{createFolder:p}=bd(i,a),b=wd(i,n),{getFileContents:g}=b,{putFileContents:m}=Nd(i,a),{getFileUrl:y,revokeUrl:v}=Ed(i,b,a,n),{getPublicFileUrl:E}=vd(i),{copyFiles:T}=yd(i),{moveFiles:P}=Ad(i),{deleteFile:S}=Pd(i),{restoreFile:F}=Id(i),{listFileVersions:L}=Dg(i),{restoreFileVersion:U}=Sd(i),{clearTrashBin:_}=Od(i),{search:j}=Cd(i),{listFavoriteFiles:pe}=Hg(i),{setFavorite:oe}=Vg(i);return{copyFiles:T,createFolder:p,deleteFile:S,restoreFile:F,restoreFileVersion:U,getFileContents:g,getFileInfo:h,getFileUrl:y,getPublicFileUrl:E,getPathForFileId:u,listFiles:c,listFileVersions:L,moveFiles:P,putFileContents:m,revokeUrl:v,clearTrashBin:_,search:j,listFavoriteFiles:pe,setFavorite:oe,registerExtraProp:s}};let Xt;self.onmessage=async t=>{const{topic:e,data:r}=JSON.parse(t.data);if(e==="tokenUpdate"&&Xt){Xt.Authorization?.toString().startsWith("Bearer")&&(Xt.Authorization=r.accessToken);return}const{baseUrl:n,headers:i,space:s,resources:o,concurrentRequests:u}=r;Xt=i;const l=zg(n,()=>Xt),c=[],a=[],h=new ia({concurrency:u}),p=g=>e==="fileListDelete"?l.deleteFile(s,{path:g.path}):l.clearTrashBin(s,{id:g.id}),b=o.map(g=>h.add(async()=>{try{const{status:m}=await p(g);if(m===204){c.push(g);return}if(m===423){const{status:y}=await p(g);if(y===204){c.push(g);return}}}catch(m){console.error(m),a.push({resource:g,message:m.message,statusCode:m.statusCode,xReqId:m.response.headers?.get("x-request-id")})}}));await Promise.allSettled(b),postMessage(JSON.stringify({successful:c,failed:a}))}})();