@opencloud-eu/web-client 5.1.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +0,0 @@
1
- "use strict";const H=require("./toString-DsGM1XcL.cjs"),Oe=require("./index-D0bnLDAA.cjs");var Se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/;function Le(n,e){if(H.isArray(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||H.isSymbol(n)?!0:Pe.test(n)||!Se.test(n)||e!=null&&n in Object(e)}var ve="Expected a function";function re(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(ve);var t=function(){var s=arguments,r=e?e.apply(this,s):s[0],i=t.cache;if(i.has(r))return i.get(r);var o=n.apply(this,s);return t.cache=i.set(r,o)||i,o};return t.cache=new(re.Cache||H.MapCache),t}re.Cache=H.MapCache;var He=500;function _e(n){var e=re(n,function(s){return t.size===He&&t.clear(),s}),t=e.cache;return e}var me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ke=/\\(\\)?/g,Fe=_e(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(me,function(t,s,r,i){e.push(r?i.replace(ke,"$1"):s||t)}),e});function Ue(n,e){return H.isArray(n)?n:Le(n,e)?[n]:Fe(H.toString(n))}function Me(n){if(typeof n=="string"||H.isSymbol(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function Ve(n,e){e=Ue(e,n);for(var t=0,s=e.length;n!=null&&t<s;)n=n[Me(e[t++])];return t&&t==s?n:void 0}function Be(n,e,t){var s=n==null?void 0:Ve(n,e);return s===void 0?t:s}const pe=(n,e)=>{const t=new URL(n);t.pathname=[...t.pathname.split("/"),"cloud","capabilities"].filter(Boolean).join("/"),t.searchParams.append("format","json");const s=t.href;return{async getCapabilities(){const r=await e.get(s);return Be(r,"data.ocs.data",{capabilities:null,version:null})}}};function Re(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function B(n,e=""){if(!Number.isSafeInteger(n)||n<0){const t=e&&`"${e}" `;throw new Error(`${t}expected integer >= 0, got ${n}`)}}function R(n,e,t=""){const s=Re(n),r=n?.length,i=e!==void 0;if(!s||i&&r!==e){const o=t&&`"${t}" `,a=i?` of length ${e}`:"",c=s?`length=${r}`:`type=${typeof n}`;throw new Error(o+"expected Uint8Array"+a+", got "+c)}return n}function be(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash must wrapped by utils.createHasher");B(n.outputLen),B(n.blockLen)}function Z(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function $e(n,e){R(n,void 0,"digestInto() output");const t=e.outputLen;if(n.length<t)throw new Error('"digestInto() output" expected to be of length >='+t)}function $(...n){for(let e=0;e<n.length;e++)n[e].fill(0)}function W(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Ke(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function oe(n,e=""){return typeof n=="string"?Ke(n):R(n,void 0,e)}function je(n,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options must be object or undefined");return Object.assign(n,e)}function Ge(n,e={}){const t=(r,i)=>n(i).update(r).digest(),s=n(void 0);return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=r=>n(r),Object.assign(t,e),Object.freeze(t)}const Xe=n=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,n])});class Ee{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){if(be(e),R(t,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,r=new Uint8Array(s);r.set(t.length>s?e.create().update(t).digest():t);for(let i=0;i<r.length;i++)r[i]^=54;this.iHash.update(r),this.oHash=e.create();for(let i=0;i<r.length;i++)r[i]^=106;this.oHash.update(r),$(r)}update(e){return Z(this),this.iHash.update(e),this}digestInto(e){Z(this),R(e,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:s,finished:r,destroyed:i,blockLen:o,outputLen:a}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=s._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ye=(n,e,t)=>new Ee(n,e).update(t).digest();ye.create=(n,e)=>new Ee(n,e);function Ye(n,e,t,s){be(n);const r=je({dkLen:32,asyncTick:10},s),{c:i,dkLen:o,asyncTick:a}=r;if(B(i,"c"),B(o,"dkLen"),B(a,"asyncTick"),i<1)throw new Error("iterations (c) must be >= 1");const c=oe(e,"password"),f=oe(t,"salt"),l=new Uint8Array(o),u=ye.create(n,c),d=u._cloneInto().update(f);return{c:i,dkLen:o,asyncTick:a,DK:l,PRF:u,PRFSalt:d}}function We(n,e,t,s,r){return n.destroy(),e.destroy(),s&&s.destroy(),$(r),t}function Ze(n,e,t,s){const{c:r,dkLen:i,DK:o,PRF:a,PRFSalt:c}=Ye(n,e,t,s);let f;const l=new Uint8Array(4),u=W(l),d=new Uint8Array(a.outputLen);for(let w=1,E=0;E<i;w++,E+=a.outputLen){const b=o.subarray(E,E+a.outputLen);u.setInt32(0,w,!1),(f=c._cloneInto(f)).update(l).digestInto(d),b.set(d.subarray(0,b.length));for(let h=1;h<r;h++){a._cloneInto(f).update(d).digestInto(d);for(let y=0;y<b.length;y++)b[y]^=d[y]}}return We(a,c,o,f,d)}class qe{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,s,r){this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=r,this.buffer=new Uint8Array(e),this.view=W(this.buffer)}update(e){Z(this),R(e);const{view:t,buffer:s,blockLen:r}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(r-this.pos,i-o);if(a===r){const c=W(e);for(;r<=i-o;o+=r)this.process(c,o);continue}s.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Z(this),$e(e,this),this.finished=!0;const{buffer:t,view:s,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,$(this.buffer.subarray(o)),this.padOffset>r-o&&(this.process(s,0),o=0);for(let u=o;u<r;u++)t[u]=0;s.setBigUint64(r-8,BigInt(this.length*8),i),this.process(s,0);const a=W(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=c/4,l=this.get();if(f>l.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<f;u++)a.setUint32(4*u,l[u],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const s=e.slice(0,t);return this.destroy(),s}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:s,length:r,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=a,r%t&&e.buffer.set(s),e}clone(){return this._cloneInto()}}const N=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),G=BigInt(2**32-1),ce=BigInt(32);function ze(n,e=!1){return e?{h:Number(n&G),l:Number(n>>ce&G)}:{h:Number(n>>ce&G)|0,l:Number(n&G)|0}}function Je(n,e=!1){const t=n.length;let s=new Uint32Array(t),r=new Uint32Array(t);for(let i=0;i<t;i++){const{h:o,l:a}=ze(n[i],e);[s[i],r[i]]=[o,a]}return[s,r]}const fe=(n,e,t)=>n>>>t,ae=(n,e,t)=>n<<32-t|e>>>t,F=(n,e,t)=>n>>>t|e<<32-t,U=(n,e,t)=>n<<32-t|e>>>t,X=(n,e,t)=>n<<64-t|e>>>t-32,Y=(n,e,t)=>n>>>t-32|e<<64-t;function O(n,e,t,s){const r=(e>>>0)+(s>>>0);return{h:n+t+(r/2**32|0)|0,l:r|0}}const Qe=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),De=(n,e,t,s)=>e+t+s+(n/2**32|0)|0,et=(n,e,t,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(s>>>0),tt=(n,e,t,s,r)=>e+t+s+r+(n/2**32|0)|0,nt=(n,e,t,s,r)=>(n>>>0)+(e>>>0)+(t>>>0)+(s>>>0)+(r>>>0),st=(n,e,t,s,r,i)=>e+t+s+r+i+(n/2**32|0)|0,we=Je(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),rt=we[0],it=we[1],L=new Uint32Array(80),v=new Uint32Array(80);class ot extends qe{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:s,Bl:r,Ch:i,Cl:o,Dh:a,Dl:c,Eh:f,El:l,Fh:u,Fl:d,Gh:w,Gl:E,Hh:b,Hl:h}=this;return[e,t,s,r,i,o,a,c,f,l,u,d,w,E,b,h]}set(e,t,s,r,i,o,a,c,f,l,u,d,w,E,b,h){this.Ah=e|0,this.Al=t|0,this.Bh=s|0,this.Bl=r|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=f|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=w|0,this.Gl=E|0,this.Hh=b|0,this.Hl=h|0}process(e,t){for(let g=0;g<16;g++,t+=4)L[g]=e.getUint32(t),v[g]=e.getUint32(t+=4);for(let g=16;g<80;g++){const S=L[g-15]|0,P=v[g-15]|0,J=F(S,P,1)^F(S,P,8)^fe(S,P,7),Q=U(S,P,1)^U(S,P,8)^ae(S,P,7),x=L[g-2]|0,C=v[g-2]|0,K=F(x,C,19)^X(x,C,61)^fe(x,C,6),D=U(x,C,19)^Y(x,C,61)^ae(x,C,6),j=et(Q,D,v[g-7],v[g-16]),ee=tt(j,J,K,L[g-7],L[g-16]);L[g]=ee|0,v[g]=j|0}let{Ah:s,Al:r,Bh:i,Bl:o,Ch:a,Cl:c,Dh:f,Dl:l,Eh:u,El:d,Fh:w,Fl:E,Gh:b,Gl:h,Hh:y,Hl:A}=this;for(let g=0;g<80;g++){const S=F(u,d,14)^F(u,d,18)^X(u,d,41),P=U(u,d,14)^U(u,d,18)^Y(u,d,41),J=u&w^~u&b,Q=d&E^~d&h,x=nt(A,P,Q,it[g],v[g]),C=st(x,y,S,J,rt[g],L[g]),K=x|0,D=F(s,r,28)^X(s,r,34)^X(s,r,39),j=U(s,r,28)^Y(s,r,34)^Y(s,r,39),ee=s&i^s&a^i&a,Ce=r&o^r&c^o&c;y=b|0,A=h|0,b=w|0,h=E|0,w=u|0,E=d|0,{h:u,l:d}=O(f|0,l|0,C|0,K|0),f=a|0,l=c|0,a=i|0,c=o|0,i=s|0,o=r|0;const ie=Qe(K,j,Ce);s=De(ie,C,D,ee),r=ie|0}({h:s,l:r}=O(this.Ah|0,this.Al|0,s|0,r|0)),{h:i,l:o}=O(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=O(this.Ch|0,this.Cl|0,a|0,c|0),{h:f,l}=O(this.Dh|0,this.Dl|0,f|0,l|0),{h:u,l:d}=O(this.Eh|0,this.El|0,u|0,d|0),{h:w,l:E}=O(this.Fh|0,this.Fl|0,w|0,E|0),{h:b,l:h}=O(this.Gh|0,this.Gl|0,b|0,h|0),{h:y,l:A}=O(this.Hh|0,this.Hl|0,y|0,A|0),this.set(s,r,i,o,a,c,f,l,u,d,w,E,b,h,y,A)}roundClean(){$(L,v)}destroy(){$(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ct extends ot{Ah=N[0]|0;Al=N[1]|0;Bh=N[2]|0;Bl=N[3]|0;Ch=N[4]|0;Cl=N[5]|0;Dh=N[6]|0;Dl=N[7]|0;Eh=N[8]|0;El=N[9]|0;Fh=N[10]|0;Fl=N[11]|0;Gh=N[12]|0;Gl=N[13]|0;Hh=N[14]|0;Hl=N[15]|0;constructor(){super(64)}}const ft=Ge(()=>new ct,Xe(3)),at=(n,e,t,s)=>Oe.Buffer.from(Ze(ft,n,e,{c:t,dkLen:s})),Ne=":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",ut=Ne+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",lt="["+Ne+"]["+ut+"]*",dt=new RegExp("^"+lt+"$");function Te(n,e){const t=[];let s=e.exec(n);for(;s;){const r=[];r.startIndex=e.lastIndex-s[0].length;const i=s.length;for(let o=0;o<i;o++)r.push(s[o]);t.push(r),s=e.exec(n)}return t}const z=function(n){const e=dt.exec(n);return!(e===null||typeof e>"u")};function ht(n){return typeof n<"u"}const gt={allowBooleanAttributes:!1,unpairedTags:[]};function pt(n,e){e=Object.assign({},gt,e);const t=[];let s=!1,r=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let i=0;i<n.length;i++)if(n[i]==="<"&&n[i+1]==="?"){if(i+=2,i=le(n,i),i.err)return i}else if(n[i]==="<"){let o=i;if(i++,n[i]==="!"){i=de(n,i);continue}else{let a=!1;n[i]==="/"&&(a=!0,i++);let c="";for(;i<n.length&&n[i]!==">"&&n[i]!==" "&&n[i]!==" "&&n[i]!==`
2
- `&&n[i]!=="\r";i++)c+=n[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!At(c)){let u;return c.trim().length===0?u="Invalid space after '<'.":u="Tag '"+c+"' is an invalid name.",p("InvalidTag",u,T(n,i))}const f=yt(n,i);if(f===!1)return p("InvalidAttr","Attributes for '"+c+"' have open quote.",T(n,i));let l=f.value;if(i=f.index,l[l.length-1]==="/"){const u=i-l.length;l=l.substring(0,l.length-1);const d=he(l,e);if(d===!0)s=!0;else return p(d.err.code,d.err.msg,T(n,u+d.err.line))}else if(a)if(f.tagClosed){if(l.trim().length>0)return p("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",T(n,o));if(t.length===0)return p("InvalidTag","Closing tag '"+c+"' has not been opened.",T(n,o));{const u=t.pop();if(c!==u.tagName){let d=T(n,u.tagStartPos);return p("InvalidTag","Expected closing tag '"+u.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+c+"'.",T(n,o))}t.length==0&&(r=!0)}}else return p("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",T(n,i));else{const u=he(l,e);if(u!==!0)return p(u.err.code,u.err.msg,T(n,i-l.length+u.err.line));if(r===!0)return p("InvalidXml","Multiple possible root nodes found.",T(n,i));e.unpairedTags.indexOf(c)!==-1||t.push({tagName:c,tagStartPos:o}),s=!0}for(i++;i<n.length;i++)if(n[i]==="<")if(n[i+1]==="!"){i++,i=de(n,i);continue}else if(n[i+1]==="?"){if(i=le(n,++i),i.err)return i}else break;else if(n[i]==="&"){const u=Tt(n,i);if(u==-1)return p("InvalidChar","char '&' is not expected.",T(n,i));i=u}else if(r===!0&&!ue(n[i]))return p("InvalidXml","Extra text at the end",T(n,i));n[i]==="<"&&i--}}else{if(ue(n[i]))continue;return p("InvalidChar","char '"+n[i]+"' is not expected.",T(n,i))}if(s){if(t.length==1)return p("InvalidTag","Unclosed tag '"+t[0].tagName+"'.",T(n,t[0].tagStartPos));if(t.length>0)return p("InvalidXml","Invalid '"+JSON.stringify(t.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return p("InvalidXml","Start tag expected.",1);return!0}function ue(n){return n===" "||n===" "||n===`
3
- `||n==="\r"}function le(n,e){const t=e;for(;e<n.length;e++)if(n[e]=="?"||n[e]==" "){const s=n.substr(t,e-t);if(e>5&&s==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",T(n,e));if(n[e]=="?"&&n[e+1]==">"){e++;break}else continue}return e}function de(n,e){if(n.length>e+5&&n[e+1]==="-"&&n[e+2]==="-"){for(e+=3;e<n.length;e++)if(n[e]==="-"&&n[e+1]==="-"&&n[e+2]===">"){e+=2;break}}else if(n.length>e+8&&n[e+1]==="D"&&n[e+2]==="O"&&n[e+3]==="C"&&n[e+4]==="T"&&n[e+5]==="Y"&&n[e+6]==="P"&&n[e+7]==="E"){let t=1;for(e+=8;e<n.length;e++)if(n[e]==="<")t++;else if(n[e]===">"&&(t--,t===0))break}else if(n.length>e+9&&n[e+1]==="["&&n[e+2]==="C"&&n[e+3]==="D"&&n[e+4]==="A"&&n[e+5]==="T"&&n[e+6]==="A"&&n[e+7]==="["){for(e+=8;e<n.length;e++)if(n[e]==="]"&&n[e+1]==="]"&&n[e+2]===">"){e+=2;break}}return e}const bt='"',Et="'";function yt(n,e){let t="",s="",r=!1;for(;e<n.length;e++){if(n[e]===bt||n[e]===Et)s===""?s=n[e]:s!==n[e]||(s="");else if(n[e]===">"&&s===""){r=!0;break}t+=n[e]}return s!==""?!1:{value:t,index:e,tagClosed:r}}const wt=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function he(n,e){const t=Te(n,wt),s={};for(let r=0;r<t.length;r++){if(t[r][1].length===0)return p("InvalidAttr","Attribute '"+t[r][2]+"' has no space in starting.",M(t[r]));if(t[r][3]!==void 0&&t[r][4]===void 0)return p("InvalidAttr","Attribute '"+t[r][2]+"' is without value.",M(t[r]));if(t[r][3]===void 0&&!e.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+t[r][2]+"' is not allowed.",M(t[r]));const i=t[r][2];if(!It(i))return p("InvalidAttr","Attribute '"+i+"' is an invalid name.",M(t[r]));if(!s.hasOwnProperty(i))s[i]=1;else return p("InvalidAttr","Attribute '"+i+"' is repeated.",M(t[r]))}return!0}function Nt(n,e){let t=/\d/;for(n[e]==="x"&&(e++,t=/[\da-fA-F]/);e<n.length;e++){if(n[e]===";")return e;if(!n[e].match(t))break}return-1}function Tt(n,e){if(e++,n[e]===";")return-1;if(n[e]==="#")return e++,Nt(n,e);let t=0;for(;e<n.length;e++,t++)if(!(n[e].match(/\w/)&&t<20)){if(n[e]===";")break;return-1}return e}function p(n,e,t){return{err:{code:n,msg:e,line:t.line||t,col:t.col}}}function It(n){return z(n)}function At(n){return z(n)}function T(n,e){const t=n.substring(0,e).split(/\r?\n/);return{line:t.length,col:t[t.length-1].length+1}}function M(n){return n.startIndex+n[1].length}const xt={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(n,e){return e},attributeValueProcessor:function(n,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,e,t){return n},captureMetaData:!1},Ct=function(n){return Object.assign({},xt,n)};let q;typeof Symbol!="function"?q="@@xmlMetadata":q=Symbol("XML Node Metadata");class m{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),t!==void 0&&(this.child[this.child.length-1][q]={startIndex:t})}static getMetaDataSymbol(){return q}}class Ot{constructor(e){this.suppressValidationErr=!e}readDocType(e,t){const s={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let r=1,i=!1,o=!1,a="";for(;t<e.length;t++)if(e[t]==="<"&&!o){if(i&&_(e,"!ENTITY",t)){t+=7;let c,f;if([c,f,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),f.indexOf("&")===-1){const l=c.replace(/[.\-+*:]/g,"\\.");s[c]={regx:RegExp(`&${l};`,"g"),val:f}}}else if(i&&_(e,"!ELEMENT",t)){t+=8;const{index:c}=this.readElementExp(e,t+1);t=c}else if(i&&_(e,"!ATTLIST",t))t+=8;else if(i&&_(e,"!NOTATION",t)){t+=9;const{index:c}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=c}else if(_(e,"!--",t))o=!0;else throw new Error("Invalid DOCTYPE");r++,a=""}else if(e[t]===">"){if(o?e[t-1]==="-"&&e[t-2]==="-"&&(o=!1,r--):r--,r===0)break}else e[t]==="["?i=!0:a+=e[t];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:s,i:t}}readEntityExp(e,t){t=I(e,t);let s="";for(;t<e.length&&!/\s/.test(e[t])&&e[t]!=='"'&&e[t]!=="'";)s+=e[t],t++;if(V(s),t=I(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[t]==="%")throw new Error("Parameter entities are not supported")}let r="";return[t,r]=this.readIdentifierVal(e,t,"entity"),t--,[s,r,t]}readNotationExp(e,t){t=I(e,t);let s="";for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;!this.suppressValidationErr&&V(s),t=I(e,t);const r=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&r!=="SYSTEM"&&r!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=I(e,t);let i=null,o=null;if(r==="PUBLIC")[t,i]=this.readIdentifierVal(e,t,"publicIdentifier"),t=I(e,t),(e[t]==='"'||e[t]==="'")&&([t,o]=this.readIdentifierVal(e,t,"systemIdentifier"));else if(r==="SYSTEM"&&([t,o]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:s,publicIdentifier:i,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,s){let r="";const i=e[t];if(i!=='"'&&i!=="'")throw new Error(`Expected quoted string, found "${i}"`);for(t++;t<e.length&&e[t]!==i;)r+=e[t],t++;if(e[t]!==i)throw new Error(`Unterminated ${s} value`);return t++,[t,r]}readElementExp(e,t){t=I(e,t);let s="";for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;if(!this.suppressValidationErr&&!z(s))throw new Error(`Invalid element name: "${s}"`);t=I(e,t);let r="";if(e[t]==="E"&&_(e,"MPTY",t))t+=4;else if(e[t]==="A"&&_(e,"NY",t))t+=2;else if(e[t]==="("){for(t++;t<e.length&&e[t]!==")";)r+=e[t],t++;if(e[t]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:s,contentModel:r.trim(),index:t}}readAttlistExp(e,t){t=I(e,t);let s="";for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;V(s),t=I(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!V(r))throw new Error(`Invalid attribute name: "${r}"`);t=I(e,t);let i="";if(e.substring(t,t+8).toUpperCase()==="NOTATION"){if(i="NOTATION",t+=8,t=I(e,t),e[t]!=="(")throw new Error(`Expected '(', found "${e[t]}"`);t++;let a=[];for(;t<e.length&&e[t]!==")";){let c="";for(;t<e.length&&e[t]!=="|"&&e[t]!==")";)c+=e[t],t++;if(c=c.trim(),!V(c))throw new Error(`Invalid notation name: "${c}"`);a.push(c),e[t]==="|"&&(t++,t=I(e,t))}if(e[t]!==")")throw new Error("Unterminated list of notations");t++,i+=" ("+a.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)i+=e[t],t++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(i.toUpperCase()))throw new Error(`Invalid attribute type: "${i}"`)}t=I(e,t);let o="";return e.substring(t,t+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",t+=8):e.substring(t,t+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",t+=7):[t,o]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:s,attributeName:r,attributeType:i,defaultValue:o,index:t}}}const I=(n,e)=>{for(;e<n.length&&/\s/.test(n[e]);)e++;return e};function _(n,e,t){for(let s=0;s<e.length;s++)if(e[s]!==n[t+s+1])return!1;return!0}function V(n){if(z(n))return n;throw new Error(`Invalid entity name ${n}`)}const St=/^[-+]?0x[a-fA-F0-9]+$/,Pt=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Lt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function vt(n,e={}){if(e=Object.assign({},Lt,e),!n||typeof n!="string")return n;let t=n.trim();if(e.skipLike!==void 0&&e.skipLike.test(t))return n;if(n==="0")return 0;if(e.hex&&St.test(t))return kt(t,16);if(t.includes("e")||t.includes("E"))return _t(n,t,e);{const s=Pt.exec(t);if(s){const r=s[1]||"",i=s[2];let o=mt(s[3]);const a=r?n[i.length+1]===".":n[i.length]===".";if(!e.leadingZeros&&(i.length>1||i.length===1&&!a))return n;{const c=Number(t),f=String(c);if(c===0)return c;if(f.search(/[eE]/)!==-1)return e.eNotation?c:n;if(t.indexOf(".")!==-1)return f==="0"||f===o||f===`${r}${o}`?c:n;let l=i?o:t;return i?l===f||r+l===f?c:n:l===f||l===r+f?c:n}}else return n}}const Ht=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function _t(n,e,t){if(!t.eNotation)return n;const s=e.match(Ht);if(s){let r=s[1]||"";const i=s[3].indexOf("e")===-1?"E":"e",o=s[2],a=r?n[o.length+1]===i:n[o.length]===i;return o.length>1&&a?n:o.length===1&&(s[3].startsWith(`.${i}`)||s[3][0]===i)?Number(e):t.leadingZeros&&!a?(e=(s[1]||"")+s[3],Number(e)):n}else return n}function mt(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function kt(n,e){if(parseInt)return parseInt(n,e);if(Number.parseInt)return Number.parseInt(n,e);if(window&&window.parseInt)return window.parseInt(n,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Ie(n){return typeof n=="function"?n:Array.isArray(n)?e=>{for(const t of n)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}class Ft{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,s)=>ge(s,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,s)=>ge(s,16,"&#x")}},this.addExternalEntities=Ut,this.parseXml=$t,this.parseTextData=Mt,this.resolveNameSpace=Vt,this.buildAttributesMap=Rt,this.isItStopNode=Xt,this.replaceEntitiesValue=jt,this.readStopNodeData=Wt,this.saveTextToParentTag=Gt,this.addChild=Kt,this.ignoreAttributesFn=Ie(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t<this.options.stopNodes.length;t++){const s=this.options.stopNodes[t];typeof s=="string"&&(s.startsWith("*.")?this.stopNodesWildcard.add(s.substring(2)):this.stopNodesExact.add(s))}}}}function Ut(n){const e=Object.keys(n);for(let t=0;t<e.length;t++){const s=e[t],r=s.replace(/[.\-+*:]/g,"\\.");this.lastEntities[s]={regex:new RegExp("&"+r+";","g"),val:n[s]}}}function Mt(n,e,t,s,r,i,o){if(n!==void 0&&(this.options.trimValues&&!s&&(n=n.trim()),n.length>0)){o||(n=this.replaceEntitiesValue(n));const a=this.options.tagValueProcessor(e,n,t,r,i);return a==null?n:typeof a!=typeof n||a!==n?a:this.options.trimValues?se(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?se(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function Vt(n){if(this.options.removeNSPrefix){const e=n.split(":"),t=n.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(n=t+e[1])}return n}const Bt=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Rt(n,e){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const t=Te(n,Bt),s=t.length,r={};for(let i=0;i<s;i++){const o=this.resolveNameSpace(t[i][1]);if(this.ignoreAttributesFn(o,e))continue;let a=t[i][4],c=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(c=this.options.transformAttributeName(c)),c==="__proto__"&&(c="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const f=this.options.attributeValueProcessor(o,a,e);f==null?r[c]=a:typeof f!=typeof a||f!==a?r[c]=f:r[c]=se(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[c]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const i={};return i[this.options.attributesGroupName]=r,i}return r}}const $t=function(n){n=n.replace(/\r\n?/g,`
4
- `);const e=new m("!xml");let t=e,s="",r="";const i=new Ot(this.options.processEntities);for(let o=0;o<n.length;o++)if(n[o]==="<")if(n[o+1]==="/"){const c=k(n,">",o,"Closing Tag is not closed.");let f=n.substring(o+2,c).trim();if(this.options.removeNSPrefix){const d=f.indexOf(":");d!==-1&&(f=f.substr(d+1))}this.options.transformTagName&&(f=this.options.transformTagName(f)),t&&(s=this.saveTextToParentTag(s,t,r));const l=r.substring(r.lastIndexOf(".")+1);if(f&&this.options.unpairedTags.indexOf(f)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${f}>`);let u=0;l&&this.options.unpairedTags.indexOf(l)!==-1?(u=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=r.lastIndexOf("."),r=r.substring(0,u),t=this.tagsNodeStack.pop(),s="",o=c}else if(n[o+1]==="?"){let c=ne(n,o,!1,"?>");if(!c)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,t,r),!(this.options.ignoreDeclaration&&c.tagName==="?xml"||this.options.ignorePiTags)){const f=new m(c.tagName);f.add(this.options.textNodeName,""),c.tagName!==c.tagExp&&c.attrExpPresent&&(f[":@"]=this.buildAttributesMap(c.tagExp,r)),this.addChild(t,f,r,o)}o=c.closeIndex+1}else if(n.substr(o+1,3)==="!--"){const c=k(n,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const f=n.substring(o+4,c-2);s=this.saveTextToParentTag(s,t,r),t.add(this.options.commentPropName,[{[this.options.textNodeName]:f}])}o=c}else if(n.substr(o+1,2)==="!D"){const c=i.readDocType(n,o);this.docTypeEntities=c.entities,o=c.i}else if(n.substr(o+1,2)==="!["){const c=k(n,"]]>",o,"CDATA is not closed.")-2,f=n.substring(o+9,c);s=this.saveTextToParentTag(s,t,r);let l=this.parseTextData(f,t.tagname,r,!0,!1,!0,!0);l==null&&(l=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:f}]):t.add(this.options.textNodeName,l),o=c+2}else{let c=ne(n,o,this.options.removeNSPrefix),f=c.tagName;const l=c.rawTagName;let u=c.tagExp,d=c.attrExpPresent,w=c.closeIndex;if(this.options.transformTagName){const h=this.options.transformTagName(f);u===f&&(u=h),f=h}t&&s&&t.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,t,r,!1));const E=t;E&&this.options.unpairedTags.indexOf(E.tagname)!==-1&&(t=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),f!==e.tagname&&(r+=r?"."+f:f);const b=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,r,f)){let h="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)f[f.length-1]==="/"?(f=f.substr(0,f.length-1),r=r.substr(0,r.length-1),u=f):u=u.substr(0,u.length-1),o=c.closeIndex;else if(this.options.unpairedTags.indexOf(f)!==-1)o=c.closeIndex;else{const A=this.readStopNodeData(n,l,w+1);if(!A)throw new Error(`Unexpected end of ${l}`);o=A.i,h=A.tagContent}const y=new m(f);f!==u&&d&&(y[":@"]=this.buildAttributesMap(u,r)),h&&(h=this.parseTextData(h,f,r,!0,d,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),y.add(this.options.textNodeName,h),this.addChild(t,y,r,b)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if(f[f.length-1]==="/"?(f=f.substr(0,f.length-1),r=r.substr(0,r.length-1),u=f):u=u.substr(0,u.length-1),this.options.transformTagName){const y=this.options.transformTagName(f);u===f&&(u=y),f=y}const h=new m(f);f!==u&&d&&(h[":@"]=this.buildAttributesMap(u,r)),this.addChild(t,h,r,b),r=r.substr(0,r.lastIndexOf("."))}else{const h=new m(f);this.tagsNodeStack.push(t),f!==u&&d&&(h[":@"]=this.buildAttributesMap(u,r)),this.addChild(t,h,r,b),t=h}s="",o=w}}else s+=n[o];return e.child};function Kt(n,e,t,s){this.options.captureMetaData||(s=void 0);const r=this.options.updateTag(e.tagname,t,e[":@"]);r===!1||(typeof r=="string"&&(e.tagname=r),n.addChild(e,s))}const jt=function(n){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];n=n.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];n=n.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];n=n.replace(t.regex,t.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function Gt(n,e,t,s){return n&&(s===void 0&&(s=e.child.length===0),n=this.parseTextData(n,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),n!==void 0&&n!==""&&e.add(this.options.textNodeName,n),n=""),n}function Xt(n,e,t,s){return!!(e&&e.has(s)||n&&n.has(t))}function Yt(n,e,t=">"){let s,r="";for(let i=e;i<n.length;i++){let o=n[i];if(s)o===s&&(s="");else if(o==='"'||o==="'")s=o;else if(o===t[0])if(t[1]){if(n[i+1]===t[1])return{data:r,index:i}}else return{data:r,index:i};else o===" "&&(o=" ");r+=o}}function k(n,e,t,s){const r=n.indexOf(e,t);if(r===-1)throw new Error(s);return r+e.length-1}function ne(n,e,t,s=">"){const r=Yt(n,e+1,s);if(!r)return;let i=r.data;const o=r.index,a=i.search(/\s/);let c=i,f=!0;a!==-1&&(c=i.substring(0,a),i=i.substring(a+1).trimStart());const l=c;if(t){const u=c.indexOf(":");u!==-1&&(c=c.substr(u+1),f=c!==r.data.substr(u+1))}return{tagName:c,tagExp:i,closeIndex:o,attrExpPresent:f,rawTagName:l}}function Wt(n,e,t){const s=t;let r=1;for(;t<n.length;t++)if(n[t]==="<")if(n[t+1]==="/"){const i=k(n,">",t,`${e} is not closed`);if(n.substring(t+2,i).trim()===e&&(r--,r===0))return{tagContent:n.substring(s,t),i};t=i}else if(n[t+1]==="?")t=k(n,"?>",t+1,"StopNode is not closed.");else if(n.substr(t+1,3)==="!--")t=k(n,"-->",t+3,"StopNode is not closed.");else if(n.substr(t+1,2)==="![")t=k(n,"]]>",t,"StopNode is not closed.")-2;else{const i=ne(n,t,">");i&&((i&&i.tagName)===e&&i.tagExp[i.tagExp.length-1]!=="/"&&r++,t=i.closeIndex)}}function se(n,e,t){if(e&&typeof n=="string"){const s=n.trim();return s==="true"?!0:s==="false"?!1:vt(n,t)}else return ht(n)?n:""}function ge(n,e,t){const s=Number.parseInt(n,e);return s>=0&&s<=1114111?String.fromCodePoint(s):t+n+";"}const te=m.getMetaDataSymbol();function Zt(n,e){return Ae(n,e)}function Ae(n,e,t){let s;const r={};for(let i=0;i<n.length;i++){const o=n[i],a=qt(o);let c="";if(t===void 0?c=a:c=t+"."+a,a===e.textNodeName)s===void 0?s=o[a]:s+=""+o[a];else{if(a===void 0)continue;if(o[a]){let f=Ae(o[a],e,c);const l=Jt(f,e);o[te]!==void 0&&(f[te]=o[te]),o[":@"]?zt(f,o[":@"],c,e):Object.keys(f).length===1&&f[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?f=f[e.textNodeName]:Object.keys(f).length===0&&(e.alwaysCreateTextNode?f[e.textNodeName]="":f=""),r[a]!==void 0&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(f)):e.isArray(a,c,l)?r[a]=[f]:r[a]=f}}}return typeof s=="string"?s.length>0&&(r[e.textNodeName]=s):s!==void 0&&(r[e.textNodeName]=s),r}function qt(n){const e=Object.keys(n);for(let t=0;t<e.length;t++){const s=e[t];if(s!==":@")return s}}function zt(n,e,t,s){if(e){const r=Object.keys(e),i=r.length;for(let o=0;o<i;o++){const a=r[o];s.isArray(a,t+"."+a,!0,!0)?n[a]=[e[a]]:n[a]=e[a]}}}function Jt(n,e){const{textNodeName:t}=e,s=Object.keys(n).length;return!!(s===0||s===1&&(n[t]||typeof n[t]=="boolean"||n[t]===0))}class xe{constructor(e){this.externalEntities={},this.options=Ct(e)}parse(e,t){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(t){t===!0&&(t={});const i=pt(e,t);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const s=new Ft(this.options);s.addExternalEntities(this.externalEntities);const r=s.parseXml(e);return this.options.preserveOrder||r===void 0?r:Zt(r,this.options)}addEntity(e,t){if(t.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(t==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return m.getMetaDataSymbol()}}class Qt{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM="sha512";TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:t}){this.axiosClient=e,this.baseURI=t,this.xmlParser=new xe}async signUrl(e,t){const s=new URL(e);s.searchParams.set("OC-Credential",t),s.searchParams.set("OC-Date",new Date().toISOString()),s.searchParams.set("OC-Expires",this.TTL.toString()),s.searchParams.set("OC-Verb","GET");const r=await this.createHashedKey(s.toString());return s.searchParams.set("OC-Algo",`PBKDF2/${this.ITERATION_COUNT}-SHA512`),s.searchParams.set("OC-Signature",r),s.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;const e=await this.axiosClient.get(H.urlJoin(this.baseURI,"ocs/v1.php/cloud/user/signing-key"),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),t=this.xmlParser.parse(e.data);return this.signingKey=t.ocs.data["signing-key"],this.signingKey}async createHashedKey(e){const t=await this.getSignKey();return at(e,t,this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString("hex")}}const Dt=(n,e)=>{const t=new URL(n);t.pathname=[...t.pathname.split("/"),"ocs","v1.php"].filter(Boolean).join("/");const s=t.href,r=pe(s,e),i=new Qt({baseURI:n,axiosClient:e});return{getCapabilities:()=>r.getCapabilities(),signUrl:(o,a)=>i.signUrl(o,a)}};exports.GetCapabilitiesFactory=pe;exports.XMLParser=xe;exports.getIgnoreAttributesFn=Ie;exports.ocs=Dt;
@@ -1,6 +0,0 @@
1
- "use strict";const tt=require("./index-D0bnLDAA.cjs");function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nt={exports:{}},E=nt.exports={},L,D;function ge(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?L=setTimeout:L=ge}catch{L=ge}try{typeof clearTimeout=="function"?D=clearTimeout:D=Se}catch{D=Se}})();function rt(e){if(L===setTimeout)return setTimeout(e,0);if((L===ge||!L)&&setTimeout)return L=setTimeout,setTimeout(e,0);try{return L(e,0)}catch{try{return L.call(null,e,0)}catch{return L.call(this,e,0)}}}function Pt(e){if(D===clearTimeout)return clearTimeout(e);if((D===Se||!D)&&clearTimeout)return D=clearTimeout,clearTimeout(e);try{return D(e)}catch{try{return D.call(null,e)}catch{return D.call(this,e)}}}var B=[],V=!1,M,ie=-1;function Ft(){!V||!M||(V=!1,M.length?B=M.concat(B):ie=-1,B.length&&st())}function st(){if(!V){var e=rt(Ft);V=!0;for(var t=B.length;t;){for(M=B,B=[];++ie<t;)M&&M[ie].run();ie=-1,t=B.length}M=null,V=!1,Pt(e)}}E.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];B.push(new ot(e,t)),B.length===1&&!V&&rt(st)};function ot(e,t){this.fun=e,this.array=t}ot.prototype.run=function(){this.fun.apply(null,this.array)};E.title="browser";E.browser=!0;E.env={};E.argv=[];E.version="";E.versions={};function k(){}E.on=k;E.addListener=k;E.once=k;E.off=k;E.removeListener=k;E.removeAllListeners=k;E.emit=k;E.prependListener=k;E.prependOnceListener=k;E.listeners=function(e){return[]};E.binding=function(e){throw new Error("process.binding is not supported")};E.cwd=function(){return"/"};E.chdir=function(e){throw new Error("process.chdir is not supported")};E.umask=function(){return 0};var Ut=nt.exports;const Oe=Nt(Ut);function it(e,t){return function(){return e.apply(t,arguments)}}const{toString:Lt}=Object.prototype,{getPrototypeOf:_e}=Object,{iterator:fe,toStringTag:at}=Symbol,de=(e=>t=>{const n=Lt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>de(t)===e),pe=e=>t=>typeof t===e,{isArray:K}=Array,W=pe("undefined");function G(e){return e!==null&&!W(e)&&e.constructor!==null&&!W(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ct=U("ArrayBuffer");function Dt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ct(e.buffer),t}const Bt=pe("string"),C=pe("function"),ut=pe("number"),Z=e=>e!==null&&typeof e=="object",kt=e=>e===!0||e===!1,ae=e=>{if(de(e)!=="object")return!1;const t=_e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(at in e)&&!(fe in e)},jt=e=>{if(!Z(e)||G(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},qt=U("Date"),It=U("File"),Ht=U("Blob"),Mt=U("FileList"),$t=e=>Z(e)&&C(e.pipe),vt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||C(e.append)&&((t=de(e))==="formdata"||t==="object"&&C(e.toString)&&e.toString()==="[object FormData]"))},zt=U("URLSearchParams"),[Jt,Vt,Wt,Kt]=["ReadableStream","Request","Response","Headers"].map(U),Xt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Y(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(G(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function lt(e,t){if(G(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:tt.global,ft=e=>!W(e)&&e!==$;function Te(){const{caseless:e,skipUndefined:t}=ft(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&lt(n,o)||o;ae(n[i])&&ae(s)?n[i]=Te(n[i],s):ae(s)?n[i]=Te({},s):K(s)?n[i]=s.slice():(!t||!W(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Y(arguments[s],r);return n}const Qt=(e,t,n,{allOwnKeys:r}={})=>(Y(t,(s,o)=>{n&&C(s)?Object.defineProperty(e,o,{value:it(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Gt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&_e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},en=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},tn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!ut(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_e(Uint8Array)),rn=(e,t)=>{const r=(e&&e[fe]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},sn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},on=U("HTMLFormElement"),an=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cn=U("RegExp"),dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Y(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},un=e=>{dt(e,(t,n)=>{if(C(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(C(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ln=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return K(e)?r(e):r(String(e).split(t)),n},fn=()=>{},dn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function pn(e){return!!(e&&C(e.append)&&e[at]==="FormData"&&e[fe])}const hn=e=>{const t=new Array(10),n=(r,s)=>{if(Z(r)){if(t.indexOf(r)>=0)return;if(G(r))return r;if(!("toJSON"in r)){t[s]=r;const o=K(r)?[]:{};return Y(r,(i,c)=>{const d=n(i,s+1);!W(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},mn=U("AsyncFunction"),yn=e=>e&&(Z(e)||C(e))&&C(e.then)&&C(e.catch),pt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:s,data:o})=>{s===$&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",C($.postMessage)),bn=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof Oe<"u"&&Oe.nextTick||pt,wn=e=>e!=null&&C(e[fe]),a={isArray:K,isArrayBuffer:ct,isBuffer:G,isFormData:vt,isArrayBufferView:Dt,isString:Bt,isNumber:ut,isBoolean:kt,isObject:Z,isPlainObject:ae,isEmptyObject:jt,isReadableStream:Jt,isRequest:Vt,isResponse:Wt,isHeaders:Kt,isUndefined:W,isDate:qt,isFile:It,isBlob:Ht,isRegExp:cn,isFunction:C,isStream:$t,isURLSearchParams:zt,isTypedArray:nn,isFileList:Mt,forEach:Y,merge:Te,extend:Qt,trim:Xt,stripBOM:Gt,inherits:Zt,toFlatObject:Yt,kindOf:de,kindOfTest:U,endsWith:en,toArray:tn,forEachEntry:rn,matchAll:sn,isHTMLForm:on,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:dt,freezeMethods:un,toObjectSet:ln,toCamelCase:an,noop:fn,toFiniteNumber:dn,findKey:lt,global:$,isContextDefined:ft,isSpecCompliantForm:pn,toJSONObject:hn,isAsyncFn:mn,isThenable:yn,setImmediate:pt,asap:bn,isIterable:wn};let y=class ht extends Error{static from(t,n,r,s,o,i){const c=new ht(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";const En=null;function Ae(e){return a.isPlainObject(e)||a.isArray(e)}function mt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function He(e,t,n){return e?e.concat(t).map(function(s,o){return s=mt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Rn(e){return a.isArray(e)&&!e.some(Ae)}const gn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function he(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(l){if(l===null)return"";if(a.isDate(l))return l.toISOString();if(a.isBoolean(l))return l.toString();if(!d&&a.isBlob(l))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(l)||a.isTypedArray(l)?d&&typeof Blob=="function"?new Blob([l]):tt.Buffer.from(l):l}function u(l,m,p){let R=l;if(l&&!p&&typeof l=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),l=JSON.stringify(l);else if(a.isArray(l)&&Rn(l)||(a.isFileList(l)||a.endsWith(m,"[]"))&&(R=a.toArray(l)))return m=mt(m),R.forEach(function(g,T){!(a.isUndefined(g)||g===null)&&t.append(i===!0?He([m],T,o):i===null?m:m+"[]",f(g))}),!1}return Ae(l)?!0:(t.append(He(p,m,o),f(l)),!1)}const h=[],b=Object.assign(gn,{defaultVisitor:u,convertValue:f,isVisitable:Ae});function S(l,m){if(!a.isUndefined(l)){if(h.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(l),a.forEach(l,function(R,_){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(_)?_.trim():_,m,b))===!0&&S(R,m?m.concat(_):[_])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ne(e,t){this._pairs=[],e&&he(e,this,t)}const yt=Ne.prototype;yt.append=function(t,n){this._pairs.push([t,n])};yt.toString=function(t){const n=t?function(r){return t.call(this,r,Me)}:Me;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bt(e,t,n){if(!t)return e;const r=n&&n.encode||Sn,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new Ne(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class $e{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},On=typeof URLSearchParams<"u"?URLSearchParams:Ne,Tn=typeof FormData<"u"?FormData:null,An=typeof Blob<"u"?Blob:null,Cn={isBrowser:!0,classes:{URLSearchParams:On,FormData:Tn,Blob:An},protocols:["http","https","file","blob","url","data"]},Fe=typeof window<"u"&&typeof document<"u",Ce=typeof navigator=="object"&&navigator||void 0,xn=Fe&&(!Ce||["ReactNative","NativeScript","NS"].indexOf(Ce.product)<0),_n=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nn=Fe&&window.location.href||"http://localhost",Pn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fe,hasStandardBrowserEnv:xn,hasStandardBrowserWebWorkerEnv:_n,navigator:Ce,origin:Nn},Symbol.toStringTag,{value:"Module"})),O={...Pn,...Cn};function Fn(e,t){return he(e,new O.classes.URLSearchParams,{visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ln(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function wt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Ln(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Un(r),s,n,0)}),n}return null}function Dn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ee={transitional:Pe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(wt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return he(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Dn(t)):t}],transformResponse:[function(t){const n=this.transitional||ee.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ee.headers[e]={}});const Bn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kn=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ve=Symbol("internals");function Q(e){return e&&String(e).trim().toLowerCase()}function ce(e){return e===!1||e==null?e:a.isArray(e)?e.map(ce):String(e)}function jn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const qn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function we(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function In(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Hn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let x=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,f){const u=Q(d);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=ce(c))}const i=(c,d)=>a.forEach(c,(f,u)=>o(f,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!qn(t))i(kn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[f=u[0]]=(d=c[f])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Q(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return jn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Q(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||we(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Q(i),i){const c=a.findKey(r,i);c&&(!n||we(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||we(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=ce(s),delete n[o];return}const c=t?In(o):String(o).trim();c!==o&&delete n[o],n[c]=ce(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ve]=this[ve]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=Q(i);r[c]||(Hn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(x);function Ee(e,t){const n=this||ee,r=t||n,s=x.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Et(e){return!!(e&&e.__CANCEL__)}let te=class extends y{constructor(t,n,r){super(t??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Rt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Mn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $n(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),u=r[o];i||(i=f),n[s]=d,r[s]=f;let h=o,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i<t)return;const S=u&&f-u;return S?Math.round(b*1e3/S):void 0}}function vn(e,t){let n=0,r=1e3/t,s,o;const i=(f,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),h=u-n;h>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const le=(e,t,n=3)=>{let r=0;const s=$n(50,250);return vn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-r,f=s(d),u=i<=c;r=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&u?(c-i)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},ze=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Je=e=>(...t)=>a.asap(()=>e(...t)),zn=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Jn=O.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gt(e,t,n){let r=!Vn(t);return e&&(r||n==!1)?Wn(e,t):t}const Ve=e=>e instanceof x?{...e}:e;function z(e,t){t=t||{};const n={};function r(f,u,h,b){return a.isPlainObject(f)&&a.isPlainObject(u)?a.merge.call({caseless:b},f,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(f,u,h,b){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,u,h,b)}function o(f,u){if(!a.isUndefined(u))return r(void 0,u)}function i(f,u){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,h){if(h in t)return r(f,u);if(h in e)return r(void 0,f)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(f,u,h)=>s(Ve(f),Ve(u),h,!0)};return a.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=a.hasOwnProp(d,u)?d[u]:s,b=h(e[u],t[u],u);a.isUndefined(b)&&h!==c||(n[u]=b)}),n}const St=e=>{const t=z({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=x.from(i),t.url=bt(gt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([u,h])=>{f.includes(u.toLowerCase())&&i.set(u,h)})}}if(O.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&zn(t.url))){const d=s&&o&&Jn.read(o);d&&i.set(s,d)}return t},Kn=typeof XMLHttpRequest<"u",Xn=Kn&&function(e){return new Promise(function(n,r){const s=St(e);let o=s.data;const i=x.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,u,h,b,S,l;function m(){S&&S(),l&&l(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function R(){if(!p)return;const g=x.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),F={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};Rt(function(N){n(N),m()},function(N){r(N),m()},F),p=null}"onloadend"in p?p.onloadend=R:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(R)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(T){const F=T&&T.message?T.message:"Network Error",I=new y(F,y.ERR_NETWORK,e,p);I.event=T||null,r(I),p=null},p.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||Pe;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new y(T,F.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(T,F){p.setRequestHeader(F,T)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),f&&([b,l]=le(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([h,S]=le(d),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(u=g=>{p&&(r(!g||g.type?new te(null,e,p):g),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const _=Mn(s.url);if(_&&O.protocols.indexOf(_)===-1){r(new y("Unsupported protocol "+_+":",y.ERR_BAD_REQUEST,e));return}p.send(o||null)})},Qn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,c();const u=f instanceof Error?f:this.reason;r.abort(u instanceof y?u:new te(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new y(`timeout of ${t}ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Gn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Zn=async function*(e,t){for await(const n of Yn(e))yield*Gn(n,t)},Yn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},We=(e,t,n,r)=>{const s=Zn(e,t);let o=0,i,c=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:u}=await s.next();if(f){c(),d.close();return}let h=u.byteLength;if(n){let b=o+=h;n(b)}d.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Ke=64*1024,{isFunction:oe}=a,er=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Xe,TextEncoder:Qe}=a.global,Ge=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tr=e=>{e=a.merge.call({skipUndefined:!0},er,e);const{fetch:t,Request:n,Response:r}=e,s=t?oe(t):typeof fetch=="function",o=oe(n),i=oe(r);if(!s)return!1;const c=s&&oe(Xe),d=s&&(typeof Qe=="function"?(l=>m=>l.encode(m))(new Qe):async l=>new Uint8Array(await new n(l).arrayBuffer())),f=o&&c&&Ge(()=>{let l=!1;const m=new n(O.origin,{body:new Xe,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!m}),u=i&&c&&Ge(()=>a.isReadableStream(new r("").body)),h={stream:u&&(l=>l.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!h[l]&&(h[l]=(m,p)=>{let R=m&&m[l];if(R)return R.call(m);throw new y(`Response type '${l}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const b=async l=>{if(l==null)return 0;if(a.isBlob(l))return l.size;if(a.isSpecCompliantForm(l))return(await new n(O.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(a.isArrayBufferView(l)||a.isArrayBuffer(l))return l.byteLength;if(a.isURLSearchParams(l)&&(l=l+""),a.isString(l))return(await d(l)).byteLength},S=async(l,m)=>{const p=a.toFiniteNumber(l.getContentLength());return p??b(m)};return async l=>{let{url:m,method:p,data:R,signal:_,cancelToken:g,timeout:T,onDownloadProgress:F,onUploadProgress:I,responseType:N,headers:ye,withCredentials:ne="same-origin",fetchOptions:Le}=St(l),De=t||fetch;N=N?(N+"").toLowerCase():"text";let re=Qn([_,g&&g.toAbortSignal()],T),X=null;const H=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let Be;try{if(I&&f&&p!=="get"&&p!=="head"&&(Be=await S(ye,R))!==0){let q=new n(m,{method:"POST",body:R,duplex:"half"}),J;if(a.isFormData(R)&&(J=q.headers.get("content-type"))&&ye.setContentType(J),q.body){const[be,se]=ze(Be,le(Je(I)));R=We(q.body,Ke,be,se)}}a.isString(ne)||(ne=ne?"include":"omit");const A=o&&"credentials"in n.prototype,ke={...Le,signal:re,method:p.toUpperCase(),headers:ye.normalize().toJSON(),body:R,duplex:"half",credentials:A?ne:void 0};X=o&&new n(m,ke);let j=await(o?De(X,Le):De(m,ke));const je=u&&(N==="stream"||N==="response");if(u&&(F||je&&H)){const q={};["status","statusText","headers"].forEach(qe=>{q[qe]=j[qe]});const J=a.toFiniteNumber(j.headers.get("content-length")),[be,se]=F&&ze(J,le(Je(F),!0))||[];j=new r(We(j.body,Ke,be,()=>{se&&se(),H&&H()}),q)}N=N||"text";let _t=await h[a.findKey(h,N)||"text"](j,l);return!je&&H&&H(),await new Promise((q,J)=>{Rt(q,J,{data:_t,headers:x.from(j.headers),status:j.status,statusText:j.statusText,config:l,request:X})})}catch(A){throw H&&H(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,l,X,A&&A.response),{cause:A.cause||A}):y.from(A,A&&A.code,l,X,A&&A.response)}}},nr=new Map,Ot=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,d,f,u=nr;for(;c--;)d=o[c],f=u.get(d),f===void 0&&u.set(d,f=c?new Map:tr(t)),u=f;return f};Ot();const Ue={http:En,xhr:Xn,fetch:{get:Ot}};a.forEach(Ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ze=e=>`- ${e}`,rr=e=>a.isFunction(e)||e===null||e===!1;function sr(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let c;if(s=r,!rr(r)&&(s=Ue[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since :
4
- `+i.map(Ze).join(`
5
- `):" "+Ze(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Tt={getAdapter:sr,adapters:Ue};function Re(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new te(null,e)}function Ye(e){return Re(e),e.headers=x.from(e.headers),e.data=Ee.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tt.getAdapter(e.adapter||ee.adapter,e)(e).then(function(r){return Re(e),r.data=Ee.call(e,e.transformResponse,r),r.headers=x.from(r.headers),r},function(r){return Et(r)||(Re(e),r&&r.response&&(r.response.data=Ee.call(e,e.transformResponse,r.response),r.response.headers=x.from(r.response.headers))),Promise.reject(r)})}const At="1.13.5",me={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{me[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const et={};me.transitional=function(t,n,r){function s(o,i){return"[Axios v"+At+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!et[i]&&(et[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};me.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function or(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new y("option "+o+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const ue={assertOptions:or,validators:me},P=ue.validators;let v=class{constructor(t){this.defaults=t||{},this.interceptors={request:new $e,response:new $e}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=z(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ue.assertOptions(r,{silentJSONParsing:P.transitional(P.boolean),forcedJSONParsing:P.transitional(P.boolean),clarifyTimeoutError:P.transitional(P.boolean),legacyInterceptorReqResOrdering:P.transitional(P.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ue.assertOptions(s,{encode:P.function,serialize:P.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ue.assertOptions(n,{baseUrl:P.spelling("baseURL"),withXsrfToken:P.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],l=>{delete o[l]}),n.headers=x.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;d=d&&m.synchronous;const p=n.transitional||Pe;p&&p.legacyInterceptorReqResOrdering?c.unshift(m.fulfilled,m.rejected):c.push(m.fulfilled,m.rejected)});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,h=0,b;if(!d){const l=[Ye.bind(this),void 0];for(l.unshift(...c),l.push(...f),b=l.length,u=Promise.resolve(n);h<b;)u=u.then(l[h++],l[h++]);return u}b=c.length;let S=n;for(;h<b;){const l=c[h++],m=c[h++];try{S=l(S)}catch(p){m.call(this,p);break}}try{u=Ye.call(this,S)}catch(l){return Promise.reject(l)}for(h=0,b=f.length;h<b;)u=u.then(f[h++],f[h++]);return u}getUri(t){t=z(this.defaults,t);const n=gt(t.baseURL,t.url,t.allowAbsoluteUrls);return bt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){v.prototype[t]=function(n,r){return this.request(z(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(z(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}v.prototype[t]=n(),v.prototype[t+"Form"]=n(!0)});let ir=class Ct{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new te(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ct(function(s){t=s}),cancel:t}}};function ar(e){return function(n){return e.apply(null,n)}}function cr(e){return a.isObject(e)&&e.isAxiosError===!0}const xe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xe).forEach(([e,t])=>{xe[t]=e});function xt(e){const t=new v(e),n=it(v.prototype.request,t);return a.extend(n,v.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return xt(z(e,s))},n}const w=xt(ee);w.Axios=v;w.CanceledError=te;w.CancelToken=ir;w.isCancel=Et;w.VERSION=At;w.toFormData=he;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=ar;w.isAxiosError=cr;w.mergeConfig=z;w.AxiosHeaders=x;w.formToJSON=e=>wt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=Tt.getAdapter;w.HttpStatusCode=xe;w.default=w;const{Axios:dr,AxiosError:pr,CanceledError:hr,isCancel:mr,CancelToken:yr,VERSION:br,all:wr,Cancel:Er,isAxiosError:Rr,spread:gr,toFormData:Sr,AxiosHeaders:Or,HttpStatusCode:Tr,formToJSON:Ar,getAdapter:Cr,mergeConfig:xr}=w;exports.axios=w;exports.process$1=Oe;