← Back
Editing: mail.6886.bbc5209e62184599579a.js
/*! For license information please see mail.6886.bbc5209e62184599579a.js.LICENSE.txt */ (globalThis.webpackChunknextcloud_mail=globalThis.webpackChunknextcloud_mail||[]).push([[6886],{36117(t,e){var n,r;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(t){"use strict";function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}function n(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var s=r(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function p(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,d(t,e,"get"))}function f(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,d(t,e,"set"),n),n}function d(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0,t.cancelable=w,t.default=void 0,t.isCancelablePromise=T;var g="undefined"!=typeof Symbol?Symbol.toStringTag:"@@toStringTag",m=new WeakMap,E=new WeakMap,v=function(){function t(e){var n=e.executor,r=void 0===n?function(){}:n,i=e.internals,o=void 0===i?{isCanceled:!1,onCancelList:[]}:i,s=e.promise,c=void 0===s?new Promise((function(t,e){return r(t,e,(function(t){o.onCancelList.push(t)}))})):s;a(this,t),h(this,m,{writable:!0,value:void 0}),h(this,E,{writable:!0,value:void 0}),l(this,g,"CancelablePromise"),this.cancel=this.cancel.bind(this),f(this,m,o),f(this,E,c||new Promise((function(t,e){return r(t,e,(function(t){o.onCancelList.push(t)}))})))}return u(t,[{key:"then",value:function(t,e){return A(p(this,E).then(N(t,p(this,m)),N(e,p(this,m))),p(this,m))}},{key:"catch",value:function(t){return A(p(this,E).catch(N(t,p(this,m))),p(this,m))}},{key:"finally",value:function(t,e){var n=this;return e&&p(this,m).onCancelList.push(t),A(p(this,E).finally(N((function(){if(t)return e&&(p(n,m).onCancelList=p(n,m).onCancelList.filter((function(e){return e!==t}))),t()}),p(this,m))),p(this,m))}},{key:"cancel",value:function(){p(this,m).isCanceled=!0;var t=p(this,m).onCancelList;p(this,m).onCancelList=[];var e,n=o(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("function"==typeof r)try{r()}catch(t){console.error(t)}}}catch(t){n.e(t)}finally{n.f()}}},{key:"isCanceled",value:function(){return!0===p(this,m).isCanceled}}]),t}(),y=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&e(t,n)}(i,t);var r=n(i);function i(t){return a(this,i),r.call(this,{executor:t})}return u(i)}(v);t.CancelablePromise=y,l(y,"all",(function(t){return I(t,Promise.all(t))})),l(y,"allSettled",(function(t){return I(t,Promise.allSettled(t))})),l(y,"any",(function(t){return I(t,Promise.any(t))})),l(y,"race",(function(t){return I(t,Promise.race(t))})),l(y,"resolve",(function(t){return w(Promise.resolve(t))})),l(y,"reject",(function(t){return w(Promise.reject(t))})),l(y,"isCancelable",T);var b=y;function w(t){return A(t,{isCanceled:!1,onCancelList:[]})}function T(t){return t instanceof y||t instanceof v}function N(t,e){if(t)return function(n){if(!e.isCanceled){var r=t(n);return T(r)&&e.onCancelList.push(r.cancel),r}return n}}function A(t,e){return new v({internals:e,promise:t})}function I(t,e){var n={isCanceled:!1,onCancelList:[]};return n.onCancelList.push((function(){var e,n=o(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;T(r)&&r.cancel()}}catch(t){n.e(t)}finally{n.f()}})),new v({internals:n,promise:e})}t.default=b},void 0===(r=n.apply(e,[e]))||(t.exports=r)},92861(t,e,n){var r=n(48287),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},83141(t,e,n){"use strict";var r=n(92861).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=s(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=s(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},87485(t,e,n){"use strict";n.d(e,{F:()=>i});var r=n(81222);function i(){try{return(0,r.C)("core","capabilities")}catch(t){return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}},73713(t,e,n){"use strict";n.d(e,{pt:()=>vr,di:()=>pi,nF:()=>hi,aX:()=>yr,H4:()=>$r,VL:()=>Cr,R3:()=>Rr,Al:()=>Fr,lJ:()=>Lr,v7:()=>mi,Q$:()=>jr,Yc:()=>_r,ur:()=>vi,KT:()=>fi});var r=n(21777),i=n(81222);function o(){return(0,i.C)("files_sharing","isPublic",null)??null!==document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')}var s=n(63814),a=n(36117),c=n(65606),u={2:t=>{function e(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var o=r(t,e,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+t.length,o[1]),post:i.slice(o[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,i,o,s,a,c=n.indexOf(t),u=n.indexOf(e,c+1),l=c;if(c>=0&&u>0){for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(t,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())<o&&(o=i,s=u),u=n.indexOf(e,l+1)),l=c<u&&c>=0?c:u;r.length&&(a=[o,s])}return a}t.exports=e,e.range=r},47:(t,e,n)=>{var r=n(410),i=function(t){return"string"==typeof t};function o(t,e){for(var n=[],r=0;r<t.length;r++){var i=t[r];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():e&&n.push(".."):n.push(i))}return n}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function u(t){return s.exec(t).slice(1)}a.resolve=function(){for(var t="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var r=n>=0?arguments[n]:c.cwd();if(!i(r))throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e="/"===r.charAt(0))}return(e?"/":"")+(t=o(t.split("/"),!e).join("/"))||"."},a.normalize=function(t){var e=a.isAbsolute(t),n="/"===t.substr(-1);return(t=o(t.split("/"),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t},a.isAbsolute=function(t){return"/"===t.charAt(0)},a.join=function(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];if(!i(n))throw new TypeError("Arguments to path.join must be strings");n&&(t+=t?"/"+n:n)}return a.normalize(t)},a.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=a.resolve(t).substr(1),e=a.resolve(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),o=Math.min(r.length,i.length),s=o,c=0;c<o;c++)if(r[c]!==i[c]){s=c;break}var u=[];for(c=s;c<r.length;c++)u.push("..");return(u=u.concat(i.slice(s))).join("/")},a._makeLong=function(t){return t},a.dirname=function(t){var e=u(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},a.basename=function(t,e){var n=u(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},a.extname=function(t){return u(t)[3]},a.format=function(t){if(!r.isObject(t))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof t);var e=t.root||"";if(!i(e))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof t.root);return(t.dir?t.dir+a.sep:"")+(t.base||"")},a.parse=function(t){if(!i(t))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=u(t);if(!e||4!==e.length)throw new TypeError("Invalid path '"+t+"'");return e[1]=e[1]||"",e[2]=e[2]||"",e[3]=e[3]||"",{root:e[0],dir:e[0]+e[1].slice(0,e[1].length-1),base:e[2],ext:e[3],name:e[2].slice(0,e[2].length-e[3].length)}},a.sep="/",a.delimiter=":",t.exports=a},101:function(t,e,n){var r;t=n.nmd(t),function(){var i=(t&&t.exports,"object"==typeof globalThis&&globalThis);i.global!==i&&i.window;var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var s=function(t){throw new o(t)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,o=t.length%3,c="",u=-1,l=t.length-o;++u<l;)e=t.charCodeAt(u)<<16,n=t.charCodeAt(++u)<<8,r=t.charCodeAt(++u),c+=a.charAt((i=e+n+r)>>18&63)+a.charAt(i>>12&63)+a.charAt(i>>6&63)+a.charAt(63&i);return 2==o?(e=t.charCodeAt(u)<<8,n=t.charCodeAt(++u),c+=a.charAt((i=e+n)>>10)+a.charAt(i>>4&63)+a.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(u),c+=a.charAt(i>>2)+a.charAt(i<<4&63)+"=="),c},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",u=-1;++u<e;)r=a.indexOf(t.charAt(u)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return u}.call(e,n,e,t))||(t.exports=r)}()},135:t=>{function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},172:(t,e)=>{e.d=function(t){if(!t)return 0;for(var e=(t=t.toString()).length,n=t.length;n--;){var r=t.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?e++:2047<r&&r<=65535&&(e+=2)}return e}},285:(t,e,n)=>{var r=n(2);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),m(function(t){return t.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(l)):[]};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(i).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function h(t){if(!t)return[""];var e=[],n=r("{","}",t);if(!n)return t.split(",");var i=n.pre,o=n.body,s=n.post,a=i.split(",");a[a.length-1]+="{"+o+"}";var c=h(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function p(t){return"{"+t+"}"}function f(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var n=[],i=r("{","}",t);if(!i)return[t];var o=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c<a.length;c++){var l=o+"{"+i.body+"}"+a[c];n.push(l)}else{var E,v,y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),b=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=y||b,T=i.body.indexOf(",")>=0;if(!w&&!T)return i.post.match(/,(?!,).*\}/)?m(t=i.pre+"{"+i.body+s+i.post):[t];if(w)E=i.body.split(/\.\./);else if(1===(E=h(i.body)).length&&1===(E=m(E[0],!1).map(p)).length)return a.map((function(t){return i.pre+E[0]+t}));if(w){var N=u(E[0]),A=u(E[1]),I=Math.max(E[0].length,E[1].length),O=3==E.length?Math.abs(u(E[2])):1,x=d;A<N&&(O*=-1,x=g);var _=E.some(f);v=[];for(var P=N;x(P,A);P+=O){var S;if(b)"\\"===(S=String.fromCharCode(P))&&(S="");else if(S=String(P),_){var C=I-S.length;if(C>0){var R=new Array(C+1).join("0");S=P<0?"-"+R+S.slice(1):R+S}}v.push(S)}}else{v=[];for(var L=0;L<E.length;L++)v.push.apply(v,m(E[L],!1))}for(L=0;L<v.length;L++)for(c=0;c<a.length;c++)l=o+v[L]+a[c],(!e||w||l)&&n.push(l)}return n}},298:t=>{var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?n.push(e.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return n}},t.exports=n},345:()=>{},388:()=>{},410:()=>{},526:t=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=e},542:(t,e,n)=>{!function(){var e=n(298),r=n(526).utf8,i=n(135),o=n(526).bin,s=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var a=e.bytesToWords(t),c=8*t.length,u=1732584193,l=-271733879,h=-1732584194,p=271733878,f=0;f<a.length;f++)a[f]=16711935&(a[f]<<8|a[f]>>>24)|4278255360&(a[f]<<24|a[f]>>>8);a[c>>>5]|=128<<c%32,a[14+(c+64>>>9<<4)]=c;var d=s._ff,g=s._gg,m=s._hh,E=s._ii;for(f=0;f<a.length;f+=16){var v=u,y=l,b=h,w=p;u=d(u,l,h,p,a[f+0],7,-680876936),p=d(p,u,l,h,a[f+1],12,-389564586),h=d(h,p,u,l,a[f+2],17,606105819),l=d(l,h,p,u,a[f+3],22,-1044525330),u=d(u,l,h,p,a[f+4],7,-176418897),p=d(p,u,l,h,a[f+5],12,1200080426),h=d(h,p,u,l,a[f+6],17,-1473231341),l=d(l,h,p,u,a[f+7],22,-45705983),u=d(u,l,h,p,a[f+8],7,1770035416),p=d(p,u,l,h,a[f+9],12,-1958414417),h=d(h,p,u,l,a[f+10],17,-42063),l=d(l,h,p,u,a[f+11],22,-1990404162),u=d(u,l,h,p,a[f+12],7,1804603682),p=d(p,u,l,h,a[f+13],12,-40341101),h=d(h,p,u,l,a[f+14],17,-1502002290),u=g(u,l=d(l,h,p,u,a[f+15],22,1236535329),h,p,a[f+1],5,-165796510),p=g(p,u,l,h,a[f+6],9,-1069501632),h=g(h,p,u,l,a[f+11],14,643717713),l=g(l,h,p,u,a[f+0],20,-373897302),u=g(u,l,h,p,a[f+5],5,-701558691),p=g(p,u,l,h,a[f+10],9,38016083),h=g(h,p,u,l,a[f+15],14,-660478335),l=g(l,h,p,u,a[f+4],20,-405537848),u=g(u,l,h,p,a[f+9],5,568446438),p=g(p,u,l,h,a[f+14],9,-1019803690),h=g(h,p,u,l,a[f+3],14,-187363961),l=g(l,h,p,u,a[f+8],20,1163531501),u=g(u,l,h,p,a[f+13],5,-1444681467),p=g(p,u,l,h,a[f+2],9,-51403784),h=g(h,p,u,l,a[f+7],14,1735328473),u=m(u,l=g(l,h,p,u,a[f+12],20,-1926607734),h,p,a[f+5],4,-378558),p=m(p,u,l,h,a[f+8],11,-2022574463),h=m(h,p,u,l,a[f+11],16,1839030562),l=m(l,h,p,u,a[f+14],23,-35309556),u=m(u,l,h,p,a[f+1],4,-1530992060),p=m(p,u,l,h,a[f+4],11,1272893353),h=m(h,p,u,l,a[f+7],16,-155497632),l=m(l,h,p,u,a[f+10],23,-1094730640),u=m(u,l,h,p,a[f+13],4,681279174),p=m(p,u,l,h,a[f+0],11,-358537222),h=m(h,p,u,l,a[f+3],16,-722521979),l=m(l,h,p,u,a[f+6],23,76029189),u=m(u,l,h,p,a[f+9],4,-640364487),p=m(p,u,l,h,a[f+12],11,-421815835),h=m(h,p,u,l,a[f+15],16,530742520),u=E(u,l=m(l,h,p,u,a[f+2],23,-995338651),h,p,a[f+0],6,-198630844),p=E(p,u,l,h,a[f+7],10,1126891415),h=E(h,p,u,l,a[f+14],15,-1416354905),l=E(l,h,p,u,a[f+5],21,-57434055),u=E(u,l,h,p,a[f+12],6,1700485571),p=E(p,u,l,h,a[f+3],10,-1894986606),h=E(h,p,u,l,a[f+10],15,-1051523),l=E(l,h,p,u,a[f+1],21,-2054922799),u=E(u,l,h,p,a[f+8],6,1873313359),p=E(p,u,l,h,a[f+15],10,-30611744),h=E(h,p,u,l,a[f+6],15,-1560198380),l=E(l,h,p,u,a[f+13],21,1309151649),u=E(u,l,h,p,a[f+4],6,-145523070),p=E(p,u,l,h,a[f+11],10,-1120210379),h=E(h,p,u,l,a[f+2],15,718787259),l=E(l,h,p,u,a[f+9],21,-343485551),u=u+v>>>0,l=l+y>>>0,h=h+b>>>0,p=p+w>>>0}return e.endian([u,l,h,p])};s._ff=function(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._gg=function(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._hh=function(t,e,n,r,i,o,s){var a=t+(e^n^r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._ii=function(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(s(t,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):e.bytesToHex(r)}}()},647:(t,e)=>{var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,s=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;s.push(o+"="+r)}return s.length?e+s.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),s=r(e[2]);null===o||null===s||o in i||(i[o]=s)}return i}},670:t=>{t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},737:(t,e,n)=>{var r=n(670),i=n(647),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function h(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function d(t){var e,n=("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).location||{},r={},i=typeof(t=t||n);if("blob:"===t.protocol)r=new E(unescape(t.pathname),{});else if("string"===i)for(e in r=new E(t,{}),f)delete r[e];else if("object"===i){for(e in t)e in f||(r[e]=t[e]);void 0===r.slashes&&(r.slashes=a.test(t.href))}return r}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function m(t,e){t=(t=h(t)).replace(s,""),e=e||{};var n,r=u.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===i?c>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):c>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:c,rest:n}}function E(t,e,n){if(t=(t=h(t)).replace(s,""),!(this instanceof E))return new E(t,e,n);var o,a,c,u,f,v,y=p.slice(),b=typeof e,w=this,T=0;for("object"!==b&&"string"!==b&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(a=m(t||"",e=d(e))).protocol&&!a.slashes,w.slashes=a.slashes||o&&e.slashes,w.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||l.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(w.protocol)))&&(y[3]=[/(.*)/,"pathname"]);T<y.length;T++)"function"!=typeof(u=y[T])?(c=u[0],v=u[1],c!=c?w[v]=t:"string"==typeof c?~(f="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(w[v]=t.slice(0,f),t=t.slice(f+u[2])):(w[v]=t.slice(f),t=t.slice(0,f))):(f=c.exec(t))&&(w[v]=f[1],t=t.slice(0,f.index)),w[v]=w[v]||o&&u[3]&&e[v]||"",u[4]&&(w[v]=w[v].toLowerCase())):t=u(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),s++):s&&(0===r&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(f=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,f),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(f+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}E.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,c.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var s="pathname"===t?"/":"#";o[t]=e.charAt(0)!==s?s+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(o.username=e.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<p.length;u++){var l=p[u];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(s+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),s+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(s+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(s+=n.hash),s}},E.extractProtocol=m,E.location=d,E.trimLeft=h,E.qs=i,t.exports=E},800:()=>{},805:()=>{},829:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,s)}function s(){return r(t,arguments,o(this).constructor)}return s.prototype=Object.create(t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),i(s,t)},n(t)}function r(t,e,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o},r.apply(null,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}var s=function(t){function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}(this,o(n).call(this,t))).name="ObjectPrototypeMutationError",r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=n.split("."),o=i.length,s=function(e){var n=i[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,o){var s=i.slice(e+1);return s.length>0?a(n,s.join("."),r):r(t,o,i,e)}))};var o=i.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}t=r(t,n,i,e)},c=0;c<o;c++){var u=s(c);if("object"===e(u))return u.v}return t}function c(t,e){return t.length===e+1}t.exports={set:function(t,n,r){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n]=r,t[n];try{return a(t,n,(function(t,e,n,i){if(t===Reflect.getPrototypeOf({}))throw new s("Attempting to mutate Object.prototype");if(!t[e]){var o=Number.isInteger(Number(n[i+1])),a="+"===n[i+1];t[e]=o||a?[]:{}}return c(n,i)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof s)throw e;return t}},get:function(t,n){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n];try{return a(t,n,(function(t,e){return t[e]}))}catch(e){return t}},has:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in t;try{var i=!1;return a(t,n,(function(t,e,n,o){if(!c(n,o))return t&&t[e];i=r.own?t.hasOwnProperty(e):e in t})),i}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;try{var o=!1,s=!1;return a(t,n,(function(t,n,i,a){return o=o||t===r||!!t&&t[n]===r,s=c(i,a)&&"object"===e(t)&&n in t,t&&t[n]})),i.validPath?o&&s:o}catch(t){return!1}},ObjectPrototypeMutationError:s}}},l={};function h(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={id:t,loaded:!1,exports:{}};return u[t].call(n.exports,n,n.exports,h),n.loaded=!0,n.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 n in e)h.o(e,n)&&!h.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var p=h(737),f=h.n(p);function d(t){if(!g(t))throw new Error("Parameter was not an error")}function g(t){return!!t&&"object"==typeof t&&"[object Error]"===(e=t,Object.prototype.toString.call(e))||t instanceof Error;var e}class m extends Error{constructor(t,e){const n=[...arguments],{options:r,shortMessage:i}=function(t){let e,n="";if(0===t.length)e={};else if(g(t[0]))e={cause:t[0]},n=t.slice(1).join(" ")||"";else if(t[0]&&"object"==typeof t[0])e=Object.assign({},t[0]),n=t.slice(1).join(" ")||"";else{if("string"!=typeof t[0])throw new Error("Invalid arguments passed to Layerr");e={},n=n=t.join(" ")||""}return{options:e,shortMessage:n}}(n);let o=i;if(r.cause&&(o=`${o}: ${r.cause.message}`),super(o),this.message=o,r.name&&"string"==typeof r.name?this.name=r.name:this.name="Layerr",r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&"object"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const t=r.constructorOpt||this.constructor;Error.captureStackTrace(this,t)}}static cause(t){return d(t),t._cause&&g(t._cause)?t._cause:null}static fullStack(t){d(t);const e=m.cause(t);return e?`${t.stack}\ncaused by: ${m.fullStack(e)}`:t.stack??""}static info(t){d(t);const e={},n=m.cause(t);return n&&Object.assign(e,m.info(n)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var E=h(47),v=h.n(E);const y="__PATH_SEPARATOR_POSIX__",b="__PATH_SEPARATOR_WINDOWS__";function w(t){try{const e=t.replace(/\//g,y).replace(/\\\\/g,b);return encodeURIComponent(e).split(b).join("\\\\").split(y).join("/")}catch(t){throw new m(t,"Failed encoding path")}}function T(t){return t.startsWith("/")?t:"/"+t}function N(t){let e=t;return"/"!==e[0]&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function A(t){let e=new(f())(t).pathname;return e.length<=0&&(e="/"),N(e)}function I(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(){return function(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(e.reduce(((t,e,n)=>((0===n||"/"!==e||"/"===e&&"/"!==t[t.length-1])&&t.push(e),t)),[]))}var O=h(542),x=h.n(O);function _(t,e){const n=t.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",s=`00000000${e.nc}`.slice(-8),a=function(t,e,n,r,i,o,s){const a=s||x()(`${e}:${n}:${r}`);return t&&"md5-sess"===t.toLowerCase()?x()(`${a}:${i}:${o}`):a}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),c=x()(`${i}:${r}`),u=o?x()(`${a}:${e.nonce}:${s}:${e.cnonce}:${o}:${c}`):x()(`${a}:${e.nonce}:${c}`),l={username:e.username,realm:e.realm,nonce:e.nonce,uri:r,qop:o,response:u,nc:s,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const t in l)l[t]&&("qop"===t||"nc"===t||"algorithm"===t?h.push(`${t}=${l[t]}`):h.push(`${t}="${l[t]}"`));return`Digest ${h.join(", ")}`}function P(t){return"digest"===(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var S=h(101),C=h.n(S);function R(t){return C().decode(t)}function L(t,e){var n;return`Basic ${n=`${t}:${e}`,C().encode(n)}`}const D="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,$=D.fetch.bind(D);D.Headers,D.Request,D.Response;let j=function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t}({}),F=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 U(t,e,n,r,i){switch(t.authType){case j.Auto:e&&n&&(t.headers.Authorization=L(e,n));break;case j.Digest:t.digest=function(t,e,n){return{username:t,password:e,ha1:n,nc:0,algorithm:"md5",hasDigestAuth:!1}}(e,n,i);break;case j.None:break;case j.Password:t.headers.Authorization=L(e,n);break;case j.Token:t.headers.Authorization=`${(o=r).token_type} ${o.access_token}`;break;default:throw new m({info:{code:F.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var o}h(345),h(800);const M="@@HOTPATCHER",k=()=>{};function B(t){return{original:t,methods:[t],final:!1}}class G{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=M}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||t.__type__!==M)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?e&&(this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||k;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e(...r)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=n;const o=this;for(;e.length>0;)i=[e.shift().apply(o,i)];return i[0]}}(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:r=!1}=n;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if("function"!=typeof e)throw new Error(`Failed patching '${t}': Provided method is not a function`);if(r)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=B(e);else if(this.isPatched(t)){const{original:n}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(B(e),{original:n})}else this.configuration.registry[t]=B(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this.execute(t,...r)}plugin(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((e=>{this.patch(t,e,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if("function"!=typeof this.configuration.registry[t].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let V=null;function W(){return V||(V=new G),V}function X(t){return function(t){if("object"!=typeof t||null===t||"[object Object]"!=Object.prototype.toString.call(t))return!1;if(null===Object.getPrototypeOf(t))return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=null,i=[...e];for(;i.length>0;){const t=i.shift();r=r?z(r,t):X(t)}return r}function z(t,e){const n=X(t);return Object.keys(e).forEach((t=>{n.hasOwnProperty(t)?Array.isArray(e[t])?n[t]=Array.isArray(n[t])?[...n[t],...e[t]]:[...e[t]]:"object"==typeof e[t]&&e[t]?n[t]="object"==typeof n[t]&&n[t]?z(n[t],e[t]):X(e[t]):n[t]=e[t]:n[t]=e[t]})),n}function H(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}function Y(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)return{};const r={};return e.reduce(((t,e)=>(Object.keys(e).forEach((n=>{const i=n.toLowerCase();r.hasOwnProperty(i)?t[r[i]]=e[n]:(r[i]=n,t[n]=e[n])})),t)),{})}h(805);const Q="function"==typeof ArrayBuffer,{toString:Z}=Object.prototype;function K(t){return Q&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Z.call(t))}function J(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function tt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function et(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const nt=tt((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=q(t,{headers:{Authorization:_(t,e)}})),et(st(t),(function(n){let r=!1;return i=function(t){return r?t:n},(o=function(){if(401==n.status)return e.hasDigestAuth=function(t,e){if(!P(t))return!1;const n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const r=t.headers&&t.headers.get("www-authenticate")||"",i=n.exec(r);if(!i)break;e[i[1]]=i[2]||i[3]}return e.nc+=1,e.cnonce=function(){let t="";for(let e=0;e<32;++e)t=`${t}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return t}(),!0}(n,e),function(){if(e.hasDigestAuth)return et(st(t=q(t,{headers:{Authorization:_(t,e)}})),(function(t){return 401==t.status?e.hasDigestAuth=!1:e.nc++,r=!0,t}))}();e.nc++}())&&o.then?o.then(i):i(o);var i,o}))})),rt=tt((function(t,e){return et(st(t),(function(n){return n.ok?(e.authType=j.Password,n):401==n.status&&P(n)?(e.authType=j.Digest,U(e,e.username,e.password,void 0,void 0),t._digest=e.digest,nt(t)):n}))})),it=tt((function(t,e){return e.authType===j.Auto?rt(t,e):t._digest?nt(t):st(t)}));function ot(t,e,n){const r=X(t);return r.headers=Y(e.headers,r.headers||{},n.headers||{}),void 0!==n.data&&(r.data=n.data),n.signal&&(r.signal=n.signal),e.httpAgent&&(r.httpAgent=e.httpAgent),e.httpsAgent&&(r.httpsAgent=e.httpsAgent),e.digest&&(r._digest=e.digest),"boolean"==typeof e.withCredentials&&(r.withCredentials=e.withCredentials),r}function st(t){const e=W();return e.patchInline("request",(t=>e.patchInline("fetch",$,t.url,function(t){let e={};const n={method:t.method};if(t.headers&&(e=Y(e,t.headers)),void 0!==t.data){const[r,i]=function(t){if("string"==typeof t)return[t,{}];if(J(t))return[t,{}];if(K(t))return[t,{}];if(t&&"object"==typeof t)return[JSON.stringify(t),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof t)}(t.data);n.body=r,e=Y(e,i)}return t.signal&&(n.signal=t.signal),t.withCredentials&&(n.credentials="include"),n.headers=e,n}(t))),t)}var at=h(285);const ct=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ut={"[: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]},lt=t=>t.replace(/[[\]\\-]/g,"\\$&"),ht=t=>t.join(""),pt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,s=!1,a=!1,c=!1,u=!1,l=n,h="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&s&&!c){l=o+1;break}if(s=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[s,c,u]]of Object.entries(ut))if(t.startsWith(e,o)){if(h)return["$.",!1,t.length-n,!0];o+=e.length,u?i.push(s):r.push(s),a=a||c;continue t}c=!1,h?(e>h?r.push(lt(h)+"-"+lt(e)):e===h&&r.push(lt(e)),h="",o++):t.startsWith("-]",o+1)?(r.push(lt(e+"-")),o+=2):t.startsWith("-",o+1)?(h=e,o+=2):(r.push(lt(e)),o++)}else c=!0,o++}else u=!0,o++}if(l<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===r.length&&/^\\?.$/.test(r[0])&&!u)return[(p=2===r[0].length?r[0].slice(-1):r[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,l-n,!1];var p;const f="["+(u?"^":"")+ht(r)+"]",d="["+(u?"":"^")+ht(i)+"]";return[r.length&&i.length?"("+f+"|"+d+")":r.length?f:d,a,l-n,!0]},ft=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},dt=new Set(["!","?","+","*","@"]),gt=t=>dt.has(t),mt="(?!\\.)",Et=new Set(["[","."]),vt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),bt="[^/]",wt=bt+"*?",Tt=bt+"+?";class Nt{type;#t;#e;#n=!1;#r=[];#i;#o;#s;#a=!1;#c;#u;#l=!1;constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=t,t&&(this.#e=!0),this.#i=e,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#s=this.#t===this?[]:this.#t.#s,"!"!==t||this.#t.#a||this.#s.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#r)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#r.map((t=>String(t))).join("|")+")":this.#u=this.#r.map((t=>String(t))).join("")}#h(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#s.pop();){if("!"!==t.type)continue;let e=t,n=e.#i;for(;n;){for(let r=e.#o+1;!n.type&&r<n.#r.length;r++)for(const e of t.#r){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(n.#r[r])}e=n,n=e.#i}}return this}push(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof Nt&&t.#i===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){const t=null===this.type?this.#r.slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...this.#r.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&"!"===this.#i?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#o)return!0;const t=this.#i;for(let e=0;e<this.#o;e++){const n=t.#r[e];if(!(n instanceof Nt&&"!"===n.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const t=this.#i?this.#i.#r.length:0;return this.#o===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new Nt(this.type,t);for(const t of this.#r)e.copyIn(t);return e}static#p(t,e,n,r){let i=!1,o=!1,s=-1,a=!1;if(null===e.type){let c=n,u="";for(;c<t.length;){const n=t.charAt(c++);if(i||"\\"===n)i=!i,u+=n;else if(o)c===s+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||c===s+2&&a||(o=!1),u+=n;else if("["!==n)if(r.noext||!gt(n)||"("!==t.charAt(c))u+=n;else{e.push(u),u="";const i=new Nt(n,e);c=Nt.#p(t,i,c,r),e.push(i)}else o=!0,s=c,a=!1,u+=n}return e.push(u),c}let c=n+1,u=new Nt(null,e);const l=[];let h="";for(;c<t.length;){const n=t.charAt(c++);if(i||"\\"===n)i=!i,h+=n;else if(o)c===s+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||c===s+2&&a||(o=!1),h+=n;else if("["!==n)if(gt(n)&&"("===t.charAt(c)){u.push(h),h="";const e=new Nt(n,u);u.push(e),c=Nt.#p(t,e,c,r)}else if("|"!==n){if(")"===n)return""===h&&0===e.#r.length&&(e.#l=!0),u.push(h),h="",e.push(...l,u),c;h+=n}else u.push(h),h="",l.push(u),u=new Nt(null,e);else o=!0,s=c,a=!1,h+=n}return e.type=null,e.#e=void 0,e.#r=[t.substring(n-1)],c}static fromGlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Nt(null,void 0,e);return Nt.#p(t,n,0,e),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,n,r,i]=this.toRegExpSource();if(!(r||this.#e||this.#c.nocase&&!this.#c.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#c.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#c}toRegExpSource(t){const e=t??!!this.#c.dot;if(this.#t===this&&this.#h(),!this.type){const n=this.isStart()&&this.isEnd(),r=this.#r.map((e=>{const[r,i,o,s]="string"==typeof e?Nt.#f(e,this.#e,n):e.toRegExpSource(t);return this.#e=this.#e||o,this.#n=this.#n||s,r})).join("");let i="";if(this.isStart()&&"string"==typeof this.#r[0]&&(1!==this.#r.length||!vt.has(this.#r[0]))){const n=Et,o=e&&n.has(r.charAt(0))||r.startsWith("\\.")&&n.has(r.charAt(2))||r.startsWith("\\.\\.")&&n.has(r.charAt(4)),s=!e&&!t&&n.has(r.charAt(0));i=o?"(?!(?:^|/)\\.\\.?(?:$|/))":s?mt:""}let o="";return this.isEnd()&&this.#t.#a&&"!"===this.#i?.type&&(o="(?:$|\\/)"),[i+r+o,ft(r),this.#e=!!this.#e,this.#n]}const n="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#d(e);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const t=this.toString();return this.#r=[t],this.type=null,this.#e=void 0,[t,ft(this.toString()),!1,!1]}let o=!n||t||e?"":this.#d(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let s="";return s="!"===this.type&&this.#l?(this.isStart()&&!e?mt:"")+Tt:r+i+("!"===this.type?"))"+(!this.isStart()||e||t?"":mt)+wt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`),[s,ft(i),this.#e=!!this.#e,this.#n]}#d(t){return this.#r.map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,r,i,o]=e.toRegExpSource(t);return this.#n=this.#n||o,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#f(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i="",o=!1;for(let s=0;s<t.length;s++){const a=t.charAt(s);if(r)r=!1,i+=(yt.has(a)?"\\":"")+a;else if("\\"!==a){if("["===a){const[n,r,a,c]=pt(t,s);if(a){i+=n,o=o||r,s+=a-1,e=e||c;continue}}"*"!==a?"?"!==a?i+=a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=bt,e=!0):(i+=n&&"*"===t?Tt:wt,e=!0)}else s===t.length-1?i+="\\\\":r=!0}return[i,ft(t),!!e,o]}}const At=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ct(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Qt(e,n).match(t)},It=/^\*+([^+@!?\*\[\(]*)$/,Ot=t=>e=>!e.startsWith(".")&&e.endsWith(t),xt=t=>e=>e.endsWith(t),_t=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Pt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),St=/^\*+\.\*+$/,Ct=t=>!t.startsWith(".")&&t.includes("."),Rt=t=>"."!==t&&".."!==t&&t.includes("."),Lt=/^\.\*+$/,Dt=t=>"."!==t&&".."!==t&&t.startsWith("."),$t=/^\*+$/,jt=t=>0!==t.length&&!t.startsWith("."),Ft=t=>0!==t.length&&"."!==t&&".."!==t,Ut=/^\?+([^+@!?\*\[\(]*)?$/,Mt=t=>{let[e,n=""]=t;const r=Vt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},kt=t=>{let[e,n=""]=t;const r=Wt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},Bt=t=>{let[e,n=""]=t;const r=Wt([e]);return n?t=>r(t)&&t.endsWith(n):r},Gt=t=>{let[e,n=""]=t;const r=Vt([e]);return n?t=>r(t)&&t.endsWith(n):r},Vt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&!t.startsWith(".")},Wt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&"."!==t&&".."!==t},Xt="object"==typeof c&&c?"object"==typeof c.env&&c.env&&c.env.__MINIMATCH_TESTING_PLATFORM__||c.platform:"posix";At.sep="win32"===Xt?"\\":"/";const qt=Symbol("globstar **");At.GLOBSTAR=qt,At.filter=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>At(n,t,e)};const zt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},t,e)};At.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return At;const e=At;return Object.assign((function(n,r){return e(n,r,zt(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(e){super(e,zt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return e.defaults(zt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n){super(e,n,zt(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.AST.fromGlob(n,zt(t,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.unescape(n,zt(t,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.escape(n,zt(t,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(n,zt(t,r))},defaults:n=>e.defaults(zt(t,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.makeRe(n,zt(t,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.braceExpand(n,zt(t,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.match(n,r,zt(t,i))},sep:e.sep,GLOBSTAR:qt})};const Ht=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ct(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:at(t)};At.braceExpand=Ht,At.makeRe=function(t){return new Qt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},At.match=function(t,e){const n=new Qt(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};const Yt=/[?*]|[+@!]\(.*?\)|\[|\]/;class Qt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ct(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Xt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.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 t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Yt.test(t[2])||Yt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,r),this.set=r.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const r=t[n];1===n&&""===r&&""===t[0]||"."!==r&&""!==r||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const r=t[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let i=r;for(;"**"===n[i+1];)i++;i>r&&n.splice(r+1,i-r);let o=n[r+1];const s=n[r+2],a=n[r+3];if(".."!==o)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;e=!0,n.splice(r,1);const c=n.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&""===r&&""===n[0]||"."!==r&&""!==r||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...t),0===n.length&&n.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(r){t[e]=[],t[n]=r;break}}return t.filter((t=>t.length))}partsMatch(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,i=0,o=[],s="";for(;r<t.length&&i<e.length;)if(t[r]===e[i])o.push("b"===s?e[i]:t[r]),r++,i++;else if(n&&"**"===t[r]&&e[i]===t[r+1])o.push(t[r]),r++;else if(n&&"**"===e[i]&&t[r]===e[i+1])o.push(e[i]),i++;else if("*"!==t[r]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===s)return!1;s="b",o.push(e[i]),r++,i++}else{if("b"===s)return!1;s="a",o.push(t[r]),r++,i++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),r=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=r?3:n?0:void 0,s=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof o&&"number"==typeof s){const[n,r]=[t[o],e[s]];n.toLowerCase()===r.toLowerCase()&&(e[s]=n,s>o?e=e.slice(s):o>s&&(t=t.slice(o)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,c=e.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u=e[s],l=t[o];if(this.debug(e,u,l),!1===u)return!1;if(u===qt){this.debug("GLOBSTAR",[e,u,l]);var h=o,p=s+1;if(p===c){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!r.dot&&"."===t[o].charAt(0))return!1;return!0}for(;h<a;){var f=t[h];if(this.debug("\nglobstar while",t,h,e,p,f),this.matchOne(t.slice(h),e.slice(p),n))return this.debug("globstar found match!",h,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,h,e,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",t,h,e,p),h!==a))}let i;if("string"==typeof u?(i=l===u,this.debug("string match",u,l,i)):(i=u.test(l),this.debug("pattern match",u,l,i)),!i)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return Ht(this.pattern,this.options)}parse(t){ct(t);const e=this.options;if("**"===t)return qt;if(""===t)return"";let n,r=null;(n=t.match($t))?r=e.dot?Ft:jt:(n=t.match(It))?r=(e.nocase?e.dot?Pt:_t:e.dot?xt:Ot)(n[1]):(n=t.match(Ut))?r=(e.nocase?e.dot?kt:Mt:e.dot?Bt:Gt)(n):(n=t.match(St))?r=e.dot?Rt:Ct:(n=t.match(Lt))&&(r=Dt);const i=Nt.fromGlob(t,this.options).toMMPattern();return r&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))r.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===qt?qt:t._src}));return e.forEach(((t,r)=>{const i=e[r+1],o=e[r-1];t===qt&&o!==qt&&(void 0===o?void 0!==i&&i!==qt?e[r+1]="(?:\\/|"+n+"\\/)?"+i:e[r]=n:void 0===i?e[r-1]=o+"(?:\\/|"+n+")?":i!==qt&&(e[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,e[r+1]=qt))})),e.filter((t=>t!==qt)).join("/")})).join("|");const[o,s]=t.length>1?["(?:",")"]:["",""];i="^"+o+i+s+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let o=r[r.length-1];if(!o)for(let t=r.length-2;!o&&t>=0;t--)o=r[t];for(let t=0;t<i.length;t++){const s=i[t];let a=r;if(n.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return At.defaults(t).Minimatch}}function Zt(t){const e=new Error(`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function Kt(t,e){const{status:n}=e;if(401===n&&t.digest)return e;if(n>=400)throw Zt(e);return e}function Jt(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:e,headers:t.headers?H(t.headers):{},status:t.status,statusText:t.statusText}:e}At.AST=Nt,At.Minimatch=Qt,At.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},At.unescape=ft;const te=(ee=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=ot({url:I(t.remoteURL,w(e)),method:"COPY",headers:{Destination:I(t.remoteURL,w(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},t,r);return s=function(e){Kt(t,e)},(o=it(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(ee.apply(this,t))}catch(t){return Promise.reject(t)}});var ee;const ne={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,n){return t},captureMetaData:!1},re=":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",ie=new RegExp("^["+re+"]["+re+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function oe(t,e){const n=[];let r=e.exec(t);for(;r;){const i=[];i.startIndex=e.lastIndex-r[0].length;const o=r.length;for(let t=0;t<o;t++)i.push(r[t]);n.push(i),r=e.exec(t)}return n}const se=function(t){return!(null==ie.exec(t))};let ae;ae="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class ce{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][ae]={startIndex:e})}static getMetaDataSymbol(){return ae}}class ue{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let r=1,i=!1,o=!1,s="";for(;e<t.length;e++)if("<"!==t[e]||o)if(">"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,r--):r--,0===r)break}else"["===t[e]?i=!0:s+=t[e];else{if(i&&he(t,"!ENTITY",e)){let r,i;e+=7,[r,i,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===i.indexOf("&")&&(n[r]={regx:RegExp(`&${r};`,"g"),val:i})}else if(i&&he(t,"!ELEMENT",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(i&&he(t,"!ATTLIST",e))e+=8;else if(i&&he(t,"!NOTATION",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!he(t,"!--",e))throw new Error("Invalid DOCTYPE");o=!0}r++,s=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=le(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if(pe(n),e=le(t,e),!this.suppressValidationErr){if("SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported")}let r="";return[e,r]=this.readIdentifierVal(t,e,"entity"),[n,r,--e]}readNotationExp(t,e){e=le(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&pe(n),e=le(t,e);const r=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==r&&"PUBLIC"!==r)throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);e+=r.length,e=le(t,e);let i=null,o=null;if("PUBLIC"===r)[e,i]=this.readIdentifierVal(t,e,"publicIdentifier"),'"'!==t[e=le(t,e)]&&"'"!==t[e]||([e,o]=this.readIdentifierVal(t,e,"systemIdentifier"));else if("SYSTEM"===r&&([e,o]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:i,systemIdentifier:o,index:--e}}readIdentifierVal(t,e,n){let r="";const i=t[e];if('"'!==i&&"'"!==i)throw new Error(`Expected quoted string, found "${i}"`);for(e++;e<t.length&&t[e]!==i;)r+=t[e],e++;if(t[e]!==i)throw new Error(`Unterminated ${n} value`);return[++e,r]}readElementExp(t,e){e=le(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!se(n))throw new Error(`Invalid element name: "${n}"`);let r="";if("E"===t[e=le(t,e)]&&he(t,"MPTY",e))e+=4;else if("A"===t[e]&&he(t,"NY",e))e+=2;else if("("===t[e]){for(e++;e<t.length&&")"!==t[e];)r+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:r.trim(),index:e}}readAttlistExp(t,e){e=le(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;pe(n),e=le(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;if(!pe(r))throw new Error(`Invalid attribute name: "${r}"`);e=le(t,e);let i="";if("NOTATION"===t.substring(e,e+8).toUpperCase()){if(i="NOTATION","("!==t[e=le(t,e+=8)])throw new Error(`Expected '(', found "${t[e]}"`);e++;let n=[];for(;e<t.length&&")"!==t[e];){let r="";for(;e<t.length&&"|"!==t[e]&&")"!==t[e];)r+=t[e],e++;if(r=r.trim(),!pe(r))throw new Error(`Invalid notation name: "${r}"`);n.push(r),"|"===t[e]&&(e++,e=le(t,e))}if(")"!==t[e])throw new Error("Unterminated list of notations");e++,i+=" ("+n.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)i+=t[e],e++;const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(i.toUpperCase()))throw new Error(`Invalid attribute type: "${i}"`)}e=le(t,e);let o="";return"#REQUIRED"===t.substring(e,e+8).toUpperCase()?(o="#REQUIRED",e+=8):"#IMPLIED"===t.substring(e,e+7).toUpperCase()?(o="#IMPLIED",e+=7):[e,o]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:r,attributeType:i,defaultValue:o,index:e}}}const le=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function he(t,e,n){for(let r=0;r<e.length;r++)if(e[r]!==t[n+r+1])return!1;return!0}function pe(t){if(se(t))return t;throw new Error(`Invalid entity name ${t}`)}const fe=/^[-+]?0x[a-fA-F0-9]+$/,de=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ge={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},me=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ee(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class ve{constructor(t){if(this.options=t,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:(t,e)=>Le(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>Le(e,16,"&#x")}},this.addExternalEntities=ye,this.parseXml=Ae,this.parseTextData=be,this.resolveNameSpace=we,this.buildAttributesMap=Ne,this.isItStopNode=_e,this.replaceEntitiesValue=Oe,this.readStopNodeData=Ce,this.saveTextToParentTag=xe,this.addChild=Ie,this.ignoreAttributesFn=Ee(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];"string"==typeof e&&(e.startsWith("*.")?this.stopNodesWildcard.add(e.substring(2)):this.stopNodesExact.add(e))}}}}function ye(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:t[r]}}}function be(t,e,n,r,i,o,s){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const r=this.options.tagValueProcessor(e,t,n,i,o);return null==r?t:typeof r!=typeof t||r!==t?r:this.options.trimValues||t.trim()===t?Re(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function we(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const Te=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Ne(t,e){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=oe(t,Te),r=n.length,i={};for(let t=0;t<r;t++){const r=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(r,e))continue;let o=n[t][4],s=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const t=this.options.attributeValueProcessor(r,o,e);i[s]=null==t?o:typeof t!=typeof o||t!==o?t:Re(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[s]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=i,t}return i}}const Ae=function(t){t=t.replace(/\r\n?/g,"\n");const e=new ce("!xml");let n=e,r="",i="";const o=new ue(this.options.processEntities);for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=Pe(t,">",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(r=this.saveTextToParentTag(r,n,i));const a=i.substring(i.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let c=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(c=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=i.lastIndexOf("."),i=i.substring(0,c),n=this.tagsNodeStack.pop(),r="",s=e}else if("?"===t[s+1]){let e=Se(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new ce(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,i)),this.addChild(n,t,i,s)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=Pe(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=o.readDocType(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=Pe(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);r=this.saveTextToParentTag(r,n,i);let a=this.parseTextData(o,n.tagname,i,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),s=e+2}else{let o=Se(t,s,this.options.removeNSPrefix),a=o.tagName;const c=o.rawTagName;let u=o.tagExp,l=o.attrExpPresent,h=o.closeIndex;if(this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const p=n;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==e.tagname&&(i+=i?"."+a:a);const f=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),u=a):u=u.substr(0,u.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,c,h+1);if(!n)throw new Error(`Unexpected end of ${c}`);s=n.i,e=n.tagContent}const r=new ce(a);a!==u&&l&&(r[":@"]=this.buildAttributesMap(u,i)),e&&(e=this.parseTextData(e,a,i,!0,l,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,e),this.addChild(n,r,i,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if("/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}const t=new ce(a);a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,i)),this.addChild(n,t,i,f),i=i.substr(0,i.lastIndexOf("."))}else{const t=new ce(a);this.tagsNodeStack.push(n),a!==u&&l&&(t[":@"]=this.buildAttributesMap(u,i)),this.addChild(n,t,i,f),n=t}r="",s=h}}else r+=t[s];return e.child};function Ie(t,e,n,r){this.options.captureMetaData||(r=void 0);const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e,r)):t.addChild(e,r))}const Oe=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function xe(t,e,n,r){return t&&(void 0===r&&(r=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,r))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function _e(t,e,n,r){return!(!e||!e.has(r))||!(!t||!t.has(n))}function Pe(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function Se(t,e,n){const r=function(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="";for(let o=e;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===r[0]){if(!r[1])return{data:i,index:o};if(t[o+1]===r[1])return{data:i,index:o}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const o=r.index,s=i.search(/\s/);let a=i,c=!0;-1!==s&&(a=i.substring(0,s),i=i.substring(s+1).trimStart());const u=a;if(n){const t=a.indexOf(":");-1!==t&&(a=a.substr(t+1),c=a!==r.data.substr(t+1))}return{tagName:a,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}function Ce(t,e,n){const r=n;let i=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const o=Pe(t,">",n,`${e} is not closed`);if(t.substring(n+2,o).trim()===e&&(i--,0===i))return{tagContent:t.substring(r,n),i:o};n=o}else if("?"===t[n+1])n=Pe(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=Pe(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=Pe(t,"]]>",n,"StopNode is not closed.")-2;else{const r=Se(t,n,">");r&&((r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function Re(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=Object.assign({},ge,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&fe.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(n.includes("e")||n.includes("E"))return function(t,e,n){if(!n.eNotation)return t;const r=e.match(me);if(r){let i=r[1]||"";const o=-1===r[3].indexOf("e")?"E":"e",s=r[2],a=i?t[s.length+1]===o:t[s.length]===o;return s.length>1&&a?t:1!==s.length||!r[3].startsWith(`.${o}`)&&r[3][0]!==o?n.leadingZeros&&!a?(e=(r[1]||"")+r[3],Number(e)):t:Number(e)}return t}(t,n,e);{const i=de.exec(n);if(i){const o=i[1]||"",s=i[2];let a=(r=i[3])&&-1!==r.indexOf(".")?("."===(r=r.replace(/0+$/,""))?r="0":"."===r[0]?r="0"+r:"."===r[r.length-1]&&(r=r.substring(0,r.length-1)),r):r;const c=o?"."===t[s.length+1]:"."===t[s.length];if(!e.leadingZeros&&(s.length>1||1===s.length&&!c))return t;{const r=Number(n),i=String(r);if(0===r)return r;if(-1!==i.search(/[eE]/))return e.eNotation?r:t;if(-1!==n.indexOf("."))return"0"===i||i===a||i===`${o}${a}`?r:t;let c=s?a:n;return s?c===i||o+c===i?r:t:c===i||c===o+i?r:t}}return t}var r}(t,n)}return void 0!==t?t:""}function Le(t,e,n){const r=Number.parseInt(t,e);return r>=0&&r<=1114111?String.fromCodePoint(r):n+t+";"}const De=ce.getMetaDataSymbol();function $e(t,e){return je(t,e)}function je(t,e,n){let r;const i={};for(let o=0;o<t.length;o++){const s=t[o],a=Fe(s);let c="";if(c=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===r?r=s[a]:r+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=je(s[a],e,c);const n=Me(t,e);void 0!==s[De]&&(t[De]=s[De]),s[":@"]?Ue(t,s[":@"],c,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==i[a]&&i.hasOwnProperty(a)?(Array.isArray(i[a])||(i[a]=[i[a]]),i[a].push(t)):e.isArray(a,c,n)?i[a]=[t]:i[a]=t}}}return"string"==typeof r?r.length>0&&(i[e.textNodeName]=r):void 0!==r&&(i[e.textNodeName]=r),i}function Fe(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function Ue(t,e,n,r){if(e){const i=Object.keys(e),o=i.length;for(let s=0;s<o;s++){const o=i[s];r.isArray(o,n+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function Me(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}const ke={allowBooleanAttributes:!1,unpairedTags:[]};function Be(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function Ge(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const r=t.substr(n,e-n);if(e>5&&"xml"===r)return He("InvalidXml","XML declaration allowed only at the start of the document.",Qe(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function Ve(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&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===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 We(t,e){let n="",r="",i=!1;for(;e<t.length;e++){if('"'===t[e]||"'"===t[e])""===r?r=t[e]:r!==t[e]||(r="");else if(">"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const Xe=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function qe(t,e){const n=oe(t,Xe),r={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return He("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",Ze(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return He("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",Ze(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return He("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",Ze(n[t]));const i=n[t][2];if(!Ye(i))return He("InvalidAttr","Attribute '"+i+"' is an invalid name.",Ze(n[t]));if(r.hasOwnProperty(i))return He("InvalidAttr","Attribute '"+i+"' is repeated.",Ze(n[t]));r[i]=1}return!0}function ze(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function He(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function Ye(t){return se(t)}function Qe(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function Ze(t){return t.startIndex+t[1].length}class Ke{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},ne,t)}(t)}parse(t,e){if("string"!=typeof t&&t.toString)t=t.toString();else if("string"!=typeof t)throw new Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});const n=function(t,e){e=Object.assign({},ke,e);const n=[];let r=!1,i=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=Ge(t,o),o.err)return o}else{if("<"!==t[o]){if(Be(t[o]))continue;return He("InvalidChar","char '"+t[o]+"' is not expected.",Qe(t,o))}{let s=o;if(o++,"!"===t[o]){o=Ve(t,o);continue}{let a=!1;"/"===t[o]&&(a=!0,o++);let c="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)c+=t[o];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),o--),!se(c)){let e;return e=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",He("InvalidTag",e,Qe(t,o))}const u=We(t,o);if(!1===u)return He("InvalidAttr","Attributes for '"+c+"' have open quote.",Qe(t,o));let l=u.value;if(o=u.index,"/"===l[l.length-1]){const n=o-l.length;l=l.substring(0,l.length-1);const i=qe(l,e);if(!0!==i)return He(i.err.code,i.err.msg,Qe(t,n+i.err.line));r=!0}else if(a){if(!u.tagClosed)return He("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Qe(t,o));if(l.trim().length>0)return He("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Qe(t,s));if(0===n.length)return He("InvalidTag","Closing tag '"+c+"' has not been opened.",Qe(t,s));{const e=n.pop();if(c!==e.tagName){let n=Qe(t,e.tagStartPos);return He("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+c+"'.",Qe(t,s))}0==n.length&&(i=!0)}}else{const a=qe(l,e);if(!0!==a)return He(a.err.code,a.err.msg,Qe(t,o-l.length+a.err.line));if(!0===i)return He("InvalidXml","Multiple possible root nodes found.",Qe(t,o));-1!==e.unpairedTags.indexOf(c)||n.push({tagName:c,tagStartPos:s}),r=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=Ve(t,o);continue}if("?"!==t[o+1])break;if(o=Ge(t,++o),o.err)return o}else if("&"===t[o]){const e=ze(t,o);if(-1==e)return He("InvalidChar","char '&' is not expected.",Qe(t,o));o=e}else if(!0===i&&!Be(t[o]))return He("InvalidXml","Extra text at the end",Qe(t,o));"<"===t[o]&&o--}}}return r?1==n.length?He("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",Qe(t,n[0].tagStartPos)):!(n.length>0)||He("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):He("InvalidXml","Start tag expected.",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new ve(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:$e(r,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return ce.getMetaDataSymbol()}}var Je=h(829),tn=h.n(Je),en=function(t){return t.Array="array",t.Object="object",t.Original="original",t}(en||{});function nn(t,e){if(!t.endsWith("propstat.prop.displayname"))return e}function rn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:en.Original;const r=tn().get(t,e);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function on(t,e){return e=e??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[nn]},new Promise((n=>{n(function(t){const{multistatus:e}=t;if(""===e)return{multistatus:{response:[]}};if(!e)throw new Error("Invalid response: No root multistatus found");const n={multistatus:Array.isArray(e)?e[0]:e};return tn().set(n,"multistatus.response",rn(n,"multistatus.response",en.Array)),tn().set(n,"multistatus.response",tn().get(n,"multistatus.response").map((t=>function(t){const e=Object.assign({},t);return e.status?tn().set(e,"status",rn(e,"status",en.Object)):(tn().set(e,"propstat",rn(e,"propstat",en.Object)),tn().set(e,"propstat.prop",rn(e,"propstat.prop",en.Object))),e}(t)))),n}(function(t){let{attributeNamePrefix:e,attributeParsers:n,tagParsers:r}=t;return new Ke({allowBooleanAttributes:!0,attributeNamePrefix:e,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(t,e,r){for(const i of n)try{const t=i(r,e);if(t!==e)return t}catch(t){}return e},tagValueProcessor(t,e,n){for(const i of r)try{const t=i(n,e);if(t!==e)return t}catch(t){}return e}})}(e).parse(t)))}))}function sn(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:r=null,getcontentlength:i="0",resourcetype:o=null,getcontenttype:s=null,getetag:a=null}=t,c=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",u={filename:e,basename:v().basename(e),lastmod:r,size:parseInt(i,10),type:c,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===c&&(u.mime=s&&"string"==typeof s?s.split(";")[0]:""),n&&(void 0!==t.displayname&&(t.displayname=String(t.displayname)),u.props=t),u}function an(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function cn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const un=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=ot({url:I(t.remoteURL,w(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,n);return cn(it(i,t),(function(n){return Kt(t,n),cn(n.text(),(function(i){return cn(on(i,t.parsing),(function(t){const i=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;try{t.multistatus.response[0].propstat&&(r=t.multistatus.response[0])}catch(t){}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:o}}=r,[s,a,c]=o.split(" ",3),u=parseInt(a,10);if(u>=400){const t=new Error(`Invalid response: ${u} ${c}`);throw t.status=u,t}return sn(i,N(e),n)}(t,e,r);return Jt(n,i,r)}))}))}))}));function ln(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const hn=pn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(t){if(!t||"/"===t)return[];let e=t;const n=[];do{n.push(e),e=v().dirname(e)}while(e&&"/"!==e);return n}(N(e));r.sort(((t,e)=>t.length>e.length?1:e.length>t.length?-1:0));let i=!1;return function(t,e){if("function"==typeof t[gn]){var n,r,i,o=t[gn]();function u(t){try{for(;!(n=o.next()).done;)if((t=e(n.value))&&t.then){if(!vn(t))return void t.then(u,i||(i=mn.bind(null,r=new En,2)));t=t.v}r?mn(r,1,t):r=t}catch(t){mn(r||(r=new En),2,t)}}if(u(),o.return){var s=function(t){try{n.done||o.return()}catch(t){}return t};if(r&&r.then)return r.then(s,(function(t){throw s(t)}));s()}return r}if(!("length"in t))throw new TypeError("Object is not iterable");for(var a=[],c=0;c<t.length;c++)a.push(t[c]);return function(t,e){var n,r,i=-1;return function o(s){try{for(;++i<t.length;)if((s=e(i))&&s.then){if(!vn(s))return void s.then(o,r||(r=mn.bind(null,n=new En,2)));s=s.v}n?mn(n,1,s):n=s}catch(t){mn(n||(n=new En),2,t)}}(),n}(a,(function(t){return e(a[t])}))}(r,(function(r){return o=function(){return function(n,i){try{var o=ln(un(t,r),(function(t){if("directory"!==t.type)throw new Error(`Path includes a file: ${e}`)}))}catch(t){return i(t)}return o&&o.then?o.then(void 0,i):o}(0,(function(e){const o=e;return function(){if(404===o.status)return i=!0,dn(yn(t,r,{...n,recursive:!1}));throw e}()}))},(s=function(){if(i)return dn(yn(t,r,{...n,recursive:!1}))}())&&s.then?s.then(o):o();var o,s}))}));function pn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function fn(){}function dn(t,e){if(!e)return t&&t.then?t.then(fn):Promise.resolve()}const gn="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function mn(t,e,n){if(!t.s){if(n instanceof En){if(!n.s)return void(n.o=mn.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then(mn.bind(null,t,e),mn.bind(null,t,2));t.s=e,t.v=n;const r=t.o;r&&r(t)}}const En=function(){function t(){}return t.prototype.then=function(e,n){const r=new t,i=this.s;if(i){const t=1&i?e:n;if(t){try{mn(r,1,t(this.v))}catch(t){mn(r,2,t)}return r}return this}return this.o=function(t){try{const i=t.v;1&t.s?mn(r,1,e?e(i):i):n?mn(r,1,n(i)):mn(r,2,i)}catch(t){mn(r,2,t)}},r},t}();function vn(t){return t instanceof En&&1&t.s}const yn=pn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return hn(t,e,n);const r=ot({url:I(t.remoteURL,(i=w(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,n);var i;return ln(it(r,t),(function(e){Kt(t,e)}))}));var bn=h(388),wn=h.n(bn);const Tn=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};if("object"==typeof n.range&&"number"==typeof n.range.start){let t=`bytes=${n.range.start}-`;"number"==typeof n.range.end&&(t=`${t}${n.range.end}`),r.Range=t}const i=ot({url:I(t.remoteURL,w(e)),method:"GET",headers:r},t,n);return s=function(e){if(Kt(t,e),r.Range&&206!==e.status){const t=new Error(`Invalid response code for partial request: ${e.status}`);throw t.status=e.status,t}return n.callback&&setTimeout((()=>{n.callback(e)}),0),e.body},(o=it(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),Nn=()=>{},An=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){n.url||(n.url=I(t.remoteURL,w(e)));const r=ot(n,t,{});return o=function(e){return Kt(t,e),e},(i=it(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),In=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ot({url:I(t.remoteURL,w(e)),method:"DELETE"},t,n);return o=function(e){Kt(t,e)},(i=it(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),On=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,i){try{var o=(s=un(t,e,n),a=function(){return!0},s&&s.then||(s=Promise.resolve(s)),a?s.then(a):s)}catch(t){return i(t)}var s,a;return o&&o.then?o.then(void 0,i):o}(0,(function(t){if(404===t.status)return!1;throw t}))}));function xn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const _n=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ot({url:I(t.remoteURL,w(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},t,n);return xn(it(r,t),(function(r){return Kt(t,r),xn(r.text(),(function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return xn(on(i,t.parsing),(function(i){const o=T(e);let s=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=v().join(e,"/"),{multistatus:{response:s}}=t,a=s.map((t=>{const e=function(t){try{return t.replace(/^https?:\/\/[^\/]+/,"")}catch(t){throw new m(t,"Failed normalising HREF")}}(t.href),{propstat:{prop:n}}=t;return sn(n,"/"===o?decodeURIComponent(N(e)):N(v().relative(decodeURIComponent(o),decodeURIComponent(e))),r)}));return i?a:a.filter((t=>t.basename&&("file"===t.type||t.filename!==n.replace(/\/$/,""))))}(i,T(t.remoteBasePath||t.remotePath),o,n.details,n.includeSelf);return n.glob&&(s=function(t,e){return t.filter((t=>At(t.filename,e,{matchBase:!0})))}(s,n.glob)),Jt(r,s,n.details)}))}))}))}));function Pn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const Sn=Pn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ot({url:I(t.remoteURL,w(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Dn]},t,n);return Cn(it(r,t),(function(e){return Kt(t,e),Cn(e.text(),(function(t){return Jt(e,t,n.details)}))}))}));function Cn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Rn=Pn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ot({url:I(t.remoteURL,w(e)),method:"GET"},t,n);return Cn(it(r,t),(function(e){let r;return Kt(t,e),function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){return Cn(e.arrayBuffer(),(function(t){r=t}))}),(function(){return Jt(e,r,n.details)}))}))})),Ln=Pn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:r="binary"}=n;if("binary"!==r&&"text"!==r)throw new m({info:{code:F.InvalidOutputFormat}},`Invalid output format: ${r}`);return"text"===r?Sn(t,e,n):Rn(t,e,n)})),Dn=t=>t;function $n(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),jn(t,e,"",n)}function jn(t,e,n,r){let i="",o=!1;for(let s=0;s<t.length;s++){const a=t[s],c=Fn(a);if(void 0===c)continue;let u="";if(u=0===n.length?c:`${n}.${c}`,c===e.textNodeName){let t=a[c];Mn(u,e)||(t=e.tagValueProcessor(c,t),t=kn(t,e)),o&&(i+=r),i+=t,o=!1;continue}if(c===e.cdataPropName){o&&(i+=r),i+=`<![CDATA[${a[c][0][e.textNodeName]}]]>`,o=!1;continue}if(c===e.commentPropName){i+=r+`\x3c!--${a[c][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===c[0]){const t=Un(a[":@"],e),n="?xml"===c?"":r;let s=a[c][0][e.textNodeName];s=0!==s.length?" "+s:"",i+=n+`<${c}${s}${t}?>`,o=!0;continue}let l=r;""!==l&&(l+=e.indentBy);const h=r+`<${c}${Un(a[":@"],e)}`,p=jn(a[c],e,u,l);-1!==e.unpairedTags.indexOf(c)?e.suppressUnpairedNode?i+=h+">":i+=h+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?i+=h+`>${p}${r}</${c}>`:(i+=h+">",p&&""!==r&&(p.includes("/>")||p.includes("</"))?i+=r+e.indentBy+p+r:i+=p,i+=`</${c}>`):i+=h+"/>",o=!0}return i}function Fn(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&":@"!==r)return r}}function Un(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let i=e.attributeValueProcessor(r,t[r]);i=kn(i,e),!0===i&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function Mn(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function kn(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}const Bn={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Gn(t){this.options=Object.assign({},Bn,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Ee(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Xn),this.processTextOrObjNode=Vn,this.options.format?(this.indentate=Wn,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Vn(t,e,n,r){const i=this.j2x(t,n+1,r.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function Wn(t){return this.options.indentBy.repeat(t)}function Xn(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function qn(t){return new Gn({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(zn({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function zn(t,e){const n={...t};for(const t in n)n.hasOwnProperty(t)&&(n[t]&&"object"==typeof n[t]&&-1===t.indexOf(":")?(n[`${e}:${t}`]=zn(n[t],e),delete n[t]):!1===/^@_/.test(t)&&(n[`${e}:${t}`]=n[t],delete n[t]));return n}function Hn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Yn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}Gn.prototype.build=function(t){return this.options.preserveOrder?$n(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Gn.prototype.j2x=function(t,e,n){let r="",i="";const o=n.join(".");for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(i+="");else if(null===t[s])this.isAttribute(s)||s===this.options.cdataPropName?i+="":"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)i+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const n=this.isAttribute(s);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+t[s]);else if(!n)if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const r=t[s].length;let o="",a="";for(let c=0;c<r;c++){const r=t[s][c];if(void 0===r);else if(null===r)"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const t=this.j2x(r,e+1,n.concat(s));o+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else o+=this.processTextOrObjNode(r,s,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,r);t=this.replaceEntitiesValue(t),o+=t}else o+=this.buildTextValNode(r,s,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,s,a,e)),i+=o}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(e[i],""+t[s][e[i]])}else i+=this.processTextOrObjNode(t[s],s,e,n);return{attrStr:r,val:i}},Gn.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},Gn.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+o+this.tagEndChar+t+this.indentate(r)+i:this.indentate(r)+"<"+e+n+o+">"+t+i}},Gn.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Gn.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+i+"</"+e+this.tagEndChar}},Gn.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};const Qn=Yn((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=ot({url:I(t.remoteURL,w(e)),method:"UNLOCK",headers:{"Lock-Token":n}},t,r);return Hn(it(i,t),(function(e){if(Kt(t,e),204!==e.status&&200!==e.status)throw Zt(e)}))})),Zn=Yn((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=Kn}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const s=ot({url:I(t.remoteURL,w(e)),method:"LOCK",headers:o,data:qn(t.contactHref)},t,n);return Hn(it(s,t),(function(e){return Kt(t,e),Hn(e.text(),(function(t){const n=(o=t,new Ke({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=tn().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=tn().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw Zt(e,"No lock token received: ");return{token:r,serverTimeout:i}}))}))})),Kn="Infinite, Second-4100000000";function Jn(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const tr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.path||"/",r=ot({url:I(t.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return Jn(it(r,t),(function(n){return Kt(t,n),Jn(n.text(),(function(r){return Jn(on(r,t.parsing),(function(t){const r=function(t){try{const[e]=t.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=e;return void 0!==n&&void 0!==r?{used:parseInt(String(n),10),available:an(r)}:null}catch(t){}return null}(t);return Jt(n,r,e.details)}))}))}))}));function er(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const nr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=ot({url:I(t.remoteURL,w(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,n);return er(it(i,t),(function(n){return Kt(t,n),er(n.text(),(function(i){return er(on(i,t.parsing),(function(t){const i=function(t,e,n){const r={truncated:!1,results:[]};return r.truncated=t.multistatus.response.some((t=>"507"===(t.status||t.propstat?.status).split(" ",3)?.[1]&&t.href.replace(/\/$/,"").endsWith(w(e).replace(/\/$/,"")))),t.multistatus.response.forEach((t=>{if(void 0===t.propstat)return;const e=t.href.split("/").map(decodeURIComponent).join("/");r.results.push(sn(t.propstat.prop,e,n))})),r}(t,e,r);return Jt(n,i,r)}))}))}))})),rr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=ot({url:I(t.remoteURL,w(e)),method:"MOVE",headers:{Destination:I(t.remoteURL,w(n)),Overwrite:!1===r.overwrite?"F":"T"}},t,r);return s=function(e){Kt(t,e)},(o=it(i,t))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s}));var ir=h(172);function or(t){if(K(t))return t.byteLength;if(J(t))return t.length;if("string"==typeof t)return(0,ir.d)(t);throw new m({info:{code:F.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const sr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:i=!0,overwrite:o=!0}=r,s={"Content-Type":"application/octet-stream"};!1===i||(s["Content-Length"]="number"==typeof i?`${i}`:`${or(n)}`),o||(s["If-None-Match"]="*");const a=ot({url:I(t.remoteURL,w(e)),method:"PUT",headers:s,data:n},t,r);return u=function(e){try{Kt(t,e)}catch(t){const e=t;if(412!==e.status||o)throw e;return!1}return!0},(c=it(a,t))&&c.then||(c=Promise.resolve(c)),u?c.then(u):c;var c,u})),ar=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ot({url:I(t.remoteURL,w(e)),method:"OPTIONS"},t,n);return o=function(e){try{Kt(t,e)}catch(t){throw t}return{compliance:(e.headers.get("DAV")??"").split(",").map((t=>t.trim())),server:e.headers.get("Server")??""}},(i=it(r,t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}));function cr(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const ur=pr((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new m({info:{code:F.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`},a=ot({url:I(t.remoteURL,w(e)),method:"PUT",headers:s,data:i},t,o);return cr(it(a,t),(function(e){Kt(t,e)}))}));function lr(t,e){var n=t();return n&&n.then?n.then(e):e(n)}const hr=pr((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new m({info:{code:F.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const s={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`},a=ot({url:I(t.remoteURL,w(e)),method:"PATCH",headers:s,data:i},t,o);return cr(it(a,t),(function(e){Kt(t,e)}))}));function pr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}const fr=pr((function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return cr(ar(t,e,o),(function(s){let a=!1;return lr((function(){if(s.compliance.includes("sabredav-partialupdate"))return cr(hr(t,e,n,r,i,o),(function(t){return a=!0,t}))}),(function(c){let u=!1;return a?c:lr((function(){if(s.server.includes("Apache")&&s.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return cr(ur(t,e,n,r,i,o),(function(t){return u=!0,t}))}),(function(t){if(u)return t;throw new m({info:{code:F.NotSupported}},"Not supported")}))}))}))})),dr="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";var gr=n(35947),mr=n(71225);const Er=(0,gr.YK)().setApp("@nextcloud/files").detectUser().build();var vr=(t=>(t.Folder="folder",t.File="file",t))(vr||{}),yr=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(yr||{});const br=function(t,e){return null!==t.match(e)},wr=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=yr.NONE&&t.permissions<=yr.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&br(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,mr.fj)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(Tr).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var Tr=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(Tr||{});class Nr{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(Nr.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,n)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,n),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,n)=>this.readonlyAttributes.includes(e)?(Er.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,n)};constructor(t,e){t.mime||(t.mime="application/octet-stream"),wr(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,mr.O0)(this.source.slice(t.length))}get basename(){return(0,mr.P8)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){wr({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return(0,mr.LC)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,mr.pD)(t.slice(e+n.length)||"/")}const t=new URL(this.source);return(0,mr.pD)(t.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",wr({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){wr({...this._data,mtime:t},this._knownDavService),this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){wr({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavResource?void 0!==this._data.permissions?this._data.permissions:yr.NONE:yr.READ}set permissions(t){wr({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return br(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&&(0,mr.pD)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavResource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return t.slice(e+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){wr({...this._data,status:t},this._knownDavService),this._data.status=t}get data(){return structuredClone(this._data)}move(t){wr({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,mr.pD)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,n]of Object.entries(t))try{void 0===n?delete this.attributes[e]:this.attributes[e]=n}catch(t){if(t instanceof TypeError)continue;throw t}}}class Ar extends Nr{get type(){return vr.File}clone(){return new Ar(this.data)}}class Ir extends Nr{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return vr.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new Ir(this.data)}}const Or=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],xr={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},_r=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...Or],window._nc_dav_namespaces={...xr});const n={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(Er.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(Er.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):n[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=n,!0):(Er.error(`${t} namespace unknown`,{prop:t,namespaces:n}),!1)},Pr=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...Or]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},Sr=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...xr}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},Cr=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${Sr()}>\n\t\t\t<d:prop>\n\t\t\t\t${Pr()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},Rr=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${Sr()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${Pr()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,r.HW)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`},Lr=o()?`/files/${(0,i.C)("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}`:`/files/${(0,r.HW)()?.uid}`,Dr=function(){const t=(0,s.dC)("dav");return o()?t.replace("remote.php","public.php"):t}(),$r=function(t=Dr,e={}){const n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=dr,ha1:o,headers:s={},httpAgent:a,httpsAgent:c,password:u,token:l,username:h,withCredentials:p}=e;let f=n;f||(f=h||u?j.Password:j.None);const d={authType:f,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},s),httpAgent:a,httpsAgent:c,password:u,parsing:{attributeNamePrefix:e.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[nn]},remotePath:A(t),remoteURL:t,token:l,username:h,withCredentials:p};return U(d,h,u,l,o),{copyFile:(t,e,n)=>te(d,t,e,n),createDirectory:(t,e)=>yn(d,t,e),createReadStream:(t,e)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,wn().PassThrough);return Tn(t,e,n).then((t=>{t.pipe(r)})).catch((t=>{r.emit("error",t)})),r}(d,t,e),createWriteStream:(t,e,n)=>function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Nn;const i=new(0,wn().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const s=ot({url:I(t.remoteURL,w(e)),method:"PUT",headers:o,data:i,maxRedirects:0},t,n);return it(s,t).then((e=>Kt(t,e))).then((t=>{setTimeout((()=>{r(t)}),0)})).catch((t=>{i.emit("error",t)})),i}(d,t,e,n),customRequest:(t,e)=>An(d,t,e),deleteFile:(t,e)=>In(d,t,e),exists:(t,e)=>On(d,t,e),getDirectoryContents:(t,e)=>_n(d,t,e),getFileContents:(t,e)=>Ln(d,t,e),getFileDownloadLink:t=>function(t,e){let n=I(t.remoteURL,w(e));const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case j.None:break;case j.Password:{const e=R(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new m({info:{code:F.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getFileUploadLink:t=>function(t,e){let n=`${I(t.remoteURL,w(e))}?Content-Type=application/octet-stream`;const r=/^https:/i.test(n)?"https":"http";switch(t.authType){case j.None:break;case j.Password:{const e=R(t.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,`${r}://${e}@`);break}default:throw new m({info:{code:F.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${t.authType}`)}return n}(d,t),getHeaders:()=>Object.assign({},d.headers),getQuota:t=>tr(d,t),lock:(t,e)=>Zn(d,t,e),moveFile:(t,e,n)=>rr(d,t,e,n),putFileContents:(t,e,n)=>sr(d,t,e,n),partialUpdateFileContents:(t,e,n,r,i)=>fr(d,t,e,n,r,i),getDAVCompliance:t=>ar(d,t),search:(t,e)=>nr(d,t,e),setHeaders:t=>{d.headers=Object.assign({},t)},stat:(t,e)=>un(d,t,e),unlock:(t,e,n)=>Qn(d,t,e,n),registerAttributeParser:t=>{d.parsing.attributeParsers.push(t)},registerTagParser:t=>{d.parsing.tagParsers.push(t)}}}(t,{headers:e});function i(t){n.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,r.zo)(i),i((0,r.do)()),W().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),n},jr=(t,e="/",n=Lr)=>{const r=new AbortController;return new a.CancelablePromise((async(i,o,s)=>{s((()=>r.abort()));try{i((await t.getDirectoryContents(`${n}${e}`,{signal:r.signal,details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${Sr()}>\n\t\t\t<d:prop>\n\t\t\t\t${Pr()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>Fr(t,n))))}catch(t){o(t)}}))},Fr=function(t,e=Lr,n=Dr){let i=(0,r.HW)()?.uid;if(o())i=i??"anonymous";else if(!i)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=yr.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=yr.CREATE),t.includes("G")&&(e|=yr.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=yr.UPDATE),t.includes("D")&&(e|=yr.DELETE),t.includes("R")&&(e|=yr.SHARE),e):e}(s?.permissions),c=String(s?.["owner-id"]||i),u=s.fileid||0,l=new Date(Date.parse(t.lastmod)),h=new Date(Date.parse(s.creationdate)),p={id:u,source:`${n}${t.filename}`,mtime:isNaN(l.getTime())||0===l.getTime()?void 0:l,crtime:isNaN(h.getTime())||0===h.getTime()?void 0:h,mime:t.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:u<0?Tr.FAILED:void 0,permissions:a,owner:c,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete p.attributes?.props,"file"===t.type?new Ar(p):new Ir(p)};EventTarget;var Ur,Mr,kr,Br,Gr=n(83141),Vr=n(87485),Wr=n(53334),Xr=n(65606),qr=n(48287).Buffer;function zr(){if(Mr)return Ur;Mr=1;const t="object"==typeof Xr&&Xr.env&&Xr.env.NODE_DEBUG&&/\bsemver\b/i.test(Xr.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return Ur=t}function Hr(){if(Br)return kr;Br=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return kr={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var Yr,Qr,Zr,Kr,Jr,ti,ei,ni,ri,ii,oi,si,ai,ci={exports:{}};function ui(){if(ei)return ti;ei=1;const t=zr(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:n}=Hr(),{safeRe:r,t:i}=(Yr||(Yr=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Hr(),o=zr(),s=(e=t.exports={}).re=[],a=e.safeRe=[],c=e.src=[],u=e.safeSrc=[],l=e.t={};let h=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[p,r]],d=(t,e,n)=>{const r=(t=>{for(const[e,n]of f)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),i=h++;o(t,i,e),l[t]=i,c[i]=e,u[i]=r,s[i]=new RegExp(e,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),d("FULL",`^${c[l.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),d("LOOSE",`^${c[l.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),d("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),d("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[l.COERCE],!0),d("COERCERTLFULL",c[l.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",d("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",d("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ci,ci.exports)),ci.exports),o=function(){if(Zr)return Qr;Zr=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Qr=n=>n?"object"!=typeof n?t:n:e}(),{compareIdentifiers:s}=function(){if(Jr)return Kr;Jr=1;const t=/^[0-9]+$/,e=(e,n)=>{if("number"==typeof e&&"number"==typeof n)return e===n?0:e<n?-1:1;const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};return Kr={compareIdentifiers:e,rcompareIdentifiers:(t,n)=>e(n,t)}}();class a{constructor(s,c){if(c=o(c),s instanceof a){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const u=s.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!u)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<n)return e}return t})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof a)){if("string"==typeof e&&e===this.version)return 0;e=new a(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof a||(t=new a(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(e){if(e instanceof a||(e=new a(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=e.prerelease[n];if(t("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}compareBuild(e){e instanceof a||(e=new a(e,this.options));let n=0;do{const r=this.build[n],i=e.build[n];if(t("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}inc(t,e,n){if(t.startsWith("pre")){if(!e&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(e){const t=`-${e}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!t||t[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,n),this.inc("pre",e,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,n),this.inc("pre",e,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[t];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let r=[e,t];!1===n&&(r=[e]),0===s(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ti=a}!function(){if(ri)return ni;ri=1;const t=ui();ni=(e,n)=>new t(e,n).major}(),function(){if(ai)return si;ai=1;const t=function(){if(oi)return ii;oi=1;const t=ui();return ii=(e,n,r=!1)=>{if(e instanceof t)return e;try{return new t(e,n)}catch(t){if(!r)return null;throw t}},ii}();si=(e,n)=>{const r=t(e,n);return r?r.version:null}}();var li;li||(li=1,function(t){t.parser=function(t,e){return new r(t,e)},t.SAXParser=r,t.SAXStream=o,t.createStream=function(t,e){return new o(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(e,i){if(!(this instanceof r))return new r(e,i);var o=this;!function(t){for(var e=0,r=n.length;e<r;e++)t[n[e]]=""}(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=i||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!e,o.noscript=!(!e&&!o.opt.noscript),o.state=N.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(l)),void 0===o.opt.unquotedAttributeValues&&(o.opt.unquotedAttributeValues=!e),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),I(o,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),r.prototype={end:function(){S(this)},write:function(e){var r=this;if(this.error)throw this.error;if(r.closed)return P(r,"Cannot write after close. Assign an onready handler.");if(null===e)return S(r);"object"==typeof e&&(e=e.toString());for(var i=0,o="";o=M(e,i++),r.c=o,o;)switch(r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++),r.state){case N.BEGIN:if(r.state=N.BEGIN_WHITESPACE,"\ufeff"===o)continue;U(r,o);continue;case N.BEGIN_WHITESPACE:U(r,o);continue;case N.TEXT:if(r.sawRoot&&!r.closedRoot){for(var c=i-1;o&&"<"!==o&&"&"!==o;)(o=M(e,i++))&&r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++);r.textNode+=e.substring(c,i-1)}"<"!==o||r.sawRoot&&r.closedRoot&&!r.strict?(g(o)||r.sawRoot&&!r.closedRoot||C(r,"Text data outside of root node."),"&"===o?r.state=N.TEXT_ENTITY:r.textNode+=o):(r.state=N.OPEN_WAKA,r.startTagPosition=r.position);continue;case N.SCRIPT:"<"===o?r.state=N.SCRIPT_ENDING:r.script+=o;continue;case N.SCRIPT_ENDING:"/"===o?r.state=N.CLOSE_TAG:(r.script+="<"+o,r.state=N.SCRIPT);continue;case N.OPEN_WAKA:if("!"===o)r.state=N.SGML_DECL,r.sgmlDecl="";else if(g(o));else if(v(h,o))r.state=N.OPEN_TAG,r.tagName=o;else if("/"===o)r.state=N.CLOSE_TAG,r.tagName="";else if("?"===o)r.state=N.PROC_INST,r.procInstName=r.procInstBody="";else{if(C(r,"Unencoded <"),r.startTagPosition+1<r.position){var u=r.position-r.startTagPosition;o=new Array(u).join(" ")+o}r.textNode+="<"+o,r.state=N.TEXT}continue;case N.SGML_DECL:if(r.sgmlDecl+o==="--"){r.state=N.COMMENT,r.comment="",r.sgmlDecl="";continue}r.doctype&&!0!==r.doctype&&r.sgmlDecl?(r.state=N.DOCTYPE_DTD,r.doctype+="<!"+r.sgmlDecl+o,r.sgmlDecl=""):(r.sgmlDecl+o).toUpperCase()===s?(O(r,"onopencdata"),r.state=N.CDATA,r.sgmlDecl="",r.cdata=""):(r.sgmlDecl+o).toUpperCase()===a?(r.state=N.DOCTYPE,(r.doctype||r.sawRoot)&&C(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===o?(O(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=N.TEXT):m(o)?(r.state=N.SGML_DECL_QUOTED,r.sgmlDecl+=o):r.sgmlDecl+=o;continue;case N.SGML_DECL_QUOTED:o===r.q&&(r.state=N.SGML_DECL,r.q=""),r.sgmlDecl+=o;continue;case N.DOCTYPE:">"===o?(r.state=N.TEXT,O(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=o,"["===o?r.state=N.DOCTYPE_DTD:m(o)&&(r.state=N.DOCTYPE_QUOTED,r.q=o));continue;case N.DOCTYPE_QUOTED:r.doctype+=o,o===r.q&&(r.q="",r.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:"]"===o?(r.doctype+=o,r.state=N.DOCTYPE):"<"===o?(r.state=N.OPEN_WAKA,r.startTagPosition=r.position):m(o)?(r.doctype+=o,r.state=N.DOCTYPE_DTD_QUOTED,r.q=o):r.doctype+=o;continue;case N.DOCTYPE_DTD_QUOTED:r.doctype+=o,o===r.q&&(r.state=N.DOCTYPE_DTD,r.q="");continue;case N.COMMENT:"-"===o?r.state=N.COMMENT_ENDING:r.comment+=o;continue;case N.COMMENT_ENDING:"-"===o?(r.state=N.COMMENT_ENDED,r.comment=_(r.opt,r.comment),r.comment&&O(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+o,r.state=N.COMMENT);continue;case N.COMMENT_ENDED:">"!==o?(C(r,"Malformed comment"),r.comment+="--"+o,r.state=N.COMMENT):r.doctype&&!0!==r.doctype?r.state=N.DOCTYPE_DTD:r.state=N.TEXT;continue;case N.CDATA:"]"===o?r.state=N.CDATA_ENDING:r.cdata+=o;continue;case N.CDATA_ENDING:"]"===o?r.state=N.CDATA_ENDING_2:(r.cdata+="]"+o,r.state=N.CDATA);continue;case N.CDATA_ENDING_2:">"===o?(r.cdata&&O(r,"oncdata",r.cdata),O(r,"onclosecdata"),r.cdata="",r.state=N.TEXT):"]"===o?r.cdata+="]":(r.cdata+="]]"+o,r.state=N.CDATA);continue;case N.PROC_INST:"?"===o?r.state=N.PROC_INST_ENDING:g(o)?r.state=N.PROC_INST_BODY:r.procInstName+=o;continue;case N.PROC_INST_BODY:if(!r.procInstBody&&g(o))continue;"?"===o?r.state=N.PROC_INST_ENDING:r.procInstBody+=o;continue;case N.PROC_INST_ENDING:">"===o?(O(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=N.TEXT):(r.procInstBody+="?"+o,r.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:v(p,o)?r.tagName+=o:(R(r),">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:(g(o)||C(r,"Invalid character in tag name"),r.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:">"===o?($(r,!0),j(r)):(C(r,"Forward-slash in opening tag not followed by >"),r.state=N.ATTRIB);continue;case N.ATTRIB:if(g(o))continue;">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:v(h,o)?(r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case N.ATTRIB_NAME:"="===o?r.state=N.ATTRIB_VALUE:">"===o?(C(r,"Attribute without value"),r.attribValue=r.attribName,D(r),$(r)):g(o)?r.state=N.ATTRIB_NAME_SAW_WHITE:v(p,o)?r.attribName+=o:C(r,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if("="===o)r.state=N.ATTRIB_VALUE;else{if(g(o))continue;C(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",O(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===o?$(r):v(h,o)?(r.attribName=o,r.state=N.ATTRIB_NAME):(C(r,"Invalid attribute name"),r.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(g(o))continue;m(o)?(r.q=o,r.state=N.ATTRIB_VALUE_QUOTED):(r.opt.unquotedAttributeValues||P(r,"Unquoted attribute value"),r.state=N.ATTRIB_VALUE_UNQUOTED,r.attribValue=o);continue;case N.ATTRIB_VALUE_QUOTED:if(o!==r.q){"&"===o?r.state=N.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=o;continue}D(r),r.q="",r.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:g(o)?r.state=N.ATTRIB:">"===o?$(r):"/"===o?r.state=N.OPEN_TAG_SLASH:v(h,o)?(C(r,"No whitespace between attributes"),r.attribName=o,r.attribValue="",r.state=N.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!E(o)){"&"===o?r.state=N.ATTRIB_VALUE_ENTITY_U:r.attribValue+=o;continue}D(r),">"===o?$(r):r.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(r.tagName)">"===o?j(r):v(p,o)?r.tagName+=o:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=N.SCRIPT):(g(o)||C(r,"Invalid tagname in closing tag"),r.state=N.CLOSE_TAG_SAW_WHITE);else{if(g(o))continue;y(h,o)?r.script?(r.script+="</"+o,r.state=N.SCRIPT):C(r,"Invalid tagname in closing tag."):r.tagName=o}continue;case N.CLOSE_TAG_SAW_WHITE:if(g(o))continue;">"===o?j(r):C(r,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var l,b;switch(r.state){case N.TEXT_ENTITY:l=N.TEXT,b="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:l=N.ATTRIB_VALUE_QUOTED,b="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:l=N.ATTRIB_VALUE_UNQUOTED,b="attribValue"}if(";"===o){var w=F(r);r.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(w)?(r.entity="",r.state=l,r.write(w)):(r[b]+=w,r.entity="",r.state=l)}else v(r.entity.length?d:f,o)?r.entity+=o:(C(r,"Invalid character in entity name"),r[b]+="&"+r.entity+o,r.entity="",r.state=l);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(e){for(var r=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,o=0,s=n.length;o<s;o++){var a=e[n[o]].length;if(a>r)switch(n[o]){case"textNode":x(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:P(e,"Max buffer length exceeded: "+n[o])}i=Math.max(i,a)}var c=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=c+e.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;x(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}e||(e=function(){});var i=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function o(t,n){if(!(this instanceof o))return new o(t,n);e.apply(this),this._parser=new r(t,n),this.writable=!0,this.readable=!0;var s=this;this._parser.onend=function(){s.emit("end")},this._parser.onerror=function(t){s.emit("error",t),s._parser.error=null},this._decoder=null,i.forEach((function(t){Object.defineProperty(s,"on"+t,{get:function(){return s._parser["on"+t]},set:function(e){if(!e)return s.removeAllListeners(t),s._parser["on"+t]=e,e;s.on(t,e)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(e.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof qr&&"function"==typeof qr.isBuffer&&qr.isBuffer(t)){if(!this._decoder){var e=Gr.I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===i.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="[CDATA[",a="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",l={xml:c,xmlns:u},h=/[:_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]/,p=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function m(t){return'"'===t||"'"===t}function E(t){return">"===t||g(t)}function v(t,e){return t.test(e)}function y(t,e){return!v(t,e)}var b,w,T,N=0;for(var A in t.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[A]]=A;function I(t,e,n){t[e]&&t[e](n)}function O(t,e,n){t.textNode&&x(t),I(t,e,n)}function x(t){t.textNode=_(t.opt,t.textNode),t.textNode&&I(t,"ontext",t.textNode),t.textNode=""}function _(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function P(t,e){return x(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,I(t,"onerror",e),t}function S(t){return t.sawRoot&&!t.closedRoot&&C(t,"Unclosed root tag"),t.state!==N.BEGIN&&t.state!==N.BEGIN_WHITESPACE&&t.state!==N.TEXT&&P(t,"Unexpected end"),x(t),t.c="",t.closed=!0,I(t,"onend"),r.call(t,t.strict,t.opt),t}function C(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&P(t,e)}function R(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",n)}function L(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function D(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=L(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==c)C(t,"xml: prefix must be bound to "+c+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==u)C(t,"xmlns: prefix must be bound to "+u+"\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function $(t,e){if(t.opt.xmlns){var n=t.tag,r=L(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(C(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){O(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,s=t.attribList.length;o<s;o++){var a=t.attribList[o],c=a[0],u=a[1],l=L(c,!0),h=l.prefix,p=l.local,f=""===h?"":n.ns[h]||"",d={name:c,value:u,prefix:h,local:p,uri:f};h&&"xmlns"!==h&&!f&&(C(t,"Unbound namespace prefix: "+JSON.stringify(h)),d.uri=h),t.tag.attributes[c]=d,O(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=N.TEXT:t.state=N.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function j(t){if(!t.tagName)return C(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=N.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=N.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)C(t,"Unexpected close tag");if(e<0)return C(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=N.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];O(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=N.TEXT}function F(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(C(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function U(t,e){"<"===e?(t.state=N.OPEN_WAKA,t.startTagPosition=t.position):g(e)||(C(t,"Non-whitespace before first tag."),t.textNode=e,t.state=N.TEXT)}function M(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}N=t.STATE,String.fromCodePoint||(b=String.fromCharCode,w=Math.floor,T=function(){var t,e,n=[],r=-1,i=arguments.length;if(!i)return"";for(var o="";++r<i;){var s=Number(arguments[r]);if(!isFinite(s)||s<0||s>1114111||w(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?n.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,n.push(t,e)),(r+1===i||n.length>16384)&&(o+=b.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}({}));var hi=(t=>(t.ReservedName="reserved name",t.Character="character",t.Extension="extension",t))(hi||{});class pi extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function fi(t){const e=(0,Vr.F)().files,n=e.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const e of n)if(t.includes(e))throw new pi({segment:e,reason:"character",filename:t});if(t=t.toLocaleLowerCase(),(e.forbidden_filenames??[".htaccess"]).includes(t))throw new pi({filename:t,segment:t,reason:"reserved name"});const r=t.indexOf(".",1),i=t.substring(0,-1===r?void 0:r);if((e.forbidden_filename_basenames??[]).includes(i))throw new pi({filename:t,segment:i,reason:"reserved name"});const o=e.forbidden_filename_extensions??[".part",".filepart"];for(const e of o)if(t.length>e.length&&t.endsWith(e))throw new pi({segment:e,reason:"extension",filename:t})}const di=["B","KB","MB","GB","TB","PB"],gi=["B","KiB","MiB","GiB","TiB","PiB"];function mi(t,e=!1,n=!1,r=!1){n=n&&!r,"string"==typeof t&&(t=Number(t));let i=t>0?Math.floor(Math.log(t)/Math.log(r?1e3:1024)):0;i=Math.min((n?gi.length:di.length)-1,i);const o=n?gi[i]:di[i];let s=(t/Math.pow(r?1e3:1024,i)).toFixed(1);return!0===e&&0===i?("0.0"!==s?"< 1 ":"0 ")+(n?gi[1]:di[1]):(s=i<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,Wr.lO)()),s+" "+o)}function Ei(t){return t instanceof Date?t.toISOString():String(t)}function vi(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e},r=[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]??t.attributes[n.sortingMode]]:[],t=>function(t){const e=t.displayname||t.attributes?.displayname||t.basename||"";return t.type===vr.Folder?e:e.lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e}(t),t=>t.basename];return function(t,e,n){n=n??[];const r=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),i=Intl.Collator([(0,Wr.Z0)(),(0,Wr.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[o,s]of e.entries()){const e=i.compare(Ei(s(t)),Ei(s(n)));if(0!==e)return e*r[o]}return 0}))}(t,r,[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}},71225(t,e,n){"use strict";function r(t){return t?t.split("/").map(encodeURIComponent).join("/"):t}function i(t,e){return t=t.replace(/\\/g,"/").replace(/\/+$/g,"").replace(/.*\//,""),e&&e!==t&&t.endsWith(e)?t.substring(0,t.length-e.length):t}function o(t){const e=(t=t.replaceAll(/\\/g,"/")).split("/");return e.length<=1?".":(e.pop(),1===e.length&&""===e[0]?"/":e.join("/"))}function s(t){const e=i(t),n=e.lastIndexOf(".");return n>0?e.substring(n):""}function a(...t){if(arguments.length<1)return"";const e=t.filter((t=>t.length>0));if(e.length<1)return"";const n=e[e.length-1],r="/"===e[0].charAt(0),i="/"===n.charAt(n.length-1),o=e.reduce(((t,e)=>t.concat(e.split("/"))),[]);let s=!r;const a=o.reduce(((t,e)=>""===e?t:s?(s=!1,t+e):t+"/"+e),"");return i?a+"/":a}n.d(e,{LC:()=>s,O0:()=>r,P8:()=>i,fj:()=>a,pD:()=>o})},82182(t,e,n){"use strict";n.d(e,{A:()=>r.N});var r=n(63070)}}]); //# sourceMappingURL=mail.6886.bbc5209e62184599579a.js.map
Save File
Cancel