import{p as Yt,g as Fr,a as Vr,b as Xr,l as zr,t as ne,c as qr,d as Bt}from"./logger-NonNsq4V.chunk.mjs";import{g as re,U as Hr,B as Ae,n as Jt,i as Wr,c as Ye,v as Ze,d as Yr,N as Zr,a as Qr,s as dn,b as Jr,V as Kr}from"./_plugin-vue2_normalizer-KVSkBM2L.chunk.mjs";function ur(e,t,n){const i=document.querySelector(`#initial-state-${e}-${t}`);if(i===null)return n;try{return JSON.parse(atob(i.value))}catch{throw new Error(`Could not parse initial state ${t} of ${e}`)}}function lr(){return ur("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function ti(){return ur("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mn(e,t,n){ei(e,t),t.set(e,n)}function ei(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=cr(e,t,"get");return ni(e,n)}function ni(e,t){return t.get?t.get.call(e):t.value}function En(e,t,n){var i=cr(e,t,"set");return ri(e,i,n),n}function cr(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ri(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 ii=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",dt=new WeakMap,zt=new WeakMap;class me{constructor(t){var{executor:n=()=>{},internals:i=Je(),promise:u=new Promise((l,d)=>n(l,d,p=>{i.onCancelList.push(p)}))}=t;mn(this,dt,{writable:!0,value:void 0}),mn(this,zt,{writable:!0,value:void 0}),$t(this,ii,"CancelablePromise"),this.cancel=this.cancel.bind(this),En(this,dt,i),En(this,zt,u||new Promise((l,d)=>n(l,d,p=>{i.onCancelList.push(p)})))}then(t,n){return ae(pt(this,zt).then(ie(t,pt(this,dt)),ie(n,pt(this,dt))),pt(this,dt))}catch(t){return ae(pt(this,zt).catch(ie(t,pt(this,dt))),pt(this,dt))}finally(t,n){return n&&pt(this,dt).onCancelList.push(t),ae(pt(this,zt).finally(ie(()=>{if(t)return n&&(pt(this,dt).onCancelList=pt(this,dt).onCancelList.filter(i=>i!==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(i){console.error(i)}}isCanceled(){return pt(this,dt).isCanceled===!0}}class Dt extends me{constructor(t){super({executor:t})}}$t(Dt,"all",function(e){return oe(e,Promise.all(e))}),$t(Dt,"allSettled",function(e){return oe(e,Promise.allSettled(e))}),$t(Dt,"any",function(e){return oe(e,Promise.any(e))}),$t(Dt,"race",function(e){return oe(e,Promise.race(e))}),$t(Dt,"resolve",function(e){return yn(Promise.resolve(e))}),$t(Dt,"reject",function(e){return yn(Promise.reject(e))}),$t(Dt,"isCancelable",Qe);function yn(e){return ae(e,Je())}function Qe(e){return e instanceof Dt||e instanceof me}function ie(e,t){if(e)return n=>{if(!t.isCanceled){var i=e(n);return Qe(i)&&t.onCancelList.push(i.cancel),i}return n}}function ae(e,t){return new me({internals:t,promise:e})}function oe(e,t){var n=Je();return n.onCancelList.push(()=>{for(var i of e)Qe(i)&&i.cancel()}),new me({internals:n,promise:t})}function Je(){return{isCanceled:!1,onCancelList:[]}}var Te={},oi={2:e=>{function t(u,l,d){u instanceof RegExp&&(u=n(u,d)),l instanceof RegExp&&(l=n(l,d));var p=i(u,l,d);return p&&{start:p[0],end:p[1],pre:d.slice(0,p[0]),body:d.slice(p[0]+u.length,p[1]),post:d.slice(p[1]+l.length)}}function n(u,l){var d=l.match(u);return d?d[0]:null}function i(u,l,d){var p,E,a,s,h,c=d.indexOf(u),b=d.indexOf(l,c+1),y=c;if(c>=0&&b>0){for(p=[],a=d.length;y>=0&&!h;)y==c?(p.push(y),c=d.indexOf(u,y+1)):p.length==1?h=[p.pop(),b]:((E=p.pop())=0?c:b;p.length&&(h=[a,s])}return h}e.exports=t,t.range=i},101:function(e,t,n){var i;e=n.nmd(e),(function(u){var l=(e&&e.exports,typeof re=="object"&&re);l.global!==l&&l.window;var d=function(h){this.message=h};(d.prototype=new Error).name="InvalidCharacterError";var p=function(h){throw new d(h)},E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(h){h=String(h),/[^\0-\xFF]/.test(h)&&p("The string to be encoded contains characters outside of the Latin1 range.");for(var c,b,y,w,T=h.length%3,N="",f=-1,v=h.length-T;++f>18&63)+E.charAt(w>>12&63)+E.charAt(w>>6&63)+E.charAt(63&w);return T==2?(c=h.charCodeAt(f)<<8,b=h.charCodeAt(++f),N+=E.charAt((w=c+b)>>10)+E.charAt(w>>4&63)+E.charAt(w<<2&63)+"="):T==1&&(w=h.charCodeAt(f),N+=E.charAt(w>>2)+E.charAt(w<<4&63)+"=="),N},decode:function(h){var c=(h=String(h).replace(a,"")).length;c%4==0&&(c=(h=h.replace(/==?$/,"")).length),(c%4==1||/[^+a-zA-Z0-9/]/.test(h))&&p("Invalid character: the string to be decoded is not correctly encoded.");for(var b,y,w=0,T="",N=-1;++N>(-2*w&6)));return T},version:"1.0.0"};(i=function(){return s}.call(t,n,t,e))===void 0||(e.exports=i)})()},172:(e,t)=>{t.d=function(n){if(!n)return 0;for(var i=(n=n.toString()).length,u=n.length;u--;){var l=n.charCodeAt(u);56320<=l&&l<=57343&&u--,127{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 i=[],u=0;u{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(i,u){return i<>>32-u},rotr:function(i,u){return i<<32-u|i>>>u},endian:function(i){if(i.constructor==Number)return 16711935&n.rotl(i,8)|4278255360&n.rotl(i,24);for(var u=0;u0;i--)u.push(Math.floor(256*Math.random()));return u},bytesToWords:function(i){for(var u=[],l=0,d=0;l>>5]|=i[l]<<24-d%32;return u},wordsToBytes:function(i){for(var u=[],l=0;l<32*i.length;l+=8)u.push(i[l>>>5]>>>24-l%32&255);return u},bytesToHex:function(i){for(var u=[],l=0;l>>4).toString(16)),u.push((15&i[l]).toString(16));return u.join("")},hexToBytes:function(i){for(var u=[],l=0;l>>6*(3-p)&63)):u.push("=");return u.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/gi,"");for(var u=[],l=0,d=0;l>>6-2*d);return u}},e.exports=n},635:(e,t,n)=>{const i=n(31),u=n(338),l=n(221);e.exports={XMLParser:u,XMLValidator:i,XMLBuilder:l}},118:e=>{e.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?n=>{for(const i of t)if(typeof i=="string"&&n===i||i instanceof RegExp&&i.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",i="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",u=new RegExp("^"+i+"$");t.isExist=function(l){return l!==void 0},t.isEmptyObject=function(l){return Object.keys(l).length===0},t.merge=function(l,d,p){if(d){const E=Object.keys(d),a=E.length;for(let s=0;s{const i=n(705),u={allowBooleanAttributes:!1,unpairedTags:[]};function l(f){return f===" "||f===" "||f===` `||f==="\r"}function d(f,v){const _=v;for(;v5&&P==="xml")return y("InvalidXml","XML declaration allowed only at the start of the document.",T(f,v));if(f[v]=="?"&&f[v+1]==">"){v++;break}}return v}function p(f,v){if(f.length>v+5&&f[v+1]==="-"&&f[v+2]==="-"){for(v+=3;v"){v+=2;break}}else if(f.length>v+8&&f[v+1]==="D"&&f[v+2]==="O"&&f[v+3]==="C"&&f[v+4]==="T"&&f[v+5]==="Y"&&f[v+6]==="P"&&f[v+7]==="E"){let _=1;for(v+=8;v"&&(_--,_===0))break}else if(f.length>v+9&&f[v+1]==="["&&f[v+2]==="C"&&f[v+3]==="D"&&f[v+4]==="A"&&f[v+5]==="T"&&f[v+6]==="A"&&f[v+7]==="["){for(v+=8;v"){v+=2;break}}return v}t.validate=function(f,v){v=Object.assign({},u,v);const _=[];let P=!1,C=!1;f[0]==="\uFEFF"&&(f=f.substr(1));for(let O=0;O"&&f[O]!==" "&&f[O]!==" "&&f[O]!==` `&&f[O]!=="\r";O++)M+=f[O];if(M=M.trim(),M[M.length-1]==="/"&&(M=M.substring(0,M.length-1),O--),R=M,!i.isName(R)){let F;return F=M.trim().length===0?"Invalid space after '<'.":"Tag '"+M+"' is an invalid name.",y("InvalidTag",F,T(f,O))}const S=s(f,O);if(S===!1)return y("InvalidAttr","Attributes for '"+M+"' have open quote.",T(f,O));let D=S.value;if(O=S.index,D[D.length-1]==="/"){const F=O-D.length;D=D.substring(0,D.length-1);const G=c(D,v);if(G!==!0)return y(G.err.code,G.err.msg,T(f,F+G.err.line));P=!0}else if(U){if(!S.tagClosed)return y("InvalidTag","Closing tag '"+M+"' doesn't have proper closing.",T(f,O));if(D.trim().length>0)return y("InvalidTag","Closing tag '"+M+"' can't have attributes or invalid starting.",T(f,I));if(_.length===0)return y("InvalidTag","Closing tag '"+M+"' has not been opened.",T(f,I));{const F=_.pop();if(M!==F.tagName){let G=T(f,F.tagStartPos);return y("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+G.line+", col "+G.col+") instead of closing tag '"+M+"'.",T(f,I))}_.length==0&&(C=!0)}}else{const F=c(D,v);if(F!==!0)return y(F.err.code,F.err.msg,T(f,O-D.length+F.err.line));if(C===!0)return y("InvalidXml","Multiple possible root nodes found.",T(f,O));v.unpairedTags.indexOf(M)!==-1||_.push({tagName:M,tagStartPos:I}),P=!0}for(O++;O0)||y("InvalidXml","Invalid '"+JSON.stringify(_.map((O=>O.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):y("InvalidXml","Start tag expected.",1)};const E='"',a="'";function s(f,v){let _="",P="",C=!1;for(;v"&&P===""){C=!0;break}_+=f[v]}return P===""&&{value:_,index:v,tagClosed:C}}const h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(f,v){const _=i.getAllMatches(f,h),P={};for(let C=0;C<_.length;C++){if(_[C][1].length===0)return y("InvalidAttr","Attribute '"+_[C][2]+"' has no space in starting.",N(_[C]));if(_[C][3]!==void 0&&_[C][4]===void 0)return y("InvalidAttr","Attribute '"+_[C][2]+"' is without value.",N(_[C]));if(_[C][3]===void 0&&!v.allowBooleanAttributes)return y("InvalidAttr","boolean attribute '"+_[C][2]+"' is not allowed.",N(_[C]));const R=_[C][2];if(!w(R))return y("InvalidAttr","Attribute '"+R+"' is an invalid name.",N(_[C]));if(P.hasOwnProperty(R))return y("InvalidAttr","Attribute '"+R+"' is repeated.",N(_[C]));P[R]=1}return!0}function b(f,v){if(f[++v]===";")return-1;if(f[v]==="#")return(function(P,C){let R=/\d/;for(P[C]==="x"&&(C++,R=/[\da-fA-F]/);C{const i=n(87),u=n(118),l={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,h){return h},attributeValueProcessor:function(s,h){return h},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 d(s){this.options=Object.assign({},l,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=u(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=p,this.options.format?(this.indentate=E,this.tagEndChar=`> `,this.newLine=` `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function p(s,h,c,b){const y=this.j2x(s,c+1,b.concat(h));return s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],h,y.attrStr,c):this.buildObjectNode(y.val,h,y.attrStr,c)}function E(s){return this.options.indentBy.repeat(s)}function a(s){return!(!s.startsWith(this.options.attributeNamePrefix)||s===this.options.textNodeName)&&s.substr(this.attrPrefixLen)}d.prototype.build=function(s){return this.options.preserveOrder?i(s,this.options):(Array.isArray(s)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(s={[this.options.arrayNodeName]:s}),this.j2x(s,0,[]).val)},d.prototype.j2x=function(s,h,c){let b="",y="";const w=c.join(".");for(let T in s)if(Object.prototype.hasOwnProperty.call(s,T))if(s[T]===void 0)this.isAttribute(T)&&(y+="");else if(s[T]===null)this.isAttribute(T)?y+="":T[0]==="?"?y+=this.indentate(h)+"<"+T+"?"+this.tagEndChar:y+=this.indentate(h)+"<"+T+"/"+this.tagEndChar;else if(s[T]instanceof Date)y+=this.buildTextValNode(s[T],T,"",h);else if(typeof s[T]!="object"){const N=this.isAttribute(T);if(N&&!this.ignoreAttributesFn(N,w))b+=this.buildAttrPairStr(N,""+s[T]);else if(!N)if(T===this.options.textNodeName){let f=this.options.tagValueProcessor(T,""+s[T]);y+=this.replaceEntitiesValue(f)}else y+=this.buildTextValNode(s[T],T,"",h)}else if(Array.isArray(s[T])){const N=s[T].length;let f="",v="";for(let _=0;_`+this.newLine:this.indentate(b)+"<"+h+c+w+this.tagEndChar+s+this.indentate(b)+y:this.indentate(b)+"<"+h+c+w+">"+s+y}},d.prototype.closeTag=function(s){let h="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(h="/"):h=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(b)+``+this.newLine;if(h[0]==="?")return this.indentate(b)+"<"+h+c+"?"+this.tagEndChar;{let y=this.options.tagValueProcessor(h,s);return y=this.replaceEntitiesValue(y),y===""?this.indentate(b)+"<"+h+c+this.closeTag(h)+this.tagEndChar:this.indentate(b)+"<"+h+c+">"+y+"0&&this.options.processEntities)for(let h=0;h{function t(d,p,E,a){let s="",h=!1;for(let c=0;c`,h=!1;continue}if(y===p.commentPropName){s+=a+``,h=!0;continue}if(y[0]==="?"){const v=i(b[":@"],p),_=y==="?xml"?"":a;let P=b[y][0][p.textNodeName];P=P.length!==0?" "+P:"",s+=_+`<${y}${P}${v}?>`,h=!0;continue}let T=a;T!==""&&(T+=p.indentBy);const N=a+`<${y}${i(b[":@"],p)}`,f=t(b[y],p,w,T);p.unpairedTags.indexOf(y)!==-1?p.suppressUnpairedNode?s+=N+">":s+=N+"/>":f&&f.length!==0||!p.suppressEmptyNode?f&&f.endsWith(">")?s+=N+`>${f}${a}`:(s+=N+">",f&&a!==""&&(f.includes("/>")||f.includes("`):s+=N+"/>",h=!0}return s}function n(d){const p=Object.keys(d);for(let E=0;E0&&p.processEntities)for(let E=0;E0&&(E=` `),t(d,p,"",E)}},193:(e,t,n)=>{const i=n(705);function u(h,c){let b="";for(;c"){if(T?h[c-1]==="-"&&h[c-2]==="-"&&(T=!1,y--):y--,y===0)break}else h[c]==="["?w=!0:N+=h[c];else{if(w&&d(h,c)){let f,v;c+=7,[f,v,c]=u(h,c+1),v.indexOf("&")===-1&&(b[s(f)]={regx:RegExp(`&${f};`,"g"),val:v})}else if(w&&p(h,c))c+=8;else if(w&&E(h,c))c+=8;else if(w&&a(h,c))c+=9;else{if(!l)throw new Error("Invalid DOCTYPE");T=!0}y++,N=""}if(y!==0)throw new Error("Unclosed DOCTYPE")}return{entities:b,i:c}}},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(i,u){return u},attributeValueProcessor:function(i,u){return u},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(i,u,l){return i}};t.buildOptions=function(i){return Object.assign({},n,i)},t.defaultOptions=n},299:(e,t,n)=>{const i=n(705),u=n(365),l=n(193),d=n(494),p=n(118);function E(C){const R=Object.keys(C);for(let O=0;O0)){S||(C=this.replaceEntitiesValue(C));const D=this.options.tagValueProcessor(R,C,O,U,M);return D==null?C:typeof D!=typeof C||D!==C?D:this.options.trimValues||C.trim()===C?P(C,this.options.parseTagValue,this.options.numberParseOptions):C}}function s(C){if(this.options.removeNSPrefix){const R=C.split(":"),O=C.charAt(0)==="/"?"/":"";if(R[0]==="xmlns")return"";R.length===2&&(C=O+R[1])}return C}const h=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function c(C,R,O){if(this.options.ignoreAttributes!==!0&&typeof C=="string"){const I=i.getAllMatches(C,h),U=I.length,M={};for(let S=0;S",M,"Closing Tag is not closed.");let D=C.substring(M+2,S).trim();if(this.options.removeNSPrefix){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1))}this.options.transformTagName&&(D=this.options.transformTagName(D)),O&&(I=this.saveTextToParentTag(I,O,U));const F=U.substring(U.lastIndexOf(".")+1);if(D&&this.options.unpairedTags.indexOf(D)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let G=0;F&&this.options.unpairedTags.indexOf(F)!==-1?(G=U.lastIndexOf(".",U.lastIndexOf(".")-1),this.tagsNodeStack.pop()):G=U.lastIndexOf("."),U=U.substring(0,G),O=this.tagsNodeStack.pop(),I="",M=S}else if(C[M+1]==="?"){let S=v(C,M,!1,"?>");if(!S)throw new Error("Pi Tag is not closed.");if(I=this.saveTextToParentTag(I,O,U),!(this.options.ignoreDeclaration&&S.tagName==="?xml"||this.options.ignorePiTags)){const D=new u(S.tagName);D.add(this.options.textNodeName,""),S.tagName!==S.tagExp&&S.attrExpPresent&&(D[":@"]=this.buildAttributesMap(S.tagExp,U,S.tagName)),this.addChild(O,D,U)}M=S.closeIndex+1}else if(C.substr(M+1,3)==="!--"){const S=f(C,"-->",M+4,"Comment is not closed.");if(this.options.commentPropName){const D=C.substring(M+4,S-2);I=this.saveTextToParentTag(I,O,U),O.add(this.options.commentPropName,[{[this.options.textNodeName]:D}])}M=S}else if(C.substr(M+1,2)==="!D"){const S=l(C,M);this.docTypeEntities=S.entities,M=S.i}else if(C.substr(M+1,2)==="!["){const S=f(C,"]]>",M,"CDATA is not closed.")-2,D=C.substring(M+9,S);I=this.saveTextToParentTag(I,O,U);let F=this.parseTextData(D,O.tagname,U,!0,!1,!0,!0);F==null&&(F=""),this.options.cdataPropName?O.add(this.options.cdataPropName,[{[this.options.textNodeName]:D}]):O.add(this.options.textNodeName,F),M=S+2}else{let S=v(C,M,this.options.removeNSPrefix),D=S.tagName;const F=S.rawTagName;let G=S.tagExp,X=S.attrExpPresent,V=S.closeIndex;this.options.transformTagName&&(D=this.options.transformTagName(D)),O&&I&&O.tagname!=="!xml"&&(I=this.saveTextToParentTag(I,O,U,!1));const Z=O;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(O=this.tagsNodeStack.pop(),U=U.substring(0,U.lastIndexOf("."))),D!==R.tagname&&(U+=U?"."+D:D),this.isItStopNode(this.options.stopNodes,U,D)){let H="";if(G.length>0&&G.lastIndexOf("/")===G.length-1)D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),M=S.closeIndex;else if(this.options.unpairedTags.indexOf(D)!==-1)M=S.closeIndex;else{const q=this.readStopNodeData(C,F,V+1);if(!q)throw new Error(`Unexpected end of ${F}`);M=q.i,H=q.tagContent}const st=new u(D);D!==G&&X&&(st[":@"]=this.buildAttributesMap(G,U,D)),H&&(H=this.parseTextData(H,D,U,!0,X,!0,!0)),U=U.substr(0,U.lastIndexOf(".")),st.add(this.options.textNodeName,H),this.addChild(O,st,U)}else{if(G.length>0&&G.lastIndexOf("/")===G.length-1){D[D.length-1]==="/"?(D=D.substr(0,D.length-1),U=U.substr(0,U.length-1),G=D):G=G.substr(0,G.length-1),this.options.transformTagName&&(D=this.options.transformTagName(D));const H=new u(D);D!==G&&X&&(H[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(O,H,U),U=U.substr(0,U.lastIndexOf("."))}else{const H=new u(D);this.tagsNodeStack.push(O),D!==G&&X&&(H[":@"]=this.buildAttributesMap(G,U,D)),this.addChild(O,H,U),O=H}I="",M=V}}else I+=C[M];return R.child};function y(C,R,O){const I=this.options.updateTag(R.tagname,O,R[":@"]);I===!1||(typeof I=="string"&&(R.tagname=I),C.addChild(R))}const w=function(C){if(this.options.processEntities){for(let R in this.docTypeEntities){const O=this.docTypeEntities[R];C=C.replace(O.regx,O.val)}for(let R in this.lastEntities){const O=this.lastEntities[R];C=C.replace(O.regex,O.val)}if(this.options.htmlEntities)for(let R in this.htmlEntities){const O=this.htmlEntities[R];C=C.replace(O.regex,O.val)}C=C.replace(this.ampEntity.regex,this.ampEntity.val)}return C};function T(C,R,O,I){return C&&(I===void 0&&(I=Object.keys(R.child).length===0),(C=this.parseTextData(C,R.tagname,O,!1,!!R[":@"]&&Object.keys(R[":@"]).length!==0,I))!==void 0&&C!==""&&R.add(this.options.textNodeName,C),C=""),C}function N(C,R,O){const I="*."+O;for(const U in C){const M=C[U];if(I===M||R===M)return!0}return!1}function f(C,R,O,I){const U=C.indexOf(R,O);if(U===-1)throw new Error(I);return U+R.length-1}function v(C,R,O){const I=(function(X,V){let Z,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",st="";for(let q=V;q3&&arguments[3]!==void 0?arguments[3]:">");if(!I)return;let U=I.data;const M=I.index,S=U.search(/\s/);let D=U,F=!0;S!==-1&&(D=U.substring(0,S),U=U.substring(S+1).trimStart());const G=D;if(O){const X=D.indexOf(":");X!==-1&&(D=D.substr(X+1),F=D!==I.data.substr(X+1))}return{tagName:D,tagExp:U,closeIndex:M,attrExpPresent:F,rawTagName:G}}function _(C,R,O){const I=O;let U=1;for(;O",O,`${R} is not closed`);if(C.substring(O+2,M).trim()===R&&(U--,U===0))return{tagContent:C.substring(I,O),i:M};O=M}else if(C[O+1]==="?")O=f(C,"?>",O+1,"StopNode is not closed.");else if(C.substr(O+1,3)==="!--")O=f(C,"-->",O+3,"StopNode is not closed.");else if(C.substr(O+1,2)==="![")O=f(C,"]]>",O,"StopNode is not closed.")-2;else{const M=v(C,O,">");M&&((M&&M.tagName)===R&&M.tagExp[M.tagExp.length-1]!=="/"&&U++,O=M.closeIndex)}}function P(C,R,O){if(R&&typeof C=="string"){const I=C.trim();return I==="true"||I!=="false"&&d(C,O)}return i.isExist(C)?C:""}e.exports=class{constructor(C){this.options=C,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(R,O)=>String.fromCharCode(Number.parseInt(O,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(R,O)=>String.fromCharCode(Number.parseInt(O,16))}},this.addExternalEntities=E,this.parseXml=b,this.parseTextData=a,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=N,this.replaceEntitiesValue=w,this.readStopNodeData=_,this.saveTextToParentTag=T,this.addChild=y,this.ignoreAttributesFn=p(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:i}=n(63),u=n(299),{prettify:l}=n(728),d=n(31);e.exports=class{constructor(p){this.externalEntities={},this.options=i(p)}parse(p,E){if(typeof p!="string"){if(!p.toString)throw new Error("XML data is accepted in String or Bytes[] form.");p=p.toString()}if(E){E===!0&&(E={});const h=d.validate(p,E);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const a=new u(this.options);a.addExternalEntities(this.externalEntities);const s=a.parseXml(p);return this.options.preserveOrder||s===void 0?s:l(s,this.options)}addEntity(p,E){if(E.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(p.indexOf("&")!==-1||p.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(E==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[p]=E}}},728:(e,t)=>{function n(d,p,E){let a;const s={};for(let h=0;h0&&(s[p.textNodeName]=a):a!==void 0&&(s[p.textNodeName]=a),s}function i(d){const p=Object.keys(d);for(let E=0;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(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&t(i.slice(0,0))})(n)||!!n._isBuffer)}},542:(e,t,n)=>{(function(){var i=n(298),u=n(526).utf8,l=n(135),d=n(526).bin,p=function(E,a){E.constructor==String?E=a&&a.encoding==="binary"?d.stringToBytes(E):u.stringToBytes(E):l(E)?E=Array.prototype.slice.call(E,0):Array.isArray(E)||E.constructor===Uint8Array||(E=E.toString());for(var s=i.bytesToWords(E),h=8*E.length,c=1732584193,b=-271733879,y=-1732584194,w=271733878,T=0;T>>24)|4278255360&(s[T]<<24|s[T]>>>8);s[h>>>5]|=128<>>9<<4)]=h;var N=p._ff,f=p._gg,v=p._hh,_=p._ii;for(T=0;T>>0,b=b+C>>>0,y=y+R>>>0,w=w+O>>>0}return i.endian([c,b,y,w])};p._ff=function(E,a,s,h,c,b,y){var w=E+(a&s|~a&h)+(c>>>0)+y;return(w<>>32-b)+a},p._gg=function(E,a,s,h,c,b,y){var w=E+(a&h|s&~h)+(c>>>0)+y;return(w<>>32-b)+a},p._hh=function(E,a,s,h,c,b,y){var w=E+(a^s^h)+(c>>>0)+y;return(w<>>32-b)+a},p._ii=function(E,a,s,h,c,b,y){var w=E+(s^(a|~h))+(c>>>0)+y;return(w<>>32-b)+a},p._blocksize=16,p._digestsize=16,e.exports=function(E,a){if(E==null)throw new Error("Illegal argument "+E);var s=i.wordsToBytes(p(E,a));return a&&a.asBytes?s:a&&a.asString?d.bytesToString(s):i.bytesToHex(s)}})()},285:(e,t,n)=>{var i=n(2);e.exports=function(N){return N?(N.substr(0,2)==="{}"&&(N="\\{\\}"+N.substr(2)),T((function(f){return f.split("\\\\").join(u).split("\\{").join(l).split("\\}").join(d).split("\\,").join(p).split("\\.").join(E)})(N),!0).map(s)):[]};var u="\0SLASH"+Math.random()+"\0",l="\0OPEN"+Math.random()+"\0",d="\0CLOSE"+Math.random()+"\0",p="\0COMMA"+Math.random()+"\0",E="\0PERIOD"+Math.random()+"\0";function a(N){return parseInt(N,10)==N?parseInt(N,10):N.charCodeAt(0)}function s(N){return N.split(u).join("\\").split(l).join("{").split(d).join("}").split(p).join(",").split(E).join(".")}function h(N){if(!N)return[""];var f=[],v=i("{","}",N);if(!v)return N.split(",");var _=v.pre,P=v.body,C=v.post,R=_.split(",");R[R.length-1]+="{"+P+"}";var O=h(C);return C.length&&(R[R.length-1]+=O.shift(),R.push.apply(R,O)),f.push.apply(f,R),f}function c(N){return"{"+N+"}"}function b(N){return/^-?0\d/.test(N)}function y(N,f){return N<=f}function w(N,f){return N>=f}function T(N,f){var v=[],_=i("{","}",N);if(!_)return[N];var P=_.pre,C=_.post.length?T(_.post,!1):[""];if(/\$$/.test(_.pre))for(var R=0;R=0;if(!D&&!F)return _.post.match(/,.*\}/)?T(N=_.pre+"{"+_.body+d+_.post):[N];if(D)I=_.body.split(/\.\./);else if((I=h(_.body)).length===1&&(I=T(I[0],!1).map(c)).length===1)return C.map((function(_t){return _.pre+I[0]+_t}));if(D){var G=a(I[0]),X=a(I[1]),V=Math.max(I[0].length,I[1].length),Z=I.length==3?Math.abs(a(I[2])):1,H=y;X0){var Rt=new Array(jt+1).join("0");Q=q<0?"-"+Rt+Q.slice(1):Rt+Q}}U.push(Q)}}else{U=[];for(var At=0;At{function t(a){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t(a)}function n(a){var s=typeof Map=="function"?new Map:void 0;return n=function(h){if(h===null||(c=h,Function.toString.call(c).indexOf("[native code]")===-1))return h;var c;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(h))return s.get(h);s.set(h,b)}function b(){return i(h,arguments,l(this).constructor)}return b.prototype=Object.create(h.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),u(b,h)},n(a)}function i(a,s,h){return i=(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(c,b,y){var w=[null];w.push.apply(w,b);var T=new(Function.bind.apply(c,w));return y&&u(T,y.prototype),T},i.apply(null,arguments)}function u(a,s){return u=Object.setPrototypeOf||function(h,c){return h.__proto__=c,h},u(a,s)}function l(a){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},l(a)}var d=(function(a){function s(h){var c;return(function(b,y){if(!(b instanceof y))throw new TypeError("Cannot call a class as a function")})(this,s),(c=(function(b,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})(b):y})(this,l(s).call(this,h))).name="ObjectPrototypeMutationError",c}return(function(h,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(c&&c.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),c&&u(h,c)})(s,a),s})(n(Error));function p(a,s){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},c=s.split("."),b=c.length,y=function(N){var f=c[N];if(!a)return{v:void 0};if(f==="+"){if(Array.isArray(a))return{v:a.map((function(_,P){var C=c.slice(N+1);return C.length>0?p(_,C.join("."),h):h(a,P,c,N)}))};var v=c.slice(0,N).join(".");throw new Error("Object at wildcard (".concat(v,") is not an array"))}a=h(a,f,c,N)},w=0;w2&&arguments[2]!==void 0?arguments[2]:{};if(t(a)!="object"||a===null||s===void 0)return!1;if(typeof s=="number")return s in a;try{var c=!1;return p(a,s,(function(b,y,w,T){if(!E(w,T))return b&&b[y];c=h.own?b.hasOwnProperty(y):y in b})),c}catch{return!1}},hasOwn:function(a,s,h){return this.has(a,s,h||{own:!0})},isIn:function(a,s,h){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(a)!="object"||a===null||s===void 0)return!1;try{var b=!1,y=!1;return p(a,s,(function(w,T,N,f){return b=b||w===h||!!w&&w[T]===h,y=E(N,f)&&t(w)==="object"&&T in w,w&&w[T]})),c.validPath?b&&y:b}catch{return!1}},ObjectPrototypeMutationError:d}},47:(e,t,n)=>{var i=n(410),u=function(a){return typeof a=="string"};function l(a,s){for(var h=[],c=0;c=-1&&!s;h--){var c=h>=0?arguments[h]:Yt.cwd();if(!u(c))throw new TypeError("Arguments to path.resolve must be strings");c&&(a=c+"/"+a,s=c.charAt(0)==="/")}return(s?"/":"")+(a=l(a.split("/"),!s).join("/"))||"."},p.normalize=function(a){var s=p.isAbsolute(a),h=a.substr(-1)==="/";return(a=l(a.split("/"),!s).join("/"))||s||(a="."),a&&h&&(a+="/"),(s?"/":"")+a},p.isAbsolute=function(a){return a.charAt(0)==="/"},p.join=function(){for(var a="",s=0;s=0&&f[_]==="";_--);return v>_?[]:f.slice(v,_+1)}a=p.resolve(a).substr(1),s=p.resolve(s).substr(1);for(var c=h(a.split("/")),b=h(s.split("/")),y=Math.min(c.length,b.length),w=y,T=0;T{var n=Object.prototype.hasOwnProperty;function i(l){try{return decodeURIComponent(l.replace(/\+/g," "))}catch{return null}}function u(l){try{return encodeURIComponent(l)}catch{return null}}t.stringify=function(l,d){d=d||"";var p,E,a=[];for(E in typeof d!="string"&&(d="?"),l)if(n.call(l,E)){if((p=l[E])||p!=null&&!isNaN(p)||(p=""),E=u(E),p=u(p),E===null||p===null)continue;a.push(E+"="+p)}return a.length?d+a.join("&"):""},t.parse=function(l){for(var d,p=/([^=?#&]+)=?([^&]*)/g,E={};d=p.exec(l);){var a=i(d[1]),s=i(d[2]);a===null||s===null||a in E||(E[a]=s)}return E}},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 i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(u){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(l=Object.assign({},i,l),!u||typeof u!="string")return u;let d=u.trim();if(l.skipLike!==void 0&&l.skipLike.test(d))return u;if(l.hex&&t.test(d))return Number.parseInt(d,16);{const E=n.exec(d);if(E){const a=E[1],s=E[2];let h=((p=E[3])&&p.indexOf(".")!==-1&&((p=p.replace(/0+$/,""))==="."?p="0":p[0]==="."?p="0"+p:p[p.length-1]==="."&&(p=p.substr(0,p.length-1))),p);const c=E[4]||E[6];if(!l.leadingZeros&&s.length>0&&a&&d[2]!=="."||!l.leadingZeros&&s.length>0&&!a&&d[1]!==".")return u;{const b=Number(d),y=""+b;return y.search(/[eE]/)!==-1||c?l.eNotation?b:u:d.indexOf(".")!==-1?y==="0"&&h===""||y===h||a&&y==="-"+h?b:u:s?h===y||a+h===y?b:u:d===y||d===a+y?b:u}}return u}var p}},737:(e,t,n)=>{var i=n(670),u=n(647),l=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,d=/[\n\r\t]/g,p=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,E=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function h(f){return(f||"").toString().replace(l,"")}var c=[["#","hash"],["?","query"],function(f,v){return w(v.protocol)?f.replace(/\\/g,"/"):f},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],b={hash:1,query:1};function y(f){var v,_=(typeof window<"u"?window:typeof re<"u"?re:typeof self<"u"?self:{}).location||{},P={},C=typeof(f=f||_);if(f.protocol==="blob:")P=new N(unescape(f.pathname),{});else if(C==="string")for(v in P=new N(f,{}),b)delete P[v];else if(C==="object"){for(v in f)v in b||(P[v]=f[v]);P.slashes===void 0&&(P.slashes=p.test(f.href))}return P}function w(f){return f==="file:"||f==="ftp:"||f==="http:"||f==="https:"||f==="ws:"||f==="wss:"}function T(f,v){f=(f=h(f)).replace(d,""),v=v||{};var _,P=a.exec(f),C=P[1]?P[1].toLowerCase():"",R=!!P[2],O=!!P[3],I=0;return R?O?(_=P[2]+P[3]+P[4],I=P[2].length+P[3].length):(_=P[2]+P[4],I=P[2].length):O?(_=P[3]+P[4],I=P[3].length):_=P[4],C==="file:"?I>=2&&(_=_.slice(2)):w(C)?_=P[4]:C?R&&(_=_.slice(2)):I>=2&&w(v.protocol)&&(_=P[4]),{protocol:C,slashes:R||w(C),slashesCount:I,rest:_}}function N(f,v,_){if(f=(f=h(f)).replace(d,""),!(this instanceof N))return new N(f,v,_);var P,C,R,O,I,U,M=c.slice(),S=typeof v,D=this,F=0;for(S!=="object"&&S!=="string"&&(_=v,v=null),_&&typeof _!="function"&&(_=u.parse),P=!(C=T(f||"",v=y(v))).protocol&&!C.slashes,D.slashes=C.slashes||P&&v.slashes,D.protocol=C.protocol||v.protocol||"",f=C.rest,(C.protocol==="file:"&&(C.slashesCount!==2||s.test(f))||!C.slashes&&(C.protocol||C.slashesCount<2||!w(D.protocol)))&&(M[3]=[/(.*)/,"pathname"]);F{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},bn={};function W(e){var t=bn[e];if(t!==void 0)return t.exports;var n=bn[e]={id:e,loaded:!1,exports:{}};return oi[e].call(n.exports,n,n.exports,W),n.loaded=!0,n.exports}W.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return W.d(t,{a:t}),t},W.d=(e,t)=>{for(var n in t)W.o(t,n)&&!W.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},W.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),W.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var It={};W.d(It,{hT:()=>yt,O4:()=>Pt,Kd:()=>gi,YK:()=>di,UU:()=>Ao,Gu:()=>gr,ky:()=>Tr,h4:()=>Kt,ch:()=>Ee,hq:()=>Ut,i5:()=>Ir});var si=W(737),ai=W.n(si);function Ie(e){if(!Xe(e))throw new Error("Parameter was not an error")}function Xe(e){return!!e&&typeof e=="object"&&(t=e,Object.prototype.toString.call(t)==="[object Error]")||e instanceof Error;var t}class vt extends Error{constructor(t,n){const i=[...arguments],{options:u,shortMessage:l}=(function(p){let E,a="";if(p.length===0)E={};else if(Xe(p[0]))E={cause:p[0]},a=p.slice(1).join(" ")||"";else if(p[0]&&typeof p[0]=="object")E=Object.assign({},p[0]),a=p.slice(1).join(" ")||"";else{if(typeof p[0]!="string")throw new Error("Invalid arguments passed to Layerr");E={},a=a=p.join(" ")||""}return{options:E,shortMessage:a}})(i);let d=l;if(u.cause&&(d=`${d}: ${u.cause.message}`),super(d),this.message=d,u.name&&typeof u.name=="string"?this.name=u.name:this.name="Layerr",u.cause&&Object.defineProperty(this,"_cause",{value:u.cause}),Object.defineProperty(this,"_info",{value:{}}),u.info&&typeof u.info=="object"&&Object.assign(this._info,u.info),Error.captureStackTrace){const p=u.constructorOpt||this.constructor;Error.captureStackTrace(this,p)}}static cause(t){return Ie(t),t._cause&&Xe(t._cause)?t._cause:null}static fullStack(t){Ie(t);const n=vt.cause(t);return n?`${t.stack} caused by: ${vt.fullStack(n)}`:t.stack??""}static info(t){Ie(t);const n={},i=vt.cause(t);return i&&Object.assign(n,vt.info(i)),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 ui=W(47),ue=W.n(ui);const vn="__PATH_SEPARATOR_POSIX__",wn="__PATH_SEPARATOR_WINDOWS__";function tt(e){try{const t=e.replace(/\//g,vn).replace(/\\\\/g,wn);return encodeURIComponent(t).split(wn).join("\\\\").split(vn).join("/")}catch(t){throw new vt(t,"Failed encoding path")}}function An(e){return e.startsWith("/")?e:"/"+e}function Qt(e){let t=e;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function li(e){let t=new(ai())(e).pathname;return t.length<=0&&(t="/"),Qt(t)}function et(){for(var e=arguments.length,t=new Array(e),n=0;n1){var l=i.shift();i[0]=l+i[0]}i[0].match(/^file:\/\/\//)?i[0]=i[0].replace(/^([^/:]+):\/*/,"$1:///"):i[0]=i[0].replace(/^([^/:]+):\/*/,"$1://");for(var d=0;d0&&(p=p.replace(/^[\/]+/,"")),p=d0?"?":"")+a.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((i,u,l)=>((l===0||u!=="/"||u==="/"&&i[i.length-1]!=="/")&&i.push(u),i)),[]))}var ci=W(542),qt=W.n(ci);const hi="abcdef0123456789";function Tn(e,t){const n=e.url.replace("//",""),i=n.indexOf("/")==-1?"/":n.slice(n.indexOf("/")),u=e.method?e.method.toUpperCase():"GET",l=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",d=`00000000${t.nc}`.slice(-8),p=(function(c,b,y,w,T,N,f){const v=f||qt()(`${b}:${y}:${w}`);return c&&c.toLowerCase()==="md5-sess"?qt()(`${v}:${T}:${N}`):v})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),E=qt()(`${u}:${i}`),a=l?qt()(`${p}:${t.nonce}:${d}:${t.cnonce}:${l}:${E}`):qt()(`${p}:${t.nonce}:${E}`),s={username:t.username,realm:t.realm,nonce:t.nonce,uri:i,qop:l,response:a,nc:d,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},h=[];for(const c in s)s[c]&&(c==="qop"||c==="nc"||c==="algorithm"?h.push(`${c}=${s[c]}`):h.push(`${c}="${s[c]}"`));return`Digest ${h.join(", ")}`}function hr(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var fi=W(101),fr=W.n(fi);function In(e){return fr().decode(e)}function Nn(e,t){var n;return`Basic ${n=`${e}:${t}`,fr().encode(n)}`}const le=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,pi=le.fetch.bind(le),gi=le.Request,di=le.Response;let yt=(function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e})({}),Pt=(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 pr(e,t,n,i,u){switch(e.authType){case yt.Auto:t&&n&&(e.headers.Authorization=Nn(t,n));break;case yt.Digest:e.digest=(function(d,p,E){return{username:d,password:p,ha1:E,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,n,u);break;case yt.None:break;case yt.Password:e.headers.Authorization=Nn(t,n);break;case yt.Token:e.headers.Authorization=`${(l=i).token_type} ${l.access_token}`;break;default:throw new vt({info:{code:Pt.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var l}W(345),W(800);const _n="@@HOTPATCHER",mi=()=>{};function Ne(e){return{original:e,methods:[e],final:!1}}class Ei{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=_n}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==_n)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((i=>{this.configuration.registry.hasOwnProperty(i)?n&&(this.configuration.registry[i]=Object.assign({},t.configuration.registry[i])):this.configuration.registry[i]=Object.assign({},t.configuration.registry[i])})),t._configuration=this.configuration,this}execute(t){const n=this.get(t)||mi;for(var i=arguments.length,u=new Array(i>1?i-1:0),l=1;l0;)a=[u.shift().apply(s,a)];return a[0]}})(...n.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:u=!1}=i;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(u)this.configuration.registry[t]?this.configuration.registry[t].methods.push(n):this.configuration.registry[t]=Ne(n);else if(this.isPatched(t)){const{original:l}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Ne(n),{original:l})}else this.configuration.registry[t]=Ne(n);return this}patchInline(t,n){this.isPatched(t)||this.patch(t,n);for(var i=arguments.length,u=new Array(i>2?i-2:0),l=2;l1?n-1:0),u=1;u{this.patch(t,l,{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 _e=null;function gr(){return _e||(_e=new Ei),_e}function ce(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 Cn(){for(var e=arguments.length,t=new Array(e),n=0;n0;){const l=u.shift();i=i?dr(i,l):ce(l)}return i}function dr(e,t){const n=ce(e);return Object.keys(t).forEach((i=>{n.hasOwnProperty(i)?Array.isArray(t[i])?n[i]=Array.isArray(n[i])?[...n[i],...t[i]]:[...t[i]]:typeof t[i]=="object"&&t[i]?n[i]=typeof n[i]=="object"&&n[i]?dr(n[i],t[i]):ce(t[i]):n[i]=t[i]:n[i]=t[i]})),n}function yi(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function ze(){for(var e=arguments.length,t=new Array(e),n=0;n(Object.keys(l).forEach((d=>{const p=d.toLowerCase();i.hasOwnProperty(p)?u[i[p]]=l[d]:(i[p]=d,u[d]=l[d])})),u)),{})}W(805);const bi=typeof ArrayBuffer=="function",{toString:vi}=Object.prototype;function mr(e){return bi&&(e instanceof ArrayBuffer||vi.call(e)==="[object ArrayBuffer]")}function Er(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ke(e){return function(){for(var t=[],n=0;nt.patchInline("fetch",pi,n.url,(function(i){let u={};const l={method:i.method};if(i.headers&&(u=ze(u,i.headers)),i.data!==void 0){const[d,p]=(function(E){if(typeof E=="string")return[E,{}];if(Er(E))return[E,{}];if(mr(E))return[E,{}];if(E&&typeof E=="object")return[JSON.stringify(E),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof E)})(i.data);l.body=d,u=ze(u,p)}return i.signal&&(l.signal=i.signal),i.withCredentials&&(l.credentials="include"),l.headers=u,l})(n))),e)}var Ai=W(285);const fe=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Ti={"[: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]},Ht=e=>e.replace(/[[\]\\-]/g,"\\$&"),Sn=e=>e.join(""),Ii=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const i=[],u=[];let l=n+1,d=!1,p=!1,E=!1,a=!1,s=n,h="";t:for(;lh?i.push(Ht(h)+"-"+Ht(w)):w===h&&i.push(Ht(w)),h="",l++):e.startsWith("-]",l+1)?(i.push(Ht(w+"-")),l+=2):e.startsWith("-",l+1)?(h=w,l+=2):(i.push(Ht(w)),l++)}else E=!0,l++}else a=!0,l++}if(s1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Ni=new Set(["!","?","+","*","@"]),On=e=>Ni.has(e),Ce="(?!\\.)",_i=new Set(["[","."]),Ci=new Set(["..","."]),Si=new Set("().*{}+?[]^$\\!"),tn="[^/]",xn=tn+"*?",Pn=tn+"+?";class Et{type;#n;#r;#o=!1;#t=[];#e;#s;#u;#a=!1;#i;#l;#h=!1;constructor(t,n){let i=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.#i=this.#n===this?i:this.#n.#i,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.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#l=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,i=n.#e;for(;i;){for(let u=n.#s+1;!i.type&&utypeof 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;n1&&arguments[1]!==void 0?arguments[1]:{};const i=new Et(null,void 0,n);return Et.#c(t,i,0,n),i}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();const t=this.toString(),[n,i,u,l]=this.toRegExpSource();if(!(u||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const d=(this.#i.nocase?"i":"")+(l?"u":"");return Object.assign(new RegExp(`^${n}$`,d),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){const n=t??!!this.#i.dot;if(this.#n===this&&this.#p(),!this.type){const E=this.isStart()&&this.isEnd(),a=this.#t.map((c=>{const[b,y,w,T]=typeof c=="string"?Et.#g(c,this.#r,E):c.toRegExpSource(t);return this.#r=this.#r||w,this.#o=this.#o||T,b})).join("");let s="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Ci.has(this.#t[0]))){const c=_i,b=n&&c.has(a.charAt(0))||a.startsWith("\\.")&&c.has(a.charAt(2))||a.startsWith("\\.\\.")&&c.has(a.charAt(4)),y=!n&&!t&&c.has(a.charAt(0));s=b?"(?!(?:^|/)\\.\\.?(?:$|/))":y?Ce:""}let h="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(h="(?:$|\\/)"),[s+a+h,Wt(a),this.#r=!!this.#r,this.#o]}const i=this.type==="*"||this.type==="+",u=this.type==="!"?"(?:(?!(?:":"(?:";let l=this.#f(n);if(this.isStart()&&this.isEnd()&&!l&&this.type!=="!"){const E=this.toString();return this.#t=[E],this.type=null,this.#r=void 0,[E,Wt(this.toString()),!1,!1]}let d=!i||t||n?"":this.#f(!0);d===l&&(d=""),d&&(l=`(?:${l})(?:${d})*?`);let p="";return p=this.type==="!"&&this.#h?(this.isStart()&&!n?Ce:"")+Pn:u+l+(this.type==="!"?"))"+(!this.isStart()||n||t?"":Ce)+xn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&d?")":this.type==="*"&&d?")?":`)${this.type}`),[p,Wt(l),this.#r=!!this.#r,this.#o]}#f(t){return this.#t.map((n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[i,u,l,d]=n.toRegExpSource(t);return this.#o=this.#o||d,i})).filter((n=>!(this.isStart()&&this.isEnd()&&!n))).join("|")}static#g(t,n){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,l="",d=!1;for(let p=0;p2&&arguments[2]!==void 0?arguments[2]:{};return fe(t),!(!n.nocomment&&t.charAt(0)==="#")&&new pe(t,n).match(e)},Oi=/^\*+([^+@!?\*\[\(]*)$/,xi=e=>t=>!t.startsWith(".")&&t.endsWith(e),Pi=e=>t=>t.endsWith(e),Ri=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Li=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),$i=/^\*+\.\*+$/,Di=e=>!e.startsWith(".")&&e.includes("."),Bi=e=>e!=="."&&e!==".."&&e.includes("."),Ui=/^\.\*+$/,ji=e=>e!=="."&&e!==".."&&e.startsWith("."),Mi=/^\*+$/,ki=e=>e.length!==0&&!e.startsWith("."),Gi=e=>e.length!==0&&e!=="."&&e!=="..",Fi=/^\?+([^+@!?\*\[\(]*)?$/,Vi=e=>{let[t,n=""]=e;const i=br([t]);return n?(n=n.toLowerCase(),u=>i(u)&&u.toLowerCase().endsWith(n)):i},Xi=e=>{let[t,n=""]=e;const i=vr([t]);return n?(n=n.toLowerCase(),u=>i(u)&&u.toLowerCase().endsWith(n)):i},zi=e=>{let[t,n=""]=e;const i=vr([t]);return n?u=>i(u)&&u.endsWith(n):i},qi=e=>{let[t,n=""]=e;const i=br([t]);return n?u=>i(u)&&u.endsWith(n):i},br=e=>{let[t]=e;const n=t.length;return i=>i.length===n&&!i.startsWith(".")},vr=e=>{let[t]=e;const n=t.length;return i=>i.length===n&&i!=="."&&i!==".."},wr=typeof Yt=="object"&&Yt?typeof Te=="object"&&Te&&Te.__MINIMATCH_TESTING_PLATFORM__||Yt.platform:"posix";mt.sep=wr==="win32"?"\\":"/";const Nt=Symbol("globstar **");mt.GLOBSTAR=Nt,mt.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>mt(n,e,t)};const Tt=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,i){return t(n,i,Tt(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(n){super(n,Tt(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(Tt(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,i){super(n,i,Tt(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,Tt(e,i))}},unescape:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,Tt(e,i))},escape:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,Tt(e,i))},filter:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,Tt(e,i))},defaults:n=>t.defaults(Tt(e,n)),makeRe:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,Tt(e,i))},braceExpand:function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,Tt(e,i))},match:function(n,i){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,i,Tt(e,u))},sep:t.sep,GLOBSTAR:Nt})};const Ar=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return fe(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ai(e)};mt.braceExpand=Ar,mt.makeRe=function(e){return new pe(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},mt.match=function(e,t){const n=new pe(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter((i=>n.match(i))),n.options.nonull&&!e.length&&e.push(t),e};const Rn=/[?*]|[+@!]\(.*?\)|\[|\]/;class pe{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]:{};fe(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||wr,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 i=this.globSet.map((l=>this.slashSplit(l)));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let u=this.globParts.map(((l,d,p)=>{if(this.isWindows&&this.windowsNoMagicRoot){const E=!(l[0]!==""||l[1]!==""||l[2]!=="?"&&Rn.test(l[2])||Rn.test(l[3])),a=/^[a-z]:/i.test(l[0]);if(E)return[...l.slice(0,4),...l.slice(4).map((s=>this.parse(s)))];if(a)return[l[0],...l.slice(1).map((s=>this.parse(s)))]}return l.map((E=>this.parse(E)))}));if(this.debug(this.pattern,u),this.set=u.filter((l=>l.indexOf(!1)===-1)),this.isWindows)for(let l=0;l=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 i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let u=i;for(;n[u+1]==="**";)u++;u!==i&&n.splice(i,u-i)}return n}))}levelOneOptimize(t){return t.map((n=>(n=n.reduce(((i,u)=>{const l=i[i.length-1];return u==="**"&&l==="**"?i:u===".."&&l&&l!==".."&&l!=="."&&l!=="**"?(i.pop(),i):(i.push(u),i)}),[])).length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let u=1;uu&&i.splice(u+1,d-u);let p=i[u+1];const E=i[u+2],a=i[u+3];if(p!==".."||!E||E==="."||E===".."||!a||a==="."||a==="..")continue;n=!0,i.splice(u,1);const s=i.slice(0);s[u]="**",t.push(s),u--}if(!this.preserveMultipleSlashes){for(let d=1;dn.length))}partsMatch(t,n){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=0,l=0,d=[],p="";for(;u2&&arguments[2]!==void 0&&arguments[2];const u=this.options;if(this.isWindows){const w=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),T=!w&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),N=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),f=T?3:w?0:void 0,v=!N&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])?3:N?0:void 0;if(typeof f=="number"&&typeof v=="number"){const[_,P]=[t[f],n[v]];_.toLowerCase()===P.toLowerCase()&&(n[v]=_,v>f?n=n.slice(v):f>v&&(t=t.slice(f)))}}const{optimizationLevel:l=1}=this.options;l>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var d=0,p=0,E=t.length,a=n.length;d>> no match, partial?`,t,c,n,b),c!==E))}let w;if(typeof s=="string"?(w=h===s,this.debug("string match",s,h,w)):(w=s.test(h),this.debug("pattern match",s,h,w)),!w)return!1}if(d===E&&p===a)return!0;if(d===E)return i;if(p===a)return d===E-1&&t[d]==="";throw new Error("wtf?")}braceExpand(){return Ar(this.pattern,this.options)}parse(t){fe(t);const n=this.options;if(t==="**")return Nt;if(t==="")return"";let i,u=null;(i=t.match(Mi))?u=n.dot?Gi:ki:(i=t.match(Oi))?u=(n.nocase?n.dot?Li:Ri:n.dot?Pi:xi)(i[1]):(i=t.match(Fi))?u=(n.nocase?n.dot?Xi:Vi:n.dot?zi:qi)(i):(i=t.match($i))?u=n.dot?Bi:Di:(i=t.match(Ui))&&(u=ji);const l=Et.fromGlob(t,this.options).toMMPattern();return u&&typeof l=="object"&&Reflect.defineProperty(l,"test",{value:u}),l}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,i=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",u=new Set(n.nocase?["i"]:[]);let l=t.map((E=>{const a=E.map((s=>{if(s instanceof RegExp)for(const h of s.flags.split(""))u.add(h);return typeof s=="string"?s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):s===Nt?Nt:s._src}));return a.forEach(((s,h)=>{const c=a[h+1],b=a[h-1];s===Nt&&b!==Nt&&(b===void 0?c!==void 0&&c!==Nt?a[h+1]="(?:\\/|"+i+"\\/)?"+c:a[h]=i:c===void 0?a[h-1]=b+"(?:\\/|"+i+")?":c!==Nt&&(a[h-1]=b+"(?:\\/|\\/"+i+"\\/)"+c,a[h+1]=Nt))})),a.filter((s=>s!==Nt)).join("/")})).join("|");const[d,p]=t.length>1?["(?:",")"]:["",""];l="^"+d+l+p+"$",this.negate&&(l="^(?!"+l+").+$");try{this.regexp=new RegExp(l,[...u].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 i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const u=this.slashSplit(t);this.debug(this.pattern,"split",u);const l=this.set;this.debug(this.pattern,"set",l);let d=u[u.length-1];if(!d)for(let p=u.length-2;!d&&p>=0;p--)d=u[p];for(let p=0;p1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function ct(e,t){const{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw en(t);return t}function Ut(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?yi(e.headers):{},status:e.status,statusText:e.statusText}:t}mt.AST=Et,mt.Minimatch=pe,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=Wt;const Hi=(Ln=function(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const u=lt({url:et(e.remoteURL,tt(t)),method:"COPY",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:i.overwrite===!1?"F":"T",Depth:i.shallow?"0":"infinity"}},e,i);return d=function(p){ct(e,p)},(l=ut(u,e))&&l.then||(l=Promise.resolve(l)),d?l.then(d):l;var l,d},function(){for(var e=[],t=0;t2&&arguments[2]!==void 0?arguments[2]:Gt.Original;const i=xt().get(e,t);return n==="array"&&Array.isArray(i)===!1?[i]:n==="object"&&Array.isArray(i)?i[0]:i}function Kt(e){return new Promise((t=>{t((function(n){const{multistatus:i}=n;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");const u={multistatus:Array.isArray(i)?i[0]:i};return xt().set(u,"multistatus.response",se(u,"multistatus.response",Gt.Array)),xt().set(u,"multistatus.response",xt().get(u,"multistatus.response").map((l=>(function(d){const p=Object.assign({},d);return p.status?xt().set(p,"status",se(p,"status",Gt.Object)):(xt().set(p,"propstat",se(p,"propstat",Gt.Object)),xt().set(p,"propstat.prop",se(p,"propstat.prop",Gt.Object))),p})(l)))),u})(new nn.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(n,i,u)=>i==="true"||i==="false"?i==="true":i,tagValueProcessor(n,i,u){if(!u.endsWith("propstat.prop.displayname"))return i}}).parse(e)))}))}function Ee(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:i=null,getcontentlength:u="0",resourcetype:l=null,getcontenttype:d=null,getetag:p=null}=e,E=l&&typeof l=="object"&&l.collection!==void 0?"directory":"file",a={filename:t,basename:ue().basename(t),lastmod:i,size:parseInt(u,10),type:E,etag:typeof p=="string"?p.replace(/"/g,""):null};return E==="file"&&(a.mime=d&&typeof d=="string"?d.split(";")[0]:""),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),a.props=e),a}function Tr(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=null;try{e.multistatus.response[0].propstat&&(i=e.multistatus.response[0])}catch{}if(!i)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:u,status:l}}=i,[d,p,E]=l.split(" ",3),a=parseInt(p,10);if(a>=400){const s=new Error(`Invalid response: ${a} ${E}`);throw s.status=a,s}return Ee(u,Qt(t),n)}function Ir(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function Se(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const rn=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const{details:i=!1}=n,u=lt({url:et(e.remoteURL,tt(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return Se(ut(u,e),(function(l){return ct(e,l),Se(l.text(),(function(d){return Se(Kt(d),(function(p){const E=Tr(p,t,i);return Ut(l,E,i)}))}))}))}));function Nr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Yi=_r((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=(function(l){if(!l||l==="/")return[];let d=l;const p=[];do p.push(d),d=ue().dirname(d);while(d&&d!=="/");return p})(Qt(t));i.sort(((l,d)=>l.length>d.length?1:d.length>l.length?-1:0));let u=!1;return(function(l,d,p){if(typeof l[Dn]=="function"){let w=function(T){try{for(;!(E=h.next()).done;)if((T=d(E.value))&&T.then){if(!Bn(T))return void T.then(w,s||(s=bt.bind(null,a=new Ft,2)));T=T.v}a?bt(a,1,T):a=T}catch(N){bt(a||(a=new Ft),2,N)}};var E,a,s,h=l[Dn]();if(w(),h.return){var c=function(T){try{E.done||h.return()}catch{}return T};if(a&&a.then)return a.then(c,(function(T){throw c(T)}));c()}return a}if(!("length"in l))throw new TypeError("Object is not iterable");for(var b=[],y=0;y2&&arguments[2]!==void 0?arguments[2]:{};if(n.recursive===!0)return Yi(e,t,n);const i=lt({url:et(e.remoteURL,(u=tt(t),u.endsWith("/")?u:u+"/")),method:"MKCOL"},e,n);var u;return Nr(ut(i,e),(function(l){ct(e,l)}))}));var Qi=W(388),Un=W.n(Qi);const Ji=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const i={};if(typeof n.range=="object"&&typeof n.range.start=="number"){let p=`bytes=${n.range.start}-`;typeof n.range.end=="number"&&(p=`${p}${n.range.end}`),i.Range=p}const u=lt({url:et(e.remoteURL,tt(t)),method:"GET",headers:i},e,n);return d=function(p){if(ct(e,p),i.Range&&p.status!==206){const E=new Error(`Invalid response code for partial request: ${p.status}`);throw E.status=p.status,E}return n.callback&&setTimeout((()=>{n.callback(p)}),0),p.body},(l=ut(u,e))&&l.then||(l=Promise.resolve(l)),d?l.then(d):l;var l,d})),Ki=()=>{},to=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const i=lt({url:et(e.remoteURL,tt(t)),method:"DELETE"},e,n);return l=function(d){ct(e,d)},(u=ut(i,e))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l})),no=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};return(function(i,u){try{var l=(d=rn(e,t,n),p=function(){return!0},E?p?p(d):d:(d&&d.then||(d=Promise.resolve(d)),p?d.then(p):d))}catch(a){return u(a)}var d,p,E;return l&&l.then?l.then(void 0,u):l})(0,(function(i){if(i.status===404)return!1;throw i}))}));function Oe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const ro=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const i=lt({url:et(e.remoteURL,tt(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Oe(ut(i,e),(function(u){return ct(e,u),Oe(u.text(),(function(l){if(!l)throw new Error("Failed parsing directory contents: Empty response");return Oe(Kt(l),(function(d){const p=An(t);let E=(function(a,s,h){let c=arguments.length>3&&arguments[3]!==void 0&&arguments[3],b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const y=ue().join(s,"/"),{multistatus:{response:w}}=a,T=w.map((N=>{const f=(function(_){try{return _.replace(/^https?:\/\/[^\/]+/,"")}catch(P){throw new vt(P,"Failed normalising HREF")}})(N.href),{propstat:{prop:v}}=N;return Ee(v,y==="/"?decodeURIComponent(Qt(f)):Qt(ue().relative(decodeURIComponent(y),decodeURIComponent(f))),c)}));return b?T:T.filter((N=>N.basename&&(N.type==="file"||N.filename!==h.replace(/\/$/,""))))})(d,An(e.remoteBasePath||e.remotePath),p,n.details,n.includeSelf);return n.glob&&(E=(function(a,s){return a.filter((h=>mt(h.filename,s,{matchBase:!0})))})(E,n.glob)),Ut(u,E,n.details)}))}))}))}));function on(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const i=lt({url:et(e.remoteURL,tt(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ao]},e,n);return ge(ut(i,e),(function(u){return ct(e,u),ge(u.text(),(function(l){return Ut(u,l,n.details)}))}))}));function ge(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const oo=on((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=lt({url:et(e.remoteURL,tt(t)),method:"GET"},e,n);return ge(ut(i,e),(function(u){let l;return ct(e,u),(function(d,p){var E=d();return E&&E.then?E.then(p):p()})((function(){return ge(u.arrayBuffer(),(function(d){l=d}))}),(function(){return Ut(u,l,n.details)}))}))})),so=on((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:i="binary"}=n;if(i!=="binary"&&i!=="text")throw new vt({info:{code:Pt.InvalidOutputFormat}},`Invalid output format: ${i}`);return i==="text"?io(e,t,n):oo(e,t,n)})),ao=e=>e;function uo(e){return new nn.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Cr({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function Cr(e,t){const n={...e};for(const i in n)n.hasOwnProperty(i)&&(n[i]&&typeof n[i]=="object"&&i.indexOf(":")===-1?(n[`${t}:${i}`]=Cr(n[i],t),delete n[i]):/^@_/.test(i)===!1&&(n[`${t}:${i}`]=n[i],delete n[i]));return n}function We(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Sr(e){return function(){for(var t=[],n=0;n3&&arguments[3]!==void 0?arguments[3]:{};const u=lt({url:et(e.remoteURL,tt(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,i);return We(ut(u,e),(function(l){if(ct(e,l),l.status!==204&&l.status!==200)throw en(l)}))})),co=Sr((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:i,timeout:u=ho}=n,l={Accept:"text/plain,application/xml",Timeout:u};i&&(l.If=i);const d=lt({url:et(e.remoteURL,tt(t)),method:"LOCK",headers:l,data:uo(e.contactHref)},e,n);return We(ut(d,e),(function(p){return ct(e,p),We(p.text(),(function(E){const a=(c=E,new nn.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(c)),s=xt().get(a,"prop.lockdiscovery.activelock.locktoken.href"),h=xt().get(a,"prop.lockdiscovery.activelock.timeout");var c;if(!s)throw en(p,"No lock token received: ");return{token:s,serverTimeout:h}}))}))})),ho="Infinite, Second-4100000000";function xe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const fo=(function(e){return function(){for(var t=[],n=0;n1&&arguments[1]!==void 0?arguments[1]:{};const n=t.path||"/",i=lt({url:et(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return xe(ut(i,e),(function(u){return ct(e,u),xe(u.text(),(function(l){return xe(Kt(l),(function(d){const p=(function(E){try{const[a]=E.multistatus.response,{propstat:{prop:{"quota-used-bytes":s,"quota-available-bytes":h}}}=a;return s!==void 0&&h!==void 0?{used:parseInt(String(s),10),available:Ir(h)}:null}catch{}return null})(d);return Ut(u,p,t.details)}))}))}))}));function Pe(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const po=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const{details:i=!1}=n,u=lt({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 Pe(ut(u,e),(function(l){return ct(e,l),Pe(l.text(),(function(d){return Pe(Kt(d),(function(p){const E=(function(a,s,h){const c={truncated:!1,results:[]};return c.truncated=a.multistatus.response.some((b=>(b.status||b.propstat?.status).split(" ",3)?.[1]==="507"&&b.href.replace(/\/$/,"").endsWith(tt(s).replace(/\/$/,"")))),a.multistatus.response.forEach((b=>{if(b.propstat===void 0)return;const y=b.href.split("/").map(decodeURIComponent).join("/");c.results.push(Ee(b.propstat.prop,y,h))})),c})(p,t,i);return Ut(l,E,i)}))}))}))})),go=(function(e){return function(){for(var t=[],n=0;n3&&arguments[3]!==void 0?arguments[3]:{};const u=lt({url:et(e.remoteURL,tt(t)),method:"MOVE",headers:{Destination:et(e.remoteURL,tt(n)),Overwrite:i.overwrite===!1?"F":"T"}},e,i);return d=function(p){ct(e,p)},(l=ut(u,e))&&l.then||(l=Promise.resolve(l)),d?l.then(d):l;var l,d}));var mo=W(172);const Eo=(function(e){return function(){for(var t=[],n=0;n3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:u=!0,overwrite:l=!0}=i,d={"Content-Type":"application/octet-stream"};u===!1||(d["Content-Length"]=typeof u=="number"?`${u}`:`${(function(s){if(mr(s))return s.byteLength;if(Er(s))return s.length;if(typeof s=="string")return(0,mo.d)(s);throw new vt({info:{code:Pt.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(n)}`),l||(d["If-None-Match"]="*");const p=lt({url:et(e.remoteURL,tt(t)),method:"PUT",headers:d,data:n},e,i);return a=function(s){try{ct(e,s)}catch(h){const c=h;if(c.status!==412||l)throw c;return!1}return!0},(E=ut(p,e))&&E.then||(E=Promise.resolve(E)),a?E.then(a):E;var E,a})),Or=(function(e){return function(){for(var t=[],n=0;n2&&arguments[2]!==void 0?arguments[2]:{};const i=lt({url:et(e.remoteURL,tt(t)),method:"OPTIONS"},e,n);return l=function(d){try{ct(e,d)}catch(p){throw p}return{compliance:(d.headers.get("DAV")??"").split(",").map((p=>p.trim())),server:d.headers.get("Server")??""}},(u=ut(i,e))&&u.then||(u=Promise.resolve(u)),l?u.then(l):u;var u,l}));function Zt(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const yo=sn((function(e,t,n,i,u){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>i||n<0)throw new vt({info:{code:Pt.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const d={"Content-Type":"application/octet-stream","Content-Length":""+(i-n+1),"Content-Range":`bytes ${n}-${i}/*`},p=lt({url:et(e.remoteURL,tt(t)),method:"PUT",headers:d,data:u},e,l);return Zt(ut(p,e),(function(E){ct(e,E)}))}));function jn(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const bo=sn((function(e,t,n,i,u){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>i||n<0)throw new vt({info:{code:Pt.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const d={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(i-n+1),"X-Update-Range":`bytes=${n}-${i}`},p=lt({url:et(e.remoteURL,tt(t)),method:"PATCH",headers:d,data:u},e,l);return Zt(ut(p,e),(function(E){ct(e,E)}))}));function sn(e){return function(){for(var t=[],n=0;n5&&arguments[5]!==void 0?arguments[5]:{};return Zt(Or(e,t,l),(function(d){let p=!1;return jn((function(){if(d.compliance.includes("sabredav-partialupdate"))return Zt(bo(e,t,n,i,u,l),(function(E){return p=!0,E}))}),(function(E){let a=!1;return p?E:jn((function(){if(d.server.includes("Apache")&&d.compliance.includes(""))return Zt(yo(e,t,n,i,u,l),(function(s){return a=!0,s}))}),(function(s){if(a)return s;throw new vt({info:{code:Pt.NotSupported}},"Not supported")}))}))}))})),wo="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Ao(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:n=null,remoteBasePath:i,contactHref:u=wo,ha1:l,headers:d={},httpAgent:p,httpsAgent:E,password:a,token:s,username:h,withCredentials:c}=t;let b=n;b||(b=h||a?yt.Password:yt.None);const y={authType:b,remoteBasePath:i,contactHref:u,ha1:l,headers:Object.assign({},d),httpAgent:p,httpsAgent:E,password:a,remotePath:li(e),remoteURL:e,token:s,username:h,withCredentials:c};return pr(y,h,a,s,l),{copyFile:(w,T,N)=>Hi(y,w,T,N),createDirectory:(w,T)=>He(y,w,T),createReadStream:(w,T)=>(function(N,f){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const _=new(Un()).PassThrough;return Ji(N,f,v).then((P=>{P.pipe(_)})).catch((P=>{_.emit("error",P)})),_})(y,w,T),createWriteStream:(w,T,N)=>(function(f,v){let _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ki;const C=new(Un()).PassThrough,R={};_.overwrite===!1&&(R["If-None-Match"]="*");const O=lt({url:et(f.remoteURL,tt(v)),method:"PUT",headers:R,data:C,maxRedirects:0},f,_);return ut(O,f).then((I=>ct(f,I))).then((I=>{setTimeout((()=>{P(I)}),0)})).catch((I=>{C.emit("error",I)})),C})(y,w,T,N),customRequest:(w,T)=>to(y,w,T),deleteFile:(w,T)=>eo(y,w,T),exists:(w,T)=>no(y,w,T),getDirectoryContents:(w,T)=>ro(y,w,T),getFileContents:(w,T)=>so(y,w,T),getFileDownloadLink:w=>(function(T,N){let f=et(T.remoteURL,tt(N));const v=/^https:/i.test(f)?"https":"http";switch(T.authType){case yt.None:break;case yt.Password:{const _=In(T.headers.Authorization.replace(/^Basic /i,"").trim());f=f.replace(/^https?:\/\//,`${v}://${_}@`);break}default:throw new vt({info:{code:Pt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${T.authType}`)}return f})(y,w),getFileUploadLink:w=>(function(T,N){let f=`${et(T.remoteURL,tt(N))}?Content-Type=application/octet-stream`;const v=/^https:/i.test(f)?"https":"http";switch(T.authType){case yt.None:break;case yt.Password:{const _=In(T.headers.Authorization.replace(/^Basic /i,"").trim());f=f.replace(/^https?:\/\//,`${v}://${_}@`);break}default:throw new vt({info:{code:Pt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${T.authType}`)}return f})(y,w),getHeaders:()=>Object.assign({},y.headers),getQuota:w=>fo(y,w),lock:(w,T)=>co(y,w,T),moveFile:(w,T,N)=>go(y,w,T,N),putFileContents:(w,T,N)=>Eo(y,w,T,N),partialUpdateFileContents:(w,T,N,f,v)=>vo(y,w,T,N,f,v),getDAVCompliance:w=>Or(y,w),search:(w,T)=>po(y,w,T),setHeaders:w=>{y.headers=Object.assign({},w)},stat:(w,T)=>rn(y,w,T),unlock:(w,T,N)=>lo(y,w,T,N)}}It.hT,It.O4,It.Kd,It.YK,It.UU,It.Gu,It.ky,It.h4,It.ch,It.hq,It.i5,Fr().setApp("@f7cloud/files").detectUser().build();var xr=(e=>(e.Folder="folder",e.File="file",e))(xr||{});function To(){return lr()?`/files/${ti()}`:`/files/${Vr()?.uid}`}To();function Io(){const e=Hr("dav");return lr()?e.replace("remote.php","public.php"):e}Io();var Re={},Le={exports:{}},Mn={},kn;function No(){return kn||(kn=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=s,n.toByteArray=c,n.fromByteArray=w;for(var i=[],u=[],l=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,E=d.length;p0)throw new Error("Invalid string. Length must be a multiple of 4");var _=f.indexOf("=");_===-1&&(_=v);var P=_===v?0:4-_%4;return[_,P]}function s(f){var v=a(f),_=v[0],P=v[1];return(_+P)*3/4-P}function h(f,v,_){return(v+_)*3/4-_}function c(f){var v,_=a(f),P=_[0],C=_[1],R=new l(h(f,P,C)),O=0,I=C>0?P-4:P,U;for(U=0;U>16&255,R[O++]=v>>8&255,R[O++]=v&255;return C===2&&(v=u[f.charCodeAt(U)]<<2|u[f.charCodeAt(U+1)]>>4,R[O++]=v&255),C===1&&(v=u[f.charCodeAt(U)]<<10|u[f.charCodeAt(U+1)]<<4|u[f.charCodeAt(U+2)]>>2,R[O++]=v>>8&255,R[O++]=v&255),R}function b(f){return i[f>>18&63]+i[f>>12&63]+i[f>>6&63]+i[f&63]}function y(f,v,_){for(var P,C=[],R=v;R<_;R+=3)P=(f[R]<<16&16711680)+(f[R+1]<<8&65280)+(f[R+2]&255),C.push(b(P));return C.join("")}function w(f){for(var v,_=f.length,P=_%3,C=[],R=16383,O=0,I=_-P;OI?I:O+R));return P===1?(v=f[_-1],C.push(i[v>>2]+i[v<<4&63]+"==")):P===2&&(v=(f[_-2]<<8)+f[_-1],C.push(i[v>>10]+i[v>>4&63]+i[v<<2&63]+"=")),C.join("")}var T={};T.read=function(f,v,_,P,C){var R,O,I=C*8-P-1,U=(1<>1,S=-7,D=_?C-1:0,F=_?-1:1,G=f[v+D];for(D+=F,R=G&(1<<-S)-1,G>>=-S,S+=I;S>0;R=R*256+f[v+D],D+=F,S-=8);for(O=R&(1<<-S)-1,R>>=-S,S+=P;S>0;O=O*256+f[v+D],D+=F,S-=8);if(R===0)R=1-M;else{if(R===U)return O?NaN:(G?-1:1)*(1/0);O=O+Math.pow(2,P),R=R-M}return(G?-1:1)*O*Math.pow(2,R-P)},T.write=function(f,v,_,P,C,R){var O,I,U,M=R*8-C-1,S=(1<>1,F=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,G=P?0:R-1,X=P?1:-1,V=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(I=isNaN(v)?1:0,O=S):(O=Math.floor(Math.log(v)/Math.LN2),v*(U=Math.pow(2,-O))<1&&(O--,U*=2),O+D>=1?v+=F/U:v+=F*Math.pow(2,1-D),v*U>=2&&(O++,U/=2),O+D>=S?(I=0,O=S):O+D>=1?(I=(v*U-1)*Math.pow(2,C),O=O+D):(I=v*Math.pow(2,D-1)*Math.pow(2,C),O=0));C>=8;f[_+G]=I&255,G+=X,I/=256,C-=8);for(O=O<0;f[_+G]=O&255,G+=X,O/=256,M-=8);f[_+G-X]|=V*128},(function(f){const v=n,_=T,P=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;f.Buffer=S,f.SlowBuffer=jt,f.INSPECT_MAX_BYTES=50;const C=2147483647;f.kMaxLength=C;const{Uint8Array:R,ArrayBuffer:O,SharedArrayBuffer:I}=globalThis;S.TYPED_ARRAY_SUPPORT=U(),!S.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function U(){try{const r=new R(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,R.prototype),Object.setPrototypeOf(r,o),r.foo()===42}catch{return!1}}Object.defineProperty(S.prototype,"parent",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.buffer}}),Object.defineProperty(S.prototype,"offset",{enumerable:!0,get:function(){if(S.isBuffer(this))return this.byteOffset}});function M(r){if(r>C)throw new RangeError('The value "'+r+'" is invalid for option "size"');const o=new R(r);return Object.setPrototypeOf(o,S.prototype),o}function S(r,o,g){if(typeof r=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(r)}return D(r,o,g)}S.poolSize=8192;function D(r,o,g){if(typeof r=="string")return V(r,o);if(O.isView(r))return H(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(St(r,O)||r&&St(r.buffer,O)||typeof I<"u"&&(St(r,I)||r&&St(r.buffer,I)))return st(r,o,g);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=r.valueOf&&r.valueOf();if(x!=null&&x!==r)return S.from(x,o,g);const $=q(r);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return S.from(r[Symbol.toPrimitive]("string"),o,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}S.from=function(r,o,g){return D(r,o,g)},Object.setPrototypeOf(S.prototype,R.prototype),Object.setPrototypeOf(S,R);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,o,g){return F(r),r<=0?M(r):o!==void 0?typeof g=="string"?M(r).fill(o,g):M(r).fill(o):M(r)}S.alloc=function(r,o,g){return G(r,o,g)};function X(r){return F(r),M(r<0?0:Q(r)|0)}S.allocUnsafe=function(r){return X(r)},S.allocUnsafeSlow=function(r){return X(r)};function V(r,o){if((typeof o!="string"||o==="")&&(o="utf8"),!S.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const g=Rt(r,o)|0;let x=M(g);const $=x.write(r,o);return $!==g&&(x=x.slice(0,$)),x}function Z(r){const o=r.length<0?0:Q(r.length)|0,g=M(o);for(let x=0;x=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return r|0}function jt(r){return+r!=r&&(r=0),S.alloc(+r)}S.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==S.prototype},S.compare=function(r,o){if(St(r,R)&&(r=S.from(r,r.offset,r.byteLength)),St(o,R)&&(o=S.from(o,o.offset,o.byteLength)),!S.isBuffer(r)||!S.isBuffer(o))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===o)return 0;let g=r.length,x=o.length;for(let $=0,B=Math.min(g,x);$x.length?(S.isBuffer(B)||(B=S.from(B)),B.copy(x,$)):R.prototype.set.call(x,B,$);else if(S.isBuffer(B))B.copy(x,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=B.length}return x};function Rt(r,o){if(S.isBuffer(r))return r.length;if(O.isView(r)||St(r,O))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const g=r.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&g===0)return 0;let $=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return ve(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return gn(r).length;default:if($)return x?-1:ve(r).length;o=(""+o).toLowerCase(),$=!0}}S.byteLength=Rt;function At(r,o,g){let x=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,o>>>=0,g<=o))return"";for(r||(r="utf8");;)switch(r){case"hex":return te(this,o,g);case"utf8":case"utf-8":return ht(this,o,g);case"ascii":return Ct(this,o,g);case"latin1":case"binary":return ye(this,o,g);case"base64":return gt(this,o,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,o,g);default:if(x)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),x=!0}}S.prototype._isBuffer=!0;function _t(r,o,g){const x=r[o];r[o]=r[g],r[g]=x}S.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let o=0;oo&&(r+=" ... "),""},P&&(S.prototype[P]=S.prototype.inspect),S.prototype.compare=function(r,o,g,x,$){if(St(r,R)&&(r=S.from(r,r.offset,r.byteLength)),!S.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(o===void 0&&(o=0),g===void 0&&(g=r?r.length:0),x===void 0&&(x=0),$===void 0&&($=this.length),o<0||g>r.length||x<0||$>this.length)throw new RangeError("out of range index");if(x>=$&&o>=g)return 0;if(x>=$)return-1;if(o>=g)return 1;if(o>>>=0,g>>>=0,x>>>=0,$>>>=0,this===r)return 0;let B=$-x,k=g-o;const J=Math.min(B,k),ft=this.slice(x,$),K=r.slice(o,g);for(let Y=0;Y2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,we(g)&&(g=$?0:r.length-1),g<0&&(g=r.length+g),g>=r.length){if($)return-1;g=r.length-1}else if(g<0)if($)g=0;else return-1;if(typeof o=="string"&&(o=S.from(o,x)),S.isBuffer(o))return o.length===0?-1:m(r,o,g,x,$);if(typeof o=="number")return o=o&255,typeof R.prototype.indexOf=="function"?$?R.prototype.indexOf.call(r,o,g):R.prototype.lastIndexOf.call(r,o,g):m(r,[o],g,x,$);throw new TypeError("val must be string, number or Buffer")}function m(r,o,g,x,$){let B=1,k=r.length,J=o.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(r.length<2||o.length<2)return-1;B=2,k/=2,J/=2,g/=2}function ft(Y,ot){return B===1?Y[ot]:Y.readUInt16BE(ot*B)}let K;if($){let Y=-1;for(K=g;Kk&&(g=k-J),K=g;K>=0;K--){let Y=!0;for(let ot=0;ot$&&(x=$)):x=$;const B=o.length;x>B/2&&(x=B/2);let k;for(k=0;k>>0,isFinite(g)?(g=g>>>0,x===void 0&&(x="utf8")):(x=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-o;if((g===void 0||g>$)&&(g=$),r.length>0&&(g<0||o<0)||o>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let B=!1;for(;;)switch(x){case"hex":return j(this,r,o,g);case"utf8":case"utf-8":return L(this,r,o,g);case"ascii":case"latin1":case"binary":return z(this,r,o,g);case"base64":return nt(this,r,o,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,r,o,g);default:if(B)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),B=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gt(r,o,g){return o===0&&g===r.length?v.fromByteArray(r):v.fromByteArray(r.slice(o,g))}function ht(r,o,g){g=Math.min(r.length,g);const x=[];let $=o;for(;$239?4:B>223?3:B>191?2:1;if($+J<=g){let ft,K,Y,ot;switch(J){case 1:B<128&&(k=B);break;case 2:ft=r[$+1],(ft&192)===128&&(ot=(B&31)<<6|ft&63,ot>127&&(k=ot));break;case 3:ft=r[$+1],K=r[$+2],(ft&192)===128&&(K&192)===128&&(ot=(B&15)<<12|(ft&63)<<6|K&63,ot>2047&&(ot<55296||ot>57343)&&(k=ot));break;case 4:ft=r[$+1],K=r[$+2],Y=r[$+3],(ft&192)===128&&(K&192)===128&&(Y&192)===128&&(ot=(B&15)<<18|(ft&63)<<12|(K&63)<<6|Y&63,ot>65535&&ot<1114112&&(k=ot))}}k===null?(k=65533,J=1):k>65535&&(k-=65536,x.push(k>>>10&1023|55296),k=56320|k&1023),x.push(k),$+=J}return at(x)}const Ot=4096;function at(r){const o=r.length;if(o<=Ot)return String.fromCharCode.apply(String,r);let g="",x=0;for(;xx)&&(g=x);let $="";for(let B=o;Bg&&(r=g),o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),og)throw new RangeError("Trying to access beyond buffer length")}S.prototype.readUintLE=S.prototype.readUIntLE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r],$=1,B=0;for(;++B>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r+--o],$=1;for(;o>0&&($*=256);)x+=this[r+--o]*$;return x},S.prototype.readUint8=S.prototype.readUInt8=function(r,o){return r=r>>>0,o||it(r,1,this.length),this[r]},S.prototype.readUint16LE=S.prototype.readUInt16LE=function(r,o){return r=r>>>0,o||it(r,2,this.length),this[r]|this[r+1]<<8},S.prototype.readUint16BE=S.prototype.readUInt16BE=function(r,o){return r=r>>>0,o||it(r,2,this.length),this[r]<<8|this[r+1]},S.prototype.readUint32LE=S.prototype.readUInt32LE=function(r,o){return r=r>>>0,o||it(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},S.prototype.readUint32BE=S.prototype.readUInt32BE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},S.prototype.readBigUInt64LE=Lt(function(r){r=r>>>0,kt(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&Xt(r,this.length-8);const x=o+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,$=this[++r]+this[++r]*2**8+this[++r]*2**16+g*2**24;return BigInt(x)+(BigInt($)<>>0,kt(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&Xt(r,this.length-8);const x=o*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],$=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+g;return(BigInt(x)<>>0,o=o>>>0,g||it(r,o,this.length);let x=this[r],$=1,B=0;for(;++B=$&&(x-=Math.pow(2,8*o)),x},S.prototype.readIntBE=function(r,o,g){r=r>>>0,o=o>>>0,g||it(r,o,this.length);let x=o,$=1,B=this[r+--x];for(;x>0&&($*=256);)B+=this[r+--x]*$;return $*=128,B>=$&&(B-=Math.pow(2,8*o)),B},S.prototype.readInt8=function(r,o){return r=r>>>0,o||it(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},S.prototype.readInt16LE=function(r,o){r=r>>>0,o||it(r,2,this.length);const g=this[r]|this[r+1]<<8;return g&32768?g|4294901760:g},S.prototype.readInt16BE=function(r,o){r=r>>>0,o||it(r,2,this.length);const g=this[r+1]|this[r]<<8;return g&32768?g|4294901760:g},S.prototype.readInt32LE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},S.prototype.readInt32BE=function(r,o){return r=r>>>0,o||it(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},S.prototype.readBigInt64LE=Lt(function(r){r=r>>>0,kt(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&Xt(r,this.length-8);const x=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(g<<24);return(BigInt(x)<>>0,kt(r,"offset");const o=this[r],g=this[r+7];(o===void 0||g===void 0)&&Xt(r,this.length-8);const x=(o<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(x)<>>0,o||it(r,4,this.length),_.read(this,r,!0,23,4)},S.prototype.readFloatBE=function(r,o){return r=r>>>0,o||it(r,4,this.length),_.read(this,r,!1,23,4)},S.prototype.readDoubleLE=function(r,o){return r=r>>>0,o||it(r,8,this.length),_.read(this,r,!0,52,8)},S.prototype.readDoubleBE=function(r,o){return r=r>>>0,o||it(r,8,this.length),_.read(this,r,!1,52,8)};function wt(r,o,g,x,$,B){if(!S.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>$||or.length)throw new RangeError("Index out of range")}S.prototype.writeUintLE=S.prototype.writeUIntLE=function(r,o,g,x){if(r=+r,o=o>>>0,g=g>>>0,!x){const k=Math.pow(2,8*g)-1;wt(this,r,o,g,k,0)}let $=1,B=0;for(this[o]=r&255;++B>>0,g=g>>>0,!x){const k=Math.pow(2,8*g)-1;wt(this,r,o,g,k,0)}let $=g-1,B=1;for(this[o+$]=r&255;--$>=0&&(B*=256);)this[o+$]=r/B&255;return o+g},S.prototype.writeUint8=S.prototype.writeUInt8=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,1,255,0),this[o]=r&255,o+1},S.prototype.writeUint16LE=S.prototype.writeUInt16LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,65535,0),this[o]=r&255,this[o+1]=r>>>8,o+2},S.prototype.writeUint16BE=S.prototype.writeUInt16BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,65535,0),this[o]=r>>>8,this[o+1]=r&255,o+2},S.prototype.writeUint32LE=S.prototype.writeUInt32LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,4294967295,0),this[o+3]=r>>>24,this[o+2]=r>>>16,this[o+1]=r>>>8,this[o]=r&255,o+4},S.prototype.writeUint32BE=S.prototype.writeUInt32BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,4294967295,0),this[o]=r>>>24,this[o+1]=r>>>16,this[o+2]=r>>>8,this[o+3]=r&255,o+4};function an(r,o,g,x,$){pn(o,x,$,r,g,7);let B=Number(o&BigInt(4294967295));r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B,B=B>>8,r[g++]=B;let k=Number(o>>BigInt(32)&BigInt(4294967295));return r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,k=k>>8,r[g++]=k,g}function un(r,o,g,x,$){pn(o,x,$,r,g,7);let B=Number(o&BigInt(4294967295));r[g+7]=B,B=B>>8,r[g+6]=B,B=B>>8,r[g+5]=B,B=B>>8,r[g+4]=B;let k=Number(o>>BigInt(32)&BigInt(4294967295));return r[g+3]=k,k=k>>8,r[g+2]=k,k=k>>8,r[g+1]=k,k=k>>8,r[g]=k,g+8}S.prototype.writeBigUInt64LE=Lt(function(r,o=0){return an(this,r,o,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeBigUInt64BE=Lt(function(r,o=0){return un(this,r,o,BigInt(0),BigInt("0xffffffffffffffff"))}),S.prototype.writeIntLE=function(r,o,g,x){if(r=+r,o=o>>>0,!x){const J=Math.pow(2,8*g-1);wt(this,r,o,g,J-1,-J)}let $=0,B=1,k=0;for(this[o]=r&255;++$>0)-k&255;return o+g},S.prototype.writeIntBE=function(r,o,g,x){if(r=+r,o=o>>>0,!x){const J=Math.pow(2,8*g-1);wt(this,r,o,g,J-1,-J)}let $=g-1,B=1,k=0;for(this[o+$]=r&255;--$>=0&&(B*=256);)r<0&&k===0&&this[o+$+1]!==0&&(k=1),this[o+$]=(r/B>>0)-k&255;return o+g},S.prototype.writeInt8=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,1,127,-128),r<0&&(r=255+r+1),this[o]=r&255,o+1},S.prototype.writeInt16LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,32767,-32768),this[o]=r&255,this[o+1]=r>>>8,o+2},S.prototype.writeInt16BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,2,32767,-32768),this[o]=r>>>8,this[o+1]=r&255,o+2},S.prototype.writeInt32LE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,2147483647,-2147483648),this[o]=r&255,this[o+1]=r>>>8,this[o+2]=r>>>16,this[o+3]=r>>>24,o+4},S.prototype.writeInt32BE=function(r,o,g){return r=+r,o=o>>>0,g||wt(this,r,o,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[o]=r>>>24,this[o+1]=r>>>16,this[o+2]=r>>>8,this[o+3]=r&255,o+4},S.prototype.writeBigInt64LE=Lt(function(r,o=0){return an(this,r,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S.prototype.writeBigInt64BE=Lt(function(r,o=0){return un(this,r,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ln(r,o,g,x,$,B){if(g+x>r.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function cn(r,o,g,x,$){return o=+o,g=g>>>0,$||ln(r,o,g,4),_.write(r,o,g,x,23,4),g+4}S.prototype.writeFloatLE=function(r,o,g){return cn(this,r,o,!0,g)},S.prototype.writeFloatBE=function(r,o,g){return cn(this,r,o,!1,g)};function hn(r,o,g,x,$){return o=+o,g=g>>>0,$||ln(r,o,g,8),_.write(r,o,g,x,52,8),g+8}S.prototype.writeDoubleLE=function(r,o,g){return hn(this,r,o,!0,g)},S.prototype.writeDoubleBE=function(r,o,g){return hn(this,r,o,!1,g)},S.prototype.copy=function(r,o,g,x){if(!S.isBuffer(r))throw new TypeError("argument should be a Buffer");if(g||(g=0),!x&&x!==0&&(x=this.length),o>=r.length&&(o=r.length),o||(o=0),x>0&&x=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),r.length-o>>0,g=g===void 0?this.length:g>>>0,r||(r=0);let $;if(typeof r=="number")for($=o;$2**32?$=fn(String(g)):typeof g=="bigint"&&($=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&($=fn($)),$+="n"),x+=` It must be ${o}. Received ${$}`,x},RangeError);function fn(r){let o="",g=r.length;const x=r[0]==="-"?1:0;for(;g>=x+4;g-=3)o=`_${r.slice(g-3,g)}${o}`;return`${r.slice(0,g)}${o}`}function Dr(r,o,g){kt(o,"offset"),(r[o]===void 0||r[o+g]===void 0)&&Xt(o,r.length-(g+1))}function pn(r,o,g,x,$,B){if(r>g||r= 0${k} and < 2${k} ** ${(B+1)*8}${k}`:J=`>= -(2${k} ** ${(B+1)*8-1}${k}) and < 2 ** ${(B+1)*8-1}${k}`,new Mt.ERR_OUT_OF_RANGE("value",J,r)}Dr(x,$,B)}function kt(r,o){if(typeof r!="number")throw new Mt.ERR_INVALID_ARG_TYPE(o,"number",r)}function Xt(r,o,g){throw Math.floor(r)!==r?(kt(r,g),new Mt.ERR_OUT_OF_RANGE("offset","an integer",r)):o<0?new Mt.ERR_BUFFER_OUT_OF_BOUNDS:new Mt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${o}`,r)}const Br=/[^+/0-9A-Za-z-_]/g;function Ur(r){if(r=r.split("=")[0],r=r.trim().replace(Br,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ve(r,o){o=o||1/0;let g;const x=r.length;let $=null;const B=[];for(let k=0;k55295&&g<57344){if(!$){if(g>56319){(o-=3)>-1&&B.push(239,191,189);continue}else if(k+1===x){(o-=3)>-1&&B.push(239,191,189);continue}$=g;continue}if(g<56320){(o-=3)>-1&&B.push(239,191,189),$=g;continue}g=($-55296<<10|g-56320)+65536}else $&&(o-=3)>-1&&B.push(239,191,189);if($=null,g<128){if((o-=1)<0)break;B.push(g)}else if(g<2048){if((o-=2)<0)break;B.push(g>>6|192,g&63|128)}else if(g<65536){if((o-=3)<0)break;B.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((o-=4)<0)break;B.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return B}function jr(r){const o=[];for(let g=0;g>8,$=g%256,B.push($),B.push(x);return B}function gn(r){return v.toByteArray(Ur(r))}function ee(r,o,g,x){let $;for($=0;$=o.length||$>=r.length);++$)o[$+g]=r[$];return $}function St(r,o){return r instanceof o||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===o.name}function we(r){return r!==r}const kr=(function(){const r="0123456789abcdef",o=new Array(256);for(let g=0;g<16;++g){const x=g*16;for(let $=0;$<16;++$)o[x+$]=r[g]+r[$]}return o})();function Lt(r){return typeof BigInt>"u"?Gr:r}function Gr(){throw new Error("BigInt not supported")}})(t);const N=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=N,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(Mn)),Mn}var Gn;function _o(){return Gn||(Gn=1,(function(e,t){var n=No(),i=n.Buffer;function u(d,p){for(var E in d)p[E]=d[E]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(u(n,t),t.Buffer=l);function l(d,p,E){return i(d,p,E)}l.prototype=Object.create(i.prototype),u(i,l),l.from=function(d,p,E){if(typeof d=="number")throw new TypeError("Argument must not be a number");return i(d,p,E)},l.alloc=function(d,p,E){if(typeof d!="number")throw new TypeError("Argument must be a number");var a=i(d);return p!==void 0?typeof E=="string"?a.fill(p,E):a.fill(p):a.fill(0),a},l.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return i(d)},l.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(d)}})(Le,Le.exports)),Le.exports}var Fn;function Co(){if(Fn)return Re;Fn=1;var e=_o().Buffer,t=e.isEncoding||function(N){switch(N=""+N,N&&N.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(N){if(!N)return"utf8";for(var f;;)switch(N){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 N;default:if(f)return;N=(""+N).toLowerCase(),f=!0}}function i(N){var f=n(N);if(typeof f!="string"&&(e.isEncoding===t||!t(N)))throw new Error("Unknown encoding: "+N);return f||N}Re.StringDecoder=u;function u(N){this.encoding=i(N);var f;switch(this.encoding){case"utf16le":this.text=h,this.end=c,f=4;break;case"utf8":this.fillLast=E,f=4;break;case"base64":this.text=b,this.end=y,f=3;break;default:this.write=w,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(f)}u.prototype.write=function(N){if(N.length===0)return"";var f,v;if(this.lastNeed){if(f=this.fillLast(N),f===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v>5===6?2:N>>4===14?3:N>>3===30?4:N>>6===2?-1:-2}function d(N,f,v){var _=f.length-1;if(_=0?(P>0&&(N.lastNeed=P-1),P):--_=0?(P>0&&(N.lastNeed=P-2),P):--_=0?(P>0&&(P===2?P=0:N.lastNeed=P-3),P):0))}function p(N,f,v){if((f[0]&192)!==128)return N.lastNeed=0,"�";if(N.lastNeed>1&&f.length>1){if((f[1]&192)!==128)return N.lastNeed=1,"�";if(N.lastNeed>2&&f.length>2&&(f[2]&192)!==128)return N.lastNeed=2,"�"}}function E(N){var f=this.lastTotal-this.lastNeed,v=p(this,N);if(v!==void 0)return v;if(this.lastNeed<=N.length)return N.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,f,0,N.length),this.lastNeed-=N.length}function a(N,f){var v=d(this,N,f);if(!this.lastNeed)return N.toString("utf8",f);this.lastTotal=v;var _=N.length-(v-this.lastNeed);return N.copy(this.lastChar,0,_),N.toString("utf8",f,_)}function s(N){var f=N&&N.length?this.write(N):"";return this.lastNeed?f+"�":f}function h(N,f){if((N.length-f)%2===0){var v=N.toString("utf16le",f);if(v){var _=v.charCodeAt(v.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",f,N.length-1)}function c(N){var f=N&&N.length?this.write(N):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return f+this.lastChar.toString("utf16le",0,v)}return f}function b(N,f){var v=(N.length-f)%3;return v===0?N.toString("base64",f):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",f,N.length-v))}function y(N){var f=N&&N.length?this.write(N):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function w(N){return N.toString(this.encoding)}function T(N){return N&&N.length?this.write(N):""}return Re}var So=Co();const Oo=Xr(So);var $e={},Vn,Xn;function Pr(){return Xn||(Xn=1,Vn=typeof Yt=="object"&&$e&&$e.NODE_DEBUG&&/\bsemver\b/i.test($e.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Vn}var De,zn;function Rr(){if(zn)return De;zn=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,u=t-6;return De={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:u,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},De}var Be={exports:{}},qn;function xo(){return qn||(qn=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:u}=Rr(),l=Pr();t=e.exports={};const d=t.re=[],p=t.safeRe=[],E=t.src=[],a=t.t={};let s=0;const h="[a-zA-Z0-9-]",c=[["\\s",1],["\\d",u],[h,i]],b=w=>{for(const[T,N]of c)w=w.split(`${T}*`).join(`${T}{0,${N}}`).split(`${T}+`).join(`${T}{1,${N}}`);return w},y=(w,T,N)=>{const f=b(T),v=s++;l(w,v,T),a[w]=v,E[v]=T,d[v]=new RegExp(T,N?"g":void 0),p[v]=new RegExp(f,N?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),y("MAINVERSION",`(${E[a.NUMERICIDENTIFIER]})\\.(${E[a.NUMERICIDENTIFIER]})\\.(${E[a.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${E[a.NUMERICIDENTIFIERLOOSE]})\\.(${E[a.NUMERICIDENTIFIERLOOSE]})\\.(${E[a.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${E[a.NUMERICIDENTIFIER]}|${E[a.NONNUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${E[a.NUMERICIDENTIFIERLOOSE]}|${E[a.NONNUMERICIDENTIFIER]})`),y("PRERELEASE",`(?:-(${E[a.PRERELEASEIDENTIFIER]}(?:\\.${E[a.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${E[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[a.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${h}+`),y("BUILD",`(?:\\+(${E[a.BUILDIDENTIFIER]}(?:\\.${E[a.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${E[a.MAINVERSION]}${E[a.PRERELEASE]}?${E[a.BUILD]}?`),y("FULL",`^${E[a.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${E[a.MAINVERSIONLOOSE]}${E[a.PRERELEASELOOSE]}?${E[a.BUILD]}?`),y("LOOSE",`^${E[a.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${E[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${E[a.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${E[a.XRANGEIDENTIFIER]})(?:\\.(${E[a.XRANGEIDENTIFIER]})(?:\\.(${E[a.XRANGEIDENTIFIER]})(?:${E[a.PRERELEASE]})?${E[a.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${E[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[a.XRANGEIDENTIFIERLOOSE]})(?:${E[a.PRERELEASELOOSE]})?${E[a.BUILD]}?)?)?`),y("XRANGE",`^${E[a.GTLT]}\\s*${E[a.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${E[a.GTLT]}\\s*${E[a.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),y("COERCE",`${E[a.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",E[a.COERCEPLAIN]+`(?:${E[a.PRERELEASE]})?(?:${E[a.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",E[a.COERCE],!0),y("COERCERTLFULL",E[a.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${E[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",y("TILDE",`^${E[a.LONETILDE]}${E[a.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${E[a.LONETILDE]}${E[a.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${E[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",y("CARET",`^${E[a.LONECARET]}${E[a.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${E[a.LONECARET]}${E[a.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${E[a.GTLT]}\\s*(${E[a.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${E[a.GTLT]}\\s*(${E[a.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${E[a.GTLT]}\\s*(${E[a.LOOSEPLAIN]}|${E[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${E[a.XRANGEPLAIN]})\\s+-\\s+(${E[a.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${E[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[a.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Be,Be.exports)),Be.exports}var Ue,Hn;function Po(){if(Hn)return Ue;Hn=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ue=n=>n?typeof n!="object"?e:n:t,Ue}var je,Wn;function Ro(){if(Wn)return je;Wn=1;const e=/^[0-9]+$/,t=(n,i)=>{const u=e.test(n),l=e.test(i);return u&&l&&(n=+n,i=+i),n===i?0:u&&!l?-1:l&&!u?1:nt(i,n)},je}var Me,Yn;function Lr(){if(Yn)return Me;Yn=1;const e=Pr(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Rr(),{safeRe:i,t:u}=xo(),l=Po(),{compareIdentifiers:d}=Ro();class p{constructor(a,s){if(s=l(s),a instanceof p){if(a.loose===!!s.loose&&a.includePrerelease===!!s.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const h=a.trim().match(s.loose?i[u.LOOSE]:i[u.FULL]);if(!h)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+h[1],this.minor=+h[2],this.patch=+h[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");h[4]?this.prerelease=h[4].split(".").map(c=>{if(/^[0-9]+$/.test(c)){const b=+c;if(b>=0&&b=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(s===this.prerelease.join(".")&&h===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(c)}}if(s){let b=[s,c];h===!1&&(b=[s]),d(this.prerelease[0],s)===0?isNaN(this.prerelease[1])&&(this.prerelease=b):this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${a}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Me=p,Me}var ke,Zn;function Lo(){if(Zn)return ke;Zn=1;const e=Lr();return ke=(t,n,i=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(u){if(!i)return null;throw u}},ke}var Ge,Qn;function $o(){if(Qn)return Ge;Qn=1;const e=Lo();return Ge=(t,n)=>{const i=e(t,n);return i?i.version:null},Ge}$o();var Fe,Jn;function Do(){if(Jn)return Fe;Jn=1;const e=Lr();return Fe=(t,n)=>new e(t,n).major,Fe}Do();var Kn={},tr;function Bo(){return tr||(tr=1,(function(e){(function(t){t.parser=function(A,m){return new i(A,m)},t.SAXParser=i,t.SAXStream=s,t.createStream=a,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 i(A,m){if(!(this instanceof i))return new i(A,m);var j=this;l(j),j.q=j.c="",j.bufferCheckPosition=t.MAX_BUFFER_LENGTH,j.opt=m||{},j.opt.lowercase=j.opt.lowercase||j.opt.lowercasetags,j.looseCase=j.opt.lowercase?"toLowerCase":"toUpperCase",j.tags=[],j.closed=j.closedRoot=j.sawRoot=!1,j.tag=j.error=null,j.strict=!!A,j.noscript=!!(A||j.opt.noscript),j.state=I.BEGIN,j.strictEntities=j.opt.strictEntities,j.ENTITIES=j.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),j.attribList=[],j.opt.xmlns&&(j.ns=Object.create(w)),j.opt.unquotedAttributeValues===void 0&&(j.opt.unquotedAttributeValues=!A),j.trackPosition=j.opt.position!==!1,j.trackPosition&&(j.position=j.line=j.column=0),M(j,"onready")}Object.create||(Object.create=function(A){function m(){}m.prototype=A;var j=new m;return j}),Object.keys||(Object.keys=function(A){var m=[];for(var j in A)A.hasOwnProperty(j)&&m.push(j);return m});function u(A){for(var m=Math.max(t.MAX_BUFFER_LENGTH,10),j=0,L=0,z=n.length;Lm)switch(n[L]){case"textNode":D(A);break;case"cdata":S(A,"oncdata",A.cdata),A.cdata="";break;case"script":S(A,"onscript",A.script),A.script="";break;default:G(A,"Max buffer length exceeded: "+n[L])}j=Math.max(j,nt)}var rt=t.MAX_BUFFER_LENGTH-j;A.bufferCheckPosition=rt+A.position}function l(A){for(var m=0,j=n.length;m"||_(A)}function R(A,m){return A.test(m)}function O(A,m){return!R(A,m)}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 m=t.ENTITIES[A],j=typeof m=="number"?String.fromCharCode(m):m;t.ENTITIES[A]=j});for(var U in t.STATE)t.STATE[t.STATE[U]]=U;I=t.STATE;function M(A,m,j){A[m]&&A[m](j)}function S(A,m,j){A.textNode&&D(A),M(A,m,j)}function D(A){A.textNode=F(A.opt,A.textNode),A.textNode&&M(A,"ontext",A.textNode),A.textNode=""}function F(A,m){return A.trim&&(m=m.trim()),A.normalize&&(m=m.replace(/\s+/g," ")),m}function G(A,m){return D(A),A.trackPosition&&(m+=` Line: `+A.line+` Column: `+A.column+` Char: `+A.c),m=new Error(m),A.error=m,M(A,"onerror",m),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"),D(A),A.c="",A.closed=!0,M(A,"onend"),i.call(A,A.strict,A.opt),A}function V(A,m){if(typeof A!="object"||!(A instanceof i))throw new Error("bad call to strictFail");A.strict&&G(A,m)}function Z(A){A.strict||(A.tagName=A.tagName[A.looseCase]());var m=A.tags[A.tags.length-1]||A,j=A.tag={name:A.tagName,attributes:{}};A.opt.xmlns&&(j.ns=m.ns),A.attribList.length=0,S(A,"onopentagstart",j)}function H(A,m){var j=A.indexOf(":"),L=j<0?["",A]:A.split(":"),z=L[0],nt=L[1];return m&&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 m=H(A.attribName,!0),j=m.prefix,L=m.local;if(j==="xmlns")if(L==="xml"&&A.attribValue!==b)V(A,"xml: prefix must be bound to "+b+` Actual: `+A.attribValue);else if(L==="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[L]=A.attribValue}A.attribList.push([A.attribName,A.attribValue])}else A.tag.attributes[A.attribName]=A.attribValue,S(A,"onattribute",{name:A.attribName,value:A.attribValue});A.attribName=A.attribValue=""}function q(A,m){if(A.opt.xmlns){var j=A.tag,L=H(A.tagName);j.prefix=L.prefix,j.local=L.local,j.uri=j.ns[L.prefix]||"",j.prefix&&!j.uri&&(V(A,"Unbound namespace prefix: "+JSON.stringify(A.tagName)),j.uri=L.prefix);var z=A.tags[A.tags.length-1]||A;j.ns&&z.ns!==j.ns&&Object.keys(j.ns).forEach(function(it){S(A,"onopennamespace",{prefix:it,uri:j.ns[it]})});for(var nt=0,rt=A.attribList.length;nt",A.tagName="",A.state=I.SCRIPT;return}S(A,"onscript",A.script),A.script=""}var m=A.tags.length,j=A.tagName;A.strict||(j=j[A.looseCase]());for(var L=j;m--;){var z=A.tags[m];if(z.name!==L)V(A,"Unexpected close tag");else break}if(m<0){V(A,"Unmatched closing tag: "+A.tagName),A.textNode+="",A.state=I.TEXT;return}A.tagName=j;for(var nt=A.tags.length;nt-- >m;){var rt=A.tag=A.tags.pop();A.tagName=A.tag.name,S(A,"onclosetag",A.tagName);var gt={};for(var ht in rt.ns)gt[ht]=rt.ns[ht];var Ot=A.tags[A.tags.length-1]||A;A.opt.xmlns&&rt.ns!==Ot.ns&&Object.keys(rt.ns).forEach(function(at){var Ct=rt.ns[at];S(A,"onclosenamespace",{prefix:at,uri:Ct})})}m===0&&(A.closedRoot=!0),A.tagName=A.attribValue=A.attribName="",A.attribList.length=0,A.state=I.TEXT}function jt(A){var m=A.entity,j=m.toLowerCase(),L,z="";return A.ENTITIES[m]?A.ENTITIES[m]:A.ENTITIES[j]?A.ENTITIES[j]:(m=j,m.charAt(0)==="#"&&(m.charAt(1)==="x"?(m=m.slice(2),L=parseInt(m,16),z=L.toString(16)):(m=m.slice(1),L=parseInt(m,10),z=L.toString(10))),m=m.replace(/^0+/,""),isNaN(L)||z.toLowerCase()!==m?(V(A,"Invalid character entity"),"&"+A.entity+";"):String.fromCodePoint(L))}function Rt(A,m){m==="<"?(A.state=I.OPEN_WAKA,A.startTagPosition=A.position):_(m)||(V(A,"Non-whitespace before first tag."),A.textNode=m,A.state=I.TEXT)}function At(A,m){var j="";return m"?(S(m,"onsgmldeclaration",m.sgmlDecl),m.sgmlDecl="",m.state=I.TEXT):(P(L)&&(m.state=I.SGML_DECL_QUOTED),m.sgmlDecl+=L);continue;case I.SGML_DECL_QUOTED:L===m.q&&(m.state=I.SGML_DECL,m.q=""),m.sgmlDecl+=L;continue;case I.DOCTYPE:L===">"?(m.state=I.TEXT,S(m,"ondoctype",m.doctype),m.doctype=!0):(m.doctype+=L,L==="["?m.state=I.DOCTYPE_DTD:P(L)&&(m.state=I.DOCTYPE_QUOTED,m.q=L));continue;case I.DOCTYPE_QUOTED:m.doctype+=L,L===m.q&&(m.q="",m.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:L==="]"?(m.doctype+=L,m.state=I.DOCTYPE):L==="<"?(m.state=I.OPEN_WAKA,m.startTagPosition=m.position):P(L)?(m.doctype+=L,m.state=I.DOCTYPE_DTD_QUOTED,m.q=L):m.doctype+=L;continue;case I.DOCTYPE_DTD_QUOTED:m.doctype+=L,L===m.q&&(m.state=I.DOCTYPE_DTD,m.q="");continue;case I.COMMENT:L==="-"?m.state=I.COMMENT_ENDING:m.comment+=L;continue;case I.COMMENT_ENDING:L==="-"?(m.state=I.COMMENT_ENDED,m.comment=F(m.opt,m.comment),m.comment&&S(m,"oncomment",m.comment),m.comment=""):(m.comment+="-"+L,m.state=I.COMMENT);continue;case I.COMMENT_ENDED:L!==">"?(V(m,"Malformed comment"),m.comment+="--"+L,m.state=I.COMMENT):m.doctype&&m.doctype!==!0?m.state=I.DOCTYPE_DTD:m.state=I.TEXT;continue;case I.CDATA:L==="]"?m.state=I.CDATA_ENDING:m.cdata+=L;continue;case I.CDATA_ENDING:L==="]"?m.state=I.CDATA_ENDING_2:(m.cdata+="]"+L,m.state=I.CDATA);continue;case I.CDATA_ENDING_2:L===">"?(m.cdata&&S(m,"oncdata",m.cdata),S(m,"onclosecdata"),m.cdata="",m.state=I.TEXT):L==="]"?m.cdata+="]":(m.cdata+="]]"+L,m.state=I.CDATA);continue;case I.PROC_INST:L==="?"?m.state=I.PROC_INST_ENDING:_(L)?m.state=I.PROC_INST_BODY:m.procInstName+=L;continue;case I.PROC_INST_BODY:if(!m.procInstBody&&_(L))continue;L==="?"?m.state=I.PROC_INST_ENDING:m.procInstBody+=L;continue;case I.PROC_INST_ENDING:L===">"?(S(m,"onprocessinginstruction",{name:m.procInstName,body:m.procInstBody}),m.procInstName=m.procInstBody="",m.state=I.TEXT):(m.procInstBody+="?"+L,m.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:R(N,L)?m.tagName+=L:(Z(m),L===">"?q(m):L==="/"?m.state=I.OPEN_TAG_SLASH:(_(L)||V(m,"Invalid character in tag name"),m.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:L===">"?(q(m,!0),Q(m)):(V(m,"Forward-slash in opening tag not followed by >"),m.state=I.ATTRIB);continue;case I.ATTRIB:if(_(L))continue;L===">"?q(m):L==="/"?m.state=I.OPEN_TAG_SLASH:R(T,L)?(m.attribName=L,m.attribValue="",m.state=I.ATTRIB_NAME):V(m,"Invalid attribute name");continue;case I.ATTRIB_NAME:L==="="?m.state=I.ATTRIB_VALUE:L===">"?(V(m,"Attribute without value"),m.attribValue=m.attribName,st(m),q(m)):_(L)?m.state=I.ATTRIB_NAME_SAW_WHITE:R(N,L)?m.attribName+=L:V(m,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(L==="=")m.state=I.ATTRIB_VALUE;else{if(_(L))continue;V(m,"Attribute without value"),m.tag.attributes[m.attribName]="",m.attribValue="",S(m,"onattribute",{name:m.attribName,value:""}),m.attribName="",L===">"?q(m):R(T,L)?(m.attribName=L,m.state=I.ATTRIB_NAME):(V(m,"Invalid attribute name"),m.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(_(L))continue;P(L)?(m.q=L,m.state=I.ATTRIB_VALUE_QUOTED):(m.opt.unquotedAttributeValues||G(m,"Unquoted attribute value"),m.state=I.ATTRIB_VALUE_UNQUOTED,m.attribValue=L);continue;case I.ATTRIB_VALUE_QUOTED:if(L!==m.q){L==="&"?m.state=I.ATTRIB_VALUE_ENTITY_Q:m.attribValue+=L;continue}st(m),m.q="",m.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:_(L)?m.state=I.ATTRIB:L===">"?q(m):L==="/"?m.state=I.OPEN_TAG_SLASH:R(T,L)?(V(m,"No whitespace between attributes"),m.attribName=L,m.attribValue="",m.state=I.ATTRIB_NAME):V(m,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!C(L)){L==="&"?m.state=I.ATTRIB_VALUE_ENTITY_U:m.attribValue+=L;continue}st(m),L===">"?q(m):m.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(m.tagName)L===">"?Q(m):R(N,L)?m.tagName+=L:m.script?(m.script+=""?Q(m):V(m,"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(m.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(L===";"){var ht=jt(m);m.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(ht)?(m.entity="",m.state=rt,m.write(ht)):(m[gt]+=ht,m.entity="",m.state=rt)}else R(m.entity.length?v:f,L)?m.entity+=L:(V(m,"Invalid character in entity name"),m[gt]+="&"+m.entity+L,m.entity="",m.state=rt);continue;default:throw new Error(m,"Unknown state: "+m.state)}return m.position>=m.bufferCheckPosition&&u(m),m}String.fromCodePoint||(function(){var A=String.fromCharCode,m=Math.floor,j=function(){var L=16384,z=[],nt,rt,gt=-1,ht=arguments.length;if(!ht)return"";for(var Ot="";++gt1114111||m(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>L)&&(Ot+=A.apply(null,z),z.length=0)}return Ot};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j})()})(e)})(Kn)),Kn}Bo();var de;(function(e){e[e.User=0]="User",e[e.Group=1]="Group",e[e.Link=3]="Link",e[e.Email=4]="Email",e[e.Remote=6]="Remote",e[e.Team=7]="Team",e[e.Guest=8]="Guest",e[e.RemoteGroup=9]="RemoteGroup",e[e.Room=10]="Room",e[e.Deck=12]="Deck",e[e.FederatedGroup=14]="FederatedGroup",e[e.ScienceMesh=15]="ScienceMesh"})(de||(de={}));function Uo(e){if(!e.id)throw new Error("Sidebar actions must have an id");if(!e.element||!e.element.startsWith("oca_")||!window.customElements.get(e.element))throw new Error("Sidebar actions must provide a registered custom web component identifier");if(typeof e.order!="number")throw new Error("Sidebar actions must have the order property");if(typeof e.enabled!="function")throw new Error('Sidebar actions must implement the "enabled" method');if(window._nc_files_sharing_sidebar_actions??=new Map,window._nc_files_sharing_sidebar_actions.has(e.id))throw new Error(`Sidebar action with id "${e.id}" is already registered`);window._nc_files_sharing_sidebar_actions.set(e.id,e)}const jo={name:"AlertIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Mo=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},ko=[],Go=Jt(jo,Mo,ko,!1,null,null);const er=Go.exports,Fo={name:"AlertDecagramIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Vo=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon alert-decagram-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M13,17H11V15H13V17M13,13H11V7H13V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Xo=[],zo=Jt(Fo,Vo,Xo,!1,null,null);const qo=zo.exports,Ho={name:"CheckboxMarkedCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Wo=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-marked-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},Yo=[],Zo=Jt(Ho,Wo,Yo,!1,null,null);const Qo=Zo.exports,Jo={name:"InformationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ko=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon information-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},ts=[],es=Jt(Jo,Ko,ts,!1,null,null);const ns=es.exports,rs={name:"NcNoteCard",props:{type:{type:String,default:"warning",validator:e=>["success","info","warning","error"].includes(e)},showAlert:{type:Boolean,default:!1},heading:{type:String,default:""},text:{type:String,default:""}},setup(){return{isLegacy32:Wr}},computed:{shouldShowAlert(){return this.showAlert||this.type==="error"},icon(){switch(this.type){case"error":return qo;case"success":return Qo;case"info":return ns;case"warning":return er;default:return er}}}};var is=function(){var e=this,t=e._self._c;return t("div",{staticClass:"notecard",class:{[`notecard--${e.type}`]:e.type,"notecard--legacy":e.isLegacy32},attrs:{role:e.shouldShowAlert?"alert":"note"}},[e._t("icon",function(){return[t(e.icon,{tag:"component",staticClass:"notecard__icon",class:{"notecard__icon--heading":e.heading},attrs:{"fill-color":"var(--note-theme)",size:20}})]}),t("div",[e.heading?t("p",{staticClass:"notecard__heading"},[e._v(" "+e._s(e.heading)+" ")]):e._e(),e._t("default",function(){return[t("p",{staticClass:"notecard__text"},[e._v(" "+e._s(e.text)+" ")])]})],2)],2)},os=[],ss=Jt(rs,is,os,!1,null,"1362be5a");const as=ss.exports;async function us(e){return(await Ye.get(Ze("/apps/files_downloadlimit/api/v1/{token}/limit",{token:e}))).data.ocs.data}async function ls(e,t){return(await Ye.put(Ze("/apps/files_downloadlimit/api/v1/{token}/limit",{token:e}),{limit:t})).data.ocs.data}async function cs(e){return(await Ye.delete(Ze("/apps/files_downloadlimit/api/v1/{token}/limit",{token:e}))).data.ocs.data}const nr=zr("files_downloadlimit","default-download-limit",-1),hs=nr===-1?"":nr,fs=Yr({name:"DownloadLimitEntry",components:{NcCheckboxRadioSwitch:Qr,NcNoteCard:as,NcTextField:Zr},props:{share:{type:Object,required:!0},onSave:{type:Function,required:!0}},data(){return{limitEnabled:!1,initialLimit:null,limit:hs,count:null,loading:!1,hasError:!1}},computed:{remainingCount(){return(this.initialLimit??0)-(this.count??0)},helperText(){return this.limit&&this.limit>0?"":ne("files_downloadlimit","The minimum limit is 1")},isNewShare(){return this.share.id===null||this.share.id===void 0},showRemainingDownloadsNote(){return typeof this.count=="number"},showResetNote(){return!this.isNewShare&&!!this.initialLimit&&typeof this.limit=="number"&&this.limit!==this.initialLimit}},watch:{share:{deep:!0,immediate:!0,async handler(e,t){if(!e?.id||t?.id){Bt.debug("Skip undefined share");return}if(this.onSave(this.save),e.id===t?.id&&this.limit){Bt.debug("Same share given, skip loading download limit",{share:e,oldShare:t});return}Bt.debug("Loading download limit",{share:this.share}),this.loading=!0;try{const{limit:n,count:i}=await us(this.share.token);typeof n=="number"&&typeof i=="number"&&(this.limitEnabled=!!n,this.initialLimit=n,this.limit=n,this.count=i)}catch(n){this.hasError=!0,Bt.error("Failed to load download limit",{error:n,share:this.share})}this.loading=!1}}},methods:{n:qr,t:ne,handleUpdateLimit(e){this.limit=Number(e)},async save(){if(typeof this.limit!="number"||this.limit<=0){Bt.debug("Skip saving invalid limit",{limit:this.limit});return}if(this.isNewShare||this.limit!==this.initialLimit){try{await ls(this.share.token,this.limit)}catch(e){Bt.error("Failed to set the download limit",{error:e,limit:this.limit,share:this.share}),dn(ne("files_downloadlimit","Failed to set download limit"))}return}if(!this.limitEnabled&&this.initialLimit)try{await cs(this.share.token)}catch(e){Bt.error("Failed to remove the download limit",{error:e,share:this.share}),dn(ne("files_downloadlimit","Failed to remove download limit"))}}}}),ps="_action__wrapper_19i6i_1",gs="_action__countNote_19i6i_4",ds="_action__resetNote_19i6i_7",ms={action__wrapper:ps,action__countNote:gs,action__resetNote:ds};var Es=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{class:e.$style.action__wrapper},[t("NcCheckboxRadioSwitch",{attrs:{checked:e.limitEnabled,loading:e.loading,disabled:e.hasError},on:{"update:checked":function(n){e.limitEnabled=n}}},[e._v(" "+e._s(e.t("files_downloadlimit","Limit downloads"))+" ")]),!e.loading&&!e.hasError?[t("NcNoteCard",{directives:[{name:"show",rawName:"v-show",value:e.limitEnabled&&e.showRemainingDownloadsNote,expression:"limitEnabled && showRemainingDownloadsNote"}],class:e.$style.action__countNote,attrs:{type:"info"}},[e._v(" "+e._s(e.n("files_downloadlimit","1 remaining download allowed","{count} remaining downloads allowed",e.remainingCount,{count:e.remainingCount}))+" ")]),t("NcTextField",{directives:[{name:"show",rawName:"v-show",value:e.limitEnabled,expression:"limitEnabled"}],attrs:{label:e.t("files_downloadlimit","Set download limit"),type:"number",min:"1",value:e.limit,"helper-text":e.helperText,error:!!e.helperText},on:{"update:value":e.handleUpdateLimit}}),t("NcNoteCard",{directives:[{name:"show",rawName:"v-show",value:e.limitEnabled&&e.showResetNote,expression:"limitEnabled && showResetNote"}],class:e.$style.action__resetNote,attrs:{type:"warning"}},[e._v(" "+e._s(e.t("files_downloadlimit","Setting a new limit will reset the download count"))+" ")])]:e._e()],2)},ys=[];const rr={$style:ms};function bs(e){for(var t in rr)this[t]=rr[t]}var vs=Jr(fs,Es,ys,!1,bs,null);const ws=vs.exports,As=/-(\w)/g,ir=e=>e.replace(As,(t,n)=>n?n.toUpperCase():""),Ts=/\B([A-Z])/g,Is=e=>e.replace(Ts,"-$1").toLowerCase();function Ns(e){const t={};return e.forEach(n=>{t[n]=void 0}),t}function or(e,t,n){e[t]=[].concat(e[t]||[]),e[t].unshift(n)}function sr(e,t){e&&(e.$options[t]||[]).forEach(n=>{n.call(e)})}function _s(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}const Cs=e=>/function Boolean/.test(String(e)),Ss=e=>/function Number/.test(String(e));function Os(e,t,{type:n}={}){if(Cs(n))return e==="true"||e==="false"?e==="true":e===""||e===t||e!=null?!0:e;if(Ss(n)){const i=parseFloat(e,10);return isNaN(i)?e:i}else return e}function ar(e,t){const n=[];for(let i=0,u=t.length;i(y[w]=b[c[T]],y),{}),or(h,"beforeCreate",function(){const y=this.$emit;this.$emit=(w,...T)=>(this.$root.$options.customElement.dispatchEvent(_s(w,T)),y.call(this,w,...T))}),or(h,"created",function(){l.forEach(y=>{this.$root.props[y]=this[y]})}),l.forEach(y=>{Object.defineProperty(a.prototype,y,{get(){return this._wrapper.props[y]},set(w){this._wrapper.props[y]=w},enumerable:!1,configurable:!0})}),i=!0}function E(s,h){const c=ir(h),b=s.hasAttribute(h)?s.getAttribute(h):void 0;s._wrapper.props[c]=Os(b,h,d[c])}class a extends HTMLElement{constructor(){const h=super();h.attachShadow({mode:"open"});const c=h._wrapper=new e({name:"shadow-root",customElement:h,shadowRoot:h.shadowRoot,data(){return{props:{},slotChildren:[]}},render(b){return b(t,{ref:"inner",props:this.props},this.slotChildren)}});new MutationObserver(b=>{let y=!1;for(let w=0;w{h.props=Ns(l),u.forEach(b=>{E(this,b)})};i?c():t().then(b=>{(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),p(b),c()}),h.slotChildren=Object.freeze(ar(h.$createElement,this.childNodes)),h.$mount(),this.shadowRoot.appendChild(h.$el)}}disconnectedCallback(){sr(this.vueComponent,"deactivated")}}return n||p(t),a}const $r="oca_files_downloadlimit-sharing_action",Ls={id:"files_downloadlimit",element:$r,order:20,enabled(e,t){return e.type!==de.Email&&e.type!==de.Link||!e.token?!1:t.type===xr.File}},Ve=Rs(Kr,ws);Object.defineProperty(Ve.prototype,"attachShadow",{value(){return this}}),Object.defineProperty(Ve.prototype,"shadowRoot",{get(){return this}}),window.customElements.define($r,Ve),Uo(Ls); //# sourceMappingURL=files_downloadlimit-main.mjs.map