87 lines
177 KiB
JavaScript
87 lines
177 KiB
JavaScript
import{l as lr,W as Zt,X as ne,Y as Wr,T as Je,Z as zr,$ as Yr,a0 as Hr,a1 as Zr,a2 as Oe,a3 as Qr,a4 as hr}from"./modulepreload-polyfill-DzIIs1ni.chunk.mjs";import{s as Kr,t as Jr,r as to,v as re,l as eo,w as no}from"./index-CGOHHiYr.chunk.mjs";function tn(){return lr("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function ro(){return lr("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e,t,n){oo(e,t),t.set(e,n)}function oo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(e,t){var n=fr(e,t,"get");return io(e,n)}function io(e,t){return t.get?t.get.call(e):t.value}function In(e,t,n){var o=fr(e,t,"set");return so(e,o,n),n}function fr(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function so(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}var ao=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",dt=new WeakMap,Wt=new WeakMap;class me{constructor(t){var{executor:n=()=>{},internals:o=nn(),promise:a=new Promise((u,c)=>n(u,c,l=>{o.onCancelList.push(l)}))}=t;On(this,dt,{writable:!0,value:void 0}),On(this,Wt,{writable:!0,value:void 0}),Ut(this,ao,"CancelablePromise"),this.cancel=this.cancel.bind(this),In(this,dt,o),In(this,Wt,a||new Promise((u,c)=>n(u,c,l=>{o.onCancelList.push(l)})))}then(t,n){return ue(pt(this,Wt).then(oe(t,pt(this,dt)),oe(n,pt(this,dt))),pt(this,dt))}catch(t){return ue(pt(this,Wt).catch(oe(t,pt(this,dt))),pt(this,dt))}finally(t,n){return n&&pt(this,dt).onCancelList.push(t),ue(pt(this,Wt).finally(oe(()=>{if(t)return n&&(pt(this,dt).onCancelList=pt(this,dt).onCancelList.filter(o=>o!==t)),t()},pt(this,dt))),pt(this,dt))}cancel(){pt(this,dt).isCanceled=!0;var t=pt(this,dt).onCancelList;pt(this,dt).onCancelList=[];for(var n of t)if(typeof n=="function")try{n()}catch(o){console.error(o)}}isCanceled(){return pt(this,dt).isCanceled===!0}}class Pt extends me{constructor(t){super({executor:t})}}Ut(Pt,"all",function(e){return ie(e,Promise.all(e))}),Ut(Pt,"allSettled",function(e){return ie(e,Promise.allSettled(e))}),Ut(Pt,"any",function(e){return ie(e,Promise.any(e))}),Ut(Pt,"race",function(e){return ie(e,Promise.race(e))}),Ut(Pt,"resolve",function(e){return Tn(Promise.resolve(e))}),Ut(Pt,"reject",function(e){return Tn(Promise.reject(e))}),Ut(Pt,"isCancelable",en);function Tn(e){return ue(e,nn())}function en(e){return e instanceof Pt||e instanceof me}function oe(e,t){if(e)return n=>{if(!t.isCanceled){var o=e(n);return en(o)&&t.onCancelList.push(o.cancel),o}return n}}function ue(e,t){return new me({internals:t,promise:e})}function ie(e,t){var n=nn();return n.onCancelList.push(()=>{for(var o of e)en(o)&&o.cancel()}),new me({internals:n,promise:t})}function nn(){return{isCanceled:!1,onCancelList:[]}}var Ie={},uo={2:e=>{function t(a,u,c){a instanceof RegExp&&(a=n(a,c)),u instanceof RegExp&&(u=n(u,c));var l=o(a,u,c);return l&&{start:l[0],end:l[1],pre:c.slice(0,l[0]),body:c.slice(l[0]+a.length,l[1]),post:c.slice(l[1]+u.length)}}function n(a,u){var c=u.match(a);return c?c[0]:null}function o(a,u,c){var l,m,p,i,d,f=c.indexOf(a),v=c.indexOf(u,f+1),w=f;if(f>=0&&v>0){for(l=[],p=c.length;w>=0&&!d;)w==f?(l.push(w),f=c.indexOf(a,w+1)):l.length==1?d=[l.pop(),v]:((m=l.pop())<p&&(p=m,i=v),v=c.indexOf(u,w+1)),w=f<v&&f>=0?f:v;l.length&&(d=[p,i])}return d}e.exports=t,t.range=o},101:function(e,t,n){var o;e=n.nmd(e),(function(a){var u=(e&&e.exports,typeof ne=="object"&&ne);u.global!==u&&u.window;var c=function(d){this.message=d};(c.prototype=new Error).name="InvalidCharacterError";var l=function(d){throw new c(d)},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=/[\t\n\f\r ]/g,i={encode:function(d){d=String(d),/[^\0-\xFF]/.test(d)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var f,v,w,b,O=d.length%3,I="",h=-1,E=d.length-O;++h<E;)f=d.charCodeAt(h)<<16,v=d.charCodeAt(++h)<<8,w=d.charCodeAt(++h),I+=m.charAt((b=f+v+w)>>18&63)+m.charAt(b>>12&63)+m.charAt(b>>6&63)+m.charAt(63&b);return O==2?(f=d.charCodeAt(h)<<8,v=d.charCodeAt(++h),I+=m.charAt((b=f+v)>>10)+m.charAt(b>>4&63)+m.charAt(b<<2&63)+"="):O==1&&(b=d.charCodeAt(h),I+=m.charAt(b>>2)+m.charAt(b<<4&63)+"=="),I},decode:function(d){var f=(d=String(d).replace(p,"")).length;f%4==0&&(f=(d=d.replace(/==?$/,"")).length),(f%4==1||/[^+a-zA-Z0-9/]/.test(d))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var v,w,b=0,O="",I=-1;++I<f;)w=m.indexOf(d.charAt(I)),v=b%4?64*v+w:w,b++%4&&(O+=String.fromCharCode(255&v>>(-2*b&6)));return O},version:"1.0.0"};(o=function(){return i}.call(t,n,t,e))===void 0||(e.exports=o)})()},172:(e,t)=>{t.d=function(n){if(!n)return 0;for(var o=(n=n.toString()).length,a=n.length;a--;){var u=n.charCodeAt(a);56320<=u&&u<=57343&&a--,127<u&&u<=2047?o++:2047<u&&u<=65535&&(o+=2)}return o}},526:e=>{var t={utf8:{stringToBytes:function(n){return t.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(t.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],a=0;a<n.length;a++)o.push(255&n.charCodeAt(a));return o},bytesToString:function(n){for(var o=[],a=0;a<n.length;a++)o.push(String.fromCharCode(n[a]));return o.join("")}}};e.exports=t},298:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(o,a){return o<<a|o>>>32-a},rotr:function(o,a){return o<<32-a|o>>>a},endian:function(o){if(o.constructor==Number)return 16711935&n.rotl(o,8)|4278255360&n.rotl(o,24);for(var a=0;a<o.length;a++)o[a]=n.endian(o[a]);return o},randomBytes:function(o){for(var a=[];o>0;o--)a.push(Math.floor(256*Math.random()));return a},bytesToWords:function(o){for(var a=[],u=0,c=0;u<o.length;u++,c+=8)a[c>>>5]|=o[u]<<24-c%32;return a},wordsToBytes:function(o){for(var a=[],u=0;u<32*o.length;u+=8)a.push(o[u>>>5]>>>24-u%32&255);return a},bytesToHex:function(o){for(var a=[],u=0;u<o.length;u++)a.push((o[u]>>>4).toString(16)),a.push((15&o[u]).toString(16));return a.join("")},hexToBytes:function(o){for(var a=[],u=0;u<o.length;u+=2)a.push(parseInt(o.substr(u,2),16));return a},bytesToBase64:function(o){for(var a=[],u=0;u<o.length;u+=3)for(var c=o[u]<<16|o[u+1]<<8|o[u+2],l=0;l<4;l++)8*u+6*l<=8*o.length?a.push(t.charAt(c>>>6*(3-l)&63)):a.push("=");return a.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/gi,"");for(var a=[],u=0,c=0;u<o.length;c=++u%4)c!=0&&a.push((t.indexOf(o.charAt(u-1))&Math.pow(2,-2*c+8)-1)<<2*c|t.indexOf(o.charAt(u))>>>6-2*c);return a}},e.exports=n},635:(e,t,n)=>{const o=n(31),a=n(338),u=n(221);e.exports={XMLParser:a,XMLValidator:o,XMLBuilder:u}},118:e=>{e.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?n=>{for(const o of t)if(typeof o=="string"&&n===o||o instanceof RegExp&&o.test(n))return!0}:()=>!1}},705:(e,t)=>{const n=":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",o="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",a=new RegExp("^"+o+"$");t.isExist=function(u){return u!==void 0},t.isEmptyObject=function(u){return Object.keys(u).length===0},t.merge=function(u,c,l){if(c){const m=Object.keys(c),p=m.length;for(let i=0;i<p;i++)u[m[i]]=l==="strict"?[c[m[i]]]:c[m[i]]}},t.getValue=function(u){return t.isExist(u)?u:""},t.isName=function(u){return a.exec(u)!=null},t.getAllMatches=function(u,c){const l=[];let m=c.exec(u);for(;m;){const p=[];p.startIndex=c.lastIndex-m[0].length;const i=m.length;for(let d=0;d<i;d++)p.push(m[d]);l.push(p),m=c.exec(u)}return l},t.nameRegexp=o},31:(e,t,n)=>{const o=n(705),a={allowBooleanAttributes:!1,unpairedTags:[]};function u(h){return h===" "||h===" "||h===`
|
||
`||h==="\r"}function c(h,E){const T=E;for(;E<h.length;E++)if(!(h[E]!="?"&&h[E]!=" ")){const P=h.substr(T,E-T);if(E>5&&P==="xml")return w("InvalidXml","XML declaration allowed only at the start of the document.",O(h,E));if(h[E]=="?"&&h[E+1]==">"){E++;break}}return E}function l(h,E){if(h.length>E+5&&h[E+1]==="-"&&h[E+2]==="-"){for(E+=3;E<h.length;E++)if(h[E]==="-"&&h[E+1]==="-"&&h[E+2]===">"){E+=2;break}}else if(h.length>E+8&&h[E+1]==="D"&&h[E+2]==="O"&&h[E+3]==="C"&&h[E+4]==="T"&&h[E+5]==="Y"&&h[E+6]==="P"&&h[E+7]==="E"){let T=1;for(E+=8;E<h.length;E++)if(h[E]==="<")T++;else if(h[E]===">"&&(T--,T===0))break}else if(h.length>E+9&&h[E+1]==="["&&h[E+2]==="C"&&h[E+3]==="D"&&h[E+4]==="A"&&h[E+5]==="T"&&h[E+6]==="A"&&h[E+7]==="["){for(E+=8;E<h.length;E++)if(h[E]==="]"&&h[E+1]==="]"&&h[E+2]===">"){E+=2;break}}return E}t.validate=function(h,E){E=Object.assign({},a,E);const T=[];let P=!1,R=!1;h[0]==="\uFEFF"&&(h=h.substr(1));for(let x=0;x<h.length;x++)if(h[x]==="<"&&h[x+1]==="?"){if(x+=2,x=c(h,x),x.err)return x}else{if(h[x]!=="<"){if(u(h[x]))continue;return w("InvalidChar","char '"+h[x]+"' is not expected.",O(h,x))}{let A=x;if(x++,h[x]==="!"){x=l(h,x);continue}{let U=!1;h[x]==="/"&&(U=!0,x++);let M="";for(;x<h.length&&h[x]!==">"&&h[x]!==" "&&h[x]!==" "&&h[x]!==`
|
||
`&&h[x]!=="\r";x++)M+=h[x];if(M=M.trim(),M[M.length-1]==="/"&&(M=M.substring(0,M.length-1),x--),L=M,!o.isName(L)){let F;return F=M.trim().length===0?"Invalid space after '<'.":"Tag '"+M+"' is an invalid name.",w("InvalidTag",F,O(h,x))}const S=i(h,x);if(S===!1)return w("InvalidAttr","Attributes for '"+M+"' have open quote.",O(h,x));let D=S.value;if(x=S.index,D[D.length-1]==="/"){const F=x-D.length;D=D.substring(0,D.length-1);const G=f(D,E);if(G!==!0)return w(G.err.code,G.err.msg,O(h,F+G.err.line));P=!0}else if(U){if(!S.tagClosed)return w("InvalidTag","Closing tag '"+M+"' doesn't have proper closing.",O(h,x));if(D.trim().length>0)return w("InvalidTag","Closing tag '"+M+"' can't have attributes or invalid starting.",O(h,A));if(T.length===0)return w("InvalidTag","Closing tag '"+M+"' has not been opened.",O(h,A));{const F=T.pop();if(M!==F.tagName){let G=O(h,F.tagStartPos);return w("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+G.line+", col "+G.col+") instead of closing tag '"+M+"'.",O(h,A))}T.length==0&&(R=!0)}}else{const F=f(D,E);if(F!==!0)return w(F.err.code,F.err.msg,O(h,x-D.length+F.err.line));if(R===!0)return w("InvalidXml","Multiple possible root nodes found.",O(h,x));E.unpairedTags.indexOf(M)!==-1||T.push({tagName:M,tagStartPos:A}),P=!0}for(x++;x<h.length;x++)if(h[x]==="<"){if(h[x+1]==="!"){x++,x=l(h,x);continue}if(h[x+1]!=="?")break;if(x=c(h,++x),x.err)return x}else if(h[x]==="&"){const F=v(h,x);if(F==-1)return w("InvalidChar","char '&' is not expected.",O(h,x));x=F}else if(R===!0&&!u(h[x]))return w("InvalidXml","Extra text at the end",O(h,x));h[x]==="<"&&x--}}}var L;return P?T.length==1?w("InvalidTag","Unclosed tag '"+T[0].tagName+"'.",O(h,T[0].tagStartPos)):!(T.length>0)||w("InvalidXml","Invalid '"+JSON.stringify(T.map(x=>x.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):w("InvalidXml","Start tag expected.",1)};const m='"',p="'";function i(h,E){let T="",P="",R=!1;for(;E<h.length;E++){if(h[E]===m||h[E]===p)P===""?P=h[E]:P!==h[E]||(P="");else if(h[E]===">"&&P===""){R=!0;break}T+=h[E]}return P===""&&{value:T,index:E,tagClosed:R}}const d=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function f(h,E){const T=o.getAllMatches(h,d),P={};for(let R=0;R<T.length;R++){if(T[R][1].length===0)return w("InvalidAttr","Attribute '"+T[R][2]+"' has no space in starting.",I(T[R]));if(T[R][3]!==void 0&&T[R][4]===void 0)return w("InvalidAttr","Attribute '"+T[R][2]+"' is without value.",I(T[R]));if(T[R][3]===void 0&&!E.allowBooleanAttributes)return w("InvalidAttr","boolean attribute '"+T[R][2]+"' is not allowed.",I(T[R]));const L=T[R][2];if(!b(L))return w("InvalidAttr","Attribute '"+L+"' is an invalid name.",I(T[R]));if(P.hasOwnProperty(L))return w("InvalidAttr","Attribute '"+L+"' is repeated.",I(T[R]));P[L]=1}return!0}function v(h,E){if(h[++E]===";")return-1;if(h[E]==="#")return(function(P,R){let L=/\d/;for(P[R]==="x"&&(R++,L=/[\da-fA-F]/);R<P.length;R++){if(P[R]===";")return R;if(!P[R].match(L))break}return-1})(h,++E);let T=0;for(;E<h.length;E++,T++)if(!(h[E].match(/\w/)&&T<20)){if(h[E]===";")break;return-1}return E}function w(h,E,T){return{err:{code:h,msg:E,line:T.line||T,col:T.col}}}function b(h){return o.isName(h)}function O(h,E){const T=h.substring(0,E).split(/\r?\n/);return{line:T.length,col:T[T.length-1].length+1}}function I(h){return h.startIndex+h[1].length}},221:(e,t,n)=>{const o=n(87),a=n(118),u={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(i,d){return d},attributeValueProcessor:function(i,d){return d},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 c(i){this.options=Object.assign({},u,i),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=a(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=p),this.processTextOrObjNode=l,this.options.format?(this.indentate=m,this.tagEndChar=`>
|
||
`,this.newLine=`
|
||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function l(i,d,f,v){const w=this.j2x(i,f+1,v.concat(d));return i[this.options.textNodeName]!==void 0&&Object.keys(i).length===1?this.buildTextValNode(i[this.options.textNodeName],d,w.attrStr,f):this.buildObjectNode(w.val,d,w.attrStr,f)}function m(i){return this.options.indentBy.repeat(i)}function p(i){return!(!i.startsWith(this.options.attributeNamePrefix)||i===this.options.textNodeName)&&i.substr(this.attrPrefixLen)}c.prototype.build=function(i){return this.options.preserveOrder?o(i,this.options):(Array.isArray(i)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(i={[this.options.arrayNodeName]:i}),this.j2x(i,0,[]).val)},c.prototype.j2x=function(i,d,f){let v="",w="";const b=f.join(".");for(let O in i)if(Object.prototype.hasOwnProperty.call(i,O))if(i[O]===void 0)this.isAttribute(O)&&(w+="");else if(i[O]===null)this.isAttribute(O)?w+="":O[0]==="?"?w+=this.indentate(d)+"<"+O+"?"+this.tagEndChar:w+=this.indentate(d)+"<"+O+"/"+this.tagEndChar;else if(i[O]instanceof Date)w+=this.buildTextValNode(i[O],O,"",d);else if(typeof i[O]!="object"){const I=this.isAttribute(O);if(I&&!this.ignoreAttributesFn(I,b))v+=this.buildAttrPairStr(I,""+i[O]);else if(!I)if(O===this.options.textNodeName){let h=this.options.tagValueProcessor(O,""+i[O]);w+=this.replaceEntitiesValue(h)}else w+=this.buildTextValNode(i[O],O,"",d)}else if(Array.isArray(i[O])){const I=i[O].length;let h="",E="";for(let T=0;T<I;T++){const P=i[O][T];if(P!==void 0)if(P===null)O[0]==="?"?w+=this.indentate(d)+"<"+O+"?"+this.tagEndChar:w+=this.indentate(d)+"<"+O+"/"+this.tagEndChar;else if(typeof P=="object")if(this.options.oneListGroup){const R=this.j2x(P,d+1,f.concat(O));h+=R.val,this.options.attributesGroupName&&P.hasOwnProperty(this.options.attributesGroupName)&&(E+=R.attrStr)}else h+=this.processTextOrObjNode(P,O,d,f);else if(this.options.oneListGroup){let R=this.options.tagValueProcessor(O,P);R=this.replaceEntitiesValue(R),h+=R}else h+=this.buildTextValNode(P,O,"",d)}this.options.oneListGroup&&(h=this.buildObjectNode(h,O,E,d)),w+=h}else if(this.options.attributesGroupName&&O===this.options.attributesGroupName){const I=Object.keys(i[O]),h=I.length;for(let E=0;E<h;E++)v+=this.buildAttrPairStr(I[E],""+i[O][I[E]])}else w+=this.processTextOrObjNode(i[O],O,d,f);return{attrStr:v,val:w}},c.prototype.buildAttrPairStr=function(i,d){return d=this.options.attributeValueProcessor(i,""+d),d=this.replaceEntitiesValue(d),this.options.suppressBooleanAttributes&&d==="true"?" "+i:" "+i+'="'+d+'"'},c.prototype.buildObjectNode=function(i,d,f,v){if(i==="")return d[0]==="?"?this.indentate(v)+"<"+d+f+"?"+this.tagEndChar:this.indentate(v)+"<"+d+f+this.closeTag(d)+this.tagEndChar;{let w="</"+d+this.tagEndChar,b="";return d[0]==="?"&&(b="?",w=""),!f&&f!==""||i.indexOf("<")!==-1?this.options.commentPropName!==!1&&d===this.options.commentPropName&&b.length===0?this.indentate(v)+`<!--${i}-->`+this.newLine:this.indentate(v)+"<"+d+f+b+this.tagEndChar+i+this.indentate(v)+w:this.indentate(v)+"<"+d+f+b+">"+i+w}},c.prototype.closeTag=function(i){let d="";return this.options.unpairedTags.indexOf(i)!==-1?this.options.suppressUnpairedNode||(d="/"):d=this.options.suppressEmptyNode?"/":`></${i}`,d},c.prototype.buildTextValNode=function(i,d,f,v){if(this.options.cdataPropName!==!1&&d===this.options.cdataPropName)return this.indentate(v)+`<![CDATA[${i}]]>`+this.newLine;if(this.options.commentPropName!==!1&&d===this.options.commentPropName)return this.indentate(v)+`<!--${i}-->`+this.newLine;if(d[0]==="?")return this.indentate(v)+"<"+d+f+"?"+this.tagEndChar;{let w=this.options.tagValueProcessor(d,i);return w=this.replaceEntitiesValue(w),w===""?this.indentate(v)+"<"+d+f+this.closeTag(d)+this.tagEndChar:this.indentate(v)+"<"+d+f+">"+w+"</"+d+this.tagEndChar}},c.prototype.replaceEntitiesValue=function(i){if(i&&i.length>0&&this.options.processEntities)for(let d=0;d<this.options.entities.length;d++){const f=this.options.entities[d];i=i.replace(f.regex,f.val)}return i},e.exports=c},87:e=>{function t(c,l,m,p){let i="",d=!1;for(let f=0;f<c.length;f++){const v=c[f],w=n(v);if(w===void 0)continue;let b="";if(b=m.length===0?w:`${m}.${w}`,w===l.textNodeName){let E=v[w];a(b,l)||(E=l.tagValueProcessor(w,E),E=u(E,l)),d&&(i+=p),i+=E,d=!1;continue}if(w===l.cdataPropName){d&&(i+=p),i+=`<![CDATA[${v[w][0][l.textNodeName]}]]>`,d=!1;continue}if(w===l.commentPropName){i+=p+`<!--${v[w][0][l.textNodeName]}-->`,d=!0;continue}if(w[0]==="?"){const E=o(v[":@"],l),T=w==="?xml"?"":p;let P=v[w][0][l.textNodeName];P=P.length!==0?" "+P:"",i+=T+`<${w}${P}${E}?>`,d=!0;continue}let O=p;O!==""&&(O+=l.indentBy);const I=p+`<${w}${o(v[":@"],l)}`,h=t(v[w],l,b,O);l.unpairedTags.indexOf(w)!==-1?l.suppressUnpairedNode?i+=I+">":i+=I+"/>":h&&h.length!==0||!l.suppressEmptyNode?h&&h.endsWith(">")?i+=I+`>${h}${p}</${w}>`:(i+=I+">",h&&p!==""&&(h.includes("/>")||h.includes("</"))?i+=p+l.indentBy+h+p:i+=h,i+=`</${w}>`):i+=I+"/>",d=!0}return i}function n(c){const l=Object.keys(c);for(let m=0;m<l.length;m++){const p=l[m];if(c.hasOwnProperty(p)&&p!==":@")return p}}function o(c,l){let m="";if(c&&!l.ignoreAttributes)for(let p in c){if(!c.hasOwnProperty(p))continue;let i=l.attributeValueProcessor(p,c[p]);i=u(i,l),i===!0&&l.suppressBooleanAttributes?m+=` ${p.substr(l.attributeNamePrefix.length)}`:m+=` ${p.substr(l.attributeNamePrefix.length)}="${i}"`}return m}function a(c,l){let m=(c=c.substr(0,c.length-l.textNodeName.length-1)).substr(c.lastIndexOf(".")+1);for(let p in l.stopNodes)if(l.stopNodes[p]===c||l.stopNodes[p]==="*."+m)return!0;return!1}function u(c,l){if(c&&c.length>0&&l.processEntities)for(let m=0;m<l.entities.length;m++){const p=l.entities[m];c=c.replace(p.regex,p.val)}return c}e.exports=function(c,l){let m="";return l.format&&l.indentBy.length>0&&(m=`
|
||
`),t(c,l,"",m)}},193:(e,t,n)=>{const o=n(705);function a(d,f){let v="";for(;f<d.length&&d[f]!=="'"&&d[f]!=='"';f++)v+=d[f];if(v=v.trim(),v.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=d[f++];let b="";for(;f<d.length&&d[f]!==w;f++)b+=d[f];return[v,b,f]}function u(d,f){return d[f+1]==="!"&&d[f+2]==="-"&&d[f+3]==="-"}function c(d,f){return d[f+1]==="!"&&d[f+2]==="E"&&d[f+3]==="N"&&d[f+4]==="T"&&d[f+5]==="I"&&d[f+6]==="T"&&d[f+7]==="Y"}function l(d,f){return d[f+1]==="!"&&d[f+2]==="E"&&d[f+3]==="L"&&d[f+4]==="E"&&d[f+5]==="M"&&d[f+6]==="E"&&d[f+7]==="N"&&d[f+8]==="T"}function m(d,f){return d[f+1]==="!"&&d[f+2]==="A"&&d[f+3]==="T"&&d[f+4]==="T"&&d[f+5]==="L"&&d[f+6]==="I"&&d[f+7]==="S"&&d[f+8]==="T"}function p(d,f){return d[f+1]==="!"&&d[f+2]==="N"&&d[f+3]==="O"&&d[f+4]==="T"&&d[f+5]==="A"&&d[f+6]==="T"&&d[f+7]==="I"&&d[f+8]==="O"&&d[f+9]==="N"}function i(d){if(o.isName(d))return d;throw new Error(`Invalid entity name ${d}`)}e.exports=function(d,f){const v={};if(d[f+3]!=="O"||d[f+4]!=="C"||d[f+5]!=="T"||d[f+6]!=="Y"||d[f+7]!=="P"||d[f+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{f+=9;let w=1,b=!1,O=!1,I="";for(;f<d.length;f++)if(d[f]!=="<"||O)if(d[f]===">"){if(O?d[f-1]==="-"&&d[f-2]==="-"&&(O=!1,w--):w--,w===0)break}else d[f]==="["?b=!0:I+=d[f];else{if(b&&c(d,f)){let h,E;f+=7,[h,E,f]=a(d,f+1),E.indexOf("&")===-1&&(v[i(h)]={regx:RegExp(`&${h};`,"g"),val:E})}else if(b&&l(d,f))f+=8;else if(b&&m(d,f))f+=8;else if(b&&p(d,f))f+=9;else{if(!u)throw new Error("Invalid DOCTYPE");O=!0}w++,I=""}if(w!==0)throw new Error("Unclosed DOCTYPE")}return{entities:v,i:f}}},63:(e,t)=>{const n={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(o,a){return a},attributeValueProcessor:function(o,a){return a},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(o,a,u){return o}};t.buildOptions=function(o){return Object.assign({},n,o)},t.defaultOptions=n},299:(e,t,n)=>{const o=n(705),a=n(365),u=n(193),c=n(494),l=n(118);function m(R){const L=Object.keys(R);for(let x=0;x<L.length;x++){const A=L[x];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:R[A]}}}function p(R,L,x,A,U,M,S){if(R!==void 0&&(this.options.trimValues&&!A&&(R=R.trim()),R.length>0)){S||(R=this.replaceEntitiesValue(R));const D=this.options.tagValueProcessor(L,R,x,U,M);return D==null?R:typeof D!=typeof R||D!==R?D:this.options.trimValues||R.trim()===R?P(R,this.options.parseTagValue,this.options.numberParseOptions):R}}function i(R){if(this.options.removeNSPrefix){const L=R.split(":"),x=R.charAt(0)==="/"?"/":"";if(L[0]==="xmlns")return"";L.length===2&&(R=x+L[1])}return R}const d=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function f(R,L,x){if(this.options.ignoreAttributes!==!0&&typeof R=="string"){const A=o.getAllMatches(R,d),U=A.length,M={};for(let S=0;S<U;S++){const D=this.resolveNameSpace(A[S][1]);if(this.ignoreAttributesFn(D,L))continue;let F=A[S][4],G=this.options.attributeNamePrefix+D;if(D.length)if(this.options.transformAttributeName&&(G=this.options.transformAttributeName(G)),G==="__proto__"&&(G="#__proto__"),F!==void 0){this.options.trimValues&&(F=F.trim()),F=this.replaceEntitiesValue(F);const X=this.options.attributeValueProcessor(D,F,L);M[G]=X==null?F:typeof X!=typeof F||X!==F?X:P(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(M[G]=!0)}if(!Object.keys(M).length)return;if(this.options.attributesGroupName){const S={};return S[this.options.attributesGroupName]=M,S}return M}}const v=function(R){R=R.replace(/\r\n?/g,`
|
||
`);const L=new a("!xml");let x=L,A="",U="";for(let M=0;M<R.length;M++)if(R[M]==="<")if(R[M+1]==="/"){const S=h(R,">",M,"Closing Tag is not closed.");let D=R.substring(M+2,S).trim();if(this.options.removeNSPrefix){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1))}this.options.transformTagName&&(D=this.options.transformTagName(D)),x&&(A=this.saveTextToParentTag(A,x,U));const F=U.substring(U.lastIndexOf(".")+1);if(D&&this.options.unpairedTags.indexOf(D)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${D}>`);let G=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(G=U.lastIndexOf(".",U.lastIndexOf(".")-1),this.tagsNodeStack.pop()):G=U.lastIndexOf("."),U=U.substring(0,G),x=this.tagsNodeStack.pop(),A="",M=S}else if(R[M+1]==="?"){let S=E(R,M,!1,"?>");if(!S)throw new Error("Pi Tag is not closed.");if(A=this.saveTextToParentTag(A,x,U),!(this.options.ignoreDeclaration&&S.tagName==="?xml"||this.options.ignorePiTags)){const D=new a(S.tagName);D.add(this.options.textNodeName,""),S.tagName!==S.tagExp&&S.attrExpPresent&&(D[":@"]=this.buildAttributesMap(S.tagExp,U,S.tagName)),this.addChild(x,D,U)}M=S.closeIndex+1}else if(R.substr(M+1,3)==="!--"){const S=h(R,"-->",M+4,"Comment is not closed.");if(this.options.commentPropName){const D=R.substring(M+4,S-2);A=this.saveTextToParentTag(A,x,U),x.add(this.options.commentPropName,[{[this.options.textNodeName]:D}])}M=S}else if(R.substr(M+1,2)==="!D"){const S=u(R,M);this.docTypeEntities=S.entities,M=S.i}else if(R.substr(M+1,2)==="!["){const S=h(R,"]]>",M,"CDATA is not closed.")-2,D=R.substring(M+9,S);A=this.saveTextToParentTag(A,x,U);let F=this.parseTextData(D,x.tagname,U,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?x.add(this.options.cdataPropName,[{[this.options.textNodeName]:D}]):x.add(this.options.textNodeName,F),M=S+2}else{let S=E(R,M,this.options.removeNSPrefix),D=S.tagName;const F=S.rawTagName;let G=S.tagExp,X=S.attrExpPresent,V=S.closeIndex;this.options.transformTagName&&(D=this.options.transformTagName(D)),x&&A&&x.tagname!=="!xml"&&(A=this.saveTextToParentTag(A,x,U,!1));const Z=x;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(x=this.tagsNodeStack.pop(),U=U.substring(0,U.lastIndexOf("."))),D!==L.tagname&&(U+=U?"."+D:D),this.isItStopNode(this.options.stopNodes,U,D)){let z="";if(G.length>0&&G.lastIndexOf("/")===G.length-1)D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),M=S.closeIndex;else if(this.options.unpairedTags.indexOf(D)!==-1)M=S.closeIndex;else{const W=this.readStopNodeData(R,F,V+1);if(!W)throw new Error(`Unexpected end of ${F}`);M=W.i,z=W.tagContent}const st=new a(D);D!==G&&X&&(st[":@"]=this.buildAttributesMap(G,U,D)),z&&(z=this.parseTextData(z,D,U,!0,X,!0,!0)),U=U.substr(0,U.lastIndexOf(".")),st.add(this.options.textNodeName,z),this.addChild(x,st,U)}else{if(G.length>0&&G.lastIndexOf("/")===G.length-1){D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),this.options.transformTagName&&(D=this.options.transformTagName(D));const z=new a(D);D!==G&&X&&(z[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(x,z,U),U=U.substr(0,U.lastIndexOf("."))}else{const z=new a(D);this.tagsNodeStack.push(x),D!==G&&X&&(z[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(x,z,U),x=z}A="",M=V}}else A+=R[M];return L.child};function w(R,L,x){const A=this.options.updateTag(L.tagname,x,L[":@"]);A===!1||(typeof A=="string"&&(L.tagname=A),R.addChild(L))}const b=function(R){if(this.options.processEntities){for(let L in this.docTypeEntities){const x=this.docTypeEntities[L];R=R.replace(x.regx,x.val)}for(let L in this.lastEntities){const x=this.lastEntities[L];R=R.replace(x.regex,x.val)}if(this.options.htmlEntities)for(let L in this.htmlEntities){const x=this.htmlEntities[L];R=R.replace(x.regex,x.val)}R=R.replace(this.ampEntity.regex,this.ampEntity.val)}return R};function O(R,L,x,A){return R&&(A===void 0&&(A=Object.keys(L.child).length===0),(R=this.parseTextData(R,L.tagname,x,!1,!!L[":@"]&&Object.keys(L[":@"]).length!==0,A))!==void 0&&R!==""&&L.add(this.options.textNodeName,R),R=""),R}function I(R,L,x){const A="*."+x;for(const U in R){const M=R[U];if(A===M||L===M)return!0}return!1}function h(R,L,x,A){const U=R.indexOf(L,x);if(U===-1)throw new Error(A);return U+L.length-1}function E(R,L,x){const A=(function(X,V){let Z,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",st="";for(let W=V;W<X.length;W++){let Q=X[W];if(Z)Q===Z&&(Z="");else if(Q==='"'||Q==="'")Z=Q;else if(Q===z[0]){if(!z[1])return{data:st,index:W};if(X[W+1]===z[1])return{data:st,index:W}}else Q===" "&&(Q=" ");st+=Q}})(R,L+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!A)return;let U=A.data;const M=A.index,S=U.search(/\s/);let D=U,F=!0;S!==-1&&(D=U.substring(0,S),U=U.substring(S+1).trimStart());const G=D;if(x){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1),F=D!==A.data.substr(X+1))}return{tagName:D,tagExp:U,closeIndex:M,attrExpPresent:F,rawTagName:G}}function T(R,L,x){const A=x;let U=1;for(;x<R.length;x++)if(R[x]==="<")if(R[x+1]==="/"){const M=h(R,">",x,`${L} is not closed`);if(R.substring(x+2,M).trim()===L&&(U--,U===0))return{tagContent:R.substring(A,x),i:M};x=M}else if(R[x+1]==="?")x=h(R,"?>",x+1,"StopNode is not closed.");else if(R.substr(x+1,3)==="!--")x=h(R,"-->",x+3,"StopNode is not closed.");else if(R.substr(x+1,2)==="![")x=h(R,"]]>",x,"StopNode is not closed.")-2;else{const M=E(R,x,">");M&&((M&&M.tagName)===L&&M.tagExp[M.tagExp.length-1]!=="/"&&U++,x=M.closeIndex)}}function P(R,L,x){if(L&&typeof R=="string"){const A=R.trim();return A==="true"||A!=="false"&&c(R,x)}return o.isExist(R)?R:""}e.exports=class{constructor(R){this.options=R,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:(L,x)=>String.fromCharCode(Number.parseInt(x,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(L,x)=>String.fromCharCode(Number.parseInt(x,16))}},this.addExternalEntities=m,this.parseXml=v,this.parseTextData=p,this.resolveNameSpace=i,this.buildAttributesMap=f,this.isItStopNode=I,this.replaceEntitiesValue=b,this.readStopNodeData=T,this.saveTextToParentTag=O,this.addChild=w,this.ignoreAttributesFn=l(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:o}=n(63),a=n(299),{prettify:u}=n(728),c=n(31);e.exports=class{constructor(l){this.externalEntities={},this.options=o(l)}parse(l,m){if(typeof l!="string"){if(!l.toString)throw new Error("XML data is accepted in String or Bytes[] form.");l=l.toString()}if(m){m===!0&&(m={});const d=c.validate(l,m);if(d!==!0)throw Error(`${d.err.msg}:${d.err.line}:${d.err.col}`)}const p=new a(this.options);p.addExternalEntities(this.externalEntities);const i=p.parseXml(l);return this.options.preserveOrder||i===void 0?i:u(i,this.options)}addEntity(l,m){if(m.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(l.indexOf("&")!==-1||l.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(m==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[l]=m}}},728:(e,t)=>{function n(c,l,m){let p;const i={};for(let d=0;d<c.length;d++){const f=c[d],v=o(f);let w="";if(w=m===void 0?v:m+"."+v,v===l.textNodeName)p===void 0?p=f[v]:p+=""+f[v];else{if(v===void 0)continue;if(f[v]){let b=n(f[v],l,w);const O=u(b,l);f[":@"]?a(b,f[":@"],w,l):Object.keys(b).length!==1||b[l.textNodeName]===void 0||l.alwaysCreateTextNode?Object.keys(b).length===0&&(l.alwaysCreateTextNode?b[l.textNodeName]="":b=""):b=b[l.textNodeName],i[v]!==void 0&&i.hasOwnProperty(v)?(Array.isArray(i[v])||(i[v]=[i[v]]),i[v].push(b)):l.isArray(v,w,O)?i[v]=[b]:i[v]=b}}}return typeof p=="string"?p.length>0&&(i[l.textNodeName]=p):p!==void 0&&(i[l.textNodeName]=p),i}function o(c){const l=Object.keys(c);for(let m=0;m<l.length;m++){const p=l[m];if(p!==":@")return p}}function a(c,l,m,p){if(l){const i=Object.keys(l),d=i.length;for(let f=0;f<d;f++){const v=i[f];p.isArray(v,m+"."+v,!0,!0)?c[v]=[l[v]]:c[v]=l[v]}}}function u(c,l){const{textNodeName:m}=l,p=Object.keys(c).length;return p===0||!(p!==1||!c[m]&&typeof c[m]!="boolean"&&c[m]!==0)}t.prettify=function(c,l){return n(c,l)}},365:e=>{e.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},135:e=>{function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}e.exports=function(n){return n!=null&&(t(n)||(function(o){return typeof o.readFloatLE=="function"&&typeof o.slice=="function"&&t(o.slice(0,0))})(n)||!!n._isBuffer)}},542:(e,t,n)=>{(function(){var o=n(298),a=n(526).utf8,u=n(135),c=n(526).bin,l=function(m,p){m.constructor==String?m=p&&p.encoding==="binary"?c.stringToBytes(m):a.stringToBytes(m):u(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||m.constructor===Uint8Array||(m=m.toString());for(var i=o.bytesToWords(m),d=8*m.length,f=1732584193,v=-271733879,w=-1732584194,b=271733878,O=0;O<i.length;O++)i[O]=16711935&(i[O]<<8|i[O]>>>24)|4278255360&(i[O]<<24|i[O]>>>8);i[d>>>5]|=128<<d%32,i[14+(d+64>>>9<<4)]=d;var I=l._ff,h=l._gg,E=l._hh,T=l._ii;for(O=0;O<i.length;O+=16){var P=f,R=v,L=w,x=b;f=I(f,v,w,b,i[O+0],7,-680876936),b=I(b,f,v,w,i[O+1],12,-389564586),w=I(w,b,f,v,i[O+2],17,606105819),v=I(v,w,b,f,i[O+3],22,-1044525330),f=I(f,v,w,b,i[O+4],7,-176418897),b=I(b,f,v,w,i[O+5],12,1200080426),w=I(w,b,f,v,i[O+6],17,-1473231341),v=I(v,w,b,f,i[O+7],22,-45705983),f=I(f,v,w,b,i[O+8],7,1770035416),b=I(b,f,v,w,i[O+9],12,-1958414417),w=I(w,b,f,v,i[O+10],17,-42063),v=I(v,w,b,f,i[O+11],22,-1990404162),f=I(f,v,w,b,i[O+12],7,1804603682),b=I(b,f,v,w,i[O+13],12,-40341101),w=I(w,b,f,v,i[O+14],17,-1502002290),f=h(f,v=I(v,w,b,f,i[O+15],22,1236535329),w,b,i[O+1],5,-165796510),b=h(b,f,v,w,i[O+6],9,-1069501632),w=h(w,b,f,v,i[O+11],14,643717713),v=h(v,w,b,f,i[O+0],20,-373897302),f=h(f,v,w,b,i[O+5],5,-701558691),b=h(b,f,v,w,i[O+10],9,38016083),w=h(w,b,f,v,i[O+15],14,-660478335),v=h(v,w,b,f,i[O+4],20,-405537848),f=h(f,v,w,b,i[O+9],5,568446438),b=h(b,f,v,w,i[O+14],9,-1019803690),w=h(w,b,f,v,i[O+3],14,-187363961),v=h(v,w,b,f,i[O+8],20,1163531501),f=h(f,v,w,b,i[O+13],5,-1444681467),b=h(b,f,v,w,i[O+2],9,-51403784),w=h(w,b,f,v,i[O+7],14,1735328473),f=E(f,v=h(v,w,b,f,i[O+12],20,-1926607734),w,b,i[O+5],4,-378558),b=E(b,f,v,w,i[O+8],11,-2022574463),w=E(w,b,f,v,i[O+11],16,1839030562),v=E(v,w,b,f,i[O+14],23,-35309556),f=E(f,v,w,b,i[O+1],4,-1530992060),b=E(b,f,v,w,i[O+4],11,1272893353),w=E(w,b,f,v,i[O+7],16,-155497632),v=E(v,w,b,f,i[O+10],23,-1094730640),f=E(f,v,w,b,i[O+13],4,681279174),b=E(b,f,v,w,i[O+0],11,-358537222),w=E(w,b,f,v,i[O+3],16,-722521979),v=E(v,w,b,f,i[O+6],23,76029189),f=E(f,v,w,b,i[O+9],4,-640364487),b=E(b,f,v,w,i[O+12],11,-421815835),w=E(w,b,f,v,i[O+15],16,530742520),f=T(f,v=E(v,w,b,f,i[O+2],23,-995338651),w,b,i[O+0],6,-198630844),b=T(b,f,v,w,i[O+7],10,1126891415),w=T(w,b,f,v,i[O+14],15,-1416354905),v=T(v,w,b,f,i[O+5],21,-57434055),f=T(f,v,w,b,i[O+12],6,1700485571),b=T(b,f,v,w,i[O+3],10,-1894986606),w=T(w,b,f,v,i[O+10],15,-1051523),v=T(v,w,b,f,i[O+1],21,-2054922799),f=T(f,v,w,b,i[O+8],6,1873313359),b=T(b,f,v,w,i[O+15],10,-30611744),w=T(w,b,f,v,i[O+6],15,-1560198380),v=T(v,w,b,f,i[O+13],21,1309151649),f=T(f,v,w,b,i[O+4],6,-145523070),b=T(b,f,v,w,i[O+11],10,-1120210379),w=T(w,b,f,v,i[O+2],15,718787259),v=T(v,w,b,f,i[O+9],21,-343485551),f=f+P>>>0,v=v+R>>>0,w=w+L>>>0,b=b+x>>>0}return o.endian([f,v,w,b])};l._ff=function(m,p,i,d,f,v,w){var b=m+(p&i|~p&d)+(f>>>0)+w;return(b<<v|b>>>32-v)+p},l._gg=function(m,p,i,d,f,v,w){var b=m+(p&d|i&~d)+(f>>>0)+w;return(b<<v|b>>>32-v)+p},l._hh=function(m,p,i,d,f,v,w){var b=m+(p^i^d)+(f>>>0)+w;return(b<<v|b>>>32-v)+p},l._ii=function(m,p,i,d,f,v,w){var b=m+(i^(p|~d))+(f>>>0)+w;return(b<<v|b>>>32-v)+p},l._blocksize=16,l._digestsize=16,e.exports=function(m,p){if(m==null)throw new Error("Illegal argument "+m);var i=o.wordsToBytes(l(m,p));return p&&p.asBytes?i:p&&p.asString?c.bytesToString(i):o.bytesToHex(i)}})()},285:(e,t,n)=>{var o=n(2);e.exports=function(I){return I?(I.substr(0,2)==="{}"&&(I="\\{\\}"+I.substr(2)),O((function(h){return h.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(c).split("\\,").join(l).split("\\.").join(m)})(I),!0).map(i)):[]};var a="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",c="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",m="\0PERIOD"+Math.random()+"\0";function p(I){return parseInt(I,10)==I?parseInt(I,10):I.charCodeAt(0)}function i(I){return I.split(a).join("\\").split(u).join("{").split(c).join("}").split(l).join(",").split(m).join(".")}function d(I){if(!I)return[""];var h=[],E=o("{","}",I);if(!E)return I.split(",");var T=E.pre,P=E.body,R=E.post,L=T.split(",");L[L.length-1]+="{"+P+"}";var x=d(R);return R.length&&(L[L.length-1]+=x.shift(),L.push.apply(L,x)),h.push.apply(h,L),h}function f(I){return"{"+I+"}"}function v(I){return/^-?0\d/.test(I)}function w(I,h){return I<=h}function b(I,h){return I>=h}function O(I,h){var E=[],T=o("{","}",I);if(!T)return[I];var P=T.pre,R=T.post.length?O(T.post,!1):[""];if(/\$$/.test(T.pre))for(var L=0;L<R.length;L++){var x=P+"{"+T.body+"}"+R[L];E.push(x)}else{var A,U,M=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(T.body),S=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(T.body),D=M||S,F=T.body.indexOf(",")>=0;if(!D&&!F)return T.post.match(/,.*\}/)?O(I=T.pre+"{"+T.body+c+T.post):[I];if(D)A=T.body.split(/\.\./);else if((A=d(T.body)).length===1&&(A=O(A[0],!1).map(f)).length===1)return R.map(function(Tt){return T.pre+A[0]+Tt});if(D){var G=p(A[0]),X=p(A[1]),V=Math.max(A[0].length,A[1].length),Z=A.length==3?Math.abs(p(A[2])):1,z=w;X<G&&(Z*=-1,z=b);var st=A.some(v);U=[];for(var W=G;z(W,X);W+=Z){var Q;if(S)(Q=String.fromCharCode(W))==="\\"&&(Q="");else if(Q=String(W),st){var Mt=V-Q.length;if(Mt>0){var $t=new Array(Mt+1).join("0");Q=W<0?"-"+$t+Q.slice(1):$t+Q}}U.push(Q)}}else{U=[];for(var Nt=0;Nt<A.length;Nt++)U.push.apply(U,O(A[Nt],!1))}for(Nt=0;Nt<U.length;Nt++)for(L=0;L<R.length;L++)x=P+U[Nt]+R[L],(!h||D||x)&&E.push(x)}return E}},829:e=>{function t(p){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t(p)}function n(p){var i=typeof Map=="function"?new Map:void 0;return n=function(d){if(d===null||(f=d,Function.toString.call(f).indexOf("[native code]")===-1))return d;var f;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(i!==void 0){if(i.has(d))return i.get(d);i.set(d,v)}function v(){return o(d,arguments,u(this).constructor)}return v.prototype=Object.create(d.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),a(v,d)},n(p)}function o(p,i,d){return o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}})()?Reflect.construct:function(f,v,w){var b=[null];b.push.apply(b,v);var O=new(Function.bind.apply(f,b));return w&&a(O,w.prototype),O},o.apply(null,arguments)}function a(p,i){return a=Object.setPrototypeOf||function(d,f){return d.__proto__=f,d},a(p,i)}function u(p){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},u(p)}var c=(function(p){function i(d){var f;return(function(v,w){if(!(v instanceof w))throw new TypeError("Cannot call a class as a function")})(this,i),(f=(function(v,w){return!w||t(w)!=="object"&&typeof w!="function"?(function(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b})(v):w})(this,u(i).call(this,d))).name="ObjectPrototypeMutationError",f}return(function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),f&&a(d,f)})(i,p),i})(n(Error));function l(p,i){for(var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},f=i.split("."),v=f.length,w=function(I){var h=f[I];if(!p)return{v:void 0};if(h==="+"){if(Array.isArray(p))return{v:p.map(function(T,P){var R=f.slice(I+1);return R.length>0?l(T,R.join("."),d):d(p,P,f,I)})};var E=f.slice(0,I).join(".");throw new Error("Object at wildcard (".concat(E,") is not an array"))}p=d(p,h,f,I)},b=0;b<v;b++){var O=w(b);if(t(O)==="object")return O.v}return p}function m(p,i){return p.length===i+1}e.exports={set:function(p,i,d){if(t(p)!="object"||p===null||i===void 0)return p;if(typeof i=="number")return p[i]=d,p[i];try{return l(p,i,function(f,v,w,b){if(f===Reflect.getPrototypeOf({}))throw new c("Attempting to mutate Object.prototype");if(!f[v]){var O=Number.isInteger(Number(w[b+1])),I=w[b+1]==="+";f[v]=O||I?[]:{}}return m(w,b)&&(f[v]=d),f[v]})}catch(f){if(f instanceof c)throw f;return p}},get:function(p,i){if(t(p)!="object"||p===null||i===void 0)return p;if(typeof i=="number")return p[i];try{return l(p,i,function(d,f){return d[f]})}catch{return p}},has:function(p,i){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(p)!="object"||p===null||i===void 0)return!1;if(typeof i=="number")return i in p;try{var f=!1;return l(p,i,function(v,w,b,O){if(!m(b,O))return v&&v[w];f=d.own?v.hasOwnProperty(w):w in v}),f}catch{return!1}},hasOwn:function(p,i,d){return this.has(p,i,d||{own:!0})},isIn:function(p,i,d){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(p)!="object"||p===null||i===void 0)return!1;try{var v=!1,w=!1;return l(p,i,function(b,O,I,h){return v=v||b===d||!!b&&b[O]===d,w=m(I,h)&&t(b)==="object"&&O in b,b&&b[O]}),f.validPath?v&&w:v}catch{return!1}},ObjectPrototypeMutationError:c}},47:(e,t,n)=>{var o=n(410),a=function(p){return typeof p=="string"};function u(p,i){for(var d=[],f=0;f<p.length;f++){var v=p[f];v&&v!=="."&&(v===".."?d.length&&d[d.length-1]!==".."?d.pop():i&&d.push(".."):d.push(v))}return d}var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,l={};function m(p){return c.exec(p).slice(1)}l.resolve=function(){for(var p="",i=!1,d=arguments.length-1;d>=-1&&!i;d--){var f=d>=0?arguments[d]:Zt.cwd();if(!a(f))throw new TypeError("Arguments to path.resolve must be strings");f&&(p=f+"/"+p,i=f.charAt(0)==="/")}return(i?"/":"")+(p=u(p.split("/"),!i).join("/"))||"."},l.normalize=function(p){var i=l.isAbsolute(p),d=p.substr(-1)==="/";return(p=u(p.split("/"),!i).join("/"))||i||(p="."),p&&d&&(p+="/"),(i?"/":"")+p},l.isAbsolute=function(p){return p.charAt(0)==="/"},l.join=function(){for(var p="",i=0;i<arguments.length;i++){var d=arguments[i];if(!a(d))throw new TypeError("Arguments to path.join must be strings");d&&(p+=p?"/"+d:d)}return l.normalize(p)},l.relative=function(p,i){function d(h){for(var E=0;E<h.length&&h[E]==="";E++);for(var T=h.length-1;T>=0&&h[T]==="";T--);return E>T?[]:h.slice(E,T+1)}p=l.resolve(p).substr(1),i=l.resolve(i).substr(1);for(var f=d(p.split("/")),v=d(i.split("/")),w=Math.min(f.length,v.length),b=w,O=0;O<w;O++)if(f[O]!==v[O]){b=O;break}var I=[];for(O=b;O<f.length;O++)I.push("..");return(I=I.concat(v.slice(b))).join("/")},l._makeLong=function(p){return p},l.dirname=function(p){var i=m(p),d=i[0],f=i[1];return d||f?(f&&(f=f.substr(0,f.length-1)),d+f):"."},l.basename=function(p,i){var d=m(p)[2];return i&&d.substr(-1*i.length)===i&&(d=d.substr(0,d.length-i.length)),d},l.extname=function(p){return m(p)[3]},l.format=function(p){if(!o.isObject(p))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof p);var i=p.root||"";if(!a(i))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof p.root);return(p.dir?p.dir+l.sep:"")+(p.base||"")},l.parse=function(p){if(!a(p))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof p);var i=m(p);if(!i||i.length!==4)throw new TypeError("Invalid path '"+p+"'");return i[1]=i[1]||"",i[2]=i[2]||"",i[3]=i[3]||"",{root:i[0],dir:i[0]+i[1].slice(0,i[1].length-1),base:i[2],ext:i[3],name:i[2].slice(0,i[2].length-i[3].length)}},l.sep="/",l.delimiter=":",e.exports=l},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function o(u){try{return decodeURIComponent(u.replace(/\+/g," "))}catch{return null}}function a(u){try{return encodeURIComponent(u)}catch{return null}}t.stringify=function(u,c){c=c||"";var l,m,p=[];for(m in typeof c!="string"&&(c="?"),u)if(n.call(u,m)){if((l=u[m])||l!=null&&!isNaN(l)||(l=""),m=a(m),l=a(l),m===null||l===null)continue;p.push(m+"="+l)}return p.length?c+p.join("&"):""},t.parse=function(u){for(var c,l=/([^=?#&]+)=?([^&]*)/g,m={};c=l.exec(u);){var p=o(c[1]),i=o(c[2]);p===null||i===null||p in m||(m[p]=i)}return m}},670:e=>{e.exports=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},494:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const o={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u=Object.assign({},o,u),!a||typeof a!="string")return a;let c=a.trim();if(u.skipLike!==void 0&&u.skipLike.test(c))return a;if(u.hex&&t.test(c))return Number.parseInt(c,16);{const m=n.exec(c);if(m){const p=m[1],i=m[2];let d=((l=m[3])&&l.indexOf(".")!==-1&&((l=l.replace(/0+$/,""))==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l);const f=m[4]||m[6];if(!u.leadingZeros&&i.length>0&&p&&c[2]!=="."||!u.leadingZeros&&i.length>0&&!p&&c[1]!==".")return a;{const v=Number(c),w=""+v;return w.search(/[eE]/)!==-1||f?u.eNotation?v:a:c.indexOf(".")!==-1?w==="0"&&d===""||w===d||p&&w==="-"+d?v:a:i?d===w||p+d===w?v:a:c===w||c===p+w?v:a}}return a}var l}},737:(e,t,n)=>{var o=n(670),a=n(647),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,m=/:\d+$/,p=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,i=/^[a-zA-Z]:/;function d(h){return(h||"").toString().replace(u,"")}var f=[["#","hash"],["?","query"],function(h,E){return b(E.protocol)?h.replace(/\\/g,"/"):h},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],v={hash:1,query:1};function w(h){var E,T=(typeof window<"u"?window:typeof ne<"u"?ne:typeof self<"u"?self:{}).location||{},P={},R=typeof(h=h||T);if(h.protocol==="blob:")P=new I(unescape(h.pathname),{});else if(R==="string")for(E in P=new I(h,{}),v)delete P[E];else if(R==="object"){for(E in h)E in v||(P[E]=h[E]);P.slashes===void 0&&(P.slashes=l.test(h.href))}return P}function b(h){return h==="file:"||h==="ftp:"||h==="http:"||h==="https:"||h==="ws:"||h==="wss:"}function O(h,E){h=(h=d(h)).replace(c,""),E=E||{};var T,P=p.exec(h),R=P[1]?P[1].toLowerCase():"",L=!!P[2],x=!!P[3],A=0;return L?x?(T=P[2]+P[3]+P[4],A=P[2].length+P[3].length):(T=P[2]+P[4],A=P[2].length):x?(T=P[3]+P[4],A=P[3].length):T=P[4],R==="file:"?A>=2&&(T=T.slice(2)):b(R)?T=P[4]:R?L&&(T=T.slice(2)):A>=2&&b(E.protocol)&&(T=P[4]),{protocol:R,slashes:L||b(R),slashesCount:A,rest:T}}function I(h,E,T){if(h=(h=d(h)).replace(c,""),!(this instanceof I))return new I(h,E,T);var P,R,L,x,A,U,M=f.slice(),S=typeof E,D=this,F=0;for(S!=="object"&&S!=="string"&&(T=E,E=null),T&&typeof T!="function"&&(T=a.parse),P=!(R=O(h||"",E=w(E))).protocol&&!R.slashes,D.slashes=R.slashes||P&&E.slashes,D.protocol=R.protocol||E.protocol||"",h=R.rest,(R.protocol==="file:"&&(R.slashesCount!==2||i.test(h))||!R.slashes&&(R.protocol||R.slashesCount<2||!b(D.protocol)))&&(M[3]=[/(.*)/,"pathname"]);F<M.length;F++)typeof(x=M[F])!="function"?(L=x[0],U=x[1],L!=L?D[U]=h:typeof L=="string"?~(A=L==="@"?h.lastIndexOf(L):h.indexOf(L))&&(typeof x[2]=="number"?(D[U]=h.slice(0,A),h=h.slice(A+x[2])):(D[U]=h.slice(A),h=h.slice(0,A))):(A=L.exec(h))&&(D[U]=A[1],h=h.slice(0,A.index)),D[U]=D[U]||P&&x[3]&&E[U]||"",x[4]&&(D[U]=D[U].toLowerCase())):h=x(h,D);T&&(D.query=T(D.query)),P&&E.slashes&&D.pathname.charAt(0)!=="/"&&(D.pathname!==""||E.pathname!=="")&&(D.pathname=(function(G,X){if(G==="")return X;for(var V=(X||"/").split("/").slice(0,-1).concat(G.split("/")),Z=V.length,z=V[Z-1],st=!1,W=0;Z--;)V[Z]==="."?V.splice(Z,1):V[Z]===".."?(V.splice(Z,1),W++):W&&(Z===0&&(st=!0),V.splice(Z,1),W--);return st&&V.unshift(""),z!=="."&&z!==".."||V.push(""),V.join("/")})(D.pathname,E.pathname)),D.pathname.charAt(0)!=="/"&&b(D.protocol)&&(D.pathname="/"+D.pathname),o(D.port,D.protocol)||(D.host=D.hostname,D.port=""),D.username=D.password="",D.auth&&(~(A=D.auth.indexOf(":"))?(D.username=D.auth.slice(0,A),D.username=encodeURIComponent(decodeURIComponent(D.username)),D.password=D.auth.slice(A+1),D.password=encodeURIComponent(decodeURIComponent(D.password))):D.username=encodeURIComponent(decodeURIComponent(D.auth)),D.auth=D.password?D.username+":"+D.password:D.username),D.origin=D.protocol!=="file:"&&b(D.protocol)&&D.host?D.protocol+"//"+D.host:"null",D.href=D.toString()}I.prototype={set:function(h,E,T){var P=this;switch(h){case"query":typeof E=="string"&&E.length&&(E=(T||a.parse)(E)),P[h]=E;break;case"port":P[h]=E,o(E,P.protocol)?E&&(P.host=P.hostname+":"+E):(P.host=P.hostname,P[h]="");break;case"hostname":P[h]=E,P.port&&(E+=":"+P.port),P.host=E;break;case"host":P[h]=E,m.test(E)?(E=E.split(":"),P.port=E.pop(),P.hostname=E.join(":")):(P.hostname=E,P.port="");break;case"protocol":P.protocol=E.toLowerCase(),P.slashes=!T;break;case"pathname":case"hash":if(E){var R=h==="pathname"?"/":"#";P[h]=E.charAt(0)!==R?R+E:E}else P[h]=E;break;case"username":case"password":P[h]=encodeURIComponent(E);break;case"auth":var L=E.indexOf(":");~L?(P.username=E.slice(0,L),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=E.slice(L+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(E))}for(var x=0;x<f.length;x++){var A=f[x];A[4]&&(P[A[1]]=P[A[1]].toLowerCase())}return P.auth=P.password?P.username+":"+P.password:P.username,P.origin=P.protocol!=="file:"&&b(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString(),P},toString:function(h){h&&typeof h=="function"||(h=a.stringify);var E,T=this,P=T.host,R=T.protocol;R&&R.charAt(R.length-1)!==":"&&(R+=":");var L=R+(T.protocol&&T.slashes||b(T.protocol)?"//":"");return T.username?(L+=T.username,T.password&&(L+=":"+T.password),L+="@"):T.password?(L+=":"+T.password,L+="@"):T.protocol!=="file:"&&b(T.protocol)&&!P&&T.pathname!=="/"&&(L+="@"),(P[P.length-1]===":"||m.test(T.hostname)&&!T.port)&&(P+=":"),L+=P+T.pathname,(E=typeof T.query=="object"?h(T.query):T.query)&&(L+=E.charAt(0)!=="?"?"?"+E:E),T.hash&&(L+=T.hash),L}},I.extractProtocol=O,I.location=w,I.trimLeft=d,I.qs=a,e.exports=I},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Rn={};function Y(e){var t=Rn[e];if(t!==void 0)return t.exports;var n=Rn[e]={id:e,loaded:!1,exports:{}};return uo[e].call(n.exports,n,n.exports,Y),n.loaded=!0,n.exports}Y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Y.d(t,{a:t}),t},Y.d=(e,t)=>{for(var n in t)Y.o(t,n)&&!Y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Y.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var It={};Y.d(It,{hT:()=>bt,O4:()=>_t,Kd:()=>bo,YK:()=>Eo,UU:()=>Ii,Gu:()=>mr,ky:()=>Ir,h4:()=>Jt,ch:()=>ye,hq:()=>jt,i5:()=>Tr});var co=Y(737),lo=Y.n(co);function Te(e){if(!ze(e))throw new Error("Parameter was not an error")}function ze(e){return!!e&&typeof e=="object"&&(t=e,Object.prototype.toString.call(t)==="[object Error]")||e instanceof Error;var t}class vt extends Error{constructor(t,n){const o=[...arguments],{options:a,shortMessage:u}=(function(l){let m,p="";if(l.length===0)m={};else if(ze(l[0]))m={cause:l[0]},p=l.slice(1).join(" ")||"";else if(l[0]&&typeof l[0]=="object")m=Object.assign({},l[0]),p=l.slice(1).join(" ")||"";else{if(typeof l[0]!="string")throw new Error("Invalid arguments passed to Layerr");m={},p=p=l.join(" ")||""}return{options:m,shortMessage:p}})(o);let c=u;if(a.cause&&(c=`${c}: ${a.cause.message}`),super(c),this.message=c,a.name&&typeof a.name=="string"?this.name=a.name:this.name="Layerr",a.cause&&Object.defineProperty(this,"_cause",{value:a.cause}),Object.defineProperty(this,"_info",{value:{}}),a.info&&typeof a.info=="object"&&Object.assign(this._info,a.info),Error.captureStackTrace){const l=a.constructorOpt||this.constructor;Error.captureStackTrace(this,l)}}static cause(t){return Te(t),t._cause&&ze(t._cause)?t._cause:null}static fullStack(t){Te(t);const n=vt.cause(t);return n?`${t.stack}
|
||
caused by: ${vt.fullStack(n)}`:t.stack??""}static info(t){Te(t);const n={},o=vt.cause(t);return o&&Object.assign(n,vt.info(o)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var ho=Y(47),ce=Y.n(ho);const Sn="__PATH_SEPARATOR_POSIX__",xn="__PATH_SEPARATOR_WINDOWS__";function tt(e){try{const t=e.replace(/\//g,Sn).replace(/\\\\/g,xn);return encodeURIComponent(t).split(xn).join("\\\\").split(Sn).join("/")}catch(t){throw new vt(t,"Failed encoding path")}}function Cn(e){return e.startsWith("/")?e:"/"+e}function Kt(e){let t=e;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function fo(e){let t=new(lo())(e).pathname;return t.length<=0&&(t="/"),Kt(t)}function et(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(function(){return(function(o){var a=[];if(o.length===0)return"";if(typeof o[0]!="string")throw new TypeError("Url must be a string. Received "+o[0]);if(o[0].match(/^[^/:]+:\/*$/)&&o.length>1){var u=o.shift();o[0]=u+o[0]}o[0].match(/^file:\/\/\//)?o[0]=o[0].replace(/^([^/:]+):\/*/,"$1:///"):o[0]=o[0].replace(/^([^/:]+):\/*/,"$1://");for(var c=0;c<o.length;c++){var l=o[c];if(typeof l!="string")throw new TypeError("Url must be a string. Received "+l);l!==""&&(c>0&&(l=l.replace(/^[\/]+/,"")),l=c<o.length-1?l.replace(/[\/]+$/,""):l.replace(/[\/]+$/,"/"),a.push(l))}var m=a.join("/"),p=(m=m.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return p.shift()+(p.length>0?"?":"")+p.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce((o,a,u)=>((u===0||a!=="/"||a==="/"&&o[o.length-1]!=="/")&&o.push(a),o),[]))}var po=Y(542),zt=Y.n(po);const go="abcdef0123456789";function Pn(e,t){const n=e.url.replace("//",""),o=n.indexOf("/")==-1?"/":n.slice(n.indexOf("/")),a=e.method?e.method.toUpperCase():"GET",u=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",c=`00000000${t.nc}`.slice(-8),l=(function(f,v,w,b,O,I,h){const E=h||zt()(`${v}:${w}:${b}`);return f&&f.toLowerCase()==="md5-sess"?zt()(`${E}:${O}:${I}`):E})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),m=zt()(`${a}:${o}`),p=u?zt()(`${l}:${t.nonce}:${c}:${t.cnonce}:${u}:${m}`):zt()(`${l}:${t.nonce}:${m}`),i={username:t.username,realm:t.realm,nonce:t.nonce,uri:o,qop:u,response:p,nc:c,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const f in i)i[f]&&(f==="qop"||f==="nc"||f==="algorithm"?d.push(`${f}=${i[f]}`):d.push(`${f}="${i[f]}"`));return`Digest ${d.join(", ")}`}function pr(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var mo=Y(101),gr=Y.n(mo);function Ln(e){return gr().decode(e)}function _n(e,t){var n;return`Basic ${n=`${e}:${t}`,gr().encode(n)}`}const le=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,yo=le.fetch.bind(le),bo=le.Request,Eo=le.Response;let bt=(function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e})({}),_t=(function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e})({});function dr(e,t,n,o,a){switch(e.authType){case bt.Auto:t&&n&&(e.headers.Authorization=_n(t,n));break;case bt.Digest:e.digest=(function(c,l,m){return{username:c,password:l,ha1:m,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,n,a);break;case bt.None:break;case bt.Password:e.headers.Authorization=_n(t,n);break;case bt.Token:e.headers.Authorization=`${(u=o).token_type} ${u.access_token}`;break;default:throw new vt({info:{code:_t.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var u}Y(345),Y(800);const $n="@@HOTPATCHER",vo=()=>{};function Re(e){return{original:e,methods:[e],final:!1}}class wo{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=$n}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==$n)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach(o=>{this.configuration.registry.hasOwnProperty(o)?n&&(this.configuration.registry[o]=Object.assign({},t.configuration.registry[o])):this.configuration.registry[o]=Object.assign({},t.configuration.registry[o])}),t._configuration=this.configuration,this}execute(t){const n=this.get(t)||vo;for(var o=arguments.length,a=new Array(o>1?o-1:0),u=1;u<o;u++)a[u-1]=arguments[u];return n(...a)}get(t){const n=this.configuration.registry[t];if(!n)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 o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];if(a.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];let p=l;const i=this;for(;a.length>0;)p=[a.shift().apply(i,p)];return p[0]}})(...n.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:a=!1}=o;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof n!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(a)this.configuration.registry[t]?this.configuration.registry[t].methods.push(n):this.configuration.registry[t]=Re(n);else if(this.isPatched(t)){const{original:u}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Re(n),{original:u})}else this.configuration.registry[t]=Re(n);return this}patchInline(t,n){this.isPatched(t)||this.patch(t,n);for(var o=arguments.length,a=new Array(o>2?o-2:0),u=2;u<o;u++)a[u-2]=arguments[u];return this.execute(t,...a)}plugin(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.forEach(u=>{this.patch(t,u,{chain:!0})}),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")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 Se=null;function mr(){return Se||(Se=new wo),Se}function he(e){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n})(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let o=null,a=[...t];for(;a.length>0;){const u=a.shift();o=o?yr(o,u):he(u)}return o}function yr(e,t){const n=he(e);return Object.keys(t).forEach(o=>{n.hasOwnProperty(o)?Array.isArray(t[o])?n[o]=Array.isArray(n[o])?[...n[o],...t[o]]:[...t[o]]:typeof t[o]=="object"&&t[o]?n[o]=typeof n[o]=="object"&&n[o]?yr(n[o],t[o]):he(t[o]):n[o]=t[o]:n[o]=t[o]}),n}function No(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function Ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};const o={};return t.reduce((a,u)=>(Object.keys(u).forEach(c=>{const l=c.toLowerCase();o.hasOwnProperty(l)?a[o[l]]=u[c]:(o[l]=c,a[c]=u[c])}),a),{})}Y(805);const Ao=typeof ArrayBuffer=="function",{toString:Oo}=Object.prototype;function br(e){return Ao&&(e instanceof ArrayBuffer||Oo.call(e)==="[object ArrayBuffer]")}function Er(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function rn(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}}function He(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const vr=rn(function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Dn(e,{headers:{Authorization:Pn(e,t)}})),He(fe(e),function(n){let o=!1;return a=function(c){return o?c:n},(u=(function(){if(n.status==401)return t.hasDigestAuth=(function(c,l){if(!pr(c))return!1;const m=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const p=c.headers&&c.headers.get("www-authenticate")||"",i=m.exec(p);if(!i)break;l[i[1]]=i[2]||i[3]}return l.nc+=1,l.cnonce=(function(){let p="";for(let i=0;i<32;++i)p=`${p}${go[Math.floor(16*Math.random())]}`;return p})(),!0})(n,t),(function(){if(t.hasDigestAuth)return He(fe(e=Dn(e,{headers:{Authorization:Pn(e,t)}})),function(c){return c.status==401?t.hasDigestAuth=!1:t.nc++,o=!0,c})})();t.nc++})())&&u.then?u.then(a):a(u);var a,u})}),Io=rn(function(e,t){return He(fe(e),function(n){return n.ok?(t.authType=bt.Password,n):n.status==401&&pr(n)?(t.authType=bt.Digest,dr(t,t.username,t.password,void 0,void 0),e._digest=t.digest,vr(e)):n})}),ut=rn(function(e,t){return t.authType===bt.Auto?Io(e,t):e._digest?vr(e):fe(e)});function ct(e,t,n){const o=he(e);return o.headers=Ye(t.headers,o.headers||{},n.headers||{}),n.data!==void 0&&(o.data=n.data),n.signal&&(o.signal=n.signal),t.httpAgent&&(o.httpAgent=t.httpAgent),t.httpsAgent&&(o.httpsAgent=t.httpsAgent),t.digest&&(o._digest=t.digest),typeof t.withCredentials=="boolean"&&(o.withCredentials=t.withCredentials),o}function fe(e){const t=mr();return t.patchInline("request",n=>t.patchInline("fetch",yo,n.url,(function(o){let a={};const u={method:o.method};if(o.headers&&(a=Ye(a,o.headers)),o.data!==void 0){const[c,l]=(function(m){if(typeof m=="string")return[m,{}];if(Er(m))return[m,{}];if(br(m))return[m,{}];if(m&&typeof m=="object")return[JSON.stringify(m),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof m)})(o.data);u.body=c,a=Ye(a,l)}return o.signal&&(u.signal=o.signal),o.withCredentials&&(u.credentials="include"),u.headers=a,u})(n)),e)}var To=Y(285);const pe=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Ro={"[: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]},Yt=e=>e.replace(/[[\]\\-]/g,"\\$&"),Bn=e=>e.join(""),So=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const o=[],a=[];let u=n+1,c=!1,l=!1,m=!1,p=!1,i=n,d="";t:for(;u<e.length;){const b=e.charAt(u);if(b!=="!"&&b!=="^"||u!==n+1){if(b==="]"&&c&&!m){i=u+1;break}if(c=!0,b!=="\\"||m){if(b==="["&&!m){for(const[O,[I,h,E]]of Object.entries(Ro))if(e.startsWith(O,u)){if(d)return["$.",!1,e.length-n,!0];u+=O.length,E?a.push(I):o.push(I),l=l||h;continue t}}m=!1,d?(b>d?o.push(Yt(d)+"-"+Yt(b)):b===d&&o.push(Yt(b)),d="",u++):e.startsWith("-]",u+1)?(o.push(Yt(b+"-")),u+=2):e.startsWith("-",u+1)?(d=b,u+=2):(o.push(Yt(b)),u++)}else m=!0,u++}else p=!0,u++}if(i<u)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,e.length-n,!0];if(a.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!p)return[(f=o[0].length===2?o[0].slice(-1):o[0],f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,i-n,!1];var f;const v="["+(p?"^":"")+Bn(o)+"]",w="["+(p?"":"^")+Bn(a)+"]";return[o.length&&a.length?"("+v+"|"+w+")":o.length?v:w,l,i-n,!0]},Ht=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},xo=new Set(["!","?","+","*","@"]),Un=e=>xo.has(e),xe="(?!\\.)",Co=new Set(["[","."]),Po=new Set(["..","."]),Lo=new Set("().*{}+?[]^$\\!"),on="[^/]",jn=on+"*?",Mn=on+"+?";class yt{type;#n;#r;#i=!1;#t=[];#e;#s;#u;#a=!1;#o;#c;#h=!1;constructor(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#e=n,this.#n=this.#e?this.#e.#n:this,this.#o=this.#n===this?o:this.#n.#o,this.#u=this.#n===this?[]:this.#n.#u,t!=="!"||this.#n.#a||this.#u.push(this),this.#s=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#p(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#u.pop();){if(t.type!=="!")continue;let n=t,o=n.#e;for(;o;){for(let a=n.#s+1;!o.type&&a<o.#t.length;a++)for(const u of t.#t){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(o.#t[a])}n=o,o=n.#e}}return this}push(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(const a of n)if(a!==""){if(typeof a!="string"&&!(a instanceof yt&&a.#e===this))throw new Error("invalid part: "+a);this.#t.push(a)}}toJSON(){const t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#s===0)return!0;const t=this.#e;for(let n=0;n<this.#s;n++){const o=t.#t[n];if(!(o instanceof yt&&o.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new yt(this.type,t);for(const o of this.#t)n.copyIn(o);return n}static#l(t,n,o,a){let u=!1,c=!1,l=-1,m=!1;if(n.type===null){let v=o,w="";for(;v<t.length;){const b=t.charAt(v++);if(u||b==="\\")u=!u,w+=b;else if(c)v===l+1?b!=="^"&&b!=="!"||(m=!0):b!=="]"||v===l+2&&m||(c=!1),w+=b;else if(b!=="[")if(a.noext||!Un(b)||t.charAt(v)!=="(")w+=b;else{n.push(w),w="";const O=new yt(b,n);v=yt.#l(t,O,v,a),n.push(O)}else c=!0,l=v,m=!1,w+=b}return n.push(w),v}let p=o+1,i=new yt(null,n);const d=[];let f="";for(;p<t.length;){const v=t.charAt(p++);if(u||v==="\\")u=!u,f+=v;else if(c)p===l+1?v!=="^"&&v!=="!"||(m=!0):v!=="]"||p===l+2&&m||(c=!1),f+=v;else if(v!=="[")if(Un(v)&&t.charAt(p)==="("){i.push(f),f="";const w=new yt(v,i);i.push(w),p=yt.#l(t,w,p,a)}else if(v!=="|"){if(v===")")return f===""&&n.#t.length===0&&(n.#h=!0),i.push(f),f="",n.push(...d,i),p;f+=v}else i.push(f),f="",d.push(i),i=new yt(null,n);else c=!0,l=p,m=!1,f+=v}return n.type=null,n.#r=void 0,n.#t=[t.substring(o-1)],p}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=new yt(null,void 0,n);return yt.#l(t,o,0,n),o}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();const t=this.toString(),[n,o,a,u]=this.toRegExpSource();if(!(a||this.#r||this.#o.nocase&&!this.#o.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;const c=(this.#o.nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#o}toRegExpSource(t){const n=t??!!this.#o.dot;if(this.#n===this&&this.#p(),!this.type){const m=this.isStart()&&this.isEnd(),p=this.#t.map(f=>{const[v,w,b,O]=typeof f=="string"?yt.#g(f,this.#r,m):f.toRegExpSource(t);return this.#r=this.#r||b,this.#i=this.#i||O,v}).join("");let i="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Po.has(this.#t[0]))){const f=Co,v=n&&f.has(p.charAt(0))||p.startsWith("\\.")&&f.has(p.charAt(2))||p.startsWith("\\.\\.")&&f.has(p.charAt(4)),w=!n&&!t&&f.has(p.charAt(0));i=v?"(?!(?:^|/)\\.\\.?(?:$|/))":w?xe:""}let d="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(d="(?:$|\\/)"),[i+p+d,Ht(p),this.#r=!!this.#r,this.#i]}const o=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:";let u=this.#f(n);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const m=this.toString();return this.#t=[m],this.type=null,this.#r=void 0,[m,Ht(this.toString()),!1,!1]}let c=!o||t||n?"":this.#f(!0);c===u&&(c=""),c&&(u=`(?:${u})(?:${c})*?`);let l="";return l=this.type==="!"&&this.#h?(this.isStart()&&!n?xe:"")+Mn:a+u+(this.type==="!"?"))"+(!this.isStart()||n||t?"":xe)+jn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`),[l,Ht(u),this.#r=!!this.#r,this.#i]}#f(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[o,a,u,c]=n.toRegExpSource(t);return this.#i=this.#i||c,o}).filter(n=>!(this.isStart()&&this.isEnd()&&!n)).join("|")}static#g(t,n){let o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=!1,u="",c=!1;for(let l=0;l<t.length;l++){const m=t.charAt(l);if(a)a=!1,u+=(Lo.has(m)?"\\":"")+m;else if(m!=="\\"){if(m==="["){const[p,i,d,f]=So(t,l);if(d){u+=p,c=c||i,l+=d-1,n=n||f;continue}}m!=="*"?m!=="?"?u+=m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(u+=on,n=!0):(u+=o&&t==="*"?Mn:jn,n=!0)}else l===t.length-1?u+="\\\\":a=!0}return[u,Ht(t),!!n,c]}}const mt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return pe(t),!(!n.nocomment&&t.charAt(0)==="#")&&new ge(t,n).match(e)},_o=/^\*+([^+@!?\*\[\(]*)$/,$o=e=>t=>!t.startsWith(".")&&t.endsWith(e),Do=e=>t=>t.endsWith(e),Bo=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Uo=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),jo=/^\*+\.\*+$/,Mo=e=>!e.startsWith(".")&&e.includes("."),ko=e=>e!=="."&&e!==".."&&e.includes("."),Go=/^\.\*+$/,Fo=e=>e!=="."&&e!==".."&&e.startsWith("."),Vo=/^\*+$/,Xo=e=>e.length!==0&&!e.startsWith("."),qo=e=>e.length!==0&&e!=="."&&e!=="..",Wo=/^\?+([^+@!?\*\[\(]*)?$/,zo=e=>{let[t,n=""]=e;const o=wr([t]);return n?(n=n.toLowerCase(),a=>o(a)&&a.toLowerCase().endsWith(n)):o},Yo=e=>{let[t,n=""]=e;const o=Nr([t]);return n?(n=n.toLowerCase(),a=>o(a)&&a.toLowerCase().endsWith(n)):o},Ho=e=>{let[t,n=""]=e;const o=Nr([t]);return n?a=>o(a)&&a.endsWith(n):o},Zo=e=>{let[t,n=""]=e;const o=wr([t]);return n?a=>o(a)&&a.endsWith(n):o},wr=e=>{let[t]=e;const n=t.length;return o=>o.length===n&&!o.startsWith(".")},Nr=e=>{let[t]=e;const n=t.length;return o=>o.length===n&&o!=="."&&o!==".."},Ar=typeof Zt=="object"&&Zt?typeof Ie=="object"&&Ie&&Ie.__MINIMATCH_TESTING_PLATFORM__||Zt.platform:"posix";mt.sep=Ar==="win32"?"\\":"/";const Ot=Symbol("globstar **");mt.GLOBSTAR=Ot,mt.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>mt(n,e,t)};const At=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};mt.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return mt;const t=mt;return Object.assign(function(n,o){return t(n,o,At(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:class extends t.Minimatch{constructor(n){super(n,At(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(At(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o){super(n,o,At(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,At(e,o))}},unescape:function(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,At(e,o))},escape:function(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,At(e,o))},filter:function(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,At(e,o))},defaults:n=>t.defaults(At(e,n)),makeRe:function(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,At(e,o))},braceExpand:function(n){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,At(e,o))},match:function(n,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,o,At(e,a))},sep:t.sep,GLOBSTAR:Ot})};const Or=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return pe(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:To(e)};mt.braceExpand=Or,mt.makeRe=function(e){return new ge(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},mt.match=function(e,t){const n=new ge(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter(o=>n.match(o)),n.options.nonull&&!e.length&&e.push(t),e};const kn=/[?*]|[+@!]\(.*?\)|\[|\]/;class ge{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pe(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||Ar,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.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 n of t)if(typeof n!="string")return!0;return!1}debug(){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const o=this.globSet.map(u=>this.slashSplit(u));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let a=this.globParts.map((u,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){const m=!(u[0]!==""||u[1]!==""||u[2]!=="?"&&kn.test(u[2])||kn.test(u[3])),p=/^[a-z]:/i.test(u[0]);if(m)return[...u.slice(0,4),...u.slice(4).map(i=>this.parse(i))];if(p)return[u[0],...u.slice(1).map(i=>this.parse(i))]}return u.map(m=>this.parse(m))});if(this.debug(this.pattern,a),this.set=a.filter(u=>u.indexOf(!1)===-1),this.isWindows)for(let u=0;u<this.set.length;u++){const c=this.set[u];c[0]===""&&c[1]===""&&this.globParts[u][2]==="?"&&typeof c[3]=="string"&&/^[a-z]:$/i.test(c[3])&&(c[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let a=0;a<t[o].length;a++)t[o][a]==="**"&&(t[o][a]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=n>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let a=o;for(;n[a+1]==="**";)a++;a!==o&&n.splice(o,a-o)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((o,a)=>{const u=o[o.length-1];return a==="**"&&u==="**"?o:a===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(o.pop(),o):(o.push(a),o)},[])).length===0?[""]:n)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let a=1;a<t.length-1;a++){const u=t[a];a===1&&u===""&&t[0]===""||u!=="."&&u!==""||(n=!0,t.splice(a,1),a--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(n=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){const a=t[o-1];a&&a!=="."&&a!==".."&&a!=="**"&&(n=!0,t.splice(o-1,2),o-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let o of t){let a=-1;for(;(a=o.indexOf("**",a+1))!==-1;){let c=a;for(;o[c+1]==="**";)c++;c>a&&o.splice(a+1,c-a);let l=o[a+1];const m=o[a+2],p=o[a+3];if(l!==".."||!m||m==="."||m===".."||!p||p==="."||p==="..")continue;n=!0,o.splice(a,1);const i=o.slice(0);i[a]="**",t.push(i),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<o.length-1;c++){const l=o[c];c===1&&l===""&&o[0]===""||l!=="."&&l!==""||(n=!0,o.splice(c,1),c--)}o[0]!=="."||o.length!==2||o[1]!=="."&&o[1]!==""||(n=!0,o.pop())}let u=0;for(;(u=o.indexOf("..",u+1))!==-1;){const c=o[u-1];if(c&&c!=="."&&c!==".."&&c!=="**"){n=!0;const l=u===1&&o[u+1]==="**"?["."]:[];o.splice(u-1,2,...l),o.length===0&&o.push(""),u-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let o=n+1;o<t.length;o++){const a=this.partsMatch(t[n],t[o],!this.preserveMultipleSlashes);if(a){t[n]=[],t[o]=a;break}}return t.filter(n=>n.length)}partsMatch(t,n){let o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=0,u=0,c=[],l="";for(;a<t.length&&u<n.length;)if(t[a]===n[u])c.push(l==="b"?n[u]:t[a]),a++,u++;else if(o&&t[a]==="**"&&n[u]===t[a+1])c.push(t[a]),a++;else if(o&&n[u]==="**"&&t[a]===n[u+1])c.push(n[u]),u++;else if(t[a]!=="*"||!n[u]||!this.options.dot&&n[u].startsWith(".")||n[u]==="**"){if(n[u]!=="*"||!t[a]||!this.options.dot&&t[a].startsWith(".")||t[a]==="**"||l==="a")return!1;l="b",c.push(n[u]),a++,u++}else{if(l==="b")return!1;l="a",c.push(t[a]),a++,u++}return t.length===n.length&&c}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,o=0;for(let a=0;a<t.length&&t.charAt(a)==="!";a++)n=!n,o++;o&&(this.pattern=t.slice(o)),this.negate=n}matchOne(t,n){let o=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const a=this.options;if(this.isWindows){const b=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),O=!b&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),I=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=O?3:b?0:void 0,E=!I&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])?3:I?0:void 0;if(typeof h=="number"&&typeof E=="number"){const[T,P]=[t[h],n[E]];T.toLowerCase()===P.toLowerCase()&&(n[E]=T,E>h?n=n.slice(E):h>E&&(t=t.slice(h)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var c=0,l=0,m=t.length,p=n.length;c<m&&l<p;c++,l++){this.debug("matchOne loop");var i=n[l],d=t[c];if(this.debug(n,i,d),i===!1)return!1;if(i===Ot){this.debug("GLOBSTAR",[n,i,d]);var f=c,v=l+1;if(v===p){for(this.debug("** at the end");c<m;c++)if(t[c]==="."||t[c]===".."||!a.dot&&t[c].charAt(0)===".")return!1;return!0}for(;f<m;){var w=t[f];if(this.debug(`
|
||
globstar while`,t,f,n,v,w),this.matchOne(t.slice(f),n.slice(v),o))return this.debug("globstar found match!",f,m,w),!0;if(w==="."||w===".."||!a.dot&&w.charAt(0)==="."){this.debug("dot detected!",t,f,n,v);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!o||(this.debug(`
|
||
>>> no match, partial?`,t,f,n,v),f!==m))}let b;if(typeof i=="string"?(b=d===i,this.debug("string match",i,d,b)):(b=i.test(d),this.debug("pattern match",i,d,b)),!b)return!1}if(c===m&&l===p)return!0;if(c===m)return o;if(l===p)return c===m-1&&t[c]==="";throw new Error("wtf?")}braceExpand(){return Or(this.pattern,this.options)}parse(t){pe(t);const n=this.options;if(t==="**")return Ot;if(t==="")return"";let o,a=null;(o=t.match(Vo))?a=n.dot?qo:Xo:(o=t.match(_o))?a=(n.nocase?n.dot?Uo:Bo:n.dot?Do:$o)(o[1]):(o=t.match(Wo))?a=(n.nocase?n.dot?Yo:zo:n.dot?Ho:Zo)(o):(o=t.match(jo))?a=n.dot?ko:Mo:(o=t.match(Go))&&(a=Fo);const u=yt.fromGlob(t,this.options).toMMPattern();return a&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:a}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",a=new Set(n.nocase?["i"]:[]);let u=t.map(m=>{const p=m.map(i=>{if(i instanceof RegExp)for(const d of i.flags.split(""))a.add(d);return typeof i=="string"?i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):i===Ot?Ot:i._src});return p.forEach((i,d)=>{const f=p[d+1],v=p[d-1];i===Ot&&v!==Ot&&(v===void 0?f!==void 0&&f!==Ot?p[d+1]="(?:\\/|"+o+"\\/)?"+f:p[d]=o:f===void 0?p[d-1]=v+"(?:\\/|"+o+")?":f!==Ot&&(p[d-1]=v+"(?:\\/|\\/"+o+"\\/)"+f,p[d+1]=Ot))}),p.filter(i=>i!==Ot).join("/")}).join("|");const[c,l]=t.length>1?["(?:",")"]:["",""];u="^"+c+u+l+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const o=this.options;this.isWindows&&(t=t.split("\\").join("/"));const a=this.slashSplit(t);this.debug(this.pattern,"split",a);const u=this.set;this.debug(this.pattern,"set",u);let c=a[a.length-1];if(!c)for(let l=a.length-2;!c&&l>=0;l--)c=a[l];for(let l=0;l<u.length;l++){const m=u[l];let p=a;if(o.matchBase&&m.length===1&&(p=[c]),this.matchOne(p,m,n))return!!o.flipNegate||!this.negate}return!o.flipNegate&&this.negate}static defaults(t){return mt.defaults(t).Minimatch}}function sn(e){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function lt(e,t){const{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw sn(t);return t}function jt(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?No(e.headers):{},status:e.status,statusText:e.statusText}:t}mt.AST=yt,mt.Minimatch=ge,mt.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},mt.unescape=Ht;const Qo=(Gn=function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"COPY",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:o.overwrite===!1?"F":"T",Depth:o.shallow?"0":"infinity"}},e,o);return c=function(l){lt(e,l)},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Gn.apply(this,e))}catch(n){return Promise.reject(n)}});var Gn,an=Y(635),Ko=Y(829),Lt=Y.n(Ko),Ft=(function(e){return e.Array="array",e.Object="object",e.Original="original",e})(Ft||{});function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ft.Original;const o=Lt().get(e,t);return n==="array"&&Array.isArray(o)===!1?[o]:n==="object"&&Array.isArray(o)?o[0]:o}function Jt(e){return new Promise(t=>{t((function(n){const{multistatus:o}=n;if(o==="")return{multistatus:{response:[]}};if(!o)throw new Error("Invalid response: No root multistatus found");const a={multistatus:Array.isArray(o)?o[0]:o};return Lt().set(a,"multistatus.response",se(a,"multistatus.response",Ft.Array)),Lt().set(a,"multistatus.response",Lt().get(a,"multistatus.response").map(u=>(function(c){const l=Object.assign({},c);return l.status?Lt().set(l,"status",se(l,"status",Ft.Object)):(Lt().set(l,"propstat",se(l,"propstat",Ft.Object)),Lt().set(l,"propstat.prop",se(l,"propstat.prop",Ft.Object))),l})(u))),a})(new an.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(n,o,a)=>o==="true"||o==="false"?o==="true":o,tagValueProcessor(n,o,a){if(!a.endsWith("propstat.prop.displayname"))return o}}).parse(e)))})}function ye(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:o=null,getcontentlength:a="0",resourcetype:u=null,getcontenttype:c=null,getetag:l=null}=e,m=u&&typeof u=="object"&&u.collection!==void 0?"directory":"file",p={filename:t,basename:ce().basename(t),lastmod:o,size:parseInt(a,10),type:m,etag:typeof l=="string"?l.replace(/"/g,""):null};return m==="file"&&(p.mime=c&&typeof c=="string"?c.split(";")[0]:""),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),p.props=e),p}function Ir(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=null;try{e.multistatus.response[0].propstat&&(o=e.multistatus.response[0])}catch{}if(!o)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:a,status:u}}=o,[c,l,m]=u.split(" ",3),p=parseInt(l,10);if(p>=400){const i=new Error(`Invalid response: ${p} ${m}`);throw i.status=p,i}return ye(a,Kt(t),n)}function Tr(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function Ce(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const un=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:o=!1}=n,a=ct({url:et(e.remoteURL,tt(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return Ce(ut(a,e),function(u){return lt(e,u),Ce(u.text(),function(c){return Ce(Jt(c),function(l){const m=Ir(l,t,o);return jt(u,m,o)})})})});function Rr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Jo=Sr(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=(function(u){if(!u||u==="/")return[];let c=u;const l=[];do l.push(c),c=ce().dirname(c);while(c&&c!=="/");return l})(Kt(t));o.sort((u,c)=>u.length>c.length?1:c.length>u.length?-1:0);let a=!1;return(function(u,c,l){if(typeof u[Vn]=="function"){let b=function(O){try{for(;!(m=d.next()).done;)if((O=c(m.value))&&O.then){if(!Xn(O))return void O.then(b,i||(i=Et.bind(null,p=new Vt,2)));O=O.v}p?Et(p,1,O):p=O}catch(I){Et(p||(p=new Vt),2,I)}};var m,p,i,d=u[Vn]();if(b(),d.return){var f=function(O){try{m.done||d.return()}catch{}return O};if(p&&p.then)return p.then(f,function(O){throw f(O)});f()}return p}if(!("length"in u))throw new TypeError("Object is not iterable");for(var v=[],w=0;w<u.length;w++)v.push(u[w]);return(function(b,O,I){var h,E,T=-1;return(function P(R){try{for(;++T<b.length&&(!I||!I());)if((R=O(T))&&R.then){if(!Xn(R))return void R.then(P,E||(E=Et.bind(null,h=new Vt,2)));R=R.v}h?Et(h,1,R):h=R}catch(L){Et(h||(h=new Vt),2,L)}})(),h})(v,function(b){return c(v[b])},l)})(o,function(u){return c=function(){return(function(m,p){try{var i=Rr(un(e,u),function(d){if(d.type!=="directory")throw new Error(`Path includes a file: ${t}`)})}catch(d){return p(d)}return i&&i.then?i.then(void 0,p):i})(0,function(m){const p=m;return(function(){if(p.status===404)return a=!0,Fn(Ze(e,u,{...n,recursive:!1}));throw m})()})},(l=(function(){if(a)return Fn(Ze(e,u,{...n,recursive:!1}))})())&&l.then?l.then(c):c();var c,l},function(){return!1})});function Sr(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}}function ti(){}function Fn(e,t){return e&&e.then?e.then(ti):Promise.resolve()}const Vn=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Et(e,t,n){if(!e.s){if(n instanceof Vt){if(!n.s)return void(n.o=Et.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Et.bind(null,e,t),Et.bind(null,e,2));e.s=t,e.v=n;const o=e.o;o&&o(e)}}const Vt=(function(){function e(){}return e.prototype.then=function(t,n){const o=new e,a=this.s;if(a){const u=1&a?t:n;if(u){try{Et(o,1,u(this.v))}catch(c){Et(o,2,c)}return o}return this}return this.o=function(u){try{const c=u.v;1&u.s?Et(o,1,t?t(c):c):n?Et(o,1,n(c)):Et(o,2,c)}catch(c){Et(o,2,c)}},o},e})();function Xn(e){return e instanceof Vt&&1&e.s}const Ze=Sr(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n.recursive===!0)return Jo(e,t,n);const o=ct({url:et(e.remoteURL,(a=tt(t),a.endsWith("/")?a:a+"/")),method:"MKCOL"},e,n);var a;return Rr(ut(o,e),function(u){lt(e,u)})});var ei=Y(388),qn=Y.n(ei);const ni=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o={};if(typeof n.range=="object"&&typeof n.range.start=="number"){let l=`bytes=${n.range.start}-`;typeof n.range.end=="number"&&(l=`${l}${n.range.end}`),o.Range=l}const a=ct({url:et(e.remoteURL,tt(t)),method:"GET",headers:o},e,n);return c=function(l){if(lt(e,l),o.Range&&l.status!==206){const m=new Error(`Invalid response code for partial request: ${l.status}`);throw m.status=l.status,m}return n.callback&&setTimeout(()=>{n.callback(l)},0),l.body},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c}),ri=()=>{},oi=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t,n){n.url||(n.url=et(e.remoteURL,tt(t)));const o=ct(n,e,{});return u=function(c){return lt(e,c),c},(a=ut(o,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u}),ii=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=ct({url:et(e.remoteURL,tt(t)),method:"DELETE"},e,n);return u=function(c){lt(e,c)},(a=ut(o,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u}),si=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(o,a){try{var u=(c=un(e,t,n),l=function(){return!0},m?l?l(c):c:(c&&c.then||(c=Promise.resolve(c)),l?c.then(l):c))}catch(p){return a(p)}var c,l,m;return u&&u.then?u.then(void 0,a):u})(0,function(o){if(o.status===404)return!1;throw o})});function Pe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ai=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=ct({url:et(e.remoteURL,tt(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Pe(ut(o,e),function(a){return lt(e,a),Pe(a.text(),function(u){if(!u)throw new Error("Failed parsing directory contents: Empty response");return Pe(Jt(u),function(c){const l=Cn(t);let m=(function(p,i,d){let f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],v=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const w=ce().join(i,"/"),{multistatus:{response:b}}=p,O=b.map(I=>{const h=(function(T){try{return T.replace(/^https?:\/\/[^\/]+/,"")}catch(P){throw new vt(P,"Failed normalising HREF")}})(I.href),{propstat:{prop:E}}=I;return ye(E,w==="/"?decodeURIComponent(Kt(h)):Kt(ce().relative(decodeURIComponent(w),decodeURIComponent(h))),f)});return v?O:O.filter(I=>I.basename&&(I.type==="file"||I.filename!==d.replace(/\/$/,"")))})(c,Cn(e.remoteBasePath||e.remotePath),l,n.details,n.includeSelf);return n.glob&&(m=(function(p,i){return p.filter(d=>mt(d.filename,i,{matchBase:!0}))})(m,n.glob)),jt(a,m,n.details)})})})});function cn(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}}const ui=cn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=ct({url:et(e.remoteURL,tt(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[hi]},e,n);return de(ut(o,e),function(a){return lt(e,a),de(a.text(),function(u){return jt(a,u,n.details)})})});function de(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ci=cn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=ct({url:et(e.remoteURL,tt(t)),method:"GET"},e,n);return de(ut(o,e),function(a){let u;return lt(e,a),(function(c,l){var m=c();return m&&m.then?m.then(l):l()})(function(){return de(a.arrayBuffer(),function(c){u=c})},function(){return jt(a,u,n.details)})})}),li=cn(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:o="binary"}=n;if(o!=="binary"&&o!=="text")throw new vt({info:{code:_t.InvalidOutputFormat}},`Invalid output format: ${o}`);return o==="text"?ui(e,t,n):ci(e,t,n)}),hi=e=>e;function fi(e){return new an.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(xr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function xr(e,t){const n={...e};for(const o in n)n.hasOwnProperty(o)&&(n[o]&&typeof n[o]=="object"&&o.indexOf(":")===-1?(n[`${t}:${o}`]=xr(n[o],t),delete n[o]):/^@_/.test(o)===!1&&(n[`${t}:${o}`]=n[o],delete n[o]));return n}function Qe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Cr(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}}const pi=Cr(function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,o);return Qe(ut(a,e),function(u){if(lt(e,u),u.status!==204&&u.status!==200)throw sn(u)})}),gi=Cr(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:o,timeout:a=di}=n,u={Accept:"text/plain,application/xml",Timeout:a};o&&(u.If=o);const c=ct({url:et(e.remoteURL,tt(t)),method:"LOCK",headers:u,data:fi(e.contactHref)},e,n);return Qe(ut(c,e),function(l){return lt(e,l),Qe(l.text(),function(m){const p=(f=m,new an.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(f)),i=Lt().get(p,"prop.lockdiscovery.activelock.locktoken.href"),d=Lt().get(p,"prop.lockdiscovery.activelock.timeout");var f;if(!i)throw sn(l,"No lock token received: ");return{token:i,serverTimeout:d}})})}),di="Infinite, Second-4100000000";function Le(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const mi=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=t.path||"/",o=ct({url:et(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return Le(ut(o,e),function(a){return lt(e,a),Le(a.text(),function(u){return Le(Jt(u),function(c){const l=(function(m){try{const[p]=m.multistatus.response,{propstat:{prop:{"quota-used-bytes":i,"quota-available-bytes":d}}}=p;return i!==void 0&&d!==void 0?{used:parseInt(String(i),10),available:Tr(d)}:null}catch{}return null})(c);return jt(a,l,t.details)})})})});function _e(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const yi=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:o=!1}=n,a=ct({url:et(e.remoteURL,tt(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return _e(ut(a,e),function(u){return lt(e,u),_e(u.text(),function(c){return _e(Jt(c),function(l){const m=(function(p,i,d){const f={truncated:!1,results:[]};return f.truncated=p.multistatus.response.some(v=>(v.status||v.propstat?.status).split(" ",3)?.[1]==="507"&&v.href.replace(/\/$/,"").endsWith(tt(i).replace(/\/$/,""))),p.multistatus.response.forEach(v=>{if(v.propstat===void 0)return;const w=v.href.split("/").map(decodeURIComponent).join("/");f.results.push(ye(v.propstat.prop,w,d))}),f})(l,t,o);return jt(u,m,o)})})})}),bi=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=ct({url:et(e.remoteURL,tt(t)),method:"MOVE",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:o.overwrite===!1?"F":"T"}},e,o);return c=function(l){lt(e,l)},(u=ut(a,e))&&u.then||(u=Promise.resolve(u)),c?u.then(c):u;var u,c});var Ei=Y(172);const vi=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:a=!0,overwrite:u=!0}=o,c={"Content-Type":"application/octet-stream"};a===!1||(c["Content-Length"]=typeof a=="number"?`${a}`:`${(function(i){if(br(i))return i.byteLength;if(Er(i))return i.length;if(typeof i=="string")return(0,Ei.d)(i);throw new vt({info:{code:_t.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(n)}`),u||(c["If-None-Match"]="*");const l=ct({url:et(e.remoteURL,tt(t)),method:"PUT",headers:c,data:n},e,o);return p=function(i){try{lt(e,i)}catch(d){const f=d;if(f.status!==412||u)throw f;return!1}return!0},(m=ut(l,e))&&m.then||(m=Promise.resolve(m)),p?m.then(p):m;var m,p}),Pr=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}})(function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=ct({url:et(e.remoteURL,tt(t)),method:"OPTIONS"},e,n);return u=function(c){try{lt(e,c)}catch(l){throw l}return{compliance:(c.headers.get("DAV")??"").split(",").map(l=>l.trim()),server:c.headers.get("Server")??""}},(a=ut(o,e))&&a.then||(a=Promise.resolve(a)),u?a.then(u):a;var a,u});function Qt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const wi=ln(function(e,t,n,o,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>o||n<0)throw new vt({info:{code:_t.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/octet-stream","Content-Length":""+(o-n+1),"Content-Range":`bytes ${n}-${o}/*`},l=ct({url:et(e.remoteURL,tt(t)),method:"PUT",headers:c,data:a},e,u);return Qt(ut(l,e),function(m){lt(e,m)})});function Wn(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const Ni=ln(function(e,t,n,o,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>o||n<0)throw new vt({info:{code:_t.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const c={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(o-n+1),"X-Update-Range":`bytes=${n}-${o}`},l=ct({url:et(e.remoteURL,tt(t)),method:"PATCH",headers:c,data:a},e,u);return Qt(ut(l,e),function(m){lt(e,m)})});function ln(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(o){return Promise.reject(o)}}}const Ai=ln(function(e,t,n,o,a){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Qt(Pr(e,t,u),function(c){let l=!1;return Wn(function(){if(c.compliance.includes("sabredav-partialupdate"))return Qt(Ni(e,t,n,o,a,u),function(m){return l=!0,m})},function(m){let p=!1;return l?m:Wn(function(){if(c.server.includes("Apache")&&c.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Qt(wi(e,t,n,o,a,u),function(i){return p=!0,i})},function(i){if(p)return i;throw new vt({info:{code:_t.NotSupported}},"Not supported")})})})}),Oi="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Ii(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:n=null,remoteBasePath:o,contactHref:a=Oi,ha1:u,headers:c={},httpAgent:l,httpsAgent:m,password:p,token:i,username:d,withCredentials:f}=t;let v=n;v||(v=d||p?bt.Password:bt.None);const w={authType:v,remoteBasePath:o,contactHref:a,ha1:u,headers:Object.assign({},c),httpAgent:l,httpsAgent:m,password:p,remotePath:fo(e),remoteURL:e,token:i,username:d,withCredentials:f};return dr(w,d,p,i,u),{copyFile:(b,O,I)=>Qo(w,b,O,I),createDirectory:(b,O)=>Ze(w,b,O),createReadStream:(b,O)=>(function(I,h){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const T=new(qn()).PassThrough;return ni(I,h,E).then(P=>{P.pipe(T)}).catch(P=>{T.emit("error",P)}),T})(w,b,O),createWriteStream:(b,O,I)=>(function(h,E){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ri;const R=new(qn()).PassThrough,L={};T.overwrite===!1&&(L["If-None-Match"]="*");const x=ct({url:et(h.remoteURL,tt(E)),method:"PUT",headers:L,data:R,maxRedirects:0},h,T);return ut(x,h).then(A=>lt(h,A)).then(A=>{setTimeout(()=>{P(A)},0)}).catch(A=>{R.emit("error",A)}),R})(w,b,O,I),customRequest:(b,O)=>oi(w,b,O),deleteFile:(b,O)=>ii(w,b,O),exists:(b,O)=>si(w,b,O),getDirectoryContents:(b,O)=>ai(w,b,O),getFileContents:(b,O)=>li(w,b,O),getFileDownloadLink:b=>(function(O,I){let h=et(O.remoteURL,tt(I));const E=/^https:/i.test(h)?"https":"http";switch(O.authType){case bt.None:break;case bt.Password:{const T=Ln(O.headers.Authorization.replace(/^Basic /i,"").trim());h=h.replace(/^https?:\/\//,`${E}://${T}@`);break}default:throw new vt({info:{code:_t.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${O.authType}`)}return h})(w,b),getFileUploadLink:b=>(function(O,I){let h=`${et(O.remoteURL,tt(I))}?Content-Type=application/octet-stream`;const E=/^https:/i.test(h)?"https":"http";switch(O.authType){case bt.None:break;case bt.Password:{const T=Ln(O.headers.Authorization.replace(/^Basic /i,"").trim());h=h.replace(/^https?:\/\//,`${E}://${T}@`);break}default:throw new vt({info:{code:_t.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${O.authType}`)}return h})(w,b),getHeaders:()=>Object.assign({},w.headers),getQuota:b=>mi(w,b),lock:(b,O)=>gi(w,b,O),moveFile:(b,O,I)=>bi(w,b,O,I),putFileContents:(b,O,I)=>vi(w,b,O,I),partialUpdateFileContents:(b,O,I,h,E)=>Ai(w,b,O,I,h,E),getDAVCompliance:b=>Pr(w,b),search:(b,O)=>yi(w,b,O),setHeaders:b=>{w.headers=Object.assign({},b)},stat:(b,O)=>un(w,b,O),unlock:(b,O,I)=>pi(w,b,O,I)}}It.hT,It.O4,It.Kd,It.YK;var Ti=It.UU,Ri=It.Gu;It.ky,It.h4,It.ch,It.hq,It.i5;const Ke=Wr().setApp("@f7cloud/files").detectUser().build();var be=(e=>(e.Folder="folder",e.File="file",e))(be||{}),St=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(St||{});const Lr=function(e,t){return e.match(t)!==null},Bt=(e,t)=>{if(e.id&&typeof e.id!="number")throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.displayname&&typeof e.displayname!="string")throw new Error("Invalid displayname type");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||typeof e.mime!="string"||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&typeof e.size!="number"&&e.size!==void 0)throw new Error("Invalid size type");if("permissions"in e&&e.permissions!==void 0&&!(typeof e.permissions=="number"&&e.permissions>=St.NONE&&e.permissions<=St.ALL))throw new Error("Invalid permissions");if(e.owner&&e.owner!==null&&typeof e.owner!="string")throw new Error("Invalid owner type");if(e.attributes&&typeof e.attributes!="object")throw new Error("Invalid attributes type");if(e.root&&typeof e.root!="string")throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&Lr(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes(eo(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(hn).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var hn=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(hn||{});class Ee{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(Ee.prototype)).filter(t=>typeof t[1].get=="function"&&t[0]!=="__proto__").map(t=>t[0]);handler={set:(t,n,o)=>this.readonlyAttributes.includes(n)?!1:Reflect.set(t,n,o),deleteProperty:(t,n)=>this.readonlyAttributes.includes(n)?!1:Reflect.deleteProperty(t,n),get:(t,n,o)=>this.readonlyAttributes.includes(n)?(Ke.warn(`Accessing "Node.attributes.${n}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,n)):Reflect.get(t,n,o)};constructor(t,n){t.mime||(t.mime="application/octet-stream"),Bt(t,n||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),n&&(this._knownDavService=n)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+Kr(this.source.slice(t.length))}get basename(){return Jr(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){Bt({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return to(this.source)}get dirname(){if(this.root){let n=this.source;this.isDavResource&&(n=n.split(this._knownDavService).pop());const o=n.indexOf(this.root),a=this.root.replace(/\/$/,"");return re(n.slice(o+a.length)||"/")}const t=new URL(this.source);return re(t.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",Bt({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){Bt({...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){Bt({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?St.READ:this._data.permissions!==void 0?this._data.permissions:St.NONE}set permissions(t){Bt({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return Lr(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&&re(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 n=t.indexOf(this.root),o=this.root.replace(/\/$/,"");return t.slice(n+o.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){Bt({...this._data,status:t},this._knownDavService),this._data.status=t}get data(){return structuredClone(this._data)}move(t){Bt({...this._data,source:t},this._knownDavService);const n=this.basename;this._data.source=t,this.displayname===n&&this.basename!==n&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move(re(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[n,o]of Object.entries(t))try{o===void 0?delete this.attributes[n]:this.attributes[n]=o}catch(a){if(a instanceof TypeError)continue;throw a}}}class fn extends Ee{get type(){return be.File}clone(){return new fn(this.data)}}class pn extends Ee{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return be.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new pn(this.data)}}const Si=function(e=""){let t=St.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=St.CREATE),e.includes("G")&&(t|=St.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=St.UPDATE),e.includes("D")&&(t|=St.DELETE),e.includes("R")&&(t|=St.SHARE)),t},xi=["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"],Ci={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},gn=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...xi]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")},dn=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...Ci}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")},Qi=function(){return`<?xml version="1.0"?>
|
||
<d:propfind ${dn()}>
|
||
<d:prop>
|
||
${gn()}
|
||
</d:prop>
|
||
</d:propfind>`},Pi=function(){return`<?xml version="1.0"?>
|
||
<oc:filter-files ${dn()}>
|
||
<d:prop>
|
||
${gn()}
|
||
</d:prop>
|
||
<oc:filter-rules>
|
||
<oc:favorite>1</oc:favorite>
|
||
</oc:filter-rules>
|
||
</oc:filter-files>`},Ki=function(e){return`<?xml version="1.0" encoding="UTF-8"?>
|
||
<d:searchrequest ${dn()}
|
||
xmlns:ns="https://github.com/icewind1991/SearchDAV/ns">
|
||
<d:basicsearch>
|
||
<d:select>
|
||
<d:prop>
|
||
${gn()}
|
||
</d:prop>
|
||
</d:select>
|
||
<d:from>
|
||
<d:scope>
|
||
<d:href>/files/${Je()?.uid}/</d:href>
|
||
<d:depth>infinity</d:depth>
|
||
</d:scope>
|
||
</d:from>
|
||
<d:where>
|
||
<d:and>
|
||
<d:or>
|
||
<d:not>
|
||
<d:eq>
|
||
<d:prop>
|
||
<d:getcontenttype/>
|
||
</d:prop>
|
||
<d:literal>httpd/unix-directory</d:literal>
|
||
</d:eq>
|
||
</d:not>
|
||
<d:eq>
|
||
<d:prop>
|
||
<oc:size/>
|
||
</d:prop>
|
||
<d:literal>0</d:literal>
|
||
</d:eq>
|
||
</d:or>
|
||
<d:gt>
|
||
<d:prop>
|
||
<d:getlastmodified/>
|
||
</d:prop>
|
||
<d:literal>${e}</d:literal>
|
||
</d:gt>
|
||
</d:and>
|
||
</d:where>
|
||
<d:orderby>
|
||
<d:order>
|
||
<d:prop>
|
||
<d:getlastmodified/>
|
||
</d:prop>
|
||
<d:descending/>
|
||
</d:order>
|
||
</d:orderby>
|
||
<d:limit>
|
||
<d:nresults>100</d:nresults>
|
||
<ns:firstresult>0</ns:firstresult>
|
||
</d:limit>
|
||
</d:basicsearch>
|
||
</d:searchrequest>`};function Li(){return tn()?`/files/${ro()}`:`/files/${Je()?.uid}`}const _r=Li();function _i(){const e=zr("dav");return tn()?e.replace("remote.php","public.php"):e}const $r=_i(),Ji=function(e=$r,t={}){const n=Ti(e,{headers:t});function o(a){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:a??""})}return Hr(o),o(Yr()),Ri().patch("fetch",(a,u)=>{const c=u.headers;return c?.method&&(u.method=c.method,delete c.method),fetch(a,u)}),n},ts=(e,t="/",n=_r)=>{const o=new AbortController;return new Pt(async(a,u,c)=>{c(()=>o.abort());try{const l=(await e.getDirectoryContents(`${n}${t}`,{signal:o.signal,details:!0,data:Pi(),headers:{method:"REPORT"},includeSelf:!0})).data.filter(m=>m.filename!==t).map(m=>$i(m,n));a(l)}catch(l){u(l)}})},$i=function(e,t=_r,n=$r){let o=Je()?.uid;if(tn())o=o??"anonymous";else if(!o)throw new Error("No user id found");const a=e.props,u=Si(a?.permissions),c=String(a?.["owner-id"]||o),l=a.fileid||0,m=new Date(Date.parse(e.lastmod)),p=new Date(Date.parse(a.creationdate)),i={id:l,source:`${n}${e.filename}`,mtime:!isNaN(m.getTime())&&m.getTime()!==0?m:void 0,crtime:!isNaN(p.getTime())&&p.getTime()!==0?p:void 0,mime:e.mime||"application/octet-stream",displayname:a.displayname!==void 0?String(a.displayname):void 0,size:a?.size||Number.parseInt(a.getcontentlength||"0"),status:l<0?hn.FAILED:void 0,permissions:u,owner:c,root:t,attributes:{...e,...a,hasPreview:a?.["has-preview"]}};return delete i.attributes?.props,e.type==="file"?new fn(i):new pn(i)};var $e={},De={exports:{}},zn={},Yn;function Di(){return Yn||(Yn=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=i,n.toByteArray=f,n.fromByteArray=b;for(var o=[],a=[],u=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,m=c.length;l<m;++l)o[l]=c[l],a[c.charCodeAt(l)]=l;a[45]=62,a[95]=63;function p(h){var E=h.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=h.indexOf("=");T===-1&&(T=E);var P=T===E?0:4-T%4;return[T,P]}function i(h){var E=p(h),T=E[0],P=E[1];return(T+P)*3/4-P}function d(h,E,T){return(E+T)*3/4-T}function f(h){var E,T=p(h),P=T[0],R=T[1],L=new u(d(h,P,R)),x=0,A=R>0?P-4:P,U;for(U=0;U<A;U+=4)E=a[h.charCodeAt(U)]<<18|a[h.charCodeAt(U+1)]<<12|a[h.charCodeAt(U+2)]<<6|a[h.charCodeAt(U+3)],L[x++]=E>>16&255,L[x++]=E>>8&255,L[x++]=E&255;return R===2&&(E=a[h.charCodeAt(U)]<<2|a[h.charCodeAt(U+1)]>>4,L[x++]=E&255),R===1&&(E=a[h.charCodeAt(U)]<<10|a[h.charCodeAt(U+1)]<<4|a[h.charCodeAt(U+2)]>>2,L[x++]=E>>8&255,L[x++]=E&255),L}function v(h){return o[h>>18&63]+o[h>>12&63]+o[h>>6&63]+o[h&63]}function w(h,E,T){for(var P,R=[],L=E;L<T;L+=3)P=(h[L]<<16&16711680)+(h[L+1]<<8&65280)+(h[L+2]&255),R.push(v(P));return R.join("")}function b(h){for(var E,T=h.length,P=T%3,R=[],L=16383,x=0,A=T-P;x<A;x+=L)R.push(w(h,x,x+L>A?A:x+L));return P===1?(E=h[T-1],R.push(o[E>>2]+o[E<<4&63]+"==")):P===2&&(E=(h[T-2]<<8)+h[T-1],R.push(o[E>>10]+o[E>>4&63]+o[E<<2&63]+"=")),R.join("")}var O={};O.read=function(h,E,T,P,R){var L,x,A=R*8-P-1,U=(1<<A)-1,M=U>>1,S=-7,D=T?R-1:0,F=T?-1:1,G=h[E+D];for(D+=F,L=G&(1<<-S)-1,G>>=-S,S+=A;S>0;L=L*256+h[E+D],D+=F,S-=8);for(x=L&(1<<-S)-1,L>>=-S,S+=P;S>0;x=x*256+h[E+D],D+=F,S-=8);if(L===0)L=1-M;else{if(L===U)return x?NaN:(G?-1:1)*(1/0);x=x+Math.pow(2,P),L=L-M}return(G?-1:1)*x*Math.pow(2,L-P)},O.write=function(h,E,T,P,R,L){var x,A,U,M=L*8-R-1,S=(1<<M)-1,D=S>>1,F=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,G=P?0:L-1,X=P?1:-1,V=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===1/0?(A=isNaN(E)?1:0,x=S):(x=Math.floor(Math.log(E)/Math.LN2),E*(U=Math.pow(2,-x))<1&&(x--,U*=2),x+D>=1?E+=F/U:E+=F*Math.pow(2,1-D),E*U>=2&&(x++,U/=2),x+D>=S?(A=0,x=S):x+D>=1?(A=(E*U-1)*Math.pow(2,R),x=x+D):(A=E*Math.pow(2,D-1)*Math.pow(2,R),x=0));R>=8;h[T+G]=A&255,G+=X,A/=256,R-=8);for(x=x<<R|A,M+=R;M>0;h[T+G]=x&255,G+=X,x/=256,M-=8);h[T+G-X]|=V*128},(function(h){const E=n,T=O,P=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;h.Buffer=S,h.SlowBuffer=Mt,h.INSPECT_MAX_BYTES=50;const R=2147483647;h.kMaxLength=R;const{Uint8Array:L,ArrayBuffer:x,SharedArrayBuffer:A}=globalThis;S.TYPED_ARRAY_SUPPORT=U(),!S.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function U(){try{const r=new L(1),s={foo:function(){return 42}};return Object.setPrototypeOf(s,L.prototype),Object.setPrototypeOf(r,s),r.foo()===42}catch{return!1}}Object.defineProperty(S.prototype,"parent",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.buffer}}),Object.defineProperty(S.prototype,"offset",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.byteOffset}});function M(r){if(r>R)throw new RangeError('The value "'+r+'" is invalid for option "size"');const s=new L(r);return Object.setPrototypeOf(s,S.prototype),s}function S(r,s,g){if(typeof r=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(r)}return D(r,s,g)}S.poolSize=8192;function D(r,s,g){if(typeof r=="string")return V(r,s);if(x.isView(r))return z(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(xt(r,x)||r&&xt(r.buffer,x)||typeof A<"u"&&(xt(r,A)||r&&xt(r.buffer,A)))return st(r,s,g);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const C=r.valueOf&&r.valueOf();if(C!=null&&C!==r)return S.from(C,s,g);const $=W(r);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return S.from(r[Symbol.toPrimitive]("string"),s,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}S.from=function(r,s,g){return D(r,s,g)},Object.setPrototypeOf(S.prototype,L.prototype),Object.setPrototypeOf(S,L);function F(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function G(r,s,g){return F(r),r<=0?M(r):s!==void 0?typeof g=="string"?M(r).fill(s,g):M(r).fill(s):M(r)}S.alloc=function(r,s,g){return G(r,s,g)};function X(r){return F(r),M(r<0?0:Q(r)|0)}S.allocUnsafe=function(r){return X(r)},S.allocUnsafeSlow=function(r){return X(r)};function V(r,s){if((typeof s!="string"||s==="")&&(s="utf8"),!S.isEncoding(s))throw new TypeError("Unknown encoding: "+s);const g=$t(r,s)|0;let C=M(g);const $=C.write(r,s);return $!==g&&(C=C.slice(0,$)),C}function Z(r){const s=r.length<0?0:Q(r.length)|0,g=M(s);for(let C=0;C<s;C+=1)g[C]=r[C]&255;return g}function z(r){if(xt(r,L)){const s=new L(r);return st(s.buffer,s.byteOffset,s.byteLength)}return Z(r)}function st(r,s,g){if(s<0||r.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<s+(g||0))throw new RangeError('"length" is outside of buffer bounds');let C;return s===void 0&&g===void 0?C=new L(r):g===void 0?C=new L(r,s):C=new L(r,s,g),Object.setPrototypeOf(C,S.prototype),C}function W(r){if(S.isBuffer(r)){const s=Q(r.length)|0,g=M(s);return g.length===0||r.copy(g,0,0,s),g}if(r.length!==void 0)return typeof r.length!="number"||Ae(r.length)?M(0):Z(r);if(r.type==="Buffer"&&Array.isArray(r.data))return Z(r.data)}function Q(r){if(r>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return r|0}function Mt(r){return+r!=r&&(r=0),S.alloc(+r)}S.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==S.prototype},S.compare=function(r,s){if(xt(r,L)&&(r=S.from(r,r.offset,r.byteLength)),xt(s,L)&&(s=S.from(s,s.offset,s.byteLength)),!S.isBuffer(r)||!S.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===s)return 0;let g=r.length,C=s.length;for(let $=0,B=Math.min(g,C);$<B;++$)if(r[$]!==s[$]){g=r[$],C=s[$];break}return g<C?-1:C<g?1:0},S.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},S.concat=function(r,s){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return S.alloc(0);let g;if(s===void 0)for(s=0,g=0;g<r.length;++g)s+=r[g].length;const C=S.allocUnsafe(s);let $=0;for(g=0;g<r.length;++g){let B=r[g];if(xt(B,L))$+B.length>C.length?(S.isBuffer(B)||(B=S.from(B)),B.copy(C,$)):L.prototype.set.call(C,B,$);else if(S.isBuffer(B))B.copy(C,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=B.length}return C};function $t(r,s){if(S.isBuffer(r))return r.length;if(x.isView(r)||xt(r,x))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const g=r.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&g===0)return 0;let $=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return Ne(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return An(r).length;default:if($)return C?-1:Ne(r).length;s=(""+s).toLowerCase(),$=!0}}S.byteLength=$t;function Nt(r,s,g){let C=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,s>>>=0,g<=s))return"";for(r||(r="utf8");;)switch(r){case"hex":return te(this,s,g);case"utf8":case"utf-8":return ht(this,s,g);case"ascii":return Rt(this,s,g);case"latin1":case"binary":return ve(this,s,g);case"base64":return gt(this,s,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,s,g);default:if(C)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),C=!0}}S.prototype._isBuffer=!0;function Tt(r,s,g){const C=r[s];r[s]=r[g],r[g]=C}S.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<r;s+=2)Tt(this,s,s+1);return this},S.prototype.swap32=function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<r;s+=4)Tt(this,s,s+3),Tt(this,s+1,s+2);return this},S.prototype.swap64=function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<r;s+=8)Tt(this,s,s+7),Tt(this,s+1,s+6),Tt(this,s+2,s+5),Tt(this,s+3,s+4);return this},S.prototype.toString=function(){const r=this.length;return r===0?"":arguments.length===0?ht(this,0,r):Nt.apply(this,arguments)},S.prototype.toLocaleString=S.prototype.toString,S.prototype.equals=function(r){if(!S.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:S.compare(this,r)===0},S.prototype.inspect=function(){let r="";const s=h.INSPECT_MAX_BYTES;return r=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(r+=" ... "),"<Buffer "+r+">"},P&&(S.prototype[P]=S.prototype.inspect),S.prototype.compare=function(r,s,g,C,$){if(xt(r,L)&&(r=S.from(r,r.offset,r.byteLength)),!S.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(s===void 0&&(s=0),g===void 0&&(g=r?r.length:0),C===void 0&&(C=0),$===void 0&&($=this.length),s<0||g>r.length||C<0||$>this.length)throw new RangeError("out of range index");if(C>=$&&s>=g)return 0;if(C>=$)return-1;if(s>=g)return 1;if(s>>>=0,g>>>=0,C>>>=0,$>>>=0,this===r)return 0;let B=$-C,k=g-s;const K=Math.min(B,k),ft=this.slice(C,$),J=r.slice(s,g);for(let H=0;H<K;++H)if(ft[H]!==J[H]){B=ft[H],k=J[H];break}return B<k?-1:k<B?1:0};function N(r,s,g,C,$){if(r.length===0)return-1;if(typeof g=="string"?(C=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Ae(g)&&(g=$?0:r.length-1),g<0&&(g=r.length+g),g>=r.length){if($)return-1;g=r.length-1}else if(g<0)if($)g=0;else return-1;if(typeof s=="string"&&(s=S.from(s,C)),S.isBuffer(s))return s.length===0?-1:y(r,s,g,C,$);if(typeof s=="number")return s=s&255,typeof L.prototype.indexOf=="function"?$?L.prototype.indexOf.call(r,s,g):L.prototype.lastIndexOf.call(r,s,g):y(r,[s],g,C,$);throw new TypeError("val must be string, number or Buffer")}function y(r,s,g,C,$){let B=1,k=r.length,K=s.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(r.length<2||s.length<2)return-1;B=2,k/=2,K/=2,g/=2}function ft(H,it){return B===1?H[it]:H.readUInt16BE(it*B)}let J;if($){let H=-1;for(J=g;J<k;J++)if(ft(r,J)===ft(s,H===-1?0:J-H)){if(H===-1&&(H=J),J-H+1===K)return H*B}else H!==-1&&(J-=J-H),H=-1}else for(g+K>k&&(g=k-K),J=g;J>=0;J--){let H=!0;for(let it=0;it<K;it++)if(ft(r,J+it)!==ft(s,it)){H=!1;break}if(H)return J}return-1}S.prototype.includes=function(r,s,g){return this.indexOf(r,s,g)!==-1},S.prototype.indexOf=function(r,s,g){return N(this,r,s,g,!0)},S.prototype.lastIndexOf=function(r,s,g){return N(this,r,s,g,!1)};function j(r,s,g,C){g=Number(g)||0;const $=r.length-g;C?(C=Number(C),C>$&&(C=$)):C=$;const B=s.length;C>B/2&&(C=B/2);let k;for(k=0;k<C;++k){const K=parseInt(s.substr(k*2,2),16);if(Ae(K))return k;r[g+k]=K}return k}function _(r,s,g,C){return ee(Ne(s,r.length-g),r,g,C)}function q(r,s,g,C){return ee(Fr(s),r,g,C)}function nt(r,s,g,C){return ee(An(s),r,g,C)}function rt(r,s,g,C){return ee(Vr(s,r.length-g),r,g,C)}S.prototype.write=function(r,s,g,C){if(s===void 0)C="utf8",g=this.length,s=0;else if(g===void 0&&typeof s=="string")C=s,g=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(g)?(g=g>>>0,C===void 0&&(C="utf8")):(C=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-s;if((g===void 0||g>$)&&(g=$),r.length>0&&(g<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let B=!1;for(;;)switch(C){case"hex":return j(this,r,s,g);case"utf8":case"utf-8":return _(this,r,s,g);case"ascii":case"latin1":case"binary":return q(this,r,s,g);case"base64":return nt(this,r,s,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,r,s,g);default:if(B)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),B=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gt(r,s,g){return s===0&&g===r.length?E.fromByteArray(r):E.fromByteArray(r.slice(s,g))}function ht(r,s,g){g=Math.min(r.length,g);const C=[];let $=s;for(;$<g;){const B=r[$];let k=null,K=B>239?4:B>223?3:B>191?2:1;if($+K<=g){let ft,J,H,it;switch(K){case 1:B<128&&(k=B);break;case 2:ft=r[$+1],(ft&192)===128&&(it=(B&31)<<6|ft&63,it>127&&(k=it));break;case 3:ft=r[$+1],J=r[$+2],(ft&192)===128&&(J&192)===128&&(it=(B&15)<<12|(ft&63)<<6|J&63,it>2047&&(it<55296||it>57343)&&(k=it));break;case 4:ft=r[$+1],J=r[$+2],H=r[$+3],(ft&192)===128&&(J&192)===128&&(H&192)===128&&(it=(B&15)<<18|(ft&63)<<12|(J&63)<<6|H&63,it>65535&&it<1114112&&(k=it))}}k===null?(k=65533,K=1):k>65535&&(k-=65536,C.push(k>>>10&1023|55296),k=56320|k&1023),C.push(k),$+=K}return at(C)}const Ct=4096;function at(r){const s=r.length;if(s<=Ct)return String.fromCharCode.apply(String,r);let g="",C=0;for(;C<s;)g+=String.fromCharCode.apply(String,r.slice(C,C+=Ct));return g}function Rt(r,s,g){let C="";g=Math.min(r.length,g);for(let $=s;$<g;++$)C+=String.fromCharCode(r[$]&127);return C}function ve(r,s,g){let C="";g=Math.min(r.length,g);for(let $=s;$<g;++$)C+=String.fromCharCode(r[$]);return C}function te(r,s,g){const C=r.length;(!s||s<0)&&(s=0),(!g||g<0||g>C)&&(g=C);let $="";for(let B=s;B<g;++B)$+=Xr[r[B]];return $}function Xt(r,s,g){const C=r.slice(s,g);let $="";for(let B=0;B<C.length-1;B+=2)$+=String.fromCharCode(C[B]+C[B+1]*256);return $}S.prototype.slice=function(r,s){const g=this.length;r=~~r,s=s===void 0?g:~~s,r<0?(r+=g,r<0&&(r=0)):r>g&&(r=g),s<0?(s+=g,s<0&&(s=0)):s>g&&(s=g),s<r&&(s=r);const C=this.subarray(r,s);return Object.setPrototypeOf(C,S.prototype),C};function ot(r,s,g){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+s>g)throw new RangeError("Trying to access beyond buffer length")}S.prototype.readUintLE=S.prototype.readUIntLE=function(r,s,g){r=r>>>0,s=s>>>0,g||ot(r,s,this.length);let C=this[r],$=1,B=0;for(;++B<s&&($*=256);)C+=this[r+B]*$;return C},S.prototype.readUintBE=S.prototype.readUIntBE=function(r,s,g){r=r>>>0,s=s>>>0,g||ot(r,s,this.length);let C=this[r+--s],$=1;for(;s>0&&($*=256);)C+=this[r+--s]*$;return C},S.prototype.readUint8=S.prototype.readUInt8=function(r,s){return r=r>>>0,s||ot(r,1,this.length),this[r]},S.prototype.readUint16LE=S.prototype.readUInt16LE=function(r,s){return r=r>>>0,s||ot(r,2,this.length),this[r]|this[r+1]<<8},S.prototype.readUint16BE=S.prototype.readUInt16BE=function(r,s){return r=r>>>0,s||ot(r,2,this.length),this[r]<<8|this[r+1]},S.prototype.readUint32LE=S.prototype.readUInt32LE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},S.prototype.readUint32BE=S.prototype.readUInt32BE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},S.prototype.readBigUInt64LE=Dt(function(r){r=r>>>0,Gt(r,"offset");const s=this[r],g=this[r+7];(s===void 0||g===void 0)&&qt(r,this.length-8);const C=s+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,$=this[++r]+this[++r]*2**8+this[++r]*2**16+g*2**24;return BigInt(C)+(BigInt($)<<BigInt(32))}),S.prototype.readBigUInt64BE=Dt(function(r){r=r>>>0,Gt(r,"offset");const s=this[r],g=this[r+7];(s===void 0||g===void 0)&&qt(r,this.length-8);const C=s*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],$=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+g;return(BigInt(C)<<BigInt(32))+BigInt($)}),S.prototype.readIntLE=function(r,s,g){r=r>>>0,s=s>>>0,g||ot(r,s,this.length);let C=this[r],$=1,B=0;for(;++B<s&&($*=256);)C+=this[r+B]*$;return $*=128,C>=$&&(C-=Math.pow(2,8*s)),C},S.prototype.readIntBE=function(r,s,g){r=r>>>0,s=s>>>0,g||ot(r,s,this.length);let C=s,$=1,B=this[r+--C];for(;C>0&&($*=256);)B+=this[r+--C]*$;return $*=128,B>=$&&(B-=Math.pow(2,8*s)),B},S.prototype.readInt8=function(r,s){return r=r>>>0,s||ot(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},S.prototype.readInt16LE=function(r,s){r=r>>>0,s||ot(r,2,this.length);const g=this[r]|this[r+1]<<8;return g&32768?g|4294901760:g},S.prototype.readInt16BE=function(r,s){r=r>>>0,s||ot(r,2,this.length);const g=this[r+1]|this[r]<<8;return g&32768?g|4294901760:g},S.prototype.readInt32LE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},S.prototype.readInt32BE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},S.prototype.readBigInt64LE=Dt(function(r){r=r>>>0,Gt(r,"offset");const s=this[r],g=this[r+7];(s===void 0||g===void 0)&&qt(r,this.length-8);const C=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(g<<24);return(BigInt(C)<<BigInt(32))+BigInt(s+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),S.prototype.readBigInt64BE=Dt(function(r){r=r>>>0,Gt(r,"offset");const s=this[r],g=this[r+7];(s===void 0||g===void 0)&&qt(r,this.length-8);const C=(s<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(C)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+g)}),S.prototype.readFloatLE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),T.read(this,r,!0,23,4)},S.prototype.readFloatBE=function(r,s){return r=r>>>0,s||ot(r,4,this.length),T.read(this,r,!1,23,4)},S.prototype.readDoubleLE=function(r,s){return r=r>>>0,s||ot(r,8,this.length),T.read(this,r,!0,52,8)},S.prototype.readDoubleBE=function(r,s){return r=r>>>0,s||ot(r,8,this.length),T.read(this,r,!1,52,8)};function wt(r,s,g,C,$,B){if(!S.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>$||s<B)throw new RangeError('"value" argument is out of bounds');if(g+C>r.length)throw new RangeError("Index out of range")}S.prototype.writeUintLE=S.prototype.writeUIntLE=function(r,s,g,C){if(r=+r,s=s>>>0,g=g>>>0,!C){const k=Math.pow(2,8*g)-1;wt(this,r,s,g,k,0)}let $=1,B=0;for(this[s]=r&255;++B<g&&($*=256);)this[s+B]=r/$&255;return s+g},S.prototype.writeUintBE=S.prototype.writeUIntBE=function(r,s,g,C){if(r=+r,s=s>>>0,g=g>>>0,!C){const k=Math.pow(2,8*g)-1;wt(this,r,s,g,k,0)}let $=g-1,B=1;for(this[s+$]=r&255;--$>=0&&(B*=256);)this[s+$]=r/B&255;return s+g},S.prototype.writeUint8=S.prototype.writeUInt8=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,1,255,0),this[s]=r&255,s+1},S.prototype.writeUint16LE=S.prototype.writeUInt16LE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,2,65535,0),this[s]=r&255,this[s+1]=r>>>8,s+2},S.prototype.writeUint16BE=S.prototype.writeUInt16BE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,2,65535,0),this[s]=r>>>8,this[s+1]=r&255,s+2},S.prototype.writeUint32LE=S.prototype.writeUInt32LE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,4,4294967295,0),this[s+3]=r>>>24,this[s+2]=r>>>16,this[s+1]=r>>>8,this[s]=r&255,s+4},S.prototype.writeUint32BE=S.prototype.writeUInt32BE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,4,4294967295,0),this[s]=r>>>24,this[s+1]=r>>>16,this[s+2]=r>>>8,this[s+3]=r&255,s+4};function mn(r,s,g,C,$){Nn(s,C,$,r,g,7);let B=Number(s&BigInt(4294967295));r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B;let k=Number(s>>BigInt(32)&BigInt(4294967295));return r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,g}function yn(r,s,g,C,$){Nn(s,C,$,r,g,7);let B=Number(s&BigInt(4294967295));r[g+7]=B,B=B>>8,r[g+6]=B,B=B>>8,r[g+5]=B,B=B>>8,r[g+4]=B;let k=Number(s>>BigInt(32)&BigInt(4294967295));return r[g+3]=k,k=k>>8,r[g+2]=k,k=k>>8,r[g+1]=k,k=k>>8,r[g]=k,g+8}S.prototype.writeBigUInt64LE=Dt(function(r,s=0){return mn(this,r,s,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeBigUInt64BE=Dt(function(r,s=0){return yn(this,r,s,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeIntLE=function(r,s,g,C){if(r=+r,s=s>>>0,!C){const K=Math.pow(2,8*g-1);wt(this,r,s,g,K-1,-K)}let $=0,B=1,k=0;for(this[s]=r&255;++$<g&&(B*=256);)r<0&&k===0&&this[s+$-1]!==0&&(k=1),this[s+$]=(r/B>>0)-k&255;return s+g},S.prototype.writeIntBE=function(r,s,g,C){if(r=+r,s=s>>>0,!C){const K=Math.pow(2,8*g-1);wt(this,r,s,g,K-1,-K)}let $=g-1,B=1,k=0;for(this[s+$]=r&255;--$>=0&&(B*=256);)r<0&&k===0&&this[s+$+1]!==0&&(k=1),this[s+$]=(r/B>>0)-k&255;return s+g},S.prototype.writeInt8=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,1,127,-128),r<0&&(r=255+r+1),this[s]=r&255,s+1},S.prototype.writeInt16LE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,2,32767,-32768),this[s]=r&255,this[s+1]=r>>>8,s+2},S.prototype.writeInt16BE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,2,32767,-32768),this[s]=r>>>8,this[s+1]=r&255,s+2},S.prototype.writeInt32LE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,4,2147483647,-2147483648),this[s]=r&255,this[s+1]=r>>>8,this[s+2]=r>>>16,this[s+3]=r>>>24,s+4},S.prototype.writeInt32BE=function(r,s,g){return r=+r,s=s>>>0,g||wt(this,r,s,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[s]=r>>>24,this[s+1]=r>>>16,this[s+2]=r>>>8,this[s+3]=r&255,s+4},S.prototype.writeBigInt64LE=Dt(function(r,s=0){return mn(this,r,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S.prototype.writeBigInt64BE=Dt(function(r,s=0){return yn(this,r,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function bn(r,s,g,C,$,B){if(g+C>r.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function En(r,s,g,C,$){return s=+s,g=g>>>0,$||bn(r,s,g,4),T.write(r,s,g,C,23,4),g+4}S.prototype.writeFloatLE=function(r,s,g){return En(this,r,s,!0,g)},S.prototype.writeFloatBE=function(r,s,g){return En(this,r,s,!1,g)};function vn(r,s,g,C,$){return s=+s,g=g>>>0,$||bn(r,s,g,8),T.write(r,s,g,C,52,8),g+8}S.prototype.writeDoubleLE=function(r,s,g){return vn(this,r,s,!0,g)},S.prototype.writeDoubleBE=function(r,s,g){return vn(this,r,s,!1,g)},S.prototype.copy=function(r,s,g,C){if(!S.isBuffer(r))throw new TypeError("argument should be a Buffer");if(g||(g=0),!C&&C!==0&&(C=this.length),s>=r.length&&(s=r.length),s||(s=0),C>0&&C<g&&(C=g),C===g||r.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),r.length-s<C-g&&(C=r.length-s+g);const $=C-g;return this===r&&typeof L.prototype.copyWithin=="function"?this.copyWithin(s,g,C):L.prototype.set.call(r,this.subarray(g,C),s),$},S.prototype.fill=function(r,s,g,C){if(typeof r=="string"){if(typeof s=="string"?(C=s,s=0,g=this.length):typeof g=="string"&&(C=g,g=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!S.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(r.length===1){const B=r.charCodeAt(0);(C==="utf8"&&B<128||C==="latin1")&&(r=B)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(s<0||this.length<s||this.length<g)throw new RangeError("Out of range index");if(g<=s)return this;s=s>>>0,g=g===void 0?this.length:g>>>0,r||(r=0);let $;if(typeof r=="number")for($=s;$<g;++$)this[$]=r;else{const B=S.isBuffer(r)?r:S.from(r,C),k=B.length;if(k===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for($=0;$<g-s;++$)this[$+s]=B[$%k]}return this};const kt={};function we(r,s,g){kt[r]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(r,s){return`The "${r}" argument must be of type number. Received type ${typeof s}`},TypeError),we("ERR_OUT_OF_RANGE",function(r,s,g){let C=`The value of "${r}" is out of range.`,$=g;return Number.isInteger(g)&&Math.abs(g)>2**32?$=wn(String(g)):typeof g=="bigint"&&($=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&($=wn($)),$+="n"),C+=` It must be ${s}. Received ${$}`,C},RangeError);function wn(r){let s="",g=r.length;const C=r[0]==="-"?1:0;for(;g>=C+4;g-=3)s=`_${r.slice(g-3,g)}${s}`;return`${r.slice(0,g)}${s}`}function Mr(r,s,g){Gt(s,"offset"),(r[s]===void 0||r[s+g]===void 0)&&qt(s,r.length-(g+1))}function Nn(r,s,g,C,$,B){if(r>g||r<s){const k=typeof s=="bigint"?"n":"";let K;throw s===0||s===BigInt(0)?K=`>= 0${k} and < 2${k} ** ${(B+1)*8}${k}`:K=`>= -(2${k} ** ${(B+1)*8-1}${k}) and < 2 ** ${(B+1)*8-1}${k}`,new kt.ERR_OUT_OF_RANGE("value",K,r)}Mr(C,$,B)}function Gt(r,s){if(typeof r!="number")throw new kt.ERR_INVALID_ARG_TYPE(s,"number",r)}function qt(r,s,g){throw Math.floor(r)!==r?(Gt(r,g),new kt.ERR_OUT_OF_RANGE("offset","an integer",r)):s<0?new kt.ERR_BUFFER_OUT_OF_BOUNDS:new kt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,r)}const kr=/[^+/0-9A-Za-z-_]/g;function Gr(r){if(r=r.split("=")[0],r=r.trim().replace(kr,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ne(r,s){s=s||1/0;let g;const C=r.length;let $=null;const B=[];for(let k=0;k<C;++k){if(g=r.charCodeAt(k),g>55295&&g<57344){if(!$){if(g>56319){(s-=3)>-1&&B.push(239,191,189);continue}else if(k+1===C){(s-=3)>-1&&B.push(239,191,189);continue}$=g;continue}if(g<56320){(s-=3)>-1&&B.push(239,191,189),$=g;continue}g=($-55296<<10|g-56320)+65536}else $&&(s-=3)>-1&&B.push(239,191,189);if($=null,g<128){if((s-=1)<0)break;B.push(g)}else if(g<2048){if((s-=2)<0)break;B.push(g>>6|192,g&63|128)}else if(g<65536){if((s-=3)<0)break;B.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((s-=4)<0)break;B.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return B}function Fr(r){const s=[];for(let g=0;g<r.length;++g)s.push(r.charCodeAt(g)&255);return s}function Vr(r,s){let g,C,$;const B=[];for(let k=0;k<r.length&&!((s-=2)<0);++k)g=r.charCodeAt(k),C=g>>8,$=g%256,B.push($),B.push(C);return B}function An(r){return E.toByteArray(Gr(r))}function ee(r,s,g,C){let $;for($=0;$<C&&!($+g>=s.length||$>=r.length);++$)s[$+g]=r[$];return $}function xt(r,s){return r instanceof s||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===s.name}function Ae(r){return r!==r}const Xr=(function(){const r="0123456789abcdef",s=new Array(256);for(let g=0;g<16;++g){const C=g*16;for(let $=0;$<16;++$)s[C+$]=r[g]+r[$]}return s})();function Dt(r){return typeof BigInt>"u"?qr:r}function qr(){throw new Error("BigInt not supported")}})(t);const I=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=I,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(zn)),zn}var Hn;function Bi(){return Hn||(Hn=1,(function(e,t){var n=Di(),o=n.Buffer;function a(c,l){for(var m in c)l[m]=c[m]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=u);function u(c,l,m){return o(c,l,m)}u.prototype=Object.create(o.prototype),a(o,u),u.from=function(c,l,m){if(typeof c=="number")throw new TypeError("Argument must not be a number");return o(c,l,m)},u.alloc=function(c,l,m){if(typeof c!="number")throw new TypeError("Argument must be a number");var p=o(c);return l!==void 0?typeof m=="string"?p.fill(l,m):p.fill(l):p.fill(0),p},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return o(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}})(De,De.exports)),De.exports}var Zn;function Ui(){if(Zn)return $e;Zn=1;var e=Bi().Buffer,t=e.isEncoding||function(I){switch(I=""+I,I&&I.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 n(I){if(!I)return"utf8";for(var h;;)switch(I){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 I;default:if(h)return;I=(""+I).toLowerCase(),h=!0}}function o(I){var h=n(I);if(typeof h!="string"&&(e.isEncoding===t||!t(I)))throw new Error("Unknown encoding: "+I);return h||I}$e.StringDecoder=a;function a(I){this.encoding=o(I);var h;switch(this.encoding){case"utf16le":this.text=d,this.end=f,h=4;break;case"utf8":this.fillLast=m,h=4;break;case"base64":this.text=v,this.end=w,h=3;break;default:this.write=b,this.end=O;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(h)}a.prototype.write=function(I){if(I.length===0)return"";var h,E;if(this.lastNeed){if(h=this.fillLast(I),h===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<I.length?h?h+this.text(I,E):this.text(I,E):h||""},a.prototype.end=i,a.prototype.text=p,a.prototype.fillLast=function(I){if(this.lastNeed<=I.length)return I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,this.lastTotal-this.lastNeed,0,I.length),this.lastNeed-=I.length};function u(I){return I<=127?0:I>>5===6?2:I>>4===14?3:I>>3===30?4:I>>6===2?-1:-2}function c(I,h,E){var T=h.length-1;if(T<E)return 0;var P=u(h[T]);return P>=0?(P>0&&(I.lastNeed=P-1),P):--T<E||P===-2?0:(P=u(h[T]),P>=0?(P>0&&(I.lastNeed=P-2),P):--T<E||P===-2?0:(P=u(h[T]),P>=0?(P>0&&(P===2?P=0:I.lastNeed=P-3),P):0))}function l(I,h,E){if((h[0]&192)!==128)return I.lastNeed=0,"<22>";if(I.lastNeed>1&&h.length>1){if((h[1]&192)!==128)return I.lastNeed=1,"<22>";if(I.lastNeed>2&&h.length>2&&(h[2]&192)!==128)return I.lastNeed=2,"<22>"}}function m(I){var h=this.lastTotal-this.lastNeed,E=l(this,I);if(E!==void 0)return E;if(this.lastNeed<=I.length)return I.copy(this.lastChar,h,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);I.copy(this.lastChar,h,0,I.length),this.lastNeed-=I.length}function p(I,h){var E=c(this,I,h);if(!this.lastNeed)return I.toString("utf8",h);this.lastTotal=E;var T=I.length-(E-this.lastNeed);return I.copy(this.lastChar,0,T),I.toString("utf8",h,T)}function i(I){var h=I&&I.length?this.write(I):"";return this.lastNeed?h+"<22>":h}function d(I,h){if((I.length-h)%2===0){var E=I.toString("utf16le",h);if(E){var T=E.charCodeAt(E.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=I[I.length-1],I.toString("utf16le",h,I.length-1)}function f(I){var h=I&&I.length?this.write(I):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return h+this.lastChar.toString("utf16le",0,E)}return h}function v(I,h){var E=(I.length-h)%3;return E===0?I.toString("base64",h):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=I[I.length-1]:(this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1]),I.toString("base64",h,I.length-E))}function w(I){var h=I&&I.length?this.write(I):"";return this.lastNeed?h+this.lastChar.toString("base64",0,3-this.lastNeed):h}function b(I){return I.toString(this.encoding)}function O(I){return I&&I.length?this.write(I):""}return $e}var ji=Ui();const Mi=Zr(ji);var Be={},Dr=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(Dr||{});class es{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||typeof t.id!="string")throw new Error("Invalid id");if(!t.displayName||typeof t.displayName!="function")throw new Error("Invalid displayName function");if("title"in t&&typeof t.title!="function")throw new Error("Invalid title function");if(!t.iconSvgInline||typeof t.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!t.exec||typeof t.exec!="function")throw new Error("Invalid exec function");if("enabled"in t&&typeof t.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in t&&typeof t.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in t&&typeof t.order!="number")throw new Error("Invalid order");if(t.destructive!==void 0&&typeof t.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in t&&typeof t.parent!="string")throw new Error("Invalid parent");if(t.default&&!Object.values(Dr).includes(t.default))throw new Error("Invalid default");if("inline"in t&&typeof t.inline!="function")throw new Error("Invalid inline function");if("renderInline"in t&&typeof t.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in t&&t.hotkey!==void 0){if(typeof t.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof t.hotkey.key!="string"||!t.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof t.hotkey.description!="string"||!t.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const ns=function(e){if(typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],Ke.debug("FileActions initialized")),window._nc_fileactions.find(t=>t.id===e.id)){Ke.error(`FileAction ${e.id} already registered`,{action:e});return}window._nc_fileactions.push(e)};var Qn,Kn;function Br(){return Kn||(Kn=1,Qn=typeof Zt=="object"&&Be&&Be.NODE_DEBUG&&/\bsemver\b/i.test(Be.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Qn}var Ue,Jn;function Ur(){if(Jn)return Ue;Jn=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,o=16,a=t-6;return Ue={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ue}var je={exports:{}},tr;function ki(){return tr||(tr=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=Ur(),u=Br();t=e.exports={};const c=t.re=[],l=t.safeRe=[],m=t.src=[],p=t.safeSrc=[],i=t.t={};let d=0;const f="[a-zA-Z0-9-]",v=[["\\s",1],["\\d",a],[f,o]],w=O=>{for(const[I,h]of v)O=O.split(`${I}*`).join(`${I}{0,${h}}`).split(`${I}+`).join(`${I}{1,${h}}`);return O},b=(O,I,h)=>{const E=w(I),T=d++;u(O,T,I),i[O]=T,m[T]=I,p[T]=E,c[T]=new RegExp(I,h?"g":void 0),l[T]=new RegExp(E,h?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),b("MAINVERSION",`(${m[i.NUMERICIDENTIFIER]})\\.(${m[i.NUMERICIDENTIFIER]})\\.(${m[i.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${m[i.NUMERICIDENTIFIERLOOSE]})\\.(${m[i.NUMERICIDENTIFIERLOOSE]})\\.(${m[i.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${m[i.NONNUMERICIDENTIFIER]}|${m[i.NUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${m[i.NONNUMERICIDENTIFIER]}|${m[i.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASE",`(?:-(${m[i.PRERELEASEIDENTIFIER]}(?:\\.${m[i.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${m[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[i.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${f}+`),b("BUILD",`(?:\\+(${m[i.BUILDIDENTIFIER]}(?:\\.${m[i.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${m[i.MAINVERSION]}${m[i.PRERELEASE]}?${m[i.BUILD]}?`),b("FULL",`^${m[i.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${m[i.MAINVERSIONLOOSE]}${m[i.PRERELEASELOOSE]}?${m[i.BUILD]}?`),b("LOOSE",`^${m[i.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${m[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${m[i.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${m[i.XRANGEIDENTIFIER]})(?:\\.(${m[i.XRANGEIDENTIFIER]})(?:\\.(${m[i.XRANGEIDENTIFIER]})(?:${m[i.PRERELEASE]})?${m[i.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${m[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[i.XRANGEIDENTIFIERLOOSE]})(?:${m[i.PRERELEASELOOSE]})?${m[i.BUILD]}?)?)?`),b("XRANGE",`^${m[i.GTLT]}\\s*${m[i.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${m[i.GTLT]}\\s*${m[i.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),b("COERCE",`${m[i.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",m[i.COERCEPLAIN]+`(?:${m[i.PRERELEASE]})?(?:${m[i.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",m[i.COERCE],!0),b("COERCERTLFULL",m[i.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${m[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",b("TILDE",`^${m[i.LONETILDE]}${m[i.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${m[i.LONETILDE]}${m[i.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${m[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",b("CARET",`^${m[i.LONECARET]}${m[i.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${m[i.LONECARET]}${m[i.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${m[i.GTLT]}\\s*(${m[i.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${m[i.GTLT]}\\s*(${m[i.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${m[i.GTLT]}\\s*(${m[i.LOOSEPLAIN]}|${m[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${m[i.XRANGEPLAIN]})\\s+-\\s+(${m[i.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${m[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[i.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(je,je.exports)),je.exports}var Me,er;function Gi(){if(er)return Me;er=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Me=n=>n?typeof n!="object"?e:n:t,Me}var ke,nr;function Fi(){if(nr)return ke;nr=1;const e=/^[0-9]+$/,t=(n,o)=>{if(typeof n=="number"&&typeof o=="number")return n===o?0:n<o?-1:1;const a=e.test(n),u=e.test(o);return a&&u&&(n=+n,o=+o),n===o?0:a&&!u?-1:u&&!a?1:n<o?-1:1};return ke={compareIdentifiers:t,rcompareIdentifiers:(n,o)=>t(o,n)},ke}var Ge,rr;function jr(){if(rr)return Ge;rr=1;const e=Br(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Ur(),{safeRe:o,t:a}=ki(),u=Gi(),{compareIdentifiers:c}=Fi();class l{constructor(p,i){if(i=u(i),p instanceof l){if(p.loose===!!i.loose&&p.includePrerelease===!!i.includePrerelease)return p;p=p.version}else if(typeof p!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof p}".`);if(p.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",p,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const d=p.trim().match(i.loose?o[a.LOOSE]:o[a.FULL]);if(!d)throw new TypeError(`Invalid Version: ${p}`);if(this.raw=p,this.major=+d[1],this.minor=+d[2],this.patch=+d[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");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const v=+f;if(v>=0&&v<n)return v}return f}):this.prerelease=[],this.build=d[5]?d[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(p){if(e("SemVer.compare",this.version,this.options,p),!(p instanceof l)){if(typeof p=="string"&&p===this.version)return 0;p=new l(p,this.options)}return p.version===this.version?0:this.compareMain(p)||this.comparePre(p)}compareMain(p){return p instanceof l||(p=new l(p,this.options)),this.major<p.major?-1:this.major>p.major?1:this.minor<p.minor?-1:this.minor>p.minor?1:this.patch<p.patch?-1:this.patch>p.patch?1:0}comparePre(p){if(p instanceof l||(p=new l(p,this.options)),this.prerelease.length&&!p.prerelease.length)return-1;if(!this.prerelease.length&&p.prerelease.length)return 1;if(!this.prerelease.length&&!p.prerelease.length)return 0;let i=0;do{const d=this.prerelease[i],f=p.prerelease[i];if(e("prerelease compare",i,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d!==f)return c(d,f)}while(++i)}compareBuild(p){p instanceof l||(p=new l(p,this.options));let i=0;do{const d=this.build[i],f=p.build[i];if(e("build compare",i,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d!==f)return c(d,f)}while(++i)}inc(p,i,d){if(p.startsWith("pre")){if(!i&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const f=`-${i}`.match(this.options.loose?o[a.PRERELEASELOOSE]:o[a.PRERELEASE]);if(!f||f[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(p){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,d),this.inc("pre",i,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,d),this.inc("pre",i,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let v=this.prerelease.length;for(;--v>=0;)typeof this.prerelease[v]=="number"&&(this.prerelease[v]++,v=-2);if(v===-1){if(i===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(i){let v=[i,f];d===!1&&(v=[i]),c(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=v):this.prerelease=v}break}default:throw new Error(`invalid increment argument: ${p}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ge=l,Ge}var Fe,or;function Vi(){if(or)return Fe;or=1;const e=jr();return Fe=(t,n)=>new e(t,n).major,Fe}Vi();var Ve,ir;function Xi(){if(ir)return Ve;ir=1;const e=jr();return Ve=(t,n,o=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(a){if(!o)return null;throw a}},Ve}var Xe,sr;function qi(){if(sr)return Xe;sr=1;const e=Xi();return Xe=(t,n)=>{const o=e(t,n);return o?o.version:null},Xe}qi();var ar={},ur;function Wi(){return ur||(ur=1,(function(e){(function(t){t.parser=function(N,y){return new o(N,y)},t.SAXParser=o,t.SAXStream=i,t.createStream=p,t.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function o(N,y){if(!(this instanceof o))return new o(N,y);var j=this;u(j),j.q=j.c="",j.bufferCheckPosition=t.MAX_BUFFER_LENGTH,j.opt=y||{},j.opt.lowercase=j.opt.lowercase||j.opt.lowercasetags,j.looseCase=j.opt.lowercase?"toLowerCase":"toUpperCase",j.tags=[],j.closed=j.closedRoot=j.sawRoot=!1,j.tag=j.error=null,j.strict=!!N,j.noscript=!!(N||j.opt.noscript),j.state=A.BEGIN,j.strictEntities=j.opt.strictEntities,j.ENTITIES=j.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),j.attribList=[],j.opt.xmlns&&(j.ns=Object.create(b)),j.opt.unquotedAttributeValues===void 0&&(j.opt.unquotedAttributeValues=!N),j.trackPosition=j.opt.position!==!1,j.trackPosition&&(j.position=j.line=j.column=0),M(j,"onready")}Object.create||(Object.create=function(N){function y(){}y.prototype=N;var j=new y;return j}),Object.keys||(Object.keys=function(N){var y=[];for(var j in N)N.hasOwnProperty(j)&&y.push(j);return y});function a(N){for(var y=Math.max(t.MAX_BUFFER_LENGTH,10),j=0,_=0,q=n.length;_<q;_++){var nt=N[n[_]].length;if(nt>y)switch(n[_]){case"textNode":D(N);break;case"cdata":S(N,"oncdata",N.cdata),N.cdata="";break;case"script":S(N,"onscript",N.script),N.script="";break;default:G(N,"Max buffer length exceeded: "+n[_])}j=Math.max(j,nt)}var rt=t.MAX_BUFFER_LENGTH-j;N.bufferCheckPosition=rt+N.position}function u(N){for(var y=0,j=n.length;y<j;y++)N[n[y]]=""}function c(N){D(N),N.cdata!==""&&(S(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(S(N,"onscript",N.script),N.script="")}o.prototype={end:function(){X(this)},write:Tt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var l;try{l=require("stream").Stream}catch{l=function(){}}l||(l=function(){});var m=t.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function p(N,y){return new i(N,y)}function i(N,y){if(!(this instanceof i))return new i(N,y);l.apply(this),this._parser=new o(N,y),this.writable=!0,this.readable=!0;var j=this;this._parser.onend=function(){j.emit("end")},this._parser.onerror=function(_){j.emit("error",_),j._parser.error=null},this._decoder=null,m.forEach(function(_){Object.defineProperty(j,"on"+_,{get:function(){return j._parser["on"+_]},set:function(q){if(!q)return j.removeAllListeners(_),j._parser["on"+_]=q,q;j.on(_,q)},enumerable:!0,configurable:!1})})}i.prototype=Object.create(l.prototype,{constructor:{value:i}}),i.prototype.write=function(N){if(typeof Oe=="function"&&typeof Oe.isBuffer=="function"&&Oe.isBuffer(N)){if(!this._decoder){var y=Mi.StringDecoder;this._decoder=new y("utf8")}N=this._decoder.write(N)}return this._parser.write(N.toString()),this.emit("data",N),!0},i.prototype.end=function(N){return N&&N.length&&this.write(N),this._parser.end(),!0},i.prototype.on=function(N,y){var j=this;return!j._parser["on"+N]&&m.indexOf(N)!==-1&&(j._parser["on"+N]=function(){var _=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);_.splice(0,0,N),j.emit.apply(j,_)}),l.prototype.on.call(j,N,y)};var d="[CDATA[",f="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",b={xml:v,xmlns:w},O=/[:_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]/,I=/[:_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-]/,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]/,E=/[#:_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 T(N){return N===" "||N===`
|
||
`||N==="\r"||N===" "}function P(N){return N==='"'||N==="'"}function R(N){return N===">"||T(N)}function L(N,y){return N.test(y)}function x(N,y){return!L(N,y)}var A=0;t.STATE={BEGIN:A++,BEGIN_WHITESPACE:A++,TEXT:A++,TEXT_ENTITY:A++,OPEN_WAKA:A++,SGML_DECL:A++,SGML_DECL_QUOTED:A++,DOCTYPE:A++,DOCTYPE_QUOTED:A++,DOCTYPE_DTD:A++,DOCTYPE_DTD_QUOTED:A++,COMMENT_STARTING:A++,COMMENT:A++,COMMENT_ENDING:A++,COMMENT_ENDED:A++,CDATA:A++,CDATA_ENDING:A++,CDATA_ENDING_2:A++,PROC_INST:A++,PROC_INST_BODY:A++,PROC_INST_ENDING:A++,OPEN_TAG:A++,OPEN_TAG_SLASH:A++,ATTRIB:A++,ATTRIB_NAME:A++,ATTRIB_NAME_SAW_WHITE:A++,ATTRIB_VALUE:A++,ATTRIB_VALUE_QUOTED:A++,ATTRIB_VALUE_CLOSED:A++,ATTRIB_VALUE_UNQUOTED:A++,ATTRIB_VALUE_ENTITY_Q:A++,ATTRIB_VALUE_ENTITY_U:A++,CLOSE_TAG:A++,CLOSE_TAG_SAW_WHITE:A++,SCRIPT:A++,SCRIPT_ENDING:A++},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(N){var y=t.ENTITIES[N],j=typeof y=="number"?String.fromCharCode(y):y;t.ENTITIES[N]=j});for(var U in t.STATE)t.STATE[t.STATE[U]]=U;A=t.STATE;function M(N,y,j){N[y]&&N[y](j)}function S(N,y,j){N.textNode&&D(N),M(N,y,j)}function D(N){N.textNode=F(N.opt,N.textNode),N.textNode&&M(N,"ontext",N.textNode),N.textNode=""}function F(N,y){return N.trim&&(y=y.trim()),N.normalize&&(y=y.replace(/\s+/g," ")),y}function G(N,y){return D(N),N.trackPosition&&(y+=`
|
||
Line: `+N.line+`
|
||
Column: `+N.column+`
|
||
Char: `+N.c),y=new Error(y),N.error=y,M(N,"onerror",y),N}function X(N){return N.sawRoot&&!N.closedRoot&&V(N,"Unclosed root tag"),N.state!==A.BEGIN&&N.state!==A.BEGIN_WHITESPACE&&N.state!==A.TEXT&&G(N,"Unexpected end"),D(N),N.c="",N.closed=!0,M(N,"onend"),o.call(N,N.strict,N.opt),N}function V(N,y){if(typeof N!="object"||!(N instanceof o))throw new Error("bad call to strictFail");N.strict&&G(N,y)}function Z(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var y=N.tags[N.tags.length-1]||N,j=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(j.ns=y.ns),N.attribList.length=0,S(N,"onopentagstart",j)}function z(N,y){var j=N.indexOf(":"),_=j<0?["",N]:N.split(":"),q=_[0],nt=_[1];return y&&N==="xmlns"&&(q="xmlns",nt=""),{prefix:q,local:nt}}function st(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var y=z(N.attribName,!0),j=y.prefix,_=y.local;if(j==="xmlns")if(_==="xml"&&N.attribValue!==v)V(N,"xml: prefix must be bound to "+v+`
|
||
Actual: `+N.attribValue);else if(_==="xmlns"&&N.attribValue!==w)V(N,"xmlns: prefix must be bound to "+w+`
|
||
Actual: `+N.attribValue);else{var q=N.tag,nt=N.tags[N.tags.length-1]||N;q.ns===nt.ns&&(q.ns=Object.create(nt.ns)),q.ns[_]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,S(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}function W(N,y){if(N.opt.xmlns){var j=N.tag,_=z(N.tagName);j.prefix=_.prefix,j.local=_.local,j.uri=j.ns[_.prefix]||"",j.prefix&&!j.uri&&(V(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),j.uri=_.prefix);var q=N.tags[N.tags.length-1]||N;j.ns&&q.ns!==j.ns&&Object.keys(j.ns).forEach(function(ot){S(N,"onopennamespace",{prefix:ot,uri:j.ns[ot]})});for(var nt=0,rt=N.attribList.length;nt<rt;nt++){var gt=N.attribList[nt],ht=gt[0],Ct=gt[1],at=z(ht,!0),Rt=at.prefix,ve=at.local,te=Rt===""?"":j.ns[Rt]||"",Xt={name:ht,value:Ct,prefix:Rt,local:ve,uri:te};Rt&&Rt!=="xmlns"&&!te&&(V(N,"Unbound namespace prefix: "+JSON.stringify(Rt)),Xt.uri=Rt),N.tag.attributes[ht]=Xt,S(N,"onattribute",Xt)}N.attribList.length=0}N.tag.isSelfClosing=!!y,N.sawRoot=!0,N.tags.push(N.tag),S(N,"onopentag",N.tag),y||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=A.SCRIPT:N.state=A.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}function Q(N){if(!N.tagName){V(N,"Weird empty close tag."),N.textNode+="</>",N.state=A.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=A.SCRIPT;return}S(N,"onscript",N.script),N.script=""}var y=N.tags.length,j=N.tagName;N.strict||(j=j[N.looseCase]());for(var _=j;y--;){var q=N.tags[y];if(q.name!==_)V(N,"Unexpected close tag");else break}if(y<0){V(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=A.TEXT;return}N.tagName=j;for(var nt=N.tags.length;nt-- >y;){var rt=N.tag=N.tags.pop();N.tagName=N.tag.name,S(N,"onclosetag",N.tagName);var gt={};for(var ht in rt.ns)gt[ht]=rt.ns[ht];var Ct=N.tags[N.tags.length-1]||N;N.opt.xmlns&&rt.ns!==Ct.ns&&Object.keys(rt.ns).forEach(function(at){var Rt=rt.ns[at];S(N,"onclosenamespace",{prefix:at,uri:Rt})})}y===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=A.TEXT}function Mt(N){var y=N.entity,j=y.toLowerCase(),_,q="";return N.ENTITIES[y]?N.ENTITIES[y]:N.ENTITIES[j]?N.ENTITIES[j]:(y=j,y.charAt(0)==="#"&&(y.charAt(1)==="x"?(y=y.slice(2),_=parseInt(y,16),q=_.toString(16)):(y=y.slice(1),_=parseInt(y,10),q=_.toString(10))),y=y.replace(/^0+/,""),isNaN(_)||q.toLowerCase()!==y?(V(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(_))}function $t(N,y){y==="<"?(N.state=A.OPEN_WAKA,N.startTagPosition=N.position):T(y)||(V(N,"Non-whitespace before first tag."),N.textNode=y,N.state=A.TEXT)}function Nt(N,y){var j="";return y<N.length&&(j=N.charAt(y)),j}function Tt(N){var y=this;if(this.error)throw this.error;if(y.closed)return G(y,"Cannot write after close. Assign an onready handler.");if(N===null)return X(y);typeof N=="object"&&(N=N.toString());for(var j=0,_="";_=Nt(N,j++),y.c=_,!!_;)switch(y.trackPosition&&(y.position++,_===`
|
||
`?(y.line++,y.column=0):y.column++),y.state){case A.BEGIN:if(y.state=A.BEGIN_WHITESPACE,_==="\uFEFF")continue;$t(y,_);continue;case A.BEGIN_WHITESPACE:$t(y,_);continue;case A.TEXT:if(y.sawRoot&&!y.closedRoot){for(var q=j-1;_&&_!=="<"&&_!=="&";)_=Nt(N,j++),_&&y.trackPosition&&(y.position++,_===`
|
||
`?(y.line++,y.column=0):y.column++);y.textNode+=N.substring(q,j-1)}_==="<"&&!(y.sawRoot&&y.closedRoot&&!y.strict)?(y.state=A.OPEN_WAKA,y.startTagPosition=y.position):(!T(_)&&(!y.sawRoot||y.closedRoot)&&V(y,"Text data outside of root node."),_==="&"?y.state=A.TEXT_ENTITY:y.textNode+=_);continue;case A.SCRIPT:_==="<"?y.state=A.SCRIPT_ENDING:y.script+=_;continue;case A.SCRIPT_ENDING:_==="/"?y.state=A.CLOSE_TAG:(y.script+="<"+_,y.state=A.SCRIPT);continue;case A.OPEN_WAKA:if(_==="!")y.state=A.SGML_DECL,y.sgmlDecl="";else if(!T(_))if(L(O,_))y.state=A.OPEN_TAG,y.tagName=_;else if(_==="/")y.state=A.CLOSE_TAG,y.tagName="";else if(_==="?")y.state=A.PROC_INST,y.procInstName=y.procInstBody="";else{if(V(y,"Unencoded <"),y.startTagPosition+1<y.position){var nt=y.position-y.startTagPosition;_=new Array(nt).join(" ")+_}y.textNode+="<"+_,y.state=A.TEXT}continue;case A.SGML_DECL:if(y.sgmlDecl+_==="--"){y.state=A.COMMENT,y.comment="",y.sgmlDecl="";continue}y.doctype&&y.doctype!==!0&&y.sgmlDecl?(y.state=A.DOCTYPE_DTD,y.doctype+="<!"+y.sgmlDecl+_,y.sgmlDecl=""):(y.sgmlDecl+_).toUpperCase()===d?(S(y,"onopencdata"),y.state=A.CDATA,y.sgmlDecl="",y.cdata=""):(y.sgmlDecl+_).toUpperCase()===f?(y.state=A.DOCTYPE,(y.doctype||y.sawRoot)&&V(y,"Inappropriately located doctype declaration"),y.doctype="",y.sgmlDecl=""):_===">"?(S(y,"onsgmldeclaration",y.sgmlDecl),y.sgmlDecl="",y.state=A.TEXT):(P(_)&&(y.state=A.SGML_DECL_QUOTED),y.sgmlDecl+=_);continue;case A.SGML_DECL_QUOTED:_===y.q&&(y.state=A.SGML_DECL,y.q=""),y.sgmlDecl+=_;continue;case A.DOCTYPE:_===">"?(y.state=A.TEXT,S(y,"ondoctype",y.doctype),y.doctype=!0):(y.doctype+=_,_==="["?y.state=A.DOCTYPE_DTD:P(_)&&(y.state=A.DOCTYPE_QUOTED,y.q=_));continue;case A.DOCTYPE_QUOTED:y.doctype+=_,_===y.q&&(y.q="",y.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:_==="]"?(y.doctype+=_,y.state=A.DOCTYPE):_==="<"?(y.state=A.OPEN_WAKA,y.startTagPosition=y.position):P(_)?(y.doctype+=_,y.state=A.DOCTYPE_DTD_QUOTED,y.q=_):y.doctype+=_;continue;case A.DOCTYPE_DTD_QUOTED:y.doctype+=_,_===y.q&&(y.state=A.DOCTYPE_DTD,y.q="");continue;case A.COMMENT:_==="-"?y.state=A.COMMENT_ENDING:y.comment+=_;continue;case A.COMMENT_ENDING:_==="-"?(y.state=A.COMMENT_ENDED,y.comment=F(y.opt,y.comment),y.comment&&S(y,"oncomment",y.comment),y.comment=""):(y.comment+="-"+_,y.state=A.COMMENT);continue;case A.COMMENT_ENDED:_!==">"?(V(y,"Malformed comment"),y.comment+="--"+_,y.state=A.COMMENT):y.doctype&&y.doctype!==!0?y.state=A.DOCTYPE_DTD:y.state=A.TEXT;continue;case A.CDATA:_==="]"?y.state=A.CDATA_ENDING:y.cdata+=_;continue;case A.CDATA_ENDING:_==="]"?y.state=A.CDATA_ENDING_2:(y.cdata+="]"+_,y.state=A.CDATA);continue;case A.CDATA_ENDING_2:_===">"?(y.cdata&&S(y,"oncdata",y.cdata),S(y,"onclosecdata"),y.cdata="",y.state=A.TEXT):_==="]"?y.cdata+="]":(y.cdata+="]]"+_,y.state=A.CDATA);continue;case A.PROC_INST:_==="?"?y.state=A.PROC_INST_ENDING:T(_)?y.state=A.PROC_INST_BODY:y.procInstName+=_;continue;case A.PROC_INST_BODY:if(!y.procInstBody&&T(_))continue;_==="?"?y.state=A.PROC_INST_ENDING:y.procInstBody+=_;continue;case A.PROC_INST_ENDING:_===">"?(S(y,"onprocessinginstruction",{name:y.procInstName,body:y.procInstBody}),y.procInstName=y.procInstBody="",y.state=A.TEXT):(y.procInstBody+="?"+_,y.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:L(I,_)?y.tagName+=_:(Z(y),_===">"?W(y):_==="/"?y.state=A.OPEN_TAG_SLASH:(T(_)||V(y,"Invalid character in tag name"),y.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:_===">"?(W(y,!0),Q(y)):(V(y,"Forward-slash in opening tag not followed by >"),y.state=A.ATTRIB);continue;case A.ATTRIB:if(T(_))continue;_===">"?W(y):_==="/"?y.state=A.OPEN_TAG_SLASH:L(O,_)?(y.attribName=_,y.attribValue="",y.state=A.ATTRIB_NAME):V(y,"Invalid attribute name");continue;case A.ATTRIB_NAME:_==="="?y.state=A.ATTRIB_VALUE:_===">"?(V(y,"Attribute without value"),y.attribValue=y.attribName,st(y),W(y)):T(_)?y.state=A.ATTRIB_NAME_SAW_WHITE:L(I,_)?y.attribName+=_:V(y,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if(_==="=")y.state=A.ATTRIB_VALUE;else{if(T(_))continue;V(y,"Attribute without value"),y.tag.attributes[y.attribName]="",y.attribValue="",S(y,"onattribute",{name:y.attribName,value:""}),y.attribName="",_===">"?W(y):L(O,_)?(y.attribName=_,y.state=A.ATTRIB_NAME):(V(y,"Invalid attribute name"),y.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(T(_))continue;P(_)?(y.q=_,y.state=A.ATTRIB_VALUE_QUOTED):(y.opt.unquotedAttributeValues||G(y,"Unquoted attribute value"),y.state=A.ATTRIB_VALUE_UNQUOTED,y.attribValue=_);continue;case A.ATTRIB_VALUE_QUOTED:if(_!==y.q){_==="&"?y.state=A.ATTRIB_VALUE_ENTITY_Q:y.attribValue+=_;continue}st(y),y.q="",y.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:T(_)?y.state=A.ATTRIB:_===">"?W(y):_==="/"?y.state=A.OPEN_TAG_SLASH:L(O,_)?(V(y,"No whitespace between attributes"),y.attribName=_,y.attribValue="",y.state=A.ATTRIB_NAME):V(y,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!R(_)){_==="&"?y.state=A.ATTRIB_VALUE_ENTITY_U:y.attribValue+=_;continue}st(y),_===">"?W(y):y.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(y.tagName)_===">"?Q(y):L(I,_)?y.tagName+=_:y.script?(y.script+="</"+y.tagName,y.tagName="",y.state=A.SCRIPT):(T(_)||V(y,"Invalid tagname in closing tag"),y.state=A.CLOSE_TAG_SAW_WHITE);else{if(T(_))continue;x(O,_)?y.script?(y.script+="</"+_,y.state=A.SCRIPT):V(y,"Invalid tagname in closing tag."):y.tagName=_}continue;case A.CLOSE_TAG_SAW_WHITE:if(T(_))continue;_===">"?Q(y):V(y,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var rt,gt;switch(y.state){case A.TEXT_ENTITY:rt=A.TEXT,gt="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:rt=A.ATTRIB_VALUE_QUOTED,gt="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:rt=A.ATTRIB_VALUE_UNQUOTED,gt="attribValue";break}if(_===";"){var ht=Mt(y);y.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(ht)?(y.entity="",y.state=rt,y.write(ht)):(y[gt]+=ht,y.entity="",y.state=rt)}else L(y.entity.length?E:h,_)?y.entity+=_:(V(y,"Invalid character in entity name"),y[gt]+="&"+y.entity+_,y.entity="",y.state=rt);continue;default:throw new Error(y,"Unknown state: "+y.state)}return y.position>=y.bufferCheckPosition&&a(y),y}String.fromCodePoint||(function(){var N=String.fromCharCode,y=Math.floor,j=function(){var _=16384,q=[],nt,rt,gt=-1,ht=arguments.length;if(!ht)return"";for(var Ct="";++gt<ht;){var at=Number(arguments[gt]);if(!isFinite(at)||at<0||at>1114111||y(at)!==at)throw RangeError("Invalid code point: "+at);at<=65535?q.push(at):(at-=65536,nt=(at>>10)+55296,rt=at%1024+56320,q.push(nt,rt)),(gt+1===ht||q.length>_)&&(Ct+=N.apply(null,q),q.length=0)}return Ct};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j})()})(e)})(ar)),ar}Wi();var zi=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(zi||{});class ae 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 rs(e){const t=no().files,n=t.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const c of n)if(e.includes(c))throw new ae({segment:c,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(t.forbidden_filenames??[".htaccess"]).includes(e))throw new ae({filename:e,segment:e,reason:"reserved name"});const o=e.indexOf(".",1),a=e.substring(0,o===-1?void 0:o);if((t.forbidden_filename_basenames??[]).includes(a))throw new ae({filename:e,segment:a,reason:"reserved name"});const u=t.forbidden_filename_extensions??[".part",".filepart"];for(const c of u)if(e.length>c.length&&e.endsWith(c))throw new ae({segment:c,reason:"extension",filename:e})}const qe=["B","KB","MB","GB","TB","PB"],We=["B","KiB","MiB","GiB","TiB","PiB"];function os(e,t=!1,n=!1,o=!1){n=n&&!o,typeof e=="string"&&(e=Number(e));let a=e>0?Math.floor(Math.log(e)/Math.log(o?1e3:1024)):0;a=Math.min((n?We.length:qe.length)-1,a);const u=n?We[a]:qe[a];let c=(e/Math.pow(o?1e3:1024,a)).toFixed(1);return t===!0&&a===0?(c!=="0.0"?"< 1 ":"0 ")+(n?We[1]:qe[1]):(a<2?c=parseFloat(c).toFixed(0):c=parseFloat(c).toLocaleString(hr()),c+" "+u)}function cr(e){return e instanceof Date?e.toISOString():String(e)}function Yi(e,t,n){t=t??[u=>u],n=n??[];const o=t.map((u,c)=>(n[c]??"asc")==="asc"?1:-1),a=Intl.Collator([Qr(),hr()],{numeric:!0,usage:"sort"});return[...e].sort((u,c)=>{for(const[l,m]of t.entries()){const p=a.compare(cr(m(u)),cr(m(c)));if(p!==0)return p*o[l]}return 0})}function is(e,t={}){const n={sortingMode:"basename",sortingOrder:"asc",...t};function o(c){const l=c.displayname||c.attributes?.displayname||c.basename||"";return c.type===be.Folder?l:l.lastIndexOf(".")>0?l.slice(0,l.lastIndexOf(".")):l}const a=[...n.sortFavoritesFirst?[c=>c.attributes?.favorite!==1]:[],...n.sortFoldersFirst?[c=>c.type!=="folder"]:[],...n.sortingMode!=="basename"?[c=>c[n.sortingMode]??c.attributes[n.sortingMode]]:[],c=>o(c),c=>c.basename],u=[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],...n.sortingMode==="mtime"?[n.sortingOrder==="asc"?"desc":"asc"]:[],...n.sortingMode!=="mtime"&&n.sortingMode!=="basename"?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder];return Yi(e,a,u)}export{Pt as C,Dr as D,es as F,ae as I,St as P,be as a,ts as b,zi as c,Ki as d,$i as e,_r as f,Ji as g,Qi as h,tn as i,os as j,ns as r,is as s,rs as v};
|
||
//# sourceMappingURL=index-DaNIymO8.chunk.mjs.map
|