1import{j as V}from"./vendor-markdown-Daxr8BJC.js";import{g as ic,c as kn,r as Me}from"./vendor-charts-qvx8-m0G.js";import{G as oc,J as sc,a1 as _r,a4 as Ir,H as ht,s as Re,bN as io,bO as ac,f as En,C as oo,t as so,u as ao,D as co,d as ho,b as Rn,a9 as cc,r as lo,a8 as dn}from"./index-DVHzHwfb.js";import{S as hc,a as lc,b as dc,c as uc,d as fc}from"./select-DNjl5UiE.js";import"./progress-x8Cb0h5C.js";import{A as Xt,a as qt,b as en}from"./alert-CG7GoFPB.js";import{M as gc}from"./multi-select-CASDsYrO.js";import{C as uo}from"./circle-check-DpVZg0Xw.js";import{D as fo}from"./download-TYC08iVT.js";import{Z as pc}from"./zap-D94VqoQ7.js";import{E as mc}from"./external-link-BUHz4glL.js";import"./vendor-pdf-SjvVsPhg.js";import"./index-BdQq_4o_.js";import"./command-DDXYMLM6.js";import"./dialog-CoKHzKdp.js";import"./popover-CanDxTIt.js";/*! @azure/msal-common v16.6.2 2026-05-19 */const yc="msal.js.common",_s="https://login.microsoftonline.com/common/",wc="login.microsoftonline.com",Is="common",Cc="adfs",_c="dstsv2",Ic=`${_s}discovery/instance?api-version=1.1&authorization_endpoint=`,vr=".ciamlogin.com",tn=".onmicrosoft.com",Mr="|",vs="openid",As="profile",Yr="offline_access",vc="email",Xr="S256",Ac="application/x-www-form-urlencoded;charset=utf-8",nn="Not Available",Dr="/",go="http://169.254.169.254/metadata/instance/compute/location",bc="2020-06-01",Tc=2e3,Sc="TryAutoDetect",kc="login.microsoft.com",Ec=["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],po=240,Rc="invalid_instance",mo=200,Oc=400,yo=400,Pc=499,xc=500,Nc=599,Dt={GET:"GET",POST:"POST"},Gt=[vs,As,Yr],wo=[...Gt,vc],Pe={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},Co={ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},wt={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},On={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},xe={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",NO_SESSION:"no_session"},qr={CODE:"code",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},ei={QUERY:"query",FRAGMENT:"fragment"},bs={AUTHORIZATION_CODE_GRANT:"authorization_code",REFRESH_TOKEN_GRANT:"refresh_token"},Mc="MSSTS",Dc="ADFS",Ts="Generic",Ss="-",Ur=".",be={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},ti="appmetadata",Uc="client_info",jn="1",Lr="authority-metadata",Lc=3600*24,Ke={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},_o=5,Fc=330,Hc=50,ks="server-telemetry",Io="|",Pt=",",zc="1",Bc="0",Kc="unknown_error",pe={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},jc=60,$c=3600,Es="throttling",Gc="retry-after, h429",Wc="invalid_grant",Vc="client_mismatch",xt={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Ar={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},dt={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},Jc={Pop:"pop"},Rs=300;/*! @azure/msal-common v16.6.2 2026-05-19 */const bt="client_id",Os="redirect_uri",Qc="response_type",Zc="response_mode",Yc="grant_type",Xc="claims",qc="scope",eh="refresh_token",th="state",nh="nonce",rh="prompt",ih="code",oh="code_challenge",sh="code_challenge_method",ah="code_verifier",ch="client-request-id",hh="x-client-SKU",lh="x-client-VER",dh="x-client-OS",uh="x-client-CPU",fh="x-client-current-telemetry",gh="x-client-last-telemetry",ph="x-ms-lib-capability",mh="x-app-name",yh="x-app-ver",wh="post_logout_redirect_uri",Ch="id_token_hint",_h="client_secret",Ih="client_assertion",vh="client_assertion_type",Ps="token_type",xs="req_cnf",vo="return_spa_code",Ah="nativebroker",bh="logout_hint",Th="sid",Sh="login_hint",kh="domain_hint",Eh="x-client-xtra-sku",un="brk_client_id",$n="brk_redirect_uri",Fr="instance_aware",Rh="ear_jwk",Oh="ear_jwe_crypto",Ph="resource",xh="clidata";/*! @azure/msal-common v16.6.2 2026-05-19 */function ni(o){return`See https://aka.ms/msal.js.errors#${o} for details`}
1class me extends Error{constructor(e,t,n){const r=t||(e?ni(e):""),i=r?`${e}: ${r}`:e;super(i),Object.setPrototypeOf(this,me.prototype),this.errorCode=e||"",this.errorMessage=r||"",this.subError=n||"",this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Hr(o,e){return new me(o,e||ni(o))}/*! @azure/msal-common v16.6.2 2026-05-19 */class ri extends me{constructor(e){super(e),this.name="ClientConfigurationError",Object.setPrototypeOf(this,ri.prototype)}}function ge(o){return new ri(o)}/*! @azure/msal-common v16.6.2 2026-05-19 */class Ve{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),r=i=>decodeURIComponent(i.replace(/\+/g," "));return n.forEach(i=>{if(i.trim()){const[s,a]=i.split(/=(.+)/g,2);s&&a&&(t[r(s)]=r(a))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}}/*! @azure/msal-common v16.6.2 2026-05-19 */class ii extends me{constructor(e,t){super(e,t),this.name="ClientAuthError",Object.setPrototypeOf(this,ii.prototype)}}function j(o,e){return new ii(o,e)}/*! @azure/msal-common v16.6.2 2026-05-19 */const Nh="redirect_uri_empty",Mh="authority_uri_insecure",Pn="url_parse_error",Dh="empty_url_error",Uh="empty_input_scopes_error",Ns="invalid_claims",Lh="token_request_empty",Fh="logout_request_empty",Ms="pkce_params_missing",Ds="invalid_cloud_discovery_metadata",Hh="invalid_authority_metadata",zh="untrusted_authority",oi="missing_ssh_jwk",Bh="missing_ssh_kid",Kh="cannot_set_OIDCOptions",jh="cannot_allow_platform_broker",$h="authority_mismatch",Gh="invalid_request_method_for_EAR",Wh="invalid_platform_broker_configuration",br="issuer_validation_failed";/*! @azure/msal-common v16.6.2 2026-05-19 */const Us="client_info_decoding_error",Vh="client_info_empty_error",Ls="token_parsing_error",Jh="null_or_empty_token",ut="endpoints_resolution_error",Qh="network_error",Zh="openid_config_error",Yh="hash_not_deserialized",fn="invalid_state",Xh="state_mismatch",Ao="state_not_found",qh="nonce_mismatch",Fs="auth_time_not_found",el="max_age_transpired",tl="multiple_matching_appMetadata",nl="request_cannot_be_made",rl="cannot_remove_empty_scope",il="cannot_append_scopeset",bo="empty_input_scopeset",Hs="no_account_in_silent_request",ol="invalid_cache_record",zs="invalid_cache_environment",To="no_account_found",Bs="no_crypto_object",mt="token_refresh_required",sl="token_claims_cnf_required_for_signedjwt",al="authorization_code_missing_from_server_response",cl="binding_key_not_removed",hl="end_session_endpoint_not_supported",Ks="key_id_missing",ce="method_not_implemented",ll="resource_parameter_required",dl="misplaced_resource_parameter";/*! @azure/msal-common v16.6.2 2026-05-19 */class ke{constructor(e){const t=e?Ve.trimArrayEntries([...e]):[],n=t?Ve.removeEmptyStringsFromArray(t):[];if(!n||!n.length)throw ge(Uh);this.scopes=new Set,n.forEach(r=>this.scopes.add(r))}static fromString(e){const n=(e||"").split(" ");return new ke(n)}static createSearchScopes(e){const t=e&&e.length>0?e:[...Gt],n=new ke(t);return n.containsOnlyOIDCScopes()?n.removeScope(Yr):n.removeOIDCScopes(),n}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new ke(t);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return wo.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw j(il)}}removeScope(e){if(!e)throw j(rl);this.scopes.delete(e.trim())}removeOIDCScopes(){wo.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw j(bo);const t=new Set;return e.scopes.forEach(n=>
1t.add(n.toLowerCase())),this.scopes.forEach(n=>t.add(n.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw j(bo);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),r=this.getScopeCount();return t.size<r+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):""}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v16.6.2 2026-05-19 */function sr(o,e,t){if(!e)return;const n=o.get(bt);n&&o.has(un)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:o.get(Os)},e))}function si(o,e){o.set(Qc,e)}function ul(o,e){o.set(Zc,e||ei.QUERY)}function fl(o){o.set(Ah,"1")}function ai(o,e,t=!0,n=Gt){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const r=t?[...e||[],...n]:e||[],i=new ke(r);o.set(qc,i.printScopes())}function ci(o,e){o.set(bt,e)}function hi(o,e){o.set(Os,e)}function gl(o,e){o.set(wh,e)}function pl(o,e){o.set(Ch,e)}function ml(o,e){o.set(kh,e)}function xn(o,e){o.set(Sh,e)}function Gn(o,e){o.set(Pe.CCS_HEADER,`UPN:${e}`)}function an(o,e){o.set(Pe.CCS_HEADER,`Oid:${e.uid}@${e.utid}`)}function So(o,e){o.set(Th,e)}function li(o,e,t,n){const r=n&&o.has(un)?void 0:t;if(!Ve.isEmptyObj(e)||r&&r.length>0){const i=Qs(e,r);try{JSON.parse(i)}catch{throw ge(Ns)}o.set(Xc,i)}}function _n(o,e){o.set(ch,e)}function di(o,e){o.set(hh,e.sku),o.set(lh,e.version),e.os&&o.set(dh,e.os),e.cpu&&o.set(uh,e.cpu)}function ui(o,e){e!=null&&e.appName&&o.set(mh,e.appName),e!=null&&e.appVersion&&o.set(yh,e.appVersion)}function yl(o,e){o.set(rh,e)}function js(o,e){e&&o.set(th,e)}function wl(o,e){o.set(nh,e)}function fi(o,e,t){if(e&&t)o.set(oh,e),o.set(sh,t);else throw ge(Ms)}function Cl(o,e){o.set(ih,e)}function _l(o,e){o.set(eh,e)}function Il(o,e){o.set(ah,e)}function $s(o,e){o.set(_h,e)}function Gs(o,e){e&&o.set(Ih,e)}function Ws(o,e){e&&o.set(vh,e)}function Vs(o,e){o.set(Yc,e)}function gi(o){o.set(Uc,"1")}function vl(o){o.set(xh,"1")}function Js(o){o.has(Fr)||o.set(Fr,"true")}function tt(o,e){Object.entries(e).forEach(([t,n])=>{!o.has(t)&&n&&o.set(t,n)})}function Qs(o,e){let t;if(!o)t={};else try{t=JSON.parse(o)}catch{throw ge(Ns)}return e&&e.length>0&&(t.hasOwnProperty(On.ACCESS_TOKEN)||(t[On.ACCESS_TOKEN]={}),t[On.ACCESS_TOKEN][On.XMS_CC]={values:e}),JSON.stringify(t)}function pi(o,e){e&&(o.set(Ps,pe.POP),o.set(xs,e))}function Zs(o,e){e&&(o.set(Ps,pe.SSH),o.set(xs,e))}function Ys(o,e){o.set(fh,e.generateCurrentRequestHeaderValue()),o.set(gh,e.generateLastRequestHeaderValue())}function Xs(o){o.set(ph,Gc)}function Al(o,e){o.set(bh,e)}function ar(o,e,t){o.has(un)||o.set(un,e),o.has($n)||o.set($n,t)}function bl(o,e){o.set(Rh,encodeURIComponent(e)),o.set(Oh,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}function qs(o,e){e&&o.set(Ph,e)}/*! @azure/msal-common v16.6.2 2026-05-19 */function ko(o){if(!o)return o;let e=o.toLowerCase();return Ve.endsWith(e,"?")?e=e.slice(0,-1):Ve.endsWith(e,"?/")&&(e=e.slice(0,-2)),Ve.endsWith(e,"/")||(e+="/"),e}function ea(o){return o.startsWith("#/")?o.substring(2):o.startsWith("#")||o.startsWith("?")?o.substring(1):o}function Wn(o){if(!o||o.indexOf("=")<0)return null;try{const e=ea(o),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.ear_jwe||t.error||t.error_description||t.state)return t}catch{throw j(Yh)}return null}function gn(o){const e=new Array;return o.forEach((t,n)=>{e.push(`${n}=${encodeURIComponent(t)}`)}),e.join("&")}function Eo(o){if(!o)return o;const e=o.split("#")[0];try{const t=new URL(e),n=t.origin+t.pathname+t.search;return ko(n)}catch{return ko(e)}}/*! @azure/msal-common v16.6.2 2026-05-19 */const Vn={createNewGuid:()=>{throw j(ce)},base64Decode:()=>{throw j(ce)},base64Encode:()=>{throw j(ce)},base64UrlEncode:()=>{throw j(ce)},encodeKid:()=>{throw j(ce)},async getPublicKeyThumbprint(){throw j(ce)},async removeTokenBindingKey(){throw j(ce)},async clearKeystore(){throw j(ce)},async signJwt(){throw j(ce)},async hashString(){throw j(ce)}};/*! @azure/msal-common v16.6.2 2026-05-19 */var we;(function(o){o[o.Error=0]="Error",o[o.Warning=1]="Warning",o[o.Info=2]="Info",o[o.Verbose
1=3]="Verbose",o[o.Trace=4]="Trace"})(we||(we={}));const Tl=50,Sl=500,vt=new Map;function kl(o,e){vt.delete(o),vt.set(o,e)}function El(o,e){const t=Date.now();let n=vt.get(o);if(n)kl(o,n);else if(n={logs:[],firstEventTime:t},vt.set(o,n),vt.size>Tl){const r=vt.keys().next().value;r&&vt.delete(r)}n.logs.push({...e,milliseconds:t-n.firstEventTime}),n.logs.length>Sl&&n.logs.shift()}function Rl(o){if(o.length!==6)return!1;for(let e=0;e<o.length;e++){const t=o[e];if(!(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"))return!1}return!0}class rt{constructor(e,t,n){this.level=we.Info;const r=()=>{},i=e||rt.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||r,this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level=typeof i.logLevel=="number"?i.logLevel:we.Info,this.packageName=t||"",this.packageVersion=n||""}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:we.Info}}clone(e,t){return new rt({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level},e,t)}logMessage(e,t){const n=t.correlationId;if(Rl(e)){const c={hash:e,level:t.logLevel,containsPii:t.containsPii||!1,milliseconds:0};El(n,c)}if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const a=`${`[${new Date().toUTCString()}] : [${n}]`} : ${this.packageName}@${this.packageVersion} : ${we[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,a,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:we.Error,containsPii:!1,correlationId:t})}errorPii(e,t){this.logMessage(e,{logLevel:we.Error,containsPii:!0,correlationId:t})}warning(e,t){this.logMessage(e,{logLevel:we.Warning,containsPii:!1,correlationId:t})}warningPii(e,t){this.logMessage(e,{logLevel:we.Warning,containsPii:!0,correlationId:t})}info(e,t){this.logMessage(e,{logLevel:we.Info,containsPii:!1,correlationId:t})}infoPii(e,t){this.logMessage(e,{logLevel:we.Info,containsPii:!0,correlationId:t})}verbose(e,t){this.logMessage(e,{logLevel:we.Verbose,containsPii:!1,correlationId:t})}verbosePii(e,t){this.logMessage(e,{logLevel:we.Verbose,containsPii:!0,correlationId:t})}trace(e,t){this.logMessage(e,{logLevel:we.Trace,containsPii:!1,correlationId:t})}tracePii(e,t){this.logMessage(e,{logLevel:we.Trace,containsPii:!0,correlationId:t})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v16.6.2 2026-05-19 */const cr="@azure/msal-common",In="16.6.2";/*! @azure/msal-common v16.6.2 2026-05-19 */const mi={None:"none"};/*! @azure/msal-common v16.6.2 2026-05-19 */function Ro(o,e){return!!o&&!!e&&o===e.split(".")[1]}function Wt(o,e,t,n){if(n){const{oid:r,sub:i,tid:s,name:a,tfp:c,acr:h,preferred_username:l,upn:u,login_hint:m}=n,f=s||c||h||"";return{tenantId:f,localAccountId:r||i||"",name:a,username:l||u||"",loginHint:m,isHomeTenant:Ro(f,o),upn:u}}else return{tenantId:t,localAccountId:e,username:"",isHomeTenant:Ro(t,o)}}function Jn(o,e,t,n){let r=o;if(e){const{isHomeTenant:i,...s}=e;r={...o,...s}}if(t){const{isHomeTenant:i,...s}=Wt(o.homeAccountId,o.localAccountId,o.tenantId,t);return r={...r,...s,idTokenClaims:t,idToken:n},r}return r}/*! @azure/msal-common v16.6.2 2026-05-19 */function et(o,e){const t=Ol(o);try{const n=e(t);return JSON.parse(n)}catch{throw j(Ls)}}function ot(o){if(!o.signin_state)return!1;const e=["kmsi","dvc_dmjd"];return o.signin_state.some(t=>e.includes(t.trim().toLowerCase()))}function Ol(o){if(!o)throw j(Jh);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(o);if(!t||t.length<4)throw j(Ls);return t[2]}function ta(o,e){if(e===0||Date.now()-3e5>o+e)throw j(el)}/*! @azure/msal-common v16.6.2 2026-05-19 */class fe{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw ge(Dh);e.includes("#")||(this._urlString=fe.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Ve.endsWith(t,"?")?t=t.slice(0,-1):Ve.endsWith(t,"?/")&&(t=t.
1slice(0,-2)),Ve.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw ge(Pn)}if(!e.HostNameAndPort||!e.PathSegments)throw ge(Pn);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw ge(Mh)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return fe.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return e&&n.length!==0&&(n[0]===wt.COMMON||n[0]===wt.ORGANIZATIONS)&&(n[0]=e),fe.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw ge(Pn);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let r=n.AbsolutePath.split("/");return r=r.filter(i=>i&&i.length>0),n.PathSegments=r,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw ge(Pn);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===Dr){const r=new fe(t).getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new fe(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}}/*! @azure/msal-common v16.6.2 2026-05-19 */const Pl=[{host:"login.microsoftonline.com"},{host:"login.chinacloudapi.cn",issuerHost:"login.partner.microsoftonline.cn"},{host:"login.microsoftonline.us"},{host:"login.sovcloud-identity.fr"},{host:"login.sovcloud-identity.de"},{host:"login.sovcloud-identity.sg"}];function xl(o,e){return{token_endpoint:`https://${o}/{tenantid}/oauth2/v2.0/token`,jwks_uri:`https://${o}/{tenantid}/discovery/v2.0/keys`,issuer:`https://${e}/{tenantid}/v2.0`,authorization_endpoint:`https://${o}/{tenantid}/oauth2/v2.0/authorize`,end_session_endpoint:`https://${o}/{tenantid}/oauth2/v2.0/logout`}}const Nl=Pl.reduce((o,{host:e,issuerHost:t})=>(o[e]=xl(e,t||e),o),{}),na={endpointMetadata:Nl,instanceDiscoveryMetadata:{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"]},{preferred_network:"login.sovcloud-identity.fr",preferred_cache:"login.sovcloud-identity.fr",aliases:["login.sovcloud-identity.fr"]},{preferred_network:"login.sovcloud-identity.de",preferred_cache:"login.sovcloud-identity.de",aliases:["login.sovcloud-identity.de"]},{preferred_network:"login.sovcloud-identity.sg",preferred_cache:"login.sovcloud-identity.sg",aliases:["login.sovcloud-identity.sg"]},{preferred_network:"login.windows-ppe.net",preferred_cache:"login.windows-ppe.net",aliases:["login.windows-ppe.net","sts.windows-ppe.net","login.microsoft-ppe.com"]}]}},Oo=na.endpointMetadata,yi=na.instanceDiscoveryMetadata,ra=new Set;yi.metadata.forEach(o=>{o.aliases.forEach(e=>{ra.add(e)})});function Ml(o,e,t){var i;let n;const r=o.canonicalAuthority;if(r){const s=new fe(r).getUrlComponents().HostNameAndPort;n=Po(e,t,s,(i=o.cloudDiscoveryMetadata)==null?void 0:i.metadata)||Po(e,t,s,yi.metadata)||o.knownAuthorities}return n||[]}function Po(o,e,t,n,r){if(o.trace("1bmquz",e),t&&n){const i=Qn(n,t);if(i)return o.trace("1fotbt",e),i.aliases;o.trace("14avvj",e)}return null}function Dl(o){return Qn(yi.metadata,o)}function Qn(o,e){for(let t=0;t<o.length;t++){const n=o[t];if(n.aliases.includes(e))return n}return null}/*! @azure/msal-common v16.6.2 2026-05-19 */const zr="cache_quota_exceeded",Ul="cache_error_unknown";
1/*! @azure/msal-common v16.6.2 2026-05-19 */class Ut extends Error{constructor(e,t){const n=t||ni(e);super(n),Object.setPrototypeOf(this,Ut.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}function Br(o){return o instanceof Error?o.name==="QuotaExceededError"||o.name==="NS_ERROR_DOM_QUOTA_REACHED"||o.message.includes("exceeded the quota")?new Ut(zr):new Ut(o.name,o.message):new Ut(Ul)}/*! @azure/msal-common v16.6.2 2026-05-19 */function Zn(o,e){if(!o)throw j(Vh);try{const t=e(o);return JSON.parse(t)}catch{throw j(Us)}}function Lt(o){if(!o)throw j(Us);const e=o.split(Ur,2);return{uid:e[0],utid:e.length<2?"":e[1]}}/*! @azure/msal-common v16.6.2 2026-05-19 */const Ge={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v16.6.2 2026-05-19 */function wi(o){return o&&(o.tid||o.tfp||o.acr)||null}/*! @azure/msal-common v16.6.2 2026-05-19 */const Ue={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"};/*! @azure/msal-common v16.6.2 2026-05-19 */function Tt(o){const e=o.tenantProfiles||[];return e.length===0&&o.realm&&o.localAccountId&&e.push(Wt(o.homeAccountId,o.localAccountId,o.realm)),{homeAccountId:o.homeAccountId,environment:o.environment,tenantId:o.realm,username:o.username,localAccountId:o.localAccountId,loginHint:o.loginHint,name:o.name,nativeAccountId:o.nativeAccountId,authorityType:o.authorityType,tenantProfiles:new Map(e.map(t=>[t.tenantId,t])),dataBoundary:o.dataBoundary}}function Ll(o,e,t){var y,p,C,w,I,A,k;let n;e.authorityType===Ge.Adfs?n=Dc:e.protocolMode===Ue.OIDC?n=Ts:n=Mc;let r,i;o.clientInfo&&t&&(r=Zn(o.clientInfo,t),r.xms_tdbr&&(i=r.xms_tdbr==="EU"?"EU":"None"));const s=o.environment||e&&e.getPreferredCache();if(!s)throw j(zs);const a=((y=o.idTokenClaims)==null?void 0:y.preferred_username)||((p=o.idTokenClaims)==null?void 0:p.upn),c=(C=o.idTokenClaims)!=null&&C.emails?o.idTokenClaims.emails[0]:null,h=a||c||"",l=(w=o.idTokenClaims)==null?void 0:w.login_hint,u=(r==null?void 0:r.utid)||wi(o.idTokenClaims)||"",m=(r==null?void 0:r.uid)||((I=o.idTokenClaims)==null?void 0:I.oid)||((A=o.idTokenClaims)==null?void 0:A.sub)||"";let f;return o.tenantProfiles?f=o.tenantProfiles:f=[Wt(o.homeAccountId,m,u,o.idTokenClaims)],{homeAccountId:o.homeAccountId,environment:s,realm:u,localAccountId:m,username:h,authorityType:n,loginHint:l,clientInfo:o.clientInfo,name:((k=o.idTokenClaims)==null?void 0:k.name)||"",lastModificationTime:void 0,lastModificationApp:void 0,cloudGraphHostName:o.cloudGraphHostName,msGraphHost:o.msGraphHost,nativeAccountId:o.nativeAccountId,tenantProfiles:f,dataBoundary:i}}function Fl(o,e,t){var r;const n=Array.from(((r=o.tenantProfiles)==null?void 0:r.values())||[]);return n.length===0&&o.tenantId&&o.localAccountId&&n.push(Wt(o.homeAccountId,o.localAccountId,o.tenantId,o.idTokenClaims)),{authorityType:o.authorityType||Ts,homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,nativeAccountId:o.nativeAccountId,realm:o.tenantId,environment:o.environment,username:o.username,loginHint:o.loginHint,name:o.name,cloudGraphHostName:e,msGraphHost:t,tenantProfiles:n,dataBoundary:o.dataBoundary}}function ia(o,e,t,n,r,i){if(!(e===Ge.Adfs||e===Ge.Dsts)){if(o)try{const s=Zn(o,n.base64Decode);if(s.uid&&s.utid)return`${s.uid}.${s.utid}`}catch{}t.warning("1ub6wv",r)}return(i==null?void 0:i.sub)||""}function Hl(o){return o?o.hasOwnProperty("homeAccountId")&&o.hasOwnProperty("environment")&&o.hasOwnProperty("realm")&&o.hasOwnProperty("localAccountId")&&o.hasOwnProperty("username")&&o.hasOwnProperty("authorityType"):!1}/*! @azure/msal-common v16.6.2 2026-05-19 */class Kr{constructor(e,t,n,r,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(cr,In),this.staticAuthorityOptions=i,this.performanceClient=r}getAllAccounts(e={},t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(Object.keys(e).length===0||Object.values(e).every(r=>r==null||r===""))return this.commonLogger.warning("1skb02",t),null;const n=this.getAllAccounts(e,t);return n.length>1?n.sort((i,s)=>{const a=i.idTokenClaims?1:0;return(s.idTokenClaims?1:0)-a})[0]:n.length===1?n[0]:null}getBaseAccountInfo(e,t){const n=this.getAccountsFilteredBy(e,t);return n.length>0?Tt(n[0]):null}
1buildTenantProfiles(e,t,n){return e.flatMap(r=>this.getTenantProfilesFromAccountEntity(r,t,n==null?void 0:n.tenantId,n))}getTenantedAccountInfoByFilter(e,t,n,r,i){let s=null,a;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const c=this.getIdToken(e,r,t,n.tenantId);return c&&(a=et(c.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(a,i))?null:(s=Jn(e,n,a,c==null?void 0:c.secret),s)}getTenantProfilesFromAccountEntity(e,t,n,r){const i=Tt(e);let s=i.tenantProfiles||new Map;const a=this.getTokenKeys();if(n){const h=s.get(n);if(h)s=new Map([[n,h]]);else return[]}const c=[];return s.forEach(h=>{const l=this.getTenantedAccountInfoByFilter(i,a,h,t,r);l&&c.push(l)}),c}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant||t.username&&!(this.matchUsername(e.username,t.username)||!this.matchUsername(e.upn,t.username))||t.loginHint&&!this.matchLoginHintWithTenantProfile(e,t.loginHint)||t.upn&&e.upn!==t.upn)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)&&!this.matchUsername(e.upn,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,n,r,i){var s;if(!e)throw j(ol);try{e.account&&await this.setAccount(e.account,t,n,r),e.idToken&&(i==null?void 0:i.idToken)!==!1&&await this.setIdTokenCredential(e.idToken,t,n),e.accessToken&&(i==null?void 0:i.accessToken)!==!1&&await this.saveAccessToken(e.accessToken,t,n),e.refreshToken&&(i==null?void 0:i.refreshToken)!==!1&&await this.setRefreshTokenCredential(e.refreshToken,t,n),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(a){throw(s=this.commonLogger)==null||s.error("0j476p",t),a instanceof me?a:Br(a)}}async saveAccessToken(e,t,n){const r={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType},i=this.getTokenKeys(),s=ke.fromString(e.target);i.accessToken.forEach(a=>{if(!this.accessTokenKeyMatchesFilter(a,r,!1))return;const c=this.getAccessTokenCredential(a,t);c&&this.credentialMatchesFilter(c,r,t)&&ke.fromString(c.target).intersectingScopeSets(s)&&this.removeAccessToken(a,t)}),await this.setAccessTokenCredential(e,t,n)}getAccountsFilteredBy(e,t){const n=this.getAccountKeys(),r=[];return n.forEach(i=>{var h;const s=this.getAccount(i,t);if(!s||e.homeAccountId&&!this.matchHomeAccountId(s,e.homeAccountId)||e.environment&&!this.matchEnvironment(s,e.environment,t)||e.realm&&!this.matchRealm(s,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(s,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(s,e.authorityType))return;const a={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name,username:e==null?void 0:e.username,loginHint:e==null?void 0:e.loginHint,upn:e==null?void 0:e.upn},c=(h=s.tenantProfiles)==null?void 0:h.filter(l=>this.tenantProfileMatchesFilter(l,a));c&&c.length===0||r.push(s)}),r}credentialMatchesFilter(e,t,n){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment,n)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||e.credentialType===be.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===pe.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e,t){const n=this.getKeys(),r={};return n.forEach(i=>{if(!this.isAppMetadata(i))return;const s=this.getAppMetadata(i,t);s&&(e.environment&&!this.matchEnvironment(s,e.environment,t)||e.clientId&&!this.matchClientId(s,e.clientId)||(r[i]=s))}),r}getAuthorityMetadataByAlias(e,t){const n=this.getAuthorityMetadataKeys();let r=null;
1return n.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const s=this.getAuthorityMetadata(i,t);s&&s.aliases.indexOf(e)!==-1&&(r=s)}),r}removeAllAccounts(e){this.getAllAccounts({},e).forEach(n=>{this.removeAccount(n,e)})}removeAccount(e,t){this.removeAccountContext(e,t);const n=this.getAccountKeys(),r=i=>i.includes(e.homeAccountId)&&i.includes(e.environment);n.filter(r).forEach(i=>{this.removeItem(i,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const n=this.getTokenKeys(),r=i=>i.includes(e.homeAccountId)&&i.includes(e.environment);n.idToken.filter(r).forEach(i=>{this.removeIdToken(i,t)}),n.accessToken.filter(r).forEach(i=>{this.removeAccessToken(i,t)}),n.refreshToken.filter(r).forEach(i=>{this.removeRefreshToken(i,t)})}removeAccessToken(e,t){const n=this.getAccessTokenCredential(e,t);if(n&&(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),n.credentialType.toLowerCase()===be.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&n.tokenType===pe.POP)){const i=n.keyId;i&&this.cryptoImpl.removeTokenBindingKey(i,t).catch(()=>{var s;this.commonLogger.error("0cx291",t),(s=this.performanceClient)==null||s.incrementFields({removeTokenBindingKeyFailure:1},t)})}}removeAppMetadata(e){return this.getKeys().forEach(n=>{this.isAppMetadata(n)&&this.removeItem(n,e)}),!0}getIdToken(e,t,n,r){this.commonLogger.trace("1drz22",t);const i={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:be.ID_TOKEN,clientId:this.clientId,realm:r},s=this.getIdTokensByFilter(i,t,n),a=s.size;if(a<1)return this.commonLogger.info("1atvtd",t),null;if(a>1){let c=s;if(!r){const h=new Map;s.forEach((u,m)=>{u.realm===e.tenantId&&h.set(m,u)});const l=h.size;if(l<1)return this.commonLogger.info("0ooalx",t),s.values().next().value??null;if(l===1)return this.commonLogger.info("1eq2vc",t),h.values().next().value??null;c=h}return this.commonLogger.info("1ws328",t),c.forEach((h,l)=>{this.removeIdToken(l,t)}),this.performanceClient.addFields({multiMatchedID:s.size},t),null}return this.commonLogger.info("1sm769",t),s.values().next().value??null}getIdTokensByFilter(e,t,n){const r=n&&n.idToken||this.getTokenKeys().idToken,i=new Map;return r.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,{clientId:this.clientId,...e}))return;const a=this.getIdTokenCredential(s,t);a&&this.credentialMatchesFilter(a,e,t)&&i.set(s,a)}),i}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,n,r){const i=t.correlationId;this.commonLogger.trace("1t7hz1",i);const s=ke.createSearchScopes(t.scopes),a=t.authenticationScheme||pe.BEARER,c=a.toLowerCase()!==pe.BEARER.toLowerCase()?be.ACCESS_TOKEN_WITH_AUTH_SCHEME:be.ACCESS_TOKEN,h={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:c,clientId:this.clientId,realm:r||e.tenantId,target:s,tokenType:a,keyId:t.sshKid},l=n&&n.accessToken||this.getTokenKeys().accessToken,u=[];l.forEach(f=>{if(this.accessTokenKeyMatchesFilter(f,h,!0)){const y=this.getAccessTokenCredential(f,i);y&&this.credentialMatchesFilter(y,h,i)&&u.push(y)}});const m=u.length;return m<1?(this.commonLogger.info("1nckna",i),null):m>1?(this.commonLogger.info("1wkfwp",i),u.forEach(f=>{this.removeAccessToken(this.generateCredentialKey(f),i)}),this.performanceClient.addFields({multiMatchedAT:u.length},i),null):(this.commonLogger.info("06yt98",i),u[0])}accessTokenKeyMatchesFilter(e,t,n){const r=e.toLowerCase();if(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&r.indexOf(t.realm.toLowerCase())===-1)return!1;if(t.target){const i=t.target.asArray();for(let s=0;s<i.length;s++){if(n&&!r.includes(i[s].toLowerCase()))return!1;if(!n&&r.includes(i[s].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const n=this.getTokenKeys(),r=[];
1return n.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const s=this.getAccessTokenCredential(i,t);s&&this.credentialMatchesFilter(s,e,t)&&r.push(s)}),r}getRefreshToken(e,t,n,r){this.commonLogger.trace("0x53vi",n);const i=t?jn:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:be.REFRESH_TOKEN,clientId:this.clientId,familyId:i},a=r&&r.refreshToken||this.getTokenKeys().refreshToken,c=[];a.forEach(l=>{if(this.refreshTokenKeyMatchesFilter(l,s)){const u=this.getRefreshTokenCredential(l,n);u&&this.credentialMatchesFilter(u,s,n)&&c.push(u)}});const h=c.length;return h<1?(this.commonLogger.info("0dlw11",n),null):(h>1&&this.performanceClient.addFields({multiMatchedRT:h},n),this.commonLogger.info("0wcnep",n),c[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.familyId&&n.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e,t){const n={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(n,t),i=Object.keys(r).map(a=>r[a]),s=i.length;if(s<1)return null;if(s>1)throw j(tl);return i[0]}isAppMetadataFOCI(e,t){const n=this.readAppMetadataFromCache(e,t);return!!(n&&n.familyId===jn)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const n=e.oid||e.sub;return t===n}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return t.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchLoginHintWithTenantProfile(e,t){return e.loginHint===t||e.username===t||e.upn===t}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t,n){if(this.staticAuthorityOptions){const i=Ml(this.staticAuthorityOptions,this.commonLogger,n);if(i.includes(t)&&i.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t,n);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var n;return((n=e.realm)==null?void 0:n.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return!!(e.login_hint===t||e.preferred_username===t||e.upn===t||e.emails&&e.emails.includes(t))}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==be.ACCESS_TOKEN&&e.credentialType!==be.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:ke.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(ti)!==-1}isAuthorityMetadata(e){return e.indexOf(Lr)!==-1}generateAuthorityMetadataCacheKey(e){return`${Lr}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class zl extends Kr{async setAccount(){throw j(ce)}getAccount(){throw j(ce)}async setIdTokenCredential(){throw j(ce)}getIdTokenCredential(){throw j(ce)}async setAccessTokenCredential(){throw j(ce)}getAccessTokenCredential(){throw j(ce)}async setRefreshTokenCredential(){throw j(ce)}getRefreshTokenCredential(){throw j(ce)}setAppMetadata(){throw j(ce)}getAppMetadata(){throw j(ce)}setServerTelemetry(){throw j(ce)}getServerTelemetry(){throw j(ce)}setAuthorityMetadata(){throw j(ce)}getAuthorityMetadata(){throw j(ce)}getAuthorityMetadataKeys(){throw j(ce)}setThrottlingCache(){throw j(ce)}getThrottlingCache(){throw j(ce)}removeItem(){throw j(ce)}getKeys(){throw j(ce)}getAccountKeys(){throw j(ce)}getTokenKeys(){throw j(ce)}generateCredentialKey(){throw j(ce)}generateAccountKey(){throw j(ce)}}/*! @azure/msal-common v16.6.2 2026-05-19 */const Bl={InProgress:1};/*! @azure/msal-common v16.6.2 2026-05-19 */class oa{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Bl.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""}}}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-common v16.6.2 2026-05-19 */const sa={tokenRenewalOffsetSeconds:Rs,preventCorsPreflight:!1},Kl={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:we.Info,correlationId:""},jl={async sendGetRequestAsync(){throw j(ce)},async sendPostRequestAsync(){throw j(ce)}},$l={sku:yc,version:In,cpu:"",os:""},Gl={clientSecret:"",clientAssertion:void 0},Wl={azureCloudInstance:mi.None,tenant:`${Is}`},Vl={application:{appName:"",appVersion:""}};function Ci({authOptions:o,systemOptions:e,loggerOptions:t,storageInterface:n,networkInterface:r,cryptoInterface:i,clientCredentials:s,library
1Info:a,telemetry:c,serverTelemetryManager:h,persistencePlugin:l,serializableCache:u}){const m={...Kl,...t};return{authOptions:Jl(o),systemOptions:{...sa,...e},loggerOptions:m,storageInterface:n||new zl(o.clientId,Vn,new rt(m),new oa),networkInterface:r||jl,cryptoInterface:i||Vn,clientCredentials:s||Gl,libraryInfo:{...$l,...a},telemetry:{...Vl,...c},serverTelemetryManager:h||null,persistencePlugin:l||null,serializableCache:u||null}}function Jl(o){return{clientCapabilities:[],azureCloudOptions:Wl,instanceAware:!1,isMcp:!1,...o}}function aa(o){return o.authOptions.authority.options.protocolMode===Ue.OIDC}/*! @azure/msal-common v16.6.2 2026-05-19 */class Ql{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v16.6.2 2026-05-19 */function Je(){return Math.round(new Date().getTime()/1e3)}function Yn(o){return o.getTime()/1e3}function Fn(o){return o?new Date(Number(o)*1e3):new Date}function Xn(o,e){const t=Number(o)||0;return Je()+e>t}function xo(o,e){const t=Number(o)+e*24*60*60*1e3;return Date.now()>t}function Zl(o){return Number(o)>Je()}/*! @azure/msal-common v16.6.2 2026-05-19 */function hr(o,e,t,n,r){return{credentialType:be.ID_TOKEN,homeAccountId:o,environment:e,clientId:n,secret:t,realm:r,lastUpdatedAt:Date.now().toString()}}function lr(o,e,t,n,r,i,s,a,c,h,l,u,m){var y,p;const f={homeAccountId:o,credentialType:be.ACCESS_TOKEN,secret:t,cachedAt:Je().toString(),expiresOn:s.toString(),extendedExpiresOn:a.toString(),environment:e,clientId:n,realm:r,target:i,tokenType:l||pe.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(f.userAssertionHash=u),h&&(f.refreshOn=h.toString()),((y=f.tokenType)==null?void 0:y.toLowerCase())!==pe.BEARER.toLowerCase())switch(f.credentialType=be.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case pe.POP:const C=et(t,c);if(!((p=C==null?void 0:C.cnf)!=null&&p.kid))throw j(sl);f.keyId=C.cnf.kid;break;case pe.SSH:f.keyId=m}return f}function Yl(o,e,t,n,r,i,s){const a={credentialType:be.REFRESH_TOKEN,homeAccountId:o,environment:e,clientId:n,secret:t,lastUpdatedAt:Date.now().toString()};return i&&(a.userAssertionHash=i),r&&(a.familyId=r),s&&(a.expiresOn=s.toString()),a}function dr(o){return o.hasOwnProperty("homeAccountId")&&o.hasOwnProperty("environment")&&o.hasOwnProperty("credentialType")&&o.hasOwnProperty("clientId")&&o.hasOwnProperty("secret")}function No(o){return o?dr(o)&&o.hasOwnProperty("realm")&&o.hasOwnProperty("target")&&(o.credentialType===be.ACCESS_TOKEN||o.credentialType===be.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Xl(o){return o?dr(o)&&o.hasOwnProperty("realm")&&o.credentialType===be.ID_TOKEN:!1}function Mo(o){return o?dr(o)&&o.credentialType===be.REFRESH_TOKEN:!1}function ql(o,e){const t=o.indexOf(ks)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function ed(o,e){let t=!1;o&&(t=o.indexOf(Es)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function td({environment:o,clientId:e}){return[ti,o,e].join(Ss).toLowerCase()}function nd(o,e){return e?o.indexOf(ti)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function rd(o,e){return e?o.indexOf(Lr)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function Do(){return Je()+Lc}function Nn(o,e,t){o.authorization_endpoint=e.authorization_endpoint,o.token_endpoint=e.token_endpoint,o.end_session_endpoint=e.end_session_endpoint,o.issuer=e.issuer,o.endpointsFromNetwork=t,o.jwks_uri=e.jwks_uri}function Tr(o,e,t){o.aliases=e.aliases,o.preferred_cache=e.preferred_cache,o.preferred_network=e.preferred_network,o.aliasesFromNetwork=t}function Uo(o){return o.expiresAt<=Je()}/*! @azure/msal-common v16.6.2 2026-05-19 */const id="networkClientSendPostRequestAsync",od="refreshTokenClientExecutePostToTokenEndpoint",sd="authorizationCodeClientExecutePostToTokenEndpoint",ad="refreshTokenClientExecuteTokenRequest",cd="refreshTokenClientAcquireToken",Sr="refreshTokenClientAcquireTokenWithCachedRefreshToken",hd="refreshTokenClientCreateTokenRequestBody",ld="silentFlowClientGenerateResultFromCacheRecord",_i="getAuthCodeUrl",ca="handleCodeResponseFromServer",dd="authClientExecuteTokenRequest",ud="authClientCreateTokenRequestBody",fd="updateTokenEndpointAuthority",vn="popTokenGenerateCnf",Ii="handleServerTokenResponse",gd="authorityResolveEndpointsAsync",pd="authorityGetCloudDiscoveryMetadataFromNetwork",md="authorityUpdateCloudDiscoveryMetadata",yd="authorityGetEndpointMetadataFromNetwork",wd="authorityUpdateEndpointMetadata",Lo="authorityUpdateMetadataWithRegionalInformation",Cd="regionDiscoveryDetectRegion",Fo="regionDiscoveryGetRegionFromIMDS",_d="regionDiscoveryGetCurrentVersion",Id="cacheManagerGetRefreshToken",vd="setUserData";/*! @azure/msal-common v16.6.2 2026-05-19 */const Le=(o,e,t,n,r)=>(...i)=>{t.trace("1plfzx",r);const s=n.startMeasurement(e,r);r&&n.incrementFields({[`ext.${e}CallCount`]:1},r);try{const a=o(...i);return s.end({success:!0}),t.trace("1g8n6a",r),a}catch(a){t.trace("0cfd8i",r);try{t.trace(JSON.stringify(a),r)}catch{t.trace("00dty7",r)}throw s.end({success:!1},a),a}},D=(o,e,t,n,r)=>(...i)=>{t.trace("1plfzx",r);const s=n.startMeasurement(e,r);return r&&n.incrementFields({[`ext.${e}CallCount`]:1},r),o(...i).then(a=>(t.trace("1g8n6a",r),s.end({success:!0}),a)).catch(a=>{t.trace("0cfd8i",r);try{t.trace(JSON.stringify(a),r)}catch{t.trace("00dty7",r)}throw s.end({success:!1},a),a})};/*! @azure/msal-common v16.6.2 2026-05-19 */const Ad={SW:"sw"};class jt{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){const n=await D(this.generateKid.bind(this),vn,t,this.performanceClient,e.correlationId)(e),r=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:r}}async generateKid(e){return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Ad.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,r){const{resourceRequestMethod:i,resourceRequestUri:s,shrClaims:a,shrNonce:c,shrOptions:h}=n,l=s?new fe(s):void 0,u=l==null?void 0:l.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:Je(),m:i==null?void 0:i.toUpperCase(),u:u==null?void 0:u.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:u==null?void 0:u.AbsolutePath,q:u!=null&&u.QueryString?[[],u.QueryString]:void 0,client_claims:a||void 0,...r},t,h,n.correlationId)}}/*! @azure/msal-common v16.6.2 2026-05-19 */const jr="no_tokens_found",bd="native_account_unavailable",ha="refresh_token_expired",la="ux_not_allowed",Td="interaction_required",Sd="consent_required",kd="login_required",vi="bad_token",Ed="interrupted_user";/*! @azure/msal-common v16.6.2 2026-05-19 */const Ho=[Td,Sd,kd,vi,la,Ed],Rd=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token","ux_not_allowed","interrupted_user"];class Qe extends me{constructor(e,t,n,r,i,s,a,c){super(e,t,n),Object.setPrototypeOf(this,Qe.prototype),this.timestamp=r||"",this.traceId=i||"",this.correlationId=s||"",this.claims=a||"",this.name="InteractionRequiredAuthError",this.errorNo=c}}function da(o,e,t){const n=!!o&&Ho.indexOf(o)>-1,r=!!t&&Rd.indexOf(t)>-1,i=!!e&&Ho.some(s=>e.indexOf(s)>-1);return n||i||r}function qn(o,e){return new Qe(o,e)}/*! @azure/msal-common v16.6.2 2026-05-19 */class Ot extends me{constructor(e,t,n,r,i){super(e,t,n),this.name="ServerError",this.errorNo=r,this.status=i,Object.setPrototypeOf(this,Ot.prototype)}}/*! @azure/msal-common v16.6.2 2026-05-19 */function Ai(o,e,t){const n=Od(o,t);return e?`${n}${Mr}${e}`:n}function Od(o,e){if(!o)throw j(Bs);const t={id:o.createNewGuid()};e&&(t.meta=e);const n=JSON.stringify(t);return o.base64Encode(n)}function An(o,e){if(!o)throw j(Bs);if(!e)throw j(fn);try{const t=e.split(Mr),n=t[0],r=t.length>1?t.slice(1).join(Mr):"",i=o(n),s=JSON.parse(i);return{userRequestState:r||"",libraryState:s}}catch{throw j(fn)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class St{constructor(e,t,n,r,i,s,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=r,this.performanceClient=i,this.serializableCache=s,this.persistencePlugin=a}validateTokenResponse(e,t,n){var r;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||nn} - Timestamp: ${e.timestamp||nn} - Description: ${e.error_description||nn} - Correlation ID: ${e.correlation_id||nn} - Trace ID: ${e.trace_id||nn}`,s=(r=e.error_codes)!=null&&r.length?e.error_codes[0]:void 0,a=new Ot(e.error,i,e.suberror,s,e.status);if(n&&e.status&&e.status>=xc&&e.status<=Nc){this.logger.warning("16ks7j",t);return}else if(n&&e.status&&e.status>=Oc&&e.status<=Pc){this.logger.warning("0g61x3",t);return}throw da(e.error,e.error_description,e.suberror)?new Qe(e.error,e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):a}}async handleServerTokenResponse(e,t,n,r,i,s,a,c,h,l){var p;let u;if(e.id_token){if(u=et(e.id_token||"",this.cryptoObj.base64Decode),s&&s.nonce&&u.nonce!==s.nonce)throw j(qh);if(r.maxAge||r.maxAge===0){const C=u.auth_time;if(!C)throw j(Fs);ta(C,r.maxAge)}}this.homeAccountIdentifier=ia(e.client_info||"",t.authorityType,this.logger,this.cryptoObj,r.correlationId,u);let m;s&&s.state&&(m=An(this.cryptoObj.base64Decode,s.state)),e.key_id=e.key_id||r.sshKid||void 0;const f=this.generateCacheRecord(e,t,n,r,u,a,s);let y;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("0jbz5k",r.correlationId),y=new Ql(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(y)),c&&!h&&f.account&&this.cacheStorage.getAllAccounts({homeAccountId:f.account.homeAccountId,environment:f.account.environment},r.correlationId).length<1)return this.logger.warning("1gmt66",r.correlationId),(p=this.performanceClient)==null||p.addFields({acntLoggedOut:!0},r.correlationId),await St.generateAuthenticationResult(this.cryptoObj,t,f,!1,r,this.performanceClient,u,m,void 0,l);await this.cacheStorage.saveCacheRecord(f,r.correlationId,ot(u||{}),i,r.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&y&&(this.logger.verbose("1bh17u",r.correlationId),await this.persistencePlugin.afterCacheAccess(y))}return St.generateAuthenticationResult(this.cryptoObj,t,f,!1,r,this.performanceClient,u,m,e,l)}generateCacheRecord(e,t,n,r,i,s,a){var p;const c=t.getPreferredCache();if(!c)throw j(zs);const h=wi(i);let l,u;e.id_token&&i&&(l=hr(this.homeAccountIdentifier,c,e.id_token,this.clientId,h||""),u=ua(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,r.correlationId,i,e.client_info,c,h,a,void 0,this.logger,this.performanceClient));let m=null;if(e.access_token){const C=e.scope?ke.fromString(e.scope):new ke(r.scopes||[]),w=(typeof e.expires_in=="str
1ing"?parseInt(e.expires_in,10):e.expires_in)||0,I=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,A=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,k=n+w,T=k+I,U=A&&A>0?n+A:void 0;m=lr(this.homeAccountIdentifier,c,e.access_token,this.clientId,h||t.tenant||"",C.printScopes(),k,T,this.cryptoObj.base64Decode,U,e.token_type,s,e.key_id);const x=r.resource||null;x&&(m.resource=x)}let f=null;if(e.refresh_token){let C;if(e.refresh_token_expires_in){const w=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;C=n+w,(p=this.performanceClient)==null||p.addFields({ntwkRtExpiresOnSeconds:C},r.correlationId)}f=Yl(this.homeAccountIdentifier,c,e.refresh_token,this.clientId,e.foci,s,C)}let y=null;return e.foci&&(y={clientId:this.clientId,environment:c,familyId:e.foci}),{account:u,idToken:l,accessToken:m,refreshToken:f,appMetadata:y}}static async generateAuthenticationResult(e,t,n,r,i,s,a,c,h,l){var k,T,U,x,$;let u="",m=[],f=null,y,p,C="";if(n.accessToken){if(n.accessToken.tokenType===pe.POP&&!i.popKid){const N=new jt(e,s),{secret:B,keyId:te}=n.accessToken;if(!te)throw j(Ks);u=await N.signPopToken(B,te,i)}else u=n.accessToken.secret;m=ke.fromString(n.accessToken.target).asArray(),f=Fn(n.accessToken.expiresOn),y=Fn(n.accessToken.extendedExpiresOn),n.accessToken.refreshOn&&(p=Fn(n.accessToken.refreshOn))}n.appMetadata&&(C=n.appMetadata.familyId===jn?jn:"");const w=(a==null?void 0:a.oid)||(a==null?void 0:a.sub)||"",I=(a==null?void 0:a.tid)||"";h!=null&&h.spa_accountid&&n.account&&(n.account.nativeAccountId=h==null?void 0:h.spa_accountid);const A=n.account?Jn(Tt(n.account),void 0,a,(k=n.idToken)==null?void 0:k.secret):null;return{authority:t.canonicalAuthority,uniqueId:w,tenantId:I,scopes:m,account:A,idToken:((T=n==null?void 0:n.idToken)==null?void 0:T.secret)||"",idTokenClaims:a||{},accessToken:u,fromCache:r,expiresOn:f,extExpiresOn:y,refreshOn:p,correlationId:i.correlationId,requestId:l||"",familyId:C,tokenType:((U=n.accessToken)==null?void 0:U.tokenType)||"",state:c?c.userRequestState:"",cloudGraphHostName:((x=n.account)==null?void 0:x.cloudGraphHostName)||"",msGraphHost:(($=n.account)==null?void 0:$.msGraphHost)||"",code:h==null?void 0:h.spa_code,fromPlatformBroker:!1}}}function ua(o,e,t,n,r,i,s,a,c,h,l,u,m){u==null||u.verbose("09jz0t",r);const f=a||e.getPreferredCache(),y=o.getAccountsFilteredBy({homeAccountId:t,environment:f},r);m==null||m.addFields({cacheMatchedAccounts:y.length},r),y.length>1&&(u==null||u.warning("0x7ad1",r));const C=(y.length===1?y[0]:null)||Ll({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:a,cloudGraphHostName:h==null?void 0:h.cloud_graph_host_name,msGraphHost:h==null?void 0:h.msgraph_host,nativeAccountId:l},e,n),w=C.tenantProfiles||[],I=c||C.realm;if(I&&!w.find(A=>A.tenantId===I)){const A=Wt(t,C.localAccountId,I,i);w.push(A)}return C.tenantProfiles=w,C}/*! @azure/msal-common v16.6.2 2026-05-19 */const We={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v16.6.2 2026-05-19 */async function fa(o,e,t){return typeof o=="string"?o:o({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v16.6.2 2026-05-19 */function ur(o,e,t){var n;return{clientId:o,authority:e.authority,scopes:e.scopes,homeAccountIdentifier:t,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,embeddedClientId:e.embeddedClientId||((n=e.extraParameters)==null?void 0:n.clientId)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class Xe{static generateThrottlingStorageKey(e){return`${Es}.${JSON.stringify(e)}`}static preProcess(e,t,n){var s;const r=Xe.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r,n);if(i){if(i.throttleTime<Date.now()){e.removeItem(r,n);return}throw new Ot(((s=i.errorCodes)==null?void 0:s.join(" "))||"",i.errorMessage,i.subError)}}static postProcess(e,t,n,r){if(Xe.checkResponseStatus(n)||Xe.checkResponseForRetryAfter(n)){const i={throttleTime:Xe.calculateThrottleTime(parseInt(n.headers[Pe.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Xe.generateThrottlingStorageKey(t),i,r)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Pe.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(t||jc),n+$c)*1e3)}static removeThrottle(e,t,n,r){const i=ur(t,n,r),s=this.generateThrottlingStorageKey(i);e.removeItem(s,n.correlationId)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class fr extends me{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,fr.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function sn(o,e,t,n){return o.errorMessage=`${o.errorMessage}, additionalErrorInfo: error.name:${n==null?void 0:n.name}, error.message:${n==null?void 0:n.message}`,new fr(o,e,t)}/*! @azure/msal-common v16.6.2 2026-05-19 */function ga(o,e,t){const n={};if(n[Pe.CONTENT_TYPE]=Ac,!e&&t)switch(t.type){case We.HOME_ACCOUNT_ID:try{const r=Lt(t.credential);n[Pe.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch{o.verbose("1qhtee","")}break;case We.UPN:n[Pe.CCS_HEADER]=`UPN: ${t.credential}`;break}return n}function pa(o,e,t,n){const r=new Map;return o.embeddedClientId&&ar(r,e,t),o.extraQueryParameters&&tt(r,o.extraQueryParameters),_n(r,o.correlationId),sr(r,o.correlationId,n),gn(r)}async function ma(o,e,t,n,r,i,s,a,c,h){const l=await Pd(n,o,{body:e,headers:t},r,i,s,a,c);return h&&l.status<500&&l.status!==429&&h.clearTelemetryCache(),l}async function Pd(o,e,t,n,r,i,s,a){var h;Xe.preProcess(r,o,n);let c;try{c=await D(i.sendPostRequestAsync.bind(i),id,s,a,n)(e,t);const l=c.headers||{};a==null||a.addFields({refreshTokenSize:((h=c.body.refresh_token)==null?void 0:h.length)||0,httpVerToken:l[Pe.X_MS_HTTP_VERSION]||"",requestId:l[Pe.X_MS_REQUEST_ID]||""},n)}catch(l){if(l instanceof fr){const u=l.responseHeaders;throw u&&(a==null||a.addFields({httpVerToken:u[Pe.X_MS_HTTP_VERSION]||"",requestId:u[Pe.X_MS_REQUEST_ID]||"",contentTypeHeader:u[Pe.CONTENT_TYPE]||void 0,contentLengthHeader:u[Pe.CONTENT_LENGTH]||void 0,httpStatus:l.httpStatus},n)),l.error}throw l instanceof me?l:j(Qh)}return Xe.postProcess(r,o,c,n),c}/*! @azure/msal-common v16.6.2 2026-05-19 */function xd(o){return o.hasOwnProperty("authorization_endpoint")&&o.hasOwnProperty("token_endpoint")&&o.hasOwnProperty("issuer")&&o.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v16.6.2 2026-05-19 */function Nd(o){return o.hasOwnProperty("tenant_discovery_endpoint")&&o.hasOwnProperty("metadata")}/*! @azure/msal-common v16.6.2 2026-05-19 */function Md(o){return o.hasOwnProperty("error")&&o.hasOwnProperty("error_description")}/*! @azure/msal-common v16.6.2 2026-05-19 */class gr{constructor(e,t,n,r){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=r}async detectRegion(e,t){let n=e;if(n)t.region_source=xt.ENVIRONMENT_VARIABLE;else{const r=gr.IMDS_OPTIONS;try{const i=await D(this.getRegionFromIMDS.bind(this),Fo,this.logger,this.performanceClient,this.correlationId)(bc,r);if(i.status===mo&&(n=i.body,t.region_source=xt.IMDS),i.status===yo){const s=await D(this.getCurrentVersion.bind(this),_d,this.logger,this.performanceClient,this.correlationId)(r);if(!s)return t.region_source=xt.FAILED_AUTO_DETECTION,null;const a=await D(this.getRegionFromIMDS.bind(this),Fo,this.logger,this.performanceClient,this.correlationId)(s,r);a.status===mo&&(n=a.body,t.region_source=xt.IMDS)}}catch{return t.region_source=xt.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=xt.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,t){return this.networkInterface.sendGetRequestAsync(`${go}?api-version=${e}&format=text`,t,Tc)}async getCurrentVersion(e){try{const t=await this.networkInterface.sendGetRequestAsync(`${go}?format=json`,e);return t.status===yo&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch{return null}}}gr.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v16.6.2 2026-05-19 */class De{constructor(e,t,n,r,i,s,a,c){this.canonicalAuthority=e,this._canonicalAuthority.val
1idateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=r,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=i,this.performanceClient=a,this.correlationId=s,this.managedIdentity=c||!1,this.regionDiscovery=new gr(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(vr))return Ge.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Cc:return Ge.Adfs;case _c:return Ge.Dsts}return Ge.Default}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 fe(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 j(ut)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw j(ut)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw j(ut)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw j(hl);return this.replacePath(this.metadata.end_session_endpoint)}else throw j(ut)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw j(ut)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw j(ut)}canReplaceTenant(e){return e.PathSegments.length===1&&!De.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Ge.Default&&this.protocolMode!==Ue.OIDC}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new fe(this.metadata.canonical_authority).getUrlComponents(),i=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((a,c)=>{let h=i[c];if(c===0&&this.canReplaceTenant(r)){const l=new fe(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];h!==l&&(this.logger.verbose("1q3g2x",this.correlationId),h=l)}a!==h&&(t=t.replace(`/${h}/`,`/${a}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Ge.Adfs||this.protocolMode===Ue.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var r;const e=this.getCurrentMetadataEntity(),t=await D(this.updateCloudDiscoveryMetadata.bind(this),md,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const n=await D(this.updateEndpointMetadata.bind(this),wd,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:n}),(r=this.performanceClient)==null||r.addFields({cloudDiscoverySource:t,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort,this.correlationId);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Do(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Ke.CACHE&&(n==null?void 0:n.source)!==Ke.CACHE&&(e.expiresAt=Do(),e.canonical_authority=this.canonicalAuthority);const r=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache,this.correlationId);this.cacheManager.setAuthorityMetadata(r,e,this.correlationId),this.metadata=e}async updateEndpointMetadata(e){var r,i;const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Ke.HARDCODED_VALUES&&(r=this.authorityOptions.azureRegionConfiguration)!=null&&r.azureRegion&&t.metadata){const s=await D(this.updateMetadataWithRegionalInformation.bind(this),Lo,this.logger,this.performanceClient,this.correlationId)(t.metadata);Nn(e,s,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await D(this.getEndpointMetadataFromNetwork.bind(this),yd,this.logger,this.performanceClient,this.correlationId)();if(n)return this.validateIssuer(n.issuer),(i=this.authorityOptions.azureRegionConfiguration)!=null&&i.azureRegion&&(n=await D(this.updateMetadataWithRegionalInformation.bind(this),Lo,this.logger,this.performanceClient,this.correlationId)(n)),Nn(e,n,!0),Ke.NETWORK;throw j(Zh,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("1fi0kc",this.correlationId);const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("06t0uj",this.correlationId),Nn(e,t,!1),{source:Ke.CONFIG};this.logger.verbose("151k0p",this.correlationId);const n=this.getEndpointMetadataFromHardcodedValues();if(n)return Nn(e,n,!1),{source:Ke.HARDCODED_VALUES,metadata:n};this.logger.verbose("1imop5",this.correlationId);const r=Uo(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("16uq31",""),{source:Ke.CACHE}):(r&&this.logger.verbose("0uoibc",""),null)}isAuthoritySameType(e){return new fe(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw ge(Hh)}return null}async getEndpointMetadataFromNetwork(){const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose("1y65x6",this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(t,e);return xd(n.body)?n.body:(this.logger.verbose("1koyv8",this.correlationId),null)}catch{return this.logger.verbose("0a9wik",this.correlationId),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Oo?Oo[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var n,r;const t=(n=this.authorityOptions.azureRegionConfiguration)==null?void 0:n.azureRegion;if(t){if(t!==Sc)return this.regionDiscoveryMetadata.region_outcome=Ar.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,De.replaceWithRegionalInformation(e,t);const i=await D(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Cd,this.logger,this.performanceClient,this.correlationId)((r=this.authorityOptions.azureRegionConfiguration)==null?void 0:r.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=Ar.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=i,De.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=Ar.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const n=await D(this.getCloudDiscoveryMetadataFromNetwork.bind(this),pd,this.logger,this.performanceClient,this.correlationId)();if(n)return Tr(e,n,!0),Ke.NETWORK;throw ge(zh)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("1tpqlr",this.correlationId),this.logger.verbosePii("1fy7uz",this.correlationId),this.logger.verbosePii("08zabj",this.correlationId),this.logger.verbosePii("1o1kv3",this.correlationId);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("1nakio",this.correlationId),Tr(e,t,!1),Ke.CONFIG;this.logger.verbose("1x74aj",this.correlationId);const n=Dl(this.hostnameAndPort);if(n)return this.logger.verbose("0by47c",this.correlationId),Tr(e,n,!1),Ke.HARDCODED_VALUES;this.logger.verbose("0r2fzy",this.correlationId);const r=Uo(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose("1uffgh",""),Ke.CACHE):(r&&this.logger.verbose("0uoibc",""),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Ge.Ciam)return this.logger.verbose("04y84h",this.correlationId),De.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("0gszr3",this.correlationId);try{this.logger.verbose("1iifkx",this.correlationId);const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=Qn(e.metadata,this.hostnameAndPort);if(this.logger.verbose("0q67e3",""),t)return this.logger.verbose("0hzfao",this.correlationId),t;this.logger.verbose("1ajz3u",this.correlationId)}catch{throw this.logger.verbose("1wq5tu",this.correlationId),ge(Ds)}}return this.isInKnownAuthorities()?(this.logger.verbose("0mt9al",this.correlationId),De.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){const e=`${Ic}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let n=null;try{const r=await this.networkInterface.sendGetRequestAsync(e,t);let i,s;if(Nd(r.body))i=r.body,s=i.metadata,this.logger.verbosePii("1vglyt",this.correlationId);
1else if(Md(r.body)){if(this.logger.warning("062uto",this.correlationId),i=r.body,i.error===Rc)return this.logger.error("1x90tm",this.correlationId),null;this.logger.warning("0wchdm",this.correlationId),this.logger.warning("1s5mpv",this.correlationId),this.logger.warning("1yhqpw",this.correlationId),s=[]}else return this.logger.error("0768g0",this.correlationId),null;this.logger.verbose("1lrobr",this.correlationId),n=Qn(s,this.hostnameAndPort)}catch(r){return r instanceof me?this.logger.error("0vwhc7",this.correlationId):this.logger.error("0s2z41",this.correlationId),null}return n||(this.logger.warning("0jp28q",this.correlationId),this.logger.verbose("130sd8",this.correlationId),n=De.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&fe.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==mi.None){const r=t.tenant?t.tenant:Is;n=`${t.azureCloudInstance}/${r}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return wc;if(this.discoveryComplete())return this.metadata.preferred_cache;throw j(ut)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return ra.has(e)}validateIssuer(e){if(!e)throw ge(br);let t;try{t=new URL(e)}catch{throw ge(br)}const n=t.protocol,r=t.host,i=(this.canonicalAuthorityUrlComponents.Protocol||"").toLowerCase(),s=(this.canonicalAuthorityUrlComponents.HostNameAndPort||"").toLowerCase(),a=this.matchesAuthorityOrigin(n,r,i,s),c=n==="https:"&&this.isAliasOfKnownMicrosoftAuthority(r),h=n==="https:"&&this.matchesRegionalMicrosoftHost(r),l=this.matchesCiamTenantPattern(t,s,this.canonicalAuthorityUrlComponents.PathSegments);if(!(a||c||h||l))throw ge(br)}matchesAuthorityOrigin(e,t,n,r){return e===n&&t===r}matchesRegionalMicrosoftHost(e){const t=e.indexOf(".");if(t>0&&t<e.length-1){const n=e.substring(t+1);return this.isAliasOfKnownMicrosoftAuthority(n)}return!1}matchesCiamTenantPattern(e,t,n){const r=n[0],i=r?r.endsWith(tn)?r.slice(0,-tn.length):r:t.split(".")[0];if(!i)return!1;const s=`https://${i}${vr}`,a=[s,`${s}/${i}`,`${s}/${i}/v2.0`,`${s}/${i}${tn}`,`${s}/${i}${tn}/v2.0`],c=e.pathname.replace(/\/+$/,""),h=`${e.protocol}//${e.host}${c}`;return a.some(l=>l===h)}static isPublicCloudAuthority(e){return Ec.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const r=new fe(e);r.validateAsUri();const i=r.getUrlComponents();let s=`${t}.${i.HostNameAndPort}`;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=`${t}.${kc}`);const a=fe.constructAuthorityUriFromObject({...r.getUrlComponents(),HostNameAndPort:s}).urlString;return n?`${a}?${n}`:a}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=De.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=De.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=De.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const r=new fe(e).getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(vr)){const i=r.HostNameAndPort.split(".")[0];t=`${t}${i}${tn}`}return t}}De.reservedTenantDomains=new Set(["{tenant}","{tenantid}",wt.COMMON,wt.CONSUMERS,wt.ORGANIZATIONS]);function Dd(o){var r;const n=(r=new fe(o).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:r.toLowerCase();switch(n){case wt.COMMON:case wt.ORGANIZATIONS:case wt.CONSUMERS:return;default:return n}}function ya(o){return o.endsWith(Dr)?o:`${o}${Dr}`}function Ud(o){const e=o.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw ge(Ds)}return{canonicalAuthority:o.authority?ya(o.authority):void 0,knownAuthorities:o.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v16.6.2 2026-05-19 */async function wa(o,e,t,n,r,i,s){const a=De.transformCIAMAuthority(ya(o)),c=new De(a,e,t,n,r,i,s);try{return await D(c.resolveEndpointsAsync.bind(c),gd,r,s,i)(),c}catch{throw j(ut)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class Ca{constructor(e,t){var n;this.includeRedirectUri=!0,this.config=Ci(e),this.logger=new rt(this.config.loggerOptions,cr,In),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async acquireToken(e,t,n){var c;if(!e.code)throw j(nl);n&&n.cloud_instance_host_name&&await D(this.updateTokenEndpointAuthority.bind(this),fd,this.logger,this.performanceClient,e.correlationId)(n.cloud_instance_host_name,e.correlationId);const r=Je(),i=await D(this.executeTokenRequest.bind(this),dd,this.logger,this.performanceClient,e.correlationId)(this.authority,e,this.serverTelemetryManager),s=(c=i.headers)==null?void 0:c[Pe.X_MS_REQUEST_ID],a=new St(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(i.body,e.correlationId),D(a.handleServerTokenResponse.bind(a),Ii,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,t,n,void 0,void 0,void 0,s)}getLogoutUri(e){if(!e)throw ge(Fh);const t=this.createLogoutUrlQueryString(e);return fe.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t,n){const r=pa(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri,this.performanceClient),i=fe.appendQueryString(e.tokenEndpoint,r),s=await D(this.createTokenRequestBody.bind(this),ud,this.logger,this.performanceClient,t.correlationId)(t);let a;if(t.clientInfo)try{const l=Zn(t.clientInfo,this.cryptoUtils.base64Decode);a={credential:`${l.uid}${Ur}${l.utid}`,type:We.HOME_ACCOUNT_ID}}catch{this.logger.verbose("0wznt3",t.correlationId)}const c=ga(this.logger,this.config.systemOptions.preventCorsPreflight,a||t.ccsCredential),h=ur(this.config.authOptions.clientId,t);return D(ma,sd,this.logger,this.performanceClient,t.correlationId)(i,s,c,h,t.correlationId,this.cacheManager,this.networkClient,this.logger,this.performanceClient,n)}async createTokenRequestBody(e){var r;const t=new Map;if(ci(t,e.embeddedClientId||((r=e.extraParameters)==null?void 0:r[bt])||this.config.authOptions.clientId),this.includeRedirectUri)hi(t,e.redirectUri);else if(!e.redirectUri)throw ge(Nh);if(ai(t,e.scopes,!0,this.oidcDefaultScopes),qs(t,e.resource),Cl(t,e.code),di(t,this.config.libraryInfo),ui(t,this.config.telemetry.application),Xs(t),this.serverTelemetryManager&&!aa(this.config)&&Ys(t,this.serverTelemetryManager),e.codeVerifier&&Il(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&$s(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Gs(t,await fa(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Ws(t,i.assertionType)}if(Vs(t,bs.AUTHORIZATION_CODE_GRANT),gi(t),e.authenticationScheme===pe.POP){const i=new jt(this.cryptoUtils,this.performanceClient);let s;e.popKid?s=this.cryptoUtils.encodeKid(e.popKid):s=(await D(i.generateCnf.bind(i),vn,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,pi(t,s)}else if(e.authenticationScheme===pe.SSH)if(e.sshJwk)Zs(t,e.sshJwk);else throw ge(oi);let n;if(e.clientInfo)try{const i=Zn(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${i.uid}${Ur}${i.utid}`,type:We.HOME_ACCOUNT_ID}}catch{this.logger.verbose("0wznt3",e.correlationId)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case We.HOME_ACCOUNT_ID:try{const i=Lt(n.credential);an(t,i)}catch{this.logger.verbose("1qhtee",e.correlationId)}break;case We.UPN:Gn(t,n.credential);break}return e.embeddedClientId&&ar(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.extraParameters&&tt(t,e.extraParameters),e.enableSpaAuthorizationCode&&(!e.extraParameters||!e.extraParameters[vo])&&tt(t,{[vo]:"1"}),sr(t,e.correlationId,this.performanceClient),li(t,e.claims,this.config.authOptions.clientCapabilities,e.skipBrokerClaims),gn(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&gl(t,e.postLogoutRedirectUri),e.correlationId&&_n(t,e.correlationId),e.idTokenHint&&pl(t,e.idTokenHint),e.state&&js(t,e.state),e.logoutHint&&Al(t,e.logoutHint),e.extraQueryParameters&&tt(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Js(t),gn(t)}async updateTokenEndpointAuthority(e,t){const n=`https://${e}/${this.authority.tenant}/`,r=await wa(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=r}}/*! @azure/msal-common v16.6.2 2026-05-19 */const Ld=300;class Fd{constructor(e,t){this.config=Ci(e),this.logger=new rt(this.config.loggerOptions,cr,In),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}async acquireToken(e,t){var a;const n=Je(),r=await D(this.executeTokenRequest.bind(this),ad,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(a=r.headers)==null?void 0:a[Pe.X_MS_REQUEST_ID],s=new St(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(r.body,e.correlationId),D(s.handleServerTokenResponse.bind(s),Ii,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,n,e,t,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e,t){if(!e)throw ge(Lh);if(!e.account)throw j(Hs);if(this.cacheManager.isAppMetadataFOCI(e.account.environment,e.correlationId))try{return await D(this.acquireTokenWithCachedRefreshToken.bind(this),Sr,this.logger,this.performanceClient,e.correlationId)(e,!0,t)}catch(r){const i=r instanceof Qe&&r.errorCode===jr,s=r instanceof Ot&&r.errorCode===Wc&&r.subError===Vc;if(i||s)return D(this.acquireTokenWithCachedRefreshToken.bind(this),Sr,this.logger,this.performanceClient,e.correlationId)(e,!1,t);throw r}return D(this.acquireTokenWithCachedRefreshToken.bind(this),Sr,this.logger,this.performanceClient,e.correlationId)(e,!1,t)}async acquireTokenWithCachedRefreshToken(e,t,n){var s;const r=Le(this.cacheManager.getRefreshToken.bind(this.cacheManager),Id,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0);if(!r)throw qn(jr);if(r.expiresOn){const a=e.refreshTokenExpirationOffsetSeconds||Ld;if((s=this.performanceClient)==null||s.addFields({cacheRtExpiresOnSeconds:Number(r.expiresOn),rtOffsetSeconds:a},e.correlationId),Xn(r.expiresOn,a))throw qn(ha)}const i={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||pe.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:We.HOME_ACCOUNT_ID}};try{return await D(this.acquireToken.bind(this),cd,this.logger,this.performanceClient,e.correlationId)(i,n)}
1catch(a){if(a instanceof Qe&&a.subError===vi){this.logger.verbose("1pg3ap",e.correlationId);const c=this.cacheManager.generateCredentialKey(r);this.cacheManager.removeRefreshToken(c,e.correlationId)}throw a}}async executeTokenRequest(e,t){const n=pa(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri,this.performanceClient),r=fe.appendQueryString(t.tokenEndpoint,n),i=await D(this.createTokenRequestBody.bind(this),hd,this.logger,this.performanceClient,e.correlationId)(e),s=ga(this.logger,this.config.systemOptions.preventCorsPreflight,e.ccsCredential),a=ur(this.config.authOptions.clientId,e);return D(ma,od,this.logger,this.performanceClient,e.correlationId)(r,i,s,a,e.correlationId,this.cacheManager,this.networkClient,this.logger,this.performanceClient,this.serverTelemetryManager)}async createTokenRequestBody(e){var n,r;const t=new Map;if(ci(t,e.embeddedClientId||((n=e.extraParameters)==null?void 0:n[bt])||this.config.authOptions.clientId),e.redirectUri&&hi(t,e.redirectUri),ai(t,e.scopes,!0,(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes),Vs(t,bs.REFRESH_TOKEN_GRANT),gi(t),di(t,this.config.libraryInfo),ui(t,this.config.telemetry.application),Xs(t),this.serverTelemetryManager&&!aa(this.config)&&Ys(t,this.serverTelemetryManager),_l(t,e.refreshToken),this.config.clientCredentials.clientSecret&&$s(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Gs(t,await fa(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Ws(t,i.assertionType)}if(e.authenticationScheme===pe.POP){const i=new jt(this.cryptoUtils,this.performanceClient);let s;e.popKid?s=this.cryptoUtils.encodeKid(e.popKid):s=(await D(i.generateCnf.bind(i),vn,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,pi(t,s)}else if(e.authenticationScheme===pe.SSH)if(e.sshJwk)Zs(t,e.sshJwk);else throw ge(oi);if(this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case We.HOME_ACCOUNT_ID:try{const i=Lt(e.ccsCredential.credential);an(t,i)}catch{this.logger.verbose("1qhtee",e.correlationId)}break;case We.UPN:Gn(t,e.ccsCredential.credential);break}return e.embeddedClientId&&ar(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.extraParameters&&tt(t,{...e.extraParameters}),sr(t,e.correlationId,this.performanceClient),li(t,e.claims,this.config.authOptions.clientCapabilities,e.skipBrokerClaims),gn(t)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class Hd{constructor(e,t){this.config=Ci(e),this.logger=new rt(this.config.loggerOptions,cr,In),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}async acquireCachedToken(e){let t=dt.NOT_APPLICABLE;if(e.forceRefresh||!Ve.isEmptyObj(e.claims))throw this.setCacheOutcome(dt.FORCE_REFRESH_OR_CLAIMS,e.correlationId),j(mt);if(!e.account)throw j(Hs);const n=e.account.tenantId||Dd(e.authority),r=this.cacheManager.getTokenKeys(),i=this.cacheManager.getAccessToken(e.account,e,r,n);if(i){if(Zl(i.cachedAt)||Xn(i.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(dt.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),j(mt);if(e.resource){if(i.resource!==e.resource)throw this.setCacheOutcome(dt.NO_CACHED_ACCESS_TOKEN,e.correlationId),j(mt)}else i.refreshOn&&Xn(i.refreshOn,0)&&(t=dt.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(dt.NO_CACHED_ACCESS_TOKEN,e.correlationId),j(mt);const s=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:i,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,r,n),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s,e.correlationId)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await D(this.generateResultFromCacheRecord.bind(this),ld,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){var n,r;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(r=this.performanceClient)==null||r.addFields({cacheOutcome:e},t),e!==dt.NOT_APPLICABLE&&this.logger.info("09ingz",t)}async generateResultFromCacheRecord(e,t){let n;if(e.idToken&&(n=et(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const r=n==null?void 0:n.auth_time;if(!r)throw j(Fs);ta(r,t.maxAge)}return St.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,this.performanceClient,n)}}/*! @azure/msal-common v16.6.2 2026-05-19 */const zd={sendGetRequestAsync:()=>Promise.reject(j(ce)),sendPostRequestAsync:()=>Promise.reject(j(ce))};/*! @azure/msal-common v16.6.2 2026-05-19 */function Bd(o,e,t,n){var a,c;const r=e.correlationId,i=new Map;ci(i,e.embeddedClientId||((a=e.extraQueryParameters)==null?void 0:a[bt])||o.clientId);const s=[...e.scopes||[],...e.extraScopesToConsent||[]];if(ai(i,s,!0,(c=o.authority.options.OIDCOptions)==null?void 0:c.defaultScopes),qs(i,e.resource),hi(i,e.redirectUri),_n(i,r),ul(i,e.responseMode),gi(i),vl(i),e.prompt&&(yl(i,e.prompt),n==null||n.addFields({prompt:e.prompt},r)),e.domainHint&&(ml(i,e.domainHint),n==null||n.addFields({domainHintFromRequest:!0},r)),e.prompt!==xe.SELECT_ACCOUNT)if(e.sid&&e.prompt===xe.NONE)t.verbose("1tvqyx",e.correlationId),So(i,e.sid),n==null||n.addFields({sidFromRequest:!0},r);else if(e.account){const h=$d(e.account);let l=Gd(e.account);if(l&&e.domainHint&&(t.warning("0wkg3v",e.correlationId),l=null),l){t.verbose("1eyfsw",e.correlationId),xn(i,l),n==null||n.addFields({loginHintFromClaim:!0},r);try{const u=Lt(e.account.homeAccountId);an(i,u)}catch{t.verbose("12ugck",e.correlationId)}}else if(h&&e.prompt===xe.NONE){t.verbose("1rmd8s",e.correlationId),So(i,h),n==null||n.addFields({sidFromClaim:!0},r);try{const u=Lt(e.account.homeAccountId);an(i,u)}catch{t.verbose("12ugck",e.correlationId)}}else if(e.loginHint)t.verbose("0y3007",e.correlationId),xn(i,e.loginHint),Gn(i,e.loginHint),n==null||n.addFields({loginHintFromRequest:!0},r);else if(e.account.username){t.verbose("02f507",e.correlationId),xn(i,e.account.username),n==null||n.addFields({loginHintFromUpn:!0},r);try{const u=Lt(e.account.homeAccountId);an(i,u)}catch{t.verbose("12ugck",e.correlationId)}}}else e.loginHint&&(t.verbose("0g01ey",e.correlationId),xn(i,e.loginHint),Gn(i,e.loginHint),n==null||n.addFields({loginHintFromRequest:!0},r));else t.verbose("169k9v",e.correlationId);return e.nonce&&wl(i,e.nonce),e.state&&js(i,e.state),e.embeddedClientId&&ar(i,o.clientId,o.redirectUri),li(i,e.claims,o.clientCapabilities,e.skipBrokerClaims),o.instanceAware&&(!e.extraQueryParameters||!Object.keys(e.extraQueryParameters).includes(Fr))&&Js(i),i}function bi(o,e){const t=gn(e);return fe.appendQueryString(o.authorizationEndpoint,t)}function Kd(o,e){if(Ti(o,e),!o.code)throw j(al);return o}function Ti(o,e){if(!o.state||!e)throw o.state?j(Ao,"Cached State"):j(Ao,"Server State");let t,n;try{t=decodeURIComponent(o.state)}catch{throw j(fn,o.state)}try{n=decodeURIComponent(e)}catch{throw j(fn,o.state)}if(t!==n)throw j(Xh);if(o.error||o.error_description||o.suberror){const r=jd(o);throw da(o.error,o.error_description,o.suberror)?new Qe(o.error||"",o.error_description,o.suberror,o.timestamp||"",o.trace_id||"",o.correlation_id||"",o.claims||"",r):new Ot(o.error||"",o.error_description,o.suberror,r)}}
1function jd(o){var n,r;const e="code=",t=(n=o.error_uri)==null?void 0:n.lastIndexOf(e);return t&&t>=0?(r=o.error_uri)==null?void 0:r.substring(t+e.length):void 0}function $d(o){var e;return((e=o.idTokenClaims)==null?void 0:e.sid)||null}function Gd(o){var e;return o.loginHint||((e=o.idTokenClaims)==null?void 0:e.login_hint)||null}/*! @azure/msal-common v16.6.2 2026-05-19 */function _a(o,e){if(o){if(e.resource&&(zo(e.extraParameters)||zo(e.extraQueryParameters)))throw j(dl);if(!e.resource)throw j(ll)}}function zo(o){return o?Object.prototype.hasOwnProperty.call(o,"resource"):!1}/*! @azure/msal-common v16.6.2 2026-05-19 */const $r="unexpected_error";/*! @azure/msal-common v16.6.2 2026-05-19 */const Bo=",",Ia="|";function Wd(o){const{skus:e,libraryName:t,libraryVersion:n,extensionName:r,extensionVersion:i}=o,s=new Map([[0,[t,n]],[2,[r,i]]]);let a=[];if(e!=null&&e.length){if(a=e.split(Bo),a.length<4)return e}else a=Array.from({length:4},()=>Ia);return s.forEach((c,h)=>{var l,u;c.length===2&&((l=c[0])!=null&&l.length)&&((u=c[1])!=null&&u.length)&&Vd({skuArr:a,index:h,skuName:c[0],skuVersion:c[1]})}),a.join(Bo)}function Vd(o){const{skuArr:e,index:t,skuName:n,skuVersion:r}=o;t>=e.length||(e[t]=[n,r].join(Ia))}class pn{constructor(e,t){this.cacheOutcome=dt.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||"",this.wrapperVer=e.wrapperVer||"",this.telemetryCacheKey=ks+Ss+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Pt}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&t.push(`broker_error=${n}`);const r=t.join(Pt),i=this.getRegionDiscoveryFields(),s=[e,i].join(Pt);return[_o,s,r].join(Io)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=pn.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(Pt),r=e.errors.slice(0,t).join(Pt),i=e.errors.length,s=t<i?zc:Bc,a=[i,s].join(Pt);return[_o,e.cacheHits,n,r,a].join(Io)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Hc&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof me?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Kc),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey,this.correlationId)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=pn.maxErrorsToSend(e),n=e.errors.length;if(t===n)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const r={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r,this.correlationId)}}static maxErrorsToSend(e){let t,n=0,r=0;const i=e.errors.length;for(t=0;t<i;t++){const s=e.failedRequests[2*t]||"",a=e.failedRequests[2*t+1]||"",c=e.errors[t]||"";if(r+=s.toString().length+a.toString().length+c.length+3,r<Fc)n+=1;else break}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||""),e.push(this.regionSource||""),e.push(this.regionOutcome||""),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}static makeExtraSkuString(e){return Wd(e)}}/*! @azure/msal-common v16.6.2 2026-05-19 */class Si extends me{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Si.prototype)}}function Ko(o){return new Si(o)}/*! @azure/msal-common v16.6.2 2026-05-19 */const Jd="missing_kid_error",Qd="missing_alg_error";/*! @azure/msal-common v16.6.2 2026-05-19 */class ki{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}
1static getShrHeaderString(e){if(!e.kid)throw Ko(Jd);if(!e.alg)throw Ko(Qd);const t=new ki({typ:e.typ||Jc.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */const Zd="acquireTokenFromCache",Yd="acquireTokenByRefreshToken",Xd="acquireTokenSilentAsync",qd="cryptoOptsGetPublicKeyThumbprint",eu="cryptoOptsSignJwt",tu="silentCacheClientAcquireToken",nu="silentIframeClientAcquireToken",ru="awaitConcurrentIframe",iu="silentRefreshClientAcquireToken",At="standardInteractionClientGetDiscoveredAuthority",Ei="nativeInteractionClientAcquireToken",ou="nativeInteractionClientAcquireToken",su="refreshTokenClientAcquireTokenByRefreshToken",jo="acquireTokenBySilentIframe",Ri="initializeBaseRequest",au="initializeSilentRequest",cu="initializeCache",$o="silentIframeClientTokenHelper",kr="silentHandlerInitiateAuthRequest",er="silentHandlerMonitorIframeForHash",hu="silentHandlerLoadFrameSync",st="standardInteractionClientCreateAuthCodeClient",pr="standardInteractionClientGetClientConfiguration",mn="standardInteractionClientInitializeAuthorizationRequest",lu="silentFlowClientAcquireCachedToken",du="getStandardParams",uu="handleCodeResponse",Oi="handleResponseEar",va="handleResponsePlatformBroker",Ft="handleResponseCode",fu="authClientAcquireToken",cn="deserializeResponse",gu="authorityFactoryCreateDiscoveredInstance",pu="acquireTokenByCodeAsync",mu="handleRedirectPromise",yu="handleNativeRedirectPromise",wu="nativeMessageHandlerHandshake",Go="removeHiddenIframe",Cu="importExistingCache",kt="generatePkceCodes",_u="generateCodeVerifier",Iu="generateCodeChallengeFromVerifier",vu="sha256Digest",Au="getRandomValues",Wo="generateHKDF",bu="generateBaseKey",Tu="base64Decode",Su="urlEncodeArr",ku="encrypt",Vo="decrypt",Pi="generateEarKey",Eu="decryptEarResponse",Ru="waitForBridgeLateResponse";/*! @azure/msal-browser v5.11.0 2026-05-19 */function mr(o){return`See https://aka.ms/msal.js.errors#${o} for details`}class bn extends me{constructor(e,t){super(e,mr(e),t),Object.setPrototypeOf(this,bn.prototype),this.name="BrowserAuthError"}}function X(o,e){return new bn(o,e)}/*! @azure/msal-browser v5.11.0 2026-05-19 */const He={INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",MSAL_SKU:"msal.js.browser"},ze={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS",MICROSOFT_ENTRA_BROKERID:"MicrosoftEntra",DOM_API_NAME:"DOM API",PLATFORM_DOM_APIS:"get-token-and-sign-out",PLATFORM_DOM_PROVIDER:"PlatformAuthDOMHandler",PLATFORM_EXTENSION_PROVIDER:"PlatformAuthExtensionHandler"},rn={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},nt={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},Jo={GET:"GET",POST:"POST"},gt={SIGNIN:"signin",SIGNOUT:"signout"},Ae={ORIGIN_URI:"request.origin",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",VERIFIER:"code.verifier",INTERACTION_STATUS_KEY:"interaction.status",NATIVE_REQUEST:"request.native"},Mn={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},ue={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962,hydrateCache:963,loadExternalTokens:964},Qo={861:"acquireTokenRedirect",862:"acquireTokenPopup",863:"ssoSilent",864:"acquireTokenSilent_authCode",865:"handleRedirectPromise",866:"acquireTokenByCode",61:"acquireTokenSilent_silentFlow",961:"logout",962:"logoutPopup",963:"hydrateCache",964:"loadExternalTokens"},Ou=o=>typeof o=="number"&&o in Qo?Qo[o]:"unknown";var ne;(function(o){o.Redirect="redirect",o.Popup="popup",o.Silent="silent",o.None="none"})(ne||(ne={}));const Zo={scopes:Gt},Aa="jwk",Gr="msal.db",Pu=1,xu=`${Gr}.keys`,Ee={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},Nu=[Ee.Default,Ee.Skip,Ee.RefreshTokenAndNetwork];/*! @azure/msal-browser v5.11.0 2026-05-19 */function Dn(o){return encodeURIComponent(yn(o).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function _t(o){return ba(o).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function yn(o){return ba(new TextEncoder().encode(o))}function ba(o){const e=Array.from(o,t=>String.fromCodePoint(t)).join("");return btoa(e)}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */const Ta="pkce_not_created",Sa="ear_jwk_empty",Mu="ear_jwe_empty",Yo="crypto_nonexistent",xi="empty_navigate_uri",Du="hash_empty_error",Ni="no_state_in_hash",Uu="hash_does_not_contain_known_properties",ka="unable_to_parse_state",Lu="state_interaction_type_mismatch",Fu="interaction_in_progress",Hu="interaction_in_progress_cancelled",zu="popup_window_error",Bu="empty_window_error",Wr="user_cancelled",Ku="redirect_bridge_empty_response",ju="redirect_in_iframe",$u="block_iframe_reload",Gu="block_nested_popups",Mi="silent_logout_unsupported",Wu="no_account_error",Vu="no_token_request_cache_error",Ju="unable_to_parse_token_request_cache_error",Ea="non_browser_environment",on="database_not_open",Vr="no_network_connectivity",Qu="post_request_failed",Zu="get_request_failed",Xo="failed_to_parse_response",Ra="crypto_key_not_found",Yu="auth_code_required",Xu="auth_code_or_nativeAccountId_required",qu="spa_code_and_nativeAccountId_present",Oa="database_unavailable",ef="unable_to_acquire_token_from_native_platform",tf="native_handshake_timeout",nf="native_extension_not_installed",Pa="native_connection_not_established",Hn="uninitialized_public_client_application",rf="native_prompt_not_supported",of="invalid_base64_string",sf="invalid_pop_token_request",af="failed_to_build_headers",cf="failed_to_parse_headers",Er="failed_to_decrypt_ear_response",tr="timed_out",hf="empty_response";/*! @azure/msal-browser v5.11.0 2026-05-19 */function Oe(o){return new TextDecoder().decode(Ct(o))}function Ct(o){let e=o.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw X(of)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v5.11.0 2026-05-19 */const lf="RSASSA-PKCS1-v1_5",Vt="AES-GCM",xa="HKDF",Di="SHA-256",df=2048,uf=new Uint8Array([1,0,1]),qo="0123456789abcdef",es=new Uint32Array(1),Ui="raw",Na="encrypt",Li="decrypt",ff="deriveKey",gf="crypto_subtle_undefined",Fi={name:lf,hash:Di,modulusLength:df,publicExponent:uf};function pf(o){if(!window)throw X(Ea);if(!window.crypto)throw X(Yo);if(!o&&!window.crypto.subtle)throw X(Yo,gf)}async function Ma(o){const t=new TextEncoder().encode(o);return window.crypto.subtle.digest(Di,t)}function mf(o){return window.crypto.getRandomValues(o)}function Rr(){return window.crypto.getRandomValues(es),es[0]}function It(){const o=Date.now(),e=Rr()*1024+(Rr()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),r=e&2**30-1,i=Rr();t[0]=o/2**40,t[1]=o/2**32,t[2]=o/2**24,t[3]=o/2**16,t[4]=o/2**8,t[5]=o,t[6]=112|n>>>8,t[7]=n,t[8]=128|r>>>24,t[9]=r>>>16,t[10]=r>>>8,t[11]=r,t[12]=i>>>24,t[13]=i>>>16,t[14]=i>>>8,t[15]=i;let s="";for(let a=0;a<t.length;a++)s+=qo.charAt(t[a]>>>4),s+=qo.charAt(t[a]&15),(a===3||a===5||a===7||a===9)&&(s+="-");return s}async function yf(o,e){return window.crypto.subtle.generateKey(Fi,o,e)}async function Or(o){return window.crypto.subtle.exportKey(Aa,o)}async function wf(o,e,t){return window.crypto.subtle.importKey(Aa,o,Fi,e,t)}async function Cf(o,e){return window.crypto.subtle.sign(Fi,o,e)}async function Hi(){const o=await Da(),t={alg:"dir",kty:"oct",k:_t(new Uint8Array(o))};return yn(JSON.stringify(t))}async function _f(o){const e=Oe(o),n=JSON.parse(e).k,r=Ct(n);return window.crypto.subtle.importKey(Ui,r,Vt,!1,[Li])}async function If(o,e){const t=e.split(".");if(t.length!==5)throw X(Er,"jwe_length");const n=await _f(o).catch(()=>{throw X(Er,"import_key")});try{const r=new TextEncoder().encode(t[0]),i=Ct(t[2]),s=Ct(t[3]),a=Ct(t[4]),c=a.byteLength*8,h=new Uint8Array(s.length+a.length);h.set(s),h.set(a,s.length);const l=await window.crypto.subtle.decrypt({name:Vt,iv:i,tagLength:c,additionalData:r},n,h);return new TextDecoder().decode(l)}catch{throw X(Er,"decrypt")}}async function Da(){const o=await window.crypto.subtle.generateKey({name:Vt,length:256},!0,[Na,Li]);return window.crypto.subtle.exportKey(Ui,o)}async function ts(o){return window.crypto.subtle.importKey(Ui,o,xa,!1,[ff])}async function Ua(o,e,t){return window.crypto.subtle.deriveKey({name:xa,salt:e,hash:Di,info:new TextEncoder().encode(t)},o,{name:Vt,length:256},!1,[Na,Li])}async function vf(o,e,t){const n=new TextEncoder().encode(e),r=window.crypto.getRandomValues(new Uint8Array(16)),i=await Ua(o,r,t),s=await window.crypto.subtle.encrypt({name:Vt,iv:new Uint8Array(12)},i,n);return{data:_t(new Uint8Array(s)),nonce:_t(r)}}async function ns(o,e,t,n){const r=Ct(n),i=await Ua(o,Ct(e),t),s=await window.crypto.subtle.decrypt({
1name:Vt,iv:new Uint8Array(12)},i,r);return new TextDecoder().decode(s)}async function Af(o){const e=await Ma(o),t=new Uint8Array(e);return _t(t)}/*! @azure/msal-browser v5.11.0 2026-05-19 */class zi extends me{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,zi.prototype)}}function Bi(o){return new zi(o,mr(o))}/*! @azure/msal-browser v5.11.0 2026-05-19 */const La="storage_not_supported",bf="in_mem_redirect_unavailable";/*! @azure/msal-browser v5.11.0 2026-05-19 */function Tf(){const o=window.location.hash,e=window.location.search;let t=!1,n=!1,r="",i;if(o&&o.length>1){const l=o.charAt(0)==="#"?o.substring(1):o,u=new URLSearchParams(l);u.has("state")&&(t=!0,r=l,i=u)}if(e&&e.length>1){const l=e.charAt(0)==="?"?e.substring(1):e,u=new URLSearchParams(l);u.has("state")&&(n=!0,r=l,i=u)}if(t&&n){const l=e.charAt(0)==="?"?e.substring(1):e,u=o.charAt(0)==="#"?o.substring(1):o;r=`${l}${u}`,i=new URLSearchParams(r)}if(!r||!i)throw X(hf);const s=i.get("state");if(!s)throw X(Ni);const{libraryState:a}=An(Oe,s),{id:c,meta:h}=a;if(!c||!h)throw X(ka,"missing_library_state");return{params:i,payload:r,urlHash:o,urlQuery:e,hasResponseInHash:t,hasResponseInQuery:n,libraryState:{id:c,meta:h}}}function Fa(o){o.location.hash="",typeof o.history.replaceState=="function"&&o.history.replaceState(null,"",`${o.location.origin}${o.location.pathname}${o.location.search}`)}function Sf(o){const e=o.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function yr(){return window.parent!==window}function kf(){if(yr())return!1;try{const{libraryState:o}=Tf(),{meta:e}=o;return e.interactionType===ne.Popup}catch{return!1}}let pt=null;function Ef(o,e){pt&&(o.verbose("18y01k",e),clearTimeout(pt.timeoutId),pt.channel.close(),pt.reject(X(Hu)),pt=null)}async function Mt(o,e,t,n,r,i){return new Promise((s,a)=>{e.verbose("1rf6em",n.correlationId);const c=n.correlationId;r.addFields({redirectBridgeTimeoutMs:o,lateResponseExperimentEnabled:(i==null?void 0:i.iframeTimeoutTelemetry)||!1},c);const{libraryState:h}=An(t.base64Decode,n.state||""),l=new BroadcastChannel(h.id);let u,m=!1,f,y;const p=window.setTimeout(()=>{pt=null,i!=null&&i.iframeTimeoutTelemetry?(y=r.startMeasurement(Ru,c),m=!0,f=window.setTimeout(()=>{y==null||y.end({success:!1}),clearTimeout(f),l.close()},6e4)):l.close(),a(X(tr,"redirect_bridge_timeout"))},o);pt={timeoutId:p,channel:l,reject:a},l.onmessage=C=>{u=C.data.payload;const w=C!=null&&C.data&&typeof C.data.v=="number"?C.data.v:void 0;if(m){y==null||y.end({success:!!u}),clearTimeout(f),l.close();return}r.addFields({redirectBridgeMessageVersion:w},c),pt=null,clearTimeout(p),l.close(),u?s(u):a(X(Ku))}})}function yt(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Rf(){const e=new fe(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function Of(){if(Wn(window.location.hash)&&yr())throw X($u)}function Pf(o){if(yr()&&!o)throw X(ju)}function xf(){if(kf())throw X(Gu)}function Ha(){if(typeof window>"u")throw X(Ea)}function za(o){if(!o)throw X(Hn)}function Ki(o){Ha(),Of(),xf(),za(o)}function rs(o,e){if(Ki(o),Pf(e.system.allowRedirectInIframe),e.cache.cacheLocation===nt.MemoryStorage)throw Bi(bf)}function Ba(o){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(o).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function Jr(){return It()}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Nf{constructor(){this.dbName=Gr,this.version=Pu,this.tableName=xu,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",r=>{r.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",r=>{const i=r;this.db=i.target.result,this.dbOpen=!0,e()}),n.addEventListener("error",()=>t(X(Oa)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(X(on));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result)}),s.addEventListener("error",a=>{this.closeConnection(),n(a)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((n,r)=>{if(!this.db)return r(X(on));const a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);a.addEventListener("success",()=>{this.closeConnection(),n()}),a.addEventListener("error",c=>{this.closeConnection(),r(c)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(X(on));const s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);s.addEventListener("success",()=>{this.closeConnection(),t()}),s.addEventListener("error",a=>{this.closeConnection(),n(a)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>
1{if(!this.db)return t(X(on));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",s=>{const a=s;this.closeConnection(),e(a.target.result)}),i.addEventListener("error",s=>{this.closeConnection(),t(s)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(X(on));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result===1)}),s.addEventListener("error",a=>{this.closeConnection(),n(a)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const n=window.indexedDB.deleteDatabase(Gr),r=setTimeout(()=>t(!1),200);n.addEventListener("success",()=>(clearTimeout(r),e(!0))),n.addEventListener("blocked",()=>(clearTimeout(r),e(!0))),n.addEventListener("error",()=>(clearTimeout(r),t(!1)))})}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class wr{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,n)=>{e.push(n)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Mf{constructor(e){this.inMemoryCache=new wr,this.indexedDBCache=new Nf,this.logger=e}handleDatabaseAccessError(e,t){if(e instanceof bn&&e.errorCode===Oa)this.logger.error("1wx7zz",t);else throw e}async getItem(e,t){const n=this.inMemoryCache.getItem(e);if(!n)try{return this.logger.verbose("0naxpl",t),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r,t)}return n}async setItem(e,t,n){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r,n)}}async removeItem(e,t){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(n){this.handleDatabaseAccessError(n,t)}}async getKeys(e){const t=this.inMemoryCache.getKeys();if(t.length===0)try{return this.logger.verbose("1iqrbq",e),await this.indexedDBCache.getKeys()}catch(n){this.handleDatabaseAccessError(n,e)}return t}async containsKey(e,t){const n=this.inMemoryCache.containsKey(e);if(!n)try{return this.logger.verbose("03zl2j",t),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r,t)}return n}clearInMemory(e){this.logger.verbose("03r21p",e),this.inMemoryCache.clear(),this.logger.verbose("0uksk1",e)}async clearPersistent(e){try{this.logger.verbose("0rdqut",e);const t=await this.indexedDBCache.deleteDatabase();return t&&this.logger.verbose("149ouc",e),t}catch(t){return this.handleDatabaseAccessError(t,e),!1}}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class ct{constructor(e,t,n){this.logger=e,pf(n??!1),this.cache=new Mf(this.logger),this.performanceClient=t}createNewGuid(){return It()}base64Encode(e){return yn(e)}base64Decode(e){return Oe(e)}base64UrlEncode(e){return Dn(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var l;const t=(l=this.performanceClient)==null?void 0:l.startMeasurement(qd,e.correlationId),n=await yf(ct.EXTRACTABLE,ct.POP_KEY_USAGES),r=await Or(n.publicKey),i={e:r.e,kty:r.kty,n:r.n},s=is(i),a=await this.hashString(s),c=await Or(n.privateKey),h=await wf(c,!1,["sign"]);return await this.cache.setItem(a,{privateKey:h,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri},e.correlationId),t&&t.end({success:!0}),a}async removeTokenBindingKey(e,t){if(await this.cache.removeItem(e,t),await this.cache.containsKey(e,t))throw j(cl)}async clearKeystore(e){this.cache.clearInMemory(e);try{return await this.cache.clearPersistent(e),!0}catch(t){return t instanceof Error?this.logger.error("1owpn8",e):this.logger.error("0yrmwo",e),!1}}async signJwt(e,t,n,r){var A;const i=(A=this.performanceClient)==null?void 0:A.startMeasurement(eu,r),s=await this.cache.getItem(t,r||"");if(!s)throw X(Ra);const a=await Or(s.publicKey),c=is(a),h=Dn(JSON.stringify({kid:t}
1)),l=ki.getShrHeaderString({...n==null?void 0:n.header,alg:a.alg,kid:h}),u=Dn(l);e.cnf={jwk:JSON.parse(c)};const m=Dn(JSON.stringify(e)),f=`${u}.${m}`,p=new TextEncoder().encode(f),C=await Cf(s.privateKey,p),w=_t(new Uint8Array(C)),I=`${f}.${w}`;return i&&i.end({success:!0}),I}async hashString(e){return Af(e)}}ct.POP_KEY_USAGES=["sign","verify"];ct.EXTRACTABLE=!0;function is(o){return JSON.stringify(o,Object.keys(o).sort())}/*! @azure/msal-browser v5.11.0 2026-05-19 */const Df="acquireTokenSilent",Uf="acquireTokenByCode",Lf="acquireTokenPopup",Ff="acquireTokenPreRedirect",Pr="acquireTokenRedirect",Hf="ssoSilent",zf="initializeClientApplication",Bf="localStorageUpdated",Kf="ssoCapable";/*! @azure/msal-browser v5.11.0 2026-05-19 */const Te="msal",ji="browser",os="|",Se=3,zn=3,jf=`${Te}.${ji}.log.level`,$f=`${Te}.${ji}.log.pii`,ss=`${Te}.version`,as="account.keys",cs="token.keys",hs=`${Te}.${ji}.sso.capable`;function Ht(o=zn){return o<1?`${Te}.${as}`:`${Te}.${o}.${as}`}function zt(o,e=Se){return e<1?`${Te}.${cs}.${o}`:`${Te}.${e}.${cs}.${o}`}/*! @azure/msal-browser v5.11.0 2026-05-19 */const Gf=24*60*60*1e3,Qr={Lax:"Lax",None:"None"};class Ka{initialize(){return Promise.resolve()}getItem(e){const t=encodeURIComponent(e),n=document.cookie.split(";");for(let r=0;r<n.length;r++){const i=n[r].trim(),s=i.indexOf("=");if((s===-1?i:i.substring(0,s))===t){const c=s===-1?"":i.substring(s+1);try{return decodeURIComponent(c)}catch{return c}}}return""}getUserData(){throw j(ce)}setItem(e,t,n,r=!0,i=Qr.Lax){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${i};`;if(n){const a=Wf(n);s+=`expires=${a};`}(r||i===Qr.None)&&(s+="Secure;"),document.cookie=s}async setUserData(){return Promise.reject(j(ce))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(n=>{const r=n.trim(),i=r.indexOf("="),s=i===-1?r:r.substring(0,i);try{t.push(decodeURIComponent(s))}catch{}}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function Wf(o){const e=new Date;return new Date(e.getTime()+o*Gf).toUTCString()}/*! @azure/msal-browser v5.11.0 2026-05-19 */function ft(o,e){const t=o.getItem(Ht(e));return t?JSON.parse(t):[]}function je(o,e,t){const n=e.getItem(zt(o,t));if(n){const r=JSON.parse(n);if(r&&r.hasOwnProperty("idToken")&&r.hasOwnProperty("accessToken")&&r.hasOwnProperty("refreshToken"))return r}return{idToken:[],accessToken:[],refreshToken:[]}}/*! @azure/msal-browser v5.11.0 2026-05-19 */function Bn(o){return o.hasOwnProperty("id")&&o.hasOwnProperty("nonce")&&o.hasOwnProperty("data")}/*! @azure/msal-browser v5.11.0 2026-05-19 */const ls="msal.cache.encryption",Vf="msal.broadcast.cache";class Jf{constructor(e,t,n){if(!window.localStorage)throw Bi(La);this.memoryStorage=new wr,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=n,this.broadcast=new BroadcastChannel(Vf)}async initialize(e){const t=new Ka,n=t.getItem(ls);let r={key:"",id:""};if(n)try{r=JSON.parse(n)}catch{}if(r.key&&r.id){const i=Le(Ct,Tu,this.logger,this.performanceClient,e)(r.key);this.encryptionCookie={id:r.id,key:await D(ts,Wo,this.logger,this.performanceClient,e)(i)}}else{const i=It(),s=await D(Da,bu,this.logger,this.performanceClient,e)(),a=Le(_t,Su,this.logger,this.performanceClient,e)(new Uint8Array(s));this.encryptionCookie={id:i,key:await D(ts,Wo,this.logger,this.performanceClient,e)(s)};const c={id:i,key:a};t.setItem(ls,JSON.stringify(c),0,!0,Qr.None)}await D(this.importExistingCache.bind(this),Cu,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",i=>{this.updateCache(i,e)}),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw X(Hn);return this.memoryStorage.getItem(e)}async decryptData(e,t,n){if(!this.initialized||!this.encryptionCookie)throw X(Hn);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},n),null;const r=await D(ns,Vo,this.logger,this.performanceClient,n)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!r)return null;try{return{...JSON.parse(r),lastUpdatedAt:t.lastUpdatedAt}}catch{return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},n),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,n,r,i){if(!this.initialized||!this.encryptionCookie)throw X(Hn);if(i)this.setItem(e,t);else{const{data:s,nonce:a}=await D(vf,ku,this.logger,this.performanceClient,n)(this.encryptionCookie.ke
1y,t,this.getContext(e)),c={id:this.encryptionCookie.id,nonce:a,data:s,lastUpdatedAt:r};this.setItem(e,JSON.stringify(c))}this.memoryStorage.setItem(e,t),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear(),ft(this).forEach(n=>this.removeItem(n));const t=je(this.clientId,this);t.idToken.forEach(n=>this.removeItem(n)),t.accessToken.forEach(n=>this.removeItem(n)),t.refreshToken.forEach(n=>this.removeItem(n)),this.getKeys().forEach(n=>{(n.startsWith(Te)||n.indexOf(this.clientId)!==-1)&&this.removeItem(n)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=ft(this);t=await this.importArray(t,e),t.length?this.setItem(Ht(),JSON.stringify(t)):this.removeItem(Ht());const n=je(this.clientId,this);n.idToken=await this.importArray(n.idToken,e),n.accessToken=await this.importArray(n.accessToken,e),n.refreshToken=await this.importArray(n.refreshToken,e),n.idToken.length||n.accessToken.length||n.refreshToken.length?this.setItem(zt(this.clientId),JSON.stringify(n)):this.removeItem(zt(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const n=this.getItem(e);if(!n)return null;let r;try{r=JSON.parse(n)}catch{return null}return Bn(r)?r.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):(this.performanceClient.incrementFields({encryptedCacheCount:1},t),D(ns,Vo,this.logger,this.performanceClient,t)(this.encryptionCookie.key,r.nonce,this.getContext(e),r.data)):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),n)}async importArray(e,t){const n=[],r=[];return e.forEach(i=>{const s=this.getItemFromEncryptedCache(i,t).then(a=>{a?(this.memoryStorage.setItem(i,a),n.push(i)):this.removeItem(i)});r.push(s)}),await Promise.all(r),n}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e,t){this.logger.trace("17cxcm",t);const n=this.performanceClient.startMeasurement(Bf);n.add({isBackground:!0});const{key:r,value:i,context:s}=e.data;if(!r){this.logger.error("0e10qr",t),n.end({success:!1,errorCode:"noKey"});return}if(s&&s!==this.clientId){this.logger.trace("04rtdy",t),n.end({success:!1,errorCode:"contextMismatch"});return}i?(this.memoryStorage.setItem(r,i),this.logger.verbose("1vzsgt",t)):(this.memoryStorage.removeItem(r),this.logger.verbose("04ypih",t)),n.end({success:!0})}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Qf{constructor(){if(!window.sessionStorage)throw Bi(La)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return Promise.resolve(null)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */const ie={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_SUCCESS:"msal:loginSuccess",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",BROKERED_REQUEST_START:"msal:brokeredRequestStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",BROKERED_REQUEST_SUCCESS:"msal:brokeredRequestSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",BROKERED_REQUEST_FAILURE:"msal:brokeredRequestFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache",BROKER_CONNECTION_ESTABLISHED:"msal:brokerConnectionEstablished"};
1/*! @azure/msal-browser v5.11.0 2026-05-19 */const Zf="@azure/msal-browser",Et="5.11.0";/*! @azure/msal-browser v5.11.0 2026-05-19 */function lt(o,e){const t=o.indexOf(e);t>-1&&o.splice(t,1)}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Zr extends Kr{constructor(e,t,n,r,i,s,a){super(e,n,r,i,a),this.cacheConfig=t,this.logger=r,this.internalStorage=new wr,this.browserStorage=ds(e,t.cacheLocation,r,i),this.temporaryCacheStorage=ds(e,nt.SessionStorage,r,i),this.cookieStorage=new Ka,this.eventHandler=s}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){let t=ft(this.browserStorage),n=je(this.clientId,this.browserStorage);this.performanceClient.addFields({preMigrateAcntCount:t.length,preMigrateATCount:n.accessToken.length,preMigrateITCount:n.idToken.length,preMigrateRTCount:n.refreshToken.length},e);for(let i=0;i<zn;i++){const s=i;await this.removeStaleAccounts(i,s,e)}for(let i=0;i<Se;i++){const s=i;await this.migrateIdTokens(i,s,e)}const r=this.getKMSIValues();for(let i=0;i<Se;i++)await this.migrateAccessTokens(i,r,e),await this.migrateRefreshTokens(i,r,e);t=ft(this.browserStorage),n=je(this.clientId,this.browserStorage),this.performanceClient.addFields({postMigrateAcntCount:t.length,postMigrateATCount:n.accessToken.length,postMigrateITCount:n.idToken.length,postMigrateRTCount:n.refreshToken.length},e)}async updateOldEntry(e,t){const n=this.browserStorage.getItem(e),r=this.validateAndParseJson(n||"");if(!r)return this.browserStorage.removeItem(e),null;if(!r.lastUpdatedAt)r.lastUpdatedAt=Date.now().toString(),this.setItem(e,JSON.stringify(r),t);else if(xo(r.lastUpdatedAt,this.cacheConfig.cacheRetentionDays))return this.browserStorage.removeItem(e),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},t),null;const i=Bn(r)?await this.browserStorage.decryptData(e,r,t):r;return!i||!dr(i)?(this.performanceClient.incrementFields({invalidCacheCount:1},t),null):(No(i)||Mo(i))&&i.expiresOn&&Xn(i.expiresOn,Rs)?(this.browserStorage.removeItem(e),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},t),null):i}async removeStaleAccounts(e,t,n){const r=ft(this.browserStorage,e);if(r.length!==0){for(const i of[...r]){this.performanceClient.incrementFields({oldAcntCount:1},n);const s=this.browserStorage.getItem(i),a=this.validateAndParseJson(s||"");if(!a){lt(r,i);continue}if(a.lastUpdatedAt)xo(a.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)&&(await this.removeAccountOldSchema(i,a,t,n),lt(r,i));else{a.lastUpdatedAt=Date.now().toString(),this.setItem(i,JSON.stringify(a),n);continue}}this.setAccountKeys(r,n,e)}}async removeAccountOldSchema(e,t,n,r){const i=Bn(t)?await this.browserStorage.decryptData(e,t,r):t,s=i==null?void 0:i.homeAccountId;if(s){const a=this.getTokenKeys(n);[...a.idToken].filter(c=>c.includes(s)).forEach(c=>{this.browserStorage.removeItem(c),lt(a.idToken,c)}),[...a.accessToken].filter(c=>c.includes(s)).forEach(c=>{this.browserStorage.removeItem(c),lt(a.accessToken,c)}),[...a.refreshToken].filter(c=>c.includes(s)).forEach(c=>{this.browserStorage.removeItem(c),lt(a.refreshToken,c)}),this.setTokenKeys(a,r,n)}this.performanceClient.incrementFields({expiredAcntRemovedCount:1},r),this.browserStorage.removeItem(e)}getKMSIValues(){const e={},t=this.getTokenKeys().idToken;for(const n of t){const r=this.browserStorage.getUserData(n);if(r){const i=JSON.parse(r),s=et(i.secret,Oe);s&&(e[i.homeAccountId]=ot(s))}}return e}async migrateIdTokens(e,t,n){const r=je(this.clientId,this.browserStorage,e);if(r.idToken.length===0)return;const i=je(this.clientId,this.browserStorage,Se),s=ft(this.browserStorage),a=ft(this.browserStorage,t);for(const c of[...r.idToken]){this.performanceClient.incrementFields({oldITCount:1},n);const h=await this.updateOldEntry(c,n);if(!h){lt(r.idToken,c);continue}const l=s.find(I=>I.includes(h.homeAccountId)),u=a.find(I=>I.includes(h.homeAccountId));let m=null;if(l)m=this.getAccount(l,n);else if(u){const I=this.browserStorage.getItem(u),A=this.validateAndParseJson(I||"");m=A&&Bn(A)?await this.browserStorage.decryptData(u,A,n):A}if(!m){this.performanceClient.incrementFields({skipITMigrateCount:1},n);continue}const f=et(h.secret,Oe),y=this.generateCredentialKey(h),p=this.getIdTokenCredential(y,n),C=Object.keys(f).includes("signin_state"),w=p&&Object.keys(et(p.secret,Oe)||{}).includes("signin_state");if(!p||h.lastUpdatedAt>p.lastUpdatedAt&&(C||!w)){const I=m.tenantProfiles||[],A=wi(f)||m.realm;if(A&&!I.find(U=>U.tenantId===A)){const U=Wt(m.homeAccountId,m.localAccountId,A,f);I.push(U)}m.tenantProfiles=I;const k=this.generateAccountKey(Tt(m)),T=ot(f);await this.setUserData(k,JSON.stringify(m),n,m.lastUpdatedAt,T),s.includes(k)||s.push(k),await this.setUserData(y,JSON.stringify(h),n,h.lastUpdatedAt,T),this.performanceClient.incrementFields({migratedITCount:1},n),i.idToken.includes(y)||i.idToken.push(y)}}this.setTokenKeys(r,n,e),this.setTokenKeys(i,n),this.setAccountKeys(s,n)}async migrateAccessTokens(e,t,n){const r=je(this.clientId,this.browserStorage,e);if(r.accessToken.length===0)return;const i=je(this.clientId,this.browserStorage,Se);for(const s of[...r.accessToken]){this.performanceClient.incrementFields({oldATCount:1},n);const a=await this.updateOldEntry(s,n);if(!a){lt(r.accessToken,s);continue}if(!(a.homeAccountId in t)){this.performanceClient.incrementFields({skipATMigrateCount:1},n);continue}const c=this.generateCredentialKey(a),h=t[a.homeAccountId];if(!i.accessToken.includes(c))await this.setUserData(c,JSON.stringify(a),n,a.lastUpdatedAt,h),this.performanceClient.incrementFields({migratedATCount:1},n),i.accessToken.push(c);else{const l=this.getAccessTokenCredential(c,n);(!l||a.lastUpdatedAt>l.lastUpdatedAt)&&(await this.setUserData(c,JSON.stringify(a),n,a.lastUpdatedAt,h),this.performanceClient.incrementFields({migratedATCount:1},n))}}this.setTokenKeys(r,n,e),this.setTokenKeys(i,n)}async migrateRefreshTokens(e,t,n){const r=je(this.clientId,this.browserStorage,e);if(r.refreshToken.length===0)return;const i=je(this.clientId,this.browserStorage,Se);for(const s of[...r.refreshToken]){this.performanceClient.incrementFields({oldRTCount:1},n);const a=await this.updateOldEntry(s,n);if(!a){lt(r.refreshToken,s);continue}if(!(a.homeAccountId in t)){this.performanceClient.incrementFields({skipRTMigrateCount:1},n);continue}const c=this.generateCredentialKey(a),h=t[a.homeAccountId];if(!i.refreshToken.includes(c))await this.setUserData(c,JSON.stringify(a),n,a.lastUpdatedAt,h),this.performanceClient.incrementFields({migratedRTCount:1},n),i.refreshToken.push(c);else{const l=this.getRefreshTokenCredential(c,n);(!l||a.lastUpdatedAt>l.lastUpdatedAt)&&(await this.setUserData(c,JSON.stringify(a),n,a.lastUpdatedAt,h),this.performanceClient.incrementFields({migratedRTCount:1},n))}}this.setTokenKeys(r,n,e),this.setTokenKeys(i,n)}trackVersionChanges(e){const t=this.browserStorage.getItem(ss);t&&(this.logger.info("1wuc87",e),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Et&&this.setItem(ss,Et,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}setItem(e,t,n){const r=new Array(Se+1).fill(0),i=[],s=20;for(let a=0;a<=s;a++)try{if(this.browserStorage.setItem(e,t),a>0)for(let c=0;c<=Se;c++){const h=r.slice(0,c).reduce((u,m)=>u+m,0);if(h>=a)break;const l=a>h+r[c]?h+r[c]:a;a>h&&r[c]>0&&this.removeAccessTokenKeys(i.slice(h,l),n,c)}break}catch(c){const h=Br(c);if(h.errorCode===zr&&a<s){if(!i.length)for(let l=0;l<=Se;l++)if(e===zt(this.clientId,l)){const u=JSON.parse(t).accessToken;i.push(...u),r[l]=u.length}else{const u=this.getTokenKeys(l).accessToken;i.push(...u),r[l]=u.length}if(i.length<=a)throw h;this.removeAccessToken(i[a],n,!1)}else throw h}}async setUserData(e,t,n,r,i){const s=new Array(Se+1).fill(0),a=[],c=20;for(let h=0;h<=c;h++)try{if(await D(this.browserStorage.setUserData.bind(this.browserStorage),vd,this.logger,this.performanceClient,n)(e,t,n,r,i),h>0)for(let l=0;l<=Se;l++){const u=s.slice(0,l).reduce((f,y)=>f+y,0);if(u>=h)break;const m=h>u+s[l]?u+s[l]:h;h>u&&s[l]>0&&this.removeAccessTokenKeys(a.slice(u,m),n,l)}break}catch(l){const u=Br(l);if(u.errorCode===zr&&h<c){if(!a.length)for(let m=0;m<=Se;m++){const f=this.getTokenKeys(m).accessToken;a.push(...f),s[m]=f.length}if(a.length<=h)throw u;this.removeAccessToken(a[h],n,!1)}else throw u}}getAccount(e,t){this.logger.trace("1lfvm6",t);const n=this.browserStorage.getUserData(e);if(!n)return this.removeAccountKeyFromMap(e,t),null;const r=this.validateAndParseJson(n);if(!r||!Hl(r))return null;const i=Kr.toObject({},r);return this.performanceClient.addFields({accountCachedBy:Ou(i.cachedByApiId)},t),i}async setAccount(e,t,n,r){this.logger.trace("1bz3wr",t);const i=this.generateAccountKey(Tt(e)),s=Date.now().toString();e.lastUpdatedAt=s,e.cachedByApiId=r,await this.setUserData(i,JSON.stringify(e),t,s,n),this.addAccountKeyToMap(i,t),this.performanceClient.addFields({kmsi:n},t)}setAccountKeys(e,t,n=zn){e.length===0?this.removeItem(Ht(n)):this.setItem(Ht(n),JSON.stringify(e),t)}getAccountKeys(){return ft(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("0rb85k",t),this.logger.tracePii("1l9bdo",t);const n=this.getAccountKeys();return n.indexOf(e)===-1?(n.push(e),this.setItem(Ht(),JSON.stringify(n),t),this.logger.verbose("0xia39",t),!0):(this.logger.verbose("0161kk",t),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("1jpigu",t),this.logger.tracePii("1xzspl",t);const n=this.getAccountKeys(),r=n.indexOf(e);r>-1?(n.splice(r,1),this.setAccountKeys(n,t)):this.logger.trace("1dytu2",t)}removeAccount(e,t){const n=this.getActiveAccount(t);(n==null?void 0:n.homeAccountId)===e.homeAccountId&&(n==null?void 0:n.environment)===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEac
1h(r=>{r.includes(e.homeAccountId)&&r.includes(e.environment)&&this.browserStorage.removeItem(r)})}removeIdToken(e,t){super.removeIdToken(e,t);const n=this.getTokenKeys(),r=n.idToken.indexOf(e);r>-1&&(this.logger.info("05udv9",t),n.idToken.splice(r,1),this.setTokenKeys(n,t))}removeAccessToken(e,t,n=!0){super.removeAccessToken(e,t),n&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,n=Se){this.logger.trace("17o18n",t);const r=this.getTokenKeys(n);let i=0;if(e.forEach(s=>{const a=r.accessToken.indexOf(s);a>-1&&(r.accessToken.splice(a,1),i++)}),i>0){this.logger.info("15i5d5",t),this.setTokenKeys(r,t,n);return}}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const n=this.getTokenKeys(),r=n.refreshToken.indexOf(e);r>-1&&(this.logger.info("1f4fq3",t),n.refreshToken.splice(r,1),this.setTokenKeys(n,t))}getTokenKeys(e=Se){return je(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,n=Se){if(e.idToken.length===0&&e.accessToken.length===0&&e.refreshToken.length===0){this.removeItem(zt(this.clientId,n));return}else this.setItem(zt(this.clientId,n),JSON.stringify(e),t)}getIdTokenCredential(e,t){const n=this.browserStorage.getUserData(e);if(!n)return this.logger.trace("1jukz6",t),this.removeIdToken(e,t),null;const r=this.validateAndParseJson(n);return!r||!Xl(r)?(this.logger.trace("1jukz6",t),null):(this.logger.trace("01ju66",t),r)}async setIdTokenCredential(e,t,n){this.logger.trace("13hjll",t);const r=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(r,JSON.stringify(e),t,i,n);const s=this.getTokenKeys();s.idToken.indexOf(r)===-1&&(this.logger.info("07jy92",t),s.idToken.push(r),this.setTokenKeys(s,t))}getAccessTokenCredential(e,t){const n=this.browserStorage.getUserData(e);if(!n)return this.logger.trace("0bqvx8",t),this.removeAccessTokenKeys([e],t),null;const r=this.validateAndParseJson(n);return!r||!No(r)?(this.logger.trace("0bqvx8",t),null):(this.logger.trace("1o81rl",t),r)}async setAccessTokenCredential(e,t,n){this.logger.trace("1pondb",t);const r=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(r,JSON.stringify(e),t,i,n);const s=this.getTokenKeys(),a=s.accessToken.indexOf(r);a!==-1&&s.accessToken.splice(a,1),this.logger.trace("1onhey",t),s.accessToken.push(r),this.setTokenKeys(s,t)}getRefreshTokenCredential(e,t){const n=this.browserStorage.getUserData(e);if(!n)return this.logger.trace("0jlizt",t),this.removeRefreshToken(e,t),null;const r=this.validateAndParseJson(n);return!r||!Mo(r)?(this.logger.trace("0jlizt",t),null):(this.logger.trace("0nokxi",t),r)}async setRefreshTokenCredential(e,t,n){this.logger.trace("0tcg8d",t);const r=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(r,JSON.stringify(e),t,i,n);const s=this.getTokenKeys();s.refreshToken.indexOf(r)===-1&&(this.logger.info("0eckjs",t),s.refreshToken.push(r),this.setTokenKeys(s,t))}getAppMetadata(e,t){const n=this.browserStorage.getItem(e);if(!n)return this.logger.trace("1q101h",t),null;const r=this.validateAndParseJson(n);return!r||!nd(e,r)?(this.logger.trace("1q101h",t),null):(this.logger.trace("19pvg2",t),r)}setAppMetadata(e,t){this.logger.trace("0cyma6",t);const n=td(e);this.setItem(n,JSON.stringify(e),t)}getServerTelemetry(e,t){const n=this.browserStorage.getItem(e);if(!n)return this.logger.trace("0jk19c",t),null;const r=this.validateAndParseJson(n);return!r||!ql(e,r)?(this.logger.trace("0jk19c",t),null):(this.logger.trace("12jguk",t),r)}setServerTelemetry(e,t,n){this.logger.trace("1poh61",n),this.setItem(e,JSON.stringify(t),n)}getAuthorityMetadata(e,t){const n=this.internalStorage.getItem(e);if(!n)return this.logger.trace("1r39oe",t),null;const r=this.validateAndParseJson(n);return r&&rd(e,r)?(this.logger.trace("1ohvk3",t),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Mn.WRAPPER_SKU,e),this.internalStorage.setItem(Mn.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Mn.WRAPPER_SKU)||"",t=this.internalStorage.getItem(Mn.WRAPPER_VER)||"";return[e,t]}setAuthorityMetadata(e,t,n){this.logger.trace("07w8n2",n),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Co.ACTIVE_ACCOUNT_FILTERS),n=this.browserStorage.getItem(t);if(!n)return this.logger.trace("08gw0e",e),null;const r=this.validateAndParseJson(n);return r?(this.logger.trace("1t3ch7",e),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId},e)):(this.logger.trace("0me1up",e),null)}setActiveAccount(e,t){const n=this.generateCacheKey(Co.ACTIVE_ACCOUNT_FILTERS);if(e){this.logger.verbose("0rsj80",t);const r={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.setItem(n,JSON.stringify(r),t)}else this.logger.verbose("1bp5z5",t),this.browserStorage.removeItem(n);this.eventHandler.emitEvent(ie.ACTIVE_ACCOUNT_CHANGED,t)}getThrottlingCache(e,t){const n=this.browserStorage.getItem(e);if(!n)return this.logger.trace("1h4wa6",t),null;const r=this.validateAndParseJson(n);return!r||!ed(e,r)?(this.logger.trace("1h4wa6",t),null):(this.logger.trace("0of6n8",t),r)}setThrottlingCache(e,t,n){this.logger.trace("0wfgh6",n),this.setItem(e,JSON.stringify(t),n)}getTemporaryCache(e,t,n){this.logger.trace("1ordf8",t);const r=n?this.generateCacheKey(e):e;return this.temporaryCacheStorage.getItem(r)}setTemporaryCache(e,t,n){const r=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(r,t)}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e)}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEac
1h(t=>{(t.indexOf(Te)!==-1||t.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(t)}),this.browserStorage.getKeys().forEach(t=>{(t.indexOf(Te)!==-1||t.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(t)}),this.internalStorage.clear()}generateCacheKey(e){return Ve.startsWith(e,Te)?e:`${Te}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===be.REFRESH_TOKEN&&e.familyId||e.clientId,n=e.tokenType&&e.tokenType.toLowerCase()!==pe.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Te}.${Se}`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",n].join(os).toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Te}.${zn}`,e.homeAccountId,e.environment,t||e.tenantId||""].join(os).toLowerCase()}resetRequestCache(e){this.logger.trace("0h0ynu",e),this.removeTemporaryItem(this.generateCacheKey(Ae.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Ae.VERIFIER)),this.removeTemporaryItem(this.generateCacheKey(Ae.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Ae.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Ae.NATIVE_REQUEST)),this.setInteractionInProgress(!1,void 0)}cacheAuthorizeRequest(e,t,n){this.logger.trace("1tzef5",t);const r=yn(JSON.stringify(e));if(this.setTemporaryCache(Ae.REQUEST_PARAMS,r,!0),n){const i=yn(n);this.setTemporaryCache(Ae.VERIFIER,i,!0)}}getCachedRequest(e){this.logger.trace("0uen20",e);const t=this.getTemporaryCache(Ae.REQUEST_PARAMS,e,!0);if(!t)throw X(Vu);const n=this.getTemporaryCache(Ae.VERIFIER,e,!0);let r,i="";try{r=JSON.parse(Oe(t)),n&&(i=Oe(n))}catch{throw this.logger.errorPii("0ewsey",e),this.logger.error("0tvdic",e),X(Ju)}return[r,i]}getCachedNativeRequest(){this.logger.trace("1yxcdm","");const e=this.getTemporaryCache(Ae.NATIVE_REQUEST,"",!0);if(!e)return this.logger.trace("0mnxd4",""),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("0rrkip",""),null)}isInteractionInProgress(e){var n;const t=(n=this.getInteractionInProgress())==null?void 0:n.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${Te}.${Ae.INTERACTION_STATUS_KEY}`,t=this.getTemporaryCache(e,"",!1);try{return t?JSON.parse(t):null}catch{return this.logger.error("0jjyys",""),this.removeTemporaryItem(e),this.resetRequestCache(""),Fa(window),null}}setInteractionInProgress(e,t=gt.SIGNIN,n=!1,r=""){var s;const i=`${Te}.${Ae.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())if(n)this.logger.warning("1pmscr",r),Ef(this.logger,r),this.removeTemporaryItem(i);else throw X(Fu);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else!e&&((s=this.getInteractionInProgress())==null?void 0:s.clientId)===this.clientId&&this.removeTemporaryItem(i)}async hydrateCache(e,t){const n=hr(e.account.homeAccountId,e.account.environment,e.idToken,this.clientId,e.tenantId),r=lr(e.account.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Yn(e.expiresOn):0,e.extExpiresOn?Yn(e.extExpiresOn):0,Oe,void 0,e.tokenType,void 0,t.sshKid);t.resource&&(r.resource=t.resource);const i={idToken:n,accessToken:r};return this.saveCacheRecord(i,e.correlationId,ot(et(e.idToken,Oe)),ue.hydrateCache)}async saveCacheRecord(e,t,n,r,i){try{await super.saveCacheRecord(e,t,n,r,i)}catch(s){if(s instanceof Ut&&this.performanceClient&&t)try{const a=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:a.refreshToken.length,cacheIdCount:a.idToken.length,cacheAtCount:a.accessToken.length},t)}catch{}throw s}}}function ds(o,e,t,n){try{switch(e){case nt.LocalStorage:return new Jf(o,t,n);case nt.SessionStorage:return new Qf;case nt.MemoryStorage:default:break}}catch(r){t.error(r,"")}return new wr}const Yf=(o,e,t,n)=>{const r={cacheLocation:nt.MemoryStorage,cacheRetentionDays:5};return new Zr(o,r,Vn,e,t,n)};/*! @azure/msal-browser v5.11.0 2026-05-19 */function Xf(o,e,t,n,r){return o.verbose("1yd030",n),t?e.getAllAccounts(r,n):[]}function qf(o,e,t,n){e.trace("0u7b90",n);const r=t.getAccountInfoFilteredBy(o,n);return r?(e.verbose("0btgll",n),r):(e.verbose("0ltaj5",n),null)}function eg(o,e,t){e.setActiveAccount(o,t)}function tg(o,e){return o.getActiveAccount(e)}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */const ng="msal.broadcast.event";class rg{constructor(e){this.eventCallbacks=new Map,this.logger=e||new rt({}),typeof BroadcastChannel<"u"&&(this.broadcastChannel=new BroadcastChannel(ng)),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,n){if(typeof window<"u"){const r=n||Jr();return this.eventCallbacks.has(r)?(this.logger.error("1578i0",""),null):(this.eventCallbacks.set(r,[e,t||[]]),this.logger.verbose("1cnec4",""),r)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose("12zotd","")}emitEvent(e,t,n,r,i){var a;const s={eventType:e,interactionType:n||null,payload:r||null,error:i||null,correlationId:t,timestamp:Date.now()};switch(e){case ie.LOGIN_SUCCESS:case ie.LOGOUT_SUCCESS:case ie.ACTIVE_ACCOUNT_CHANGED:(a=this.broadcastChannel)==null||a.postMessage(s)}this.invokeCallbacks(s)}invokeCallbacks(e){this.eventCallbacks.forEach(([t,n],r)=>{(n.length===0||n.includes(e.eventType))&&(this.logger.verbose("15jpwk",""),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){var e;(e=this.broadcastChannel)==null||e.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){var e;(e=this.broadcastChannel)==null||e.removeEventListener("message",this.invokeCrossTabCallbacks)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class ja{constructor(e,t,n,r,i,s,a,c,h){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.platformAuthProvider=h,this.correlationId=c,this.logger=r.clone(He.MSAL_SKU,Et),this.performanceClient=a}}function nr(o,e,t,n){t.verbose("0bd1la",n);const r=o||e||"";return fe.getAbsoluteUrl(r,yt())}function Ne(o,e,t,n,r,i){r.verbose("1p12tq",t);const s={clientId:e,correlationId:t,apiId:o,forceRefresh:!1,wrapperSKU:n.getWrapperMetadata()[0],wrapperVer:n.getWrapperMetadata()[1]};return new pn(s,n)}async function at(o,e,t,n,r,i,s,a,c){const h=a&&a.hasOwnProperty("instance_aware")?a.instance_aware:void 0,l={protocolMode:o.system.protocolMode,OIDCOptions:o.auth.OIDCOptions,knownAuthorities:o.auth.knownAuthorities,cloudDiscoveryMetadata:o.auth.cloudDiscoveryMetadata,authorityMetadata:o.auth.authorityMetadata},u=i||o.auth.authority,m=h!=null&&h.length?h==="true":o.auth.instanceAware,f=c&&m?o.auth.authority.replace(fe.getDomainFromUrl(u),c.environment):u,y=De.generateAuthority(f,s||o.auth.azureCloudOptions),p=await D(wa,gu,r,t,e)(y,o.system.networkClient,n,l,r,e,t);if(c&&!p.isAlias(c.environment))throw ge($h);return p}async function $i(o,e,t,n,r){if(r)try{o.removeAccount(r,n),t.verbose("0s4z6h",n)}catch{t.error("0mgg1d",n)}else try{t.verbose("0zj631",n),o.clear(n),await e.clearKeystore(n)}catch{t.error("12ih0c",n)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */async function Gi(o,e,t,n,r){const i=o.authority||e.auth.authority,s=[...o&&o.scopes||[]],a={...o,correlationId:o.correlationId,authority:i,scopes:s};if(!a.authenticationScheme)a.authenticationScheme=pe.BEARER,n.verbose("1l4fwv",r);else{if(a.authenticationScheme===pe.SSH){if(!o.sshJwk)throw ge(oi);if(!o.sshKid)throw ge(Bh)}n.verbose("1ecmns",r)}return a}async function ig(o,e,t,n,r){const i=await D(Gi,Ri,r,n,o.correlationId)(o,t,n,r,o.correlationId);return{...o,...i,account:e,forceRefresh:o.forceRefresh||!1}}function $a(o,e){let t;const n=o.httpMethod;if(e===Ue.EAR){if(n&&n!==Dt.POST)throw ge(Gh);t=Dt.POST}else t=n||Dt.GET;return t}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Jt extends ja{initializeLogoutRequest(e){this.logger.verbose("0546u4",this.correlationId);const t={correlationId:this.correlationId,...e};if(e)if(e.logoutHint)this.logger.verbose("12k4l4",this.correlationId);else if(e.account){const n=e.account.loginHint||this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("0d7s8p",this.correlationId),t.logoutHint=n)}else this.logger.verbose("0pdtc3",this.correlationId);else this.logger.verbose("07ndze",this.correlationId);return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("1vamm6",t.correlationId),t.postLogoutRedirectUri=fe.getAbsoluteUrl(e.postLogoutRedirectUri,yt())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("15m5g7",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("1f4xlz",t.correlationId),t.postLogoutRedirectUri=fe.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,yt())):(this.logger.verbose("17s5rf",t.correlationId),t.postLogoutRedirectUri=fe.getAbsoluteUrl(yt(),yt())):this.logger.verbose("0ljv63",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return this.logger.verbose("0u5bmc",this.correlationId),t.login_hint;this.logger.verbose("0mvp54",this.correlationId)}else this.logger.verbose("1e7bdp",this.correlationId);return null}async createAuthCodeClient(e){const t=await D(this.getClientConfiguration.bind(this),pr,this.logger,this.performanceClient,this.correlationId)(e);return new Ca(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:r,requestExtraQueryParameters:i,account:s}=e,a=e.authority||await D(at,At,this.logger,this.performanceClient,this.correlationId)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,n,r,i,s),c=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri,isMcp:this.config.auth.isMcp},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:c.loggerCallback,piiLoggingEnabled:c.piiLoggingEnabled,logLevel:c.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:He.MSAL_SKU,version:Et,cpu:"",os:""},telemetry:this.config.telemetry}}}async function wn(o,e,t,n,r,i,s,a){const c=nr(o.redirectUri,t.auth.redirectUri,i,a);new URL(c).origin!==new URL(window.location.href).origin&&(i.warning("08qbvw",a),s.addFields({isRedirectUriCrossOrigin:!0},a));const h={interactionType:e},l=Ai(n,o&&o.state||"",h),m={...await D(Gi,Ri,i,s,a)({...o,correlationId:a},t,s,i,a),redirectUri:c,state:l,nonce:o.nonce||It(),responseMode:t.auth.OIDCOptions.responseMode},f={...m,httpMethod:$a(m,t.system.protocolMode)};if(o.loginHint||o.sid)return f;const y=o.account||r.getActiveAccount(a);return y&&(i.verbose("1eqlb3",a),i.verbosePii("0tf99t",a),f.account=y),f}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */function og(o,e){if(!e)return null;try{return An(o.base64Decode,e).libraryState.meta}catch{throw j(fn)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */function hn(o,e,t,n){const r=Wn(o);if(!r)throw ea(o)?(t.error("13pl0s",n),t.errorPii("1097vx",n),X(Uu)):(t.error("18h0l1",n),X(Du));return r}function sg(o,e,t){if(!o.state)throw X(Ni);const n=og(e,o.state);if(!n)throw X(ka);if(n.interactionType!==t)throw X(Lu)}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Ga{constructor(e,t,n,r,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=r,this.performanceClient=i}async handleCodeResponse(e,t,n){let r;try{r=Kd(e,t.state)}catch(i){throw i instanceof Ot&&i.subError===Wr?X(Wr):i}return D(this.handleCodeResponseFromServer.bind(this),ca,this.logger,this.performanceClient,t.correlationId)(r,t,n)}async handleCodeResponseFromServer(e,t,n,r=!0){if(this.logger.trace("0mf2hb",t.correlationId),this.authCodeRequest.code=e.code,r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const s=this.createCcsCredentials(t);s&&(this.authCodeRequest.ccsCredential=s)}return await D(this.authModule.acquireToken.bind(this.authModule),fu,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,n,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:We.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:We.UPN}:null}}/*! @azure/msal-browser v5.11.0 2026-05-19 */const ag="ContentError",cg="PageException",hg="user_switch";/*! @azure/msal-browser v5.11.0 2026-05-19 */const lg="USER_INTERACTION_REQUIRED",dg="USER_CANCEL",ug="NO_NETWORK",fg="DISABLED",gg="ACCOUNT_UNAVAILABLE",pg="UX_NOT_ALLOWED";/*! @azure/msal-browser v5.11.0 2026-05-19 */const mg=-2147186943;class qe extends me{constructor(e,t,n){super(e,t||mr(e)),Object.setPrototypeOf(this,qe.prototype),this.name="NativeAuthError",this.ext=n}}function Nt(o){if(o.ext&&o.ext.status&&o.ext.status===fg||o.ext&&o.ext.error&&o.ext.error===mg)return!0;switch(o.errorCode){case ag:case cg:return!0;default:return!1}}function rr(o,e,t){if(t&&t.status)switch(t.status){case gg:return qn(bd,mr(o));case lg:return new Qe(o,e);case dg:return X(Wr);case ug:return X(Vr);case pg:return qn(la)}return new qe(o,e,t)}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Wa extends Jt{async acquireToken(e){const t=Ne(ue.acquireTokenSilent_silentFlow,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),n=await D(this.getClientConfiguration.bind(this),pr,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),r=new Hd(n,this.performanceClient);this.logger.verbose("0wa871",this.correlationId);try{const s=(await D(r.acquireCachedToken.bind(r),lu,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),s}catch(i){throw i instanceof bn&&i.errorCode===Ra&&this.logger.verbose("06wena",this.correlationId),i}}logout(e){this.logger.verbose("1rkurh",this.correlationId);const t=this.initializeLogoutRequest(e);return $i(this.browserStorage,this.browserCrypto,this.logger,this.correlationId,t.account)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Kn extends ja{constructor(e,t,n,r,i,s,a,c,h,l,u,m){super(e,t,n,r,i,s,c,m,h),this.apiId=a,this.accountId=l,this.platformAuthProvider=h,this.nativeStorageManager=u,this.silentCacheClient=new Wa(e,this.nativeStorageManager,n,r,i,s,c,m,h);const f=this.platformAuthProvider.getExtensionName();this.skus=pn.makeExtraSkuString({libraryName:He.MSAL_SKU,libraryVersion:Et,extensionName:f,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[Eh]:this.skus}}async acquireToken(e,t){this.logger.trace("03qeos",this.correlationId);const n=this.performanceClient.startMeasurement(Ei,this.correlationId),r=Je(),i=Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger);try{const s=await this.initializePlatformRequest(e);
1try{const c=await this.acquireTokensFromCache(this.accountId,s);return n.end({success:!0,isNativeBroker:!1,fromCache:!0}),c}catch(c){if(t===Ee.AccessToken)throw this.logger.info("0eitbc",this.correlationId),n.end({success:!1,brokerErrorCode:"cache_request_failed"}),c;this.logger.info("0957j1",this.correlationId)}const a=await this.platformAuthProvider.sendMessage(s);return await this.handleNativeResponse(a,s,r).then(c=>(n.end({success:!0,isNativeBroker:!0,requestId:c.requestId}),i.clearNativeBrokerErrorCode(),c)).catch(c=>{throw n.end({success:!1,errorCode:c.errorCode,subErrorCode:c.subError}),c})}catch(s){throw s instanceof qe&&i.setNativeBrokerErrorCode(s.errorCode),n.end({success:!1}),s}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:ke.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("1ndf3e",this.correlationId),j(To);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!n)throw j(To);try{const r=this.createSilentCacheRequest(t,n),i=await this.silentCacheClient.acquireToken(r),s=this.browserStorage.getIdToken(n,this.correlationId,this.browserStorage.getTokenKeys(),n.tenantId),a=et((s==null?void 0:s.secret)||"",Oe),c=Jn(n,void 0,a,s==null?void 0:s.secret);return{...i,idToken:(s==null?void 0:s.secret)||"",idTokenClaims:a,account:c}}catch(r){throw r}}async acquireTokenRedirect(e,t,n){this.logger.trace("0luikq",this.correlationId);const r=await this.initializePlatformRequest(e),i=(n==null?void 0:n.navigateToLoginRequestUrl)??!0;try{await this.platformAuthProvider.sendMessage(r)}catch(c){if(c instanceof qe&&(Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger).setNativeBrokerErrorCode(c.errorCode),Nt(c)))throw c}this.browserStorage.setTemporaryCache(Ae.NATIVE_REQUEST,JSON.stringify(r),!0);const s={apiId:ue.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=i?window.location.href:nr(e.redirectUri,this.config.auth.redirectUri,this.logger,this.correlationId);t.end({success:!0}),await this.navigationClient.navigateExternal(a,s)}async handleRedirectPromise(){var i,s;if(this.logger.trace("1c5lhw",this.correlationId),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("0le6uv",this.correlationId),null;const e=this.browserStorage.getCachedNativeRequest();if(!e)return this.logger.verbose("0a6zjb",this.correlationId),(i=this.performanceClient)==null||i.addFields({errorCode:"no_cached_request"},this.correlationId),null;const{prompt:t,...n}=e;t&&this.logger.verbose("0ac34v",this.correlationId),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ae.NATIVE_REQUEST));const r=Je();try{this.logger.verbose("003x5a",this.correlationId);const a=await this.platformAuthProvider.sendMessage(n),c=await this.handleNativeResponse(a,n,r);return Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger).clearNativeBrokerErrorCode(),(s=this.performanceClient)==null||s.addFields({isNativeBroker:!0},this.correlationId),c}catch(a){throw a}}logout(){return this.logger.trace("0u2sjm",this.correlationId),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var l,u;this.logger.trace("1bojln",this.correlationId);const r=et(e.id_token,Oe),i=this.createHomeAccountIdentifier(e,r),s=(l=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId))==null?void 0:l.homeAccountId;if((u=t.extraParameters)!=null&&u.child_client_id&&e.account.id!==t.accountId)this.logger.info("1ub1in",this.correlationId);else if(i!==s&&e.account.id!==t.accountId)throw rr(hg);const a=await at(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,t.authority),c=ua(this.browserStorage,a,i,Oe,this.correlationId,r,e.client_info,a.getPreferredCache(),r.tid,void 0,e.account.id,this.logger,this.performanceClient);e.expires_in=Number(e.expires_in);const h=await this.generateAuthenticationResult(e,t,r,c,a.canonicalAuthority,n);return await this.cacheAccount(c,ot(r)),await this.cacheNativeTokens(e,t,i,r,h.tenantId,n,a.getPreferredCache()),h}createHomeAccountIdentifier(e,t){return ia(e.client_info||"",Ge.Default,this.logger,this.browserCrypto,this.correlationId,t)}generateScopes(e,t){return t?ke.fromString(t):ke.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===pe.POP&&t.signPopToken){if(e.shr)return this.logger.trace("0coqhu",this.correlationId),e.shr;const n=new jt(this.browserCrypto,this.performanceClient),r={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce,correlationId:this.correlationId};if(!t.keyId)throw j(Ks);return n.signPopToken(e.access_token,t.keyId,r)}else return e.access_token}async generateAuthenticationResult(e,t,n,r,i,s){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),c=this.generateScopes(t.scope,e.scope),h=e.account.properties||{},l=h.UID||n.oid||n.sub||"",u=h.TenantId||n.tid||"",m=Jn(Tt(r),void 0,n,e.id_token);
1m.nativeAccountId!==e.account.id&&(m.nativeAccountId=e.account.id);const f=await this.generatePopAccessToken(e,t),y=t.tokenType===pe.POP?pe.POP:pe.BEARER;return{authority:i,uniqueId:l,tenantId:u,scopes:c.asArray(),account:m,idToken:e.id_token,idTokenClaims:n,accessToken:f,fromCache:a?this.isResponseFromCache(a):!1,expiresOn:Fn(s+e.expires_in),tokenType:y,correlationId:this.correlationId,state:e.state,fromPlatformBroker:!0,...t.resource&&{resource:t.resource}}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId,t,this.apiId),this.browserStorage.removeAccountContext(Tt(e),this.correlationId)}async cacheNativeTokens(e,t,n,r,i,s,a){var y;const c=hr(n,a,e.id_token||"",t.clientId,r.tid||""),h=t.tokenType===pe.POP?po:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,l=s+h,u=this.generateScopes(e.scope,t.scope),m=lr(n,a,e.access_token,t.clientId,r.tid||i,u.printScopes(),l,0,Oe,void 0,t.tokenType,void 0,t.keyId);c&&((y=t.storeInCache)==null?void 0:y.idToken)!==!1&&await this.browserStorage.setIdTokenCredential(c,this.correlationId,ot(r));const f={accessToken:m};return this.nativeStorageManager.saveCacheRecord(f,this.correlationId,ot(r),this.apiId,t.storeInCache)}getExpiresInValue(e,t){return e===pe.POP?po:(typeof t=="string"?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch{this.logger.error("0b3l57",this.correlationId)}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("1okqev",this.correlationId),!1):!!e.is_cached}async initializePlatformRequest(e){this.logger.trace("1xdm2a",this.correlationId);const t=await this.getCanonicalAuthority(e),n=e.skipBrokerClaims&&e.embeddedClientId?void 0:this.config.auth.clientCapabilities,{scopes:r,claims:i,...s}=e,a=new ke(r||[]);a.appendScopes(Gt);const c=n&&n.length?Qs(i,n):i,h={...s,claims:c,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:a.printScopes(),redirectUri:nr(e.redirectUri,this.config.auth.redirectUri,this.logger,this.correlationId),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraParameters},extendedExpiryToken:!1,keyId:e.popKid};if(h.signPopToken&&e.popKid)throw X(sf);if(this.handleExtraBrokerParams(h),h.extraParameters=h.extraParameters||{},h.extraParameters.telemetry=ze.MATS_TELEMETRY,e.authenticationScheme===pe.POP){const l={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce,correlationId:this.correlationId},u=new jt(this.browserCrypto,this.performanceClient);let m;if(h.keyId)m=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:h.keyId})),h.signPopToken=!1;else{const f=await D(u.generateCnf.bind(u),vn,this.logger,this.performanceClient,this.correlationId)(l,this.logger);m=f.reqCnfString,h.keyId=f.kid,h.signPopToken=!0}h.reqCnf=m}return this.addRequestSKUs(h),h}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority,{azureCloudOptions:n,account:r}=e;r&&await at(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,t,n,void 0,r);const i=new fe(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case ue.ssoSilent:case ue.acquireTokenSilent_silentFlow:return this.logger.trace("12n1y2",this.correlationId),xe.NONE}if(!e){this.logger.trace("0uid1p",this.correlationId);return}switch(e){case xe.NONE:case xe.CONSENT:case xe.LOGIN:return this.logger.trace("0i0hco",this.correlationId),e;default:throw this.logger.trace("0w3tpw",this.correlationId),X(rf)}}handleExtraBrokerParams(e){var i;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(un)&&e.extraParameters.hasOwnProperty($n)&&e.extraParameters.hasOwnProperty(bt);
1if(!e.embeddedClientId&&!t)return;let n="";const r=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[$n],n=e.extraParameters[bt]),e.extraParameters={child_client_id:n,child_redirect_uri:r},(i=this.performanceClient)==null||i.addFields({embeddedClientId:n,embeddedRedirectUri:r},this.correlationId)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */const yg=new Map([["e","AAD"],["m","MSA"]]);function wg(o){var e,t,n,r,i;if(!o)return null;try{const c=(/%(?:[0-9A-Fa-f]{2})/.test(o)?decodeURIComponent(o):o).split("|");return c.length<5?null:{accountType:yg.get(((e=c[0])==null?void 0:e.trim())||"")||"",error:((t=c[1])==null?void 0:t.trim())||"",subError:((n=c[2])==null?void 0:n.trim())||"",cloudInstance:((r=c[3])==null?void 0:r.trim())||"",callerDataBoundary:((i=c[4])==null?void 0:i.trim())||""}}catch{return null}}function Va(o,e,t){const n=wg(o.clientdata);n!=null&&n.accountType&&t.addFields({accountType:n.accountType},e),n!=null&&n.error&&t.addFields({serverErrorNo:n.error},e),n!=null&&n.subError&&t.addFields({serverSubErrorNo:n.subError},e)}async function Wi(o,e,t,n,r){const i=Bd({...o.auth,authority:e},t,n,r);if(di(i,{sku:He.MSAL_SKU,version:Et,os:"",cpu:""}),o.system.protocolMode!==Ue.OIDC&&ui(i,o.telemetry.application),t.platformBroker&&(fl(i),r.addFields({isPlatformAuthorizeRequest:!0},t.correlationId),t.authenticationScheme===pe.POP)){const s=new ct(n,r),a=new jt(s,r);let c;t.popKid?c=s.encodeKid(t.popKid):c=(await D(a.generateCnf.bind(a),vn,n,r,t.correlationId)(t,n)).reqCnfString,pi(i,c)}return sr(i,t.correlationId,r),i}async function Vi(o,e,t,n,r){if(!t.codeChallenge)throw ge(Ms);const i=await D(Wi,du,n,r,t.correlationId)(o,e,t,n,r);return si(i,qr.CODE),fi(i,t.codeChallenge,Xr),tt(i,{...t.extraQueryParameters,...t.extraParameters}),bi(e,i)}async function Ji(o,e,t,n,r,i){if(!n.earJwk)throw X(Sa);const s=await Wi(e,t,n,r,i);si(s,qr.IDTOKEN_TOKEN_REFRESHTOKEN),bl(s,n.earJwk),fi(s,n.codeChallenge,Xr),tt(s,{...n.extraParameters});const a=new Map;tt(a,n.extraQueryParameters||{}),_n(a,n.correlationId);const c=bi(t,a);return Ja(o,c,s)}async function Qi(o,e,t,n,r,i){const s=await Wi(e,t,n,r,i);si(s,qr.CODE),fi(s,n.codeChallenge,n.codeChallengeMethod||Xr),tt(s,{...n.extraParameters});const a=new Map;tt(a,n.extraQueryParameters||{}),_n(a,n.correlationId);const c=bi(t,a);return Ja(o,c,s)}function Ja(o,e,t){const n=o.createElement("form");return n.method="post",n.action=e,t.forEach((r,i)=>{const s=o.createElement("input");s.hidden=!0,s.name=i,s.value=r,n.appendChild(s)}),o.body.appendChild(n),n}async function Qa(o,e,t,n,r,i,s,a,c,h){if(a.verbose("11qcow",o.correlationId),!h)throw X(Pa);const l=new ct(a,c),u=new Kn(n,r,l,a,s,n.system.navigationClient,t,c,h,e,i,o.correlationId),{userRequestState:m}=An(l.base64Decode,o.state);return D(u.acquireToken.bind(u),Ei,a,c,o.correlationId)({...o,state:m,prompt:void 0})}async function Bt(o,e,t,n,r,i,s,a,c,h,l,u){if(Xe.removeThrottle(s,r.auth.clientId,o),Va(e,o.correlationId,l),e.accountId)return D(Qa,va,h,l,o.correlationId)(o,e.accountId,n,r,s,a,c,h,l,u);const m={...o,code:e.code||"",codeVerifier:t},f=new Ga(i,s,m,h,l);return await D(f.handleCodeResponse.bind(f),uu,h,l,o.correlationId)(e,o,n)}async function Zi(o,e,t,n,r,i,s,a,c,h,l){if(Xe.removeThrottle(i,n.auth.clientId,o),Va(e,o.correlationId,h),Ti(e,o.state),!e.ear_jwe)throw X(Mu);if(!o.earJwk)throw X(Sa);const u=JSON.parse(await D(If,Eu,c,h,o.correlationId)(o.earJwk,e.ear_jwe));if(u.accountId)return D(Qa,va,c,h,o.correlationId)(o,u.accountId,t,n,i,s,a,c,h,l);const m=new St(n.auth.clientId,i,new ct(c,h),c,h,null,null);m.validateTokenResponse(u,o.correlationId);const f={code:"",state:o.state,nonce:o.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await D(m.handleServerTokenResponse.bind(m),Ii,c,h,o.correlationId)(u,r,Je(),o,t,f,void 0,void 0,void 0,void 0)}/*! @azure/msal-browser v5.11.0 2026-05-19 */const Cg=32;async function Rt(o,e,t){const n=Le(_g,_u,e,o,t)(o,e,t),r=await D(Ig,Iu,e,o,t)(n,o,e,t);return{verifier:n,challenge:r}}function _g(o,e,t){try{const n=new Uint8Array(Cg);return Le(mf,Au,e,o,t)(n),_t(n)}catch{throw X(Ta)}}async function Ig(o,e,t,n){try{const r=await D(Ma,vu,t,e,n)(o);return _t(new Uint8Array(r))}catch{throw X(Ta)}}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */class ir{navigateInternal(e,t){return ir.defaultNavigateWindow(e,t)}navigateExternal(e,t){return ir.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((n,r)=>{setTimeout(()=>{r(X(tr,"failed_to_redirect"))},t.timeout)})}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class vg{async sendGetRequestAsync(e,t){let n,r={},i=0;const s=us(t);try{n=await fetch(e,{method:Jo.GET,headers:s})}catch(a){throw sn(X(window.navigator.onLine?Zu:Vr),void 0,void 0,a)}r=fs(n.headers);try{return i=n.status,{headers:r,body:await n.json(),status:i}}catch(a){throw sn(X(Xo),i,r,a)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",r=us(t);let i,s=0,a={};try{i=await fetch(e,{method:Jo.POST,headers:r,body:n})}catch(c){throw sn(X(window.navigator.onLine?Qu:Vr),void 0,void 0,c)}a=fs(i.headers);try{return s=i.status,{headers:a,body:await i.json(),status:s}}catch(c){throw sn(X(Xo),s,a,c)}}}function us(o){try{const e=new Headers;if(!(o&&o.headers))return e;const t=o.headers;return Object.entries(t).forEach(([n,r])=>{e.append(n,r)}),e}catch(e){throw sn(X(af),void 0,void 0,e)}}function fs(o){try{const e={};return o.forEach((t,n)=>{e[n]=t}),e}catch{throw X(cf)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */const Ag=6e4,bg=1e4,Tg=3e4,Za=2e3;function Sg({auth:o,cache:e,system:t,experimental:n,telemetry:r},i){const s={clientId:"",authority:`${_s}`,knownAuthorities:[],cloudDiscoveryMetadata:"",authorityMetadata:"",redirectUri:typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:"",postLogoutRedirectUri:"",clientCapabilities:[],OIDCOptions:{responseMode:ei.FRAGMENT,defaultScopes:[vs,As,Yr]},azureCloudOptions:{azureCloudInstance:mi.None,tenant:""},instanceAware:!1,isMcp:!1,verifySSO:!1},a={cacheLocation:nt.SessionStorage,cacheRetentionDays:5},c={loggerCallback:()=>{},logLevel:we.Info,piiLoggingEnabled:!1},l={...{...sa,loggerOptions:c,networkClient:i?new vg:zd,navigationClient:new ir,popupBridgeTimeout:(t==null?void 0:t.popupBridgeTimeout)||Ag,iframeBridgeTimeout:(t==null?void 0:t.iframeBridgeTimeout)||bg,redirectNavigationTimeout:Tg,allowRedirectInIframe:!1,navigatePopups:!0,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||Za,protocolMode:Ue.AAD},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||c},u={application:{appName:"",appVersion:""},client:new oa},m={iframeTimeoutTelemetry:!1,allowPlatformBrokerWithDOM:!1};if((t==null?void 0:t.protocolMode)!==Ue.OIDC&&(o!=null&&o.OIDCOptions)&&new rt(l.loggerOptions).warning(JSON.stringify(ge(Kh)),""),t!=null&&t.protocolMode&&t.protocolMode===Ue.OIDC&&(l!=null&&l.allowPlatformBroker))throw ge(jh);return{auth:{...s,...o,OIDCOptions:{...s.OIDCOptions,...o==null?void 0:o.OIDCOptions}},cache:{...a,...e},system:l,experimental:{...m,...n},telemetry:{...u,...r}}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class or{constructor(e,t,n,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=this.performanceClient.startMeasurement(wu),this.platformAuthType=ze.PLATFORM_EXTENSION_PROVIDER}async sendMessage(e){this.logger.trace("0on4p2",e.correlationId);const t={method:rn.GetToken,request:e},n={channel:ze.CHANNEL_ID,extensionId:this.extensionId,responseId:It(),body:t};this.logger.trace("1qadfi",e.correlationId),this.logger.tracePii("1xm533",e.correlationId),this.messageChannel.port1.postMessage(n);const r=await new Promise((s,a)=>{this.resolvers.set(n.responseId,{resolve:s,reject:a})});return this.validatePlatformBrokerResponse(r)}static async createProvider(e,t,n,r){e.trace("15zfnw",r);try{const i=new or(e,t,n,ze.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(r),i}catch{const s=new or(e,t,n);return await s.sendHandshakeRequest(r),s}}async sendHandshakeRequest(e){this.logger.trace("1dpg9o",e),window.addEventListener("message",this.windowListener,!1);const t={channel:ze.CHANNEL_ID,extensionId:this.extensionId,responseId:It(),body:{method:rn.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionH
1andshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=n=>{this.onChannelMessage(n)},window.postMessage(t,window.origin,[this.messageChannel.port2]),new Promise((n,r)=>{this.handshakeResolvers.set(t.responseId,{resolve:n,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(X(tf)),this.handshakeResolvers.delete(t.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){const t=Jr();if(this.logger.trace("0jpn5u",t),e.source!==window)return;const n=e.data;if(!(!n.channel||n.channel!==ze.CHANNEL_ID)&&!(n.extensionId&&n.extensionId!==this.extensionId)&&n.body.method===rn.HandshakeRequest){const r=this.handshakeResolvers.get(n.responseId);if(!r){this.logger.trace("07buhm",t);return}this.logger.verbose(n.extensionId?"0xrkug":"No extension installed",t),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),r.reject(X(nf))}}onChannelMessage(e){const t=Jr();this.logger.trace("1py8yf",t);const n=e.data,r=this.resolvers.get(n.responseId),i=this.handshakeResolvers.get(n.responseId);try{const s=n.body.method;if(s===rn.Response){if(!r)return;const a=n.body.response;if(this.logger.trace("19hpgm",t),this.logger.tracePii("179a24",t),a.status!=="Success")r.reject(rr(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?r.reject(rr(a.result.code,a.result.description,a.result.ext)):r.resolve(a.result);else throw Hr($r,"Event does not contain result.");this.resolvers.delete(n.responseId)}else if(s===rn.HandshakeResponse){if(!i){this.logger.trace("082qnt",t);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=n.extensionId,this.extensionVersion=n.body.version,this.logger.verbose("0yf5ib",t),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(n.responseId)}}catch(s){this.logger.error("0xf978",t),this.logger.errorPii("04i99o",t),this.logger.errorPii("0xdvsy",t),r?r.reject(s):i&&i.reject(s)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw Hr($r,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){var e;return this.getExtensionId()===ze.PREFERRED_EXTENSION_ID?"chrome":(e=this.getExtensionId())!=null&&e.length?"unknown":void 0}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Yi{constructor(e,t,n){this.logger=e,this.performanceClient=t,this.correlationId=n,this.platformAuthType=ze.PLATFORM_DOM_PROVIDER}static async createProvider(e,t,n){var r;if(e.trace("12mj4a",n),(r=window.navigator)!=null&&r.platformAuthentication){const i=await window.navigator.platformAuthentication.getSupportedContracts(ze.MICROSOFT_ENTRA_BROKERID);if(i!=null&&i.includes(ze.PLATFORM_DOM_APIS))return e.trace("1h5q1r",n),new Yi(e,t,n)}}getExtensionId(){return ze.MICROSOFT_ENTRA_BROKERID}getExtensionVersion(){return""}getExtensionName(){return ze.DOM_API_NAME}async sendMessage(e){this.logger.trace("02bcil",e.correlationId);try{const t=this.initializePlatformDOMRequest(e),n=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(n,e.correlationId)}catch(t){throw this.logger.error("11im7g",e.correlationId),t}}initializePlatformDOMRequest(e){this.logger.trace("15d6yv",e.correlationId);const{accountId:t,clientId:n,authority:r,scope:i,redirectUri:s,correlationId:a,state:c,storeInCache:h,embeddedClientId:l,extraParameters:u,...m}=e,f=this.getDOMExtraParams(m,a);return{accountId:t,brokerId:this.getExtensionId(),authority:r,clientId:n,correlationId:a||this.correlationId,extraParameters:{...u,...f},isSecurityTokenService:!1,redirectUri:s,scope:i,state:c,storeInCache:h,embeddedClientId:l}}validatePlatformBrokerResponse(e,t){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace("0h4vei",t),this.convertToPlatformBrokerResponse(e,t);if(e.hasOwnProperty("error")){const n=e;if(n.isSuccess===!1&&n.error&&n.error.code)throw this.logger.trace("0g92vm",t),rr(n.error.code,n.error.description,{error:parseInt(n.error.errorCode),protocol_error:n.error.protocolError,status:n.error.status,properties:n.error.properties})}}throw Hr($r,"Response missing expected properties.")}convertToPlatformBrokerResponse(e,t){return this.logger.trace("14913t",t),{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expires
1In,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e,t){try{const n={};for(const[r,i]of Object.entries(e))i&&(typeof i=="object"?n[r]=JSON.stringify(i):n[r]=String(i));return n}catch{return this.logger.error("0eu9o3",t),this.logger.errorPii("17rpl5",t),{}}}}/*! @azure/msal-browser v5.11.0 2026-05-19 */async function kg(o,e,t,n,r){o.trace("134j0v",t),o.trace("04c81g",t);let i;try{r&&(i=await Yi.createProvider(o,e,t)),i||(o.trace("0l3na8",t),i=await or.createProvider(o,n||Za,e,t))}catch(s){o.trace("0icbd7",s)}return i}function Cn(o,e,t,n,r){if(e.trace("0uko3r",t),!o.system.allowPlatformBroker&&o.experimental.allowPlatformBrokerWithDOM)throw ge(Wh);if(!o.system.allowPlatformBroker)return e.trace("04hozs",t),!1;if(!n)return e.trace("0kvv1r",t),!1;if(r)switch(r){case pe.BEARER:case pe.POP:return e.trace("18tev1",t),!0;default:return e.trace("1dd2nh",t),!1}return!0}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Eg extends Jt{constructor(e,t,n,r,i,s,a,c,h,l){super(e,t,n,r,i,s,a,h,l),this.nativeStorage=c,this.eventHandler=i}acquireToken(e,t){let n;try{if(n={popupName:this.generatePopupName(e.scopes||Gt,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:!this.config.system.navigatePopups},this.correlationId),this.config.system.navigatePopups){const i={...e,httpMethod:$a(e,this.config.system.protocolMode)};return this.logger.verbose("1f9ok3",this.correlationId),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(i,n,t)}else return this.logger.verbose("162h4u",this.correlationId),this.acquireTokenPopupAsync(e,n,t)}catch(r){return Promise.reject(r)}}logout(e){try{this.logger.verbose("068rup",this.correlationId);const t=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},r=e&&e.authority,i=e&&e.mainWindowRedirectUri;return this.config.system.navigatePopups?(this.logger.verbose("1a28da",this.correlationId),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(t,n,r,i)):(this.logger.verbose("1phd8u",this.correlationId),this.logoutPopupAsync(t,n,r,i))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t,n){this.logger.verbose("1g77pg",this.correlationId);const r=await D(wn,mn,this.logger,this.performanceClient,this.correlationId)(e,ne.Popup,this.config,this.browserCrypto,this.browserStorage,this.logger,this.performanceClient,this.correlationId);t.popup&&Ba(r.authority);const i=Cn(this.config,this.logger,this.correlationId,this.platformAuthProvider,e.authenticationScheme);return r.platformBroker=i,this.config.system.protocolMode===Ue.EAR?this.executeEarFlow(r,t,n):this.executeCodeFlow(r,t,n)}async executeCodeFlow(e,t,n){var c;const r=e.correlationId,i=Ne(ue.acquireTokenPopup,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),s=n||await D(Rt,kt,this.logger,this.performanceClient,r)(this.performanceClient,this.logger,r),a={...e,codeChallenge:s.challenge};try{const h=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,r)({serverTelemetryManager:i,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Dt.POST)return await this.executeCodeFlowWithPost(a,t,h,s.verifier);{const l=await D(Vi,_i,this.logger,this.performanceClient,r)(this.config,h.authority,a,this.logger,this.performanceClient),u=this.initiateAuthRequest(l,t);this.eventHandler.emitEvent(ie.POPUP_OPENED,r,ne.Popup,{popupWindow:u},null);const m=await Mt(this.config.system.popupBridgeTimeout,this.logger,this.browserCrypto,e,this.performanceClient),f=Le(hn,cn,this.logger,this.performanceClient,this.correlationId)(m,this.config.auth.OIDCOptions.responseMode,this.logger,this.correlationId);return await D(Bt,Ft,this.logger,this.performanceClient,r)(e,f,s.verifier,ue.acquireTokenPopup,this.config,h,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(h){throw(c=t.popup)==null||c.close(),h instanceof me&&(h.setCorrelationId(this.correlationId),i.cacheFailedRequest(h)),h}}async executeEarFlow(e,t,n){const{correlationId:r,authority:i,azureCloudOptions:s,extraQueryParameters:a,account:c}=e,h=await D(at,At,this.logger,this.performanceClient,r)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,i,s,a,c),l=await D(Hi,Pi,this.logger,this.performanceClient,r)(),u=n||await D(Rt,kt,this.logger,this.performanceClient,r)(this.performanceClient,this.logger,r),m={...e,earJwk:l,codeChallenge:u.challenge},f=t.popup||this.openPopup("about:blank",t);(await Ji(f.document,this.config,h,m,this.logger,this.performanceClient)).submit();const p=await D(Mt,er,this.logger,this.performanceClient,r)(this.config.system.popupBridgeTimeout,this.logger,this.browserCrypto,m,this.performanceClient),C=Le(hn,cn,this.logger,this.performanceClient,this.correlationId)(p,this.config.auth.OIDCOptions.responseMode,this.logger,this.correlationId);if(!C.ear_jwe&&C.code){const w=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,r)({serverTelemetryManager:Ne(ue.acquireTokenPopup,this.config.auth.clientId,r,this.browserStorage,this.logger),requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account,authority:h});return D(Bt,Ft,this.logger,this.performanceClient,r)(m,C,u.verifier,ue.acquireTokenPopup,this.config,w,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}else return D(Zi,Oi,this.logger,this.performanceClient,r)(m,C,ue.acquireTokenPopup,this.config,h,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,n,r){const i=e.correlationId,s=await D(at,At,this.logger,this.performanceClient,i)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger),a=t.popup||this.openPopup("about:blank",t);(await Qi(a.document,this.config,s,e,this.logger,this.performanceClient)).submit();const h=await D(Mt,er,this.logger,this.performanceClient,i)(this.config.system.popupBridgeTimeout,this.logger,this.browserCrypto,e,this.performanceClient),l=Le(hn,cn,this.logger,this.performanceClient,this.correlationId)(h,this.config.auth.OIDCOptions.responseMode,this.logger,this.correlationId);return D(Bt,Ft,this.logger,this.performanceClient,i)(e,l,r,ue.acquireTokenPopup,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,n,r){var s,a,c;this.logger.verbose("0b7yrk",this.correlationId),this.eventHandler.emitEvent(ie.LOGOUT_START,this.correlationId,ne.Popup,e);const i=Ne(ue.logoutPopup,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger);try{await $i(this.browserStorage,this.browserCrypto,this.logger,this.correlationId,e.account);const h=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n,account:e.account||void 0});try{h.authority.endSessionEndpoint}catch{if((s=e.account)!=null&&s.homeAccountId&&e.postLogoutRedirectUri&&h.authority.protocolMode===Ue.OIDC){
1if(this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,e.correlationId,ne.Popup,e),r){const m={apiId:ue.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=fe.getAbsoluteUrl(r,yt());await this.navigationClient.navigateInternal(f,m)}(a=t.popup)==null||a.close();return}}e.state=Ai(this.browserCrypto,e.state||"",{interactionType:ne.Popup});const l=h.getLogoutUri(e);this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,e.correlationId,ne.Popup,e);const u=this.openPopup(l,t);if(this.eventHandler.emitEvent(ie.POPUP_OPENED,e.correlationId,ne.Popup,{popupWindow:u},null),await Mt(this.config.system.popupBridgeTimeout,this.logger,this.browserCrypto,e,this.performanceClient).catch(()=>{}),r){const m={apiId:ue.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=fe.getAbsoluteUrl(r,yt());this.logger.verbose("0qcur2",this.correlationId),this.logger.verbosePii("0oj7lk",this.correlationId),await this.navigationClient.navigateInternal(f,m)}else this.logger.verbose("03zgcf",this.correlationId)}catch(h){throw(c=t.popup)==null||c.close(),h instanceof me&&(h.setCorrelationId(this.correlationId),i.cacheFailedRequest(h)),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,this.correlationId,ne.Popup,null,h),this.eventHandler.emitEvent(ie.LOGOUT_END,this.correlationId,ne.Popup),h}this.eventHandler.emitEvent(ie.LOGOUT_END,this.correlationId,ne.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii("1kcr9k",this.correlationId),this.openPopup(e,t);throw this.logger.error("1l7hyp",this.correlationId),X(xi)}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii("0cgeo7",this.correlationId),n.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii("0c2awd",this.correlationId),n=this.openSizedPopup(e,t)),!n)throw X(Bu);return n.focus&&n.focus(),this.currentWindow=n,n}catch{throw this.logger.error("0dxfb9",this.correlationId),X(zu)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:r}){var f,y,p,C;const i=r.screenLeft?r.screenLeft:r.screenX,s=r.screenTop?r.screenTop:r.screenY,a=r.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=r.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let h=(f=n.popupSize)==null?void 0:f.width,l=(y=n.popupSize)==null?void 0:y.height,u=(p=n.popupPosition)==null?void 0:p.top,m=(C=n.popupPosition)==null?void 0:C.left;return(!h||h<0||h>a)&&(this.logger.verbose("08vfmo",this.correlationId),h=He.POPUP_WIDTH),(!l||l<0||l>c)&&(this.logger.verbose("09cxa0",this.correlationId),l=He.POPUP_HEIGHT),(!u||u<0||u>c)&&(this.logger.verbose("1qh4wo",this.correlationId),u=Math.max(0,c/2-He.POPUP_HEIGHT/2+s)),(!m||m<0||m>a)&&(this.logger.verbose("1sz3en",this.correlationId),m=Math.max(0,a/2-He.POPUP_WIDTH/2+i)),r.open(e,t,`width=${h}, height=${l}, top=${u}, left=${m}, scrollbars=yes`)}generatePopupName(e,t){return`${He.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${He.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v5.11.0 2026-05-19 */function Rg(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const o=window.performance.getEntriesByType("navigation"),e=o.length?o[0]:void 0;return e==null?void 0:e.type}class Og extends Jt{constructor(e,t,n,r,i,s,a,c,h,l){super(e,t,n,r,i,s,a,h,l),this.nativeStorage=c}async acquireToken(e){const t=await D(wn,mn,this.logger,this.performanceClient,this.correlationId)(e,ne.Redirect,this.config,this.browserCrypto,this.browserStorage,this.logger,this.performanceClient,this.correlationId);t.platformBroker=Cn(this.config,this.logger,this.correlationId,this.platformAuthProvider,e.authenticationScheme);const n=i=>{i.persisted&&(this.logger.verbose("0udvtt",this.correlationId),this.browserStorage.resetRequestCache(this.correlationId),this.eventHandler.emitEvent(ie.RESTORE_FROM_BFCACHE,this.correlationId,ne.Redirect))},r=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii("0zao0a",this.correlationId),this.browserStorage.setTemporaryCache(Ae.ORIGIN_URI,r,!0),window.addEventListener("pageshow",n);try{this.config.system.protocolMode===Ue.EAR?await this.executeEarFlow(t):await this.executeCodeFlow(t)}catch(i){throw i instanceof me&&i.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",n),i}}async executeCodeFlow(e){const t=e.correlationId,n=Ne(ue.acquireTokenRedirect,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),r=await D(Rt,kt,this.logger,this.performanceClient,t)(this.performanceClient,this.logger,t),i={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(i,this.correlationId,r.verifier);try{if(i.httpMethod===Dt.POST)return await this.executeCodeFlowWithPost(i);{const s=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),a=await D(Vi,_i,this.logger,this.performanceClient,e.correlationId)(this.config,s.authority,i,this.logger,this.performanceClient);return await this.initiateAuthRequest(a)}}catch(s){throw s instanceof me&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),s}}async executeEarFlow(e){const{correlationId:t,authority:n,azureCloudOptions:r,extraQueryParameters:i,account:s}=e,a=await D(at,At,this.logger,this.performanceClient,t)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,n,r,i,s),c=await D(Hi,Pi,this.logger,this.performanceClient,t)(),h=await D(Rt,kt,this.logger,this.performanceClient,t)(this.performanceClient,this.logger,t),l={...e,earJwk:c,codeChallenge:h.challenge};return this.browserStorage.cacheAuthorizeRequest(l,this.correlationId,h.verifier),(await Ji(document,this.config,a,l,this.logger,this.performanceClient)).submit(),new Promise((m,f)=>{setTimeout(()=>{f(X(tr,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,n=await D(at,At,this.logger,this.performanceClient,t)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger);return this.browserStorage.cacheAuthorizeRequest(e,this.correlationId),(await Qi(document,this.config,n,e,this.logger,this.performanceClient)).submit(),new Promise((i,s)=>{setTimeout(()=>{s(X(tr,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e,t,n,r){const i=Ne(ue.handleRedirectPromise,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),s=(r==null?void 0:r.navigateToLoginRequestUrl)??!0;try{const[a,c]=this.getRedirectResponse((r==null?void 0:r.hash)||"");if(!a)return this.logger.info("1qmv0q",this.correlationId),this.browserStorage.resetRequestCache(this.correlationId),Rg()!=="back_forward"?n.event.errorCode="no_server_response":this.logger.verbose("1eqegq",this.correlationId),null;const h=this.browserStorage.getTemporaryCache(Ae.ORIGIN_URI,this.correlationId,!0)||"",l=Eo(h),u=Eo(window.location.href);if(l===u&&s)return this.logger.verbose("11yred",this.correlationId),h.indexOf("#")>-1&&Sf(h),await this.handleResponse(a,e,t,i);
1if(s){if(!yr()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Ae.URL_HASH,c,!0);const m={apiId:ue.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let f=!0;if(!h||h==="null"){const y=Rf();this.browserStorage.setTemporaryCache(Ae.ORIGIN_URI,y,!0),this.logger.warning("1dutq1",this.correlationId),f=await this.navigationClient.navigateInternal(y,m)}else this.logger.verbose("08jpy1",this.correlationId),f=await this.navigationClient.navigateInternal(h,m);if(!f)return await this.handleResponse(a,e,t,i)}}else return this.logger.verbose("0v4sdv",this.correlationId),await this.handleResponse(a,e,t,i);return null}catch(a){throw a instanceof me&&(a.setCorrelationId(this.correlationId),i.cacheFailedRequest(a)),a}}getRedirectResponse(e){this.logger.verbose("1c5i8m",this.correlationId);let t=e;t||(this.config.auth.OIDCOptions.responseMode===ei.QUERY?t=window.location.search:t=window.location.hash);let n=Wn(t);if(n){try{sg(n,this.browserCrypto,ne.Redirect)}catch(i){return i instanceof me&&this.logger.error("0bkq6p",this.correlationId),[null,""]}return Fa(window),this.logger.verbose("00uvho",this.correlationId),[n,t]}const r=this.browserStorage.getTemporaryCache(Ae.URL_HASH,this.correlationId,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ae.URL_HASH)),r&&(n=Wn(r),n)?(this.logger.verbose("001671",this.correlationId),[n,r]):[null,""]}async handleResponse(e,t,n,r){if(!e.state)throw X(Ni);const{authority:s,azureCloudOptions:a,extraQueryParameters:c,account:h}=t;if(e.ear_jwe){const u=await D(at,At,this.logger,this.performanceClient,t.correlationId)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,s,a,c,h);return D(Zi,Oi,this.logger,this.performanceClient,t.correlationId)(t,e,ue.acquireTokenRedirect,this.config,u,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const l=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority});return D(Bt,Ft,this.logger,this.performanceClient,t.correlationId)(t,e,n,ue.acquireTokenRedirect,this.config,l,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e){if(this.logger.verbose("0yaw2e",this.correlationId),e){this.logger.infoPii("1luf83",this.correlationId);const t={apiId:ue.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.onRedirectNavigate;if(typeof n=="function")if(this.logger.verbose("1nehvl",this.correlationId),n(e)!==!1){this.logger.verbose("1a0jxh",this.correlationId),await this.navigationClient.navigateExternal(e,t);return}else{this.logger.verbose("09k5h5",this.correlationId);return}else{this.logger.verbose("0klwf7",this.correlationId),await this.navigationClient.navigateExternal(e,t);return}}else throw this.logger.info("0rlh4e",this.correlationId),X(xi)}async logout(e){var r,i;this.logger.verbose("1rkurh",this.correlationId);const t=this.initializeLogoutRequest(e),n=Ne(ue.logout,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger);try{this.eventHandler.emitEvent(ie.LOGOUT_START,this.correlationId,ne.Redirect,e),await $i(this.browserStorage,this.browserCrypto,this.logger,this.correlationId,t.account);const s={apiId:ue.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(a.authority.protocolMode===Ue.OIDC)try{a.authority.endSessionEndpoint}catch{if((r=t.account)!=null&&r.homeAccountId){this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,this.correlationId,ne.Redirect,t);return}}t.state=Ai(this.browserCrypto,t.state||"",{interactionType:ne.Redirect});const c=a.getLogoutUri(t);(i=t.account)!=null&&i.homeAccountId&&this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,this.correlationId,ne.Redirect,t);const h=this.config.auth.onRedirectNavigate;if(typeof h=="function")if(h(c)!==!1){this.logger.verbose("06v57e",this.correlationId),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,gt.SIGNOUT),await this.navigationClient.navigateExternal(c,s);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("0xqes1",this.correlationId);else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,gt.SIGNOUT),await this.navigationClient.navigateExternal(c,s);return}}catch(s){throw s instanceof me&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,this.correlationId,ne.Redirect,null,s),this.eventHandler.emitEvent(ie.LOGOUT_END,this.correlationId,ne.Redirect),s}this.eventHandler.emitEvent(ie.LOGOUT_END,this.correlationId,ne.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return fe.getAbsoluteUrl(t,yt())}}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */async function Pg(o,e,t,n){if(!o)throw t.info("1l7hyp",n),X(xi);return Le(Mg,hu,t,e,n)(o)}async function xg(o,e,t,n,r){const i=Xi();if(!i.contentDocument)throw"No document associated with iframe!";return(await Qi(i.contentDocument,o,e,t,n,r)).submit(),i}async function Ng(o,e,t,n,r){const i=Xi();if(!i.contentDocument)throw"No document associated with iframe!";return(await Ji(i.contentDocument,o,e,t,n,r)).submit(),i}function Mg(o){const e=Xi();return e.src=o,e}function Xi(){const o=document.createElement("iframe");return o.className="msalSilentIframe",o.style.visibility="hidden",o.style.position="absolute",o.style.width=o.style.height="0",o.style.border="0",o.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),o.setAttribute("allow","local-network-access *"),document.body.appendChild(o),o}function gs(o){document.body===o.parentNode&&document.body.removeChild(o)}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Dg extends Jt{constructor(e,t,n,r,i,s,a,c,h,l,u){super(e,t,n,r,i,s,c,l,u),this.apiId=a,this.nativeStorage=h}async acquireToken(e){!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("1kl318",this.correlationId);const t={...e};t.prompt?t.prompt!==xe.NONE&&t.prompt!==xe.NO_SESSION&&(this.logger.warning("0bmctg",this.correlationId),t.prompt=xe.NONE):t.prompt=xe.NONE;const n=await D(wn,mn,this.logger,this.performanceClient,this.correlationId)(t,ne.Silent,this.config,this.browserCrypto,this.browserStorage,this.logger,this.performanceClient,this.correlationId);return n.platformBroker=Cn(this.config,this.logger,this.correlationId,this.platformAuthProvider,n.authenticationScheme),Ba(n.authority),this.config.system.protocolMode===Ue.EAR?this.executeEarFlow(n):this.executeCodeFlow(n)}async executeCodeFlow(e){let t;const n=Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger);try{return t=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await D(this.silentTokenHelper.bind(this),$o,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(r){if(r instanceof me&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),!t||!(r instanceof me)||r.errorCode!==He.INVALID_GRANT_ERROR)throw r;return this.performanceClient.addFields({retryError:r.errorCode},this.correlationId),await D(this.silentTokenHelper.bind(this),$o,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const{correlationId:t,authority:n,azureCloudOptions:r,extraQueryParameters:i,account:s}=e,a=await D(at,At,this.logger,this.performanceClient,t)(this.config,this.correlationId,this.performanceClient,this.browserStorage,this.logger,n,r,i,s),c=await D(Hi,Pi,this.logger,this.performanceClient,t)(),h=await D(Rt,kt,this.logger,this.performanceClient,t)(this.performanceClient,this.logger,t),l={...e,earJwk:c,codeChallenge:h.challenge},u=await D(Ng,kr,this.logger,this.performanceClient,t)(this.config,a,l,this.logger,this.performanceClient),m=this.config.auth.OIDCOptions.responseMode;let f;try{f=await D(Mt,er,this.logger,this.performanceClient,t)(this.config.system.iframeBridgeTimeout,this.logger,this.browserCrypto,e,this.performanceClient,this.config.experimental)}finally{Le(gs,Go,this.logger,this.performanceClient,t)(u)}const y=Le(hn,cn,this.logger,this.performanceClient,t)(f,m,this.logger,this.correlationId);if(!y.ear_jwe&&y.code){const p=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,t)({serverTelemetryManager:Ne(this.apiId,this.config.auth.clientId,t,this.browserStorage,this.logger),requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account,authority:a});return D(Bt,Ft,this.logger,this.performanceClient,t)(l,y,h.verifier,this.apiId,this.config,p,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}else return D(Zi,Oi,this.logger,this.performanceClient,t)(l,y,this.apiId,this.config,a,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async verifySso(e){const t={...e};t.prompt||(t.prompt=xe.NONE);const n=await D(wn,mn,this.logger,this.performanceClient,this.correlationId)(t,ne.Silent,this.config,this.browserCrypto,this.browserStorage,this.logger,this.performanceClient,this.correlationId),r=await D(this.createAuthCodeClient.bind(this),st,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),{serverParams:i}=await this.silentAuthorizeHelper(r,n),s=n.correlationId;return Ti(i,n.state),i.code?(this.logger.verbose("0kkkcj",s),!0):(this.logger.warning("0y34ti",s),!1)}logout(){return Promise.reject(X(Mi))}async silentTokenHelper(e,t){const{serverParams:n,pkceCodes:r}=await this.silentAuthorizeHelper(e,t);return D(Bt,Ft,this.logger,this.performanceClient,t.correlationId)(t,n,r.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async silentAuthorizeHelper(e,t){const n=t.correlationId,r=await D(Rt,kt,this.logger,this.performanceClient,n)(this.performanceClient,this.logger,n),i={...t,codeChallenge:r.challenge};let s;if(t.httpMethod===Dt.POST)s=await D(xg,kr,this.logger,this.performanceClient,n)(this.config,e.authority,i,this.logger,this.performanceClient);else{const l=await D(Vi,_i,this.logger,this.performanceClient,n)(this.config,e.authority,i,this.logger,this.performanceClient);s=await D(Pg,kr,this.logger,this.performanceClient,n)(l,this.performanceClient,this.logger,n)}const a=this.config.auth.OIDCOptions.responseMode;let c;try{c=await D(Mt,er,this.logger,this.performanceClient,n)(this.config.system.iframeBridgeTimeout,this.logger,this.browserCrypto,t,this.performanceClient,this.config.experimental)}finally{Le(gs,Go,this.logger,this.performanceClient,n)(s)}return{serverParams:Le(hn,cn,this.logger,this.performanceClient,n)(c,a,this.logger,this.correlationId),pkceCodes:r,silentRequest:i}}}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */class Ug extends Jt{async acquireToken(e){const t=await D(Gi,Ri,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger,this.correlationId),n={...e,...t};e.redirectUri&&(n.redirectUri=nr(e.redirectUri,this.config.auth.redirectUri,this.logger,this.correlationId));const r=Ne(ue.acquireTokenSilent_silentFlow,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger),i=await this.createRefreshTokenClient({serverTelemetryManager:r,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return D(i.acquireTokenByRefreshToken.bind(i),su,this.logger,this.performanceClient,e.correlationId)(n,ue.acquireTokenSilent_silentFlow).catch(s=>{throw s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s),s})}logout(){return Promise.reject(X(Mi))}async createRefreshTokenClient(e){const t=await D(this.getClientConfiguration.bind(this),pr,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Fd(t,this.performanceClient)}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Lg extends Ca{constructor(e,t){super(e,t),this.includeRedirectUri=!1}}/*! @azure/msal-browser v5.11.0 2026-05-19 */class Fg extends Jt{constructor(e,t,n,r,i,s,a,c,h,l){super(e,t,n,r,i,s,c,h,l),this.apiId=a}async acquireToken(e){if(!e.code)throw X(Yu);const t=await D(wn,mn,this.logger,this.performanceClient,this.correlationId)(e,ne.Silent,this.config,this.browserCrypto,this.browserStorage,this.logger,this.performanceClient,this.correlationId),n=Ne(this.apiId,this.config.auth.clientId,this.correlationId,this.browserStorage,this.logger);try{const r={...t,code:e.code},i=await D(this.getClientConfiguration.bind(this),pr,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),s=new Lg(i,this.performanceClient);this.logger.verbose("1uic5e",this.correlationId);const a=new Ga(s,this.browserStorage,r,this.logger,this.performanceClient);return await D(a.handleCodeResponseFromServer.bind(a),ca,this.logger,this.performanceClient,this.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,this.apiId,!1)}catch(r){throw r instanceof me&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),r}}logout(){return Promise.reject(X(Mi))}}/*! @azure/msal-browser v5.11.0 2026-05-19 */function Hg(o,e,t,n){var a;const r=((a=window.msal)==null?void 0:a.clientIds)||[],i=r.length,s=r.filter(c=>c===o).length;s>1&&t.warning("1e88vg",n),e.add({msalInstanceCount:i,sameClientIdInstanceCount:s})}/*! @azure/msal-browser v5.11.0 2026-05-19 */function Un(o,e,t,n){try{Ki(o),_a(t.auth.isMcp,n)}catch(r){throw e.end({success:!1},r,n.account),r}}class qi{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new ct(this.logger,this.performanceClient):Vn,this.eventHandler=new rg(this.logger),this.browserStorage=this.isBrowserEnvironment?new Zr(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,Ud(this.config.auth)):Yf(this.config.auth.clientId,this.logger,this.performanceClient,this.eventHandler);const t={cacheLocation:nt.MemoryStorage,cacheRetentionDays:5};this.nativeInternalStorage=new Zr(this.config.auth.clientId,t,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.activeSilentTokenRequests=new Map,this.trackStateChange=this.trackStateChange.bind(this),this.trackStateChangeWithMeasurement=this.trackStateChangeWithMeasurement.bind(this)}static async createController(e,t){const n=new qi(e);return await n.initialize(t),n}trackStateChange(e,t){e&&(t.type==="visibilitychange"?(this.logger.info("16v6hv",e),this.performanceClient.incrementFields({visibilityChangeCount:1},e)):t.type==="online"?(this.logger.info("0zirfd",e),this.performanceClient.incrementFields({onlineStatusChangeCount:1},e)):t.type==="offline"&&(this.logger.info("1xk9ef",e),this.performanceClient.incrementFields({onlineStatusChangeCount:1},e)))}async initialize(e){const t=this.getRequestCorrelationId(e);if(this.logger.trace("1f7joy",t),this.initialized){this.logger.info("061m5x",t);return}if(!this.isBrowserEnvironment){this.logger.info("19fvpi",t),this.initialized=!0,this.eventHandler.emitEvent(ie.INITIALIZE_END,t);return}const n=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(zf,t);if(this.eventHandler.emitEvent(ie.INITIALIZE_START,t),this.logMultipleInstances(r,t),r.add({isMcp:this.config.auth.isMcp}),await D(this.browserStorage.initialize.bind(this.browserStorage),cu,this.logger,this.performanceClient,t)(t),n)try{this.platformAuthProvider=await kg(this.logger,this.performanceClient,t,this.config.system.nativeBrokerHandshakeTimeout,this.config.experimental.allowPlatformBrokerWithDOM)}catch(i){this.logger.verbose(i,t)}
1this.config.cache.cacheLocation===nt.LocalStorage&&this.eventHandler.subscribeCrossTab(),!this.config.system.navigatePopups&&await this.preGeneratePkceCodes(t),this.initialized=!0,this.eventHandler.emitEvent(ie.INITIALIZE_END,t),r.end({allowPlatformBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("02l8bm",""),za(this.initialized),this.isBrowserEnvironment){const t=(e==null?void 0:e.hash)||"";let n=this.redirectResponse.get(t);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("1wn9kp","")):this.logger.verbose("0w0gm3",""),n}return this.logger.verbose("12xi63",""),null}async handleRedirectPromiseInternal(e){var h;if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("0le6uv",""),null;if(((h=this.browserStorage.getInteractionInProgress())==null?void 0:h.type)===gt.SIGNOUT)return this.logger.verbose("1ywcv2",""),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const n=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),i=r&&!(e!=null&&e.hash);let s,a,c;try{if(i&&this.platformAuthProvider){const l=(r==null?void 0:r.correlationId)||"";this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_START,l,ne.Redirect),s=this.performanceClient.startMeasurement(Pr,l),this.logger.trace("12v7is",l),s.add({isPlatformBrokerRequest:!0});const u=new Kn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ue.handleRedirectPromise,this.performanceClient,this.platformAuthProvider,r.accountId,this.nativeInternalStorage,r.correlationId);a=D(u.handleRedirectPromise.bind(u),yu,this.logger,this.performanceClient,s.event.correlationId)()}else{const[l,u]=this.browserStorage.getCachedRequest("");c=l;const m=l.correlationId;this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_START,m,ne.Redirect),s=this.performanceClient.startMeasurement(Pr,m),this.logger.trace("0znzs5",m);const f=this.createRedirectClient(m);a=D(f.handleRedirectPromise.bind(f),mu,this.logger,this.performanceClient,s.event.correlationId)(l,u,s,e)}}catch(l){throw this.browserStorage.resetRequestCache(""),l}return a.then(l=>(l?(this.browserStorage.resetRequestCache(l.correlationId),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,l.correlationId,ne.Redirect,l),this.logger.verbose("0ui8f5",l.correlationId),n.length<this.getAllAccounts().length&&(this.eventHandler.emitEvent(ie.LOGIN_SUCCESS,l.correlationId,ne.Redirect,l.account),this.logger.verbose("16im3l",l.correlationId)),s.end({success:!0},void 0,l.account),this.verifySsoCapability(c,ne.Redirect)):s.event.errorCode?s.end({success:!1},void 0):s.discard(),this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,s.event.correlationId,ne.Redirect),l)).catch(l=>{this.browserStorage.resetRequestCache(s.event.correlationId);const u=l;throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,s.event.correlationId,ne.Redirect,null,u),this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,s.event.correlationId,ne.Redirect),s.end({success:!1},u),l})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("0os66p",t);const n=this.performanceClient.startMeasurement(Ff,t);n.add({scenarioId:e.scenarioId});const r=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=i=>{const s=typeof r=="function"?r(i):void 0;return n.add({navigateCallbackResult:s!==!1}),n.event=n.end({success:!0},void 0,e.account)||n.event,s};try{rs(this.initialized,this.config),_a(this.config.auth.isMcp,e),this.browserStorage.setInteractionInProgress(!0,gt.SIGNIN),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,t,ne.Redirect,e);let i;if(this.platformAuthProvider&&this.canUsePlatformBroker(e)){const s=new Kn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ue.acquireTokenRedirect,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t);i=D(s.acquireTokenRedirect.bind(s),ou,this.logger,this.performanceClient,t)(e,n).catch(a=>{if(n.add({brokerErrorName:a.name,brokerErrorCode:a.errorCode}),a instanceof qe&&Nt(a))return this.platformAuthProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(a instanceof Qe)return this.logger.verbose("1ipyz4",t),this.createRedirectClient(t).acquireToken(e);throw a})}else i=this.createRedirectClient(t).acquireToken(e);return await i}catch(i){throw this.browserStorage.resetRequestCache(t),n.event.status===2?this.performanceClient.startMeasurement(Pr,t).end({success:!1},i,e.account):n.end({success:!1},i,e.account),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,t,ne.Redirect,null,i),i}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(Lf,t);n.add({scenarioId:e.scenarioId});try{this.logger.verbose("0ch87b",t),Un(this.initialized,n,this.config,e),this.browserStorage.setInteractionInProgress(!0,gt.SIGNIN,e.overrideInteractionInProgress,t)}catch(a){return Promise.reject(a)}const r=this.getAllAccounts();this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,t,ne.Popup,e);let i;const s=this.getPreGeneratedPkceCodes(t);return this.canUsePlatformBroker(e)?(n.add({isPlatformBrokerRequest:!0}),i=this.acquireTokenNative({...e,correlationId:t},ue.acquireTokenPopup).then(a=>(n.end({success:!0,isNativeBroker:!0},void 0,a.account),a)).catch(a=>{if(n.add({brokerErrorName:a.name,brokerErrorCode:a.errorCode}),a instanceof qe&&Nt(a))return this.platformAuthProvider=void 0,this.createPopupClient(t).acquireToken(e,s
1);if(a instanceof Qe)return this.logger.verbose("0yy5fw",t),this.createPopupClient(t).acquireToken(e,s);throw a})):i=this.createPopupClient(t).acquireToken(e,s),i.then(a=>{const c=r.length<this.getAllAccounts().length;return this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,t,ne.Popup,a),c&&this.eventHandler.emitEvent(ie.LOGIN_SUCCESS,t,ne.Popup,a.account),n.end({success:!0,accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length},void 0,a.account),this.verifySsoCapability(e,ne.Popup),a}).catch(a=>(this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,t,ne.Popup,null,a),n.end({success:!1},a,e.account),Promise.reject(a))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.navigatePopups||await this.preGeneratePkceCodes(t)})}trackStateChangeWithMeasurement(e){const t=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;t&&(e.type==="visibilitychange"?(this.logger.info("0yzimq",t.event.correlationId),t.increment({visibilityChangeCount:1})):e.type==="online"?(this.logger.info("1caf53",t.event.correlationId),t.increment({onlineStatusChangeCount:1})):e.type==="offline"&&(this.logger.info("0fdyk7",t.event.correlationId),t.increment({onlineStatusChangeCount:1})))}addStateChangeListeners(e){document.addEventListener("visibilitychange",e),window.addEventListener("online",e),window.addEventListener("offline",e)}removeStateChangeListeners(e){document.removeEventListener("visibilitychange",e),window.removeEventListener("online",e),window.removeEventListener("offline",e)}getCachedSsoCapable(){try{const e=window.localStorage.getItem(hs);if(e){const t=JSON.parse(e);if(t&&typeof t.ssoCapable=="boolean"&&t.expiresOn&&Date.now()<t.expiresOn)return t.ssoCapable}}catch{}}verifySsoCapability(e,t){if(!this.config.auth.verifySSO)return;const n=hs,r=24*60*60*1e3;if(this.getCachedSsoCapable()!==void 0){this.logger.verbose("13poou","");return}const s=It(),a=this.performanceClient.startMeasurement(Kf,s);a.add({"ext.interactionType":t}),this.logger.verbose("0pbr0i",s),setTimeout(()=>{const c={...e,correlationId:s};this.createSilentIframeClient(s).verifySso(c).then(l=>{this.logger.verbose("1gd1iv",s);try{const u=JSON.stringify({ssoCapable:l,expiresOn:Date.now()+r});window.localStorage.setItem(n,u)}catch{this.logger.warning("18lmoj",s)}a.end({fromCache:!1,success:l},void 0)}).catch(l=>{this.logger.warning("05g83w",s);try{window.localStorage.removeItem(n)}catch{this.logger.warning("0nlf9q",s)}a.end({fromCache:!1,success:!1},l)})},0)}async ssoSilent(e){var s,a,c;const t=this.getRequestCorrelationId(e),n={...e,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Hf,t),(s=this.ssoSilentMeasurement)==null||s.add({scenarioId:e.scenarioId,ssoCapable:this.getCachedSsoCapable()}),Un(this.initialized,this.ssoSilentMeasurement,this.config,n),(a=this.ssoSilentMeasurement)==null||a.increment({visibilityChangeCount:0,onlineStatusChangeCount:0}),this.addStateChangeListeners(this.trackStateChangeWithMeasurement);const r=this.getAllAccounts();this.logger.verbose("0w1b45",t),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,t,ne.Silent,n);let i;return this.canUsePlatformBroker(n)?((c=this.ssoSilentMeasurement)==null||c.add({isPlatformBrokerRequest:!0}),i=this.acquireTokenNative(n,ue.ssoSilent).catch(h=>{var l;if((l=this.ssoSilentMeasurement)==null||l.add({brokerErrorName:h.name,brokerErrorCode:h.errorCode}),h instanceof qe&&Nt(h))return this.platformAuthProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw h})):i=this.createSilentIframeClient(n.correlationId).acquireToken(n),i.then(h=>{var u;const l=r.length<this.getAllAccounts().length;return this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,t,ne.Silent,h),l&&this.eventHandler.emitEvent(ie.LOGIN_SUCCESS,t,ne.Silent,h.account),(u=this.ssoSilentMeasurement)==null||u.end({success:!0,isNativeBroker:h.fromPlatformBroker,accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length},void 0,h.account),h}).catch(h=>{var l;throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,t,ne.Silent,null,h),(l=this.ssoSilentMeasurement)==null||l.end({success:!1},h,e.account),h}).finally(()=>{this.removeStateChangeListeners(this.trackStateChangeWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("0ch6ga",t);const n=this.performanceClient.startMeasurement(Uf,t);Un(this.initialized,n,this.config,e),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,t,ne.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw X(qu);if(e.code){const r=e.code;let i=this.hybridAuthCodeResponses.get(r);return i?(this.logger.verbose("0qgp28",t),n.discard()):(this.logger.verbose("06eh73",t),i=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(s=>(this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,t,ne.Silent,s),this.hybridAuthCodeResponses.delete(r),n.end({success:!0,accessTokenSize:s.accessToken.length,idTokenSize:s.idToken.length},void 0,s.account),s)).catch(s=>{throw this.hybridAuthCodeResponses.delete(r),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,t,ne.Silent,null,s),n.end({success:!1},s),s}),this.hybridAuthCodeResponses.set(r,i)),await i}else if(e.nativeAccountId)if(this.canUsePlatformBroker(e,e.nativeAccountId)){n.add({isPlatformBrokerRequest:!0});const r=await this.acquireTokenNative({...e,correlationId:t},ue.acquireTokenByCode,e.nativeAccountId).catch(i=>{throw n.add({brokerErrorName:i.name,brokerErrorCode:i.errorCode}),i instanceof qe&&Nt(i)&&(this.platformAuthProvider=void 0),i});return n.end({success:!0},void 0,r.account),r}else throw X(ef);else throw X(Xu)}catch(r){throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,t,ne.Silent,null,r),n.end({success:!1},r),r}}async acquireTokenByCodeAsync(e){var i;const t=this.getRequestCorrelationId(e);return this.logger.trace("10d9hy",t),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(pu,t),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0,onlineStatusChangeCount:0}),this.addStateChangeListeners(this.trackStateChangeWithMeasurement),await this.createSilentAuthCodeClient(t).acquireToken(e).then(s=>{var a;return(a=this.acquireTokenByCodeAsyncMeasurement)==null||a.end({success:!0,fromCache:s.fromCache}),s}).catch(s=>{var a;throw(a=this.acquireTokenByCodeAsyncMeasurement)==null||a.end({success:!1},s),s}).finally(()=>{this.removeStateChangeListeners(this.trackStateChangeWithMeasurement)})}async acquireTokenFromCache(e,t){switch(t){case Ee.Default:case Ee.AccessToken:case Ee.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return D(n.acquireToken.bind(n),tu,this.logger,this.performanceClient,e.correlationId)(e);default:throw j(mt)}}async acquireTokenByRefreshToken(e,t){switch(t){case Ee.Default:case Ee.AccessTokenAndRefreshToken:case Ee.RefreshToken:case Ee.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return D(n.acquireToken.bind(n),iu,this.logger,this.performanceClient,e.correlationId)(e);default:throw j(mt)}}async acquireTokenBySilentIframe(e){const t=this.createSilentIframeClient(e.correlationId);return D(t.acquireToken.bind(t),nu,this.logger,this.performanceClient,e.correlationId)(e)}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return rs(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,gt.SIGNOUT),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Ki(this.initialized),this.browserStorage.setInteractionInProgress(!0,gt.SIGNOUT),this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment)return;const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return Xf(this.logger,this.browserStorage,this.isBrowserEnvironment,this.getRequestCorrelationId(),e)}getAccount(e){return qf(e,this.logger,this.browserStorage,this.getRequestCorrelationId())}setActiveAccount(e){eg(e,this.browserStorage,this.getRequestCorrelationId())}getActiveAccount(){return tg(this.browserStorage,this.getRequestCorrelationId())}async hydrateCache(e,t){this.logger.verbose("16jycr",e.correlationId);const n=Fl(e.account,e.cloudGraphHostName,e.msGraphHost);if(await this.browserStorage.setAccount(n,e.correlationId,ot(e.idTokenClaims),ue.hydrateCache),e.fromPlatformBroker){this.logger.verbose("1i5atf",e.correlationId);const r=hr(e.account.homeAccountId,e.account.environment,e.idToken,this.config.auth.clientId,e.tenantId),i=lr(e.account.homeAccountId,e.account.environment,e.accessToken,this.config.auth.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Yn(e.expiresOn):0,e.extExpiresOn?Yn(e.extExpiresOn):0,Oe,void 0,e.tokenType,void 0,t.sshKid);t.resource&&(i.resource=t.resource);const s=ot(e.idTokenClaims);await this.browserStorage.setIdTokenCredential(r,e.correlationId,s),await this.nativeInternalStorage.setAccessTokenCredential(i,e.correlationId,s)}else return this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n,r){const i=this.getRequestCorrelationId(e);if(this.logger.trace("0b9y3p",i),!this.platformAuthProvider)throw X(Pa);const s=new Kn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,i);return D(s.acquireToken.bind(s),Ei,this.logger,this.performanceClient,i)(e,r)}canUsePlatformBroker(e,t){const n=this.getRequestCorrelationId(e);if(this.logger.trace("1n9lbl",n),!this.platformAuthProvider)return this.logger.trace("0vnu11",n),!1;if(!Cn(this.config,this.logger,n,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("0yoy1g",n),!1;if(e.prompt)switch(e.prompt){case xe.NONE:case xe.CONSENT:case xe.LOGIN:this.logger.trace("0vdv8e",n);break;default:return this.logger.trace("0pdzw6",n),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("16lbtk",n),!1):!0}
1getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||(!e.loginHint&&!e.sid?this.getActiveAccount():null);return t&&t.nativeAccountId||""}createPopupClient(e){return new Eg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,e,this.platformAuthProvider)}createRedirectClient(e){return new Og(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,e,this.platformAuthProvider)}createSilentIframeClient(e){return new Dg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ue.ssoSilent,this.performanceClient,this.nativeInternalStorage,e,this.platformAuthProvider)}createSilentCacheClient(e){return new Wa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,e,this.platformAuthProvider)}createSilentRefreshClient(e){return new Ug(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,e,this.platformAuthProvider)}createSilentAuthCodeClient(e){return new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ue.acquireTokenByCode,this.performanceClient,e,this.platformAuthProvider)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return Ha(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?It():""}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("0lz9hf",t),this.acquireTokenRedirect({correlationId:t,...e||Zo})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("0qw7v5",t),this.acquireTokenPopup({correlationId:t,...e||Zo})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(Df,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId,ssoCapable:this.getCachedSsoCapable()}),Un(this.initialized,n,this.config,e),this.logger.verbose("0x1c4s",t);const r=e.account||this.getActiveAccount();if(!r)throw X(Wu);return this.acquireTokenSilentDeduped(e,r,t).then(i=>(n.end({success:!0,fromCache:i.fromCache,accessTokenSize:i.accessToken.length,idTokenSize:i.idToken.length},void 0,i.account),{...i,state:e.state,correlationId:t})).catch(i=>{throw i instanceof me&&i.setCorrelationId(t),n.end({success:!1},i,r),i})}async acquireTokenSilentDeduped(e,t,n){const r=ur(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),i=JSON.stringify(r),s=this.activeSilentTokenRequests.get(i);if(typeof s>"u"){this.logger.verbose("0fcjbk",n),this.performanceClient.addFields({deduped:!1},n);const a=D(this.acquireTokenSilentAsync.bind(this),Xd,this.logger,this.performanceClient,n)({...e,correlationId:n},t);return this.activeSilentTokenRequests.set(i,a),a.finally(()=>{this.activeSilentTokenRequests.delete(i)})}else return this.logger.verbose("1yq7nb",n),this.performanceClient.addFields({deduped:!0},n),s}async acquireTokenSilentAsync(e,t){const n=a=>this.trackStateChange(e.correlationId,a);this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,e.correlationId,ne.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0,onlineStatusChangeCount:0},e.correlationId),this.addStateChangeListeners(n);const r=await D(ig,au,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),i=e.cacheLookupPolicy||Ee.Default;return this.acquireTokenSilentNoIframe(r,i).catch(async a=>{if(zg(a,i)){const h=`${a.errorCode}${a.subError?`|${a.subError}`:""}`;if(this.performanceClient.addFields({silentRefreshReason:h}
1,e.correlationId),this.activeIframeRequest)if(i!==Ee.Skip){const[l,u]=this.activeIframeRequest;this.logger.verbose("1w8fso",r.correlationId);const m=this.performanceClient.startMeasurement(ru,r.correlationId);m.add({awaitIframeCorrelationId:u});const f=await l;if(m.end({success:f}),f)return this.logger.verbose("0ywzzi",r.correlationId),this.acquireTokenSilentNoIframe(r,i);throw this.logger.info("17y14q",r.correlationId),a}else return this.logger.warning("1bd4p8",r.correlationId),D(this.acquireTokenBySilentIframe.bind(this),jo,this.logger,this.performanceClient,r.correlationId)(r);else{let l;return this.activeIframeRequest=[new Promise(u=>{l=u}),r.correlationId],this.logger.verbose("0rh08z",r.correlationId),D(this.acquireTokenBySilentIframe.bind(this),jo,this.logger,this.performanceClient,r.correlationId)(r).then(u=>(l(!0),u)).catch(u=>{throw l(!1),u}).finally(()=>{this.activeIframeRequest=void 0})}}else throw a}).then(a=>(this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,e.correlationId,ne.Silent,a),e.correlationId&&this.performanceClient.addFields({fromCache:a.fromCache,isNativeBroker:a.fromPlatformBroker},e.correlationId),a)).catch(a=>{throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,e.correlationId,ne.Silent,null,a),a}).finally(()=>{this.removeStateChangeListeners(n)})}async acquireTokenSilentNoIframe(e,t){return Cn(this.config,this.logger,e.correlationId,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("0sczo4",e.correlationId),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,ue.acquireTokenSilent_silentFlow,e.account.nativeAccountId,t).catch(async n=>{throw this.performanceClient.addFields({brokerErrorName:n.name,brokerErrorCode:n.errorCode},e.correlationId),n instanceof qe&&Nt(n)?(this.logger.verbose("07rkmb",e.correlationId),this.platformAuthProvider=void 0,j(mt)):n})):(this.logger.verbose("0ox81t",e.correlationId),t===Ee.AccessToken&&this.logger.verbose("0fvwxe",e.correlationId),D(this.acquireTokenFromCache.bind(this),Zd,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Ee.AccessToken)throw n;return this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_NETWORK_START,e.correlationId,ne.Silent,e),D(this.acquireTokenByRefreshToken.bind(this),Yd,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("1x6uj6",e),this.pkceCode=await D(Rt,kt,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Promise.resolve()}getPreGeneratedPkceCodes(e){const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,t?this.logger.verbose("12js1o",e):this.logger.verbose("1oe9ci",e),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e,t){const n=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[],window.msal.clientIds.length>0&&this.logger.verbose("1qtz3l",t),window.msal.clientIds.push(n),Hg(n,e,this.logger,t)}}function zg(o,e){const t=!(o instanceof Qe&&o.subError!==vi),n=o.errorCode===He.INVALID_GRANT_ERROR||o.errorCode===mt,r=t&&n||o.errorCode===jr||o.errorCode===ha,i=Nu.includes(e);return r&&i}/*! @azure/msal-browser v5.11.0 2026-05-19 */class eo{static loggerCallback(e,t){switch(e){case we.Error:console.error(t);return;case we.Info:console.info(t);return;case we.Verbose:console.debug(t);return;case we.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var c;this.browserEnvironment=typeof window<"u",this.config=Sg(e,this.browserEnvironment);let t;try{t=window[nt.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(jf),r=(c=t==null?void 0:t.getItem($f))==null?void 0:c.toLowerCase(),i=r==="true"?!0:r==="false"?!1:void 0,s={...this.config.system.loggerOptions},a=n&&Object.keys(we).includes(n)?we[n]:void 0;a&&(s.loggerCallback=eo.loggerCallback,s.logLevel=a),i!==void 0&&(s.piiLoggingEnabled=i),this.logger=new rt(s,Zf,Et),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
1/*! @azure/msal-browser v5.11.0 2026-05-19 */class $t extends eo{getModuleName(){return $t.MODULE_NAME}getId(){return $t.ID}async initialize(e){return this.available=typeof window<"u",this.available}}$t.MODULE_NAME="";$t.ID="StandardOperatingContext";/*! @azure/msal-browser v5.11.0 2026-05-19 */class Bg{constructor(e,t){this.controller=t||new qi(new $t(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}getAccount(e){return this.controller.getAccount(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Kg="https://login.microsoftonline.com/organizations",jg=["https://graph.microsoft.com/DeviceManagementApps.ReadWrite.All"],Ya="f0638c7c-f407-4472-9dea-6a89849fa24e",ps="https://classsight.ai/admin/agent-deployment",Kt=!!Ya,$g={auth:{clientId:Ya,authority:Kg,redirectUri:ps,postLogoutRedirectUri:ps},cache:{cacheLocation:"sessionStorage"}};let xr=null,Nr=null;async function to(){if(!Kt)throw new Error("VITE_INTUNE_AZURE_CLIENT_ID is not set. Configure it in .env (and the Entra app registration) to enable Intune deployment.");return xr||(Nr||(Nr=(async()=>{const o=new Bg($g);return await o.initialize(),xr=o,o})()),Nr)}async function Gg(){if(!Kt)return;await(await to()).handleRedirectPromise()}async function Wg(){var e;return Kt?((e=(await to()).getAllAccounts()[0])==null?void 0:e.username)??null:null}class Xa extends Error{constructor(){super("Redirecting to Microsoft sign-inâ¦"),this.name="RedirectingToSignIn"}}async function Vg(o=[]){const e=await to(),t=[...jg,...o],n=e.getAllAccounts()[0];if(n)try{const r=await e.acquireTokenSilent({account:n,scopes:t});return{accessToken:r.accessToken,tenantId:r.tenantId,username:r.account.username}}catch{}throw await e.loginRedirect({scopes:t,prompt:"select_account"}),new Xa}function Ln(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qa={exports:{}};/*! 2 3JSZip v3.10.1 - A JavaScript class for generating and reading zip files 4<http://stuartk.com/jszip> 5 6(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> 7Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. 8 9JSZip uses the library pako released under the MIT license : 10https://github.com/nodeca/pako/blob/main/LICENSE 11*/(function(o,e){(function(t){o.exports=t()})(function(){return function t(n,r,i){function s(h,l){if(!r[h]){if(!n[h]){var u=typeof Ln=="function"&&Ln;if(!l&&u)return u(h,!0);if(a)return a(h,!0);var m=new Error("Cannot find module '"+h+"'");throw m.code="MODULE_NOT_FOUND",m}var f=r[h]={exports:{}};n[h][0].call(f.exports,function(y){var p=n[h][1][y];return s(p||y)},f,f.exports,t,n,r,i)}return r[h].exports}
vendor: 10,778 bytes, lines 11-12
11for(var a=typeof Ln=="function"&&Ln,c=0;c<i.length;c++)s(i[c]);return s}({1:[function(t,n,r){var i=t("./utils"),s=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(c){for(var h,l,u,m,f,y,p,C=[],w=0,I=c.length,A=I,k=i.getTypeOf(c)!=="string";w<c.length;)A=I-w,u=k?(h=c[w++],l=w<I?c[w++]:0,w<I?c[w++]:0):(h=c.charCodeAt(w++),l=w<I?c.charCodeAt(w++):0,w<I?c.charCodeAt(w++):0),m=h>>2,f=(3&h)<<4|l>>4,y=1<A?(15&l)<<2|u>>6:64,p=2<A?63&u:64,C.push(a.charAt(m)+a.charAt(f)+a.charAt(y)+a.charAt(p));return C.join("")},r.decode=function(c){var h,l,u,m,f,y,p=0,C=0,w="data:";if(c.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var I,A=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&A--,c.charAt(c.length-2)===a.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(I=s.uint8array?new Uint8Array(0|A):new Array(0|A);p<c.length;)h=a.indexOf(c.charAt(p++))<<2|(m=a.indexOf(c.charAt(p++)))>>4,l=(15&m)<<4|(f=a.indexOf(c.charAt(p++)))>>2,u=(3&f)<<6|(y=a.indexOf(c.charAt(p++))),I[C++]=h,f!==64&&(I[C++]=l),y!==64&&(I[C++]=u);return I}},{"./support":30,"./utils":32}],2:[function(t,n,r){var i=t("./external"),s=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),c=t("./stream/DataLengthProbe");function h(l,u,m,f,y){this.compressedSize=l,this.uncompressedSize=u,this.crc32=m,this.compression=f,this.compressedContent=y}h.prototype={getContentWorker:function(){var l=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),u=this;return l.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),l},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(l,u,m){return l.pipe(new a).pipe(new c("uncompressedSize")).pipe(u.compressWorker(m)).pipe(new c("compressedSize")).withStreamInfo("compression",u)},n.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,r){var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,r){var i=t("./utils"),s=function(){for(var a,c=[],h=0;h<256;h++){a=h;for(var l=0;l<8;l++)a=1&a?3988292384^a>>>1:a>>>1;c[h]=a}return c}();n.exports=function(a,c){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(h,l,u,m){var f=s,y=m+u;h^=-1;for(var p=m;p<y;p++)h=h>>>8^f[255&(h^l[p])];return-1^h}(0|c,a,a.length,0):function(h,l,u,m){var f=s,y=m+u;h^=-1;for(var p=m;p<y;p++)h=h>>>8^f[255&(h^l.charCodeAt(p))];return-1^h}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,n,r){var i=null;i=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:i}},{lie:37}],7:[function(t,n,r){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=t("pako"),a=t("./utils"),c=t("./stream/GenericWorker"),h=i?"uint8array":"array";function l(u,m){c.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=m,this.meta={}}r.magic="\b\0",a.inherits(l,c),l.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(h,u.data),!1)},l.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(m){u.push({data:m,meta:u.meta})}},r.compressWorker=function(u){return new l("Deflate",u)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,r){function i(f,y){var p,C="";for(p=0;p<y;p++)C+=String.fromCharCode(255&f),f>>>=8;return C}function s(f,y,p,C,w,I){var A,k,T=f.file,U=f.compression,x=I!==h.utf8encode,$=a.transformTo("string",I(T.name)),N=a.transformTo("string",h.utf8encode(T.name)),B=T.comment,te=a.transformTo("string",I(B)),b=a.transformTo("string",h.utf8encode(B)),M=N.length!==T.name.length,g=b.length!==B.length,F="",oe="",G="",se=T.dir,W=T.date,L={crc32:0,compressedSize:0,uncompressedSize:0};y&&!p||(L.crc32=f.crc32,L.compressedSize=f.compressedSize,L.uncompressedSize=f.uncompressedSize);var E=0;y&&(E|=8),x||!M&&!g||(E|=2048);var R=0,ee=0;se&&(R|=16),w==="UNIX"?(ee=798,R|=function(J,le){var Ce=J;return J||(Ce=le?16893:33204),(65535&Ce)<<16}(T.unixPermissions,se)):(ee=20,R|=function(J){return 63&(J||0)}(T.dosPermissions)),A=W.getUTCHours(),A<<=6,A|=W.getUTCMinutes(),A<<=5,A|=W.getUTCSeconds()/2,k=W.getUTCFullYear()-1980,k<<=4,k|=W.getUTCMonth()+1,k<<=5,k|=W.getUTCDate(),M&&(oe=i(1,1)+i(l($),4)+N,F+="up"+i(oe.length,2)+oe),g&&(G=i(1,1)+i(l(te),4)+b,F+="uc"+i(G.length,2)+G);var Y="";return Y+=` 12\0`,Y+=i(E,2),Y+=U.magic,Y+=i(A,2),Y+=i(k,2),Y+=i(L.crc32,4),Y+=i(L.compressedSize,4),Y+=i(L.uncompressedSize,4),Y+=i($.length,2),Y+=i(F.length,2),{fileRecord:u.LOCAL_FILE_HEADER+Y+$+F,dirRecord:u.CENTRAL_FILE_HEADER+i(ee,2)+Y+i(te.length,2)+"\0\0\0\0"+i(R,4)+i(C,4)+$+F+te}}var a=t("../utils"),c=t("../stream/GenericWorker"),h=t("../utf8"),l=t("../crc32"),u=t("../signature");function m(f,y,p,C){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=p,this.encodeFileName=C,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,c),m.prototype.push=function(f){var y=f.meta.percent||0,p=this.entriesCount,C=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,c.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(y+100*(p-C-1))/p:100}}))},m.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var y=this.streamFiles&&!f.file.dir;if(y){var p=s(f,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(f){this.accumulate=!1;var y=this.streamFiles&&!f.file.dir,p=s(f,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),y)this.push({data:function(C){return u.DATA_DESCRIPTOR+i(C.crc32,4)+i(C.compressedSize,4)+i(C.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var f=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var p=this.bytesWritten-f,C=function(w,I,A,k,T){var U=a.transformTo("string",T(k));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(w,2)+i(w,2)+i(I,4)+i(A,4)+i(U.length,2)+U}(this.dirRecords.length,p,f,this.zipComment,this.encodeFileName);this.push({data:C,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(f){this._sources.push(f);var y=this;return f.on("data",function(p){y.processChunk(p)}),f.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),f.on("error",function(p){y.error(p)}),this},m.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(f){var y=this._sources;if(!c.prototype.error.call(this,f))return!1;for(var p=0;p<y.length;p++)try{y[p].error(f)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var f=this._sources,y=0;y<f.length;y++)f[y].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,r){var i=t("../compressions"),s=t("./ZipFileWorker");r.generateWorker=function(a,c,h){var l=new s(c.streamFiles,h,c.platform,c.encodeFileName),u=0;try{a.forEach(function(m,f){u++;var y=function(I,A){var k=I||A,T=i[k];if(!T)throw new Error(k+" is not a valid compression method !");return T}(f.options.compression,c.compression),p=f.options.compressionOptions||c.compressionOptions||{},C=f.dir,w=f.date;f._compressWorker(y,p).withStreamInfo("file",{name:m,dir:C,date:w,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(l)}),l.entriesCount=u}catch(m){l.error(m)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,r){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=t("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,r){var i=t("./utils"),s=t("./external"),a=t("./utf8"),c=t("./zipEntries"),h=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function u(m){return new s.Promise(function(f,y){var p=m.decompressed.getContentWorker().pipe(new h);p.on("error",function(C){y(C)}).on("end",function(){p.streamInfo.crc32!==m.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(m,f){var y=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),l.isNode&&l.isStream(m)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip f
12ile",m,!0,f.optimizedBinaryString,f.base64).then(function(p){var C=new c(f);return C.load(p),C}).then(function(p){var C=[s.Promise.resolve(p)],w=p.files;if(f.checkCRC32)for(var I=0;I<w.length;I++)C.push(u(w[I]));return s.Promise.all(C)}).then(function(p){for(var C=p.shift(),w=C.files,I=0;I<w.length;I++){var A=w[I],k=A.fileNameStr,T=i.resolve(A.fileNameStr);y.file(T,A.decompressed,{binary:!0,optimizedBinaryString:!0,date:A.date,dir:A.dir,comment:A.fileCommentStr.length?A.fileCommentStr:null,unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions,createFolders:f.createFolders}),A.dir||(y.file(T).unsafeOriginalName=k)}return C.zipComment.length&&(y.comment=C.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,r){var i=t("../utils"),s=t("../stream/GenericWorker");function a(c,h){s.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(a,s),a.prototype._bindStream=function(c){var h=this;(this._stream=c).pause(),c.on("data",function(l){h.push({data:l,meta:{percent:0}})}).on("error",function(l){h.isPaused?this.generatedError=l:h.error(l)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,r){var i=t("readable-stream").Readable;function s(a,c,h){i.call(this,c),this._helper=a;var l=this;a.on("data",function(u,m){l.push(u)||l._helper.pause(),h&&h(m)}).on("error",function(u){l.emit("error",u)}).on("end",function(){l.push(null)})}t("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(t,n,r){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(t,n,r){function i(T,U,x){var $,N=a.getTypeOf(U),B=a.extend(x||{},l);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(T=w(T)),B.createFolders&&($=C(T))&&I.call(this,$,!0);var te=N==="string"&&B.binary===!1&&B.base64===!1;x&&x.binary!==void 0||(B.binary=!te),(U instanceof u&&U.uncompressedSize===0||B.dir||!U||U.length===0)&&(B.base64=!1,B.binary=!0,U="",B.compression="STORE",N="string");var b=null;b=U instanceof u||U instanceof c?U:y.isNode&&y.isStream(U)?new p(T,U):a.prepareContent(T,U,B.binary,B.optimizedBinaryString,B.base64);var M=new m(T,b,B);this.files[T]=M}var s=t("./utf8"),a=t("./utils"),c=t("./stream/GenericWorker"),h=t("./stream/StreamHelper"),l=t("./defaults"),u=t("./compressedObject"),m=t("./zipObject"),f=t("./generate"),y=t("./nodejsUtils"),p=t("./nodejs/NodejsStreamInputAdapter"),C=function(T){T.slice(-1)==="/"&&(T=T.substring(0,T.length-1));var U=T.lastIndexOf("/");return 0<U?T.substring(0,U):""},w=function(T){return T.slice(-1)!=="/"&&(T+="/"),T},I=function(T,U){return U=U!==void 0?U:l.createFolders,T=w(T),this.files[T]||i.call(this,T,null,{dir:!0,createFolders:U}),this.files[T]};function A(T){return Object.prototype.toString.call(T)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(T){var U,x,$;for(U in this.files)$=this.files[U],(x=U.slice(this.root.length,U.length))&&U.slice(0,this.root.length)===this.root&&T(x,$)},filter:function(T){var U=[];return this.forEach(function(x,$){T(x,$)&&U.push($)}),U},file:function(T,U,x){if(arguments.length!==1)return T=this.root+T,i.call(this,T,U,x),this;if(A(T)){var $=T;return this.filter(function(B,te){return!te.dir&&$.test(B)})}var N=this.files[this.root+T];return N&&!N.dir?N:null},folder:function(T){if(!T)return this;if(A(T))return this.filter(function(N,B){return B.dir&&T.test(N)});var U=this.root+T,x=I.call(this,U),$=this.clone();return $.root=x.name,$},remove:function(T){T=this.root+T;var U=this.files[T];if(U||(T.slice(-1)!=="/"&&(T+="/"),U=this.files[T]),U&&!U.dir)delete this.files[T];else for(var x=this.filter(function(N,B){return B.name.slice(0,T.length)===T}),$=0;$<x.length;$++)delete this.files[x[$].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")}
vendor: 22,015 bytes, line 12
12,generateInternalStream:function(T){var U,x={};try{if((x=a.extend(T||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");a.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var $=x.comment||this.comment||"";U=f.generateWorker(this,x,$)}catch(N){(U=new c("error")).error(N)}return new h(U,x.type||"string",x.mimeType)},generateAsync:function(T,U){return this.generateInternalStream(T).accumulate(U)},generateNodeStream:function(T,U){return(T=T||{}).type||(T.type="nodebuffer"),this.generateInternalStream(T).toNodejsStream(U)}};n.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,r){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,r){var i=t("./DataReader");function s(a){i.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}t("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),h=a.charCodeAt(1),l=a.charCodeAt(2),u=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===c&&this.data[m+1]===h&&this.data[m+2]===l&&this.data[m+3]===u)return m-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),h=a.charCodeAt(1),l=a.charCodeAt(2),u=a.charCodeAt(3),m=this.readData(4);return c===m[0]&&h===m[1]&&l===m[2]&&u===m[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(t,n,r){var i=t("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,h=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)h=(h<<8)+this.byteAt(c);return this.index+=a,h},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(t,n,r){var i=t("./Uint8ArrayReader");function s(a){i.call(this,a)}t("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,r){var i=t("./DataReader");function s(a){i.call(this,a)}t("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(t,n,r){var i=t("./ArrayReader");function s(a){i.call(this,a)}t("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,r){var i=t("../utils"),s=t("../support"),a=t("./ArrayReader"),c=t("./StringReader"),h=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");n.exports=function(u){var m=i.getTypeOf(u);return i.checkSupport(m),m!=="string"||s.uint8array?m==="nodebuffer"?new h(u):s.uint8array?new l(i.transformTo("uint8array",u)):new a(i.transformTo("array",u)):new c(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,r){var i=t("./GenericWorker"),s=t("../utils");function a(c){i.call(this,"ConvertWorker to "+c),this.destType=c}s.inherits(a,i),a.prototype.processChunk=function(c){this.push({data:s.transformTo(this.destType,c.data),meta:c.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,r){var i=t("./GenericWorker"),s=t("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,i),a.prototype.processChunk=function(c){this.streamInfo.crc32=s(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,r){var i=t("../utils"),s=t("./GenericWorker");function a(c){s.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(a,s),a.prototype.processChunk=function(c){if(c){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+c.data.length}s.prototype.processChunk.call(this,c)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,r){var i=t("../utils"),s=t("./GenericWorker");function a(c){s.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(l){h.dataIsReady=!0,h.data=l,h.max=l&&l.length||0,h.type=i.getTypeOf(l),h.isPaused||h._tickAndRepeat()},function(l){h.error(l)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,h);break;case"uint8array":c=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":c=this.data.slice(this.index,h)}return this.index=h,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,r){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var c=0;c<this._listeners[s].length;c++)this._listeners[s][c].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(c){a.processChunk(c)}),s.on("end",function(){a.end()}),s.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=i},{}],29:[function(t,n,r){var i=t("../utils"),s=t("./ConvertWorker"),a=t("./GenericWorker"),c=t("../base64"),h=t("../support"),l=t("../external"),u=null;if(h.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(y,p){return new l.Promise(function(C,w){var I=[],A=y._internalType,k=y._outputType,T=y._mimeType;y.on("data",function(U,x){I.push(U),p&&p(x)}).on("error",function(U){I=[],w(U)}).on("end",function(){try{var U=function(x,$,N){switch(x){case"blob":return i.newBlob(i.transformTo("arraybuffer",$),N);case"base64":return c.encode($);default:return i.transformTo(x,$)}}(k,function(x,$){var N,B=0,te=null,b=0;for(N=0;N<$.length;N++)b+=$[N].length;switch(x){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":for(te=new Uint8Array(b),N=0;N<$.length;N++)te.set($[N],B),B+=$[N].length;return te;case"nodebuffer":return Buffer.concat($);default:throw new Error("concat : unsupported type '"+x+"'")}}(A,I),T);C(U)}catch(x){w(x)}I=[]}).resume()})}function f(y,p,C){var w=p;switch(p){case"blob":case"arraybuffer":w="uint8array";break;case"base64":w="string"}try{this._internalType=w,this._outputType=p,this._mimeType=C,i.checkSupport(w),this._worker=y.pipe(new s(w)),y.lock()}catch(I){this._worker=new a("error"),this._worker.error(I)}}f.prototype={accumulate:function(y){return m(this,y)},on:function(y,p){var C=this;return y==="data"?this._worker.on(y,function(w){p.call(C,w.data,w.meta)}):this._worker.on(y,function(){i.delay(p,arguments,C)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},y)}},n.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),r.blob=s.getBlob("application/zip").size===0}catch{r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,r){for(var i=t("./utils"),s=t("./support"),a=t("./nodejsUtils"),c=t("./stream/GenericWorker"),h=new Array(256),l=0;l<256;l++)h[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;h[254]=h[254]=1;function u(){c.call(this,"utf-8 decode"),this.leftOver=null}function m(){c.call(this,"utf-8 encode")}r.utf8encode=function(f){return s.nodebuffer?a.newBufferFrom(f,"utf-8"):function(y){var p,C,w,I,A,k=y.length,T=0;for(I=0;I<k;I++)(64512&(C=y.charCodeAt(I)))==55296&&I+1<k&&(64512&(w=y.charCodeAt(I+1)))==56320&&(C=65536+(C-55296<<10)+(w-56320),I++),T+=C<128?1:C<2048?2:C<65536?3:4;for(p=s.uint8array?new Uint8Array(T):new Array(T),I=A=0;A<T;I++)(64512&(C=y.charCodeAt(I)))==55296&&I+1<k&&(64512&(w=y.charCodeAt(I+1)))==56320&&(C=65536+(C-55296<<10)+(w-56320),I++),C<128?p[A++]=C:(C<2048?p[A++]=192|C>>>6:(C<65536?p[A++]=224|C>>>12:(p[A++]=240|C>>>18,p[A++]=128|C>>>12&63),p[A++]=128|C>>>6&63),p[A++]=128|63&C);return p}(f)},r.utf8decode=function(f){return s.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):function(y){var p,C,w,I,A=y.length,k=new Array(2*A);for(p=C=0;p<A;)if((w=y[p++])<128)k[C++]=w;else if(4<(I=h[w]))k[C++]=65533,p+=I-1;else{for(w&=I===2?31:I===3?15:7;1<I&&p<A;)w=w<<6|63&y[p++],I--;1<I?k[C++]=65533:w<65536?k[C++]=w:(w-=65536,k[C++]=55296|w>>10&1023,k[C++]=56320|1023&w)}return k.length!==C&&(k.subarray?k=k.subarray(0,C):k.length=C),i.applyFromCharCode(k)}(f=i.transformTo(s.uint8array?"uint8array":"array",f))},i.inherits(u,c),u.prototype.processChunk=function(f){var y=i.transformTo(s.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var p=y;(y=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),y.set(p,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var C=function(I,A){var k;for((A=A||I.length)>I.length&&(A=I.length),k=A-1;0<=k&&(192&I[k])==128;)k--;return k<0||k===0?A:k+h[I[k]]>A?k:A}(y),w=y;C!==y.length&&(s.uint8array?(w=y.subarray(0,C),this.leftOver=y.subarray(C,y.length)):(w=y.slice(0,C),this.leftOver=y.slice(C,y.length))),this.push({data:r.utf8decode(w),meta:f.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,i.inherits(m,c),m.prototype.processChunk=function(f){this.push({data:r.utf8encode(f.data),meta:f.meta})},r.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,r){var i=t("./support"),s=t("./base64"),a=t("./nodejsUtils"),c=t("./external");function h(p){return p}function l(p,C){for(var w=0;w<p.length;++w)C[w]=255&p.charCodeAt(w);return C}t("setimmediate"),r.newBlob=function(p,C){r.checkSupport("blob");try{return new Blob([p],{type:C})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(p),w.getBlob(C)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(p,C,w){var I=[],A=0,k=p.length;if(k<=w)return String.fromCharCode.apply(null,p);for(;A<k;)C==="array"||C==="nodebuffer"?I.push(String.fromCharCode.apply(null,p.slice(A,Math.min(A+w,k)))):I.push(String.fromCharCode.apply(null,p.subarray(A,Math.min(A+w,k)))),A+=w;return I.join("")},stringifyByChar:function(p){for(var C="",w=0;w<p.length;w++)C+=String.fromCharCode(p[w]);return C},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function m(p){var C=65536,w=r.getTypeOf(p),I=!0;if(w==="uint8array"?I=u.applyCanBeUsed.uint8array:w==="nodebuffer"&&(I=u.applyCanBeUsed.nodebuffer),I)for(;1<C;)try{return u.stringifyByChunk(p,w,C)}catch{C=Math.floor(C/2)}return u.stringifyByChar(p)}function f(p,C){for(var w=0;w<p.length;w++)C[w]=p[w];return C}r.applyFromCharCode=m;var y={};y.string={string:h,array:function(p){return l(p,new Array(p.length))},arraybuffer:function(p){return y.string.uint8array(p).buffer},uint8array:function(p){return l(p,new Uint8Array(p.length))},nodebuffer:function(p){return l(p,a.allocBuffer(p.length))}},y.array={string:m,array:h,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},y.arraybuffer={string:function(p){return m(new Uint8Array(p))},array:function(p){return f(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:h,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},y.uint8array={string:m,array:function(p){return f(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:h,nodebuffer:function(p){return a.newBufferFrom(p)}},y.nodebuffer={string:m,array:function(p){return f(p,new Array(p.length))},arraybuffer:function(p){return y.nodebuffer.uint8array(p).buffer},uint8array:function(p){return f(p,new Uint8Array(p.length))},nodebuffer:h},r.transformTo=function(p,C){if(C=C||"",!p)return C;r.checkSupport(p);var w=r.getTypeOf(C);return y[w][p](C)},r.resolve=function(p){for(var C=p.split("/"),w=[],I=0;I<C.length;I++){var A=C[I];A==="."||A===""&&I!==0&&I!==C.length-1||(A===".."?w.pop():w.push(A))}return w.join("/")},r.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(p)?"nodebuffer":i.uint8array&&p instanceof Uint8Array?"uint8array":i.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(p){if(!i[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(p){var C,w,I="";for(w=0;w<(p||"").length;w++)I+="\\x"+((C=p.charCodeAt(w))<16?"0":"")+C.toString(16).toUpperCase();return I},r.delay=function(p,C,w){setImmediate(function(){p.apply(w||null,C||[])})},r.inherits=function(p,C){function w(){}w.prototype=C.prototype,p.prototype=new w},r.extend=function(){var p,C,w={};for(p=0;p<arguments.length;p++)for(C in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],C)&&w[C]===void 0&&(w[C]=arguments[p][C]);return w},r.prepareContent=function(p,C,w,I,A){return c.Promise.resolve(C).then(function(k){return i.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new c.Promise(function(T,U){var x=new FileReader;x.onload=function($){T($.target.result)},x.onerror=function($){U($.target.error)},x.readAsArrayBuffer(k)}):k}).then(function(k){var T=r.getTypeOf(k);return T?(T==="arraybuffer"?k=r.transformTo("uint8array",k):T==="string"&&(A?k=s.decode(k):w&&I!==!0&&(k=function(U){return l(U,i.uint8array?new Uint8Array(U.length):new Array(U.length))}(k))),k):c.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,r){var i=t("./reader/readerFor"),s=t("./utils"),a=t("./signature"),c=t("./zipEntry"),h=t("./support");function l(u){this.files=[],this.loadOptions=u}l.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(m)+", expected "+s.pretty(u)+")")}},isSignature:function(u,m){var f=this.reader.index;this.reader.setIndex(u);var y=this.reader.readString(4)===m;return this.reader.setIndex(f),y},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),m=h.uint8array?"uint8array":"array",f=s.transformTo(m,u);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,m,f,y=this.zip64EndOfCentralSize-44;0<y;)u=this.reader.readInt(2),m=this.reader.readInt(4),f=this.reader.readData(m),this.zip64ExtensibleData[u]={id:u,length:m,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,m;for(u=0;u<this.files.length;u++)m=this.files[u],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(u=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
12ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var m=u;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var y=m-f;if(0<y)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(u){this.reader=i(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,r){var i=t("./reader/readerFor"),s=t("./utils"),a=t("./compressedObject"),c=t("./crc32"),h=t("./utf8"),l=t("./compressions"),u=t("./support");function m(f,y){this.options=f,this.loadOptions=y}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var y,p;if(f.skip(22),this.fileNameLength=f.readInt(2),p=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((y=function(C){for(var w in l)if(Object.prototype.hasOwnProperty.call(l,w)&&l[w].magic===C)return l[w];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,y,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var y=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(y),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&
vendor: 53,918 bytes, line 12
12(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var y,p,C,w=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<w;)y=f.readInt(2),p=f.readInt(2),C=f.readData(p),this.extraFields[y]={id:y,length:p,value:C};f.setIndex(w)},handleUTF8:function(){var f=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var p=s.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var C=this.findExtraFieldUnicodeComment();if(C!==null)this.fileCommentStr=C;else{var w=s.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var y=i(f.value);return y.readInt(1)!==1||c(this.fileName)!==y.readInt(4)?null:h.utf8decode(y.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var y=i(f.value);return y.readInt(1)!==1||c(this.fileComment)!==y.readInt(4)?null:h.utf8decode(y.readData(f.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,r){function i(y,p,C){this.name=y,this.dir=C.dir,this.date=C.date,this.comment=C.comment,this.unixPermissions=C.unixPermissions,this.dosPermissions=C.dosPermissions,this._data=p,this._dataBinary=C.binary,this.options={compression:C.compression,compressionOptions:C.compressionOptions}}var s=t("./stream/StreamHelper"),a=t("./stream/DataWorker"),c=t("./utf8"),h=t("./compressedObject"),l=t("./stream/GenericWorker");i.prototype={internalStream:function(y){var p=null,C="string";try{if(!y)throw new Error("No output type specified.");var w=(C=y.toLowerCase())==="string"||C==="text";C!=="binarystring"&&C!=="text"||(C="string"),p=this._decompressWorker();var I=!this._dataBinary;I&&!w&&(p=p.pipe(new c.Utf8EncodeWorker)),!I&&w&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(A){(p=new l("error")).error(A)}return new s(p,C,"")},async:function(y,p){return this.internalStream(y).accumulate(p)},nodeStream:function(y,p){return this.internalStream(y||"nodebuffer").toNodejsStream(p)},_compressWorker:function(y,p){if(this._data instanceof h&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var C=this._decompressWorker();return this._dataBinary||(C=C.pipe(new c.Utf8EncodeWorker)),h.createWorkerFrom(C,y,p)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof l?this._data:new a(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,r){(function(i){var s,a,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var h=0,l=new c(y),u=i.document.createTextNode("");l.observe(u,{characterData:!0}),s=function(){u.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var p=i.document.createElement("script");p.onreadystatechange=function(){y(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},i.document.documentElement.appendChild(p)}:function(){setTimeout(y,0)};else{var m=new i.MessageChannel;m.port1.onmessage=y,s=function(){m.port2.postMessage(0)}}var f=[];function y(){var p,C;a=!0;for(var w=f.length;w;){for(C=f,f=[],p=-1;++p<w;)C[p]();w=f.length}a=!1}n.exports=function(p){f.push(p)!==1||a||s()}}).call(this,typeof kn<"u"?kn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,r){var i=t("immediate");function s(){}var a={},c=["REJECTED"],h=["FULFILLED"],l=["PENDING"];function u(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,w!==s&&p(this,w)}function m(w,I,A){this.promise=w,typeof I=="function"&&(this.onFulfilled=I,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function f(w,I,A){i(function(){var k;try{k=I(A)}catch(T){return a.reject(w,T)}k===w?a.reject(w,new TypeError("Cannot resolve promise with itself")):a.resolve(w,k)})}function y(w){var I=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof I=="function")return function(){I.apply(w,arguments)}}function p(w,I){var A=!1;function k(x){A||(A=!0,a.reject(w,x))}function T(x){A||(A=!0,a.resolve(w,x))}var U=C(function(){I(T,k)});U.status==="error"&&k(U.value)}function C(w,I){var A={};try{A.value=w(I),A.status="success"}catch(k){A.status="error",A.value=k}return A}(n.exports=u).prototype.finally=function(w){if(typeof w!="function")return this;var I=this.constructor;return this.then(function(A){return I.resolve(w()).then(function(){return A})},function(A){return I.resolve(w()).then(function(){throw A})})},u.prototype.catch=function(w){return this.then(null,w)},u.prototype.then=function(w,I){if(typeof w!="function"&&this.state===h||typeof I!="function"&&this.state===c)return this;var A=new this.constructor(s);return this.state!==l?f(A,this.state===h?w:I,this.outcome):this.queue.push(new m(A,w,I)),A},m.prototype.callFulfilled=function(w){a.resolve(this.promise,w)},m.prototype.otherCallFulfilled=function(w){f(this.promise,this.onFulfilled,w)},m.prototype.callRejected=function(w){a.reject(this.promise,w)},m.prototype.otherCallRejected=function(w){f(this.promise,this.onRejected,w)},a.resolve=function(w,I){var A=C(y,I);if(A.status==="error")return a.reject(w,A.value);var k=A.value;if(k)p(w,k);else{w.state=h,w.outcome=I;for(var T=-1,U=w.queue.length;++T<U;)w.queue[T].callFulfilled(I)}return w},a.reject=function(w,I){w.state=c,w.outcome=I;for(var A=-1,k=w.queue.length;++A<k;)w.queue[A].callRejected(I);return w},u.resolve=function(w){return w instanceof this?w:a.resolve(new this(s),w)},u.reject=function(w){var I=new this(s);return a.reject(I,w)},u.all=function(w){var I=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=w.length,k=!1;if(!A)return this.resolve([]);for(var T=new Array(A),U=0,x=-1,$=new this(s);++x<A;)N(w[x],x);return $;function N(B,te){I.resolve(B).then(function(b){T[te]=b,++U!==A||k||(k=!0,a.resolve($,T))},function(b){k||(k=!0,a.reject($,b))})}},u.race=function(w){var I=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=w.length,k=!1;if(!A)return this.resolve([]);for(var T=-1,U=new this(s);++T<A;)x=w[T],I.resolve(x).then(function($){k||(k=!0,a.resolve(U,$))},function($){k||(k=!0,a.reject(U,$))});var x;return U}},{immediate:36}],38:[function(t,n,r){var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,r){var i=t("./zlib/deflate"),s=t("./utils/common"),a=t("./utils/strings"),c=t("./zlib/messages"),h=t("./zlib/zstream"),l=Object.prototype.toString,u=0,m=-1,f=0,y=8;function p(w){if(!(this instanceof p))return new p(w);this.options=s.assign({level:m,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},w||{});var I=this.options;I.raw&&0<I.windowBits?I.windowBits=-I.windowBits:I.gzip&&0<I.windowBits&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var A=i.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(A!==u)throw new Error(c[A]);if(I.header&&i.deflateSetHeader(this.strm,I.header),I.dictionary){var k;if(k=typeof I.dictionary=="string"?a.string2buf(I.dictionary):l.call(I.dictionary)==="[object ArrayBuffer]"?new Uint8Array(I.dictionary):I.dictionary,(A=i.deflateSetDictionary(this.strm,k))!==u)throw new Error(c[A]);this._dict_set=!0}}function C(w,I){var A=new p(I);if(A.push(w,!0),A.err)throw A.msg||c[A.err];return A.result}p.prototype.push=function(w,I){var A,k,T=this.strm,U=this.options.chunkSize;if(this.ended)return!1;k=I===~~I?I:I===!0?4:0,typeof w=="string"?T.input=a.string2buf(w):l.call(w)==="[object ArrayBuffer]"?T.input=new Uint8Array(w):T.input=w,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new s.Buf8(U),T.next_out=0,T.avail_out=U),(A=i.deflate(T,k))!==1&&A!==u)return this.onEnd(A),!(this.ended=!0);T.avail_out!==0&&(T.avail_in!==0||k!==4&&k!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(T.output,T.next_out))):this.onData(s.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||T.avail_out===0)&&A!==1);return k===4?(A=i.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===u):k!==2||(this.onEnd(u),!(T.avail_out=0))},p.prototype.onData=function(w){this.chunks.push(w)},p.prototype.onEnd=function(w){w===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},r.Deflate=p,r.deflate=C,r.deflateRaw=function(w,I){return(I=I||{}).raw=!0,C(w,I)},r.gzip=function(w,I){return(I=I||{}).gzip=!0,C(w,I)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,r){var i=t("./zlib/inflate"),s=t("./utils/common"),a=t("./utils/strings"),c=t("./zlib/constants"),h=t("./zlib/messages"),l=t("./zlib/zstream"),u=t("./zlib/gzheader"),m=Object.prototype.toString;function f(p){if(!(this instanceof f))return new f(p);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},p||{});var C=this.options;C.raw&&0<=C.windowBits&&C.windowBits<16&&(C.windowBits=-C.windowBits,C.windowBits===0&&(C.windowBits=-15)),!(0<=C.windowBits&&C.windowBits<16)||p&&p.windowBits||(C.windowBits+=32),15<C.windowBits&&C.windowBits<48&&!(15&C.windowBits)&&(C.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var w=i.inflateInit2(this.strm,C.windowBits);if(w!==c.Z_OK)throw new Error(h[w]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function y(p,C){var w=new f(C);if(w.push(p,!0),w.err)throw w.msg||h[w.err];return w.result}f.prototype.push=function(p,C){var w,I,A,k,T,U,x=this.strm,$=this.options.chunkSize,N=this.options.dictionary,B=!1;if(this.ended)return!1;I=C===~~C?C:C===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?x.input=a.binstring2buf(p):m.call(p)==="[object ArrayBuffer]"?x.input=new Uint8Array(p):x.input=p,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new s.Buf8($),x.next_out=0,x.avail_out=$),(w=i.inflate(x,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&N&&(U=typeof N=="string"?a.string2buf(N):m.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,w=i.inflateSetDictionary(this.strm,U)),w===c.Z_BUF_ERROR&&B===!0&&(w=c.Z_OK,B=!1),w!==c.Z_STREAM_END&&w!==c.Z_OK)return this.onEnd(w),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&w!==c.Z_STREAM_END&&(x.avail_in!==0||I!==c.Z_FINISH&&I!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(A=a.utf8border(x.output,x.next_out),k=x.next_out-A,T=a.buf2string(x.output,A),x.next_out=k,x.avail_out=$-k,k&&s.arraySet(x.output,x.output,A,k,0),this.onData(T)):this.onData(s.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(B=!0)}while((0<x.avail_in||x.avail_out===0)&&w!==c.Z_STREAM_END);return w===c.Z_STREAM_END&&(I=c.Z_FINISH),I===c.Z_FINISH?(w=i.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===c.Z_OK):I!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(x.avail_out=0))},f.prototype.onData=function(p){this.chunks.push(p)},f.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},r.Inflate=f,r.inflate=y,r.inflateRaw=function(p,C){return(C=C||{}).raw=!0,y(p,C)},r.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,r){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(c){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var l=h.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var u in l)l.hasOwnProperty(u)&&(c[u]=l[u])}}return c},r.shrinkBuf=function(c,h){return c.length===h?c:c.subarray?c.subarray(0,h):(c.length=h,c)};var s={arraySet:function(c,h,l,u,m){if(h.subarray&&c.subarray)c.set(h.subarray(l,l+u),m);else for(var f=0;f<u;f++)c[m+f]=h[l+f]},flattenChunks:function(c){var h,l,u,m,f,y;for(h=u=0,l=c.length;h<l;h++)u+=c[h].length;for(y=new Uint8Array(u),h=m=0,l=c.length;h<l;h++)f=c[h],y.set(f,m),m+=f.length;return y}},a={arraySet:function(c,h,l,u,m){for(var f=0;f<u;f++)c[m+f]=h[l+f]},flattenChunks:function(c){return[].concat.apply([],c)}};r.setTyped=function(c){c?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,s)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(i)},{}],42:[function(t,n,r){var i=t("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new i.Buf8(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function l(u,m){if(m<65537&&(u.subarray&&a||!u.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(u,m));for(var f="",y=0;y<m;y++)f+=String.fromCharCode(u[y]);return f}c[254]=c[254]=1,r.string2buf=function(u){var m,f,y,p,C,w=u.length,I=0;for(p=0;p<w;p++)(64512&(f=u.charCodeAt(p)))==55296&&p+1<w&&(64512&(y=u.charCodeAt(p+1)))==56320&&(f=65536+(f-55296<<10)+(y-56320),p++),I+=f<128?1:f<2048?2:f<65536?3:4;for(m=new i.Buf8(I),p=C=0;C<I;p++)(64512&(f=u.charCodeAt(p)))==55296&&p+1<w&&(64512&(y=u.charCodeAt(p+1)))==56320&&(f=65536+(f-55296<<10)+(y-56320),p++),f<128?m[C++]=f:(f<2048?m[C++]=192|f>>>6:(f<65536?m[C++]=224|f>>>12:(m[C++]=240|f>>>18,m[C++]=128|f>>>12&63),m[C++]=128|f>>>6&63),m[C++]=128|63&f);return m},r.buf2binstring=function(u){return l(u,u.length)},r.binstring2buf=function(u){for(var m=new i.Buf8(u.length),f=0,y=m.length;f<y;f++)m[f]=u.charCodeAt(f);return m},r.buf2string=function(u,m){var f,y,p,C,w=m||u.length,I=new Array(2*w);for(f=y=0;f<w;)if((p=u[f++])<128)I[y++]=p;else if(4<(C=c[p]))I[y++]=65533,f+=C-1;else{for(p&=C===2?31:C===3?15:7;1<C&&f<w;)p=p<<6|63&u[f++],C--;1<C?I[y++]=65533:p<65536?I[y++]=p:(p-=65536,I[y++]=55296|p>>10&1023,I[y++]=56320|1023&p)}return l(I,y)},r.utf8border=function(u,m){var f;for((m=m||u.length)>u.length&&(m=u.length),f=m-1;0<=f&&(192&u[f])==128;)f--;return f<0||f===0?m:f+c[u[f]]>m?f:m}},{"./common":41}],43:[function(t,n,r){n.exports=function(i,s,a,c){for(var h=65535&i|0,l=i>>>16&65535|0,u=0;a!==0;){for(a-=u=2e3<a?2e3:a;l=l+(h=h+s[c++]|0)|0,--u;);h%=65521,l%=65521}return h|l<<16|0}},{}],44:[function(t,n,r){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,r){var i=function(){for(var s,a=[],c=0;c<256;c++){s=c;for(var h=0;h<8;h++)s=1&s?3988292384^s>>>1:s>>>1;a[c]=s}return a}();n.exports=function(s,a,c,h){var l=i,u=h+c;s^=-1;for(var m=h;m<u;m++)s=s>>>8^l[255&(s^a[m])];return-1^s}},{}],46:[function(t,n,r){var i,s=t("../utils/common"),a=t("./trees"),c=t("./adler32"),h=t("./crc32"),l=t("./messages"),u=0,m=4,f=0,y=-2,p=-1,C=4,w=2,I=8,A=9,k=286,T=30,U=19,x=2*k+1,$=15,N=3,B=258,te=B+N+1,b=42,M=113,g=1,F=2,oe=3,G=4;function se(d,H){return d.msg=l[H],H}function W(d){return(d<<1)-(4<d?9:0)}function L(d){for(var H=d.length;0<=--H;)d[H]=0}function E(d){var H=d.state,P=H.pending;P>d.avail_out&&(P=d.avail_out),P!==0&&(s.arraySet(d.output,H.pending_buf,H.pending_out,P,d.next_out),d.next_out+=P,H.pending_out+=P,d.total_out+=P,d.avail_out-=P,H.pending-=P,H.pending===0&&(H.pending_out=0))}function R(d,H){a._tr_flush_block(d,0<=d.block_start?d.block_start:-1,d.strstart-d.block_start,H),d.block_start=d.strstart,E(d.strm)}function ee(d,H){d.pending_buf[d.pending++]=H}function Y(d,H){d.pending_buf[d.pending++]=H>>>8&255,d.pending_buf[d.pending++]=255&H}function J(d,H){var P,v,_=d.max_chain_length,S=d.strstart,z=d.prev_length,K=d.nice_match,O=d.strstart>d.w_size-te?d.strstart-(d.w_size-te):0,Q=d.window,q=d.w_mask,Z=d.prev,re=d.strstart+B,ye=Q[S+z-1],de=Q[S+z];d.prev_length>=d.good_match&&(_>>=2),K>d.lookahead&&(K=d.lookahead);do if(Q[(P=H)+z]===de&&Q[P+z-1]===ye&&Q[P]===Q[S]&&Q[++P]===Q[S+1]){S+=2,P++;do;while(Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&Q[++S]===Q[++P]&&S<re);if(v=B-(re-S),S=re-B,z<v){if(d.match_start=H,K<=(z=v))break;ye=Q[S+z-1],de=Q[S+z]}}while((H=Z[H&q])>O&&--_!=0);return z<=d.lookahead?z:d.lookahead}function le(d){var H,P,v,_,S,z,K,O,Q,q,Z=d.w_size;do{if(_=d.window_size-d.lookahead-d.strstart,d.strstart>=Z+(Z-te)){for(s.arraySet(d.window,d.window,Z,Z,0),d.match_start-=Z,d.strstart-=Z,d.block_start-=Z,H=P=d.hash_size;v=d.head[--H],d.head[H]=Z<=v?v-Z:0,--P;);for(H=P=Z;v=d.prev[--H],d.prev[H]=Z<=v?v-Z:0,--P;);_+=Z}if(d.strm.avail_in===0)break;if(z=d.strm,K=d.window,O=d.strstart+d.lookahead,Q=_,q=void 0,q=z.avail_in,Q<q&&(q=Q),P=q===0?0:(z.avail_in-=q,s.arraySet(K,z.input,z.next_in,q,O),z.state.wrap===1?z.adler=c(z.adler,K,q,O):z.state.wrap===2&&(z.adler=h(z.adler,K,q,O)),z.next_in+=q,z.total_in+=q,q),d.lookahead+=P,d.lookahead+d.insert>=N)for(S=d.strstart-d.insert,d.ins_h=d.window[S],d.ins_h=(d.ins_h<<d.hash_shift^d.window[S+1])&d.hash_mask;d.insert&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[S+N-1])&d.hash_mask,d.prev[S&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=S,S++,d.insert--,!(d.lookahead+d.insert<N)););}while(d.lookahead<te&&d.strm.avail_in!==0)}function Ce(d,H){for(var P,v;;){if(d.lookahead<te){if(le(d),d.lookahead<te&&H===u)return g;if(d.lookahead===0)break}if(P=0,d.lookahead>=N&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+N-1])&d.hash_mask,P=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),P!==0&&d.strstart-P<=d.w_size-te&&(d.match_length=J(d,P)),d.match_length>=N)if(v=a._tr_tally(d,d.strstart-d.match_start,d.match_length-N),d.lookahead-=d.match_length,d.match_length<=d.max_lazy_match&&d.lookahead>=N){for(d.match_length--;d.strstart++,d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+N-1])&d.hash_mask,P=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart,--d.match_length!=0;);d.strstart++}else d.strstart+=d.match_length,d.match_length=0,d.ins_h=d.window[d.strstart],d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+1])&d.hash_mask;else v=a._tr_tally(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++;if(v&&(R(d,!1),d.strm.avail_out===0))return g}return d.insert=d.strstart<N-1?d.strstart:N-1,H===m?(R(d,!0),d.strm.avail_out===0?oe:G):d.last_lit&&(R(d,!1),d.strm.avail_out===0)?g:F}function ae(d,H){for(var P,v,_;;){if(d.lookahead<te){if(le(d),d.lookahead<te&&H===u)return g;if(d.lookahead===0)break}if(P=0,d.lookahead>=N&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+N-1])&d.hash_mask,P=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),d.prev_length=d.match_length,d.prev_match=d.match_start,d.match_length=N-1,P!==0&&d.prev_length<d.max_lazy_match&&d.strstart-P<=d.w_size-te&&(d.match_length=J(d,P),d.match_length<=5&&(d.strategy===1||d.match_length===N&&4096<d.strstart-d.match_start)&&(d.match_length=N-1)),d.prev_length>=N&&d.match_length<=d.prev_length){for(_=d.strstart+d.lookahead-N,v=a._tr_tally(d,d.strstart-1-d.prev_match,d.prev_length-N),d.lookahead-=d.prev_length-1,d.prev_length-=2;++d.strstart<=_&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+N-1])&d.hash_mask,P=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),--d.prev_length!=0;);if(d.match_available=0,d.match_length=N-1,d.strstart++,v&&(R(d,!1),d.strm.avail_out===0))return g}else if(d.match_available){if((v=a._tr_tally(d,0,d.window[d.strstart-1]))&&R(d,!1),d.strstart++,d.lookahead--,d.strm.avail_out===0)return g}else d.match_available=1,d.strstart++,d.lookahead--}return d.match_available&&(v=a._tr_tally(d,0,d.window[d.strstart-1]),d.match_available=0),d.insert=d.strstart<N-1?d.strstart:N-1,H===m?(R(d,!0),d.strm.avail_out===0?oe:G):d.last_lit&&(R(d,!1),d.strm.avail_out===0)?g:F}function he(d,H,P,v,_){this.good_length=d,this.max_lazy=H,this.nice_length=P,this.max_chain=v,this.func=_}function _e(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=I,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*x),this.dyn_dtree=new s.Buf16(2*(2*T+1)),this.bl_tree=new s.Buf16(2*(2*U+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16($+1),this.heap=new s.Buf16(2*k+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*k+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ie(d){var H;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=w,(H=d.state).pending=0,H.pending_out=0,H.wrap<0&&(H.wrap=-H.wrap),H.status=H.wrap?b:M,d.adler=H.wrap===2?0:1,H.last_flush=u,a._tr_init(H),f):se(d,y)}function Ze(d){var H=Ie(d);return H===f&&function(P){P.window_size=2*P.w_size,L(P.head),P.max_lazy_match=i[P.level].max_lazy,P.good_match=i[P.level].good_length,P.nice_match=i[P.level].nice_length,P.max_chain_length=i[P.level].max_chain,P.strstart=0,P.block_start=0,P.lookahead=0,P.insert=0,P.match_length=P.prev_length=N-1,P.match_available=0,P.ins_h=0}(d.state),H}function Be(d,H,P,v,_,S){if(!d)return y;var z=1;if(H===p&&(H=6),v<0?(z=0,v=-v):15<v&&(z=2,v-=16),_<1||A<_||P!==I||v<8||15<v||H<0||9<H||S<0||C<S)return se(d,y);v===8&&(v=9);var K=new _e;return(d.state=K).strm=d,K.wrap=z,K.gzhead=null,K.w_bits=v,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=_+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+N-1)/N),K.window=new s.Buf8(2*K.w_size),K.head=new s.Buf16(K.hash_size),K.prev=new s.Buf16(K.w_size),K.lit_bufsize=1<<_+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new s.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=H,K.strategy=S,K.method=P,Ze(d)}i=[new he(0,0,0,0,function(d,H){var P=65535;for(P>d.pending_buf_size-5&&(P=d.pending_buf_size-5);;){if(d.lookahead<=1){if(le(d),d.lookahead===0&&H===u)return g;if(d.lookahead===0)break}d.strstart+=d.lookahead,d.lookahead=0;var v=d.block_start+P;if((d.strstart===0||d.strstart>=v)&&(d.lookahead=d.strstart-v,d.strstart=v,R(d,!1),d.strm.avail_out===0)||d.strstart-d.block_start>=d.w_size-te&&(R(d,!1),d.strm.avail_out===0))return g}return d.insert=0,H===m?(R(d,!0),d.strm.avail_out===0?oe:G):(d.strstart>d.block_start&&(R(d,!1),d.strm.avail_out),g)}),new he(4,4,8,4,Ce),new he(4,5,16,8,Ce),new he(4,6,32,32,Ce),new he(4,4,16,16,ae),new he(8,16,32,32,ae),new he(8,16,128,128,ae),new he(8,32,128,256,ae),new he(32,128,258,1024,ae),new he(32,258,258,4096,ae)],r.deflateInit=function(d,H){return Be(d,H,I,15,8,0)},r.deflateInit2=Be,r.deflateReset=Ze,r.deflateResetKeep=Ie,r.deflateSetHeader=function(d,H){return d&&d.state?d.state.wrap!==2?y:(d.state.gzhead=H,f):y},r.deflate=function(d,H){var P,v,_,S;if(!d||!d.state||5<H||H<0)return d?se(d,y):y;if(v=d.state,!d.output||!d.input&&d.avail_in!==0||v.status===666&&H!==m)return se(d,d.avail_out===0?-5:y);if(v.strm=d,P=v.last_flush,v.last_flush=H,v.status===b)if(v.wrap===2)d.adler=0,ee(v,31),ee(v,139),ee(v,8),v.gzhead?(ee(v,(v.gzhead.text?1:0)+(v.gzhead.hcrc?2:0)+(v.gzhead.extra?4:0)+(v.gzhead.name?8:0)+(v.gzhead.comment?16:0)),ee(v,255&v.gzhead.time),ee(v,v.gzhead.time>>8&255),ee(v,v.gzhead.time>>16&255),ee(v,v.gzhead.time>>24&255),ee(v,v.level===9?2:2<=v.strategy||v.level<2?4:0),ee(v,255&v.gzhead.os),v.gzhead.extra&&v.gzhead.extra.length&&(ee(v,255&v.gzhead.extra.length),ee(v,v.gzhead.extra.length>>8&255)),v.gzhead.hcrc&&(d.adler=h(d.adler,v.pending_buf,v.pending,0)),v.gzindex=0,v.status=69):(ee(v,0),ee(v,0),ee(v,0),ee(v,0),ee(v,0),ee(v,v.level===9?2:2<=v.strategy||v.level<2?4:0),ee(v,3),v.status=M);else{var z=I+(v.w_bits-8<<4)<<8;z|=(2<=v.strategy||v.level<2?0:v.level<6?1:v.level===6?2:3)<<6,v.strstart!==0&&(z|=32),z+=31-z%31,v.status=M,Y(v,z),v.strstart!==0&&(Y(v,d.adler>>>16),Y(v,65535&d.adler)),d.adler=1}if(v.status===69)if(v.gzhead.extra){for(_=v.pending;v.gzindex<(65535&v.gzhead.extra.length)&&(v.pending!==v.pending_buf_size||(v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),E(d),_=v.pending,v.pending!==v.pending_buf_size));)ee(v,255&v.gzhead.extra[v.gzindex]),v.gzindex++;v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),v.gzindex===v.gzhead.extra.length&&(v.gzindex=0,v.status=73)}else v.status=73;if(v.status===73)if(v.gzhead.name){_=v.pending;do{if(v.pending===v.pending_buf_size&&(v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),E(d),_=v.pending,v.pending===v.pending_buf_size)){S=1;break}S=v.gzindex<v.gzhead.name.length?255&v.gzhead.name.charCodeAt(v.gzindex++):0,ee(v,S)}while(S!==0);v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),S===0&&(v.gzindex=0,v.status=91)}else v.status=91;if(v.status===91)if(v.gzhead.comment){_=v.pending;do{if(v.pending===v.pending_buf_size&&(v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),E(d),_=v.pending,v.pending===v.pending_buf_size)){S=1;break}S=v.gzindex<v.gzhead.comment.length?255&v.gzhead.comment.charCodeAt(v.gzindex++):0,ee(v,S)}while(S!==0);v.gzhead.hcrc&&v.pending>_&&(d.adler=h(d.adler,v.pending_buf,v.pending-_,_)),S===0&&(v.status=103)}else v.status=103;if(v.status===103&&(v.gzhead.hcrc?(v.pending+2>v.pending_buf_size&&E(d),v.pending+2<=v.pending_buf_size&&(ee(v,255&d.adler),ee(v,d.adler>>8&255),d.adler=0,v.status=M)):v.status=M),v.pending!==0){if(E(d),d.avail_out===0)return v.last_flush=-1,f}else if(d.avail_in===0&&W(H)<=W(P)&&H!==m)return se(d,-5);if(v.status===666&&d.avail_in!==0)return se(d,-5);if(d.avail_in!==0||v.lookahead!==0||H!==u&&v.status!==666){var K=v.strategy===2?function(O,Q){for(var q;;){if(O.lookahead===0&&(le(O),O.lookahead===0)){if(Q===u)return g;break}if(O.match_length=0,q=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,q&&(R(O,!1),O.strm.avail_out===0))return g}return O.insert=0,Q===m?(R(O,!0),O.strm.avail_out===0?oe:G):O.last_lit&&(R(O,!1),O.strm.avail_out===0)?g:F}(v,H):v.strategy===3?function(O,Q){for(var q,Z,re,ye,de=O.window;;){if(O.lookahead<=B){if(le(O),O.lookahead<=B&&Q===u)return g;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=N&&0<O.strstart&&(Z=de[re=O.strstart-1])===de[++re]&&Z===de[++re]&&Z===de[++re]){ye=O.strstart+B;do;while(Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&Z===de[++re]&&re<ye);O.match_length=B-(ye-re),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=N?(q=a._tr_tally(O,1,O.match_length-N),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(q=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),q&&(R(O,!1),O.strm.avail_out===0))return g}return O.insert=0,Q===m?(R(O,!0),O.strm.avail_out===0?oe:G):O.last_lit&&(R(O,!1),O.strm.avail_out===0)?g:F}(v,H):i[v.level].func(v,H);if(K!==oe&&K!==G||(v.status=666),K===g||K===oe)return d.avail_out===0&&(v.last_flush=-1),f;if(K===F&&(H===1?a._tr_align(v):H!==5&&(a._tr_stored_block(v,0,0,!1),H===3&&(L(v.head),v.lookahead===0&&(v.strstart=0,v.block_start=0,v.insert=0))),E(d),d.avail_out===0))return v.last_flush=-1,f}return H!==m?f:v.wrap<=0?1:(v.wrap===2?(ee(v,255&d.adler),ee(v,d.adler>>8&255),ee(v,d.adler>>16&255),ee(v,d.adler>>24&255),ee(v,255&d.total_in),ee(v,d.total_in>>8&255),ee(v,d.total_in>>16&255),ee(v,d.total_in>>24&255)):(Y(v,d.adler>>>16),Y(v,65535&d.adler)),E(d),0<v.wrap&&(v.wrap=-v.wrap),v.pending!==0?f:1)},r.deflateEnd=function(d){var H;return d&&d.state?(H=d.state.status)!==b&&H!==69&&H!==73&&H!==91&&H!==103&&H!==M&&H!==666?se(d,y):(d.state=null,H===M?se(d,-3):f):y},r.deflateSetDictionary=function(d,H){var P,v,_,S,z,K,O,Q,q=H.length;if(!d||!d.state||(S=(P=d.state).wrap)===2||S===1&&P.status!==b||P.lookahead)return y;for(S===1&&(d.adler=c(d.adler,H,q,0)),P.wrap=0,q>=P.w_size&&(S===0&&(L(P.head),P.strstart=0,P.block_start=0,P.insert=0),Q=new s.Buf8(P.w_size),s.arraySet(Q,H,q-P.w_size,P.w_size,0),H=Q,q=P.w_size),z=d.avail_in,K=d.next_in,O=d.input,d.avail_in=q,d.next_in=0,d.input=H,le(P);P.lookahead>=N;){for(v=P.strstart,_=P.lookahead-(N-1);P.ins_h=(P.ins_h<<P.hash_shift^P.window[v+N-1])&P.hash_mask,P.prev[v&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=v,v++,--_;);P.strstart=v,P.lookahead=N-1,le(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=N-1,P.match_available=0,d.next_in=K,d.input=O,d.avail_in=z,P.wrap=S,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,r){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,r){n.exports=function(i,s){var a,c,h,l,u,m,f,y,p,C,w,I,A,k,T,U,x,$,N,B,te,b,M,g,F;a=i.state,c=i.next_in,g=i.input,h=c+(i.avail_in-5),l=i.next_out,F=i.output,u=l-(s-i.avail_out),m=l+(i.avail_out-257),f=a.dmax,y=a.wsize,p=a.whave,C=a.wnext,w=a.window,I=a.hold,A=a.bits,k=a.lencode,T=a.distcode,U=(1<<a.lenbits)-1,x=(1<<a.distbits)-1;e:do{A<15&&(I+=g[c++]<<A,A+=8,I+=g[c++]<<A,A+=8),$=k[I&U];t:for(;;){if(I>>>=N=$>>>24,A-=N,(N=$>>>16&255)===0)F[l++]=65535&$;else{if(!(16&N)){if(!(64&N)){$=k[(65535&$)+(I&(1<<N)-1)];continue t}if(32&N){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}B=65535&$,(N&=15)&&(A<N&&(I+=g[c++]<<A,A+=8),B+=I&(1<<N)-1,I>>>=N,A-=N),A<15&&(I+=g[c++]<<A,A+=8,I+=g[c++]<<A,A+=8),$=T[I&x];n:for(;;){if(I>>>=N=$>>>24,A-=N,!(16&(N=$>>>16&255))){if(!(64&N)){$=T[(65535&$)+(I&(1<<N)-1)];continue n}i.msg="invalid distance code",a.mode=30;break e}if(te=65535&$,A<(N&=15)&&(I+=g[c++]<<A,(A+=8)<N&&(I+=g[c++]<<A,A+=8)),f<(te+=I&(1<<N)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(I>>>=N,A-=N,(N=l-u)<te){if(p<(N=te-N)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(M=w,(b=0)===C){if(b+=y-N,N<B){for(B-=N;F[l++]=w[b++],--N;);b=l-te,M=F}}else if(C<N){if(b+=y+C-N,(N-=C)<B){for(B-=N;F[l++]=w[b++],--N;);if(b=0,C<B){for(B-=N=C;F[l++]=w[b++],--N;);b=l-te,M=F}}}else if(b+=C-N,N<B){for(B-=N;F[l++]=w[b++],--N;);b=l-te,M=F}for(;2<B;)F[l++]=M[b++],F[l++]=M[b++],F[l++]=M[b++],B-=3;B&&(F[l++]=M[b++],1<B&&(F[l++]=M[b++]))}else{for(b=l-te;F[l++]=F[b++],F[l++]=F[b++],F[l++]=F[b++],2<(B-=3););B&&(F[l++]=F[b++],1<B&&(F[l++]=F[b++]))}break}}break}}while(c<h&&l<m);c-=B=A>>3,I&=(1<<(A-=B<<3))-1,i.next_in=c,i.next_out=l,i.avail_in=c<h?h-c+5:5-(c-h),i.avail_out=l<m?m-l+257:257-(l-m),a.hold=I,a.bits=A}},{}],49:[function(t,n,r){var i=t("../utils/common"),s=t("./adler32"),a=t("./crc32"),c=t("./inffast"),h=t("./inftrees"),l=1,u=2,m=0,f=-2,y=1,p=852,C=592;function w(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function A(b){var M;return b&&b.state?(M=b.state,b.total_in=b.total_out=M.total=0,b.msg="",M.wrap&&(b.adler=1&M.wrap),M.mode=y,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new i.Buf32(p),M.distcode=M.distdyn=new i.Buf32(C),M.sane=1,M.back=-1,m):f}function k(b){var M;return b&&b.state?((M=b.state).wsize=0,M.whave=0,M.wnext=0,A(b)):f}function T(b,M){var g,F;return b&&b.state?(F=b.state,M<0?(g=0,M=-M):(g=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?f:(F.window!==null&&F.wbits!==M&&(F.window=null),F.wrap=g,F.wbits=M,k(b))):f}function U(b,M){var g,F;return b?(F=new I,(b.state=F).window=null,(g=T(b,M))!==m&&(b.state=null),g):f}var x,$,N=!0;function B(b){if(N){var M;for(x=new i.Buf32(512),$=new i.Buf32(32),M=0;M<144;)b.lens[M++]=8;for(;M<256;)b.lens[M++]=9;for(;M<280;)b.lens[M++]=7;for(;M<288;)b.lens[M++]=8;for(h(l,b.lens,0,288,x,0,b.work,{bits:9}),M=0;M<32;)b.lens[M++]=5;h(u,b.lens,0,32,$,0,b.work,{bits:5}),N=!1}b.lencode=x,b.lenbits=9,b.distcode=$,b.distbits=5}function te(b,M,g,F){var oe,G=b.state;return G.window===null&&(G.wsize=1<<G.wbits,G.wnext=0,G.whave=0,G.window=new i.Buf8(G.wsize)),F>=G.wsize?(i.arraySet(G.window,M,g-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(F<(oe=G.wsize-G.wnext)&&(oe=F),i.arraySet(G.window,M,g-F,oe,G.wnext),(F-=oe)?(i.arraySet(G.window,M,g-F,F,0),G.wnext=F,G.whave=G.wsize):(G.wnext+=oe,G.wnext===G.wsize&&(G.wnext=0),G.whave<G.wsize&&(G.whave+=oe))),0}r.inflateReset=k,r.inflateReset2=T,r.inflateResetKeep=A,r.inflateInit=function(b){return U(b,15)},r.inflateInit2=U,r.inflate=function(b,M){var g,F,oe,G,se,W,L,E,R,ee,Y,J,le,Ce,ae,he,_e,Ie,Ze,Be,d,H,P,v,_=0,S=new i.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&b.avail_in!==0)return f;(g=b.state).mode===12&&(g.mode=13),se=b.next_out,oe=b.output,L=b.avail_out,G=b.next_in,F=b.input,W=b.avail_in,E=g.hold,R=g.bits,ee=W,Y=L,H=m;e:for(;;)switch(g.mode){case y:if(g.wrap===0){g.mode=13;break}for(;R<16;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(2&g.wrap&&E===35615){S[g.check=0]=255&E,S[1]=E>>>8&255,g.check=a(g.check,S,2,0),R=E=0,g.mode=2;break}if(g.flags=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&E)<<8)+(E>>8))%31){b.msg="incorrect header check",g.mode=30;break}if((15&E)!=8){b.msg="unknown compression method",g.mode=30;break}if(R-=4,d=8+(15&(E>>>=4)),g.wbits===0)g.wbits=d;else if(d>g.wbits){b.msg="invalid window size",g.mode=30;break}g.dmax=1<<d,b.adler=g.check=1,g.mode=512&E?10:12,R=E=0;break;case 2:for(;R<16;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(g.flags=E,(255&g.flags)!=8){b.msg="unknown compression method",g.mode=30;break}if(57344&g.flags){b.msg="unknown header flags set",g.mode=30;break}g.head&&(g.head.text=E>>8&1),512&g.flags&&(S[0]=255&E,S[1]=E>>>8&255,g.check=a(g.check,S,2,0)),R=E=0,g.mode=3;case 3:for(;R<32;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.head&&(g.head.time=E),512&g.flags&&(S[0]=255&E,S[1]=E>>>8&255,S[2]=E>>>16&255,S[3]=E>>>24&255,g.check=a(g.check,S,4,0)),R=E=0,g.mode=4;case 4:for(;R<16;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.head&&(g.head.xflags=255&E,g.head.os=E>>8),512&g.flags&&(S[0]=255&E,S[1]=E>>>8&255,g.check=a(g.check,S,2,0)),R=E=0,g.mode=5;case 5:if(1024&g.flags){for(;R<16;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.length=E,g.head&&(g.head.extra_len=E),512&g.flags&&(S[0]=255&E,S[1]=E>>>8&255,g.check=a(g.check,S,2,0)),R=E=0}else g.head&&(g.head.extra=null);g.mode=6;case 6:if(1024&g.flags&&(W<(J=g.length)&&(J=W),J&&(g.head&&(d=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Array(g.head.extra_len)),i.arraySet(g.head.extra,F,G,J,d)),512&g.flags&&(g.check=a(g.check,F,J,G)),W-=J,G+=J,g.length-=J),g.length))break e;g.length=0,g.mode=7;case 7:if(2048&g.flags){if(W===0)break e;for(J=0;d=F[G+J++],g.head&&d&&g.length<65536&&(g.head.name+=String.fromCharCode(d)),d&&J<W;);if(512&g.flags&&(g.check=a(g.check,F,J,G)),W-=J,G+=J,d)break e}else g.head&&(g.head.name=null);g.length=0,g.mode=8;case 8:if(4096&g.flags){if(W===0)break e;for(J=0;d=F[G+J++],g.head&&d&&g.length<65536&&(g.head.comment+=String.fromCharCode(d)),d&&J<W;);if(512&g.flags&&(g.check=a(g.check,F,J,G)),W-=J,G+=J,d)break e}else g.head&&(g.head.comment=null);g.mode=9;case 9:if(512&g.flags){for(;R<16;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(E!==(65535&g.check)){b.msg="header crc mismatch",g.mode=30;break}R=E=0}g.head&&(g.head.hcrc=g.flags>>9&1,g.head.done=!0),b.adler=g.check=0,g.mode=12;break;case 10:for(;R<32;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}b.adler=g.check=w(E),R=E=0,g.mode=11;case 11:if(g.havedict===0)return b.next_out=se,b.avail_out=L,b.next_in=G,b.avail_in=W,g.hold=E,g.bits=R,2;b.adler=g.check=1,g.mode=12;case 12:if(M===5||M===6)break e;case 13:if(g.last){E>>>=7&R,R-=7&R,g.mode=27;break}for(;R<3;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}switch(g.last=1&E,R-=1,3&(E>>>=1)){case 0:g.mode=14;break;case 1:if(B(g),g.mode=20,M!==6)break;E>>>=2,R-=2;break e;case 2:g.mode=17;break;case 3:b.msg="invalid block type",g.mode=30}E>>>=2,R-=2;break;case 14:for(E>>>=7&R,R-=7&R;R<32;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if((65535&E)!=(E>>>16^65535)){b.msg="invalid stored block lengths",g.mode=30;break}if(g.length=65535&E,R=E=0,g.mode=15,M===6)break e;case 15:g.mode=16;case 16:if(J=g.length){if(W<J&&(J=W),L<J&&(J=L),J===0)break e;i.arraySet(oe,F,G,J,se),W-=J,G+=J,L-=J,se+=J,g.length-=J;break}g.mode=12;break;case 17:for(;R<14;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(g.nlen=257+(31&E),E>>>=5,R-=5,g.ndist=1+(31&E),E>>>=5,R-=5,g.ncode=4+(15&E),E>>>=4,R-=4,286<g.nlen||30<g.ndist){b.msg="too many length or distance symbols",g.mode=30;break}g.have=0,g.mode=18;case 18:for(;g.have<g.ncode;){for(;R<3;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.lens[z[g.have++]]=7&E,E>>>=3,R-=3}for(;g.have<19;)g.lens[z[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,P={bits:g.lenbits},H=h(0,g.lens,0,19,g.lencode,0,g.work,P),g.lenbits=P.bits,H){b.msg="invalid code lengths set",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have<g.nlen+g.ndist;){for(;he=(_=g.lencode[E&(1<<g.lenbits)-1])>>>16&255,_e=65535&_,!((ae=_>>>24)<=R);){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(_e<16)E>>>=ae,R-=ae,g.lens[g.have++]=_e;else{if(_e===16){for(v=ae+2;R<v;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(E>>>=ae,R-=ae,g.have===0){b.msg="invalid bit length repeat",g.mode=30;break}d=g.lens[g.have-1],J=3+(3&E),E>>>=2,R-=2}else if(_e===17){for(v=ae+3;R<v;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}R-=ae,d=0,J=3+(7&(E>>>=ae)),E>>>=3,R-=3}else{for(v=ae+7;R<v;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}R-=ae,d=0,J=11+(127&(E>>>=ae)),E>>>=7,R-=7}if(g.have+J>g.nlen+g.ndist){b.msg="invalid bit length repeat",g.mode=30;break}for(;J--;)g.lens[g.have++]=d}}if(g.mode===30)break;if(g.lens[256]===0){b.msg="invalid code -- missing end-of-block",g.mode=30;break}if(g.lenbits=9,P={bits:g.lenbits},H=h(l,g.lens,0,g.nlen,g.lencode,0,g.work,P),g.lenbits=P.bits,H){b.msg="invalid literal/lengths set",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,P={bits:g.distbits},H=h(u,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,P),g.distbits=P.bits,H){b.msg="invalid distances set",g.mode=30;break}if(g.mode=20,M===6)break e;case 20:g.mode=21;case 21:if(6<=W&&258<=L){b.next_out=se,b.avail_out=L,b.next_in=G,b.avail_in=W,g.hold=E,g.bits=R,c(b,Y),se=b.next_out,oe=b.output,L=b.avail_out,G=b.next_in,F=b.input,W=b.avail_in,E=g.hold,R=g.bits,g.mode===12&&(g.back=-1);break}for(g.back=0;he=(_=g.lencode[E&(1<<g.lenbits)-1])>>>16&255,_e=65535&_,!((ae=_>>>24)<=R);){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(he&&!(240&he)){for(Ie=ae,Ze=he,Be=_e;he=(_=g.lencode[Be+((E&(1<<Ie+Ze)-1)>>Ie)])>>>16&255,_e=65535&_,!(Ie+(ae=_>>>24)<=R);){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}E>>>=Ie,R-=Ie,g.back+=Ie}if(E>>>=ae,R-=ae,g.back+=ae,g.length=_e,he===0){g.mode=26;break}if(32&he){g.back=-1,g.mode=12;break}if(64&he){b.msg="invalid literal/length code",g.mode=30;break}g.extra=15&he,g.mode=22;case 22:if(g.extra){for(v=g.extra;R<v;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.length+=E&(1<<g.extra)-1,E>>>=g.extra,R-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;he=(_=g.distcode[E&(1<<g.distbits)-1])>>>16&255,_e=65535&_,!((ae=_>>>24)<=R);){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(!(240&he)){for(Ie=ae,Ze=he,Be=_e;he=(_=g.distcode[Be+((E&(1<<Ie+Ze)-1)>>Ie)])>>>16&255,_e=65535&_,!(Ie+(ae=_>>>24)<=R);){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}E>>>=Ie,R-=Ie,g.back+=Ie}if(E>>>=ae,R-=ae,g.back+=ae,64&he){b.msg="invalid distance code",g.mode=30;break}g.offset=_e,g.extra=15&he,g.mode=24;case 24:if(g.extra){for(v=g.extra;R<v;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}g.offset+=E&(1<<g.extra)-1,E>>>=g.extra,R-=g.extra,g.back+=g.extra}if(g.offset>g.dmax){b.msg="invalid distance too far back",g.mode=30;break}g.mode=25;case 25:if(L===0)break e;if(J=Y-L,g.offset>J){if((J=g.offset-J)>g.whave&&g.sane){b.msg="invalid distance too far back",g.mode=30;break}le=J>g.wnext?(J-=g.wnext,g.wsize-J):g.wnext-J,J>g.length&&(J=g.length),Ce=g.window}else Ce=oe,le=se-g.offset,J=g.length;for(L<J&&(J=L),L-=J,g.length-=J;oe[se++]=Ce[le++],--J;);g.length===0&&(g.mode=21);break;case 26:if(L===0)break e;oe[se++]=g.length,L--,g.mode=21;break;case 27:if(g.wrap){for(;R<32;){if(W===0)break e;W--,E|=F[G++]<<R,R+=8}if(Y-=L,b.total_out+=Y,g.total+=Y,Y&&(b.adler=g.check=g.flags?a(g.check,oe,Y,se-Y):s(g.check,oe,Y,se-Y)),Y=L,(g.flags?E:w(E))!==g.check){b.msg="incorrect data check",g.mode=30;break}R=E=0}g.mode=28;case 28:if(g.wrap&&g.flags){for(;R<32;){if(W===0)break e;W--,E+=F[G++]<<R,R+=8}if(E!==(4294967295&g.total)){b.msg="incorrect length check",g.mode=30;break}R=E=0}g.mode=29;case 29:H=1;break e;case 30:H=-3;break e;case 31:return-4;case 32:default:return f}return b.next_out=se,b.avail_out=L,b.next_in=G,b.avail_in=W,g.hold=E,g.bits=R,(g.wsize||Y!==b.avail_out&&g.mode<30&&(g.mode<27||M!==4))&&te(b,b.output,b.next_out,Y-b.avail_out)?(g.mode=31,-4):(ee-=b.avail_in,Y-=b.avail_out,b.total_in+=ee,b.total_out+=Y,g.total+=Y,g.wrap&&Y&&(b.adler=g.check=g.flags?a(g.check,oe,Y,b.next_out-Y):s(g.check,oe,Y,b.next_out-Y)),b.data_type=g.bits+(g.last?64:0)+(g.mode===12?128:0)+(g.mode===20||g.mode===15?256:0),(ee==0&&Y===0||M===4)&&H===m&&(H=-5),H)},r.inflateEnd=function(b){if(!b||!b.state)return f;var M=b.state;return M.window&&(M.window=null),b.state=null,m},r.inflateGetHeader=function(b,M){var g;return b&&b.state&&2&(g=b.state).wrap?((g.head=M).done=!1,m):f},r.inflateSetDictionary=function(b,M){var g,F=M.length;return b&&b.state?(g=b.state).wrap!==0&&g.mode!==11?f:g.mode===11&&s(1,M,F,0)!==g.check?-3:te(b,M,F,F)?(g.mode=31,-4):(g.havedict=1,m):f},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,r){var i=t("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(l,u,m,f,y,p,C,w){var I,A,k,T,U,x,$,N,B,te=w.bits,b=0,M=0,g=0,F=0,oe=0,G=0,se=0,W=0,L=0,E=0,R=null,ee=0,Y=new i.Buf16(16),J=new i.Buf16(16),le=null,Ce=0;for(b=0;b<=15;b++)Y[b]=0;for(M=0;M<f;M++)Y[u[m+M]]++;for(oe=te,F=15;1<=F&&Y[F]===0;F--);if(F<oe&&(oe=F),F===0)return y[p++]=20971520,y[p++]=20971520,w.bits=1,0;for(g=1;g<F&&Y[g]===0;g++);for(oe<g&&(oe=g),b=W=1;b<=15;b++)if(W<<=1,(W-=Y[b])<0)return-1;if(0<W&&(l===0||F!==1))return-1;for(J[1]=0,b=1;b<15;b++)J[b+1]=J[b]+Y[b];for(M=0;M<f;M++)u[m+M]!==0&&(C[J[u[m+M]]++]=M);if(x=l===0?(R=le=C,19):l===1?(R=s,ee-=257,le=a,Ce-=257,256):(R=c,le=h,-1),b=g,U=p,se=M=E=0,k=-1,T=(L=1<<(G=oe))-1,l===1&&852<L||l===2&&592<L)return 1;for(;;){for($=b-se,B=C[M]<x?(N=0,C[M]):C[M]>x?(N=le[Ce+C[M]],R[ee+C[M]]):(N=96,0),I=1<<b-se,g=A=1<<G;y[U+(E>>se)+(A-=I)]=$<<24|N<<16|B|0,A!==0;);for(I=1<<b-1;E&I;)I>>=1;if(I!==0?(E&=I-1,E+=I):E=0,M++,--Y[b]==0){if(b===F)break;b=u[m+C[M]]}if(oe<b&&(E&T)!==k){for(se===0&&(se=oe),U+=g,W=1<<(G=b-se);G+se<F&&!((W-=Y[G+se])<=0);)G++,W<<=1;if(L+=1<<G,l===1&&852<L||l===2&&592<L)return 1;y[k=E&T]=oe<<24|G<<16|U-p|0}}return E!==0&&(y[U+E]=b-se<<24|64<<16|0),w.bits=oe,0}},{"../utils/common":41}],51:[function(t,n,r){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,r){var i=t("../utils/common"),s=0,a=1;function c(_){for(var S=_.length;0<=--S;)_[S]=0}var h=0,l=29,u=256,m=u+1+l,f=30,y=19,p=2*m+1,C=15,w=16,I=7,A=256,k=16,T=17,U=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],te=new Array(2*(m+2));c(te);var b=new Array(2*f);c(b);var M=new Array(512);c(M);var g=new Array(256);c(g);var F=new Array(l);c(F);var oe,G,se,W=new Array(f);function L(_,S,z,K,O){this.static_tree=_,this.extra_bits=S,this.extra_base=z,this.elems=K,this.max_length=O,this.has_stree=_&&_.length}function E(_,S){this.dyn_tree=_,this.max_code=0,this.stat_desc=S}function R(_){return _<256?M[_]:M[256+(_>>>7)]}function ee(_,S){_.pending_buf[_.pending++]=255&S,_.pending_buf[_.pending++]=S>>>8&255}function Y(_,S,z){_.bi_valid>w-z?(_.bi_buf|=S<<_.bi_valid&65535,ee(_,_.bi_buf),_.bi_buf=S>>w-_.bi_valid,_.bi_valid+=z-w):(_.bi_buf|=S<<_.bi_valid&65535,_.bi_valid+=z)}function J(_,S,z){Y(_,z[2*S],z[2*S+1])}function le(_,S){for(var z=0;z|=1&_,_>>>=1,z<<=1,0<--S;);return z>>>1}function Ce(_,S,z){var K,O,Q=new Array(C+1),q=0;for(K=1;K<=C;K++)Q[K]=q=q+z[K-1]<<1;for(O=0;O<=S;O++){var Z=_[2*O+1];Z!==0&&(_[2*O]=le(Q[Z]++,Z))}}function ae(_){var S;for(S=0;S<m;S++)_.dyn_ltree[2*S]=0;for(S=0;S<f;S++)_.dyn_dtree[2*S]=0;for(S=0;S<y;S++)_.bl_tree[2*S]=0;_.dyn_ltree[2*A]=1,_.opt_len=_.static_len=0,_.last_lit=_.matches=0}function he(_){8<_.bi_valid?ee(_,_.bi_buf):0<_.bi_valid&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function _e(_,S,z,K){var O=2*S,Q=2*z;return _[O]<_[Q]||_[O]===_[Q]&&K[S]<=K[z]}function Ie(_,S,z){for(var K=_.heap[z],O=z<<1;O<=_.heap_len&&(O<_.heap_len&&_e(S,_.heap[O+1],_.heap[O],_.depth)&&O++,!_e(S,K,_.heap[O],_.depth));)_.heap[z]=_.heap[O],z=O,O<<=1;_.heap[z]=K}function Ze(_,S,z){var K,O,Q,q,Z=0;if(_.last_lit!==0)for(;K=_.pending_buf[_.d_buf+2*Z]<<8|_.pending_buf[_.d_buf+2*Z+1],O=_.pending_buf[_.l_buf+Z],Z++,K===0?J(_,O,S):(J(_,(Q=g[O])+u+1,S),(q=x[Q])!==0&&Y(_,O-=F[Q],q),J(_,Q=R(--K),z),(q=$[Q])!==0&&Y(_,K-=W[Q],q)),Z<_.last_lit;);J(_,A,S)}function Be(_,S){var z,K,O,Q=S.dyn_tree,q=S.stat_desc.static_tree,Z=S.stat_desc.has_stree,re=S.stat_desc.elems,ye=-1;for(_.heap_len=0,_.heap_max=p,z=0;z<re;z++)Q[2*z]!==0?(_.heap[++_.heap_len]=ye=z,_.depth[z]=0):Q[2*z+1]=0;for(;_.heap_len<2;)Q[2*(O=_.heap[++_.heap_len]=ye<2?++ye:0)]=1,_.depth[O]=0,_.opt_len--,Z&&(_.static_len-=q[2*O+1]);for(S.max_code=ye,z=_.heap_len>>1;1<=z;z--)Ie(_,Q,z);for(O=re;z=_.heap[1],_.heap[1]=_.heap[_.heap_len--],Ie(_,Q,1),K=_.heap[1],_.heap[--_.heap_max]=z,_.heap[--_.heap_max]=K,Q[2*O]=Q[2*z]+Q[2*K],_.depth[O]=(_.depth[z]>=_.depth[K]?_.depth[z]:_.depth[K])+1,Q[2*z+1]=Q[2*K+1]=O,_.heap[1]=O++,Ie(_,Q,1),2<=_.heap_len;);_.heap[--_.heap_max]=_.heap[1],function(de,Fe){var Qt,Ye,Zt,ve,Tn,Cr,it=Fe.dyn_tree,no=Fe.max_code,tc=Fe.stat_desc.static_tree,nc=Fe.stat_desc.has_stree,rc=Fe.stat_desc.extra_bits,ro=Fe.stat_desc.extra_base,Yt=Fe.stat_desc.max_length,Sn=0;for(ve=0;ve<=C;ve++)de.bl_count[ve]=0;for(it[2*de.heap[de.heap_max]+1]=0,Qt=de.heap_max+1;Qt<p;Qt++)Yt<(ve=it[2*it[2*(Ye=de.heap[Qt])+1]+1]+1)&&(ve=Yt,Sn++),it[2*Ye+1]=ve,no<Ye||(de.bl_count[ve]++,Tn=0,ro<=Ye&&(Tn=rc[Ye-ro]),Cr=it[2*Ye],de.opt_len+=Cr*(ve+Tn),nc&&(de.static_len+=Cr*(tc[2*Ye+1]+Tn)));if(Sn!==0){do{for(ve=Yt-1;de.bl_count[ve]===0;)ve--;de.bl_count[ve]--,de.bl_count[ve+1]+=2,de.bl_count[Yt]--,Sn-=2}while(0<Sn);for(ve=Yt;ve!==0;ve--)for(Ye=de.bl_count[ve];Ye!==0;)no<(Zt=de.heap[--Qt])||(it[2*Zt+1]!==ve&&(de.opt_len+=(ve-it[2*Zt+1])*it[2*Zt],it[2*Zt+1]=ve),Ye--)}}(_,S),Ce(Q,ye,_.bl_count)}function d(_,S,z){var K,O,Q=-1,q=S[1],Z=0,re=7,ye=4;for(q===0&&(re=138,ye=3),S[2*(z+1)+1]=65535,K=0;K<=z;K++)O=q,q=S[2*(K+1)+1],++Z<re&&O===q||(Z<ye?_.bl_tree[2*O]+=Z:O!==0?(O!==Q&&_.bl_tree[2*O]++,_.bl_tree[2*k]++):Z<=10?_.bl_tree[2*T]++:_.bl_tree[2*U]++,Q=O,ye=(Z=0)===q?(re=138,3):O===q?(re=6,3):(re=7,4))}function H(_,S,z){var K,O,Q=-1,q=S[1],Z=0,re=7,ye=4;for(q===0&&(re=138,ye=3),K=0;K<=z;K++)if(O=q,q=S[2*(K+1)+1],!(++Z<re&&O===q)){if(Z<ye)for(;J(_,O,_.bl_tree),--Z!=0;);else O!==0?(O!==Q&&(J(_,O,_.bl_tree),Z--),J(_,k,_.bl_tree),Y(_,Z-3,2)):Z<=10?(J(_,T,_.bl_tree),Y(_,Z-3,3)):(J(_,U,_.bl_tree),Y(_,Z-11,7));Q=O,ye=(Z=0)===q?(re=138,3):O===q?(re=6,3):(re=7,4)}}c(W);var P=!1;function v(_,S,z,K){Y(_,(h<<1)+(K?1:0),3),function(O,Q,q,Z){he(O),ee(O,q),ee(O,~q),i.arraySet(O.pending_buf,O.window,Q,q,O.pending),O.pending+=q}(_,S,z)}r._tr_init=function(_){P||(function(){var S,z,K,O,Q,q=new Array(C+1);for(O=K=0;O<l-1;O++)for(F[O]=K,S=0;S<1<<x[O];S++)g[K++]=O;for(g[K-1]=O,O=Q=0;O<16;O++)for(W[O]=Q,S=0;S<1<<$[O];S++)M[Q++]=O;for(Q>>=7;O<f;O++)for(W[O]=Q<<7,S=0;S<1<<$[O]-7;S++)M[256+Q++]=O;for(z=0;z<=C;z++)q[z]=0;for(S=0;S<=143;)te[2*S+1]=8,S++,q[8]++;for(;S<=255;)te[2*S+1]=9,S++,q[9]++;for(;S<=279;)te[2*S+1]=7,S++,q[7]++;for(;S<=287;)te[2*S+1]=8,S++,q[8]++;for(Ce(te,m+1,q),S=0;S<f;S++)b[2*S+1]=5,b[2*S]=le(S,5);oe=new L(te,x,u+1,m,C),G=new L(b,$,0,f,C),se=new L(new Array(0),N,0,y,I)}(),P=!0),_.l_desc=new E(_.dyn_ltree,oe),_.d_desc=new E(_.dyn_dtree,G),_.bl_desc=new E(_.bl_tree,se),_.bi_buf=0,_.bi_valid=0,ae(_)},r._tr_stored_block=v,r._tr_flush_block=function(_,S,z,K){var O,Q,q=0;0<_.level?(_.strm.data_type===2&&(_.strm.data_type=function(Z){var re,ye=4093624447;for(re=0;re<=31;re++,ye>>>=1)if(1&ye&&Z.dyn_ltree[2*re]!==0)return s;if(Z.dyn_ltree[18]!==0||Z.dyn_ltree[20]!==0||Z.dyn_ltree[26]!==0)return a;for(re=32;re<u;re++)if(Z.dyn_ltree[2*re]!==0)return a;return s}(_)),Be(_,_.l_desc),Be(_,_.d_desc),q=function(Z){var re;for(d(Z,Z.dyn_ltree,Z.l_desc.max_code),d(Z,Z.dyn_dtree,Z.d_desc.max_code),Be(Z,Z.bl_desc),re=y-1;3<=re&&Z.bl_tree[2*B[re]+1]===0;re--);return Z.opt_len+=3*(re+1)+5+5+4,re}(_),O=_.opt_len+3+7>>>3,(Q=_.static_len+3+7>>>3)<=O&&(O=Q)):O=Q=z+5,z+4<=O&&S!==-1?v(_,S,z,K):_.strategy===4||Q===O?(Y(_,2+(K?1:0),3),Ze(_,te,b)):(Y(_,4+(K?1:0),3),function(Z,re,ye,de){var Fe;for(Y(Z,re-257,5),Y(Z,ye-1,5),Y(Z,de-4,4),Fe=0;Fe<de;Fe++)Y(Z,Z.bl_tree[2*B[Fe]+1],3);H(Z,Z.dyn_ltree,re-1),H(Z,Z.dyn_dtree,ye-1)}(_,_.l_desc.max_code+1,_.d_desc.max_code+1,q+1),Ze(_,_.dyn_ltree,_.dyn_dtree)),ae(_),K&&he(_)},r._tr_tally=function(_,S,z){return _.pending_buf[_.d_buf+2*_.last_lit]=S>>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&S,_.pending_buf[_.l_buf+_.last_lit]=255&z,_.last_lit++,S===0?_.dyn_ltree[2*z]++:(_.matches++,S--,_.dyn_ltree[2*(g[z]+u+1)]++,_.dyn_dtree[2*R(S)]++),_.last_lit===_.lit_bufsize-1},r._tr_align=function(_){Y(_,2,3),J(_,A,te),function(S){S.bi_valid===16?(ee(S,S.bi_buf),S.bi_buf=0,S.bi_valid=0):8<=S.bi_valid&&(S.pending_buf[S.pending++]=255&S.bi_buf,S.bi_buf>>=8,S.bi_valid-=8)}(_)}},{"../utils/common":41}],53:[function(t,n,r){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,r){(function(i){(function(s,a){if(!s.setImmediate){var c,h,l,u,m=1,f={},y=!1,p=s.document,C=Object.getPrototypeOf&&Object.getPrototypeOf(s);C=C&&C.setTimeout?C:s,c={}.toString.call(s.process)==="[object process]"?function(k){process.nextTick(function(){I(k)})}:function(){if(s.postMessage&&!s.importScripts){var k=!0,T=s.onmessage;return s.onmessage=function(){k=!1},s.postMessage("","*"),s.onmessage=T,k}}()?(u="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",A,!1):s.attachEvent("onmessage",A),function(k){s.postMessage(u+k,"*")}):s.MessageChannel?((l=new MessageChannel).port1.onmessage=function(k){I(k.data)},function(k){l.port2.postMessage(k)}):p&&"onreadystatechange"in p.createElement("script")?(h=p.documentElement,function(k){var T=p.createElement("script");T.onreadystatechange=function(){I(k),T.onreadystatechange=null,h.removeChild(T),T=null},h.appendChild(T)}):function(k){setTimeout(I,0,k)},C.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var T=new Array(arguments.length-1),U=0;U<T.length;U++)T[U]=arguments[U+1];var x={callback:k,args:T};return f[m]=x,c(m),m++},C.clearImmediate=w}function w(k){delete f[k]}function I(k){if(y)setTimeout(I,0,k);else{var T=f[k];if(T){y=!0;try{(function(U){var x=U.callback,$=U.args;switch($.length){case 0:x();break;case 1:x($[0]);break;case 2:x($[0],$[1]);break;case 3:x($[0],$[1],$[2]);break;default:x.apply(a,$)}})(T)}finally{w(k),y=!1}}}}
12function A(k){k.source===s&&typeof k.data=="string"&&k.data.indexOf(u)===0&&I(+k.data.slice(u.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof kn<"u"?kn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(qa);var Jg=qa.exports;const Qg=ic(Jg);async function Zg(o){const e=await Qg.loadAsync(o),t=e.file(/IntuneWinPackage\/Metadata\/Detection\.xml$/i)[0];if(!t)throw new Error("Invalid .intunewin: Detection.xml not found.");const n=await t.async("string"),r=e.file(/IntuneWinPackage\/Contents\/IntunePackage\.intunewin$/i)[0];if(!r)throw new Error("Invalid .intunewin: encrypted payload not found.");const i=await r.async("uint8array"),s=new DOMParser().parseFromString(n,"application/xml");if(s.querySelector("parsererror"))throw new Error("Invalid .intunewin: Detection.xml could not be parsed.");const c=(A,k=!0)=>{const T=s.querySelector(A);if(!T||!T.textContent){if(k)throw new Error(`Invalid .intunewin: Detection.xml missing <${A}>.`);return""}return T.textContent.trim()},h=c("ApplicationInfo > SetupFile"),l=parseInt(c("ApplicationInfo > UnencryptedContentSize"),10),u="ApplicationInfo > EncryptionInfo",m=c(`${u} > EncryptionKey`),f=c(`${u} > MacKey`),y=c(`${u} > InitializationVector`),p=c(`${u} > Mac`),C=c(`${u} > ProfileIdentifier`),w=c(`${u} > FileDigest`),I=c(`${u} > FileDigestAlgorithm`);return{setupFile:h,encryptedSize:i.byteLength,unencryptedSize:l,encryptionKey:m,macKey:f,mac:p,initializationVector:y,profileIdentifier:C,fileDigest:w,fileDigestAlgorithm:I,encryptedBlob:i}}function Yg(o){const e=o.match(/^CLASSSIGHTAgent-(\d+\.\d+\.\d+)\.intunewin$/i);if(!e)throw new Error(`Cannot parse version from '${o}'. Expected 'CLASSSIGHTAgent-X.Y.Z.intunewin' (don't rename build artifacts).`);return e[1]}const Xg="https://graph.microsoft.com/beta",qg=2e3,ep=5*6e4,tp=4*1024*1024;async function np(o,e){const{displayName:t="CLASSSIGHT Agent",publisher:n="ClasssightAI",version:r,packageInfo:i,groupIds:s=[],onProgress:a=()=>{},existingAppBehavior:c="update",blobUploadFetch:h=fetch}=e,l=rp(o),u=i.setupFile,m=`${u} /install /quiet /norestart /log "%ProgramData%\\CLASSSIGHT\\bundle-install.log"`,f=`${u} /uninstall /quiet /norestart`,y="CLASSSIGHT Agent for Windows endpoints. Collects student device usage data and reports it to the Classsight analytics platform.",p=[{"@odata.type":"#microsoft.graph.win32LobAppFileSystemDetection",path:"C:\\Program Files\\CLASSSIGHT\\Service",fileOrFolderName:"DistrictPolicyService.exe",check32BitOn64System:!1,detectionType:"version",operator:"greaterThanOrEqual",detectionValue:r}];a({stage:"checkExisting",message:`Checking for an existing "${t}" appâ¦`});const C=await op(l,t);let w,I=!1;if(C&&c==="replace"&&(a({stage:"removeExisting",message:`Removing existing app (id ${C.id})â¦`}),await $e(l,"DELETE",`/deviceAppManagement/mobileApps/${C.id}`)),C&&c==="update")w=C.id,I=!0,a({stage:"createApp",message:`Updating existing app entry for v${r}â¦`}),await $e(l,"PATCH",`/deviceAppManagement/mobileApps/${w}`,{"@odata.type":"#microsoft.graph.win32LobApp",displayVersion:r,description:y,installCommandLine:m,uninstallCommandLine:f,fileName:`CLASSSIGHTAgent-${r}.intunewin`,setupFilePath:u,detectionRules:p,requirementRules:[]});else{a({stage:"createApp",message:"Creating the Win32 app entryâ¦"});const te={"@odata.type":"#microsoft.graph.win32LobApp",displayName:t,displayVersion:r,description:y,publisher:n,fileName:`CLASSSIGHTAgent-${r}.intunewin`,setupFilePath:u,installCommandLine:m,uninstallCommandLine:f,applicableArchitectures:"x64",minimumSupportedWindowsRelease:"1809",installExperience:{runAsAccount:"system",deviceRestartBehavior:"suppress"},msiInformation:null,returnCodes:[{returnCode:0,type:"success"},{returnCode:1707,type:"success"},{returnCode:3010,type:"softReboot"},{returnCode:1641,type:"hardReboot"},{returnCode:1618,type:"retry"}],detectionRules:p,requirementRules:[]};w=(await $e(l,"POST","/deviceAppManagement/mobileApps",te)).id}const A=`/deviceAppManagement/mobileApps/${w}/microsoft.graph.win32LobApp`;a({stage:"createContentVersion",message:"Creating a content versionâ¦"});const T=(await $e(l,"POST",`${A}/contentVersions`,{})).id;a({stage:"declareFile",message:"Declaring the encrypted packageâ¦"});const x=(await $e(l,"POST",`${A}/contentVersions/${T}
12/files`,{"@odata.type":"#microsoft.graph.mobileAppContentFile",name:`CLASSSIGHTAgent-${r}.intunewin`,size:i.unencryptedSize,sizeEncrypted:i.encryptedSize,isDependency:!1})).id;a({stage:"awaitSasUri",message:"Waiting for upload URL from Intuneâ¦"});const N=(await ms(l,A,T,x,"azureStorageUriRequestSuccess")).azureStorageUri;if(!N)throw new Error("Intune did not return an azureStorageUri.");await sp(i.encryptedBlob,N,h,a),a({stage:"commitFile",message:"Committing the package with encryption infoâ¦"}),await $e(l,"POST",`${A}/contentVersions/${T}/files/${x}/commit`,{fileEncryptionInfo:{encryptionKey:i.encryptionKey,macKey:i.macKey,initializationVector:i.initializationVector,mac:i.mac,profileIdentifier:i.profileIdentifier,fileDigest:i.fileDigest,fileDigestAlgorithm:i.fileDigestAlgorithm}}),a({stage:"awaitCommit",message:"Intune is processing the uploadâ¦"}),await ms(l,A,T,x,"commitFileSuccess"),a({stage:"patchVersion",message:"Linking the new content versionâ¦"}),await $e(l,"PATCH",`/deviceAppManagement/mobileApps/${w}`,{"@odata.type":"#microsoft.graph.win32LobApp",committedContentVersion:T});const B=[];if(s.length){let te=new Set;if(I)try{const M=await $e(l,"GET",`/deviceAppManagement/mobileApps/${w}/assignments`);te=new Set(M.value.map(g=>{var F;return(F=g.target)==null?void 0:F.groupId}).filter(g=>!!g))}catch{}const b=s.filter(M=>!te.has(M));if(b.length){a({stage:"assign",message:`Assigning to ${b.length} group${b.length===1?"":"s"}â¦`});for(const M of b)await $e(l,"POST",`/deviceAppManagement/mobileApps/${w}/assignments`,{"@odata.type":"#microsoft.graph.mobileAppAssignment",intent:"required",target:{"@odata.type":"#microsoft.graph.groupAssignmentTarget",groupId:M},settings:{"@odata.type":"#microsoft.graph.win32LobAppAssignmentSettings",notifications:"showAll",deliveryOptimizationPriority:"notConfigured"}}),B.push(M)}}return a({stage:"done",message:I?`Updated "${t}" to v${r}.`:`Deployed "${t}" v${r}.`,percent:100}),{appId:w,displayName:t,version:r,assignedGroupIds:B,updatedExisting:I}}function rp(o){return{Authorization:`Bearer ${o}`}}async function $e(o,e,t,n){const r=t.startsWith("http")?t:`${Xg}${t}`,i=await fetch(r,{method:e,headers:{...o,...n!==void 0?{"Content-Type":"application/json"}:{}},body:n===void 0?void 0:JSON.stringify(n)});if(!i.ok)throw await ip(e,r,i);if(i.status===204)return;const s=await i.text();if(s)try{return JSON.parse(s)}catch{throw new Error(`${e} ${r} â ${i.status} returned non-JSON body: ${s.slice(0,200)}`)}}async function ip(o,e,t){let n="";try{const r=await t.text();n=r?` â ${r.slice(0,500)}`:""}catch{}return new Error(`${o} ${e} â ${t.status} ${t.statusText}${n}`)}async function op(o,e){var r;const t=`/deviceAppManagement/mobileApps?$filter=displayName eq '${e.replace(/'/g,"''")}'&$select=id,displayName&$top=1`;return((r=(await $e(o,"GET",t)).value)==null?void 0:r[0])??null}async function ms(o,e,t,n,r){const i=Date.now();for(;;){const s=await $e(o,"GET",`${e}/contentVersions/${t}/files/${n}`);if(s.uploadState===r)return s;if(s.uploadState.endsWith("Failed")||s.uploadState.endsWith("TimedOut"))throw new Error(`Intune file processing failed at state "${s.uploadState}".`);if(Date.now()-i>ep)throw new Error(`Timed out waiting for "${r}" (still in "${s.uploadState}").`);await ap(qg)}}async function sp(o,e,t,n){const r=o.byteLength,i=[];let s=0,a=0;for(;s<r;){const u=Math.min(s+tp,r),m=o.subarray(s,u),f=`block-${a.toString().padStart(8,"0")}`,y=btoa(f);i.push(y);const p=ys(e,{comp:"block",blockid:y}),C=await t(p,{method:"PUT",headers:{"x-ms-blob-type":"BlockBlob","Content-Length":String(m.byteLength)},body:m});if(!C.ok){const I=await C.text().catch(()=>"");throw new Error(`Azure block upload failed at block ${a}: ${C.status} ${C.statusText}${I?` â ${I.slice(0,200)}`:""}`)}s=u,a++;const w=Math.floor(s/r*100);n({stage:"uploadBlob",message:`Uploading encrypted package⦠${w}% (${ws(s)} of ${ws(r)})`,percent:w})}n({stage:"commitBlocks",message:"Finalizing Azure block listâ¦"});const c='<?xml version="1.0" encoding="utf-8"?><BlockList>'+i.map(u=>`<Latest>${u}</Latest>`).join("")+"</BlockList>
12",h=ys(e,{comp:"blocklist"}),l=await t(h,{method:"PUT",headers:{"Content-Type":"application/xml"},body:c});if(!l.ok){const u=await l.text().catch(()=>"");throw new Error(`Azure blocklist commit failed: ${l.status} ${l.statusText}${u?` â ${u.slice(0,200)}`:""}`)}}function ys(o,e){const t=new URL(o);for(const[n,r]of Object.entries(e))t.searchParams.set(n,r);return t.toString()}function ap(o){return new Promise(e=>setTimeout(e,o))}function ws(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:o<1024*1024*1024?`${(o/1024/1024).toFixed(1)} MB`:`${(o/1024/1024/1024).toFixed(2)} GB`}const ec="classsight-agent",ln="SWYE360Analyzer/Windows-Extension",cp="true".toLowerCase()==="true",hp=["super_admin","district_admin","it_director"];function Pp(){var F,oe,G,se,W;const{user:o,loading:e,userProfile:t}=oc(),{role:n}=sc(),r=_r({queryKey:["classsight-agent-manifest",ln],queryFn:async()=>{const L=new URLSearchParams;L.set("repo",ln);const E=`${dn}/functions/v1/agent-package${L.toString()?`?${L}`:""}`,{data:{session:R}}=await Re.auth.getSession(),ee=R==null?void 0:R.access_token,Y="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl0cHdhcnl2eGRyd3Rldmx0Z3dwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ3NTUzNDQsImV4cCI6MjA2MDMzMTM0NH0.WcUhGaAJR1qCrPP04BeKpjizw8NER1TYTympzbhiawE",J={};ee&&(J.Authorization=`Bearer ${ee}`),J.apikey=Y;const le=await fetch(E,{headers:J});if(!le.ok)throw new Error(`Couldn't load available versions (HTTP ${le.status}).`);return await le.json()},staleTime:6e4}),[i,s]=Me.useState("");Me.useEffect(()=>{var L;(L=r.data)!=null&&L.latest&&!i&&s(r.data.latest)},[r.data,i]);const[a,c]=Me.useState(""),h=Me.useMemo(()=>a.split(/[,\s\n]+/).map(L=>L.trim()).filter(Boolean),[a]),[l,u]=Me.useState(null),[m,f]=Me.useState(!1);Me.useEffect(()=>{Kt&&(async()=>{try{await Gg();const L=await Wg();L&&u(L)}catch(L){console.error("[AgentDeployment] processRedirectResponse failed",L)}})()},[]);const y=(t==null?void 0:t.district_id)??null,p=_r({queryKey:["district_intune_auto_update",y],queryFn:async()=>{if(!y)return null;const{data:L,error:E}=await Re.from("district_intune_auto_update").select("district_id, tenant_id, enabled, consent_granted_at, consent_granted_by_user_email, disabled_at, last_auto_run_at, last_auto_run_version, assignment_group_ids, assignment_applied_at").eq("district_id",y).maybeSingle();if(E)throw E;return L},enabled:!!y,staleTime:3e4}),C=!!((F=p.data)!=null&&F.enabled),w=!!((oe=p.data)!=null&&oe.assignment_applied_at),[I,A]=Me.useState([]),k=Me.useRef(!1);Me.useEffect(()=>{var E;const L=(E=p.data)==null?void 0:E.assignment_group_ids;!k.current&&L&&L.length&&(A(L),k.current=!0)},[(G=p.data)==null?void 0:G.assignment_group_ids]);const T=_r({queryKey:["intune-groups",y],queryFn:async()=>{const{data:L,error:E}=await Re.functions.invoke("list-intune-groups",{body:{}});if(E)throw E;if(L!=null&&L.error)throw new Error(L.error);return(L==null?void 0:L.groups)??[]},enabled:!!y&&C&&!w,staleTime:6e4,retry:1}),U=Me.useMemo(()=>(T.data??[]).map(L=>({label:L.displayName,value:L.id})),[T.data]),x=Ir({mutationFn:async L=>{if(!y)throw new Error("No district associated with this account.");const{error:E}=await Re.from("district_intune_auto_update").update({assignment_group_ids:L}).eq("district_id",y);if(E)throw E;return L}}),$=async L=>{try{await x.mutateAsync(I),await p.refetch(),B.mutate(L)}catch(E){ht.error(`Couldn't save device groups: ${E instanceof Error?E.message:String(E)}`)}};Me.useEffect(()=>{const L=new URLSearchParams(window.location.search);if(L.get("state")!=="auto-update")return;const R=()=>window.history.replaceState({},"",window.location.pathname),ee=L.get("error");if(ee){const le=L.get("error_description")||ee;ht.error(`Auto-update setup failed: ${le}`),R();return}const Y=L.get("admin_consent"),J=L.get("tenant");if(Y!=="True"||!J){R();return}y&&(async()=>{try{const{data:{user:le}}=await Re.auth.getUser();if(!le)throw new Error("Not signed in.");const{data:Ce}=await Re.from("profiles").select("email").eq("auth_user_id",le.id).maybeSingle(),{error:ae}=await Re.from("district_intune_auto_update").upsert({district_id:y,tenant_id:J,enabled:!0,consent_granted_at:new Date().toISOString(),consent_granted_by_user_email:(Ce==null?void 0:Ce.email)??le.email??"unknown",disabled_at:null,disabled_by_user_email:null},{onConflict:"district_id"});if(ae)throw ae;ht.success("Auto-update enabled â pushing the current version to your tenantâ¦"),p.refetch();const he=sessionStorage.getItem("pending-deploy-version");sessionStorage.removeItem("pending-deploy-version"),he&&B.mutate(he)}catch(le){ht.error(`Couldn't save auto-update setting: ${le instanceof Error?le.message:String(le)}`)}finally{R()}})()},[y]);const N=L=>{const E="f0638c7c-f407-4472-9dea-6a89849fa24e";sessionStorage.setItem("pending-deploy-version",L);const R=`${window.location.origin}/admin/agent-deployment`,ee=`https://login.microsoftonline.com/organizations/v2.0/adminconsent?client_id=${encodeURIComponent(E)}&scope=${encodeURIComponent("https://graph.microsoft.com/.default")}&redirect_uri=${encodeURIComponent(R)}&state=auto-update`;window.location.href=ee},B=Ir({mutationFn:async L=>{const{data:E,error:R}=await Re.functions.invoke("intune-auto-deploy",{body:{version:L}});if(R)throw R;const ee=E,Y=ee.results.find(J=>J.status==="failed");if(Y)throw new Error(Y.detail||"Deploy failed.");return ee},onSuccess:L=>{ht.success(`CLASSSIGHT Agent ${L.version} deployed to your district.`),p.refetch()},onError:L=>ht.error(`Couldn't deploy: ${L instanceof Error?L.message:String(L)}`)}),[te,b]=Me.useState(null),[M,g]=Me.useState(null);return Ir({mutationFn:async()=>{var ee;if(!i)throw new Error("Pick a version first.");const L=`CLASSSIGHTAgent-${i}.intunewin`;Yg(L),b({stage:"checkExisting",message:"Acquiring Microsoft Graph tokenâ¦"});const E=await Vg();u(E.username);const R=await lp({version:i,tenantId:E.tenantId,signedInEmail:E.username});try{const Y=(ee=r.data)==null?void 0:ee.versions.find(_e=>_e.version===i),{url:J,requiresSupabaseAuth:le}=up(Y,L);b({stage:"checkExisting",message:"Downloading the packageâ¦"});const Ce=await fp(J,L,le,_e=>g(_e));g(null),b({stage:"checkExisting",message:"Parsing the packageâ¦"});const ae=await Zg(Ce),he=await np(E.accessToken,{version:i,packageInfo:ae,groupIds:h,onProgress:b,blobUploadFetch:dp});return await Cs(R,{status:"success",intuneAppId:he.appId,wasUpdate:he.updatedExisting,assignedGroupIds:he.assignedGroupIds}),he}catch(Y){throw await Cs(R,{status:"failed",errorMessage:Y instanceof Error?Y.message:String(Y)}).catch(()=>{}),Y}},onSuccess:L=>{const E=L.assignedGroupIds.length?` and assigned to ${L.assignedGroupIds.length} new group${L.assignedGroupIds.length===1?"":"s"}`:"",R=L.updatedExisting?"updated to":"deployed at";ht.success(`CLASSSIGHT Agent ${R} ${L.version}${E}.`)},onError:L=>{L instanceof Xa||ht.error("Deployment didn't complete. See the deployment card for details.")}}),(te==null?void 0:te.percent)??(M!==null||te&&gp(te.stage)),e||o&&!t?V.jsx("div",{className:"container mx-auto max-w-3xl py-8",children:V.jsx("p",{className:"text-muted-foreground",children:"Loadingâ¦"})}):o?hp.includes(n)?V.jsxs("div",{className:"container mx-auto max-w-3xl space-y-6 py-8",children:[V.jsx("div",{className:"flex items-start justify-between",children:V.jsxs("div",{children:[V.jsxs("h1",{className:"text-2xl font-semibold flex items-center gap-2",children:[V.jsx(ac,{className:"h-6 w-6"}),"Deploy CLASSSIGHT Agent"]}),V.jsx("p",{className:"text-muted-foreground",children:"Push the CLASSSIGHT Agent to your district's Intune in a few clicks."})]})}),!Kt&&V.jsxs(Xt,{variant:"destructive",children:[V.jsx(En,{className:"h-4 w-4"}),V.jsx(qt,{children:"Deployment is not available"}),V.jsx(en,{children:"This feature isn't configured for your account. Please contact your Classsight administrator."})]}),V.jsxs(oo,{children:[V.jsxs(so,{children:[V.jsx(ao,{className:"text-lg",children:"1. Choose a version"}),V.jsx(co,{children:"Pick the version of CLASSSIGHT Agent you want to push to your devices."})]}),V.jsxs(ho,{className:"space-y-4",children:[r.isLoading&&V.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading available versionsâ¦"}),r.isError&&V.jsxs(Xt,{variant:"destructive",children:[V.jsx(En,{className:"h-4 w-4"}),V.jsx(qt,{children:"Couldn't load available versions"}),V.jsxs(en,{children:["Please try again in a moment.",V.jsx("div",{className:"mt-2",children:V.jsxs(Rn,{variant:"outline",size:"sm",onClick:()=>r.refetch(),children:[V.jsx(cc,{className:"h-3 w-3 mr-1"})," Try again"]})})]})]}),r.data&&V.jsx("div",{className:"flex items-end gap-3",children:V.jsxs("div",{className:"flex-1",children:[V.jsx(lo,{htmlFor:"version-select",children:"Version"}),V.jsxs(hc,{value:i,onValueChange:s,children:[V.jsx(lc,{id:"version-select",children:V.jsx(dc,{placeholder:"Select a ver
12sionâ¦"})}),V.jsx(uc,{children:r.data.versions.map(L=>V.jsxs(fc,{value:L.version,children:[L.version,L.version===r.data.latest?" (latest)":""]},L.version))})]})]})})]})]}),V.jsxs(oo,{children:[V.jsxs(so,{children:[V.jsx(ao,{className:"text-lg",children:"2. Deploy & enable auto-update"}),V.jsx(co,{children:"One click sets up everything: the current version installs on your devices immediately, and every future release deploys automatically. You won't need to come back to this page when new versions ship."})]}),V.jsxs(ho,{className:"space-y-4",children:[y?p.isLoading?V.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading current settingâ¦"}):(se=p.data)!=null&&se.enabled?V.jsxs("div",{className:"space-y-4",children:[V.jsxs("div",{className:"flex items-center gap-2",children:[V.jsx(uo,{className:"h-5 w-5 text-emerald-600"}),V.jsx("span",{className:"text-sm font-medium",children:"Auto-update is enabled"})]}),V.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[p.data.last_auto_run_at?V.jsxs("p",{children:["Last deployment:"," ",V.jsxs("strong",{children:["v",p.data.last_auto_run_version]})," on"," ",new Date(p.data.last_auto_run_at).toLocaleString()]}):V.jsx("p",{children:"No deployments recorded yet â the next release will deploy automatically."}),V.jsxs("p",{children:["Approved by ",p.data.consent_granted_by_user_email," on"," ",new Date(p.data.consent_granted_at).toLocaleDateString()]})]}),w?V.jsxs(V.Fragment,{children:[V.jsxs(Rn,{onClick:()=>i&&B.mutate(i),disabled:B.isPending||!i,size:"lg",className:"w-full",children:[V.jsx(fo,{className:"h-4 w-4 mr-2"}),B.isPending?"Deployingâ¦":`Deploy v${i||"â"} to my tenant now`]}),V.jsx("div",{className:"border-t pt-4 text-xs text-muted-foreground",children:p.data.assignment_group_ids.length>0?V.jsxs("p",{children:["Initially assigned to"," ",V.jsxs("strong",{children:[p.data.assignment_group_ids.length," device group",p.data.assignment_group_ids.length===1?"":"s"]})," ","on"," ",new Date(p.data.assignment_applied_at).toLocaleDateString(),". Manage device targeting in Intune from here on â updates won't change your assignments."]}):V.jsx("p",{children:"Device targeting is managed in your Intune portal. Updates push the app to whatever devices you've assigned it to."})})]}):V.jsxs("div",{className:"space-y-2 border-t pt-4",children:[V.jsx(lo,{className:"text-xs",children:"Install on device groups (optional, one-time)"}),V.jsx(gc,{options:U,selected:I,onChange:A,disabled:T.isLoading||T.isError,placeholder:T.isLoading?"Loading your device groupsâ¦":T.isError?"Couldn't load groups":"Select device groupsâ¦"}),T.isError?V.jsx("p",{className:"text-xs text-muted-foreground",children:"Couldn't load your groups (the app may not have Group.Read.All consented). You can still assign devices directly in Intune."}):V.jsxs("p",{className:"text-xs text-muted-foreground",children:["Pick the groups to install the agent on. We assign these"," ",V.jsx("strong",{children:"once"})," â after that you manage targeting in Intune and updates never change it. Leave empty to assign devices yourself in Intune."]}),V.jsxs(Rn,{onClick:()=>i&&$(i),disabled:B.isPending||x.isPending||!i,size:"lg",className:"w-full",children:[V.jsx(fo,{className:"h-4 w-4 mr-2"}),B.isPending||x.isPending?"Deployingâ¦":I.length>0?`Assign ${I.length} group${I.length===1?"":"s"} & deploy v${i||"â"}`:`Deploy v${i||"â"} now`]})]})]}):V.jsxs("div",{className:"space-y-3",children:[V.jsxs("p",{className:"text-sm text-muted-foreground",children:["Clicking the button will redirect you to Microsoft. A Global Administrator signs in and approves a one-time permission. After that, CLASSSIGHT Agent v",i||"â"," installs on your devices immediately and every future release deploys automatically."]}),V.jsx("p",{className:"text-xs text-muted-foreground",children:"After you connect, you'll pick which device groups to install on from a dropdown of your Entra groups (a one-time choice) â or skip it and target devices yourself in Intune."}),V.jsxs(Rn,{onClick:()=>N(i),disabled:!i||!Kt,size:"lg",className:"w-full",children:[V.jsx(pc,{className:"h-4 w-4 mr-2"}),"Deploy v",i||"â"," & enable auto-update"]}),V.jsx("p",{className:"text-xs text-muted-foreground",children:"Requires a Global Administrator in your Microsoft tenant. Don't have one available? See the alternative below."})]}):V.jsxs(Xt,{children:[V.jsx(En,{className:"h-4 w-4"}),V.jsx(qt,{children:"Sign in as a district administrator"}),V.jsx(en,{children:"Deployment is managed per district. Please sign in to Classsight with a district administrator account to continue."})]}),B.isSuccess&&V.jsxs(Xt,{children:[V.jsx(uo,{className:"h-4 w-4"}
12),V.jsx(qt,{children:"Deployment complete"}),V.jsxs(en,{children:["CLASSSIGHT Agent v",(W=B.data)==null?void 0:W.version," is now in your Intune tenant. Assigned devices will pick it up on their next Intune check-in."," ",V.jsxs("a",{className:"underline inline-flex items-center gap-1",href:"https://intune.microsoft.com/#view/Microsoft_Intune_DeviceSettings/AppsMenu/~/allApps",target:"_blank",rel:"noreferrer",children:["Open Intune ",V.jsx(mc,{className:"h-3 w-3"})]})]})]}),B.isError&&V.jsxs(Xt,{variant:"destructive",children:[V.jsx(En,{className:"h-4 w-4"}),V.jsx(qt,{children:"Deployment didn't complete"}),V.jsxs(en,{children:[V.jsx("p",{children:"Something went wrong while deploying. Please try again, or contact your Classsight administrator if the problem continues."}),V.jsxs("details",{className:"mt-2 text-xs",children:[V.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"Show details"}),V.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[11px] opacity-80",children:B.error instanceof Error?B.error.message:"Unknown error."})]})]})]})]})]}),!1]}):V.jsx(io,{to:"/unauthorized",replace:!0}):V.jsx(io,{to:"/login",replace:!0})}async function lp(o){try{const{data:{user:e}}=await Re.auth.getUser();if(!e)return null;const{data:t}=await Re.from("profiles").select("district_id, email").eq("auth_user_id",e.id).maybeSingle(),{data:n,error:r}=await Re.from("agent_deployments").insert({district_id:(t==null?void 0:t.district_id)??null,tenant_id:o.tenantId,version:o.version,trigger:"manual",triggered_by_user_id:e.id,triggered_by_user_email:(t==null?void 0:t.email)??o.signedInEmail,status:"in_progress"}).select("id").single();return r?(console.warn("[AgentDeployment] failed to open audit row",r),null):n.id}catch(e){return console.warn("[AgentDeployment] openAuditRow threw",e),null}}async function Cs(o,e){if(o)try{const t=e.status==="success"?{status:"success",intune_app_id:e.intuneAppId,was_update:e.wasUpdate,assigned_group_ids:e.assignedGroupIds,completed_at:new Date().toISOString()}:{status:"failed",error_message:e.errorMessage.slice(0,2e3),completed_at:new Date().toISOString()},{error:n}=await Re.from("agent_deployments").update(t).eq("id",o);n&&console.warn("[AgentDeployment] failed to close audit row",n)}catch(t){console.warn("[AgentDeployment] closeAuditRow threw",t)}}async function dp(o,e){const{data:{session:t}}=await Re.auth.getSession(),n=t==null?void 0:t.access_token,r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl0cHdhcnl2eGRyd3Rldmx0Z3dwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ3NTUzNDQsImV4cCI6MjA2MDMzMTM0NH0.WcUhGaAJR1qCrPP04BeKpjizw8NER1TYTympzbhiawE",i=`${dn}/functions/v1/azure-blob-proxy?url=${encodeURIComponent(o)}`,s=new Headers(e.headers);return n&&s.set("Authorization",`Bearer ${n}`),s.set("apikey",r),fetch(i,{...e,headers:s})}function up(o,e){if(o!=null&&o.downloadUrl)return{url:o.downloadUrl,requiresSupabaseAuth:!1};if(cp&&(o!=null&&o.version)){const t=new URLSearchParams({version:o.version});return t.set("repo",ln),{url:`${dn}/functions/v1/agent-package?${t.toString()}`,requiresSupabaseAuth:!0}}return o!=null&&o.version&&ln?{url:`https://github.com/${ln}/releases/download/v${o.version}/${e}`,requiresSupabaseAuth:!1}:{url:`${dn}/storage/v1/object/public/${ec}/${encodeURIComponent(e)}`,requiresSupabaseAuth:!1}}async function fp(o,e,t,n){try{const r={};if(t){const{data:{session:l}}=await Re.auth.getSession(),u=l==null?void 0:l.access_token,m="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl0cHdhcnl2eGRyd3Rldmx0Z3dwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ3NTUzNDQsImV4cCI6MjA2MDMzMTM0NH0.WcUhGaAJR1qCrPP04BeKpjizw8NER1TYTympzbhiawE";u&&(r.Authorization=`Bearer ${u}`),m&&(r.apikey=m)}const i=await fetch(o,{headers:r});if(!i.ok){const l=await i.text().catch(()=>"");throw new Error(`HTTP ${i.status} fetching ${o}${l?` â ${l.slice(0,300)}`:""}`)}const s=parseInt(i.headers.get("Content-Length")||"0",10);if(!i.body||!s)return await i.blob();const a=i.body.getReader(),c=[];let h=0;for(;;){const{done:l,value:u}=await a.read();if(l)break;u&&(c.push(u),h+=u.byteLength,n(Math.floor(h/s*100)))}return new Blob(c)}catch(r){if(!o.startsWith(`${dn}/storage/`))throw r;const{data:i,error:s}=await Re.storage.from(ec).download(e);if(s)throw s;return i}}function gp(o){const e=["checkExisting","removeExisting","createApp","createContentVersion","declareFile","awaitSasUri","uploadBlob","commitBlocks","commitFile","awaitCommit","patchVersion","assign","done"],t=e.indexOf(o);return t<0?0:Math.round((t+1)/e.length*100)}export{Pp as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.