@eyepop.ai/eyepop 3.14.7 → 3.15.1

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){this.v=e,this.k=t}function n(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 o(e){return new a(e,0)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(e,t){return e.get(n(e,t))}function c(e,t,i){s(e,t),t.set(e,i)}function p(e,t,i){return e.set(n(e,t),i),i}function l(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 u(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 d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach(function(t){l(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function m(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 h(e){var t,i;function n(t,i){try{var s=e[t](i),r=s.value,c=r instanceof a;Promise.resolve(c?r.v:r).then(function(i){if(c){var a="return"===t&&r.k?t:"next";if(!r.k||i.done)return n(a,i);i=e[a](i).value}o(!!s.done,i)},function(e){n("throw",e)})}catch(e){o(2,e)}}function o(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)}i.r(t),i.d(t,{Auth0Client:()=>rs,AuthenticationError:()=>w,CacheKey:()=>Pe,ConnectError:()=>_,GenericError:()=>y,InMemoryCache:()=>Ie,LocalStorageCache:()=>je,MfaApiClient:()=>Qo,MfaChallengeError:()=>Zo,MfaEnrollmentError:()=>Bo,MfaEnrollmentFactorsError:()=>Xo,MfaError:()=>Fo,MfaListAuthenticatorsError:()=>Vo,MfaRequiredError:()=>A,MfaVerifyError:()=>Go,MissingRefreshTokenError:()=>P,MyAccountApiError:()=>ct,PopupCancelledError:()=>T,PopupOpenError:()=>E,PopupTimeoutError:()=>S,ResponseType:()=>Ke,TimeoutError:()=>k,UseDpopNonceError:()=>I,User:()=>Je,createAuth0Client:()=>cs}),h.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},h.prototype.next=function(e){return this._invoke("next",e)},h.prototype.throw=function(e){return this._invoke("throw",e)},h.prototype.return=function(e){return this._invoke("return",e)};const f={timeoutInSeconds:60},v="memory",g={name:"auth0-spa-js",version:"2.18.3"},b=()=>Date.now(),x="default";class y extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,y.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new y(t,i)}}class w extends y{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,w.prototype)}}class _ extends y{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,_.prototype)}}class k extends y{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,k.prototype)}}class S extends k{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,S.prototype)}}class T extends y{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,T.prototype)}}class E extends y{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,E.prototype)}}class A extends y{constructor(e,t,i,a){super(e,t),this.mfa_token=i,this.mfa_requirements=a,Object.setPrototypeOf(this,A.prototype)}}class P extends y{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(U(e,["default"]),"', scope: '").concat(U(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,P.prototype)}}class j extends y{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(U(e,["default"]),"', missing scope: '").concat(U(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,j.prototype)}}class I extends y{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,I.prototype)}}function U(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const C=["clientId"],R=()=>window.crypto,O=()=>{let e="";for(;e.length<43;){const t=R().getRandomValues(new Uint8Array(43-e.length));for(const i of t)e.length<43&&i<198&&(e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[i%66])}return e},L=e=>btoa(e),z=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],D=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=z.find(e=>e.key===a);return n&&n.type.includes(typeof e[a])&&(i[a]=e[a]),i},{})},N=e=>{let{clientId:t}=e,i=m(e,C);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,i)=>d(d({},t),{},{[i]:e[i]}),{}))(d({client_id:t},i))).toString()},q=async e=>{const t=R().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},W=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),M=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 H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},$={},K={};Object.defineProperty(K,"__esModule",{value:!0});var J=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}();K.default=function(){return J.getInstance()};var F=H&&H.__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())})},V=H&&H.__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])}}},B=H;Object.defineProperty($,"__esModule",{value:!0});var Z=K,G="browser-tabs-lock-key",X={key:function(e){return F(B,void 0,void 0,function(){return V(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return F(B,void 0,void 0,function(){return V(this,function(e){throw new Error("Unsupported")})})},clear:function(){return F(B,void 0,void 0,function(){return V(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return F(B,void 0,void 0,function(){return V(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return F(B,void 0,void 0,function(){return V(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 Y(e){return new Promise(function(t){return setTimeout(t,e)})}function Q(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var ee=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+Q(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),F(this,void 0,void 0,function(){var a,n,o,s,r,c,p;return V(this,function(l){switch(l.label){case 0:a=Date.now()+Q(4),n=Date.now()+i,o=G+"-"+t,s=void 0===this.storageHandler?X:this.storageHandler,l.label=1;case 1:return Date.now()<n?[4,Y(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+a,[4,Y(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,Y(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?X:this.storageHandler),[4,this.waitForSomethingToChange(n)];case 6:l.sent(),l.label=7;case 7:return a=Date.now()+Q(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return F(this,void 0,void 0,function(){var i=this;return V(this,function(a){return setTimeout(function(){return F(i,void 0,void 0,function(){var i,a,n;return V(this,function(o){switch(o.label){case 0:return[4,Z.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?X:this.storageHandler,null===(a=i.getItemSync(e))?(Z.default().unlock(t),[2]):((n=JSON.parse(a)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(n)),Z.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Z.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return F(this,void 0,void 0,function(){return V(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 F(this,void 0,void 0,function(){return V(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 F(this,void 0,void 0,function(){var i,a,n,o;return V(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?X:this.storageHandler,a=G+"-"+t,null===(n=i.getItemSync(a))?[2]:(o=JSON.parse(n)).id!==this.id?[3,2]:[4,Z.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(a),Z.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(G)){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}(),te=$.default=ee;class ie{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 k;throw e}}}class ae{constructor(){l(this,"lock",void 0),l(this,"activeLocks",new Set),l(this,"pagehideHandler",void 0),this.lock=new te,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 k;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 ne=null;const oe=new TextEncoder,se=new TextDecoder;function re(e){return"string"==typeof e?oe.encode(e):se.decode(e)}function ce(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new de(`${e.name} modulusLength must be at least 2048 bits`)}let pe;if(Uint8Array.prototype.toBase64)pe=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;pe=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 le(e){return pe(e)}class ue 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 de 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 me(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new ue("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new ue("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new ue("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new ue("unsupported CryptoKey algorithm name")}}function he(e){return e instanceof CryptoKey}function fe(e){return he(e)&&"public"===e.type}async function ve(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 ge="dpop-nonce",be=["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"],xe=["error","error_description"],ye=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},we=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([ye(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 _e(e,t,i,a,n,o,s,r,c,p){if(c){const t=await c.generateProof({url:e,method:n.method||"GET",nonce:await c.getNonce()});n.headers=d(d({},n.headers),{},{dpop:t})}let l,u=null;for(let c=0;c<3;c++)try{l=await we(e,i,a,n,o,s,t,r),u=null;break}catch(e){u=e}if(u)throw u;const{json:{error:h,error_description:f},headers:v,ok:g}=l,b=m(l.json,xe);let x;if(c&&(x=v[ge],x&&await c.setNonce(x)),!g){const l=f||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===h)throw new A(h,l,b.mfa_token,b.mfa_requirements);if("missing_refresh_token"===h)throw new P(i,a);if("use_dpop_nonce"===h){if(!c||!x||p)throw new I(x);return _e(e,t,i,a,n,o,s,r,c,!0)}throw new y(h||"request_error",l)}return b}const ke=["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"],Se=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},Te=(e,t,i)=>{let a;return i&&(a=e[i]),a||(a=e[x]),Se(a,t)},Ee="@@auth0spajs@@",Ae="@@user@@";class Pe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,i=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=i,l(this,"clientId",void 0),l(this,"scope",void 0),l(this,"audience",void 0),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 Pe({clientId:i,scope:n,audience:a},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:a}=e;return new Pe({scope:t,audience:i,clientId:a})}}class je{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(Ee))}}class Ie{constructor(){l(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 Ue{constructor(e,t,i){this.cache=e,this.keyManifest=t,l(this,"nowProvider",void 0),this.nowProvider=i||b}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,n=await this.cache.get(e.toKey());if(!n){const t=await this.getCacheKeys();if(!t)return;const o=this.matchExistingCacheKey(e,t);if(o&&(n=await this.cache.get(o)),!n&&i&&"cache-only"!==a)return this.getEntryWithRefreshToken(e,t)}if(!n)return;const o=await this.nowProvider(),s=Math.floor(o/1e3);var r;return n.expiresAt-t<s?n.body.refresh_token?this.modifiedCachedEntry(n,e):(await this.cache.remove(e.toKey()),void await(null===(r=this.keyManifest)||void 0===r?void 0:r.remove(e.toKey()))):n.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 Pe({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 Pe({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 Pe({clientId:e},Ee,Ae).toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const a=Pe.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===Ee&&a.clientId===e.clientId&&a.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){for(const a of t){const t=Pe.fromKey(a);if(t.prefix===Ee&&t.clientId===e.clientId){var i;const t=await this.cache.get(a);if(null!=t&&null!==(i=t.body)&&void 0!==i&&i.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){const i=await this.getCacheKeys();if(i)for(const n of i){var a;const i=await this.cache.get(n);(null==i||null===(a=i.body)||void 0===a?void 0:a.refresh_token)===e&&(i.body.refresh_token=t,await this.cache.set(n,i))}}}class Ce{constructor(e,t,i){this.storage=e,this.clientId=t,this.cookieDomain=i,l(this,"storageKey",void 0),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 Re=e=>"number"==typeof e,Oe=["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 Le=H&&H.__assign||function(){return Le=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},Le.apply(this,arguments)};function ze(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function De(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 ze("Expires",e.expires?e.expires.toUTCString():"")+ze("Domain",e.domain)+ze("Path",e.path)+ze("Secure",e.secure)+ze("SameSite",e.sameSite)}(i)}(e,t,Le({path:"/"},i))}var Ne=De,qe=function(e,t){De(e,"",Le(Le({},t),{expires:-1}))};const We={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&&i.daysUntilExpire&&(a.expires=i.daysUntilExpire),null!=i&&i.cookieDomain&&(a.domain=i.cookieDomain),Ne(e,JSON.stringify(t),a)},remove(e,t){let i={};null!=t&&t.cookieDomain&&(i.domain=t.cookieDomain),qe(e,i)}},Me="_legacy_",He={get:e=>We.get(e)||We.get("".concat(Me).concat(e)),save(e,t,i){let a={};"https:"===window.location.protocol&&(a={secure:!0}),null!=i&&i.daysUntilExpire&&(a.expires=i.daysUntilExpire),null!=i&&i.cookieDomain&&(a.domain=i.cookieDomain),Ne("".concat(Me).concat(e),JSON.stringify(t),a),We.save(e,t,i)},remove(e,t){let i={};null!=t&&t.cookieDomain&&(i.domain=t.cookieDomain),qe(e,i),We.remove(e,t),We.remove("".concat(Me).concat(e),t)}},$e={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)}};let Ke=function(e){return e.Code="code",e.ConnectCode="connect_code",e}({});class Je{constructor(){l(this,"name",void 0),l(this,"given_name",void 0),l(this,"family_name",void 0),l(this,"middle_name",void 0),l(this,"nickname",void 0),l(this,"preferred_username",void 0),l(this,"profile",void 0),l(this,"picture",void 0),l(this,"website",void 0),l(this,"email",void 0),l(this,"email_verified",void 0),l(this,"gender",void 0),l(this,"birthdate",void 0),l(this,"zoneinfo",void 0),l(this,"locale",void 0),l(this,"phone_number",void 0),l(this,"phone_number_verified",void 0),l(this,"address",void 0),l(this,"updated_at",void 0),l(this,"sub",void 0)}}var Fe,Ve=function(e){return Fe=Fe||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7ZnVuY3Rpb24gZShlLHIsdCl7cmV0dXJuKHI9ZnVuY3Rpb24oZSl7dmFyIHI9ZnVuY3Rpb24oZSxyKXtpZigib2JqZWN0IiE9dHlwZW9mIGV8fCFlKXJldHVybiBlO3ZhciB0PWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT10KXt2YXIgbj10LmNhbGwoZSxyfHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT10eXBlb2YgbilyZXR1cm4gbjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXI/U3RyaW5nOk51bWJlcikoZSl9KGUsInN0cmluZyIpO3JldHVybiJzeW1ib2wiPT10eXBlb2Ygcj9yOnIrIiJ9KHIpKWluIGU/T2JqZWN0LmRlZmluZVByb3BlcnR5KGUscix7dmFsdWU6dCxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMH0pOmVbcl09dCxlfWZ1bmN0aW9uIHIoZSxyKXt2YXIgdD1PYmplY3Qua2V5cyhlKTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbj1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO3ImJihuPW4uZmlsdGVyKGZ1bmN0aW9uKHIpe3JldHVybiBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKGUscikuZW51bWVyYWJsZX0pKSx0LnB1c2guYXBwbHkodCxuKX1yZXR1cm4gdH1mdW5jdGlvbiB0KHQpe2Zvcih2YXIgbj0xO248YXJndW1lbnRzLmxlbmd0aDtuKyspe3ZhciBvPW51bGwhPWFyZ3VtZW50c1tuXT9hcmd1bWVudHNbbl06e307biUyP3IoT2JqZWN0KG8pLCEwKS5mb3JFYWNoKGZ1bmN0aW9uKHIpe2UodCxyLG9bcl0pfSk6T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM/T2JqZWN0LmRlZmluZVByb3BlcnRpZXModCxPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9ycyhvKSk6cihPYmplY3QobykpLmZvckVhY2goZnVuY3Rpb24oZSl7T2JqZWN0LmRlZmluZVByb3BlcnR5KHQsZSxPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG8sZSkpfSl9cmV0dXJuIHR9Y2xhc3MgbiBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKGUscil7c3VwZXIociksdGhpcy5lcnJvcj1lLHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxuLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKGUpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnR9PWU7cmV0dXJuIG5ldyBuKHIsdCl9fWNsYXNzIG8gZXh0ZW5kcyBue2NvbnN0cnVjdG9yKGUscil7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChzKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChzKHIpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1yLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLG8ucHJvdG90eXBlKX19ZnVuY3Rpb24gcyhlKXtyZXR1cm4gZSYmIShhcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W10pLmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3QgaT1bImNsaWVudElkIl0sYz1lPT57bGV0e2NsaWVudElkOnJ9PWUsbj1mdW5jdGlvbihlLHIpe2lmKG51bGw9PWUpcmV0dXJue307dmFyIHQsbixvPWZ1bmN0aW9uKGUscil7aWYobnVsbD09ZSlyZXR1cm57fTt2YXIgdD17fTtmb3IodmFyIG4gaW4gZSlpZih7fS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGUsbikpe2lmKC0xIT09ci5pbmRleE9mKG4pKWNvbnRpbnVlO3Rbbl09ZVtuXX1yZXR1cm4gdH0oZSxyKTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgcz1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO2ZvcihuPTA7bjxzLmxlbmd0aDtuKyspdD1zW25dLC0xPT09ci5pbmRleE9mKHQpJiZ7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUsdCkmJihvW3RdPWVbdF0pfXJldHVybiBvfShlLGkpO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIocj0+dm9pZCAwIT09ZVtyXSkucmVkdWNlKChyLG4pPT50KHQoe30scikse30se1tuXTplW25dfSkse30pKSh0KHtjbGllbnRfaWQ6cn0sbikpKS50b1N0cmluZygpfTtsZXQgYT17fSxsPW51bGw7Y29uc3QgdT0oZSxyKT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQociksZj1hc3luYyBlPT57bGV0IHIsbix7ZGF0YTp7dGltZW91dDpzLGF1dGg6aSxmZXRjaFVybDpsLGZldGNoT3B0aW9uczpmLHVzZUZvcm1EYXRhOnAsdXNlTXJydDpofSxwb3J0czpbZF19PWUseT17fTtjb25zdHthdWRpZW5jZTpiLHNjb3BlOk99PWl8fHt9O3RyeXtjb25zdCBlPXA/KGU9Pntjb25zdCByPW5ldyBVUkxTZWFyY2hQYXJhbXMoZSksdD17fTtyZXR1cm4gci5mb3JFYWNoKChlLHIpPT57dFtyXT1lfSksdH0pKGYuYm9keSk6SlNPTi5wYXJzZShmLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYobj0oKGUscik9PmFbdShlLHIpXSkoYixPKSwhbiYmaCl7Y29uc3QgZT1hLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHI9KChlLHIpPT57Y29uc3QgdD1PYmplY3Qua2V5cyhhKS5maW5kKHQ9PntpZigibGF0ZXN0X3JlZnJlc2hfdG9rZW4iIT09dCl7Y29uc3Qgbj0oKGUscik9PnIuc3RhcnRzV2l0aCgiIi5jb25jYXQoZSwifCIpKSkocix0KSxvPXQuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLHM9ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9Pm8uaW5jbHVkZXMoZSkpO3JldHVybiBuJiZzfX0pO3JldHVybiEhdH0pKE8sYik7ZSYmIXImJihuPWUpfWlmKCFuKXRocm93IG5ldyBvKGIsTyk7Zi5ib2R5PXA/Yyh0KHQoe30sZSkse30se3JlZnJlc2hfdG9rZW46bn0pKTpKU09OLnN0cmluZ2lmeSh0KHQoe30sZSkse30se3JlZnJlc2hfdG9rZW46bn0pKX1sZXQgaSx2OyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihpPW5ldyBBYm9ydENvbnRyb2xsZXIsZi5zaWduYWw9aS5zaWduYWwpO3RyeXt2PWF3YWl0IFByb21pc2UucmFjZShbKGo9cyxuZXcgUHJvbWlzZShlPT5zZXRUaW1lb3V0KGUsaikpKSxmZXRjaChsLHQoe30sZikpXSl9Y2F0Y2goZSl7cmV0dXJuIHZvaWQgZC5wb3N0TWVzc2FnZSh7ZXJyb3I6ZS5tZXNzYWdlfSl9aWYoIXYpcmV0dXJuIGkmJmkuYWJvcnQoKSx2b2lkIGQucG9zdE1lc3NhZ2Uoe2Vycm9yOiJUaW1lb3V0IHdoZW4gZXhlY3V0aW5nICdmZXRjaCcifSk7dz12LmhlYWRlcnMseT1bLi4ud10ucmVkdWNlKChlLHIpPT57bGV0W3Qsbl09cjtyZXR1cm4gZVt0XT1uLGV9LHt9KSxyPWF3YWl0IHYuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKGEubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLGc9bixtPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhhKS5mb3JFYWNoKGU9PntsZXRbcix0XT1lO3Q9PT1nJiYoYVtyXT1tKX0pKSwoKGUscix0KT0+e2FbdShyLHQpXT1lfSkoci5yZWZyZXNoX3Rva2VuLGIsTyksZGVsZXRlIHIucmVmcmVzaF90b2tlbik6KChlLHIpPT57ZGVsZXRlIGFbdShlLHIpXX0pKGIsTyksZC5wb3N0TWVzc2FnZSh7b2s6di5vayxqc29uOnIsaGVhZGVyczp5fSl9Y2F0Y2goZSl7ZC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9LGhlYWRlcnM6eX0pfXZhciBnLG0sdyxqfTthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixlPT57Y29uc3R7ZGF0YTpyLHBvcnRzOnR9PWUsW25dPXQ7aWYoInR5cGUiaW4gciYmImluaXQiPT09ci50eXBlKXtpZihudWxsPT09bCl0cnl7bmV3IFVSTChyLmFsbG93ZWRCYXNlVXJsKSxsPXIuYWxsb3dlZEJhc2VVcmx9Y2F0Y2goZSl7cmV0dXJufX1lbHNlImZldGNoVXJsImluIHImJihlPT57aWYoIWwpcmV0dXJuITE7dHJ5e2NvbnN0IHI9bmV3IFVSTChsKS5vcmlnaW4sdD1uZXcgVVJMKGUuZmV0Y2hVcmwpO3JldHVybiB0Lm9yaWdpbj09PXImJiIvb2F1dGgvdG9rZW4iPT09dC5wYXRobmFtZX1jYXRjaChlKXtyZXR1cm4hMX19KShyKT9mKGUpOm51bGw9PW58fG4ucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOiJpbnZhbGlkX2ZldGNoX3VybCIsZXJyb3JfZGVzY3JpcHRpb246IlVuYXV0aG9yaXplZCBmZXRjaCBVUkwifSxoZWFkZXJzOnt9fSl9KX0oKTsKCg=="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",a=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(a)}(),new Worker(Fe,e)};const Be={};class Ze{constructor(e,t){this.cache=e,this.clientId=t,l(this,"manifestKey",void 0),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(Ee,"::").concat(e)}}const Ge=["openUrl","onRedirect"],Xe="auth0.is.authenticated",Ye={memory:()=>(new Ie).enclosedCache,localstorage:()=>new je},Qe=e=>Ye[e],et=e=>{const{openUrl:t,onRedirect:i}=e;return d(d({},m(e,Ge)),{},{openUrl:!1===t||t?t:i})},tt=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},it={NONCE:"nonce",KEYPAIR:"keypair"};class at{constructor(e){l(this,"clientId",void 0),l(this,"dbHandle",void 0),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(it).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(it.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(it.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(it.NONCE,this.buildKey(e))}findKeyPair(){return this.find(it.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(it.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(it.KEYPAIR,this.clientId)}}class nt{constructor(e){l(this,"storage",void 0),this.storage=new at(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){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(!he(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!fe(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=`${le(re(JSON.stringify(e)))}.${le(re(JSON.stringify(t)))}`;return`${a}.${le(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return ce(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return ce(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new ue}(i),i,re(a)))}`}({alg:me(s),typ:"dpop+jwt",jwk:await ve(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:a,htu:t,ath:n?le(await crypto.subtle.digest("SHA-256",re(n))):void 0}),s)}(t,s,a,n,o)}(d({keyPair:await this.getOrGenerateKeyPair()},e))}async calculateThumbprint(){return function(e){return async function(e){if(!fe(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 ve(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 ue("unsupported JWK kty")}return le(await crypto.subtle.digest({name:"SHA-256"},re(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var ot=function(e){return e.Bearer="Bearer",e.DPoP="DPoP",e}(ot||{});class st{constructor(e,t){l(this,"config",void 0),l(this,"hooks",void 0),this.hooks=t,this.config=d(d({},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]:ot.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?ot.DPoP:ot.Bearer,n=i):(a=i.token_type,n=i.access_token),this.setAuthorizationHeader(e,n,a),a===ot.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,ge);if(i&&await this.hooks.setDpopNonce(i),!this.hasUseDpopNonceError(e))return e;if(!i||!t.onUseDpopNonceError)throw new I(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,d(d({},a),{},{onUseDpopNonceError:void 0}),i)};return this.internalFetchWithAuth(e,t,a,i)}}class rt{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 ct({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new ct(t)}}class ct extends Error{constructor(e){let{type:t,status:i,title:a,detail:n,validation_errors:o}=e;super(n),l(this,"type",void 0),l(this,"status",void 0),l(this,"title",void 0),l(this,"detail",void 0),l(this,"validation_errors",void 0),this.name="MyAccountApiError",this.type=t,this.status=i,this.title=a,this.detail=n,this.validation_errors=o,Object.setPrototypeOf(this,ct.prototype)}}const pt={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};var lt,ut;let dt;if("undefined"==typeof navigator||null===(lt=navigator.userAgent)||void 0===lt||null===(ut=lt.startsWith)||void 0===ut||!ut.call(lt,"Mozilla/5.0 ")){const e="v3.8.5";dt="".concat("oauth4webapi","/").concat(e)}function mt(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 ht="ERR_INVALID_ARG_VALUE",ft="ERR_INVALID_ARG_TYPE";function vt(e,t,i){const a=new TypeError(e,{cause:i});return Object.assign(a,{code:t}),a}const gt=Symbol(),bt=Symbol(),xt=Symbol(),yt=Symbol(),wt=Symbol(),_t=Symbol(),kt=new TextEncoder,St=new TextDecoder;function Tt(e){return"string"==typeof e?kt.encode(e):St.decode(e)}let Et,At;if(Uint8Array.prototype.toBase64)Et=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Et=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 Pt(e){return"string"==typeof e?At(e):Et(e)}At=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw vt("The input to be decoded is not correctly encoded.",ht,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 vt("The input to be decoded is not correctly encoded.",ht,e)}};class jt extends Error{constructor(e,t){var i;super(e,t),l(this,"code",void 0),this.name=this.constructor.name,this.code=Ei,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class It extends Error{constructor(e,t){var i;super(e,t),l(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 Ut(e,t,i){return new It(e,{code:t,cause:i})}function Ct(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Rt(e){mt(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(dt&&!t.has("user-agent")&&t.set("user-agent",dt),t.has("authorization"))throw vt('"options.headers" must not include the "authorization" header name',ht);return t}function Ot(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw vt('"options.signal" must return or be an instance of AbortSignal',ft);return t}}function Lt(e){return e.includes("//")?e.replace("//","/"):e}function zt(e,t,i,a,n){try{if("number"!=typeof e||!Number.isFinite(e))throw vt("".concat(i," must be a number"),ft,n);if(e>0)return;if(t){if(0!==e)throw vt("".concat(i," must be a non-negative number"),ht,n);return}throw vt("".concat(i," must be a positive number"),ht,n)}catch(e){if(a)throw Ut(e.message,a,n);throw e}}function Dt(e,t,i,a){try{if("string"!=typeof e)throw vt("".concat(t," must be a string"),ft,a);if(0===e.length)throw vt("".concat(t," must not be empty"),ht,a)}catch(e){if(i)throw Ut(e.message,i,a);throw e}}function Nt(e){!function(e,t){if(pi(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 Ut(t,Ii,e)}(e,t)}(e,"application/json")}function qt(){return Pt(crypto.getRandomValues(new Uint8Array(32)))}function Wt(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 Mt(e){const t=null==e?void 0:e[bt];return"number"==typeof t&&Number.isFinite(t)?t:0}function Ht(e){const t=null==e?void 0:e[xt];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function $t(){return Math.floor(Date.now()/1e3)}function Kt(e){if("object"!=typeof e||null===e)throw vt('"as" must be an object',ft);Dt(e.issuer,'"as.issuer"')}function Jt(e){if("object"!=typeof e||null===e)throw vt('"client" must be an object',ft);Dt(e.client_id,'"client.client_id"')}function Ft(e){return Dt(e,'"clientSecret"'),(t,i,a,n)=>{a.set("client_id",i.client_id),a.set("client_secret",e)}}const Vt=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Bt(e,t){if(t&&"https:"!==e.protocol)throw Ut("only requests to HTTPS are allowed",Ci,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw Ut("only HTTP and HTTPS requests are allowed",Ri,e)}function Zt(e,t,i,a){let n;if("string"!=typeof e||!(n=Vt(e)))throw Ut("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?Di:Ni,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Bt(n,a),n}function Gt(e,t,i,a){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Zt(e.mtls_endpoint_aliases[t],t,i,a):Zt(e[t],t,i,a)}class Xt extends Error{constructor(e,t){var i;super(e,t),l(this,"cause",void 0),l(this,"code",void 0),l(this,"error",void 0),l(this,"status",void 0),l(this,"error_description",void 0),l(this,"response",void 0),this.name=this.constructor.name,this.code=Ti,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 Yt extends Error{constructor(e,t){var i,a;super(e,t),l(this,"cause",void 0),l(this,"code",void 0),l(this,"error",void 0),l(this,"error_description",void 0),this.name=this.constructor.name,this.code=Ai,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 Qt extends Error{constructor(e,t){var i;super(e,t),l(this,"cause",void 0),l(this,"code",void 0),l(this,"response",void 0),l(this,"status",void 0),this.name=this.constructor.name,this.code=Si,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 ei="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",ti="("+ei+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',ii="("+ei+")\\s*=\\s*("+ei+")",ai=new RegExp("^[,\\s]*("+ei+")"),ni=new RegExp("^[,\\s]*"+ti+"[,\\s]*(.*)"),oi=new RegExp("^[,\\s]*"+ii+"[,\\s]*(.*)"),si=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function ri(e,t,i){if(e.status!==t){let t;var a;if(function(e){let t;if(t=function(e){if(!mt(e,Response))throw vt('"response" must be an instance of Response',ft);const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let a=t;for(;a;){var n;let t=a.match(ai);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(ni)){if([,i,n,a]=t,n.includes("\\"))try{n=JSON.parse('"'.concat(n,'"'))}catch(e){}p[i.toLowerCase()]=n}else{if(!(t=a.match(oi))){if(t=a.match(si)){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 Qt("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){qi(e),Nt(e);try{const t=await e.clone().json();if(Ct(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 Xt("server responded with an error in the response body",{cause:t,response:e});throw Ut('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),Ui,e)}}function ci(e){if(!bi.has(e))throw vt('"options.DPoP" is not a valid DPoPHandle',ht)}function pi(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function li(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[yt])||fetch)(a.href,{body:n,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:Ot(a,null==s?void 0:s.signal)})}async function ui(e,t,i,a,n,o){var s;const r=Gt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[gt]));n.set("grant_type",a);const c=Rt(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(ci(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await li(e,t,i,r,n,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const di=new WeakMap,mi=new WeakMap;function hi(e){if(!e.id_token)return;const t=di.get(e);if(!t)throw vt('"ref" was already garbage collected or did not resolve from the proper sources',ht);return t}async function fi(e,t,i,a,n,o){if(Kt(e),Jt(t),!mt(i,Response))throw vt('"response" must be an instance of Response',ft);await ri(i,200,"Token Endpoint"),qi(i);const s=await Fi(i);if(Dt(s.access_token,'"response" body "access_token" property',ji,{body:s}),Dt(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;zt(e,!0,'"response" body "expires_in" property',ji,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&Dt(s.refresh_token,'"response" body "refresh_token" property',ji,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw Ut('"response" body "scope" property must be a string',ji,{body:s});if(void 0!==s.id_token){Dt(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&&(zt(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 Ut("Invalid JWT",ji,e);try{o=JSON.parse(Tt(Pt(r)))}catch(e){throw Ut("failed to parse JWT Header body as base64url encoded JSON",Pi,e)}if(!Ct(o))throw Ut("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(Tt(Pt(c)))}catch(e){throw Ut("failed to parse JWT Payload body as base64url encoded JSON",Pi,e)}if(!Ct(s))throw Ut("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 Ut('unexpected JWT "exp" (expiration time) claim type',ji,{claims:s});if(s.exp<=l-a)throw Ut('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Oi,{claims:s,now:l,tolerance:a,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw Ut('unexpected JWT "iat" (issued at) claim type',ji,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw Ut('unexpected JWT "iss" (issuer) claim type',ji,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw Ut('unexpected JWT "nbf" (not before) claim type',ji,{claims:s});if(s.nbf>l+a)throw Ut('unexpected JWT "nbf" (not before) claim value',Oi,{claims:s,now:l,tolerance:a,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw Ut('unexpected JWT "aud" (audience) claim type',ji,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Hi.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Mt(t),Ht(t),n).then(wi.bind(void 0,o)).then(gi.bind(void 0,e)).then(vi.bind(void 0,t.client_id));if(Array.isArray(r.aud)&&1!==r.aud.length){if(void 0===r.azp)throw Ut('ID Token "aud" (audience) claim includes additional untrusted audiences',Li,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw Ut('unexpected ID Token "azp" (authorized party) claim value',Li,{expected:t.client_id,claims:r,claim:"azp"})}void 0!==r.auth_time&&zt(r.auth_time,!0,'ID Token "auth_time" (authentication time)',ji,{claims:r}),mi.set(i,c),di.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 vi(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Ut('unexpected JWT "aud" (audience) claim value',Li,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Ut('unexpected JWT "aud" (audience) claim value',Li,{expected:e,claims:t.claims,claim:"aud"});return t}function gi(e,t){var i,a;const n=null!==(i=null===(a=e[Bi])||void 0===a?void 0:a.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==n)throw Ut('unexpected JWT "iss" (issuer) claim value',Li,{expected:n,claims:t.claims,claim:"iss"});return t}const bi=new WeakSet,xi=Symbol(),yi={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 wi(e,t){for(const i of e)if(void 0===t.claims[i])throw Ut('JWT "'.concat(i,'" (').concat(yi[i],") claim missing"),ji,{claims:t.claims});return t}const _i=Symbol(),ki=Symbol(),Si="OAUTH_WWW_AUTHENTICATE_CHALLENGE",Ti="OAUTH_RESPONSE_BODY_ERROR",Ei="OAUTH_UNSUPPORTED_OPERATION",Ai="OAUTH_AUTHORIZATION_RESPONSE_ERROR",Pi="OAUTH_PARSE_ERROR",ji="OAUTH_INVALID_RESPONSE",Ii="OAUTH_RESPONSE_IS_NOT_JSON",Ui="OAUTH_RESPONSE_IS_NOT_CONFORM",Ci="OAUTH_HTTP_REQUEST_FORBIDDEN",Ri="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Oi="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Li="OAUTH_JWT_CLAIM_COMPARISON_FAILED",zi="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",Di="OAUTH_MISSING_SERVER_METADATA",Ni="OAUTH_INVALID_SERVER_METADATA";function qi(e){if(e.bodyUsed)throw vt('"response" body has been used already',ht)}function Wi(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new jt("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Mi(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 Hi(e,t,i,a){if(void 0===e)if(Array.isArray(t)){if(!t.includes(a.alg))throw Ut('unexpected JWT "alg" header parameter',ji,{header:a,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw Ut('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 Ut('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 Ut('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 Ut('"'.concat(t,'" parameter must be provided only once'),ji);return i}const Ki=Symbol(),Ji=Symbol();async function Fi(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt;try{t=await e.json()}catch(t){throw i(e),Ut('failed to parse "response" body as JSON',Pi,t)}if(!Ct(t))throw Ut('"response" body must be a top level object',ji,{body:t});return t}const Vi=Symbol(),Bi=Symbol(),Zi=new TextEncoder,Gi=new TextDecoder;function Xi(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 Yi(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 Qi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:Gi.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Gi.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return Yi(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}const ea=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))},ta=(e,t)=>e.name===t;function ia(e,t){var i;if(i=e.hash,parseInt(i.name.slice(4),10)!==t)throw ea("SHA-".concat(t),"algorithm.hash")}function aa(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 na=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 aa("Key for the ".concat(e," algorithm must be "),t,...a)};class oa extends Error{constructor(e,t){var i;super(e,t),l(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}l(oa,"code","ERR_JOSE_GENERIC");class sa extends oa{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}}),l(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),l(this,"claim",void 0),l(this,"reason",void 0),l(this,"payload",void 0),this.claim=i,this.reason=a,this.payload=t}}l(sa,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class ra extends oa{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}}),l(this,"code","ERR_JWT_EXPIRED"),l(this,"claim",void 0),l(this,"reason",void 0),l(this,"payload",void 0),this.claim=i,this.reason=a,this.payload=t}}l(ra,"code","ERR_JWT_EXPIRED");class ca extends oa{constructor(){super(...arguments),l(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}l(ca,"code","ERR_JOSE_ALG_NOT_ALLOWED");class pa extends oa{constructor(){super(...arguments),l(this,"code","ERR_JOSE_NOT_SUPPORTED")}}l(pa,"code","ERR_JOSE_NOT_SUPPORTED"),l(class extends oa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),l(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),l(class extends oa{constructor(){super(...arguments),l(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class la extends oa{constructor(){super(...arguments),l(this,"code","ERR_JWS_INVALID")}}l(la,"code","ERR_JWS_INVALID");class ua extends oa{constructor(){super(...arguments),l(this,"code","ERR_JWT_INVALID")}}l(ua,"code","ERR_JWT_INVALID"),l(class extends oa{constructor(){super(...arguments),l(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class da extends oa{constructor(){super(...arguments),l(this,"code","ERR_JWKS_INVALID")}}l(da,"code","ERR_JWKS_INVALID");class ma extends oa{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),l(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}l(ma,"code","ERR_JWKS_NO_MATCHING_KEY");class ha extends oa{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),l(this,Symbol.asyncIterator,void 0),l(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}l(ha,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class fa extends oa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),l(this,"code","ERR_JWKS_TIMEOUT")}}l(fa,"code","ERR_JWKS_TIMEOUT");class va extends oa{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),l(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}l(va,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const ga=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},ba=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),xa=e=>ga(e)||ba(e);function ya(e,t,i){try{return Qi(e)}catch(e){throw new i("Failed to base64url decode the ".concat(t))}}function wa(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 _a=e=>wa(e)&&"string"==typeof e.kty;const ka='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function Sa(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 pa(ka)}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 pa(ka)}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 pa(ka)}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 pa(ka)}break;default:throw new pa('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=d({},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 Ta="given KeyObject instance cannot be used for this algorithm";let Ea;const Aa=async function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Ea||(Ea=new WeakMap);let n=Ea.get(e);if(null!=n&&n[i])return n[i];const o=await Sa(d(d({},t),{},{alg:i}));return a&&Object.freeze(e),n?n[i]=o:Ea.set(e,{[i]:o}),o},Pa=(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},Ia=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},Ua=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i},Ca=e=>null==e?void 0:e[Symbol.toStringTag],Ra=(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 Oa,La;let za,Da;if("undefined"==typeof navigator||null===(Oa=navigator.userAgent)||void 0===Oa||null===(La=Oa.startsWith)||void 0===La||!La.call(Oa,"Mozilla/5.0 ")){const e="v6.8.2";Da="".concat("openid-client","/").concat(e),za={"user-agent":Da}}const Na=e=>qa.get(e);let qa,Wa;function Ma(e){return void 0!==e?Ft(e):(Wa||(Wa=new WeakMap),(e,t,i,a)=>{let n;return(n=Wa.get(t))||(function(e,t){if("string"!=typeof e)throw Ja("".concat(t," must be a string"),Ka);if(0===e.length)throw Ja("".concat(t," must not be empty"),$a)}(t.client_secret,'"metadata.client_secret"'),n=Ft(t.client_secret),Wa.set(t,n)),n(e,t,i,a)})}const Ha=yt,$a="ERR_INVALID_ARG_VALUE",Ka="ERR_INVALID_ARG_TYPE";function Ja(e,t,i){const a=new TypeError(e,{cause:i});return Object.assign(a,{code:t}),a}class Fa extends Error{constructor(e,t){var i;super(e,t),l(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 Va(e,t,i){return new Fa(e,{cause:t,code:i})}function Ba(e){if(e instanceof TypeError||e instanceof Fa||e instanceof Xt||e instanceof Yt||e instanceof Qt)throw e;if(e instanceof It)switch(e.code){case Ci:throw Va("only requests to HTTPS are allowed",e,e.code);case Ri:throw Va("only requests to HTTP or HTTPS are allowed",e,e.code);case Ui:throw Va("unexpected HTTP response status code",e.cause,e.code);case Ii:throw Va("unexpected response content-type",e.cause,e.code);case Pi:throw Va("parsing error occured",e,e.code);case ji:throw Va("invalid response encountered",e,e.code);case Li:throw Va("unexpected JWT claim value encountered",e,e.code);case zi:throw Va("unexpected JSON attribute value encountered",e,e.code);case Oi:throw Va("JWT timestamp claim value failed validation",e,e.code);default:throw Va(e.message,e,e.code)}if(e instanceof jt)throw Va("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Va("runtime operation error",e,Ei);case"NotSupportedError":throw Va("runtime unsupported operation",e,Ei);case"TimeoutError":throw Va("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Va("operation aborted",e,"OAUTH_ABORT")}throw new Fa("something went wrong",{cause:e})}new TextDecoder;const Za=Symbol();class Ga{constructor(e,t,i,a){var n,o,s,r,c;if("string"!=typeof t||!t.length)throw Ja('"clientId" must be a non-empty string',Ka);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 Ja('"clientId" and "metadata.client_id" must be the same',$a);const p=d(d({},structuredClone(i)),{},{client_id:t});let l;p[bt]=null!==(o=null===(s=i)||void 0===s?void 0:s[bt])&&void 0!==o?o:0,p[xt]=null!==(r=null===(c=i)||void 0===c?void 0:c[xt])&&void 0!==r?r:30,l=a||("string"==typeof p.client_secret&&p.client_secret.length?Ma(p.client_secret):(e,t,i,a)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const m=structuredClone(e);Za in e&&(m[Bi]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let h=Object.freeze(m);qa||(qa=new WeakMap),qa.set(this,{__proto__:null,as:h,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(Na(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(Na(this).c)}get timeout(){return Na(this).timeout}set timeout(e){Na(this).timeout=e}get[Ha](){return Na(this).fetch}set[Ha](e){Na(this).fetch=e}}function Xa(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 hi(this)}catch(e){return}}}}}(e))}async function Ya(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 It("invalid Retry-After header value",{cause:e});s>t&&await Qa(s-t,i)}function Qa(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 en(e,t){pn(e);const{as:i,c:a,auth:n,fetch:o,tlsOnly:s,timeout:r}=Na(e);return async function(e,t,i,a,n){Kt(e),Jt(t);const o=Gt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[gt])),s=new URLSearchParams(a);s.set("client_id",t.client_id);const r=Rt(null==n?void 0:n.headers);return r.set("accept","application/json"),li(e,t,i,o,s,r,n)}(i,a,n,t,{[yt]:o,[gt]:!s,headers:new Headers(za),signal:ln(r)}).then(e=>async function(e,t,i){if(Kt(e),Jt(t),!mt(i,Response))throw vt('"response" must be an instance of Response',ft);await ri(i,200,"Backchannel Authentication Endpoint"),qi(i);const a=await Fi(i);Dt(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 zt(n,!0,'"response" body "expires_in" property',ji,{body:a}),a.expires_in=n,void 0!==a.interval&&zt(a.interval,!1,'"response" body "interval" property',ji,{body:a}),a}(i,a,e)).catch(Ba)}async function tn(e,t,i,a){var n,o;pn(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 Qa(s,r)}catch(e){Ba(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:m,nonRepudiation:h,timeout:f,decrypt:v}=Na(e),g=(n,o)=>tn(e,d(d({},t),{},{interval:n}),i,d(d({},a),{},{signal:r,flag:o})),b=await async function(e,t,i,a,n){Kt(e),Jt(t),Dt(a,'"authReqId"');const o=new URLSearchParams(null==n?void 0:n.additionalParameters);return o.set("auth_req_id",a),ui(e,t,i,"urn:openid:params:grant-type:ciba",o,n)}(c,p,l,t.auth_req_id,{[yt]:u,[gt]:!m,additionalParameters:i,DPoP:null==a?void 0:a.DPoP,headers:new Headers(za),signal:r.aborted?r:ln(f)}).catch(Ba);var x;if(503===b.status&&b.headers.has("retry-after"))return await Ya(b,s,r,!0),await(null===(x=b.body)||void 0===x?void 0:x.cancel()),g(s);const y=async function(e,t,i,a){return fi(e,t,i,void 0,null==a?void 0:a[_t],null==a?void 0:a.recognizedTokenTypes)}(c,p,b,{[_t]:v});let w;try{w=await y}catch(e){if(un(e,a))return g(s,dn);if(e instanceof Xt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Ya(e.response,s,r),g(s)}Ba(e)}return w.id_token&&await(null==h?void 0:h(b)),Xa(w),w}function an(e){Na(e).tlsOnly=!1}async function nn(e,t,i,a,n){if(pn(e),!((null==n?void 0:n.flag)===dn||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Ja('"currentUrl" must be an instance of URL, or Request',Ka);let o,s;const{as:r,c,auth:p,fetch:l,tlsOnly:u,jarm:m,hybrid:h,nonRepudiation:f,timeout:v,decrypt:g,implicit:b}=Na(e);if((null==n?void 0:n.flag)===dn)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 vt("form_post responses are expected to use the POST method",ht,{cause:e});if("application/x-www-form-urlencoded"!==pi(e))throw vt("form_post responses are expected to use the application/x-www-form-urlencoded content-type",ht,{cause:e});return async function(e){if(e.bodyUsed)throw vt("form_post Request instances must contain a readable body",ht,{cause:e});return e.text()}(e)}(e));if(h)t.hash=i.toString();else for(const[e,a]of i.entries())t.searchParams.append(e,a);break;default:throw Ja("unexpected Request HTTP method",$a)}}switch(s=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!m:o=await m(t,null==i?void 0:i.expectedState);break;case!!h:o=await h(t,null==i?void 0:i.expectedNonce,null==i?void 0:i.expectedState,null==i?void 0:i.maxAge);break;case!!b:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{o=function(e,t,i,a){if(Kt(e),Jt(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw vt('"parameters" must be an instance of URLSearchParams, or URL',ft);if($i(i,"response"))throw Ut('"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 Ut('response parameter "iss" (issuer) missing',ji,{parameters:i});if(n&&n!==e.issuer)throw Ut('unexpected "iss" (issuer) response parameter value',ji,{expected:e.issuer,parameters:i});switch(a){case void 0:case Ji:if(void 0!==o)throw Ut('unexpected "state" response parameter encountered',ji,{expected:void 0,parameters:i});break;case Ki:break;default:if(Dt(a,'"expectedState" argument'),o!==a)throw Ut(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',ji,{expected:a,parameters:i})}if($i(i,"error"))throw new Yt("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),bi.add(c),c;var c}(r,c,t.searchParams,null==i?void 0:i.expectedState)}catch(e){Ba(e)}}}const x=await async function(e,t,i,a,n,o,s){if(Kt(e),Jt(t),!bi.has(a))throw vt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',ht);Dt(n,'"redirectUri"');const r=$i(a,"code");if(!r)throw Ut('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!==xi&&(Dt(o,'"codeVerifier"'),c.set("code_verifier",o)),ui(e,t,i,"authorization_code",c,s)}(r,c,p,o,s,(null==i?void 0:i.pkceCodeVerifier)||xi,{additionalParameters:a,[yt]:l,[gt]:!u,DPoP:null==n?void 0:n.DPoP,headers:new Headers(za),signal:ln(v)}).catch(Ba);"string"!=typeof(null==i?void 0:i.expectedNonce)&&"number"!=typeof(null==i?void 0:i.maxAge)||(i.idTokenExpected=!0);const y=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=_i;break;case _i:break;default:Dt(a,'"expectedNonce" argument'),r.push("nonce")}switch(null!=n||(n=t.default_max_age),n){case void 0:n=ki;break;case ki:break;default:zt(n,!0,'"maxAge" argument'),r.push("auth_time")}const c=await fi(e,t,i,r,o,s);Dt(c.id_token,'"response" body "id_token" property',ji,{body:c});const p=hi(c);if(n!==ki){const e=$t()+Mt(t),i=Ht(t);if(p.auth_time+n<e-i)throw Ut("too much time has elapsed since the last End-User authentication",Oi,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(a===_i){if(void 0!==p.nonce)throw Ut('unexpected ID Token "nonce" claim value',Li,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==a)throw Ut('unexpected ID Token "nonce" claim value',Li,{expected:a,claims:p,claim:"nonce"});return c}(e,t,i,a.expectedNonce,a.maxAge,a[_t],a.recognizedTokenTypes):async function(e,t,i,a,n){const o=await fi(e,t,i,void 0,a,n),s=hi(o);if(s){if(void 0!==t.default_max_age){zt(t.default_max_age,!0,'"client.default_max_age"');const e=$t()+Mt(t),i=Ht(t);if(s.auth_time+t.default_max_age<e-i)throw Ut("too much time has elapsed since the last End-User authentication",Oi,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw Ut('unexpected ID Token "nonce" claim value',Li,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==a?void 0:a[_t],null==a?void 0:a.recognizedTokenTypes)}(r,c,x,{expectedNonce:null==i?void 0:i.expectedNonce,maxAge:null==i?void 0:i.maxAge,requireIdToken:null==i?void 0:i.idTokenExpected,[_t]:g});let w;try{w=await y}catch(t){if(un(t,n))return nn(e,void 0,i,a,d(d({},n),{},{flag:dn,authResponse:o,redirectUri:s}));Ba(t)}return w.id_token&&await(null==f?void 0:f(x)),Xa(w),w}async function on(e,t,i,a){pn(e),i=new URLSearchParams(i);const{as:n,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=Na(e),m=await async function(e,t,i,a,n){Kt(e),Jt(t),Dt(a,'"refreshToken"');const o=new URLSearchParams(null==n?void 0:n.additionalParameters);return o.set("refresh_token",a),ui(e,t,i,"refresh_token",o,n)}(n,o,s,t,{[yt]:r,[gt]:!c,additionalParameters:i,DPoP:null==a?void 0:a.DPoP,headers:new Headers(za),signal:ln(l)}).catch(Ba),h=async function(e,t,i,a){return fi(e,t,i,void 0,null==a?void 0:a[_t],null==a?void 0:a.recognizedTokenTypes)}(n,o,m,{[_t]:u});let f;try{f=await h}catch(n){if(un(n,a))return on(e,t,i,d(d({},a),{},{flag:dn}));Ba(n)}return f.id_token&&await(null==p?void 0:p(m)),Xa(f),f}async function sn(e,t,i){pn(e),t=new URLSearchParams(t);const{as:a,c:n,auth:o,fetch:s,tlsOnly:r,timeout:c}=Na(e),p=await async function(e,t,i,a,n){return Kt(e),Jt(t),ui(e,t,i,"client_credentials",new URLSearchParams(a),n)}(a,n,o,t,{[yt]:s,[gt]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(za),signal:ln(c)}).catch(Ba),l=async function(e,t,i){return fi(e,t,i,void 0,void 0,void 0)}(a,n,p);let u;try{u=await l}catch(a){if(un(a,i))return sn(e,t,d(d({},i),{},{flag:dn}));Ba(a)}return Xa(u),u}function rn(e,t){pn(e);const{as:i,c:a,tlsOnly:n,hybrid:o,jarm:s,implicit:r}=Na(e),c=Gt(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 Ja("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 cn(e,t,i){pn(e);const a=rn(e,t),{as:n,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=Na(e),l=await async function(e,t,i,a,n){var o;Kt(e),Jt(t);const s=Gt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[gt])),r=new URLSearchParams(a);r.set("client_id",t.client_id);const c=Rt(null==n?void 0:n.headers);c.set("accept","application/json"),void 0!==(null==n?void 0:n.DPoP)&&(ci(n.DPoP),await n.DPoP.addProof(s,c,"POST"));const p=await li(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,{[yt]:r,[gt]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(za),signal:ln(p)}).catch(Ba),u=async function(e,t,i){if(Kt(e),Jt(t),!mt(i,Response))throw vt('"response" must be an instance of Response',ft);await ri(i,201,"Pushed Authorization Request Endpoint"),qi(i);const a=await Fi(i);Dt(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 zt(n,!0,'"response" body "expires_in" property',ji,{body:a}),a.expires_in=n,a}(n,o,l);let m;try{m=await u}catch(a){if(un(a,i))return cn(e,t,d(d({},i),{},{flag:dn}));Ba(a)}return rn(e,{request_uri:m.request_uri})}function pn(e){if(!(e instanceof Ga))throw Ja('"config" must be an instance of Configuration',Ka);if(Object.getPrototypeOf(e)!==Ga.prototype)throw Ja("subclassing Configuration is not allowed",$a)}function ln(e){return e?AbortSignal.timeout(1e3*e):void 0}function un(e,t){return!(null==t||!t.DPoP||t.flag===dn)&&function(e){if(e instanceof Qt){const{0:t,length:i}=e.cause;return 1===i&&"dpop"===t.scheme&&"use_dpop_nonce"===t.parameters.error}return e instanceof Xt&&"use_dpop_nonce"===e.error}(e)}Object.freeze(Ga.prototype);const dn=Symbol();async function mn(e,t,i,a){pn(e);const{as:n,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=Na(e),u=await async function(e,t,i,a,n,o){return Kt(e),Jt(t),Dt(a,'"grantType"'),ui(e,t,i,a,new URLSearchParams(n),o)}(n,o,s,t,new URLSearchParams(i),{[yt]:r,[gt]:!c,DPoP:null==a?void 0:a.DPoP,headers:new Headers(za),signal:ln(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 fi(e,t,i,void 0,null==a?void 0:a[_t],null==a?void 0:a.recognizedTokenTypes)}(n,o,e,{[_t]:l,recognizedTokenTypes:i})}).catch(Ba);return Xa(u),u}async function hn(e,t,i){if(!wa(e))throw new la("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new la('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new la("JWS Protected Header incorrect type");if(void 0===e.payload)throw new la("JWS Payload missing");if("string"!=typeof e.signature)throw new la("JWS Signature missing or incorrect type");if(void 0!==e.header&&!wa(e.header))throw new la("JWS Unprotected Header incorrect type");let a={};if(e.protected)try{const t=Qi(e.protected);a=JSON.parse(Gi.decode(t))}catch(e){throw new la("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 la("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n=d(d({},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 pa('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)}(la,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 la('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=n;if("string"!=typeof r||!r)throw new la('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 ca('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new la("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new la("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(_a(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Ra(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(!xa(t))throw new TypeError(na(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(Ca(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(_a(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Ra(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)&&Ra(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!xa(t))throw new TypeError(na(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(Ca(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(Ca(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Ca(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(Ca(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Ca(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?Xi(e.protected):new Uint8Array,Xi("."),"string"==typeof e.payload?s?Xi(e.payload):Zi.encode(e.payload):e.payload),u=ya(e.signature,"signature",la),m=await async function(e,t){if(e instanceof Uint8Array)return e;if(ga(e))return e;if(ba(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{Ea||(Ea=new WeakMap);let i=Ea.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(Ta)}o=e.toCryptoKey(e.asymmetricKeyType,n,a?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(Ta);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(Ta);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(Ta)}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(Ta);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(Ta);return i?i[t]=o:Ea.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return Aa(e,i,t)}if(_a(e))return e.k?Qi(e.k):Aa(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 aa("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(!ta(e.algorithm,"HMAC"))throw ea("HMAC");ia(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if(!ta(e.algorithm,"RSASSA-PKCS1-v1_5"))throw ea("RSASSA-PKCS1-v1_5");ia(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if(!ta(e.algorithm,"RSA-PSS"))throw ea("RSA-PSS");ia(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if(!ta(e.algorithm,"Ed25519"))throw ea("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!ta(e.algorithm,t))throw ea(t);break;case"ES256":case"ES384":case"ES512":{if(!ta(e.algorithm,"ECDSA"))throw ea("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 ea(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 pa("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,m,u,l))throw new va;let h;h=s?ya(e.payload,"payload",la):"string"==typeof e.payload?Zi.encode(e.payload):e.payload;const f={payload:h};return void 0!==e.protected&&(f.protectedHeader=a),void 0!==e.header&&(f.unprotectedHeader=e.header),p?d(d({},f),{},{key:m}):f}const fn=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function vn(e){const t=fn.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 gn=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function bn(e,t){let i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Gi.decode(t))}catch(e){}if(!wa(i))throw new ua("JWT Claims Set must be a top-level JSON object");const{typ:n}=a;if(n&&("string"!=typeof e.typ||gn(e.typ)!==gn(n)))throw new sa('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 sa('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new sa('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new sa('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 sa('unexpected "aud" claim value',i,"aud","check_failed");var u,d;let m;switch(typeof a.clockTolerance){case"string":m=vn(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 sa('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new sa('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>f+m)throw new sa('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new sa('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=f-m)throw new ra('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=f-i.iat;if(e-m>("number"==typeof p?p:vn(p)))throw new ra('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-m)throw new sa('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}function xn(e){return wa(e)}var yn,wn,_n=new WeakMap,kn=new WeakMap;class Sn{constructor(e){if(c(this,_n,void 0),c(this,kn,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(xn)}(e))throw new da("JSON Web Key Set malformed");p(_n,this,structuredClone(e))}jwks(){return r(_n,this)}async getKey(e,t){const{alg:i,kid:a}=d(d({},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 pa('Unsupported "alg" value for a JSON Web Key Set')}}(i),s=r(_n,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:c,length:p}=s;if(0===p)throw new ma;if(1!==p){const e=new ha,t=r(kn,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new h(e.apply(this,arguments))}}(function*(){for(const e of s)try{yield yield o(Tn(t,e,i))}catch(e){}}),e}return Tn(r(kn,this),c,i)}}async function Tn(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(!wa(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 Qi(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new pa('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return Sa(d(d({},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 Sa(d(d({},e),{},{ext:i}));case"EC":case"OKP":return Sa(d(d({},e),{},{alg:t,ext:i}));default:throw new pa('Unsupported "kty" (Key Type) Parameter value')}}(d(d({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new da("JSON Web Key Set members must be public keys");a[i]=e}return a[i]}function En(e){const t=new Sn(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 An;if("undefined"==typeof navigator||null===(yn=navigator.userAgent)||void 0===yn||null===(wn=yn.startsWith)||void 0===wn||!wn.call(yn,"Mozilla/5.0 ")){const e="v6.2.2";An="".concat("jose","/").concat(e)}const Pn=Symbol(),jn=Symbol();var In=new WeakMap,Un=new WeakMap,Cn=new WeakMap,Rn=new WeakMap,On=new WeakMap,Ln=new WeakMap,zn=new WeakMap,Dn=new WeakMap,Nn=new WeakMap,qn=new WeakMap;class Wn{constructor(e,t){if(c(this,In,void 0),c(this,Un,void 0),c(this,Cn,void 0),c(this,Rn,void 0),c(this,On,void 0),c(this,Ln,void 0),c(this,zn,void 0),c(this,Dn,void 0),c(this,Nn,void 0),c(this,qn,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,a;p(In,this,new URL(e.href)),p(Un,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),p(Cn,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),p(Rn,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),p(zn,this,new Headers(null==t?void 0:t.headers)),An&&!r(zn,this).has("User-Agent")&&r(zn,this).set("User-Agent",An),r(zn,this).has("accept")||(r(zn,this).set("accept","application/json"),r(zn,this).append("accept","application/jwk-set+json")),p(Dn,this,null==t?void 0:t[Pn]),void 0!==(null==t?void 0:t[jn])&&(p(qn,this,null==t?void 0:t[jn]),i=null==t?void 0:t[jn],a=r(Rn,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=a)&&"jwks"in i&&wa(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,wa)&&(p(On,this,r(qn,this).uat),p(Nn,this,En(r(qn,this).jwks))))}pendingFetch(){return!!r(Ln,this)}coolingDown(){return"number"==typeof r(On,this)&&Date.now()<r(On,this)+r(Cn,this)}fresh(){return"number"==typeof r(On,this)&&Date.now()<r(On,this)+r(Rn,this)}jwks(){var e;return null===(e=r(Nn,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){r(Nn,this)&&this.fresh()||await this.reload();try{return await r(Nn,this).call(this,e,t)}catch(i){if(i instanceof ma&&!1===this.coolingDown())return await this.reload(),r(Nn,this).call(this,e,t);throw i}}async reload(){r(Ln,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&p(Ln,this,void 0),r(Ln,this)||p(Ln,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 fa;throw e});if(200!==n.status)throw new oa("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch(e){throw new oa("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(r(In,this).href,r(zn,this),AbortSignal.timeout(r(Un,this)),r(Dn,this)).then(e=>{p(Nn,this,En(e)),r(qn,this)&&(r(qn,this).uat=Date.now(),r(qn,this).jwks=e),p(On,this,Date.now()),p(Ln,this,void 0)}).catch(e=>{throw p(Ln,this,void 0),e})),await r(Ln,this)}}const Mn=["mfaToken"],Hn=["mfaToken"];var $n,Kn,Jn,Fn,Vn,Bn,Zn,Gn,Xn,Yn,Qn,eo,to,io,ao,no,oo=class extends Error{constructor(e,t){super(t),l(this,"code",void 0),this.name="NotSupportedError",this.code=e}},so=class extends Error{constructor(e,t,i){super(t),l(this,"cause",void 0),l(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},ro=class extends so{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},co=class extends so{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},po=class extends so{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},lo=class extends so{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},uo=class extends so{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},mo=class extends so{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},ho=class extends Error{constructor(e){super(e),l(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},fo=class extends so{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),l(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},vo=class extends so{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},go=class extends so{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},bo=class extends so{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},xo=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),l(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function yo(e){return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).reduce((e,t)=>d(d({},e),{},{[t[0]]:t[1]}),{})}var wo=class extends Error{constructor(e,t,i){super(t),l(this,"cause",void 0),l(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},_o=class extends wo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},ko=class extends wo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},So=class extends wo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},To=class extends wo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function Eo(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var Ao=($n=new WeakMap,Kn=new WeakMap,Jn=new WeakMap,class{constructor(e){var t;c(this,$n,void 0),c(this,Kn,void 0),c(this,Jn,void 0),p($n,this,"https://".concat(e.domain)),p(Kn,this,e.clientId),p(Jn,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(r($n,this),"/mfa/authenticators"),{mfaToken:i}=e,a=await r(Jn,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 _o(e.error_description||"Failed to list authenticators",e)}return(await a.json()).map(Eo)}async enrollAuthenticator(e){const t="".concat(r($n,this),"/mfa/associate"),{mfaToken:i}=e,a=m(e,Mn),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 r(Jn,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 ko(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(r($n,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),n=await r(Jn,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 So(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(r($n,this),"/mfa/challenge"),{mfaToken:i}=e,a=m(e,Hn),n={mfa_token:i,client_id:r(Kn,this),challenge_type:a.challengeType};a.authenticatorId&&(n.authenticator_id=a.authenticatorId);const o=await r(Jn,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 To(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())}}),Po=class e{constructor(e,t,i,a,n,o,s){l(this,"accessToken",void 0),l(this,"idToken",void 0),l(this,"refreshToken",void 0),l(this,"expiresAt",void 0),l(this,"scope",void 0),l(this,"claims",void 0),l(this,"authorizationDetails",void 0),l(this,"tokenType",void 0),l(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}},jo=(Fn=new WeakMap,Vn=new WeakMap,Bn=new WeakMap,class{constructor(e,t){c(this,Fn,new Map),c(this,Vn,void 0),c(this,Bn,void 0),p(Bn,this,Math.max(1,Math.floor(e))),p(Vn,this,Math.max(0,Math.floor(t)))}get(e){const t=r(Fn,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return r(Fn,this).delete(e),r(Fn,this).set(e,t),t.value;r(Fn,this).delete(e)}}set(e,t){for(r(Fn,this).has(e)&&r(Fn,this).delete(e),r(Fn,this).set(e,{value:t,expiresAt:Date.now()+r(Vn,this)});r(Fn,this).size>r(Bn,this);){const e=r(Fn,this).keys().next().value;if(void 0===e)break;r(Fn,this).delete(e)}}}),Io=new Map;function Uo(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 Co=class{static createDiscoveryCache(e){const t=(i=e.maxEntries,a=e.ttlMs,"".concat(i,":").concat(a));var i,a;let n=(o=t,Io.get(o));var o;return n||(n=new jo(e.maxEntries,e.ttlMs),Io.set(t,n)),n}static createJwksCache(){return{}}},Ro="openid profile email offline_access",Oo=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 Lo(e){if(null==e)throw new mo("subject_token is required");if("string"!=typeof e)throw new mo("subject_token must be a string");if(0===e.trim().length)throw new mo("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new mo("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new mo("subject_token must not include the 'Bearer ' prefix")}function zo(e,t){if(t)for(const[i,a]of Object.entries(t))if(!Oo.has(i))if(Array.isArray(a)){if(a.length>20)throw new mo("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));a.forEach(t=>{e.append(i,t)})}else e.append(i,a)}var Do="urn:ietf:params:oauth:token-type:access_token",No=(Zn=new WeakMap,Gn=new WeakMap,Xn=new WeakMap,Yn=new WeakMap,Qn=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,ao=new WeakMap,no=new WeakSet,class{constructor(e){var t,i,a,n;if(function(e,t){s(e,t),t.add(e)}(this,no),c(this,Zn,void 0),c(this,Gn,void 0),c(this,Xn,void 0),c(this,Yn,void 0),c(this,Qn,void 0),c(this,eo,void 0),c(this,to,void 0),c(this,io,void 0),c(this,ao,void 0),l(this,"mfa",void 0),p(Yn,this,e),e.useMtls&&!e.customFetch)throw new oo("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");p(Qn,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,d(d({},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.6.0"}));const o=Uo(e.discoveryCache);p(to,this,Co.createDiscoveryCache(o)),p(io,this,new Map),p(ao,this,Co.createJwksCache()),this.mfa=new Ao({domain:r(Yn,this).domain,clientId:r(Yn,this).clientId,customFetch:r(Qn,this)})}async getServerMetadata(){const{serverMetadata:e}=await n(no,this,Mo).call(this);return e}async buildAuthorizationUrl(e){const{serverMetadata:t}=await n(no,this,Mo).call(this);if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new oo("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 n(no,this,Jo).call(this,e)}catch(e){throw new vo(e)}}async buildLinkUserUrl(e){try{const t=await n(no,this,Jo).call(this,{authorizationParams:d(d({},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 go(e)}}async buildUnlinkUserUrl(e){try{const t=await n(no,this,Jo).call(this,{authorizationParams:d(d({},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 bo(e)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await n(no,this,Mo).call(this),a=yo(d(d({},r(Yn,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(d(d({scope:Ro},a),{},{client_id:r(Yn,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&o.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&o.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await en(t,o),i=await tn(t,e);return Po.fromTokenEndpointResponse(i)}catch(e){throw new fo(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await n(no,this,Mo).call(this),a=yo(d(d({},r(Yn,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(d(d({scope:Ro},a),{},{client_id:r(Yn,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&o.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&o.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await en(t,o);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new fo(e)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:i}=await n(no,this,Mo).call(this),a=new URLSearchParams({auth_req_id:t});try{const e=await mn(i,"urn:openid:params:grant-type:ciba",a);return Po.fromTokenEndpointResponse(e)}catch(e){throw new fo(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new uo("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 uo("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?Do:"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof mo)throw new uo(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?n(no,this,Ho).call(this,e):n(no,this,$o).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await n(no,this,Mo).call(this);try{const a=await nn(i,e,{pkceCodeVerifier:t.codeVerifier});return Po.fromTokenEndpointResponse(a)}catch(e){throw new ro("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await n(no,this,Mo).call(this),i=new URLSearchParams;e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope);try{const a=await on(t,e.refreshToken,i);return Po.fromTokenEndpointResponse(a)}catch(e){throw new po("The access token has expired and there was an error while trying to refresh it.",e)}}async getTokenByPassword(e){const{configuration:t}=await n(no,this,Mo).call(this),i=new URLSearchParams({username:e.username,password:e.password});e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope),e.realm&&i.append("realm",e.realm);let a=t;if(e.auth0ForwardedFor){const i=await n(no,this,Ko).call(this);a=new Ga(t.serverMetadata(),r(Yn,this).clientId,r(Yn,this).clientSecret,i),a[Ha]=(t,i)=>r(Qn,this).call(this,t,d(d({},i),{},{headers:d(d({},i.headers),{},{"auth0-forwarded-for":e.auth0ForwardedFor})}))}try{const e=await mn(a,"password",i);return Po.fromTokenEndpointResponse(e)}catch(e){throw new lo("There was an error while trying to request a token.",e)}}async getTokenByClientCredentials(e){const{configuration:t}=await n(no,this,Mo).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const a=await sn(t,i);return Po.fromTokenEndpointResponse(a)}catch(e){throw new co("There was an error while trying to request a token.",e)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:i}=await n(no,this,Mo).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(r(Yn,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",r(Yn,this).clientId),t}return function(e,t){pn(e);const{as:i,c:a,tlsOnly:n}=Na(e),o=Gt(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 n(no,this,Mo).call(this),i=Uo(r(Yn,this).discoveryCache),a=t.jwks_uri;r(eo,this)||p(eo,this,function(e,t){const i=new Wn(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,[Pn]:r(Qn,this),[jn]:r(ao,this)}));const{payload:o}=await async function(e,t,i){var a;const n=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Gi.decode(e)),"string"!=typeof e)throw new la("Compact JWS must be a string or Uint8Array");const{0:a,1:n,2:o,length:s}=e.split(".");if(3!==s)throw new la("Invalid Compact JWS");const r=await hn({payload:n,protected:a,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?d(d({},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 ua("JWTs MUST NOT use unencoded payload");const o={payload:bn(n.protectedHeader,n.payload,i),protectedHeader:n.protectedHeader};return"function"==typeof t?d(d({},o),{},{key:n.key}):o}(e.logoutToken,r(eo,this),{issuer:t.issuer,audience:r(Yn,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in o)&&!("sub"in o))throw new ho('either "sid" or "sub" (or both) claims must be present');if("sid"in o&&"string"!=typeof o.sid)throw new ho('"sid" claim must be a string');if("sub"in o&&"string"!=typeof o.sub)throw new ho('"sub" claim must be a string');if("nonce"in o)throw new ho('"nonce" claim is prohibited');if(!("events"in o))throw new ho('"events" claim is missing');if("object"!=typeof o.events||null===o.events)throw new ho('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in o.events))throw new ho('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if("object"!=typeof o.events["http://schemas.openid.net/event/backchannel-logout"])throw new ho('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:o.sid,sub:o.sub}}});function qo(){const e=r(Yn,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(r(Yn,this).useMtls?"1":"0")}async function Wo(e){const t=await n(no,this,Ko).call(this),i=new Ga(e,r(Yn,this).clientId,r(Yn,this).clientSecret,t);return i[Ha]=r(Qn,this),i}async function Mo(){if(r(Zn,this)&&r(Gn,this))return{configuration:r(Zn,this),serverMetadata:r(Gn,this)};const e=n(no,this,qo).call(this),t=r(to,this).get(e);if(t)return p(Gn,this,t.serverMetadata),p(Zn,this,await n(no,this,Wo).call(this,t.serverMetadata)),{configuration:r(Zn,this),serverMetadata:r(Gn,this)};const i=r(io,this).get(e);if(i){const e=await i;return p(Gn,this,e.serverMetadata),p(Zn,this,await n(no,this,Wo).call(this,e.serverMetadata)),{configuration:r(Zn,this),serverMetadata:r(Gn,this)}}const a=(async()=>{const t=await n(no,this,Ko).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 Ja('"server" must be an instance of URL',Ka);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 vt('"'.concat("issuerIdentifier",'" must be an instance of URL'),ft);Bt(e,!0!==(null==a?void 0:a[gt]));const n=i(new URL(e.href)),o=Rt(null==a?void 0:a.headers);return o.set("accept","application/json"),((null==a?void 0:a[yt])||fetch)(n.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:Ot(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=Lt("".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=Lt("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw vt('"options.algorithm" must be "oidc" (default), or "oauth2"',ht)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[yt]:null==t?void 0:t[Ha],[gt]:null==t||null===(a=t.execute)||void 0===a?void 0:a.includes(an),signal:s,headers:new Headers(za)}):((null==t?void 0:t[Ha])||fetch)((Bt(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(an)),e.href),{headers:Object.fromEntries(new Headers(d({accept:"application/json"},za)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Vi)throw vt('"expectedIssuerIdentifier" must be an instance of URL',ft);if(!mt(t,Response))throw vt('"response" must be an instance of Response',ft);if(200!==t.status)throw Ut('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Ui,t);qi(t);const a=await Fi(t);if(Dt(a.issuer,'"response" body "issuer" property',ji,{body:a}),i!==Vi&&new URL(a.issuer).href!==i.href)throw Ut('"response" body "issuer" property does not match the expected value',zi,{expected:i.href,body:a,attribute:"issuer"});return a}(Vi,e)).catch(Ba);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[Za]=!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 Fa("discovered metadata issuer does not match the expected issuer",{code:zi,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,n),s=new Ga(o,t,i,a);let r=Na(s);if(null!=n&&n[Ha]&&(r.fetch=n[Ha]),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(r(Yn,this).domain)),r(Yn,this).clientId,{use_mtls_endpoint_aliases:r(Yn,this).useMtls},t,{[Ha]:r(Qn,this)}),a=i.serverMetadata();return r(to,this).set(e,{serverMetadata:a}),{configuration:i,serverMetadata:a}})(),o=a.then(e=>{let{serverMetadata:t}=e;return{serverMetadata:t}});o.catch(()=>{}),r(io,this).set(e,o);try{const{configuration:e,serverMetadata:t}=await a;p(Zn,this,e),p(Gn,this,t),r(Zn,this)[Ha]=r(Qn,this)}finally{r(io,this).delete(e)}return{configuration:r(Zn,this),serverMetadata:r(Gn,this)}}async function Ho(e){var t,i;const{configuration:a}=await n(no,this,Mo).call(this);if("audience"in e||"resource"in e)throw new mo("audience and resource parameters are not supported for Token Vault exchanges");Lo(e.subjectToken);const o=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:Do,requested_token_type:null!==(i=e.requestedTokenType)&&void 0!==i?i:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&o.append("login_hint",e.loginHint),e.scope&&o.append("scope",e.scope),zo(o,e.extra);try{const e=await mn(a,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",o);return Po.fromTokenEndpointResponse(e)}catch(t){throw new mo("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function $o(e){const{configuration:t}=await n(no,this,Mo).call(this);Lo(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),zo(i,e.extra);try{const e=await mn(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Po.fromTokenEndpointResponse(e)}catch(t){throw new mo("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function Ko(){return r(Xn,this)||p(Xn,this,(async()=>{if(!r(Yn,this).clientSecret&&!r(Yn,this).clientAssertionSigningKey&&!r(Yn,this).useMtls)throw new xo;if(r(Yn,this).useMtls)return(e,t,i,a)=>{i.set("client_id",t.client_id)};let e=r(Yn,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=>Yi(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){Ia(e,48,"Invalid PKCS#8 structure"),ja(e),Ia(e,2,"Expected version field");const t=ja(e);e.pos+=t,Ia(e,48,"Expected algorithm identifier"),ja(e),e.pos}(t),(e=>{const t=(e=>{Ia(e,6,"Expected algorithm OID");const t=ja(e);return Ua(e,t)})(e);if(Pa(t,[43,101,110]))return"X25519";if(!Pa(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Ia(e,6,"Expected curve OID");const i=ja(e),a=Ua(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(Pa(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 pa("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 pa('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,r(Yn,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&&Dt(n.kid,'"kid"'),{key:n.key,kid:n.kid}):{};var n;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw vt("".concat(t," must be a CryptoKey"),ft)}(e,t),"private"!==e.type)throw vt("".concat(t," must be a private CryptoKey"),ht)}(i,'"clientPrivateKey.key"'),async(e,n,o,s)=>{var r;const c={alg:Wt(i),kid:a},p=function(e,t){const i=$t()+Mt(t);return{jti:qt(),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[wt])||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 vt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',ht);const a="".concat(Pt(Tt(JSON.stringify(e))),".").concat(Pt(Tt(JSON.stringify(t)))),n=Pt(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Mi(e)};case"RSA-PSS":switch(Wi(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 Wi(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,Tt(a)));return"".concat(a,".").concat(n)}(c,p,i))}}(e,void 0)}(e):Ma(r(Yn,this).clientSecret)})().catch(e=>{throw p(Xn,this,void 0),e})),r(Xn,this)}async function Jo(e){const{configuration:t}=await n(no,this,Mo).call(this),i=qt(),a=await function(e){return async function(e){return Dt(e,"codeVerifier"),Pt(await crypto.subtle.digest("SHA-256",Tt(e)))}(e)}(i),o=yo(d(d({},r(Yn,this).authorizationParams),null==e?void 0:e.authorizationParams)),s=new URLSearchParams(d(d({scope:Ro},o),{},{client_id:r(Yn,this).clientId,code_challenge:a,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await cn(t,s):await rn(t,s),codeVerifier:i}}class Fo extends y{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Fo.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new Fo(t,i)}}class Vo extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Vo.prototype)}}class Bo extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Bo.prototype)}}class Zo extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Zo.prototype)}}class Go extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Go.prototype)}}class Xo extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Xo.prototype)}}class Yo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;l(this,"contexts",new Map),l(this,"ttlMs",void 0),this.ttlMs=e}set(e,t){this.cleanup(),this.contexts.set(e,d(d({},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 Qo{constructor(e,t){l(this,"authJsMfaClient",void 0),l(this,"auth0Client",void 0),l(this,"contextManager",void 0),this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new Yo}setMFAAuthDetails(e,t,i,a){this.contextManager.set(e,{scope:t,audience:i,mfaRequirements:a})}async getAuthenticators(e){var t;const i=this.contextManager.get(e);if(null==i||null===(t=i.mfaRequirements)||void 0===t||!t.challenge||0===i.mfaRequirements.challenge.length)throw new Vo("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const a=i.mfaRequirements.challenge.map(e=>e.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:e})).filter(e=>!!e.type&&a.includes(e.type))}catch(e){var n;if(e instanceof _o)throw new Vo(null===(n=e.cause)||void 0===n?void 0:n.error,e.message);throw e}}async enroll(e){const t=function(e){const t=pt[e.factorType];return d(d(d({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(t)}catch(e){var i;if(e instanceof ko)throw new Bo(null===(i=e.cause)||void 0===i?void 0:i.error,e.message);throw e}}async challenge(e){try{const t={challengeType:e.challengeType,mfaToken:e.mfaToken};return e.authenticatorId&&(t.authenticatorId=e.authenticatorId),await this.authJsMfaClient.challengeAuthenticator(t)}catch(e){var t;if(e instanceof To)throw new Zo(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 Xo("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 Go("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 Go("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 A)this.setMFAAuthDetails(e.mfa_token,a,n,e.mfa_requirements);else if(e instanceof Go)throw new Go(e.error,e.error_description);throw e}}}const es=["openUrl","fragment","appState"],ts=["url"],is=["cacheMode"],as=["federated"],ns=["openUrl"],os=["id_token","decodedToken"],ss=["mfaToken"];class rs{constructor(e){let t,i;if(l(this,"transactionManager",void 0),l(this,"cacheManager",void 0),l(this,"lockManager",void 0),l(this,"domainUrl",void 0),l(this,"tokenIssuer",void 0),l(this,"scope",void 0),l(this,"cookieStorage",void 0),l(this,"dpop",void 0),l(this,"sessionCheckExpiryDays",void 0),l(this,"orgHintCookieName",void 0),l(this,"isAuthenticatedCookieName",void 0),l(this,"nowProvider",void 0),l(this,"httpTimeoutMs",void 0),l(this,"options",void 0),l(this,"userCache",(new Ie).enclosedCache),l(this,"myAccountApi",void 0),l(this,"mfa",void 0),l(this,"worker",void 0),l(this,"authJsClient",void 0),l(this,"defaultOptions",{authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0}),this.options=d(d(d({},this.defaultOptions),e),{},{authorizationParams:d(d({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!R())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===R().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=(ne||(ne=function(){return"undefined"!=typeof navigator&&"function"==typeof(null===(e=navigator.locks)||void 0===e?void 0:e.request)?new ie:new ae;var e}()),ne),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||v,!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?We:He,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:$e;var o;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{[x]:Se(t,e,...a)};let o={[x]:Se(t,...a)};return Object.keys(e).forEach(i=>{const n=e[i];o[i]=Se(t,n,...a)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Ce(n,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||b,this.cacheManager=new Ue(i,i.allKeys?void 0:new Ze(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new nt(this.options.clientId):void 0,this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),r=this.createFetcher(d(d({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{},{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new rt(r,s),this.authJsClient=new No({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new Qo(this.authJsClient.mfa,this),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&t===v&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Ve,this.worker.postMessage({type:"init",allowedBaseUrl:this.domainUrl}))}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=this.options.auth0Client||g,i=D(t,!0),a=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(a)}_authorizeUrl(e){return this._url("/authorize?".concat(N(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(W(a)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],Oe.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:a,signature:n},header:JSON.parse(W(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&&!Re(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||!Re(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Re(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&&Re(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&&Re(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})}_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),d(d({},e),{},{session_transfer_token:i})):e}async _prepareAuthorizeUrl(e,t,i){var a;const n=L(O()),o=L(O()),s=O(),r=await q(s),c=M(r),p=await(null===(a=this.dpop)||void 0===a?void 0:a.calculateThumbprint()),l=((e,t,i,a,n,o,s,r,c)=>d(d(d({client_id:e.clientId},e.authorizationParams),i),{},{scope:Te(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,c,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,p),u=this._authorizeUrl(l);return{nonce:o,code_verifier:s,scope:l.scope,audience:l.audience||x,redirect_uri:l.redirect_uri,state:n,url:u}}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 E;const a=this._applySessionTransferToken(e.authorizationParams||{}),n=await this._prepareAuthorizeUrl(a,{response_mode:"web_message"},window.location.origin);t.popup.location.href=n.url;const o=await((e,t)=>new Promise((i,a)=>{let n;const o=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(s),window.removeEventListener("message",n,!1),a(new T(e.popup)))},1e3),s=setTimeout(()=>{clearInterval(o),a(new S(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(r){if(r.origin===t&&r.data&&"authorization_response"===r.data.type){if(clearTimeout(s),clearInterval(o),window.removeEventListener("message",n,!1),!1!==e.closePopup&&e.popup.close(),r.data.response.error)return a(y.fromPayload(r.data.response));i(r.data.response)}},window.addEventListener("message",n)}))(d(d({},t),{},{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}),new URL(n.url).origin);if(n.state!==o.state)throw new y("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:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:n.redirect_uri},{nonceIn:n.nonce,organization:s})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null==t||null===(e=t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null==t||null===(e=t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=et(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:i,fragment:a,appState:n}=t,o=m(t,es),s=(null===(e=o.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,r=this._applySessionTransferToken(o.authorizationParams||{}),c=await this._prepareAuthorizeUrl(r),{url:p}=c,l=m(c,ts);this.transactionManager.create(d(d({},l),{},{appState:n,response_type:Ke.Code},s&&{organization:s}));const u=a?"".concat(p,"#").concat(a):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 y("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===Ke.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 w(n,o||n,a,t.appState);if(!t.code_verifier||t.state&&t.state!==a)throw new y("state_mismatch","Invalid state");const s=t.organization,r=t.nonce,c=t.redirect_uri;return await this._requestToken(d({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:Ke.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:a,error:n,error_description:o}=e;if(n)throw new _(n,o||n,t.connection,a,t.appState);if(!i)throw new y("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===a))throw new y("state_mismatch","Invalid state");return d(d({},await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:i,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier})),{},{appState:t.appState,response_type:Ke.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(Xe))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(Xe)}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=d(d({cacheMode:"on"},i),{},{authorizationParams:d(d(d({},this.options.authorizationParams),i.authorizationParams),{},{scope:Te(this.scope,null===(e=i.authorizationParams)||void 0===e?void 0:e.scope,(null===(t=i.authorizationParams)||void 0===t?void 0:t.audience)||this.options.authorizationParams.audience)})}),n=await((e,t)=>{let i=Be[t];return i||(i=e().finally(()=>{delete Be[t],i=null}),Be[t]=i),i})(()=>this._getTokenSilently(a),"".concat(this.options.clientId,"::").concat(a.authorizationParams.audience,"::").concat(a.authorizationParams.scope));return i.detailedResponse?n:null==n?void 0:n.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,i=m(e,is);if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||x,clientId:this.options.clientId,cacheMode:t});if(e)return e}if("cache-only"===t)return;const a=(n=this.options.clientId,o=i.authorizationParams.audience||"default","".concat("auth0.lock.getTokenSilently",".").concat(n,".").concat(o));var n,o;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||x,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 d(d({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 A||e instanceof y&&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||x,clientId:this.options.clientId});if(!t)throw new y("interactive_handler_cache_miss","Token not found in cache after interactive authentication");return t}catch(e){throw e}}async getTokenWithPopup(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=d(d({},i),{},{authorizationParams:d(d(d({},this.options.authorizationParams),i.authorizationParams),{},{scope:Te(this.scope,null===(e=i.authorizationParams)||void 0===e?void 0:e.scope,(null===(t=i.authorizationParams)||void 0===t?void 0:t.audience)||this.options.authorizationParams.audience)})});return a=d(d({},f),a),await this.loginWithPopup(n,a),(await this.cacheManager.get(new Pe({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||x,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=m(t,as),n=i?"&federated":"";return this._url("/v2/logout?".concat(N(d({clientId:e.clientId},a))))+n}async logout(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=et(t),{openUrl:a}=i,n=m(i,ns);null===t.clientId?await this.cacheManager.clear():await this.cacheManager.clear(t.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(Ae),await(null===(e=this.dpop)||void 0===e?void 0:e.clear());const o=this._buildLogoutUrl(n);a?await a(o):!1!==a&&window.location.assign(o)}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=d(d({},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:p}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);if(window.crossOriginIsolated)throw new y("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const l=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let u;try{u=new URL(this.domainUrl).origin}catch(e){u=this.domainUrl}const m=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 k),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(y.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,u,l);if(n!==m.state)throw new y("state_mismatch","Invalid state");const h=await this._requestToken(d(d({},e.authorizationParams),{},{code_verifier:s,code:m.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return d(d({},h),{},{scope:c,oauthTokenScope:h.scope,audience:p})})}catch(e){throw"login_required"===e.error&&(e instanceof y&&this._isIframeMfaError(e)&&"popup"===this.options.interactiveErrorHandler||this.logout({openUrl:!1})),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Pe({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||x,clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new P(e.authorizationParams.audience||x,e.authorizationParams.scope)}const i=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,n=((e,t,i,a)=>{if(e&&i&&a){var n;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==t?void 0:t.audience,null==t?void 0:t.scope);try{const o=await this._requestToken(d(d({},e.authorizationParams),{},{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:i},a&&{timeout:a}),{scopesToRequest:n});if(o.refresh_token&&null!=t&&t.refresh_token&&await this.cacheManager.updateEntry(t.refresh_token,o.refresh_token),this.options.useMrrt&&(r=null==t?void 0:t.audience,c=null==t?void 0:t.scope,p=e.authorizationParams.audience,l=e.authorizationParams.scope,!(r===p&&tt(l,c)||tt(n,o.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const t=((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(",")})(n,o.scope);throw new j(e.authorizationParams.audience||"default",t)}return d(d({},o),{},{scope:e.authorizationParams.scope,oauthTokenScope:o.scope,audience:e.authorizationParams.audience||x})}catch(t){if(t.message){if(t.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),t;if((t.message.includes("Missing Refresh Token")||t.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e)}var o,s;throw t instanceof A&&this.mfa.setMFAAuthDetails(t.mfa_token,null===(o=e.authorizationParams)||void 0===o?void 0:o.scope,null===(s=e.authorizationParams)||void 0===s?void 0:s.audience,t.mfa_requirements),t}var r,c,p,l}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,a=m(e,os);this.userCache.set(Ae,{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||x,t=this.scope[e],i=await this.cacheManager.getIdToken(new Pe({clientId:this.options.clientId,audience:e,scope:t})),a=this.userCache.get(Ae);return i&&i.id_token===(null==a?void 0:a.id_token)?a:(this.userCache.set(Ae,i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:a,cacheMode:n}=e;const o=await this.cacheManager.get(new Pe({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&&d(d({id_token:n.id_token,token_type:e||"Bearer",access_token:t},i?{scope:i}:null),{},{expires_in:a})}}async _requestToken(e,t){const{nonceIn:i,organization:a,scopesToRequest:n}=t||{},o=await async function(e,t){let{baseUrl:i,timeout:a,audience:n,scope:o,auth0Client:s,useFormData:r,useMrrt:c,dpop:p}=e,l=m(e,ke);const u="urn:ietf:params:oauth:grant-type:token-exchange"===l.grant_type,h="refresh_token"===l.grant_type&&c,f=d(d(d(d({},l),u&&n&&{audience:n}),u&&o&&{scope:o}),h&&{audience:n,scope:o}),v=r?N(f):JSON.stringify(f),b=(y=l.grant_type,be.includes(y));var y;return await _e("".concat(i,"/oauth/token"),a,n||x,o,{method:"POST",body:v,headers:{"Content-Type":r?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(D(s||g)))}},t,r,c,b?p:void 0)}(d(d({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:n||e.scope}),this.worker),s=await this._verifyIdToken(o.id_token,i,a);if("authorization_code"===e.grant_type){var r;const e=await this._getIdTokenFromCache();null!=e&&null!==(r=e.decodedToken)&&void 0!==r&&null!==(r=r.claims)&&void 0!==r&&r.sub&&e.decodedToken.claims.sub!==s.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove(Ae))}return await this._saveEntryInCache(d(d(d({},o),{},{decodedToken:s,scope:e.scope,audience:e.audience||x},o.scope?{oauthTokenScope:o.scope}:null),{},{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||s.claims.org_id),d(d({},o),{},{decodedToken:s})}async loginWithCustomTokenExchange(e){return this._requestToken(d(d({},e),{},{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:Te(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 st(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null==e||null===(t=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=L(O()),c=O(),p=await q(c),l=M(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:Ke.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=m(e,ss);return this._requestToken(d(d({},a),{},{mfa_token:i}),t)}}async function cs(e){const t=new rs(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(M(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(M(e,ArrayBuffer)||e&&M(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(M(e,SharedArrayBuffer)||e&&M(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||H(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)||M(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 I(this,t,i);case"utf8":case"utf-8":return E(this,t,i);case"ascii":return P(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return T(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(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),H(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(H(r))return s;e[i+s]=r}return s}function w(e,t,i,a){return W(N(t,e.length-i),e,i,a)}function _(e,t,i,a){return W(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 W(q(t),e,i,a)}function S(e,t,i,a){return W(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 T(e,t,i){return 0===t&&i===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,i))}function E(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<=A)return String.fromCharCode.apply(String,e);for(var i="",a=0;a<t;)i+=String.fromCharCode.apply(String,e.slice(a,a+=A));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(M(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),M(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(M(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?E(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(M(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 A=4096;function P(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 j(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 I(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+=$[e[o]];return n}function U(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 R(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 O(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||O(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||O(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||R(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||R(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||R(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||R(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||R(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||R(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||R(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);R(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);R(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||R(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||R(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||R(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||R(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||R(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 W(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 M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var $=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:()=>O,AnnotationInclusionMode:()=>re,AnnotationType:()=>ne,AreaType:()=>le,ArtifactType:()=>ve,AssetInclusionMode:()=>se,AssetStatus:()=>ae,AssetUrlType:()=>_e,AutoAnnotateStatus:()=>ie,AutoAnnotateTask:()=>ce,ChangeType:()=>be,ContourType:()=>j,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>ee,DataEndpoint:()=>Ue,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>Ie,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>E,InferenceType:()=>A,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadMediaStreamJob:()=>W,ModelExportStatus:()=>he,ModelFormat:()=>ye,ModelPrecisionType:()=>we,ModelStatus:()=>me,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>P,PopComponentType:()=>T,PredictionVersion:()=>_,Semaphore:()=>$,SessionStatus:()=>B,Stream:()=>b,TaskMode:()=>Te,TaskType:()=>Se,TranscodeMode:()=>pe,TransientPopId:()=>V,UploadJob:()=>D,UserReview:()=>oe,VideoMode:()=>S,VlmAbilityStatus:()=>Ee,WebrtcBase:()=>C,WebrtcWhep:()=>Ce,WebrtcWhip:()=>R,WorkerEndpoint:()=>Y,WorkflowPhase:()=>xe,default:()=>Oe,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||{}),T=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(T||{}),E=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(E||{}),A=(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))(A||{}),P=(e=>(e.RANDOM_WALK="random_walk",e.CONSTANT_VELOCITY="constant_velocity",e.CONSTANT_ACCELERATION="constant_acceleration",e))(P||{}),j=(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))(j||{}),I=i(182),U=((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=U.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=U.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:R.unquoteCredential(t[3]),credential:R.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]=R.setVideoBitrate(R.setCodec(r,t),a):r&&r.startsWith("audio")&&(s[e]=R.setAudioBitrate(R.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}"`):""}},R=class extends C{constructor(e,t,i,a,n){super(t,i,(0,I.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()}},O=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")}};O.n=0;var L,z,D=class extends O{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)}if(this._params.fps){const t=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});e.append("fps",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)}if(this._params.fps){const e=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});i.append("fps",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 O{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,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"},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 O{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,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"},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}})}},W=class extends O{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 R(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 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 Le=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*ze(e){for await(const t of e)yield t}L=async(e,t)=>{const a=f(),n=i(122),o=ze((await n.open(e.path,"r")).createReadStream());return{stream:Le(o),mimeType:e.mimeType?e.mimeType:a.lookup(e.path)||"image/*"}}}function M(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 De{constructor(e){this._logger=e}async fetch(e,t){const i=M(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 De(e)}else{class Ne{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=M(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 Ne(t,e)}}var 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);H="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 $(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 $(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 H(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}},V=(e=>(e.Transient="transient",e))(V||{}),B=(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))(B||{}),Z=e=>new Promise(t=>setTimeout(t,e)),G=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 W(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 Z(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}};G.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),G.WAIT_FOR_IS_READY=6e4,G.CHECK_FOR_IS_READY_INTERVAL=250;var X,Y=G;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))}X="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.classification="classification",e))(Se||{}),Te=(e=>(e.image="image",e.video="video",e))(Te||{}),Ee=(e=>(e.in_progress="in_progress",e.draft="draft",e.published="published",e))(Ee||{}),Ae=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")}},Pe=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 Ie,Ue=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=X(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 Ae(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 Pe(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,i){return void 0!==t?this.request(`/vlm_abilities/${e}/refine`,{method:"POST",body:JSON.stringify(t,je),headers:{"Content-Type":"application/json"}}):void 0!==i?this.request(`/vlm_abilities/${e}/refine_task`,{method:"POST",body:JSON.stringify(i,je),headers:{"Content-Type":"application/json"}}):Promise.reject("refine vlm ability requires auto_prompt or auto_config parameter")}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"})}},Ce=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())})}},Re=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Re("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})(Re("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=Re("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 Y(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=Re("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=Re("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Ue(e)}})(Ie||(Ie={}));var Oe=Ie},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}function a(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function o(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,i):a?a.value=i:t.set(e,i),i}function s(e,t){this.v=e,this.k=t}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function c(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 p(e){return new s(e,0)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){return e.get(c(e,t))}function d(e,t,i){l(e,t),t.set(e,i)}function h(e,t,i){return e.set(c(e,t),i),i}function m(e,t){l(e,t),t.add(e)}function f(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 v(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 g(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach(function(t){f(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function b(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 y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,o,s,r=[],c=!0,p=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;c=!1}else for(;!(c=(n=o.call(i)).done)&&(r.push(n.value),r.length!==t);c=!0);}catch(e){p=!0,a=e}finally{try{if(!c&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(p)throw a}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){var t,i;function n(t,i){try{var o=e[t](i),r=o.value,c=r instanceof s;Promise.resolve(c?r.v:r).then(function(i){if(c){var s="return"===t&&r.k?t:"next";if(!r.k||i.done)return n(s,i);i=e[s](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)}i.r(t),i.d(t,{Auth0Client:()=>As,AuthenticationError:()=>A,CacheKey:()=>Ue,ConnectError:()=>P,GenericError:()=>j,InMemoryCache:()=>ze,LocalStorageCache:()=>Le,MfaApiClient:()=>ks,MfaChallengeError:()=>ys,MfaEnrollmentError:()=>bs,MfaEnrollmentFactorsError:()=>ws,MfaError:()=>vs,MfaListAuthenticatorsError:()=>gs,MfaRequiredError:()=>U,MfaVerifyError:()=>xs,MissingRefreshTokenError:()=>L,MyAccountApiClient:()=>dt,MyAccountApiError:()=>ht,PasskeyApiClient:()=>Ts,PasskeyChallengeError:()=>Fo,PasskeyError:()=>Ss,PasskeyGetTokenError:()=>Zo,PasskeyRegisterError:()=>$o,PopupCancelledError:()=>C,PopupOpenError:()=>R,PopupTimeoutError:()=>O,ResponseType:()=>Ge,TimeoutError:()=>I,UseDpopNonceError:()=>N,User:()=>Xe,createAuth0Client:()=>Ps}),"function"==typeof SuppressedError&&SuppressedError,x.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},x.prototype.next=function(e){return this._invoke("next",e)},x.prototype.throw=function(e){return this._invoke("throw",e)},x.prototype.return=function(e){return this._invoke("return",e)};const w={timeoutInSeconds:60},_=1e4,k="memory",S={name:"auth0-spa-js",version:"2.21.2"},T=()=>Date.now(),E="default";class j extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,j.prototype)}static fromPayload(e){let t=e.error,i=e.error_description;return new j(t,i)}}class A extends j{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,A.prototype)}}class P extends j{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,P.prototype)}}class I extends j{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,I.prototype)}}class O extends I{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,O.prototype)}}class C extends j{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,C.prototype)}}class R extends j{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,R.prototype)}}class U extends j{constructor(e,t,i,n){super(e,t),this.mfa_token=i,this.mfa_requirements=n,Object.setPrototypeOf(this,U.prototype)}}class L extends j{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(D(e,["default"]),"', scope: '").concat(D(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,L.prototype)}}class z extends j{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(D(e,["default"]),"', missing scope: '").concat(D(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,z.prototype)}}class N extends j{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,N.prototype)}}function D(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const W=()=>window.crypto,M=()=>{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},q=e=>btoa(e),H=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],J=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=H.find(e=>e.key===n);return a&&a.type.includes(typeof e[n])&&(i[n]=e[n]),i},{})},K=e=>{var t=e.clientId,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()},$=async e=>{const t=W().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},F=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Z=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 V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},B={},G={};Object.defineProperty(G,"__esModule",{value:!0});var X=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}();G.default=function(){return X.getInstance()};var Y=V&&V.__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())})},Q=V&&V.__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])}}},ee=V;Object.defineProperty(B,"__esModule",{value:!0});var te=G,ie="browser-tabs-lock-key",ne={key:function(e){return Y(ee,void 0,void 0,function(){return Q(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return Y(ee,void 0,void 0,function(){return Q(this,function(e){throw new Error("Unsupported")})})},clear:function(){return Y(ee,void 0,void 0,function(){return Q(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return Y(ee,void 0,void 0,function(){return Q(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return Y(ee,void 0,void 0,function(){return Q(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 ae(e){return new Promise(function(t){return setTimeout(t,e)})}function oe(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var se=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+oe(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),Y(this,void 0,void 0,function(){var n,a,o,s,r,c,p;return Q(this,function(l){switch(l.label){case 0:n=Date.now()+oe(4),a=Date.now()+i,o=ie+"-"+t,s=void 0===this.storageHandler?ne:this.storageHandler,l.label=1;case 1:return Date.now()<a?[4,ae(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+n,[4,ae(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,ae(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?ne:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:l.sent(),l.label=7;case 7:return n=Date.now()+oe(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return Y(this,void 0,void 0,function(){var i=this;return Q(this,function(n){return setTimeout(function(){return Y(i,void 0,void 0,function(){var i,n,a;return Q(this,function(o){switch(o.label){case 0:return[4,te.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?ne:this.storageHandler,null===(n=i.getItemSync(e))?(te.default().unlock(t),[2]):((a=JSON.parse(n)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(a)),te.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(te.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return Y(this,void 0,void 0,function(){return Q(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 Y(this,void 0,void 0,function(){return Q(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 Y(this,void 0,void 0,function(){var i,n,a,o;return Q(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?ne:this.storageHandler,n=ie+"-"+t,null===(a=i.getItemSync(n))?[2]:(o=JSON.parse(a)).id!==this.id?[3,2]:[4,te.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(n),te.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(ie)){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}(),re=B.default=se;class ce{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 I;throw e}}}class pe{constructor(){this.activeLocks=new Set,this.lock=new re,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 I;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 le=null;const ue=new TextEncoder,de=new TextDecoder;function he(e){return"string"==typeof e?ue.encode(e):de.decode(e)}function me(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new be(`${e.name} modulusLength must be at least 2048 bits`)}let fe;if(Uint8Array.prototype.toBase64)fe=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;fe=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 ve(e){return fe(e)}class ge 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 be 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 ye(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new ge("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new ge("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new ge("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new ge("unsupported CryptoKey algorithm name")}}function xe(e){return e instanceof CryptoKey}function we(e){return xe(e)&&"public"===e.type}async function _e(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 ke="dpop-nonce",Se=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange","urn:okta:params:oauth:grant-type:webauthn","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"],Te=(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])}),Ee=(e,t,i)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([fetch(e,t),new Promise((e,t)=>{a=setTimeout(()=>{n.abort(),t(new Error("Timeout when executing 'fetch'"))},i)})]).finally(()=>{clearTimeout(a)})},je=async function(e,t,i,n,a,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:_;return a?(async(e,t,i,n,a,o,s,r,c)=>Te({type:"refresh",auth:{audience:t,scope:i},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:s,useMrrt:r,skipTokenStorage:c},o))(e,t,i,n,s,a,o,arguments.length>7?arguments[7]:void 0,arguments.length>8?arguments[8]:void 0):(async(e,t,i)=>{const n=await Ee(e,t,i);return{ok:n.ok,json:await n.json(),headers:(a=n.headers,[...a].reduce((e,t)=>{let i=y(t,2),n=i[0],a=i[1];return e[n]=a,e},{}))};var a})(e,n,s)};async function Ae(e,t,i,a,o,s,r,c,p,l,u){if(p){const t=await p.generateProof({url:e,method:o.method||"GET",nonce:await p.getNonce()});o.headers=Object.assign(Object.assign({},o.headers),{dpop:t})}let d,h=null;for(let n=0;n<3;n++)try{d=await je(e,i,a,o,s,r,t,c,u),h=null;break}catch(e){h=e}if(h)throw h;const m=d.json,f=m.error,v=m.error_description,g=n(m,["error","error_description"]),b=d,y=b.headers,x=b.ok;let w;if(p&&(w=y[ke],w&&await p.setNonce(w)),!x){const n=v||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===f)throw new U(f,n,g.mfa_token,g.mfa_requirements);if("missing_refresh_token"===f)throw new L(i,a);if("use_dpop_nonce"===f){if(!p||!w||l)throw new N(w);return Ae(e,t,i,a,o,s,r,c,p,!0,u)}throw new j(f||"request_error",n)}return g}async function Pe(e,t,i){var a=e.baseUrl,o=e.timeout,s=e.audience,r=e.scope,c=e.auth0Client,p=e.useFormData,l=e.useMrrt,u=e.dpop,d=n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const h="urn:ietf:params:oauth:grant-type:token-exchange"===d.grant_type,m="urn:okta:params:oauth:grant-type:webauthn"===d.grant_type,f="refresh_token"===d.grant_type&&l,v=h||m||f,g=Object.assign(Object.assign(Object.assign({},d),v&&s&&{audience:s}),v&&r&&{scope:r}),b=m||!p,y=b?JSON.stringify(g):K(g),x=(w=d.grant_type,Se.includes(w));var w;return await Ae("".concat(a,"/oauth/token"),o,s||E,r,{method:"POST",body:y,headers:{"Content-Type":b?"application/json":"application/x-www-form-urlencoded","Auth0-Client":btoa(JSON.stringify(J(c||S)))}},t,p,l,x?u:void 0,void 0,i)}const Ie=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},Oe=(e,t,i)=>{let n;return i&&(n=e[i]),n||(n=e[E]),Ie(n,t)},Ce="@@auth0spajs@@",Re="@@user@@";class Ue{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce,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=y(e.split("::"),4),i=t[0],n=t[1],a=t[2],o=t[3];return new Ue({clientId:n,scope:o,audience:a},i)}static fromCacheEntry(e){const t=e.scope,i=e.audience,n=e.client_id;return new Ue({scope:t,audience:i,clientId:n})}}class Le{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(Ce))}}class ze{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 Ne{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||T}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()),s=e;if(!o){const t=await this.getCacheKeys();if(!t)return;const a=this.matchExistingCacheKey(e,t);if(a&&(o=await this.cache.get(a),s=Ue.fromKey(a)),!o&&i&&"cache-only"!==n)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const r=await this.nowProvider(),c=Math.floor(r/1e3);return o.expiresAt-t<c?o.body.refresh_token?this.modifiedCachedEntry(o,s):(await this.cache.remove(s.toKey()),void await(null===(a=this.keyManifest)||void 0===a?void 0:a.remove(s.toKey()))):o.body}async modifiedCachedEntry(e,t){const i={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},n={body:i,expiresAt:e.expiresAt};return await this.cache.set(t.toKey(),n),{refresh_token:i.refresh_token,audience:i.audience,scope:i.scope}}async set(e){var t;const i=new Ue({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 Ue({clientId:e,scope:i,audience:t});await this.cache.remove(n.toKey())}async stripRefreshToken(e){var t;const i=await this.getCacheKeys();if(i)for(const n of i){const i=await this.cache.get(n);(null===(t=null==i?void 0:i.body)||void 0===t?void 0:t.refresh_token)===e&&(delete i.body.refresh_token,await this.cache.set(n,i))}}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 Ue({clientId:e},Ce,Re).toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const n=Ue.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===Ce&&n.clientId===e.clientId&&n.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const n of t){const t=Ue.fromKey(n);if(t.prefix===Ce&&t.clientId===e.clientId){const e=await this.cache.get(n);if(null===(i=null==e?void 0:e.body)||void 0===i?void 0:i.refresh_token)return{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}}}async getRefreshTokensByAudience(e,t){var i;const n=await this.getCacheKeys();if(!n)return[];const a=new Set;for(const o of n){const n=Ue.fromKey(o);if(n.prefix===Ce&&n.clientId===t&&n.audience===e){const e=await this.cache.get(o);(null===(i=null==e?void 0:e.body)||void 0===i?void 0:i.refresh_token)&&a.add(e.body.refresh_token)}}return Array.from(a)}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 De{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 We=e=>"number"==typeof e,Me=["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 qe=V&&V.__assign||function(){return qe=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},qe.apply(this,arguments)};function He(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function Je(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 He("Expires",e.expires?e.expires.toUTCString():"")+He("Domain",e.domain)+He("Path",e.path)+He("Secure",e.secure)+He("SameSite",e.sameSite)}(i)}(e,t,qe({path:"/"},i))}var Ke=Je,$e=function(e,t){Je(e,"",qe(qe({},t),{expires:-1}))};const Fe={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),Ke(e,JSON.stringify(t),n)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),$e(e,i)}},Ze="_legacy_",Ve={get:e=>Fe.get(e)||Fe.get("".concat(Ze).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),Ke("".concat(Ze).concat(e),JSON.stringify(t),n),Fe.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),$e(e,i),Fe.remove(e,t),Fe.remove("".concat(Ze).concat(e),t)}},Be={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 Ge;!function(e){e.Code="code",e.ConnectCode="connect_code"}(Ge||(Ge={}));class Xe{}var Ye,Qe=function(e){return Ye=Ye||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7ZnVuY3Rpb24gZShlLHQpeyhudWxsPT10fHx0PmUubGVuZ3RoKSYmKHQ9ZS5sZW5ndGgpO2Zvcih2YXIgcj0wLG89QXJyYXkodCk7cjx0O3IrKylvW3JdPWVbcl07cmV0dXJuIG99ZnVuY3Rpb24gdCh0LHIpe3JldHVybiBmdW5jdGlvbihlKXtpZihBcnJheS5pc0FycmF5KGUpKXJldHVybiBlfSh0KXx8ZnVuY3Rpb24oZSx0KXt2YXIgcj1udWxsPT1lP251bGw6InVuZGVmaW5lZCIhPXR5cGVvZiBTeW1ib2wmJmVbU3ltYm9sLml0ZXJhdG9yXXx8ZVsiQEBpdGVyYXRvciJdO2lmKG51bGwhPXIpe3ZhciBvLG4scyxpLGE9W10sYz0hMCxsPSExO3RyeXtpZihzPShyPXIuY2FsbChlKSkubmV4dCwwPT09dCl7aWYoT2JqZWN0KHIpIT09cilyZXR1cm47Yz0hMX1lbHNlIGZvcig7IShjPShvPXMuY2FsbChyKSkuZG9uZSkmJihhLnB1c2goby52YWx1ZSksYS5sZW5ndGghPT10KTtjPSEwKTt9Y2F0Y2goZSl7bD0hMCxuPWV9ZmluYWxseXt0cnl7aWYoIWMmJm51bGwhPXIucmV0dXJuJiYoaT1yLnJldHVybigpLE9iamVjdChpKSE9PWkpKXJldHVybn1maW5hbGx5e2lmKGwpdGhyb3cgbn19cmV0dXJuIGF9fSh0LHIpfHxmdW5jdGlvbih0LHIpe2lmKHQpe2lmKCJzdHJpbmciPT10eXBlb2YgdClyZXR1cm4gZSh0LHIpO3ZhciBvPXt9LnRvU3RyaW5nLmNhbGwodCkuc2xpY2UoOCwtMSk7cmV0dXJuIk9iamVjdCI9PT1vJiZ0LmNvbnN0cnVjdG9yJiYobz10LmNvbnN0cnVjdG9yLm5hbWUpLCJNYXAiPT09b3x8IlNldCI9PT1vP0FycmF5LmZyb20odCk6IkFyZ3VtZW50cyI9PT1vfHwvXig/OlVpfEkpbnQoPzo4fDE2fDMyKSg/OkNsYW1wZWQpP0FycmF5JC8udGVzdChvKT9lKHQscik6dm9pZCAwfX0odCxyKXx8ZnVuY3Rpb24oKXt0aHJvdyBuZXcgVHlwZUVycm9yKCJJbnZhbGlkIGF0dGVtcHQgdG8gZGVzdHJ1Y3R1cmUgbm9uLWl0ZXJhYmxlIGluc3RhbmNlLlxuSW4gb3JkZXIgdG8gYmUgaXRlcmFibGUsIG5vbi1hcnJheSBvYmplY3RzIG11c3QgaGF2ZSBhIFtTeW1ib2wuaXRlcmF0b3JdKCkgbWV0aG9kLiIpfSgpfWNsYXNzIHIgZXh0ZW5kcyBFcnJvcntjb25zdHJ1Y3RvcihlLHQpe3N1cGVyKHQpLHRoaXMuZXJyb3I9ZSx0aGlzLmVycm9yX2Rlc2NyaXB0aW9uPXQsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsci5wcm90b3R5cGUpfXN0YXRpYyBmcm9tUGF5bG9hZChlKXtsZXQgdD1lLmVycm9yLG89ZS5lcnJvcl9kZXNjcmlwdGlvbjtyZXR1cm4gbmV3IHIodCxvKX19Y2xhc3MgbyBleHRlbmRzIHJ7Y29uc3RydWN0b3IoZSx0KXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIiwiTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyIuY29uY2F0KG4oZSxbImRlZmF1bHQiXSksIicsIHNjb3BlOiAnIikuY29uY2F0KG4odCksIicpIikpLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXQsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsby5wcm90b3R5cGUpfX1mdW5jdGlvbiBuKGUpe3JldHVybiBlJiYhKGFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTpbXSkuaW5jbHVkZXMoZSk/ZToiIn0iZnVuY3Rpb24iPT10eXBlb2YgU3VwcHJlc3NlZEVycm9yJiZTdXBwcmVzc2VkRXJyb3I7Y29uc3Qgcz1lPT57dmFyIHQ9ZS5jbGllbnRJZCxyPWZ1bmN0aW9uKGUsdCl7dmFyIHI9e307Zm9yKHZhciBvIGluIGUpT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGUsbykmJnQuaW5kZXhPZihvKTwwJiYocltvXT1lW29dKTtpZihudWxsIT1lJiYiZnVuY3Rpb24iPT10eXBlb2YgT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyl7dmFyIG49MDtmb3Iobz1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO248by5sZW5ndGg7bisrKXQuaW5kZXhPZihvW25dKTwwJiZPYmplY3QucHJvdG90eXBlLnByb3BlcnR5SXNFbnVtZXJhYmxlLmNhbGwoZSxvW25dKSYmKHJbb1tuXV09ZVtvW25dXSl9cmV0dXJuIHJ9KGUsWyJjbGllbnRJZCJdKTtyZXR1cm4gbmV3IFVSTFNlYXJjaFBhcmFtcygoZT0+T2JqZWN0LmtleXMoZSkuZmlsdGVyKHQ9PnZvaWQgMCE9PWVbdF0pLnJlZHVjZSgodCxyKT0+T2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LHQpLHtbcl06ZVtyXX0pLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IGk9e30sYT1udWxsO2NvbnN0IGM9KGUsdCk9PiIiLmNvbmNhdChlLCJ8IikuY29uY2F0KHQpLGw9KGUsdCk9PnQuc3RhcnRzV2l0aCgiIi5jb25jYXQoZSwifCIpKSx1PWU9PntPYmplY3QuZW50cmllcyhpKS5mb3JFYWNoKHI9PntsZXQgbz10KHIsMiksbj1vWzBdO29bMV09PT1lJiZkZWxldGUgaVtuXX0pfSxmPWU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKChlLHQpPT57clt0XT1lfSkscn0sZD1hc3luYyBlPT57bGV0IHIsbixhPWUuZGF0YSx1PWEudGltZW91dCxkPWEuYXV0aCxoPWEuZmV0Y2hVcmwscD1hLmZldGNoT3B0aW9ucyx5PWEudXNlRm9ybURhdGEsZz1hLnVzZU1ycnQsYj1hLnNraXBUb2tlblN0b3JhZ2UsTz10KGUucG9ydHMsMSlbMF0saz17fTtjb25zdCBtPWR8fHt9LGo9bS5hdWRpZW5jZSx2PW0uc2NvcGU7dHJ5e2NvbnN0IGU9eT9mKHAuYm9keSk6SlNPTi5wYXJzZShwLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYobj0oKGUsdCk9PmlbYyhlLHQpXSkoaix2KSwhbiYmZyl7Y29uc3QgZT1pLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHQ9KChlLHQpPT4hIU9iamVjdC5rZXlzKGkpLmZpbmQocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBvPWwodCxyKSxuPXIuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLHM9ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9Pm4uaW5jbHVkZXMoZSkpO3JldHVybiBvJiZzfX0pKSh2LGopO2UmJiF0JiYobj1lKX1pZighbil0aHJvdyBuZXcgbyhqLHYpO3AuYm9keT15P3MoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LGUpLHtyZWZyZXNoX3Rva2VuOm59KSk6SlNPTi5zdHJpbmdpZnkoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LGUpLHtyZWZyZXNoX3Rva2VuOm59KSl9bGV0IGEsZDsiZnVuY3Rpb24iPT10eXBlb2YgQWJvcnRDb250cm9sbGVyJiYoYT1uZXcgQWJvcnRDb250cm9sbGVyLHAuc2lnbmFsPWEuc2lnbmFsKTt0cnl7ZD1hd2FpdCBQcm9taXNlLnJhY2UoWyhNPXUsbmV3IFByb21pc2UoZT0+c2V0VGltZW91dChlLE0pKSksZmV0Y2goaCxPYmplY3QuYXNzaWduKHt9LHApKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIE8ucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFkKXJldHVybiBhJiZhLmFib3J0KCksdm9pZCBPLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2lmKFM9ZC5oZWFkZXJzLGs9Wy4uLlNdLnJlZHVjZSgoZSxyKT0+e2xldCBvPXQociwyKSxuPW9bMF0scz1vWzFdO3JldHVybiBlW25dPXMsZX0se30pLHI9YXdhaXQgZC5qc29uKCksYilyZXR1cm4gZGVsZXRlIHIucmVmcmVzaF90b2tlbix2b2lkIE8ucG9zdE1lc3NhZ2Uoe29rOmQub2ssanNvbjpyLGhlYWRlcnM6a30pO3IucmVmcmVzaF90b2tlbj8oZyYmKGkubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLF89bix3PXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhpKS5mb3JFYWNoKGU9PntsZXQgcj10KGUsMiksbz1yWzBdO3JbMV09PT1fJiYoaVtvXT13KX0pKSwoKGUsdCxyKT0+e2lbYyh0LHIpXT1lfSkoci5yZWZyZXNoX3Rva2VuLGosdiksZGVsZXRlIHIucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIGlbYyhlLHQpXX0pKGosdiksTy5wb3N0TWVzc2FnZSh7b2s6ZC5vayxqc29uOnIsaGVhZGVyczprfSl9Y2F0Y2goZSl7Ty5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9LGhlYWRlcnM6a30pfXZhciBfLHcsUyxNfSxoPWFzeW5jIGU9PntsZXQgcj1lLmRhdGEsbz1yLnRpbWVvdXQsbj1yLmF1dGgsYT1yLmZldGNoVXJsLGM9ci5mZXRjaE9wdGlvbnMsZD1yLnVzZUZvcm1EYXRhLGg9dChlLnBvcnRzLDEpWzBdO2NvbnN0IHA9KG58fHt9KS5hdWRpZW5jZTt0cnl7Y29uc3QgZT0oZT0+e2NvbnN0IHI9bmV3IFNldDtyZXR1cm4gT2JqZWN0LmVudHJpZXMoaSkuZm9yRWFjaChvPT57bGV0IG49dChvLDIpLHM9blswXSxpPW5bMV07bChlLHMpJiZyLmFkZChpKX0pLEFycmF5LmZyb20ocil9KShwKTtpZigwPT09ZS5sZW5ndGgpcmV0dXJuIHZvaWQgaC5wb3N0TWVzc2FnZSh7b2s6ITB9KTtjb25zdCByPWQ/ZihjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtmb3IoY29uc3QgdCBvZiBlKXtjb25zdCBlPWQ/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3Rva2VuOnR9KSk6SlNPTi5zdHJpbmdpZnkoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LHIpLHt0b2tlbjp0fSkpO2xldCBuLGksbCxmOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihuPW5ldyBBYm9ydENvbnRyb2xsZXIsaT1uLnNpZ25hbCk7dHJ5e2Y9YXdhaXQgUHJvbWlzZS5yYWNlKFtuZXcgUHJvbWlzZShlPT57bD1zZXRUaW1lb3V0KGUsbyl9KSxmZXRjaChhLE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxjKSx7Ym9keTplLHNpZ25hbDppfSkpXSkuZmluYWxseSgoKT0+Y2xlYXJUaW1lb3V0KGwpKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBoLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZilyZXR1cm4gbiYmbi5hYm9ydCgpLHZvaWQgaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtpZighZi5vayl7bGV0IGU7dHJ5e2NvbnN0IHQ9SlNPTi5wYXJzZShhd2FpdCBmLnRleHQoKSk7ZT10LmVycm9yX2Rlc2NyaXB0aW9ufWNhdGNoKGUpe31yZXR1cm4gdm9pZCBoLnBvc3RNZXNzYWdlKHtlcnJvcjplfHwiSFRUUCBlcnJvciAiLmNvbmNhdChmLnN0YXR1cyl9KX11KHQpfWgucG9zdE1lc3NhZ2Uoe29rOiEwfSl9Y2F0Y2goZSl7aC5wb3N0TWVzc2FnZSh7ZXJyb3I6ZS5tZXNzYWdlfHwiVW5rbm93biBlcnJvciBkdXJpbmcgdG9rZW4gcmV2b2NhdGlvbiJ9KX19LHA9KGUsdCk9PntpZighYSlyZXR1cm4hMTt0cnl7Y29uc3Qgcj1uZXcgVVJMKGEpLm9yaWdpbixvPW5ldyBVUkwoZS5mZXRjaFVybCk7cmV0dXJuIG8ub3JpZ2luPT09ciYmby5wYXRobmFtZT09PXR9Y2F0Y2goZSl7cmV0dXJuITF9fTthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixlPT57Y29uc3Qgcj1lLmRhdGEsbz10KGUucG9ydHMsMSlbMF07aWYoISgidHlwZSJpbiByKXx8ImluaXQiIT09ci50eXBlKXJldHVybiJ0eXBlImluIHImJiJjbGVhciI9PT1yLnR5cGU/KGk9e30sdm9pZChudWxsPT1vfHxvLnBvc3RNZXNzYWdlKHtvazohMH0pKSk6InR5cGUiaW4gciYmInJldm9rZSI9PT1yLnR5cGU/cChyLCIvb2F1dGgvcmV2b2tlIik/dm9pZCBoKGUpOnZvaWQobnVsbD09b3x8by5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ImludmFsaWRfZmV0Y2hfdXJsIixlcnJvcl9kZXNjcmlwdGlvbjoiVW5hdXRob3JpemVkIGZldGNoIFVSTCJ9LGhlYWRlcnM6e319KSk6dm9pZCgiZmV0Y2hVcmwiaW4gciYmcChyLCIvb2F1dGgvdG9rZW4iKT9kKGUpOm51bGw9PW98fG8ucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOiJpbnZhbGlkX2ZldGNoX3VybCIsZXJyb3JfZGVzY3JpcHRpb246IlVuYXV0aG9yaXplZCBmZXRjaCBVUkwifSxoZWFkZXJzOnt9fSkpO2lmKG51bGw9PT1hKXRyeXtuZXcgVVJMKHIuYWxsb3dlZEJhc2VVcmwpLGE9ci5hbGxvd2VkQmFzZVVybH1jYXRjaChlKXtyZXR1cm59fSl9KCk7Cgo="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",n=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(n)}(),new Worker(Ye,e)};const et={};class tt{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(Ce,"::").concat(e)}}const it="auth0.is.authenticated",nt={memory:()=>(new ze).enclosedCache,localstorage:()=>new Le},at=e=>nt[e],ot=e=>{const t=e.openUrl,i=e.onRedirect,a=n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},a),{openUrl:!1===t||t?t:i})},st=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},rt={NONCE:"nonce",KEYPAIR:"keypair"};class ct{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(rt).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(rt.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(rt.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(rt.NONCE,this.buildKey(e))}findKeyPair(){return this.find(rt.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());await Promise.all((null==i?void 0: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(rt.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(rt.KEYPAIR,this.clientId)}}class pt{constructor(e){this.storage=new ct(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 t=e.keyPair,i=e.url,n=e.method,a=e.nonce,o=e.accessToken;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(!xe(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!we(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=`${ve(he(JSON.stringify(e)))}.${ve(he(JSON.stringify(t)))}`;return`${n}.${ve(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return me(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return me(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new ge}(i),i,he(n)))}`}({alg:ye(s),typ:"dpop+jwt",jwk:await _e(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:n,htu:t,ath:a?ve(await crypto.subtle.digest("SHA-256",he(a))):void 0}),s)}(t,s,n,a,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!we(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 _e(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 ge("unsupported JWK kty")}return ve(await crypto.subtle.digest({name:"SHA-256"},he(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var lt;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(lt||(lt={}));class ut{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]:lt.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?lt.DPoP:lt.Bearer,a=i):(n=i.token_type,a=i.access_token),this.setAuthorizationHeader(e,a,n),n===lt.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,ke);if(i&&await this.hooks.setDpopNonce(i),!this.hasUseDpopNonceError(e))return e;if(!i||!t.onUseDpopNonceError)throw new N(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 dt{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)},{scope:["create:me:connected_accounts"]});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)},{scope:["create:me:connected_accounts"]});return this._handleResponse(t)}async getFactors(){const e=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/factors"),{method:"GET"},{scope:["read:me:factors"]});return(await this._handleResponse(e)).factors}async getAuthenticationMethods(e){const t=e?"?".concat(new URLSearchParams({type:e})):"",i=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/authentication-methods").concat(t),{method:"GET"},{scope:["read:me:authentication_methods"]});return(await this._handleResponse(i)).authentication_methods}async getAuthenticationMethod(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/authentication-methods/").concat(encodeURIComponent(e)),{method:"GET"},{scope:["read:me:authentication_methods"]});return this._handleResponse(t)}async deleteAuthenticationMethod(e){const t=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/authentication-methods/").concat(encodeURIComponent(e)),{method:"DELETE"},{scope:["delete:me:authentication_methods"]});t.ok||await this._handleResponse(t)}async updateAuthenticationMethod(e,t){const i=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/authentication-methods/").concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},{scope:["update:me:authentication_methods"]});return this._handleResponse(i)}async enrollmentChallenge(e){var t;const i=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/authentication-methods"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},{scope:["create:me:authentication_methods"]}),n=await this._handleResponse(i),a=null!==(t=i.headers.get("location"))&&void 0!==t?t:"",o=decodeURIComponent(a.split("/").pop()||"");return Object.assign(Object.assign({},n),{id:o,location:a})}async enrollmentVerify(e){const t=e,i=t.location;t.type;const a=n(t,["location","type"]),o=await this.myAccountFetcher.fetchWithAuth("".concat(i,"/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)},{scope:["create:me:authentication_methods"]});return this._handleResponse(o)}async _handleResponse(e){let t;try{t=await e.text(),t=JSON.parse(t)}catch(i){throw new ht({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new ht(t)}}class ht extends Error{constructor(e){let t=e.type,i=e.status,n=e.title,a=e.detail,o=e.validation_errors;super(a),this.name="MyAccountApiError",this.type=t,this.status=i,this.title=n,this.detail=a,this.validation_errors=o,Object.setPrototypeOf(this,ht.prototype)}}const mt={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};var ft,vt;let gt;if("undefined"==typeof navigator||null===(ft=navigator.userAgent)||void 0===ft||null===(vt=ft.startsWith)||void 0===vt||!vt.call(ft,"Mozilla/5.0 ")){const e="v3.8.6";gt="".concat("oauth4webapi","/").concat(e)}function bt(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 yt="ERR_INVALID_ARG_VALUE",xt="ERR_INVALID_ARG_TYPE";function wt(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}const _t=Symbol(),kt=Symbol(),St=Symbol(),Tt=Symbol(),Et=Symbol(),jt=Symbol(),At=new TextEncoder,Pt=new TextDecoder;function It(e){return"string"==typeof e?At.encode(e):Pt.decode(e)}let Ot,Ct;if(Uint8Array.prototype.toBase64)Ot=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Ot=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 Rt(e){return"string"==typeof e?Ct(e):Ot(e)}Ct=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw wt("The input to be decoded is not correctly encoded.",yt,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 wt("The input to be decoded is not correctly encoded.",yt,e)}};class Ut extends Error{constructor(e,t){var i;super(e,t),f(this,"code",void 0),this.name=this.constructor.name,this.code=Oi,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class Lt extends Error{constructor(e,t){var i;super(e,t),f(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 zt(e,t,i){return new Lt(e,{code:t,cause:i})}function Nt(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Dt(e){bt(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(gt&&!t.has("user-agent")&&t.set("user-agent",gt),t.has("authorization"))throw wt('"options.headers" must not include the "authorization" header name',yt);return t}function Wt(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw wt('"options.signal" must return or be an instance of AbortSignal',xt);return t}}function Mt(e){return e.includes("//")?e.replace("//","/"):e}function qt(e,t,i,n,a){try{if("number"!=typeof e||!Number.isFinite(e))throw wt("".concat(i," must be a number"),xt,a);if(e>0)return;if(t){if(0!==e)throw wt("".concat(i," must be a non-negative number"),yt,a);return}throw wt("".concat(i," must be a positive number"),yt,a)}catch(e){if(n)throw zt(e.message,n,a);throw e}}function Ht(e,t,i,n){try{if("string"!=typeof e)throw wt("".concat(t," must be a string"),xt,n);if(0===e.length)throw wt("".concat(t," must not be empty"),yt,n)}catch(e){if(i)throw zt(e.message,i,n);throw e}}function Jt(e){!function(e,t){if(mi(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 zt(t,Li,e)}(e,t)}(e,"application/json")}function Kt(){return Rt(crypto.getRandomValues(new Uint8Array(32)))}function $t(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 Ut("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 Ut("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 Ut("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 Ut("unsupported CryptoKey algorithm name",{cause:e})}}function Ft(e){const t=null==e?void 0:e[kt];return"number"==typeof t&&Number.isFinite(t)?t:0}function Zt(e){const t=null==e?void 0:e[St];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function Vt(){return Math.floor(Date.now()/1e3)}function Bt(e){if("object"!=typeof e||null===e)throw wt('"as" must be an object',xt);Ht(e.issuer,'"as.issuer"')}function Gt(e){if("object"!=typeof e||null===e)throw wt('"client" must be an object',xt);Ht(e.client_id,'"client.client_id"')}function Xt(e){return Ht(e,'"clientSecret"'),(t,i,n,a)=>{n.set("client_id",i.client_id),n.set("client_secret",e)}}const Yt=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Qt(e,t){if(t&&"https:"!==e.protocol)throw zt("only requests to HTTPS are allowed",Ni,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw zt("only HTTP and HTTPS requests are allowed",Di,e)}function ei(e,t,i,n){let a;if("string"!=typeof e||!(a=Yt(e)))throw zt("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?Hi:Ji,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Qt(a,n),a}function ti(e,t,i,n){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?ei(e.mtls_endpoint_aliases[t],t,i,n):ei(e[t],t,i,n)}class ii extends Error{constructor(e,t){var i;super(e,t),f(this,"cause",void 0),f(this,"code",void 0),f(this,"error",void 0),f(this,"status",void 0),f(this,"error_description",void 0),f(this,"response",void 0),this.name=this.constructor.name,this.code=Ii,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 ni extends Error{constructor(e,t){var i,n;super(e,t),f(this,"cause",void 0),f(this,"code",void 0),f(this,"error",void 0),f(this,"error_description",void 0),this.name=this.constructor.name,this.code=Ci,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 ai extends Error{constructor(e,t){var i;super(e,t),f(this,"cause",void 0),f(this,"code",void 0),f(this,"response",void 0),f(this,"status",void 0),this.name=this.constructor.name,this.code=Pi,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 oi="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",si="("+oi+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',ri="("+oi+")\\s*=\\s*("+oi+")",ci=new RegExp("^[,\\s]*("+oi+")"),pi=new RegExp("^[,\\s]*"+si+"[,\\s]*(.*)"),li=new RegExp("^[,\\s]*"+ri+"[,\\s]*(.*)"),ui=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function di(e,t,i){if(e.status!==t){let t;var n;if(function(e){let t;if(t=function(e){if(!bt(e,Response))throw wt('"response" must be an instance of Response',xt);const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let n=t;for(;n;){var a;let t=n.match(ci);const c=null===(a=t)||void 0===a?void 0:a[1].toLowerCase();if(!c)return;const p=n.substring(t[0].length);if(p&&!p.match(/^[\s,]/))return;const l=p.match(/^\s+(.*)$/),u=!!l;n=l?l[1]:void 0;const d={};let h;if(u)for(;n;){let i,a;if(t=n.match(pi)){var o=y(t,4);if(i=o[1],a=o[2],n=o[3],a.includes("\\"))try{a=JSON.parse('"'.concat(a,'"'))}catch(e){}d[i.toLowerCase()]=a}else{if(!(t=n.match(li))){if(t=n.match(ui)){if(Object.keys(d).length)break;var s=y(t,3);h=s[1],n=s[2];break}return}var r=y(t,4);i=r[1],a=r[2],n=r[3],d[i.toLowerCase()]=a}}else n=p||void 0;const m={scheme:c,parameters:d};h&&(m.token68=h),i.push(m)}return i.length?i:void 0}(e))throw new ai("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){Ki(e),Jt(e);try{const t=await e.clone().json();if(Nt(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 ii("server responded with an error in the response body",{cause:t,response:e});throw zt('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),zi,e)}}function hi(e){if(!ki.has(e))throw wt('"options.DPoP" is not a valid DPoPHandle',yt)}function mi(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function fi(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[Tt])||fetch)(n.href,{body:a,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:Wt(n,null==s?void 0:s.signal)})}async function vi(e,t,i,n,a,o){var s;const r=ti(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[_t]));a.set("grant_type",n);const c=Dt(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(hi(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await fi(e,t,i,r,a,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const gi=new WeakMap,bi=new WeakMap;function yi(e){if(!e.id_token)return;const t=gi.get(e);if(!t)throw wt('"ref" was already garbage collected or did not resolve from the proper sources',yt);return t}async function xi(e,t,i,n,a,o){if(Bt(e),Gt(t),!bt(i,Response))throw wt('"response" must be an instance of Response',xt);await di(i,200,"Token Endpoint"),Ki(i);const s=await Xi(i);if(Ht(s.access_token,'"response" body "access_token" property',Ui,{body:s}),Ht(s.token_type,'"response" body "token_type" property',Ui,{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;qt(e,!0,'"response" body "expires_in" property',Ui,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&Ht(s.refresh_token,'"response" body "refresh_token" property',Ui,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw zt('"response" body "scope" property must be a string',Ui,{body:s});if(void 0!==s.id_token){Ht(s.id_token,'"response" body "id_token" property',Ui,{body:s});const o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(qt(t.default_max_age,!0,'"client.default_max_age"'),o.push("auth_time")),null!=n&&n.length&&o.push(...n);const r=await async function(e,t,i,n,a){let o,s,r=e.split("."),c=r[0],p=r[1],l=r.length;if(5===l){if(void 0===a)throw new Ut("JWE decryption is not configured",{cause:e});var u=(e=await a(e)).split(".");c=u[0],p=u[1],l=u.length}if(3!==l)throw zt("Invalid JWT",Ui,e);try{o=JSON.parse(It(Rt(c)))}catch(e){throw zt("failed to parse JWT Header body as base64url encoded JSON",Ri,e)}if(!Nt(o))throw zt("JWT Header must be a top level object",Ui,e);if(t(o),void 0!==o.crit)throw new Ut('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(It(Rt(p)))}catch(e){throw zt("failed to parse JWT Payload body as base64url encoded JSON",Ri,e)}if(!Nt(s))throw zt("JWT Payload must be a top level object",Ui,e);const d=Vt()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw zt('unexpected JWT "exp" (expiration time) claim type',Ui,{claims:s});if(s.exp<=d-n)throw zt('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Wi,{claims:s,now:d,tolerance:n,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw zt('unexpected JWT "iat" (issued at) claim type',Ui,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw zt('unexpected JWT "iss" (issuer) claim type',Ui,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw zt('unexpected JWT "nbf" (not before) claim type',Ui,{claims:s});if(s.nbf>d+n)throw zt('unexpected JWT "nbf" (not before) claim value',Wi,{claims:s,now:d,tolerance:n,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw zt('unexpected JWT "aud" (audience) claim type',Ui,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Zi.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Ft(t),Zt(t),a).then(Ei.bind(void 0,o)).then(_i.bind(void 0,e)).then(wi.bind(void 0,t.client_id)),c=r.claims,p=r.jwt;if(Array.isArray(c.aud)&&1!==c.aud.length){if(void 0===c.azp)throw zt('ID Token "aud" (audience) claim includes additional untrusted audiences',Mi,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw zt('unexpected ID Token "azp" (authorized party) claim value',Mi,{expected:t.client_id,claims:c,claim:"azp"})}void 0!==c.auth_time&&qt(c.auth_time,!0,'ID Token "auth_time" (authentication time)',Ui,{claims:c}),bi.set(i,p),gi.set(s,c)}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 Ut("unsupported `token_type` value",{cause:{body:s}});return s}function wi(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw zt('unexpected JWT "aud" (audience) claim value',Mi,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw zt('unexpected JWT "aud" (audience) claim value',Mi,{expected:e,claims:t.claims,claim:"aud"});return t}function _i(e,t){var i,n;const a=null!==(i=null===(n=e[Qi])||void 0===n?void 0:n.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==a)throw zt('unexpected JWT "iss" (issuer) claim value',Mi,{expected:a,claims:t.claims,claim:"iss"});return t}const ki=new WeakSet,Si=Symbol(),Ti={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 Ei(e,t){for(const i of e)if(void 0===t.claims[i])throw zt('JWT "'.concat(i,'" (').concat(Ti[i],") claim missing"),Ui,{claims:t.claims});return t}const ji=Symbol(),Ai=Symbol(),Pi="OAUTH_WWW_AUTHENTICATE_CHALLENGE",Ii="OAUTH_RESPONSE_BODY_ERROR",Oi="OAUTH_UNSUPPORTED_OPERATION",Ci="OAUTH_AUTHORIZATION_RESPONSE_ERROR",Ri="OAUTH_PARSE_ERROR",Ui="OAUTH_INVALID_RESPONSE",Li="OAUTH_RESPONSE_IS_NOT_JSON",zi="OAUTH_RESPONSE_IS_NOT_CONFORM",Ni="OAUTH_HTTP_REQUEST_FORBIDDEN",Di="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Wi="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Mi="OAUTH_JWT_CLAIM_COMPARISON_FAILED",qi="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",Hi="OAUTH_MISSING_SERVER_METADATA",Ji="OAUTH_INVALID_SERVER_METADATA";function Ki(e){if(e.bodyUsed)throw wt('"response" body has been used already',yt)}function $i(e){const t=e.algorithm;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new Ut("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Fi(e){switch(e.algorithm.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Ut("unsupported ECDSA namedCurve",{cause:e})}}function Zi(e,t,i,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw zt('unexpected JWT "alg" header parameter',Ui,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw zt('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 zt('unexpected JWT "alg" header parameter',Ui,{header:n,expected:i,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw zt('unexpected JWT "alg" header parameter',Ui,{header:n,expected:e,reason:"client configuration"})}function Vi(e,t){const i=e.getAll(t),n=i[0];if(i.length>1)throw zt('"'.concat(t,'" parameter must be provided only once'),Ui);return n}const Bi=Symbol(),Gi=Symbol();async function Xi(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jt;try{t=await e.json()}catch(t){throw i(e),zt('failed to parse "response" body as JSON',Ri,t)}if(!Nt(t))throw zt('"response" body must be a top level object',Ui,{body:t});return t}const Yi=Symbol(),Qi=Symbol(),en=new TextEncoder,tn=new TextDecoder;function nn(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 an(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 on(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:tn.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=tn.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return an(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}const sn=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))},rn=(e,t)=>e.name===t;function cn(e,t){var i;if(i=e.hash,parseInt(i.name.slice(4),10)!==t)throw sn("SHA-".concat(t),"algorithm.hash")}function pn(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 ln=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 pn("Key for the ".concat(e," algorithm must be "),t,...n)};class un extends Error{constructor(e,t){var i;super(e,t),f(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}f(un,"code","ERR_JOSE_GENERIC");class dn extends un{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}}),f(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),f(this,"claim",void 0),f(this,"reason",void 0),f(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}f(dn,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class hn extends un{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}}),f(this,"code","ERR_JWT_EXPIRED"),f(this,"claim",void 0),f(this,"reason",void 0),f(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}f(hn,"code","ERR_JWT_EXPIRED");class mn extends un{constructor(){super(...arguments),f(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}f(mn,"code","ERR_JOSE_ALG_NOT_ALLOWED");class fn extends un{constructor(){super(...arguments),f(this,"code","ERR_JOSE_NOT_SUPPORTED")}}f(fn,"code","ERR_JOSE_NOT_SUPPORTED"),f(class extends un{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),f(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),f(class extends un{constructor(){super(...arguments),f(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class vn extends un{constructor(){super(...arguments),f(this,"code","ERR_JWS_INVALID")}}f(vn,"code","ERR_JWS_INVALID");class gn extends un{constructor(){super(...arguments),f(this,"code","ERR_JWT_INVALID")}}f(gn,"code","ERR_JWT_INVALID"),f(class extends un{constructor(){super(...arguments),f(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class bn extends un{constructor(){super(...arguments),f(this,"code","ERR_JWKS_INVALID")}}f(bn,"code","ERR_JWKS_INVALID");class yn extends un{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),f(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}f(yn,"code","ERR_JWKS_NO_MATCHING_KEY");class xn extends un{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),f(this,Symbol.asyncIterator,void 0),f(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}f(xn,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class wn extends un{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),f(this,"code","ERR_JWKS_TIMEOUT")}}f(wn,"code","ERR_JWKS_TIMEOUT");class _n extends un{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),f(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}f(_n,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const kn=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},Sn=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),Tn=e=>kn(e)||Sn(e);function En(e,t,i){try{return on(e)}catch(e){throw new i("Failed to base64url decode the ".concat(t))}}function jn(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 An=e=>jn(e)&&"string"==typeof e.kty;const Pn='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function In(e){var t,i;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const 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 fn(Pn)}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 fn(Pn)}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 fn(Pn)}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 fn(Pn)}break;default:throw new fn('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),a=n.algorithm,o=n.keyUsages,s=g({},e);return"AKP"!==s.kty&&delete s.alg,delete s.use,crypto.subtle.importKey("jwk",s,a,null!==(t=e.ext)&&void 0!==t?t:!e.d&&!e.priv,null!==(i=e.key_ops)&&void 0!==i?i:o)}const On="given KeyObject instance cannot be used for this algorithm";let Cn;const Rn=async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Cn||(Cn=new WeakMap);let a=Cn.get(e);if(null!=a&&a[i])return a[i];const o=await In(g(g({},t),{},{alg:i}));return n&&Object.freeze(e),a?a[i]=o:Cn.set(e,{[i]:o}),o},Un=(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},Ln=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},zn=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},Nn=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i},Dn=e=>null==e?void 0:e[Symbol.toStringTag],Wn=(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 Mn,qn;let Hn,Jn;if("undefined"==typeof navigator||null===(Mn=navigator.userAgent)||void 0===Mn||null===(qn=Mn.startsWith)||void 0===qn||!qn.call(Mn,"Mozilla/5.0 ")){const e="v6.8.4";Jn="".concat("openid-client","/").concat(e),Hn={"user-agent":Jn}}const Kn=e=>$n.get(e);let $n,Fn;function Zn(e){return void 0!==e?Xt(e):(Fn||(Fn=new WeakMap),(e,t,i,n)=>{let a;return(a=Fn.get(t))||(function(e,t){if("string"!=typeof e)throw Xn("".concat(t," must be a string"),Gn);if(0===e.length)throw Xn("".concat(t," must not be empty"),Bn)}(t.client_secret,'"metadata.client_secret"'),a=Xt(t.client_secret),Fn.set(t,a)),a(e,t,i,n)})}const Vn=Tt,Bn="ERR_INVALID_ARG_VALUE",Gn="ERR_INVALID_ARG_TYPE";function Xn(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}class Yn extends Error{constructor(e,t){var i;super(e,t),f(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 Qn(e,t,i){return new Yn(e,{cause:t,code:i})}function ea(e){if(e instanceof TypeError||e instanceof Yn||e instanceof ii||e instanceof ni||e instanceof ai)throw e;if(e instanceof Lt)switch(e.code){case Ni:throw Qn("only requests to HTTPS are allowed",e,e.code);case Di:throw Qn("only requests to HTTP or HTTPS are allowed",e,e.code);case zi:throw Qn("unexpected HTTP response status code",e.cause,e.code);case Li:throw Qn("unexpected response content-type",e.cause,e.code);case Ri:throw Qn("parsing error occured",e,e.code);case Ui:throw Qn("invalid response encountered",e,e.code);case Mi:throw Qn("unexpected JWT claim value encountered",e,e.code);case qi:throw Qn("unexpected JSON attribute value encountered",e,e.code);case Wi:throw Qn("JWT timestamp claim value failed validation",e,e.code);default:throw Qn(e.message,e,e.code)}if(e instanceof Ut)throw Qn("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Qn("runtime operation error",e,Oi);case"NotSupportedError":throw Qn("runtime unsupported operation",e,Oi);case"TimeoutError":throw Qn("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Qn("operation aborted",e,"OAUTH_ABORT")}throw new Yn("something went wrong",{cause:e})}new TextDecoder;const ta=Symbol();class ia{constructor(e,t,i,n){var a,o,s,r,c;if("string"!=typeof t||!t.length)throw Xn('"clientId" must be a non-empty string',Gn);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 Xn('"clientId" and "metadata.client_id" must be the same',Bn);const p=g(g({},structuredClone(i)),{},{client_id:t});let l;p[kt]=null!==(o=null===(s=i)||void 0===s?void 0:s[kt])&&void 0!==o?o:0,p[St]=null!==(r=null===(c=i)||void 0===c?void 0:c[St])&&void 0!==r?r:30,l=n||("string"==typeof p.client_secret&&p.client_secret.length?Zn(p.client_secret):(e,t,i,n)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const d=structuredClone(e);ta in e&&(d[Qi]=t=>{let i=t.claims.tid;return e.issuer.replace("{tenantid}",i)});let h=Object.freeze(d);$n||($n=new WeakMap),$n.set(this,{__proto__:null,as:h,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(Kn(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(Kn(this).c)}get timeout(){return Kn(this).timeout}set timeout(e){Kn(this).timeout=e}get[Vn](){return Kn(this).fetch}set[Vn](e){Kn(this).fetch=e}}function na(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 yi(this)}catch(e){return}}}}}(e))}async function aa(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 Lt("invalid Retry-After header value",{cause:e});s>t&&await oa(s-t,i)}function oa(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 sa(e,t){ma(e);const i=Kn(e),n=i.as,a=i.c,o=i.auth,s=i.fetch,r=i.tlsOnly,c=i.timeout;return async function(e,t,i,n,a){Bt(e),Gt(t);const o=ti(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[_t])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const r=Dt(null==a?void 0:a.headers);return r.set("accept","application/json"),fi(e,t,i,o,s,r,a)}(n,a,o,t,{[Tt]:s,[_t]:!r,headers:new Headers(Hn),signal:fa(c)}).then(e=>async function(e,t,i){if(Bt(e),Gt(t),!bt(i,Response))throw wt('"response" must be an instance of Response',xt);await di(i,200,"Backchannel Authentication Endpoint"),Ki(i);const n=await Xi(i);Ht(n.auth_req_id,'"response" body "auth_req_id" property',Ui,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return qt(a,!0,'"response" body "expires_in" property',Ui,{body:n}),n.expires_in=a,void 0!==n.interval&&qt(n.interval,!1,'"response" body "interval" property',Ui,{body:n}),n}(n,a,e)).catch(ea)}async function ra(e,t,i,n){var a,o;ma(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 oa(s,r)}catch(e){ea(e)}const c=Kn(e),p=c.as,l=c.c,u=c.auth,d=c.fetch,h=c.tlsOnly,m=c.nonRepudiation,f=c.timeout,v=c.decrypt,b=(a,o)=>ra(e,g(g({},t),{},{interval:a}),i,g(g({},n),{},{signal:r,flag:o})),y=function(e,t){const i=fa(t);if(!i)return{signal:e,cleanup(){}};const n=new AbortController,a=e=>{const t=e.target;n.abort(t.reason)};return e.aborted?n.abort(e.reason):i.aborted?n.abort(i.reason):(e.addEventListener("abort",a,{once:!0}),i.addEventListener("abort",a,{once:!0})),{signal:n.signal,cleanup(){e.removeEventListener("abort",a),i.removeEventListener("abort",a)}}}(r,f),x=await async function(e,t,i,n,a){Bt(e),Gt(t),Ht(n,'"authReqId"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("auth_req_id",n),vi(e,t,i,"urn:openid:params:grant-type:ciba",o,a)}(p,l,u,t.auth_req_id,{[Tt]:d,[_t]:!h,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Hn),signal:y.signal}).catch(ea).finally(y.cleanup);var w;if(503===x.status&&x.headers.has("retry-after"))return await aa(x,s,r,!0),await(null===(w=x.body)||void 0===w?void 0:w.cancel()),b(s);const _=async function(e,t,i,n){return xi(e,t,i,void 0,null==n?void 0:n[jt],null==n?void 0:n.recognizedTokenTypes)}(p,l,x,{[jt]:v});let k;try{k=await _}catch(e){if(va(e,n))return b(s,ga);if(e instanceof ii)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await aa(e.response,s,r),b(s)}ea(e)}return k.id_token&&await(null==m?void 0:m(x)),na(k),k}function ca(e){Kn(e).tlsOnly=!1}async function pa(e,t,i,n,a){if(ma(e),!((null==a?void 0:a.flag)===ga||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Xn('"currentUrl" must be an instance of URL, or Request',Gn);let o,s;const r=Kn(e),c=r.as,p=r.c,l=r.auth,u=r.fetch,d=r.tlsOnly,h=r.jarm,m=r.hybrid,f=r.nonRepudiation,v=r.timeout,b=r.decrypt,x=r.implicit;if((null==a?void 0:a.flag)===ga)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 wt("form_post responses are expected to use the POST method",yt,{cause:e});if("application/x-www-form-urlencoded"!==mi(e))throw wt("form_post responses are expected to use the application/x-www-form-urlencoded content-type",yt,{cause:e});return async function(e){if(e.bodyUsed)throw wt("form_post Request instances must contain a readable body",yt,{cause:e});return e.text()}(e)}(e));if(m)t.hash=i.toString();else for(const e of i.entries()){var w=y(e,2);const i=w[0],n=w[1];t.searchParams.append(i,n)}break;default:throw Xn("unexpected Request HTTP method",Bn)}}switch(s=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!h:o=await h(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!!x:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{o=function(e,t,i,n){if(Bt(e),Gt(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw wt('"parameters" must be an instance of URLSearchParams, or URL',xt);if(Vi(i,"response"))throw zt('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',Ui,{parameters:i});const a=Vi(i,"iss"),o=Vi(i,"state");if(!a&&e.authorization_response_iss_parameter_supported)throw zt('response parameter "iss" (issuer) missing',Ui,{parameters:i});if(a&&a!==e.issuer)throw zt('unexpected "iss" (issuer) response parameter value',Ui,{expected:e.issuer,parameters:i});switch(n){case void 0:case Gi:if(void 0!==o)throw zt('unexpected "state" response parameter encountered',Ui,{expected:void 0,parameters:i});break;case Bi:break;default:if(Ht(n,'"expectedState" argument'),o!==n)throw zt(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',Ui,{expected:n,parameters:i})}if(Vi(i,"error"))throw new ni("authorization response from the server is an error",{cause:i});const s=Vi(i,"id_token"),r=Vi(i,"token");if(void 0!==s||void 0!==r)throw new Ut("implicit and hybrid flows are not supported");return c=new URLSearchParams(i),ki.add(c),c;var c}(c,p,t.searchParams,null==i?void 0:i.expectedState)}catch(e){ea(e)}}}const _=await async function(e,t,i,n,a,o,s){if(Bt(e),Gt(t),!ki.has(n))throw wt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',yt);Ht(a,'"redirectUri"');const r=Vi(n,"code");if(!r)throw zt('no authorization code in "callbackParameters"',Ui);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",a),c.set("code",r),o!==Si&&(Ht(o,'"codeVerifier"'),c.set("code_verifier",o)),vi(e,t,i,"authorization_code",c,s)}(c,p,l,o,s,(null==i?void 0:i.pkceCodeVerifier)||Si,{additionalParameters:n,[Tt]:u,[_t]:!d,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Hn),signal:fa(v)}).catch(ea);"string"!=typeof(null==i?void 0:i.expectedNonce)&&"number"!=typeof(null==i?void 0:i.maxAge)||(i.idTokenExpected=!0);const k=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=ji;break;case ji:break;default:Ht(n,'"expectedNonce" argument'),r.push("nonce")}switch(null!=a||(a=t.default_max_age),a){case void 0:a=Ai;break;case Ai:break;default:qt(a,!0,'"maxAge" argument'),r.push("auth_time")}const c=await xi(e,t,i,r,o,s);Ht(c.id_token,'"response" body "id_token" property',Ui,{body:c});const p=yi(c);if(a!==Ai){const e=Vt()+Ft(t),i=Zt(t);if(p.auth_time+a<e-i)throw zt("too much time has elapsed since the last End-User authentication",Wi,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(n===ji){if(void 0!==p.nonce)throw zt('unexpected ID Token "nonce" claim value',Mi,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==n)throw zt('unexpected ID Token "nonce" claim value',Mi,{expected:n,claims:p,claim:"nonce"});return c}(e,t,i,n.expectedNonce,n.maxAge,n[jt],n.recognizedTokenTypes):async function(e,t,i,n,a){const o=await xi(e,t,i,void 0,n,a),s=yi(o);if(s){if(void 0!==t.default_max_age){qt(t.default_max_age,!0,'"client.default_max_age"');const e=Vt()+Ft(t),i=Zt(t);if(s.auth_time+t.default_max_age<e-i)throw zt("too much time has elapsed since the last End-User authentication",Wi,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw zt('unexpected ID Token "nonce" claim value',Mi,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==n?void 0:n[jt],null==n?void 0:n.recognizedTokenTypes)}(c,p,_,{expectedNonce:null==i?void 0:i.expectedNonce,maxAge:null==i?void 0:i.maxAge,requireIdToken:null==i?void 0:i.idTokenExpected,[jt]:b});let S;try{S=await k}catch(t){if(va(t,a))return pa(e,void 0,i,n,g(g({},a),{},{flag:ga,authResponse:o,redirectUri:s}));ea(t)}return S.id_token&&await(null==f?void 0:f(_)),na(S),S}async function la(e,t,i,n){ma(e),i=new URLSearchParams(i);const a=Kn(e),o=a.as,s=a.c,r=a.auth,c=a.fetch,p=a.tlsOnly,l=a.nonRepudiation,u=a.timeout,d=a.decrypt,h=await async function(e,t,i,n,a){Bt(e),Gt(t),Ht(n,'"refreshToken"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("refresh_token",n),vi(e,t,i,"refresh_token",o,a)}(o,s,r,t,{[Tt]:c,[_t]:!p,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Hn),signal:fa(u)}).catch(ea),m=async function(e,t,i,n){return xi(e,t,i,void 0,null==n?void 0:n[jt],null==n?void 0:n.recognizedTokenTypes)}(o,s,h,{[jt]:d});let f;try{f=await m}catch(a){if(va(a,n))return la(e,t,i,g(g({},n),{},{flag:ga}));ea(a)}return f.id_token&&await(null==l?void 0:l(h)),na(f),f}async function ua(e,t,i){ma(e),t=new URLSearchParams(t);const n=Kn(e),a=n.as,o=n.c,s=n.auth,r=n.fetch,c=n.tlsOnly,p=n.timeout,l=await async function(e,t,i,n,a){return Bt(e),Gt(t),vi(e,t,i,"client_credentials",new URLSearchParams(n),a)}(a,o,s,t,{[Tt]:r,[_t]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Hn),signal:fa(p)}).catch(ea),u=async function(e,t,i){return xi(e,t,i,void 0,void 0,void 0)}(a,o,l);let d;try{d=await u}catch(n){if(va(n,i))return ua(e,t,g(g({},i),{},{flag:ga}));ea(n)}return na(d),d}function da(e,t){ma(e);const i=Kn(e),n=i.as,a=i.c,o=i.tlsOnly,s=i.hybrid,r=i.jarm,c=i.implicit,p=ti(n,"authorization_endpoint",!1,o);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",s?"code id_token":c?"id_token":"code"),c&&!t.has("nonce"))throw Xn("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Bn);r&&t.set("response_mode","jwt")}for(const e of t.entries()){var l=y(e,2);const t=l[0],i=l[1];p.searchParams.append(t,i)}return p}async function ha(e,t,i){ma(e);const n=da(e,t),a=Kn(e),o=a.as,s=a.c,r=a.auth,c=a.fetch,p=a.tlsOnly,l=a.timeout,u=await async function(e,t,i,n,a){var o;Bt(e),Gt(t);const s=ti(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[_t])),r=new URLSearchParams(n);r.set("client_id",t.client_id);const c=Dt(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(hi(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const p=await fi(e,t,i,s,r,c,a);return null==a||null===(o=a.DPoP)||void 0===o||o.cacheNonce(p,s),p}(o,s,r,n.searchParams,{[Tt]:c,[_t]:!p,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Hn),signal:fa(l)}).catch(ea),d=async function(e,t,i){if(Bt(e),Gt(t),!bt(i,Response))throw wt('"response" must be an instance of Response',xt);await di(i,201,"Pushed Authorization Request Endpoint"),Ki(i);const n=await Xi(i);Ht(n.request_uri,'"response" body "request_uri" property',Ui,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return qt(a,!0,'"response" body "expires_in" property',Ui,{body:n}),n.expires_in=a,n}(o,s,u);let h;try{h=await d}catch(n){if(va(n,i))return ha(e,t,g(g({},i),{},{flag:ga}));ea(n)}return da(e,{request_uri:h.request_uri})}function ma(e){if(!(e instanceof ia))throw Xn('"config" must be an instance of Configuration',Gn);if(Object.getPrototypeOf(e)!==ia.prototype)throw Xn("subclassing Configuration is not allowed",Bn)}function fa(e){return e?AbortSignal.timeout(1e3*e):void 0}function va(e,t){return!(null==t||!t.DPoP||t.flag===ga)&&function(e){if(e instanceof ai){const t=e.cause,i=t[0];return 1===t.length&&"dpop"===i.scheme&&"use_dpop_nonce"===i.parameters.error}return e instanceof ii&&"use_dpop_nonce"===e.error}(e)}Object.freeze(ia.prototype);const ga=Symbol();async function ba(e,t,i,n){ma(e);const a=Kn(e),o=a.as,s=a.c,r=a.auth,c=a.fetch,p=a.tlsOnly,l=a.timeout,u=a.decrypt,d=a.nonRepudiation,h=await async function(e,t,i,n,a,o){return Bt(e),Gt(t),Ht(n,'"grantType"'),vi(e,t,i,n,new URLSearchParams(a),o)}(o,s,r,t,new URLSearchParams(i),{[Tt]:c,[_t]:!p,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Hn),signal:fa(l)}).catch(ea);let m;"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(m={n_a:()=>{}});const f=async function(e,t,i,n){return xi(e,t,i,void 0,null==n?void 0:n[jt],null==n?void 0:n.recognizedTokenTypes)}(o,s,h,{[jt]:u,recognizedTokenTypes:m});let v;try{v=await f}catch(a){if(va(a,n))return ba(e,t,i,g(g({},n),{},{flag:ga}));ea(a)}return v.id_token&&await(null==d?void 0:d(h)),na(v),v}async function ya(e,t,i){if(!jn(e))throw new vn("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new vn('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new vn("JWS Protected Header incorrect type");if(void 0===e.payload)throw new vn("JWS Payload missing");if("string"!=typeof e.signature)throw new vn("JWS Signature missing or incorrect type");if(void 0!==e.header&&!jn(e.header))throw new vn("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=on(e.protected);n=JSON.parse(tn.decode(t))}catch(e){throw new vn("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 vn("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a=g(g({},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 fn('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)}(vn,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 vn('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const r=a.alg;if("string"!=typeof r||!r)throw new vn('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 mn('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new vn("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new vn("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(An(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Wn(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(!Tn(t))throw new TypeError(ln(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(Dn(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(An(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Wn(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)&&Wn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!Tn(t))throw new TypeError(ln(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(Dn(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(Dn(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Dn(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(Dn(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Dn(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)=>e+t.length,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?nn(e.protected):new Uint8Array,nn("."),"string"==typeof e.payload?s?nn(e.payload):en.encode(e.payload):e.payload),u=En(e.signature,"signature",vn),d=await async function(e,t){if(e instanceof Uint8Array)return e;if(kn(e))return e;if(Sn(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{Cn||(Cn=new WeakMap);let i=Cn.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(On)}o=e.toCryptoKey(e.asymmetricKeyType,a,n?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(On);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(On);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(On)}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(On);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(On);return i?i[t]=o:Cn.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return Rn(e,i,t)}if(An(e))return e.k?on(e.k):Rn(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 pn("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(!rn(e.algorithm,"HMAC"))throw sn("HMAC");cn(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if(!rn(e.algorithm,"RSASSA-PKCS1-v1_5"))throw sn("RSASSA-PKCS1-v1_5");cn(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if(!rn(e.algorithm,"RSA-PSS"))throw sn("RSA-PSS");cn(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if(!rn(e.algorithm,"Ed25519"))throw sn("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!rn(e.algorithm,t))throw sn(t);break;case"ES256":case"ES384":case"ES512":{if(!rn(e.algorithm,"ECDSA"))throw sn("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 sn(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 i=t.algorithm.modulusLength;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 fn("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 _n;let h;h=s?En(e.payload,"payload",vn):"string"==typeof e.payload?en.encode(e.payload):e.payload;const m={payload:h};return void 0!==e.protected&&(m.protectedHeader=n),void 0!==e.header&&(m.unprotectedHeader=e.header),p?g(g({},m),{},{key:d}):m}const xa=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function wa(e){const t=xa.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 _a=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function ka(e,t){let i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(tn.decode(t))}catch(e){}if(!jn(i))throw new gn("JWT Claims Set must be a top-level JSON object");const a=n.typ;if(a&&("string"!=typeof e.typ||_a(e.typ)!==_a(a)))throw new dn('unexpected "typ" JWT header value',i,"typ","check_failed");const o=n.requiredClaims,s=void 0===o?[]:o,r=n.issuer,c=n.subject,p=n.audience,l=n.maxTokenAge,u=[...s];void 0!==l&&u.push("iat"),void 0!==p&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==r&&u.push("iss");for(const e of new Set(u.reverse()))if(!(e in i))throw new dn('missing required "'.concat(e,'" claim'),i,e,"missing");if(r&&!(Array.isArray(r)?r:[r]).includes(i.iss))throw new dn('unexpected "iss" claim value',i,"iss","check_failed");if(c&&i.sub!==c)throw new dn('unexpected "sub" claim value',i,"sub","check_failed");if(p&&(h="string"==typeof p?[p]:p,!("string"==typeof(d=i.aud)?h.includes(d):Array.isArray(d)&&h.some(Set.prototype.has.bind(new Set(d))))))throw new dn('unexpected "aud" claim value',i,"aud","check_failed");var d,h;let m;switch(typeof n.clockTolerance){case"string":m=wa(n.clockTolerance);break;case"number":m=n.clockTolerance;break;case"undefined":m=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const f=(v=n.currentDate||new Date,Math.floor(v.getTime()/1e3));var v;if((void 0!==i.iat||l)&&"number"!=typeof i.iat)throw new dn('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new dn('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>f+m)throw new dn('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new dn('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=f-m)throw new hn('"exp" claim timestamp check failed',i,"exp","check_failed")}if(l){const e=f-i.iat;if(e-m>("number"==typeof l?l:wa(l)))throw new hn('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-m)throw new dn('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}function Sa(e){return jn(e)}var Ta,Ea,ja=new WeakMap,Aa=new WeakMap;class Pa{constructor(e){if(d(this,ja,void 0),d(this,Aa,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Sa)}(e))throw new bn("JSON Web Key Set malformed");h(ja,this,structuredClone(e))}jwks(){return u(ja,this)}async getKey(e,t){const i=g(g({},e),null==t?void 0:t.header),n=i.alg,a=i.kid,o=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 fn('Unsupported "alg" value for a JSON Web Key Set')}}(n),s=u(ja,this).keys.filter(e=>{let t=o===e.kty;if(t&&"string"==typeof a&&(t=a===e.kid),!t||"string"!=typeof e.alg&&"AKP"!==o||(t=n===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(n){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}),r=s[0],c=s.length;if(0===c)throw new yn;if(1!==c){const e=new xn,t=u(Aa,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new x(e.apply(this,arguments))}}(function*(){for(const e of s)try{yield yield p(Ia(t,e,n))}catch(e){}}),e}return Ia(u(Aa,this),r,n)}}async function Ia(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(!jn(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 on(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new fn('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return In(g(g({},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 In(g(g({},e),{},{ext:i}));case"EC":case"OKP":return In(g(g({},e),{},{alg:t,ext:i}));default:throw new fn('Unsupported "kty" (Key Type) Parameter value')}}(g(g({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new bn("JSON Web Key Set members must be public keys");n[i]=e}return n[i]}function Oa(e){const t=new Pa(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 Ca;if("undefined"==typeof navigator||null===(Ta=navigator.userAgent)||void 0===Ta||null===(Ea=Ta.startsWith)||void 0===Ea||!Ea.call(Ta,"Mozilla/5.0 ")){const e="v6.2.3";Ca="".concat("jose","/").concat(e)}const Ra=Symbol(),Ua=Symbol();var La=new WeakMap,za=new WeakMap,Na=new WeakMap,Da=new WeakMap,Wa=new WeakMap,Ma=new WeakMap,qa=new WeakMap,Ha=new WeakMap,Ja=new WeakMap,Ka=new WeakMap;class $a{constructor(e,t){if(d(this,La,void 0),d(this,za,void 0),d(this,Na,void 0),d(this,Da,void 0),d(this,Wa,void 0),d(this,Ma,void 0),d(this,qa,void 0),d(this,Ha,void 0),d(this,Ja,void 0),d(this,Ka,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,n;h(La,this,new URL(e.href)),h(za,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),h(Na,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),h(Da,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),h(qa,this,new Headers(null==t?void 0:t.headers)),Ca&&!u(qa,this).has("User-Agent")&&u(qa,this).set("User-Agent",Ca),u(qa,this).has("accept")||(u(qa,this).set("accept","application/json"),u(qa,this).append("accept","application/jwk-set+json")),h(Ha,this,null==t?void 0:t[Ra]),void 0!==(null==t?void 0:t[Ua])&&(h(Ka,this,null==t?void 0:t[Ua]),i=null==t?void 0:t[Ua],n=u(Da,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=n)&&"jwks"in i&&jn(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,jn)&&(h(Wa,this,u(Ka,this).uat),h(Ja,this,Oa(u(Ka,this).jwks))))}pendingFetch(){return!!u(Ma,this)}coolingDown(){return"number"==typeof u(Wa,this)&&Date.now()<u(Wa,this)+u(Na,this)}fresh(){return"number"==typeof u(Wa,this)&&Date.now()<u(Wa,this)+u(Da,this)}jwks(){var e;return null===(e=u(Ja,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){u(Ja,this)&&this.fresh()||await this.reload();try{return await u(Ja,this).call(this,e,t)}catch(i){if(i instanceof yn&&!1===this.coolingDown())return await this.reload(),u(Ja,this).call(this,e,t);throw i}}async reload(){u(Ma,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&h(Ma,this,void 0),u(Ma,this)||h(Ma,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 wn;throw e});if(200!==a.status)throw new un("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new un("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(u(La,this).href,u(qa,this),AbortSignal.timeout(u(za,this)),u(Ha,this)).then(e=>{h(Ja,this,Oa(e)),u(Ka,this)&&(u(Ka,this).uat=Date.now(),u(Ka,this).jwks=e),h(Wa,this,Date.now()),h(Ma,this,void 0)}).catch(e=>{throw h(Ma,this,void 0),e})),await u(Ma,this)}}const Fa=["mfaToken"],Za=["mfaToken"];var Va,Ba,Ga,Xa,Ya,Qa,eo,to,io,no,ao,oo,so,ro,co,po,lo,uo,ho,mo,fo,vo,go;function bo(e){var t,i;if("object"!=typeof e||null===e)return{error:"unknown_error",error_description:String(e)};const n=e,a={error:null!==(t=n.error)&&void 0!==t?t:"",error_description:null!==(i=n.error_description)&&void 0!==i?i:"",message:n.message};if("mfa_required"===n.error&&n.cause){a.mfa_token="string"==typeof n.cause.mfa_token?n.cause.mfa_token:void 0;const e=n.cause.mfa_requirements;"object"==typeof e&&null!==e&&(a.mfa_requirements=e)}return a}var yo=class extends Error{constructor(e,t){super(t),f(this,"code",void 0),this.name="NotSupportedError",this.code=e}},xo=class extends Error{constructor(e,t,i){super(t),f(this,"cause",void 0),f(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message,mfa_token:i.mfa_token,mfa_requirements:i.mfa_requirements}}},wo=class extends xo{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},_o=class extends xo{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},ko=class extends xo{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},So=class extends xo{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},To=class extends xo{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},Eo=class extends xo{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},jo=class extends Error{constructor(e){super(e),f(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Ao=class extends xo{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),f(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},Po=class extends xo{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},Io=class extends xo{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},Oo=class extends xo{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Co=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),f(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function Ro(e){return Object.entries(e).filter(e=>void 0!==y(e,2)[1]).reduce((e,t)=>g(g({},e),{},{[t[0]]:t[1]}),{})}var Uo=class extends Error{constructor(e,t,i){super(t),f(this,"cause",void 0),f(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},Lo=class extends Uo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},zo=class extends Uo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},No=class extends Uo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},Do=class extends Uo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}},Wo=class extends Uo{constructor(e,t){super("mfa_verify_error",e,t),this.name="MfaVerifyError"}};function Mo(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var qo=class e{constructor(e,t,i,n,a,o,s){f(this,"accessToken",void 0),f(this,"idToken",void 0),f(this,"refreshToken",void 0),f(this,"expiresAt",void 0),f(this,"scope",void 0),f(this,"claims",void 0),f(this,"authorizationDetails",void 0),f(this,"tokenType",void 0),f(this,"issuedTokenType",void 0),f(this,"recoveryCode",void 0),f(this,"act",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}},Ho={otp:"http://auth0.com/oauth/grant-type/mfa-otp",oob:"http://auth0.com/oauth/grant-type/mfa-oob","recovery-code":"http://auth0.com/oauth/grant-type/mfa-recovery-code"},Jo=(Va=new WeakMap,Ba=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,class{constructor(e){var t;d(this,Va,void 0),d(this,Ba,void 0),d(this,Ga,void 0),d(this,Xa,void 0),d(this,Ya,void 0),h(Va,this,"https://".concat(e.domain)),h(Ba,this,e.clientId),h(Ga,this,e.clientSecret),h(Xa,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),h(Ya,this,e.getConfiguration)}async listAuthenticators(e){const t="".concat(u(Va,this),"/mfa/authenticators"),i=e.mfaToken,n=await u(Xa,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!n.ok){let t;try{t=await n.json()}catch(e){throw new Lo("Failed to list authenticators")}throw new Lo(t.error_description||"Failed to list authenticators",t)}return(await n.json()).map(Mo)}async enrollAuthenticator(e){const t="".concat(u(Va,this),"/mfa/associate"),i=e.mfaToken,n=b(e,Fa),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 u(Xa,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){let t;try{t=await o.json()}catch(e){throw new zo("Failed to enroll authenticator")}throw new zo(t.error_description||"Failed to enroll authenticator",t)}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 t=e.authenticatorId,i=e.mfaToken,n="".concat(u(Va,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),a=await u(Xa,this).call(this,n,{method:"DELETE",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!a.ok){let t;try{t=await a.json()}catch(e){throw new No("Failed to delete authenticator")}throw new No(t.error_description||"Failed to delete authenticator",t)}}async challengeAuthenticator(e){const t="".concat(u(Va,this),"/mfa/challenge"),i=e.mfaToken,n=b(e,Za),a={mfa_token:i,client_id:u(Ba,this),challenge_type:n.challengeType};u(Ga,this)&&(a.client_secret=u(Ga,this)),n.authenticatorId&&(a.authenticator_id=n.authenticatorId);const o=await u(Xa,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){let t;try{t=await o.json()}catch(e){throw new Do("Failed to challenge authenticator")}throw new Do(t.error_description||"Failed to challenge authenticator",t)}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())}async verify(e){if(!u(Ya,this))throw new Error("MFA verify requires a configuration provider (getConfiguration was not set)");const t=await u(Ya,this).call(this),i={mfa_token:e.mfaToken};e.audience&&(i.audience=e.audience),"otp"===e.factorType?i.otp=e.otp:"oob"===e.factorType?(i.oob_code=e.oobCode,e.bindingCode&&(i.binding_code=e.bindingCode)):"recovery-code"===e.factorType&&(i.recovery_code=e.recoveryCode);try{const n=await ba(t,Ho[e.factorType],i),a=qo.fromTokenEndpointResponse(n);return n.recovery_code&&(a.recoveryCode=n.recovery_code),a}catch(e){var n,a,o;if(e instanceof Wo)throw e;const t=e;throw new Wo(t.error_description||t.message||"Failed to verify MFA challenge",{error:null!==(n=t.error)&&void 0!==n?n:"mfa_verify_error",error_description:null!==(a=null!==(o=t.error_description)&&void 0!==o?o:t.message)&&void 0!==a?a:"Failed to verify MFA challenge"})}}}),Ko=class extends Error{constructor(e,t,i){super(t),f(this,"cause",void 0),f(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},$o=class extends Ko{constructor(e,t){super("passkey_register_error",e,t),this.name="PasskeyRegisterError"}},Fo=class extends Ko{constructor(e,t){super("passkey_challenge_error",e,t),this.name="PasskeyChallengeError"}},Zo=class extends Ko{constructor(e,t){super("passkey_get_token_error",e,t),this.name="PasskeyGetTokenError",this.cause=t&&{error:t.error,error_description:t.error_description,message:t.message,mfa_token:t.mfa_token,mfa_requirements:t.mfa_requirements}}},Vo="urn:okta:params:oauth:grant-type:webauthn",Bo=(Qa=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,no=new WeakSet,class{constructor(e){var t;m(this,no),d(this,Qa,void 0),d(this,eo,void 0),d(this,to,void 0),d(this,io,void 0),h(Qa,this,"https://".concat(e.domain)),h(eo,this,e.clientId),h(to,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),h(io,this,e.grantRequest)}async register(e){const t="".concat(u(Qa,this),"/passkey/register"),i=g(g(g(g(g(g(g(g({},e.email&&{email:e.email}),e.name&&{name:e.name}),e.phoneNumber&&{phone_number:e.phoneNumber}),e.username&&{username:e.username}),e.givenName&&{given_name:e.givenName}),e.familyName&&{family_name:e.familyName}),e.nickname&&{nickname:e.nickname}),e.picture&&{picture:e.picture}),n={client_id:u(eo,this),user_profile:i};e.realm&&(n.realm=e.realm),e.organization&&(n.organization=e.organization),e.userMetadata&&(n.user_metadata=e.userMetadata);const a=await u(to,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const e=await c(no,this,Go).call(this,a);throw new $o(e.error_description||"Failed to request signup challenge",e)}return{authSession:(o=await a.json()).auth_session,authnParamsPublicKey:g({},o.authn_params_public_key)};var o}async challenge(e){const t="".concat(u(Qa,this),"/passkey/challenge"),i={client_id:u(eo,this)};null!=e&&e.realm&&(i.realm=e.realm),null!=e&&e.organization&&(i.organization=e.organization);const n=await u(to,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!n.ok){const e=await c(no,this,Go).call(this,n);throw new Fo(e.error_description||"Failed to request login challenge",e)}return{authSession:(a=await n.json()).auth_session,authnParamsPublicKey:g({},a.authn_params_public_key)};var a}async getTokenByPasskey(e){const t=new URLSearchParams({auth_session:e.authSession,authn_response:JSON.stringify(e.credential)});e.realm&&t.append("realm",e.realm),e.scope&&t.append("scope",e.scope),e.audience&&t.append("audience",e.audience),e.organization&&t.append("organization",e.organization);try{return await u(io,this).call(this,Vo,t)}catch(e){const t=bo(e);throw new Zo(t.error_description||"Failed to exchange passkey credential for tokens.",t)}}});async function Go(e){try{return await e.json()}catch(t){return{error:"unknown_error",error_description:"HTTP ".concat(e.status," ").concat(e.statusText)}}}var Xo=(ao=new WeakMap,oo=new WeakMap,so=new WeakMap,class{constructor(e,t){d(this,ao,new Map),d(this,oo,void 0),d(this,so,void 0),h(so,this,Math.max(1,Math.floor(e))),h(oo,this,Math.max(0,Math.floor(t)))}get(e){const t=u(ao,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return u(ao,this).delete(e),u(ao,this).set(e,t),t.value;u(ao,this).delete(e)}}set(e,t){for(u(ao,this).has(e)&&u(ao,this).delete(e),u(ao,this).set(e,{value:t,expiresAt:Date.now()+u(oo,this)});u(ao,this).size>u(so,this);){const e=u(ao,this).keys().next().value;if(void 0===e)break;u(ao,this).delete(e)}}}),Yo=new Map;function Qo(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 es=class{static createDiscoveryCache(e){const t=(i=e.maxEntries,n=e.ttlMs,"".concat(i,":").concat(n));var i,n;let a=(o=t,Yo.get(o));var o;return a||(a=new Xo(e.maxEntries,e.ttlMs),Yo.set(t,a)),a}static createJwksCache(){return{}}},ts="openid profile email offline_access",is=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 ns(e){if(null==e)throw new Eo("subject_token is required");if("string"!=typeof e)throw new Eo("subject_token must be a string");if(0===e.trim().length)throw new Eo("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new Eo("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new Eo("subject_token must not include the 'Bearer ' prefix")}function as(e,t){if(t)for(const n of Object.entries(t)){var i=y(n,2);const t=i[0],a=i[1];if(!is.has(t))if(Array.isArray(a)){if(a.length>20)throw new Eo("Parameter '".concat(t,"' exceeds maximum array size of ").concat(20));a.forEach(i=>{e.append(t,i)})}else e.append(t,a)}}var os,ss,rs="urn:ietf:params:oauth:token-type:access_token",cs=(ro=new WeakMap,co=new WeakMap,po=new WeakMap,lo=new WeakMap,uo=new WeakMap,ho=new WeakMap,mo=new WeakMap,fo=new WeakMap,vo=new WeakMap,go=new WeakSet,class{constructor(e){var t,i,n,a;if(m(this,go),d(this,ro,void 0),d(this,co,void 0),d(this,po,void 0),d(this,lo,void 0),d(this,uo,void 0),d(this,ho,void 0),d(this,mo,void 0),d(this,fo,void 0),d(this,vo,void 0),f(this,"mfa",void 0),f(this,"passkey",void 0),h(lo,this,e),e.useMtls&&!e.customFetch)throw new yo("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");h(uo,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,g(g({},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.9.1"}));const o=Qo(e.discoveryCache);h(mo,this,es.createDiscoveryCache(o)),h(fo,this,new Map),h(vo,this,es.createJwksCache()),this.mfa=new Jo({domain:u(lo,this).domain,clientId:u(lo,this).clientId,clientSecret:u(lo,this).clientSecret,customFetch:u(uo,this),getConfiguration:async()=>(await c(go,this,us).call(this)).configuration}),this.passkey=new Bo({domain:u(lo,this).domain,clientId:u(lo,this).clientId,customFetch:u(uo,this),grantRequest:async(e,t)=>{const i=(await c(go,this,us).call(this)).serverMetadata,n=await c(go,this,ls).call(this,i);n[Vn]=function(e,t){return(i,n)=>{const a=null==n?void 0:n.body;if(t!==Vo||!(a instanceof URLSearchParams))return e(i,n);const o={};for(const e of a){var s=y(e,2);const t=s[0],i=s[1];o[t]="authn_response"===t?JSON.parse(i):i}const r=new Headers(null==n?void 0:n.headers);return r.set("Content-Type","application/json"),e(i,g(g({},n),{},{headers:r,body:JSON.stringify(o)}))}}(u(uo,this),e);const a=await ba(n,e,t);return qo.fromTokenEndpointResponse(a)}})}async getServerMetadata(){return(await c(go,this,us).call(this)).serverMetadata}async buildAuthorizationUrl(e){const t=(await c(go,this,us).call(this)).serverMetadata;if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new yo("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 c(go,this,fs).call(this,e)}catch(e){throw new Po(e)}}async buildLinkUserUrl(e){try{const t=await c(go,this,fs).call(this,{authorizationParams:g(g({},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 Io(e)}}async buildUnlinkUserUrl(e){try{const t=await c(go,this,fs).call(this,{authorizationParams:g(g({},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 Oo(e)}}async backchannelAuthentication(e){const t=await c(go,this,us).call(this),i=t.configuration,n=t.serverMetadata,a=Ro(g(g({},u(lo,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(g(g({scope:ts},a),{},{client_id:u(lo,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&o.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&o.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await sa(i,o),t=await ra(i,e);return qo.fromTokenEndpointResponse(t)}catch(e){throw new Ao(e)}}async initiateBackchannelAuthentication(e){const t=await c(go,this,us).call(this),i=t.configuration,n=t.serverMetadata,a=Ro(g(g({},u(lo,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(g(g({scope:ts},a),{},{client_id:u(lo,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&o.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&o.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await sa(i,o);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new Ao(e)}}async backchannelAuthenticationGrant(e){let t=e.authReqId;const i=(await c(go,this,us).call(this)).configuration,n=new URLSearchParams({auth_req_id:t});try{const e=await ba(i,"urn:openid:params:grant-type:ciba",n);return qo.fromTokenEndpointResponse(e)}catch(e){throw new Ao(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new To("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 To("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?rs:"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof Eo)throw new To(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?c(go,this,ds).call(this,e):c(go,this,hs).call(this,e)}async getTokenByCode(e,t){const i=(await c(go,this,us).call(this)).configuration;try{const n=await pa(i,e,{pkceCodeVerifier:t.codeVerifier});return qo.fromTokenEndpointResponse(n)}catch(e){throw new wo("There was an error while trying to request a token.",bo(e))}}async getTokenByRefreshToken(e){const t=(await c(go,this,us).call(this)).configuration,i=new URLSearchParams;e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope);try{const n=await la(t,e.refreshToken,i);return qo.fromTokenEndpointResponse(n)}catch(e){throw new ko("The access token has expired and there was an error while trying to refresh it.",bo(e))}}async getTokenByPassword(e){const t=(await c(go,this,us).call(this)).configuration,i=new URLSearchParams({username:e.username,password:e.password});e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope),e.realm&&i.append("realm",e.realm);let n=t;if(e.auth0ForwardedFor){const i=await c(go,this,ms).call(this);n=new ia(t.serverMetadata(),u(lo,this).clientId,u(lo,this).clientSecret,i),n[Vn]=(t,i)=>u(uo,this).call(this,t,g(g({},i),{},{headers:g(g({},i.headers),{},{"auth0-forwarded-for":e.auth0ForwardedFor})}))}try{const e=await ba(n,"password",i);return qo.fromTokenEndpointResponse(e)}catch(e){throw new So("There was an error while trying to request a token.",bo(e))}}async getTokenByClientCredentials(e){const t=(await c(go,this,us).call(this)).configuration;try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const n=await ua(t,i);return qo.fromTokenEndpointResponse(n)}catch(e){throw new _o("There was an error while trying to request a token.",bo(e))}}async buildLogoutUrl(e){const t=await c(go,this,us).call(this),i=t.configuration;if(!t.serverMetadata.end_session_endpoint){const t=new URL("https://".concat(u(lo,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",u(lo,this).clientId),t}return function(e,t){ma(e);const i=Kn(e),n=i.as,a=i.c,o=ti(n,"end_session_endpoint",!1,i.tlsOnly);(t=new URLSearchParams(t)).has("client_id")||t.set("client_id",a.client_id);for(const e of t.entries()){var s=y(e,2);const t=s[0],i=s[1];o.searchParams.append(t,i)}return o}(i,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const t=(await c(go,this,us).call(this)).serverMetadata,i=Qo(u(lo,this).discoveryCache),n=t.jwks_uri;u(ho,this)||h(ho,this,function(e,t){const i=new $a(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,[Ra]:u(uo,this),[Ua]:u(vo,this)}));const a=(await async function(e,t,i){var n;const a=await async function(e,t,i){if(e instanceof Uint8Array&&(e=tn.decode(e)),"string"!=typeof e)throw new vn("Compact JWS must be a string or Uint8Array");const n=e.split("."),a=n[0],o=n[1],s=n[2];if(3!==n.length)throw new vn("Invalid Compact JWS");const r=await ya({payload:o,protected:a,signature:s},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?g(g({},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 gn("JWTs MUST NOT use unencoded payload");const o={payload:ka(a.protectedHeader,a.payload,i),protectedHeader:a.protectedHeader};return"function"==typeof t?g(g({},o),{},{key:a.key}):o}(e.logoutToken,u(ho,this),{issuer:t.issuer,audience:u(lo,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]})).payload;if(!("sid"in a)&&!("sub"in a))throw new jo('either "sid" or "sub" (or both) claims must be present');if("sid"in a&&"string"!=typeof a.sid)throw new jo('"sid" claim must be a string');if("sub"in a&&"string"!=typeof a.sub)throw new jo('"sub" claim must be a string');if("nonce"in a)throw new jo('"nonce" claim is prohibited');if(!("events"in a))throw new jo('"events" claim is missing');if("object"!=typeof a.events||null===a.events)throw new jo('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in a.events))throw new jo('"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 jo('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:a.sid,sub:a.sub}}});function ps(){const e=u(lo,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(u(lo,this).useMtls?"1":"0")}async function ls(e){const t=await c(go,this,ms).call(this),i=new ia(e,u(lo,this).clientId,u(lo,this).clientSecret,t);return i[Vn]=u(uo,this),i}async function us(){if(u(ro,this)&&u(co,this))return{configuration:u(ro,this),serverMetadata:u(co,this)};const e=c(go,this,ps).call(this),t=u(mo,this).get(e);if(t)return h(co,this,t.serverMetadata),h(ro,this,await c(go,this,ls).call(this,t.serverMetadata)),{configuration:u(ro,this),serverMetadata:u(co,this)};const i=u(fo,this).get(e);if(i){const e=await i;return h(co,this,e.serverMetadata),h(ro,this,await c(go,this,ls).call(this,e.serverMetadata)),{configuration:u(ro,this),serverMetadata:u(co,this)}}const n=(async()=>{const t=await c(go,this,ms).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 Xn('"server" must be an instance of URL',Gn);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 wt('"'.concat("issuerIdentifier",'" must be an instance of URL'),xt);Qt(e,!0!==(null==n?void 0:n[_t]));const a=i(new URL(e.href)),o=Dt(null==n?void 0:n.headers);return o.set("accept","application/json"),((null==n?void 0:n[Tt])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:Wt(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=Mt("".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=Mt("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw wt('"options.algorithm" must be "oidc" (default), or "oauth2"',yt)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[Tt]:null==t?void 0:t[Vn],[_t]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(ca),signal:s,headers:new Headers(Hn)}):((null==t?void 0:t[Vn])||fetch)((Qt(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(ca)),e.href),{headers:Object.fromEntries(new Headers(g({accept:"application/json"},Hn)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Yi)throw wt('"expectedIssuerIdentifier" must be an instance of URL',xt);if(!bt(t,Response))throw wt('"response" must be an instance of Response',xt);if(200!==t.status)throw zt('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',zi,t);Ki(t);const n=await Xi(t);if(Ht(n.issuer,'"response" body "issuer" property',Ui,{body:n}),i!==Yi&&new URL(n.issuer).href!==i.href)throw zt('"response" body "issuer" property does not match the expected value',qi,{expected:i.href,body:n,attribute:"issuer"});return n}(Yi,e)).catch(ea);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[ta]=!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 Yn("discovered metadata issuer does not match the expected issuer",{code:qi,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,a),s=new ia(o,t,i,n);let r=Kn(s);if(null!=a&&a[Vn]&&(r.fetch=a[Vn]),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(u(lo,this).domain)),u(lo,this).clientId,{use_mtls_endpoint_aliases:u(lo,this).useMtls},t,{[Vn]:u(uo,this)}),n=i.serverMetadata();return u(mo,this).set(e,{serverMetadata:n}),{configuration:i,serverMetadata:n}})(),a=n.then(e=>({serverMetadata:e.serverMetadata}));a.catch(()=>{}),u(fo,this).set(e,a);try{const e=await n,t=e.configuration,i=e.serverMetadata;h(ro,this,t),h(co,this,i),u(ro,this)[Vn]=u(uo,this)}finally{u(fo,this).delete(e)}return{configuration:u(ro,this),serverMetadata:u(co,this)}}async function ds(e){var t,i;const n=(await c(go,this,us).call(this)).configuration;if("audience"in e||"resource"in e)throw new Eo("audience and resource parameters are not supported for Token Vault exchanges");ns(e.subjectToken);const a=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:rs,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),as(a,e.extra);try{const e=await ba(n,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",a);return qo.fromTokenEndpointResponse(e)}catch(t){throw new Eo("Failed to exchange token for connection '".concat(e.connection,"'."),bo(t))}}async function hs(e){const t=(await c(go,this,us).call(this)).configuration;if(ns(e.subjectToken),void 0!==e.actorToken&&void 0===e.actorTokenType)throw new Eo("actorTokenType is required when actorToken is provided");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),e.actorToken&&i.append("actor_token",e.actorToken),e.actorTokenType&&i.append("actor_token_type",e.actorTokenType),as(i,e.extra);try{const a=await ba(t,"urn:ietf:params:oauth:grant-type:token-exchange",i),o=qo.fromTokenEndpointResponse(a);var n;if(e.actorToken)if(null!==(n=o.claims)&&void 0!==n&&n.act)o.act=o.claims.act;else try{o.act=function(e){if("string"!=typeof e)throw new gn("JWTs must use Compact JWS serialization, JWT must be a string");const t=e.split("."),i=t[1],n=t.length;if(5===n)throw new gn("Only JWTs using Compact JWS serialization can be decoded");if(3!==n)throw new gn("Invalid JWT");if(!i)throw new gn("JWTs must contain a payload");let a,o;try{a=on(i)}catch(e){throw new gn("Failed to base64url decode the payload")}try{o=JSON.parse(tn.decode(a))}catch(e){throw new gn("Failed to parse the decoded payload as JSON")}if(!jn(o))throw new gn("Invalid JWT Claims Set");return o}(a.access_token).act}catch(e){}return o}catch(t){throw new Eo("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),bo(t))}}async function ms(){return u(po,this)||h(po,this,(async()=>{if(!u(lo,this).clientSecret&&!u(lo,this).clientAssertionSigningKey&&!u(lo,this).useMtls)throw new Co;if(u(lo,this).useMtls)return(e,t,i,n)=>{i.set("client_id",t.client_id)};let e=u(lo,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=>an(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){zn(e,48,"Invalid PKCS#8 structure"),Ln(e),zn(e,2,"Expected version field");const t=Ln(e);e.pos+=t,zn(e,48,"Expected algorithm identifier"),Ln(e),e.pos}(t),(e=>{const t=(e=>{zn(e,6,"Expected algorithm OID");const t=Ln(e);return Nn(e,t)})(e);if(Un(t,[43,101,110]))return"X25519";if(!Un(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");zn(e,6,"Expected curve OID");const i=Ln(e),n=Nn(e,i);for(const e 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]}]){const t=e.name,i=e.oid;if(Un(n,i))return t}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 fn("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 fn('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,u(lo,this).clientAssertionSigningAlg||"RS256")),e?function(e){return function(e,t){const i=(o=e)instanceof CryptoKey?{key:o}:(null==o?void 0:o.key)instanceof CryptoKey?(void 0!==o.kid&&Ht(o.kid,'"kid"'),{key:o.key,kid:o.kid}):{},n=i.key,a=i.kid;var o;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw wt("".concat(t," must be a CryptoKey"),xt)}(e,t),"private"!==e.type)throw wt("".concat(t," must be a private CryptoKey"),yt)}(n,'"clientPrivateKey.key"'),async(e,i,o,s)=>{var r;const c={alg:$t(n),kid:a},p=function(e,t){const i=Vt()+Ft(t);return{jti:Kt(),aud:e.issuer,exp:i+60,iat:i,nbf:i,iss:t.client_id,sub:t.client_id}}(e,i);null==t||null===(r=t[Et])||void 0===r||r.call(t,c,p),o.set("client_id",i.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 wt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',yt);const n="".concat(Rt(It(JSON.stringify(e))),".").concat(Rt(It(JSON.stringify(t)))),a=Rt(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Fi(e)};case"RSA-PSS":switch($i(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 Ut("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return $i(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new Ut("unsupported CryptoKey algorithm name",{cause:e})}(i),i,It(n)));return"".concat(n,".").concat(a)}(c,p,n))}}(e,void 0)}(e):Zn(u(lo,this).clientSecret)})().catch(e=>{throw h(po,this,void 0),e})),u(po,this)}async function fs(e){const t=(await c(go,this,us).call(this)).configuration,i=Kt(),n=await function(e){return async function(e){return Ht(e,"codeVerifier"),Rt(await crypto.subtle.digest("SHA-256",It(e)))}(e)}(i),a=Ro(g(g({},u(lo,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(g(g({scope:ts},a),{},{client_id:u(lo,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await ha(t,o):await da(t,o),codeVerifier:i}}class vs extends j{constructor(e,t){super(e,t),Object.setPrototypeOf(this,vs.prototype)}static fromPayload(e){let t=e.error,i=e.error_description;return new vs(t,i)}}class gs extends vs{constructor(e,t){super(e,t),Object.setPrototypeOf(this,gs.prototype)}}class bs extends vs{constructor(e,t){super(e,t),Object.setPrototypeOf(this,bs.prototype)}}class ys extends vs{constructor(e,t){super(e,t),Object.setPrototypeOf(this,ys.prototype)}}class xs extends vs{constructor(e,t){super(e,t),Object.setPrototypeOf(this,xs.prototype)}}class ws extends vs{constructor(e,t){super(e,t),Object.setPrototypeOf(this,ws.prototype)}}class _s{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 i of this.contexts){var t=y(i,2);const n=t[0];e-t[1].createdAt>this.ttlMs&&this.contexts.delete(n)}}get size(){return this.contexts.size}}class ks{constructor(e,t){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new _s}setMFAAuthDetails(e,t,i,n){this.contextManager.set(e,{scope:t,audience:i,mfaRequirements:n})}async getAuthenticators(e){var t,i,n;const a=this.contextManager.get(e);if(!a)throw new gs("invalid_request","MFA context not found for this MFA token");const o=null===(i=null===(t=a.mfaRequirements)||void 0===t?void 0:t.challenge)||void 0===i?void 0:i.map(e=>e.type);try{const t=await this.authJsMfaClient.listAuthenticators({mfaToken:e});return o&&0!==o.length?t.filter(e=>!!e.type&&o.includes(e.type)):t}catch(e){if(e instanceof Lo)throw new gs(null===(n=e.cause)||void 0===n?void 0:n.error,e.message);throw e}}async enroll(e){var t;const i=function(e){const t=mt[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 zo)throw new bs(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 Do)throw new ys(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 ws("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 xs("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 xs("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 xs)throw new xs(e.error,e.error_description);throw e}}}class Ss extends Error{constructor(e,t,i){super(t),this.name="PasskeyError",this.code=e,this.cause=i,Object.setPrototypeOf(this,Ss.prototype)}}class Ts{constructor(e,t){os.set(this,void 0),ss.set(this,void 0),o(this,os,e,"f"),o(this,ss,t,"f")}async signup(e){if(!window.PublicKeyCredential)throw new Ss("passkey_not_supported","WebAuthn is not supported in this browser.");const t=e.scope,i=e.audience,o=n(e,["scope","audience"]),s=await a(this,os,"f").register(o),r=(c=s.authnParamsPublicKey,Object.assign(Object.assign({},c),{challenge:js(c.challenge),user:Object.assign(Object.assign({},c.user),{id:js(c.user.id)}),pubKeyCredParams:c.pubKeyCredParams,authenticatorSelection:c.authenticatorSelection}));var c;const p=await navigator.credentials.create({publicKey:r});if(!p)throw new Ss("passkey_cancelled","Passkey creation was cancelled or no credential was returned.");const l=function(e){var t;const i=e.response;return{id:e.id,rawId:Es(e.rawId),type:e.type,authenticatorAttachment:null!==(t=e.authenticatorAttachment)&&void 0!==t?t:void 0,response:{clientDataJSON:Es(i.clientDataJSON),attestationObject:Es(i.attestationObject)},clientExtensionResults:e.getClientExtensionResults()}}(p);return a(this,ss,"f")._requestTokenForPasskey({authSession:s.authSession,credential:l,realm:o.realm,organization:o.organization,scope:t,audience:i})}async login(e){if(!window.PublicKeyCredential)throw new Ss("passkey_not_supported","WebAuthn is not supported in this browser.");const t=e||{},i=t.scope,o=t.audience,s=n(t,["scope","audience"]),r=await a(this,os,"f").challenge(Object.keys(s).length>0?s:void 0),c=(p=r.authnParamsPublicKey,Object.assign(Object.assign({},p),{challenge:js(p.challenge)}));var p;const l=await navigator.credentials.get({publicKey:c});if(!l)throw new Ss("passkey_cancelled","Passkey authentication was cancelled or no credential was returned.");const u=function(e){var t;const i=e.response;return{id:e.id,rawId:Es(e.rawId),type:e.type,authenticatorAttachment:null!==(t=e.authenticatorAttachment)&&void 0!==t?t:void 0,response:{clientDataJSON:Es(i.clientDataJSON),authenticatorData:Es(i.authenticatorData),signature:Es(i.signature),userHandle:i.userHandle?Es(i.userHandle):void 0},clientExtensionResults:e.getClientExtensionResults()}}(l);return a(this,ss,"f")._requestTokenForPasskey({authSession:r.authSession,credential:u,realm:s.realm,organization:s.organization,scope:i,audience:o})}}function Es(e){const t=new Uint8Array(e),i=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function js(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),i=t+"=".repeat((4-t.length%4)%4),n=atob(i),a=new Uint8Array(n.length);for(let e=0;e<n.length;e++)a[e]=n.charCodeAt(e);return a.buffer}os=new WeakMap,ss=new WeakMap;class As{constructor(e){let t,i;if(this.userCache=(new ze).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=(le||(le=function(){return"undefined"!=typeof navigator&&"function"==typeof(null===(e=navigator.locks)||void 0===e?void 0:e.request)?new ce:new pe;var e}()),le),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||k,!at(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=at(t)()}var n;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:_,this.cookieStorage=!1===e.legacySameSiteCookie?Fe:Ve,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:Be;var o;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{[E]:Ie(t,e,...n)};let o={[E]:Ie(t,...n)};return Object.keys(e).forEach(i=>{const a=e[i];o[i]=Ie(t,a,...n)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new De(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||T,this.cacheManager=new Ne(i,i.allKeys?void 0:new tt(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new pt(this.options.clientId):void 0,this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),r=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{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:s},detailedResponse:!0})}}));this.myAccount=new dt(r,s),this.authJsClient=new cs({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new ks(this.authJsClient.mfa,this),this.passkey=new Ts(this.authJsClient.passkey,this),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&t===k&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Qe,this.worker.postMessage({type:"init",allowedBaseUrl:this.domainUrl}))}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=this.options.auth0Client||S,i=J(t,!0),n=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(n)}_authorizeUrl(e){return this._url("/authorize?".concat(K(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=y(t,3),n=i[0],a=i[1],o=i[2];if(3!==t.length||!n||!a||!o)throw new Error("ID token could not be decoded");const s=JSON.parse(F(a)),r={__raw:e},c={};return Object.keys(s).forEach(e=>{r[e]=s[e],Me.includes(e)||(c[e]=s[e])}),{encoded:{header:n,payload:a,signature:o},header:JSON.parse(F(n)),claims:r,user:c}})(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&&!We(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||!We(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!We(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&&We(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&&We(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=q(M()),o=q(M()),s=M(),r=await $(s),c=Z(r),p=await(null===(n=this.dpop)||void 0===n?void 0:n.calculateThumbprint()),l=((e,t,i,n,a,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:Oe(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,c,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,p),u=this._authorizeUrl(l);return{nonce:o,code_verifier:s,scope:l.scope,audience:l.audience||E,redirect_uri:l.redirect_uri,state:a,url:u}}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 R;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,t)=>new Promise((i,n)=>{let a;const o=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(s),window.removeEventListener("message",a,!1),n(new C(e.popup)))},1e3),s=setTimeout(()=>{clearInterval(o),n(new O(e.popup)),window.removeEventListener("message",a,!1)},1e3*(e.timeoutInSeconds||60));a=function(r){if(r.origin===t&&r.data&&"authorization_response"===r.data.type){if(clearTimeout(s),clearInterval(o),window.removeEventListener("message",a,!1),!1!==e.closePopup&&e.popup.close(),r.data.response.error)return n(j.fromPayload(r.data.response));i(r.data.response)}},window.addEventListener("message",a)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}),new URL(a.url).origin);if(a.state!==o.state)throw new j("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=ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),i=t.openUrl,a=t.fragment,o=t.appState,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),l=p.url,u=n(p,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o,response_type:Ge.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 j("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===Ge.ConnectCode?this._handleConnectAccountRedirectCallback(i,t):this._handleLoginRedirectCallback(i,t)}async _handleLoginRedirectCallback(e,t){const i=e.code,n=e.state,a=e.error,o=e.error_description;if(a)throw new A(a,o||a,n,t.appState);if(!t.code_verifier||t.state&&t.state!==n)throw new j("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:Ge.Code}}async _handleConnectAccountRedirectCallback(e,t){const i=e.connect_code,n=e.state,a=e.error,o=e.error_description;if(a)throw new P(a,o||a,t.connection,n,t.appState);if(!i)throw new j("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===n))throw new j("state_mismatch","Invalid state");const s=await this.myAccount.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:Ge.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(it))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(it)}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:Oe(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=et[t];return i||(i=e().finally(()=>{delete et[t],i=null}),et[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 t=e.cacheMode,i=n(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||E,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||E,clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(i):await this._getTokenFromIFrame(i),n=e.id_token,a=e.token_type,o=e.access_token,s=e.oauthTokenScope,r=e.expires_in;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 U||e instanceof j&&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||E,clientId:this.options.clientId});if(!t)throw new j("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 a=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Oe(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({},w),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new Ue({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||E,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||{},i=t.federated,a=n(t,["federated"]),o=i?"&federated":"";return this._url("/v2/logout?".concat(K(Object.assign({clientId:e.clientId},a))))+o}async revokeRefreshToken(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.options.useRefreshTokens)return;const t=e.audience||this.options.authorizationParams.audience||E,i=await this.cacheManager.getRefreshTokensByAudience(t,this.options.clientId);await async function(e,t){let i=e.auth0Client,n=e.useFormData,a=e.refreshTokens,o=e.audience,s=e.client_id,r=e.onRefreshTokenRevoked;const c=e.timeout||_,p="refresh_token",l="".concat(e.baseUrl,"/oauth/revoke"),u={"Content-Type":n?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(J(i||S)))};if(t){const i={client_id:s,token_type_hint:p},a=n?K(i):JSON.stringify(i);try{return await Te({type:"revoke",timeout:c,fetchUrl:l,fetchOptions:{method:"POST",body:a,headers:u},useFormData:n,auth:{audience:null!=o?o:E}},t)}catch(e){throw new j("revoke_error",e.message)}}for(const t of a){const i={client_id:s,token_type_hint:p,token:t},a=n?K(i):JSON.stringify(i),o=await Ee(l,{method:"POST",body:a,headers:u},c);if(!o.ok){let t,i;try{var d=JSON.parse(await o.text());t=d.error,i=d.error_description}catch(e){}throw new j(t||"revoke_error",i||"HTTP error ".concat(o.status))}await(null==r?void 0:r(t))}}({baseUrl:this.domainUrl,timeout:this.httpTimeoutMs,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,client_id:this.options.clientId,refreshTokens:i,audience:t,onRefreshTokenRevoked:e=>this.cacheManager.stripRefreshToken(e)},this.worker)}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const i=ot(e),a=i.openUrl,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(Re);try{await(null===(t=this.dpop)||void 0===t?void 0:t.clear())}catch(e){}if(this.worker)try{await Te({type:"clear"},this.worker)}catch(e){}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 n=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin),a=n.url,o=n.state,s=n.nonce,r=n.code_verifier,c=n.redirect_uri,p=n.scope,l=n.audience;if(window.crossOriginIsolated)throw new j("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 d;try{d=new URL(this.domainUrl).origin}catch(e){d=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 I),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(j.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)})}(a,d,u);if(o!==h.state)throw new j("state_mismatch","Invalid state");const m=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:r,code:h.code,grant_type:"authorization_code",redirect_uri:c,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:s,organization:t.organization});return Object.assign(Object.assign({},m),{scope:p,oauthTokenScope:m.scope,audience:l})})}catch(e){throw"login_required"===e.error&&(e instanceof j&&this._isIframeMfaError(e)&&"popup"===this.options.interactiveErrorHandler||this.logout({openUrl:!1})),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Ue({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||E,clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new L(e.authorizationParams.audience||E,e.authorizationParams.scope)}const i=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,n="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,a=((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==t?void 0:t.audience,null==t?void 0:t.scope);try{const p=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:i}),n&&{timeout:n}),{scopesToRequest:a});if(p.refresh_token&&(null==t?void 0:t.refresh_token)&&await this.cacheManager.updateEntry(t.refresh_token,p.refresh_token),this.options.useMrrt&&(o=null==t?void 0:t.audience,s=null==t?void 0:t.scope,r=e.authorizationParams.audience,c=e.authorizationParams.scope,!(o===r&&st(c,s)||st(a,p.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const t=((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(",")})(a,p.scope);throw new z(e.authorizationParams.audience||"default",t)}return Object.assign(Object.assign({},p),{scope:e.authorizationParams.scope,oauthTokenScope:p.scope,audience:e.authorizationParams.audience||E})}catch(t){if(t.message){if(t.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),t;if((t.message.includes("Missing Refresh Token")||t.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e)}throw t}var o,s,r,c}async _saveEntryInCache(e){const t=e.id_token,i=e.decodedToken,a=n(e,["id_token","decodedToken"]);this.userCache.set(Re,{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||E,t=this.scope[e],i=await this.cacheManager.getIdToken(new Ue({clientId:this.options.clientId,audience:e,scope:t})),n=this.userCache.get(Re);return i&&i.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set(Re,i),i)}async _getEntryFromCache(e){let t=e.scope,i=e.audience,n=e.clientId,a=e.cacheMode;const o=await this.cacheManager.get(new Ue({scope:t,audience:i,clientId:n}),60,this.options.useMrrt,a);if(o&&o.access_token){const e=o.token_type,t=o.access_token,i=o.oauthTokenScope,n=o.expires_in,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})}}_storeMfaContext(e,t,i){e instanceof U&&this.mfa.setMFAAuthDetails(e.mfa_token,t,i,e.mfa_requirements)}async _requestToken(e,t){var i,n;const a=t||{},o=a.nonceIn,s=a.organization,r=a.scopesToRequest;try{const t=await Pe(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:r||e.scope}),this.worker),a=await this._verifyIdToken(t.id_token,o,s);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!==a.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove(Re))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},t),{decodedToken:a,scope:e.scope,audience:e.audience||E}),t.scope?{oauthTokenScope:t.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(s||a.claims.org_id),Object.assign(Object.assign({},t),{decodedToken:a})}catch(t){throw"authorization_code"!==e.grant_type&&this._storeMfaContext(t,r||e.scope,e.audience),t}}_buildTokenExchangeParams(e){return Object.assign(Object.assign(Object.assign(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}),e.actor_token&&{actor_token:e.actor_token}),e.actor_token_type&&{actor_token_type:e.actor_token_type}),{scope:Oe(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 loginWithCustomTokenExchange(e){return this._requestToken(this._buildTokenExchangeParams(e))}async customTokenExchange(e){const t=this._buildTokenExchangeParams(e);try{const i=await Pe(Object.assign(Object.assign({},t),{baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,dpop:this.dpop}),this.worker,!0);return i.id_token&&await this._verifyIdToken(i.id_token,void 0,e.organization),i}catch(e){throw this._storeMfaContext(e,t.scope,t.audience),e}}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 ut(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 t=e.openUrl,i=e.appState,n=e.connection,a=e.scopes,o=e.authorization_params,s=e.redirectUri,r=void 0===s?this.options.authorizationParams.redirect_uri||window.location.origin:s;if(!n)throw new Error("connection is required");const c=q(M()),p=M(),l=await $(p),u=Z(l),d=await this.myAccount.connectAccount({connection:n,scopes:a,redirect_uri:r,state:c,code_challenge:u,code_challenge_method:"S256",authorization_params:o}),h=d.connect_uri,m=d.connect_params,f=d.auth_session;this.transactionManager.create({state:c,code_verifier:p,auth_session:f,redirect_uri:r,appState:i,connection:n,response_type:Ge.ConnectCode});const v=new URL(h);v.searchParams.set("ticket",m.ticket),t?await t(v.toString()):window.location.assign(v)}async _requestTokenForPasskey(e){const t=e.audience||this.options.authorizationParams.audience,i=e.organization||this.options.authorizationParams.organization;return this._requestToken(Object.assign(Object.assign(Object.assign({grant_type:"urn:okta:params:oauth:grant-type:webauthn",auth_session:e.authSession,authn_response:e.credential},e.realm&&{realm:e.realm}),i&&{organization:i}),{scope:Oe(this.scope,e.scope,t),audience:t}))}async _requestTokenForMfa(e,t){const i=e.mfaToken,a=n(e,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},a),{mfa_token:i}),t)}}async function Ps(e){const t=new As(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,h=e[t+u];for(u+=d,o=h&(1<<-l)-1,h>>=-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*(h?-1:1);s+=Math.pow(2,n),o-=p}return(h?-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,h=n?0:o-1,m=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+h]=255&r,h+=m,r/=256,a-=8);for(s=s<<a|r,p+=a;p>0;e[i+h]=255&s,h+=m,s/=256,p-=8);e[i+h-m]|=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(q(e,Uint8Array)){var t=new Uint8Array(e);return h(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(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return h(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(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|m(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||H(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|m(e))}function d(e){for(var t=e.length<0?0:0|m(e.length),i=r(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function h(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 m(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)||q(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 D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return W(e).length;default:if(a)return n?-1:D(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 I(this,t,i);case"utf8":case"utf-8":return E(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return T(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(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),H(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:y(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):y(e,[t],i,n,a);throw new TypeError("val must be string, number or Buffer")}function y(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 x(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(H(r))return s;e[i+s]=r}return s}function w(e,t,i,n){return M(D(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(W(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 T(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function E(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(q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),q(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(q(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?E(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(q(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 x(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 I(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+=J[e[o]];return a}function O(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 R(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 U(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||U(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||U(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||R(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||R(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||R(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||R(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||R(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||R(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||R(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);R(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);R(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||R(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||R(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||R(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||R(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||R(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 N=/[^+/0-9A-Za-z-_]/g;function D(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 W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).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 q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var J=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 h="";for(u=a+l+1;u<=o;++u)u!==o&&47!==e.charCodeAt(u)||(0===h.length?h+="..":h+="/..");return h.length>0?h+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,h=0;h<d;){if(37===e.charCodeAt(h)&&h+1<d){switch(u=u>-1?u:0,e.charCodeAt(h+1)){case 100:case 102:if(l>=c)break;if(null==i[l])break;u<h&&(p+=e.slice(u,h)),p+=Number(i[l]),u=h+2,h++;break;case 105:if(l>=c)break;if(null==i[l])break;u<h&&(p+=e.slice(u,h)),p+=Math.floor(Number(i[l])),u=h+2,h++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===i[l])break;u<h&&(p+=e.slice(u,h));var m=typeof i[l];if("string"===m){p+="'"+i[l]+"'",u=h+2,h++;break}if("function"===m){p+=i[l].name||"<anonymous>",u=h+2,h++;break}p+=a(i[l]),u=h+2,h++;break;case 115:if(l>=c)break;u<h&&(p+=e.slice(u,h)),p+=String(i[l]),u=h+2,h++;break;case 37:u<h&&(p+=e.slice(u,h)),p+="%",u=h+2,h++,l--}++l}++h}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",x=Object.create(i);x.log||(x.log=y),function(e,t,i){const n={};t.forEach(e=>{n[e]=i[e]?i[e]:a[e]||a[p[e]||"log"]||y}),e[r]=n}(x,g,i),l({},x),Object.defineProperty(x,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(x,"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,x,"error"),d(this,w,x,"fatal"),d(this,w,x,"warn"),d(this,w,x,"info"),d(this,w,x,"debug"),d(this,w,x,"trace"),f.forEach(e=>{d(this,w,x,e)})}});const w={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:v(e)};return x.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),x.level=b,x.setMaxListeners=x.getMaxListeners=x.emit=x.addListener=x.on=x.prependListener=x.once=x.prependOnceListener=x.removeListener=x.removeAllListeners=x.listeners=x.listenerCount=x.eventNames=x.write=x.flush=y,x.serializers=n,x._serialize=o,x._stdErrSerialize=c,x.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,h([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=m([].concat(e._logEvent.bindings,i)))}p.prototype=this;const u=new p(this);return l(this,u),u.level=this.level,u},t&&(x._logEvent=m()),x}function d(e,t,i,o){if(Object.defineProperty(e,o,{value:s(e.level,i)>s(o,i)?y:i[r][o],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[o]===y)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&&h(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&&h(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;h(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=m(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 h(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 m(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?x:w}function g(){return{}}function b(e){return e}function y(){}function x(){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:x,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},h=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}}}}),m=u({"../../node_modules/mime-db/index.js"(e,t){t.exports=h()}}),f=u({"../../node_modules/mime-types/index.js"(e){var t,n,a,o=m(),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:()=>U,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:()=>Oe,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>Ie,EyepopLineDecoder:()=>x,ForwardOperatorType:()=>E,InferenceType:()=>j,LoadFromAssetUuidJob:()=>W,LoadFromJob:()=>D,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>me,ModelFormat:()=>xe,ModelPrecisionType:()=>we,ModelStatus:()=>he,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>A,PopComponentType:()=>T,PredictionVersion:()=>_,Semaphore:()=>J,SessionStatus:()=>V,Stream:()=>b,TaskMode:()=>Te,TaskType:()=>Se,TranscodeMode:()=>pe,TransientPopId:()=>Z,UploadJob:()=>N,UserReview:()=>oe,VideoMode:()=>S,VlmAbilityStatus:()=>Ee,WebrtcBase:()=>C,WebrtcWhep:()=>Ce,WebrtcWhip:()=>R,WorkerEndpoint:()=>Y,WorkflowPhase:()=>ye,default:()=>Ue,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 x,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)]}},y=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}};y.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","…","\u2028","\u2029"]),y.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var x=y;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||{}),T=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(T||{}),E=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(E||{}),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||{}),I=i(182),O=((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=O.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=O.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:R.unquoteCredential(t[3]),credential:R.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]=R.setVideoBitrate(R.setCodec(r,t),n):r&&r.startsWith("audio")&&(s[e]=R.setAudioBitrate(R.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}"`):""}},R=class extends C{constructor(e,t,i,n,a){super(t,i,(0,I.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()}},U=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")}};U.n=0;var L,z,N=class extends U{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}},D=class extends U{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}})}},W=class extends U{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 U{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 R(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 Le=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*ze(e){for await(const t of e)yield t}L=async(e,t)=>{const n=f(),a=i(122),o=ze((await a.open(e.path,"r")).createReadStream());return{stream:Le(o),mimeType:e.mimeType?e.mimeType:n.lookup(e.path)||"image/*"}}}function q(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 Ne{constructor(e){this._logger=e}async fetch(e,t){const i=q(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 Ne(e)}else{class De{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=q(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 De(t,e)}}var H,J=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),$=i(262);H="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,$.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 J(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 J(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 H(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}},Z=(e=>(e.Transient="transient",e))(Z||{}),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||{}),B=e=>new Promise(t=>setTimeout(t,e)),G=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 N(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 N(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 N(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 D(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 W(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.getComputeSession(),this._pipelineId=await this.startTransientPipeline()):this.options().sessionUuid?await this.getComputeSession():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 getComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t,i;const n=this.options().sessionUuid;[t,i]=n?await this.getPermanentComputeSession(this._client,n):await this.getOnDemandComputeSession(this._client);let a=!1;const o=Date.now()+e.WAIT_FOR_IS_READY;for(;!a;){const n=`${t.session_endpoint}/health`,s=await this._client.fetch(n,{headers:i});if(s.status<300)a=!0;else{if(Date.now()>o)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 ${s.status}, wait and poll for update`),await B(e.CHECK_FOR_IS_READY_INTERVAL)}}this._baseUrl=t.session_endpoint,this._pipeline=null,t.pipeline_uuid?this._pipelineId=t.pipeline_uuid:t.pipelines?this._pipelineId=t.pipelines[0].pipeline_id:this._pipelineId=null}async getOnDemandComputeSession(t){let i=null;const n=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",n);const a={Authorization:await this.authorizationHeader()};let o,s=await t.fetch(n,{headers:a});if(404==s.status)o=[];else{if(200!=s.status){this.updateState("Error");const e=await s.text();throw new Error(`Unexpected status ${s.status} fetching compute sessions: ${e}`)}o=await s.json()}if(o.length>0){this._logger.debug(`User has ${o.length} sessions, inspecting for usable session`);for(let t of o)if(!e.SESSION_DEAD.has(t.session_status)&&!t.persistent){i=t,this._logger.debug(`Use active session ${t.session_uuid} with pipeline ${t.pipeline_uuid}`);break}}if(!i){if(this._requestLogger.debug("creating a new session at: %s",n),s=await t.fetch(`${n}?wait=true`,{headers:a,method:"POST"}),200!=s.status){this.updateState("Error");const e=await s.text();throw new Error(`Unexpected status ${s.status} creating a compute session: ${e}`)}if(o=await s.json(),0==o.length)throw new Error("Unexpected, no compute session after attempt to create one");i=o[0]||null}if(!i)throw new Error("unexpected undefined session");return[i,a]}async getPermanentComputeSession(e,t){let i=null;const n=`${this.eyepopUrl()}/v1/sessions/${t}`;this._requestLogger.debug("fetching session from: %s",n);const a={Authorization:await this.authorizationHeader()};let o=await e.fetch(n,{headers:a});if(404==o.status)throw this.updateState("Error"),new Error(`Unexpected status ${o.status} compute sessions ${t} not found`);if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}return i=await o.json(),[i,a]}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}};G.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),G.WAIT_FOR_IS_READY=6e4,G.CHECK_FOR_IS_READY_INTERVAL=250;var X,Y=G;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))}X="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||{}),he=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(he||{}),me=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(me||{}),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||{}),ye=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(ye||{}),xe=(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))(xe||{}),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.classification="classification",e))(Se||{}),Te=(e=>(e.image="image",e.video="video",e))(Te||{}),Ee=(e=>(e.in_progress="in_progress",e.draft="draft",e.published="published",e))(Ee||{}),je=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")}},Ae=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 Pe(e,t){if(null!==t)return t}var Ie,Oe=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=X(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}&`:"",h=void 0!==r?`&approved_threshold=${r}&`:"";return this.request(`/assets/${e}/annotations?${c}${p}${l}${u}${d}${h}`,{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 je(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 Ae(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,Pe),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,Pe),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,i){return void 0!==t?this.request(`/vlm_abilities/${e}/refine`,{method:"POST",body:JSON.stringify(t,Pe),headers:{"Content-Type":"application/json"}}):void 0!==i?this.request(`/vlm_abilities/${e}/refine_task`,{method:"POST",body:JSON.stringify(i,Pe),headers:{"Content-Type":"application/json"}}):Promise.reject("refine vlm ability requires auto_prompt or auto_config parameter")}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"})}},Ce=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())})}},Re=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Re("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})(Re("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.sessionUuid&&(e.sessionUuid=Re("EYEPOP_SESSION_UUID")),void 0===e.popId&&void 0===e.sessionUuid&&(e.popId=Re("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 Y(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=Re("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=Re("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Oe(e)}})(Ie||(Ie={}));var Ue=Ie},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 h=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return h.default}});var m=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return m.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)}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,h=u,m=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,h),d=n(d,m)}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";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";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;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}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){if((c=c||0)<0||c+16>r.length)throw new RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);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){if(i<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,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)})());