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