Files
BlueRoseNote/.obsidian/plugins/remotely-save/main.js

235 lines
4.1 MiB
JavaScript
Raw Normal View History

2026-05-06 17:32:44 +08:00
(()=>{var __webpack_modules__={66339:(e,t,r)=>{"use strict";var i=r(67526),n=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;
2025-08-02 12:09:34 +08:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
2026-05-06 17:32:44 +08:00
*/t.hp=l,t.IS=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),i=a(r),n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);var n=function(e){if(l.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function p(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,l.prototype),i}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return i?-1:q(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,n);if("number"==typeof t)return
2025-08-02 12:09:34 +08:00
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
2026-05-06 17:32:44 +08:00
const i=r(24605);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u16=e=>new Uint16Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/2));t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const n=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){(0,i.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=n[e[r]];return t}t.bytesToHex=o;const s=48,a=57,l=65,d=70,c=97,u=102;function p(e){return e>=s&&e<=a?e-s:e>=l&&e<=d?e-(l-10):e>=c&&e<=u?e-(c-10):void 0}function h(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=p(e.charCodeAt(n)),o=p(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}t.hexToBytes=h,t.hexToNumber=f,t.bytesToNumberBE=function(e){return f(o(e))},t.numberToBytesBE=function(e,t){return h(e.toString(16).padStart(2*t,"0"))};function m(e){if("string"!=typeof e)throw new Error("string expected, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}t.nextTick=async()=>{},t.asyncLoop=async function(e,r,i){let n=Date.now();for(let o=0;o<e;o++){i(o);const e=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=m,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=function(e){if("string"==typeof e)e=m(e);else{if(!(0,i.isBytes)(e))throw new Error("Uint8Array expected, got "+typeof e);e=e.slice()}return e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];(0,i.bytes)(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r},t.checkOpts=function(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign(e,t)},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r};t.Hash=class{};function g(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);const n=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){const i=new Uint8Array(16),n=(0,t.createView)(i);return g(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=void 0;const i=r(25297);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"getWebcryptoSubtle",{enumerable:!0,get:function(){return i.getWebcryptoSubtle}});const n=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);return d.fill(0),c},decrypt:(i,...n)=>{const{nonceLength:o}=e,s=i.subarray(0,o),a=i.subarray(o);return e(t,s,...r).decrypt(a,...n)}})},t.utils={async encrypt(e,t,r,n){const o=(0,i.getWebcryptoSubtle)(),s=await o.importKey("raw",e,t,!0,["encrypt"]),a=await o.encrypt(r,s,n);return new Uint8Array(a)},async decrypt(e,t,r,n){const o=(0,i.getWebcryptoSubtle)(),s=await o.importKey("raw",e,t,!0,["decrypt"]),a=await o.decrypt(r,s,n);return new Uint8Array(a)}};const s="AES-CBC",a="AES-CTR",l="AES-GCM";function d(e){return(r,i,n)=>{(0,o.bytes)(r),(0,o.bytes)(i);const d={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=void 0,t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.byteSwap32=function(e){for(let r=0;r<e.length;r++)e[r]=(0,t.byteSwap)(e[r])},t.bytesToHex=function(e){(0,n.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=a(e.charCodeAt(n)),o=a(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i},t.asyncLoop=async function(e,r,i){let n=Date.now();for(let o=0;o<e;o++){i(o);const e=Date.now()-n;e>=0&&e<r||(await(0,t.nextTick)(),n+=e)}},t.utf8ToBytes=l,t.toBytes=d,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];(0,n.bytes)(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(d(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(d(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(d(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(i.crypto&&"function"==typeof i.crypto.getRandomValues)return i.crypto.getRandomValues(new Uint8Array(e));if(i.crypto&&"function"==typeof i.crypto.randomBytes)return i.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")};const i=r(25145),n=r(67557);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(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===new Uint8Array(new Uint32Array([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);const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=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):void 0}function l(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function d(e){return"string"==typeof e&&(e=l(e)),(0,n.bytes)(e),e}t.nextTick=async()=>{};t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString},87568:(e,t,r)=>{var i=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)=>{var i=r(87568),n=r(56698);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r(18950).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return n(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function
2025-08-02 12:09:34 +08:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
2026-05-06 17:32:44 +08:00
*/const i=r(67526),n=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let i=a(r);const n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);const n=function(e){if(l.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,l.prototype),i}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return i?-1:W(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i
2025-08-02 12:09:34 +08:00
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2026-05-06 17:32:44 +08:00
t.read=function(e,t,r,i,n){var o,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)return s?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){var s,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"==typeof Object.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;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},20311:e=>{"use strict";e.exports=function(e,t,r,i,n,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,i,n,o,s,a],c=0;(l=new Error(t.replace(/%s/g,(function(){return d[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},47244:(e,t,r)=>{"use strict";var i=r(49092)(),n=r(38075)("Object.prototype.toString"),o=function(e){return!(i&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},69600:e=>{"use strict";var t,r,i=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},n((function(){throw 42}),null,t)}catch(e){e!==r&&(n=null)}else n=null;var o=/^\s*class\b/,s=function(e){try{var t=i.call(e);return o.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"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var p=document.all;l.call(p)===l.call(document.all)&&(u=function(e){if((c||!e)&&(void 0===e||"object"==typeof e))try{var t=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"!=typeof e&&"object"!=typeof e)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"!=typeof e&&"object"!=typeof e)return!1;if(d)return a(e);if(s(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},48184:(e,t,r)=>{"use strict";var i,n=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(49092)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(o.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===n.call(e);if(!l)return!1;if(void 0===i){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();i=!!t&&l(t)}return l(e)===i}},88997:e=>{"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},35680:(e,t,r)=>{"use strict";var i=r(25767);e.exports=function(e){return!!i(e)}},64634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},37260:(e,t,r)=>{var i=r(2574
2025-08-02 12:09:34 +08:00
/*!
localForage -- Offline Storage, Improved
Version 1.10.0
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/
2026-05-06 17:32:44 +08:00
e.exports=function e(t,r,i){function n(s,a){if(!r[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=r[s]={exports:{}};t[s][0].call(d.exports,(function(e){var r=t[s][1][e];return n(r||e)}),d,d.exports,e,t,r,i)}return r[s].exports}for(var o=void 0,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(e,t,i){(function(e){"use strict";var r,i,n=e.MutationObserver||e.WebKitMutationObserver;if(n){var o=0,s=new n(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=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{var l=new e.MessageChannel;l.port1.onmessage=c,r=function(){l.port2.postMessage(0)}}var d=[];function c(){var e,t;i=!0;for(var r=d.length;r;){for(t=d,d=[],e=-1;++e<r;)t[e]();r=d.length}i=!1}function u(e){1!==d.push(e)||i||r()}t.exports=u}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var i=e(1);function n(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function d(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==n&&h(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){i((function(){var i;try{i=t(r)}catch(t){return o.reject(e,t)}i===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,i)}))}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function i(t){r||(r=!0,o.reject(e,t))}function n(t){r||(r=!0,o.resolve(e,t))}function s(){t(n,i)}var a=f(s);"error"===a.status&&i(a.value)}function f(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}function m(e){return e instanceof this?e:o.resolve(new this(n),e)}function g(e){var t=new this(n);return o.reject(t,e)}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,d=new this(n);++l<r;)c(e[l],l);return d;function c(e,n){function l(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))}))}}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var s=-1,a=new this(n);++s<r;)l(e[s]);return a;function l(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){return this.then(null,e)},d.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(n);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new c(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){var r=f(p,t);if("error"===r.status)return o.reject(e,r.value);var i=r.value;if(i)h(e,i);else{e.state=a,e.outcome=t;for(var n=-1,s=e.queue.length;++n<s;)e.queue[n].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e},d.
2025-08-02 12:09:34 +08:00
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2026-05-06 17:32:44 +08:00
*/e=r.nmd(e),function(){var n,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,d=32,c=64,u=128,p=256,h=1/0,f=9007199254740991,m=NaN,g=4294967295,y=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",d],["partialRight",c],["rearg",p]],v="[object Arguments]",b="[object Array]",w="[object Boolean]",_="[object Date]",x="[object Error]",S="[object Function]",k="[object GeneratorFunction]",E="[object Map]",T="[object Number]",B="[object Object]",C="[object Promise]",I="[object RegExp]",A="[object Set]",F="[object String]",M="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",N="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",L="[object Uint8Array]",j="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp(V.source),Q=RegExp(J.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),se=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Be="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fe="[']",Me="["+ke+"]",De="["+Ae+"]",Re="["+Ee+"]",Pe="\\d+",Oe="["+Te+"]",ze="["+Be+"]",Ne="[^"+ke+Ae+Pe+Te+Be+Ce+"]",qe="\\ud83c[\\udffb-\\udfff]",Ue="[^"+ke+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",$e="\\u200d",Ge="(?:"+ze+"|"+Ne+")",We="(?:"+He+"|"+Ne+")",Ke="(?:['](?:d|ll|m|re|s|t|ve))?",Ve="(?:['](?:D|LL|M|RE|S|T|VE))?",Je="(?:"+Re+"|"+qe+")"+"?",Ye="["+Ie+"]?",Qe=Ye+Je+("(?:"+$e+"(?:"+[Ue,Le,je].join("|")+")"+Ye+Je+")*"),Ze="(?:"+[Oe,Le,je].join("|")+")"+Qe,Xe="(?:"+[Ue+Re+"?",Re,Le,je,Me].join("|")+")",et=RegExp(Fe,"g"),tt=RegExp(Re,"g"),rt=RegExp(qe+"(?="+qe+")|"+Xe+Qe,"g"),it=RegExp([He+"?"+ze+"+"+Ke+"(?="+[De,He,"$"].join("|")+")",We+"+"+Ve+"(?="+[De,He+Ge,"$"].join("|")+")",He+"?"+Ge+"+"+Ke,He+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ze].join("|"),"g"),nt=RegExp("["+$e+ke+Ee+Ie+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[O]=lt[z]=lt[N]=lt[q]=lt[U]=lt[L]=lt[j]=lt[H]=lt[$]=!0,lt[v]=lt[b]=lt[R]=lt[w]=lt[P]=lt[_]=lt[x]=lt[S]=lt[E]=lt[T]=lt[B]=lt[I]=lt[A]=lt[F]=lt[D]=!1;var dt={};dt[v]=dt[b]=dt[R]=dt[P]=dt[w]=dt[_]=dt[O]=dt[z]=dt[N]=dt[q]=dt[U]=dt[E]=dt[T]=dt[B]=dt[I]=dt[A]=dt[F]=dt[M]=dt[L]=dt[j]=dt[H]=dt[$]=!0,dt[x]=dt[S]=dt[D]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,pt=parseInt,ht="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ft="object"==typeof self&&self&&self.Object===Object&&self,m
2025-08-02 12:09:34 +08:00
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
2026-05-06 17:32:44 +08:00
e.exports=r(81813)},86049:(e,t,r)=>{"use strict";
2025-08-02 12:09:34 +08:00
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
2026-05-06 17:32:44 +08:00
*/var i,n,o,s=r(7598),a=r(57975).extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,d=/^text\//i;function c(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),r=t&&s[t[1].toLowerCase()];return r&&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"!=typeof e)return!1;var r=-1===e.indexOf("/")?t.lookup(e):e;if(!r)return!1;if(-1===r.indexOf("charset")){var i=t.charset(r);i&&(r+="; charset="+i.toLowerCase())}return r},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var r=l.exec(e),i=r&&t.extensions[r[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var r=a("x."+e).toLowerCase().substr(1);if(!r)return!1;return t.types[r]||!1},t.types=Object.create(null),i=t.extensions,n=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach((function(e){var t=s[e],r=t.extensions;if(r&&r.length){i[e]=r;for(var a=0;a<r.length;a++){var l=r[a];if(n[l]){var d=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=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},64367:(e,t)=>{"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}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))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,s=255&n;o?r.push(o,s):r.push(s)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}},6585:e=>{var t=1e3,r=60*t,i=60*r,n=24*i,o=7*n,s=365.25*n;function a(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,l){l=l||{};var d=typeof e;if("string"===d&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\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;var l=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*n;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===d&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=n)return a(e,o,n,"day");if(o>=i)return a(e,o,i,"hour");if(o>=r)return a(e,o,r,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=n)return Math.round(e/n)+"d";if(o>=i)return Math.round(e/i)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},43092:(e,t,r)=>{"use strict";var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("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)=>{var i="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&n&&"function"==typeof n.get?n.get:null,s=i&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,d=a&&l&&"function"==typeof l.
2025-08-02 12:09:34 +08:00
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2026-05-06 17:32:44 +08:00
var i=r(48287),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(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"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},93904:(e,t,r)=>{const i=Symbol("SemVer ANY");class n{static get ANY(){return i}constructor(e,t){if(t=o(t),e instanceof n){if(e.loose===!!t.loose)return e;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){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(d("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new u(e.value,t).test(this.value):""===e.operator?""===e.value||new u(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;const o=r(98587),{safeRe:s,t:a}=r(99718),l=r(72111),d=r(57272),c=r(53908),u=r(78311)},78311:(e,t,r)=>{const i=/\s+/g;class n{constructor(e,t){if(t=s(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,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)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const i=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);let s=e.split(" ").map((e=>w(e,this.options))).join(" ").s
2025-08-02 12:09:34 +08:00
/*!
* XRegExp Unicode Base 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2008-present MIT License
2026-05-06 17:32:44 +08:00
*/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);return t?i(t[1]):e.charCodeAt("\\"===e[0]?1:0)}function l(r){var i,s,l;return t[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){var t=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))}function d(e,r){var i=r?"a!":"a=";return t[e][i]||(t[e][i]=function(e,r){var i,n,o=t[e],s="";return o.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){var o="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)throw new SyntaxError("Invalid double negation "+u);if(!t.hasOwnProperty(_))throw new SyntaxError(o+u);if(g&&(!r[g]||!r[g][_]))throw new SyntaxError(o+u);if(x.inverseOf){var S;if(_=s(x.inverseOf),!t.hasOwnProperty(_))throw new ReferenceError((0,p.default)(S="".concat("Unicode token missing data "+u," -> ")).call(S,x.inverseOf));x=t[_],b=!b}if(!x.bmp&&!w)throw new SyntaxError("Astral mode required for Unicode token "+u);if(w){if("class"===i)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return d(_,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]={});var o,a=f(i);try{for(a.s();!(o=a.n()).done;){var l=o.value;if(!l.name)throw new Error("Unicode token requires name");if(!(l.inverseOf||l.bmp||l.astral))throw new Error("Unicode token has no character data "+l.name);var d=s(l.name);if(t[d]=l,n&&(r[n][d]=!0),l.alias){var c=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){var r=s(e);return t[r]}},e.exports=t.default},47884:(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(4311));
2025-08-02 12:09:34 +08:00
/*!
* XRegExp Unicode Categories 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
2026-05-06 17:32:44 +08:00
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData(o.default)},e.exports=t.default},59749:(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(88477));
2025-08-02 12:09:34 +08:00
/*!
* XRegExp Unicode Properties 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2012-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
2026-05-06 17:32:44 +08:00
*/t.default=function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var t=o.default;t.push({name:"Assigned",inverseOf:"Cn"}),e.addUnicodeData(t)},e.exports=t.default},50302:(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(5142));
2025-08-02 12:09:34 +08:00
/*!
* XRegExp Unicode Scripts 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
2026-05-06 17:32:44 +08:00
*/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))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var l=0,d=function(){};return{s:d,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){p=!0,c=e},f:function(){try{u||null==r.return||r.return()}finally{if(p)throw c}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}
2025-08-02 12:09:34 +08:00
/*!
* XRegExp 5.1.1
* <xregexp.com>
* Steven Levithan (c) 2007-present MIT License
2026-05-06 17:32:44 +08:00
*/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=void 0===/()??/.exec("")[1],M=void 0!==(0,u.default)(/x/);function D(e){var t=!0;try{if(new RegExp("",e),"y"===e){".."===".a".replace(new RegExp("a","gy"),".")&&(t=!1)}}catch(e){t=!1}return t}var R=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;function U(e,t,r,i,n){var o;if(e[_]={captureNames:t},n)return e;if(e.__proto__)e.__proto__=ee.prototype;else for(var s in ee.prototype)e[s]=ee.prototype[s];return e[_].source=r,e[_].flags=i?(0,p.default)(o=i.split("")).call(o).join(""):i,e}function L(e){return e.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function j(e,t){var r;if(!ee.isRegExp(e))throw new TypeError("Type RegExp expected");var i=e[_]||{},n=function(e){return M?(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(new RegExp("[".concat(s,"]+"),"g"),"")),t.addG&&(o+="g"),t.addY&&(o+="y"),o&&(n=L(n+o)),t.isInternalOnly||(void 0!==i.source&&(a=i.source),null!=(0,u.default)(i)&&(l=o?L((0,u.default)(i)+o):(0,u.default)(i))),e=U(new RegExp(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)}function H(e){return(0,f.default)(e,16)}function $(e,t,r){var i=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){var i=-1!==(0,m.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return i.test((0,h.default)(e).call(e,t))}(e.input,i,r)?"":"(?:)"}function G(e){return(0,f.default)(e,10).toString(16)}function W(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function K(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}function V(e){for(;e.length<4;)e="0".concat(e);return e}function J(e){var t={};return W(e,"String")?((0,g.default)(ee).call(ee,e,/[^\s,]+/,(function(e){t[e]=!0})),t):e}function Y(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");N[e]=!0}function Q(e,t,r,i,n){for(var o,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}return d}function Z(e){x.astral=e}function X(e){x.namespacing=e}function ee(e,t){if(ee.isRegExp(e)){if(void 0!==t)throw new TypeError("Cannot supply flags when copying a RegExp");return j(e)}if(e=void 0===e?"":String(e),t=void 0===t?"":String(t),ee.isInstalled("astral")&&-1===(0,m.default)(t).call(t,"A")&&(t+="A"),E[e]||(E[e]={}),!E[e][t]){for(var r,i={hasNamedCapture:!1,captureNames:[]},n=B,o="",s=0,a=function(e,t){if(L(t)!==t)throw new SyntaxError("Invalid duplicate regex flag ".concat(t));e=e.replace(/^\(\?([\w$]+)\)/,(function(e,r){if(/[dgy]/.test(r))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(e));return t=L(t+r),""}));var r,i=b(t);try{for(i.s();!(r=i.n()).done;){var n=r.value;if(!N[n])throw new SyntaxError("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{var p=ee.exec(l,I[n],s,"sticky"),f=
2025-08-02 12:09:34 +08:00
/**
2026-05-06 17:32:44 +08:00
* @license lucide v0.416.0 - ISC
2025-08-02 12:09:34 +08:00
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
2026-05-06 17:32:44 +08:00
const v=(e,t,r=[])=>{const i=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.keys(t).forEach((e=>{i.setAttribute(e,String(t[e]))})),r.length&&r.forEach((e=>{const t=v(...e);i.appendChild(t)})),i};var b=([e,t,r])=>v(e,t,r);
2025-08-02 12:09:34 +08:00
/**
2026-05-06 17:32:44 +08:00
* @license lucide v0.416.0 - ISC
2025-08-02 12:09:34 +08:00
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
2026-05-06 17:32:44 +08:00
const w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},_=["svg",w,[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]]],x=["svg",w,[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}],["path",{d:"M16 16h5v5"}]]],S=["svg",w,[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]]],k=require("obsidian");let E=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};const T="uwxv4ofkrmc4zzf",B="3729fc1c-0af2-4bec-9376-d7ac4f0ff806",C="https://login.microsoftonline.com/common",I="application/octet-stream",A="remotely-save",F="remotely-save-cb-onedrive",M="remotely-save-cb-dropbox",D=6912e6,R="_debug_remotely_save/",P="remotely-save-cb-pro",O="cli-RcskZDNbskll95WHJ3rNa8G34YlD3DML3cmwGOpEpbpvm82rIVGWmQMKJ60NjjGJKB6H_fOeHicW9W0H",z="573787634452-5301p7h0r85rpc03hbnrn5k9qqt3bulf.apps.googleusercontent.com",N="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",q="remotely-save-cb-box",U="o0ohclnln6xf7fpd1pnomqpl42v0w3hl",L="oDrcpdgifz24NJMN6OmgC2kvYCChbYMX",j="remotely-save-cb-pcloud",H="zrDphYT1giQ",$="TqjVEEaXlsHwCOczzm0R9SBmxf2y",G="remotely-save-cb-yandexdisk",W="01d8aee92915469dba50b70965d77323",K="71da4965f9124deab95444df46afa651",V="remotely-save-cb-koofr",J="LUOCNJ27DECBGKZRG22RHPBAMVK3CUWF",Y="WJH6XQF2AXK6UINDM2T3STD7OAYCX6H4ZL3T4KPYSTW4R5AKI4W26Q6C76WZQ5DT",Q="remotely-save-cb-onedrivefull";function Z(e,t,r){var i;if(void 0===r&&(r={}),!t.codes){t.codes={};for(var n=0;n<t.chars.length;++n)t.codes[t.chars[n]]=n}if(!r.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var o=e.length;"="===e[o-1];)if(--o,!(r.loose||(e.length-o)*t.bits&7))throw new SyntaxError("Invalid padding");for(var s=new(null!=(i=r.out)?i:Uint8Array)(o*t.bits/8|0),a=0,l=0,d=0,c=0;c<o;++c){var u=t.codes[e[c]];if(void 0===u)throw new SyntaxError("Invalid character "+e[c]);l=l<<t.bits|u,(a+=t.bits)>=8&&(a-=8,s[d++]=255&l>>a)}if(a>=t.bits||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return s}function X(e,t,r){void 0===r&&(r={});for(var i=r.pad,n=void 0===i||i,o=(1<<t.bits)-1,s="",a=0,l=0,d=0;d<e.length;++d)for(l=l<<8|255&e[d],a+=8;a>t.bits;)a-=t.bits,s+=t.chars[o&l>>a];if(a&&(s+=t.chars[o&l<<t.bits-a]),n)for(;s.length*t.bits&7;)s+="=";return s}var ee={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},te={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},re=function(e,t){return void 0===t&&(t={}),Z(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,ee,t)},ie=function(e,t){return Z(e,te,t)},ne=function(e,t){return X(e,te,t)};const oe="https://remotelysave.com";console.debug(`remotelysave official website: ${oe}`);const se={accessToken:"",accessTokenExpiresInMs:0,accessTokenExpiresAtTimeMs:0,refreshToken:"",enabledProFeatures:[],email:""},ae=e=>r(void 0,void 0,void 0,(function*(){const t=O,i=E(128),n=yield function(e){return r(this,void 0,void 0,(function*(){if(void 0===e||""===e)return"";try{return ne(new Uint8Array(yield crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e))),{pad:!1})}catch(e){return""}}))}(i);let o=`${oe}/oauth2/authorize?response_type=code&client_id=${t}&token_access_type=offline&code_challenge_method=S256&code_challenge=${n}&scope=pro.list.read`;return e&&(o+=`&redirect_uri=obsidian://${P}`),{authUrl:o,codeVerifier:i,codeChallenge:n}})),le=(e,t,i)=>r(void 0,void 0,void 0,(function*(){const r=O;try{const i={code:t,grant_type:"authorization_code",code_verifier:e,client_id:r,scope:"pro.list.read"},n=yield fetch(`${oe}/api/v1/oauth2/token`,{method:"POST",body:new URLSearchParams(i)});return yield n.json()}catch(e){console.error(e),void 0!==i&&(yield i(e))}})),
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Gh={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."};class Um extends Error{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
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Hm="client_id",$m="response_type",Gm="token_type",Wm="req_cnf",Km="return_spa_code",Vm="x-client-xtra-sku";
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Jm extends Um{constructor(e,t,r,i,n){super(e,t,r),this.name="ServerError",this.errorNo=i,this.status=n,Object.setPrototypeOf(this,Jm.prototype)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
var Ym;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(Ym||(Ym={}));class Qm{constructor(e,t,r){this.level=Ym.Info;const i=e||Qm.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level="number"==typeof i.logLevel?i.logLevel:Ym.Info,this.correlationId=i.correlationId||Gh.EMPTY_STRING,this.packageName=t||Gh.EMPTY_STRING,this.packageVersion=r||Gh.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info}}clone(e,t,r){return new Qm({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const r=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Ym[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,r,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:Ym.Error,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Ym.Error,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Ym.Warning,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Ym.Warning,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Ym.Info,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Ym.Info,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Ym.Verbose,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Ym.Verbose,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Ym.Trace,containsPii:!1,correlationId:t||Gh.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Ym.Trace,containsPii:!0,correlationId:t||Gh.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Zm=0,Xm=1,eg=2,tg=3;
/*! @azure/msal-common v14.15.0 2024-09-20 */
const rg="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."};class Eg extends Um{constructor(e){super(e,kg[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Eg.prototype)}}function Tg(e){return new Eg(e)}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Bg{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),i=e=>decodeURIComponent(e.replace(/\+/g," "));return r.forEach((e=>{if(e.trim()){const[r,n]=e.split(/=(.+)/g,2);r&&n&&(t[i(r)]=i(n))}})),t}static trimArrayEntries(e){return e.map((e=>e.trim()))}static removeEmptyStringsFromArray(e){return e.filter((e=>!!e))}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Cg="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]:"The provided authority does no
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.error||r.error_description||r.state)return r}catch(e){throw wy(Pg)}return null}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class xy{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Tg(sg);e.includes("#")||(this._urlString=xy.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Bg.endsWith(t,"?")?t=t.slice(0,-1):Bg.endsWith(t,"?/")&&(t=t.slice(0,-2)),Bg.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Tg(og)}if(!e.HostNameAndPort||!e.PathSegments)throw Tg(og);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Tg(ng)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return xy.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return!e||0===r.length||r[0]!==df.COMMON&&r[0]!==df.ORGANIZATIONS||(r[0]=e),xy.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Tg(og);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=r.AbsolutePath.split("/");return i=i.filter((e=>e&&e.length>0)),r.PathSegments=i,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw Tg(og);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===Gh.FORWARD_SLASH){const r=new xy(t).getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new xy(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!_y(e)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Sy={"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=new Set;function Ty(e,t,r,i){if(i?.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const n=By(t,e);if(n)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),n.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function By(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(i.aliases.includes(t))return i}return null}ky.metadata.forEach((e=>{e.aliases.forEach((e=>{Ey.add(e)}))}));
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Cy="AAD",Iy="OIDC",Ay="none";
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Fy="refreshTokenClientExecutePostToTokenEndpoint",My="authorizationCodeClientExecutePostToTokenEndpoint",Dy="refreshTokenClientExecuteTokenRequest",Ry="refreshTokenClientAcquireToken",Py="refreshTokenClientAcquireTokenWithCachedRefreshToken",Oy="refreshTokenClientAcquireTokenByRefreshToken",zy="refreshTokenClientCreateTokenRequestBody",Ny="silentFlowClientAcquireCachedToken",qy="silentFlowClientGenerateResultFromCacheRecord",Uy="getAuthCodeUrl",Ly="updateTokenEndpointAuthority",jy="authClientAcquireToken",Hy="authClientExecuteTokenRequest",$y="authClientCreateTokenRequestBody",Gy="authClientCreateQueryString",Wy="popTokenGenerateCnf",Ky="popTokenGenerateKid",Vy="handleServerTokenResponse",Jy="authorityFactoryCreateDiscoveredInstance",Yy="authorityResolveEndpointsAsync",Qy="authorityGetCloudDiscoveryMetadataFromNetwork",Zy="authorityUpdateCloudDiscoveryMetadata",Xy="authorityGetEndpointMetadataFromNetwork",ev="authorityUpdateEndpointMetadata",tv="authorityUpdateMetadataWithRegionalInformation",rv="regionDiscoveryDetectRegion",iv="regionDiscoveryGetRegionFromIMDS",nv="regionDiscoveryGetCurrentVersion",ov="cacheManagerGetRefreshToken",sv=(new Map([["acquireTokenByCode","ATByCode"],["acquireTokenByRefreshToken","ATByRT"],["acquireTokenSilent","ATS"],["acquireTokenSilentAsync","ATSAsync"],["acquireTokenPopup","ATPopup"],["acquireTokenRedirect","ATRedirect"],["cryptoOptsGetPublicKeyThumbprint","CryptoGetPKThumb"],["cryptoOptsSignJwt","CryptoSignJwt"],["silentCacheClientAcquireToken","SltCacheClientAT"],["silentIframeClientAcquireToken","SltIframeClientAT"],["silentRefreshClientAcquireToken","SltRClientAT"],["ssoSilent","SsoSlt"],["standardInteractionClientGetDiscoveredAuthority","StdIntClientGetDiscAuth"],["fetchAccountIdWithNativeBroker","FetchAccIdWithNtvBroker"],["nativeInteractionClientAcquireToken","NtvIntClientAT"],["baseClientCreateTokenRequestHeaders","BaseClientCreateTReqHead"],[Fy,"RTClientExecPost"],[My,"AuthCodeClientExecPost"],["brokerHandshake","BrokerHandshake"],["acquireTokenByRefreshTokenInBroker","ATByRTInBroker"],["acquireTokenByBroker","ATByBroker"],[Dy,"RTClientExecTReq"],[Ry,"RTClientAT"],[Py,"RTClientATWithCachedRT"],[Oy,"RTClientATByRT"],[zy,"RTClientCreateTReqBody"],["acquireTokenFromCache","ATFromCache"],[Ny,"SltFlowClientATCached"],[qy,"SltFlowClientGenResFromCache"],["acquireTokenBySilentIframe","ATBySltIframe"],["initializeBaseRequest","InitBaseReq"],["initializeSilentRequest","InitSltReq"],["initializeClientApplication","InitClientApplication"],["silentIframeClientTokenHelper","SIClientTHelper"],["silentHandlerInitiateAuthRequest","SHandlerInitAuthReq"],["silentHandlerMonitorIframeForHash","SltHandlerMonitorIframeForHash"],["silentHandlerLoadFrame","SHandlerLoadFrame"],["silentHandlerLoadFrameSync","SHandlerLoadFrameSync"],["standardInteractionClientCreateAuthCodeClient","StdIntClientCreateAuthCodeClient"],["standardInteractionClientGetClientConfiguration","StdIntClientGetClientConf"],["standardInteractionClientInitializeAuthorizationRequest","StdIntClientInitAuthReq"],["standardInteractionClientInitializeAuthorizationCodeRequest","StdIntClientInitAuthCodeReq"],[Uy,"GetAuthCodeUrl"],["handleCodeResponseFromServer","HandleCodeResFromServer"],["handleCodeResponse","HandleCodeResp"],[Ly,"UpdTEndpointAuth"],[jy,"AuthClientAT"],[Hy,"AuthClientExecTReq"],[$y,"AuthClientCreateTReqBody"],[Gy,"AuthClientCreateQueryStr"],[Wy,"PopTGenCnf"],[Ky,"PopTGenKid"],[Vy,"HandleServerTRes"],["deserializeResponse","DeserializeRes"],[Jy,"AuthFactCreateDiscInst"],[Yy,"AuthResolveEndpointsAsync"],["authorityResolveEndpointsFromLocalSources","AuthResolveEndpointsFromLocal"],[Qy,"AuthGetCDMetaFromNet"],[Zy,"AuthUpdCDMeta"],[Xy,"AuthUpdCDMetaFromNet"],[ev,"AuthUpdEndpointMeta"],[tv,"AuthUpdMetaWithRegInfo"],[rv,"RegDiscDetectReg"],[iv,"RegDiscGetRegFromIMDS"],[nv,"RegDiscGetCurrentVer"],["acquireTokenByCodeAsync","ATByCodeAsync"],["getEndpointMetadataFromNetwork","GetEndpointMetaFromNet"],["getCloudDiscoveryMetadataFromNetworkMeasurement","GetCDMetaFromNet"],["handleRedirectPromise","HandleRedirectPromise"],["handleNa
/*! @azure/msal-common v14.15.0 2024-09-20 */
class av{constructor(e,t,r,i){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=i}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(rv,this.correlationId);let r=e;if(r)t.region_source=Wf;else{const e=av.IMDS_OPTIONS;try{const i=await sv(this.getRegionFromIMDS.bind(this),iv,this.logger,this.performanceClient,this.correlationId)(Gh.IMDS_VERSION,e);if(i.status===Hf&&(r=i.body,t.region_source=Kf),i.status===$f){const i=await sv(this.getCurrentVersion.bind(this),nv,this.logger,this.performanceClient,this.correlationId)(e);if(!i)return t.region_source=Gf,null;const n=await sv(this.getRegionFromIMDS.bind(this),iv,this.logger,this.performanceClient,this.correlationId)(i,e);n.status===Hf&&(r=n.body,t.region_source=Kf)}}catch(e){return t.region_source=Gf,null}}return r||(t.region_source=Gf),r||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(iv,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Gh.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Gh.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(nv,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Gh.IMDS_ENDPOINT}?format=json`,e);return t.status===$f&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function lv(e,t){const r=function(e){if(!e)throw wy(Fg);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw wy(Ag);return t[2]}(e);try{const e=t(r);return JSON.parse(e)}catch(e){throw wy(Ag)}}function dv(e,t){if(0===t||Date.now()-3e5>e+t)throw wy(Lg)}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function cv(){return Math.round((new Date).getTime()/1e3)}function uv(e,t){const r=Number(e)||0;return cv()+t>r}function pv(e,t){return new Promise((r=>setTimeout((()=>r(t)),e)))}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function hv(e){return[vv(e),bv(e),wv(e),_v(e),xv(e)].join(xf).toLowerCase()}function fv(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function mv(e){return!!e&&(fv(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===kf.ACCESS_TOKEN||e.credentialType===kf.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function gv(e){return!!e&&(fv(e)&&e.hasOwnProperty("realm")&&e.credentialType===kf.ID_TOKEN)}function yv(e){return!!e&&(fv(e)&&e.credentialType===kf.REFRESH_TOKEN)}function vv(e){return[e.homeAccountId,e.environment].join(xf).toLowerCase()}function bv(e){const t=e.credentialType===kf.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(xf).toLowerCase()}function wv(e){return(e.target||"").toLowerCase()}function _v(e){return(e.requestedClaimsHash||"").toLowerCase()}function xv(e){return e.tokenType&&e.tokenType.toLowerCase()!==Rf.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function Sv(e,t){return!!t&&(0===e.indexOf(Ef)&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("environment"))}function kv(){return cv()+Cf}function Ev(e,t,r){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=r,e.jwks_uri=t.jwks_uri}function Tv(e,t,r){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=r}function Bv(e){return e.expiresAt<=cv()}av.IMDS_OPTIONS={headers:{Metadata:"true"}};
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Cv{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:void 0,region_source:void 0,region_outcome:void 0},this.logger=n,this.performanceClient=s,this.correlationId=o,this.managedIdentity=a||!1,this.regionDiscovery=new av(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Gh.CIAM_AUTH_URL))return tg;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Gh.ADFS:return Xm;case Gh.DSTS:return eg}return Zm}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new xy(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw wy(Mg)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw wy(Mg)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw wy(Mg)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw wy(uy);return this.replacePath(this.metadata.end_session_endpoint)}throw wy(Mg)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw wy(Mg)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw wy(Mg)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Cv.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Zm&&this.protocolMode===Cy}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new xy(this.metadata.canonical_authority).getUrlComponents(),i=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,n)=>{let o=i[n];if(0===n&&this.canReplaceTenant(r)){const e=new xy(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)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.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}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Yy,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await sv(this.updateCloudDiscoveryMetadata.bind(this),Zy,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await sv(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(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndP
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(r.body);return i?r.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Sy?Sy[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(tv,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Gh.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Vf,this.regionDiscoveryMetadata.region_used=t,Cv.replaceWithRegionalInformation(e,t);const r=await sv(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),rv,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(r)return this.regionDiscoveryMetadata.region_outcome=Jf,this.regionDiscoveryMetadata.region_used=r,Cv.replaceWithRegionalInformation(e,r);this.regionDiscoveryMetadata.region_outcome=Yf}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Zy,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await sv(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Qy,this.logger,this.performanceClient,this.correlationId)();if(r)return Tv(e,r,!0),Ff;throw Tg(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}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.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{const t=(r=this.hostnameAndPort,By(ky.metadata,r));if(t)return this.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.")}var r;const i=Bv(e);return this.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)return this.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.");const e=By(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.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){throw this.logger.verbose("Unable to parse the clou
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){return e.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){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(i.body))return this.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)return this.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(e instanceof Um)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{const t=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}`)}return null}return r||(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(){return this.authorityOptions.knownAuthorities.filter((e=>e&&xy.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==Ay){const e=t.tenant?t.tenant:Gh.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${e}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Gh.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw wy(Mg)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Ey.has(e)}static isPublicCloudAuthority(e){return Gh.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const i=new xy(e);i.validateAsUri();const n=i.getUrlComponents();let o=`${t}.${n.HostNameAndPort}`;this.isPublicCloudAuthority(n.HostNameAndPort)&&(o=`${t}.${Gh.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const s=xy.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:o}).urlString;return r?`${s}?${r}`:s}static replaceWithRegionalInformation(e,t){const r={...e};return r.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}static transformCIAMAuthority(e){let t=e;const r=new xy(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}`}return t}}function Iv(e){return e.endsWith(Gh.FORWARD_SLASH)?e:`${e}${Gh.FORWARD_SLASH}`}Cv.reservedTenantDomains=new Set(["{tenant}","{tenantid}",df.COMMON,df.CONSUMERS,df.ORGANIZATIONS]);
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Av={createNewGuid:()=>{throw wy(gy)},base64Decode:()=>{throw wy(gy)},base64Encode:()=>{throw wy(gy)},base64UrlEncode:()=>{throw wy(gy)},encodeKid:()=>{throw wy(gy)},async getPublicKeyThumbprint(){throw wy(gy)},async removeTokenBindingKey(){throw wy(gy)},async clearKeystore(){throw wy(gy)},async signJwt(){throw wy(gy)},async hashString(){throw wy(gy)}},Fv="@azure/msal-common",Mv="14.15.0";
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Dv{constructor(e){const t=e?Bg.trimArrayEntries([...e]):[],r=t?Bg.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach((e=>this.scopes.add(e)))}static fromString(e){const t=(e||Gh.EMPTY_STRING).split(" ");return new Dv(t)}static createSearchScopes(e){const t=new Dv(e);return t.containsOnlyOIDCScopes()?t.removeScope(Gh.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Tg(ag)}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new Dv(t);return!!e&&r.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every((e=>this.containsScope(e))))}containsOnlyOIDCScopes(){let e=0;return rf.forEach((t=>{this.containsScope(t)&&(e+=1)})),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach((e=>this.appendScope(e)))}catch(e){throw wy(Kg)}}removeScope(e){if(!e)throw wy(Wg);this.scopes.delete(e.trim())}removeOIDCScopes(){rf.forEach((e=>{this.scopes.delete(e)}))}unionScopeSets(e){if(!e)throw wy(Vg);const t=new Set;return e.scopes.forEach((e=>t.add(e.toLowerCase()))),this.scopes.forEach((e=>t.add(e.toLowerCase()))),t}intersectingScopeSets(e){if(!e)throw wy(Vg);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),i=this.getScopeCount();return t.size<i+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach((t=>e.push(t))),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return Gh.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function Rv(e,t){if(!e)throw wy(Ig);try{const r=t(e);return JSON.parse(r)}catch(e){throw wy(Cg)}}function Pv(e){if(!e)throw wy(Cg);const t=e.split(Sf,2);return{uid:t[0],utid:t.length<2?Gh.EMPTY_STRING:t[1]}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function Ov(e,t){return!!e&&!!t&&e===t.split(".")[1]}function zv(e,t,r,i){if(i){const{oid:t,sub:r,tid:n,name:o,tfp:s,acr:a}=i,l=n||s||a||"";return{tenantId:l,localAccountId:t||r||"",name:o,isHomeTenant:Ov(l,e)}}return{tenantId:r,localAccountId:t,isHomeTenant:Ov(r,e)}}function Nv(e,t,r,i){let n=e;if(t){const{isHomeTenant:r,...i}=t;n={...e,...i}}if(r){const{isHomeTenant:t,...o}=zv(e.homeAccountId,e.localAccountId,e.tenantId,r);return n={...n,...o,idTokenClaims:r,idToken:i},n}return n}
/*! @azure/msal-common v14.15.0 2024-09-20 */
function qv(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Uv{generateAccountId(){return[this.homeAccountId,this.environment].join(xf).toLowerCase()}generateAccountKey(){return Uv.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:new Map((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(xf).toLowerCase()}static createAccount(e,t,r){const i=new Uv;let n;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;const o=e.environment||t&&t.getPreferredCache();if(!o)throw wy(ey);i.environment=o,i.realm=n?.utid||qv(e.idTokenClaims)||"",i.localAccountId=n?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const s=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{const t=zv(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[t]}return i}static createFromAccountInfo(e,t,r){const i=new Uv;return i.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}static generateHomeAccountId(e,t,r,i,n){if(t!==Xm&&t!==eg){if(e)try{const t=Rv(e,i.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}r.warning("No client info in response")}return n?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let i=!0;if(r){const r=e.idTokenClaims||{},n=t.idTokenClaims||{};i=r.iat===n.iat&&r.nonce===n.nonce}return e.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 */
const Lv="cache_quota_exceeded",jv="cache_error_unknown",Hv={[Lv]:"Exceeded cache storage capacity.",[jv]:"Unexpected error occurred when using cache storage."};class $v extends Error{constructor(e,t){const r=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 */
class Gv{constructor(e,t,r,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(Fv,Mv),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);if(t.length>1){return t.sort((e=>e.idTokenClaims?-1:1))[0]}return 1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,t?.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,r,i){let n,o=null;if(i&&!this.tenantProfileMatchesFilter(r,i))return null;const s=this.getIdToken(e,t,r.tenantId);return s&&(n=lv(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,i))?null:(o=Nv(e,r,n,s?.secret),o)}getTenantProfilesFromAccountEntity(e,t,r){const i=e.getAccountInfo();let n=i.tenantProfiles||new Map;const o=this.getTokenKeys();if(t){const e=n.get(t);if(!e)return[];n=new Map([[t,e]])}const s=[];return n.forEach((e=>{const t=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)&&(void 0===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}async saveCacheRecord(e,t,r){if(!e)throw wy(Xg);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==t?.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==t?.accessToken&&await this.saveAccessToken(e.accessToken),e.refreshToken&&!1!==t?.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Error?(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))}}async saveAccessToken(e){const t={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;const r=this.getAccessTokenCredential(e);if(r&&this.credentialMatchesFilter(r,t)){Dv.fromString(r.target).intersectingScopeSets(i)&&n.push(this.removeAccessToken(e))}})),await Promise.all(n),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach((t=>{if(!this.isAccountKey(t,e.homeAccountId))return;const i=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;const n={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
/*! @azure/msal-common v14.15.0 2024-09-20 */
const Kv={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},Vv={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ym.Info,correlationId:Gh.EMPTY_STRING},Jv={claimsBasedCachingEnabled:!1},Yv={async sendGetRequestAsync(){throw wy(gy)},async sendPostRequestAsync(){throw wy(gy)}},Qv={sku:Gh.SKU,version:Mv,cpu:Gh.EMPTY_STRING,os:Gh.EMPTY_STRING},Zv={clientSecret:Gh.EMPTY_STRING,clientAssertion:void 0},Xv={azureCloudInstance:Ay,tenant:`${Gh.DEFAULT_COMMON_TENANT}`},eb={application:{appName:"",appVersion:""}};function tb(e){return e.authOptions.authority.options.protocolMode===Iy}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class rb{static generateThrottlingStorageKey(e){return`${zf}.${JSON.stringify(e)}`}static preProcess(e,t){const r=rb.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r);if(i){if(i.throttleTime<Date.now())return void e.removeItem(r);throw new Jm(i.errorCodes?.join(" ")||Gh.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,r){if(rb.checkResponseStatus(r)||rb.checkResponseForRetryAfter(r)){const i={throttleTime:rb.calculateThrottleTime(parseInt(r.headers[of])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(rb.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(of)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(1e3*Math.min(r+(t||Pf),r+Of))}static removeThrottle(e,t,r,i){const n={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:i,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},o=this.generateThrottlingStorageKey(n);e.removeItem(o)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class ib{constructor(e,t){this.networkClient=e,this.cacheManager=t}async sendPostRequest(e,t,r){let i;rb.preProcess(this.cacheManager,e);try{i=await this.networkClient.sendPostRequestAsync(t,r)}catch(e){throw e instanceof Um?e:wy(Dg)}return rb.postProcess(this.cacheManager,e,i),i}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const nb="home_account_id",ob="UPN";
/*! @azure/msal-common v14.15.0 2024-09-20 */
class sb{static validateRedirectUri(e){if(!e)throw Tg(rg)}static validatePrompt(e){const t=[];for(const e in pf)t.push(pf[e]);if(t.indexOf(e)<0)throw Tg(lg)}static validateClaims(e){try{JSON.parse(e)}catch(e){throw Tg(dg)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Tg(hg);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([hf.PLAIN,hf.S256].indexOf(e)<0)throw Tg(pg)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class ab{constructor(){this.parameters=new Map}addResponseTypeCode(){this.parameters.set($m,encodeURIComponent(Gh.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set($m,encodeURIComponent(`${Gh.TOKEN_RESPONSE_TYPE} ${Gh.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set("response_mode",encodeURIComponent(e||ff.QUERY))}addNativeBroker(){this.parameters.set("nativebroker",encodeURIComponent("1"))}addScopes(e,t=!0,r=tf){!t||r.includes("openid")||e.includes("openid")||r.push("openid");const i=t?[...e||[],...r]:e||[],n=new Dv(i);this.parameters.set("scope",encodeURIComponent(n.printScopes()))}addClientId(e){this.parameters.set(Hm,encodeURIComponent(e))}addRedirectUri(e){sb.validateRedirectUri(e),this.parameters.set("redirect_uri",encodeURIComponent(e))}addPostLogoutRedirectUri(e){sb.validateRedirectUri(e),this.parameters.set("post_logout_redirect_uri",encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set("id_token_hint",encodeURIComponent(e))}addDomainHint(e){this.parameters.set("domain_hint",encodeURIComponent(e))}addLoginHint(e){this.parameters.set("login_hint",encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(sf,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(sf,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set("sid",encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);sb.validateClaims(r),this.parameters.set("claims",encodeURIComponent(r))}addCorrelationId(e){this.parameters.set("client-request-id",encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set("x-client-SKU",e.sku),this.parameters.set("x-client-VER",e.version),e.os&&this.parameters.set("x-client-OS",e.os),e.cpu&&this.parameters.set("x-client-CPU",e.cpu)}addApplicationTelemetry(e){e?.appName&&this.parameters.set("x-app-name",e.appName),e?.appVersion&&this.parameters.set("x-app-ver",e.appVersion)}addPrompt(e){sb.validatePrompt(e),this.parameters.set("prompt",encodeURIComponent(e))}addState(e){e&&this.parameters.set("state",encodeURIComponent(e))}addNonce(e){this.parameters.set("nonce",encodeURIComponent(e))}addCodeChallengeParams(e,t){if(sb.validateCodeChallengeParams(e,t),!e||!t)throw Tg(hg);this.parameters.set("code_challenge",encodeURIComponent(e)),this.parameters.set("code_challenge_method",encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set("code",encodeURIComponent(e))}addDeviceCode(e){this.parameters.set("device_code",encodeURIComponent(e))}addRefreshToken(e){this.parameters.set("refresh_token",encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set("code_verifier",encodeURIComponent(e))}addClientSecret(e){this.parameters.set("client_secret",encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set("client_assertion",encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set("client_assertion_type",encodeURIComponent(e))}addOboAssertion(e){this.parameters.set("assertion",encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set("requested_token_use",encodeURIComponent(e))}addGrantType(e){this.parameters.set("grant_type",encodeURIComponent(e))}addClientInfo(){this.parameters.set("client_info","1")}addExtraQueryParameters(e){Object.entries(e).forEach((([e,t])=>{!this.parameters.has(e)&&t&&this.parameters.set(e,t)}))}addClientCapabilitiesToClaims(e,t){let r;if(e)try{r=JSON.parse(e)}catch(e){throw Tg(dg)}else r={};return t&&t.length>0&&(r.hasOwnProperty(cf)||(r[cf]={}),r[cf][uf]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(Lf,encodeURIComponent(e))}addPassword(e){this.parameters.set(jf,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Gm,Rf.POP),this.parameters.set(Wm,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Gm,Rf.SSH),this.parameters.set(Wm,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set("x-client-current-telemetry",e.generateCurrentRequestHeaderValue()),this.parameters.set("x-client-last-telemetry",e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set("x-ms-lib-capability",Nf)}addLogoutHint
/*! @azure/msal-common v14.15.0 2024-09-20 */
async function lb(e,t,r,i,n,o,s){s?.addQueueMeasurement(Jy,o);const a=Cv.transformCIAMAuthority(Iv(e)),l=new Cv(a,t,r,i,n,o,s);try{return await sv(l.resolveEndpointsAsync.bind(l),Yy,n,s,o)(),l}catch(e){throw wy(Mg)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class db{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}){const h={...Vv,...r};return{authOptions:(f=e,{clientCapabilities:[],azureCloudOptions:Xv,skipAuthorityMetadataCache:!1,instanceAware:!1,...f}),systemOptions:{...Kv,...t},loggerOptions:h,cacheOptions:{...Jv,...i},storageInterface:n||new Wv(e.clientId,Av,new Qm(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};var f}(e),this.logger=new Qm(this.config.loggerOptions,Fv,Mv),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new ib(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[nf]=Gh.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case nb:try{const r=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;case ob:t[sf]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,r,i,n,o){o&&this.performanceClient?.addQueueMeasurement(o,n);const s=await this.networkManager.sendPostRequest(i,e,{body:t,headers:r});return this.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}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Ly,t);const r=`https://${e}/${this.authority.tenant}/`,i=await lb(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new ab;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const cb="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."};class yb extends Um{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}}function vb(e,t,r){const i=!!e&&fb.indexOf(e)>-1,n=!!r&&mb.indexOf(r)>-1,o=!!t&&fb.some((e=>t.indexOf(e)>-1));return i||o||n}function bb(e){return new yb(e,gb[e])}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class wb{static setRequestState(e,t,r){const i=wb.generateLibraryState(e,r);return t?`${i}${Gh.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw wy(ry);const r={id:e.createNewGuid()};t&&(r.meta=t);const i=JSON.stringify(r);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw wy(ry);if(!t)throw wy(Og);try{const r=t.split(Gh.RESOURCE_DELIM),i=r[0],n=r.length>1?r.slice(1).join(Gh.RESOURCE_DELIM):Gh.EMPTY_STRING,o=e.base64Decode(i),s=JSON.parse(o);return{userRequestState:n||Gh.EMPTY_STRING,libraryState:s}}catch(e){throw wy(Og)}}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
const _b="sw";class xb{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Wy,e.correlationId);const r=await sv(this.generateKid.bind(this),Wy,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:i}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Ky,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:_b}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,i){const{resourceRequestMethod:n,resourceRequestUri:o,shrClaims:s,shrNonce:a,shrOptions:l}=r,d=o?new xy(o):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:cv(),m:n?.toUpperCase(),u:c?.HostNameAndPort,nonce:a||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:s||void 0,...i},t,l,r.correlationId)}}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Sb{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}class kb{constructor(e,t,r,i,n,o,s){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=i,this.serializableCache=n,this.persistencePlugin=o,this.performanceClient=s}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?wy(Ng,"Cached State"):wy(Ng,"Server State");let r,i;try{r=decodeURIComponent(e.state)}catch(t){throw wy(Og,e.state)}try{i=decodeURIComponent(t)}catch(t){throw wy(Og,e.state)}if(r!==i)throw wy(zg);if(e.error||e.error_description||e.suberror){const t=
/*! @azure/msal-common v14.15.0 2024-09-20 */
function(e){const t="code=",r=e.error_uri?.lastIndexOf(t);return r&&r>=0?e.error_uri?.substring(r+5):void 0}(e);if(vb(e.error,e.error_description,e.suberror))throw new yb(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Jm(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const r=`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]:void 0,n=new Jm(e.error,r,e.suberror,i,e.status);if(t&&e.status&&e.status>=Xh&&e.status<=ef)return void this.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)return void this.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))throw new yb(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);throw n}}async handleServerTokenResponse(e,t,r,i,n,o,s,a,l){let d,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)throw wy(qg);if(i.maxAge||0===i.maxAge){const e=d.auth_time;if(!e)throw wy(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||void 0;const u=this.generateCacheRecord(e,t,r,i,d,o,n);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Sb(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),s&&!a&&u.account){const e=u.account.generateAccountKey();if(!this.cacheStorage.getAccount(e,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await kb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return kb.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,e,l)}generateCacheRecord(e,t,r,i,n,o,s){const a=t.getPreferredCache();if(!a)throw wy(ey);const l=qv(n);let d,c;var u,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");const u=e.getAccountKeys().find((e=>e.startsWith(r)));let p=null;u&&(p=e.getAccount(u,c));const h=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))){const e=zv(r,h.localAccountId,m,n);f.push(e)}return h.tenantProfiles=f,h}(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,n,e.client_info,a,l,s,void 0,this.logger));let g=null;if(e.access_token){const n=e.scope?Dv.fromString(e.scope):new Dv(i.scopes||[]),s=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=r+s,
/*! @azure/msal-common v14.15.0 2024-09-20 */
async function Eb(e,t,r){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:r})}
/*! @azure/msal-common v14.15.0 2024-09-20 */
class Tb extends db{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async getAuthCodeUrl(e){this.performanceClient?.addQueueMeasurement(Uy,e.correlationId);const t=await sv(this.createAuthCodeUrlQueryString.bind(this),Gy,this.logger,this.performanceClient,e.correlationId)(e);return xy.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(jy,e.correlationId),!e.code)throw wy(Gg);const r=cv(),i=await sv(this.executeTokenRequest.bind(this),Hy,this.logger,this.performanceClient,e.correlationId)(this.authority,e),n=i.headers?.[af],o=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return o.validateTokenResponse(i.body),sv(o.handleServerTokenResponse.bind(o),Vy,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,t,void 0,void 0,void 0,n)}handleFragmentResponse(e,t){if(new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw wy(dy);return e}getLogoutUri(e){if(!e)throw Tg(ug);const t=this.createLogoutUrlQueryString(e);return xy.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Hy,t.correlationId);const r=this.createTokenQueryParameters(t),i=xy.appendQueryString(e.tokenEndpoint,r),n=await sv(this.createTokenRequestBody.bind(this),$y,this.logger,this.performanceClient,t.correlationId)(t);let o;if(t.clientInfo)try{const e=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)}const s=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};return sv(this.executePostToTokenEndpoint.bind(this),My,this.logger,this.performanceClient,t.correlationId)(i,n,s,a,t.correlationId,My)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement($y,e.correlationId);const t=new ab;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){const r=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Eb(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(r.assertionType)}if(t.addGrantType(mf),t.addClientInfo(),e.authenticationScheme===Rf.POP){const r=new xb(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await sv(r.generateCnf.bind(r),Wy,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}t.addPopToken(i)}else if(e.authenticationScheme===Rf.SSH){if(!e.sshJwk)throw Tg(yg);t.addSshJwk(e.sshJwk)}const r=e.correlationId||this.config.cryptoInterface.createNewGuid();let i;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 */
class Cb extends db{constructor(e,t){super(e,t)}async acquireToken(e){try{const[t,r]=await this.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.");new Bb(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch((()=>{}))}return t}catch(t){if(t instanceof by&&t.errorCode===sy){return new Bb(this.config,this.performanceClient).acquireTokenByRefreshToken(e)}throw t}}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Ny,e.correlationId);let t=Qf;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bg.isEmptyObj(e.claims))throw this.setCacheOutcome(Zf,e.correlationId),wy(sy);if(!e.account)throw wy(Zg);const r=e.account.tenantId||function(e){const t=new xy(e).getUrlComponents(),r=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(r){case df.COMMON:case df.ORGANIZATIONS:case df.CONSUMERS:return;default:return r}}(e.authority),i=this.cacheManager.getTokenKeys(),n=this.cacheManager.getAccessToken(e.account,e,i,r,this.performanceClient,e.correlationId);if(!n)throw this.setCacheOutcome(Xf,e.correlationId),wy(sy);if(o=n.cachedAt,Number(o)>cv()||uv(n.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(em,e.correlationId),wy(sy);var o;n.refreshOn&&uv(n.refreshOn,0)&&(t=tm);const s=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)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await sv(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}`)}async generateResultFromCacheRecord(e,t){let r;if(this.performanceClient?.addQueueMeasurement(qy,t.correlationId),e.idToken&&(r=lv(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=r?.auth_time;if(!e)throw wy(Ug);dv(e,t.maxAge)}return kb.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Ib{static getNetworkResponse(e,t,r){return{headers:e,body:t,status:r}}static urlToHttpOptions(e){const t={protocol:e.protocol,hostname:e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname||""}${e.search||""}`,href:e.href};return""!==e.port&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`),t}}var Ab=__webpack_require__(35265),Fb=__webpack_require__(70440),Mb=__webpack_require__(48287).Buffer;
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Db{constructor(e,t){this.proxyUrl=e||"",this.customAgentOptions=t||{}}async sendGetRequestAsync(e,t,r){return this.proxyUrl?Rb(e,this.proxyUrl,dm,t,this.customAgentOptions,r):Pb(e,dm,t,this.customAgentOptions,r)}async sendPostRequestAsync(e,t){return this.proxyUrl?Rb(e,this.proxyUrl,cm,t,this.customAgentOptions):Pb(e,cm,t,this.customAgentOptions)}}const Rb=(e,t,r,i,n,o)=>{const s=new URL(e),a=new URL(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=new Ab.Agent(n));let c="";if(r===cm){const e=i?.body||"";c=`Content-Type: application/x-www-form-urlencoded\r\nContent-Length: ${e.length}\r\n\r\n${e}`}else o&&(d.timeout=o);const u=`${r.toUpperCase()} ${s.href} HTTP/1.1\r\nHost: ${s.host}\r\nConnection: close\r\n`+c+"\r\n";return new Promise(((e,t)=>{const r=Ab.request(d);o&&r.on("timeout",(()=>{r.destroy(),t(new Error("Request time out"))})),r.end(),r.on("connect",((i,n)=>{const o=i?.statusCode||um.SERVER_ERROR;(o<um.SUCCESS_RANGE_START||o>um.SUCCESS_RANGE_END)&&(r.destroy(),n.destroy(),t(new Error(`Error connecting to proxy. Http status code: ${i.statusCode}. Http status message: ${i?.statusMessage||"Unknown"}`))),n.write(u);const s=[];n.on("data",(e=>{s.push(e)})),n.on("end",(()=>{const t=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=new Map;a.forEach((e=>{const t=e.split(new RegExp(/:\s(.*)/s)),r=t[0];let i=t[1];try{const e=JSON.parse(i);e&&"object"==typeof e&&(i=e)}catch(e){}l.set(r,i)}));const d=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(new Error(e.toString()))}))})),r.on("error",(e=>{r.destroy(),t(new Error(e.toString()))}))}))},Pb=(e,t,r,i,n)=>{const o=t===cm,s=r?.body||"",a=new URL(e),l={method:t,headers:r?.headers||{},...Ib.urlToHttpOptions(a)};return i&&Object.keys(i).length&&(l.agent=new Fb.Agent(i)),o?l.headers={...l.headers,"Content-Length":s.length}:n&&(l.timeout=n),new Promise(((e,t)=>{let r;r="http:"===l.protocol?Ab.request(l):Fb.request(l),o&&r.write(s),n&&r.on("timeout",(()=>{r.destroy(),t(new Error("Request time out"))})),r.end(),r.on("response",(t=>{const i=t.headers,n=t.statusCode,o=t.statusMessage,s=[];t.on("data",(e=>{s.push(e)})),t.on("end",(()=>{const t=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(new Error(e.toString()))}))}))},Ob=(e,t,r,i)=>{let n;try{n=JSON.parse(i)}catch(i){let o,s;e>=Yh&&e<=Qh?(o="client_error",s="A client"):e>=Xh&&e<=ef?(o="server_error",s="A server"):(o="unknown_error",s="An unknown"),n={error:o,error_description:`${s} error occured.\nHttp status code: ${e}\nHttp status message: ${t||"Unknown"}\nHeaders: ${JSON.stringify(r)}`}}return n},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]:"The file path in the WWW-Authenticate header does not contain a .key file.",[Nb]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[qb]:"More than one ManagedIdentityIdType was provided.",[Ub]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[Hb]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[Lb]:"A ManagedIdentityId id was not provided.",[Qb.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The M
/*! @azure/msal-node v2.15.0 2024-10-03 */
const tw={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."};class dw extends Um{constructor(e,t){super(e,t),this.name="NodeAuthError"}static createInvalidLoopbackAddressTypeError(){return new dw(tw.code,`${tw.desc}`)}static createUnableToLoadRedirectUrlError(){return new dw(rw.code,`${rw.desc}`)}static createNoAuthCodeInResponseError(){return new dw(iw.code,`${iw.desc}`)}static createNoLoopbackServerExistsError(){return new dw(nw.code,`${nw.desc}`)}static createLoopbackServerAlreadyExistsError(){return new dw(ow.code,`${ow.desc}`)}static createLoopbackServerTimeoutError(){return new dw(sw.code,`${sw.desc}`)}static createStateNotFoundError(){return new dw(aw.code,aw.desc)}static createThumbprintMissingError(){return new dw(lw.code,lw.desc)}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
const cw={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:new Db,proxyUrl:Gh.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},fw={application:{appName:Gh.EMPTY_STRING,appVersion:Gh.EMPTY_STRING}};var mw,gw=new Uint8Array(16);function yw(){if(!mw&&!(mw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mw(gw)}const vw=/^(?:[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;const bw=function(e){return"string"==typeof e&&vw.test(e)};for(var ww=[],_w=0;_w<256;++_w)ww.push((_w+256).toString(16).substr(1));const xw=function(e){var t=arguments.length>1&&void 0!==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))throw TypeError("Stringified UUID is invalid");return r};const Sw=function(e,t,r){var i=(e=e||{}).random||(e.rng||yw)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=i[n];return t}return xw(i)};
/*! @azure/msal-node v2.15.0 2024-10-03 */
class kw{generateGuid(){return Sw()}isGuid(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}}var Ew=__webpack_require__(48287).Buffer;
/*! @azure/msal-node v2.15.0 2024-10-03 */class Tw{static base64Encode(e,t){return Ew.from(e,t).toString("base64")}static base64EncodeUrl(e,t){return Tw.base64Encode(e,t).replace(/=/g,Gh.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(e){return Ew.from(e,"base64").toString("utf8")}static base64DecodeUrl(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return Tw.base64Decode(t)}}var Bw=__webpack_require__(91565);
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Cw{sha256(e){return Bw.createHash(pm).update(e).digest()}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Iw{constructor(){this.hashUtils=new Cw}async generatePkceCodes(){const e=this.generateCodeVerifier();return{verifier:e,challenge:this.generateCodeChallengeFromVerifier(e)}}generateCodeVerifier(){const e=[],t=256-256%hm.length;for(;e.length<=32;){const r=Bw.randomBytes(1)[0];if(r>=t)continue;const i=r%hm.length;e.push(hm[i])}const r=e.join(Gh.EMPTY_STRING);return Tw.base64EncodeUrl(r)}generateCodeChallengeFromVerifier(e){return Tw.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Aw{constructor(){this.pkceGenerator=new Iw,this.guidGenerator=new kw,this.hashUtils=new Cw}base64UrlEncode(){throw new Error("Method not implemented.")}encodeKid(){throw new Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(e){return Tw.base64Encode(e)}base64Decode(e){return Tw.base64Decode(e)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw new Error("Method not implemented.")}removeTokenBindingKey(){throw new Error("Method not implemented.")}clearKeystore(){throw new Error("Method not implemented.")}signJwt(){throw new Error("Method not implemented.")}async hashString(e){return Tw.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Fw{static deserializeJSONBlob(e){return e?JSON.parse(e):{}}static deserializeAccounts(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,realm:i.realm,localAccountId:i.local_account_id,username:i.username,authorityType:i.authority_type,name:i.name,clientInfo:i.client_info,lastModificationTime:i.last_modification_time,lastModificationApp:i.last_modification_app,tenantProfiles:i.tenantProfiles?.map((e=>JSON.parse(e)))},o=new Uv;Gv.toObject(o,n),t[r]=o})),t}static deserializeIdTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm};t[r]=n})),t}static deserializeAccessTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm,target:i.target,cachedAt:i.cached_at,expiresOn:i.expires_on,extendedExpiresOn:i.extended_expires_on,refreshOn:i.refresh_on,keyId:i.key_id,tokenType:i.token_type,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash};t[r]=n})),t}static deserializeRefreshTokens(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r],n={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,familyId:i.family_id,target:i.target,realm:i.realm};t[r]=n})),t}static deserializeAppMetadata(e){const t={};return e&&Object.keys(e).map((function(r){const i=e[r];t[r]={clientId:i.client_id,environment:i.environment,familyId:i.family_id}})),t}static deserializeAllCache(e){return{accounts:e.Account?this.deserializeAccounts(e.Account):{},idTokens:e.IdToken?this.deserializeIdTokens(e.IdToken):{},accessTokens:e.AccessToken?this.deserializeAccessTokens(e.AccessToken):{},refreshTokens:e.RefreshToken?this.deserializeRefreshTokens(e.RefreshToken):{},appMetadata:e.AppMetadata?this.deserializeAppMetadata(e.AppMetadata):{}}}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Mw{static serializeJSONBlob(e){return JSON.stringify(e)}static serializeAccounts(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,realm:i.realm,local_account_id:i.localAccountId,username:i.username,authority_type:i.authorityType,name:i.name,client_info:i.clientInfo,last_modification_time:i.lastModificationTime,last_modification_app:i.lastModificationApp,tenantProfiles:i.tenantProfiles?.map((e=>JSON.stringify(e)))}})),t}static serializeIdTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm}})),t}static serializeAccessTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm,target:i.target,cached_at:i.cachedAt,expires_on:i.expiresOn,extended_expires_on:i.extendedExpiresOn,refresh_on:i.refreshOn,key_id:i.keyId,token_type:i.tokenType,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash}})),t}static serializeRefreshTokens(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,family_id:i.familyId,target:i.target,realm:i.realm}})),t}static serializeAppMetadata(e){const t={};return Object.keys(e).map((function(r){const i=e[r];t[r]={client_id:i.clientId,environment:i.environment,family_id:i.familyId}})),t}static serializeAllCache(e){return{Account:this.serializeAccounts(e.accounts),IdToken:this.serializeIdTokens(e.idTokens),AccessToken:this.serializeAccessTokens(e.accessTokens),RefreshToken:this.serializeRefreshTokens(e.refreshTokens),AppMetadata:this.serializeAppMetadata(e.appMetadata)}}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Dw extends Gv{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){const t={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(const r in e){const i=e[r];if("object"==typeof i)if(i instanceof Uv)t.accounts[r]=i;else if(gv(i))t.idTokens[r]=i;else if(mv(i))t.accessTokens[r]=i;else if(yv(i))t.refreshTokens[r]=i;else{if(!Sv(r,i))continue;t.appMetadata[r]=i}}return t}inMemoryCacheToCache(e){let t=this.getCache();return t={...t,...e.accounts,...e.idTokens,...e.accessTokens,...e.refreshTokens,...e.appMetadata},t}getInMemoryCache(){this.logger.trace("Getting in-memory cache");return this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache");const t=this.inMemoryCacheToCache(e);this.setCache(t),this.emitChange()}getCache(){return this.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}`);return this.getCache()[e]}setItem(e,t){this.logger.tracePii(`Item key: ${e}`);const r=this.getCache();r[e]=t,this.setCache(r)}getAccountKeys(){const e=this.getInMemoryCache();return Object.keys(e.accounts)}getTokenKeys(){const e=this.getInMemoryCache();return{idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){const t=this.getCachedAccountEntity(e);return t&&Uv.isAccountEntity(t)?this.updateOutdatedCachedAccount(e,t):null}getCachedAccountEntity(e){return this.getItem(e)?Object.assign(new Uv,this.getItem(e)):null}setAccount(e){const t=e.generateAccountKey();this.setItem(t,e)}getIdTokenCredential(e){const t=this.getItem(e);return gv(t)?t:null}setIdTokenCredential(e){const t=hv(e);this.setItem(t,e)}getAccessTokenCredential(e){const t=this.getItem(e);return mv(t)?t:null}setAccessTokenCredential(e){const t=hv(e);this.setItem(t,e)}getRefreshTokenCredential(e){const t=this.getItem(e);return yv(t)?t:null}setRefreshTokenCredential(e){const t=hv(e);this.setItem(t,e)}getAppMetadata(e){const t=this.getItem(e);return Sv(e,t)?t:null}setAppMetadata(e){const t=function({environment:e,clientId:t}){return[Ef,e,t].join(xf).toLowerCase()}(e);this.setItem(t,e)}getServerTelemetry(e){const t=this.getItem(e);return t&&function(e,t){const r=0===e.indexOf(Df.CACHE_KEY);let i=!0;return t&&(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){const t=this.getItem(e);return t&&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(){return this.getKeys().filter((e=>this.isAuthorityMetadata(e)))}setAuthorityMetadata(e,t){this.setItem(e,t)}getThrottlingCache(e){const t=this.getItem(e);return t&&function(e,t){let r=!1;e&&(r=0===e.indexOf(zf));let i=!0;return t&&(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}`);let t=!1;const r=this.getCache();return r[e]&&(delete r[e],t=!0),t&&(this.setCache(r),this.emitChange()),t}removeOutdatedAccount(e){this.removeItem(e)}containsKey(e){return this.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys");const e=this.getCache();return[...Object.keys(e)]}async clear(){this.logger.trace("Clearing cache entries created by MSAL");this.getKeys().forEach((e=>{this.removeItem(e)})),this.emitChange()}static generateInMemo
/*! @azure/msal-node v2.15.0 2024-10-03 */
const Rw={},Pw={},Ow={},zw={},Nw={};class qw{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(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");let e=Mw.serializeAllCache(this.storage.getInMemoryCache());return this.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");const e=Fw.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(e)}else this.logger.trace("No cache snapshot to deserialize")}getKVStore(){return this.storage.getCache()}async getAllAccounts(){let e;this.logger.trace("getAllAccounts called");try{return this.persistence&&(e=new Sb(this,!0),await this.persistence.beforeCacheAccess(e)),this.storage.getAllAccounts()}finally{this.persistence&&e&&await this.persistence.afterCacheAccess(e)}}async getAccountByHomeId(e){const t=await this.getAllAccounts();return e&&t&&t.length&&t.filter((t=>t.homeAccountId===e))[0]||null}async getAccountByLocalId(e){const t=await this.getAllAccounts();return e&&t&&t.length&&t.filter((t=>t.localAccountId===e))[0]||null}async removeAccount(e){let t;this.logger.trace("removeAccount called");try{this.persistence&&(t=new Sb(this,!0),await this.persistence.beforeCacheAccess(t)),await this.storage.removeAccount(Uv.generateAccountCacheKey(e))}finally{this.persistence&&t&&await this.persistence.afterCacheAccess(t)}}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(e,t){this.logger.trace("Merging in-memory cache with cache snapshot");const r=this.mergeRemovals(e,t);return this.mergeUpdates(r,t)}mergeUpdates(e,t){return Object.keys(t).forEach((r=>{const i=t[r];if(e.hasOwnProperty(r)){const t=null!==i,n="object"==typeof i,o=!Array.isArray(i),s=void 0!==e[r]&&null!==e[r];t&&n&&o&&s?this.mergeUpdates(e[r],i):e[r]=i}else null!==i&&(e[r]=i)})),e}mergeRemovals(e,t){this.logger.trace("Remove updated entries in cache");const r=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){const r={...e};return Object.keys(e).forEach((e=>{t&&t.hasOwnProperty(e)||delete r[e]})),r}overlayDefaults(e){return this.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}}}}var Uw=__webpack_require__(44040);
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Lw{static fromAssertion(e){const t=new Lw;return t.jwt=e,t}static fromCertificate(e,t,r){const i=new Lw;return i.privateKey=t,i.thumbprint=e,i.useSha256=!1,r&&(i.publicCertificate=this.parseCertificate(r)),i}static fromCertificateWithSha256Thumbprint(e,t,r){const i=new Lw;return i.privateKey=t,i.thumbprint=e,i.useSha256=!0,r&&(i.publicCertificate=this.parseCertificate(r)),i}getJwt(e,t,r){if(this.privateKey&&this.thumbprint)return this.jwt&&!this.isExpired()&&t===this.issuer&&r===this.jwtAudience?this.jwt:this.createJwt(e,t,r);if(this.jwt)return this.jwt;throw wy(ny)}createJwt(e,t,r){this.issuer=t,this.jwtAudience=r;const i=cv();this.expirationTime=i+600;const n={alg:this.useSha256?Em:km},o=this.useSha256?Tm:Bm;Object.assign(n,{[o]:Tw.base64EncodeUrl(this.thumbprint,"hex")}),this.publicCertificate&&Object.assign(n,{[Cm]:this.publicCertificate});const s={[Im]:this.jwtAudience,[Am]:this.expirationTime,[Fm]:this.issuer,[Mm]:this.issuer,[Dm]:i,[Rm]:e.createNewGuid()};return this.jwt=Uw.sign(s,this.privateKey,{header:n}),this.jwt}isExpired(){return this.expirationTime<cv()}static parseCertificate(e){const t=/-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs,r=[];let i;for(;null!==(i=t.exec(e));)r.push(i[1].replace(/\r*\n/g,Gh.EMPTY_STRING));return r}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
const jw="2.15.0";
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Hw extends db{constructor(e){super(e)}async acquireToken(e){this.logger.info("in acquireToken call in username-password client");const t=cv(),r=await this.executeTokenRequest(this.authority,e),i=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);i.validateTokenResponse(r.body);return i.handleServerTokenResponse(r.body,this.authority,t,e)}async executeTokenRequest(e,t){const r=this.createTokenQueryParameters(t),i=xy.appendQueryString(e.tokenEndpoint,r),n=await this.createTokenRequestBody(t),o=this.createTokenRequestHeaders({credential:t.username,type:ob}),s={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};return this.executePostToTokenEndpoint(i,n,o,s,t.correlationId)}async createTokenRequestBody(e){const t=new ab;t.addClientId(this.config.authOptions.clientId),t.addUsername(e.username),t.addPassword(e.password),t.addScopes(e.scopes),t.addResponseTypeForTokenAndIdToken(),t.addGrantType(gf),t.addClientInfo(),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&t.addServerTelemetry(this.serverTelemetryManager);const r=e.correlationId||this.config.cryptoInterface.createNewGuid();t.addCorrelationId(r),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret);const i=this.config.clientCredentials.clientAssertion;return i&&(t.addClientAssertion(await Eb(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(i.assertionType)),(!Bg.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.username&&t.addCcsUpn(e.username),t.createQueryString()}}var $w=__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */class Gw{constructor(e){this.config=function({auth:e,broker:t,cache:r,system:i,telemetry:n}){const o={...hw,networkClient:new Db(i?.proxyUrl,i?.customAgentOptions),loggerOptions:i?.loggerOptions||pw,disableInternalRetries:i?.disableInternalRetries||!1};if(e.clientCertificate&&!e.clientCertificate.thumbprint&&!e.clientCertificate.thumbprintSha256)throw dw.createStateNotFoundError();return{auth:{...cw,...e},broker:{...t},cache:{...uw,...r},system:{...o,...i},telemetry:{...fw,...n}}}(e),this.cryptoProvider=new Aw,this.logger=new Qm(this.config.system.loggerOptions,"@azure/msal-node",jw),this.storage=new Dw(this.logger,this.config.auth.clientId,this.cryptoProvider,function(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch(e){throw Tg(fg)}return{canonicalAuthority:e.authority?Iv(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}(this.config.auth)),this.tokenCache=new qw(this.storage,this.logger,this.config.cache.cachePlugin)}async getAuthCodeUrl(e){this.logger.info("getAuthCodeUrl called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e),responseMode:e.responseMode||ff.QUERY,authenticationScheme:Rf.BEARER},r=await this.buildOauthClientConfiguration(t.authority,t.correlationId,void 0,void 0,e.azureCloudOptions),i=new Tb(r);return this.logger.verbose("Auth code client created",t.correlationId),i.getAuthCodeUrl(t)}async acquireTokenByCode(e,t){this.logger.info("acquireTokenByCode called"),e.state&&t&&(this.logger.info("acquireTokenByCode - validating state"),this.validateState(e.state,t.state||""),t={...t,state:""});const r={...e,...await this.initializeBaseRequest(e),authenticationScheme:Rf.BEARER},i=this.initializeServerTelemetryManager(xm,r.correlationId);try{const n=await this.buildOauthClientConfiguration(r.authority,r.correlationId,i,void 0,e.azureCloudOptions),o=new Tb(n);return this.logger.verbose("Auth code client created",r.correlationId),await o.acquireToken(r,t)}catch(e){throw e instanceof Um&&e.setCorrelationId(r.correlationId),i.cacheFailedRequest(e),e}}async acquireTokenByRefreshToken(e){this.logger.info("acquireTokenByRefreshToken called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e),authenticationScheme:Rf.BEARER},r=this.initializeServerTelemetryManager(Sm,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Bb(i);return this.logger.verbose("Refresh token client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenSilent(e){const t={...e,...await this.initializeBaseRequest(e),forceRefresh:e.forceRefresh||!1},r=this.initializeServerTelemetryManager(bm,t.correlationId,t.forceRefresh);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Cb(i);return this.logger.verbose("Silent flow client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenByUsernamePassword(e){this.logger.info("acquireTokenByUsernamePassword called",e.correlationId);const t={...e,...await this.initializeBaseRequest(e)},r=this.initializeServerTelemetryManager(wm,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Hw(i);return this.logger.verbose("Username password client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}getTokenCache(){return this.logger.info("getTokenCache called"),this.tokenCache}validateState(e,t){if(!e)throw dw.createStateNotFoundError();if(e!==t)throw wy(zg)}getLogger(){return this.logger}setLogger(e){this.logger=e}async buildOauthClientConfiguration(e,t,r,i,n){this.logger.verbose("buildOauthClientConfiguration called",t);const o=n||this.config.auth.azure
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Ww{async listenForAuthCode(e,t){if(this.server)throw dw.createLoopbackServerAlreadyExistsError();return new Promise(((r,i)=>{this.server=Ab.createServer(((n,o)=>{const s=n.url;if(!s)return o.end(t||"Error occurred loading redirectUrl"),void i(dw.createUnableToLoadRedirectUrlError());if(s===Gh.FORWARD_SLASH)return void o.end(e||"Auth code was successfully acquired. You can close this window now.");const a=this.getRedirectUri(),l=_y(new URL(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)throw dw.createNoLoopbackServerExistsError();const e=this.server.address();if(!e||"string"==typeof e||!e.port)throw this.closeServer(),dw.createInvalidLoopbackAddressTypeError();const t=e&&e.port;return`${ym}${vm}:${t}`}closeServer(){this.server&&(this.server.close(),"function"==typeof this.server.closeAllConnections&&this.server.closeAllConnections(),this.server.unref(),this.server=void 0)}}
/*! @azure/msal-node v2.15.0 2024-10-03 */
class Kw extends db{constructor(e){super(e)}async acquireToken(e){const t=await this.getDeviceCode(e);e.deviceCodeCallback(t);const r=cv(),i=await this.acquireTokenWithDeviceCode(e,t),n=new kb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return n.validateTokenResponse(i),n.handleServerTokenResponse(i,this.authority,r,e)}async getDeviceCode(e){const t=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};return this.executePostRequestToDeviceCodeEndpoint(r,i,n,o)}createExtraQueryParameters(e){const t=new ab;return e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),t.createQueryString()}async executePostRequestToDeviceCodeEndpoint(e,t,r,i){const{body:{user_code:n,device_code:o,verification_uri:s,expires_in:a,interval:l,message:d}}=await this.networkManager.sendPostRequest(i,e,{body:t,headers:r});return{userCode:n,deviceCode:o,verificationUri:s,expiresIn:a,interval:l,message:d}}createQueryString(e){const t=new ab;return t.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)throw this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"),wy(Jg);if(t&&t<e&&cv()>t)throw this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${t}`),wy(ay);if(cv()>e)throw t&&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}async acquireTokenWithDeviceCode(e,t){const r=this.createTokenQueryParameters(e),i=xy.appendQueryString(this.authority.tokenEndpoint,r),n=this.createTokenRequestBody(e,t),o=this.createTokenRequestHeaders(),s=e.timeout?cv()+e.timeout:void 0,a=cv()+t.expiresIn,l=1e3*t.interval;for(;this.continuePolling(a,s,e.cancel);){const t={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=await this.executePostToTokenEndpoint(i,n,o,t,e.correlationId);if(!r.body||!r.body.error)return this.logger.verbose("Authorization completed successfully. Polling stopped."),r.body;if(r.body.error!==Gh.AUTHORIZATION_PENDING)throw this.logger.info("Unexpected error in polling from the server"),d=Nm,c=r.body.error,new Um(d,c?`${qm[d]} ${c}`:qm[d]);this.logger.info("Authorization pending. Continue polling."),await pv(l)}var d,c;throw this.logger.error("Polling stopped for unknown reasons."),wy(Qg)}createTokenRequestBody(e,t){const r=new ab;r.addScopes(e.scopes),r.addClientId(this.config.authOptions.clientId),r.addGrantType(vf),r.addDeviceCode(t.deviceCode);const i=e.correlationId||this.config.cryptoInterface.createNewGuid();return r.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 */
class Vw extends Gw{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})}async acquireTokenByDeviceCode(e){this.logger.info("acquireTokenByDeviceCode called",e.correlationId);const t=Object.assign(e,await this.initializeBaseRequest(e)),r=this.initializeServerTelemetryManager(_m,t.correlationId);try{const i=await this.buildOauthClientConfiguration(t.authority,t.correlationId,r,void 0,e.azureCloudOptions),n=new Kw(i);return this.logger.verbose("Device code client created",t.correlationId),await n.acquireToken(t)}catch(e){throw e instanceof Um&&e.setCorrelationId(t.correlationId),r.cacheFailedRequest(e),e}}async acquireTokenInteractive(e){const t=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){const r={...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};return this.nativeBrokerPlugin.acquireTokenInteractive(r,o)}const{verifier:l,challenge:d}=await this.cryptoProvider.generatePkceCodes(),c=s||new Ww;let u={},p=null;try{const o=c.listenForAuthCode(i,n).then((e=>{u=e})).catch((e=>{p=e})),s=await this.waitForRedirectUri(c),h={...a,correlationId:t,scopes:e.scopes||tf,redirectUri:s,responseMode:ff.QUERY,codeChallenge:d,codeChallengeMethod:hf.S256},f=await this.getAuthCodeUrl(h);if(await r(f),await o,p)throw p;if(u.error)throw new Jm(u.error,u.error_description,u.suberror);if(!u.code)throw dw.createNoAuthCodeInResponseError();const m=u.client_info,g={code:u.code,codeVerifier:l,clientInfo:m||Gh.EMPTY_STRING,...h};return await this.acquireTokenByCode(g)}finally{c.closeServer()}}async acquireTokenSilent(e){const t=e.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",t),this.nativeBrokerPlugin){const r={...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};return this.nativeBrokerPlugin.acquireTokenSilent(r)}return super.acquireTokenSilent(e)}async signOut(e){if(this.nativeBrokerPlugin&&e.account.nativeAccountId){const t={clientId:this.config.auth.clientId,accountId:e.account.nativeAccountId,correlationId:e.correlationId||this.cryptoProvider.createNewGuid()};await this.nativeBrokerPlugin.signOut(t)}await this.getTokenCache().removeAccount(e.account)}async getAllAccounts(){if(this.nativeBrokerPlugin){const e=this.cryptoProvider.createNewGuid();return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,e)}return this.getTokenCache().getAllAccounts()}async waitForRedirectUri(e){return new Promise(((t,r)=>{let i=0;const n=setInterval((()=>{if(Om/Pm<i)return clearInterval(n),void r(dw.createLoopbackServerTimeoutError());try{const r=e.getRedirectUri();return clearInterval(n),void t(r)}catch(e){return e instanceof Um&&e.errorCode===nw.code?void i++:(clearInterval(n),void r(e))}}),Pm)}))}}__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */
/*! @azure/msal-node v2.15.0 2024-10-03 */
const Jw="client_id",Yw="object_id",Qw="mi_res_id";class Zw{constructor(e,t,r,i){this.logger=e,this.nodeStorage=t,this.networkClient=r,this.cryptoProvider=i}async getServerTokenResponseAsync(e,t,r,i){return this.getServerTokenResponse(e)}getServerTokenResponse(e){let t,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"==typeof e.body.error?e.body.error:e.body.error?.code,error_description:e.body.message||("string"==typeof e.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}}async acquireTokenWithManagedIdentity(e,t,r,i){const n=this.createRequest(e.resource,t),o=n.headers;o[nf]=Gh.URL_FORM_CONTENT_TYPE;const s={headers:o};Object.keys(n.bodyParameters).length&&(s.body=n.computeParametersBodyString());const a=cv();let l;try{l=n.httpMethod===cm?await this.networkClient.sendPostRequestAsync(n.computeUri(),s):await this.networkClient.sendGetRequestAsync(n.computeUri(),s)}catch(e){throw e instanceof Um?e:wy(Dg)}const d=new kb(t.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),c=await this.getServerTokenResponseAsync(l,this.networkClient,n,s);return d.validateTokenResponse(c,i),d.handleServerTokenResponse(c,r,a,e)}getManagedIdentityUserAssignedIdQueryParameterKey(e){switch(e){case sm:return this.logger.info("[Managed Identity] Adding user assigned client id to the request."),Jw;case am:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request."),Qw;case lm:return this.logger.info("[Managed Identity] Adding user assigned object id to the request."),Yw;default:throw ew(qb)}}}Zw.getValidatedEnvVariableUrlString=(e,t,r,i)=>{try{return new xy(t).urlString}catch(t){throw i.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 */__webpack_require__(23313);var Xw=__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */
Xw.env.ProgramData,Xw.env.ProgramFiles;__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */__webpack_require__(65606);
/*! @azure/msal-node v2.15.0 2024-10-03 */const e_="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"};const o_=(e,t)=>{const r=`/drive/root:/${t}`;let i=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)=>{var r,i,n;let o="";const s=`/drive/root:/${t}`,a=`/drive/root:/${encodeURIComponent(t)}`;if(void 0===e.parentReference||null===e.parentReference||void 0===e.parentReference.path||null===e.parentReference.path)throw Error("x.parentReference.path is undefinded or null");const l=`${null===(r=e.parentReference)||void 0===r?void 0:r.path}/${e.name}`,d=l.startsWith(s),c=l.startsWith(a);if(d)o=l.substring(s.length+1);else{if(!c)throw Error(`we meet file/folder and do not know how to deal with it:\n${(e=>{var t,r,i;return null===(t=e.parentReference)||void 0===t||t.path,e.name,`parentPath="${null!==(i=null===(r=e.parentReference)||void 0===r?void 0:r.path)&&void 0!==i?i:"(no parentReference or path)"}", selfName="${e.name}"`})(e)}`);o=l.substring(a.length+1)}const u="folder"in e;u&&(o=`${o}/`);const p=null===(i=null==e?void 0:e.fileSystemInfo)||void 0===i?void 0:i.lastModifiedDateTime;if(null==p)throw Error(`onedrive cannot parse mtime: ${JSON.stringify(e,null,2)}`);let h=null===(n=null==e?void 0:e.fileSystemInfo)||void 0===n?void 0: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}};class a_{constructor(e,t){this.onedriveFullConfig=e,this.saveUpdatedConfigFunc=t}getAccessToken(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throw Error("The user has not manually auth yet.");const e=Date.now();if(this.onedriveFullConfig.accessTokenExpiresAtTime>e)return this.onedriveFullConfig.accessToken;{const o=yield(t=this.onedriveFullConfig.clientID,i=this.onedriveFullConfig.authority,n=this.onedriveFullConfig.refreshToken,r(void 0,void 0,void 0,(function*(){try{const e=yield(0,k.request)({url:`${i}/oauth2/v2.0/token`,method:"POST",contentType:"application/x-www-form-urlencoded",body:new URLSearchParams({tenant:"consumers",client_id:t,scope:r_.join(" "),refresh_token:n,grant_type:"refresh_token"}).toString()}),r=JSON.parse(e);return r.error,r}catch(e){throw console.error(e),e}})));if(void 0!==o.error){const e=o;throw Error(`Error while refreshing accessToken: ${e.error}, ${e.error_codes}: ${e.error_description}`)}const s=o;return this.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,yield this.saveUpdatedConfigFunc(),console.info("Onedrive accessToken updated"),this.onedriveFullConfig.accessToken}var t,i,n}))}}const l_=e=>{const t=m()(e);return t.accessToken="x",t.accessTokenExpiresInSeconds=1,t.accessTokenExpiresAtTime=1,t};class d_ extends Mp{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=new a_(e,r),this.foldersCreatedBefore=new Set}_init(){return r(this,void 0,void 0,(function*(){if(""===this.onedriveFullConfig.accessToken||""===this.onedriveFullConfig.refreshToken)throw Error("The user has not manually auth yet.");if(this.vaultFolderExists);else{const e=yield this._getJson("/drive/root/children");this.vaultFolderExists=e.value.filter((e=>e.name===this.remoteBaseDir)).length
2025-08-02 12:09:34 +08:00
/**
2026-05-06 17:32:44 +08:00
* @license lucide v0.416.0 - ISC
2025-08-02 12:09:34 +08:00
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
2026-05-06 17:32:44 +08:00
const oH=["svg",w,[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]]],sH=["svg",w,[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]]];class aH extends k.Modal{constructor(e,t,r){super(e),this.plugin=t,this.newRemotePrefix=r}onOpen(){const{contentEl:e}=this,t=(e,t)=>this.plugin.i18n.t(e,t);e.createEl("h2",{text:t("modal_remoteprefix_azureblobstorage_title")}),t("modal_remoteprefix_azureblobstorage_shortdesc").split("\n").forEach(((t,r)=>{e.createEl("p",{text:t})})),e.createEl("p",{text:t("modal_remoteprefix_azureblobstorage_tosave",{prefix:this.newRemotePrefix})}),new k.Setting(e).addButton((e=>{e.setButtonText(t("modal_remoteprefix_azureblobstorage_secondconfirm_change")),e.onClick((()=>r(this,void 0,void 0,(function*(){this.plugin.settings.azureblobstorage.remotePrefix=this.newRemotePrefix,yield this.plugin.saveSettings(),new k.Notice(t("modal_remoteprefix_azureblobstorage_notice")),this.close()})))),e.setClass("remoteprefix-azureblobstorage-second-confirm")})).addButton((e=>{e.setButtonText(t("goback")),e.onClick((()=>{this.close()}))}))}onClose(){const{contentEl:e}=this;e.empty()}}class lH extends k.Modal{constructor(e,t,r,i,n,o){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.revokeAuthSetting=n,this.t=o}onOpen(){return r(this,void 0,void 0,(function*(){const{contentEl:e}=this,t=this.t,i=(()=>{const e=new lh.OAuthConfig({clientId:U,clientSecret:L});return new lh.BoxOAuth({config:e}).getAuthorizeUrl({redirectUri:`obsidian://${q}`})})(),n=e.createDiv();n.createDiv({text:Qp(t("modal_boxauth_tutorial"))}),n.createEl("button",{text:t("modal_boxauth_copybutton")},(e=>{e.onclick=()=>r(this,void 0,void 0,(function*(){yield navigator.clipboard.writeText(i),new k.Notice(t("modal_boxauth_copynotice"))}))})),e.createEl("p").createEl("a",{href:i,text:i})}))}onClose(){const{contentEl:e}=this;e.empty()}}class dH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.authDiv=r,this.revokeAuthDiv=i,this.t=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_boxrevokeauth_step1")});const i="https://app.box.com/account/security";t.createEl("p").createEl("a",{href:i,text:i}),t.createEl("p",{text:e("modal_boxrevokeauth_step2")}),new k.Setting(t).setName(e("modal_boxrevokeauth_clean")).setDesc(e("modal_boxrevokeauth_clean_desc")).addButton((t=>r(this,void 0,void 0,(function*(){t.setButtonText(e("modal_boxrevokeauth_clean_button")),t.onClick((()=>r(this,void 0,void 0,(function*(){try{this.plugin.settings.box=m()(bh),yield this.plugin.saveSettings(),this.authDiv.toggleClass("box-auth-button-hide",""!==this.plugin.settings.box.refreshToken),this.revokeAuthDiv.toggleClass("box-revoke-auth-button-hide",""===this.plugin.settings.box.refreshToken),new k.Notice(e("modal_boxrevokeauth_clean_notice")),this.close()}catch(t){console.error(t),new k.Notice(e("modal_boxrevokeauth_clean_fail"))}}))))}))))}))}onClose(){const{contentEl:e}=this;e.empty()}}class cH extends k.Modal{constructor(e,t,r,i,n){super(e),this.plugin=t,this.t=r,this.files=i,this.fsLocal=n}onOpen(){return r(this,void 0,void 0,(function*(){const e=this.t,{contentEl:t}=this;t.createEl("p",{text:e("modal_cleardupfiles_warning")}),t.createEl("pre").createEl("code",{text:this.files.join("\n")}),new k.Setting(t).addButton((t=>{t.setButtonText(e("modal_cleardupfiles_warning_confirm")),t.onClick((()=>r(this,void 0,void 0,(function*(){var t,i;yield(t=this.files,i=this.fsLocal,r(void 0,void 0,void 0,(function*(){yield Promise.all(t.map((e=>r(void 0,void 0,void 0,(function*(){return yield i.rm(e)})))))}))),new k.Notice(e("modal_cleardupfiles_warning_finished")),this.close()}))))})).addButton((t=>{t.setButtonText(e("goback")),t.onClick((()=>{this.close()}))}))}))}
/* nosourcemap */