consti=r(24605);t.u8=e=>newUint8Array(e.buffer,e.byteOffset,e.byteLength);t.u16=e=>newUint16Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/2));t.u32=e=>newUint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(t.createView=e=>newDataView(e.buffer,e.byteOffset,e.byteLength),t.isLE=68===newUint8Array(newUint32Array([287454020]).buffer)[0],!t.isLE)thrownewError("Non little-endian hardware is not supported");constn=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));functiono(e){(0,i.bytes)(e);lett="";for(letr=0;r<e.length;r++)t+=n[e[r]];returnt}t.bytesToHex=o;consts=48,a=57,l=65,d=70,c=97,u=102;functionp(e){returne>=s&&e<=a?e-s:e>=l&&e<=d?e-(l-10):e>=c&&e<=u?e-(c-10):void0}functionh(e){if("string"!=typeofe)thrownewError("hex string expected, got "+typeofe);constt=e.length,r=t/2;if(t%2)thrownewError("padded hex string expected, got unpadded hex of length "+t);consti=newUint8Array(r);for(lett=0,n=0;t<r;t++,n+=2){constr=p(e.charCodeAt(n)),o=p(e.charCodeAt(n+1));if(void0===r||void0===o){constt=e[n]+e[n+1];thrownewError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}returni}functionf(e){if("string"!=typeofe)thrownewError("hex string expected, got "+typeofe);returnBigInt(""===e?"0":`0x${e}`)}t.hexToBytes=h,t.hexToNumber=f,t.bytesToNumberBE=function(e){returnf(o(e))},t.numberToBytesBE=function(e,t){returnh(e.toString(16).padStart(2*t,"0"))};functionm(e){if("string"!=typeofe)thrownewError("string expected, got "+typeofe);returnnewUint8Array((newTextEncoder).encode(e))}t.nextTick=async()=>{},t.asyncLoop=asyncfunction(e,r,i){letn=Date.now();for(leto=0;o<e;o++){i(o);conste=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=m,t.bytesToUtf8=function(e){return(newTextDecoder).decode(e)},t.toBytes=function(e){if("string"==typeofe)e=m(e);else{if(!(0,i.isBytes)(e))thrownewError("Uint8Array expected, got "+typeofe);e=e.slice()}returne},t.concatBytes=function(...e){lett=0;for(letr=0;r<e.length;r++){constn=e[r];(0,i.bytes)(n),t+=n.length}constr=newUint8Array(t);for(lett=0,i=0;t<e.length;t++){constn=e[t];r.set(n,i),i+=n.length}returnr},t.checkOpts=function(e,t){if(null==t||"object"!=typeoft)thrownewError("options must be defined");returnObject.assign(e,t)},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;letr=0;for(leti=0;i<e.length;i++)r|=e[i]^t[i];return0===r};t.Hash=class{};functiong(e,t,r,i){if("function"==typeofe.setBigUint64)returne.setBigUint64(t,r,i);constn=BigInt(32),o=BigInt(4294967295),s=Number(r>>n&o),a=Number(r&o),l=i?4:0,d=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+d,a,i)}t.wrapCipher=(e,t)=>(Object.assign(t,e),t),t.setBigUint64=g,t.u64Lengths=function(e,r){consti=newUint8Array(16),n=(0,t.createView)(i);returng(n,0,BigInt(r?r.length:0),!0),g(n,8,BigInt(e.length),!0),i}},68489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gcm=t.ctr=t.cbc=t.utils=t.managedNonce=t.getWebcryptoSubtle=t.randomBytes=void0;consti=r(25297);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){returni.randomBytes}}),Object.defineProperty(t,"getWebcryptoSubtle",{enumerable:!0,get:function(){returni.getWebcryptoSubtle}});constn=r(36527),o=r(24605);t.managedNonce=function(e){return(0,o.number)(e.nonceLength),(t,...r)=>({encrypt:(o,...s)=>{const{nonceLength:a}=e,l=(0,i.randomBytes)(a),d=e(t,l,...r).encrypt(o,...s),c=(0,n.concatBytes)(l,d);returnd.fill(0),c},decrypt:(i,...n)=>{const{nonceLength:o}=e,s=i.subarray(0,o),a=i.subarray(o);returne(t,s,...r).decrypt(a,...n)}})},t.utils={asyncencrypt(e,t,r,n){consto=(0,i.getWebcryptoSubtle)(),s=awaito.importKey("raw",e,t,!0,["encrypt"]),a=awaito.encrypt(r,s,n);returnnewUint8Array(a)},asyncdecrypt(e,t,r,n){consto=(0,i.getWebcryptoSubtle)(),s=awaito.importKey("raw",e,t,!0,["decrypt"]),a=awaito.decrypt(r,s,n);returnnewUint8Array(a)}};consts="AES-CBC",a="AES-CTR",l="AES-GCM";functiond(e){return(r,i,n)=>{(0,o.bytes)(r),(0,o.bytes)(i);constd={name:e,length:8*r.length},c=function(e,t,r){if(e===s)r
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=void0,t.isBytes=function(e){returneinstanceofUint8Array||null!=e&&"object"==typeofe&&"Uint8Array"===e.constructor.name},t.byteSwap32=function(e){for(letr=0;r<e.length;r++)e[r]=(0,t.byteSwap)(e[r])},t.bytesToHex=function(e){(0,n.bytes)(e);lett="";for(letr=0;r<e.length;r++)t+=o[e[r]];returnt},t.hexToBytes=function(e){if("string"!=typeofe)thrownewError("hex string expected, got "+typeofe);constt=e.length,r=t/2;if(t%2)thrownewError("padded hex string expected, got unpadded hex of length "+t);consti=newUint8Array(r);for(lett=0,n=0;t<r;t++,n+=2){constr=a(e.charCodeAt(n)),o=a(e.charCodeAt(n+1));if(void0===r||void0===o){constt=e[n]+e[n+1];thrownewError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}returni},t.asyncLoop=asyncfunction(e,r,i){letn=Date.now();for(leto=0;o<e;o++){i(o);conste=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=l,t.toBytes=d,t.concatBytes=function(...e){lett=0;for(letr=0;r<e.length;r++){consti=e[r];(0,n.bytes)(i),t+=i.length}constr=newUint8Array(t);for(lett=0,i=0;t<e.length;t++){constn=e[t];r.set(n,i),i+=n.length}returnr},t.checkOpts=function(e,t){if(void0!==t&&"[object Object]"!==c.call(t))thrownewError("Options should be object or undefined");returnObject.assign(e,t)},t.wrapConstructor=function(e){constt=t=>e().update(d(t)).digest(),r=e();returnt.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){constt=(t,r)=>e(r).update(d(t)).digest(),r=e({});returnt.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){constt=(t,r)=>e(r).update(d(t)).digest(),r=e({});returnt.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(i.crypto&&"function"==typeofi.crypto.getRandomValues)returni.crypto.getRandomValues(newUint8Array(e));if(i.crypto&&"function"==typeofi.crypto.randomBytes)returni.crypto.randomBytes(e);thrownewError("crypto.getRandomValues must be defined")};consti=r(25145),n=r(67557);t.u8=e=>newUint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>newUint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>newDataView(e.buffer,e.byteOffset,e.byteLength);t.rotr=(e,t)=>e<<32-t|e>>>t;t.rotl=(e,t)=>e<<t|e>>>32-t>>>0,t.isLE=68===newUint8Array(newUint32Array([287454020]).buffer)[0];t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e);consto=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));consts={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};functiona(e){returne>=s._0&&e<=s._9?e-s._0:e>=s._A&&e<=s._F?e-(s._A-10):e>=s._a&&e<=s._f?e-(s._a-10):void0}functionl(e){if("string"!=typeofe)thrownewError("utf8ToBytes expected string, got "+typeofe);returnnewUint8Array((newTextEncoder).encode(e))}functiond(e){return"string"==typeofe&&(e=l(e)),(0,n.bytes)(e),e}t.nextTick=async()=>{};t.Hash=class{clone(){returnthis._cloneInto()}};constc={}.toString},87568:(e,t,r)=>{vari=t;i.bignum=r(72344),i.define=r(47363).define,i.base=r(9673),i.constants=r(22153),i.decoders=r(22853),i.encoders=r(24669)},47363:(e,t,r)=>{vari=r(87568),n=r(56698);functiono(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){returnnewo(e,t)},o.prototype._createNamed=function(e){vart;try{t=r(18950).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}returnn(t,e),t.prototype._initNamed=function(t){e.call(this,t)},newt(this)},o.prototype._getDecoder=function(e){returne=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){returnthis._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function
t.read=function(e,t,r,i,n){varo,s,a=8*n-i-1,l=(1<<a)-1,d=l>>1,c=-7,u=r?n-1:0,p=r?-1:1,h=e[t+u];for(u+=p,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+u],u+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+e[t+u],u+=p,c-=8);if(0===o)o=1-d;else{if(o===l)returns?NaN:1/0*(h?-1:1);s+=Math.pow(2,i),o-=d}return(h?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,r,i,n,o){vars,a,l,d=8*o-n-1,c=(1<<d)-1,u=c>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=c?(a=0,s=c):s+u>=1?(a=(t*l-1)*Math.pow(2,n),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=255&a,h+=f,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+h]=255&s,h+=f,s/=256,d-=8);e[r+h-f]|=128*m}},56698:e=>{"function"==typeofObject.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;varr=function(){};r.prototype=t.prototype,e.prototype=newr,e.prototype.constructor=e}}},20311:e=>{"use strict";e.exports=function(e,t,r,i,n,o,s,a){if(!e){varl;if(void0===t)l=newError("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{vard=[r,i,n,o,s,a],c=0;(l=newError(t.replace(/%s/g,(function(){returnd[c++]})))).name="Invariant Violation"}throwl.framesToPop=1,l}}},47244:(e,t,r)=>{"use strict";vari=r(49092)(),n=r(38075)("Object.prototype.toString"),o=function(e){return!(i&&e&&"object"==typeofe&&Symbol.toStringTagine)&&"[object Arguments]"===n(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeofe&&"number"==typeofe.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},a=function(){returno(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},69600:e=>{"use strict";vart,r,i=Function.prototype.toString,n="object"==typeofReflect&&null!==Reflect&&Reflect.apply;if("function"==typeofn&&"function"==typeofObject.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throwr}}),r={},n((function(){throw42}),null,t)}catch(e){e!==r&&(n=null)}elsen=null;varo=/^\s*class\b/,s=function(e){try{vart=i.call(e);returno.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(i.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,d="function"==typeofSymbol&&!!Symbol.toStringTag,c=!(0in[,]),u=function(){return!1};if("object"==typeofdocument){varp=document.all;l.call(p)===l.call(document.all)&&(u=function(e){if((c||!e)&&(void0===e||"object"==typeofe))try{vart=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=n?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeofe&&"object"!=typeofe)return!1;try{n(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeofe&&"object"!=typeofe)return!1;if(d)returna(e);if(s(e))return!1;vart=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},48184:(e,t,r)=>{"use strict";vari,n=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(49092)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeofe)return!1;if(s.test(o.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===n.call(e);if(!l)return!1;if(void0===i){vart=function(){if(!a)return!1;try{returnFunction("return function*() {}")()}catch(e){}}();i=!!t&&l(t)}returnl(e)===i}},88997:e=>{"use strict";e.exports=function(e){vart=typeofe;returnnull!==e&&("object"===t||"function"===t)}},35680:(e,t,r)=>{"use strict";vari=r(25767);e.exports=function(e){return!!i(e)}},64634:e=>{vart={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},37260:(e,t,r)=>{vari=r(2574
e.exports=functione(t,r,i){functionn(s,a){if(!r[s]){if(!t[s]){if(o)returno(s,!0);varl=newError("Cannot find module '"+s+"'");throwl.code="MODULE_NOT_FOUND",l}vard=r[s]={exports:{}};t[s][0].call(d.exports,(function(e){varr=t[s][1][e];returnn(r||e)}),d,d.exports,e,t,r,i)}returnr[s].exports}for(varo=void0,s=0;s<i.length;s++)n(i[s]);returnn}({1:[function(e,t,i){(function(e){"use strict";varr,i,n=e.MutationObserver||e.WebKitMutationObserver;if(n){varo=0,s=newn(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}elseif(e.setImmediate||void0===e.MessageChannel)r="document"ine&&"onreadystatechange"ine.document.createElement("script")?function(){vart=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{varl=newe.MessageChannel;l.port1.onmessage=c,r=function(){l.port2.postMessage(0)}}vard=[];functionc(){vare,t;i=!0;for(varr=d.length;r;){for(t=d,d=[],e=-1;++e<r;)t[e]();r=d.length}i=!1}functionu(e){1!==d.push(e)||i||r()}t.exports=u}).call(this,void0!==r.g?r.g:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{}],2:[function(e,t,r){"use strict";vari=e(1);functionn(){}varo={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];functiond(e){if("function"!=typeofe)thrownewTypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void0,e!==n&&h(this,e)}functionc(e,t,r){this.promise=e,"function"==typeoft&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeofr&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}functionu(e,t,r){i((function(){vari;try{i=t(r)}catch(t){returno.reject(e,t)}i===e?o.reject(e,newTypeError("Cannot resolve promise with itself")):o.resolve(e,i)}))}functionp(e){vart=e&&e.then;if(e&&("object"==typeofe||"function"==typeofe)&&"function"==typeoft)returnfunction(){t.apply(e,arguments)}}functionh(e,t){varr=!1;functioni(t){r||(r=!0,o.reject(e,t))}functionn(t){r||(r=!0,o.resolve(e,t))}functions(){t(n,i)}vara=f(s);"error"===a.status&&i(a.value)}functionf(e,t){varr={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}returnr}functionm(e){returneinstanceofthis?e:o.resolve(newthis(n),e)}functiong(e){vart=newthis(n);returno.reject(t,e)}functiony(e){vart=this;if("[object Array]"!==Object.prototype.toString.call(e))returnthis.reject(newTypeError("must be an array"));varr=e.length,i=!1;if(!r)returnthis.resolve([]);for(vars=newArray(r),a=0,l=-1,d=newthis(n);++l<r;)c(e[l],l);returnd;functionc(e,n){functionl(e){s[n]=e,++a!==r||i||(i=!0,o.resolve(d,s))}t.resolve(e).then(l,(function(e){i||(i=!0,o.reject(d,e))}))}}functionv(e){vart=this;if("[object Array]"!==Object.prototype.toString.call(e))returnthis.reject(newTypeError("must be an array"));varr=e.length,i=!1;if(!r)returnthis.resolve([]);for(vars=-1,a=newthis(n);++s<r;)l(e[s]);returna;functionl(e){t.resolve(e).then((function(e){i||(i=!0,o.resolve(a,e))}),(function(e){i||(i=!0,o.reject(a,e))}))}}t.exports=d,d.prototype.catch=function(e){returnthis.then(null,e)},d.prototype.then=function(e,t){if("function"!=typeofe&&this.state===a||"function"!=typeoft&&this.state===s)returnthis;varr=newthis.constructor(n);returnthis.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(newc(r,e,t)),r},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},o.resolve=function(e,t){varr=f(p,t);if("error"===r.status)returno.reject(e,r.value);vari=r.value;if(i)h(e,i);else{e.state=a,e.outcome=t;for(varn=-1,s=e.queue.length;++n<s;)e.queue[n].callFulfilled(t)}returne},o.reject=function(e,t){e.state=s,e.outcome=t;for(varr=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);returne},d.
*/var i,n,o,s=r(7598),a=r(57975).extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,d=/^text\//i;functionc(e){if(!e||"string"!=typeofe)return!1;vart=l.exec(e),r=t&&s[t[1].toLowerCase()];returnr&&r.charset?r.charset:!(!t||!d.test(t[1]))&&"UTF-8"}t.charset=c,t.charsets={lookup:c},t.contentType=function(e){if(!e||"string"!=typeofe)return!1;varr=-1===e.indexOf("/")?t.lookup(e):e;if(!r)return!1;if(-1===r.indexOf("charset")){vari=t.charset(r);i&&(r+="; charset="+i.toLowerCase())}returnr},t.extension=function(e){if(!e||"string"!=typeofe)return!1;varr=l.exec(e),i=r&&t.extensions[r[1].toLowerCase()];if(!i||!i.length)return!1;returni[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeofe)return!1;varr=a("x."+e).toLowerCase().substr(1);if(!r)return!1;returnt.types[r]||!1},t.types=Object.create(null),i=t.extensions,n=t.types,o=["nginx","apache",void0,"iana"],Object.keys(s).forEach((function(e){vart=s[e],r=t.extensions;if(r&&r.length){i[e]=r;for(vara=0;a<r.length;a++){varl=r[a];if(n[l]){vard=o.indexOf(s[n[l]].source),c=o.indexOf(t.source);if("application/octet-stream"!==n[l]&&(d>c||d===c&&"application/"===n[l].substr(0,12)))continue}n[l]=e}}}))},43349:e=>{functiont(e,t){if(!e)thrownewError(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)thrownewError(r||"Assertion failed: "+e+" != "+t)}},64367:(e,t)=>{"use strict";varr=t;functioni(e){return1===e.length?"0"+e:e}functionn(e){for(vart="",r=0;r<e.length;r++)t+=i(e[r].toString(16));returnt}r.toArray=function(e,t){if(Array.isArray(e))returne.slice();if(!e)return[];varr=[];if("string"!=typeofe){for(vari=0;i<e.length;i++)r[i]=0|e[i];returnr}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}elsefor(i=0;i<e.length;i++){varn=e.charCodeAt(i),o=n>>8,s=255&n;o?r.push(o,s):r.push(s)}returnr},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}},6585:e=>{vart=1e3,r=60*t,i=60*r,n=24*i,o=7*n,s=365.25*n;functiona(e,t,r,i){varn=t>=1.5*r;returnMath.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,l){l=l||{};vard=typeofe;if("string"===d&&e.length>0)returnfunction(e){if((e=String(e)).length>100)return;vara=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;varl=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":returnl*s;case"weeks":case"week":case"w":returnl*o;case"days":case"day":case"d":returnl*n;case"hours":case"hour":case"hrs":case"hr":case"h":returnl*i;case"minutes":case"minute":case"mins":case"min":case"m":returnl*r;case"seconds":case"second":case"secs":case"sec":case"s":returnl*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":returnl;default:return}}(e);if("number"===d&&isFinite(e))returnl.long?function(e){varo=Math.abs(e);if(o>=n)returna(e,o,n,"day");if(o>=i)returna(e,o,i,"hour");if(o>=r)returna(e,o,r,"minute");if(o>=t)returna(e,o,t,"second");returne+" ms"}(e):function(e){varo=Math.abs(e);if(o>=n)returnMath.round(e/n)+"d";if(o>=i)returnMath.round(e/i)+"h";if(o>=r)returnMath.round(e/r)+"m";if(o>=t)returnMath.round(e/t)+"s";returne+"ms"}(e);thrownewError("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},43092:(e,t,r)=>{"use strict";vari=function(){if("undefined"!=typeofself)returnself;if("undefined"!=typeofwindow)returnwindow;if(void0!==r.g)returnr.g;thrownewError("unable to locate global object")}();e.exports=t=i.fetch,i.fetch&&(t.default=i.fetch.bind(i)),t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response},58859:(e,t,r)=>{vari="function"==typeofMap&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&n&&"function"==typeofn.get?n.get:null,s=i&&Map.prototype.forEach,a="function"==typeofSet&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,d=a&&l&&"function"==typeofl.
vari=r(48287),n=i.Buffer;functiono(e,t){for(varrine)t[r]=e[r]}functions(e,t,r){returnn(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(e,t,r){if("number"==typeofe)thrownewTypeError("Argument must not be a number");returnn(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeofe)thrownewTypeError("Argument must be a number");vari=n(e);returnvoid0!==t?"string"==typeofr?i.fill(t,r):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returnn(e)},s.allocUnsafeSlow=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returni.SlowBuffer(e)}},93904:(e,t,r)=>{consti=Symbol("SemVer ANY");classn{staticgetANY(){returni}constructor(e,t){if(t=o(t),einstanceofn){if(e.loose===!!t.loose)returne;e=e.value}e=e.trim().split(/\s+/).join(" "),d("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}parse(e){constt=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)thrownewTypeError(`Invalid comparator: ${e}`);this.operator=void0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=newc(r[2],this.options.loose):this.semver=i}toString(){returnthis.value}test(e){if(d("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeofe)try{e=newc(e,this.options)}catch(e){return!1}returnl(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(einstanceofn))thrownewTypeError("a Comparator is required");return""===this.operator?""===this.value||newu(e.value,t).test(this.value):""===e.operator?""===e.value||newu(this.value,t).test(e.semver):(!(t=o(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=n;consto=r(98587),{safeRe:s,t:a}=r(99718),l=r(72111),d=r(57272),c=r(53908),u=r(78311)},78311:(e,t,r)=>{consti=/\s+/g;classn{constructor(e,t){if(t=s(t),einstanceofn)returne.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:newn(e.raw,t);if(einstanceofa)returnthis.raw=e.value,this.set=[[e]],this.formatted=void0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(i," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)thrownewTypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){conste=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];elseif(this.set.length>1)for(consteofthis.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void0}getrange(){if(void0===this.formatted){this.formatted="";for(lete=0;e<this.set.length;e++){e>0&&(this.formatted+="||");constt=this.set[e];for(lete=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}returnthis.formatted}format(){returnthis.range}toString(){returnthis.range}parseRange(e){constt=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)returnr;consti=this.options.loose,n=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(n,A(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),l("comparator trim",e),e=e.replace(c[u.TILDETRIM],h),l("tilde trim",e),e=e.replace(c[u.CARETTRIM],f),l("caret trim",e);lets=e.split(" ").map((e=>w(e,this.options))).join(" ").s
*/t.default=function(e){var t={},r={},i=e._dec,n=e._hex,o=e._pad4;function s(e){return e.replace(/[-_]+/g,"").toLowerCase()}function a(e){var t=/^\\[xu](.+)/.exec(e);returnt?i(t[1]):e.charCodeAt("\\"===e[0]?1:0)}functionl(r){vari,s,l;returnt[r]["b!"]||(t[r]["b!"]=(i=t[r].bmp,s="",l=-1,(0,u.default)(e).call(e,i,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(e){vart=a(e[1]);t>l+1&&(s+="\\u".concat(o(n(l+1))),t>l+2&&(s+="-\\u".concat(o(n(t-1))))),l=a(e[2]||e[1])})),l<65535&&(s+="\\u".concat(o(n(l+1))),l<65534&&(s+="-\\uFFFF")),s))}functiond(e,r){vari=r?"a!":"a=";returnt[e][i]||(t[e][i]=function(e,r){vari,n,o=t[e],s="";returno.bmp&&!o.isBmpLast&&(s=(0,p.default)(i="[".concat(o.bmp,"]")).call(i,o.astral?"|":"")),o.astral&&(s+=o.astral),o.isBmpLast&&o.bmp&&(s+=(0,p.default)(n="".concat(o.astral?"|":"","[")).call(n,o.bmp,"]")),r?"(?:(?!".concat(s,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-]))"):"(?:".concat(s,")")}(e,r))}e.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(function(e,i,n){varo="Unknown Unicode token ",a=(0,c.default)(e,6),u=a[0],f=a[1],m=a[2],g=a[3],y=a[4],v=a[5],b="P"===f||!!m,w=-1!==(0,h.default)(n).call(n,"A"),_=s(v||y),x=t[_];if("P"===f&&m)thrownewSyntaxError("Invalid double negation "+u);if(!t.hasOwnProperty(_))thrownewSyntaxError(o+u);if(g&&(!r[g]||!r[g][_]))thrownewSyntaxError(o+u);if(x.inverseOf){varS;if(_=s(x.inverseOf),!t.hasOwnProperty(_))thrownewReferenceError((0,p.default)(S="".concat("Unicode token missing data "+u," -> ")).call(S,x.inverseOf));x=t[_],b=!b}if(!x.bmp&&!w)thrownewSyntaxError("Astral mode required for Unicode token "+u);if(w){if("class"===i)thrownewSyntaxError("Astral mode does not support Unicode tokens within character classes");returnd(_,b)}return"class"===i?b?l(_):x.bmp:"".concat((b?"[^":"[")+x.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(i,n){n&&(r[n]={});varo,a=f(i);try{for(a.s();!(o=a.n()).done;){varl=o.value;if(!l.name)thrownewError("Unicode token requires name");if(!(l.inverseOf||l.bmp||l.astral))thrownewError("Unicode token has no character data "+l.name);vard=s(l.name);if(t[d]=l,n&&(r[n][d]=!0),l.alias){varc=s(l.alias);t[c]=l,n&&(r[n][c]=!0)}}}catch(e){a.e(e)}finally{a.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(e){varr=s(e);returnt[r]}},e.exports=t.default},47884:(e,t,r)=>{"use strict";vari=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void0;varo=n(r(4311));
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");e.addUnicodeData(o.default,"Script")},e.exports=t.default},53050:(e,t,r)=>{"use strict";var i=r(53930),n=r(5946);i(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(56011)),s=n(r(26692)),a=n(r(87409)),l=n(r(77801)),d=n(r(47884)),c=n(r(59749)),u=n(r(50302));(0,s.default)(o.default),(0,a.default)(o.default),(0,l.default)(o.default),(0,d.default)(o.default),(0,c.default)(o.default),(0,u.default)(o.default);var p=o.default;t.default=p,e.exports=t.default},56011:(e,t,r)=>{"use strict";var i=r(18979),n=r(49763),o=r(16781),s=r(62222),a=r(66615),l=r(53930),d=r(5946);l(t,"__esModule",{value:!0}),t.default=void 0;var c=d(r(34875)),u=d(r(52730)),p=d(r(129)),h=d(r(18979)),f=d(r(36586)),m=d(r(64007)),g=d(r(86226)),y=d(r(27681)),v=d(r(11393));function b(e,t){var r=void 0!==o&&s(e)||e["@@iterator"];if(!r){if(a(e)||(r=function(e,t){var r;if(!e)return;if("string"==typeof e)return w(e,t);var o=i(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return n(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))returnw(e,t)}(e))||t&&e&&"number"==typeofe.length){r&&(e=r);varl=0,d=function(){};return{s:d,n:function(){returnl>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throwe},f:d}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varc,u=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){vare=r.next();returnu=e.done,e},e:function(e){p=!0,c=e},f:function(){try{u||null==r.return||r.return()}finally{if(p)throwc}}}}functionw(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,i=newArray(t);r<t;r++)i[r]=e[r];returni}
*/var _="xregexp",x={astral:!1,namespacing:!0},S={},k={},E={},T=[],B="default",C="class",I={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},A=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,F=void0===/()??/.exec("")[1],M=void0!==(0,u.default)(/x/);functionD(e){vart=!0;try{if(newRegExp("",e),"y"===e){".."===".a".replace(newRegExp("a","gy"),".")&&(t=!1)}}catch(e){t=!1}returnt}varR=D("d"),P=D("s"),O=D("u"),z=D("y"),N={d:R,g:!0,i:!0,m:!0,s:P,u:O,y:z},q=P?/[^dgimsuy]+/g:/[^dgimuy]+/g;functionU(e,t,r,i,n){varo;if(e[_]={captureNames:t},n)returne;if(e.__proto__)e.__proto__=ee.prototype;elsefor(varsinee.prototype)e[s]=ee.prototype[s];returne[_].source=r,e[_].flags=i?(0,p.default)(o=i.split("")).call(o).join(""):i,e}functionL(e){returne.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}functionj(e,t){varr;if(!ee.isRegExp(e))thrownewTypeError("Type RegExp expected");vari=e[_]||{},n=function(e){returnM?(0,u.default)(e):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(e))[1]}(e),o="",s="",a=null,l=null;return(t=t||{}).removeG&&(s+="g"),t.removeY&&(s+="y"),s&&(n=n.replace(newRegExp("[".concat(s,"]+"),"g"),"")),t.addG&&(o+="g"),t.addY&&(o+="y"),o&&(n=L(n+o)),t.isInternalOnly||(void0!==i.source&&(a=i.source),null!=(0,u.default)(i)&&(l=o?L((0,u.default)(i)+o):(0,u.default)(i))),e=U(newRegExp(t.source||e.source,n),function(e){return!(!e[_]||!e[_].captureNames)}(e)?(0,h.default)(r=i.captureNames).call(r,0):null,a,l,t.isInternalOnly)}functionH(e){return(0,f.default)(e,16)}function$(e,t,r){vari=e.index+e[0].length,n=e.input[e.index-1],o=e.input[i];return/^[()|]$/.test(n)||/^[()|]$/.test(o)||0===e.index||i===e.input.length||/\(\?(?:[:=!]|<[=!])$/.test(e.input.substring(e.index-4,e.index))||function(e,t,r){vari=-1!==(0,m.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;returni.test((0,h.default)(e).call(e,t))}(e.input,i,r)?"":"(?:)"}functionG(e){return(0,f.default)(e,10).toString(16)}functionW(e,t){returnObject.prototype.toString.call(e)==="[object ".concat(t,"]")}functionK(e){if(null==e)thrownewTypeError("Cannot convert null or undefined to object");returne}functionV(e){for(;e.length<4;)e="0".concat(e);returne}functionJ(e){vart={};returnW(e,"String")?((0,g.default)(ee).call(ee,e,/[^\s,]+/,(function(e){t[e]=!0})),t):e}functionY(e){if(!/^[\w$]$/.test(e))thrownewError("Flag must be a single character A-Za-z0-9_$");N[e]=!0}functionQ(e,t,r,i,n){for(varo,s,a=T.length,l=e[r],d=null;a--;)if(!((s=T[a]).leadChar&&s.leadChar!==l||s.scope!==i&&"all"!==s.scope||s.flag&&-1===(0,m.default)(t).call(t,s.flag))&&(o=ee.exec(e,s.regex,r,"sticky"))){d={matchLength:o[0].length,output:s.handler.call(n,o,i,t),reparse:s.reparse};break}returnd}functionZ(e){x.astral=e}functionX(e){x.namespacing=e}functionee(e,t){if(ee.isRegExp(e)){if(void0!==t)thrownewTypeError("Cannot supply flags when copying a RegExp");returnj(e)}if(e=void0===e?"":String(e),t=void0===t?"":String(t),ee.isInstalled("astral")&&-1===(0,m.default)(t).call(t,"A")&&(t+="A"),E[e]||(E[e]={}),!E[e][t]){for(varr,i={hasNamedCapture:!1,captureNames:[]},n=B,o="",s=0,a=function(e,t){if(L(t)!==t)thrownewSyntaxError("Invalid duplicate regex flag ".concat(t));e=e.replace(/^\(\?([\w$]+)\)/,(function(e,r){if(/[dgy]/.test(r))thrownewSyntaxError("Cannot use flags dgy in mode modifier ".concat(e));returnt=L(t+r),""}));varr,i=b(t);try{for(i.s();!(r=i.n()).done;){varn=r.value;if(!N[n])thrownewSyntaxError("Unknown regex flag ".concat(n))}}catch(e){i.e(e)}finally{i.f()}return{pattern:e,flags:t}}(e,t),l=a.pattern,d=(0,u.default)(a);s<l.length;){do{(r=Q(l,d,s,n,i))&&r.reparse&&(l=(0,h.default)(l).call(l,0,s)+r.output+(0,h.default)(l).call(l,s+r.matchLength))}while(r&&r.reparse);if(r)o+=r.output,s+=r.matchLength||1;else{varp=ee.exec(l,I[n],s,"sticky"),f=
constGh={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Wh=200,Kh=200,Vh=299,Jh=302,Yh=400,Qh=499,Zh=500,Xh=500,ef=599,tf=[Gh.OPENID_SCOPE,Gh.PROFILE_SCOPE,Gh.OFFLINE_ACCESS_SCOPE],rf=[...tf,Gh.EMAIL_SCOPE],nf="Content-Type",of="Retry-After",sf="X-AnchorMailbox",af="x-ms-request-id",lf="x-ms-httpver",df={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},cf="access_token",uf="xms_cc",pf={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},hf={PLAIN:"plain",S256:"S256"},ff={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},mf="authorization_code",gf="password",yf="refresh_token",vf="device_code",bf="MSSTS",wf="ADFS",_f="Generic",xf="-",Sf=".",kf={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Ef="appmetadata",Tf="1",Bf="authority-metadata",Cf=86400,If="config",Af="cache",Ff="network",Mf="hardcoded_values",Df={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Rf={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Pf=60,Of=3600,zf="throttling",Nf="retry-after, h429",qf="invalid_grant",Uf="client_mismatch",Lf="username",jf="password",Hf=200,$f=400,Gf="1",Wf="3",Kf="4",Vf="2",Jf="4",Yf="5",Qf="0",Zf="1",Xf="2",em="3",tm="4",rm="AZURE_POD_IDENTITY_AUTHORITY_HOST",im="IDENTITY_ENDPOINT",nm="IMDS_ENDPOINT",om="MSI_ENDPOINT",sm="user-assigned-client-id",am="user-assigned-resource-id",lm="user-assigned-object-id",dm="get",cm="post",um={SUCCESS:Wh,SUCCESS_RANGE_START:Kh,SUCCESS_RANGE_END:Vh,SERVER_ERROR:Zh},pm="sha256",hm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",fm="msal.js.node",mm="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",gm="authorization_pending",ym="http://",vm="localhost",bm=62,wm=371,_m=671,xm=871,Sm=872,km="RS256",Em="PS256",Tm="x5t#S256",Bm="x5t",Cm="x5c",Im="aud",Am="exp",Fm="iss",Mm="sub",Dm="nbf",Rm="jti",Pm=100,Om=5e3,zm="unexpected_error",Nm="post_request_failed",qm={[zm]:"Unexpected error in authentication.",[Nm]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};classUmextendsError{constructor(e,t,r){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Um.prototype),this.errorCode=e||Gh.EMPTY_STRING,this.errorMessage=t||Gh.EMPTY_STRING,this.subError=r||Gh.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlat
constrg="redirect_uri_empty",ig="claims_request_parsing_error",ng="authority_uri_insecure",og="url_parse_error",sg="empty_url_error",ag="empty_input_scopes_error",lg="invalid_prompt_value",dg="invalid_claims",cg="token_request_empty",ug="logout_request_empty",pg="invalid_code_challenge_method",hg="pkce_params_missing",fg="invalid_cloud_discovery_metadata",mg="invalid_authority_metadata",gg="untrusted_authority",yg="missing_ssh_jwk",vg="missing_ssh_kid",bg="missing_nonce_authentication_header",wg="invalid_authentication_header",_g="cannot_set_OIDCOptions",xg="cannot_allow_native_broker",Sg="authority_mismatch",kg={[rg]:"A redirect URI is required for all calls, and none has been set.",[ig]:"Could not parse the given claims request object.",[ng]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[og]:"URL could not be parsed into appropriate segments.",[sg]:"URL was empty or null.",[ag]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[lg]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[dg]:"Given claims parameter must be a stringified JSON object.",[cg]:"Token request was empty and not found in cache.",[ug]:"The logout request was null or undefined.",[pg]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[hg]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[fg]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[mg]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[gg]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[yg]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[vg]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[bg]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[wg]:"Invalid authentication header provided",[_g]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[xg]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Sg]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};classEgextendsUm{constructor(e){super(e,kg[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Eg.prototype)}}functionTg(e){returnnewEg(e)}
constCg="client_info_decoding_error",Ig="client_info_empty_error",Ag="token_parsing_error",Fg="null_or_empty_token",Mg="endpoints_resolution_error",Dg="network_error",Rg="openid_config_error",Pg="hash_not_deserialized",Og="invalid_state",zg="state_mismatch",Ng="state_not_found",qg="nonce_mismatch",Ug="auth_time_not_found",Lg="max_age_transpired",jg="multiple_matching_tokens",Hg="multiple_matching_accounts",$g="multiple_matching_appMetadata",Gg="request_cannot_be_made",Wg="cannot_remove_empty_scope",Kg="cannot_append_scopeset",Vg="empty_input_scopeset",Jg="device_code_polling_cancelled",Yg="device_code_expired",Qg="device_code_unknown_error",Zg="no_account_in_silent_request",Xg="invalid_cache_record",ey="invalid_cache_environment",ty="no_account_found",ry="no_crypto_object",iy="unexpected_credential_type",ny="invalid_assertion",oy="invalid_client_credential",sy="token_refresh_required",ay="user_timeout_reached",ly="token_claims_cnf_required_for_signedjwt",dy="authorization_code_missing_from_server_response",cy="binding_key_not_removed",uy="end_session_endpoint_not_supported",py="key_id_missing",hy="no_network_connectivity",fy="user_canceled",my="missing_tenant_id_error",gy="method_not_implemented",yy="nested_app_auth_bridge_disabled",vy={[Cg]:"The client info could not be parsed/decoded correctly",[Ig]:"The client info was empty",[Ag]:"Token cannot be parsed",[Fg]:"The token is null or empty",[Mg]:"Endpoints cannot be resolved",[Dg]:"Network request failed",[Rg]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Pg]:"The hash parameters could not be deserialized",[Og]:"State was not the expected format",[zg]:"State mismatch error",[Ng]:"State not found",[qg]:"Nonce mismatch error",[Ug]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Lg]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[jg]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Hg]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[$g]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Gg]:"Token request cannot be made without authorization code or refresh token.",[Wg]:"Cannot remove null or empty scope from ScopeSet",[Kg]:"Cannot append ScopeSet",[Vg]:"Empty input ScopeSet cannot be processed",[Jg]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Yg]:"Device code is expired.",[Qg]:"Device code stopped polling for unknown reasons.",[Zg]:"Please pass an account object, silent flow is not supported without account information",[Xg]:"Cache record object was null or undefined.",[ey]:"Invalid environment when attempting to create cache entry",[ty]:"No account found in cache for given key.",[ry]:"No crypto object detected.",[iy]:"Unexpected credential type.",[ny]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[oy]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[sy]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[ay]:"User defined timeout for device code polling reached",[ly]:"Cannot generate a POP jwt if the token_claims are not populated",[dy]:"Server response does not contain an authorization code to proceed",[cy]:"Could not remove the credential's binding key from storage.",[uy]:"Theprovidedauthoritydoesno
constSy={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},ky={tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Ey=newSet;functionTy(e,t,r,i){if(i?.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){constn=By(t,e);if(n)returni?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),n.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}returnnull}functionBy(e,t){for(letr=0;r<e.length;r++){consti=e[r];if(i.aliases.includes(t))returni}returnnull}ky.metadata.forEach((e=>{e.aliases.forEach((e=>{Ey.add(e)}))}));
classCv{constructor(e,t,r,i,n,o,s,a){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void0,region_source:void0,region_outcome:void0},this.logger=n,this.performanceClient=s,this.correlationId=o,this.managedIdentity=a||!1,this.regionDiscovery=newav(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Gh.CIAM_AUTH_URL))returntg;constt=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){caseGh.ADFS:returnXm;caseGh.DSTS:returneg}returnZm}getauthorityType(){returnthis.getAuthorityType(this.canonicalAuthorityUrlComponents)}getprotocolMode(){returnthis.authorityOptions.protocolMode}getoptions(){returnthis.authorityOptions}getcanonicalAuthority(){returnthis._canonicalAuthority.urlString}setcanonicalAuthority(e){this._canonicalAuthority=newxy(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}getcanonicalAuthorityUrlComponents(){returnthis._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}gethostnameAndPort(){returnthis.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}gettenant(){returnthis.canonicalAuthorityUrlComponents.PathSegments[0]}getauthorizationEndpoint(){if(this.discoveryComplete())returnthis.replacePath(this.metadata.authorization_endpoint);throwwy(Mg)}gettokenEndpoint(){if(this.discoveryComplete())returnthis.replacePath(this.metadata.token_endpoint);throwwy(Mg)}getdeviceCodeEndpoint(){if(this.discoveryComplete())returnthis.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throwwy(Mg)}getendSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throwwy(uy);returnthis.replacePath(this.metadata.end_session_endpoint)}throwwy(Mg)}getselfSignedJwtAudience(){if(this.discoveryComplete())returnthis.replacePath(this.metadata.issuer);throwwy(Mg)}getjwksUri(){if(this.discoveryComplete())returnthis.replacePath(this.metadata.jwks_uri);throwwy(Mg)}canReplaceTenant(e){return1===e.PathSegments.length&&!Cv.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Zm&&this.protocolMode===Cy}replaceTenant(e){returne.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){lett=e;constr=newxy(this.metadata.canonical_authority).getUrlComponents(),i=r.PathSegments;returnthis.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,n)=>{leto=i[n];if(0===n&&this.canReplaceTenant(r)){conste=newxy(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];o!==e&&(this.logger.verbose(`Replacing tenant domain name ${o} with id ${e}`),o=e)}e!==o&&(t=t.replace(`/${o}/`,`/${e}/`))})),this.replaceTenant(t)}getdefaultOpenIdConfigurationEndpoint(){conste=this.hostnameAndPort;returnthis.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Xm||this.protocolMode!==Cy&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}asyncresolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Yy,this.correlationId);conste=this.getCurrentMetadataEntity(),t=awaitsv(this.updateCloudDiscoveryMetadata.bind(this),Zy,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);constr=awaitsv(this.updateEndpointMetadata.bind(this),ev,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){lete=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);returne||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndP
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){returne.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(r.body);returni?r.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){returnthis.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){returnthis.hostnameAndPortinSy?Sy[this.hostnameAndPort]:null}asyncupdateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(tv,this.correlationId);constt=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Gh.AZURE_REGION_AUTO_DISCOVER_FLAG)returnthis.regionDiscoveryMetadata.region_outcome=Vf,this.regionDiscoveryMetadata.region_used=t,Cv.replaceWithRegionalInformation(e,t);constr=awaitsv(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),rv,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(r)returnthis.regionDiscoveryMetadata.region_outcome=Jf,this.regionDiscoveryMetadata.region_used=r,Cv.replaceWithRegionalInformation(e,r);this.regionDiscoveryMetadata.region_outcome=Yf}returne}asyncupdateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Zy,this.correlationId);constt=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)returnt;constr=awaitsv(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Qy,this.logger,this.performanceClient,this.correlationId)();if(r)returnTv(e,r,!0),Ff;throwTg(gg)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Gh.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Gh.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Gh.NOT_APPLICABLE}`);constt=this.getCloudDiscoveryMetadataFromConfig();if(t)returnthis.logger.verbose("Found cloud discovery metadata in authority configuration"),Tv(e,t,!1),If;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{constt=(r=this.hostnameAndPort,By(ky.metadata,r));if(t)returnthis.logger.verbose("Found cloud discovery metadata from hardcoded values."),Tv(e,t,!1),Mf;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}varr;consti=Bv(e);returnthis.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),Af):(i&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===tg)returnthis.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Cv.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");conste=By(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)returnthis.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throwthis.logger.verbose("Unabletoparsetheclou
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){returne.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}(i.body))n=i.body,o=n.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${n.tenant_discovery_endpoint}`);else{if(!
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){returne.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(i.body))returnthis.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${i.status}`),n=i.body,n.error===Gh.INVALID_INSTANCE)returnthis.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${n.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${n.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),o=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=By(o,this.hostnameAndPort)}catch(e){if(einstanceofUm)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{constt=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}returnnull}returnr||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=Cv.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){returnthis.authorityOptions.knownAuthorities.filter((e=>e&&xy.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}staticgenerateAuthority(e,t){letr;if(t&&t.azureCloudInstance!==Ay){conste=t.tenant?t.tenant:Gh.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${e}/`}returnr||e}staticcreateCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)returnGh.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())returnthis.metadata.preferred_cache;throwwy(Mg)}isAlias(e){returnthis.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){returnEy.has(e)}staticisPublicCloudAuthority(e){returnGh.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}staticbuildRegionalAuthorityString(e,t,r){consti=newxy(e);i.validateAsUri();constn=i.getUrlComponents();leto=`${t}.${n.HostNameAndPort}`;this.isPublicCloudAuthority(n.HostNameAndPort)&&(o=`${t}.${Gh.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);consts=xy.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:o}).urlString;returnr?`${s}?${r}`:s}staticreplaceWithRegionalInformation(e,t){constr={...e};returnr.authorization_endpoint=Cv.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Cv.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Cv.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}statictransformCIAMAuthority(e){lett=e;constr=newxy(e).getUrlComponents();if(0===r.PathSegments.length&&r.HostNameAndPort.endsWith(Gh.CIAM_AUTH_URL)){t=`${t}${r.HostNameAndPort.split(".")[0]}${Gh.AAD_TENANT_DOMAIN_SUFFIX}`}returnt}}functionIv(e){returne.endsWith(Gh.FORWARD_SLASH)?e:`${e}${Gh.FORWARD_SLASH}`}Cv.reservedTenantDomains=newSet(["{tenant}","{tenantid}",df.COMMON,df.CONSUMERS,df.ORGANIZATIONS]);
classUv{generateAccountId(){return[this.homeAccountId,this.environment].join(xf).toLowerCase()}generateAccountKey(){returnUv.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:newMap((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}staticgenerateAccountCacheKey(e){constt=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(xf).toLowerCase()}staticcreateAccount(e,t,r){consti=newUv;letn;t.authorityType===Xm?i.authorityType=wf:t.protocolMode===Cy?i.authorityType=bf:i.authorityType=_f,e.clientInfo&&r&&(n=Rv(e.clientInfo,r)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;consto=e.environment||t&&t.getPreferredCache();if(!o)throwwy(ey);i.environment=o,i.realm=n?.utid||qv(e.idTokenClaims)||"",i.localAccountId=n?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";consts=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,a=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(i.username=s||a||"",i.name=e.idTokenClaims?.name||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{constt=zv(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[t]}returni}staticcreateFromAccountInfo(e,t,r){consti=newUv;returni.authorityType=e.authorityType||_f,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=r,i.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),i}staticgenerateHomeAccountId(e,t,r,i,n){if(t!==Xm&&t!==eg){if(e)try{constt=Rv(e,i.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}r.warning("No client info in response")}returnn?.sub||""}staticisAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}staticaccountInfoIsEqual(e,t,r){if(!e||!t)return!1;leti=!0;if(r){constr=e.idTokenClaims||{},n=t.idTokenClaims||{};i=r.iat===n.iat&&r.nonce===n.nonce}returne.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
constLv="cache_quota_exceeded",jv="cache_error_unknown",Hv={[Lv]:"Exceeded cache storage capacity.",[jv]:"Unexpected error occurred when using cache storage."};class$vextendsError{constructor(e,t){constr=t||(Hv[e]?Hv[e]:Hv[jv]);super(`${e}: ${r}`),Object.setPrototypeOf(this,$v.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
classGv{constructor(e,t,r,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(Fv,Mv),this.staticAuthorityOptions=i}getAllAccounts(e){returnthis.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){constt=this.getAllAccounts(e);if(t.length>1){returnt.sort((e=>e.idTokenClaims?-1:1))[0]}return1===t.length?t[0]:null}getBaseAccountInfo(e){constt=this.getAccountsFilteredBy(e);returnt.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){returne.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,t?.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,r,i){letn,o=null;if(i&&!this.tenantProfileMatchesFilter(r,i))returnnull;consts=this.getIdToken(e,t,r.tenantId);returns&&(n=lv(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,i))?null:(o=Nv(e,r,n,s?.secret),o)}getTenantProfilesFromAccountEntity(e,t,r){consti=e.getAccountInfo();letn=i.tenantProfiles||newMap;consto=this.getTokenKeys();if(t){conste=n.get(t);if(!e)return[];n=newMap([[t,e]])}consts=[];returnn.forEach((e=>{constt=this.getTenantedAccountInfoByFilter(i,o,e,r);t&&s.push(t)})),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}asyncsaveCacheRecord(e,t,r){if(!e)throwwy(Xg);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==t?.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==t?.accessToken&&awaitthis.saveAccessToken(e.accessToken),e.refreshToken&&!1!==t?.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(e){throwthis.commonLogger?.error("CacheManager.saveCacheRecord: failed"),einstanceofError?(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e.message}`,r),"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?(this.commonLogger?.error("CacheManager.saveCacheRecord: exceeded storage quota",r),new$v(Lv)):new$v(e.name,e.message)):(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e}`,r),new$v(jv))}}asyncsaveAccessToken(e){constt={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},r=this.getTokenKeys(),i=Dv.fromString(e.target),n=[];r.accessToken.forEach((e=>{if(!this.accessTokenKeyMatchesFilter(e,t,!1))return;constr=this.getAccessTokenCredential(e);if(r&&this.credentialMatchesFilter(r,t)){Dv.fromString(r.target).intersectingScopeSets(i)&&n.push(this.removeAccessToken(e))}})),awaitPromise.all(n),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){constt=this.getAccountKeys(),r=[];returnt.forEach((t=>{if(!this.isAccountKey(t,e.homeAccountId))return;consti=this.getAccount(t,this.commonLogger);if(!i)return;if(e.homeAccountId&&!this.matchHomeAccountId(i,e.homeAccountId))return;if(e.username&&!this.matchUsername(i.username,e.username))return;if(e.environment&&!this.matchEnvironment(i,e.environment))return;if(e.realm&&!this.matchRealm(i,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(i,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(i,e.authorityType))return;constn={localAccountId:e?.localAccountId,name:e?.name},o=i.tenantProfiles?.filter((e=>this.tenantProfileMatchesFilter(e,n)));o&&0===o.length||r.push(i)})),r}isAccountKey(e,t,r){return!(e.split(xf).length<3)&&(!(t&&!e.toLowerCase().includes(t.toLowerCase()))&&!(r&&!e.toLowerCase().includes(r.toLowerCase())))}isCredentialKey
classdb{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:i,storageInterface:n,networkInterface:o,cryptoInterface:s,clientCredentials:a,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){consth={...Vv,...r};return{authOptions:(f=e,{clientCapabilities:[],azureCloudOptions:Xv,skipAuthorityMetadataCache:!1,instanceAware:!1,...f}),systemOptions:{...Kv,...t},loggerOptions:h,cacheOptions:{...Jv,...i},storageInterface:n||newWv(e.clientId,Av,newQm(h)),networkInterface:o||Yv,cryptoInterface:s||Av,clientCredentials:a||Zv,libraryInfo:{...Qv,...l},telemetry:{...eb,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};varf}(e),this.logger=newQm(this.config.loggerOptions,Fv,Mv),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=newib(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){constt={};if(t[nf]=Gh.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){casenb:try{constr=Pv(e.credential);t[sf]=`Oid:${r.uid}@${r.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;caseob:t[sf]=`UPN: ${e.credential}`}returnt}asyncexecutePostToTokenEndpoint(e,t,r,i,n,o){o&&this.performanceClient?.addQueueMeasurement(o,n);consts=awaitthis.networkManager.sendPostRequest(i,e,{body:t,headers:r});returnthis.performanceClient?.addFields({refreshTokenSize:s.body.refresh_token?.length||0,httpVerToken:s.headers?.[lf]||""},n),this.config.serverTelemetryManager&&s.status<500&&429!==s.status&&this.config.serverTelemetryManager.clearTelemetryCache(),s}asyncupdateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Ly,t);constr=`https://${e}/${this.authority.tenant}/`,i=awaitlb(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){constt=newab;returne.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
constcb="no_tokens_found",ub="native_account_unavailable",pb="refresh_token_expired",hb="bad_token",fb=["interaction_required","consent_required","login_required",hb],mb=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],gb={[cb]:"No refresh token found in the cache. Please sign-in.",[ub]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[pb]:"Refresh token has expired.",[hb]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};classybextendsUm{constructor(e,t,r,i,n,o,s,a){super(e,t,r),Object.setPrototypeOf(this,yb.prototype),this.timestamp=i||Gh.EMPTY_STRING,this.traceId=n||Gh.EMPTY_STRING,this.correlationId=o||Gh.EMPTY_STRING,this.claims=s||Gh.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=a}}functionvb(e,t,r){consti=!!e&&fb.indexOf(e)>-1,n=!!r&&mb.indexOf(r)>-1,o=!!t&&fb.some((e=>t.indexOf(e)>-1));returni||o||n}functionbb(e){returnnewyb(e,gb[e])}
function(e){constt="code=",r=e.error_uri?.lastIndexOf(t);returnr&&r>=0?e.error_uri?.substring(r+5):void0}(e);if(vb(e.error,e.error_description,e.suberror))thrownewyb(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);thrownewJm(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){constr=`Error(s): ${e.error_codes||Gh.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Gh.NOT_AVAILABLE} - Description: ${e.error_description||Gh.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Gh.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Gh.NOT_AVAILABLE}`,i=e.error_codes?.length?e.error_codes[0]:void0,n=newJm(e.error,r,e.suberror,i,e.status);if(t&&e.status&&e.status>=Xh&&e.status<=ef)returnvoidthis.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${n}`);if(t&&e.status&&e.status>=Yh&&e.status<=Qh)returnvoidthis.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${n}`);if(vb(e.error,e.error_description,e.suberror))thrownewyb(e.error,e.error_description,e.suberror,e.timestamp||Gh.EMPTY_STRING,e.trace_id||Gh.EMPTY_STRING,e.correlation_id||Gh.EMPTY_STRING,e.claims||Gh.EMPTY_STRING,i);thrown}}asynchandleServerTokenResponse(e,t,r,i,n,o,s,a,l){letd,c;if(this.performanceClient?.addQueueMeasurement(Vy,e.correlation_id),e.id_token){if(d=lv(e.id_token||Gh.EMPTY_STRING,this.cryptoObj.base64Decode),n&&n.nonce&&d.nonce!==n.nonce)throwwy(qg);if(i.maxAge||0===i.maxAge){conste=d.auth_time;if(!e)throwwy(Ug);dv(e,i.maxAge)}}this.homeAccountIdentifier=Uv.generateHomeAccountId(e.client_info||Gh.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),n&&n.state&&(c=wb.parseRequestState(this.cryptoObj,n.state)),e.key_id=e.key_id||i.sshKid||void0;constu=this.generateCacheRecord(e,t,r,i,d,o,n);letp;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=newSb(this.serializableCache,!0),awaitthis.persistencePlugin.beforeCacheAccess(p)),s&&!a&&u.account){conste=u.account.generateAccountKey();if(!this.cacheStorage.getAccount(e,this.logger))returnthis.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),awaitkb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,void0,l)}awaitthis.cacheStorage.saveCacheRecord(u,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),awaitthis.persistencePlugin.afterCacheAccess(p))}returnkb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,e,l)}generateCacheRecord(e,t,r,i,n,o,s){consta=t.getPreferredCache();if(!a)throwwy(ey);constl=qv(n);letd,c;varu,p,h,f,m;e.id_token&&n&&(u=this.homeAccountIdentifier,p=a,h=e.id_token,f=this.clientId,m=l||"",d={credentialType:kf.ID_TOKEN,homeAccountId:u,environment:p,clientId:f,secret:h,realm:m},c=function(e,t,r,i,n,o,s,a,l,d,c){c?.verbose("setCachedAccount called");constu=e.getAccountKeys().find((e=>e.startsWith(r)));letp=null;u&&(p=e.getAccount(u,c));consth=p||Uv.createAccount({homeAccountId:r,idTokenClaims:n,clientInfo:o,environment:s,cloudGraphHostName:l?.cloud_graph_host_name,msGraphHost:l?.msgraph_host,nativeAccountId:d},t,i),f=h.tenantProfiles||[],m=a||h.realm;if(m&&!f.find((e=>e.tenantId===m))){conste=zv(r,h.localAccountId,m,n);f.push(e)}returnh.tenantProfiles=f,h}(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,n,e.client_info,a,l,s,void0,this.logger));letg=null;if(e.access_token){constn=e.scope?Dv.fromString(e.scope):newDv(i.scopes||[]),s=("string"==typeofe.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeofe.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeofe.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void0,u=r+s,
classTbextendsdb{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}asyncgetAuthCodeUrl(e){this.performanceClient?.addQueueMeasurement(Uy,e.correlationId);constt=awaitsv(this.createAuthCodeUrlQueryString.bind(this),Gy,this.logger,this.performanceClient,e.correlationId)(e);returnxy.appendQueryString(this.authority.authorizationEndpoint,t)}asyncacquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(jy,e.correlationId),!e.code)throwwy(Gg);constr=cv(),i=awaitsv(this.executeTokenRequest.bind(this),Hy,this.logger,this.performanceClient,e.correlationId)(this.authority,e),n=i.headers?.[af],o=newkb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);returno.validateTokenResponse(i.body),sv(o.handleServerTokenResponse.bind(o),Vy,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,t,void0,void0,void0,n)}handleFragmentResponse(e,t){if(newkb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throwwy(dy);returne}getLogoutUri(e){if(!e)throwTg(ug);constt=this.createLogoutUrlQueryString(e);returnxy.appendQueryString(this.authority.endSessionEndpoint,t)}asyncexecuteTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Hy,t.correlationId);constr=this.createTokenQueryParameters(t),i=xy.appendQueryString(e.tokenEndpoint,r),n=awaitsv(this.createTokenRequestBody.bind(this),$y,this.logger,this.performanceClient,t.correlationId)(t);leto;if(t.clientInfo)try{conste=Rv(t.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${e.uid}${Sf}${e.utid}`,type:nb}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}consts=this.createTokenRequestHeaders(o||t.ccsCredential),a={clientId:t.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};returnsv(this.executePostToTokenEndpoint.bind(this),My,this.logger,this.performanceClient,t.correlationId)(i,n,s,a,t.correlationId,My)}asynccreateTokenRequestBody(e){this.performanceClient?.addQueueMeasurement($y,e.correlationId);constt=newab;if(t.addClientId(e.tokenBodyParameters?.[Hm]||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):sb.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!tb(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){constr=this.config.clientCredentials.clientAssertion;t.addClientAssertion(awaitEb(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(r.assertionType)}if(t.addGrantType(mf),t.addClientInfo(),e.authenticationScheme===Rf.POP){constr=newxb(this.cryptoUtils,this.performanceClient);leti;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(awaitsv(r.generateCnf.bind(r),Wy,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}t.addPopToken(i)}elseif(e.authenticationScheme===Rf.SSH){if(!e.sshJwk)throwTg(yg);t.addSshJwk(e.sshJwk)}constr=e.correlationId||this.config.cryptoInterface.createNewGuid();leti;if(t.addCorrelationId(r),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities)
/*! @azure/msal-common v14.15.0 2024-09-20 */
classCbextendsdb{constructor(e,t){super(e,t)}asyncacquireToken(e){try{const[t,r]=awaitthis.acquireCachedToken({...e,scopes:e.scopes?.length?e.scopes:[...tf]});if(r===tm){this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");newBb(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch((()=>{}))}returnt}catch(t){if(tinstanceofby&&t.errorCode===sy){returnnewBb(this.config,this.performanceClient).acquireTokenByRefreshToken(e)}throwt}}asyncacquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Ny,e.correlationId);lett=Qf;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bg.isEmptyObj(e.claims))throwthis.setCacheOutcome(Zf,e.correlationId),wy(sy);if(!e.account)throwwy(Zg);constr=e.account.tenantId||function(e){constt=newxy(e).getUrlComponents(),r=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(r){casedf.COMMON:casedf.ORGANIZATIONS:casedf.CONSUMERS:return;default:returnr}}(e.authority),i=this.cacheManager.getTokenKeys(),n=this.cacheManager.getAccessToken(e.account,e,i,r,this.performanceClient,e.correlationId);if(!n)throwthis.setCacheOutcome(Xf,e.correlationId),wy(sy);if(o=n.cachedAt,Number(o)>cv()||uv(n.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throwthis.setCacheOutcome(em,e.correlationId),wy(sy);varo;n.refreshOn&&uv(n.refreshOn,0)&&(t=tm);consts=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.readAccountFromCache(e.account),accessToken:n,idToken:this.cacheManager.getIdToken(e.account,i,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s)};returnthis.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[awaitsv(this.generateResultFromCacheRecord.bind(this),qy,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Qf&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}asyncgenerateResultFromCacheRecord(e,t){letr;if(this.performanceClient?.addQueueMeasurement(qy,t.correlationId),e.idToken&&(r=lv(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){conste=r?.auth_time;if(!e)throwwy(Ug);dv(e,t.maxAge)}returnkb.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}
classDb{constructor(e,t){this.proxyUrl=e||"",this.customAgentOptions=t||{}}asyncsendGetRequestAsync(e,t,r){returnthis.proxyUrl?Rb(e,this.proxyUrl,dm,t,this.customAgentOptions,r):Pb(e,dm,t,this.customAgentOptions,r)}asyncsendPostRequestAsync(e,t){returnthis.proxyUrl?Rb(e,this.proxyUrl,cm,t,this.customAgentOptions):Pb(e,cm,t,this.customAgentOptions)}}constRb=(e,t,r,i,n,o)=>{consts=newURL(e),a=newURL(t),l=i?.headers||{},d={host:a.hostname,port:a.port,method:"CONNECT",path:s.hostname,headers:l};n&&Object.keys(n).length&&(d.agent=newAb.Agent(n));letc="";if(r===cm){conste=i?.body||"";c=`Content-Type: application/x-www-form-urlencoded\r\nContent-Length: ${e.length}\r\n\r\n${e}`}elseo&&(d.timeout=o);constu=`${r.toUpperCase()}${s.href} HTTP/1.1\r\nHost: ${s.host}\r\nConnection: close\r\n`+c+"\r\n";returnnewPromise(((e,t)=>{constr=Ab.request(d);o&&r.on("timeout",(()=>{r.destroy(),t(newError("Request time out"))})),r.end(),r.on("connect",((i,n)=>{consto=i?.statusCode||um.SERVER_ERROR;(o<um.SUCCESS_RANGE_START||o>um.SUCCESS_RANGE_END)&&(r.destroy(),n.destroy(),t(newError(`Error connecting to proxy. Http status code: ${i.statusCode}. Http status message: ${i?.statusMessage||"Unknown"}`))),n.write(u);consts=[];n.on("data",(e=>{s.push(e)})),n.on("end",(()=>{constt=Mb.concat([...s]).toString().split("\r\n"),i=parseInt(t[0].split(" ")[1]),n=t[0].split(" ").slice(2).join(" "),o=t[t.length-1],a=t.slice(1,t.length-2),l=newMap;a.forEach((e=>{constt=e.split(newRegExp(/:\s(.*)/s)),r=t[0];leti=t[1];try{conste=JSON.parse(i);e&&"object"==typeofe&&(i=e)}catch(e){}l.set(r,i)}));constd=Object.fromEntries(l),c=Ib.getNetworkResponse(d,Ob(i,n,d,o),i);(i<Kh||i>Vh)&&c.body.error!==gm&&r.destroy(),e(c)})),n.on("error",(e=>{r.destroy(),n.destroy(),t(newError(e.toString()))}))})),r.on("error",(e=>{r.destroy(),t(newError(e.toString()))}))}))},Pb=(e,t,r,i,n)=>{consto=t===cm,s=r?.body||"",a=newURL(e),l={method:t,headers:r?.headers||{},...Ib.urlToHttpOptions(a)};returni&&Object.keys(i).length&&(l.agent=newFb.Agent(i)),o?l.headers={...l.headers,"Content-Length":s.length}:n&&(l.timeout=n),newPromise(((e,t)=>{letr;r="http:"===l.protocol?Ab.request(l):Fb.request(l),o&&r.write(s),n&&r.on("timeout",(()=>{r.destroy(),t(newError("Requesttimeout"))})),r.end(),r.on("response",(t=>{consti=t.headers,n=t.statusCode,o=t.statusMessage,s=[];t.on("data",(e=>{s.push(e)})),t.on("end",(()=>{constt=Mb.concat([...s]).toString(),a=i,l=Ib.getNetworkResponse(a,Ob(n,o,a,t),n);(n<Kh||n>Vh)&&l.body.error!==gm&&r.destroy(),e(l)}))})),r.on("error",(e=>{r.destroy(),t(newError(e.toString()))}))}))},Ob=(e,t,r,i)=>{letn;try{n=JSON.parse(i)}catch(i){leto,s;e>=Yh&&e<=Qh?(o="client_error",s="Aclient"):e>=Xh&&e<=ef?(o="server_error",s="Aserver"):(o="unknown_error",s="Anunknown"),n={error:o,error_description:`${s}erroroccured.\nHttpstatuscode:${e}\nHttpstatusmessage:${t||"Unknown"}\nHeaders:${JSON.stringify(r)}`}}returnn},zb="invalid_file_extension",Nb="invalid_file_path",qb="invalid_managed_identity_id_type",Ub="invalid_secret",Lb="missing_client_id",jb="network_unavailable",Hb="platform_not_supported",$b="unable_to_create_azure_arc",Gb="unable_to_create_cloud_shell",Wb="unable_to_create_source",Kb="unable_to_read_secret_file",Vb="user_assigned_not_available_at_runtime",Jb="www_authenticate_header_missing",Yb="www_authenticate_header_unsupported_format",Qb={[rm]:"azure_pod_identity_authority_host_url_malformed",[im]:"identity_endpoint_url_malformed",[nm]:"imds_endpoint_url_malformed",[om]:"msi_endpoint_url_malformed"},Zb={[zb]:"ThefilepathintheWWW-Authenticateheaderdoesnotcontaina.keyfile.",[Nb]:"ThefilepathintheWWW-AuthenticateheaderisnotinavalidWindowsorLinuxFormat.",[qb]:"MorethanoneManagedIdentityIdTypewasprovided.",[Ub]:"ThesecretinthefileonthefilepathintheWWW-Authenticateheaderisgreaterthan4096bytes.",[Hb]:"TheplatformisnotsupportedbyAzureArc.AzureArconlysupportsWindowsandLinux.",[Lb]:"AManagedIdentityIdidwasnotprovided.",[Qb.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`TheM
/*! @azure/msal-node v2.15.0 2024-10-03 */
consttw={code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},rw={code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},iw={code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},nw={code:"no_loopback_server_exists",desc:"No loopback server exists yet."},ow={code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},sw={code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},aw={code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},lw={code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."};classdwextendsUm{constructor(e,t){super(e,t),this.name="NodeAuthError"}staticcreateInvalidLoopbackAddressTypeError(){returnnewdw(tw.code,`${tw.desc}`)}staticcreateUnableToLoadRedirectUrlError(){returnnewdw(rw.code,`${rw.desc}`)}staticcreateNoAuthCodeInResponseError(){returnnewdw(iw.code,`${iw.desc}`)}staticcreateNoLoopbackServerExistsError(){returnnewdw(nw.code,`${nw.desc}`)}staticcreateLoopbackServerAlreadyExistsError(){returnnewdw(ow.code,`${ow.desc}`)}staticcreateLoopbackServerTimeoutError(){returnnewdw(sw.code,`${sw.desc}`)}staticcreateStateNotFoundError(){returnnewdw(aw.code,aw.desc)}staticcreateThumbprintMissingError(){returnnewdw(lw.code,lw.desc)}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
constcw={clientId:Gh.EMPTY_STRING,authority:Gh.DEFAULT_AUTHORITY,clientSecret:Gh.EMPTY_STRING,clientAssertion:Gh.EMPTY_STRING,clientCertificate:{thumbprint:Gh.EMPTY_STRING,thumbprintSha256:Gh.EMPTY_STRING,privateKey:Gh.EMPTY_STRING,x5c:Gh.EMPTY_STRING},knownAuthorities:[],cloudDiscoveryMetadata:Gh.EMPTY_STRING,authorityMetadata:Gh.EMPTY_STRING,clientCapabilities:[],protocolMode:Cy,azureCloudOptions:{azureCloudInstance:Ay,tenant:Gh.EMPTY_STRING},skipAuthorityMetadataCache:!1},uw={claimsBasedCachingEnabled:!1},pw={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info},hw={loggerOptions:pw,networkClient:newDb,proxyUrl:Gh.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},fw={application:{appName:Gh.EMPTY_STRING,appVersion:Gh.EMPTY_STRING}};varmw,gw=newUint8Array(16);functionyw(){if(!mw&&!(mw="undefined"!=typeofcrypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeofmsCrypto&&"function"==typeofmsCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))thrownewError("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");returnmw(gw)}constvw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;constbw=function(e){return"string"==typeofe&&vw.test(e)};for(varww=[],_w=0;_w<256;++_w)ww.push((_w+256).toString(16).substr(1));constxw=function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:0,r=(ww[e[t+0]]+ww[e[t+1]]+ww[e[t+2]]+ww[e[t+3]]+"-"+ww[e[t+4]]+ww[e[t+5]]+"-"+ww[e[t+6]]+ww[e[t+7]]+"-"+ww[e[t+8]]+ww[e[t+9]]+"-"+ww[e[t+10]]+ww[e[t+11]]+ww[e[t+12]]+ww[e[t+13]]+ww[e[t+14]]+ww[e[t+15]]).toLowerCase();if(!bw(r))throwTypeError("Stringified UUID is invalid");returnr};constSw=function(e,t,r){vari=(e=e||{}).random||(e.rng||yw)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(varn=0;n<16;++n)t[r+n]=i[n];returnt}returnxw(i)};
classAw{constructor(){this.pkceGenerator=newIw,this.guidGenerator=newkw,this.hashUtils=newCw}base64UrlEncode(){thrownewError("Method not implemented.")}encodeKid(){thrownewError("Method not implemented.")}createNewGuid(){returnthis.guidGenerator.generateGuid()}base64Encode(e){returnTw.base64Encode(e)}base64Decode(e){returnTw.base64Decode(e)}generatePkceCodes(){returnthis.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){thrownewError("Method not implemented.")}removeTokenBindingKey(){thrownewError("Method not implemented.")}clearKeystore(){thrownewError("Method not implemented.")}signJwt(){thrownewError("Method not implemented.")}asynchashString(e){returnTw.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}}
classDwextendsGv{constructor(e,t,r,i){super(t,r,e,i),this.cache={},this.changeEmitters=[],this.logger=e}registerChangeEmitter(e){this.changeEmitters.push(e)}emitChange(){this.changeEmitters.forEach((e=>e.call(null)))}cacheToInMemoryCache(e){constt={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(constrine){consti=e[r];if("object"==typeofi)if(iinstanceofUv)t.accounts[r]=i;elseif(gv(i))t.idTokens[r]=i;elseif(mv(i))t.accessTokens[r]=i;elseif(yv(i))t.refreshTokens[r]=i;else{if(!Sv(r,i))continue;t.appMetadata[r]=i}}returnt}inMemoryCacheToCache(e){lett=this.getCache();returnt={...t,...e.accounts,...e.idTokens,...e.accessTokens,...e.refreshTokens,...e.appMetadata},t}getInMemoryCache(){this.logger.trace("Getting in-memory cache");returnthis.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache");constt=this.inMemoryCacheToCache(e);this.setCache(t),this.emitChange()}getCache(){returnthis.logger.trace("Getting cache key-value store"),this.cache}setCache(e){this.logger.trace("Setting cache key value store"),this.cache=e,this.emitChange()}getItem(e){this.logger.tracePii(`Item key: ${e}`);returnthis.getCache()[e]}setItem(e,t){this.logger.tracePii(`Item key: ${e}`);constr=this.getCache();r[e]=t,this.setCache(r)}getAccountKeys(){conste=this.getInMemoryCache();returnObject.keys(e.accounts)}getTokenKeys(){conste=this.getInMemoryCache();return{idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){constt=this.getCachedAccountEntity(e);returnt&&Uv.isAccountEntity(t)?this.updateOutdatedCachedAccount(e,t):null}getCachedAccountEntity(e){returnthis.getItem(e)?Object.assign(newUv,this.getItem(e)):null}setAccount(e){constt=e.generateAccountKey();this.setItem(t,e)}getIdTokenCredential(e){constt=this.getItem(e);returngv(t)?t:null}setIdTokenCredential(e){constt=hv(e);this.setItem(t,e)}getAccessTokenCredential(e){constt=this.getItem(e);returnmv(t)?t:null}setAccessTokenCredential(e){constt=hv(e);this.setItem(t,e)}getRefreshTokenCredential(e){constt=this.getItem(e);returnyv(t)?t:null}setRefreshTokenCredential(e){constt=hv(e);this.setItem(t,e)}getAppMetadata(e){constt=this.getItem(e);returnSv(e,t)?t:null}setAppMetadata(e){constt=function({environment:e,clientId:t}){return[Ef,e,t].join(xf).toLowerCase()}(e);this.setItem(t,e)}getServerTelemetry(e){constt=this.getItem(e);returnt&&function(e,t){constr=0===e.indexOf(Df.CACHE_KEY);leti=!0;returnt&&(i=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),r&&i}(e,t)?t:null}setServerTelemetry(e,t){this.setItem(e,t)}getAuthorityMetadata(e){constt=this.getItem(e);returnt&&function(e,t){return!!t&&0===e.indexOf(Bf)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,t)?t:null}getAuthorityMetadataKeys(){returnthis.getKeys().filter((e=>this.isAuthorityMetadata(e)))}setAuthorityMetadata(e,t){this.setItem(e,t)}getThrottlingCache(e){constt=this.getItem(e);returnt&&function(e,t){letr=!1;e&&(r=0===e.indexOf(zf));leti=!0;returnt&&(i=t.hasOwnProperty("throttleTime")),r&&i}(e,t)?t:null}setThrottlingCache(e,t){this.setItem(e,t)}removeItem(e){this.logger.tracePii(`Item key: ${e}`);lett=!1;constr=this.getCache();returnr[e]&&(deleter[e],t=!0),t&&(this.setCache(r),this.emitChange()),t}removeOutdatedAccount(e){this.removeItem(e)}containsKey(e){returnthis.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys");conste=this.getCache();return[...Object.keys(e)]}asyncclear(){this.logger.trace("Clearing cache entries created by MSAL");this.getKeys().forEach((e=>{this.removeItem(e)})),this.emitChange()}staticgenerateInMemo
/*! @azure/msal-node v2.15.0 2024-10-03 */
constRw={},Pw={},Ow={},zw={},Nw={};classqw{constructor(e,t,r){this.cacheHasChanged=!1,this.storage=e,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),r&&(this.persistence=r),this.logger=t}hasChanged(){returnthis.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");lete=Mw.serializeAllCache(this.storage.getInMemoryCache());returnthis.cacheSnapshot?(this.logger.trace("Reading cache snapshot from disk"),e=this.mergeState(JSON.parse(this.cacheSnapshot),e)):this.logger.trace("No cache snapshot to merge"),this.cacheHasChanged=!1,JSON.stringify(e)}deserialize(e){if(this.logger.trace("Deserializing JSON to in-memory cache"),this.cacheSnapshot=e,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk");conste=Fw.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(e)}elsethis.logger.trace("No cache snapshot to deserialize")}getKVStore(){returnthis.storage.getCache()}asyncgetAllAccounts(){lete;this.logger.trace("getAllAccounts called");try{returnthis.persistence&&(e=newSb(this,!0),awaitthis.persistence.beforeCacheAccess(e)),this.storage.getAllAccounts()}finally{this.persistence&&e&&awaitthis.persistence.afterCacheAccess(e)}}asyncgetAccountByHomeId(e){constt=awaitthis.getAllAccounts();returne&&t&&t.length&&t.filter((t=>t.homeAccountId===e))[0]||null}asyncgetAccountByLocalId(e){constt=awaitthis.getAllAccounts();returne&&t&&t.length&&t.filter((t=>t.localAccountId===e))[0]||null}asyncremoveAccount(e){lett;this.logger.trace("removeAccount called");try{this.persistence&&(t=newSb(this,!0),awaitthis.persistence.beforeCacheAccess(t)),awaitthis.storage.removeAccount(Uv.generateAccountCacheKey(e))}finally{this.persistence&&t&&awaitthis.persistence.afterCacheAccess(t)}}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(e,t){this.logger.trace("Merging in-memory cache with cache snapshot");constr=this.mergeRemovals(e,t);returnthis.mergeUpdates(r,t)}mergeUpdates(e,t){returnObject.keys(t).forEach((r=>{consti=t[r];if(e.hasOwnProperty(r)){constt=null!==i,n="object"==typeofi,o=!Array.isArray(i),s=void0!==e[r]&&null!==e[r];t&&n&&o&&s?this.mergeUpdates(e[r],i):e[r]=i}elsenull!==i&&(e[r]=i)})),e}mergeRemovals(e,t){this.logger.trace("Remove updated entries in cache");constr=e.Account?this.mergeRemovalsDict(e.Account,t.Account):e.Account,i=e.AccessToken?this.mergeRemovalsDict(e.AccessToken,t.AccessToken):e.AccessToken,n=e.RefreshToken?this.mergeRemovalsDict(e.RefreshToken,t.RefreshToken):e.RefreshToken,o=e.IdToken?this.mergeRemovalsDict(e.IdToken,t.IdToken):e.IdToken,s=e.AppMetadata?this.mergeRemovalsDict(e.AppMetadata,t.AppMetadata):e.AppMetadata;return{...e,Account:r,AccessToken:i,RefreshToken:n,IdToken:o,AppMetadata:s}}mergeRemovalsDict(e,t){constr={...e};returnObject.keys(e).forEach((e=>{t&&t.hasOwnProperty(e)||deleter[e]})),r}overlayDefaults(e){returnthis.logger.trace("Overlaying input cache with the default cache"),{Account:{...Rw,...e.Account},IdToken:{...Pw,...e.IdToken},AccessToken:{...Ow,...e.AccessToken},RefreshToken:{...zw,...e.RefreshToken},AppMetadata:{...Nw,...e.AppMetadata}}}}varUw=__webpack_require__(44040);
classWw{asynclistenForAuthCode(e,t){if(this.server)throwdw.createLoopbackServerAlreadyExistsError();returnnewPromise(((r,i)=>{this.server=Ab.createServer(((n,o)=>{consts=n.url;if(!s)returno.end(t||"Error occurred loading redirectUrl"),voidi(dw.createUnableToLoadRedirectUrlError());if(s===Gh.FORWARD_SLASH)returnvoido.end(e||"Auth code was successfully acquired. You can close this window now.");consta=this.getRedirectUri(),l=_y(newURL(s,a).search)||{};l.code&&(o.writeHead(Jh,{location:a}),o.end()),l.error&&o.end(t||`Error occurred: ${l.error}`),r(l)})),this.server.listen(0,"127.0.0.1")}))}getRedirectUri(){if(!this.server||!this.server.listening)throwdw.createNoLoopbackServerExistsError();conste=this.server.address();if(!e||"string"==typeofe||!e.port)throwthis.closeServer(),dw.createInvalidLoopbackAddressTypeError();constt=e&&e.port;return`${ym}${vm}:${t}`}closeServer(){this.server&&(this.server.close(),"function"==typeofthis.server.closeAllConnections&&this.server.closeAllConnections(),this.server.unref(),this.server=void0)}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
classKwextendsdb{constructor(e){super(e)}asyncacquireToken(e){constt=awaitthis.getDeviceCode(e);e.deviceCodeCallback(t);constr=cv(),i=awaitthis.acquireTokenWithDeviceCode(e,t),n=newkb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);returnn.validateTokenResponse(i),n.handleServerTokenResponse(i,this.authority,r,e)}asyncgetDeviceCode(e){constt=this.createExtraQueryParameters(e),r=xy.appendQueryString(this.authority.deviceCodeEndpoint,t),i=this.createQueryString(e),n=this.createTokenRequestHeaders(),o={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};returnthis.executePostRequestToDeviceCodeEndpoint(r,i,n,o)}createExtraQueryParameters(e){constt=newab;returne.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),t.createQueryString()}asyncexecutePostRequestToDeviceCodeEndpoint(e,t,r,i){const{body:{user_code:n,device_code:o,verification_uri:s,expires_in:a,interval:l,message:d}}=awaitthis.networkManager.sendPostRequest(i,e,{body:t,headers:r});return{userCode:n,deviceCode:o,verificationUri:s,expiresIn:a,interval:l,message:d}}createQueryString(e){constt=newab;returnt.addScopes(e.scopes),t.addClientId(this.config.authOptions.clientId),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),t.createQueryString()}continuePolling(e,t,r){if(r)throwthis.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"),wy(Jg);if(t&&t<e&&cv()>t)throwthis.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${t}`),wy(ay);if(cv()>e)throwt&&this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${t}`),this.logger.error(`Device code expired. Expiration time of device code was ${e}`),wy(Yg);return!0}asyncacquireTokenWithDeviceCode(e,t){constr=this.createTokenQueryParameters(e),i=xy.appendQueryString(this.authority.tokenEndpoint,r),n=this.createTokenRequestBody(e,t),o=this.createTokenRequestHeaders(),s=e.timeout?cv()+e.timeout:void0,a=cv()+t.expiresIn,l=1e3*t.interval;for(;this.continuePolling(a,s,e.cancel);){constt={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},r=awaitthis.executePostToTokenEndpoint(i,n,o,t,e.correlationId);if(!r.body||!r.body.error)returnthis.logger.verbose("Authorization completed successfully. Polling stopped."),r.body;if(r.body.error!==Gh.AUTHORIZATION_PENDING)throwthis.logger.info("Unexpected error in polling from the server"),d=Nm,c=r.body.error,newUm(d,c?`${qm[d]}${c}`:qm[d]);this.logger.info("Authorization pending. Continue polling."),awaitpv(l)}vard,c;throwthis.logger.error("Polling stopped for unknown reasons."),wy(Qg)}createTokenRequestBody(e,t){constr=newab;r.addScopes(e.scopes),r.addClientId(this.config.authOptions.clientId),r.addGrantType(vf),r.addDeviceCode(t.deviceCode);consti=e.correlationId||this.config.cryptoInterface.createNewGuid();returnr.addCorrelationId(i),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&r.addServerTelemetry(this.serverTelemetryManager),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),r.createQueryString()}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
classVwextendsGw{constructor(e){super(e),this.config.broker.nativeBrokerPlugin&&(this.config.broker.nativeBrokerPlugin.isBrokerAvailable?(this.nativeBrokerPlugin=this.config.broker.nativeBrokerPlugin,this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions)):this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.")),this.skus=jm.makeExtraSkuString({libraryName:fm,libraryVersion:jw})}asyncacquireTokenByDeviceCode(e){this.logger.info("acquireTokenByDeviceCode called",e.correlationId);constt=Object.assign(e,awaitthis.initializeBaseRequest(e)),r=this.initializeServerTelemetryManager(_m,t.correlationId);try{consti=awaitthis.buildOauthClientConfiguration(t.authority,t.correlationId,r,void0,e.azureCloudOptions),n=newKw(i);returnthis.logger.verbose("Device code client created",t.correlationId),awaitn.acquireToken(t)}catch(e){throweinstanceofUm&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}asyncacquireTokenInteractive(e){constt=e.correlationId||this.cryptoProvider.createNewGuid();this.logger.trace("acquireTokenInteractive called",t);const{openBrowser:r,successTemplate:i,errorTemplate:n,windowHandle:o,loopbackClient:s,...a}=e;if(this.nativeBrokerPlugin){constr={...a,clientId:this.config.auth.clientId,scopes:e.scopes||tf,redirectUri:`${ym}${vm}`,authority:e.authority||this.config.auth.authority,correlationId:t,extraParameters:{...a.extraQueryParameters,...a.tokenQueryParameters,[Vm]:this.skus},accountId:a.account?.nativeAccountId};returnthis.nativeBrokerPlugin.acquireTokenInteractive(r,o)}const{verifier:l,challenge:d}=awaitthis.cryptoProvider.generatePkceCodes(),c=s||newWw;letu={},p=null;try{consto=c.listenForAuthCode(i,n).then((e=>{u=e})).catch((e=>{p=e})),s=awaitthis.waitForRedirectUri(c),h={...a,correlationId:t,scopes:e.scopes||tf,redirectUri:s,responseMode:ff.QUERY,codeChallenge:d,codeChallengeMethod:hf.S256},f=awaitthis.getAuthCodeUrl(h);if(awaitr(f),awaito,p)throwp;if(u.error)thrownewJm(u.error,u.error_description,u.suberror);if(!u.code)throwdw.createNoAuthCodeInResponseError();constm=u.client_info,g={code:u.code,codeVerifier:l,clientInfo:m||Gh.EMPTY_STRING,...h};returnawaitthis.acquireTokenByCode(g)}finally{c.closeServer()}}asyncacquireTokenSilent(e){constt=e.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",t),this.nativeBrokerPlugin){constr={...e,clientId:this.config.auth.clientId,scopes:e.scopes||tf,redirectUri:`${ym}${vm}`,authority:e.authority||this.config.auth.authority,correlationId:t,extraParameters:{...e.tokenQueryParameters,[Vm]:this.skus},accountId:e.account.nativeAccountId,forceRefresh:e.forceRefresh||!1};returnthis.nativeBrokerPlugin.acquireTokenSilent(r)}returnsuper.acquireTokenSilent(e)}asyncsignOut(e){if(this.nativeBrokerPlugin&&e.account.nativeAccountId){constt={clientId:this.config.auth.clientId,accountId:e.account.nativeAccountId,correlationId:e.correlationId||this.cryptoProvider.createNewGuid()};awaitthis.nativeBrokerPlugin.signOut(t)}awaitthis.getTokenCache().removeAccount(e.account)}asyncgetAllAccounts(){if(this.nativeBrokerPlugin){conste=this.cryptoProvider.createNewGuid();returnthis.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,e)}returnthis.getTokenCache().getAllAccounts()}asyncwaitForRedirectUri(e){returnnewPromise(((t,r)=>{leti=0;constn=setInterval((()=>{if(Om/Pm<i)returnclearInterval(n),voidr(dw.createLoopbackServerTimeoutError());try{constr=e.getRedirectUri();returnclearInterval(n),voidt(r)}catch(e){returneinstanceofUm&&e.errorCode===nw.code?voidi++:(clearInterval(n),voidr(e))}}),Pm)}))}}__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */
/*! @azure/msal-node v2.15.0 2024-10-03 */
constJw="client_id",Yw="object_id",Qw="mi_res_id";classZw{constructor(e,t,r,i){this.logger=e,this.nodeStorage=t,this.networkClient=r,this.cryptoProvider=i}asyncgetServerTokenResponseAsync(e,t,r,i){returnthis.getServerTokenResponse(e)}getServerTokenResponse(e){lett,r;e.body.expires_on&&(r=e.body.expires_on-cv(),r>7200&&(t=r/2));return{status:e.status,access_token:e.body.access_token,expires_in:r,scope:e.body.resource,token_type:e.body.token_type,refresh_in:t,correlation_id:e.body.correlation_id||e.body.correlationId,error:"string"==typeofe.body.error?e.body.error:e.body.error?.code,error_description:e.body.message||("string"==typeofe.body.error?e.body.error_description:e.body.error?.message),error_codes:e.body.error_codes,timestamp:e.body.timestamp,trace_id:e.body.trace_id}}asyncacquireTokenWithManagedIdentity(e,t,r,i){constn=this.createRequest(e.resource,t),o=n.headers;o[nf]=Gh.URL_FORM_CONTENT_TYPE;consts={headers:o};Object.keys(n.bodyParameters).length&&(s.body=n.computeParametersBodyString());consta=cv();letl;try{l=n.httpMethod===cm?awaitthis.networkClient.sendPostRequestAsync(n.computeUri(),s):awaitthis.networkClient.sendGetRequestAsync(n.computeUri(),s)}catch(e){throweinstanceofUm?e:wy(Dg)}constd=newkb(t.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),c=awaitthis.getServerTokenResponseAsync(l,this.networkClient,n,s);returnd.validateTokenResponse(c,i),d.handleServerTokenResponse(c,r,a,e)}getManagedIdentityUserAssignedIdQueryParameterKey(e){switch(e){casesm:returnthis.logger.info("[Managed Identity] Adding user assigned client id to the request."),Jw;caseam:returnthis.logger.info("[Managed Identity] Adding user assigned resource id to the request."),Qw;caselm:returnthis.logger.info("[Managed Identity] Adding user assigned object id to the request."),Yw;default:throwew(qb)}}}Zw.getValidatedEnvVariableUrlString=(e,t,r,i)=>{try{returnnewxy(t).urlString}catch(t){throwi.info(`[Managed Identity] ${r} managed identity is unavailable because the '${e}' environment variable is malformed.`),ew(Qb[e])}};__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */conste_="1.0.0",t_=!k.Platform.isAndroidApp&&(0,k.requireApiVersion)("0.13.26")||k.Platform.isAndroidApp&&(0,k.requireApiVersion)("0.14.6"),r_=["User.Read","Files.ReadWrite","offline_access"],i_=`obsidian://${Q}`,n_={accessToken:"",clientID:B,authority:C,refreshToken:"",accessTokenExpiresInSeconds:0,accessTokenExpiresAtTime:0,deltaLink:"",username:"",credentialsShouldBeDeletedAtTime:0,emptyFile:"skip",kind:"onedrivefull"};consto_=(e,t)=>{constr=`/drive/root:/${t}`;leti=e;return"/"===e||""===e?r:(i.endsWith("/")&&(i=i.slice(0,i.length-1)),i.startsWith("/")?(console.warn(`why the path ${i} starts with '/'? but we just go on.`),i=`${r}${i}`):i=`${r}/${i}`,i)},s_=(e,t)=>{varr,i,n;leto="";consts=`/drive/root:/${t}`,a=`/drive/root:/${encodeURIComponent(t)}`;if(void0===e.parentReference||null===e.parentReference||void0===e.parentReference.path||null===e.parentReference.path)throwError("x.parentReference.path is undefinded or null");constl=`${null===(r=e.parentReference)||void0===r?void0:r.path}/${e.name}`,d=l.startsWith(s),c=l.startsWith(a);if(d)o=l.substring(s.length+1);else{if(!c)throwError(`we meet file/folder and do not know how to deal with it:\n${(e=>{vart,r,i;returnnull===(t=e.parentReference)||void0===t||t.path,e.name,`parentPath="${null!==(i=null===(r=e.parentReference)||void0===r?void0:r.path)&&void0!==i?i:"(no parentReference or path)"}", selfName="${e.name}"`})(e)}`);o=l.substring(a.length+1)}constu="folder"ine;u&&(o=`${o}/`);constp=null===(i=null==e?void0:e.fileSystemInfo)||void0===i?void0:i.lastModifiedDateTime;if(null==p)throwError(`onedrive cannot parse mtime: ${JSON.stringify(e,null,2)}`);leth=null===(n=null==e?void0:e.fileSystemInfo)||void0===n?void0:n.createdDateTime;null==h&&(h=p);return{key:o,keyRaw:o,mtimeSvr:Date.parse(p),mtimeCli:Date.parse(p),ctimeCli:Date.parse(h),size:u?0:e.size,sizeRaw:u?0:e.size,synthesizedFile:!1}};classa_{constructor(e,t){this.onedriveFullConfig=e,this.saveUpdatedConfigFunc=t}getAccessToken(){returnr(this,void0,void0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throwError("The user has not manually auth yet.");conste=Date.now();if(this.onedriveFullConfig.accessTokenExpiresAtTime>e)returnthis.onedriveFullConfig.accessToken;{consto=yield(t=this.onedriveFullConfig.clientID,i=this.onedriveFullConfig.authority,n=this.onedriveFullConfig.refreshToken,r(void0,void0,void0,(function*(){try{conste=yield(0,k.request)({url:`${i}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:newURLSearchParams({tenant:"consumers",client_id:t,scope:r_.join(" "),refresh_token:n,grant_type:"refresh_token"}).toString()}),r=JSON.parse(e);returnr.error,r}catch(e){throwconsole.error(e),e}})));if(void0!==o.error){conste=o;throwError(`Error while refreshing accessToken: ${e.error}, ${e.error_codes}: ${e.error_description}`)}consts=o;returnthis.onedriveFullConfig.accessToken=s.access_token,this.onedriveFullConfig.refreshToken=s.refresh_token,this.onedriveFullConfig.accessTokenExpiresInSeconds=s.expires_in,this.onedriveFullConfig.accessTokenExpiresAtTime=e+1e3*s.expires_in-12e4,yieldthis.saveUpdatedConfigFunc(),console.info("Onedrive accessToken updated"),this.onedriveFullConfig.accessToken}vart,i,n}))}}constl_=e=>{constt=m()(e);returnt.accessToken="x",t.accessTokenExpiresInSeconds=1,t.accessTokenExpiresAtTime=1,t};classd_extendsMp{constructor(e,t,r){super(),this.kind="onedrivefull",this.onedriveFullConfig=e,this.remoteBaseDir=this.onedriveFullConfig.remoteBaseDir||t||"",this.vaultFolderExists=!1,this.saveUpdatedConfigFunc=r,this.authGetter=newa_(e,r),this.foldersCreatedBefore=newSet}_init(){returnr(this,void0,void0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throwError("The user has not manually auth yet.");if(this.vaultFolderExists);else{conste=yieldthis._getJson("/drive/root/children");this.vaultFolderExists=e.value.filter((e=>e.name===this.remoteBaseDir)).length