UNPKG

webdav

Version:
2 lines 132 kB
/*! For license information please see index.js.LICENSE.txt */ import"entities";var t={2(t){function e(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var s=r(t,e,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+t.length,s[1]),post:i.slice(s[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,s,o,a,h=n.indexOf(t),l=n.indexOf(e,h+1),u=h;if(h>=0&&l>0){for(r=[],s=n.length;u>=0&&!a;)u==h?(r.push(u),h=n.indexOf(t,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<s&&(s=i,o=l),l=n.indexOf(e,u+1)),u=h<l&&h>=0?h:l;r.length&&(a=[s,o])}return a}t.exports=e,e.range=r},101(t,e,n){var r;t=n.nmd(t),function(){var i=(t&&t.exports,"object"==typeof global&&global);i.global!==i&&i.window;var s=function(t){this.message=t};(s.prototype=new Error).name="InvalidCharacterError";var o=function(t){throw new s(t)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=/[\t\n\f\r ]/g,l={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,s=t.length%3,h="",l=-1,u=t.length-s;++l<u;)e=t.charCodeAt(l)<<16,n=t.charCodeAt(++l)<<8,r=t.charCodeAt(++l),h+=a.charAt((i=e+n+r)>>18&63)+a.charAt(i>>12&63)+a.charAt(i>>6&63)+a.charAt(63&i);return 2==s?(e=t.charCodeAt(l)<<8,n=t.charCodeAt(++l),h+=a.charAt((i=e+n)>>10)+a.charAt(i>>4&63)+a.charAt(i<<2&63)+"="):1==s&&(i=t.charCodeAt(l),h+=a.charAt(i>>2)+a.charAt(i<<4&63)+"=="),h},decode:function(t){var e=(t=String(t).replace(h,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,s="",l=-1;++l<e;)r=a.indexOf(t.charAt(l)),n=i%4?64*n+r:r,i++%4&&(s+=String.fromCharCode(255&n>>(-2*i&6)));return s},version:"1.0.0"};void 0===(r=function(){return l}.call(e,n,e,t))||(t.exports=r)}()},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}},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},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],s=0;s<4;s++)8*r+6*s<=8*t.length?n.push(e.charAt(i>>>6*(3-s)&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},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)}},542(t,e,n){!function(){var e=n(298),r=n(526).utf8,i=n(135),s=n(526).bin,o=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?s.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),h=8*t.length,l=1732584193,u=-271733879,c=-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[h>>>5]|=128<<h%32,a[14+(h+64>>>9<<4)]=h;var d=o._ff,g=o._gg,m=o._hh,y=o._ii;for(f=0;f<a.length;f+=16){var b=l,v=u,w=c,x=p;l=d(l,u,c,p,a[f+0],7,-680876936),p=d(p,l,u,c,a[f+1],12,-389564586),c=d(c,p,l,u,a[f+2],17,606105819),u=d(u,c,p,l,a[f+3],22,-1044525330),l=d(l,u,c,p,a[f+4],7,-176418897),p=d(p,l,u,c,a[f+5],12,1200080426),c=d(c,p,l,u,a[f+6],17,-1473231341),u=d(u,c,p,l,a[f+7],22,-45705983),l=d(l,u,c,p,a[f+8],7,1770035416),p=d(p,l,u,c,a[f+9],12,-1958414417),c=d(c,p,l,u,a[f+10],17,-42063),u=d(u,c,p,l,a[f+11],22,-1990404162),l=d(l,u,c,p,a[f+12],7,1804603682),p=d(p,l,u,c,a[f+13],12,-40341101),c=d(c,p,l,u,a[f+14],17,-1502002290),l=g(l,u=d(u,c,p,l,a[f+15],22,1236535329),c,p,a[f+1],5,-165796510),p=g(p,l,u,c,a[f+6],9,-1069501632),c=g(c,p,l,u,a[f+11],14,643717713),u=g(u,c,p,l,a[f+0],20,-373897302),l=g(l,u,c,p,a[f+5],5,-701558691),p=g(p,l,u,c,a[f+10],9,38016083),c=g(c,p,l,u,a[f+15],14,-660478335),u=g(u,c,p,l,a[f+4],20,-405537848),l=g(l,u,c,p,a[f+9],5,568446438),p=g(p,l,u,c,a[f+14],9,-1019803690),c=g(c,p,l,u,a[f+3],14,-187363961),u=g(u,c,p,l,a[f+8],20,1163531501),l=g(l,u,c,p,a[f+13],5,-1444681467),p=g(p,l,u,c,a[f+2],9,-51403784),c=g(c,p,l,u,a[f+7],14,1735328473),l=m(l,u=g(u,c,p,l,a[f+12],20,-1926607734),c,p,a[f+5],4,-378558),p=m(p,l,u,c,a[f+8],11,-2022574463),c=m(c,p,l,u,a[f+11],16,1839030562),u=m(u,c,p,l,a[f+14],23,-35309556),l=m(l,u,c,p,a[f+1],4,-1530992060),p=m(p,l,u,c,a[f+4],11,1272893353),c=m(c,p,l,u,a[f+7],16,-155497632),u=m(u,c,p,l,a[f+10],23,-1094730640),l=m(l,u,c,p,a[f+13],4,681279174),p=m(p,l,u,c,a[f+0],11,-358537222),c=m(c,p,l,u,a[f+3],16,-722521979),u=m(u,c,p,l,a[f+6],23,76029189),l=m(l,u,c,p,a[f+9],4,-640364487),p=m(p,l,u,c,a[f+12],11,-421815835),c=m(c,p,l,u,a[f+15],16,530742520),l=y(l,u=m(u,c,p,l,a[f+2],23,-995338651),c,p,a[f+0],6,-198630844),p=y(p,l,u,c,a[f+7],10,1126891415),c=y(c,p,l,u,a[f+14],15,-1416354905),u=y(u,c,p,l,a[f+5],21,-57434055),l=y(l,u,c,p,a[f+12],6,1700485571),p=y(p,l,u,c,a[f+3],10,-1894986606),c=y(c,p,l,u,a[f+10],15,-1051523),u=y(u,c,p,l,a[f+1],21,-2054922799),l=y(l,u,c,p,a[f+8],6,1873313359),p=y(p,l,u,c,a[f+15],10,-30611744),c=y(c,p,l,u,a[f+6],15,-1560198380),u=y(u,c,p,l,a[f+13],21,1309151649),l=y(l,u,c,p,a[f+4],6,-145523070),p=y(p,l,u,c,a[f+11],10,-1120210379),c=y(c,p,l,u,a[f+2],15,718787259),u=y(u,c,p,l,a[f+9],21,-343485551),l=l+b>>>0,u=u+v>>>0,c=c+w>>>0,p=p+x>>>0}return e.endian([l,u,c,p])};o._ff=function(t,e,n,r,i,s,o){var a=t+(e&n|~e&r)+(i>>>0)+o;return(a<<s|a>>>32-s)+e},o._gg=function(t,e,n,r,i,s,o){var a=t+(e&r|n&~r)+(i>>>0)+o;return(a<<s|a>>>32-s)+e},o._hh=function(t,e,n,r,i,s,o){var a=t+(e^n^r)+(i>>>0)+o;return(a<<s|a>>>32-s)+e},o._ii=function(t,e,n,r,i,s,o){var a=t+(n^(e|~r))+(i>>>0)+o;return(a<<s|a>>>32-s)+e},o._blocksize=16,o._digestsize=16,t.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(o(t,n));return n&&n.asBytes?r:n&&n.asString?s.bytesToString(r):e.bytesToHex(r)}}()},285(t,e,n){var r=n(2);t.exports=function(t,e){if(!t)return[];var n=null==(e=e||{}).max?1/0:e.max;return"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),m(function(t){return t.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)}(t),n,!0).map(u)};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(i).join("\\").split(s).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function c(t){if(!t)return[""];var e=[],n=r("{","}",t);if(!n)return t.split(",");var i=n.pre,s=n.body,o=n.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var h=c(o);return o.length&&(a[a.length-1]+=h.shift(),a.push.apply(a,h)),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,n){var i=[],s=r("{","}",t);if(!s)return[t];var a=s.pre,h=s.post.length?m(s.post,e,!1):[""];if(/\$$/.test(s.pre))for(var u=0;u<h.length&&u<e;u++){var y=a+"{"+s.body+"}"+h[u];i.push(y)}else{var b,v,w=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),x=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),N=w||x,E=s.body.indexOf(",")>=0;if(!N&&!E)return s.post.match(/,(?!,).*\}/)?m(t=s.pre+"{"+s.body+o+s.post,e,!0):[t];if(N)b=s.body.split(/\.\./);else if(1===(b=c(s.body)).length&&1===(b=m(b[0],e,!1).map(p)).length)return h.map((function(t){return s.pre+b[0]+t}));if(N){var A=l(b[0]),S=l(b[1]),P=Math.max(b[0].length,b[1].length),T=3==b.length?Math.max(Math.abs(l(b[2])),1):1,O=d;S<A&&(T*=-1,O=g);var C=b.some(f);v=[];for(var _=A;O(_,S);_+=T){var $;if(x)"\\"===($=String.fromCharCode(_))&&($="");else if($=String(_),C){var j=P-$.length;if(j>0){var I=new Array(j+1).join("0");$=_<0?"-"+I+$.slice(1):I+$}}v.push($)}}else{v=[];for(var M=0;M<b.length;M++)v.push.apply(v,m(b[M],e,!1))}for(M=0;M<v.length;M++)for(u=0;u<h.length&&i.length<e;u++)y=a+v[M]+h[u],(!n||N||y)&&i.push(y)}return i}},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,o)}function o(){return r(t,arguments,s(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,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 s=new(Function.bind.apply(t,r));return n&&i(s,n.prototype),s},r.apply(null,arguments)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var o=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,s(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("."),s=i.length,o=function(e){var n=i[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,s){var o=i.slice(e+1);return o.length>0?a(n,o.join("."),r):r(t,s,i,e)}))};var s=i.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(s,") is not an array"))}t=r(t,n,i,e)},h=0;h<s;h++){var l=o(h);if("object"===e(l))return l.v}return t}function h(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 o("Attempting to mutate Object.prototype");if(!t[e]){var s=Number.isInteger(Number(n[i+1])),a="+"===n[i+1];t[e]=s||a?[]:{}}return h(n,i)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof o)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,s){if(!h(n,s))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 s=!1,o=!1;return a(t,n,(function(t,n,i,a){return s=s||t===r||!!t&&t[n]===r,o=h(i,a)&&"object"===e(t)&&n in t,t&&t[n]})),i.validPath?s&&o:s}catch(t){return!1}},ObjectPrototypeMutationError:o}},47(t,e,n){var r=n(410),i=function(t){return"string"==typeof t};function s(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 o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function h(t){return o.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]:process.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=s(t.split("/"),!e).join("/"))||"."},a.normalize=function(t){var e=a.isAbsolute(t),n="/"===t.substr(-1);return(t=s(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("/")),s=Math.min(r.length,i.length),o=s,h=0;h<s;h++)if(r[h]!==i[h]){o=h;break}var l=[];for(h=o;h<r.length;h++)l.push("..");return(l=l.concat(i.slice(o))).join("/")},a._makeLong=function(t){return t},a.dirname=function(t){var e=h(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=h(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},a.extname=function(t){return h(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=h(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},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,s,o=[];for(s in"string"!=typeof e&&(e="?"),t)if(n.call(t,s)){if((r=t[s])||null!=r&&!isNaN(r)||(r=""),s=i(s),r=i(r),null===s||null===r)continue;o.push(s+"="+r)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var s=r(e[1]),o=r(e[2]);null===s||null===o||s in i||(i[s]=o)}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),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function c(t){return(t||"").toString().replace(s,"")}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 global?global:"undefined"!=typeof self?self:{}).location||{},r={},i=typeof(t=t||n);if("blob:"===t.protocol)r=new y(unescape(t.pathname),{});else if("string"===i)for(e in r=new y(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=c(t)).replace(o,""),e=e||{};var n,r=l.exec(t),i=r[1]?r[1].toLowerCase():"",s=!!r[2],a=!!r[3],h=0;return s?a?(n=r[2]+r[3]+r[4],h=r[2].length+r[3].length):(n=r[2]+r[4],h=r[2].length):a?(n=r[3]+r[4],h=r[3].length):n=r[4],"file:"===i?h>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?s&&(n=n.slice(2)):h>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:s||g(i),slashesCount:h,rest:n}}function y(t,e,n){if(t=(t=c(t)).replace(o,""),!(this instanceof y))return new y(t,e,n);var s,a,h,l,f,b,v=p.slice(),w=typeof e,x=this,N=0;for("object"!==w&&"string"!==w&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),s=!(a=m(t||"",e=d(e))).protocol&&!a.slashes,x.slashes=a.slashes||s&&e.slashes,x.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(x.protocol)))&&(v[3]=[/(.*)/,"pathname"]);N<v.length;N++)"function"!=typeof(l=v[N])?(h=l[0],b=l[1],h!=h?x[b]=t:"string"==typeof h?~(f="@"===h?t.lastIndexOf(h):t.indexOf(h))&&("number"==typeof l[2]?(x[b]=t.slice(0,f),t=t.slice(f+l[2])):(x[b]=t.slice(f),t=t.slice(0,f))):(f=h.exec(t))&&(x[b]=f[1],t=t.slice(0,f.index)),x[b]=x[b]||s&&l[3]&&e[b]||"",l[4]&&(x[b]=x[b].toLowerCase())):t=l(t,x);n&&(x.query=n(x.query)),s&&e.slashes&&"/"!==x.pathname.charAt(0)&&(""!==x.pathname||""!==e.pathname)&&(x.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],s=!1,o=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),o++):o&&(0===r&&(s=!0),n.splice(r,1),o--);return s&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(x.pathname,e.pathname)),"/"!==x.pathname.charAt(0)&&g(x.protocol)&&(x.pathname="/"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=""),x.username=x.password="",x.auth&&(~(f=x.auth.indexOf(":"))?(x.username=x.auth.slice(0,f),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(f+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.auth=x.password?x.username+":"+x.password:x.username),x.origin="file:"!==x.protocol&&g(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString()}y.prototype={set:function(t,e,n){var s=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),s[t]=e;break;case"port":s[t]=e,r(e,s.protocol)?e&&(s.host=s.hostname+":"+e):(s.host=s.hostname,s[t]="");break;case"hostname":s[t]=e,s.port&&(e+=":"+s.port),s.host=e;break;case"host":s[t]=e,h.test(e)?(e=e.split(":"),s.port=e.pop(),s.hostname=e.join(":")):(s.hostname=e,s.port="");break;case"protocol":s.protocol=e.toLowerCase(),s.slashes=!n;break;case"pathname":case"hash":if(e){var o="pathname"===t?"/":"#";s[t]=e.charAt(0)!==o?o+e:e}else s[t]=e;break;case"username":case"password":s[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(s.username=e.slice(0,a),s.username=encodeURIComponent(decodeURIComponent(s.username)),s.password=e.slice(a+1),s.password=encodeURIComponent(decodeURIComponent(s.password))):s.username=encodeURIComponent(decodeURIComponent(e))}for(var l=0;l<p.length;l++){var u=p[l];u[4]&&(s[u[1]]=s[u[1]].toLowerCase())}return s.auth=s.password?s.username+":"+s.password:s.username,s.origin="file:"!==s.protocol&&g(s.protocol)&&s.host?s.protocol+"//"+s.host:"null",s.href=s.toString(),s},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,s=n.protocol;s&&":"!==s.charAt(s.length-1)&&(s+=":");var o=s+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(o+="@"),(":"===r[r.length-1]||h.test(n.hostname)&&!n.port)&&(r+=":"),o+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},y.extractProtocol=m,y.location=d,y.trimLeft=c,y.qs=i,t.exports=y},410(){},388(){},805(){},345(){},800(){}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(737),i=n.n(r);function s(t){if(!o(t))throw new Error("Parameter was not an error")}function o(t){return!!t&&"object"==typeof t&&"[object Error]"===(e=t,Object.prototype.toString.call(e))||t instanceof Error;var e}class a extends Error{constructor(t,e){const n=[...arguments],{options:r,shortMessage:i}=function(t){let e,n="";if(0===t.length)e={};else if(o(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 s=i;if(r.cause&&(s=`${s}: ${r.cause.message}`),super(s),this.message=s,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 s(t),t._cause&&o(t._cause)?t._cause:null}static fullStack(t){s(t);const e=a.cause(t);return e?`${t.stack}\ncaused by: ${a.fullStack(e)}`:t.stack??""}static info(t){s(t);const e={},n=a.cause(t);return n&&Object.assign(e,a.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 h=n(47),l=n.n(h);const u="__PATH_SEPARATOR_POSIX__",c="__PATH_SEPARATOR_WINDOWS__";function p(t){try{const e=t.replace(/\//g,u).replace(/\\\\/g,c);return encodeURIComponent(e).split(c).join("\\\\").split(u).join("/")}catch(t){throw new a(t,"Failed encoding path")}}function f(t){return t.startsWith("/")?t:"/"+t}function d(t){let e=t;return"/"!==e[0]&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function g(t){let e=new(i())(t).pathname;return e.length<=0&&(e="/"),d(e)}function m(){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 s=e.join("/"),o=(s=s.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return o.shift()+(o.length>0?"?":"")+o.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 y=n(542),b=n.n(y);function v(t,e){const n=t.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",o=`00000000${e.nc}`.slice(-8),a=function(t,e,n,r,i,s,o){const a=o||b()(`${e}:${n}:${r}`);return t&&"md5-sess"===t.toLowerCase()?b()(`${a}:${i}:${s}`):a}(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),h=b()(`${i}:${r}`),l=s?b()(`${a}:${e.nonce}:${o}:${e.cnonce}:${s}:${h}`):b()(`${a}:${e.nonce}:${h}`),u={username:e.username,realm:e.realm,nonce:e.nonce,uri:r,qop:s,response:l,nc:o,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},c=[];for(const t in u)u[t]&&("qop"===t||"nc"===t||"algorithm"===t?c.push(`${t}=${u[t]}`):c.push(`${t}="${u[t]}"`));return`Digest ${c.join(", ")}`}function w(t){return"digest"===(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var x=n(101),N=n.n(x);function E(t){return N().decode(t)}function A(t,e){var n;return`Basic ${n=`${t}:${e}`,N().encode(n)}`}const S="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,P=S.fetch.bind(S),T=(S.Headers,S.Request),O=S.Response;let C=function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t}({}),_=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 $(t,e,n,r,i){switch(t.authType){case C.Auto:e&&n&&(t.headers.Authorization=A(e,n));break;case C.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 C.None:break;case C.Password:t.headers.Authorization=A(e,n);break;case C.Token:t.headers.Authorization=`${(s=r).token_type} ${s.access_token}`;break;default:throw new a({info:{code:_.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var s}n(345),n(800);const j="@@HOTPATCHER",I=()=>{};function M(t){return{original:t,methods:[t],final:!1}}class R{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=j}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__!==j)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)||I;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 s=this;for(;e.length>0;)i=[e.shift().apply(s,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]=M(e);else if(this.isPatched(t)){const{original:n}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(M(e),{original:n})}else this.configuration.registry[t]=M(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 k=null;function L(){return k||(k=new R),k}function D(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 U(){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?F(r,t):D(t)}return r}function F(t,e){const n=D(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]?F(n[t],e[t]):D(e[t]):n[t]=e[t]:n[t]=e[t]})),n}function V(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}function W(){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)),{})}n(805);const B="function"==typeof ArrayBuffer,{toString:G}=Object.prototype;function z(t){return B&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===G.call(t))}function q(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function H(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 Y(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const X=H((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=U(t,{headers:{Authorization:v(t,e)}})),Y(Q(t),(function(n){let r=!1;return i=function(t){return r?t:n},(s=function(){if(401==n.status)return e.hasDigestAuth=function(t,e){if(!w(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 Y(Q(t=U(t,{headers:{Authorization:v(t,e)}})),(function(t){return 401==t.status?e.hasDigestAuth=!1:e.nc++,r=!0,t}))}();e.nc++}())&&s.then?s.then(i):i(s);var i,s}))})),Z=H((function(t,e){return Y(Q(t),(function(n){return n.ok?(e.authType=C.Password,n):401==n.status&&w(n)?(e.authType=C.Digest,$(e,e.username,e.password,void 0,void 0),t._digest=e.digest,X(t)):n}))})),J=H((function(t,e){return e.authType===C.Auto?Z(t,e):t._digest?X(t):Q(t)}));function K(t,e,n){const r=D(t);return r.headers=W(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 Q(t){const e=L();return e.patchInline("request",(t=>e.patchInline("fetch",P,t.url,function(t){let e={};const n={method:t.method};if(t.headers&&(e=W(e,t.headers)),void 0!==t.data){const[r,i]=function(t){if("string"==typeof t)return[t,{}];if(q(t))return[t,{}];if(z(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=W(e,i)}return t.signal&&(n.signal=t.signal),t.withCredentials&&(n.credentials="include"),n.headers=e,n}(t))),t)}var tt=n(285);const et=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},nt={"[: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]},rt=t=>t.replace(/[[\]\\-]/g,"\\$&"),it=t=>t.join(""),st=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],i=[];let s=n+1,o=!1,a=!1,h=!1,l=!1,u=n,c="";t:for(;s<t.length;){const e=t.charAt(s);if("!"!==e&&"^"!==e||s!==n+1){if("]"===e&&o&&!h){u=s+1;break}if(o=!0,"\\"!==e||h){if("["===e&&!h)for(const[e,[o,h,l]]of Object.entries(nt))if(t.startsWith(e,s)){if(c)return["$.",!1,t.length-n,!0];s+=e.length,l?i.push(o):r.push(o),a=a||h;continue t}h=!1,c?(e>c?r.push(rt(c)+"-"+rt(e)):e===c&&r.push(rt(e)),c="",s++):t.startsWith("-]",s+1)?(r.push(rt(e+"-")),s+=2):t.startsWith("-",s+1)?(c=e,s+=2):(r.push(rt(e)),s++)}else h=!0,s++}else l=!0,s++}if(u<s)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])&&!l){return[(p=2===r[0].length?r[0].slice(-1):r[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var p;const f="["+(l?"^":"")+it(r)+"]",d="["+(l?"":"^")+it(i)+"]";return[r.length&&i.length?"("+f+"|"+d+")":r.length?f:d,a,u-n,!0]},ot=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")};var at;const ht=new Set(["!","?","+","*","@"]),lt=t=>ht.has(t),ut=t=>lt(t.type),ct=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),pt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ft=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),dt=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),gt="(?!\\.)",mt=new Set(["[","."]),yt=new Set(["..","."]),bt=new Set("().*{}+?[]^$\\!"),vt="[^/]",wt=vt+"*?",xt=vt+"+?";class Nt{type;#t;#e;#n=!1;#r=[];#i;#s;#o;#a=!1;#h;#l;#u=!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.#h=this.#t===this?n:this.#t.#h,this.#o=this.#t===this?[]:this.#t.#o,"!"!==t||this.#t.#a||this.#o.push(this),this.#s=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.#l?this.#l:this.type?this.#l=this.type+"("+this.#r.map((t=>String(t))).join("|")+")":this.#l=this.#r.map((t=>String(t))).join("")}#c(){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.#o.pop();){if("!"!==t.type)continue;let e=t,n=e.#i;for(;n;){for(let r=e.#s+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 at&&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.#s)return!0;const t=this.#i;for(let e=0;e<this.#s;e++){const n=t.#r[e];if(!(n instanceof at&&"!"===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.#s===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new at(this.type,t);for(const t of this.#r)e.copyIn(t);return e}static#p(t,e,n,r,i){const s=r.maxExtglobRecursion??2;let o=!1,a=!1,h=-1,l=!1;if(null===e.type){let u=n,c="";for(;u<t.length;){const n=t.charAt(u++);if(o||"\\"===n)o=!o,c+=n;else if(a)u===h+1?"^"!==n&&"!"!==n||(l=!0):"]"!==n||u===h+2&&l||(a=!1),c+=n;else if("["!==n)if(!r.noext&&lt(n)&&"("===t.charAt(u)&&i<=s){e.push(c),c="";const s=new at(n,e);u=at.#p(t,s,u,r,i+1),e.push(s)}else c+=n;else a=!0,h=u,l=!1,c+=n}return e.push(c),u}let u=n+1,c=new at(null,e);const p=[];let f="";for(;u<t.length;){const n=t.charAt(u++);if(o||"\\"===n)o=!o,f+=n;else if(a)u===h+1?"^"!==n&&"!"!==n||(l=!0):"]"!==n||u===h+2&&l||(a=!1),f+=n;else if("["!==n)if(lt(n)&&"("===t.charAt(u)&&(i<=s||e&&e.#f(n))){const s=e&&e.#f(n)?0:1;c.push(f),f="";const o=new at(n,c);c.push(o),u=at.#p(t,o,u,r,i+s)}else if("|"!==n){if(")"===n)return""===f&&0===e.#r.length&&(e.#u=!0),c.push(f),f="",e.push(...p,c),u;f+=n}else c.push(f),f="",p.push(c),c=new at(null,e);else a=!0,h=u,l=!1,f+=n}return e.type=null,e.#e=void 0,e.#r=[t.substring(n-1)],u}#d(t){return this.#g(t,pt)}#g(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;if(!t||"object"!=typeof t||null!==t.type||1!==t.#r.length||null===this.type)return!1;const n=t.#r[0];return!(!n||"object"!=typeof n||null===n.type)&&this.#f(n.type,e)}#f(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft;return!!e.get(this.type)?.includes(t)}#m(t,e){const n=t.#r[0],r=new at(null,n,this.options);r.#r.push(""),n.push(r),this.#y(t,e)}#y(t,e){const n=t.#r[0];this.#r.splice(e,1,...n.#r);for(const t of n.#r)"object"==typeof t&&(t.#i=this);this.#l=void 0}#b(t){const e=dt.get(this.type);return!!e?.has(t)}#v(t){if(!t||"object"!=typeof t||null!==t.type||1!==t.#r.length||null===this.type||1!==this.#r.length)return!1;const e=t.#r[0];return!(!e||"object"!=typeof e||null===e.type)&&this.#b(e.type)}#w(t){const e=dt.get(this.type),n=t.#r[0],r=e?.get(n.type);if(!r)return!1;this.#r=n.#r;for(const t of this.#r)"object"==typeof t&&(t.#i=this);this.type=r,this.#l=void 0,this.#u=!1}#x(){if(ut(this)){let t=0,e=!1;do{e=!0;for(let t=0;t<this.#r.length;t++){const n=this.#r[t];"object"==typeof n&&(n.#x(),this.#g(n)?(e=!1,this.#y(n,t)):this.#d(n)?(e=!1,this.#m(n,t)):this.#v(n)&&(e=!1,this.#w(n)))}}while(!e&&++t<10)}else for(const t of this.#r)"object"==typeof t&&t.#x();this.#l=void 0}static fromGlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new at(null,void 0,e);return at.#p(t,n,0,e,0),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.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const s=(this.#h.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,s),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){const e=t??!!this.#h.dot;if(this.#t===this&&(this.#x(),this.#c()),!ut(this)){const n=this.isStart()&&this.isEnd(),r=this.#r.map((e=>{const[r,i,s,o]="string"==typeof e?at.#N(e,this.#e,n):e.toRegExpSource(t);return this.#e=this.#e||s,this.#n=this.#n||o,r})).join("");let i="";if(this.isStart()&&"string"==typeof this.#r[0]&&(1!==this.#r.length||!yt.has(this.#r[0]))){const n=mt,s=e&&n.has(r.charAt(0))||r.startsWith("\\.")&&n.has(r.charAt(2))||r.startsWith("\\.\\.")&&n.has(r.charAt(4)),o=!e&&!t&&n.has(r.charAt(0));i=s?"(?!(?:^|/)\\.\\.?(?:$|/))":o?gt:""}let s="";return this.isEnd()&&this.#t.#a&&"!"===this.#i?.type&&(s="(?:$|\\/)"),[i+r+s,ot(r),this.#e=!!this.#e,this.#n]}const n="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#E(e);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const t=this.toString(),e=this;return e.#r=[t],e.type=null,e.#e=void 0,[t,ot(this.toString()),!1,!1]}let s=!n||t||e?"":this.#E(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let o="";return o="!"===this.type&&this.#u?(this.isStart()&&!e?gt:"")+xt:r+i+("!"===this.type?"))"+(!this.isStart()||e||t?"":gt)+wt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`),[o,ot(i),this.#e=!!this.#e,this.#n]}#E(t){return this.#r.map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,r,i,s]=e.toRegExpSource(t);return this.#n=this.#n||s,n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#N(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i="",s=!1,o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(r)r=!1,i+=(bt.has(h)?"\\":"")+h,o=!1;else if("\\"!==h){if("["===h){const[n,r,h,l]=st(t,a);if(h){i+=n,s=s||r,a+=h-1,e=e||l,o=!1;continue}}if("*"!==h)o=!1,"?"!==h?i+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=vt,e=!0);else{if(o)continue;o=!0,i+=n&&/^[*]+$/.test(t)?xt:wt,e=!0}}else a===t.length-1?i+="\\\\":r=!0}return[i,ot(t),!!e,s]}}at=Nt;const Et=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return et(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Xt(e,n).match(t)},At=/^\*+([^+@!?\*\[\(]*)$/,St=t=>e=>!e.startsWith(".")&&e.endsWith(t),Pt=t=>e=>e.endsWith(t),Tt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Ot=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Ct=/^\*+\.\*+$/,_t=t=>!t.startsWith(".")&&t.includes("."),$t=t=>"."!==t&&".."!==t&&t.includes("."),jt=/^\.\*+$/,It=t=>"."!==t&&".."!==t&&t.startsWith("."),Mt=/^\*+$/,Rt=t=>0!==t.length&&!t.startsWith("."),kt=t=>0!==t.length&&"."!==t&&".."!==t,Lt=/^\?+([^+@!?\*\[\(]*)?$/,Dt=t=>{let[e,n=""]=t;const r=Wt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},Ut=t=>{let[e,n=""]=t;const r=Bt([e]);return n?(n=n.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(n)):r},Ft=t=>{let[e,n=""]=t;const r=Bt([e]);return n?t=>r(t)&&t.endsWith(n):r},Vt=t=>{let[e,n=""]=t;const r=Wt([e]);return n?t=>r(t)&&t.endsWith(n):r},Wt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&!t.startsWith(".")},Bt=t=>{let[e]=t;const n=e.length;return t=>t.length===n&&"."!==t&&".."!==t},Gt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Et.sep="win32"===Gt?"\\":"/";const zt=Symbol("globstar **");Et.GLOBSTAR=zt,Et.filter=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>Et(n,t,e)};const qt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},t,e)};Et.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Et;const e=Et;return Object.assign((function(n,r){return e(n,r,qt(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(e){super(e,qt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return e.defaults(qt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n){super(e,n,qt(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,qt(t,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.unescape(n,qt(t,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.escape(n,qt(t,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(n,qt(t,r))},defaults:n=>e.defaults(qt(t,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.makeRe(n,qt(t,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.braceExpand(n,qt(t,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.match(n,r,qt(t,i))},sep:e.sep,GLOBSTAR:zt})};const Ht=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return et(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:tt(t)};Et.braceExpand=Ht,Et.makeRe=function(t){return new Xt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},Et.match=function(t,e){const n=new Xt(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 Xt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};et(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||Gt,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]||(