@eyepop.ai/eyepop 3.14.2 → 3.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see eyepop.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(self,()=>(()=>{var e={262(e,t,i){"use strict";function a(e,t){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(i[a[n]]=e[a[n]])}return i}i.r(t),i.d(t,{Auth0Client:()=>Yo,AuthenticationError:()=>l,CacheKey:()=>fe,ConnectError:()=>u,GenericError:()=>p,InMemoryCache:()=>ge,LocalStorageCache:()=>ve,MfaApiClient:()=>Zo,MfaChallengeError:()=>Fo,MfaEnrollmentError:()=>Jo,MfaEnrollmentFactorsError:()=>Vo,MfaError:()=>Ho,MfaListAuthenticatorsError:()=>Ko,MfaRequiredError:()=>v,MfaVerifyError:()=>Bo,MissingRefreshTokenError:()=>g,MyAccountApiError:()=>Ve,PopupCancelledError:()=>h,PopupOpenError:()=>f,PopupTimeoutError:()=>m,ResponseType:()=>Ie,TimeoutError:()=>d,UseDpopNonceError:()=>x,User:()=>Ce,createAuth0Client:()=>Xo}),"function"==typeof SuppressedError&&SuppressedError;const n={timeoutInSeconds:60},o="memory",s={name:"auth0-spa-js",version:"2.17.1"},r=()=>Date.now(),c="default";class p extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,p.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new p(t,i)}}class l extends p{constructor(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=i,this.appState=a,Object.setPrototypeOf(this,l.prototype)}}class u extends p{constructor(e,t,i,a){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(e,t),this.connection=i,this.state=a,this.appState=n,Object.setPrototypeOf(this,u.prototype)}}class d extends p{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,d.prototype)}}class m extends d{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,m.prototype)}}class h extends p{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,h.prototype)}}class f extends p{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,f.prototype)}}class v extends p{constructor(e,t,i,a){super(e,t),this.mfa_token=i,this.mfa_requirements=a,Object.setPrototypeOf(this,v.prototype)}}class g extends p{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(y(e,["default"]),"', scope: '").concat(y(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,g.prototype)}}class b extends p{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(y(e,["default"]),"', missing scope: '").concat(y(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,b.prototype)}}class x extends p{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,x.prototype)}}function y(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const w=()=>window.crypto,_=()=>{let e="";return Array.from(w().getRandomValues(new Uint8Array(43))).forEach(t=>e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[t%66]),e},k=e=>btoa(e),S=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],E=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object.keys(e).reduce((i,a)=>{if(t&&"env"===a)return i;const n=S.find(e=>e.key===a);return n&&n.type.includes(typeof e[a])&&(i[a]=e[a]),i},{})},T=e=>{var{clientId:t}=e,i=a(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,i)=>Object.assign(Object.assign({},t),{[i]:e[i]}),{}))(Object.assign({client_id:t},i))).toString()},j=async e=>{const t=w().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},A=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),P=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))};var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},I={},C={};Object.defineProperty(C,"__esModule",{value:!0});var U=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,i){var a=e.locked.get(t);void 0===a?void 0===i?e.locked.set(t,[]):e.locked.set(t,[i]):void 0!==i&&(a.unshift(i),e.locked.set(t,a))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(i,a){e.isLocked(t)?e.addToLocked(t,i):(e.addToLocked(t),i())})},this.unlock=function(t){var i=e.locked.get(t);if(void 0!==i&&0!==i.length){var a=i.pop();e.locked.set(t,i),void 0!==a&&setTimeout(a,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();C.default=function(){return U.getInstance()};var R=O&&O.__awaiter||function(e,t,i,a){return new(i||(i=Promise))(function(n,o){function s(e){try{c(a.next(e))}catch(e){o(e)}}function r(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):new i(function(t){t(e.value)}).then(s,r)}c((a=a.apply(e,t||[])).next())})},L=O&&O.__generator||function(e,t){var i,a,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,a=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],a=0}finally{i=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}},z=O;Object.defineProperty(I,"__esModule",{value:!0});var D=C,N="browser-tabs-lock-key",q={key:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},clear:function(){return R(z,void 0,void 0,function(){return L(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function M(e){return new Promise(function(t){return setTimeout(t,e)})}function $(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var W=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+$(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,i){return void 0===i&&(i=5e3),R(this,void 0,void 0,function(){var a,n,o,s,r,c,p;return L(this,function(l){switch(l.label){case 0:a=Date.now()+$(4),n=Date.now()+i,o=N+"-"+t,s=void 0===this.storageHandler?q:this.storageHandler,l.label=1;case 1:return Date.now()<n?[4,M(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+a,[4,M(Math.floor(25*Math.random()))]);case 3:return l.sent(),s.setItemSync(o,JSON.stringify({id:this.id,iat:a,timeoutKey:r,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,M(30)];case 4:return l.sent(),null!==(c=s.getItemSync(o))&&(p=JSON.parse(c)).id===this.id&&p.iat===a?(this.acquiredIatSet.add(a),this.refreshLockWhileAcquired(o,a),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?q:this.storageHandler),[4,this.waitForSomethingToChange(n)];case 6:l.sent(),l.label=7;case 7:return a=Date.now()+$(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return R(this,void 0,void 0,function(){var i=this;return L(this,function(a){return setTimeout(function(){return R(i,void 0,void 0,function(){var i,a,n;return L(this,function(o){switch(o.label){case 0:return[4,D.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?q:this.storageHandler,null===(a=i.getItemSync(e))?(D.default().unlock(t),[2]):((n=JSON.parse(a)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(n)),D.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(D.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return R(this,void 0,void 0,function(){return L(this,function(i){switch(i.label){case 0:return[4,new Promise(function(i){var a=!1,n=Date.now(),o=!1;function s(){if(o||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(r),o=!0),!a){a=!0;var t=50-(Date.now()-n);t>0?setTimeout(i,t):i(null)}}window.addEventListener("storage",s),e.addToWaiting(s);var r=setTimeout(s,Math.max(0,t-Date.now()))})];case 1:return i.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return R(this,void 0,void 0,function(){return L(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return R(this,void 0,void 0,function(){var i,a,n,o;return L(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?q:this.storageHandler,a=N+"-"+t,null===(n=i.getItemSync(a))?[2]:(o=JSON.parse(n)).id!==this.id?[3,2]:[4,D.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(a),D.default().unlock(o.iat),e.notifyWaiters(),s.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var i=Date.now()-5e3,a=t,n=[],o=0;;){var s=a.keySync(o);if(null===s)break;n.push(s),o++}for(var r=!1,c=0;c<n.length;c++){var p=n[c];if(p.includes(N)){var l=a.getItemSync(p);if(null!==l){var u=JSON.parse(l);(void 0===u.timeRefreshed&&u.timeAcquired<i||void 0!==u.timeRefreshed&&u.timeRefreshed<i)&&(a.removeItemSync(p),r=!0)}}}r&&e.notifyWaiters()},e.waiters=void 0,e}(),H=I.default=W;class K{async runWithLock(e,t,i){const a=new AbortController,n=setTimeout(()=>a.abort(),t);try{return await navigator.locks.request(e,{mode:"exclusive",signal:a.signal},async e=>{if(clearTimeout(n),!e)throw new Error("Lock not available");return await i()})}catch(e){if(clearTimeout(n),"AbortError"===(null==e?void 0:e.name))throw new d;throw e}}}class J{constructor(){this.activeLocks=new Set,this.lock=new H,this.pagehideHandler=()=>{this.activeLocks.forEach(e=>this.lock.releaseLock(e)),this.activeLocks.clear()}}async runWithLock(e,t,i){let a=!1;for(let i=0;i<10&&!a;i++)a=await this.lock.acquireLock(e,t);if(!a)throw new d;this.activeLocks.add(e),1===this.activeLocks.size&&"undefined"!=typeof window&&window.addEventListener("pagehide",this.pagehideHandler);try{return await i()}finally{this.activeLocks.delete(e),await this.lock.releaseLock(e),0===this.activeLocks.size&&"undefined"!=typeof window&&window.removeEventListener("pagehide",this.pagehideHandler)}}}let F=null;const B=new TextEncoder,V=new TextDecoder;function G(e){return"string"==typeof e?B.encode(e):V.decode(e)}function Z(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new ee(`${e.name} modulusLength must be at least 2048 bits`)}let Y;if(Uint8Array.prototype.toBase64)Y=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Y=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const i=[];for(let a=0;a<t.byteLength;a+=e)i.push(String.fromCharCode.apply(null,t.subarray(a,a+e)));return btoa(i.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function X(e){return Y(e)}class Q extends Error{constructor(e){var t;super(null!=e?e:"operation not supported"),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class ee extends Error{constructor(e){var t;super(e),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}function te(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new Q("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new Q("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new Q("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new Q("unsupported CryptoKey algorithm name")}}function ie(e){return e instanceof CryptoKey}function ae(e){return ie(e)&&"public"===e.type}async function ne(e){const{kty:t,e:i,n:a,x:n,y:o,crv:s}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:s,e:i,n:a,x:n,y:o}}const oe="dpop-nonce",se=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange","http://auth0.com/oauth/grant-type/mfa-oob","http://auth0.com/oauth/grant-type/mfa-otp","http://auth0.com/oauth/grant-type/mfa-recovery-code"],re=async(e,t)=>{const i=await fetch(e,t);return{ok:i.ok,json:await i.json(),headers:(a=i.headers,[...a].reduce((e,t)=>{let[i,a]=t;return e[i]=a,e},{}))};var a},ce=async function(e,t,i,a,n,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return n?(async(e,t,i,a,n,o,s,r)=>((e,t)=>new Promise(function(i,a){const n=new MessageChannel;n.port1.onmessage=function(e){e.data.error?a(new Error(e.data.error)):i(e.data),n.port1.close()},t.postMessage(e,[n.port2])}))({auth:{audience:t,scope:i},timeout:n,fetchUrl:e,fetchOptions:a,useFormData:s,useMrrt:r},o))(e,t,i,a,s,n,o,arguments.length>7?arguments[7]:void 0):(async(e,t,i)=>{const a=new AbortController;let n;return t.signal=a.signal,Promise.race([re(e,t),new Promise((e,t)=>{n=setTimeout(()=>{a.abort(),t(new Error("Timeout when executing 'fetch'"))},i)})]).finally(()=>{clearTimeout(n)})})(e,a,s)};async function pe(e,t,i,n,o,s,r,c,l,u){if(l){const t=await l.generateProof({url:e,method:o.method||"GET",nonce:await l.getNonce()});o.headers=Object.assign(Object.assign({},o.headers),{dpop:t})}let d,m=null;for(let a=0;a<3;a++)try{d=await ce(e,i,n,o,s,r,t,c),m=null;break}catch(e){m=e}if(m)throw m;const h=d.json,{error:f,error_description:b}=h,y=a(h,["error","error_description"]),{headers:w,ok:_}=d;let k;if(l&&(k=w[oe],k&&await l.setNonce(k)),!_){const a=b||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===f)throw new v(f,a,y.mfa_token,y.mfa_requirements);if("missing_refresh_token"===f)throw new g(i,n);if("use_dpop_nonce"===f){if(!l||!k||u)throw new x(k);return pe(e,t,i,n,o,s,r,c,l,!0)}throw new p(f||"request_error",a)}return y}async function le(e,t){var{baseUrl:i,timeout:n,audience:o,scope:r,auth0Client:p,useFormData:l,useMrrt:u,dpop:d}=e,m=a(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const h="urn:ietf:params:oauth:grant-type:token-exchange"===m.grant_type,f="refresh_token"===m.grant_type&&u,v=Object.assign(Object.assign(Object.assign(Object.assign({},m),h&&o&&{audience:o}),h&&r&&{scope:r}),f&&{audience:o,scope:r}),g=l?T(v):JSON.stringify(v),b=(x=m.grant_type,se.includes(x));var x;return await pe("".concat(i,"/oauth/token"),n,o||c,r,{method:"POST",body:g,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(E(p||s)))}},t,l,u,b?d:void 0)}const ue=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(a=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(a))).join(" ");var a},de=(e,t,i)=>{let a;return i&&(a=e[i]),a||(a=e[c]),ue(a,t)},me="@@auth0spajs@@",he="@@user@@";class fe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:me,i=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=i,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,i,a,n]=e.split("::");return new fe({clientId:i,scope:n,audience:a},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:a}=e;return new fe({scope:t,audience:i,clientId:a})}}class ve{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith(me))}}class ge{constructor(){this.enclosedCache=function(){let e={};return{set(t,i){e[t]=i},get(t){const i=e[t];if(i)return i},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class be{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||r}async setIdToken(e,t,i){var a;const n=this.getIdTokenCacheKey(e);await this.cache.set(n,{id_token:t,decodedToken:i}),await(null===(a=this.keyManifest)||void 0===a?void 0:a.add(n))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3?arguments[3]:void 0;var n;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const n=this.matchExistingCacheKey(e,t);if(n&&(o=await this.cache.get(n)),!o&&i&&"cache-only"!==a)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const s=await this.nowProvider(),r=Math.floor(s/1e3);return o.expiresAt-t<r?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await(null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const i=new fe({clientId:e.client_id,scope:e.scope,audience:e.audience}),a=await this.wrapCacheEntry(e);await this.cache.set(i.toKey(),a),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(i.toKey()))}async remove(e,t,i){const a=new fe({clientId:e,scope:i,audience:t});await this.cache.remove(a.toKey())}async clear(e){var t;const i=await this.getCacheKeys();i&&(await i.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new fe({clientId:e},me,he).toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const a=fe.fromKey(t),n=new Set(a.scope&&a.scope.split(" ")),o=(null===(i=e.scope)||void 0===i?void 0:i.split(" "))||[],s=a.scope&&o.reduce((e,t)=>e&&n.has(t),!0);return a.prefix===me&&a.clientId===e.clientId&&a.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const a of t){const t=fe.fromKey(a);if(t.prefix===me&&t.clientId===e.clientId){const t=await this.cache.get(a);if(null===(i=null==t?void 0:t.body)||void 0===i?void 0:i.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var i;const a=await this.getCacheKeys();if(a)for(const n of a){const a=await this.cache.get(n);(null===(i=null==a?void 0:a.body)||void 0===i?void 0:i.refresh_token)===e&&(a.body.refresh_token=t,await this.cache.set(n,a))}}}class xe{constructor(e,t,i){this.storage=e,this.clientId=t,this.cookieDomain=i,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId)}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const ye=e=>"number"==typeof e,we=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var _e=O&&O.__assign||function(){return _e=Object.assign||function(e){for(var t,i=1,a=arguments.length;i<a;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},_e.apply(this,arguments)};function ke(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function Se(e,t,i){document.cookie=function(e,t,i){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return ke("Expires",e.expires?e.expires.toUTCString():"")+ke("Domain",e.domain)+ke("Path",e.path)+ke("Secure",e.secure)+ke("SameSite",e.sameSite)}(i)}(e,t,_e({path:"/"},i))}var Ee=Se,Te=function(e,t){Se(e,"",_e(_e({},t),{expires:-1}))};const je={get(e){const t=function(e){return function(e){for(var t={},i=e?e.split("; "):[],a=/(%[\dA-F]{2})+/gi,n=0;n<i.length;n++){var o=i[n].split("="),s=o.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{t[o[0].replace(a,decodeURIComponent)]=s.replace(a,decodeURIComponent)}catch(e){}}return t}(document.cookie)[e]}(e);if(void 0!==t)return JSON.parse(t)},save(e,t,i){let a={};"https:"===window.location.protocol&&(a={secure:!0,sameSite:"none"}),(null==i?void 0:i.daysUntilExpire)&&(a.expires=i.daysUntilExpire),(null==i?void 0:i.cookieDomain)&&(a.domain=i.cookieDomain),Ee(e,JSON.stringify(t),a)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Te(e,i)}},Ae="_legacy_",Pe={get:e=>je.get(e)||je.get("".concat(Ae).concat(e)),save(e,t,i){let a={};"https:"===window.location.protocol&&(a={secure:!0}),(null==i?void 0:i.daysUntilExpire)&&(a.expires=i.daysUntilExpire),(null==i?void 0:i.cookieDomain)&&(a.domain=i.cookieDomain),Ee("".concat(Ae).concat(e),JSON.stringify(t),a),je.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Te(e,i),je.remove(e,t),je.remove("".concat(Ae).concat(e),t)}},Oe={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var Ie;!function(e){e.Code="code",e.ConnectCode="connect_code"}(Ie||(Ie={}));class Ce{}var Ue,Re=function(e){return Ue=Ue||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtyZXR1cm4gZSYmIShhcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W10pLmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIodD0+dm9pZCAwIT09ZVt0XSkucmVkdWNlKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT4iIi5jb25jYXQoZSwifCIpLmNvbmNhdCh0KTthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhc3luYyBlPT57bGV0IHIsYyx7ZGF0YTp7dGltZW91dDppLGF1dGg6YSxmZXRjaFVybDpmLGZldGNoT3B0aW9uczpsLHVzZUZvcm1EYXRhOnAsdXNlTXJydDpofSxwb3J0czpbdV19PWUsZD17fTtjb25zdHthdWRpZW5jZTpnLHNjb3BlOnl9PWF8fHt9O3RyeXtjb25zdCBlPXA/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKChlLHQpPT57clt0XT1lfSkscn0pKGwuYm9keSk6SlNPTi5wYXJzZShsLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYoYz0oKGUsdCk9Pm9bbihlLHQpXSkoZyx5KSwhYyYmaCl7Y29uc3QgZT1vLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHQ9KChlLHQpPT57Y29uc3Qgcj1PYmplY3Qua2V5cyhvKS5maW5kKHI9PntpZigibGF0ZXN0X3JlZnJlc2hfdG9rZW4iIT09cil7Y29uc3Qgcz0oKGUsdCk9PnQuc3RhcnRzV2l0aCgiIi5jb25jYXQoZSwifCIpKSkodCxyKSxvPXIuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLG49ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9Pm8uaW5jbHVkZXMoZSkpO3JldHVybiBzJiZufX0pO3JldHVybiEhcn0pKHksZyk7ZSYmIXQmJihjPWUpfWlmKCFjKXRocm93IG5ldyB0KGcseSk7bC5ib2R5PXA/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sZSkse3JlZnJlc2hfdG9rZW46Y30pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sZSkse3JlZnJlc2hfdG9rZW46Y30pKX1sZXQgYSxrOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihhPW5ldyBBYm9ydENvbnRyb2xsZXIsbC5zaWduYWw9YS5zaWduYWwpO3RyeXtrPWF3YWl0IFByb21pc2UucmFjZShbKGo9aSxuZXcgUHJvbWlzZShlPT5zZXRUaW1lb3V0KGUsaikpKSxmZXRjaChmLE9iamVjdC5hc3NpZ24oe30sbCkpXSl9Y2F0Y2goZSl7cmV0dXJuIHZvaWQgdS5wb3N0TWVzc2FnZSh7ZXJyb3I6ZS5tZXNzYWdlfSl9aWYoIWspcmV0dXJuIGEmJmEuYWJvcnQoKSx2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOiJUaW1lb3V0IHdoZW4gZXhlY3V0aW5nICdmZXRjaCcifSk7Xz1rLmhlYWRlcnMsZD1bLi4uX10ucmVkdWNlKChlLHQpPT57bGV0W3Isc109dDtyZXR1cm4gZVtyXT1zLGV9LHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKGU9PntsZXRbdCxyXT1lO3I9PT1PJiYob1t0XT1iKX0pKSwoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkoci5yZWZyZXNoX3Rva2VuLGcseSksZGVsZXRlIHIucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGcseSksdS5wb3N0TWVzc2FnZSh7b2s6ay5vayxqc29uOnIsaGVhZGVyczpkfSl9Y2F0Y2goZSl7dS5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9LGhlYWRlcnM6ZH0pfXZhciBPLGIsXyxqfSl9KCk7Cgo="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",a=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(a)}(),new Worker(Ue,e)};const Le={};class ze{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const i=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);i.add(e),await this.cache.set(this.manifestKey,{keys:[...i]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const i=new Set(t.keys);return i.delete(e),i.size>0?await this.cache.set(this.manifestKey,{keys:[...i]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return"".concat(me,"::").concat(e)}}const De="auth0.is.authenticated",Ne={memory:()=>(new ge).enclosedCache,localstorage:()=>new ve},qe=e=>Ne[e],Me=e=>{const{openUrl:t,onRedirect:i}=e,n=a(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:!1===t||t?t:i})},$e=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},We={NONCE:"nonce",KEYPAIR:"keypair"};class He{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((t,i)=>{e.onupgradeneeded=()=>Object.values(We).forEach(t=>e.result.createObjectStore(t)),e.onerror=()=>i(e.error),e.onsuccess=()=>t(e.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,t,i){const a=i((await this.getDbHandle()).transaction(e,t).objectStore(e));return new Promise((e,t)=>{a.onsuccess=()=>e(a.result),a.onerror=()=>t(a.error)})}buildKey(e){const t=e?"_".concat(e):"auth0";return"".concat(this.clientId,"::").concat(t)}setNonce(e,t){return this.save(We.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(We.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(We.NONCE,this.buildKey(e))}findKeyPair(){return this.find(We.KEYPAIR,this.buildKey())}find(e,t){return this.executeDbRequest(e,"readonly",e=>e.get(t))}async deleteBy(e,t){const i=await this.executeDbRequest(e,"readonly",e=>e.getAllKeys());null==i||i.filter(t).map(t=>this.executeDbRequest(e,"readwrite",e=>e.delete(t)))}deleteByClientId(e,t){return this.deleteBy(e,e=>"string"==typeof e&&e.startsWith("".concat(t,"::")))}clearNonces(){return this.deleteByClientId(We.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(We.KEYPAIR,this.clientId)}}class Ke{constructor(e){this.storage=new He(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await async function(e,t){var i;let a;return a={name:"ECDSA",namedCurve:"P-256"},crypto.subtle.generateKey(a,null!==(i=null==t?void 0:t.extractable)&&void 0!==i&&i,["sign","verify"])}(0,{extractable:!1}),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return function(e){let{keyPair:t,url:i,method:a,nonce:n,accessToken:o}=e;const s=function(e){const t=new URL(e);return t.search="",t.hash="",t.href}(i);return async function(e,t,i,a,n,o){const s=null==e?void 0:e.privateKey,r=null==e?void 0:e.publicKey;if(!ie(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!ae(r))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(!0!==r.extractable)throw new TypeError('"keypair.publicKey.extractable" must be true');if("string"!=typeof t)throw new TypeError('"htu" must be a string');if("string"!=typeof i)throw new TypeError('"htm" must be a string');if(void 0!==a&&"string"!=typeof a)throw new TypeError('"nonce" must be a string or undefined');if(void 0!==n&&"string"!=typeof n)throw new TypeError('"accessToken" must be a string or undefined');if(void 0!==o&&("object"!=typeof o||null===o||Array.isArray(o)))throw new TypeError('"additional" must be an object');return async function(e,t,i){if(!1===i.usages.includes("sign"))throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const a=`${X(G(JSON.stringify(e)))}.${X(G(JSON.stringify(t)))}`;return`${a}.${X(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return Z(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return Z(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new Q}(i),i,G(a)))}`}({alg:te(s),typ:"dpop+jwt",jwk:await ne(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:a,htu:t,ath:n?X(await crypto.subtle.digest("SHA-256",G(n))):void 0}),s)}(t,s,a,n,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!ae(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(!0!==e.extractable)throw new TypeError('"publicKey.extractable" must be true');const t=await ne(e);let i;switch(t.kty){case"EC":i={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":i={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":i={e:t.e,kty:t.kty,n:t.n};break;default:throw new Q("unsupported JWK kty")}return X(await crypto.subtle.digest({name:"SHA-256"},G(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Je;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(Je||(Je={}));class Fe{constructor(e,t){this.hooks=t,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||("undefined"==typeof window?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,t){if(t){if(this.isAbsoluteUrl(t))return t;if(e)return"".concat(e.replace(/\/?\/$/,""),"/").concat(t.replace(/^\/+/,""))}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return"string"==typeof e?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,t){if(!this.config.baseUrl)return new Request(e,t);const i=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),a=e instanceof Request?new Request(i,e):i;return new Request(a,t)}setAuthorizationHeader(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Je.Bearer;e.headers.set("authorization","".concat(i," ").concat(t))}async setDpopProofHeader(e,t){if(!this.config.dpopNonceId)return;const i=await this.hooks.getDpopNonce(),a=await this.hooks.generateDpopProof({accessToken:t,method:e.method,nonce:i,url:e.url});e.headers.set("dpop",a)}async prepareRequest(e,t){const i=await this.getAccessToken(t);let a,n;"string"==typeof i?(a=this.config.dpopNonceId?Je.DPoP:Je.Bearer,n=i):(a=i.token_type,n=i.access_token),this.setAuthorizationHeader(e,n,a),a===Je.DPoP&&await this.setDpopProofHeader(e,n)}getHeader(e,t){return Array.isArray(e)?new Headers(e).get(t)||"":"function"==typeof e.get?e.get(t)||"":e[t]||""}hasUseDpopNonceError(e){if(401!==e.status)return!1;const t=this.getHeader(e.headers,"www-authenticate");return t.includes("invalid_dpop_nonce")||t.includes("use_dpop_nonce")}async handleResponse(e,t){const i=this.getHeader(e.headers,oe);if(i&&await this.hooks.setDpopNonce(i),!this.hasUseDpopNonceError(e))return e;if(!i||!t.onUseDpopNonceError)throw new x(i);return t.onUseDpopNonceError()}async internalFetchWithAuth(e,t,i,a){const n=this.buildBaseRequest(e,t);await this.prepareRequest(n,a);const o=await this.config.fetch(n);return this.handleResponse(o,i)}fetchWithAuth(e,t,i){const a={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,t,Object.assign(Object.assign({},a),{onUseDpopNonceError:void 0}),i)};return this.internalFetchWithAuth(e,t,a,i)}}class Be{constructor(e,t){this.myAccountFetcher=e,this.apiBase=t}async connectAccount(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/connect"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async completeAccount(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/complete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async _handleResponse(e){let t;try{t=await e.text(),t=JSON.parse(t)}catch(i){throw new Ve({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new Ve(t)}}class Ve extends Error{constructor(e){let{type:t,status:i,title:a,detail:n,validation_errors:o}=e;super(n),this.name="MyAccountApiError",this.type=t,this.status=i,this.title=a,this.detail=n,this.validation_errors=o,Object.setPrototypeOf(this,Ve.prototype)}}const Ge={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};function Ze(e,t){this.v=e,this.k=t}function Ye(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}function Xe(e){return new Ze(e,0)}function Qe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function et(e,t){return e.get(Ye(e,t))}function tt(e,t,i){Qe(e,t),t.set(e,i)}function it(e,t,i){return e.set(Ye(e,t),i),i}function at(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function nt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,a)}return i}function ot(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(i),!0).forEach(function(t){at(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):nt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function st(e,t){if(null==e)return{};var i,a,n=function(e,t){if(null==e)return{};var i={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;i[a]=e[a]}return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function rt(e){var t,i;function a(t,i){try{var o=e[t](i),s=o.value,r=s instanceof Ze;Promise.resolve(r?s.v:s).then(function(i){if(r){var c="return"===t?"return":"next";if(!s.k||i.done)return a(c,i);i=e[c](i).value}n(o.done?"return":"normal",i)},function(e){a("throw",e)})}catch(e){n("throw",e)}}function n(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?a(t.key,t.arg):i=null}this._invoke=function(e,n){return new Promise(function(o,s){var r={key:e,arg:n,resolve:o,reject:s,next:null};i?i=i.next=r:(t=i=r,a(e,n))})},"function"!=typeof e.return&&(this.return=void 0)}var ct,pt;let lt;if(rt.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},rt.prototype.next=function(e){return this._invoke("next",e)},rt.prototype.throw=function(e){return this._invoke("throw",e)},rt.prototype.return=function(e){return this._invoke("return",e)},"undefined"==typeof navigator||null===(ct=navigator.userAgent)||void 0===ct||null===(pt=ct.startsWith)||void 0===pt||!pt.call(ct,"Mozilla/5.0 ")){const e="v3.8.5";lt="".concat("oauth4webapi","/").concat(e)}function ut(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch(e){return!1}}const dt="ERR_INVALID_ARG_VALUE",mt="ERR_INVALID_ARG_TYPE";function ht(e,t,i){const a=new TypeError(e,{cause:i});return Object.assign(a,{code:t}),a}const ft=Symbol(),vt=Symbol(),gt=Symbol(),bt=Symbol(),xt=Symbol(),yt=Symbol(),wt=new TextEncoder,_t=new TextDecoder;function kt(e){return"string"==typeof e?wt.encode(e):_t.decode(e)}let St,Et;if(Uint8Array.prototype.toBase64)St=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;St=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const i=[];for(let a=0;a<t.byteLength;a+=e)i.push(String.fromCharCode.apply(null,t.subarray(a,a+e)));return btoa(i.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function Tt(e){return"string"==typeof e?Et(e):St(e)}Et=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw ht("The input to be decoded is not correctly encoded.",dt,e)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i}catch(e){throw ht("The input to be decoded is not correctly encoded.",dt,e)}};class jt extends Error{constructor(e,t){var i;super(e,t),at(this,"code",void 0),this.name=this.constructor.name,this.code=Si,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class At extends Error{constructor(e,t){var i;super(e,t),at(this,"code",void 0),this.name=this.constructor.name,null!=t&&t.code&&(this.code=null==t?void 0:t.code),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}function Pt(e,t,i){return new At(e,{code:t,cause:i})}function Ot(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function It(e){ut(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(lt&&!t.has("user-agent")&&t.set("user-agent",lt),t.has("authorization"))throw ht('"options.headers" must not include the "authorization" header name',dt);return t}function Ct(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw ht('"options.signal" must return or be an instance of AbortSignal',mt);return t}}function Ut(e){return e.includes("//")?e.replace("//","/"):e}function Rt(e,t,i,a,n){try{if("number"!=typeof e||!Number.isFinite(e))throw ht("".concat(i," must be a number"),mt,n);if(e>0)return;if(t){if(0!==e)throw ht("".concat(i," must be a non-negative number"),dt,n);return}throw ht("".concat(i," must be a positive number"),dt,n)}catch(e){if(a)throw Pt(e.message,a,n);throw e}}function Lt(e,t,i,a){try{if("string"!=typeof e)throw ht("".concat(t," must be a string"),mt,a);if(0===e.length)throw ht("".concat(t," must not be empty"),dt,a)}catch(e){if(i)throw Pt(e.message,i,a);throw e}}function zt(e){!function(e,t){if(ri(e)!==t)throw function(e){let t='"response" content-type must be ';for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];if(a.length>2){const e=a.pop();t+="".concat(a.join(", "),", or ").concat(e)}else 2===a.length?t+="".concat(a[0]," or ").concat(a[1]):t+=a[0];return Pt(t,Ai,e)}(e,t)}(e,"application/json")}function Dt(){return Tt(crypto.getRandomValues(new Uint8Array(32)))}function Nt(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new jt("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new jt("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new jt("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new jt("unsupported CryptoKey algorithm name",{cause:e})}}function qt(e){const t=null==e?void 0:e[vt];return"number"==typeof t&&Number.isFinite(t)?t:0}function Mt(e){const t=null==e?void 0:e[gt];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function $t(){return Math.floor(Date.now()/1e3)}function Wt(e){if("object"!=typeof e||null===e)throw ht('"as" must be an object',mt);Lt(e.issuer,'"as.issuer"')}function Ht(e){if("object"!=typeof e||null===e)throw ht('"client" must be an object',mt);Lt(e.client_id,'"client.client_id"')}function Kt(e){return Lt(e,'"clientSecret"'),(t,i,a,n)=>{a.set("client_id",i.client_id),a.set("client_secret",e)}}const Jt=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Ft(e,t){if(t&&"https:"!==e.protocol)throw Pt("only requests to HTTPS are allowed",Oi,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw Pt("only HTTP and HTTPS requests are allowed",Ii,e)}function Bt(e,t,i,a){let n;if("string"!=typeof e||!(n=Jt(e)))throw Pt("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?Li:zi,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Ft(n,a),n}function Vt(e,t,i,a){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Bt(e.mtls_endpoint_aliases[t],t,i,a):Bt(e[t],t,i,a)}class Gt extends Error{constructor(e,t){var i;super(e,t),at(this,"cause",void 0),at(this,"code",void 0),at(this,"error",void 0),at(this,"status",void 0),at(this,"error_description",void 0),at(this,"response",void 0),this.name=this.constructor.name,this.code=ki,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class Zt extends Error{constructor(e,t){var i,a;super(e,t),at(this,"cause",void 0),at(this,"code",void 0),at(this,"error",void 0),at(this,"error_description",void 0),this.name=this.constructor.name,this.code=Ei,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==(i=t.cause.get("error_description"))&&void 0!==i?i:void 0,null===(a=Error.captureStackTrace)||void 0===a||a.call(Error,this,this.constructor)}}class Yt extends Error{constructor(e,t){var i;super(e,t),at(this,"cause",void 0),at(this,"code",void 0),at(this,"response",void 0),at(this,"status",void 0),this.name=this.constructor.name,this.code=_i,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}const Xt="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Qt="("+Xt+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',ei="("+Xt+")\\s*=\\s*("+Xt+")",ti=new RegExp("^[,\\s]*("+Xt+")"),ii=new RegExp("^[,\\s]*"+Qt+"[,\\s]*(.*)"),ai=new RegExp("^[,\\s]*"+ei+"[,\\s]*(.*)"),ni=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function oi(e,t,i){if(e.status!==t){let t;var a;if(function(e){let t;if(t=function(e){if(!ut(e,Response))throw ht('"response" must be an instance of Response',mt);const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let a=t;for(;a;){var n;let t=a.match(ti);const o=null===(n=t)||void 0===n?void 0:n[1].toLowerCase();if(!o)return;const s=a.substring(t[0].length);if(s&&!s.match(/^[\s,]/))return;const r=s.match(/^\s+(.*)$/),c=!!r;a=r?r[1]:void 0;const p={};let l;if(c)for(;a;){let i,n;if(t=a.match(ii)){if([,i,n,a]=t,n.includes("\\"))try{n=JSON.parse('"'.concat(n,'"'))}catch(e){}p[i.toLowerCase()]=n}else{if(!(t=a.match(ai))){if(t=a.match(ni)){if(Object.keys(p).length)break;[,l,a]=t;break}return}[,i,n,a]=t,p[i.toLowerCase()]=n}}else a=s||void 0;const u={scheme:o,parameters:p};l&&(u.token68=l),i.push(u)}return i.length?i:void 0}(e))throw new Yt("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}(e),t=await async function(e){if(e.status>399&&e.status<500){Di(e),zt(e);try{const t=await e.clone().json();if(Ot(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===(a=e.body)||void 0===a?void 0:a.cancel()),new Gt("server responded with an error in the response body",{cause:t,response:e});throw Pt('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),Pi,e)}}function si(e){if(!vi.has(e))throw ht('"options.DPoP" is not a valid DPoPHandle',dt)}function ri(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function ci(e,t,i,a,n,o,s){return await i(e,t,n,o),o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==s?void 0:s[bt])||fetch)(a.href,{body:n,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:Ct(a,null==s?void 0:s.signal)})}async function pi(e,t,i,a,n,o){var s;const r=Vt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[ft]));n.set("grant_type",a);const c=It(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(si(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await ci(e,t,i,r,n,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const li=new WeakMap,ui=new WeakMap;function di(e){if(!e.id_token)return;const t=li.get(e);if(!t)throw ht('"ref" was already garbage collected or did not resolve from the proper sources',dt);return t}async function mi(e,t,i,a,n,o){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,200,"Token Endpoint"),Di(i);const s=await Ki(i);if(Lt(s.access_token,'"response" body "access_token" property',ji,{body:s}),Lt(s.token_type,'"response" body "token_type" property',ji,{body:s}),s.token_type=s.token_type.toLowerCase(),void 0!==s.expires_in){let e="number"!=typeof s.expires_in?parseFloat(s.expires_in):s.expires_in;Rt(e,!0,'"response" body "expires_in" property',ji,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&Lt(s.refresh_token,'"response" body "refresh_token" property',ji,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw Pt('"response" body "scope" property must be a string',ji,{body:s});if(void 0!==s.id_token){Lt(s.id_token,'"response" body "id_token" property',ji,{body:s});const o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(Rt(t.default_max_age,!0,'"client.default_max_age"'),o.push("auth_time")),null!=a&&a.length&&o.push(...a);const{claims:r,jwt:c}=await async function(e,t,i,a,n){let o,s,{0:r,1:c,length:p}=e.split(".");if(5===p){if(void 0===n)throw new jt("JWE decryption is not configured",{cause:e});e=await n(e),({0:r,1:c,length:p}=e.split("."))}if(3!==p)throw Pt("Invalid JWT",ji,e);try{o=JSON.parse(kt(Tt(r)))}catch(e){throw Pt("failed to parse JWT Header body as base64url encoded JSON",Ti,e)}if(!Ot(o))throw Pt("JWT Header must be a top level object",ji,e);if(t(o),void 0!==o.crit)throw new jt('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(kt(Tt(c)))}catch(e){throw Pt("failed to parse JWT Payload body as base64url encoded JSON",Ti,e)}if(!Ot(s))throw Pt("JWT Payload must be a top level object",ji,e);const l=$t()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw Pt('unexpected JWT "exp" (expiration time) claim type',ji,{claims:s});if(s.exp<=l-a)throw Pt('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Ci,{claims:s,now:l,tolerance:a,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw Pt('unexpected JWT "iat" (issued at) claim type',ji,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw Pt('unexpected JWT "iss" (issuer) claim type',ji,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw Pt('unexpected JWT "nbf" (not before) claim type',ji,{claims:s});if(s.nbf>l+a)throw Pt('unexpected JWT "nbf" (not before) claim value',Ci,{claims:s,now:l,tolerance:a,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw Pt('unexpected JWT "aud" (audience) claim type',ji,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Mi.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),qt(t),Mt(t),n).then(xi.bind(void 0,o)).then(fi.bind(void 0,e)).then(hi.bind(void 0,t.client_id));if(Array.isArray(r.aud)&&1!==r.aud.length){if(void 0===r.azp)throw Pt('ID Token "aud" (audience) claim includes additional untrusted audiences',Ui,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw Pt('unexpected ID Token "azp" (authorized party) claim value',Ui,{expected:t.client_id,claims:r,claim:"azp"})}void 0!==r.auth_time&&Rt(r.auth_time,!0,'ID Token "auth_time" (authentication time)',ji,{claims:r}),ui.set(i,c),li.set(s,r)}if(void 0!==(null==o?void 0:o[s.token_type]))o[s.token_type](i,s);else if("dpop"!==s.token_type&&"bearer"!==s.token_type)throw new jt("unsupported `token_type` value",{cause:{body:s}});return s}function hi(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Pt('unexpected JWT "aud" (audience) claim value',Ui,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Pt('unexpected JWT "aud" (audience) claim value',Ui,{expected:e,claims:t.claims,claim:"aud"});return t}function fi(e,t){var i,a;const n=null!==(i=null===(a=e[Fi])||void 0===a?void 0:a.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==n)throw Pt('unexpected JWT "iss" (issuer) claim value',Ui,{expected:n,claims:t.claims,claim:"iss"});return t}const vi=new WeakSet,gi=Symbol(),bi={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function xi(e,t){for(const i of e)if(void 0===t.claims[i])throw Pt('JWT "'.concat(i,'" (').concat(bi[i],") claim missing"),ji,{claims:t.claims});return t}const yi=Symbol(),wi=Symbol(),_i="OAUTH_WWW_AUTHENTICATE_CHALLENGE",ki="OAUTH_RESPONSE_BODY_ERROR",Si="OAUTH_UNSUPPORTED_OPERATION",Ei="OAUTH_AUTHORIZATION_RESPONSE_ERROR",Ti="OAUTH_PARSE_ERROR",ji="OAUTH_INVALID_RESPONSE",Ai="OAUTH_RESPONSE_IS_NOT_JSON",Pi="OAUTH_RESPONSE_IS_NOT_CONFORM",Oi="OAUTH_HTTP_REQUEST_FORBIDDEN",Ii="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Ci="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Ui="OAUTH_JWT_CLAIM_COMPARISON_FAILED",Ri="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",Li="OAUTH_MISSING_SERVER_METADATA",zi="OAUTH_INVALID_SERVER_METADATA";function Di(e){if(e.bodyUsed)throw ht('"response" body has been used already',dt)}function Ni(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new jt("unsupported ".concat(t.name," modulusLength"),{cause:e})}function qi(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new jt("unsupported ECDSA namedCurve",{cause:e})}}function Mi(e,t,i,a){if(void 0===e)if(Array.isArray(t)){if(!t.includes(a.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:a,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw Pt('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:i});if("string"==typeof i?a.alg!==i:"function"==typeof i?!i(a.alg):!i.includes(a.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:a,expected:i,reason:"default value"})}else if("string"==typeof e?a.alg!==e:!e.includes(a.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:a,expected:e,reason:"client configuration"})}function $i(e,t){const{0:i,length:a}=e.getAll(t);if(a>1)throw Pt('"'.concat(t,'" parameter must be provided only once'),ji);return i}const Wi=Symbol(),Hi=Symbol();async function Ki(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt;try{t=await e.json()}catch(t){throw i(e),Pt('failed to parse "response" body as JSON',Ti,t)}if(!Ot(t))throw Pt('"response" body must be a top level object',ji,{body:t});return t}const Ji=Symbol(),Fi=Symbol(),Bi=new TextEncoder,Vi=new TextDecoder;function Gi(e){const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);if(a>127)throw new TypeError("non-ASCII string encountered in encode()");t[i]=a}return t}function Zi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i}function Yi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:Vi.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Vi.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return Zi(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}const Xi=function(e){return new TypeError("CryptoKey does not support this operation, its ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))},Qi=(e,t)=>e.name===t;function ea(e,t){var i;if(i=e.hash,parseInt(i.name.slice(4),10)!==t)throw Xi("SHA-".concat(t),"algorithm.hash")}function ta(e,t){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];if((a=a.filter(Boolean)).length>2){const t=a.pop();e+="one of type ".concat(a.join(", "),", or ").concat(t,".")}else 2===a.length?e+="one of type ".concat(a[0]," or ").concat(a[1],"."):e+="of type ".concat(a[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var o;null!==(o=t.constructor)&&void 0!==o&&o.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const ia=function(e,t){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];return ta("Key for the ".concat(e," algorithm must be "),t,...a)};class aa extends Error{constructor(e,t){var i;super(e,t),at(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}at(aa,"code","ERR_JOSE_GENERIC");class na extends aa{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:i,reason:a,payload:t}}),at(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),at(this,"claim",void 0),at(this,"reason",void 0),at(this,"payload",void 0),this.claim=i,this.reason=a,this.payload=t}}at(na,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class oa extends aa{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:i,reason:a,payload:t}}),at(this,"code","ERR_JWT_EXPIRED"),at(this,"claim",void 0),at(this,"reason",void 0),at(this,"payload",void 0),this.claim=i,this.reason=a,this.payload=t}}at(oa,"code","ERR_JWT_EXPIRED");class sa extends aa{constructor(){super(...arguments),at(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}at(sa,"code","ERR_JOSE_ALG_NOT_ALLOWED");class ra extends aa{constructor(){super(...arguments),at(this,"code","ERR_JOSE_NOT_SUPPORTED")}}at(ra,"code","ERR_JOSE_NOT_SUPPORTED"),at(class extends aa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),at(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),at(class extends aa{constructor(){super(...arguments),at(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class ca extends aa{constructor(){super(...arguments),at(this,"code","ERR_JWS_INVALID")}}at(ca,"code","ERR_JWS_INVALID");class pa extends aa{constructor(){super(...arguments),at(this,"code","ERR_JWT_INVALID")}}at(pa,"code","ERR_JWT_INVALID"),at(class extends aa{constructor(){super(...arguments),at(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class la extends aa{constructor(){super(...arguments),at(this,"code","ERR_JWKS_INVALID")}}at(la,"code","ERR_JWKS_INVALID");class ua extends aa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),at(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}at(ua,"code","ERR_JWKS_NO_MATCHING_KEY");class da extends aa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),at(this,Symbol.asyncIterator,void 0),at(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}at(da,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class ma extends aa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),at(this,"code","ERR_JWKS_TIMEOUT")}}at(ma,"code","ERR_JWKS_TIMEOUT");class ha extends aa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),at(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}at(ha,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const fa=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},va=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),ga=e=>fa(e)||va(e);function ba(e,t,i){try{return Yi(e)}catch(e){throw new i("Failed to base64url decode the ".concat(t))}}function xa(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let i=e;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(e)===i}const ya=e=>xa(e)&&"string"==typeof e.kty;const wa='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function _a(e){var t,i;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:a,keyUsages:n}=function(e){let t,i;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},i=e.priv?["sign"]:["verify"];break;default:throw new ra(wa)}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:"SHA-".concat(e.alg.slice(-3))},i=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(e.alg.slice(-3))},i=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(e.alg.slice(-3),10)||1)},i=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new ra(wa)}break;case"EC":switch(e.alg){case"ES256":case"ES384":case"ES512":t={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[e.alg]},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new ra(wa)}break;case"OKP":switch(e.alg){case"Ed25519":case"EdDSA":t={name:"Ed25519"},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new ra(wa)}break;default:throw new ra('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=ot({},e);return"AKP"!==o.kty&&delete o.alg,delete o.use,crypto.subtle.importKey("jwk",o,a,null!==(t=e.ext)&&void 0!==t?t:!e.d&&!e.priv,null!==(i=e.key_ops)&&void 0!==i?i:n)}const ka="given KeyObject instance cannot be used for this algorithm";let Sa;const Ea=async function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Sa||(Sa=new WeakMap);let n=Sa.get(e);if(null!=n&&n[i])return n[i];const o=await _a(ot(ot({},t),{},{alg:i}));return a&&Object.freeze(e),n?n[i]=o:Sa.set(e,{[i]:o}),o},Ta=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let i=0;i<e.byteLength;i++)if(e[i]!==t[i])return!1;return!0},ja=e=>{const t=e.data[e.pos++];if(128&t){const i=127&t;let a=0;for(let t=0;t<i;t++)a=a<<8|e.data[e.pos++];return a}return t},Aa=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},Pa=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i},Oa=e=>null==e?void 0:e[Symbol.toStringTag],Ia=(e,t,i)=>{if(void 0!==t.use){let e;switch(i){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var a,n;let o;switch(!0){case"sign"===i||"verify"===i:case"dir"===e:case e.includes("CBC-HS"):o=i;break;case e.startsWith("PBES2"):o="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):o=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===i?"wrapKey":"unwrapKey":i;break;case"encrypt"===i&&e.startsWith("RSA"):o="wrapKey";break;case"decrypt"===i:o=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(o&&!1===(null===(a=t.key_ops)||void 0===a||null===(n=a.includes)||void 0===n?void 0:n.call(a,o)))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(o,'" when present'))}return!0};var Ca,Ua;let Ra,La;if("undefined"==typeof navigator||null===(Ca=navigator.userAgent)||void 0===Ca||null===(Ua=Ca.startsWith)||void 0===Ua||!Ua.call(Ca,"Mozilla/5.0 ")){const e="v6.8.2";La="".concat("openid-client","/").concat(e),Ra={"user-agent":La}}const za=e=>Da.get(e);let Da,Na;function qa(e){return void 0!==e?Kt(e):(Na||(Na=new WeakMap),(e,t,i,a)=>{let n;return(n=Na.get(t))||(function(e,t){if("string"!=typeof e)throw Ha("".concat(t," must be a string"),Wa);if(0===e.length)throw Ha("".concat(t," must not be empty"),$a)}(t.client_secret,'"metadata.client_secret"'),n=Kt(t.client_secret),Na.set(t,n)),n(e,t,i,a)})}const Ma=bt,$a="ERR_INVALID_ARG_VALUE",Wa="ERR_INVALID_ARG_TYPE";function Ha(e,t,i){const a=new TypeError(e,{cause:i});return Object.assign(a,{code:t}),a}class Ka extends Error{constructor(e,t){var i;super(e,t),at(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}function Ja(e,t,i){return new Ka(e,{cause:t,code:i})}function Fa(e){if(e instanceof TypeError||e instanceof Ka||e instanceof Gt||e instanceof Zt||e instanceof Yt)throw e;if(e instanceof At)switch(e.code){case Oi:throw Ja("only requests to HTTPS are allowed",e,e.code);case Ii:throw Ja("only requests to HTTP or HTTPS are allowed",e,e.code);case Pi:throw Ja("unexpected HTTP response status code",e.cause,e.code);case Ai:throw Ja("unexpected response content-type",e.cause,e.code);case Ti:throw Ja("parsing error occured",e,e.code);case ji:throw Ja("invalid response encountered",e,e.code);case Ui:throw Ja("unexpected JWT claim value encountered",e,e.code);case Ri:throw Ja("unexpected JSON attribute value encountered",e,e.code);case Ci:throw Ja("JWT timestamp claim value failed validation",e,e.code);default:throw Ja(e.message,e,e.code)}if(e instanceof jt)throw Ja("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Ja("runtime operation error",e,Si);case"NotSupportedError":throw Ja("runtime unsupported operation",e,Si);case"TimeoutError":throw Ja("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Ja("operation aborted",e,"OAUTH_ABORT")}throw new Ka("something went wrong",{cause:e})}new TextDecoder;const Ba=Symbol();class Va{constructor(e,t,i,a){var n,o,s,r,c;if("string"!=typeof t||!t.length)throw Ha('"clientId" must be a non-empty string',Wa);if("string"==typeof i&&(i={client_secret:i}),void 0!==(null===(n=i)||void 0===n?void 0:n.client_id)&&t!==i.client_id)throw Ha('"clientId" and "metadata.client_id" must be the same',$a);const p=ot(ot({},structuredClone(i)),{},{client_id:t});let l;p[vt]=null!==(o=null===(s=i)||void 0===s?void 0:s[vt])&&void 0!==o?o:0,p[gt]=null!==(r=null===(c=i)||void 0===c?void 0:c[gt])&&void 0!==r?r:30,l=a||("string"==typeof p.client_secret&&p.client_secret.length?qa(p.client_secret):(e,t,i,a)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const d=structuredClone(e);Ba in e&&(d[Fi]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let m=Object.freeze(d);Da||(Da=new WeakMap),Da.set(this,{__proto__:null,as:m,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(za(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(i))}}}}(e))}(e),e}clientMetadata(){return structuredClone(za(this).c)}get timeout(){return za(this).timeout}set timeout(e){za(this).timeout=e}get[Ma](){return za(this).fetch}set[Ma](e){za(this).fetch=e}}function Ga(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const i=new Date;i.setSeconds(i.getSeconds()+e.expires_in),t=i.getTime()}return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return di(this)}catch(e){return}}}}}(e))}async function Za(e,t,i){var a;let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=null===(a=e.headers.get("retry-after"))||void 0===a?void 0:a.trim();if(void 0===o)return;let s;if(/^\d+$/.test(o))s=parseInt(o,10);else{const e=new Date(o);if(Number.isFinite(e.getTime())){const t=new Date,i=e.getTime()-t.getTime();i>0&&(s=Math.ceil(i/1e3))}}if(n&&!Number.isFinite(s))throw new At("invalid Retry-After header value",{cause:e});s>t&&await Ya(s-t,i)}function Ya(e,t){return new Promise((i,a)=>{const n=e=>{try{t.throwIfAborted()}catch(e){return void a(e)}if(e<=0)return void i();const o=Math.min(e,5);setTimeout(()=>n(e-o),1e3*o)};n(e)})}async function Xa(e,t){rn(e);const{as:i,c:a,auth:n,fetch:o,tlsOnly:s,timeout:r}=za(e);return async function(e,t,i,a,n){Wt(e),Ht(t);const o=Vt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[ft])),s=new URLSearchParams(a);s.set("client_id",t.client_id);const r=It(null==n?void 0:n.headers);return r.set("accept","application/json"),ci(e,t,i,o,s,r,n)}(i,a,n,t,{[bt]:o,[ft]:!s,headers:new Headers(Ra),signal:cn(r)}).then(e=>async function(e,t,i){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,200,"Backchannel Authentication Endpoint"),Di(i);const a=await Ki(i);Lt(a.auth_req_id,'"response" body "auth_req_id" property',ji,{body:a});let n="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;return Rt(n,!0,'"response" body "expires_in" property',ji,{body:a}),a.expires_in=n,void 0!==a.interval&&Rt(a.interval,!1,'"response" body "interval" property',ji,{body:a}),a}(i,a,e)).catch(Fa)}async function Qa(e,t,i,a){var n,o;rn(e),i=new URLSearchParams(i);let s=null!==(n=t.interval)&&void 0!==n?n:5;const r=null!==(o=null==a?void 0:a.signal)&&void 0!==o?o:AbortSignal.timeout(1e3*t.expires_in);try{await Ya(s,r)}catch(e){Fa(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:d,nonRepudiation:m,timeout:h,decrypt:f}=za(e),v=(n,o)=>Qa(e,ot(ot({},t),{},{interval:n}),i,ot(ot({},a),{},{signal:r,flag:o})),g=await async function(e,t,i,a,n){Wt(e),Ht(t),Lt(a,'"authReqId"');const o=new URLSearchParams(null==n?void 0:n.additionalParameters);return o.set("auth_req_id",a),pi(e,t,i,"urn:openid:params:grant-type:ciba",o,n)}(c,p,l,t.auth_req_id,{[bt]:u,[ft]:!d,additionalParameters:i,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Ra),signal:r.aborted?r:cn(h)}).catch(Fa);var b;if(503===g.status&&g.headers.has("retry-after"))return await Za(g,s,r,!0),await(null===(b=g.body)||void 0===b?void 0:b.cancel()),v(s);const x=async function(e,t,i,a){return mi(e,t,i,void 0,null==a?void 0:a[yt],null==a?void 0:a.recognizedTokenTypes)}(c,p,g,{[yt]:f});let y;try{y=await x}catch(e){if(pn(e,a))return v(s,ln);if(e instanceof Gt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Za(e.response,s,r),v(s)}Fa(e)}return y.id_token&&await(null==m?void 0:m(g)),Ga(y),y}function en(e){za(e).tlsOnly=!1}async function tn(e,t,i,a,n){if(rn(e),!((null==n?void 0:n.flag)===ln||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Ha('"currentUrl" must be an instance of URL, or Request',Wa);let o,s;const{as:r,c,auth:p,fetch:l,tlsOnly:u,jarm:d,hybrid:m,nonRepudiation:h,timeout:f,decrypt:v,implicit:g}=za(e);if((null==n?void 0:n.flag)===ln)o=n.authResponse,s=n.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(t=new URL(t.url),e.method){case"GET":break;case"POST":const i=new URLSearchParams(await async function(e){if("POST"!==e.method)throw ht("form_post responses are expected to use the POST method",dt,{cause:e});if("application/x-www-form-urlencoded"!==ri(e))throw ht("form_post responses are expected to use the application/x-www-form-urlencoded content-type",dt,{cause:e});return async function(e){if(e.bodyUsed)throw ht("form_post Request instances must contain a readable body",dt,{cause:e});return e.text()}(e)}(e));if(m)t.hash=i.toString();else for(const[e,a]of i.entries())t.searchParams.append(e,a);break;default:throw Ha("unexpected Request HTTP method",$a)}}switch(s=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!d:o=await d(t,null==i?void 0:i.expectedState);break;case!!m:o=await m(t,null==i?void 0:i.expectedNonce,null==i?void 0:i.expectedState,null==i?void 0:i.maxAge);break;case!!g:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{o=function(e,t,i,a){if(Wt(e),Ht(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw ht('"parameters" must be an instance of URLSearchParams, or URL',mt);if($i(i,"response"))throw Pt('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',ji,{parameters:i});const n=$i(i,"iss"),o=$i(i,"state");if(!n&&e.authorization_response_iss_parameter_supported)throw Pt('response parameter "iss" (issuer) missing',ji,{parameters:i});if(n&&n!==e.issuer)throw Pt('unexpected "iss" (issuer) response parameter value',ji,{expected:e.issuer,parameters:i});switch(a){case void 0:case Hi:if(void 0!==o)throw Pt('unexpected "state" response parameter encountered',ji,{expected:void 0,parameters:i});break;case Wi:break;default:if(Lt(a,'"expectedState" argument'),o!==a)throw Pt(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',ji,{expected:a,parameters:i})}if($i(i,"error"))throw new Zt("authorization response from the server is an error",{cause:i});const s=$i(i,"id_token"),r=$i(i,"token");if(void 0!==s||void 0!==r)throw new jt("implicit and hybrid flows are not supported");return c=new URLSearchParams(i),vi.add(c),c;var c}(r,c,t.searchParams,null==i?void 0:i.expectedState)}catch(e){Fa(e)}}}const b=await async function(e,t,i,a,n,o,s){if(Wt(e),Ht(t),!vi.has(a))throw ht('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',dt);Lt(n,'"redirectUri"');const r=$i(a,"code");if(!r)throw Pt('no authorization code in "callbackParameters"',ji);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",n),c.set("code",r),o!==gi&&(Lt(o,'"codeVerifier"'),c.set("code_verifier",o)),pi(e,t,i,"authorization_code",c,s)}(r,c,p,o,s,(null==i?void 0:i.pkceCodeVerifier)||gi,{additionalParameters:a,[bt]:l,[ft]:!u,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Ra),signal:cn(f)}).catch(Fa);"string"!=typeof(null==i?void 0:i.expectedNonce)&&"number"!=typeof(null==i?void 0:i.maxAge)||(i.idTokenExpected=!0);const x=async function(e,t,i,a){return"string"==typeof(null==a?void 0:a.expectedNonce)||"number"==typeof(null==a?void 0:a.maxAge)||null!=a&&a.requireIdToken?async function(e,t,i,a,n,o,s){const r=[];switch(a){case void 0:a=yi;break;case yi:break;default:Lt(a,'"expectedNonce" argument'),r.push("nonce")}switch(null!=n||(n=t.default_max_age),n){case void 0:n=wi;break;case wi:break;default:Rt(n,!0,'"maxAge" argument'),r.push("auth_time")}const c=await mi(e,t,i,r,o,s);Lt(c.id_token,'"response" body "id_token" property',ji,{body:c});const p=di(c);if(n!==wi){const e=$t()+qt(t),i=Mt(t);if(p.auth_time+n<e-i)throw Pt("too much time has elapsed since the last End-User authentication",Ci,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(a===yi){if(void 0!==p.nonce)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==a)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:a,claims:p,claim:"nonce"});return c}(e,t,i,a.expectedNonce,a.maxAge,a[yt],a.recognizedTokenTypes):async function(e,t,i,a,n){const o=await mi(e,t,i,void 0,a,n),s=di(o);if(s){if(void 0!==t.default_max_age){Rt(t.default_max_age,!0,'"client.default_max_age"');const e=$t()+qt(t),i=Mt(t);if(s.auth_time+t.default_max_age<e-i)throw Pt("too much time has elapsed since the last End-User authentication",Ci,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==a?void 0:a[yt],null==a?void 0:a.recognizedTokenTypes)}(r,c,b,{expectedNonce:null==i?void 0:i.expectedNonce,maxAge:null==i?void 0:i.maxAge,requireIdToken:null==i?void 0:i.idTokenExpected,[yt]:v});let y;try{y=await x}catch(t){if(pn(t,n))return tn(e,void 0,i,a,ot(ot({},n),{},{flag:ln,authResponse:o,redirectUri:s}));Fa(t)}return y.id_token&&await(null==h?void 0:h(b)),Ga(y),y}async function an(e,t,i,a){rn(e),i=new URLSearchParams(i);const{as:n,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=za(e),d=await async function(e,t,i,a,n){Wt(e),Ht(t),Lt(a,'"refreshToken"');const o=new URLSearchParams(null==n?void 0:n.additionalParameters);return o.set("refresh_token",a),pi(e,t,i,"refresh_token",o,n)}(n,o,s,t,{[bt]:r,[ft]:!c,additionalParameters:i,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Ra),signal:cn(l)}).catch(Fa),m=async function(e,t,i,a){return mi(e,t,i,void 0,null==a?void 0:a[yt],null==a?void 0:a.recognizedTokenTypes)}(n,o,d,{[yt]:u});let h;try{h=await m}catch(n){if(pn(n,a))return an(e,t,i,ot(ot({},a),{},{flag:ln}));Fa(n)}return h.id_token&&await(null==p?void 0:p(d)),Ga(h),h}async function nn(e,t,i){rn(e),t=new URLSearchParams(t);const{as:a,c:n,auth:o,fetch:s,tlsOnly:r,timeout:c}=za(e),p=await async function(e,t,i,a,n){return Wt(e),Ht(t),pi(e,t,i,"client_credentials",new URLSearchParams(a),n)}(a,n,o,t,{[bt]:s,[ft]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Ra),signal:cn(c)}).catch(Fa),l=async function(e,t,i){return mi(e,t,i,void 0,void 0,void 0)}(a,n,p);let u;try{u=await l}catch(a){if(pn(a,i))return nn(e,t,ot(ot({},i),{},{flag:ln}));Fa(a)}return Ga(u),u}function on(e,t){rn(e);const{as:i,c:a,tlsOnly:n,hybrid:o,jarm:s,implicit:r}=za(e),c=Vt(i,"authorization_endpoint",!1,n);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",a.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",o?"code id_token":r?"id_token":"code"),r&&!t.has("nonce"))throw Ha("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",$a);s&&t.set("response_mode","jwt")}for(const[e,i]of t.entries())c.searchParams.append(e,i);return c}async function sn(e,t,i){rn(e);const a=on(e,t),{as:n,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=za(e),l=await async function(e,t,i,a,n){var o;Wt(e),Ht(t);const s=Vt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[ft])),r=new URLSearchParams(a);r.set("client_id",t.client_id);const c=It(null==n?void 0:n.headers);c.set("accept","application/json"),void 0!==(null==n?void 0:n.DPoP)&&(si(n.DPoP),await n.DPoP.addProof(s,c,"POST"));const p=await ci(e,t,i,s,r,c,n);return null==n||null===(o=n.DPoP)||void 0===o||o.cacheNonce(p,s),p}(n,o,s,a.searchParams,{[bt]:r,[ft]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Ra),signal:cn(p)}).catch(Fa),u=async function(e,t,i){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,201,"Pushed Authorization Request Endpoint"),Di(i);const a=await Ki(i);Lt(a.request_uri,'"response" body "request_uri" property',ji,{body:a});let n="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;return Rt(n,!0,'"response" body "expires_in" property',ji,{body:a}),a.expires_in=n,a}(n,o,l);let d;try{d=await u}catch(a){if(pn(a,i))return sn(e,t,ot(ot({},i),{},{flag:ln}));Fa(a)}return on(e,{request_uri:d.request_uri})}function rn(e){if(!(e instanceof Va))throw Ha('"config" must be an instance of Configuration',Wa);if(Object.getPrototypeOf(e)!==Va.prototype)throw Ha("subclassing Configuration is not allowed",$a)}function cn(e){return e?AbortSignal.timeout(1e3*e):void 0}function pn(e,t){return!(null==t||!t.DPoP||t.flag===ln)&&function(e){if(e instanceof Yt){const{0:t,length:i}=e.cause;return 1===i&&"dpop"===t.scheme&&"use_dpop_nonce"===t.parameters.error}return e instanceof Gt&&"use_dpop_nonce"===e.error}(e)}Object.freeze(Va.prototype);const ln=Symbol();async function un(e,t,i,a){rn(e);const{as:n,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=za(e),u=await async function(e,t,i,a,n,o){return Wt(e),Ht(t),Lt(a,'"grantType"'),pi(e,t,i,a,new URLSearchParams(n),o)}(n,o,s,t,new URLSearchParams(i),{[bt]:r,[ft]:!c,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Ra),signal:cn(p)}).then(e=>{let i;return"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(i={n_a:()=>{}}),async function(e,t,i,a){return mi(e,t,i,void 0,null==a?void 0:a[yt],null==a?void 0:a.recognizedTokenTypes)}(n,o,e,{[yt]:l,recognizedTokenTypes:i})}).catch(Fa);return Ga(u),u}async function dn(e,t,i){if(!xa(e))throw new ca("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new ca('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new ca("JWS Protected Header incorrect type");if(void 0===e.payload)throw new ca("JWS Payload missing");if("string"!=typeof e.signature)throw new ca("JWS Signature missing or incorrect type");if(void 0!==e.header&&!xa(e.header))throw new ca("JWS Unprotected Header incorrect type");let a={};if(e.protected)try{const t=Yi(e.protected);a=JSON.parse(Vi.decode(t))}catch(e){throw new ca("JWS Protected Header is invalid")}if(!function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const a=t.filter(Boolean);if(0===a.length||1===a.length)return!0;let n;for(const e of a){const t=Object.keys(e);if(n&&0!==n.size)for(const e of t){if(n.has(e))return!1;n.add(e)}else n=new Set(t)}return!0}(a,e.header))throw new ca("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n=ot(ot({},a),e.header),o=function(e,t,i,a,n){if(void 0!==n.crit&&void 0===(null==a?void 0:a.crit))throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!a||void 0===a.crit)return new Set;if(!Array.isArray(a.crit)||0===a.crit.length||a.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;o=void 0!==i?new Map([...Object.entries(i),...t.entries()]):t;for(const t of a.crit){if(!o.has(t))throw new ra('Extension Header Parameter "'.concat(t,'" is not recognized'));if(void 0===n[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(o.get(t)&&void 0===a[t])throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return new Set(a.crit)}(ca,new Map([["b64",!0]]),null==i?void 0:i.crit,a,n);let s=!0;if(o.has("b64")&&(s=a.b64,"boolean"!=typeof s))throw new ca('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=n;if("string"!=typeof r||!r)throw new ca('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=i&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat("algorithms",'" option must be an array of strings'));if(t)return new Set(t)}(0,i.algorithms);if(c&&!c.has(r))throw new sa('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new ca("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new ca("JWS Payload must be a string or an Uint8Array instance");let p=!1;"function"==typeof t&&(t=await t(a,e),p=!0),function(e,t,i){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((e,t,i)=>{if(!(t instanceof Uint8Array)){if(ya(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Ia(e,t,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!ga(t))throw new TypeError(ia(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(Oa(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(ya(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Ia(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv)(t)&&Ia(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!ga(t))throw new TypeError(ia(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(Oa(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(Oa(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Oa(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(Oa(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Oa(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,i)}}(r,t,"verify");const l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const a=t.reduce((e,t)=>{let{length:i}=t;return e+i},0),n=new Uint8Array(a);let o=0;for(const e of t)n.set(e,o),o+=e.length;return n}(void 0!==e.protected?Gi(e.protected):new Uint8Array,Gi("."),"string"==typeof e.payload?s?Gi(e.payload):Bi.encode(e.payload):e.payload),u=ba(e.signature,"signature",ca),d=await async function(e,t){if(e instanceof Uint8Array)return e;if(fa(e))return e;if(va(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{Sa||(Sa=new WeakMap);let i=Sa.get(e);if(null!=i&&i[t])return i[t];const a="public"===e.type,n=!!a;let o;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError(ka)}o=e.toCryptoKey(e.asymmetricKeyType,n,a?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(ka);o=e.toCryptoKey(e.asymmetricKeyType,n,[a?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw new TypeError(ka);o=e.toCryptoKey(e.asymmetricKeyType,n,[a?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let i;switch(t){case"RSA-OAEP":i="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":i="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":i="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":i="SHA-512";break;default:throw new TypeError(ka)}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:i},n,a?["encrypt"]:["decrypt"]);o=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:i},n,[a?"verify":"sign"])}if("ec"===e.asymmetricKeyType){var s;const i=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(null===(s=e.asymmetricKeyDetails)||void 0===s?void 0:s.namedCurve);if(!i)throw new TypeError(ka);const r={ES256:"P-256",ES384:"P-384",ES512:"P-521"};r[t]&&i===r[t]&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},n,[a?"verify":"sign"])),t.startsWith("ECDH-ES")&&(o=e.toCryptoKey({name:"ECDH",namedCurve:i},n,a?[]:["deriveBits"]))}if(!o)throw new TypeError(ka);return i?i[t]=o:Sa.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return Ea(e,i,t)}if(ya(e))return e.k?Yi(e.k):Ea(e,e,t,!0);throw new Error("unreachable")}(t,r);if(!await async function(e,t,i,a){const n=await async function(e,t,i){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];return ta("Key must be ",e,...i)}(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:"SHA-".concat(e.slice(-3)),name:"HMAC"},!1,[i])}return function(e,t,i){switch(t){case"HS256":case"HS384":case"HS512":if(!Qi(e.algorithm,"HMAC"))throw Xi("HMAC");ea(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if(!Qi(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Xi("RSASSA-PKCS1-v1_5");ea(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if(!Qi(e.algorithm,"RSA-PSS"))throw Xi("RSA-PSS");ea(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if(!Qi(e.algorithm,"Ed25519"))throw Xi("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Qi(e.algorithm,t))throw Xi(t);break;case"ES256":case"ES384":case"ES512":{if(!Qi(e.algorithm,"ECDSA"))throw Xi("ECDSA");const i=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==i)throw Xi(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t&&!e.usages.includes(t))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(t,"."))}(e,i)}(t,e,i),t}(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:i}=t.algorithm;if("number"!=typeof i||i<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}}(e,n);const o=function(e,t){const i="SHA-".concat(e.slice(-3));switch(e){case"HS256":case"HS384":case"HS512":return{hash:i,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:i,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:i,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:i,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new ra("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}(e,n.algorithm);try{return await crypto.subtle.verify(o,n,i,a)}catch(e){return!1}}(r,d,u,l))throw new ha;let m;m=s?ba(e.payload,"payload",ca):"string"==typeof e.payload?Bi.encode(e.payload):e.payload;const h={payload:m};return void 0!==e.protected&&(h.protectedHeader=a),void 0!==e.header&&(h.unprotectedHeader=e.header),p?ot(ot({},h),{},{key:d}):h}const mn=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function hn(e){const t=mn.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const i=parseFloat(t[2]);let a;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":a=Math.round(i);break;case"minute":case"minutes":case"min":case"mins":case"m":a=Math.round(60*i);break;case"hour":case"hours":case"hr":case"hrs":case"h":a=Math.round(3600*i);break;case"day":case"days":case"d":a=Math.round(86400*i);break;case"week":case"weeks":case"w":a=Math.round(604800*i);break;default:a=Math.round(31557600*i)}return"-"===t[1]||"ago"===t[4]?-a:a}const fn=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function vn(e,t){let i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Vi.decode(t))}catch(e){}if(!xa(i))throw new pa("JWT Claims Set must be a top-level JSON object");const{typ:n}=a;if(n&&("string"!=typeof e.typ||fn(e.typ)!==fn(n)))throw new na('unexpected "typ" JWT header value',i,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:r,audience:c,maxTokenAge:p}=a,l=[...o];void 0!==p&&l.push("iat"),void 0!==c&&l.push("aud"),void 0!==r&&l.push("sub"),void 0!==s&&l.push("iss");for(const e of new Set(l.reverse()))if(!(e in i))throw new na('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new na('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new na('unexpected "sub" claim value',i,"sub","check_failed");if(c&&(d="string"==typeof c?[c]:c,!("string"==typeof(u=i.aud)?d.includes(u):Array.isArray(u)&&d.some(Set.prototype.has.bind(new Set(u))))))throw new na('unexpected "aud" claim value',i,"aud","check_failed");var u,d;let m;switch(typeof a.clockTolerance){case"string":m=hn(a.clockTolerance);break;case"number":m=a.clockTolerance;break;case"undefined":m=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=a,f=(v=h||new Date,Math.floor(v.getTime()/1e3));var v;if((void 0!==i.iat||p)&&"number"!=typeof i.iat)throw new na('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new na('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>f+m)throw new na('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new na('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=f-m)throw new oa('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=f-i.iat;if(e-m>("number"==typeof p?p:hn(p)))throw new oa('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-m)throw new na('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}function gn(e){return xa(e)}var bn,xn,yn=new WeakMap,wn=new WeakMap;class _n{constructor(e){if(tt(this,yn,void 0),tt(this,wn,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(gn)}(e))throw new la("JSON Web Key Set malformed");it(yn,this,structuredClone(e))}jwks(){return et(yn,this)}async getKey(e,t){const{alg:i,kid:a}=ot(ot({},e),null==t?void 0:t.header),n=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new ra('Unsupported "alg" value for a JSON Web Key Set')}}(i),o=et(yn,this).keys.filter(e=>{let t=n===e.kty;if(t&&"string"==typeof a&&(t=a===e.kid),!t||"string"!=typeof e.alg&&"AKP"!==n||(t=i===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(i){case"ES256":t="P-256"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":case"EdDSA":t="Ed25519"===e.crv}return t}),{0:s,length:r}=o;if(0===r)throw new ua;if(1!==r){const e=new da,t=et(wn,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new rt(e.apply(this,arguments))}}(function*(){for(const e of o)try{yield yield Xe(kn(t,e,i))}catch(e){}}),e}return kn(et(wn,this),s,i)}}async function kn(e,t,i){const a=e.get(t)||e.set(t,{}).get(t);if(void 0===a[i]){const e=await async function(e,t){if(!xa(e))throw new TypeError("JWK must be an object");let i;switch(null!=t||(t=e.alg),null!=i||(i=e.ext),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Yi(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new ra('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return _a(ot(ot({},e),{},{alg:t,ext:i}));case"AKP":if("string"!=typeof e.alg||!e.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==t&&t!==e.alg)throw new TypeError("JWK alg and alg option value mismatch");return _a(ot(ot({},e),{},{ext:i}));case"EC":case"OKP":return _a(ot(ot({},e),{},{alg:t,ext:i}));default:throw new ra('Unsupported "kty" (Key Type) Parameter value')}}(ot(ot({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new la("JSON Web Key Set members must be public keys");a[i]=e}return a[i]}function Sn(e){const t=new _n(e),i=async(e,i)=>t.getKey(e,i);return Object.defineProperties(i,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),i}let En;if("undefined"==typeof navigator||null===(bn=navigator.userAgent)||void 0===bn||null===(xn=bn.startsWith)||void 0===xn||!xn.call(bn,"Mozilla/5.0 ")){const e="v6.2.1";En="".concat("jose","/").concat(e)}const Tn=Symbol(),jn=Symbol();var An=new WeakMap,Pn=new WeakMap,On=new WeakMap,In=new WeakMap,Cn=new WeakMap,Un=new WeakMap,Rn=new WeakMap,Ln=new WeakMap,zn=new WeakMap,Dn=new WeakMap;class Nn{constructor(e,t){if(tt(this,An,void 0),tt(this,Pn,void 0),tt(this,On,void 0),tt(this,In,void 0),tt(this,Cn,void 0),tt(this,Un,void 0),tt(this,Rn,void 0),tt(this,Ln,void 0),tt(this,zn,void 0),tt(this,Dn,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,a;it(An,this,new URL(e.href)),it(Pn,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),it(On,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),it(In,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),it(Rn,this,new Headers(null==t?void 0:t.headers)),En&&!et(Rn,this).has("User-Agent")&&et(Rn,this).set("User-Agent",En),et(Rn,this).has("accept")||(et(Rn,this).set("accept","application/json"),et(Rn,this).append("accept","application/jwk-set+json")),it(Ln,this,null==t?void 0:t[Tn]),void 0!==(null==t?void 0:t[jn])&&(it(Dn,this,null==t?void 0:t[jn]),i=null==t?void 0:t[jn],a=et(In,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=a)&&"jwks"in i&&xa(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,xa)&&(it(Cn,this,et(Dn,this).uat),it(zn,this,Sn(et(Dn,this).jwks))))}pendingFetch(){return!!et(Un,this)}coolingDown(){return"number"==typeof et(Cn,this)&&Date.now()<et(Cn,this)+et(On,this)}fresh(){return"number"==typeof et(Cn,this)&&Date.now()<et(Cn,this)+et(In,this)}jwks(){var e;return null===(e=et(zn,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){et(zn,this)&&this.fresh()||await this.reload();try{return await et(zn,this).call(this,e,t)}catch(i){if(i instanceof ua&&!1===this.coolingDown())return await this.reload(),et(zn,this).call(this,e,t);throw i}}async reload(){et(Un,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&it(Un,this,void 0),et(Un,this)||it(Un,this,async function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fetch;const n=await a(e,{method:"GET",signal:i,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new ma;throw e});if(200!==n.status)throw new aa("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch(e){throw new aa("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(et(An,this).href,et(Rn,this),AbortSignal.timeout(et(Pn,this)),et(Ln,this)).then(e=>{it(zn,this,Sn(e)),et(Dn,this)&&(et(Dn,this).uat=Date.now(),et(Dn,this).jwks=e),it(Cn,this,Date.now()),it(Un,this,void 0)}).catch(e=>{throw it(Un,this,void 0),e})),await et(Un,this)}}const qn=["mfaToken"],Mn=["mfaToken"];var $n,Wn,Hn,Kn,Jn,Fn,Bn,Vn,Gn,Zn,Yn,Xn,Qn,eo,to,io,ao=class extends Error{constructor(e,t){super(t),at(this,"code",void 0),this.name="NotSupportedError",this.code=e}},no=class extends Error{constructor(e,t,i){super(t),at(this,"cause",void 0),at(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},oo=class extends no{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},so=class extends no{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},ro=class extends no{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},co=class extends no{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},po=class extends no{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},lo=class extends Error{constructor(e){super(e),at(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},uo=class extends no{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),at(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},mo=class extends no{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},ho=class extends no{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},fo=class extends no{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},vo=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),at(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function go(e){return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).reduce((e,t)=>ot(ot({},e),{},{[t[0]]:t[1]}),{})}var bo=class extends Error{constructor(e,t,i){super(t),at(this,"cause",void 0),at(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},xo=class extends bo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},yo=class extends bo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},wo=class extends bo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},_o=class extends bo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function ko(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var So=($n=new WeakMap,Wn=new WeakMap,Hn=new WeakMap,class{constructor(e){var t;tt(this,$n,void 0),tt(this,Wn,void 0),tt(this,Hn,void 0),it($n,this,"https://".concat(e.domain)),it(Wn,this,e.clientId),it(Hn,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(et($n,this),"/mfa/authenticators"),{mfaToken:i}=e,a=await et(Hn,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!a.ok){const e=await a.json();throw new xo(e.error_description||"Failed to list authenticators",e)}return(await a.json()).map(ko)}async enrollAuthenticator(e){const t="".concat(et($n,this),"/mfa/associate"),{mfaToken:i}=e,a=st(e,qn),n={authenticator_types:a.authenticatorTypes};"oobChannels"in a&&(n.oob_channels=a.oobChannels),"phoneNumber"in a&&a.phoneNumber&&(n.phone_number=a.phoneNumber),"email"in a&&a.email&&(n.email=a.email);const o=await et(Hn,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const e=await o.json();throw new yo(e.error_description||"Failed to enroll authenticator",e)}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await o.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:i}=e,a="".concat(et($n,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),n=await et(Hn,this).call(this,a,{method:"DELETE",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!n.ok){const e=await n.json();throw new wo(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(et($n,this),"/mfa/challenge"),{mfaToken:i}=e,a=st(e,Mn),n={mfa_token:i,client_id:et(Wn,this),challenge_type:a.challengeType};a.authenticatorId&&(n.authenticator_id=a.authenticatorId);const o=await et(Hn,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const e=await o.json();throw new _o(e.error_description||"Failed to challenge authenticator",e)}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await o.json())}}),Eo=class e{constructor(e,t,i,a,n,o,s){at(this,"accessToken",void 0),at(this,"idToken",void 0),at(this,"refreshToken",void 0),at(this,"expiresAt",void 0),at(this,"scope",void 0),at(this,"claims",void 0),at(this,"authorizationDetails",void 0),at(this,"tokenType",void 0),at(this,"issuedTokenType",void 0),this.accessToken=e,this.idToken=i,this.refreshToken=a,this.expiresAt=t,this.scope=n,this.claims=o,this.authorizationDetails=s}static fromTokenEndpointResponse(t){const i=t.id_token?t.claims():void 0,a=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,i,t.authorization_details);return a.tokenType=t.token_type,a.issuedTokenType=t.issued_token_type,a}},To=(Kn=new WeakMap,Jn=new WeakMap,Fn=new WeakMap,class{constructor(e,t){tt(this,Kn,new Map),tt(this,Jn,void 0),tt(this,Fn,void 0),it(Fn,this,Math.max(1,Math.floor(e))),it(Jn,this,Math.max(0,Math.floor(t)))}get(e){const t=et(Kn,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return et(Kn,this).delete(e),et(Kn,this).set(e,t),t.value;et(Kn,this).delete(e)}}set(e,t){for(et(Kn,this).has(e)&&et(Kn,this).delete(e),et(Kn,this).set(e,{value:t,expiresAt:Date.now()+et(Jn,this)});et(Kn,this).size>et(Fn,this);){const e=et(Kn,this).keys().next().value;if(void 0===e)break;et(Kn,this).delete(e)}}}),jo=new Map;function Ao(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var Po=class{static createDiscoveryCache(e){const t=(i=e.maxEntries,a=e.ttlMs,"".concat(i,":").concat(a));var i,a;let n=(o=t,jo.get(o));var o;return n||(n=new To(e.maxEntries,e.ttlMs),jo.set(t,n)),n}static createJwksCache(){return{}}},Oo="openid profile email offline_access",Io=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function Co(e){if(null==e)throw new po("subject_token is required");if("string"!=typeof e)throw new po("subject_token must be a string");if(0===e.trim().length)throw new po("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new po("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new po("subject_token must not include the 'Bearer ' prefix")}function Uo(e,t){if(t)for(const[i,a]of Object.entries(t))if(!Io.has(i))if(Array.isArray(a)){if(a.length>20)throw new po("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));a.forEach(t=>{e.append(i,t)})}else e.append(i,a)}var Ro="urn:ietf:params:oauth:token-type:access_token",Lo=(Bn=new WeakMap,Vn=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Qn=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakSet,class{constructor(e){var t,i,a,n;if(function(e,t){Qe(e,t),t.add(e)}(this,io),tt(this,Bn,void 0),tt(this,Vn,void 0),tt(this,Gn,void 0),tt(this,Zn,void 0),tt(this,Yn,void 0),tt(this,Xn,void 0),tt(this,Qn,void 0),tt(this,eo,void 0),tt(this,to,void 0),at(this,"mfa",void 0),it(Zn,this,e),e.useMtls&&!e.customFetch)throw new ao("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");it(Yn,this,function(e,t){if(!1===t.enabled)return e;const i={name:t.name,version:t.version},a=btoa(JSON.stringify(i));return async(t,i)=>{const n=t instanceof Request?new Headers(t.headers):new Headers;return null!=i&&i.headers&&new Headers(i.headers).forEach((e,t)=>{n.set(t,e)}),n.set("Auth0-Client",a),e(t,ot(ot({},i),{},{headers:n}))}}(null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)},!1===(null==(i=e.telemetry)?void 0:i.enabled)?i:{enabled:!0,name:null!==(a=null==i?void 0:i.name)&&void 0!==a?a:"@auth0/auth0-auth-js",version:null!==(n=null==i?void 0:i.version)&&void 0!==n?n:"1.5.0"}));const o=Ao(e.discoveryCache);it(Qn,this,Po.createDiscoveryCache(o)),it(eo,this,new Map),it(to,this,Po.createJwksCache()),this.mfa=new So({domain:et(Zn,this).domain,clientId:et(Zn,this).clientId,customFetch:et(Yn,this)})}async getServerMetadata(){const{serverMetadata:e}=await Ye(io,this,No).call(this);return e}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Ye(io,this,No).call(this);if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new ao("par_not_supported_error","The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par");try{return await Ye(io,this,Wo).call(this,e)}catch(e){throw new mo(e)}}async buildLinkUserUrl(e){try{const t=await Ye(io,this,Wo).call(this,{authorizationParams:ot(ot({},e.authorizationParams),{},{requested_connection:e.connection,requested_connection_scope:e.connectionScope,scope:"openid link_account offline_access",id_token_hint:e.idToken})});return{linkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(e){throw new ho(e)}}async buildUnlinkUserUrl(e){try{const t=await Ye(io,this,Wo).call(this,{authorizationParams:ot(ot({},e.authorizationParams),{},{requested_connection:e.connection,scope:"openid unlink_account",id_token_hint:e.idToken})});return{unlinkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(e){throw new fo(e)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this),a=go(ot(ot({},et(Zn,this).authorizationParams),null==e?void 0:e.authorizationParams)),n=new URLSearchParams(ot(ot({scope:Oo},a),{},{client_id:et(Zn,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&n.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&n.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await Xa(t,n),i=await Qa(t,e);return Eo.fromTokenEndpointResponse(i)}catch(e){throw new uo(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this),a=go(ot(ot({},et(Zn,this).authorizationParams),null==e?void 0:e.authorizationParams)),n=new URLSearchParams(ot(ot({scope:Oo},a),{},{client_id:et(Zn,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&n.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&n.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await Xa(t,n);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new uo(e)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:i}=await Ye(io,this,No).call(this),a=new URLSearchParams({auth_req_id:t});try{const e=await un(i,"urn:openid:params:grant-type:ciba",a);return Eo.fromTokenEndpointResponse(e)}catch(e){throw new uo(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new co("Either a refresh or access token should be specified, but not both.");const i=null!==(t=e.accessToken)&&void 0!==t?t:e.refreshToken;if(!i)throw new co("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?Ro:"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof po)throw new co(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?Ye(io,this,qo).call(this,e):Ye(io,this,Mo).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await Ye(io,this,No).call(this);try{const a=await tn(i,e,{pkceCodeVerifier:t.codeVerifier});return Eo.fromTokenEndpointResponse(a)}catch(e){throw new oo("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await Ye(io,this,No).call(this),i=new URLSearchParams;e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope);try{const a=await an(t,e.refreshToken,i);return Eo.fromTokenEndpointResponse(a)}catch(e){throw new ro("The access token has expired and there was an error while trying to refresh it.",e)}}async getTokenByClientCredentials(e){const{configuration:t}=await Ye(io,this,No).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const a=await nn(t,i);return Eo.fromTokenEndpointResponse(a)}catch(e){throw new so("There was an error while trying to request a token.",e)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(et(Zn,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",et(Zn,this).clientId),t}return function(e,t){rn(e);const{as:i,c:a,tlsOnly:n}=za(e),o=Vt(i,"end_session_endpoint",!1,n);(t=new URLSearchParams(t)).has("client_id")||t.set("client_id",a.client_id);for(const[e,i]of t.entries())o.searchParams.append(e,i);return o}(t,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const{serverMetadata:t}=await Ye(io,this,No).call(this),i=Ao(et(Zn,this).discoveryCache),a=t.jwks_uri;et(Xn,this)||it(Xn,this,function(e,t){const i=new Nn(e,t),a=async(e,t)=>i.getKey(e,t);return Object.defineProperties(a,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>i.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>i.jwks(),enumerable:!0,configurable:!1,writable:!1}}),a}(new URL(a),{cacheMaxAge:i.ttlMs,[Tn]:et(Yn,this),[jn]:et(to,this)}));const{payload:n}=await async function(e,t,i){var a;const n=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Vi.decode(e)),"string"!=typeof e)throw new ca("Compact JWS must be a string or Uint8Array");const{0:a,1:n,2:o,length:s}=e.split(".");if(3!==s)throw new ca("Invalid Compact JWS");const r=await dn({payload:n,protected:a,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?ot(ot({},c),{},{key:r.key}):c}(e,t,i);if(null!==(a=n.protectedHeader.crit)&&void 0!==a&&a.includes("b64")&&!1===n.protectedHeader.b64)throw new pa("JWTs MUST NOT use unencoded payload");const o={payload:vn(n.protectedHeader,n.payload,i),protectedHeader:n.protectedHeader};return"function"==typeof t?ot(ot({},o),{},{key:n.key}):o}(e.logoutToken,et(Xn,this),{issuer:t.issuer,audience:et(Zn,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in n)&&!("sub"in n))throw new lo('either "sid" or "sub" (or both) claims must be present');if("sid"in n&&"string"!=typeof n.sid)throw new lo('"sid" claim must be a string');if("sub"in n&&"string"!=typeof n.sub)throw new lo('"sub" claim must be a string');if("nonce"in n)throw new lo('"nonce" claim is prohibited');if(!("events"in n))throw new lo('"events" claim is missing');if("object"!=typeof n.events||null===n.events)throw new lo('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in n.events))throw new lo('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if("object"!=typeof n.events["http://schemas.openid.net/event/backchannel-logout"])throw new lo('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:n.sid,sub:n.sub}}});function zo(){const e=et(Zn,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(et(Zn,this).useMtls?"1":"0")}async function Do(e){const t=await Ye(io,this,$o).call(this),i=new Va(e,et(Zn,this).clientId,et(Zn,this).clientSecret,t);return i[Ma]=et(Yn,this),i}async function No(){if(et(Bn,this)&&et(Vn,this))return{configuration:et(Bn,this),serverMetadata:et(Vn,this)};const e=Ye(io,this,zo).call(this),t=et(Qn,this).get(e);if(t)return it(Vn,this,t.serverMetadata),it(Bn,this,await Ye(io,this,Do).call(this,t.serverMetadata)),{configuration:et(Bn,this),serverMetadata:et(Vn,this)};const i=et(eo,this).get(e);if(i){const e=await i;return it(Vn,this,e.serverMetadata),it(Bn,this,await Ye(io,this,Do).call(this,e.serverMetadata)),{configuration:et(Bn,this),serverMetadata:et(Vn,this)}}const a=(async()=>{const t=await Ye(io,this,$o).call(this),i=await async function(e,t,i,a,n){const o=await async function(e,t){var i,a;if(!(e instanceof URL))throw Ha('"server" must be an instance of URL',Wa);const n=!e.href.includes("/.well-known/"),o=null!==(i=null==t?void 0:t.timeout)&&void 0!==i?i:30,s=AbortSignal.timeout(1e3*o),r=await(n?async function(e,t){return async function(e,t,i,a){if(!(e instanceof URL))throw ht('"'.concat("issuerIdentifier",'" must be an instance of URL'),mt);Ft(e,!0!==(null==a?void 0:a[ft]));const n=i(new URL(e.href)),o=It(null==a?void 0:a.headers);return o.set("accept","application/json"),((null==a?void 0:a[bt])||fetch)(n.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:Ct(n,null==a?void 0:a.signal)})}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=Ut("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=Ut("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw ht('"options.algorithm" must be "oidc" (default), or "oauth2"',dt)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[bt]:null==t?void 0:t[Ma],[ft]:null==t||null===(a=t.execute)||void 0===a?void 0:a.includes(en),signal:s,headers:new Headers(Ra)}):((null==t?void 0:t[Ma])||fetch)((Ft(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(en)),e.href),{headers:Object.fromEntries(new Headers(ot({accept:"application/json"},Ra)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Ji)throw ht('"expectedIssuerIdentifier" must be an instance of URL',mt);if(!ut(t,Response))throw ht('"response" must be an instance of Response',mt);if(200!==t.status)throw Pt('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Pi,t);Di(t);const a=await Ki(t);if(Lt(a.issuer,'"response" body "issuer" property',ji,{body:a}),i!==Ji&&new URL(a.issuer).href!==i.href)throw Pt('"response" body "issuer" property does not match the expected value',Ri,{expected:i.href,body:a,attribute:"issuer"});return a}(Ji,e)).catch(Fa);var c;return n&&new URL(r.issuer).href!==e.href&&(function(e,t,i){return!("https://login.microsoftonline.com"!==e.origin||null!=i&&i.algorithm&&"oidc"!==i.algorithm||(t[Ba]=!0,0))}(e,r,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new Ka("discovered metadata issuer does not match the expected issuer",{code:Ri,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,n),s=new Va(o,t,i,a);let r=za(s);if(null!=n&&n[Ma]&&(r.fetch=n[Ma]),null!=n&&n.timeout&&(r.timeout=n.timeout),null!=n&&n.execute)for(const e of n.execute)e(s);return s}(new URL("https://".concat(et(Zn,this).domain)),et(Zn,this).clientId,{use_mtls_endpoint_aliases:et(Zn,this).useMtls},t,{[Ma]:et(Yn,this)}),a=i.serverMetadata();return et(Qn,this).set(e,{serverMetadata:a}),{configuration:i,serverMetadata:a}})(),n=a.then(e=>{let{serverMetadata:t}=e;return{serverMetadata:t}});n.catch(()=>{}),et(eo,this).set(e,n);try{const{configuration:e,serverMetadata:t}=await a;it(Bn,this,e),it(Vn,this,t),et(Bn,this)[Ma]=et(Yn,this)}finally{et(eo,this).delete(e)}return{configuration:et(Bn,this),serverMetadata:et(Vn,this)}}async function qo(e){var t,i;const{configuration:a}=await Ye(io,this,No).call(this);if("audience"in e||"resource"in e)throw new po("audience and resource parameters are not supported for Token Vault exchanges");Co(e.subjectToken);const n=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:Ro,requested_token_type:null!==(i=e.requestedTokenType)&&void 0!==i?i:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&n.append("login_hint",e.loginHint),e.scope&&n.append("scope",e.scope),Uo(n,e.extra);try{const e=await un(a,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",n);return Eo.fromTokenEndpointResponse(e)}catch(t){throw new po("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function Mo(e){const{configuration:t}=await Ye(io,this,No).call(this);Co(e.subjectToken);const i=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope),e.requestedTokenType&&i.append("requested_token_type",e.requestedTokenType),e.organization&&i.append("organization",e.organization),Uo(i,e.extra);try{const e=await un(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Eo.fromTokenEndpointResponse(e)}catch(t){throw new po("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function $o(){return et(Gn,this)||it(Gn,this,(async()=>{if(!et(Zn,this).clientSecret&&!et(Zn,this).clientAssertionSigningKey&&!et(Zn,this).useMtls)throw new vo;if(et(Zn,this).useMtls)return(e,t,i,a)=>{i.set("client_id",t.client_id)};let e=et(Zn,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await async function(e,t){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return((e,t,i)=>{var a;const n=(e=>Zi(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);let o=i;return null!=t&&null!==(a=t.startsWith)&&void 0!==a&&a.call(t,"ECDH-ES")&&(o||(o={}),o.getNamedCurve=e=>{const t={data:e,pos:0};return function(e){Aa(e,48,"Invalid PKCS#8 structure"),ja(e),Aa(e,2,"Expected version field");const t=ja(e);e.pos+=t,Aa(e,48,"Expected algorithm identifier"),ja(e),e.pos}(t),(e=>{const t=(e=>{Aa(e,6,"Expected algorithm OID");const t=ja(e);return Pa(e,t)})(e);if(Ta(t,[43,101,110]))return"X25519";if(!Ta(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Aa(e,6,"Expected curve OID");const i=ja(e),a=Pa(e,i);for(const{name:e,oid:t}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(Ta(a,t))return e;throw new Error("Unsupported named curve")})(t)}),(async(e,t,i,a)=>{var n;let o,s;switch(i){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(i.slice(-3),10)||1)},s=["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":o={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[i]},s=["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const e=a.getNamedCurve(t);o="X25519"===e?{name:"X25519"}:{name:"ECDH",namedCurve:e}}catch(e){throw new ra("Invalid or unsupported key format")}s=["deriveBits"];break;case"Ed25519":case"EdDSA":o={name:"Ed25519"},s=["sign"];break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":o={name:i},s=["sign"];break;default:throw new ra('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,o,null!==(n=null==a?void 0:a.extractable)&&void 0!==n&&n,s)})("pkcs8",n,t,o)})(e,t,void 0)}(e,et(Zn,this).clientAssertionSigningAlg||"RS256")),e?function(e){return function(e,t){const{key:i,kid:a}=(n=e)instanceof CryptoKey?{key:n}:(null==n?void 0:n.key)instanceof CryptoKey?(void 0!==n.kid&&Lt(n.kid,'"kid"'),{key:n.key,kid:n.kid}):{};var n;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw ht("".concat(t," must be a CryptoKey"),mt)}(e,t),"private"!==e.type)throw ht("".concat(t," must be a private CryptoKey"),dt)}(i,'"clientPrivateKey.key"'),async(e,n,o,s)=>{var r;const c={alg:Nt(i),kid:a},p=function(e,t){const i=$t()+qt(t);return{jti:Dt(),aud:e.issuer,exp:i+60,iat:i,nbf:i,iss:t.client_id,sub:t.client_id}}(e,n);null==t||null===(r=t[xt])||void 0===r||r.call(t,c,p),o.set("client_id",n.client_id),o.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),o.set("client_assertion",await async function(e,t,i){if(!i.usages.includes("sign"))throw ht('CryptoKey instances used for signing assertions must include "sign" in their "usages"',dt);const a="".concat(Tt(kt(JSON.stringify(e))),".").concat(Tt(kt(JSON.stringify(t)))),n=Tt(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:qi(e)};case"RSA-PSS":switch(Ni(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new jt("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Ni(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new jt("unsupported CryptoKey algorithm name",{cause:e})}(i),i,kt(a)));return"".concat(a,".").concat(n)}(c,p,i))}}(e,void 0)}(e):qa(et(Zn,this).clientSecret)})().catch(e=>{throw it(Gn,this,void 0),e})),et(Gn,this)}async function Wo(e){const{configuration:t}=await Ye(io,this,No).call(this),i=Dt(),a=await function(e){return async function(e){return Lt(e,"codeVerifier"),Tt(await crypto.subtle.digest("SHA-256",kt(e)))}(e)}(i),n=go(ot(ot({},et(Zn,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(ot(ot({scope:Oo},n),{},{client_id:et(Zn,this).clientId,code_challenge:a,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await sn(t,o):await on(t,o),codeVerifier:i}}class Ho extends p{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Ho.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new Ho(t,i)}}class Ko extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Ko.prototype)}}class Jo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Jo.prototype)}}class Fo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Fo.prototype)}}class Bo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Bo.prototype)}}class Vo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Vo.prototype)}}class Go{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;this.contexts=new Map,this.ttlMs=e}set(e,t){this.cleanup(),this.contexts.set(e,Object.assign(Object.assign({},t),{createdAt:Date.now()}))}get(e){const t=this.contexts.get(e);if(t){if(!(Date.now()-t.createdAt>this.ttlMs))return t;this.contexts.delete(e)}}remove(e){this.contexts.delete(e)}cleanup(){const e=Date.now();for(const[t,i]of this.contexts)e-i.createdAt>this.ttlMs&&this.contexts.delete(t)}get size(){return this.contexts.size}}class Zo{constructor(e,t){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new Go}setMFAAuthDetails(e,t,i,a){this.contextManager.set(e,{scope:t,audience:i,mfaRequirements:a})}async getAuthenticators(e){var t,i;const a=this.contextManager.get(e);if(!(null===(t=null==a?void 0:a.mfaRequirements)||void 0===t?void 0:t.challenge)||0===a.mfaRequirements.challenge.length)throw new Ko("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const n=a.mfaRequirements.challenge.map(e=>e.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:e})).filter(e=>!!e.type&&n.includes(e.type))}catch(e){if(e instanceof xo)throw new Ko(null===(i=e.cause)||void 0===i?void 0:i.error,e.message);throw e}}async enroll(e){var t;const i=function(e){const t=Ge[e.factorType];return Object.assign(Object.assign(Object.assign({mfaToken:e.mfaToken,authenticatorTypes:t.authenticatorTypes},t.oobChannels&&{oobChannels:t.oobChannels}),"phoneNumber"in e&&{phoneNumber:e.phoneNumber}),"email"in e&&{email:e.email})}(e);try{return await this.authJsMfaClient.enrollAuthenticator(i)}catch(e){if(e instanceof yo)throw new Jo(null===(t=e.cause)||void 0===t?void 0:t.error,e.message);throw e}}async challenge(e){var t;try{const t={challengeType:e.challengeType,mfaToken:e.mfaToken};return e.authenticatorId&&(t.authenticatorId=e.authenticatorId),await this.authJsMfaClient.challengeAuthenticator(t)}catch(e){if(e instanceof _o)throw new Fo(null===(t=e.cause)||void 0===t?void 0:t.error,e.message);throw e}}async getEnrollmentFactors(e){const t=this.contextManager.get(e);if(!t||!t.mfaRequirements)throw new Vo("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");return t.mfaRequirements.enroll&&0!==t.mfaRequirements.enroll.length?t.mfaRequirements.enroll:[]}async verify(e){const t=this.contextManager.get(e.mfaToken);if(!t)throw new Bo("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");const i=function(e){return"otp"in e&&e.otp?"http://auth0.com/oauth/grant-type/mfa-otp":"oobCode"in e&&e.oobCode?"http://auth0.com/oauth/grant-type/mfa-oob":"recoveryCode"in e&&e.recoveryCode?"http://auth0.com/oauth/grant-type/mfa-recovery-code":void 0}(e);if(!i)throw new Bo("invalid_request","Unable to determine grant type. Provide one of: otp, oobCode, or recoveryCode.");const a=t.scope,n=t.audience;try{const t=await this.auth0Client._requestTokenForMfa({grant_type:i,mfaToken:e.mfaToken,scope:a,audience:n,otp:e.otp,oob_code:e.oobCode,binding_code:e.bindingCode,recovery_code:e.recoveryCode});return this.contextManager.remove(e.mfaToken),t}catch(e){if(e instanceof v)this.setMFAAuthDetails(e.mfa_token,a,n,e.mfa_requirements);else if(e instanceof Bo)throw new Bo(e.error,e.error_description);throw e}}}class Yo{constructor(e){let t,i;if(this.userCache=(new ge).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!w())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===w().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),this.lockManager=(F||(F=function(){return"undefined"!=typeof navigator&&"function"==typeof(null===(e=navigator.locks)||void 0===e?void 0:e.request)?new K:new J;var e}()),F),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)i=e.cache;else{if(t=e.cacheLocation||o,!qe(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=qe(t)()}var a;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?je:Pe,this.orgHintCookieName=(a=this.options.clientId,"auth0.".concat(a,".organization_hint")),this.isAuthenticatedCookieName=(e=>"auth0.".concat(e,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const n=e.useCookiesForTransactions?this.cookieStorage:Oe;var s;this.scope=function(e,t){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];if("object"!=typeof e)return{[c]:ue(t,e,...a)};let o={[c]:ue(t,...a)};return Object.keys(e).forEach(i=>{const n=e[i];o[i]=ue(t,n,...a)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new xe(n,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||r,this.cacheManager=new be(i,i.allKeys?void 0:new ze(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Ke(this.options.clientId):void 0,this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:"https://".concat(s)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const p="".concat(this.domainUrl,"/me/"),l=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:p},detailedResponse:!0})}));this.myAccountApi=new Be(l,p),this.authJsClient=new Lo({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new Zo(this.authJsClient.mfa,this),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&t===o&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Re)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=this.options.auth0Client||s,i=E(t,!0),a=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(a)}_authorizeUrl(e){return this._url("/authorize?".concat(T(e)))}async _verifyIdToken(e,t,i){const a=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[i,a,n]=t;if(3!==t.length||!i||!a||!n)throw new Error("ID token could not be decoded");const o=JSON.parse(A(a)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],we.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:a,signature:n},header:JSON.parse(A(i)),claims:s,user:r}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!ye(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!ye(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ye(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const i=e.leeway||60,a=new Date(e.now||Date.now()),n=new Date(0);if(n.setUTCSeconds(t.claims.exp+i),a>n)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(a,") is after expiration time (").concat(n,")"));if(null!=t.claims.nbf&&ye(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-i),a<e)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(a,") is before ").concat(e))}if(null!=t.claims.auth_time&&ye(t.claims.auth_time)){const n=new Date(0);if(n.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+i),a>n)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(a,") is after last auth at ").concat(n))}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const e=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_id,'"'))}else{const e=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_name,'"'))}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:i,leeway:this.options.leeway,max_age:(n=this.options.authorizationParams.max_age,"string"!=typeof n?n:parseInt(n,10)||void 0),now:a});var n}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,i){var a;const n=k(_()),o=k(_()),s=_(),r=await j(s),p=P(r),l=await(null===(a=this.dpop)||void 0===a?void 0:a.calculateThumbprint()),u=((e,t,i,a,n,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:de(t,i.scope,i.audience),response_type:"code",response_mode:r||"query",state:a,nonce:n,redirect_uri:s||e.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256",dpop_jkt:c}))(this.options,this.scope,e,n,o,p,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,l),d=this._authorizeUrl(u);return{nonce:o,code_verifier:s,scope:u.scope,audience:u.audience||c,redirect_uri:u.redirect_uri,state:n,url:d}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(e,",top=").concat(t,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new f;const a=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const n=await(e=>new Promise((t,i)=>{let a;const n=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(n),clearTimeout(o),window.removeEventListener("message",a,!1),i(new h(e.popup)))},1e3),o=setTimeout(()=>{clearInterval(n),i(new m(e.popup)),window.removeEventListener("message",a,!1)},1e3*(e.timeoutInSeconds||60));a=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(o),clearInterval(n),window.removeEventListener("message",a,!1),!1!==e.closePopup&&e.popup.close(),s.data.response.error)return i(p.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",a)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==n.state)throw new p("state_mismatch","Invalid state");const o=(null===(i=e.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:n.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:o})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:i,fragment:n,appState:o}=t,s=a(t,["openUrl","fragment","appState"]),r=(null===(e=s.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,c=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:p}=c,l=a(c,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},l),{appState:o,response_type:Ie.Code}),r&&{organization:r}));const u=n?"".concat(p,"#").concat(n):p;i?await i(u):window.location.assign(u)}async handleRedirectCallback(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href).split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const t=this.transactionManager.get();if(!t)throw new p("missing_transaction","Invalid state");this.transactionManager.remove();const i=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,connect_code:t.get("connect_code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(e.join(""));return t.response_type===Ie.ConnectCode?this._handleConnectAccountRedirectCallback(i,t):this._handleLoginRedirectCallback(i,t)}async _handleLoginRedirectCallback(e,t){const{code:i,state:a,error:n,error_description:o}=e;if(n)throw new l(n,o||n,a,t.appState);if(!t.code_verifier||t.state&&t.state!==a)throw new p("state_mismatch","Invalid state");const s=t.organization,r=t.nonce,c=t.redirect_uri;return await this._requestToken(Object.assign({audience:t.audience,scope:t.scope,code_verifier:t.code_verifier,grant_type:"authorization_code",code:i},c?{redirect_uri:c}:{}),{nonceIn:r,organization:s}),{appState:t.appState,response_type:Ie.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:a,error:n,error_description:o}=e;if(n)throw new u(n,o||n,t.connection,a,t.appState);if(!i)throw new p("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===a))throw new p("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:i,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier});return Object.assign(Object.assign({},s),{appState:t.appState,response_type:Ie.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(De))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(De)}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,i;const a=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:de(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(i=e.authorizationParams)||void 0===i?void 0:i.audience)||this.options.authorizationParams.audience)})}),n=await((e,t)=>{let i=Le[t];return i||(i=e().finally(()=>{delete Le[t],i=null}),Le[t]=i),i})(()=>this._getTokenSilently(a),"".concat(this.options.clientId,"::").concat(a.authorizationParams.audience,"::").concat(a.authorizationParams.scope));return e.detailedResponse?n:null==n?void 0:n.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,i=a(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||c,clientId:this.options.clientId,cacheMode:t});if(e)return e}if("cache-only"===t)return;const n=(o=this.options.clientId,s=i.authorizationParams.audience||"default","".concat("auth0.lock.getTokenSilently",".").concat(o,".").concat(s));var o,s;try{return await this.lockManager.runWithLock(n,5e3,async()=>{if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||c,clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(i):await this._getTokenFromIFrame(i),{id_token:a,token_type:n,access_token:o,oauthTokenScope:s,expires_in:r}=e;return Object.assign(Object.assign({id_token:a,token_type:n,access_token:o},s?{scope:s}:null),{expires_in:r})})}catch(e){if(this._isInteractiveError(e)&&"popup"===this.options.interactiveErrorHandler)return await this._handleInteractiveErrorWithPopup(i);throw e}}_isInteractiveError(e){return e instanceof v||e instanceof p&&this._isIframeMfaError(e)}_isIframeMfaError(e){return"login_required"===e.error&&"Multifactor authentication required"===e.error_description}async _handleInteractiveErrorWithPopup(e){try{await this.loginWithPopup({authorizationParams:e.authorizationParams});const t=await this._getEntryFromCache({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||c,clientId:this.options.clientId});if(!t)throw new p("interactive_handler_cache_miss","Token not found in cache after interactive authentication");return t}catch(e){throw e}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,a;const o=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:de(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope,(null===(a=e.authorizationParams)||void 0===a?void 0:a.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},n),t),await this.loginWithPopup(o,t),(await this.cacheManager.get(new fe({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||c,clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:i}=t,n=a(t,["federated"]),o=i?"&federated":"";return this._url("/v2/logout?".concat(T(Object.assign({clientId:e.clientId},n))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const i=Me(e),{openUrl:n}=i,o=a(i,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove(he),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const s=this._buildLogoutUrl(o);n?await n(s):!1!==n&&window.location.assign(s)}async _getTokenFromIFrame(e){const t=(i=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(i));var i;try{return await this.lockManager.runWithLock(t,5e3,async()=>{const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),i=this.cookieStorage.get(this.orgHintCookieName);i&&!t.organization&&(t.organization=i);const{url:a,state:n,nonce:o,code_verifier:s,redirect_uri:r,scope:c,audience:l}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);if(window.crossOriginIsolated)throw new p("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const u=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let m;try{m=new URL(this.domainUrl).origin}catch(e){m=this.domainUrl}const h=await function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;return new Promise((a,n)=>{const o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";const s=()=>{window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",r,!1))};let r;const c=setTimeout(()=>{n(new d),s()},1e3*i);r=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const i=e.source;i&&i.close(),e.data.response.error?n(p.fromPayload(e.data.response)):a(e.data.response),clearTimeout(c),window.removeEventListener("message",r,!1),setTimeout(s,2e3)},window.addEventListener("message",r,!1),window.document.body.appendChild(o),o.setAttribute("src",e)})}(a,m,u);if(n!==h.state)throw new p("state_mismatch","Invalid state");const f=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},f),{scope:c,oauthTokenScope:f.scope,audience:l})})}catch(e){throw"login_required"===e.error&&(e instanceof p&&this._isIframeMfaError(e)&&"popup"===this.options.interactiveErrorHandler||this.logout({openUrl:!1})),e}}async _getTokenUsingRefreshToken(e){var t,i;const a=await this.cacheManager.get(new fe({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||c,clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(a&&a.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new g(e.authorizationParams.audience||c,e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,o="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,s=((e,t,i,a)=>{var n;if(e&&i&&a){if(t.audience!==i)return t.scope;const e=a.split(" "),o=(null===(n=t.scope)||void 0===n?void 0:n.split(" "))||[],s=o.every(t=>e.includes(t));return e.length>=o.length&&s?a:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==a?void 0:a.audience,null==a?void 0:a.scope);try{const t=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:a&&a.refresh_token,redirect_uri:n}),o&&{timeout:o}),{scopesToRequest:s});if(t.refresh_token&&(null==a?void 0:a.refresh_token)&&await this.cacheManager.updateEntry(a.refresh_token,t.refresh_token),this.options.useMrrt&&(r=null==a?void 0:a.audience,p=null==a?void 0:a.scope,l=e.authorizationParams.audience,u=e.authorizationParams.scope,!(r===l&&$e(u,p)||$e(s,t.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const i=((e,t)=>{const i=(null==e?void 0:e.split(" "))||[],a=(null==t?void 0:t.split(" "))||[];return i.filter(e=>-1==a.indexOf(e)).join(",")})(s,t.scope);throw new b(e.authorizationParams.audience||"default",i)}return Object.assign(Object.assign({},t),{scope:e.authorizationParams.scope,oauthTokenScope:t.scope,audience:e.authorizationParams.audience||c})}catch(a){if(a.message){if(a.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),a;if((a.message.includes("Missing Refresh Token")||a.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e)}throw a instanceof v&&this.mfa.setMFAAuthDetails(a.mfa_token,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.audience,a.mfa_requirements),a}var r,p,l,u}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,n=a(e,["id_token","decodedToken"]);this.userCache.set(he,{id_token:t,decodedToken:i}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(n)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||c,t=this.scope[e],i=await this.cacheManager.getIdToken(new fe({clientId:this.options.clientId,audience:e,scope:t})),a=this.userCache.get(he);return i&&i.id_token===(null==a?void 0:a.id_token)?a:(this.userCache.set(he,i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:a,cacheMode:n}=e;const o=await this.cacheManager.get(new fe({scope:t,audience:i,clientId:a}),60,this.options.useMrrt,n);if(o&&o.access_token){const{token_type:e,access_token:t,oauthTokenScope:i,expires_in:a}=o,n=await this._getIdTokenFromCache();return n&&Object.assign(Object.assign({id_token:n.id_token,token_type:e||"Bearer",access_token:t},i?{scope:i}:null),{expires_in:a})}}async _requestToken(e,t){var i,a;const{nonceIn:n,organization:o,scopesToRequest:s}=t||{},r=await le(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:s||e.scope}),this.worker),p=await this._verifyIdToken(r.id_token,n,o);if("authorization_code"===e.grant_type){const e=await this._getIdTokenFromCache();(null===(a=null===(i=null==e?void 0:e.decodedToken)||void 0===i?void 0:i.claims)||void 0===a?void 0:a.sub)&&e.decodedToken.claims.sub!==p.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove(he))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},r),{decodedToken:p,scope:e.scope,audience:e.audience||c}),r.scope?{oauthTokenScope:r.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(o||p.claims.org_id),Object.assign(Object.assign({},r),{decodedToken:p})}async loginWithCustomTokenExchange(e){return this._requestToken(Object.assign(Object.assign({},e),{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:de(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization}))}async exchangeToken(e){return this.loginWithCustomTokenExchange(e)}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,t){return this._assertDpop(this.dpop),this.dpop.setNonce(e,t)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Fe(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null===(t=null==e?void 0:e.scope)||void 0===t?void 0:t.join(" "),audience:null==e?void 0:e.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t,e.dpopNonceId),generateDpopProof:e=>this.generateDpopProof(e)})}async connectAccountWithRedirect(e){const{openUrl:t,appState:i,connection:a,scopes:n,authorization_params:o,redirectUri:s=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!a)throw new Error("connection is required");const r=k(_()),c=_(),p=await j(c),l=P(p),{connect_uri:u,connect_params:d,auth_session:m}=await this.myAccountApi.connectAccount({connection:a,scopes:n,redirect_uri:s,state:r,code_challenge:l,code_challenge_method:"S256",authorization_params:o});this.transactionManager.create({state:r,code_verifier:c,auth_session:m,redirect_uri:s,appState:i,connection:a,response_type:Ie.ConnectCode});const h=new URL(u);h.searchParams.set("ticket",d.ticket),t?await t(h.toString()):window.location.assign(h)}async _requestTokenForMfa(e,t){const{mfaToken:i}=e,n=a(e,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},n),{mfa_token:i}),t)}}async function Xo(e){const t=new Yo(e);return await t.checkSession(),t}},991(e,t){"use strict";t.byteLength=function(e){var t=r(e),i=t[0],a=t[1];return 3*(i+a)/4-a},t.toByteArray=function(e){var t,i,o=r(e),s=o[0],c=o[1],p=new n(function(e,t,i){return 3*(t+i)/4-i}(0,s,c)),l=0,u=c>0?s-4:s;for(i=0;i<u;i+=4)t=a[e.charCodeAt(i)]<<18|a[e.charCodeAt(i+1)]<<12|a[e.charCodeAt(i+2)]<<6|a[e.charCodeAt(i+3)],p[l++]=t>>16&255,p[l++]=t>>8&255,p[l++]=255&t;return 2===c&&(t=a[e.charCodeAt(i)]<<2|a[e.charCodeAt(i+1)]>>4,p[l++]=255&t),1===c&&(t=a[e.charCodeAt(i)]<<10|a[e.charCodeAt(i+1)]<<4|a[e.charCodeAt(i+2)]>>2,p[l++]=t>>8&255,p[l++]=255&t),p},t.fromByteArray=function(e){for(var t,a=e.length,n=a%3,o=[],s=16383,r=0,c=a-n;r<c;r+=s)o.push(p(e,r,r+s>c?c:r+s));return 1===n?(t=e[a-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[a-2]<<8)+e[a-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),o.join("")};for(var i=[],a=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=o[s],a[o.charCodeAt(s)]=s;function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function p(e,t,i){for(var a,n=[],o=t;o<i;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(c(a));return n.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},318(e,t){t.read=function(e,t,i,a,n){var o,s,r=8*n-a-1,c=(1<<r)-1,p=c>>1,l=-7,u=i?n-1:0,d=i?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-l)-1,m>>=-l,l+=r;l>0;o=256*o+e[t+u],u+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=a;l>0;s=256*s+e[t+u],u+=d,l-=8);if(0===o)o=1-p;else{if(o===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,a),o-=p}return(m?-1:1)*s*Math.pow(2,o-a)},t.write=function(e,t,i,a,n,o){var s,r,c,p=8*o-n-1,l=(1<<p)-1,u=l>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:o-1,h=a?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=l?(r=0,s=l):s+u>=1?(r=(t*c-1)*Math.pow(2,n),s+=u):(r=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[i+m]=255&r,m+=h,r/=256,n-=8);for(s=s<<n|r,p+=n;p>0;e[i+m]=255&s,m+=h,s/=256,p-=8);e[i+m-h]|=128*f}},526(e,t,i){"use strict";var a=i(991),n=i(318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;var s=2147483647;function r(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return p(e,t,i)}function p(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|f(e,t),a=r(i),n=a.write(e,t);return n!==i&&(a=a.slice(0,n)),a}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){var t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return m(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return c.from(a,t,i);var n=function(e){if(c.isBuffer(e)){var t=0|h(e.length),i=r(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||W(e.length)?r(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),r(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),i=r(t),a=0;a<t;a+=1)i[a]=255&e[a];return i}function m(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(a,c.prototype),a}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(e).length;default:if(n)return a?-1:N(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,i){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,i);case"utf8":case"utf-8":return T(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,i);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,i){var a=e[t];e[t]=e[i],e[i]=a}function b(e,t,i,a,n){if(0===e.length)return-1;if("string"==typeof i?(a=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),W(i=+i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:x(e,t,i,a,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):x(e,[t],i,a,n);throw new TypeError("val must be string, number or Buffer")}function x(e,t,i,a,n){var o,s=1,r=e.length,c=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;s=2,r/=2,c/=2,i/=2}function p(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var l=-1;for(o=i;o<r;o++)if(p(e,o)===p(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(i+c>r&&(i=r-c),o=i;o>=0;o--){for(var u=!0,d=0;d<c;d++)if(p(e,o+d)!==p(t,d)){u=!1;break}if(u)return o}return-1}function y(e,t,i,a){i=Number(i)||0;var n=e.length-i;a?(a=Number(a))>n&&(a=n):a=n;var o=t.length;a>o/2&&(a=o/2);for(var s=0;s<a;++s){var r=parseInt(t.substr(2*s,2),16);if(W(r))return s;e[i+s]=r}return s}function w(e,t,i,a){return M(N(t,e.length-i),e,i,a)}function _(e,t,i,a){return M(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,a)}function k(e,t,i,a){return M(q(t),e,i,a)}function S(e,t,i,a){return M(function(e,t){for(var i,a,n,o=[],s=0;s<e.length&&!((t-=2)<0);++s)a=(i=e.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(a);return o}(t,e.length-i),e,i,a)}function E(e,t,i){return 0===t&&i===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,i))}function T(e,t,i){i=Math.min(e.length,i);for(var a=[],n=t;n<i;){var o,s,r,c,p=e[n],l=null,u=p>239?4:p>223?3:p>191?2:1;if(n+u<=i)switch(u){case 1:p<128&&(l=p);break;case 2:128==(192&(o=e[n+1]))&&(c=(31&p)<<6|63&o)>127&&(l=c);break;case 3:o=e[n+1],s=e[n+2],128==(192&o)&&128==(192&s)&&(c=(15&p)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[n+1],s=e[n+2],r=e[n+3],128==(192&o)&&128==(192&s)&&128==(192&r)&&(c=(15&p)<<18|(63&o)<<12|(63&s)<<6|63&r)>65535&&c<1114112&&(l=c)}null===l?(l=65533,u=1):l>65535&&(l-=65536,a.push(l>>>10&1023|55296),l=56320|1023&l),a.push(l),n+=u}return function(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);for(var i="",a=0;a<t;)i+=String.fromCharCode.apply(String,e.slice(a,a+=j));return i}(a)}c.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,i){return p(e,t,i)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,i){return function(e,t,i){return l(e),e<=0?r(e):void 0!==t?"string"==typeof i?r(e).fill(t,i):r(e).fill(t):r(e)}(e,t,i)},c.allocUnsafe=function(e){return u(e)},c.allocUnsafeSlow=function(e){return u(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,a=t.length,n=0,o=Math.min(i,a);n<o;++n)if(e[n]!==t[n]){i=e[n],a=t[n];break}return i<a?-1:a<i?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var a=c.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var o=e[i];if($(o,Uint8Array))n+o.length>a.length?c.from(o).copy(a,n):Uint8Array.prototype.set.call(a,o,n);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,n)}n+=o.length}return a},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,i,a,n){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===a&&(a=0),void 0===n&&(n=this.length),t<0||i>e.length||a<0||n>this.length)throw new RangeError("out of range index");if(a>=n&&t>=i)return 0;if(a>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(a>>>=0),s=(i>>>=0)-(t>>>=0),r=Math.min(o,s),p=this.slice(a,n),l=e.slice(t,i),u=0;u<r;++u)if(p[u]!==l[u]){o=p[u],s=l[u];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return b(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return b(this,e,t,i,!1)},c.prototype.write=function(e,t,i,a){if(void 0===t)a="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)a=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===a&&(a="utf8")):(a=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var o=!1;;)switch(a){case"hex":return y(this,e,t,i);case"utf8":case"utf-8":return w(this,e,t,i);case"ascii":case"latin1":case"binary":return _(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function A(e,t,i){var a="";i=Math.min(e.length,i);for(var n=t;n<i;++n)a+=String.fromCharCode(127&e[n]);return a}function P(e,t,i){var a="";i=Math.min(e.length,i);for(var n=t;n<i;++n)a+=String.fromCharCode(e[n]);return a}function O(e,t,i){var a=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>a)&&(i=a);for(var n="",o=t;o<i;++o)n+=H[e[o]];return n}function I(e,t,i){for(var a=e.slice(t,i),n="",o=0;o<a.length-1;o+=2)n+=String.fromCharCode(a[o]+256*a[o+1]);return n}function C(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,i,a,n,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(i+a>e.length)throw new RangeError("Index out of range")}function R(e,t,i,a,n,o){if(i+a>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(e,t,i,a,o){return t=+t,i>>>=0,o||R(e,0,i,4),n.write(e,t,i,a,23,4),i+4}function z(e,t,i,a,o){return t=+t,i>>>=0,o||R(e,0,i,8),n.write(e,t,i,a,52,8),i+8}c.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var a=this.subarray(e,t);return Object.setPrototypeOf(a,c.prototype),a},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var a=this[e],n=1,o=0;++o<t&&(n*=256);)a+=this[e+o]*n;return a},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var a=this[e+--t],n=1;t>0&&(n*=256);)a+=this[e+--t]*n;return a},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var a=this[e],n=1,o=0;++o<t&&(n*=256);)a+=this[e+o]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var a=t,n=1,o=this[e+--a];a>0&&(n*=256);)o+=this[e+--a]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,i,a){e=+e,t>>>=0,i>>>=0,a||U(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[t]=255&e;++o<i&&(n*=256);)this[t+o]=e/n&255;return t+i},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,i,a){e=+e,t>>>=0,i>>>=0,a||U(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+i},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var n=Math.pow(2,8*i-1);U(this,e,t,i,n-1,-n)}var o=0,s=1,r=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===r&&0!==this[t+o-1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeIntBE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var n=Math.pow(2,8*i-1);U(this,e,t,i,n-1,-n)}var o=i-1,s=1,r=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===r&&0!==this[t+o+1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,i){return L(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return L(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return z(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return z(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,a){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<i&&(a=i),a===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-i&&(a=e.length-t+i);var n=a-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,a):Uint8Array.prototype.set.call(e,this.subarray(i,a),t),n},c.prototype.fill=function(e,t,i,a){if("string"==typeof e){if("string"==typeof t?(a=t,t=0,i=this.length):"string"==typeof i&&(a=i,i=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!c.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===e.length){var n=e.charCodeAt(0);("utf8"===a&&n<128||"latin1"===a)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=c.isBuffer(e)?e:c.from(e,a),r=s.length;if(0===r)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=s[o%r]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(e,t){var i;t=t||1/0;for(var a=e.length,n=null,o=[],s=0;s<a;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===a){(t-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function q(e){return a.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,i,a){for(var n=0;n<a&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}var H=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var a=16*i,n=0;n<16;++n)t[a+n]=e[i]+e[n];return t}()},942(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,a="",n=0,o=-1,s=0,r=0;r<=e.length;++r){if(r<e.length)i=e.charCodeAt(r);else{if(47===i)break;i=47}if(47===i){if(o===r-1||1===s);else if(o!==r-1&&2===s){if(a.length<2||2!==n||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2))if(a.length>2){var c=a.lastIndexOf("/");if(c!==a.length-1){-1===c?(a="",n=0):n=(a=a.slice(0,c)).length-1-a.lastIndexOf("/"),o=r,s=0;continue}}else if(2===a.length||1===a.length){a="",n=0,o=r,s=0;continue}t&&(a.length>0?a+="/..":a="..",n=2)}else a.length>0?a+="/"+e.slice(o+1,r):a=e.slice(o+1,r),n=r-o-1;o=r,s=0}else 46===i&&-1!==s?++s:s=-1}return a}var a={resolve:function(){for(var e,a="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(a=s+"/"+a,n=47===s.charCodeAt(0))}return a=i(a,!n),n?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(e){if(t(e),0===e.length)return".";var a=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!a)).length||a||(e="."),e.length>0&&n&&(e+="/"),a?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var n=arguments[i];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=a.resolve(e))===(i=a.resolve(i)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var o=e.length,s=o-n,r=1;r<i.length&&47===i.charCodeAt(r);++r);for(var c=i.length-r,p=s<c?s:c,l=-1,u=0;u<=p;++u){if(u===p){if(c>p){if(47===i.charCodeAt(r+u))return i.slice(r+u+1);if(0===u)return i.slice(r+u)}else s>p&&(47===e.charCodeAt(n+u)?l=u:0===u&&(l=0));break}var d=e.charCodeAt(n+u);if(d!==i.charCodeAt(r+u))break;47===d&&(l=u)}var m="";for(u=n+l+1;u<=o;++u)u!==o&&47!==e.charCodeAt(u)||(0===m.length?m+="..":m+="/..");return m.length>0?m+i.slice(r+l):(r+=l,47===i.charCodeAt(r)&&++r,i.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),a=47===i,n=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(i=e.charCodeAt(s))){if(!o){n=s;break}}else o=!1;return-1===n?a?"/":".":a&&1===n?"//":e.slice(0,n)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var a,n=0,o=-1,s=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var r=i.length-1,c=-1;for(a=e.length-1;a>=0;--a){var p=e.charCodeAt(a);if(47===p){if(!s){n=a+1;break}}else-1===c&&(s=!1,c=a+1),r>=0&&(p===i.charCodeAt(r)?-1===--r&&(o=a):(r=-1,o=c))}return n===o?o=c:-1===o&&(o=e.length),e.slice(n,o)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1);return-1===o?"":e.slice(n,o)},extname:function(e){t(e);for(var i=-1,a=0,n=-1,o=!0,s=0,r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47!==c)-1===n&&(o=!1,n=r+1),46===c?-1===i?i=r:1!==s&&(s=1):-1!==i&&(s=-1);else if(!o){a=r+1;break}}return-1===i||-1===n||0===s||1===s&&i===n-1&&i===a+1?"":e.slice(i,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,a=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+a:i+"/"+a:a}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var a,n=e.charCodeAt(0),o=47===n;o?(i.root="/",a=1):a=0;for(var s=-1,r=0,c=-1,p=!0,l=e.length-1,u=0;l>=a;--l)if(47!==(n=e.charCodeAt(l)))-1===c&&(p=!1,c=l+1),46===n?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!p){r=l+1;break}return-1===s||-1===c||0===u||1===u&&s===c-1&&s===r+1?-1!==c&&(i.base=i.name=0===r&&o?e.slice(1,c):e.slice(r,c)):(0===r&&o?(i.name=e.slice(1,s),i.base=e.slice(1,c)):(i.name=e.slice(r,s),i.base=e.slice(r,c)),i.ext=e.slice(s,c)),r>0?i.dir=e.slice(0,r-1):o&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},930(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,i,a){var n=a&&a.stringify||t;if("object"==typeof e&&null!==e){var o=i.length+1;if(1===o)return e;var s=new Array(o);s[0]=n(e);for(var r=1;r<o;r++)s[r]=n(i[r]);return s.join(" ")}if("string"!=typeof e)return e;var c=i.length;if(0===c)return e;for(var p="",l=0,u=-1,d=e&&e.length||0,m=0;m<d;){if(37===e.charCodeAt(m)&&m+1<d){switch(u=u>-1?u:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Number(i[l]),u=m+2,m++;break;case 105:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Math.floor(Number(i[l])),u=m+2,m++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===i[l])break;u<m&&(p+=e.slice(u,m));var h=typeof i[l];if("string"===h){p+="'"+i[l]+"'",u=m+2,m++;break}if("function"===h){p+=i[l].name||"<anonymous>",u=m+2,m++;break}p+=n(i[l]),u=m+2,m++;break;case 115:if(l>=c)break;u<m&&(p+=e.slice(u,m)),p+=String(i[l]),u=m+2,m++;break;case 37:u<m&&(p+=e.slice(u,m)),p+="%",u=m+2,m++,l--}++l}++m}return-1===u?e:(u<d&&(p+=e.slice(u)),p)}},122(){},360(){},826(){},713(e,t,i){"use strict";const a=i(930);e.exports=u;const n=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:f,errWithCause:f};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}const r=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),p={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(e,t){const i={logger:t,parent:e[c]};t[c]=i}function u(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const i=e.browser.write||n;e.browser.write&&(e.browser.asObject=!0);const a=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter(function(e){return"!stdSerializers.err"!==e}):!0===e&&Object.keys(t)}(e.browser.serialize,a);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const f=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(f);"function"==typeof i&&g.forEach(function(e){i[e]=i}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",y=Object.create(i);y.log||(y.log=x),function(e,t,i){const a={};t.forEach(e=>{a[e]=i[e]?i[e]:n[e]||n[p[e]||"log"]||x}),e[r]=a}(y,g,i),l({},y),Object.defineProperty(y,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(y,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,w,y,"error"),d(this,w,y,"fatal"),d(this,w,y,"warn"),d(this,w,y,"info"),d(this,w,y,"debug"),d(this,w,y,"trace"),f.forEach(e=>{d(this,w,y,e)})}});const w={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:v(e)};return y.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},u.levels.values,t),labels:Object.assign({},u.levels.labels,function(e){const t={};return Object.keys(e).forEach(function(i){t[e[i]]=i}),t}(t))}}(e),y.level=b,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=x,y.serializers=a,y._serialize=o,y._stdErrSerialize=c,y.child=function(i,n){if(!i)throw new Error("missing bindings for child Pino");n=n||{},o&&i.serializers&&(n.serializers=i.serializers);const s=n.serializers;if(o&&s){var r=Object.assign({},a,s),c=!0===e.browser.serialize?Object.keys(r):o;delete i.serializers,m([i],c,r,this._stdErrSerialize)}function p(e){this._childLevel=1+(0|e._childLevel),this.bindings=i,r&&(this.serializers=r,this._serialize=c),t&&(this._logEvent=h([].concat(e._logEvent.bindings,i)))}p.prototype=this;const u=new p(this);return l(this,u),u.level=this.level,u},t&&(y._logEvent=h()),y}function d(e,t,i,o){if(Object.defineProperty(e,o,{value:s(e.level,i)>s(o,i)?x:i[r][o],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[o]===x)return;e[o]=function(e,t,i,o){return c=e[r][o],function(){const r=t.timestamp(),p=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===n?n:this;for(var u=0;u<p.length;u++)p[u]=arguments[u];if(t.serialize&&!t.asObject&&m(p,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?c.call(l,function(e,t,i,n,o={}){const{level:s=()=>e.levels.values[t],log:r=e=>e}=o;e._serialize&&m(i,e._serialize,e.serializers,e._stdErrSerialize);const c=i.slice();let p=c[0];const l={};n&&(l.time=n),l.level=s(t,e.levels.values[t]);let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==p&&"object"==typeof p){for(;u--&&"object"==typeof c[0];)Object.assign(l,c.shift());p=c.length?a(c.shift(),c):void 0}else"string"==typeof p&&(p=a(c.shift(),c));return void 0!==p&&(l.msg=p),r(l)}(this,o,p,r,t.formatters)):c.apply(l,p),t.transmit){const a=t.transmit.level||e._level,n=i.levels.values[a],c=i.levels.values[o];if(c<n)return;!function(e,t,i){const a=t.send,n=t.ts,o=t.methodLevel,s=t.methodValue,r=t.val,c=e._logEvent.bindings;m(i,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=n,e._logEvent.messages=i.filter(function(e){return-1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=s,a(o,e._logEvent,r),e._logEvent=h(c)}(this,{ts:r,methodLevel:o,methodValue:c,transmitLevel:a,transmitValue:i.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,i)},p)}};var c}(e,t,i,o);const p=function(e){const t=[];e.bindings&&t.push(e.bindings);let i=e[c];for(;i.parent;)i=i.parent,i.logger.bindings&&t.push(i.logger.bindings);return t.reverse()}(e);0!==p.length&&(e[o]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(p,e[o]))}function m(e,t,i,a){for(const n in e)if(a&&e[n]instanceof Error)e[n]=u.stdSerializers.err(e[n]);else if("object"==typeof e[n]&&!Array.isArray(e[n]))for(const a in e[n])t&&t.indexOf(a)>-1&&a in i&&(e[n][a]=i[a](e[n][a]))}function h(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const i in e)void 0===t[i]&&(t[i]=e[i]);return t}function v(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?y:w}function g(){return{}}function b(e){return e}function x(){}function y(){return!1}function w(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=o,u.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:w,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},797(e,t,i){"use strict";var a,n=i(526).hp,o=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,p=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[c(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t,i,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of c(t))l.call(e,n)||n===i||s(e,n,{get:()=>t[n],enumerable:!(a=r(t,n))||a.enumerable});return e},m=u({"../../node_modules/mime-db/db.json"(e,t){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}}}),h=u({"../../node_modules/mime-db/index.js"(e,t){t.exports=m()}}),f=u({"../../node_modules/mime-types/index.js"(e){var t,a,n,o=h(),s=i(942).extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=r.exec(e),i=t&&o[t[1].toLowerCase()];return i&&i.charset?i.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=p,e.charsets={lookup:p},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var i=-1===t.indexOf("/")?e.lookup(t):t;if(!i)return!1;if(-1===i.indexOf("charset")){var a=e.charset(i);a&&(i+="; charset="+a.toLowerCase())}return i},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var i=r.exec(t),a=i&&e.extensions[i[1].toLowerCase()];return!(!a||!a.length)&&a[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var i=s("x."+t).toLowerCase().substr(1);return i&&e.types[i]||!1},e.types=Object.create(null),t=e.extensions,a=e.types,n=["nginx","apache",void 0,"iana"],Object.keys(o).forEach(function(e){var i=o[e],s=i.extensions;if(s&&s.length){t[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(a[c]){var p=n.indexOf(o[a[c]].source),l=n.indexOf(i.source);if("application/octet-stream"!==a[c]&&(p>l||p===l&&"application/"===a[c].substr(0,12)))continue}a[c]=e}}})}}),v={};((e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})})(v,{AbstractJob:()=>R,AnnotationInclusionMode:()=>re,AnnotationType:()=>ne,AreaType:()=>le,ArtifactType:()=>ve,AssetInclusionMode:()=>se,AssetStatus:()=>ae,AssetUrlType:()=>_e,AutoAnnotateStatus:()=>ie,AutoAnnotateTask:()=>ce,ChangeType:()=>be,ContourType:()=>P,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>ee,DataEndpoint:()=>Pe,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>Ae,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>T,InferenceType:()=>j,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>he,ModelFormat:()=>ye,ModelPrecisionType:()=>we,ModelStatus:()=>me,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>A,PopComponentType:()=>E,PredictionVersion:()=>_,Semaphore:()=>H,SessionStatus:()=>V,Stream:()=>b,TranscodeMode:()=>pe,TransientPopId:()=>B,UploadJob:()=>D,UserReview:()=>oe,VideoMode:()=>S,VlmAbilityStatus:()=>Se,WebrtcBase:()=>C,WebrtcWhep:()=>Oe,WebrtcWhip:()=>U,WorkerEndpoint:()=>X,WorkflowPhase:()=>xe,default:()=>Ce,getBaseUrl:()=>te,readableStreamFromString:()=>w}),e.exports=(a=v,d(s({},"__esModule",{value:!0}),a));var g=(e=>(e.Idle="Idle",e.Busy="Busy",e.Authenticating="Authenticating",e.FetchConfig="FetchConfig",e.Error="Error",e.NotAvailable="NotAvailable",e))(g||{}),b=class e{constructor(e,t){this.iterator=e,this.controller=t}static iterFromReadableStream(e,t,i){let a=!1;return async function*(){if(a)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let n=!1;try{for await(const t of async function*(){const t=new y,i=function(e){if(e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}(await e);for await(let e of i)for(const i of t.decode(e))yield i;for(const e of t.flush())yield e}())if(!n&&t){const e=JSON.parse(t),a=e.event;void 0!==a?await i(a):yield e}n=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{n||t.abort()}}()}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],i=[],a=this.iterator(),n=e=>({next:()=>{if(0===e.length){const e=a.next();t.push(e),i.push(e)}return e.shift()}});return[new e(()=>n(t),this.controller),new e(()=>n(i),this.controller)]}},x=class e{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let i=this.decodeText(t);if(this.trailingCR&&(i="\r"+i,this.trailingCR=!1),i.endsWith("\r")&&(this.trailingCR=!0,i=i.slice(0,-1)),!i)return[];const a=e.NEWLINE_CHARS.has(i[i.length-1]||"");let n=i.split(e.NEWLINE_REGEXP);return 1!==n.length||a?(this.buffer.length>0&&(n=[this.buffer.join("")+n[0],...n.slice(1)],this.buffer=[]),a||(this.buffer=[n.pop()||""]),n):(this.buffer.push(n[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==n){if(e instanceof n)return e.toString();if(e instanceof Uint8Array)return n.from(e).toString();throw new Error(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new Error(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new Error("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}};x.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","…","\u2028","\u2029"]),x.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var y=x;function w(e){return new ReadableStream({start(t){t.enqueue(n.from(e)),t.close()}})}var _=(e=>(e[e.V1=1]="V1",e[e.V2=2]="V2",e))(_||{}),k=2,S=(e=>(e.STREAM="stream",e.BUFFER="buffer",e))(S||{}),E=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(E||{}),T=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(T||{}),j=(e=>(e.IMAGE_CLASSIFICATION="image_classification",e.OBJECT_DETECTION="object_detection",e.KEY_POINTS="key_points",e.OCR="ocr",e.MESH="mesh",e.FEATURE_VECTOR="feature_vector",e.SEMANTIC_SEGMENTATION="semantic_segmentation",e.SEGMENTATION="segmentation",e))(j||{}),A=(e=>(e.RANDOM_WALK="random_walk",e.CONSTANT_VELOCITY="constant_velocity",e.CONSTANT_ACCELERATION="constant_acceleration",e))(A||{}),P=(e=>(e.ALL_PIXELS="all_pixels",e.POLYGON="polygon",e.CONVEX_HULL="convex_hull",e.HOUGH_CIRCLES="hough_circles",e.CIRCLE="circle",e.TRIANGLE="triangle",e.RECTANGLE="rectangle",e))(P||{}),O=i(182),I=((e,t,i)=>(i=null!=e?o(p(e)):{},d(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(942)),C=class e{constructor(e,t,i,a,n,o){this._getSession=e,this._client=t,this._requestLogger=o,this._ingressId=i,this._urlPath=`${a}/${this._ingressId}`,this._is_pipeline_direct=n,this._pc=null,this._eTag="",this._location=null,this._queuedCandidates=[],this._offerData=null}async close(){const e=this._pc;if(this._pc=null,e)return e.close()}ingressId(){return this._ingressId}gresUrl(e,t=null){let i,a;if(this._is_pipeline_direct){if(!e.pipelineId)throw new Error("cannot connect with is_pipeline_direct=true but !session.pipelineId");i=I.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=I.default.join(i,t)),a=e.baseUrl?.endsWith("/")?e.baseUrl:e.baseUrl+"/",new URL(i,a)}async onLocalOffer(t){if(!this._pc)throw new Error("onLocalOffer no peer connection");if(!t.sdp)throw new Error("onLocalOffer no sdp");this._offerData=e.parseOffer(t.sdp),await this._pc.setLocalDescription(t);const i=await this._getSession(),a=this.gresUrl(i),n={...i.authenticationHeaders(),"Content-Type":"application/sdp"},o=await this._client.fetch(a,{headers:n,method:"POST",body:t.sdp});return o.status>=300?Promise.reject(`unknown status code for POST '${a}': ${o.status} (${o.statusText})`):(this._eTag=o.headers.get("ETag")??"",this._location=o.headers.get("Location"),await this.onRemoteAnswer(new RTCSessionDescription({type:"answer",sdp:await o.text()})))}async sendLocalCandidates(t){if(!this._offerData)throw new Error("sendLocalCandidates no offerData");const i=await this._getSession(),a=this.gresUrl(i,this._location),n={...i.authenticationHeaders(),"Content-Type":"application/trickle-ice-sdpfrag","If-Match":this._eTag},o=await this._client.fetch(a,{headers:n,method:"PATCH",body:e.generateSdpFragment(this._offerData,t)});return o.status>=300?Promise.reject(`unknown status code for PATCH '${a}': ${o.status} (${o.statusText})`):this}async onLocalCandidate(e){return null!==e.candidate&&(""===this._eTag?this._queuedCandidates.push(e.candidate):await this.sendLocalCandidates([e.candidate])),this}static linkToIceServers(e){return(null!==e?e.split(", ").map(e=>{let t=e.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);return t||(t=e.match(/^(.+?); rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i)),t?{urls:[t[1]],username:U.unquoteCredential(t[3]),credential:U.unquoteCredential(t[4])}:null}):[]).filter(function(e){return null!=e})}static editAnswer(e,t,i,a,n,o){const s=e.split("m=");for(let e=0;e<s.length;e++){const r=s[e];r&&r.startsWith("video")?s[e]=U.setVideoBitrate(U.setCodec(r,t),a):r&&r.startsWith("audio")&&(s[e]=U.setAudioBitrate(U.setCodec(r,i),n,o))}return s.join("m=")}static setCodec(e,t){const i=e.split("\r\n"),a=[],n=[];for(const e of i)e.startsWith("a=rtpmap:")?t&&e.toLowerCase().includes(t)&&(n.push(e.slice(9).split(" ")[0]),a.push(e)):a.push(e);const o=[];for(const e of a)e.startsWith("a=fmtp:")?n.includes(e.slice(7).split(" ")[0])&&o.push(e):e.startsWith("a=rtcp-fb:")?n.includes(e.slice(10).split(" ")[0])&&o.push(e):o.push(e);return o.join("\r\n")}static setVideoBitrate(e,t){let i=e.split("\r\n");for(let e=0;e<i.length;e++){const a=i[e];if(a&&a.startsWith("c=")){i=[...i.slice(0,e+1),"b=TIAS:"+(1024*t).toString(),...i.slice(e+1)];break}}return i.join("\r\n")}static setAudioBitrate(e,t,i){let a="",n=e.split("\r\n");for(let e=0;e<n.length;e++){const t=n[e];if(t&&t.startsWith("a=rtpmap:")&&t.toLowerCase().includes("opus/")){a=t.slice(9).split(" ")[0]||"";break}}if(""===a)return e;for(let e=0;e<n.length;e++){const o=n[e];o&&o.startsWith("a=fmtp:"+a+" ")&&(n[e]=i?"a=fmtp:"+a+" minptime=10;useinbandfec=1;maxaveragebitrate="+(1024*(t??0)).toString():"a=fmtp:"+a+" maxplaybackrate=48000;stereo=1;sprop-stereo=1;maxaveragebitrate"+(1024*(t??0)).toString())}return n.join("\r\n")}static parseOffer(e){let t=[],i="",a="";for(const n of e.split("\r\n"))n.startsWith("m=")?t.push(n.slice(2)):""===i&&n.startsWith("a=ice-ufrag:")?i=n.slice(12):""===a&&n.startsWith("a=ice-pwd:")&&(a=n.slice(10));return{iceUfrag:i,icePwd:a,medias:t}}static generateSdpFragment(e,t){const i=new Map;for(const e of t)if(null!==e.sdpMLineIndex){const t=e.sdpMLineIndex;let a=i.get(t);void 0===a&&(a=[],i.set(t,a)),a.push(e)}let a="a=ice-ufrag:"+e.iceUfrag+"\r\na=ice-pwd:"+e.icePwd+"\r\n",n=0;for(const t of e.medias){let e=i.get(n);if(void 0!==e){a+="m="+t+"\r\na=mid:"+n+"\r\n";for(const t of e)a+="a="+t.candidate+"\r\n"}n++}return a}static unquoteCredential(e){return e?JSON.parse(`"${e}"`):""}},U=class extends C{constructor(e,t,i,a,n){super(t,i,(0,O.v4)().toString(),"liveIngress/whip",a,n),this._stream=e}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):await this.onIceServers(i)}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(!this._stream)throw new Error("onIceServers no stream");const t=this._stream,i=new RTCPeerConnection({iceServers:C.linkToIceServers(e.headers.get("Link"))});return this._pc=i,i.onicecandidate=e=>this.onLocalCandidate(e),new Promise(async(e,a)=>{i.oniceconnectionstatechange=()=>{switch(i.iceConnectionState){case"failed":case"disconnected":a(`peer connection: ${i.iceConnectionState}`);break;case"connected":e(this)}},t.getTracks().forEach(e=>{this._requestLogger.debug("onIceServers our stream has track: %s",e),i.addTrack(e,t)}),t.addEventListener("addtrack",e=>{this._requestLogger.debug("onIceServers got lazy track: ",e.track),i.addTrack(e.track,t)}),await this.onLocalOffer(await i.createOffer())})}async close(){const e=this._stream;return this._stream=null,e&&e.getTracks().forEach(e=>{e.stop()}),super.close()}},R=class{constructor(e,t,i,a,n=k){this._responseStream=null,this._controller=new AbortController,this._getSession=t,this._params=e,this._client=i,this._requestLogger=a,this._version=n}[Symbol.asyncIterator](){if(!this._responseStream)throw Error("logical bug");return b.iterFromReadableStream(this._responseStream,this._controller,async e=>await this.onEvent(e))}async startJob(){return Promise.reject("abstract class")}async onEvent(e){return"error"==e.type?Promise.reject(`Error event for source ${e.source_id}: ${e.message}`):Promise.resolve()}start(e,t){return this._responseStream=new Promise(async(i,a)=>{try{let e=1;for(;;)try{const n=await this.startJob();if(401==n.status){if(t(n.status),!e--){a(`response ${n.status}: ${n.statusText}`);break}this._requestLogger.info("received 401 response, attempt to reauthorize once")}else{if(404!=n.status){if(n.ok){if(n.body){i(n.body);break}{const e=await n.text();if(e){i(w(e));break}a("response body is empty");break}}a(`upload error ${n.status}: ${await n.text()}`);break}if(t(n.status),!e--){a(`response ${n.status}: ${n.statusText}`);break}this._requestLogger.info("received 404 response, attempt to restart pop")}}catch(i){if(!e--){t(500),a(i);break}this._requestLogger.info("unknown, attempt to restart pop (as if we received 404)",i),t(404)}}catch(e){a(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}};R.n=0;var L,z,D=class extends R{get[Symbol.toStringTag](){return"uploadJob"}constructor(e,t,i,a,n,o,s,r){super(n,o,s,r),this._uploadStream=e,this._mimeType=t,this._size=i,this._videoMode=a,this._needsFullDuplex=!s.isFullDuplex()&&t.startsWith("video/")&&"stream"==a}async onEvent(e){if("prepared"==e.type){if(!e.source_id)return Promise.reject("did not get a prepared sourceId to simulate full duplex");const t=await this._getSession();if(!t.baseUrl)return Promise.reject("session.baseUrl must not ne null");let i;const a=new URLSearchParams({mode:"queue",processing:"async",sourceId:e.source_id});if(void 0!==this._videoMode&&a.set("videoMode",this._videoMode),void 0!==this._version&&a.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))a.set(e,t);const n=`${t.baseUrl.replace(/\/+$/,"")}/pipelines/${t.pipelineId}/source?${a.toString()}`;if(this._params.componentParams||this._params.roi){const e=new FormData;if(this._params.componentParams){const t=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});e.append("params",t)}if(this._params.roi){const t=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});e.append("roi",t)}const a=await new Response(this._uploadStream).blob();e.append("file",a);const o={...t.authenticationHeaders(),Accept:"application/jsonl"};i=this._client.fetch(n,{headers:o,method:"POST",body:e,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const e={...t.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(e["Content-Length"]=`${this._size}`),i=this._client.fetch(n,{headers:e,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}i.then(async e=>{204!=e.status&&this._requestLogger.debug(`unexpected status ${e.status} (${await e.text()}) for POST ${n}`)}).catch(e=>{this._requestLogger.debug(`error ${e} for POST ${n}`)})}return Promise.resolve()}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not be null");let t;if(this._needsFullDuplex){const i=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/prepareSource?timeout=10s`,a={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(i,{headers:a,method:"POST",signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i=new URLSearchParams({mode:"queue",processing:"sync"});if(void 0!==this._videoMode&&i.set("videoMode",this._videoMode),void 0!==this._version&&i.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))i.set(e,t);const a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?${i.toString()}`;if(this._params.componentParams||this._params.roi){const i=new FormData;if(this._params.componentParams){const e=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});i.append("params",e)}if(this._params.roi){const e=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});i.append("roi",e)}const n=await new Response(this._uploadStream).blob();i.append("file",n);const o={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(a,{headers:o,method:"POST",body:i,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(i["Content-Length"]=`${this._size}`),t=await this._client.fetch(a,{headers:i,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half"})}}return t}},N=class extends R{constructor(e,t,i,a,n){super(t,i,a,n),this._location=e}get[Symbol.toStringTag](){return"loadFromJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"URL",url:this._location,params:this._params.componentParams,roi:this._params.roi,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(a,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},q=class extends R{constructor(e,t,i,a,n){super(t,i,a,n),this._assetUuid=e}get[Symbol.toStringTag](){return"loadFromAssetUuidJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"ASSET_UUID",assetUuid:this._assetUuid,params:this._params.componentParams,roi:this._params.roi,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(a,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},M=class extends R{constructor(e,t,i,a,n){super(t,i,a,n),this._mediaStream=e}get[Symbol.toStringTag](){return"loadLiveIngressJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t=new U(this._mediaStream,async()=>e,this._client,!0,this._requestLogger);t.start().then(e=>{this._requestLogger.debug("direct whip for ingressId=%s successful",t.ingressId())}).catch(e=>{this._controller.abort(e)});const i={sourceType:"WHIP",whipIngressId:t.ingressId(),params:this._params.componentParams,roi:this._params.roi,version:this._version};this._params.motionDetect&&Object.assign(i,this._params.motionDetect);const a={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=preempt&processing=sync`;return await this._client.fetch(n,{headers:a,method:"PATCH",body:JSON.stringify(i),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}};if("document"in globalThis&&"implementation"in globalThis.document)L=async(e,t)=>{throw new DOMException("resolving a path to a file is not supported in browser")};else{let Ue=function(e){return new ReadableStream({async pull(t){const{value:i,done:a}=await e.next();a?t.close():t.enqueue(new Uint8Array(i))}})};async function*Re(e){for await(const t of e)yield t}L=async(e,t)=>{const a=f(),n=i(122),o=Re((await n.open(e.path,"r")).createReadStream());return{stream:Ue(o),mimeType:e.mimeType?e.mimeType:a.lookup(e.path)||"image/*"}}}function $(e,t){const i=e instanceof Request?e.url:e;return`${e instanceof Request?e.method:t?.method||(void 0!==t?.body?"POST":"GET")} ${i}`}if("document"in globalThis&&"implementation"in globalThis.document){class Le{constructor(e){this._logger=e}async fetch(e,t){const i=$(e,t);this._logger.debug(`Browser fetch() BEFORE ${i}`);const a=await fetch(e,t);return this._logger.debug(`AFTER ${i} -> ${a.status}`),a}async close(){}isFullDuplex(){return!1}}z=async e=>new Le(e)}else{class ze{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=$(e,t);this._logger.debug(`Node fetch() BEFORE ${i}`);const a=await fetch(e,t);return this._logger.debug(`AFTER ${i} -> ${a.status}`),a}async close(){return this._agent.close()}isFullDuplex(){return!1}}z=async e=>{const t=new(i(360).Agent)({keepAliveTimeout:1e4,connections:5,pipelining:0});return e.debug("Using node fetch with undici agent as http client"),new ze(t,e)}}var W,H=class{constructor(e){this.promiseResolverQueue=[],this.permits=e}getPermits(){return this.permits}async wait(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(e=>this.promiseResolverQueue.push(e))}async acquire(){return this.wait()}async waitFor(e){if(this.permits>0)return this.permits-=1,Promise.resolve(!0);let t=e=>{};const i=new Promise(e=>{t=e});return this.promiseResolverQueue.push(t),setTimeout(()=>{const e=this.promiseResolverQueue.indexOf(t);-1!==e?this.promiseResolverQueue.splice(e,1):console.warn("Semaphore.waitFor couldn't find its promise resolver in the queue"),t(!1)},e),i}tryAcquire(){return this.permits>0&&(this.permits-=1,!0)}drainPermits(){if(this.permits>0){const e=this.permits;return this.permits=0,e}return 0}signal(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Semaphore.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}release(){this.signal()}async execute(e){await this.wait();try{return await e()}finally{this.signal()}}},K=i(713),J=i(262);W="document"in globalThis&&"implementation"in globalThis.document?async(e,t)=>{if(null==t.eyepopUrl)return Promise.reject("options.eyepopUrl cannot be null");const i={clientId:e.clientId,domain:e.domain,authorizationParams:{scope:e.scope,audience:e.audience}},a=await(0,J.createAuth0Client)(i);await a.isAuthenticated()||await a.loginWithPopup();const n=await a.getTokenSilently();if(!n)return Promise.reject("auth0 login failed");let o;const s=t;return o=void 0!==s.popId?{eyepopUrl:t.eyepopUrl,accessToken:n,validUntil:Date.now()+36e5,popId:s.popId,baseUrl:void 0,pipelineId:void 0,authenticationHeaders:()=>({Authorization:`Bearer ${n}`})}:{eyepopUrl:t.eyepopUrl,accessToken:n,validUntil:Date.now()+36e5},o}:(e,t)=>Promise.reject("auth0 login not supported server-side");var F=class{constructor(e){let t;this._options=e,this._token=null,this._expire_token_time=null,this._client=null,this._statusRetryHandlers=new Map,this._statusRetryHandlers.set(401,this.statusHandler401),this._limit=new H(this._options.jobQueueLength??1024),this._state="Idle",this._message=null,this._stateChangeHandler=null,t=e.logger?e.logger:(0,K.pino)(),this._logger=t.child({module:"eyepop"}),this._requestLogger=this._logger.child({module:"requests"})}setStatusRetryHandlers(e=void 0){this._statusRetryHandlers=new Map(e),this._statusRetryHandlers.set(401,this.statusHandler401)}eyepopUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,""):"https://compute.eyepop.ai"}eyepopWebApiUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,"").replace(/compute\./,"web-api."):"https://api.eyepop.ai"}pendingJobs(){return(this._options.jobQueueLength??1024)-this._limit.getPermits()}state(){return this._state}lastMessage(){return this._message}onStateChanged(e){return this._stateChangeHandler=e,this}updateState(e=void 0,t=void 0){const i=this._state;null==e&&(e=this._limit.getPermits()==this._options.jobQueueLength?"Idle":"Busy"),this._state=e,this._message=t||null,this._stateChangeHandler&&this._stateChangeHandler(i,this._state)}async connect(){if(this._client)return this._logger.warn("endpoint already connected"),this;if(!this._options.eyepopUrl)return Promise.reject("option eyepopUrl or environment variable EYEPOP_URL is required");if(void 0===this._options.auth)return Promise.reject("cannot connect without defined auth option");if(void 0!==this._options.auth.session)this._token=this._options.auth.session.accessToken,this._expire_token_time=this._options.auth.session.validUntil/1e3;else if(void 0!==this._options.auth.oAuth2);else if(void 0!==this._options.auth.apiKey);else if(void 0===this._options.auth.isLocal)return Promise.reject("option apiKey or environment variable EYEPOP_API_KEY is required");return void 0!==this._options.platformSupport?.createHttpClient?this._client=await this._options.platformSupport.createHttpClient(this._requestLogger):this._client=await z(this._requestLogger),await this.reconnect()}async disconnect(e=!0){if(e&&this._limit)for(let e=0;e<this._options.jobQueueLength;e++)await this._limit.acquire();this._limit=new H(this._options.jobQueueLength??1024),this._client&&(await this._client.close(),this._client=null)}async session(){return await this.currentAccessToken(),null==this._token||null==this._expire_token_time?Promise.reject("endpoint not connected"):{eyepopUrl:this._options.eyepopUrl,accessToken:this._token,validUntil:1e3*this._expire_token_time}}statusHandler401(e){this._token=null,this._expire_token_time=null}async fetchWithRetry(e,t=1){for(;;)try{const i=await e();if(i.ok)return i;{const e=this._statusRetryHandlers.get(i.status);if(null==e)return i;if(e(i.status),!t--)return i;this._requestLogger.info("received %d response, retry",i.status)}}catch(e){const i=this._statusRetryHandlers.get(404);if(null==i)return Promise.reject(`error ${e}`);if(i(e),!t--)return Promise.reject(`error ${e}`);this._requestLogger.info("error %s, retry",e)}}async reconnect(){throw new Error("reconnect() not implemented")}async authorizationHeader(){return void 0!==this._options.auth.isLocal?"Implicit":`Bearer ${await this.currentAccessToken()}`}async currentAccessToken(){const e=Date.now()/1e3;if(!this._token||this._expire_token_time<e){this.updateState("Authenticating");try{if(!this._client)return Promise.reject("endpoint not connected");if(void 0!==this._options.auth.isLocal)this._token="implicit",this._expire_token_time=Number.MAX_VALUE;else{if(void 0!==this._options.auth.session)return Promise.reject("temporary access token expired");if(void 0!==this._options.auth.oAuth2&&this._options.eyepopUrl){const e=await W(this._options.auth.oAuth2,this._options);this._token=e.accessToken,this._expire_token_time=e.validUntil/1e3}else{if(void 0===this._options.auth.apiKey||!this._options.eyepopUrl)return Promise.reject("no valid auth option");{const t={Authorization:`Bearer ${this._options.auth.apiKey}`},i=`${this.eyepopUrl()}/v1/auth/authenticate`,a=await this._client.fetch(i,{method:"POST",headers:t});if(200!=a.status){const e=await a.text();return Promise.reject(`Unexpected status ${a.status}: ${e}`)}const n=await a.json();this._token=n.access_token,this._expire_token_time=e+n.expires_in-60}}}}finally{this.updateState()}}return this._logger.debug("using access token, valid for at least %d seconds",this._expire_token_time-e),this._token}},B=(e=>(e.Transient="transient",e))(B||{}),V=(e=>(e.UNKNOWN="unknown",e.PENDING="pending",e.RUNNING="running",e.STOPPED="stopped",e.FAILED="failed",e.ERROR="error",e.PIPELINE_CREATING="pipeline_creating",e.PIPELINE_OK="pipeline_ok",e.PIPELINE_CHECKING="pipeline_checking",e.PIPELINE_ERROR="pipeline_error",e))(V||{}),G=e=>new Promise(t=>setTimeout(t,e)),Z=class e extends F{constructor(e){super(e),this.setStatusRetryHandlers(new Map([[404,e=>this.statusHandler404(e)]])),this._baseUrl=null,this._pipelineId=null,this._popName=null,this._pipeline=null}options(){return this._options}async disconnect(e=!0){if("transient"==this.options().popId&&this._pipelineId){const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await(this._client?.fetch(e,{method:"DELETE",headers:t}));if(204!=i?.status){const e=await(i?.text());this._logger.info(`stopping pipeline failed, status ${i?.status}: ${e}`)}}return super.disconnect(e)}statusHandler404(e){this._pipelineId=null,this._baseUrl=null}async session(){const e=await super.session();return null!=this._baseUrl&&null!=this._pipelineId||(await this.reconnect(),null!=this._baseUrl&&null!=this._pipelineId)?{eyepopUrl:e.eyepopUrl,accessToken:e.accessToken,validUntil:e.validUntil,popId:this.options().popId,baseUrl:this._baseUrl,pipelineId:this._pipelineId,authenticationHeaders:()=>this._authenticationHeaders(e)}:Promise.reject("endpoint not connected")}popName(){return this._popName}pop(){return this._pipeline&&this._pipeline.pop||null}async changePop(e){const t=this._client;if(!this._baseUrl||!t)return Promise.reject("endpoint not connected, use connect()");let i=await this.fetchWithRetry(async()=>{const i=await this.session();let a={"Content-Type":"application/json",...this._authenticationHeaders(i)};const n=`${i.baseUrl}/pipelines/${i.pipelineId}/pop`;return await t.fetch(n,{method:"PATCH",body:JSON.stringify(e),headers:a})});if(204!=i.status){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}this._pipeline?this._pipeline.pop=e:this._pipeline={id:this._pipelineId||"unknown",state:"idle",startTime:(new Date).toString(),pop:e}}_authenticationHeaders(e){return void 0!==this._options.auth.isLocal?{}:{Authorization:`Bearer ${e.accessToken}`}}popId(){return this.options().popId||null}async process(e,t){return void 0!==e.source?await this.processV2(e):await this.processV1(e,t)}async processV1(e,t){return void 0!==e.file?this.uploadFile(e,{componentParams:t}):void 0!==e.stream?this.uploadStream(e,{componentParams:t}):void 0!==e.path?this.uploadPath(e,{componentParams:t}):void 0!==e.url?this.loadFrom(e,{componentParams:t}):void 0!==e.assetUuid?this.loadFromAssetUuid(e,{componentParams:t}):void 0!==e.mediaStream?this.loadMediaStream(e,{componentParams:t}):Promise.reject("unknown source type")}async processV2(e){return void 0!==e.source.file?this.uploadFile(e.source,e):void 0!==e.source.stream?this.uploadStream(e.source,e):void 0!==e.source.path?this.uploadPath(e.source,e):void 0!==e.source.url?this.loadFrom(e.source,e):void 0!==e.source.assetUuid?this.loadFromAssetUuid(e.source,e):void 0!==e.source.mediaStream?this.loadMediaStream(e.source,e):Promise.reject("unknown source type")}async uploadFile(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.file,e.file.type,e.file.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.stream,e.mimeType,e.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadPath(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{let i;this.updateState(),i=this._options.platformSupport?.resolvePath?await this._options.platformSupport.resolvePath(e,this._logger):await L(e,this._logger);const a=new D(i.stream,i.mimeType,i.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return a.start(()=>{this.jobDone(a)},e=>{this.jobStatus(a,e)})}catch(e){throw this._limit.release(),e}}async loadFrom(e,t){if(e.url.startsWith("file://"))return await this.uploadPath({path:e.url.substring(7)},t);if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new N(e.url,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadFromAssetUuid(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new q(e.assetUuid,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadMediaStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new M(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.startComputeSession(),this._pipelineId=await this.startTransientPipeline()):await this.startWebApiSessionWithPopId(),this.updateState(),Promise.resolve(this)}async startWebApiSessionWithPopId(){if(!this._client)throw new Error("endpoint not initialized");const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=false`,t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let i=await this._client.fetch(e,{headers:t});if(401==i.status){this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",e),this.statusHandler401(i.status);const t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig"),i=await this._client.fetch(e,{headers:t})}if(200!=i.status){const e=await i.text();throw 429==i.status?this.updateState("NotAvailable",e):this.updateState("Error",e),new Error(`Unexpected status ${i.status}: ${e}`)}let a=await i.json();if(!a.base_url&&this.options().autoStart){const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=true`;this._requestLogger.debug("pop was not running, trying to autostart with: %s",e);const t={Authorization:await this.authorizationHeader()};if(i=await this._client.fetch(e,{headers:t}),200!=i.status){this.updateState("Error");const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}a=await i.json()}const n=new URL(a.base_url,this.eyepopUrl());if(this._baseUrl=n.toString(),this._baseUrl){if(this._baseUrl=this._baseUrl.replace(/\/+$/,""),this._pipelineId=a.pipeline_id,this._popName=a.name,!this._pipelineId||!this._baseUrl)throw new Error("Pop not started");const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await this._client.fetch(e,{method:"GET",headers:t});if(i.status>200){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}if(this._pipeline=await i.json(),this.options().stopJobs){const e={sourceType:"NONE"},t={Authorization:await this.authorizationHeader(),"Content-Type":"application/json"},i=`${this._baseUrl}/pipelines/${this._pipeline.id}/source?mode=preempt&processing=sync`;let a=await this._client.fetch(i,{method:"PATCH",headers:t,body:JSON.stringify(e)});if(a.status>=300){const e=await a.text();throw new Error(`Unexpected status ${a.status}: ${e}`)}}}}async startComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t=null;const i=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",i);const a={Authorization:await this.authorizationHeader()};let n,o=await this._client.fetch(i,{headers:a});if(404==o.status)n=[];else{if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}n=await o.json()}if(console.log(n),n.length>0){this._logger.debug(`User has ${n.length} sessions, inspecting for active session`);for(let i of n)if(!e.SESSION_DEAD.has(i.session_status)){t=i,this._logger.debug(`Use active session ${i.session_uuid} with pipeline ${i.pipeline_uuid}`);break}}if(!t){if(this._requestLogger.debug("creating a new session at: %s",i),o=await this._client.fetch(`${i}?wait=true`,{headers:a,method:"POST"}),200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} creating a compute session: ${e}`)}if(n=await o.json(),0==n.length)throw new Error("Unexpected, no compute session after attempt to create one");t=n[0]||null}if(!t)throw new Error("unexpected undefined session");let s=!1;const r=Date.now()+e.WAIT_FOR_IS_READY;for(;!s;){const i=`${t.session_endpoint}/health`;if(o=await this._client.fetch(i,{headers:a}),o.status<300)s=!0;else{if(Date.now()>r)throw new Error(`Created session ${t.session_uuid} did not become healthy after ${e.WAIT_FOR_IS_READY/1e3} seconds`);this._logger.debug(`session ${t.session_uuid} health check status ${o.status}, wait and poll for update`),await G(e.CHECK_FOR_IS_READY_INTERVAL)}}this._baseUrl=t.session_endpoint,this._pipeline=null,t.pipeline_uuid?this._pipelineId=t.pipeline_uuid:this._pipelineId=null}async startTransientPipeline(){const e=this._client,t=this._baseUrl;if(null==e||null==t)throw new Error("endpoint not initialized");let i;i=this._pipeline&&this._pipeline.pop?this._pipeline.pop:{components:[]};const a={pop:i,source:{sourceType:"NONE"},idleTimeoutSeconds:30,logging:["out_meta"],videoOutput:"no_output"},n=`${t.replace(/\/+$/,"")}/pipelines`;let o=await this.fetchWithRetry(async()=>{let t={"Content-Type":"application/json",Authorization:await this.authorizationHeader()};return e.fetch(n,{method:"POST",body:JSON.stringify(a),headers:t})});if(200!=o.status){const e=await o.text();throw new Error(`Unexpected status ${o.status}: ${e}`)}return(await o.json()).id}};Z.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),Z.WAIT_FOR_IS_READY=6e4,Z.CHECK_FOR_IS_READY_INTERVAL=250;var Y,X=Z;function Q(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var i=e.shift();e[0]=i+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var a=0;a<e.length;a++){var n=e[a];if("string"!=typeof n)throw new TypeError("Url must be a string. Received "+n);""!==n&&(a>0&&(n=n.replace(/^[\/]+/,"")),n=a<e.length-1?n.replace(/[\/]+$/,""):n.replace(/[\/]+$/,"/"),t.push(n))}var o=t.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}Y="document"in globalThis&&"implementation"in globalThis.document?(e,t)=>new WebSocket(e,t):(e,t)=>new(i(826).WebSocket)(e,t);var ee=(e=>(e.dataset="dataset",e.vlm="vlm",e))(ee||{});function te(e,t){switch(t){case"dataset":return e.datasetApiUrl??"";case"vlm":return e.vlmApiUrl??"";default:throw new Error(`unsupported type ${t}`)}}var ie=(e=>(e.error="error",e.requested="requested",e.in_progress="in_progress",e.completed="completed",e))(ie||{}),ae=(e=>(e.rejected="rejected",e.upload_in_progress="upload_in_progress",e.upload_failed="upload_failed",e.transform_failed="transform_failed",e.transform_in_progress="transform_in_progress",e.accepted="accepted",e))(ae||{}),ne=(e=>(e.ground_truth="ground_truth",e.prediction="prediction",e.auto="auto",e))(ne||{}),oe=(e=>(e.approved="approved",e.rejected="rejected",e.unknown="unknown",e))(oe||{}),se=(e=>(e.all_assets="all_assets",e.annotated_only="annotated_only",e.manual_annotated_only="manual_annotated_only",e.auto_annotated_only="auto_annotated_only",e))(se||{}),re=(e=>(e.all="all",e.user_reviewed="user_reviewed",e.user_approved="user_approved",e.ground_truth="ground_truth",e))(re||{}),ce=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e))(ce||{}),pe=(e=>(e.original="original",e.video_original_size="video_original_size",e.image_original_size="image_original_size",e.image_fit_1024="image_fit_1024",e.image_fit_640="image_fit_640",e.image_fit_224="image_fit_224",e.image_cover_1024="image_cover_1024",e.image_cover_640="image_cover_640",e.image_cover_224="image_cover_224",e))(pe||{}),le=(e=>(e.RECTANGLE="rectangle",e.CONTOUR="contour",e))(le||{}),ue=(e=>(e.epdet_b1="epdet_b1",e.imported="imported",e.vlm_ability="vlm_ability",e))(ue||{}),de=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e.keypoint_detection="keypoint_detection",e))(de||{}),me=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(me||{}),he=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(he||{}),fe=(e=>(e.eyepop="eyepop",e.qc_ai_hub="qc_ai_hub",e))(fe||{}),ve=(e=>(e.eyepop_bundle="eyepop_bundle",e.weights_file="weights_file",e))(ve||{}),ge=(e=>(e.waiting="waiting",e.scheduling="scheduling",e.preparing="preparing",e.training="training",e.exporting="exporting",e))(ge||{}),be=(e=>(e.dataset_added="dataset_added",e.dataset_removed="dataset_removed",e.dataset_modified="dataset_modified",e.dataset_version_modified="dataset_version_modified",e.asset_added="asset_added",e.asset_removed="asset_removed",e.asset_status_modified="asset_status_modified",e.asset_annotation_modified="asset_annotation_modified",e.model_added="model_added",e.model_removed="model_removed",e.model_modified="model_modified",e.model_status_modified="model_status_modified",e.model_progress="model_progress",e.events_lost="events_lost",e.workflow_started="workflow_started",e.workflow_succeeded="workflow_succeeded",e.workflow_failed="workflow_failed",e.workflow_task_started="workflow_task_started",e.workflow_task_succeeded="workflow_task_succeeded",e.workflow_task_failed="workflow_task_failed",e))(be||{}),xe=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(xe||{}),ye=(e=>(e.TensorFlowLite="TensorFlowLite",e.TensorFlowGraphDef="TensorFlowGraphDef",e.ONNX="ONNX",e.TorchScript="TorchScript",e.TorchScriptCpu="TorchScriptCpu",e.TorchScriptCuda="TorchScriptCuda",e.PyTorch="PyTorch",e.ModelLess="ModelLess",e))(ye||{}),we=(e=>(e.float32="float32",e.float16="float16",e.int32="int32",e.int8="int8",e.uint8="uint8",e))(we||{}),_e=(e=>(e.gcs="gcs",e.s3="s3",e.https_signed="https_signed",e))(_e||{}),ke=(e=>(e.success="success",e.failed="failed",e))(ke||{}),Se=(e=>(e.in_progress="in_progress",e.draft="draft",e.published="published",e))(Se||{}),Ee=class{constructor(e,t,i,a){this._response=null,this._runInfo=null,this._controller=new AbortController,this._vlmFetch=i,this._assetUrl=e,this._inferRequest=t,this._requestLogger=a}[Symbol.asyncIterator](){if(!this._response)throw Error("logical bug");let e=!1;const t=this._response,i=this._controller;return async function*(){if(e)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");e=!0;let a=!1;try{const e=await t;if(e)for(let t of e)yield t;a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||i.abort()}}()}start(e){return this._response=new Promise(async(t,i)=>{try{let e=null;for(;;){let a=null;if(e)a=await this._vlmFetch(`/api/v1/requests/${e}?timeout=20`,{method:"POST"});else{const e=new Map(Object.entries(this._inferRequest));e.set("url",this._assetUrl);const t=new FormData;t.append("infer_request",JSON.stringify(Object.fromEntries(e))),a=await this._vlmFetch("/api/v1/infer?timeout=20",{method:"POST",body:t})}const n=a.predictions,o=a.run_info;if(n){this._runInfo=o,t(n);break}if(e=a.request_id,!e){i(`missing request_id in response: ${JSON.stringify(a)}`);break}}}catch(e){i(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}},Te=class{constructor(e,t,i,a){this._response=null,this._controller=new AbortController,this._vlmFetch=i,this._evaluateRequest=e,this._workerRelease=t,this._requestLogger=a}async response(){if(!this._response)throw Error("logical bug");return await this._response}start(e){return this._response=new Promise(async(t,i)=>{try{let e=null;for(;;){let a=null;if(e)a=await this._vlmFetch(`/api/v1/evaluations/${e}?timeout=20`,{method:"GET"});else{const e=this._workerRelease?`&worker_release=${this._workerRelease}`:"";a=await this._vlmFetch(`/api/v1/evaluations?timeout=20${e}`,{method:"POST",body:JSON.stringify(this._evaluateRequest),headers:{"Content-Type":"application/json"}})}if(a.run_info){t(a);break}if(e=a.request_id,!e){i(`missing request_id in response: ${JSON.stringify(a)}`);break}}}catch(e){i(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}};function je(e,t){if(null!==t)return t}var Ae,Pe=class extends F{constructor(e){super(e),this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws=null,this._ws_current_reconnect_delay=null,this._accountId=e.accountId||null,this._account_event_handlers=[],this._dataset_uuid_to_event_handlers=new Map;const t=e.auth;if(void 0!==t.session){const e=t.session;e.accountId&&(this._accountId=e.accountId)}}async session(){const e=await super.session();return{eyepopUrl:e.eyepopUrl,accessToken:e.accessToken,validUntil:e.validUntil,accountId:this.options().accountId,datasetApiUrl:this.datasetApiUrl,vlmApiUrl:this.vlmApiUrl}}async disconnect(e=!0){if(this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws){try{this._ws.close()}catch(e){this._logger.warn("ignored exception",e)}this._ws=null}await super.disconnect(e)}async reconnect(){if(!this._client)return Promise.reject("endpoint not initialized");const e=this._accountId?`?account_uuid=${this._accountId}`:"",t=`${this.eyepopUrl()}/v1/configs${e}`;let i={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let a=await this._client.fetch(t,{headers:i});if(401==a.status&&(this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",t),this.statusHandler401(a.status),i={Authorization:await this.authorizationHeader()},this.updateState("FetchConfig"),a=await this._client.fetch(t,{headers:i})),200!=a.status){this.updateState("Error");const e=await a.text();return Promise.reject(`Unexpected status ${a.status} for ${t}: ${e}`)}let n=await a.json();const o=new URL(n.dataset_api_url,this.eyepopUrl());this.datasetApiUrl=o.toString();const s=new URL(n.vlm_api_url,this.eyepopUrl());if(this.vlmApiUrl=s.toString(),this.options().disableWs?this._logger.info("disabled ws connection"):await this.reconnect_ws(),this.options().useCookie){const e=this._client,t=Q(this.datasetApiUrl,"security","check?set_cookie=true"),i={Authorization:await this.authorizationHeader()};if(a=await e.fetch(t,{headers:i}),204!=a.status){this.updateState("Error");const e=await a.text();return Promise.reject(`Unexpected status ${a.status}: ${e}`)}}return this.updateState(),Promise.resolve(this)}async reconnect_ws(){this._ws&&(this._ws.close(),this._ws=null);const e=this.datasetApiUrl?.replace("https://","wss://").replace("http://","ws://");if(!e)return;const t=Q(e,"events");return this._requestLogger.debug("about to connect ws to: %s",t),new Promise((e,i)=>{const a=Y(t);if(!a)return e();this._ws=a,a.onopen=async()=>{const t=await this.authorizationHeader();let i=JSON.stringify({authorization:t});this._requestLogger.debug("ws send: %s",i),a.send(i),i=JSON.stringify({subscribe:{account_uuid:this._accountId}}),this._requestLogger.debug("ws send: %s",i),a.send(i);for(let e in this._dataset_uuid_to_event_handlers.keys()){const t=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",t),a.send(t)}this._ws_current_reconnect_delay=1e3,e()},a.onmessage=e=>{const t=JSON.parse(e.data);this._requestLogger.debug("received ws: %s",JSON.stringify(t));const i=t;this.dispatchChangeEvent(i)},a.onclose=e=>{const{code:t,reason:i}=e;this._requestLogger.debug("ws closed: %d %s",t,i),"unsubscribe"!==i&&(this._ws_current_reconnect_delay?this._ws_current_reconnect_delay<6e4&&(this._ws_current_reconnect_delay*=1.5):this._ws_current_reconnect_delay=1e3,setTimeout(async()=>{await this.reconnect_ws()},this._ws_current_reconnect_delay))},a.onerror=e=>(this._logger.error(e),i(e),null)})}options(){return this._options}async request(e,t={},i=!1,a="dataset"){const n=this._client;if(!n)return Promise.reject("endpoint not connected");let o=await this.fetchWithRetry(async()=>{const o=await this.session(),s=te(o,a),r={...i?{}:{Authorization:`Bearer ${o.accessToken}`},...t.headers||{}};t.body||(t.body=null);const c={headers:r,method:t.method||"GET",body:t.body};return this._requestLogger.debug("Request - "+c.method+" "+e+" BODY: "+(c.body?c.body:"")),await n.fetch(Q(s??"",e),c)});if(204===o.status)return null;const s=o.headers.get("Content-Type");if(this._requestLogger.debug("Response - "+o.status+" "+o.statusText),!o.ok)throw s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("text/"))?new Error(`Request failed with ${o.status} ${o.statusText}: ${await o.text()}`):new Error(`Request failed with ${o.status} ${o.statusText}`);return s&&s.toLowerCase().startsWith("application/json")?await o.json():await o.blob()}async listDatasets(e=!0,t){const i=void 0!==t?`&modifiable_version_only=${t}`:"";return this.request(`/datasets?account_uuid=${this._accountId}&include_stats=${e}${i}`,{method:"GET"})}async createDataset(e){return this.request(`/datasets?account_uuid=${this._accountId}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async getDataset(e,t=!0,i,a){const n=i?`&dataset_version=${i}`:"",o=void 0!==a?`&modifiable_version_only=${a}`:"";return this.request(`/datasets/${e}?include_stats=${t}${n}${o}`,{method:"GET"})}async updateDataset(e,t,i=!0){return this.request(`/datasets/${e}?start_auto_annotate=${i}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async updateDatasetHeroAsset(e,t){return this.request(`/datasets/${e}/hero_asset`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteDataset(e){return this.request(`/datasets/${e}`,{method:"DELETE"})}async freezeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/freeze?${i}`,{method:"POST"})}async analyzeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/analyze?${i}`,{method:"POST"})}async autoAnnotateDatasetVersion(e,t,i){const a=t?`&dataset_version=${t}`:"",n=i?`&max_assets=${i}`:"";return this.request(`/datasets/${e}/auto_annotate?${a}${n}`,{method:"POST"})}async deleteDatasetVersion(e,t){return this.request(`/datasets/${e}/versions?dataset_version=${t}`,{method:"DELETE"})}async deleteAnnotations(e,t,i=["unknown"]){let a="";for(let e in i)a+=`&user_review=${e}`;await this.request(`/datasets/${e}/annotations?dataset_version=${t}${a}`,{method:"DELETE"})}async createDatasetAutoAnnotate(e,t,i){const a=i?`dataset_version=${i}&`:"";return this.request(`/datasets/${t}/auto_annotates?${a}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async updateDatasetAutoAnnotate(e,t,i,a,n){const o=n?`dataset_version=${n}&`:"";return this.request(`/datasets/${t}/auto_annotates?auto_annotate=${i}&source=${encodeURIComponent(a)}&${o}`,{method:"PATCH",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async listDatasetAutoAnnotates(e,t,i,a){const n=a?`dataset_version=${a}&`:"",o=t?`auto_annotate=${t}&`:"",s=i?`source=${i}&`:"";return this.request(`/datasets/${e}/auto_annotates?${n}&${o}&${s}`,{method:"GET"})}async uploadAsset(e,t,i,a=void 0){const n=t?`&dataset_version=${t}`:"";let o;return o=a?`/assets?dataset_uuid=${e}${n}&external_id=${a}`:`/assets?dataset_uuid=${e}${n}`,this.request(o,{method:"POST",body:i,headers:{"Content-Type":i.type||"application/octet-stream"}})}async importAsset(e,t,i,a=void 0){const n=t?`&dataset_version=${t}`:"";let o;return o=a?`/assets/imports?dataset_uuid=${e}${n}&external_id=${a}`:`/assets/imports?dataset_uuid=${e}${n}`,this.request(o,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async listAssets(e,t,i=!1,a,n,o,s,r,c){const p=new URLSearchParams;p.set("dataset_uuid",e),null!=t&&p.set("dataset_version",String(t)),i&&p.set("include_annotations","true"),null!=n&&p.set("inclusion_mode",n),null!=o&&p.set("annotation_inclusion_mode",o);for(const e of s??[])p.append("include_partition",e);for(const e of r??[])p.append("include_auto_annotate",e);for(const e of c??[])p.append("include_source",e);return null!=a&&p.set("top_k",String(a)),this.request(`/assets?${p.toString()}`,{method:"GET"})}async getAsset(e,t,i,a=!1,n){const o=i?`&dataset_version=${i}`:"",s=a?"&include_annotations=true":"",r=t?`&dataset_uuid=${t}`:"",c=n?`&top_k=${n}`:"";return this.request(`/assets/${e}?${r}${o}${s}${c}`,{method:"GET"})}async deleteAsset(e,t,i){const a=i?`&dataset_version=${i}`:"",n=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}?${n}${a}`,{method:"DELETE"})}async resurrectAsset(e,t,i,a){const n=a?`&into_dataset_version=${a}`:"";return this.request(`/assets/${e}/resurrect?dataset_uuid=${t}&from_dataset_version=${i}${n}`,{method:"POST"})}async updateAssetGroundTruth(e,t,i,a){const n=i?`&dataset_version=${i}`:"",o=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${o}${n}`,{method:"PATCH",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})}async deleteAssetGroundTruth(e,t,i){const a=i?`&dataset_version=${i}`:"",n=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${n}${a}`,{method:"DELETE"})}async updateAutoAnnotationStatus(e,t,i,a){if(!["approved","rejected","unknown"].includes(i))throw new Error("Invalid status");const n=a?`?approved_threshold=${a}`:"";return this.request(`/assets/${e}/auto_annotations/${t}/user_review/${i}${n}`,{method:"PATCH"})}async addAssetAnnotation(e,t,i,a,n,o,s,r){const c=t?`dataset_uuid=${t}&`:"",p=i?`&dataset_version=${i}&`:"",l=n?`&auto_annotate=${n}&`:"",u=o?`&source=${encodeURIComponent(o)}&`:"",d=s?`&user_review=${s}&`:"",m=void 0!==r?`&approved_threshold=${r}&`:"";return this.request(`/assets/${e}/annotations?${c}${p}${l}${u}${d}${m}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})}async updateAssetAnnotationApproval(e,t,i,a,n,o,s){const r=t?`dataset_uuid=${t}&`:"",c=i?`&dataset_version=${i}&`:"",p=a?`&auto_annotate=${a}&`:"",l=n?`&source=${encodeURIComponent(n)}&`:"",u=o?`&user_review=${o}&`:"",d=s?`&approved_threshold=${s}&`:"";return this.request(`/assets/${e}/annotations?${r}${c}${p}${l}${u}${d}`,{method:"PATCH"})}async downloadAsset(e,t,i,a="original",n,o,s){const r=i?`&dataset_version=${i}`:"",c=t?`&dataset_uuid=${t}`:"",p=n?`&start_timestamp=${n}`:"",l=o?`&end_timestamp=${o}`:"",u=s?`&url_type=${s}`:"";return this.request(`/assets/${e}/download?transcode_mode=${a}${c}${r}${p}${l}${u}`,{method:"GET"})}async previewAutoAnnotateAsset(e,t,i){return this.request(`/assets/${e}/preview_auto_annotate?auto_annotate=${t}`,{method:"POST",body:i?JSON.stringify(i):null,headers:i?{"Content-Type":"application/json"}:{}})}async addAssetRoi(e,t,i,a,n){const o=a?`&dataset_version=${a}`:"",s=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois?${s}${o}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteAssetRoi(e,t,i,a){const n=a?`&dataset_version=${a}`:"",o=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois/${encodeURIComponent(t)}?${o}${n}`,{method:"DELETE"})}async listModels(){return this.request(`/models?account_uuid=${this._accountId}`,{method:"GET"})}async findModelsForDataset(e){return this.request(`/models?dataset_uuid=${e}`,{method:"GET"})}async createModel(e,t,i,a=!0){return this.request(`/models?dataset_uuid=${e}&dataset_version=${t}&start_training=${a}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getModel(e){return this.request(`/models/${e}`,{method:"GET"})}async getModelTrainingProgress(e){return this.request(`/models/${e}/progress`,{method:"GET"})}async updateModel(e,t){return this.request(`/models/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteModel(e){return this.request(`/models/${e}`,{method:"DELETE"})}async trainModel(e){return this.request(`/models/${e}/train`,{method:"POST"})}async publishModel(e){return this.request(`/models/${e}/publish`,{method:"POST"})}async exportModel(e,t,i){if("qc_ai_hub"!=t)return Promise.reject(`Unexpected export_by ${t}, must be 'qc_ai_hub'`);await this.request(`/models/${e}/exports/qc_ai_hub`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async downloadModelArtifacts(e,t,i,a){const n=a?`artifact_type=${a}&`:"",o=i?`device_name=${encodeURIComponent(i)}&`:"";let s="";if(t)for(const e of t)s+=`model_format=${e}&`;return this.request(`/exports/model_artifacts/?model_uuid=${e}&${n}${o}${s}`,{method:"GET"})}addAccountEventHandler(e){this._account_event_handlers.push(e)}removeAccountEventHandler(e){this._account_event_handlers=this._account_event_handlers.filter(t=>t!==e)}addDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(this._logger.debug("addDatasetEventHandler %s",i),void 0===i){i=[],this._dataset_uuid_to_event_handlers.set(e,i);const t=this._ws;if(t){const i=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}}i.find(e=>e===t)!==t&&(this._logger.debug("addDatasetEventHandler event_handlers=%s",i),i.push(t))}removeDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(void 0!==i&&(i=i.filter(e=>e!==t),0==i.length)){const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}}removeAllDatasetEventHandlers(e){if(void 0===this._dataset_uuid_to_event_handlers.get(e))return;const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}async startWorkflow(e,t,i){return this.request(`/workflows?account_uuid=${e}&template_name=${t}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getWorkflow(e,t){return this.request(`/workflows/${e}?account_uuid=${t}`,{method:"GET"})}async listWorkflows(e,t,i,a){const n=[t?.map(e=>`dataset_uuid=${e}`).join("&")||"",i?.map(e=>`model_uuid=${e}`).join("&")||"",a?.map(e=>`phase=${e}`).join("&")||""].filter(e=>e).join("&");return this.request(`/workflows?account_uuid=${e}${n?`&${n}`:""}`,{method:"GET"})}async inferAsset(e,t,i,a,n,o,s){const r=`ai.eyepop://data/assets/${e}?${n?`transcode_mode=${n}&`:""}${i?`dataset_uuid=${i}&`:""}${a?`dataset_version=${a}&`:""}${o?`start_timestamp=${o}&`:""}${s?`end_timestamp=${s}&`:""}`;if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const e=new Ee(r,t,async(e,t)=>await this.request(e,t,!1,"vlm"),this._requestLogger);return e.start(()=>{this.jobDone(e)})}catch(e){throw this._limit.release(),e}}async evaluateDataset(e,t){if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new Te(e,t??null,async(e,t)=>await this.request(e,t,!1,"vlm"),this._requestLogger);return i.start(()=>{this.jobDone(i)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release()}async dispatchChangeEvent(e){switch(e.change_type){case"dataset_added":case"dataset_modified":case"dataset_removed":case"dataset_version_modified":case"workflow_started":case"workflow_succeeded":case"workflow_failed":case"workflow_task_started":case"workflow_task_succeeded":case"workflow_task_failed":this._logger.debug("dispatchChangeEvent account_event_handlers=%s",this._account_event_handlers);for(let t of this._account_event_handlers)await t(e);break;case"asset_added":case"asset_removed":case"asset_status_modified":case"asset_annotation_modified":case"model_added":case"model_modified":case"model_removed":case"model_status_modified":case"model_progress":const t=this._dataset_uuid_to_event_handlers.get(e.dataset_uuid);if(this._logger.debug("dispatchChangeEvent event_handlers=%s",t),void 0!==t)for(let i of t)await i(e)}}async listVlmAbilityGroups(){return this.request(`/vlm_ability_groups?account_uuid=${this._accountId}`,{method:"GET"})}async createVlmAbilityGroup(e){return this.request(`/vlm_ability_groups?account_uuid=${this._accountId}`,{method:"POST",body:JSON.stringify(e,je),headers:{"Content-Type":"application/json"}})}async getVlmAbilityGroup(e){return this.request(`/vlm_ability_groups/${e}`,{method:"GET"})}async deleteVlmAbilityGroup(e){return this.request(`/vlm_ability_groups/${e}`,{method:"DELETE"})}async updateVlmAbilityGroup(e,t){return this.request(`/vlm_ability_groups/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async listVlmAbilities(){return this.request(`/vlm_abilities?account_uuid=${this._accountId}`,{method:"GET"})}async createVlmAbility(e,t){const i=t?`&vlm_ability_group_uuid=${t}`:"";return this.request(`/vlm_abilities?account_uuid=${this._accountId}${i}`,{method:"POST",body:JSON.stringify(e,je),headers:{"Content-Type":"application/json"}})}async getVlmAbility(e){return this.request(`/vlm_abilities/${e}`,{method:"GET"})}async deleteVlmAbility(e){return this.request(`/vlm_abilities/${e}`,{method:"DELETE"})}async updateVlmAbility(e,t){return this.request(`/vlm_abilities/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async refineVlmAbility(e,t){return this.request(`/vlm_abilities/${e}/refine`,{method:"POST",body:JSON.stringify(t,je),headers:{"Content-Type":"application/json"}})}async cloneVlmAbility(e,t,i,a){const n=new URLSearchParams;return t?n.set("account_uuid",t):this._accountId&&n.set("account_uuid",this._accountId),i&&n.set("name",i),a&&n.set("default_alias_name",a),this.request(`/vlm_abilities/${e}/clone?${n.toString()}`,{method:"POST"})}async publishVlmAbility(e,t,i){const a=t?`alias_name=${encodeURIComponent(t)}&`:"",n=i?`tag_name=${encodeURIComponent(i)}&`:"";return this.request(`/vlm_abilities/${e}/publish?${a}${n}`,{method:"POST"})}async addVlmAbilityAlias(e,t,i){return this.request(`/vlm_abilities/${e}/alias/${encodeURIComponent(t)}/tag/${i?encodeURIComponent(i):""}`,{method:"POST"})}async removeVlmAbilityAlias(e,t,i){return this.request(`/vlm_abilities/${e}/alias/${encodeURIComponent(t)}/tag/${encodeURIComponent(i)}`,{method:"DELETE"})}async listVlmAbilityEvaluations(e){return this.request(`/vlm_abilities/${e}/evaluations`,{method:"GET"})}async getVlmAbilityEvaluation(e,t){return this.request(`/vlm_abilities/${e}/evaluations/${t}`,{method:"GET"})}async startVlmAbilityEvaluation(e,t){return this.request(`/vlm_abilities/${e}/evaluations`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async resolveAliases(e){const t=new URLSearchParams;return e.forEach(e=>{t.append("alias",e)}),this.request(`/exports/aliases?${t.toString()}`,{method:"GET"})}},Oe=class extends C{constructor(e,t,i,a){super(t,i,e,"liveIngress/whep",!1,a),this._stream=null}async close(){const e=this._stream;return this._stream=null,e&&e.getTracks().forEach(e=>{e.stop()}),super.close()}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):this.onIceServers(i)}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(this._stream)throw new Error("onIceServers has stream");const t=new RTCPeerConnection({iceServers:C.linkToIceServers(e.headers.get("Link"))});return t.addTransceiver("video",{direction:"sendrecv"}),t.onicecandidate=e=>this.onLocalCandidate(e),this._pc=t,this._requestLogger.info(`onIceServers ${t.iceConnectionState}`),new Promise(async(e,i)=>{t.ontrack=t=>{this._requestLogger.debug(`new track: ${t.track.kind}`),this._stream=t.streams[0]||null,e(this)},t.oniceconnectionstatechange=()=>{switch(t.iceConnectionState){case"failed":case"disconnected":this._requestLogger.debug("oniceconnectionstatechange disconnected"),i(`peer connection: ${t.iceConnectionState}`);break;case"connected":this._requestLogger.debug("oniceconnectionstatechange connected")}},await this.onLocalOffer(await t.createOffer())})}},Ie=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Ie("EYEPOP_API_KEY"),i=t?{apiKey:t}:void 0;function a(e={}){if(void 0===e.isLocalMode&&(e.isLocalMode=(e=>{if(void 0===e)return!1;const t=e.toLowerCase();return"true"==t||"yes"==t})(Ie("EYEPOP_LOCAL_MODE"))),e.isLocalMode&&(e.eyepopUrl="http://127.0.0.1:8080"),n(e),void 0===e.auth){if(!e.isLocalMode)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");e.auth={isLocal:!0}}return void 0===e.popId&&(e.popId=Ie("EYEPOP_POP_ID")||"transient"),void 0===e.autoStart&&(e.autoStart=!0),void 0===e.stopJobs&&(e.stopJobs=!0),void 0!==e.auth&&void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.popId&&(e.popId=e.auth.session.popId),new X(e)}function n(e){e.auth||(e.auth=i),!e.eyepopUrl&&e.auth&&e.auth.session&&e.auth.session.eyepopUrl&&(e.eyepopUrl=e.auth.session.eyepopUrl),e.eyepopUrl||(e.eyepopUrl=Ie("EYEPOP_URL")),e.eyepopUrl||(e.eyepopUrl="https://compute.eyepop.ai"),e.auth&&void 0!==e.auth.oAuth2&&"boolean"==typeof e.auth.oAuth2&&(e.eyepopUrl&&e.eyepopUrl.match(/https:(.*).staging.eyepop.xyz/i)?e.auth={oAuth2:{domain:"dev-eyepop.us.auth0.com",clientId:"jktx3YO2UnbkNPvr05PQWf26t1kNTJyg",audience:"https://dev-app.eyepop.ai",scope:"admin:clouds access:inference-api access:datasets"}}:e.auth={oAuth2:{domain:"eyepop.us.auth0.com",clientId:"Lb9ubA9Hf3jlaqWLUx8XgA0zvotgViCl",audience:"https://api.eyepop.ai",scope:"admin:clouds access:inference-api access:datasets"}}),e.jobQueueLength||(e.jobQueueLength=128)}e.endpoint=a,e.workerEndpoint=a,e.dataEndpoint=function(e={}){if(n(e),void 0===e.auth)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");return void 0===e.accountId&&(e.accountId=Ie("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Pe(e)}})(Ae||(Ae={}));var Ce=Ae},182(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var a=i(196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return a.default}});var n=i(465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return n.default}});var o=i(178);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=i(11);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var r=i(425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}});var c=i(568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var p=i(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return p.default}});var l=i(286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var u=i(557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}});var d=i(356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var m=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return m.default}});var h=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var f=i(746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return f.default}});var v=i(770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return v.default}})},196(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338(e,t){"use strict";function i(e){return 14+(e+64>>>9<<4)+1}function a(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function n(e,t,i,n,o,s){return a((r=a(a(t,e),a(n,s)))<<(c=o)|r>>>32-c,i);var r,c}function o(e,t,i,a,o,s,r){return n(t&i|~t&a,e,t,o,s,r)}function s(e,t,i,a,o,s,r){return n(t&a|i&~a,e,t,o,s,r)}function r(e,t,i,a,o,s,r){return n(t^i^a,e,t,o,s,r)}function c(e,t,i,a,o,s,r){return n(i^(t|~a),e,t,o,s,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<4*e.length;i++)t[i]=e[i>>2]>>>i%4*8&255;return t}(function(e,t){const n=new Uint32Array(i(t)).fill(0);n.set(e),n[t>>5]|=128<<t%32,n[n.length-1]=t,e=n;let p=1732584193,l=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const i=p,n=l,m=u,h=d;p=o(p,l,u,d,e[t],7,-680876936),d=o(d,p,l,u,e[t+1],12,-389564586),u=o(u,d,p,l,e[t+2],17,606105819),l=o(l,u,d,p,e[t+3],22,-1044525330),p=o(p,l,u,d,e[t+4],7,-176418897),d=o(d,p,l,u,e[t+5],12,1200080426),u=o(u,d,p,l,e[t+6],17,-1473231341),l=o(l,u,d,p,e[t+7],22,-45705983),p=o(p,l,u,d,e[t+8],7,1770035416),d=o(d,p,l,u,e[t+9],12,-1958414417),u=o(u,d,p,l,e[t+10],17,-42063),l=o(l,u,d,p,e[t+11],22,-1990404162),p=o(p,l,u,d,e[t+12],7,1804603682),d=o(d,p,l,u,e[t+13],12,-40341101),u=o(u,d,p,l,e[t+14],17,-1502002290),l=o(l,u,d,p,e[t+15],22,1236535329),p=s(p,l,u,d,e[t+1],5,-165796510),d=s(d,p,l,u,e[t+6],9,-1069501632),u=s(u,d,p,l,e[t+11],14,643717713),l=s(l,u,d,p,e[t],20,-373897302),p=s(p,l,u,d,e[t+5],5,-701558691),d=s(d,p,l,u,e[t+10],9,38016083),u=s(u,d,p,l,e[t+15],14,-660478335),l=s(l,u,d,p,e[t+4],20,-405537848),p=s(p,l,u,d,e[t+9],5,568446438),d=s(d,p,l,u,e[t+14],9,-1019803690),u=s(u,d,p,l,e[t+3],14,-187363961),l=s(l,u,d,p,e[t+8],20,1163531501),p=s(p,l,u,d,e[t+13],5,-1444681467),d=s(d,p,l,u,e[t+2],9,-51403784),u=s(u,d,p,l,e[t+7],14,1735328473),l=s(l,u,d,p,e[t+12],20,-1926607734),p=r(p,l,u,d,e[t+5],4,-378558),d=r(d,p,l,u,e[t+8],11,-2022574463),u=r(u,d,p,l,e[t+11],16,1839030562),l=r(l,u,d,p,e[t+14],23,-35309556),p=r(p,l,u,d,e[t+1],4,-1530992060),d=r(d,p,l,u,e[t+4],11,1272893353),u=r(u,d,p,l,e[t+7],16,-155497632),l=r(l,u,d,p,e[t+10],23,-1094730640),p=r(p,l,u,d,e[t+13],4,681279174),d=r(d,p,l,u,e[t],11,-358537222),u=r(u,d,p,l,e[t+3],16,-722521979),l=r(l,u,d,p,e[t+6],23,76029189),p=r(p,l,u,d,e[t+9],4,-640364487),d=r(d,p,l,u,e[t+12],11,-421815835),u=r(u,d,p,l,e[t+15],16,530742520),l=r(l,u,d,p,e[t+2],23,-995338651),p=c(p,l,u,d,e[t],6,-198630844),d=c(d,p,l,u,e[t+7],10,1126891415),u=c(u,d,p,l,e[t+14],15,-1416354905),l=c(l,u,d,p,e[t+5],21,-57434055),p=c(p,l,u,d,e[t+12],6,1700485571),d=c(d,p,l,u,e[t+3],10,-1894986606),u=c(u,d,p,l,e[t+10],15,-1051523),l=c(l,u,d,p,e[t+1],21,-2054922799),p=c(p,l,u,d,e[t+8],6,1873313359),d=c(d,p,l,u,e[t+15],10,-30611744),u=c(u,d,p,l,e[t+6],15,-1560198380),l=c(l,u,d,p,e[t+13],21,1309151649),p=c(p,l,u,d,e[t+4],6,-145523070),d=c(d,p,l,u,e[t+11],10,-1120210379),u=c(u,d,p,l,e[t+2],15,718787259),l=c(l,u,d,p,e[t+9],21,-343485551),p=a(p,i),l=a(l,n),u=a(u,m),d=a(d,h)}return Uint32Array.of(p,l,u,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(i(8*e.length)).fill(0);for(let i=0;i<e.length;i++)t[i>>2]|=(255&e[i])<<i%4*8;return t}(e),8*e.length))}},779(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:i}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},178(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(746);t.default=function(e){if(!(0,a.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},697(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291(e,t){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});const a=new Uint8Array(16);t.default=function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(a)}},829(e,t){"use strict";function i(e,t,i,a){switch(e){case 0:return t&i^~t&a;case 1:case 3:return t^i^a;case 2:return t&i^t&a^i&a}}function a(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,r=Math.ceil(s/16),c=new Array(r);for(let t=0;t<r;++t){const i=new Uint32Array(16);for(let a=0;a<16;++a)i[a]=e[64*t+4*a]<<24|e[64*t+4*a+1]<<16|e[64*t+4*a+2]<<8|e[64*t+4*a+3];c[t]=i}c[r-1][14]=8*(e.length-1)/Math.pow(2,32),c[r-1][14]=Math.floor(c[r-1][14]),c[r-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<r;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=a(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=n[0],r=n[1],p=n[2],l=n[3],u=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),c=a(s,5)+i(n,r,p,l)+u+t[n]+o[e]>>>0;u=l,l=p,p=a(r,30)>>>0,r=s,s=c}n[0]=n[0]+s>>>0,n[1]=n[1]+r>>>0,n[2]=n[2]+p>>>0,n[3]=n[3]+l>>>0,n[4]=n[4]+u>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])}},11(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const a=i(746),n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));function o(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const i=o(e,t);if(!(0,a.default)(i))throw TypeError("Stringified UUID is invalid");return i}},425(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const a=i(291),n=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9])),e.msecs=t,e}function r(e,t,i,a,n,o,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),i??=0,a??=16383&(e[8]<<8|e[9]),n??=e.slice(10,16);const r=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[s++]=r>>>24&255,o[s++]=r>>>16&255,o[s++]=r>>>8&255,o[s++]=255&r;const c=t/4294967296*1e4&268435455;o[s++]=c>>>8&255,o[s++]=255&c,o[s++]=c>>>24&15|16,o[s++]=c>>>16&255,o[s++]=a>>>8|128,o[s++]=255&a;for(let e=0;e<6;++e)o[s++]=n[e];return o}t.updateV1State=s,t.default=function(e,t,i){let c;const p=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=r(e.random??e.rng?.()??(0,a.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,i);else{const e=Date.now(),n=(0,a.default)();s(o,e,n),c=r(n,o.msecs,o.nsecs,p?void 0:o.clockseq,p?void 0:o.node,t,i)}return t??(0,n.unsafeStringify)(c)}},568(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(178),n=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,a.default)(e):e,Uint8Array.of((15&i[6])<<4|i[7]>>4&15,(15&i[7])<<4|(240&i[4])>>4,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,(15&i[1])<<4|(240&i[2])>>4,96|15&i[2],i[3],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,n.unsafeStringify)(t):t}},591(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const a=i(338),n=i(988);var o=i(988);function s(e,t,i,o){return(0,n.default)(48,a.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=n.DNS,s.URL=n.URL,t.default=s},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const a=i(178),n=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,a.default)(s):s;if("string"==typeof s&&(s=(0,a.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){c=c||0;for(let e=0;e<16;++e)r[c+e]=u[e];return r}return(0,n.unsafeStringify)(u)}},286(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(779),n=i(291),o=i(11);t.default=function(e,t,i){if(a.default.randomUUID&&!t&&!e)return a.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,n.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},557(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const a=i(829),n=i(988);var o=i(988);function s(e,t,i,o){return(0,n.default)(80,a.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=n.DNS,s.URL=n.URL,t.default=s},356(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(11),n=i(425),o=i(568);t.default=function(e,t,i){e??={},i??=0;let s=(0,n.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[i+e]=s[e];return t}return(0,a.unsafeStringify)(s)}},268(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(178),n=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,a.default)(e):e,Uint8Array.of((15&i[3])<<4|i[4]>>4&15,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|15&i[6],i[7],(15&i[1])<<4|(240&i[2])>>4,(15&i[2])<<4|(240&i[3])>>4,16|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,n.unsafeStringify)(t):t}},299(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const a=i(291),n=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=i[6]<<23|i[7]<<16|i[8]<<8|i[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function r(e,t,i,a,n=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(a){if(n<0||n+16>a.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`)}else a=new Uint8Array(16),n=0;return t??=Date.now(),i??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],a[n++]=t/1099511627776&255,a[n++]=t/4294967296&255,a[n++]=t/16777216&255,a[n++]=t/65536&255,a[n++]=t/256&255,a[n++]=255&t,a[n++]=112|i>>>28&15,a[n++]=i>>>20&255,a[n++]=128|i>>>14&63,a[n++]=i>>>6&255,a[n++]=i<<2&255|3&e[10],a[n++]=e[11],a[n++]=e[12],a[n++]=e[13],a[n++]=e[14],a[n++]=e[15],a}t.updateV7State=s,t.default=function(e,t,i){let c;if(e)c=r(e.random??e.rng?.()??(0,a.default)(),e.msecs,e.seq,t,i);else{const e=Date.now(),n=(0,a.default)();s(o,e,n),c=r(n,o.msecs,o.seq,t,i)}return t??(0,n.unsafeStringify)(c)}},746(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(697);t.default=function(e){return"string"==typeof e&&a.default.test(e)}},770(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(746);t.default=function(e){if(!(0,a.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}}},t={};function i(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,i),o.exports}return i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(797)})());
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,()=>(()=>{var e={262(e,t,i){"use strict";function n(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}i.r(t),i.d(t,{Auth0Client:()=>Yo,AuthenticationError:()=>l,CacheKey:()=>fe,ConnectError:()=>u,GenericError:()=>p,InMemoryCache:()=>ge,LocalStorageCache:()=>ve,MfaApiClient:()=>Zo,MfaChallengeError:()=>Fo,MfaEnrollmentError:()=>Jo,MfaEnrollmentFactorsError:()=>Vo,MfaError:()=>Ho,MfaListAuthenticatorsError:()=>Ko,MfaRequiredError:()=>v,MfaVerifyError:()=>Bo,MissingRefreshTokenError:()=>g,MyAccountApiError:()=>Ve,PopupCancelledError:()=>h,PopupOpenError:()=>f,PopupTimeoutError:()=>m,ResponseType:()=>Ie,TimeoutError:()=>d,UseDpopNonceError:()=>x,User:()=>Ce,createAuth0Client:()=>Xo}),"function"==typeof SuppressedError&&SuppressedError;const a={timeoutInSeconds:60},o="memory",s={name:"auth0-spa-js",version:"2.18.0"},r=()=>Date.now(),c="default";class p extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,p.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new p(t,i)}}class l extends p{constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=i,this.appState=n,Object.setPrototypeOf(this,l.prototype)}}class u extends p{constructor(e,t,i,n){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(e,t),this.connection=i,this.state=n,this.appState=a,Object.setPrototypeOf(this,u.prototype)}}class d extends p{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,d.prototype)}}class m extends d{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,m.prototype)}}class h extends p{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,h.prototype)}}class f extends p{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,f.prototype)}}class v extends p{constructor(e,t,i,n){super(e,t),this.mfa_token=i,this.mfa_requirements=n,Object.setPrototypeOf(this,v.prototype)}}class g extends p{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(y(e,["default"]),"', scope: '").concat(y(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,g.prototype)}}class b extends p{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(y(e,["default"]),"', missing scope: '").concat(y(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,b.prototype)}}class x extends p{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,x.prototype)}}function y(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const w=()=>window.crypto,_=()=>{let e="";for(;e.length<43;){const t=w().getRandomValues(new Uint8Array(43-e.length));for(const i of t)e.length<43&&i<198&&(e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[i%66])}return e},k=e=>btoa(e),S=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],E=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object.keys(e).reduce((i,n)=>{if(t&&"env"===n)return i;const a=S.find(e=>e.key===n);return a&&a.type.includes(typeof e[n])&&(i[n]=e[n]),i},{})},T=e=>{var{clientId:t}=e,i=n(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,i)=>Object.assign(Object.assign({},t),{[i]:e[i]}),{}))(Object.assign({client_id:t},i))).toString()},j=async e=>{const t=w().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},A=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),P=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))};var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},I={},C={};Object.defineProperty(C,"__esModule",{value:!0});var U=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,i){var n=e.locked.get(t);void 0===n?void 0===i?e.locked.set(t,[]):e.locked.set(t,[i]):void 0!==i&&(n.unshift(i),e.locked.set(t,n))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(i,n){e.isLocked(t)?e.addToLocked(t,i):(e.addToLocked(t),i())})},this.unlock=function(t){var i=e.locked.get(t);if(void 0!==i&&0!==i.length){var n=i.pop();e.locked.set(t,i),void 0!==n&&setTimeout(n,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();C.default=function(){return U.getInstance()};var R=O&&O.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(a,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):new i(function(t){t(e.value)}).then(s,r)}c((n=n.apply(e,t||[])).next())})},L=O&&O.__generator||function(e,t){var i,n,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(o){return function(r){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,r])}}},z=O;Object.defineProperty(I,"__esModule",{value:!0});var D=C,N="browser-tabs-lock-key",q={key:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},clear:function(){return R(z,void 0,void 0,function(){return L(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return R(z,void 0,void 0,function(){return L(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function M(e){return new Promise(function(t){return setTimeout(t,e)})}function $(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var W=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+$(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,i){return void 0===i&&(i=5e3),R(this,void 0,void 0,function(){var n,a,o,s,r,c,p;return L(this,function(l){switch(l.label){case 0:n=Date.now()+$(4),a=Date.now()+i,o=N+"-"+t,s=void 0===this.storageHandler?q:this.storageHandler,l.label=1;case 1:return Date.now()<a?[4,M(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+n,[4,M(Math.floor(25*Math.random()))]);case 3:return l.sent(),s.setItemSync(o,JSON.stringify({id:this.id,iat:n,timeoutKey:r,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,M(30)];case 4:return l.sent(),null!==(c=s.getItemSync(o))&&(p=JSON.parse(c)).id===this.id&&p.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(o,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?q:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:l.sent(),l.label=7;case 7:return n=Date.now()+$(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return R(this,void 0,void 0,function(){var i=this;return L(this,function(n){return setTimeout(function(){return R(i,void 0,void 0,function(){var i,n,a;return L(this,function(o){switch(o.label){case 0:return[4,D.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?q:this.storageHandler,null===(n=i.getItemSync(e))?(D.default().unlock(t),[2]):((a=JSON.parse(n)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(a)),D.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(D.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return R(this,void 0,void 0,function(){return L(this,function(i){switch(i.label){case 0:return[4,new Promise(function(i){var n=!1,a=Date.now(),o=!1;function s(){if(o||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(r),o=!0),!n){n=!0;var t=50-(Date.now()-a);t>0?setTimeout(i,t):i(null)}}window.addEventListener("storage",s),e.addToWaiting(s);var r=setTimeout(s,Math.max(0,t-Date.now()))})];case 1:return i.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return R(this,void 0,void 0,function(){return L(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return R(this,void 0,void 0,function(){var i,n,a,o;return L(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?q:this.storageHandler,n=N+"-"+t,null===(a=i.getItemSync(n))?[2]:(o=JSON.parse(a)).id!==this.id?[3,2]:[4,D.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(n),D.default().unlock(o.iat),e.notifyWaiters(),s.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var i=Date.now()-5e3,n=t,a=[],o=0;;){var s=n.keySync(o);if(null===s)break;a.push(s),o++}for(var r=!1,c=0;c<a.length;c++){var p=a[c];if(p.includes(N)){var l=n.getItemSync(p);if(null!==l){var u=JSON.parse(l);(void 0===u.timeRefreshed&&u.timeAcquired<i||void 0!==u.timeRefreshed&&u.timeRefreshed<i)&&(n.removeItemSync(p),r=!0)}}}r&&e.notifyWaiters()},e.waiters=void 0,e}(),H=I.default=W;class K{async runWithLock(e,t,i){const n=new AbortController,a=setTimeout(()=>n.abort(),t);try{return await navigator.locks.request(e,{mode:"exclusive",signal:n.signal},async e=>{if(clearTimeout(a),!e)throw new Error("Lock not available");return await i()})}catch(e){if(clearTimeout(a),"AbortError"===(null==e?void 0:e.name))throw new d;throw e}}}class J{constructor(){this.activeLocks=new Set,this.lock=new H,this.pagehideHandler=()=>{this.activeLocks.forEach(e=>this.lock.releaseLock(e)),this.activeLocks.clear()}}async runWithLock(e,t,i){let n=!1;for(let i=0;i<10&&!n;i++)n=await this.lock.acquireLock(e,t);if(!n)throw new d;this.activeLocks.add(e),1===this.activeLocks.size&&"undefined"!=typeof window&&window.addEventListener("pagehide",this.pagehideHandler);try{return await i()}finally{this.activeLocks.delete(e),await this.lock.releaseLock(e),0===this.activeLocks.size&&"undefined"!=typeof window&&window.removeEventListener("pagehide",this.pagehideHandler)}}}let F=null;const B=new TextEncoder,V=new TextDecoder;function G(e){return"string"==typeof e?B.encode(e):V.decode(e)}function Z(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new ee(`${e.name} modulusLength must be at least 2048 bits`)}let Y;if(Uint8Array.prototype.toBase64)Y=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Y=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const i=[];for(let n=0;n<t.byteLength;n+=e)i.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(i.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function X(e){return Y(e)}class Q extends Error{constructor(e){var t;super(null!=e?e:"operation not supported"),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class ee extends Error{constructor(e){var t;super(e),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}function te(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new Q("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new Q("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new Q("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new Q("unsupported CryptoKey algorithm name")}}function ie(e){return e instanceof CryptoKey}function ne(e){return ie(e)&&"public"===e.type}async function ae(e){const{kty:t,e:i,n,x:a,y:o,crv:s}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:s,e:i,n,x:a,y:o}}const oe="dpop-nonce",se=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange","http://auth0.com/oauth/grant-type/mfa-oob","http://auth0.com/oauth/grant-type/mfa-otp","http://auth0.com/oauth/grant-type/mfa-recovery-code"],re=async(e,t)=>{const i=await fetch(e,t);return{ok:i.ok,json:await i.json(),headers:(n=i.headers,[...n].reduce((e,t)=>{let[i,n]=t;return e[i]=n,e},{}))};var n},ce=async function(e,t,i,n,a,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return a?(async(e,t,i,n,a,o,s,r)=>((e,t)=>new Promise(function(i,n){const a=new MessageChannel;a.port1.onmessage=function(e){e.data.error?n(new Error(e.data.error)):i(e.data),a.port1.close()},t.postMessage(e,[a.port2])}))({auth:{audience:t,scope:i},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:s,useMrrt:r},o))(e,t,i,n,s,a,o,arguments.length>7?arguments[7]:void 0):(async(e,t,i)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([re(e,t),new Promise((e,t)=>{a=setTimeout(()=>{n.abort(),t(new Error("Timeout when executing 'fetch'"))},i)})]).finally(()=>{clearTimeout(a)})})(e,n,s)};async function pe(e,t,i,a,o,s,r,c,l,u){if(l){const t=await l.generateProof({url:e,method:o.method||"GET",nonce:await l.getNonce()});o.headers=Object.assign(Object.assign({},o.headers),{dpop:t})}let d,m=null;for(let n=0;n<3;n++)try{d=await ce(e,i,a,o,s,r,t,c),m=null;break}catch(e){m=e}if(m)throw m;const h=d.json,{error:f,error_description:b}=h,y=n(h,["error","error_description"]),{headers:w,ok:_}=d;let k;if(l&&(k=w[oe],k&&await l.setNonce(k)),!_){const n=b||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===f)throw new v(f,n,y.mfa_token,y.mfa_requirements);if("missing_refresh_token"===f)throw new g(i,a);if("use_dpop_nonce"===f){if(!l||!k||u)throw new x(k);return pe(e,t,i,a,o,s,r,c,l,!0)}throw new p(f||"request_error",n)}return y}async function le(e,t){var{baseUrl:i,timeout:a,audience:o,scope:r,auth0Client:p,useFormData:l,useMrrt:u,dpop:d}=e,m=n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const h="urn:ietf:params:oauth:grant-type:token-exchange"===m.grant_type,f="refresh_token"===m.grant_type&&u,v=Object.assign(Object.assign(Object.assign(Object.assign({},m),h&&o&&{audience:o}),h&&r&&{scope:r}),f&&{audience:o,scope:r}),g=l?T(v):JSON.stringify(v),b=(x=m.grant_type,se.includes(x));var x;return await pe("".concat(i,"/oauth/token"),a,o||c,r,{method:"POST",body:g,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(E(p||s)))}},t,l,u,b?d:void 0)}const ue=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(n=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(n))).join(" ");var n},de=(e,t,i)=>{let n;return i&&(n=e[i]),n||(n=e[c]),ue(n,t)},me="@@auth0spajs@@",he="@@user@@";class fe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:me,i=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=i,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,i,n,a]=e.split("::");return new fe({clientId:i,scope:a,audience:n},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:n}=e;return new fe({scope:t,audience:i,clientId:n})}}class ve{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith(me))}}class ge{constructor(){this.enclosedCache=function(){let e={};return{set(t,i){e[t]=i},get(t){const i=e[t];if(i)return i},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class be{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||r}async setIdToken(e,t,i){var n;const a=this.getIdTokenCacheKey(e);await this.cache.set(a,{id_token:t,decodedToken:i}),await(null===(n=this.keyManifest)||void 0===n?void 0:n.add(a))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;var a;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const a=this.matchExistingCacheKey(e,t);if(a&&(o=await this.cache.get(a)),!o&&i&&"cache-only"!==n)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const s=await this.nowProvider(),r=Math.floor(s/1e3);return o.expiresAt-t<r?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await(null===(a=this.keyManifest)||void 0===a?void 0:a.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const i=new fe({clientId:e.client_id,scope:e.scope,audience:e.audience}),n=await this.wrapCacheEntry(e);await this.cache.set(i.toKey(),n),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(i.toKey()))}async remove(e,t,i){const n=new fe({clientId:e,scope:i,audience:t});await this.cache.remove(n.toKey())}async clear(e){var t;const i=await this.getCacheKeys();i&&(await i.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new fe({clientId:e},me,he).toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const n=fe.fromKey(t),a=new Set(n.scope&&n.scope.split(" ")),o=(null===(i=e.scope)||void 0===i?void 0:i.split(" "))||[],s=n.scope&&o.reduce((e,t)=>e&&a.has(t),!0);return n.prefix===me&&n.clientId===e.clientId&&n.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const n of t){const t=fe.fromKey(n);if(t.prefix===me&&t.clientId===e.clientId){const t=await this.cache.get(n);if(null===(i=null==t?void 0:t.body)||void 0===i?void 0:i.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var i;const n=await this.getCacheKeys();if(n)for(const a of n){const n=await this.cache.get(a);(null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.refresh_token)===e&&(n.body.refresh_token=t,await this.cache.set(a,n))}}}class xe{constructor(e,t,i){this.storage=e,this.clientId=t,this.cookieDomain=i,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId)}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const ye=e=>"number"==typeof e,we=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var _e=O&&O.__assign||function(){return _e=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},_e.apply(this,arguments)};function ke(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function Se(e,t,i){document.cookie=function(e,t,i){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return ke("Expires",e.expires?e.expires.toUTCString():"")+ke("Domain",e.domain)+ke("Path",e.path)+ke("Secure",e.secure)+ke("SameSite",e.sameSite)}(i)}(e,t,_e({path:"/"},i))}var Ee=Se,Te=function(e,t){Se(e,"",_e(_e({},t),{expires:-1}))};const je={get(e){const t=function(e){return function(e){for(var t={},i=e?e.split("; "):[],n=/(%[\dA-F]{2})+/gi,a=0;a<i.length;a++){var o=i[a].split("="),s=o.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{t[o[0].replace(n,decodeURIComponent)]=s.replace(n,decodeURIComponent)}catch(e){}}return t}(document.cookie)[e]}(e);if(void 0!==t)return JSON.parse(t)},save(e,t,i){let n={};"https:"===window.location.protocol&&(n={secure:!0,sameSite:"none"}),(null==i?void 0:i.daysUntilExpire)&&(n.expires=i.daysUntilExpire),(null==i?void 0:i.cookieDomain)&&(n.domain=i.cookieDomain),Ee(e,JSON.stringify(t),n)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Te(e,i)}},Ae="_legacy_",Pe={get:e=>je.get(e)||je.get("".concat(Ae).concat(e)),save(e,t,i){let n={};"https:"===window.location.protocol&&(n={secure:!0}),(null==i?void 0:i.daysUntilExpire)&&(n.expires=i.daysUntilExpire),(null==i?void 0:i.cookieDomain)&&(n.domain=i.cookieDomain),Ee("".concat(Ae).concat(e),JSON.stringify(t),n),je.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Te(e,i),je.remove(e,t),je.remove("".concat(Ae).concat(e),t)}},Oe={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var Ie;!function(e){e.Code="code",e.ConnectCode="connect_code"}(Ie||(Ie={}));class Ce{}var Ue,Re=function(e){return Ue=Ue||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtyZXR1cm4gZSYmIShhcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W10pLmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIodD0+dm9pZCAwIT09ZVt0XSkucmVkdWNlKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT4iIi5jb25jYXQoZSwifCIpLmNvbmNhdCh0KTthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhc3luYyBlPT57bGV0IHIsYyx7ZGF0YTp7dGltZW91dDppLGF1dGg6YSxmZXRjaFVybDpmLGZldGNoT3B0aW9uczpsLHVzZUZvcm1EYXRhOnAsdXNlTXJydDpofSxwb3J0czpbdV19PWUsZD17fTtjb25zdHthdWRpZW5jZTpnLHNjb3BlOnl9PWF8fHt9O3RyeXtjb25zdCBlPXA/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKChlLHQpPT57clt0XT1lfSkscn0pKGwuYm9keSk6SlNPTi5wYXJzZShsLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYoYz0oKGUsdCk9Pm9bbihlLHQpXSkoZyx5KSwhYyYmaCl7Y29uc3QgZT1vLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHQ9KChlLHQpPT57Y29uc3Qgcj1PYmplY3Qua2V5cyhvKS5maW5kKHI9PntpZigibGF0ZXN0X3JlZnJlc2hfdG9rZW4iIT09cil7Y29uc3Qgcz0oKGUsdCk9PnQuc3RhcnRzV2l0aCgiIi5jb25jYXQoZSwifCIpKSkodCxyKSxvPXIuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLG49ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9Pm8uaW5jbHVkZXMoZSkpO3JldHVybiBzJiZufX0pO3JldHVybiEhcn0pKHksZyk7ZSYmIXQmJihjPWUpfWlmKCFjKXRocm93IG5ldyB0KGcseSk7bC5ib2R5PXA/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sZSkse3JlZnJlc2hfdG9rZW46Y30pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sZSkse3JlZnJlc2hfdG9rZW46Y30pKX1sZXQgYSxrOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihhPW5ldyBBYm9ydENvbnRyb2xsZXIsbC5zaWduYWw9YS5zaWduYWwpO3RyeXtrPWF3YWl0IFByb21pc2UucmFjZShbKGo9aSxuZXcgUHJvbWlzZShlPT5zZXRUaW1lb3V0KGUsaikpKSxmZXRjaChmLE9iamVjdC5hc3NpZ24oe30sbCkpXSl9Y2F0Y2goZSl7cmV0dXJuIHZvaWQgdS5wb3N0TWVzc2FnZSh7ZXJyb3I6ZS5tZXNzYWdlfSl9aWYoIWspcmV0dXJuIGEmJmEuYWJvcnQoKSx2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOiJUaW1lb3V0IHdoZW4gZXhlY3V0aW5nICdmZXRjaCcifSk7Xz1rLmhlYWRlcnMsZD1bLi4uX10ucmVkdWNlKChlLHQpPT57bGV0W3Isc109dDtyZXR1cm4gZVtyXT1zLGV9LHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKGU9PntsZXRbdCxyXT1lO3I9PT1PJiYob1t0XT1iKX0pKSwoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkoci5yZWZyZXNoX3Rva2VuLGcseSksZGVsZXRlIHIucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGcseSksdS5wb3N0TWVzc2FnZSh7b2s6ay5vayxqc29uOnIsaGVhZGVyczpkfSl9Y2F0Y2goZSl7dS5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9LGhlYWRlcnM6ZH0pfXZhciBPLGIsXyxqfSl9KCk7Cgo="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",n=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(n)}(),new Worker(Ue,e)};const Le={};class ze{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const i=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);i.add(e),await this.cache.set(this.manifestKey,{keys:[...i]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const i=new Set(t.keys);return i.delete(e),i.size>0?await this.cache.set(this.manifestKey,{keys:[...i]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return"".concat(me,"::").concat(e)}}const De="auth0.is.authenticated",Ne={memory:()=>(new ge).enclosedCache,localstorage:()=>new ve},qe=e=>Ne[e],Me=e=>{const{openUrl:t,onRedirect:i}=e,a=n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},a),{openUrl:!1===t||t?t:i})},$e=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},We={NONCE:"nonce",KEYPAIR:"keypair"};class He{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((t,i)=>{e.onupgradeneeded=()=>Object.values(We).forEach(t=>e.result.createObjectStore(t)),e.onerror=()=>i(e.error),e.onsuccess=()=>t(e.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,t,i){const n=i((await this.getDbHandle()).transaction(e,t).objectStore(e));return new Promise((e,t)=>{n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}buildKey(e){const t=e?"_".concat(e):"auth0";return"".concat(this.clientId,"::").concat(t)}setNonce(e,t){return this.save(We.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(We.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(We.NONCE,this.buildKey(e))}findKeyPair(){return this.find(We.KEYPAIR,this.buildKey())}find(e,t){return this.executeDbRequest(e,"readonly",e=>e.get(t))}async deleteBy(e,t){const i=await this.executeDbRequest(e,"readonly",e=>e.getAllKeys());null==i||i.filter(t).map(t=>this.executeDbRequest(e,"readwrite",e=>e.delete(t)))}deleteByClientId(e,t){return this.deleteBy(e,e=>"string"==typeof e&&e.startsWith("".concat(t,"::")))}clearNonces(){return this.deleteByClientId(We.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(We.KEYPAIR,this.clientId)}}class Ke{constructor(e){this.storage=new He(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await async function(e,t){var i;let n;return n={name:"ECDSA",namedCurve:"P-256"},crypto.subtle.generateKey(n,null!==(i=null==t?void 0:t.extractable)&&void 0!==i&&i,["sign","verify"])}(0,{extractable:!1}),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return function(e){let{keyPair:t,url:i,method:n,nonce:a,accessToken:o}=e;const s=function(e){const t=new URL(e);return t.search="",t.hash="",t.href}(i);return async function(e,t,i,n,a,o){const s=null==e?void 0:e.privateKey,r=null==e?void 0:e.publicKey;if(!ie(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!ne(r))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(!0!==r.extractable)throw new TypeError('"keypair.publicKey.extractable" must be true');if("string"!=typeof t)throw new TypeError('"htu" must be a string');if("string"!=typeof i)throw new TypeError('"htm" must be a string');if(void 0!==n&&"string"!=typeof n)throw new TypeError('"nonce" must be a string or undefined');if(void 0!==a&&"string"!=typeof a)throw new TypeError('"accessToken" must be a string or undefined');if(void 0!==o&&("object"!=typeof o||null===o||Array.isArray(o)))throw new TypeError('"additional" must be an object');return async function(e,t,i){if(!1===i.usages.includes("sign"))throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const n=`${X(G(JSON.stringify(e)))}.${X(G(JSON.stringify(t)))}`;return`${n}.${X(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return Z(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return Z(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new Q}(i),i,G(n)))}`}({alg:te(s),typ:"dpop+jwt",jwk:await ae(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:n,htu:t,ath:a?X(await crypto.subtle.digest("SHA-256",G(a))):void 0}),s)}(t,s,n,a,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!ne(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(!0!==e.extractable)throw new TypeError('"publicKey.extractable" must be true');const t=await ae(e);let i;switch(t.kty){case"EC":i={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":i={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":i={e:t.e,kty:t.kty,n:t.n};break;default:throw new Q("unsupported JWK kty")}return X(await crypto.subtle.digest({name:"SHA-256"},G(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Je;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(Je||(Je={}));class Fe{constructor(e,t){this.hooks=t,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||("undefined"==typeof window?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,t){if(t){if(this.isAbsoluteUrl(t))return t;if(e)return"".concat(e.replace(/\/?\/$/,""),"/").concat(t.replace(/^\/+/,""))}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return"string"==typeof e?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,t){if(!this.config.baseUrl)return new Request(e,t);const i=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),n=e instanceof Request?new Request(i,e):i;return new Request(n,t)}setAuthorizationHeader(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Je.Bearer;e.headers.set("authorization","".concat(i," ").concat(t))}async setDpopProofHeader(e,t){if(!this.config.dpopNonceId)return;const i=await this.hooks.getDpopNonce(),n=await this.hooks.generateDpopProof({accessToken:t,method:e.method,nonce:i,url:e.url});e.headers.set("dpop",n)}async prepareRequest(e,t){const i=await this.getAccessToken(t);let n,a;"string"==typeof i?(n=this.config.dpopNonceId?Je.DPoP:Je.Bearer,a=i):(n=i.token_type,a=i.access_token),this.setAuthorizationHeader(e,a,n),n===Je.DPoP&&await this.setDpopProofHeader(e,a)}getHeader(e,t){return Array.isArray(e)?new Headers(e).get(t)||"":"function"==typeof e.get?e.get(t)||"":e[t]||""}hasUseDpopNonceError(e){if(401!==e.status)return!1;const t=this.getHeader(e.headers,"www-authenticate");return t.includes("invalid_dpop_nonce")||t.includes("use_dpop_nonce")}async handleResponse(e,t){const i=this.getHeader(e.headers,oe);if(i&&await this.hooks.setDpopNonce(i),!this.hasUseDpopNonceError(e))return e;if(!i||!t.onUseDpopNonceError)throw new x(i);return t.onUseDpopNonceError()}async internalFetchWithAuth(e,t,i,n){const a=this.buildBaseRequest(e,t);await this.prepareRequest(a,n);const o=await this.config.fetch(a);return this.handleResponse(o,i)}fetchWithAuth(e,t,i){const n={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,t,Object.assign(Object.assign({},n),{onUseDpopNonceError:void 0}),i)};return this.internalFetchWithAuth(e,t,n,i)}}class Be{constructor(e,t){this.myAccountFetcher=e,this.apiBase=t}async connectAccount(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/connect"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async completeAccount(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/complete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async _handleResponse(e){let t;try{t=await e.text(),t=JSON.parse(t)}catch(i){throw new Ve({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new Ve(t)}}class Ve extends Error{constructor(e){let{type:t,status:i,title:n,detail:a,validation_errors:o}=e;super(a),this.name="MyAccountApiError",this.type=t,this.status=i,this.title=n,this.detail=a,this.validation_errors=o,Object.setPrototypeOf(this,Ve.prototype)}}const Ge={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};function Ze(e,t){this.v=e,this.k=t}function Ye(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}function Xe(e){return new Ze(e,0)}function Qe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function et(e,t){return e.get(Ye(e,t))}function tt(e,t,i){Qe(e,t),t.set(e,i)}function it(e,t,i){return e.set(Ye(e,t),i),i}function nt(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function at(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function ot(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?at(Object(i),!0).forEach(function(t){nt(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):at(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function st(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)i=o[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}function rt(e){var t,i;function n(t,i){try{var o=e[t](i),s=o.value,r=s instanceof Ze;Promise.resolve(r?s.v:s).then(function(i){if(r){var c="return"===t&&s.k?t:"next";if(!s.k||i.done)return n(c,i);i=e[c](i).value}a(!!o.done,i)},function(e){n("throw",e)})}catch(e){a(2,e)}}function a(e,a){2===e?t.reject(a):t.resolve({value:a,done:e}),(t=t.next)?n(t.key,t.arg):i=null}this._invoke=function(e,a){return new Promise(function(o,s){var r={key:e,arg:a,resolve:o,reject:s,next:null};i?i=i.next=r:(t=i=r,n(e,a))})},"function"!=typeof e.return&&(this.return=void 0)}var ct,pt;let lt;if(rt.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},rt.prototype.next=function(e){return this._invoke("next",e)},rt.prototype.throw=function(e){return this._invoke("throw",e)},rt.prototype.return=function(e){return this._invoke("return",e)},"undefined"==typeof navigator||null===(ct=navigator.userAgent)||void 0===ct||null===(pt=ct.startsWith)||void 0===pt||!pt.call(ct,"Mozilla/5.0 ")){const e="v3.8.5";lt="".concat("oauth4webapi","/").concat(e)}function ut(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch(e){return!1}}const dt="ERR_INVALID_ARG_VALUE",mt="ERR_INVALID_ARG_TYPE";function ht(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}const ft=Symbol(),vt=Symbol(),gt=Symbol(),bt=Symbol(),xt=Symbol(),yt=Symbol(),wt=new TextEncoder,_t=new TextDecoder;function kt(e){return"string"==typeof e?wt.encode(e):_t.decode(e)}let St,Et;if(Uint8Array.prototype.toBase64)St=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;St=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const i=[];for(let n=0;n<t.byteLength;n+=e)i.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(i.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function Tt(e){return"string"==typeof e?Et(e):St(e)}Et=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw ht("The input to be decoded is not correctly encoded.",dt,e)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i}catch(e){throw ht("The input to be decoded is not correctly encoded.",dt,e)}};class jt extends Error{constructor(e,t){var i;super(e,t),nt(this,"code",void 0),this.name=this.constructor.name,this.code=Si,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class At extends Error{constructor(e,t){var i;super(e,t),nt(this,"code",void 0),this.name=this.constructor.name,null!=t&&t.code&&(this.code=null==t?void 0:t.code),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}function Pt(e,t,i){return new At(e,{code:t,cause:i})}function Ot(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function It(e){ut(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(lt&&!t.has("user-agent")&&t.set("user-agent",lt),t.has("authorization"))throw ht('"options.headers" must not include the "authorization" header name',dt);return t}function Ct(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw ht('"options.signal" must return or be an instance of AbortSignal',mt);return t}}function Ut(e){return e.includes("//")?e.replace("//","/"):e}function Rt(e,t,i,n,a){try{if("number"!=typeof e||!Number.isFinite(e))throw ht("".concat(i," must be a number"),mt,a);if(e>0)return;if(t){if(0!==e)throw ht("".concat(i," must be a non-negative number"),dt,a);return}throw ht("".concat(i," must be a positive number"),dt,a)}catch(e){if(n)throw Pt(e.message,n,a);throw e}}function Lt(e,t,i,n){try{if("string"!=typeof e)throw ht("".concat(t," must be a string"),mt,n);if(0===e.length)throw ht("".concat(t," must not be empty"),dt,n)}catch(e){if(i)throw Pt(e.message,i,n);throw e}}function zt(e){!function(e,t){if(ri(e)!==t)throw function(e){let t='"response" content-type must be ';for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];if(n.length>2){const e=n.pop();t+="".concat(n.join(", "),", or ").concat(e)}else 2===n.length?t+="".concat(n[0]," or ").concat(n[1]):t+=n[0];return Pt(t,Ai,e)}(e,t)}(e,"application/json")}function Dt(){return Tt(crypto.getRandomValues(new Uint8Array(32)))}function Nt(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new jt("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new jt("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new jt("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new jt("unsupported CryptoKey algorithm name",{cause:e})}}function qt(e){const t=null==e?void 0:e[vt];return"number"==typeof t&&Number.isFinite(t)?t:0}function Mt(e){const t=null==e?void 0:e[gt];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function $t(){return Math.floor(Date.now()/1e3)}function Wt(e){if("object"!=typeof e||null===e)throw ht('"as" must be an object',mt);Lt(e.issuer,'"as.issuer"')}function Ht(e){if("object"!=typeof e||null===e)throw ht('"client" must be an object',mt);Lt(e.client_id,'"client.client_id"')}function Kt(e){return Lt(e,'"clientSecret"'),(t,i,n,a)=>{n.set("client_id",i.client_id),n.set("client_secret",e)}}const Jt=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Ft(e,t){if(t&&"https:"!==e.protocol)throw Pt("only requests to HTTPS are allowed",Oi,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw Pt("only HTTP and HTTPS requests are allowed",Ii,e)}function Bt(e,t,i,n){let a;if("string"!=typeof e||!(a=Jt(e)))throw Pt("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?Li:zi,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Ft(a,n),a}function Vt(e,t,i,n){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Bt(e.mtls_endpoint_aliases[t],t,i,n):Bt(e[t],t,i,n)}class Gt extends Error{constructor(e,t){var i;super(e,t),nt(this,"cause",void 0),nt(this,"code",void 0),nt(this,"error",void 0),nt(this,"status",void 0),nt(this,"error_description",void 0),nt(this,"response",void 0),this.name=this.constructor.name,this.code=ki,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class Zt extends Error{constructor(e,t){var i,n;super(e,t),nt(this,"cause",void 0),nt(this,"code",void 0),nt(this,"error",void 0),nt(this,"error_description",void 0),this.name=this.constructor.name,this.code=Ei,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==(i=t.cause.get("error_description"))&&void 0!==i?i:void 0,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}class Yt extends Error{constructor(e,t){var i;super(e,t),nt(this,"cause",void 0),nt(this,"code",void 0),nt(this,"response",void 0),nt(this,"status",void 0),this.name=this.constructor.name,this.code=_i,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}const Xt="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Qt="("+Xt+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',ei="("+Xt+")\\s*=\\s*("+Xt+")",ti=new RegExp("^[,\\s]*("+Xt+")"),ii=new RegExp("^[,\\s]*"+Qt+"[,\\s]*(.*)"),ni=new RegExp("^[,\\s]*"+ei+"[,\\s]*(.*)"),ai=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function oi(e,t,i){if(e.status!==t){let t;var n;if(function(e){let t;if(t=function(e){if(!ut(e,Response))throw ht('"response" must be an instance of Response',mt);const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let n=t;for(;n;){var a;let t=n.match(ti);const o=null===(a=t)||void 0===a?void 0:a[1].toLowerCase();if(!o)return;const s=n.substring(t[0].length);if(s&&!s.match(/^[\s,]/))return;const r=s.match(/^\s+(.*)$/),c=!!r;n=r?r[1]:void 0;const p={};let l;if(c)for(;n;){let i,a;if(t=n.match(ii)){if([,i,a,n]=t,a.includes("\\"))try{a=JSON.parse('"'.concat(a,'"'))}catch(e){}p[i.toLowerCase()]=a}else{if(!(t=n.match(ni))){if(t=n.match(ai)){if(Object.keys(p).length)break;[,l,n]=t;break}return}[,i,a,n]=t,p[i.toLowerCase()]=a}}else n=s||void 0;const u={scheme:o,parameters:p};l&&(u.token68=l),i.push(u)}return i.length?i:void 0}(e))throw new Yt("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}(e),t=await async function(e){if(e.status>399&&e.status<500){Di(e),zt(e);try{const t=await e.clone().json();if(Ot(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===(n=e.body)||void 0===n?void 0:n.cancel()),new Gt("server responded with an error in the response body",{cause:t,response:e});throw Pt('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),Pi,e)}}function si(e){if(!vi.has(e))throw ht('"options.DPoP" is not a valid DPoPHandle',dt)}function ri(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function ci(e,t,i,n,a,o,s){return await i(e,t,a,o),o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==s?void 0:s[bt])||fetch)(n.href,{body:a,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:Ct(n,null==s?void 0:s.signal)})}async function pi(e,t,i,n,a,o){var s;const r=Vt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[ft]));a.set("grant_type",n);const c=It(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(si(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await ci(e,t,i,r,a,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const li=new WeakMap,ui=new WeakMap;function di(e){if(!e.id_token)return;const t=li.get(e);if(!t)throw ht('"ref" was already garbage collected or did not resolve from the proper sources',dt);return t}async function mi(e,t,i,n,a,o){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,200,"Token Endpoint"),Di(i);const s=await Ki(i);if(Lt(s.access_token,'"response" body "access_token" property',ji,{body:s}),Lt(s.token_type,'"response" body "token_type" property',ji,{body:s}),s.token_type=s.token_type.toLowerCase(),void 0!==s.expires_in){let e="number"!=typeof s.expires_in?parseFloat(s.expires_in):s.expires_in;Rt(e,!0,'"response" body "expires_in" property',ji,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&Lt(s.refresh_token,'"response" body "refresh_token" property',ji,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw Pt('"response" body "scope" property must be a string',ji,{body:s});if(void 0!==s.id_token){Lt(s.id_token,'"response" body "id_token" property',ji,{body:s});const o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(Rt(t.default_max_age,!0,'"client.default_max_age"'),o.push("auth_time")),null!=n&&n.length&&o.push(...n);const{claims:r,jwt:c}=await async function(e,t,i,n,a){let o,s,{0:r,1:c,length:p}=e.split(".");if(5===p){if(void 0===a)throw new jt("JWE decryption is not configured",{cause:e});e=await a(e),({0:r,1:c,length:p}=e.split("."))}if(3!==p)throw Pt("Invalid JWT",ji,e);try{o=JSON.parse(kt(Tt(r)))}catch(e){throw Pt("failed to parse JWT Header body as base64url encoded JSON",Ti,e)}if(!Ot(o))throw Pt("JWT Header must be a top level object",ji,e);if(t(o),void 0!==o.crit)throw new jt('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(kt(Tt(c)))}catch(e){throw Pt("failed to parse JWT Payload body as base64url encoded JSON",Ti,e)}if(!Ot(s))throw Pt("JWT Payload must be a top level object",ji,e);const l=$t()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw Pt('unexpected JWT "exp" (expiration time) claim type',ji,{claims:s});if(s.exp<=l-n)throw Pt('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Ci,{claims:s,now:l,tolerance:n,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw Pt('unexpected JWT "iat" (issued at) claim type',ji,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw Pt('unexpected JWT "iss" (issuer) claim type',ji,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw Pt('unexpected JWT "nbf" (not before) claim type',ji,{claims:s});if(s.nbf>l+n)throw Pt('unexpected JWT "nbf" (not before) claim value',Ci,{claims:s,now:l,tolerance:n,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw Pt('unexpected JWT "aud" (audience) claim type',ji,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Mi.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),qt(t),Mt(t),a).then(xi.bind(void 0,o)).then(fi.bind(void 0,e)).then(hi.bind(void 0,t.client_id));if(Array.isArray(r.aud)&&1!==r.aud.length){if(void 0===r.azp)throw Pt('ID Token "aud" (audience) claim includes additional untrusted audiences',Ui,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw Pt('unexpected ID Token "azp" (authorized party) claim value',Ui,{expected:t.client_id,claims:r,claim:"azp"})}void 0!==r.auth_time&&Rt(r.auth_time,!0,'ID Token "auth_time" (authentication time)',ji,{claims:r}),ui.set(i,c),li.set(s,r)}if(void 0!==(null==o?void 0:o[s.token_type]))o[s.token_type](i,s);else if("dpop"!==s.token_type&&"bearer"!==s.token_type)throw new jt("unsupported `token_type` value",{cause:{body:s}});return s}function hi(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Pt('unexpected JWT "aud" (audience) claim value',Ui,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Pt('unexpected JWT "aud" (audience) claim value',Ui,{expected:e,claims:t.claims,claim:"aud"});return t}function fi(e,t){var i,n;const a=null!==(i=null===(n=e[Fi])||void 0===n?void 0:n.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==a)throw Pt('unexpected JWT "iss" (issuer) claim value',Ui,{expected:a,claims:t.claims,claim:"iss"});return t}const vi=new WeakSet,gi=Symbol(),bi={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function xi(e,t){for(const i of e)if(void 0===t.claims[i])throw Pt('JWT "'.concat(i,'" (').concat(bi[i],") claim missing"),ji,{claims:t.claims});return t}const yi=Symbol(),wi=Symbol(),_i="OAUTH_WWW_AUTHENTICATE_CHALLENGE",ki="OAUTH_RESPONSE_BODY_ERROR",Si="OAUTH_UNSUPPORTED_OPERATION",Ei="OAUTH_AUTHORIZATION_RESPONSE_ERROR",Ti="OAUTH_PARSE_ERROR",ji="OAUTH_INVALID_RESPONSE",Ai="OAUTH_RESPONSE_IS_NOT_JSON",Pi="OAUTH_RESPONSE_IS_NOT_CONFORM",Oi="OAUTH_HTTP_REQUEST_FORBIDDEN",Ii="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Ci="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Ui="OAUTH_JWT_CLAIM_COMPARISON_FAILED",Ri="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",Li="OAUTH_MISSING_SERVER_METADATA",zi="OAUTH_INVALID_SERVER_METADATA";function Di(e){if(e.bodyUsed)throw ht('"response" body has been used already',dt)}function Ni(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new jt("unsupported ".concat(t.name," modulusLength"),{cause:e})}function qi(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new jt("unsupported ECDSA namedCurve",{cause:e})}}function Mi(e,t,i,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw Pt('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:i});if("string"==typeof i?n.alg!==i:"function"==typeof i?!i(n.alg):!i.includes(n.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:n,expected:i,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw Pt('unexpected JWT "alg" header parameter',ji,{header:n,expected:e,reason:"client configuration"})}function $i(e,t){const{0:i,length:n}=e.getAll(t);if(n>1)throw Pt('"'.concat(t,'" parameter must be provided only once'),ji);return i}const Wi=Symbol(),Hi=Symbol();async function Ki(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt;try{t=await e.json()}catch(t){throw i(e),Pt('failed to parse "response" body as JSON',Ti,t)}if(!Ot(t))throw Pt('"response" body must be a top level object',ji,{body:t});return t}const Ji=Symbol(),Fi=Symbol(),Bi=new TextEncoder,Vi=new TextDecoder;function Gi(e){const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);if(n>127)throw new TypeError("non-ASCII string encountered in encode()");t[i]=n}return t}function Zi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i}function Yi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:Vi.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Vi.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return Zi(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}const Xi=function(e){return new TypeError("CryptoKey does not support this operation, its ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))},Qi=(e,t)=>e.name===t;function en(e,t){var i;if(i=e.hash,parseInt(i.name.slice(4),10)!==t)throw Xi("SHA-".concat(t),"algorithm.hash")}function tn(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];if((n=n.filter(Boolean)).length>2){const t=n.pop();e+="one of type ".concat(n.join(", "),", or ").concat(t,".")}else 2===n.length?e+="one of type ".concat(n[0]," or ").concat(n[1],"."):e+="of type ".concat(n[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var o;null!==(o=t.constructor)&&void 0!==o&&o.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const nn=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return tn("Key for the ".concat(e," algorithm must be "),t,...n)};class an extends Error{constructor(e,t){var i;super(e,t),nt(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}nt(an,"code","ERR_JOSE_GENERIC");class on extends an{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:i,reason:n,payload:t}}),nt(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),nt(this,"claim",void 0),nt(this,"reason",void 0),nt(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}nt(on,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class sn extends an{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:i,reason:n,payload:t}}),nt(this,"code","ERR_JWT_EXPIRED"),nt(this,"claim",void 0),nt(this,"reason",void 0),nt(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}nt(sn,"code","ERR_JWT_EXPIRED");class rn extends an{constructor(){super(...arguments),nt(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}nt(rn,"code","ERR_JOSE_ALG_NOT_ALLOWED");class cn extends an{constructor(){super(...arguments),nt(this,"code","ERR_JOSE_NOT_SUPPORTED")}}nt(cn,"code","ERR_JOSE_NOT_SUPPORTED"),nt(class extends an{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),nt(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),nt(class extends an{constructor(){super(...arguments),nt(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class pn extends an{constructor(){super(...arguments),nt(this,"code","ERR_JWS_INVALID")}}nt(pn,"code","ERR_JWS_INVALID");class ln extends an{constructor(){super(...arguments),nt(this,"code","ERR_JWT_INVALID")}}nt(ln,"code","ERR_JWT_INVALID"),nt(class extends an{constructor(){super(...arguments),nt(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class un extends an{constructor(){super(...arguments),nt(this,"code","ERR_JWKS_INVALID")}}nt(un,"code","ERR_JWKS_INVALID");class dn extends an{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),nt(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}nt(dn,"code","ERR_JWKS_NO_MATCHING_KEY");class mn extends an{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),nt(this,Symbol.asyncIterator,void 0),nt(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}nt(mn,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class hn extends an{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),nt(this,"code","ERR_JWKS_TIMEOUT")}}nt(hn,"code","ERR_JWKS_TIMEOUT");class fn extends an{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),nt(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}nt(fn,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const vn=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},gn=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),bn=e=>vn(e)||gn(e);function xn(e,t,i){try{return Yi(e)}catch(e){throw new i("Failed to base64url decode the ".concat(t))}}function yn(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let i=e;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(e)===i}const wn=e=>yn(e)&&"string"==typeof e.kty;const _n='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function kn(e){var t,i;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:a}=function(e){let t,i;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},i=e.priv?["sign"]:["verify"];break;default:throw new cn(_n)}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:"SHA-".concat(e.alg.slice(-3))},i=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(e.alg.slice(-3))},i=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(e.alg.slice(-3),10)||1)},i=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new cn(_n)}break;case"EC":switch(e.alg){case"ES256":case"ES384":case"ES512":t={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[e.alg]},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new cn(_n)}break;case"OKP":switch(e.alg){case"Ed25519":case"EdDSA":t={name:"Ed25519"},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new cn(_n)}break;default:throw new cn('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=ot({},e);return"AKP"!==o.kty&&delete o.alg,delete o.use,crypto.subtle.importKey("jwk",o,n,null!==(t=e.ext)&&void 0!==t?t:!e.d&&!e.priv,null!==(i=e.key_ops)&&void 0!==i?i:a)}const Sn="given KeyObject instance cannot be used for this algorithm";let En;const Tn=async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];En||(En=new WeakMap);let a=En.get(e);if(null!=a&&a[i])return a[i];const o=await kn(ot(ot({},t),{},{alg:i}));return n&&Object.freeze(e),a?a[i]=o:En.set(e,{[i]:o}),o},jn=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let i=0;i<e.byteLength;i++)if(e[i]!==t[i])return!1;return!0},An=e=>{const t=e.data[e.pos++];if(128&t){const i=127&t;let n=0;for(let t=0;t<i;t++)n=n<<8|e.data[e.pos++];return n}return t},Pn=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},On=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i},In=e=>null==e?void 0:e[Symbol.toStringTag],Cn=(e,t,i)=>{if(void 0!==t.use){let e;switch(i){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var n,a;let o;switch(!0){case"sign"===i||"verify"===i:case"dir"===e:case e.includes("CBC-HS"):o=i;break;case e.startsWith("PBES2"):o="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):o=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===i?"wrapKey":"unwrapKey":i;break;case"encrypt"===i&&e.startsWith("RSA"):o="wrapKey";break;case"decrypt"===i:o=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(o&&!1===(null===(n=t.key_ops)||void 0===n||null===(a=n.includes)||void 0===a?void 0:a.call(n,o)))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(o,'" when present'))}return!0};var Un,Rn;let Ln,zn;if("undefined"==typeof navigator||null===(Un=navigator.userAgent)||void 0===Un||null===(Rn=Un.startsWith)||void 0===Rn||!Rn.call(Un,"Mozilla/5.0 ")){const e="v6.8.2";zn="".concat("openid-client","/").concat(e),Ln={"user-agent":zn}}const Dn=e=>Nn.get(e);let Nn,qn;function Mn(e){return void 0!==e?Kt(e):(qn||(qn=new WeakMap),(e,t,i,n)=>{let a;return(a=qn.get(t))||(function(e,t){if("string"!=typeof e)throw Kn("".concat(t," must be a string"),Hn);if(0===e.length)throw Kn("".concat(t," must not be empty"),Wn)}(t.client_secret,'"metadata.client_secret"'),a=Kt(t.client_secret),qn.set(t,a)),a(e,t,i,n)})}const $n=bt,Wn="ERR_INVALID_ARG_VALUE",Hn="ERR_INVALID_ARG_TYPE";function Kn(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}class Jn extends Error{constructor(e,t){var i;super(e,t),nt(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}function Fn(e,t,i){return new Jn(e,{cause:t,code:i})}function Bn(e){if(e instanceof TypeError||e instanceof Jn||e instanceof Gt||e instanceof Zt||e instanceof Yt)throw e;if(e instanceof At)switch(e.code){case Oi:throw Fn("only requests to HTTPS are allowed",e,e.code);case Ii:throw Fn("only requests to HTTP or HTTPS are allowed",e,e.code);case Pi:throw Fn("unexpected HTTP response status code",e.cause,e.code);case Ai:throw Fn("unexpected response content-type",e.cause,e.code);case Ti:throw Fn("parsing error occured",e,e.code);case ji:throw Fn("invalid response encountered",e,e.code);case Ui:throw Fn("unexpected JWT claim value encountered",e,e.code);case Ri:throw Fn("unexpected JSON attribute value encountered",e,e.code);case Ci:throw Fn("JWT timestamp claim value failed validation",e,e.code);default:throw Fn(e.message,e,e.code)}if(e instanceof jt)throw Fn("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Fn("runtime operation error",e,Si);case"NotSupportedError":throw Fn("runtime unsupported operation",e,Si);case"TimeoutError":throw Fn("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Fn("operation aborted",e,"OAUTH_ABORT")}throw new Jn("something went wrong",{cause:e})}new TextDecoder;const Vn=Symbol();class Gn{constructor(e,t,i,n){var a,o,s,r,c;if("string"!=typeof t||!t.length)throw Kn('"clientId" must be a non-empty string',Hn);if("string"==typeof i&&(i={client_secret:i}),void 0!==(null===(a=i)||void 0===a?void 0:a.client_id)&&t!==i.client_id)throw Kn('"clientId" and "metadata.client_id" must be the same',Wn);const p=ot(ot({},structuredClone(i)),{},{client_id:t});let l;p[vt]=null!==(o=null===(s=i)||void 0===s?void 0:s[vt])&&void 0!==o?o:0,p[gt]=null!==(r=null===(c=i)||void 0===c?void 0:c[gt])&&void 0!==r?r:30,l=n||("string"==typeof p.client_secret&&p.client_secret.length?Mn(p.client_secret):(e,t,i,n)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const d=structuredClone(e);Vn in e&&(d[Fi]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let m=Object.freeze(d);Nn||(Nn=new WeakMap),Nn.set(this,{__proto__:null,as:m,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(Dn(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(i))}}}}(e))}(e),e}clientMetadata(){return structuredClone(Dn(this).c)}get timeout(){return Dn(this).timeout}set timeout(e){Dn(this).timeout=e}get[$n](){return Dn(this).fetch}set[$n](e){Dn(this).fetch=e}}function Zn(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const i=new Date;i.setSeconds(i.getSeconds()+e.expires_in),t=i.getTime()}return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return di(this)}catch(e){return}}}}}(e))}async function Yn(e,t,i){var n;let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=null===(n=e.headers.get("retry-after"))||void 0===n?void 0:n.trim();if(void 0===o)return;let s;if(/^\d+$/.test(o))s=parseInt(o,10);else{const e=new Date(o);if(Number.isFinite(e.getTime())){const t=new Date,i=e.getTime()-t.getTime();i>0&&(s=Math.ceil(i/1e3))}}if(a&&!Number.isFinite(s))throw new At("invalid Retry-After header value",{cause:e});s>t&&await Xn(s-t,i)}function Xn(e,t){return new Promise((i,n)=>{const a=e=>{try{t.throwIfAborted()}catch(e){return void n(e)}if(e<=0)return void i();const o=Math.min(e,5);setTimeout(()=>a(e-o),1e3*o)};a(e)})}async function Qn(e,t){ra(e);const{as:i,c:n,auth:a,fetch:o,tlsOnly:s,timeout:r}=Dn(e);return async function(e,t,i,n,a){Wt(e),Ht(t);const o=Vt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[ft])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const r=It(null==a?void 0:a.headers);return r.set("accept","application/json"),ci(e,t,i,o,s,r,a)}(i,n,a,t,{[bt]:o,[ft]:!s,headers:new Headers(Ln),signal:ca(r)}).then(e=>async function(e,t,i){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,200,"Backchannel Authentication Endpoint"),Di(i);const n=await Ki(i);Lt(n.auth_req_id,'"response" body "auth_req_id" property',ji,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return Rt(a,!0,'"response" body "expires_in" property',ji,{body:n}),n.expires_in=a,void 0!==n.interval&&Rt(n.interval,!1,'"response" body "interval" property',ji,{body:n}),n}(i,n,e)).catch(Bn)}async function ea(e,t,i,n){var a,o;ra(e),i=new URLSearchParams(i);let s=null!==(a=t.interval)&&void 0!==a?a:5;const r=null!==(o=null==n?void 0:n.signal)&&void 0!==o?o:AbortSignal.timeout(1e3*t.expires_in);try{await Xn(s,r)}catch(e){Bn(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:d,nonRepudiation:m,timeout:h,decrypt:f}=Dn(e),v=(a,o)=>ea(e,ot(ot({},t),{},{interval:a}),i,ot(ot({},n),{},{signal:r,flag:o})),g=await async function(e,t,i,n,a){Wt(e),Ht(t),Lt(n,'"authReqId"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("auth_req_id",n),pi(e,t,i,"urn:openid:params:grant-type:ciba",o,a)}(c,p,l,t.auth_req_id,{[bt]:u,[ft]:!d,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Ln),signal:r.aborted?r:ca(h)}).catch(Bn);var b;if(503===g.status&&g.headers.has("retry-after"))return await Yn(g,s,r,!0),await(null===(b=g.body)||void 0===b?void 0:b.cancel()),v(s);const x=async function(e,t,i,n){return mi(e,t,i,void 0,null==n?void 0:n[yt],null==n?void 0:n.recognizedTokenTypes)}(c,p,g,{[yt]:f});let y;try{y=await x}catch(e){if(pa(e,n))return v(s,la);if(e instanceof Gt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Yn(e.response,s,r),v(s)}Bn(e)}return y.id_token&&await(null==m?void 0:m(g)),Zn(y),y}function ta(e){Dn(e).tlsOnly=!1}async function ia(e,t,i,n,a){if(ra(e),!((null==a?void 0:a.flag)===la||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Kn('"currentUrl" must be an instance of URL, or Request',Hn);let o,s;const{as:r,c,auth:p,fetch:l,tlsOnly:u,jarm:d,hybrid:m,nonRepudiation:h,timeout:f,decrypt:v,implicit:g}=Dn(e);if((null==a?void 0:a.flag)===la)o=a.authResponse,s=a.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(t=new URL(t.url),e.method){case"GET":break;case"POST":const i=new URLSearchParams(await async function(e){if("POST"!==e.method)throw ht("form_post responses are expected to use the POST method",dt,{cause:e});if("application/x-www-form-urlencoded"!==ri(e))throw ht("form_post responses are expected to use the application/x-www-form-urlencoded content-type",dt,{cause:e});return async function(e){if(e.bodyUsed)throw ht("form_post Request instances must contain a readable body",dt,{cause:e});return e.text()}(e)}(e));if(m)t.hash=i.toString();else for(const[e,n]of i.entries())t.searchParams.append(e,n);break;default:throw Kn("unexpected Request HTTP method",Wn)}}switch(s=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!d:o=await d(t,null==i?void 0:i.expectedState);break;case!!m:o=await m(t,null==i?void 0:i.expectedNonce,null==i?void 0:i.expectedState,null==i?void 0:i.maxAge);break;case!!g:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{o=function(e,t,i,n){if(Wt(e),Ht(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw ht('"parameters" must be an instance of URLSearchParams, or URL',mt);if($i(i,"response"))throw Pt('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',ji,{parameters:i});const a=$i(i,"iss"),o=$i(i,"state");if(!a&&e.authorization_response_iss_parameter_supported)throw Pt('response parameter "iss" (issuer) missing',ji,{parameters:i});if(a&&a!==e.issuer)throw Pt('unexpected "iss" (issuer) response parameter value',ji,{expected:e.issuer,parameters:i});switch(n){case void 0:case Hi:if(void 0!==o)throw Pt('unexpected "state" response parameter encountered',ji,{expected:void 0,parameters:i});break;case Wi:break;default:if(Lt(n,'"expectedState" argument'),o!==n)throw Pt(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',ji,{expected:n,parameters:i})}if($i(i,"error"))throw new Zt("authorization response from the server is an error",{cause:i});const s=$i(i,"id_token"),r=$i(i,"token");if(void 0!==s||void 0!==r)throw new jt("implicit and hybrid flows are not supported");return c=new URLSearchParams(i),vi.add(c),c;var c}(r,c,t.searchParams,null==i?void 0:i.expectedState)}catch(e){Bn(e)}}}const b=await async function(e,t,i,n,a,o,s){if(Wt(e),Ht(t),!vi.has(n))throw ht('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',dt);Lt(a,'"redirectUri"');const r=$i(n,"code");if(!r)throw Pt('no authorization code in "callbackParameters"',ji);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",a),c.set("code",r),o!==gi&&(Lt(o,'"codeVerifier"'),c.set("code_verifier",o)),pi(e,t,i,"authorization_code",c,s)}(r,c,p,o,s,(null==i?void 0:i.pkceCodeVerifier)||gi,{additionalParameters:n,[bt]:l,[ft]:!u,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Ln),signal:ca(f)}).catch(Bn);"string"!=typeof(null==i?void 0:i.expectedNonce)&&"number"!=typeof(null==i?void 0:i.maxAge)||(i.idTokenExpected=!0);const x=async function(e,t,i,n){return"string"==typeof(null==n?void 0:n.expectedNonce)||"number"==typeof(null==n?void 0:n.maxAge)||null!=n&&n.requireIdToken?async function(e,t,i,n,a,o,s){const r=[];switch(n){case void 0:n=yi;break;case yi:break;default:Lt(n,'"expectedNonce" argument'),r.push("nonce")}switch(null!=a||(a=t.default_max_age),a){case void 0:a=wi;break;case wi:break;default:Rt(a,!0,'"maxAge" argument'),r.push("auth_time")}const c=await mi(e,t,i,r,o,s);Lt(c.id_token,'"response" body "id_token" property',ji,{body:c});const p=di(c);if(a!==wi){const e=$t()+qt(t),i=Mt(t);if(p.auth_time+a<e-i)throw Pt("too much time has elapsed since the last End-User authentication",Ci,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(n===yi){if(void 0!==p.nonce)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==n)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:n,claims:p,claim:"nonce"});return c}(e,t,i,n.expectedNonce,n.maxAge,n[yt],n.recognizedTokenTypes):async function(e,t,i,n,a){const o=await mi(e,t,i,void 0,n,a),s=di(o);if(s){if(void 0!==t.default_max_age){Rt(t.default_max_age,!0,'"client.default_max_age"');const e=$t()+qt(t),i=Mt(t);if(s.auth_time+t.default_max_age<e-i)throw Pt("too much time has elapsed since the last End-User authentication",Ci,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw Pt('unexpected ID Token "nonce" claim value',Ui,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==n?void 0:n[yt],null==n?void 0:n.recognizedTokenTypes)}(r,c,b,{expectedNonce:null==i?void 0:i.expectedNonce,maxAge:null==i?void 0:i.maxAge,requireIdToken:null==i?void 0:i.idTokenExpected,[yt]:v});let y;try{y=await x}catch(t){if(pa(t,a))return ia(e,void 0,i,n,ot(ot({},a),{},{flag:la,authResponse:o,redirectUri:s}));Bn(t)}return y.id_token&&await(null==h?void 0:h(b)),Zn(y),y}async function na(e,t,i,n){ra(e),i=new URLSearchParams(i);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=Dn(e),d=await async function(e,t,i,n,a){Wt(e),Ht(t),Lt(n,'"refreshToken"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("refresh_token",n),pi(e,t,i,"refresh_token",o,a)}(a,o,s,t,{[bt]:r,[ft]:!c,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Ln),signal:ca(l)}).catch(Bn),m=async function(e,t,i,n){return mi(e,t,i,void 0,null==n?void 0:n[yt],null==n?void 0:n.recognizedTokenTypes)}(a,o,d,{[yt]:u});let h;try{h=await m}catch(a){if(pa(a,n))return na(e,t,i,ot(ot({},n),{},{flag:la}));Bn(a)}return h.id_token&&await(null==p?void 0:p(d)),Zn(h),h}async function aa(e,t,i){ra(e),t=new URLSearchParams(t);const{as:n,c:a,auth:o,fetch:s,tlsOnly:r,timeout:c}=Dn(e),p=await async function(e,t,i,n,a){return Wt(e),Ht(t),pi(e,t,i,"client_credentials",new URLSearchParams(n),a)}(n,a,o,t,{[bt]:s,[ft]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Ln),signal:ca(c)}).catch(Bn),l=async function(e,t,i){return mi(e,t,i,void 0,void 0,void 0)}(n,a,p);let u;try{u=await l}catch(n){if(pa(n,i))return aa(e,t,ot(ot({},i),{},{flag:la}));Bn(n)}return Zn(u),u}function oa(e,t){ra(e);const{as:i,c:n,tlsOnly:a,hybrid:o,jarm:s,implicit:r}=Dn(e),c=Vt(i,"authorization_endpoint",!1,a);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",n.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",o?"code id_token":r?"id_token":"code"),r&&!t.has("nonce"))throw Kn("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Wn);s&&t.set("response_mode","jwt")}for(const[e,i]of t.entries())c.searchParams.append(e,i);return c}async function sa(e,t,i){ra(e);const n=oa(e,t),{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=Dn(e),l=await async function(e,t,i,n,a){var o;Wt(e),Ht(t);const s=Vt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[ft])),r=new URLSearchParams(n);r.set("client_id",t.client_id);const c=It(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(si(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const p=await ci(e,t,i,s,r,c,a);return null==a||null===(o=a.DPoP)||void 0===o||o.cacheNonce(p,s),p}(a,o,s,n.searchParams,{[bt]:r,[ft]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Ln),signal:ca(p)}).catch(Bn),u=async function(e,t,i){if(Wt(e),Ht(t),!ut(i,Response))throw ht('"response" must be an instance of Response',mt);await oi(i,201,"Pushed Authorization Request Endpoint"),Di(i);const n=await Ki(i);Lt(n.request_uri,'"response" body "request_uri" property',ji,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return Rt(a,!0,'"response" body "expires_in" property',ji,{body:n}),n.expires_in=a,n}(a,o,l);let d;try{d=await u}catch(n){if(pa(n,i))return sa(e,t,ot(ot({},i),{},{flag:la}));Bn(n)}return oa(e,{request_uri:d.request_uri})}function ra(e){if(!(e instanceof Gn))throw Kn('"config" must be an instance of Configuration',Hn);if(Object.getPrototypeOf(e)!==Gn.prototype)throw Kn("subclassing Configuration is not allowed",Wn)}function ca(e){return e?AbortSignal.timeout(1e3*e):void 0}function pa(e,t){return!(null==t||!t.DPoP||t.flag===la)&&function(e){if(e instanceof Yt){const{0:t,length:i}=e.cause;return 1===i&&"dpop"===t.scheme&&"use_dpop_nonce"===t.parameters.error}return e instanceof Gt&&"use_dpop_nonce"===e.error}(e)}Object.freeze(Gn.prototype);const la=Symbol();async function ua(e,t,i,n){ra(e);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=Dn(e),u=await async function(e,t,i,n,a,o){return Wt(e),Ht(t),Lt(n,'"grantType"'),pi(e,t,i,n,new URLSearchParams(a),o)}(a,o,s,t,new URLSearchParams(i),{[bt]:r,[ft]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Ln),signal:ca(p)}).then(e=>{let i;return"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(i={n_a:()=>{}}),async function(e,t,i,n){return mi(e,t,i,void 0,null==n?void 0:n[yt],null==n?void 0:n.recognizedTokenTypes)}(a,o,e,{[yt]:l,recognizedTokenTypes:i})}).catch(Bn);return Zn(u),u}async function da(e,t,i){if(!yn(e))throw new pn("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new pn('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new pn("JWS Protected Header incorrect type");if(void 0===e.payload)throw new pn("JWS Payload missing");if("string"!=typeof e.signature)throw new pn("JWS Signature missing or incorrect type");if(void 0!==e.header&&!yn(e.header))throw new pn("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=Yi(e.protected);n=JSON.parse(Vi.decode(t))}catch(e){throw new pn("JWS Protected Header is invalid")}if(!function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.filter(Boolean);if(0===n.length||1===n.length)return!0;let a;for(const e of n){const t=Object.keys(e);if(a&&0!==a.size)for(const e of t){if(a.has(e))return!1;a.add(e)}else a=new Set(t)}return!0}(n,e.header))throw new pn("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a=ot(ot({},n),e.header),o=function(e,t,i,n,a){if(void 0!==a.crit&&void 0===(null==n?void 0:n.crit))throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;o=void 0!==i?new Map([...Object.entries(i),...t.entries()]):t;for(const t of n.crit){if(!o.has(t))throw new cn('Extension Header Parameter "'.concat(t,'" is not recognized'));if(void 0===a[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(o.get(t)&&void 0===n[t])throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return new Set(n.crit)}(pn,new Map([["b64",!0]]),null==i?void 0:i.crit,n,a);let s=!0;if(o.has("b64")&&(s=n.b64,"boolean"!=typeof s))throw new pn('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=a;if("string"!=typeof r||!r)throw new pn('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=i&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat("algorithms",'" option must be an array of strings'));if(t)return new Set(t)}(0,i.algorithms);if(c&&!c.has(r))throw new rn('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new pn("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new pn("JWS Payload must be a string or an Uint8Array instance");let p=!1;"function"==typeof t&&(t=await t(n,e),p=!0),function(e,t,i){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((e,t,i)=>{if(!(t instanceof Uint8Array)){if(wn(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Cn(e,t,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!bn(t))throw new TypeError(nn(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(In(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(wn(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Cn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv)(t)&&Cn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!bn(t))throw new TypeError(nn(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(In(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(In(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(In(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(In(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(In(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,i)}}(r,t,"verify");const l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.reduce((e,t)=>{let{length:i}=t;return e+i},0),a=new Uint8Array(n);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(void 0!==e.protected?Gi(e.protected):new Uint8Array,Gi("."),"string"==typeof e.payload?s?Gi(e.payload):Bi.encode(e.payload):e.payload),u=xn(e.signature,"signature",pn),d=await async function(e,t){if(e instanceof Uint8Array)return e;if(vn(e))return e;if(gn(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{En||(En=new WeakMap);let i=En.get(e);if(null!=i&&i[t])return i[t];const n="public"===e.type,a=!!n;let o;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError(Sn)}o=e.toCryptoKey(e.asymmetricKeyType,a,n?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(Sn);o=e.toCryptoKey(e.asymmetricKeyType,a,[n?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw new TypeError(Sn);o=e.toCryptoKey(e.asymmetricKeyType,a,[n?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let i;switch(t){case"RSA-OAEP":i="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":i="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":i="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":i="SHA-512";break;default:throw new TypeError(Sn)}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:i},a,n?["encrypt"]:["decrypt"]);o=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:i},a,[n?"verify":"sign"])}if("ec"===e.asymmetricKeyType){var s;const i=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(null===(s=e.asymmetricKeyDetails)||void 0===s?void 0:s.namedCurve);if(!i)throw new TypeError(Sn);const r={ES256:"P-256",ES384:"P-384",ES512:"P-521"};r[t]&&i===r[t]&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},a,[n?"verify":"sign"])),t.startsWith("ECDH-ES")&&(o=e.toCryptoKey({name:"ECDH",namedCurve:i},a,n?[]:["deriveBits"]))}if(!o)throw new TypeError(Sn);return i?i[t]=o:En.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return Tn(e,i,t)}if(wn(e))return e.k?Yi(e.k):Tn(e,e,t,!0);throw new Error("unreachable")}(t,r);if(!await async function(e,t,i,n){const a=await async function(e,t,i){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return tn("Key must be ",e,...i)}(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:"SHA-".concat(e.slice(-3)),name:"HMAC"},!1,[i])}return function(e,t,i){switch(t){case"HS256":case"HS384":case"HS512":if(!Qi(e.algorithm,"HMAC"))throw Xi("HMAC");en(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if(!Qi(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Xi("RSASSA-PKCS1-v1_5");en(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if(!Qi(e.algorithm,"RSA-PSS"))throw Xi("RSA-PSS");en(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if(!Qi(e.algorithm,"Ed25519"))throw Xi("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Qi(e.algorithm,t))throw Xi(t);break;case"ES256":case"ES384":case"ES512":{if(!Qi(e.algorithm,"ECDSA"))throw Xi("ECDSA");const i=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==i)throw Xi(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t&&!e.usages.includes(t))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(t,"."))}(e,i)}(t,e,i),t}(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:i}=t.algorithm;if("number"!=typeof i||i<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}}(e,a);const o=function(e,t){const i="SHA-".concat(e.slice(-3));switch(e){case"HS256":case"HS384":case"HS512":return{hash:i,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:i,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:i,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:i,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new cn("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}(e,a.algorithm);try{return await crypto.subtle.verify(o,a,i,n)}catch(e){return!1}}(r,d,u,l))throw new fn;let m;m=s?xn(e.payload,"payload",pn):"string"==typeof e.payload?Bi.encode(e.payload):e.payload;const h={payload:m};return void 0!==e.protected&&(h.protectedHeader=n),void 0!==e.header&&(h.unprotectedHeader=e.header),p?ot(ot({},h),{},{key:d}):h}const ma=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function ha(e){const t=ma.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const i=parseFloat(t[2]);let n;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(i);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(60*i);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(3600*i);break;case"day":case"days":case"d":n=Math.round(86400*i);break;case"week":case"weeks":case"w":n=Math.round(604800*i);break;default:n=Math.round(31557600*i)}return"-"===t[1]||"ago"===t[4]?-n:n}const fa=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function va(e,t){let i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Vi.decode(t))}catch(e){}if(!yn(i))throw new ln("JWT Claims Set must be a top-level JSON object");const{typ:a}=n;if(a&&("string"!=typeof e.typ||fa(e.typ)!==fa(a)))throw new on('unexpected "typ" JWT header value',i,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:r,audience:c,maxTokenAge:p}=n,l=[...o];void 0!==p&&l.push("iat"),void 0!==c&&l.push("aud"),void 0!==r&&l.push("sub"),void 0!==s&&l.push("iss");for(const e of new Set(l.reverse()))if(!(e in i))throw new on('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new on('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new on('unexpected "sub" claim value',i,"sub","check_failed");if(c&&(d="string"==typeof c?[c]:c,!("string"==typeof(u=i.aud)?d.includes(u):Array.isArray(u)&&d.some(Set.prototype.has.bind(new Set(u))))))throw new on('unexpected "aud" claim value',i,"aud","check_failed");var u,d;let m;switch(typeof n.clockTolerance){case"string":m=ha(n.clockTolerance);break;case"number":m=n.clockTolerance;break;case"undefined":m=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=n,f=(v=h||new Date,Math.floor(v.getTime()/1e3));var v;if((void 0!==i.iat||p)&&"number"!=typeof i.iat)throw new on('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new on('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>f+m)throw new on('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new on('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=f-m)throw new sn('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=f-i.iat;if(e-m>("number"==typeof p?p:ha(p)))throw new sn('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-m)throw new on('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}function ga(e){return yn(e)}var ba,xa,ya=new WeakMap,wa=new WeakMap;class _a{constructor(e){if(tt(this,ya,void 0),tt(this,wa,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(ga)}(e))throw new un("JSON Web Key Set malformed");it(ya,this,structuredClone(e))}jwks(){return et(ya,this)}async getKey(e,t){const{alg:i,kid:n}=ot(ot({},e),null==t?void 0:t.header),a=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new cn('Unsupported "alg" value for a JSON Web Key Set')}}(i),o=et(ya,this).keys.filter(e=>{let t=a===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),!t||"string"!=typeof e.alg&&"AKP"!==a||(t=i===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(i){case"ES256":t="P-256"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":case"EdDSA":t="Ed25519"===e.crv}return t}),{0:s,length:r}=o;if(0===r)throw new dn;if(1!==r){const e=new mn,t=et(wa,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new rt(e.apply(this,arguments))}}(function*(){for(const e of o)try{yield yield Xe(ka(t,e,i))}catch(e){}}),e}return ka(et(wa,this),s,i)}}async function ka(e,t,i){const n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[i]){const e=await async function(e,t){if(!yn(e))throw new TypeError("JWK must be an object");let i;switch(null!=t||(t=e.alg),null!=i||(i=e.ext),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Yi(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new cn('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return kn(ot(ot({},e),{},{alg:t,ext:i}));case"AKP":if("string"!=typeof e.alg||!e.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==t&&t!==e.alg)throw new TypeError("JWK alg and alg option value mismatch");return kn(ot(ot({},e),{},{ext:i}));case"EC":case"OKP":return kn(ot(ot({},e),{},{alg:t,ext:i}));default:throw new cn('Unsupported "kty" (Key Type) Parameter value')}}(ot(ot({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new un("JSON Web Key Set members must be public keys");n[i]=e}return n[i]}function Sa(e){const t=new _a(e),i=async(e,i)=>t.getKey(e,i);return Object.defineProperties(i,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),i}let Ea;if("undefined"==typeof navigator||null===(ba=navigator.userAgent)||void 0===ba||null===(xa=ba.startsWith)||void 0===xa||!xa.call(ba,"Mozilla/5.0 ")){const e="v6.2.2";Ea="".concat("jose","/").concat(e)}const Ta=Symbol(),ja=Symbol();var Aa=new WeakMap,Pa=new WeakMap,Oa=new WeakMap,Ia=new WeakMap,Ca=new WeakMap,Ua=new WeakMap,Ra=new WeakMap,La=new WeakMap,za=new WeakMap,Da=new WeakMap;class Na{constructor(e,t){if(tt(this,Aa,void 0),tt(this,Pa,void 0),tt(this,Oa,void 0),tt(this,Ia,void 0),tt(this,Ca,void 0),tt(this,Ua,void 0),tt(this,Ra,void 0),tt(this,La,void 0),tt(this,za,void 0),tt(this,Da,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,n;it(Aa,this,new URL(e.href)),it(Pa,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),it(Oa,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),it(Ia,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),it(Ra,this,new Headers(null==t?void 0:t.headers)),Ea&&!et(Ra,this).has("User-Agent")&&et(Ra,this).set("User-Agent",Ea),et(Ra,this).has("accept")||(et(Ra,this).set("accept","application/json"),et(Ra,this).append("accept","application/jwk-set+json")),it(La,this,null==t?void 0:t[Ta]),void 0!==(null==t?void 0:t[ja])&&(it(Da,this,null==t?void 0:t[ja]),i=null==t?void 0:t[ja],n=et(Ia,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=n)&&"jwks"in i&&yn(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,yn)&&(it(Ca,this,et(Da,this).uat),it(za,this,Sa(et(Da,this).jwks))))}pendingFetch(){return!!et(Ua,this)}coolingDown(){return"number"==typeof et(Ca,this)&&Date.now()<et(Ca,this)+et(Oa,this)}fresh(){return"number"==typeof et(Ca,this)&&Date.now()<et(Ca,this)+et(Ia,this)}jwks(){var e;return null===(e=et(za,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){et(za,this)&&this.fresh()||await this.reload();try{return await et(za,this).call(this,e,t)}catch(i){if(i instanceof dn&&!1===this.coolingDown())return await this.reload(),et(za,this).call(this,e,t);throw i}}async reload(){et(Ua,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&it(Ua,this,void 0),et(Ua,this)||it(Ua,this,async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fetch;const a=await n(e,{method:"GET",signal:i,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new hn;throw e});if(200!==a.status)throw new an("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new an("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(et(Aa,this).href,et(Ra,this),AbortSignal.timeout(et(Pa,this)),et(La,this)).then(e=>{it(za,this,Sa(e)),et(Da,this)&&(et(Da,this).uat=Date.now(),et(Da,this).jwks=e),it(Ca,this,Date.now()),it(Ua,this,void 0)}).catch(e=>{throw it(Ua,this,void 0),e})),await et(Ua,this)}}const qa=["mfaToken"],Ma=["mfaToken"];var $a,Wa,Ha,Ka,Ja,Fa,Ba,Va,Ga,Za,Ya,Xa,Qa,eo,to,io,no=class extends Error{constructor(e,t){super(t),nt(this,"code",void 0),this.name="NotSupportedError",this.code=e}},ao=class extends Error{constructor(e,t,i){super(t),nt(this,"cause",void 0),nt(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},oo=class extends ao{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},so=class extends ao{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},ro=class extends ao{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},co=class extends ao{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},po=class extends ao{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},lo=class extends Error{constructor(e){super(e),nt(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},uo=class extends ao{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),nt(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},mo=class extends ao{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},ho=class extends ao{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},fo=class extends ao{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},vo=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),nt(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function go(e){return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).reduce((e,t)=>ot(ot({},e),{},{[t[0]]:t[1]}),{})}var bo=class extends Error{constructor(e,t,i){super(t),nt(this,"cause",void 0),nt(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},xo=class extends bo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},yo=class extends bo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},wo=class extends bo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},_o=class extends bo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function ko(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var So=($a=new WeakMap,Wa=new WeakMap,Ha=new WeakMap,class{constructor(e){var t;tt(this,$a,void 0),tt(this,Wa,void 0),tt(this,Ha,void 0),it($a,this,"https://".concat(e.domain)),it(Wa,this,e.clientId),it(Ha,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(et($a,this),"/mfa/authenticators"),{mfaToken:i}=e,n=await et(Ha,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!n.ok){const e=await n.json();throw new xo(e.error_description||"Failed to list authenticators",e)}return(await n.json()).map(ko)}async enrollAuthenticator(e){const t="".concat(et($a,this),"/mfa/associate"),{mfaToken:i}=e,n=st(e,qa),a={authenticator_types:n.authenticatorTypes};"oobChannels"in n&&(a.oob_channels=n.oobChannels),"phoneNumber"in n&&n.phoneNumber&&(a.phone_number=n.phoneNumber),"email"in n&&n.email&&(a.email=n.email);const o=await et(Ha,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){const e=await o.json();throw new yo(e.error_description||"Failed to enroll authenticator",e)}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await o.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:i}=e,n="".concat(et($a,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),a=await et(Ha,this).call(this,n,{method:"DELETE",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!a.ok){const e=await a.json();throw new wo(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(et($a,this),"/mfa/challenge"),{mfaToken:i}=e,n=st(e,Ma),a={mfa_token:i,client_id:et(Wa,this),challenge_type:n.challengeType};n.authenticatorId&&(a.authenticator_id=n.authenticatorId);const o=await et(Ha,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){const e=await o.json();throw new _o(e.error_description||"Failed to challenge authenticator",e)}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await o.json())}}),Eo=class e{constructor(e,t,i,n,a,o,s){nt(this,"accessToken",void 0),nt(this,"idToken",void 0),nt(this,"refreshToken",void 0),nt(this,"expiresAt",void 0),nt(this,"scope",void 0),nt(this,"claims",void 0),nt(this,"authorizationDetails",void 0),nt(this,"tokenType",void 0),nt(this,"issuedTokenType",void 0),this.accessToken=e,this.idToken=i,this.refreshToken=n,this.expiresAt=t,this.scope=a,this.claims=o,this.authorizationDetails=s}static fromTokenEndpointResponse(t){const i=t.id_token?t.claims():void 0,n=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,i,t.authorization_details);return n.tokenType=t.token_type,n.issuedTokenType=t.issued_token_type,n}},To=(Ka=new WeakMap,Ja=new WeakMap,Fa=new WeakMap,class{constructor(e,t){tt(this,Ka,new Map),tt(this,Ja,void 0),tt(this,Fa,void 0),it(Fa,this,Math.max(1,Math.floor(e))),it(Ja,this,Math.max(0,Math.floor(t)))}get(e){const t=et(Ka,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return et(Ka,this).delete(e),et(Ka,this).set(e,t),t.value;et(Ka,this).delete(e)}}set(e,t){for(et(Ka,this).has(e)&&et(Ka,this).delete(e),et(Ka,this).set(e,{value:t,expiresAt:Date.now()+et(Ja,this)});et(Ka,this).size>et(Fa,this);){const e=et(Ka,this).keys().next().value;if(void 0===e)break;et(Ka,this).delete(e)}}}),jo=new Map;function Ao(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var Po=class{static createDiscoveryCache(e){const t=(i=e.maxEntries,n=e.ttlMs,"".concat(i,":").concat(n));var i,n;let a=(o=t,jo.get(o));var o;return a||(a=new To(e.maxEntries,e.ttlMs),jo.set(t,a)),a}static createJwksCache(){return{}}},Oo="openid profile email offline_access",Io=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function Co(e){if(null==e)throw new po("subject_token is required");if("string"!=typeof e)throw new po("subject_token must be a string");if(0===e.trim().length)throw new po("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new po("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new po("subject_token must not include the 'Bearer ' prefix")}function Uo(e,t){if(t)for(const[i,n]of Object.entries(t))if(!Io.has(i))if(Array.isArray(n)){if(n.length>20)throw new po("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));n.forEach(t=>{e.append(i,t)})}else e.append(i,n)}var Ro="urn:ietf:params:oauth:token-type:access_token",Lo=(Ba=new WeakMap,Va=new WeakMap,Ga=new WeakMap,Za=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakSet,class{constructor(e){var t,i,n,a;if(function(e,t){Qe(e,t),t.add(e)}(this,io),tt(this,Ba,void 0),tt(this,Va,void 0),tt(this,Ga,void 0),tt(this,Za,void 0),tt(this,Ya,void 0),tt(this,Xa,void 0),tt(this,Qa,void 0),tt(this,eo,void 0),tt(this,to,void 0),nt(this,"mfa",void 0),it(Za,this,e),e.useMtls&&!e.customFetch)throw new no("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");it(Ya,this,function(e,t){if(!1===t.enabled)return e;const i={name:t.name,version:t.version},n=btoa(JSON.stringify(i));return async(t,i)=>{const a=t instanceof Request?new Headers(t.headers):new Headers;return null!=i&&i.headers&&new Headers(i.headers).forEach((e,t)=>{a.set(t,e)}),a.set("Auth0-Client",n),e(t,ot(ot({},i),{},{headers:a}))}}(null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)},!1===(null==(i=e.telemetry)?void 0:i.enabled)?i:{enabled:!0,name:null!==(n=null==i?void 0:i.name)&&void 0!==n?n:"@auth0/auth0-auth-js",version:null!==(a=null==i?void 0:i.version)&&void 0!==a?a:"1.5.0"}));const o=Ao(e.discoveryCache);it(Qa,this,Po.createDiscoveryCache(o)),it(eo,this,new Map),it(to,this,Po.createJwksCache()),this.mfa=new So({domain:et(Za,this).domain,clientId:et(Za,this).clientId,customFetch:et(Ya,this)})}async getServerMetadata(){const{serverMetadata:e}=await Ye(io,this,No).call(this);return e}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Ye(io,this,No).call(this);if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new no("par_not_supported_error","The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par");try{return await Ye(io,this,Wo).call(this,e)}catch(e){throw new mo(e)}}async buildLinkUserUrl(e){try{const t=await Ye(io,this,Wo).call(this,{authorizationParams:ot(ot({},e.authorizationParams),{},{requested_connection:e.connection,requested_connection_scope:e.connectionScope,scope:"openid link_account offline_access",id_token_hint:e.idToken})});return{linkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(e){throw new ho(e)}}async buildUnlinkUserUrl(e){try{const t=await Ye(io,this,Wo).call(this,{authorizationParams:ot(ot({},e.authorizationParams),{},{requested_connection:e.connection,scope:"openid unlink_account",id_token_hint:e.idToken})});return{unlinkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(e){throw new fo(e)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this),n=go(ot(ot({},et(Za,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(ot(ot({scope:Oo},n),{},{client_id:et(Za,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&a.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&a.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await Qn(t,a),i=await ea(t,e);return Eo.fromTokenEndpointResponse(i)}catch(e){throw new uo(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this),n=go(ot(ot({},et(Za,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(ot(ot({scope:Oo},n),{},{client_id:et(Za,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&a.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&a.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await Qn(t,a);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new uo(e)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:i}=await Ye(io,this,No).call(this),n=new URLSearchParams({auth_req_id:t});try{const e=await ua(i,"urn:openid:params:grant-type:ciba",n);return Eo.fromTokenEndpointResponse(e)}catch(e){throw new uo(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new co("Either a refresh or access token should be specified, but not both.");const i=null!==(t=e.accessToken)&&void 0!==t?t:e.refreshToken;if(!i)throw new co("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?Ro:"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof po)throw new co(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?Ye(io,this,qo).call(this,e):Ye(io,this,Mo).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await Ye(io,this,No).call(this);try{const n=await ia(i,e,{pkceCodeVerifier:t.codeVerifier});return Eo.fromTokenEndpointResponse(n)}catch(e){throw new oo("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await Ye(io,this,No).call(this),i=new URLSearchParams;e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope);try{const n=await na(t,e.refreshToken,i);return Eo.fromTokenEndpointResponse(n)}catch(e){throw new ro("The access token has expired and there was an error while trying to refresh it.",e)}}async getTokenByClientCredentials(e){const{configuration:t}=await Ye(io,this,No).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const n=await aa(t,i);return Eo.fromTokenEndpointResponse(n)}catch(e){throw new so("There was an error while trying to request a token.",e)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:i}=await Ye(io,this,No).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(et(Za,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",et(Za,this).clientId),t}return function(e,t){ra(e);const{as:i,c:n,tlsOnly:a}=Dn(e),o=Vt(i,"end_session_endpoint",!1,a);(t=new URLSearchParams(t)).has("client_id")||t.set("client_id",n.client_id);for(const[e,i]of t.entries())o.searchParams.append(e,i);return o}(t,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const{serverMetadata:t}=await Ye(io,this,No).call(this),i=Ao(et(Za,this).discoveryCache),n=t.jwks_uri;et(Xa,this)||it(Xa,this,function(e,t){const i=new Na(e,t),n=async(e,t)=>i.getKey(e,t);return Object.defineProperties(n,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>i.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>i.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}(new URL(n),{cacheMaxAge:i.ttlMs,[Ta]:et(Ya,this),[ja]:et(to,this)}));const{payload:a}=await async function(e,t,i){var n;const a=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Vi.decode(e)),"string"!=typeof e)throw new pn("Compact JWS must be a string or Uint8Array");const{0:n,1:a,2:o,length:s}=e.split(".");if(3!==s)throw new pn("Invalid Compact JWS");const r=await da({payload:a,protected:n,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?ot(ot({},c),{},{key:r.key}):c}(e,t,i);if(null!==(n=a.protectedHeader.crit)&&void 0!==n&&n.includes("b64")&&!1===a.protectedHeader.b64)throw new ln("JWTs MUST NOT use unencoded payload");const o={payload:va(a.protectedHeader,a.payload,i),protectedHeader:a.protectedHeader};return"function"==typeof t?ot(ot({},o),{},{key:a.key}):o}(e.logoutToken,et(Xa,this),{issuer:t.issuer,audience:et(Za,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in a)&&!("sub"in a))throw new lo('either "sid" or "sub" (or both) claims must be present');if("sid"in a&&"string"!=typeof a.sid)throw new lo('"sid" claim must be a string');if("sub"in a&&"string"!=typeof a.sub)throw new lo('"sub" claim must be a string');if("nonce"in a)throw new lo('"nonce" claim is prohibited');if(!("events"in a))throw new lo('"events" claim is missing');if("object"!=typeof a.events||null===a.events)throw new lo('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in a.events))throw new lo('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if("object"!=typeof a.events["http://schemas.openid.net/event/backchannel-logout"])throw new lo('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:a.sid,sub:a.sub}}});function zo(){const e=et(Za,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(et(Za,this).useMtls?"1":"0")}async function Do(e){const t=await Ye(io,this,$o).call(this),i=new Gn(e,et(Za,this).clientId,et(Za,this).clientSecret,t);return i[$n]=et(Ya,this),i}async function No(){if(et(Ba,this)&&et(Va,this))return{configuration:et(Ba,this),serverMetadata:et(Va,this)};const e=Ye(io,this,zo).call(this),t=et(Qa,this).get(e);if(t)return it(Va,this,t.serverMetadata),it(Ba,this,await Ye(io,this,Do).call(this,t.serverMetadata)),{configuration:et(Ba,this),serverMetadata:et(Va,this)};const i=et(eo,this).get(e);if(i){const e=await i;return it(Va,this,e.serverMetadata),it(Ba,this,await Ye(io,this,Do).call(this,e.serverMetadata)),{configuration:et(Ba,this),serverMetadata:et(Va,this)}}const n=(async()=>{const t=await Ye(io,this,$o).call(this),i=await async function(e,t,i,n,a){const o=await async function(e,t){var i,n;if(!(e instanceof URL))throw Kn('"server" must be an instance of URL',Hn);const a=!e.href.includes("/.well-known/"),o=null!==(i=null==t?void 0:t.timeout)&&void 0!==i?i:30,s=AbortSignal.timeout(1e3*o),r=await(a?async function(e,t){return async function(e,t,i,n){if(!(e instanceof URL))throw ht('"'.concat("issuerIdentifier",'" must be an instance of URL'),mt);Ft(e,!0!==(null==n?void 0:n[ft]));const a=i(new URL(e.href)),o=It(null==n?void 0:n.headers);return o.set("accept","application/json"),((null==n?void 0:n[bt])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:Ct(a,null==n?void 0:n.signal)})}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=Ut("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=Ut("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw ht('"options.algorithm" must be "oidc" (default), or "oauth2"',dt)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[bt]:null==t?void 0:t[$n],[ft]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(ta),signal:s,headers:new Headers(Ln)}):((null==t?void 0:t[$n])||fetch)((Ft(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(ta)),e.href),{headers:Object.fromEntries(new Headers(ot({accept:"application/json"},Ln)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Ji)throw ht('"expectedIssuerIdentifier" must be an instance of URL',mt);if(!ut(t,Response))throw ht('"response" must be an instance of Response',mt);if(200!==t.status)throw Pt('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Pi,t);Di(t);const n=await Ki(t);if(Lt(n.issuer,'"response" body "issuer" property',ji,{body:n}),i!==Ji&&new URL(n.issuer).href!==i.href)throw Pt('"response" body "issuer" property does not match the expected value',Ri,{expected:i.href,body:n,attribute:"issuer"});return n}(Ji,e)).catch(Bn);var c;return a&&new URL(r.issuer).href!==e.href&&(function(e,t,i){return!("https://login.microsoftonline.com"!==e.origin||null!=i&&i.algorithm&&"oidc"!==i.algorithm||(t[Vn]=!0,0))}(e,r,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new Jn("discovered metadata issuer does not match the expected issuer",{code:Ri,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,a),s=new Gn(o,t,i,n);let r=Dn(s);if(null!=a&&a[$n]&&(r.fetch=a[$n]),null!=a&&a.timeout&&(r.timeout=a.timeout),null!=a&&a.execute)for(const e of a.execute)e(s);return s}(new URL("https://".concat(et(Za,this).domain)),et(Za,this).clientId,{use_mtls_endpoint_aliases:et(Za,this).useMtls},t,{[$n]:et(Ya,this)}),n=i.serverMetadata();return et(Qa,this).set(e,{serverMetadata:n}),{configuration:i,serverMetadata:n}})(),a=n.then(e=>{let{serverMetadata:t}=e;return{serverMetadata:t}});a.catch(()=>{}),et(eo,this).set(e,a);try{const{configuration:e,serverMetadata:t}=await n;it(Ba,this,e),it(Va,this,t),et(Ba,this)[$n]=et(Ya,this)}finally{et(eo,this).delete(e)}return{configuration:et(Ba,this),serverMetadata:et(Va,this)}}async function qo(e){var t,i;const{configuration:n}=await Ye(io,this,No).call(this);if("audience"in e||"resource"in e)throw new po("audience and resource parameters are not supported for Token Vault exchanges");Co(e.subjectToken);const a=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:Ro,requested_token_type:null!==(i=e.requestedTokenType)&&void 0!==i?i:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&a.append("login_hint",e.loginHint),e.scope&&a.append("scope",e.scope),Uo(a,e.extra);try{const e=await ua(n,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",a);return Eo.fromTokenEndpointResponse(e)}catch(t){throw new po("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function Mo(e){const{configuration:t}=await Ye(io,this,No).call(this);Co(e.subjectToken);const i=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope),e.requestedTokenType&&i.append("requested_token_type",e.requestedTokenType),e.organization&&i.append("organization",e.organization),Uo(i,e.extra);try{const e=await ua(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Eo.fromTokenEndpointResponse(e)}catch(t){throw new po("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function $o(){return et(Ga,this)||it(Ga,this,(async()=>{if(!et(Za,this).clientSecret&&!et(Za,this).clientAssertionSigningKey&&!et(Za,this).useMtls)throw new vo;if(et(Za,this).useMtls)return(e,t,i,n)=>{i.set("client_id",t.client_id)};let e=et(Za,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await async function(e,t){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return((e,t,i)=>{var n;const a=(e=>Zi(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);let o=i;return null!=t&&null!==(n=t.startsWith)&&void 0!==n&&n.call(t,"ECDH-ES")&&(o||(o={}),o.getNamedCurve=e=>{const t={data:e,pos:0};return function(e){Pn(e,48,"Invalid PKCS#8 structure"),An(e),Pn(e,2,"Expected version field");const t=An(e);e.pos+=t,Pn(e,48,"Expected algorithm identifier"),An(e),e.pos}(t),(e=>{const t=(e=>{Pn(e,6,"Expected algorithm OID");const t=An(e);return On(e,t)})(e);if(jn(t,[43,101,110]))return"X25519";if(!jn(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Pn(e,6,"Expected curve OID");const i=An(e),n=On(e,i);for(const{name:e,oid:t}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(jn(n,t))return e;throw new Error("Unsupported named curve")})(t)}),(async(e,t,i,n)=>{var a;let o,s;switch(i){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(i.slice(-3),10)||1)},s=["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":o={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[i]},s=["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const e=n.getNamedCurve(t);o="X25519"===e?{name:"X25519"}:{name:"ECDH",namedCurve:e}}catch(e){throw new cn("Invalid or unsupported key format")}s=["deriveBits"];break;case"Ed25519":case"EdDSA":o={name:"Ed25519"},s=["sign"];break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":o={name:i},s=["sign"];break;default:throw new cn('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,o,null!==(a=null==n?void 0:n.extractable)&&void 0!==a&&a,s)})("pkcs8",a,t,o)})(e,t,void 0)}(e,et(Za,this).clientAssertionSigningAlg||"RS256")),e?function(e){return function(e,t){const{key:i,kid:n}=(a=e)instanceof CryptoKey?{key:a}:(null==a?void 0:a.key)instanceof CryptoKey?(void 0!==a.kid&&Lt(a.kid,'"kid"'),{key:a.key,kid:a.kid}):{};var a;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw ht("".concat(t," must be a CryptoKey"),mt)}(e,t),"private"!==e.type)throw ht("".concat(t," must be a private CryptoKey"),dt)}(i,'"clientPrivateKey.key"'),async(e,a,o,s)=>{var r;const c={alg:Nt(i),kid:n},p=function(e,t){const i=$t()+qt(t);return{jti:Dt(),aud:e.issuer,exp:i+60,iat:i,nbf:i,iss:t.client_id,sub:t.client_id}}(e,a);null==t||null===(r=t[xt])||void 0===r||r.call(t,c,p),o.set("client_id",a.client_id),o.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),o.set("client_assertion",await async function(e,t,i){if(!i.usages.includes("sign"))throw ht('CryptoKey instances used for signing assertions must include "sign" in their "usages"',dt);const n="".concat(Tt(kt(JSON.stringify(e))),".").concat(Tt(kt(JSON.stringify(t)))),a=Tt(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:qi(e)};case"RSA-PSS":switch(Ni(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new jt("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Ni(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new jt("unsupported CryptoKey algorithm name",{cause:e})}(i),i,kt(n)));return"".concat(n,".").concat(a)}(c,p,i))}}(e,void 0)}(e):Mn(et(Za,this).clientSecret)})().catch(e=>{throw it(Ga,this,void 0),e})),et(Ga,this)}async function Wo(e){const{configuration:t}=await Ye(io,this,No).call(this),i=Dt(),n=await function(e){return async function(e){return Lt(e,"codeVerifier"),Tt(await crypto.subtle.digest("SHA-256",kt(e)))}(e)}(i),a=go(ot(ot({},et(Za,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(ot(ot({scope:Oo},a),{},{client_id:et(Za,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await sa(t,o):await oa(t,o),codeVerifier:i}}class Ho extends p{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Ho.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new Ho(t,i)}}class Ko extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Ko.prototype)}}class Jo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Jo.prototype)}}class Fo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Fo.prototype)}}class Bo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Bo.prototype)}}class Vo extends Ho{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Vo.prototype)}}class Go{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;this.contexts=new Map,this.ttlMs=e}set(e,t){this.cleanup(),this.contexts.set(e,Object.assign(Object.assign({},t),{createdAt:Date.now()}))}get(e){const t=this.contexts.get(e);if(t){if(!(Date.now()-t.createdAt>this.ttlMs))return t;this.contexts.delete(e)}}remove(e){this.contexts.delete(e)}cleanup(){const e=Date.now();for(const[t,i]of this.contexts)e-i.createdAt>this.ttlMs&&this.contexts.delete(t)}get size(){return this.contexts.size}}class Zo{constructor(e,t){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new Go}setMFAAuthDetails(e,t,i,n){this.contextManager.set(e,{scope:t,audience:i,mfaRequirements:n})}async getAuthenticators(e){var t,i;const n=this.contextManager.get(e);if(!(null===(t=null==n?void 0:n.mfaRequirements)||void 0===t?void 0:t.challenge)||0===n.mfaRequirements.challenge.length)throw new Ko("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const a=n.mfaRequirements.challenge.map(e=>e.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:e})).filter(e=>!!e.type&&a.includes(e.type))}catch(e){if(e instanceof xo)throw new Ko(null===(i=e.cause)||void 0===i?void 0:i.error,e.message);throw e}}async enroll(e){var t;const i=function(e){const t=Ge[e.factorType];return Object.assign(Object.assign(Object.assign({mfaToken:e.mfaToken,authenticatorTypes:t.authenticatorTypes},t.oobChannels&&{oobChannels:t.oobChannels}),"phoneNumber"in e&&{phoneNumber:e.phoneNumber}),"email"in e&&{email:e.email})}(e);try{return await this.authJsMfaClient.enrollAuthenticator(i)}catch(e){if(e instanceof yo)throw new Jo(null===(t=e.cause)||void 0===t?void 0:t.error,e.message);throw e}}async challenge(e){var t;try{const t={challengeType:e.challengeType,mfaToken:e.mfaToken};return e.authenticatorId&&(t.authenticatorId=e.authenticatorId),await this.authJsMfaClient.challengeAuthenticator(t)}catch(e){if(e instanceof _o)throw new Fo(null===(t=e.cause)||void 0===t?void 0:t.error,e.message);throw e}}async getEnrollmentFactors(e){const t=this.contextManager.get(e);if(!t||!t.mfaRequirements)throw new Vo("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");return t.mfaRequirements.enroll&&0!==t.mfaRequirements.enroll.length?t.mfaRequirements.enroll:[]}async verify(e){const t=this.contextManager.get(e.mfaToken);if(!t)throw new Bo("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");const i=function(e){return"otp"in e&&e.otp?"http://auth0.com/oauth/grant-type/mfa-otp":"oobCode"in e&&e.oobCode?"http://auth0.com/oauth/grant-type/mfa-oob":"recoveryCode"in e&&e.recoveryCode?"http://auth0.com/oauth/grant-type/mfa-recovery-code":void 0}(e);if(!i)throw new Bo("invalid_request","Unable to determine grant type. Provide one of: otp, oobCode, or recoveryCode.");const n=t.scope,a=t.audience;try{const t=await this.auth0Client._requestTokenForMfa({grant_type:i,mfaToken:e.mfaToken,scope:n,audience:a,otp:e.otp,oob_code:e.oobCode,binding_code:e.bindingCode,recovery_code:e.recoveryCode});return this.contextManager.remove(e.mfaToken),t}catch(e){if(e instanceof v)this.setMFAAuthDetails(e.mfa_token,n,a,e.mfa_requirements);else if(e instanceof Bo)throw new Bo(e.error,e.error_description);throw e}}}class Yo{constructor(e){let t,i;if(this.userCache=(new ge).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!w())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===w().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),this.lockManager=(F||(F=function(){return"undefined"!=typeof navigator&&"function"==typeof(null===(e=navigator.locks)||void 0===e?void 0:e.request)?new K:new J;var e}()),F),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)i=e.cache;else{if(t=e.cacheLocation||o,!qe(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=qe(t)()}var n;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?je:Pe,this.orgHintCookieName=(n=this.options.clientId,"auth0.".concat(n,".organization_hint")),this.isAuthenticatedCookieName=(e=>"auth0.".concat(e,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const a=e.useCookiesForTransactions?this.cookieStorage:Oe;var s;this.scope=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];if("object"!=typeof e)return{[c]:ue(t,e,...n)};let o={[c]:ue(t,...n)};return Object.keys(e).forEach(i=>{const a=e[i];o[i]=ue(t,a,...n)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new xe(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||r,this.cacheManager=new be(i,i.allKeys?void 0:new ze(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Ke(this.options.clientId):void 0,this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:"https://".concat(s)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const p="".concat(this.domainUrl,"/me/"),l=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:p},detailedResponse:!0})}));this.myAccountApi=new Be(l,p),this.authJsClient=new Lo({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new Zo(this.authJsClient.mfa,this),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&t===o&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Re)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=this.options.auth0Client||s,i=E(t,!0),n=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(n)}_authorizeUrl(e){return this._url("/authorize?".concat(T(e)))}async _verifyIdToken(e,t,i){const n=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[i,n,a]=t;if(3!==t.length||!i||!n||!a)throw new Error("ID token could not be decoded");const o=JSON.parse(A(n)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],we.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:n,signature:a},header:JSON.parse(A(i)),claims:s,user:r}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!ye(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!ye(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ye(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const i=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(t.claims.exp+i),n>a)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(a,")"));if(null!=t.claims.nbf&&ye(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-i),n<e)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(n,") is before ").concat(e))}if(null!=t.claims.auth_time&&ye(t.claims.auth_time)){const a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+i),n>a)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(n,") is after last auth at ").concat(a))}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const e=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_id,'"'))}else{const e=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_name,'"'))}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:i,leeway:this.options.leeway,max_age:(a=this.options.authorizationParams.max_age,"string"!=typeof a?a:parseInt(a,10)||void 0),now:n});var a}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}_extractSessionTransferToken(e){return new URLSearchParams(window.location.search).get(e)||void 0}_clearSessionTransferTokenFromUrl(e){try{const t=new URL(window.location.href);t.searchParams.has(e)&&(t.searchParams.delete(e),window.history.replaceState({},"",t.toString()))}catch(e){}}_applySessionTransferToken(e){const t=this.options.sessionTransferTokenQueryParamName;if(!t||e.session_transfer_token)return e;const i=this._extractSessionTransferToken(t);return i?(this._clearSessionTransferTokenFromUrl(t),Object.assign(Object.assign({},e),{session_transfer_token:i})):e}async _prepareAuthorizeUrl(e,t,i){var n;const a=k(_()),o=k(_()),s=_(),r=await j(s),p=P(r),l=await(null===(n=this.dpop)||void 0===n?void 0:n.calculateThumbprint()),u=((e,t,i,n,a,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:de(t,i.scope,i.audience),response_type:"code",response_mode:r||"query",state:n,nonce:a,redirect_uri:s||e.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256",dpop_jkt:c}))(this.options,this.scope,e,a,o,p,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,l),d=this._authorizeUrl(u);return{nonce:o,code_verifier:s,scope:u.scope,audience:u.audience||c,redirect_uri:u.redirect_uri,state:a,url:d}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(e,",top=").concat(t,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new f;const n=this._applySessionTransferToken(e.authorizationParams||{}),a=await this._prepareAuthorizeUrl(n,{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const o=await(e=>new Promise((t,i)=>{let n;const a=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(a),clearTimeout(o),window.removeEventListener("message",n,!1),i(new h(e.popup)))},1e3),o=setTimeout(()=>{clearInterval(a),i(new m(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(o),clearInterval(a),window.removeEventListener("message",n,!1),!1!==e.closePopup&&e.popup.close(),s.data.response.error)return i(p.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",n)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==o.state)throw new p("state_mismatch","Invalid state");const s=(null===(i=e.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:s})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:i,fragment:a,appState:o}=t,s=n(t,["openUrl","fragment","appState"]),r=(null===(e=s.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,c=this._applySessionTransferToken(s.authorizationParams||{}),p=await this._prepareAuthorizeUrl(c),{url:l}=p,u=n(p,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o,response_type:Ie.Code}),r&&{organization:r}));const d=a?"".concat(l,"#").concat(a):l;i?await i(d):window.location.assign(d)}async handleRedirectCallback(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href).split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const t=this.transactionManager.get();if(!t)throw new p("missing_transaction","Invalid state");this.transactionManager.remove();const i=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,connect_code:t.get("connect_code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(e.join(""));return t.response_type===Ie.ConnectCode?this._handleConnectAccountRedirectCallback(i,t):this._handleLoginRedirectCallback(i,t)}async _handleLoginRedirectCallback(e,t){const{code:i,state:n,error:a,error_description:o}=e;if(a)throw new l(a,o||a,n,t.appState);if(!t.code_verifier||t.state&&t.state!==n)throw new p("state_mismatch","Invalid state");const s=t.organization,r=t.nonce,c=t.redirect_uri;return await this._requestToken(Object.assign({audience:t.audience,scope:t.scope,code_verifier:t.code_verifier,grant_type:"authorization_code",code:i},c?{redirect_uri:c}:{}),{nonceIn:r,organization:s}),{appState:t.appState,response_type:Ie.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:n,error:a,error_description:o}=e;if(a)throw new u(a,o||a,t.connection,n,t.appState);if(!i)throw new p("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===n))throw new p("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:i,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier});return Object.assign(Object.assign({},s),{appState:t.appState,response_type:Ie.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(De))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(De)}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,i;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:de(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(i=e.authorizationParams)||void 0===i?void 0:i.audience)||this.options.authorizationParams.audience)})}),a=await((e,t)=>{let i=Le[t];return i||(i=e().finally(()=>{delete Le[t],i=null}),Le[t]=i),i})(()=>this._getTokenSilently(n),"".concat(this.options.clientId,"::").concat(n.authorizationParams.audience,"::").concat(n.authorizationParams.scope));return e.detailedResponse?a:null==a?void 0:a.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,i=n(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||c,clientId:this.options.clientId,cacheMode:t});if(e)return e}if("cache-only"===t)return;const a=(o=this.options.clientId,s=i.authorizationParams.audience||"default","".concat("auth0.lock.getTokenSilently",".").concat(o,".").concat(s));var o,s;try{return await this.lockManager.runWithLock(a,5e3,async()=>{if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||c,clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(i):await this._getTokenFromIFrame(i),{id_token:n,token_type:a,access_token:o,oauthTokenScope:s,expires_in:r}=e;return Object.assign(Object.assign({id_token:n,token_type:a,access_token:o},s?{scope:s}:null),{expires_in:r})})}catch(e){if(this._isInteractiveError(e)&&"popup"===this.options.interactiveErrorHandler)return await this._handleInteractiveErrorWithPopup(i);throw e}}_isInteractiveError(e){return e instanceof v||e instanceof p&&this._isIframeMfaError(e)}_isIframeMfaError(e){return"login_required"===e.error&&"Multifactor authentication required"===e.error_description}async _handleInteractiveErrorWithPopup(e){try{await this.loginWithPopup({authorizationParams:e.authorizationParams});const t=await this._getEntryFromCache({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||c,clientId:this.options.clientId});if(!t)throw new p("interactive_handler_cache_miss","Token not found in cache after interactive authentication");return t}catch(e){throw e}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;const o=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:de(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},a),t),await this.loginWithPopup(o,t),(await this.cacheManager.get(new fe({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||c,clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:i}=t,a=n(t,["federated"]),o=i?"&federated":"";return this._url("/v2/logout?".concat(T(Object.assign({clientId:e.clientId},a))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const i=Me(e),{openUrl:a}=i,o=n(i,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove(he),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const s=this._buildLogoutUrl(o);a?await a(s):!1!==a&&window.location.assign(s)}async _getTokenFromIFrame(e){const t=(i=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(i));var i;try{return await this.lockManager.runWithLock(t,5e3,async()=>{const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),i=this.cookieStorage.get(this.orgHintCookieName);i&&!t.organization&&(t.organization=i);const{url:n,state:a,nonce:o,code_verifier:s,redirect_uri:r,scope:c,audience:l}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);if(window.crossOriginIsolated)throw new p("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const u=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let m;try{m=new URL(this.domainUrl).origin}catch(e){m=this.domainUrl}const h=await function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;return new Promise((n,a)=>{const o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";const s=()=>{window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",r,!1))};let r;const c=setTimeout(()=>{a(new d),s()},1e3*i);r=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const i=e.source;i&&i.close(),e.data.response.error?a(p.fromPayload(e.data.response)):n(e.data.response),clearTimeout(c),window.removeEventListener("message",r,!1),setTimeout(s,2e3)},window.addEventListener("message",r,!1),window.document.body.appendChild(o),o.setAttribute("src",e)})}(n,m,u);if(a!==h.state)throw new p("state_mismatch","Invalid state");const f=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},f),{scope:c,oauthTokenScope:f.scope,audience:l})})}catch(e){throw"login_required"===e.error&&(e instanceof p&&this._isIframeMfaError(e)&&"popup"===this.options.interactiveErrorHandler||this.logout({openUrl:!1})),e}}async _getTokenUsingRefreshToken(e){var t,i;const n=await this.cacheManager.get(new fe({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||c,clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(n&&n.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new g(e.authorizationParams.audience||c,e.authorizationParams.scope)}const a=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,o="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,s=((e,t,i,n)=>{var a;if(e&&i&&n){if(t.audience!==i)return t.scope;const e=n.split(" "),o=(null===(a=t.scope)||void 0===a?void 0:a.split(" "))||[],s=o.every(t=>e.includes(t));return e.length>=o.length&&s?n:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==n?void 0:n.audience,null==n?void 0:n.scope);try{const t=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:n&&n.refresh_token,redirect_uri:a}),o&&{timeout:o}),{scopesToRequest:s});if(t.refresh_token&&(null==n?void 0:n.refresh_token)&&await this.cacheManager.updateEntry(n.refresh_token,t.refresh_token),this.options.useMrrt&&(r=null==n?void 0:n.audience,p=null==n?void 0:n.scope,l=e.authorizationParams.audience,u=e.authorizationParams.scope,!(r===l&&$e(u,p)||$e(s,t.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const i=((e,t)=>{const i=(null==e?void 0:e.split(" "))||[],n=(null==t?void 0:t.split(" "))||[];return i.filter(e=>-1==n.indexOf(e)).join(",")})(s,t.scope);throw new b(e.authorizationParams.audience||"default",i)}return Object.assign(Object.assign({},t),{scope:e.authorizationParams.scope,oauthTokenScope:t.scope,audience:e.authorizationParams.audience||c})}catch(n){if(n.message){if(n.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),n;if((n.message.includes("Missing Refresh Token")||n.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e)}throw n instanceof v&&this.mfa.setMFAAuthDetails(n.mfa_token,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.audience,n.mfa_requirements),n}var r,p,l,u}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,a=n(e,["id_token","decodedToken"]);this.userCache.set(he,{id_token:t,decodedToken:i}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||c,t=this.scope[e],i=await this.cacheManager.getIdToken(new fe({clientId:this.options.clientId,audience:e,scope:t})),n=this.userCache.get(he);return i&&i.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set(he,i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:n,cacheMode:a}=e;const o=await this.cacheManager.get(new fe({scope:t,audience:i,clientId:n}),60,this.options.useMrrt,a);if(o&&o.access_token){const{token_type:e,access_token:t,oauthTokenScope:i,expires_in:n}=o,a=await this._getIdTokenFromCache();return a&&Object.assign(Object.assign({id_token:a.id_token,token_type:e||"Bearer",access_token:t},i?{scope:i}:null),{expires_in:n})}}async _requestToken(e,t){var i,n;const{nonceIn:a,organization:o,scopesToRequest:s}=t||{},r=await le(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:s||e.scope}),this.worker),p=await this._verifyIdToken(r.id_token,a,o);if("authorization_code"===e.grant_type){const e=await this._getIdTokenFromCache();(null===(n=null===(i=null==e?void 0:e.decodedToken)||void 0===i?void 0:i.claims)||void 0===n?void 0:n.sub)&&e.decodedToken.claims.sub!==p.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove(he))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},r),{decodedToken:p,scope:e.scope,audience:e.audience||c}),r.scope?{oauthTokenScope:r.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(o||p.claims.org_id),Object.assign(Object.assign({},r),{decodedToken:p})}async loginWithCustomTokenExchange(e){return this._requestToken(Object.assign(Object.assign({},e),{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:de(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization}))}async exchangeToken(e){return this.loginWithCustomTokenExchange(e)}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,t){return this._assertDpop(this.dpop),this.dpop.setNonce(e,t)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Fe(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null===(t=null==e?void 0:e.scope)||void 0===t?void 0:t.join(" "),audience:null==e?void 0:e.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t,e.dpopNonceId),generateDpopProof:e=>this.generateDpopProof(e)})}async connectAccountWithRedirect(e){const{openUrl:t,appState:i,connection:n,scopes:a,authorization_params:o,redirectUri:s=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!n)throw new Error("connection is required");const r=k(_()),c=_(),p=await j(c),l=P(p),{connect_uri:u,connect_params:d,auth_session:m}=await this.myAccountApi.connectAccount({connection:n,scopes:a,redirect_uri:s,state:r,code_challenge:l,code_challenge_method:"S256",authorization_params:o});this.transactionManager.create({state:r,code_verifier:c,auth_session:m,redirect_uri:s,appState:i,connection:n,response_type:Ie.ConnectCode});const h=new URL(u);h.searchParams.set("ticket",d.ticket),t?await t(h.toString()):window.location.assign(h)}async _requestTokenForMfa(e,t){const{mfaToken:i}=e,a=n(e,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},a),{mfa_token:i}),t)}}async function Xo(e){const t=new Yo(e);return await t.checkSession(),t}},991(e,t){"use strict";t.byteLength=function(e){var t=r(e),i=t[0],n=t[1];return 3*(i+n)/4-n},t.toByteArray=function(e){var t,i,o=r(e),s=o[0],c=o[1],p=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,c)),l=0,u=c>0?s-4:s;for(i=0;i<u;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],p[l++]=t>>16&255,p[l++]=t>>8&255,p[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,p[l++]=255&t),1===c&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,p[l++]=t>>8&255,p[l++]=255&t),p},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],s=16383,r=0,c=n-a;r<c;r+=s)o.push(p(e,r,r+s>c?c:r+s));return 1===a?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),o.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=o[s],n[o.charCodeAt(s)]=s;function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function p(e,t,i){for(var n,a=[],o=t;o<i;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(c(n));return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},318(e,t){t.read=function(e,t,i,n,a){var o,s,r=8*a-n-1,c=(1<<r)-1,p=c>>1,l=-7,u=i?a-1:0,d=i?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-l)-1,m>>=-l,l+=r;l>0;o=256*o+e[t+u],u+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+u],u+=d,l-=8);if(0===o)o=1-p;else{if(o===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),o-=p}return(m?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,i,n,a,o){var s,r,c,p=8*o-a-1,l=(1<<p)-1,u=l>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:o-1,h=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=l?(r=0,s=l):s+u>=1?(r=(t*c-1)*Math.pow(2,a),s+=u):(r=t*Math.pow(2,u-1)*Math.pow(2,a),s=0));a>=8;e[i+m]=255&r,m+=h,r/=256,a-=8);for(s=s<<a|r,p+=a;p>0;e[i+m]=255&s,m+=h,s/=256,p-=8);e[i+m-h]|=128*f}},526(e,t,i){"use strict";var n=i(991),a=i(318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;var s=2147483647;function r(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return p(e,t,i)}function p(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|f(e,t),n=r(i),a=n.write(e,t);return a!==i&&(n=n.slice(0,a)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){var t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return m(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,i);var a=function(e){if(c.isBuffer(e)){var t=0|h(e.length),i=r(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||W(e.length)?r(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),r(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),i=r(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function m(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(e).length;default:if(a)return n?-1:N(e).length;t=(""+t).toLowerCase(),a=!0}}function v(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,i);case"utf8":case"utf-8":return T(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b(e,t,i,n,a){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),W(i=+i)&&(i=a?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(a)return-1;i=e.length-1}else if(i<0){if(!a)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:x(e,t,i,n,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):x(e,[t],i,n,a);throw new TypeError("val must be string, number or Buffer")}function x(e,t,i,n,a){var o,s=1,r=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,r/=2,c/=2,i/=2}function p(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){var l=-1;for(o=i;o<r;o++)if(p(e,o)===p(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(i+c>r&&(i=r-c),o=i;o>=0;o--){for(var u=!0,d=0;d<c;d++)if(p(e,o+d)!==p(t,d)){u=!1;break}if(u)return o}return-1}function y(e,t,i,n){i=Number(i)||0;var a=e.length-i;n?(n=Number(n))>a&&(n=a):n=a;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var r=parseInt(t.substr(2*s,2),16);if(W(r))return s;e[i+s]=r}return s}function w(e,t,i,n){return M(N(t,e.length-i),e,i,n)}function _(e,t,i,n){return M(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function k(e,t,i,n){return M(q(t),e,i,n)}function S(e,t,i,n){return M(function(e,t){for(var i,n,a,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,a=i%256,o.push(a),o.push(n);return o}(t,e.length-i),e,i,n)}function E(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function T(e,t,i){i=Math.min(e.length,i);for(var n=[],a=t;a<i;){var o,s,r,c,p=e[a],l=null,u=p>239?4:p>223?3:p>191?2:1;if(a+u<=i)switch(u){case 1:p<128&&(l=p);break;case 2:128==(192&(o=e[a+1]))&&(c=(31&p)<<6|63&o)>127&&(l=c);break;case 3:o=e[a+1],s=e[a+2],128==(192&o)&&128==(192&s)&&(c=(15&p)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[a+1],s=e[a+2],r=e[a+3],128==(192&o)&&128==(192&s)&&128==(192&r)&&(c=(15&p)<<18|(63&o)<<12|(63&s)<<6|63&r)>65535&&c<1114112&&(l=c)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return function(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=j));return i}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,i){return p(e,t,i)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,i){return function(e,t,i){return l(e),e<=0?r(e):void 0!==t?"string"==typeof i?r(e).fill(t,i):r(e).fill(t):r(e)}(e,t,i)},c.allocUnsafe=function(e){return u(e)},c.allocUnsafeSlow=function(e){return u(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,n=t.length,a=0,o=Math.min(i,n);a<o;++a)if(e[a]!==t[a]){i=e[a],n=t[a];break}return i<n?-1:n<i?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=c.allocUnsafe(t),a=0;for(i=0;i<e.length;++i){var o=e[i];if($(o,Uint8Array))a+o.length>n.length?c.from(o).copy(n,a):Uint8Array.prototype.set.call(n,o,a);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a)}a+=o.length}return n},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,i,n,a){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=i)return 0;if(n>=a)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(n>>>=0),s=(i>>>=0)-(t>>>=0),r=Math.min(o,s),p=this.slice(n,a),l=e.slice(t,i),u=0;u<r;++u)if(p[u]!==l[u]){o=p[u],s=l[u];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return b(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return b(this,e,t,i,!1)},c.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var a=this.length-t;if((void 0===i||i>a)&&(i=a),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,i);case"utf8":case"utf-8":return w(this,e,t,i);case"ascii":case"latin1":case"binary":return _(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function A(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(127&e[a]);return n}function P(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(e[a]);return n}function O(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var a="",o=t;o<i;++o)a+=H[e[o]];return a}function I(e,t,i){for(var n=e.slice(t,i),a="",o=0;o<n.length-1;o+=2)a+=String.fromCharCode(n[o]+256*n[o+1]);return a}function C(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,i,n,a,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function R(e,t,i,n,a,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(e,t,i,n,o){return t=+t,i>>>=0,o||R(e,0,i,4),a.write(e,t,i,n,23,4),i+4}function z(e,t,i,n,o){return t=+t,i>>>=0,o||R(e,0,i,8),a.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=t,a=1,o=this[e+--n];n>0&&(a*=256);)o+=this[e+--n]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||U(this,e,t,i,Math.pow(2,8*i)-1,0);var a=1,o=0;for(this[t]=255&e;++o<i&&(a*=256);)this[t+o]=e/a&255;return t+i},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||U(this,e,t,i,Math.pow(2,8*i)-1,0);var a=i-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+i},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*i-1);U(this,e,t,i,a-1,-a)}var o=0,s=1,r=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===r&&0!==this[t+o-1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*i-1);U(this,e,t,i,a-1,-a)}var o=i-1,s=1,r=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===r&&0!==this[t+o+1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,i){return L(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return L(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return z(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return z(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var a=n-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),t),a},c.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=c.isBuffer(e)?e:c.from(e,n),r=s.length;if(0===r)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=s[o%r]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(e,t){var i;t=t||1/0;for(var n=e.length,a=null,o=[],s=0;s<n;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!a){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}a=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),a=i;continue}i=65536+(a-55296<<10|i-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,i,n){for(var a=0;a<n&&!(a+i>=t.length||a>=e.length);++a)t[a+i]=e[a];return a}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}var H=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var n=16*i,a=0;a<16;++a)t[n+a]=e[i]+e[a];return t}()},942(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",a=0,o=-1,s=0,r=0;r<=e.length;++r){if(r<e.length)i=e.charCodeAt(r);else{if(47===i)break;i=47}if(47===i){if(o===r-1||1===s);else if(o!==r-1&&2===s){if(n.length<2||2!==a||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",a=0):a=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=r,s=0;continue}}else if(2===n.length||1===n.length){n="",a=0,o=r,s=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(o+1,r):n=e.slice(o+1,r),a=r-o-1;o=r,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,a=47===s.charCodeAt(0))}return n=i(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var a=arguments[i];t(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var o=e.length,s=o-a,r=1;r<i.length&&47===i.charCodeAt(r);++r);for(var c=i.length-r,p=s<c?s:c,l=-1,u=0;u<=p;++u){if(u===p){if(c>p){if(47===i.charCodeAt(r+u))return i.slice(r+u+1);if(0===u)return i.slice(r+u)}else s>p&&(47===e.charCodeAt(a+u)?l=u:0===u&&(l=0));break}var d=e.charCodeAt(a+u);if(d!==i.charCodeAt(r+u))break;47===d&&(l=u)}var m="";for(u=a+l+1;u<=o;++u)u!==o&&47!==e.charCodeAt(u)||(0===m.length?m+="..":m+="/..");return m.length>0?m+i.slice(r+l):(r+=l,47===i.charCodeAt(r)&&++r,i.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,a=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(i=e.charCodeAt(s))){if(!o){a=s;break}}else o=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,o=-1,s=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var r=i.length-1,c=-1;for(n=e.length-1;n>=0;--n){var p=e.charCodeAt(n);if(47===p){if(!s){a=n+1;break}}else-1===c&&(s=!1,c=n+1),r>=0&&(p===i.charCodeAt(r)?-1===--r&&(o=n):(r=-1,o=c))}return a===o?o=c:-1===o&&(o=e.length),e.slice(a,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){a=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(a,o)},extname:function(e){t(e);for(var i=-1,n=0,a=-1,o=!0,s=0,r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47!==c)-1===a&&(o=!1,a=r+1),46===c?-1===i?i=r:1!==s&&(s=1):-1!==i&&(s=-1);else if(!o){n=r+1;break}}return-1===i||-1===a||0===s||1===s&&i===a-1&&i===n+1?"":e.slice(i,a)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,a=e.charCodeAt(0),o=47===a;o?(i.root="/",n=1):n=0;for(var s=-1,r=0,c=-1,p=!0,l=e.length-1,u=0;l>=n;--l)if(47!==(a=e.charCodeAt(l)))-1===c&&(p=!1,c=l+1),46===a?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!p){r=l+1;break}return-1===s||-1===c||0===u||1===u&&s===c-1&&s===r+1?-1!==c&&(i.base=i.name=0===r&&o?e.slice(1,c):e.slice(r,c)):(0===r&&o?(i.name=e.slice(1,s),i.base=e.slice(1,c)):(i.name=e.slice(r,s),i.base=e.slice(r,c)),i.ext=e.slice(s,c)),r>0?i.dir=e.slice(0,r-1):o&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},930(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,i,n){var a=n&&n.stringify||t;if("object"==typeof e&&null!==e){var o=i.length+1;if(1===o)return e;var s=new Array(o);s[0]=a(e);for(var r=1;r<o;r++)s[r]=a(i[r]);return s.join(" ")}if("string"!=typeof e)return e;var c=i.length;if(0===c)return e;for(var p="",l=0,u=-1,d=e&&e.length||0,m=0;m<d;){if(37===e.charCodeAt(m)&&m+1<d){switch(u=u>-1?u:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Number(i[l]),u=m+2,m++;break;case 105:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Math.floor(Number(i[l])),u=m+2,m++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===i[l])break;u<m&&(p+=e.slice(u,m));var h=typeof i[l];if("string"===h){p+="'"+i[l]+"'",u=m+2,m++;break}if("function"===h){p+=i[l].name||"<anonymous>",u=m+2,m++;break}p+=a(i[l]),u=m+2,m++;break;case 115:if(l>=c)break;u<m&&(p+=e.slice(u,m)),p+=String(i[l]),u=m+2,m++;break;case 37:u<m&&(p+=e.slice(u,m)),p+="%",u=m+2,m++,l--}++l}++m}return-1===u?e:(u<d&&(p+=e.slice(u)),p)}},122(){},360(){},826(){},713(e,t,i){"use strict";const n=i(930);e.exports=u;const a=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:f,errWithCause:f};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}const r=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),p={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(e,t){const i={logger:t,parent:e[c]};t[c]=i}function u(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const i=e.browser.write||a;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter(function(e){return"!stdSerializers.err"!==e}):!0===e&&Object.keys(t)}(e.browser.serialize,n);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const f=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(f);"function"==typeof i&&g.forEach(function(e){i[e]=i}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",y=Object.create(i);y.log||(y.log=x),function(e,t,i){const n={};t.forEach(e=>{n[e]=i[e]?i[e]:a[e]||a[p[e]||"log"]||x}),e[r]=n}(y,g,i),l({},y),Object.defineProperty(y,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(y,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,w,y,"error"),d(this,w,y,"fatal"),d(this,w,y,"warn"),d(this,w,y,"info"),d(this,w,y,"debug"),d(this,w,y,"trace"),f.forEach(e=>{d(this,w,y,e)})}});const w={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:v(e)};return y.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},u.levels.values,t),labels:Object.assign({},u.levels.labels,function(e){const t={};return Object.keys(e).forEach(function(i){t[e[i]]=i}),t}(t))}}(e),y.level=b,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=x,y.serializers=n,y._serialize=o,y._stdErrSerialize=c,y.child=function(i,a){if(!i)throw new Error("missing bindings for child Pino");a=a||{},o&&i.serializers&&(a.serializers=i.serializers);const s=a.serializers;if(o&&s){var r=Object.assign({},n,s),c=!0===e.browser.serialize?Object.keys(r):o;delete i.serializers,m([i],c,r,this._stdErrSerialize)}function p(e){this._childLevel=1+(0|e._childLevel),this.bindings=i,r&&(this.serializers=r,this._serialize=c),t&&(this._logEvent=h([].concat(e._logEvent.bindings,i)))}p.prototype=this;const u=new p(this);return l(this,u),u.level=this.level,u},t&&(y._logEvent=h()),y}function d(e,t,i,o){if(Object.defineProperty(e,o,{value:s(e.level,i)>s(o,i)?x:i[r][o],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[o]===x)return;e[o]=function(e,t,i,o){return c=e[r][o],function(){const r=t.timestamp(),p=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===a?a:this;for(var u=0;u<p.length;u++)p[u]=arguments[u];if(t.serialize&&!t.asObject&&m(p,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?c.call(l,function(e,t,i,a,o={}){const{level:s=()=>e.levels.values[t],log:r=e=>e}=o;e._serialize&&m(i,e._serialize,e.serializers,e._stdErrSerialize);const c=i.slice();let p=c[0];const l={};a&&(l.time=a),l.level=s(t,e.levels.values[t]);let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==p&&"object"==typeof p){for(;u--&&"object"==typeof c[0];)Object.assign(l,c.shift());p=c.length?n(c.shift(),c):void 0}else"string"==typeof p&&(p=n(c.shift(),c));return void 0!==p&&(l.msg=p),r(l)}(this,o,p,r,t.formatters)):c.apply(l,p),t.transmit){const n=t.transmit.level||e._level,a=i.levels.values[n],c=i.levels.values[o];if(c<a)return;!function(e,t,i){const n=t.send,a=t.ts,o=t.methodLevel,s=t.methodValue,r=t.val,c=e._logEvent.bindings;m(i,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=i.filter(function(e){return-1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=s,n(o,e._logEvent,r),e._logEvent=h(c)}(this,{ts:r,methodLevel:o,methodValue:c,transmitLevel:n,transmitValue:i.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,i)},p)}};var c}(e,t,i,o);const p=function(e){const t=[];e.bindings&&t.push(e.bindings);let i=e[c];for(;i.parent;)i=i.parent,i.logger.bindings&&t.push(i.logger.bindings);return t.reverse()}(e);0!==p.length&&(e[o]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(p,e[o]))}function m(e,t,i,n){for(const a in e)if(n&&e[a]instanceof Error)e[a]=u.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const n in e[a])t&&t.indexOf(n)>-1&&n in i&&(e[a][n]=i[n](e[a][n]))}function h(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const i in e)void 0===t[i]&&(t[i]=e[i]);return t}function v(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?y:w}function g(){return{}}function b(e){return e}function x(){}function y(){return!1}function w(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=o,u.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:w,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},797(e,t,i){"use strict";var n,a=i(526).hp,o=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,p=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[c(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of c(t))l.call(e,a)||a===i||s(e,a,{get:()=>t[a],enumerable:!(n=r(t,a))||n.enumerable});return e},m=u({"../../node_modules/mime-db/db.json"(e,t){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}}}),h=u({"../../node_modules/mime-db/index.js"(e,t){t.exports=m()}}),f=u({"../../node_modules/mime-types/index.js"(e){var t,n,a,o=h(),s=i(942).extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=r.exec(e),i=t&&o[t[1].toLowerCase()];return i&&i.charset?i.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=p,e.charsets={lookup:p},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var i=-1===t.indexOf("/")?e.lookup(t):t;if(!i)return!1;if(-1===i.indexOf("charset")){var n=e.charset(i);n&&(i+="; charset="+n.toLowerCase())}return i},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var i=r.exec(t),n=i&&e.extensions[i[1].toLowerCase()];return!(!n||!n.length)&&n[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var i=s("x."+t).toLowerCase().substr(1);return i&&e.types[i]||!1},e.types=Object.create(null),t=e.extensions,n=e.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach(function(e){var i=o[e],s=i.extensions;if(s&&s.length){t[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(n[c]){var p=a.indexOf(o[n[c]].source),l=a.indexOf(i.source);if("application/octet-stream"!==n[c]&&(p>l||p===l&&"application/"===n[c].substr(0,12)))continue}n[c]=e}}})}}),v={};((e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})})(v,{AbstractJob:()=>R,AnnotationInclusionMode:()=>re,AnnotationType:()=>ae,AreaType:()=>le,ArtifactType:()=>ve,AssetInclusionMode:()=>se,AssetStatus:()=>ne,AssetUrlType:()=>_e,AutoAnnotateStatus:()=>ie,AutoAnnotateTask:()=>ce,ChangeType:()=>be,ContourType:()=>P,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>ee,DataEndpoint:()=>Pe,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>Ae,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>T,InferenceType:()=>j,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>he,ModelFormat:()=>ye,ModelPrecisionType:()=>we,ModelStatus:()=>me,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>A,PopComponentType:()=>E,PredictionVersion:()=>_,Semaphore:()=>H,SessionStatus:()=>V,Stream:()=>b,TranscodeMode:()=>pe,TransientPopId:()=>B,UploadJob:()=>D,UserReview:()=>oe,VideoMode:()=>S,VlmAbilityStatus:()=>Se,WebrtcBase:()=>C,WebrtcWhep:()=>Oe,WebrtcWhip:()=>U,WorkerEndpoint:()=>X,WorkflowPhase:()=>xe,default:()=>Ce,getBaseUrl:()=>te,readableStreamFromString:()=>w}),e.exports=(n=v,d(s({},"__esModule",{value:!0}),n));var g=(e=>(e.Idle="Idle",e.Busy="Busy",e.Authenticating="Authenticating",e.FetchConfig="FetchConfig",e.Error="Error",e.NotAvailable="NotAvailable",e))(g||{}),b=class e{constructor(e,t){this.iterator=e,this.controller=t}static iterFromReadableStream(e,t,i){let n=!1;return async function*(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let a=!1;try{for await(const t of async function*(){const t=new y,i=function(e){if(e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}(await e);for await(let e of i)for(const i of t.decode(e))yield i;for(const e of t.flush())yield e}())if(!a&&t){const e=JSON.parse(t),n=e.event;void 0!==n?await i(n):yield e}a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||t.abort()}}()}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],i=[],n=this.iterator(),a=e=>({next:()=>{if(0===e.length){const e=n.next();t.push(e),i.push(e)}return e.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(i),this.controller)]}},x=class e{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let i=this.decodeText(t);if(this.trailingCR&&(i="\r"+i,this.trailingCR=!1),i.endsWith("\r")&&(this.trailingCR=!0,i=i.slice(0,-1)),!i)return[];const n=e.NEWLINE_CHARS.has(i[i.length-1]||"");let a=i.split(e.NEWLINE_REGEXP);return 1!==a.length||n?(this.buffer.length>0&&(a=[this.buffer.join("")+a[0],...a.slice(1)],this.buffer=[]),n||(this.buffer=[a.pop()||""]),a):(this.buffer.push(a[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==a){if(e instanceof a)return e.toString();if(e instanceof Uint8Array)return a.from(e).toString();throw new Error(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new Error(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new Error("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}};x.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","…","\u2028","\u2029"]),x.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var y=x;function w(e){return new ReadableStream({start(t){t.enqueue(a.from(e)),t.close()}})}var _=(e=>(e[e.V1=1]="V1",e[e.V2=2]="V2",e))(_||{}),k=2,S=(e=>(e.STREAM="stream",e.BUFFER="buffer",e))(S||{}),E=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(E||{}),T=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(T||{}),j=(e=>(e.IMAGE_CLASSIFICATION="image_classification",e.OBJECT_DETECTION="object_detection",e.KEY_POINTS="key_points",e.OCR="ocr",e.MESH="mesh",e.FEATURE_VECTOR="feature_vector",e.SEMANTIC_SEGMENTATION="semantic_segmentation",e.SEGMENTATION="segmentation",e))(j||{}),A=(e=>(e.RANDOM_WALK="random_walk",e.CONSTANT_VELOCITY="constant_velocity",e.CONSTANT_ACCELERATION="constant_acceleration",e))(A||{}),P=(e=>(e.ALL_PIXELS="all_pixels",e.POLYGON="polygon",e.CONVEX_HULL="convex_hull",e.HOUGH_CIRCLES="hough_circles",e.CIRCLE="circle",e.TRIANGLE="triangle",e.RECTANGLE="rectangle",e))(P||{}),O=i(182),I=((e,t,i)=>(i=null!=e?o(p(e)):{},d(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(942)),C=class e{constructor(e,t,i,n,a,o){this._getSession=e,this._client=t,this._requestLogger=o,this._ingressId=i,this._urlPath=`${n}/${this._ingressId}`,this._is_pipeline_direct=a,this._pc=null,this._eTag="",this._location=null,this._queuedCandidates=[],this._offerData=null}async close(){const e=this._pc;if(this._pc=null,e)return e.close()}ingressId(){return this._ingressId}gresUrl(e,t=null){let i,n;if(this._is_pipeline_direct){if(!e.pipelineId)throw new Error("cannot connect with is_pipeline_direct=true but !session.pipelineId");i=I.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=I.default.join(i,t)),n=e.baseUrl?.endsWith("/")?e.baseUrl:e.baseUrl+"/",new URL(i,n)}async onLocalOffer(t){if(!this._pc)throw new Error("onLocalOffer no peer connection");if(!t.sdp)throw new Error("onLocalOffer no sdp");this._offerData=e.parseOffer(t.sdp),await this._pc.setLocalDescription(t);const i=await this._getSession(),n=this.gresUrl(i),a={...i.authenticationHeaders(),"Content-Type":"application/sdp"},o=await this._client.fetch(n,{headers:a,method:"POST",body:t.sdp});return o.status>=300?Promise.reject(`unknown status code for POST '${n}': ${o.status} (${o.statusText})`):(this._eTag=o.headers.get("ETag")??"",this._location=o.headers.get("Location"),await this.onRemoteAnswer(new RTCSessionDescription({type:"answer",sdp:await o.text()})))}async sendLocalCandidates(t){if(!this._offerData)throw new Error("sendLocalCandidates no offerData");const i=await this._getSession(),n=this.gresUrl(i,this._location),a={...i.authenticationHeaders(),"Content-Type":"application/trickle-ice-sdpfrag","If-Match":this._eTag},o=await this._client.fetch(n,{headers:a,method:"PATCH",body:e.generateSdpFragment(this._offerData,t)});return o.status>=300?Promise.reject(`unknown status code for PATCH '${n}': ${o.status} (${o.statusText})`):this}async onLocalCandidate(e){return null!==e.candidate&&(""===this._eTag?this._queuedCandidates.push(e.candidate):await this.sendLocalCandidates([e.candidate])),this}static linkToIceServers(e){return(null!==e?e.split(", ").map(e=>{let t=e.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);return t||(t=e.match(/^(.+?); rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i)),t?{urls:[t[1]],username:U.unquoteCredential(t[3]),credential:U.unquoteCredential(t[4])}:null}):[]).filter(function(e){return null!=e})}static editAnswer(e,t,i,n,a,o){const s=e.split("m=");for(let e=0;e<s.length;e++){const r=s[e];r&&r.startsWith("video")?s[e]=U.setVideoBitrate(U.setCodec(r,t),n):r&&r.startsWith("audio")&&(s[e]=U.setAudioBitrate(U.setCodec(r,i),a,o))}return s.join("m=")}static setCodec(e,t){const i=e.split("\r\n"),n=[],a=[];for(const e of i)e.startsWith("a=rtpmap:")?t&&e.toLowerCase().includes(t)&&(a.push(e.slice(9).split(" ")[0]),n.push(e)):n.push(e);const o=[];for(const e of n)e.startsWith("a=fmtp:")?a.includes(e.slice(7).split(" ")[0])&&o.push(e):e.startsWith("a=rtcp-fb:")?a.includes(e.slice(10).split(" ")[0])&&o.push(e):o.push(e);return o.join("\r\n")}static setVideoBitrate(e,t){let i=e.split("\r\n");for(let e=0;e<i.length;e++){const n=i[e];if(n&&n.startsWith("c=")){i=[...i.slice(0,e+1),"b=TIAS:"+(1024*t).toString(),...i.slice(e+1)];break}}return i.join("\r\n")}static setAudioBitrate(e,t,i){let n="",a=e.split("\r\n");for(let e=0;e<a.length;e++){const t=a[e];if(t&&t.startsWith("a=rtpmap:")&&t.toLowerCase().includes("opus/")){n=t.slice(9).split(" ")[0]||"";break}}if(""===n)return e;for(let e=0;e<a.length;e++){const o=a[e];o&&o.startsWith("a=fmtp:"+n+" ")&&(a[e]=i?"a=fmtp:"+n+" minptime=10;useinbandfec=1;maxaveragebitrate="+(1024*(t??0)).toString():"a=fmtp:"+n+" maxplaybackrate=48000;stereo=1;sprop-stereo=1;maxaveragebitrate"+(1024*(t??0)).toString())}return a.join("\r\n")}static parseOffer(e){let t=[],i="",n="";for(const a of e.split("\r\n"))a.startsWith("m=")?t.push(a.slice(2)):""===i&&a.startsWith("a=ice-ufrag:")?i=a.slice(12):""===n&&a.startsWith("a=ice-pwd:")&&(n=a.slice(10));return{iceUfrag:i,icePwd:n,medias:t}}static generateSdpFragment(e,t){const i=new Map;for(const e of t)if(null!==e.sdpMLineIndex){const t=e.sdpMLineIndex;let n=i.get(t);void 0===n&&(n=[],i.set(t,n)),n.push(e)}let n="a=ice-ufrag:"+e.iceUfrag+"\r\na=ice-pwd:"+e.icePwd+"\r\n",a=0;for(const t of e.medias){let e=i.get(a);if(void 0!==e){n+="m="+t+"\r\na=mid:"+a+"\r\n";for(const t of e)n+="a="+t.candidate+"\r\n"}a++}return n}static unquoteCredential(e){return e?JSON.parse(`"${e}"`):""}},U=class extends C{constructor(e,t,i,n,a){super(t,i,(0,O.v4)().toString(),"liveIngress/whip",n,a),this._stream=e}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):await this.onIceServers(i)}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(!this._stream)throw new Error("onIceServers no stream");const t=this._stream,i=new RTCPeerConnection({iceServers:C.linkToIceServers(e.headers.get("Link"))});return this._pc=i,i.onicecandidate=e=>this.onLocalCandidate(e),new Promise(async(e,n)=>{i.oniceconnectionstatechange=()=>{switch(i.iceConnectionState){case"failed":case"disconnected":n(`peer connection: ${i.iceConnectionState}`);break;case"connected":e(this)}},t.getTracks().forEach(e=>{this._requestLogger.debug("onIceServers our stream has track: %s",e),i.addTrack(e,t)}),t.addEventListener("addtrack",e=>{this._requestLogger.debug("onIceServers got lazy track: ",e.track),i.addTrack(e.track,t)}),await this.onLocalOffer(await i.createOffer())})}async close(){const e=this._stream;return this._stream=null,e&&e.getTracks().forEach(e=>{e.stop()}),super.close()}},R=class{constructor(e,t,i,n,a=k){this._responseStream=null,this._controller=new AbortController,this._getSession=t,this._params=e,this._client=i,this._requestLogger=n,this._version=a}[Symbol.asyncIterator](){if(!this._responseStream)throw Error("logical bug");return b.iterFromReadableStream(this._responseStream,this._controller,async e=>await this.onEvent(e))}async startJob(){return Promise.reject("abstract class")}async onEvent(e){return"error"==e.type?Promise.reject(`Error event for source ${e.source_id}: ${e.message}`):Promise.resolve()}start(e,t){return this._responseStream=new Promise(async(i,n)=>{try{let e=1;for(;;)try{const a=await this.startJob();if(401==a.status){if(t(a.status),!e--){n(`response ${a.status}: ${a.statusText}`);break}this._requestLogger.info("received 401 response, attempt to reauthorize once")}else{if(404!=a.status){if(a.ok){if(a.body){i(a.body);break}{const e=await a.text();if(e){i(w(e));break}n("response body is empty");break}}n(`upload error ${a.status}: ${await a.text()}`);break}if(t(a.status),!e--){n(`response ${a.status}: ${a.statusText}`);break}this._requestLogger.info("received 404 response, attempt to restart pop")}}catch(i){if(!e--){t(500),n(i);break}this._requestLogger.info("unknown, attempt to restart pop (as if we received 404)",i),t(404)}}catch(e){n(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}};R.n=0;var L,z,D=class extends R{get[Symbol.toStringTag](){return"uploadJob"}constructor(e,t,i,n,a,o,s,r){super(a,o,s,r),this._uploadStream=e,this._mimeType=t,this._size=i,this._videoMode=n,this._needsFullDuplex=!s.isFullDuplex()&&t.startsWith("video/")&&"stream"==n}async onEvent(e){if("prepared"==e.type){if(!e.source_id)return Promise.reject("did not get a prepared sourceId to simulate full duplex");const t=await this._getSession();if(!t.baseUrl)return Promise.reject("session.baseUrl must not ne null");let i;const n=new URLSearchParams({mode:"queue",processing:"async",sourceId:e.source_id});if(void 0!==this._videoMode&&n.set("videoMode",this._videoMode),void 0!==this._version&&n.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))n.set(e,t);const a=`${t.baseUrl.replace(/\/+$/,"")}/pipelines/${t.pipelineId}/source?${n.toString()}`;if(this._params.componentParams||this._params.roi){const e=new FormData;if(this._params.componentParams){const t=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});e.append("params",t)}if(this._params.roi){const t=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});e.append("roi",t)}if(this._params.fps){const t=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});e.append("fps",t)}const n=await new Response(this._uploadStream).blob();e.append("file",n);const o={...t.authenticationHeaders(),Accept:"application/jsonl"};i=this._client.fetch(a,{headers:o,method:"POST",body:e,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const e={...t.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(e["Content-Length"]=`${this._size}`),i=this._client.fetch(a,{headers:e,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}i.then(async e=>{204!=e.status&&this._requestLogger.debug(`unexpected status ${e.status} (${await e.text()}) for POST ${a}`)}).catch(e=>{this._requestLogger.debug(`error ${e} for POST ${a}`)})}return Promise.resolve()}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not be null");let t;if(this._needsFullDuplex){const i=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/prepareSource?timeout=10s`,n={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(i,{headers:n,method:"POST",signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i=new URLSearchParams({mode:"queue",processing:"sync"});if(void 0!==this._videoMode&&i.set("videoMode",this._videoMode),void 0!==this._version&&i.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))i.set(e,t);const n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?${i.toString()}`;if(this._params.componentParams||this._params.roi){const i=new FormData;if(this._params.componentParams){const e=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});i.append("params",e)}if(this._params.roi){const e=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});i.append("roi",e)}if(this._params.fps){const e=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});i.append("fps",e)}const a=await new Response(this._uploadStream).blob();i.append("file",a);const o={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(n,{headers:o,method:"POST",body:i,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(i["Content-Length"]=`${this._size}`),t=await this._client.fetch(n,{headers:i,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half"})}}return t}},N=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._location=e}get[Symbol.toStringTag](){return"loadFromJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"URL",url:this._location,params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(n,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},q=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._assetUuid=e}get[Symbol.toStringTag](){return"loadFromAssetUuidJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"ASSET_UUID",assetUuid:this._assetUuid,params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(n,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},M=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._mediaStream=e}get[Symbol.toStringTag](){return"loadLiveIngressJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t=new U(this._mediaStream,async()=>e,this._client,!0,this._requestLogger);t.start().then(e=>{this._requestLogger.debug("direct whip for ingressId=%s successful",t.ingressId())}).catch(e=>{this._controller.abort(e)});const i={sourceType:"WHIP",whipIngressId:t.ingressId(),params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(i,this._params.motionDetect);const n={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=preempt&processing=sync`;return await this._client.fetch(a,{headers:n,method:"PATCH",body:JSON.stringify(i),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}};if("document"in globalThis&&"implementation"in globalThis.document)L=async(e,t)=>{throw new DOMException("resolving a path to a file is not supported in browser")};else{let Ue=function(e){return new ReadableStream({async pull(t){const{value:i,done:n}=await e.next();n?t.close():t.enqueue(new Uint8Array(i))}})};async function*Re(e){for await(const t of e)yield t}L=async(e,t)=>{const n=f(),a=i(122),o=Re((await a.open(e.path,"r")).createReadStream());return{stream:Ue(o),mimeType:e.mimeType?e.mimeType:n.lookup(e.path)||"image/*"}}}function $(e,t){const i=e instanceof Request?e.url:e;return`${e instanceof Request?e.method:t?.method||(void 0!==t?.body?"POST":"GET")} ${i}`}if("document"in globalThis&&"implementation"in globalThis.document){class Le{constructor(e){this._logger=e}async fetch(e,t){const i=$(e,t);this._logger.debug(`Browser fetch() BEFORE ${i}`);const n=await fetch(e,t);return this._logger.debug(`AFTER ${i} -> ${n.status}`),n}async close(){}isFullDuplex(){return!1}}z=async e=>new Le(e)}else{class ze{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=$(e,t);this._logger.debug(`Node fetch() BEFORE ${i}`);const n=await fetch(e,t);return this._logger.debug(`AFTER ${i} -> ${n.status}`),n}async close(){return this._agent.close()}isFullDuplex(){return!1}}z=async e=>{const t=new(i(360).Agent)({keepAliveTimeout:1e4,connections:5,pipelining:0});return e.debug("Using node fetch with undici agent as http client"),new ze(t,e)}}var W,H=class{constructor(e){this.promiseResolverQueue=[],this.permits=e}getPermits(){return this.permits}async wait(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(e=>this.promiseResolverQueue.push(e))}async acquire(){return this.wait()}async waitFor(e){if(this.permits>0)return this.permits-=1,Promise.resolve(!0);let t=e=>{};const i=new Promise(e=>{t=e});return this.promiseResolverQueue.push(t),setTimeout(()=>{const e=this.promiseResolverQueue.indexOf(t);-1!==e?this.promiseResolverQueue.splice(e,1):console.warn("Semaphore.waitFor couldn't find its promise resolver in the queue"),t(!1)},e),i}tryAcquire(){return this.permits>0&&(this.permits-=1,!0)}drainPermits(){if(this.permits>0){const e=this.permits;return this.permits=0,e}return 0}signal(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Semaphore.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}release(){this.signal()}async execute(e){await this.wait();try{return await e()}finally{this.signal()}}},K=i(713),J=i(262);W="document"in globalThis&&"implementation"in globalThis.document?async(e,t)=>{if(null==t.eyepopUrl)return Promise.reject("options.eyepopUrl cannot be null");const i={clientId:e.clientId,domain:e.domain,authorizationParams:{scope:e.scope,audience:e.audience}},n=await(0,J.createAuth0Client)(i);await n.isAuthenticated()||await n.loginWithPopup();const a=await n.getTokenSilently();if(!a)return Promise.reject("auth0 login failed");let o;const s=t;return o=void 0!==s.popId?{eyepopUrl:t.eyepopUrl,accessToken:a,validUntil:Date.now()+36e5,popId:s.popId,baseUrl:void 0,pipelineId:void 0,authenticationHeaders:()=>({Authorization:`Bearer ${a}`})}:{eyepopUrl:t.eyepopUrl,accessToken:a,validUntil:Date.now()+36e5},o}:(e,t)=>Promise.reject("auth0 login not supported server-side");var F=class{constructor(e){let t;this._options=e,this._token=null,this._expire_token_time=null,this._client=null,this._statusRetryHandlers=new Map,this._statusRetryHandlers.set(401,this.statusHandler401),this._limit=new H(this._options.jobQueueLength??1024),this._state="Idle",this._message=null,this._stateChangeHandler=null,t=e.logger?e.logger:(0,K.pino)(),this._logger=t.child({module:"eyepop"}),this._requestLogger=this._logger.child({module:"requests"})}setStatusRetryHandlers(e=void 0){this._statusRetryHandlers=new Map(e),this._statusRetryHandlers.set(401,this.statusHandler401)}eyepopUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,""):"https://compute.eyepop.ai"}eyepopWebApiUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,"").replace(/compute\./,"web-api."):"https://api.eyepop.ai"}pendingJobs(){return(this._options.jobQueueLength??1024)-this._limit.getPermits()}state(){return this._state}lastMessage(){return this._message}onStateChanged(e){return this._stateChangeHandler=e,this}updateState(e=void 0,t=void 0){const i=this._state;null==e&&(e=this._limit.getPermits()==this._options.jobQueueLength?"Idle":"Busy"),this._state=e,this._message=t||null,this._stateChangeHandler&&this._stateChangeHandler(i,this._state)}async connect(){if(this._client)return this._logger.warn("endpoint already connected"),this;if(!this._options.eyepopUrl)return Promise.reject("option eyepopUrl or environment variable EYEPOP_URL is required");if(void 0===this._options.auth)return Promise.reject("cannot connect without defined auth option");if(void 0!==this._options.auth.session)this._token=this._options.auth.session.accessToken,this._expire_token_time=this._options.auth.session.validUntil/1e3;else if(void 0!==this._options.auth.oAuth2);else if(void 0!==this._options.auth.apiKey);else if(void 0===this._options.auth.isLocal)return Promise.reject("option apiKey or environment variable EYEPOP_API_KEY is required");return void 0!==this._options.platformSupport?.createHttpClient?this._client=await this._options.platformSupport.createHttpClient(this._requestLogger):this._client=await z(this._requestLogger),await this.reconnect()}async disconnect(e=!0){if(e&&this._limit)for(let e=0;e<this._options.jobQueueLength;e++)await this._limit.acquire();this._limit=new H(this._options.jobQueueLength??1024),this._client&&(await this._client.close(),this._client=null)}async session(){return await this.currentAccessToken(),null==this._token||null==this._expire_token_time?Promise.reject("endpoint not connected"):{eyepopUrl:this._options.eyepopUrl,accessToken:this._token,validUntil:1e3*this._expire_token_time}}statusHandler401(e){this._token=null,this._expire_token_time=null}async fetchWithRetry(e,t=1){for(;;)try{const i=await e();if(i.ok)return i;{const e=this._statusRetryHandlers.get(i.status);if(null==e)return i;if(e(i.status),!t--)return i;this._requestLogger.info("received %d response, retry",i.status)}}catch(e){const i=this._statusRetryHandlers.get(404);if(null==i)return Promise.reject(`error ${e}`);if(i(e),!t--)return Promise.reject(`error ${e}`);this._requestLogger.info("error %s, retry",e)}}async reconnect(){throw new Error("reconnect() not implemented")}async authorizationHeader(){return void 0!==this._options.auth.isLocal?"Implicit":`Bearer ${await this.currentAccessToken()}`}async currentAccessToken(){const e=Date.now()/1e3;if(!this._token||this._expire_token_time<e){this.updateState("Authenticating");try{if(!this._client)return Promise.reject("endpoint not connected");if(void 0!==this._options.auth.isLocal)this._token="implicit",this._expire_token_time=Number.MAX_VALUE;else{if(void 0!==this._options.auth.session)return Promise.reject("temporary access token expired");if(void 0!==this._options.auth.oAuth2&&this._options.eyepopUrl){const e=await W(this._options.auth.oAuth2,this._options);this._token=e.accessToken,this._expire_token_time=e.validUntil/1e3}else{if(void 0===this._options.auth.apiKey||!this._options.eyepopUrl)return Promise.reject("no valid auth option");{const t={Authorization:`Bearer ${this._options.auth.apiKey}`},i=`${this.eyepopUrl()}/v1/auth/authenticate`,n=await this._client.fetch(i,{method:"POST",headers:t});if(200!=n.status){const e=await n.text();return Promise.reject(`Unexpected status ${n.status}: ${e}`)}const a=await n.json();this._token=a.access_token,this._expire_token_time=e+a.expires_in-60}}}}finally{this.updateState()}}return this._logger.debug("using access token, valid for at least %d seconds",this._expire_token_time-e),this._token}},B=(e=>(e.Transient="transient",e))(B||{}),V=(e=>(e.UNKNOWN="unknown",e.PENDING="pending",e.RUNNING="running",e.STOPPED="stopped",e.FAILED="failed",e.ERROR="error",e.PIPELINE_CREATING="pipeline_creating",e.PIPELINE_OK="pipeline_ok",e.PIPELINE_CHECKING="pipeline_checking",e.PIPELINE_ERROR="pipeline_error",e))(V||{}),G=e=>new Promise(t=>setTimeout(t,e)),Z=class e extends F{constructor(e){super(e),this.setStatusRetryHandlers(new Map([[404,e=>this.statusHandler404(e)]])),this._baseUrl=null,this._pipelineId=null,this._popName=null,this._pipeline=null}options(){return this._options}async disconnect(e=!0){if("transient"==this.options().popId&&this._pipelineId){const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await(this._client?.fetch(e,{method:"DELETE",headers:t}));if(204!=i?.status){const e=await(i?.text());this._logger.info(`stopping pipeline failed, status ${i?.status}: ${e}`)}}return super.disconnect(e)}statusHandler404(e){this._pipelineId=null,this._baseUrl=null}async session(){const e=await super.session();return null!=this._baseUrl&&null!=this._pipelineId||(await this.reconnect(),null!=this._baseUrl&&null!=this._pipelineId)?{eyepopUrl:e.eyepopUrl,accessToken:e.accessToken,validUntil:e.validUntil,popId:this.options().popId,baseUrl:this._baseUrl,pipelineId:this._pipelineId,authenticationHeaders:()=>this._authenticationHeaders(e)}:Promise.reject("endpoint not connected")}popName(){return this._popName}pop(){return this._pipeline&&this._pipeline.pop||null}async changePop(e){const t=this._client;if(!this._baseUrl||!t)return Promise.reject("endpoint not connected, use connect()");let i=await this.fetchWithRetry(async()=>{const i=await this.session();let n={"Content-Type":"application/json",...this._authenticationHeaders(i)};const a=`${i.baseUrl}/pipelines/${i.pipelineId}/pop`;return await t.fetch(a,{method:"PATCH",body:JSON.stringify(e),headers:n})});if(204!=i.status){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}this._pipeline?this._pipeline.pop=e:this._pipeline={id:this._pipelineId||"unknown",state:"idle",startTime:(new Date).toString(),pop:e}}_authenticationHeaders(e){return void 0!==this._options.auth.isLocal?{}:{Authorization:`Bearer ${e.accessToken}`}}popId(){return this.options().popId||null}async process(e,t){return void 0!==e.source?await this.processV2(e):await this.processV1(e,t)}async processV1(e,t){return void 0!==e.file?this.uploadFile(e,{componentParams:t}):void 0!==e.stream?this.uploadStream(e,{componentParams:t}):void 0!==e.path?this.uploadPath(e,{componentParams:t}):void 0!==e.url?this.loadFrom(e,{componentParams:t}):void 0!==e.assetUuid?this.loadFromAssetUuid(e,{componentParams:t}):void 0!==e.mediaStream?this.loadMediaStream(e,{componentParams:t}):Promise.reject("unknown source type")}async processV2(e){return void 0!==e.source.file?this.uploadFile(e.source,e):void 0!==e.source.stream?this.uploadStream(e.source,e):void 0!==e.source.path?this.uploadPath(e.source,e):void 0!==e.source.url?this.loadFrom(e.source,e):void 0!==e.source.assetUuid?this.loadFromAssetUuid(e.source,e):void 0!==e.source.mediaStream?this.loadMediaStream(e.source,e):Promise.reject("unknown source type")}async uploadFile(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.file,e.file.type,e.file.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.stream,e.mimeType,e.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadPath(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{let i;this.updateState(),i=this._options.platformSupport?.resolvePath?await this._options.platformSupport.resolvePath(e,this._logger):await L(e,this._logger);const n=new D(i.stream,i.mimeType,i.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return n.start(()=>{this.jobDone(n)},e=>{this.jobStatus(n,e)})}catch(e){throw this._limit.release(),e}}async loadFrom(e,t){if(e.url.startsWith("file://"))return await this.uploadPath({path:e.url.substring(7)},t);if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new N(e.url,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadFromAssetUuid(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new q(e.assetUuid,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadMediaStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new M(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.startComputeSession(),this._pipelineId=await this.startTransientPipeline()):await this.startWebApiSessionWithPopId(),this.updateState(),Promise.resolve(this)}async startWebApiSessionWithPopId(){if(!this._client)throw new Error("endpoint not initialized");const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=false`,t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let i=await this._client.fetch(e,{headers:t});if(401==i.status){this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",e),this.statusHandler401(i.status);const t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig"),i=await this._client.fetch(e,{headers:t})}if(200!=i.status){const e=await i.text();throw 429==i.status?this.updateState("NotAvailable",e):this.updateState("Error",e),new Error(`Unexpected status ${i.status}: ${e}`)}let n=await i.json();if(!n.base_url&&this.options().autoStart){const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=true`;this._requestLogger.debug("pop was not running, trying to autostart with: %s",e);const t={Authorization:await this.authorizationHeader()};if(i=await this._client.fetch(e,{headers:t}),200!=i.status){this.updateState("Error");const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}n=await i.json()}const a=new URL(n.base_url,this.eyepopUrl());if(this._baseUrl=a.toString(),this._baseUrl){if(this._baseUrl=this._baseUrl.replace(/\/+$/,""),this._pipelineId=n.pipeline_id,this._popName=n.name,!this._pipelineId||!this._baseUrl)throw new Error("Pop not started");const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await this._client.fetch(e,{method:"GET",headers:t});if(i.status>200){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}if(this._pipeline=await i.json(),this.options().stopJobs){const e={sourceType:"NONE"},t={Authorization:await this.authorizationHeader(),"Content-Type":"application/json"},i=`${this._baseUrl}/pipelines/${this._pipeline.id}/source?mode=preempt&processing=sync`;let n=await this._client.fetch(i,{method:"PATCH",headers:t,body:JSON.stringify(e)});if(n.status>=300){const e=await n.text();throw new Error(`Unexpected status ${n.status}: ${e}`)}}}}async startComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t=null;const i=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",i);const n={Authorization:await this.authorizationHeader()};let a,o=await this._client.fetch(i,{headers:n});if(404==o.status)a=[];else{if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}a=await o.json()}if(console.log(a),a.length>0){this._logger.debug(`User has ${a.length} sessions, inspecting for active session`);for(let i of a)if(!e.SESSION_DEAD.has(i.session_status)){t=i,this._logger.debug(`Use active session ${i.session_uuid} with pipeline ${i.pipeline_uuid}`);break}}if(!t){if(this._requestLogger.debug("creating a new session at: %s",i),o=await this._client.fetch(`${i}?wait=true`,{headers:n,method:"POST"}),200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} creating a compute session: ${e}`)}if(a=await o.json(),0==a.length)throw new Error("Unexpected, no compute session after attempt to create one");t=a[0]||null}if(!t)throw new Error("unexpected undefined session");let s=!1;const r=Date.now()+e.WAIT_FOR_IS_READY;for(;!s;){const i=`${t.session_endpoint}/health`;if(o=await this._client.fetch(i,{headers:n}),o.status<300)s=!0;else{if(Date.now()>r)throw new Error(`Created session ${t.session_uuid} did not become healthy after ${e.WAIT_FOR_IS_READY/1e3} seconds`);this._logger.debug(`session ${t.session_uuid} health check status ${o.status}, wait and poll for update`),await G(e.CHECK_FOR_IS_READY_INTERVAL)}}this._baseUrl=t.session_endpoint,this._pipeline=null,t.pipeline_uuid?this._pipelineId=t.pipeline_uuid:this._pipelineId=null}async startTransientPipeline(){const e=this._client,t=this._baseUrl;if(null==e||null==t)throw new Error("endpoint not initialized");let i;i=this._pipeline&&this._pipeline.pop?this._pipeline.pop:{components:[]};const n={pop:i,source:{sourceType:"NONE"},idleTimeoutSeconds:30,logging:["out_meta"],videoOutput:"no_output"},a=`${t.replace(/\/+$/,"")}/pipelines`;let o=await this.fetchWithRetry(async()=>{let t={"Content-Type":"application/json",Authorization:await this.authorizationHeader()};return e.fetch(a,{method:"POST",body:JSON.stringify(n),headers:t})});if(200!=o.status){const e=await o.text();throw new Error(`Unexpected status ${o.status}: ${e}`)}return(await o.json()).id}};Z.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),Z.WAIT_FOR_IS_READY=6e4,Z.CHECK_FOR_IS_READY_INTERVAL=250;var Y,X=Z;function Q(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var i=e.shift();e[0]=i+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var a=e[n];if("string"!=typeof a)throw new TypeError("Url must be a string. Received "+a);""!==a&&(n>0&&(a=a.replace(/^[\/]+/,"")),a=n<e.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}Y="document"in globalThis&&"implementation"in globalThis.document?(e,t)=>new WebSocket(e,t):(e,t)=>new(i(826).WebSocket)(e,t);var ee=(e=>(e.dataset="dataset",e.vlm="vlm",e))(ee||{});function te(e,t){switch(t){case"dataset":return e.datasetApiUrl??"";case"vlm":return e.vlmApiUrl??"";default:throw new Error(`unsupported type ${t}`)}}var ie=(e=>(e.error="error",e.requested="requested",e.in_progress="in_progress",e.completed="completed",e))(ie||{}),ne=(e=>(e.rejected="rejected",e.upload_in_progress="upload_in_progress",e.upload_failed="upload_failed",e.transform_failed="transform_failed",e.transform_in_progress="transform_in_progress",e.accepted="accepted",e))(ne||{}),ae=(e=>(e.ground_truth="ground_truth",e.prediction="prediction",e.auto="auto",e))(ae||{}),oe=(e=>(e.approved="approved",e.rejected="rejected",e.unknown="unknown",e))(oe||{}),se=(e=>(e.all_assets="all_assets",e.annotated_only="annotated_only",e.manual_annotated_only="manual_annotated_only",e.auto_annotated_only="auto_annotated_only",e))(se||{}),re=(e=>(e.all="all",e.user_reviewed="user_reviewed",e.user_approved="user_approved",e.ground_truth="ground_truth",e))(re||{}),ce=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e))(ce||{}),pe=(e=>(e.original="original",e.video_original_size="video_original_size",e.image_original_size="image_original_size",e.image_fit_1024="image_fit_1024",e.image_fit_640="image_fit_640",e.image_fit_224="image_fit_224",e.image_cover_1024="image_cover_1024",e.image_cover_640="image_cover_640",e.image_cover_224="image_cover_224",e))(pe||{}),le=(e=>(e.RECTANGLE="rectangle",e.CONTOUR="contour",e))(le||{}),ue=(e=>(e.epdet_b1="epdet_b1",e.imported="imported",e.vlm_ability="vlm_ability",e))(ue||{}),de=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e.keypoint_detection="keypoint_detection",e))(de||{}),me=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(me||{}),he=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(he||{}),fe=(e=>(e.eyepop="eyepop",e.qc_ai_hub="qc_ai_hub",e))(fe||{}),ve=(e=>(e.eyepop_bundle="eyepop_bundle",e.weights_file="weights_file",e))(ve||{}),ge=(e=>(e.waiting="waiting",e.scheduling="scheduling",e.preparing="preparing",e.training="training",e.exporting="exporting",e))(ge||{}),be=(e=>(e.dataset_added="dataset_added",e.dataset_removed="dataset_removed",e.dataset_modified="dataset_modified",e.dataset_version_modified="dataset_version_modified",e.asset_added="asset_added",e.asset_removed="asset_removed",e.asset_status_modified="asset_status_modified",e.asset_annotation_modified="asset_annotation_modified",e.model_added="model_added",e.model_removed="model_removed",e.model_modified="model_modified",e.model_status_modified="model_status_modified",e.model_progress="model_progress",e.events_lost="events_lost",e.workflow_started="workflow_started",e.workflow_succeeded="workflow_succeeded",e.workflow_failed="workflow_failed",e.workflow_task_started="workflow_task_started",e.workflow_task_succeeded="workflow_task_succeeded",e.workflow_task_failed="workflow_task_failed",e))(be||{}),xe=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(xe||{}),ye=(e=>(e.TensorFlowLite="TensorFlowLite",e.TensorFlowGraphDef="TensorFlowGraphDef",e.ONNX="ONNX",e.TorchScript="TorchScript",e.TorchScriptCpu="TorchScriptCpu",e.TorchScriptCuda="TorchScriptCuda",e.PyTorch="PyTorch",e.ModelLess="ModelLess",e))(ye||{}),we=(e=>(e.float32="float32",e.float16="float16",e.int32="int32",e.int8="int8",e.uint8="uint8",e))(we||{}),_e=(e=>(e.gcs="gcs",e.s3="s3",e.https_signed="https_signed",e))(_e||{}),ke=(e=>(e.success="success",e.failed="failed",e))(ke||{}),Se=(e=>(e.in_progress="in_progress",e.draft="draft",e.published="published",e))(Se||{}),Ee=class{constructor(e,t,i,n){this._response=null,this._runInfo=null,this._controller=new AbortController,this._vlmFetch=i,this._assetUrl=e,this._inferRequest=t,this._requestLogger=n}[Symbol.asyncIterator](){if(!this._response)throw Error("logical bug");let e=!1;const t=this._response,i=this._controller;return async function*(){if(e)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");e=!0;let n=!1;try{const e=await t;if(e)for(let t of e)yield t;n=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{n||i.abort()}}()}start(e){return this._response=new Promise(async(t,i)=>{try{let e=null;for(;;){let n=null;if(e)n=await this._vlmFetch(`/api/v1/requests/${e}?timeout=20`,{method:"POST"});else{const e=new Map(Object.entries(this._inferRequest));e.set("url",this._assetUrl);const t=new FormData;t.append("infer_request",JSON.stringify(Object.fromEntries(e))),n=await this._vlmFetch("/api/v1/infer?timeout=20",{method:"POST",body:t})}const a=n.predictions,o=n.run_info;if(a){this._runInfo=o,t(a);break}if(e=n.request_id,!e){i(`missing request_id in response: ${JSON.stringify(n)}`);break}}}catch(e){i(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}},Te=class{constructor(e,t,i,n){this._response=null,this._controller=new AbortController,this._vlmFetch=i,this._evaluateRequest=e,this._workerRelease=t,this._requestLogger=n}async response(){if(!this._response)throw Error("logical bug");return await this._response}start(e){return this._response=new Promise(async(t,i)=>{try{let e=null;for(;;){let n=null;if(e)n=await this._vlmFetch(`/api/v1/evaluations/${e}?timeout=20`,{method:"GET"});else{const e=this._workerRelease?`&worker_release=${this._workerRelease}`:"";n=await this._vlmFetch(`/api/v1/evaluations?timeout=20${e}`,{method:"POST",body:JSON.stringify(this._evaluateRequest),headers:{"Content-Type":"application/json"}})}if(n.run_info){t(n);break}if(e=n.request_id,!e){i(`missing request_id in response: ${JSON.stringify(n)}`);break}}}catch(e){i(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}};function je(e,t){if(null!==t)return t}var Ae,Pe=class extends F{constructor(e){super(e),this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws=null,this._ws_current_reconnect_delay=null,this._accountId=e.accountId||null,this._account_event_handlers=[],this._dataset_uuid_to_event_handlers=new Map;const t=e.auth;if(void 0!==t.session){const e=t.session;e.accountId&&(this._accountId=e.accountId)}}async session(){const e=await super.session();return{eyepopUrl:e.eyepopUrl,accessToken:e.accessToken,validUntil:e.validUntil,accountId:this.options().accountId,datasetApiUrl:this.datasetApiUrl,vlmApiUrl:this.vlmApiUrl}}async disconnect(e=!0){if(this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws){try{this._ws.close()}catch(e){this._logger.warn("ignored exception",e)}this._ws=null}await super.disconnect(e)}async reconnect(){if(!this._client)return Promise.reject("endpoint not initialized");const e=this._accountId?`?account_uuid=${this._accountId}`:"",t=`${this.eyepopUrl()}/v1/configs${e}`;let i={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let n=await this._client.fetch(t,{headers:i});if(401==n.status&&(this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",t),this.statusHandler401(n.status),i={Authorization:await this.authorizationHeader()},this.updateState("FetchConfig"),n=await this._client.fetch(t,{headers:i})),200!=n.status){this.updateState("Error");const e=await n.text();return Promise.reject(`Unexpected status ${n.status} for ${t}: ${e}`)}let a=await n.json();const o=new URL(a.dataset_api_url,this.eyepopUrl());this.datasetApiUrl=o.toString();const s=new URL(a.vlm_api_url,this.eyepopUrl());if(this.vlmApiUrl=s.toString(),this.options().disableWs?this._logger.info("disabled ws connection"):await this.reconnect_ws(),this.options().useCookie){const e=this._client,t=Q(this.datasetApiUrl,"security","check?set_cookie=true"),i={Authorization:await this.authorizationHeader()};if(n=await e.fetch(t,{headers:i}),204!=n.status){this.updateState("Error");const e=await n.text();return Promise.reject(`Unexpected status ${n.status}: ${e}`)}}return this.updateState(),Promise.resolve(this)}async reconnect_ws(){this._ws&&(this._ws.close(),this._ws=null);const e=this.datasetApiUrl?.replace("https://","wss://").replace("http://","ws://");if(!e)return;const t=Q(e,"events");return this._requestLogger.debug("about to connect ws to: %s",t),new Promise((e,i)=>{const n=Y(t);if(!n)return e();this._ws=n,n.onopen=async()=>{const t=await this.authorizationHeader();let i=JSON.stringify({authorization:t});this._requestLogger.debug("ws send: %s",i),n.send(i),i=JSON.stringify({subscribe:{account_uuid:this._accountId}}),this._requestLogger.debug("ws send: %s",i),n.send(i);for(let e in this._dataset_uuid_to_event_handlers.keys()){const t=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",t),n.send(t)}this._ws_current_reconnect_delay=1e3,e()},n.onmessage=e=>{const t=JSON.parse(e.data);this._requestLogger.debug("received ws: %s",JSON.stringify(t));const i=t;this.dispatchChangeEvent(i)},n.onclose=e=>{const{code:t,reason:i}=e;this._requestLogger.debug("ws closed: %d %s",t,i),"unsubscribe"!==i&&(this._ws_current_reconnect_delay?this._ws_current_reconnect_delay<6e4&&(this._ws_current_reconnect_delay*=1.5):this._ws_current_reconnect_delay=1e3,setTimeout(async()=>{await this.reconnect_ws()},this._ws_current_reconnect_delay))},n.onerror=e=>(this._logger.error(e),i(e),null)})}options(){return this._options}async request(e,t={},i=!1,n="dataset"){const a=this._client;if(!a)return Promise.reject("endpoint not connected");let o=await this.fetchWithRetry(async()=>{const o=await this.session(),s=te(o,n),r={...i?{}:{Authorization:`Bearer ${o.accessToken}`},...t.headers||{}};t.body||(t.body=null);const c={headers:r,method:t.method||"GET",body:t.body};return this._requestLogger.debug("Request - "+c.method+" "+e+" BODY: "+(c.body?c.body:"")),await a.fetch(Q(s??"",e),c)});if(204===o.status)return null;const s=o.headers.get("Content-Type");if(this._requestLogger.debug("Response - "+o.status+" "+o.statusText),!o.ok)throw s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("text/"))?new Error(`Request failed with ${o.status} ${o.statusText}: ${await o.text()}`):new Error(`Request failed with ${o.status} ${o.statusText}`);return s&&s.toLowerCase().startsWith("application/json")?await o.json():await o.blob()}async listDatasets(e=!0,t){const i=void 0!==t?`&modifiable_version_only=${t}`:"";return this.request(`/datasets?account_uuid=${this._accountId}&include_stats=${e}${i}`,{method:"GET"})}async createDataset(e){return this.request(`/datasets?account_uuid=${this._accountId}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async getDataset(e,t=!0,i,n){const a=i?`&dataset_version=${i}`:"",o=void 0!==n?`&modifiable_version_only=${n}`:"";return this.request(`/datasets/${e}?include_stats=${t}${a}${o}`,{method:"GET"})}async updateDataset(e,t,i=!0){return this.request(`/datasets/${e}?start_auto_annotate=${i}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async updateDatasetHeroAsset(e,t){return this.request(`/datasets/${e}/hero_asset`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteDataset(e){return this.request(`/datasets/${e}`,{method:"DELETE"})}async freezeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/freeze?${i}`,{method:"POST"})}async analyzeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/analyze?${i}`,{method:"POST"})}async autoAnnotateDatasetVersion(e,t,i){const n=t?`&dataset_version=${t}`:"",a=i?`&max_assets=${i}`:"";return this.request(`/datasets/${e}/auto_annotate?${n}${a}`,{method:"POST"})}async deleteDatasetVersion(e,t){return this.request(`/datasets/${e}/versions?dataset_version=${t}`,{method:"DELETE"})}async deleteAnnotations(e,t,i=["unknown"]){let n="";for(let e in i)n+=`&user_review=${e}`;await this.request(`/datasets/${e}/annotations?dataset_version=${t}${n}`,{method:"DELETE"})}async createDatasetAutoAnnotate(e,t,i){const n=i?`dataset_version=${i}&`:"";return this.request(`/datasets/${t}/auto_annotates?${n}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async updateDatasetAutoAnnotate(e,t,i,n,a){const o=a?`dataset_version=${a}&`:"";return this.request(`/datasets/${t}/auto_annotates?auto_annotate=${i}&source=${encodeURIComponent(n)}&${o}`,{method:"PATCH",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async listDatasetAutoAnnotates(e,t,i,n){const a=n?`dataset_version=${n}&`:"",o=t?`auto_annotate=${t}&`:"",s=i?`source=${i}&`:"";return this.request(`/datasets/${e}/auto_annotates?${a}&${o}&${s}`,{method:"GET"})}async uploadAsset(e,t,i,n=void 0){const a=t?`&dataset_version=${t}`:"";let o;return o=n?`/assets?dataset_uuid=${e}${a}&external_id=${n}`:`/assets?dataset_uuid=${e}${a}`,this.request(o,{method:"POST",body:i,headers:{"Content-Type":i.type||"application/octet-stream"}})}async importAsset(e,t,i,n=void 0){const a=t?`&dataset_version=${t}`:"";let o;return o=n?`/assets/imports?dataset_uuid=${e}${a}&external_id=${n}`:`/assets/imports?dataset_uuid=${e}${a}`,this.request(o,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async listAssets(e,t,i=!1,n,a,o,s,r,c){const p=new URLSearchParams;p.set("dataset_uuid",e),null!=t&&p.set("dataset_version",String(t)),i&&p.set("include_annotations","true"),null!=a&&p.set("inclusion_mode",a),null!=o&&p.set("annotation_inclusion_mode",o);for(const e of s??[])p.append("include_partition",e);for(const e of r??[])p.append("include_auto_annotate",e);for(const e of c??[])p.append("include_source",e);return null!=n&&p.set("top_k",String(n)),this.request(`/assets?${p.toString()}`,{method:"GET"})}async getAsset(e,t,i,n=!1,a){const o=i?`&dataset_version=${i}`:"",s=n?"&include_annotations=true":"",r=t?`&dataset_uuid=${t}`:"",c=a?`&top_k=${a}`:"";return this.request(`/assets/${e}?${r}${o}${s}${c}`,{method:"GET"})}async deleteAsset(e,t,i){const n=i?`&dataset_version=${i}`:"",a=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}?${a}${n}`,{method:"DELETE"})}async resurrectAsset(e,t,i,n){const a=n?`&into_dataset_version=${n}`:"";return this.request(`/assets/${e}/resurrect?dataset_uuid=${t}&from_dataset_version=${i}${a}`,{method:"POST"})}async updateAssetGroundTruth(e,t,i,n){const a=i?`&dataset_version=${i}`:"",o=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${o}${a}`,{method:"PATCH",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async deleteAssetGroundTruth(e,t,i){const n=i?`&dataset_version=${i}`:"",a=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${a}${n}`,{method:"DELETE"})}async updateAutoAnnotationStatus(e,t,i,n){if(!["approved","rejected","unknown"].includes(i))throw new Error("Invalid status");const a=n?`?approved_threshold=${n}`:"";return this.request(`/assets/${e}/auto_annotations/${t}/user_review/${i}${a}`,{method:"PATCH"})}async addAssetAnnotation(e,t,i,n,a,o,s,r){const c=t?`dataset_uuid=${t}&`:"",p=i?`&dataset_version=${i}&`:"",l=a?`&auto_annotate=${a}&`:"",u=o?`&source=${encodeURIComponent(o)}&`:"",d=s?`&user_review=${s}&`:"",m=void 0!==r?`&approved_threshold=${r}&`:"";return this.request(`/assets/${e}/annotations?${c}${p}${l}${u}${d}${m}`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async updateAssetAnnotationApproval(e,t,i,n,a,o,s){const r=t?`dataset_uuid=${t}&`:"",c=i?`&dataset_version=${i}&`:"",p=n?`&auto_annotate=${n}&`:"",l=a?`&source=${encodeURIComponent(a)}&`:"",u=o?`&user_review=${o}&`:"",d=s?`&approved_threshold=${s}&`:"";return this.request(`/assets/${e}/annotations?${r}${c}${p}${l}${u}${d}`,{method:"PATCH"})}async downloadAsset(e,t,i,n="original",a,o,s){const r=i?`&dataset_version=${i}`:"",c=t?`&dataset_uuid=${t}`:"",p=a?`&start_timestamp=${a}`:"",l=o?`&end_timestamp=${o}`:"",u=s?`&url_type=${s}`:"";return this.request(`/assets/${e}/download?transcode_mode=${n}${c}${r}${p}${l}${u}`,{method:"GET"})}async previewAutoAnnotateAsset(e,t,i){return this.request(`/assets/${e}/preview_auto_annotate?auto_annotate=${t}`,{method:"POST",body:i?JSON.stringify(i):null,headers:i?{"Content-Type":"application/json"}:{}})}async addAssetRoi(e,t,i,n,a){const o=n?`&dataset_version=${n}`:"",s=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois?${s}${o}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteAssetRoi(e,t,i,n){const a=n?`&dataset_version=${n}`:"",o=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois/${encodeURIComponent(t)}?${o}${a}`,{method:"DELETE"})}async listModels(){return this.request(`/models?account_uuid=${this._accountId}`,{method:"GET"})}async findModelsForDataset(e){return this.request(`/models?dataset_uuid=${e}`,{method:"GET"})}async createModel(e,t,i,n=!0){return this.request(`/models?dataset_uuid=${e}&dataset_version=${t}&start_training=${n}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getModel(e){return this.request(`/models/${e}`,{method:"GET"})}async getModelTrainingProgress(e){return this.request(`/models/${e}/progress`,{method:"GET"})}async updateModel(e,t){return this.request(`/models/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteModel(e){return this.request(`/models/${e}`,{method:"DELETE"})}async trainModel(e){return this.request(`/models/${e}/train`,{method:"POST"})}async publishModel(e){return this.request(`/models/${e}/publish`,{method:"POST"})}async exportModel(e,t,i){if("qc_ai_hub"!=t)return Promise.reject(`Unexpected export_by ${t}, must be 'qc_ai_hub'`);await this.request(`/models/${e}/exports/qc_ai_hub`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async downloadModelArtifacts(e,t,i,n){const a=n?`artifact_type=${n}&`:"",o=i?`device_name=${encodeURIComponent(i)}&`:"";let s="";if(t)for(const e of t)s+=`model_format=${e}&`;return this.request(`/exports/model_artifacts/?model_uuid=${e}&${a}${o}${s}`,{method:"GET"})}addAccountEventHandler(e){this._account_event_handlers.push(e)}removeAccountEventHandler(e){this._account_event_handlers=this._account_event_handlers.filter(t=>t!==e)}addDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(this._logger.debug("addDatasetEventHandler %s",i),void 0===i){i=[],this._dataset_uuid_to_event_handlers.set(e,i);const t=this._ws;if(t){const i=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}}i.find(e=>e===t)!==t&&(this._logger.debug("addDatasetEventHandler event_handlers=%s",i),i.push(t))}removeDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(void 0!==i&&(i=i.filter(e=>e!==t),0==i.length)){const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}}removeAllDatasetEventHandlers(e){if(void 0===this._dataset_uuid_to_event_handlers.get(e))return;const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}async startWorkflow(e,t,i){return this.request(`/workflows?account_uuid=${e}&template_name=${t}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getWorkflow(e,t){return this.request(`/workflows/${e}?account_uuid=${t}`,{method:"GET"})}async listWorkflows(e,t,i,n){const a=[t?.map(e=>`dataset_uuid=${e}`).join("&")||"",i?.map(e=>`model_uuid=${e}`).join("&")||"",n?.map(e=>`phase=${e}`).join("&")||""].filter(e=>e).join("&");return this.request(`/workflows?account_uuid=${e}${a?`&${a}`:""}`,{method:"GET"})}async inferAsset(e,t,i,n,a,o,s){const r=`ai.eyepop://data/assets/${e}?${a?`transcode_mode=${a}&`:""}${i?`dataset_uuid=${i}&`:""}${n?`dataset_version=${n}&`:""}${o?`start_timestamp=${o}&`:""}${s?`end_timestamp=${s}&`:""}`;if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const e=new Ee(r,t,async(e,t)=>await this.request(e,t,!1,"vlm"),this._requestLogger);return e.start(()=>{this.jobDone(e)})}catch(e){throw this._limit.release(),e}}async evaluateDataset(e,t){if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new Te(e,t??null,async(e,t)=>await this.request(e,t,!1,"vlm"),this._requestLogger);return i.start(()=>{this.jobDone(i)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release()}async dispatchChangeEvent(e){switch(e.change_type){case"dataset_added":case"dataset_modified":case"dataset_removed":case"dataset_version_modified":case"workflow_started":case"workflow_succeeded":case"workflow_failed":case"workflow_task_started":case"workflow_task_succeeded":case"workflow_task_failed":this._logger.debug("dispatchChangeEvent account_event_handlers=%s",this._account_event_handlers);for(let t of this._account_event_handlers)await t(e);break;case"asset_added":case"asset_removed":case"asset_status_modified":case"asset_annotation_modified":case"model_added":case"model_modified":case"model_removed":case"model_status_modified":case"model_progress":const t=this._dataset_uuid_to_event_handlers.get(e.dataset_uuid);if(this._logger.debug("dispatchChangeEvent event_handlers=%s",t),void 0!==t)for(let i of t)await i(e)}}async listVlmAbilityGroups(){return this.request(`/vlm_ability_groups?account_uuid=${this._accountId}`,{method:"GET"})}async createVlmAbilityGroup(e){return this.request(`/vlm_ability_groups?account_uuid=${this._accountId}`,{method:"POST",body:JSON.stringify(e,je),headers:{"Content-Type":"application/json"}})}async getVlmAbilityGroup(e){return this.request(`/vlm_ability_groups/${e}`,{method:"GET"})}async deleteVlmAbilityGroup(e){return this.request(`/vlm_ability_groups/${e}`,{method:"DELETE"})}async updateVlmAbilityGroup(e,t){return this.request(`/vlm_ability_groups/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async listVlmAbilities(){return this.request(`/vlm_abilities?account_uuid=${this._accountId}`,{method:"GET"})}async createVlmAbility(e,t){const i=t?`&vlm_ability_group_uuid=${t}`:"";return this.request(`/vlm_abilities?account_uuid=${this._accountId}${i}`,{method:"POST",body:JSON.stringify(e,je),headers:{"Content-Type":"application/json"}})}async getVlmAbility(e){return this.request(`/vlm_abilities/${e}`,{method:"GET"})}async deleteVlmAbility(e){return this.request(`/vlm_abilities/${e}`,{method:"DELETE"})}async updateVlmAbility(e,t){return this.request(`/vlm_abilities/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async refineVlmAbility(e,t){return this.request(`/vlm_abilities/${e}/refine`,{method:"POST",body:JSON.stringify(t,je),headers:{"Content-Type":"application/json"}})}async cloneVlmAbility(e,t,i,n){const a=new URLSearchParams;return t?a.set("account_uuid",t):this._accountId&&a.set("account_uuid",this._accountId),i&&a.set("name",i),n&&a.set("default_alias_name",n),this.request(`/vlm_abilities/${e}/clone?${a.toString()}`,{method:"POST"})}async publishVlmAbility(e,t,i){const n=t?`alias_name=${encodeURIComponent(t)}&`:"",a=i?`tag_name=${encodeURIComponent(i)}&`:"";return this.request(`/vlm_abilities/${e}/publish?${n}${a}`,{method:"POST"})}async addVlmAbilityAlias(e,t,i){return this.request(`/vlm_abilities/${e}/alias/${encodeURIComponent(t)}/tag/${i?encodeURIComponent(i):""}`,{method:"POST"})}async removeVlmAbilityAlias(e,t,i){return this.request(`/vlm_abilities/${e}/alias/${encodeURIComponent(t)}/tag/${encodeURIComponent(i)}`,{method:"DELETE"})}async listVlmAbilityEvaluations(e){return this.request(`/vlm_abilities/${e}/evaluations`,{method:"GET"})}async getVlmAbilityEvaluation(e,t){return this.request(`/vlm_abilities/${e}/evaluations/${t}`,{method:"GET"})}async startVlmAbilityEvaluation(e,t){return this.request(`/vlm_abilities/${e}/evaluations`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async resolveAliases(e){const t=new URLSearchParams;return e.forEach(e=>{t.append("alias",e)}),this.request(`/exports/aliases?${t.toString()}`,{method:"GET"})}},Oe=class extends C{constructor(e,t,i,n){super(t,i,e,"liveIngress/whep",!1,n),this._stream=null}async close(){const e=this._stream;return this._stream=null,e&&e.getTracks().forEach(e=>{e.stop()}),super.close()}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):this.onIceServers(i)}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(this._stream)throw new Error("onIceServers has stream");const t=new RTCPeerConnection({iceServers:C.linkToIceServers(e.headers.get("Link"))});return t.addTransceiver("video",{direction:"sendrecv"}),t.onicecandidate=e=>this.onLocalCandidate(e),this._pc=t,this._requestLogger.info(`onIceServers ${t.iceConnectionState}`),new Promise(async(e,i)=>{t.ontrack=t=>{this._requestLogger.debug(`new track: ${t.track.kind}`),this._stream=t.streams[0]||null,e(this)},t.oniceconnectionstatechange=()=>{switch(t.iceConnectionState){case"failed":case"disconnected":this._requestLogger.debug("oniceconnectionstatechange disconnected"),i(`peer connection: ${t.iceConnectionState}`);break;case"connected":this._requestLogger.debug("oniceconnectionstatechange connected")}},await this.onLocalOffer(await t.createOffer())})}},Ie=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Ie("EYEPOP_API_KEY"),i=t?{apiKey:t}:void 0;function n(e={}){if(void 0===e.isLocalMode&&(e.isLocalMode=(e=>{if(void 0===e)return!1;const t=e.toLowerCase();return"true"==t||"yes"==t})(Ie("EYEPOP_LOCAL_MODE"))),e.isLocalMode&&(e.eyepopUrl="http://127.0.0.1:8080"),a(e),void 0===e.auth){if(!e.isLocalMode)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");e.auth={isLocal:!0}}return void 0===e.popId&&(e.popId=Ie("EYEPOP_POP_ID")||"transient"),void 0===e.autoStart&&(e.autoStart=!0),void 0===e.stopJobs&&(e.stopJobs=!0),void 0!==e.auth&&void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.popId&&(e.popId=e.auth.session.popId),new X(e)}function a(e){e.auth||(e.auth=i),!e.eyepopUrl&&e.auth&&e.auth.session&&e.auth.session.eyepopUrl&&(e.eyepopUrl=e.auth.session.eyepopUrl),e.eyepopUrl||(e.eyepopUrl=Ie("EYEPOP_URL")),e.eyepopUrl||(e.eyepopUrl="https://compute.eyepop.ai"),e.auth&&void 0!==e.auth.oAuth2&&"boolean"==typeof e.auth.oAuth2&&(e.eyepopUrl&&e.eyepopUrl.match(/https:(.*).staging.eyepop.xyz/i)?e.auth={oAuth2:{domain:"dev-eyepop.us.auth0.com",clientId:"jktx3YO2UnbkNPvr05PQWf26t1kNTJyg",audience:"https://dev-app.eyepop.ai",scope:"admin:clouds access:inference-api access:datasets"}}:e.auth={oAuth2:{domain:"eyepop.us.auth0.com",clientId:"Lb9ubA9Hf3jlaqWLUx8XgA0zvotgViCl",audience:"https://api.eyepop.ai",scope:"admin:clouds access:inference-api access:datasets"}}),e.jobQueueLength||(e.jobQueueLength=128)}e.endpoint=n,e.workerEndpoint=n,e.dataEndpoint=function(e={}){if(a(e),void 0===e.auth)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");return void 0===e.accountId&&(e.accountId=Ie("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Pe(e)}})(Ae||(Ae={}));var Ce=Ae},182(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=i(196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var a=i(465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return a.default}});var o=i(178);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=i(11);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var r=i(425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}});var c=i(568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var p=i(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return p.default}});var l=i(286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var u=i(557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}});var d=i(356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var m=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return m.default}});var h=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var f=i(746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return f.default}});var v=i(770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return v.default}})},196(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338(e,t){"use strict";function i(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function a(e,t,i,a,o,s){return n((r=n(n(t,e),n(a,s)))<<(c=o)|r>>>32-c,i);var r,c}function o(e,t,i,n,o,s,r){return a(t&i|~t&n,e,t,o,s,r)}function s(e,t,i,n,o,s,r){return a(t&n|i&~n,e,t,o,s,r)}function r(e,t,i,n,o,s,r){return a(t^i^n,e,t,o,s,r)}function c(e,t,i,n,o,s,r){return a(i^(t|~n),e,t,o,s,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<4*e.length;i++)t[i]=e[i>>2]>>>i%4*8&255;return t}(function(e,t){const a=new Uint32Array(i(t)).fill(0);a.set(e),a[t>>5]|=128<<t%32,a[a.length-1]=t,e=a;let p=1732584193,l=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const i=p,a=l,m=u,h=d;p=o(p,l,u,d,e[t],7,-680876936),d=o(d,p,l,u,e[t+1],12,-389564586),u=o(u,d,p,l,e[t+2],17,606105819),l=o(l,u,d,p,e[t+3],22,-1044525330),p=o(p,l,u,d,e[t+4],7,-176418897),d=o(d,p,l,u,e[t+5],12,1200080426),u=o(u,d,p,l,e[t+6],17,-1473231341),l=o(l,u,d,p,e[t+7],22,-45705983),p=o(p,l,u,d,e[t+8],7,1770035416),d=o(d,p,l,u,e[t+9],12,-1958414417),u=o(u,d,p,l,e[t+10],17,-42063),l=o(l,u,d,p,e[t+11],22,-1990404162),p=o(p,l,u,d,e[t+12],7,1804603682),d=o(d,p,l,u,e[t+13],12,-40341101),u=o(u,d,p,l,e[t+14],17,-1502002290),l=o(l,u,d,p,e[t+15],22,1236535329),p=s(p,l,u,d,e[t+1],5,-165796510),d=s(d,p,l,u,e[t+6],9,-1069501632),u=s(u,d,p,l,e[t+11],14,643717713),l=s(l,u,d,p,e[t],20,-373897302),p=s(p,l,u,d,e[t+5],5,-701558691),d=s(d,p,l,u,e[t+10],9,38016083),u=s(u,d,p,l,e[t+15],14,-660478335),l=s(l,u,d,p,e[t+4],20,-405537848),p=s(p,l,u,d,e[t+9],5,568446438),d=s(d,p,l,u,e[t+14],9,-1019803690),u=s(u,d,p,l,e[t+3],14,-187363961),l=s(l,u,d,p,e[t+8],20,1163531501),p=s(p,l,u,d,e[t+13],5,-1444681467),d=s(d,p,l,u,e[t+2],9,-51403784),u=s(u,d,p,l,e[t+7],14,1735328473),l=s(l,u,d,p,e[t+12],20,-1926607734),p=r(p,l,u,d,e[t+5],4,-378558),d=r(d,p,l,u,e[t+8],11,-2022574463),u=r(u,d,p,l,e[t+11],16,1839030562),l=r(l,u,d,p,e[t+14],23,-35309556),p=r(p,l,u,d,e[t+1],4,-1530992060),d=r(d,p,l,u,e[t+4],11,1272893353),u=r(u,d,p,l,e[t+7],16,-155497632),l=r(l,u,d,p,e[t+10],23,-1094730640),p=r(p,l,u,d,e[t+13],4,681279174),d=r(d,p,l,u,e[t],11,-358537222),u=r(u,d,p,l,e[t+3],16,-722521979),l=r(l,u,d,p,e[t+6],23,76029189),p=r(p,l,u,d,e[t+9],4,-640364487),d=r(d,p,l,u,e[t+12],11,-421815835),u=r(u,d,p,l,e[t+15],16,530742520),l=r(l,u,d,p,e[t+2],23,-995338651),p=c(p,l,u,d,e[t],6,-198630844),d=c(d,p,l,u,e[t+7],10,1126891415),u=c(u,d,p,l,e[t+14],15,-1416354905),l=c(l,u,d,p,e[t+5],21,-57434055),p=c(p,l,u,d,e[t+12],6,1700485571),d=c(d,p,l,u,e[t+3],10,-1894986606),u=c(u,d,p,l,e[t+10],15,-1051523),l=c(l,u,d,p,e[t+1],21,-2054922799),p=c(p,l,u,d,e[t+8],6,1873313359),d=c(d,p,l,u,e[t+15],10,-30611744),u=c(u,d,p,l,e[t+6],15,-1560198380),l=c(l,u,d,p,e[t+13],21,1309151649),p=c(p,l,u,d,e[t+4],6,-145523070),d=c(d,p,l,u,e[t+11],10,-1120210379),u=c(u,d,p,l,e[t+2],15,718787259),l=c(l,u,d,p,e[t+9],21,-343485551),p=n(p,i),l=n(l,a),u=n(u,m),d=n(d,h)}return Uint32Array.of(p,l,u,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(i(8*e.length)).fill(0);for(let i=0;i<e.length;i++)t[i>>2]|=(255&e[i])<<i%4*8;return t}(e),8*e.length))}},779(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:i}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},178(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},697(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291(e,t){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(16);t.default=function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(n)}},829(e,t){"use strict";function i(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,r=Math.ceil(s/16),c=new Array(r);for(let t=0;t<r;++t){const i=new Uint32Array(16);for(let n=0;n<16;++n)i[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=i}c[r-1][14]=8*(e.length-1)/Math.pow(2,32),c[r-1][14]=Math.floor(c[r-1][14]),c[r-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<r;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=a[0],r=a[1],p=a[2],l=a[3],u=a[4];for(let e=0;e<80;++e){const a=Math.floor(e/20),c=n(s,5)+i(a,r,p,l)+u+t[a]+o[e]>>>0;u=l,l=p,p=n(r,30)>>>0,r=s,s=c}a[0]=a[0]+s>>>0,a[1]=a[1]+r>>>0,a[2]=a[2]+p>>>0,a[3]=a[3]+l>>>0,a[4]=a[4]+u>>>0}return Uint8Array.of(a[0]>>24,a[0]>>16,a[0]>>8,a[0],a[1]>>24,a[1]>>16,a[1]>>8,a[1],a[2]>>24,a[2]>>16,a[2]>>8,a[2],a[3]>>24,a[3]>>16,a[3]>>8,a[3],a[4]>>24,a[4]>>16,a[4]>>8,a[4])}},11(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const n=i(746),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const i=o(e,t);if(!(0,n.default)(i))throw TypeError("Stringified UUID is invalid");return i}},425(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const n=i(291),a=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9])),e.msecs=t,e}function r(e,t,i,n,a,o,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),i??=0,n??=16383&(e[8]<<8|e[9]),a??=e.slice(10,16);const r=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[s++]=r>>>24&255,o[s++]=r>>>16&255,o[s++]=r>>>8&255,o[s++]=255&r;const c=t/4294967296*1e4&268435455;o[s++]=c>>>8&255,o[s++]=255&c,o[s++]=c>>>24&15|16,o[s++]=c>>>16&255,o[s++]=n>>>8|128,o[s++]=255&n;for(let e=0;e<6;++e)o[s++]=a[e];return o}t.updateV1State=s,t.default=function(e,t,i){let c;const p=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=r(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,i);else{const e=Date.now(),a=(0,n.default)();s(o,e,a),c=r(a,o.msecs,o.nsecs,p?void 0:o.clockseq,p?void 0:o.node,t,i)}return t??(0,a.unsafeStringify)(c)}},568(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(178),a=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&i[6])<<4|i[7]>>4&15,(15&i[7])<<4|(240&i[4])>>4,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,(15&i[1])<<4|(240&i[2])>>4,96|15&i[2],i[3],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,a.unsafeStringify)(t):t}},591(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=i(338),a=i(988);var o=i(988);function s(e,t,i,o){return(0,a.default)(48,n.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=a.DNS,s.URL=a.URL,t.default=s},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const n=i(178),a=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,n.default)(s):s;if("string"==typeof s&&(s=(0,n.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){c=c||0;for(let e=0;e<16;++e)r[c+e]=u[e];return r}return(0,a.unsafeStringify)(u)}},286(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(779),a=i(291),o=i(11);t.default=function(e,t,i){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,a.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},557(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=i(829),a=i(988);var o=i(988);function s(e,t,i,o){return(0,a.default)(80,n.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=a.DNS,s.URL=a.URL,t.default=s},356(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(11),a=i(425),o=i(568);t.default=function(e,t,i){e??={},i??=0;let s=(0,a.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[i+e]=s[e];return t}return(0,n.unsafeStringify)(s)}},268(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(178),a=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&i[3])<<4|i[4]>>4&15,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|15&i[6],i[7],(15&i[1])<<4|(240&i[2])>>4,(15&i[2])<<4|(240&i[3])>>4,16|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,a.unsafeStringify)(t):t}},299(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const n=i(291),a=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=i[6]<<23|i[7]<<16|i[8]<<8|i[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function r(e,t,i,n,a=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(a<0||a+16>n.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else n=new Uint8Array(16),a=0;return t??=Date.now(),i??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[a++]=t/1099511627776&255,n[a++]=t/4294967296&255,n[a++]=t/16777216&255,n[a++]=t/65536&255,n[a++]=t/256&255,n[a++]=255&t,n[a++]=112|i>>>28&15,n[a++]=i>>>20&255,n[a++]=128|i>>>14&63,n[a++]=i>>>6&255,n[a++]=i<<2&255|3&e[10],n[a++]=e[11],n[a++]=e[12],n[a++]=e[13],n[a++]=e[14],n[a++]=e[15],n}t.updateV7State=s,t.default=function(e,t,i){let c;if(e)c=r(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,i);else{const e=Date.now(),a=(0,n.default)();s(o,e,a),c=r(a,o.msecs,o.seq,t,i)}return t??(0,a.unsafeStringify)(c)}},746(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(697);t.default=function(e){return"string"==typeof e&&n.default.test(e)}},770(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(797)})());