@eyepop.ai/eyepop 3.14.6 → 3.15.0
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.
- package/README.md +133 -236
- package/dist/eyepop.index.d.mts +11 -8
- package/dist/eyepop.index.d.ts +11 -8
- package/dist/eyepop.index.js +76 -29
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +75 -29
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +1 -1
package/dist/eyepop.min.js
CHANGED
|
@@ -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:()=>Yo,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.2"},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},M=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),W=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",Y={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 X(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?Y:this.storageHandler,l.label=1;case 1:return Date.now()<n?[4,X(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+a,[4,X(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,X(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?Y: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?Y: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?Y: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,"activeLocks",new Set),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,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,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,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 Me={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)}},We="_legacy_",He={get:e=>Me.get(e)||Me.get("".concat(We).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(We).concat(e),JSON.stringify(t),a),Me.save(e,t,i)},remove(e,t){let i={};null!=t&&t.cookieDomain&&(i.domain=t.cookieDomain),qe(e,i),Me.remove(e,t),Me.remove("".concat(We).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{}var Fe,Ve=function(e){return Fe=Fe||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7ZnVuY3Rpb24gZShlLHQscil7cmV0dXJuKHQ9ZnVuY3Rpb24oZSl7dmFyIHQ9ZnVuY3Rpb24oZSx0KXtpZigib2JqZWN0IiE9dHlwZW9mIGV8fCFlKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgbj1yLmNhbGwoZSx0fHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT10eXBlb2YgbilyZXR1cm4gbjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9KGUsInN0cmluZyIpO3JldHVybiJzeW1ib2wiPT10eXBlb2YgdD90OnQrIiJ9KHQpKWluIGU/T2JqZWN0LmRlZmluZVByb3BlcnR5KGUsdCx7dmFsdWU6cixlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMH0pOmVbdF09cixlfWZ1bmN0aW9uIHQoZSx0KXt2YXIgcj1PYmplY3Qua2V5cyhlKTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbj1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO3QmJihuPW4uZmlsdGVyKGZ1bmN0aW9uKHQpe3JldHVybiBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKGUsdCkuZW51bWVyYWJsZX0pKSxyLnB1c2guYXBwbHkocixuKX1yZXR1cm4gcn1mdW5jdGlvbiByKHIpe2Zvcih2YXIgbj0xO248YXJndW1lbnRzLmxlbmd0aDtuKyspe3ZhciBvPW51bGwhPWFyZ3VtZW50c1tuXT9hcmd1bWVudHNbbl06e307biUyP3QoT2JqZWN0KG8pLCEwKS5mb3JFYWNoKGZ1bmN0aW9uKHQpe2Uocix0LG9bdF0pfSk6T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM/T2JqZWN0LmRlZmluZVByb3BlcnRpZXMocixPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9ycyhvKSk6dChPYmplY3QobykpLmZvckVhY2goZnVuY3Rpb24oZSl7T2JqZWN0LmRlZmluZVByb3BlcnR5KHIsZSxPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG8sZSkpfSl9cmV0dXJuIHJ9Y2xhc3MgbiBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKGUsdCl7c3VwZXIodCksdGhpcy5lcnJvcj1lLHRoaXMuZXJyb3JfZGVzY3JpcHRpb249dCxPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxuLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKGUpe2xldHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9PWU7cmV0dXJuIG5ldyBuKHQscil9fWNsYXNzIG8gZXh0ZW5kcyBue2NvbnN0cnVjdG9yKGUsdCl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChzKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChzKHQpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT10LE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLG8ucHJvdG90eXBlKX19ZnVuY3Rpb24gcyhlKXtyZXR1cm4gZSYmIShhcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W10pLmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3QgaT1bImNsaWVudElkIl0sYz1lPT57bGV0e2NsaWVudElkOnR9PWUsbj1mdW5jdGlvbihlLHQpe2lmKG51bGw9PWUpcmV0dXJue307dmFyIHIsbixvPWZ1bmN0aW9uKGUsdCl7aWYobnVsbD09ZSlyZXR1cm57fTt2YXIgcj17fTtmb3IodmFyIG4gaW4gZSlpZih7fS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGUsbikpe2lmKC0xIT09dC5pbmRleE9mKG4pKWNvbnRpbnVlO3Jbbl09ZVtuXX1yZXR1cm4gcn0oZSx0KTtpZihPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgcz1PYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGUpO2ZvcihuPTA7bjxzLmxlbmd0aDtuKyspcj1zW25dLC0xPT09dC5pbmRleE9mKHIpJiZ7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUscikmJihvW3JdPWVbcl0pfXJldHVybiBvfShlLGkpO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIodD0+dm9pZCAwIT09ZVt0XSkucmVkdWNlKCh0LG4pPT5yKHIoe30sdCkse30se1tuXTplW25dfSkse30pKShyKHtjbGllbnRfaWQ6dH0sbikpKS50b1N0cmluZygpfTtsZXQgYT17fTtjb25zdCBmPShlLHQpPT4iIi5jb25jYXQoZSwifCIpLmNvbmNhdCh0KTthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhc3luYyBlPT57bGV0IHQsbix7ZGF0YTp7dGltZW91dDpzLGF1dGg6aSxmZXRjaFVybDp1LGZldGNoT3B0aW9uczpsLHVzZUZvcm1EYXRhOnAsdXNlTXJydDpofSxwb3J0czpbeV19PWUsZD17fTtjb25zdHthdWRpZW5jZTpiLHNjb3BlOk99PWl8fHt9O3RyeXtjb25zdCBlPXA/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKChlLHQpPT57clt0XT1lfSkscn0pKGwuYm9keSk6SlNPTi5wYXJzZShsLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYobj0oKGUsdCk9PmFbZihlLHQpXSkoYixPKSwhbiYmaCl7Y29uc3QgZT1hLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHQ9KChlLHQpPT57Y29uc3Qgcj1PYmplY3Qua2V5cyhhKS5maW5kKHI9PntpZigibGF0ZXN0X3JlZnJlc2hfdG9rZW4iIT09cil7Y29uc3Qgbj0oKGUsdCk9PnQuc3RhcnRzV2l0aCgiIi5jb25jYXQoZSwifCIpKSkodCxyKSxvPXIuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLHM9ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9Pm8uaW5jbHVkZXMoZSkpO3JldHVybiBuJiZzfX0pO3JldHVybiEhcn0pKE8sYik7ZSYmIXQmJihuPWUpfWlmKCFuKXRocm93IG5ldyBvKGIsTyk7bC5ib2R5PXA/YyhyKHIoe30sZSkse30se3JlZnJlc2hfdG9rZW46bn0pKTpKU09OLnN0cmluZ2lmeShyKHIoe30sZSkse30se3JlZnJlc2hfdG9rZW46bn0pKX1sZXQgaSx3OyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihpPW5ldyBBYm9ydENvbnRyb2xsZXIsbC5zaWduYWw9aS5zaWduYWwpO3RyeXt3PWF3YWl0IFByb21pc2UucmFjZShbKHY9cyxuZXcgUHJvbWlzZShlPT5zZXRUaW1lb3V0KGUsdikpKSxmZXRjaCh1LHIoe30sbCkpXSl9Y2F0Y2goZSl7cmV0dXJuIHZvaWQgeS5wb3N0TWVzc2FnZSh7ZXJyb3I6ZS5tZXNzYWdlfSl9aWYoIXcpcmV0dXJuIGkmJmkuYWJvcnQoKSx2b2lkIHkucG9zdE1lc3NhZ2Uoe2Vycm9yOiJUaW1lb3V0IHdoZW4gZXhlY3V0aW5nICdmZXRjaCcifSk7aj13LmhlYWRlcnMsZD1bLi4ual0ucmVkdWNlKChlLHQpPT57bGV0W3Isbl09dDtyZXR1cm4gZVtyXT1uLGV9LHt9KSx0PWF3YWl0IHcuanNvbigpLHQucmVmcmVzaF90b2tlbj8oaCYmKGEubGF0ZXN0X3JlZnJlc2hfdG9rZW49dC5yZWZyZXNoX3Rva2VuLGc9bixtPXQucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhhKS5mb3JFYWNoKGU9PntsZXRbdCxyXT1lO3I9PT1nJiYoYVt0XT1tKX0pKSwoKGUsdCxyKT0+e2FbZih0LHIpXT1lfSkodC5yZWZyZXNoX3Rva2VuLGIsTyksZGVsZXRlIHQucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIGFbZihlLHQpXX0pKGIsTykseS5wb3N0TWVzc2FnZSh7b2s6dy5vayxqc29uOnQsaGVhZGVyczpkfSl9Y2F0Y2goZSl7eS5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9LGhlYWRlcnM6ZH0pfXZhciBnLG0saix2fSl9KCk7Cgo="),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,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"],Ye="auth0.is.authenticated",Xe={memory:()=>(new Ie).enclosedCache,localstorage:()=>new je},Qe=e=>Xe[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){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){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){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),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 Mt(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 Wt(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 Yt 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 Xt 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 Yt("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"),Wt(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 Mi(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new jt("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Wi(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 Yi(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 Xi(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 Xi(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,Ma;function Wa(e){return void 0!==e?Ft(e):(Ma||(Ma=new WeakMap),(e,t,i,a)=>{let n;return(n=Ma.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),Ma.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 Yt||e instanceof Xt||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?Wa(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 Ya(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 Xa(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 Xa(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 Yt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Xa(e.response,s,r),g(s)}Ba(e)}return w.id_token&&await(null==h?void 0:h(b)),Ya(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 Xt("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()+Wt(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()+Wt(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)),Ya(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)),Ya(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 Ya(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 Yt&&"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 Ya(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?Yi(e.protected):new Uint8Array,Yi("."),"string"==typeof e.payload?s?Yi(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 Mn{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 Wn=["mfaToken"],Hn=["mfaToken"];var $n,Kn,Jn,Fn,Vn,Bn,Zn,Gn,Yn,Xn,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,Wn),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,Yn=new WeakMap,Xn=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,Yn,void 0),c(this,Xn,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(Xn,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(Xn,this).domain,clientId:r(Xn,this).clientId,customFetch:r(Qn,this)})}async getServerMetadata(){const{serverMetadata:e}=await n(no,this,Wo).call(this);return e}async buildAuthorizationUrl(e){const{serverMetadata:t}=await n(no,this,Wo).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,Wo).call(this),a=yo(d(d({},r(Xn,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(d(d({scope:Ro},a),{},{client_id:r(Xn,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,Wo).call(this),a=yo(d(d({},r(Xn,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(d(d({scope:Ro},a),{},{client_id:r(Xn,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,Wo).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,Wo).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,Wo).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,Wo).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(Xn,this).clientId,r(Xn,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,Wo).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,Wo).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(r(Xn,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",r(Xn,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,Wo).call(this),i=Uo(r(Xn,this).discoveryCache),a=t.jwks_uri;r(eo,this)||p(eo,this,function(e,t){const i=new Mn(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(Xn,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(Xn,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(r(Xn,this).useMtls?"1":"0")}async function Mo(e){const t=await n(no,this,Ko).call(this),i=new Ga(e,r(Xn,this).clientId,r(Xn,this).clientSecret,t);return i[Ha]=r(Qn,this),i}async function Wo(){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,Mo).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,Mo).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(Xn,this).domain)),r(Xn,this).clientId,{use_mtls_endpoint_aliases:r(Xn,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,Wo).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,Wo).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(Yn,this)||p(Yn,this,(async()=>{if(!r(Xn,this).clientSecret&&!r(Xn,this).clientAssertionSigningKey&&!r(Xn,this).useMtls)throw new xo;if(r(Xn,this).useMtls)return(e,t,i,a)=>{i.set("client_id",t.client_id)};let e=r(Xn,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=>Xi(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(Xn,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:Mt(i),kid:a},p=function(e,t){const i=$t()+Wt(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:Wi(e)};case"RSA-PSS":switch(Mi(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 Mi(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):Wa(r(Xn,this).clientSecret)})().catch(e=>{throw p(Yn,this,void 0),e})),r(Yn,this)}async function Jo(e){const{configuration:t}=await n(no,this,Wo).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(Xn,this).authorizationParams),null==e?void 0:e.authorizationParams)),s=new URLSearchParams(d(d({scope:Ro},o),{},{client_id:r(Xn,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 Yo extends Fo{constructor(e,t){super(e,t),Object.setPrototypeOf(this,Yo.prototype)}}class Xo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;l(this,"contexts",new Map),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){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new Xo}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 Yo("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,"userCache",(new Ie).enclosedCache),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?Me: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)}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(M(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(M(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=W(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(Ye))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(Ye)}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=W(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(W(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(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(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)||W(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 M(N(t,e.length-i),e,i,a)}function _(e,t,i,a){return M(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,a)}function k(e,t,i,a){return M(q(t),e,i,a)}function S(e,t,i,a){return M(function(e,t){for(var i,a,n,o=[],s=0;s<e.length&&!((t-=2)<0);++s)a=(i=e.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(a);return o}(t,e.length-i),e,i,a)}function 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(W(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),W(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(W(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(W(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 M(e,t,i,a){for(var n=0;n<a&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function W(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:()=>Ie,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>je,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>E,InferenceType:()=>A,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>he,ModelFormat:()=>ye,ModelPrecisionType:()=>we,ModelStatus:()=>me,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>P,PopComponentType:()=>T,PredictionVersion:()=>_,Semaphore:()=>$,SessionStatus:()=>B,Stream:()=>b,TaskType:()=>Se,TranscodeMode:()=>pe,TransientPopId:()=>V,UploadJob:()=>D,UserReview:()=>oe,VideoMode:()=>S,VlmAbilityStatus:()=>Te,WebrtcBase:()=>C,WebrtcWhep:()=>Ue,WebrtcWhip:()=>R,WorkerEndpoint:()=>X,WorkflowPhase:()=>xe,default:()=>Re,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}})}},M=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 Oe=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*Le(e){for await(const t of e)yield t}L=async(e,t)=>{const a=f(),n=i(122),o=Le((await n.open(e.path,"r")).createReadStream());return{stream:Oe(o),mimeType:e.mimeType?e.mimeType:a.lookup(e.path)||"image/*"}}}function W(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 ze{constructor(e){this._logger=e}async fetch(e,t){const i=W(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 ze(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=W(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 De(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 M(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.startComputeSession(),this._pipelineId=await this.startTransientPipeline()):await this.startWebApiSessionWithPopId(),this.updateState(),Promise.resolve(this)}async startWebApiSessionWithPopId(){if(!this._client)throw new Error("endpoint not initialized");const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=false`,t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let i=await this._client.fetch(e,{headers:t});if(401==i.status){this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",e),this.statusHandler401(i.status);const t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig"),i=await this._client.fetch(e,{headers:t})}if(200!=i.status){const e=await i.text();throw 429==i.status?this.updateState("NotAvailable",e):this.updateState("Error",e),new Error(`Unexpected status ${i.status}: ${e}`)}let a=await i.json();if(!a.base_url&&this.options().autoStart){const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=true`;this._requestLogger.debug("pop was not running, trying to autostart with: %s",e);const t={Authorization:await this.authorizationHeader()};if(i=await this._client.fetch(e,{headers:t}),200!=i.status){this.updateState("Error");const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}a=await i.json()}const n=new URL(a.base_url,this.eyepopUrl());if(this._baseUrl=n.toString(),this._baseUrl){if(this._baseUrl=this._baseUrl.replace(/\/+$/,""),this._pipelineId=a.pipeline_id,this._popName=a.name,!this._pipelineId||!this._baseUrl)throw new Error("Pop not started");const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await this._client.fetch(e,{method:"GET",headers:t});if(i.status>200){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}if(this._pipeline=await i.json(),this.options().stopJobs){const e={sourceType:"NONE"},t={Authorization:await this.authorizationHeader(),"Content-Type":"application/json"},i=`${this._baseUrl}/pipelines/${this._pipeline.id}/source?mode=preempt&processing=sync`;let a=await this._client.fetch(i,{method:"PATCH",headers:t,body:JSON.stringify(e)});if(a.status>=300){const e=await a.text();throw new Error(`Unexpected status ${a.status}: ${e}`)}}}}async startComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t=null;const i=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",i);const a={Authorization:await this.authorizationHeader()};let n,o=await this._client.fetch(i,{headers:a});if(404==o.status)n=[];else{if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}n=await o.json()}if(console.log(n),n.length>0){this._logger.debug(`User has ${n.length} sessions, inspecting for active session`);for(let i of n)if(!e.SESSION_DEAD.has(i.session_status)){t=i,this._logger.debug(`Use active session ${i.session_uuid} with pipeline ${i.pipeline_uuid}`);break}}if(!t){if(this._requestLogger.debug("creating a new session at: %s",i),o=await this._client.fetch(`${i}?wait=true`,{headers:a,method:"POST"}),200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} creating a compute session: ${e}`)}if(n=await o.json(),0==n.length)throw new Error("Unexpected, no compute session after attempt to create one");t=n[0]||null}if(!t)throw new Error("unexpected undefined session");let s=!1;const r=Date.now()+e.WAIT_FOR_IS_READY;for(;!s;){const i=`${t.session_endpoint}/health`;if(o=await this._client.fetch(i,{headers:a}),o.status<300)s=!0;else{if(Date.now()>r)throw new Error(`Created session ${t.session_uuid} did not become healthy after ${e.WAIT_FOR_IS_READY/1e3} seconds`);this._logger.debug(`session ${t.session_uuid} health check status ${o.status}, wait and poll for update`),await 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 Y,X=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))}Y="document"in globalThis&&"implementation"in globalThis.document?(e,t)=>new WebSocket(e,t):(e,t)=>new(i(826).WebSocket)(e,t);var ee=(e=>(e.dataset="dataset",e.vlm="vlm",e))(ee||{});function te(e,t){switch(t){case"dataset":return e.datasetApiUrl??"";case"vlm":return e.vlmApiUrl??"";default:throw new Error(`unsupported type ${t}`)}}var ie=(e=>(e.error="error",e.requested="requested",e.in_progress="in_progress",e.completed="completed",e))(ie||{}),ae=(e=>(e.rejected="rejected",e.upload_in_progress="upload_in_progress",e.upload_failed="upload_failed",e.transform_failed="transform_failed",e.transform_in_progress="transform_in_progress",e.accepted="accepted",e))(ae||{}),ne=(e=>(e.ground_truth="ground_truth",e.prediction="prediction",e.auto="auto",e))(ne||{}),oe=(e=>(e.approved="approved",e.rejected="rejected",e.unknown="unknown",e))(oe||{}),se=(e=>(e.all_assets="all_assets",e.annotated_only="annotated_only",e.manual_annotated_only="manual_annotated_only",e.auto_annotated_only="auto_annotated_only",e))(se||{}),re=(e=>(e.all="all",e.user_reviewed="user_reviewed",e.user_approved="user_approved",e.ground_truth="ground_truth",e))(re||{}),ce=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e))(ce||{}),pe=(e=>(e.original="original",e.video_original_size="video_original_size",e.image_original_size="image_original_size",e.image_fit_1024="image_fit_1024",e.image_fit_640="image_fit_640",e.image_fit_224="image_fit_224",e.image_cover_1024="image_cover_1024",e.image_cover_640="image_cover_640",e.image_cover_224="image_cover_224",e))(pe||{}),le=(e=>(e.RECTANGLE="rectangle",e.CONTOUR="contour",e))(le||{}),ue=(e=>(e.epdet_b1="epdet_b1",e.imported="imported",e.vlm_ability="vlm_ability",e))(ue||{}),de=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e.keypoint_detection="keypoint_detection",e))(de||{}),me=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(me||{}),he=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(he||{}),fe=(e=>(e.eyepop="eyepop",e.qc_ai_hub="qc_ai_hub",e))(fe||{}),ve=(e=>(e.eyepop_bundle="eyepop_bundle",e.weights_file="weights_file",e))(ve||{}),ge=(e=>(e.waiting="waiting",e.scheduling="scheduling",e.preparing="preparing",e.training="training",e.exporting="exporting",e))(ge||{}),be=(e=>(e.dataset_added="dataset_added",e.dataset_removed="dataset_removed",e.dataset_modified="dataset_modified",e.dataset_version_modified="dataset_version_modified",e.asset_added="asset_added",e.asset_removed="asset_removed",e.asset_status_modified="asset_status_modified",e.asset_annotation_modified="asset_annotation_modified",e.model_added="model_added",e.model_removed="model_removed",e.model_modified="model_modified",e.model_status_modified="model_status_modified",e.model_progress="model_progress",e.events_lost="events_lost",e.workflow_started="workflow_started",e.workflow_succeeded="workflow_succeeded",e.workflow_failed="workflow_failed",e.workflow_task_started="workflow_task_started",e.workflow_task_succeeded="workflow_task_succeeded",e.workflow_task_failed="workflow_task_failed",e))(be||{}),xe=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(xe||{}),ye=(e=>(e.TensorFlowLite="TensorFlowLite",e.TensorFlowGraphDef="TensorFlowGraphDef",e.ONNX="ONNX",e.TorchScript="TorchScript",e.TorchScriptCpu="TorchScriptCpu",e.TorchScriptCuda="TorchScriptCuda",e.PyTorch="PyTorch",e.ModelLess="ModelLess",e))(ye||{}),we=(e=>(e.float32="float32",e.float16="float16",e.int32="int32",e.int8="int8",e.uint8="uint8",e))(we||{}),_e=(e=>(e.gcs="gcs",e.s3="s3",e.https_signed="https_signed",e))(_e||{}),ke=(e=>(e.success="success",e.failed="failed",e))(ke||{}),Se=(e=>(e.classification="classification",e))(Se||{}),Te=(e=>(e.in_progress="in_progress",e.draft="draft",e.published="published",e))(Te||{}),Ee=class{constructor(e,t,i,a){this._response=null,this._runInfo=null,this._controller=new AbortController,this._vlmFetch=i,this._assetUrl=e,this._inferRequest=t,this._requestLogger=a}[Symbol.asyncIterator](){if(!this._response)throw Error("logical bug");let e=!1;const t=this._response,i=this._controller;return async function*(){if(e)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");e=!0;let a=!1;try{const e=await t;if(e)for(let t of e)yield t;a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||i.abort()}}()}start(e){return this._response=new Promise(async(t,i)=>{try{let e=null;for(;;){let a=null;if(e)a=await this._vlmFetch(`/api/v1/requests/${e}?timeout=20`,{method:"POST"});else{const e=new Map(Object.entries(this._inferRequest));e.set("url",this._assetUrl);const t=new FormData;t.append("infer_request",JSON.stringify(Object.fromEntries(e))),a=await this._vlmFetch("/api/v1/infer?timeout=20",{method:"POST",body:t})}const n=a.predictions,o=a.run_info;if(n){this._runInfo=o,t(n);break}if(e=a.request_id,!e){i(`missing request_id in response: ${JSON.stringify(a)}`);break}}}catch(e){i(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}},Ae=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 Pe(e,t){if(null!==t)return t}var je,Ie=class extends F{constructor(e){super(e),this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws=null,this._ws_current_reconnect_delay=null,this._accountId=e.accountId||null,this._account_event_handlers=[],this._dataset_uuid_to_event_handlers=new Map;const t=e.auth;if(void 0!==t.session){const e=t.session;e.accountId&&(this._accountId=e.accountId)}}async session(){const e=await super.session();return{eyepopUrl:e.eyepopUrl,accessToken:e.accessToken,validUntil:e.validUntil,accountId:this.options().accountId,datasetApiUrl:this.datasetApiUrl,vlmApiUrl:this.vlmApiUrl}}async disconnect(e=!0){if(this.datasetApiUrl=null,this.vlmApiUrl=null,this._ws){try{this._ws.close()}catch(e){this._logger.warn("ignored exception",e)}this._ws=null}await super.disconnect(e)}async reconnect(){if(!this._client)return Promise.reject("endpoint not initialized");const e=this._accountId?`?account_uuid=${this._accountId}`:"",t=`${this.eyepopUrl()}/v1/configs${e}`;let i={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let a=await this._client.fetch(t,{headers:i});if(401==a.status&&(this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",t),this.statusHandler401(a.status),i={Authorization:await this.authorizationHeader()},this.updateState("FetchConfig"),a=await this._client.fetch(t,{headers:i})),200!=a.status){this.updateState("Error");const e=await a.text();return Promise.reject(`Unexpected status ${a.status} for ${t}: ${e}`)}let n=await a.json();const o=new URL(n.dataset_api_url,this.eyepopUrl());this.datasetApiUrl=o.toString();const s=new URL(n.vlm_api_url,this.eyepopUrl());if(this.vlmApiUrl=s.toString(),this.options().disableWs?this._logger.info("disabled ws connection"):await this.reconnect_ws(),this.options().useCookie){const e=this._client,t=Q(this.datasetApiUrl,"security","check?set_cookie=true"),i={Authorization:await this.authorizationHeader()};if(a=await e.fetch(t,{headers:i}),204!=a.status){this.updateState("Error");const e=await a.text();return Promise.reject(`Unexpected status ${a.status}: ${e}`)}}return this.updateState(),Promise.resolve(this)}async reconnect_ws(){this._ws&&(this._ws.close(),this._ws=null);const e=this.datasetApiUrl?.replace("https://","wss://").replace("http://","ws://");if(!e)return;const t=Q(e,"events");return this._requestLogger.debug("about to connect ws to: %s",t),new Promise((e,i)=>{const a=Y(t);if(!a)return e();this._ws=a,a.onopen=async()=>{const t=await this.authorizationHeader();let i=JSON.stringify({authorization:t});this._requestLogger.debug("ws send: %s",i),a.send(i),i=JSON.stringify({subscribe:{account_uuid:this._accountId}}),this._requestLogger.debug("ws send: %s",i),a.send(i);for(let e in this._dataset_uuid_to_event_handlers.keys()){const t=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",t),a.send(t)}this._ws_current_reconnect_delay=1e3,e()},a.onmessage=e=>{const t=JSON.parse(e.data);this._requestLogger.debug("received ws: %s",JSON.stringify(t));const i=t;this.dispatchChangeEvent(i)},a.onclose=e=>{const{code:t,reason:i}=e;this._requestLogger.debug("ws closed: %d %s",t,i),"unsubscribe"!==i&&(this._ws_current_reconnect_delay?this._ws_current_reconnect_delay<6e4&&(this._ws_current_reconnect_delay*=1.5):this._ws_current_reconnect_delay=1e3,setTimeout(async()=>{await this.reconnect_ws()},this._ws_current_reconnect_delay))},a.onerror=e=>(this._logger.error(e),i(e),null)})}options(){return this._options}async request(e,t={},i=!1,a="dataset"){const n=this._client;if(!n)return Promise.reject("endpoint not connected");let o=await this.fetchWithRetry(async()=>{const o=await this.session(),s=te(o,a),r={...i?{}:{Authorization:`Bearer ${o.accessToken}`},...t.headers||{}};t.body||(t.body=null);const c={headers:r,method:t.method||"GET",body:t.body};return this._requestLogger.debug("Request - "+c.method+" "+e+" BODY: "+(c.body?c.body:"")),await n.fetch(Q(s??"",e),c)});if(204===o.status)return null;const s=o.headers.get("Content-Type");if(this._requestLogger.debug("Response - "+o.status+" "+o.statusText),!o.ok)throw s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("text/"))?new Error(`Request failed with ${o.status} ${o.statusText}: ${await o.text()}`):new Error(`Request failed with ${o.status} ${o.statusText}`);return s&&s.toLowerCase().startsWith("application/json")?await o.json():await o.blob()}async listDatasets(e=!0,t){const i=void 0!==t?`&modifiable_version_only=${t}`:"";return this.request(`/datasets?account_uuid=${this._accountId}&include_stats=${e}${i}`,{method:"GET"})}async createDataset(e){return this.request(`/datasets?account_uuid=${this._accountId}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async getDataset(e,t=!0,i,a){const n=i?`&dataset_version=${i}`:"",o=void 0!==a?`&modifiable_version_only=${a}`:"";return this.request(`/datasets/${e}?include_stats=${t}${n}${o}`,{method:"GET"})}async updateDataset(e,t,i=!0){return this.request(`/datasets/${e}?start_auto_annotate=${i}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async updateDatasetHeroAsset(e,t){return this.request(`/datasets/${e}/hero_asset`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteDataset(e){return this.request(`/datasets/${e}`,{method:"DELETE"})}async freezeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/freeze?${i}`,{method:"POST"})}async analyzeDatasetVersion(e,t){const i=t?`&dataset_version=${t}`:"";return this.request(`/datasets/${e}/analyze?${i}`,{method:"POST"})}async autoAnnotateDatasetVersion(e,t,i){const a=t?`&dataset_version=${t}`:"",n=i?`&max_assets=${i}`:"";return this.request(`/datasets/${e}/auto_annotate?${a}${n}`,{method:"POST"})}async deleteDatasetVersion(e,t){return this.request(`/datasets/${e}/versions?dataset_version=${t}`,{method:"DELETE"})}async deleteAnnotations(e,t,i=["unknown"]){let a="";for(let e in i)a+=`&user_review=${e}`;await this.request(`/datasets/${e}/annotations?dataset_version=${t}${a}`,{method:"DELETE"})}async createDatasetAutoAnnotate(e,t,i){const a=i?`dataset_version=${i}&`:"";return this.request(`/datasets/${t}/auto_annotates?${a}`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async updateDatasetAutoAnnotate(e,t,i,a,n){const o=n?`dataset_version=${n}&`:"";return this.request(`/datasets/${t}/auto_annotates?auto_annotate=${i}&source=${encodeURIComponent(a)}&${o}`,{method:"PATCH",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async listDatasetAutoAnnotates(e,t,i,a){const n=a?`dataset_version=${a}&`:"",o=t?`auto_annotate=${t}&`:"",s=i?`source=${i}&`:"";return this.request(`/datasets/${e}/auto_annotates?${n}&${o}&${s}`,{method:"GET"})}async uploadAsset(e,t,i,a=void 0){const n=t?`&dataset_version=${t}`:"";let o;return o=a?`/assets?dataset_uuid=${e}${n}&external_id=${a}`:`/assets?dataset_uuid=${e}${n}`,this.request(o,{method:"POST",body:i,headers:{"Content-Type":i.type||"application/octet-stream"}})}async importAsset(e,t,i,a=void 0){const n=t?`&dataset_version=${t}`:"";let o;return o=a?`/assets/imports?dataset_uuid=${e}${n}&external_id=${a}`:`/assets/imports?dataset_uuid=${e}${n}`,this.request(o,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async listAssets(e,t,i=!1,a,n,o,s,r,c){const p=new URLSearchParams;p.set("dataset_uuid",e),null!=t&&p.set("dataset_version",String(t)),i&&p.set("include_annotations","true"),null!=n&&p.set("inclusion_mode",n),null!=o&&p.set("annotation_inclusion_mode",o);for(const e of s??[])p.append("include_partition",e);for(const e of r??[])p.append("include_auto_annotate",e);for(const e of c??[])p.append("include_source",e);return null!=a&&p.set("top_k",String(a)),this.request(`/assets?${p.toString()}`,{method:"GET"})}async getAsset(e,t,i,a=!1,n){const o=i?`&dataset_version=${i}`:"",s=a?"&include_annotations=true":"",r=t?`&dataset_uuid=${t}`:"",c=n?`&top_k=${n}`:"";return this.request(`/assets/${e}?${r}${o}${s}${c}`,{method:"GET"})}async deleteAsset(e,t,i){const a=i?`&dataset_version=${i}`:"",n=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}?${n}${a}`,{method:"DELETE"})}async resurrectAsset(e,t,i,a){const n=a?`&into_dataset_version=${a}`:"";return this.request(`/assets/${e}/resurrect?dataset_uuid=${t}&from_dataset_version=${i}${n}`,{method:"POST"})}async updateAssetGroundTruth(e,t,i,a){const n=i?`&dataset_version=${i}`:"",o=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${o}${n}`,{method:"PATCH",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})}async deleteAssetGroundTruth(e,t,i){const a=i?`&dataset_version=${i}`:"",n=t?`&dataset_uuid=${t}`:"";return this.request(`/assets/${e}/ground_truth?${n}${a}`,{method:"DELETE"})}async updateAutoAnnotationStatus(e,t,i,a){if(!["approved","rejected","unknown"].includes(i))throw new Error("Invalid status");const n=a?`?approved_threshold=${a}`:"";return this.request(`/assets/${e}/auto_annotations/${t}/user_review/${i}${n}`,{method:"PATCH"})}async addAssetAnnotation(e,t,i,a,n,o,s,r){const c=t?`dataset_uuid=${t}&`:"",p=i?`&dataset_version=${i}&`:"",l=n?`&auto_annotate=${n}&`:"",u=o?`&source=${encodeURIComponent(o)}&`:"",d=s?`&user_review=${s}&`:"",m=void 0!==r?`&approved_threshold=${r}&`:"";return this.request(`/assets/${e}/annotations?${c}${p}${l}${u}${d}${m}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})}async updateAssetAnnotationApproval(e,t,i,a,n,o,s){const r=t?`dataset_uuid=${t}&`:"",c=i?`&dataset_version=${i}&`:"",p=a?`&auto_annotate=${a}&`:"",l=n?`&source=${encodeURIComponent(n)}&`:"",u=o?`&user_review=${o}&`:"",d=s?`&approved_threshold=${s}&`:"";return this.request(`/assets/${e}/annotations?${r}${c}${p}${l}${u}${d}`,{method:"PATCH"})}async downloadAsset(e,t,i,a="original",n,o,s){const r=i?`&dataset_version=${i}`:"",c=t?`&dataset_uuid=${t}`:"",p=n?`&start_timestamp=${n}`:"",l=o?`&end_timestamp=${o}`:"",u=s?`&url_type=${s}`:"";return this.request(`/assets/${e}/download?transcode_mode=${a}${c}${r}${p}${l}${u}`,{method:"GET"})}async previewAutoAnnotateAsset(e,t,i){return this.request(`/assets/${e}/preview_auto_annotate?auto_annotate=${t}`,{method:"POST",body:i?JSON.stringify(i):null,headers:i?{"Content-Type":"application/json"}:{}})}async addAssetRoi(e,t,i,a,n){const o=a?`&dataset_version=${a}`:"",s=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois?${s}${o}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteAssetRoi(e,t,i,a){const n=a?`&dataset_version=${a}`:"",o=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois/${encodeURIComponent(t)}?${o}${n}`,{method:"DELETE"})}async listModels(){return this.request(`/models?account_uuid=${this._accountId}`,{method:"GET"})}async findModelsForDataset(e){return this.request(`/models?dataset_uuid=${e}`,{method:"GET"})}async createModel(e,t,i,a=!0){return this.request(`/models?dataset_uuid=${e}&dataset_version=${t}&start_training=${a}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getModel(e){return this.request(`/models/${e}`,{method:"GET"})}async getModelTrainingProgress(e){return this.request(`/models/${e}/progress`,{method:"GET"})}async updateModel(e,t){return this.request(`/models/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteModel(e){return this.request(`/models/${e}`,{method:"DELETE"})}async trainModel(e){return this.request(`/models/${e}/train`,{method:"POST"})}async publishModel(e){return this.request(`/models/${e}/publish`,{method:"POST"})}async exportModel(e,t,i){if("qc_ai_hub"!=t)return Promise.reject(`Unexpected export_by ${t}, must be 'qc_ai_hub'`);await this.request(`/models/${e}/exports/qc_ai_hub`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async downloadModelArtifacts(e,t,i,a){const n=a?`artifact_type=${a}&`:"",o=i?`device_name=${encodeURIComponent(i)}&`:"";let s="";if(t)for(const e of t)s+=`model_format=${e}&`;return this.request(`/exports/model_artifacts/?model_uuid=${e}&${n}${o}${s}`,{method:"GET"})}addAccountEventHandler(e){this._account_event_handlers.push(e)}removeAccountEventHandler(e){this._account_event_handlers=this._account_event_handlers.filter(t=>t!==e)}addDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(this._logger.debug("addDatasetEventHandler %s",i),void 0===i){i=[],this._dataset_uuid_to_event_handlers.set(e,i);const t=this._ws;if(t){const i=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}}i.find(e=>e===t)!==t&&(this._logger.debug("addDatasetEventHandler event_handlers=%s",i),i.push(t))}removeDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(void 0!==i&&(i=i.filter(e=>e!==t),0==i.length)){const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}}removeAllDatasetEventHandlers(e){if(void 0===this._dataset_uuid_to_event_handlers.get(e))return;const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}async startWorkflow(e,t,i){return this.request(`/workflows?account_uuid=${e}&template_name=${t}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getWorkflow(e,t){return this.request(`/workflows/${e}?account_uuid=${t}`,{method:"GET"})}async listWorkflows(e,t,i,a){const n=[t?.map(e=>`dataset_uuid=${e}`).join("&")||"",i?.map(e=>`model_uuid=${e}`).join("&")||"",a?.map(e=>`phase=${e}`).join("&")||""].filter(e=>e).join("&");return this.request(`/workflows?account_uuid=${e}${n?`&${n}`:""}`,{method:"GET"})}async inferAsset(e,t,i,a,n,o,s){const r=`ai.eyepop://data/assets/${e}?${n?`transcode_mode=${n}&`:""}${i?`dataset_uuid=${i}&`:""}${a?`dataset_version=${a}&`:""}${o?`start_timestamp=${o}&`:""}${s?`end_timestamp=${s}&`:""}`;if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const e=new Ee(r,t,async(e,t)=>await this.request(e,t,!1,"vlm"),this._requestLogger);return e.start(()=>{this.jobDone(e)})}catch(e){throw this._limit.release(),e}}async evaluateDataset(e,t){if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new 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,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"})}},Ue=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())})}},Ce=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Ce("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})(Ce("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=Ce("EYEPOP_POP_ID")||"transient"),void 0===e.autoStart&&(e.autoStart=!0),void 0===e.stopJobs&&(e.stopJobs=!0),void 0!==e.auth&&void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.popId&&(e.popId=e.auth.session.popId),new X(e)}function n(e){e.auth||(e.auth=i),!e.eyepopUrl&&e.auth&&e.auth.session&&e.auth.session.eyepopUrl&&(e.eyepopUrl=e.auth.session.eyepopUrl),e.eyepopUrl||(e.eyepopUrl=Ce("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=Ce("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Ie(e)}})(je||(je={}));var Re=je},182(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var a=i(196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return a.default}});var n=i(465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return n.default}});var o=i(178);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=i(11);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var r=i(425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}});var c=i(568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var p=i(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return p.default}});var l=i(286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var u=i(557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}});var d=i(356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var m=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return m.default}});var h=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var f=i(746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return f.default}});var v=i(770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return v.default}})},196(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338(e,t){"use strict";function i(e){return 14+(e+64>>>9<<4)+1}function a(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function n(e,t,i,n,o,s){return a((r=a(a(t,e),a(n,s)))<<(c=o)|r>>>32-c,i);var r,c}function o(e,t,i,a,o,s,r){return n(t&i|~t&a,e,t,o,s,r)}function s(e,t,i,a,o,s,r){return n(t&a|i&~a,e,t,o,s,r)}function r(e,t,i,a,o,s,r){return n(t^i^a,e,t,o,s,r)}function c(e,t,i,a,o,s,r){return n(i^(t|~a),e,t,o,s,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<4*e.length;i++)t[i]=e[i>>2]>>>i%4*8&255;return t}(function(e,t){const n=new Uint32Array(i(t)).fill(0);n.set(e),n[t>>5]|=128<<t%32,n[n.length-1]=t,e=n;let p=1732584193,l=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const i=p,n=l,m=u,h=d;p=o(p,l,u,d,e[t],7,-680876936),d=o(d,p,l,u,e[t+1],12,-389564586),u=o(u,d,p,l,e[t+2],17,606105819),l=o(l,u,d,p,e[t+3],22,-1044525330),p=o(p,l,u,d,e[t+4],7,-176418897),d=o(d,p,l,u,e[t+5],12,1200080426),u=o(u,d,p,l,e[t+6],17,-1473231341),l=o(l,u,d,p,e[t+7],22,-45705983),p=o(p,l,u,d,e[t+8],7,1770035416),d=o(d,p,l,u,e[t+9],12,-1958414417),u=o(u,d,p,l,e[t+10],17,-42063),l=o(l,u,d,p,e[t+11],22,-1990404162),p=o(p,l,u,d,e[t+12],7,1804603682),d=o(d,p,l,u,e[t+13],12,-40341101),u=o(u,d,p,l,e[t+14],17,-1502002290),l=o(l,u,d,p,e[t+15],22,1236535329),p=s(p,l,u,d,e[t+1],5,-165796510),d=s(d,p,l,u,e[t+6],9,-1069501632),u=s(u,d,p,l,e[t+11],14,643717713),l=s(l,u,d,p,e[t],20,-373897302),p=s(p,l,u,d,e[t+5],5,-701558691),d=s(d,p,l,u,e[t+10],9,38016083),u=s(u,d,p,l,e[t+15],14,-660478335),l=s(l,u,d,p,e[t+4],20,-405537848),p=s(p,l,u,d,e[t+9],5,568446438),d=s(d,p,l,u,e[t+14],9,-1019803690),u=s(u,d,p,l,e[t+3],14,-187363961),l=s(l,u,d,p,e[t+8],20,1163531501),p=s(p,l,u,d,e[t+13],5,-1444681467),d=s(d,p,l,u,e[t+2],9,-51403784),u=s(u,d,p,l,e[t+7],14,1735328473),l=s(l,u,d,p,e[t+12],20,-1926607734),p=r(p,l,u,d,e[t+5],4,-378558),d=r(d,p,l,u,e[t+8],11,-2022574463),u=r(u,d,p,l,e[t+11],16,1839030562),l=r(l,u,d,p,e[t+14],23,-35309556),p=r(p,l,u,d,e[t+1],4,-1530992060),d=r(d,p,l,u,e[t+4],11,1272893353),u=r(u,d,p,l,e[t+7],16,-155497632),l=r(l,u,d,p,e[t+10],23,-1094730640),p=r(p,l,u,d,e[t+13],4,681279174),d=r(d,p,l,u,e[t],11,-358537222),u=r(u,d,p,l,e[t+3],16,-722521979),l=r(l,u,d,p,e[t+6],23,76029189),p=r(p,l,u,d,e[t+9],4,-640364487),d=r(d,p,l,u,e[t+12],11,-421815835),u=r(u,d,p,l,e[t+15],16,530742520),l=r(l,u,d,p,e[t+2],23,-995338651),p=c(p,l,u,d,e[t],6,-198630844),d=c(d,p,l,u,e[t+7],10,1126891415),u=c(u,d,p,l,e[t+14],15,-1416354905),l=c(l,u,d,p,e[t+5],21,-57434055),p=c(p,l,u,d,e[t+12],6,1700485571),d=c(d,p,l,u,e[t+3],10,-1894986606),u=c(u,d,p,l,e[t+10],15,-1051523),l=c(l,u,d,p,e[t+1],21,-2054922799),p=c(p,l,u,d,e[t+8],6,1873313359),d=c(d,p,l,u,e[t+15],10,-30611744),u=c(u,d,p,l,e[t+6],15,-1560198380),l=c(l,u,d,p,e[t+13],21,1309151649),p=c(p,l,u,d,e[t+4],6,-145523070),d=c(d,p,l,u,e[t+11],10,-1120210379),u=c(u,d,p,l,e[t+2],15,718787259),l=c(l,u,d,p,e[t+9],21,-343485551),p=a(p,i),l=a(l,n),u=a(u,m),d=a(d,h)}return Uint32Array.of(p,l,u,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(i(8*e.length)).fill(0);for(let i=0;i<e.length;i++)t[i>>2]|=(255&e[i])<<i%4*8;return t}(e),8*e.length))}},779(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:i}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},178(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(746);t.default=function(e){if(!(0,a.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},697(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291(e,t){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});const a=new Uint8Array(16);t.default=function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(a)}},829(e,t){"use strict";function i(e,t,i,a){switch(e){case 0:return t&i^~t&a;case 1:case 3:return t^i^a;case 2:return t&i^t&a^i&a}}function a(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,r=Math.ceil(s/16),c=new Array(r);for(let t=0;t<r;++t){const i=new Uint32Array(16);for(let a=0;a<16;++a)i[a]=e[64*t+4*a]<<24|e[64*t+4*a+1]<<16|e[64*t+4*a+2]<<8|e[64*t+4*a+3];c[t]=i}c[r-1][14]=8*(e.length-1)/Math.pow(2,32),c[r-1][14]=Math.floor(c[r-1][14]),c[r-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<r;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=a(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=n[0],r=n[1],p=n[2],l=n[3],u=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),c=a(s,5)+i(n,r,p,l)+u+t[n]+o[e]>>>0;u=l,l=p,p=a(r,30)>>>0,r=s,s=c}n[0]=n[0]+s>>>0,n[1]=n[1]+r>>>0,n[2]=n[2]+p>>>0,n[3]=n[3]+l>>>0,n[4]=n[4]+u>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])}},11(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const a=i(746),n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));function o(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const i=o(e,t);if(!(0,a.default)(i))throw TypeError("Stringified UUID is invalid");return i}},425(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const a=i(291),n=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9])),e.msecs=t,e}function r(e,t,i,a,n,o,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),i??=0,a??=16383&(e[8]<<8|e[9]),n??=e.slice(10,16);const r=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[s++]=r>>>24&255,o[s++]=r>>>16&255,o[s++]=r>>>8&255,o[s++]=255&r;const c=t/4294967296*1e4&268435455;o[s++]=c>>>8&255,o[s++]=255&c,o[s++]=c>>>24&15|16,o[s++]=c>>>16&255,o[s++]=a>>>8|128,o[s++]=255&a;for(let e=0;e<6;++e)o[s++]=n[e];return o}t.updateV1State=s,t.default=function(e,t,i){let c;const p=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=r(e.random??e.rng?.()??(0,a.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,i);else{const e=Date.now(),n=(0,a.default)();s(o,e,n),c=r(n,o.msecs,o.nsecs,p?void 0:o.clockseq,p?void 0:o.node,t,i)}return t??(0,n.unsafeStringify)(c)}},568(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(178),n=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,a.default)(e):e,Uint8Array.of((15&i[6])<<4|i[7]>>4&15,(15&i[7])<<4|(240&i[4])>>4,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,(15&i[1])<<4|(240&i[2])>>4,96|15&i[2],i[3],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,n.unsafeStringify)(t):t}},591(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const a=i(338),n=i(988);var o=i(988);function s(e,t,i,o){return(0,n.default)(48,a.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=n.DNS,s.URL=n.URL,t.default=s},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const a=i(178),n=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,a.default)(s):s;if("string"==typeof s&&(s=(0,a.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){c=c||0;for(let e=0;e<16;++e)r[c+e]=u[e];return r}return(0,n.unsafeStringify)(u)}},286(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(779),n=i(291),o=i(11);t.default=function(e,t,i){if(a.default.randomUUID&&!t&&!e)return a.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,n.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},557(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const a=i(829),n=i(988);var o=i(988);function s(e,t,i,o){return(0,n.default)(80,a.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=n.DNS,s.URL=n.URL,t.default=s},356(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(11),n=i(425),o=i(568);t.default=function(e,t,i){e??={},i??=0;let s=(0,n.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[i+e]=s[e];return t}return(0,a.unsafeStringify)(s)}},268(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(178),n=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,a.default)(e):e,Uint8Array.of((15&i[3])<<4|i[4]>>4&15,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|15&i[6],i[7],(15&i[1])<<4|(240&i[2])>>4,(15&i[2])<<4|(240&i[3])>>4,16|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,n.unsafeStringify)(t):t}},299(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const a=i(291),n=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=i[6]<<23|i[7]<<16|i[8]<<8|i[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function r(e,t,i,a,n=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(a){if(n<0||n+16>a.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`)}else a=new Uint8Array(16),n=0;return t??=Date.now(),i??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],a[n++]=t/1099511627776&255,a[n++]=t/4294967296&255,a[n++]=t/16777216&255,a[n++]=t/65536&255,a[n++]=t/256&255,a[n++]=255&t,a[n++]=112|i>>>28&15,a[n++]=i>>>20&255,a[n++]=128|i>>>14&63,a[n++]=i>>>6&255,a[n++]=i<<2&255|3&e[10],a[n++]=e[11],a[n++]=e[12],a[n++]=e[13],a[n++]=e[14],a[n++]=e[15],a}t.updateV7State=s,t.default=function(e,t,i){let c;if(e)c=r(e.random??e.rng?.()??(0,a.default)(),e.msecs,e.seq,t,i);else{const e=Date.now(),n=(0,a.default)();s(o,e,n),c=r(n,o.msecs,o.seq,t,i)}return t??(0,n.unsafeStringify)(c)}},746(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(697);t.default=function(e){return"string"==typeof e&&a.default.test(e)}},770(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=i(746);t.default=function(e){if(!(0,a.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}}},t={};function i(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,i),o.exports}return i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(797)})());
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,()=>(()=>{var e={262(e,t,i){"use strict";function n(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}i.r(t),i.d(t,{Auth0Client:()=>es,AuthenticationError:()=>u,CacheKey:()=>ge,ConnectError:()=>d,GenericError:()=>l,InMemoryCache:()=>xe,LocalStorageCache:()=>be,MfaApiClient:()=>Qo,MfaChallengeError:()=>Zo,MfaEnrollmentError:()=>Bo,MfaEnrollmentFactorsError:()=>Xo,MfaError:()=>Fo,MfaListAuthenticatorsError:()=>Vo,MfaRequiredError:()=>g,MfaVerifyError:()=>Go,MissingRefreshTokenError:()=>b,MyAccountApiError:()=>Ge,PopupCancelledError:()=>f,PopupOpenError:()=>v,PopupTimeoutError:()=>h,ResponseType:()=>Ue,TimeoutError:()=>m,UseDpopNonceError:()=>y,User:()=>Re,createAuth0Client:()=>ts}),"function"==typeof SuppressedError&&SuppressedError;const a={timeoutInSeconds:60},o=1e4,s="memory",r={name:"auth0-spa-js",version:"2.19.2"},c=()=>Date.now(),p="default";class l extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,l.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new l(t,i)}}class u extends l{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,u.prototype)}}class d extends l{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,d.prototype)}}class m extends l{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,m.prototype)}}class h extends m{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,h.prototype)}}class f extends l{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,f.prototype)}}class v extends l{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,v.prototype)}}class g extends l{constructor(e,t,i,n){super(e,t),this.mfa_token=i,this.mfa_requirements=n,Object.setPrototypeOf(this,g.prototype)}}class b extends l{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(w(e,["default"]),"', scope: '").concat(w(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,b.prototype)}}class x extends l{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(w(e,["default"]),"', missing scope: '").concat(w(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,x.prototype)}}class y extends l{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,y.prototype)}}function w(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const _=()=>window.crypto,k=()=>{let e="";for(;e.length<43;){const t=_().getRandomValues(new Uint8Array(43-e.length));for(const i of t)e.length<43&&i<198&&(e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[i%66])}return e},S=e=>btoa(e),T=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],E=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object.keys(e).reduce((i,n)=>{if(t&&"env"===n)return i;const a=T.find(e=>e.key===n);return a&&a.type.includes(typeof e[n])&&(i[n]=e[n]),i},{})},j=e=>{var{clientId:t}=e,i=n(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,i)=>Object.assign(Object.assign({},t),{[i]:e[i]}),{}))(Object.assign({client_id:t},i))).toString()},A=async e=>{const t=_().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},P=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),O=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 I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},C={},U={};Object.defineProperty(U,"__esModule",{value:!0});var R=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}();U.default=function(){return R.getInstance()};var L=I&&I.__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())})},z=I&&I.__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])}}},D=I;Object.defineProperty(C,"__esModule",{value:!0});var N=U,q="browser-tabs-lock-key",M={key:function(e){return L(D,void 0,void 0,function(){return z(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return L(D,void 0,void 0,function(){return z(this,function(e){throw new Error("Unsupported")})})},clear:function(){return L(D,void 0,void 0,function(){return z(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return L(D,void 0,void 0,function(){return z(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return L(D,void 0,void 0,function(){return z(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 W(e){return new Promise(function(t){return setTimeout(t,e)})}function $(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var H=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+$(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,i){return void 0===i&&(i=5e3),L(this,void 0,void 0,function(){var n,a,o,s,r,c,p;return z(this,function(l){switch(l.label){case 0:n=Date.now()+$(4),a=Date.now()+i,o=q+"-"+t,s=void 0===this.storageHandler?M:this.storageHandler,l.label=1;case 1:return Date.now()<a?[4,W(30)]:[3,8];case 2:return l.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+n,[4,W(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,W(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?M:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:l.sent(),l.label=7;case 7:return n=Date.now()+$(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return L(this,void 0,void 0,function(){var i=this;return z(this,function(n){return setTimeout(function(){return L(i,void 0,void 0,function(){var i,n,a;return z(this,function(o){switch(o.label){case 0:return[4,N.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?M:this.storageHandler,null===(n=i.getItemSync(e))?(N.default().unlock(t),[2]):((a=JSON.parse(n)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(a)),N.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(N.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return L(this,void 0,void 0,function(){return z(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 L(this,void 0,void 0,function(){return z(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 L(this,void 0,void 0,function(){var i,n,a,o;return z(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?M:this.storageHandler,n=q+"-"+t,null===(a=i.getItemSync(n))?[2]:(o=JSON.parse(a)).id!==this.id?[3,2]:[4,N.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(n),N.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(q)){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}(),J=C.default=H;class K{async runWithLock(e,t,i){const n=new AbortController,a=setTimeout(()=>n.abort(),t);try{return await navigator.locks.request(e,{mode:"exclusive",signal:n.signal},async e=>{if(clearTimeout(a),!e)throw new Error("Lock not available");return await i()})}catch(e){if(clearTimeout(a),"AbortError"===(null==e?void 0:e.name))throw new m;throw e}}}class F{constructor(){this.activeLocks=new Set,this.lock=new J,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 m;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 V=null;const B=new TextEncoder,Z=new TextDecoder;function G(e){return"string"==typeof e?B.encode(e):Z.decode(e)}function X(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new te(`${e.name} modulusLength must be at least 2048 bits`)}let Y;if(Uint8Array.prototype.toBase64)Y=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Y=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const i=[];for(let n=0;n<t.byteLength;n+=e)i.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(i.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function Q(e){return Y(e)}class ee 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 te 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 ie(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new ee("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new ee("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new ee("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new ee("unsupported CryptoKey algorithm name")}}function ne(e){return e instanceof CryptoKey}function ae(e){return ne(e)&&"public"===e.type}async function oe(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 se="dpop-nonce",re=["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"],ce=(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])}),pe=(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)})},le=async function(e,t,i,n,a,s){let r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:o;return a?(async(e,t,i,n,a,o,s,r)=>ce({type:"refresh",auth:{audience:t,scope:i},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:s,useMrrt:r},o))(e,t,i,n,r,a,s,arguments.length>7?arguments[7]:void 0):(async(e,t,i)=>{const n=await pe(e,t,i);return{ok:n.ok,json:await n.json(),headers:(a=n.headers,[...a].reduce((e,t)=>{let[i,n]=t;return e[i]=n,e},{}))};var a})(e,n,r)};async function ue(e,t,i,a,o,s,r,c,p,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,m=null;for(let n=0;n<3;n++)try{d=await le(e,i,a,o,s,r,t,c),m=null;break}catch(e){m=e}if(m)throw m;const h=d.json,{error:f,error_description:v}=h,x=n(h,["error","error_description"]),{headers:w,ok:_}=d;let k;if(p&&(k=w[se],k&&await p.setNonce(k)),!_){const n=v||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===f)throw new g(f,n,x.mfa_token,x.mfa_requirements);if("missing_refresh_token"===f)throw new b(i,a);if("use_dpop_nonce"===f){if(!p||!k||u)throw new y(k);return ue(e,t,i,a,o,s,r,c,p,!0)}throw new l(f||"request_error",n)}return x}async function de(e,t){var{baseUrl:i,timeout:a,audience:o,scope:s,auth0Client:c,useFormData:l,useMrrt:u,dpop:d}=e,m=n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const h="urn:ietf:params:oauth:grant-type:token-exchange"===m.grant_type,f="refresh_token"===m.grant_type&&u,v=Object.assign(Object.assign(Object.assign(Object.assign({},m),h&&o&&{audience:o}),h&&s&&{scope:s}),f&&{audience:o,scope:s}),g=l?j(v):JSON.stringify(v),b=(x=m.grant_type,re.includes(x));var x;return await ue("".concat(i,"/oauth/token"),a,o||p,s,{method:"POST",body:g,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(E(c||r)))}},t,l,u,b?d:void 0)}const me=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},he=(e,t,i)=>{let n;return i&&(n=e[i]),n||(n=e[p]),me(n,t)},fe="@@auth0spajs@@",ve="@@user@@";class ge{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe,i=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=i,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,i,n,a]=e.split("::");return new ge({clientId:i,scope:a,audience:n},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:n}=e;return new ge({scope:t,audience:i,clientId:n})}}class be{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(fe))}}class xe{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 ye{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||c}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=ge.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 ge({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 ge({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 ge({clientId:e},fe,ve).toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const n=ge.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===fe&&n.clientId===e.clientId&&n.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const n of t){const t=ge.fromKey(n);if(t.prefix===fe&&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=ge.fromKey(o);if(n.prefix===fe&&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 we{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 _e=e=>"number"==typeof e,ke=["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 Se=I&&I.__assign||function(){return Se=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},Se.apply(this,arguments)};function Te(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function Ee(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 Te("Expires",e.expires?e.expires.toUTCString():"")+Te("Domain",e.domain)+Te("Path",e.path)+Te("Secure",e.secure)+Te("SameSite",e.sameSite)}(i)}(e,t,Se({path:"/"},i))}var je=Ee,Ae=function(e,t){Ee(e,"",Se(Se({},t),{expires:-1}))};const Pe={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),je(e,JSON.stringify(t),n)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Ae(e,i)}},Oe="_legacy_",Ie={get:e=>Pe.get(e)||Pe.get("".concat(Oe).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),je("".concat(Oe).concat(e),JSON.stringify(t),n),Pe.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),Ae(e,i),Pe.remove(e,t),Pe.remove("".concat(Oe).concat(e),t)}},Ce={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 Ue;!function(e){e.Code="code",e.ConnectCode="connect_code"}(Ue||(Ue={}));class Re{}var Le,ze=function(e){return Le=Le||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOm99PXQ7cmV0dXJuIG5ldyBlKHIsbyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUsbyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKG8pLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1vLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtyZXR1cm4gZSYmIShhcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W10pLmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IG89ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIG8gaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxvKSYmdC5pbmRleE9mKG8pPDAmJihyW29dPWVbb10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgcz0wO2ZvcihvPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7czxvLmxlbmd0aDtzKyspdC5pbmRleE9mKG9bc10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLG9bc10pJiYocltvW3NdXT1lW29bc11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIodD0+dm9pZCAwIT09ZVt0XSkucmVkdWNlKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgcz17fSxuPW51bGw7Y29uc3QgaT0oZSx0KT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQodCksYT0oZSx0KT0+dC5zdGFydHNXaXRoKCIiLmNvbmNhdChlLCJ8IikpLGM9ZT0+e09iamVjdC5lbnRyaWVzKHMpLmZvckVhY2godD0+e2xldFtyLG9dPXQ7bz09PWUmJmRlbGV0ZSBzW3JdfSl9LGw9ZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKGUsdCk9PntyW3RdPWV9KSxyfSxmPWFzeW5jIGU9PntsZXQgcixuLHtkYXRhOnt0aW1lb3V0OmMsYXV0aDpmLGZldGNoVXJsOnUsZmV0Y2hPcHRpb25zOmgsdXNlRm9ybURhdGE6ZCx1c2VNcnJ0OnB9LHBvcnRzOltnXX09ZSx5PXt9O2NvbnN0e2F1ZGllbmNlOmIsc2NvcGU6T309Znx8e307dHJ5e2NvbnN0IGU9ZD9sKGguYm9keSk6SlNPTi5wYXJzZShoLmJvZHkpO2lmKCFlLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PWUuZ3JhbnRfdHlwZSl7aWYobj0oKGUsdCk9PnNbaShlLHQpXSkoYixPKSwhbiYmcCl7Y29uc3QgZT1zLmxhdGVzdF9yZWZyZXNoX3Rva2VuLHQ9KChlLHQpPT4hIU9iamVjdC5rZXlzKHMpLmZpbmQocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBvPWEodCxyKSxzPXIuc3BsaXQoInwiKVsxXS5zcGxpdCgiICIpLG49ZS5zcGxpdCgiICIpLmV2ZXJ5KGU9PnMuaW5jbHVkZXMoZSkpO3JldHVybiBvJiZufX0pKShPLGIpO2UmJiF0JiYobj1lKX1pZighbil0aHJvdyBuZXcgdChiLE8pO2guYm9keT1kP28oT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LGUpLHtyZWZyZXNoX3Rva2VuOm59KSk6SlNPTi5zdHJpbmdpZnkoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LGUpLHtyZWZyZXNoX3Rva2VuOm59KSl9bGV0IGYsdzsiZnVuY3Rpb24iPT10eXBlb2YgQWJvcnRDb250cm9sbGVyJiYoZj1uZXcgQWJvcnRDb250cm9sbGVyLGguc2lnbmFsPWYuc2lnbmFsKTt0cnl7dz1hd2FpdCBQcm9taXNlLnJhY2UoWyhtPWMsbmV3IFByb21pc2UoZT0+c2V0VGltZW91dChlLG0pKSksZmV0Y2godSxPYmplY3QuYXNzaWduKHt9LGgpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIGcucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCF3KXJldHVybiBmJiZmLmFib3J0KCksdm9pZCBnLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO189dy5oZWFkZXJzLHk9Wy4uLl9dLnJlZHVjZSgoZSx0KT0+e2xldFtyLG9dPXQ7cmV0dXJuIGVbcl09byxlfSx7fSkscj1hd2FpdCB3Lmpzb24oKSxyLnJlZnJlc2hfdG9rZW4/KHAmJihzLmxhdGVzdF9yZWZyZXNoX3Rva2VuPXIucmVmcmVzaF90b2tlbixrPW4saj1yLnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMocykuZm9yRWFjaChlPT57bGV0W3Qscl09ZTtyPT09ayYmKHNbdF09ail9KSksKChlLHQscik9PntzW2kodCxyKV09ZX0pKHIucmVmcmVzaF90b2tlbixiLE8pLGRlbGV0ZSByLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBzW2koZSx0KV19KShiLE8pLGcucG9zdE1lc3NhZ2Uoe29rOncub2ssanNvbjpyLGhlYWRlcnM6eX0pfWNhdGNoKGUpe2cucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOnl9KX12YXIgayxqLF8sbX0sdT1hc3luYyBlPT57bGV0e2RhdGE6e3RpbWVvdXQ6dCxhdXRoOnIsZmV0Y2hVcmw6bixmZXRjaE9wdGlvbnM6aSx1c2VGb3JtRGF0YTpmfSxwb3J0czpbdV19PWU7Y29uc3R7YXVkaWVuY2U6aH09cnx8e307dHJ5e2NvbnN0IGU9KGU9Pntjb25zdCB0PW5ldyBTZXQ7cmV0dXJuIE9iamVjdC5lbnRyaWVzKHMpLmZvckVhY2gocj0+e2xldFtvLHNdPXI7YShlLG8pJiZ0LmFkZChzKX0pLEFycmF5LmZyb20odCl9KShoKTtpZigwPT09ZS5sZW5ndGgpcmV0dXJuIHZvaWQgdS5wb3N0TWVzc2FnZSh7b2s6ITB9KTtjb25zdCByPWY/bChpLmJvZHkpOkpTT04ucGFyc2UoaS5ib2R5KTtmb3IoY29uc3QgcyBvZiBlKXtjb25zdCBlPWY/byhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3Rva2VuOnN9KSk6SlNPTi5zdHJpbmdpZnkoT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKHt9LHIpLHt0b2tlbjpzfSkpO2xldCBhLGwsaCxkOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihhPW5ldyBBYm9ydENvbnRyb2xsZXIsbD1hLnNpZ25hbCk7dHJ5e2Q9YXdhaXQgUHJvbWlzZS5yYWNlKFtuZXcgUHJvbWlzZShlPT57aD1zZXRUaW1lb3V0KGUsdCl9KSxmZXRjaChuLE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxpKSx7Ym9keTplLHNpZ25hbDpsfSkpXSkuZmluYWxseSgoKT0+Y2xlYXJUaW1lb3V0KGgpKX1jYXRjaChlKXtyZXR1cm4gdm9pZCB1LnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZClyZXR1cm4gYSYmYS5hYm9ydCgpLHZvaWQgdS5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtpZighZC5vayl7bGV0IGU7dHJ5e2NvbnN0e2Vycm9yX2Rlc2NyaXB0aW9uOnR9PUpTT04ucGFyc2UoYXdhaXQgZC50ZXh0KCkpO2U9dH1jYXRjaChlKXt9cmV0dXJuIHZvaWQgdS5wb3N0TWVzc2FnZSh7ZXJyb3I6ZXx8IkhUVFAgZXJyb3IgIi5jb25jYXQoZC5zdGF0dXMpfSl9YyhzKX11LnBvc3RNZXNzYWdlKHtvazohMH0pfWNhdGNoKGUpe3UucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZXx8IlVua25vd24gZXJyb3IgZHVyaW5nIHRva2VuIHJldm9jYXRpb24ifSl9fSxoPShlLHQpPT57aWYoIW4pcmV0dXJuITE7dHJ5e2NvbnN0IHI9bmV3IFVSTChuKS5vcmlnaW4sbz1uZXcgVVJMKGUuZmV0Y2hVcmwpO3JldHVybiBvLm9yaWdpbj09PXImJm8ucGF0aG5hbWU9PT10fWNhdGNoKGUpe3JldHVybiExfX07YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZT0+e2NvbnN0e2RhdGE6dCxwb3J0czpyfT1lLFtvXT1yO2lmKCEoInR5cGUiaW4gdCl8fCJpbml0IiE9PXQudHlwZSlyZXR1cm4idHlwZSJpbiB0JiYiY2xlYXIiPT09dC50eXBlPyhzPXt9LHZvaWQobnVsbD09b3x8by5wb3N0TWVzc2FnZSh7b2s6ITB9KSkpOiJ0eXBlImluIHQmJiJyZXZva2UiPT09dC50eXBlP2godCwiL29hdXRoL3Jldm9rZSIpP3ZvaWQgdShlKTp2b2lkKG51bGw9PW98fG8ucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOiJpbnZhbGlkX2ZldGNoX3VybCIsZXJyb3JfZGVzY3JpcHRpb246IlVuYXV0aG9yaXplZCBmZXRjaCBVUkwifSxoZWFkZXJzOnt9fSkpOnZvaWQoImZldGNoVXJsImluIHQmJmgodCwiL29hdXRoL3Rva2VuIik/ZihlKTpudWxsPT1vfHxvLnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjoiaW52YWxpZF9mZXRjaF91cmwiLGVycm9yX2Rlc2NyaXB0aW9uOiJVbmF1dGhvcml6ZWQgZmV0Y2ggVVJMIn0saGVhZGVyczp7fX0pKTtpZihudWxsPT09bil0cnl7bmV3IFVSTCh0LmFsbG93ZWRCYXNlVXJsKSxuPXQuYWxsb3dlZEJhc2VVcmx9Y2F0Y2goZSl7cmV0dXJufX0pfSgpOwoK"),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",n=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(n)}(),new Worker(Le,e)};const De={};class Ne{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(fe,"::").concat(e)}}const qe="auth0.is.authenticated",Me={memory:()=>(new xe).enclosedCache,localstorage:()=>new be},We=e=>Me[e],$e=e=>{const{openUrl:t,onRedirect:i}=e,a=n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},a),{openUrl:!1===t||t?t:i})},He=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},Je={NONCE:"nonce",KEYPAIR:"keypair"};class Ke{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(Je).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(Je.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(Je.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(Je.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Je.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(Je.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Je.KEYPAIR,this.clientId)}}class Fe{constructor(e){this.storage=new Ke(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await async function(e,t){var i;let n;return n={name:"ECDSA",namedCurve:"P-256"},crypto.subtle.generateKey(n,null!==(i=null==t?void 0:t.extractable)&&void 0!==i&&i,["sign","verify"])}(0,{extractable:!1}),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return function(e){let{keyPair:t,url:i,method:n,nonce:a,accessToken:o}=e;const s=function(e){const t=new URL(e);return t.search="",t.hash="",t.href}(i);return async function(e,t,i,n,a,o){const s=null==e?void 0:e.privateKey,r=null==e?void 0:e.publicKey;if(!ne(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!ae(r))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(!0!==r.extractable)throw new TypeError('"keypair.publicKey.extractable" must be true');if("string"!=typeof t)throw new TypeError('"htu" must be a string');if("string"!=typeof i)throw new TypeError('"htm" must be a string');if(void 0!==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=`${Q(G(JSON.stringify(e)))}.${Q(G(JSON.stringify(t)))}`;return`${n}.${Q(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return X(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return X(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new ee}(i),i,G(n)))}`}({alg:ie(s),typ:"dpop+jwt",jwk:await oe(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:n,htu:t,ath:a?Q(await crypto.subtle.digest("SHA-256",G(a))):void 0}),s)}(t,s,n,a,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!ae(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(!0!==e.extractable)throw new TypeError('"publicKey.extractable" must be true');const t=await oe(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 ee("unsupported JWK kty")}return Q(await crypto.subtle.digest({name:"SHA-256"},G(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Ve;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(Ve||(Ve={}));class Be{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]:Ve.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?Ve.DPoP:Ve.Bearer,a=i):(n=i.token_type,a=i.access_token),this.setAuthorizationHeader(e,a,n),n===Ve.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,se);if(i&&await this.hooks.setDpopNonce(i),!this.hasUseDpopNonceError(e))return e;if(!i||!t.onUseDpopNonceError)throw new y(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 Ze{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 Ge({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new Ge(t)}}class Ge extends Error{constructor(e){let{type:t,status:i,title:n,detail:a,validation_errors:o}=e;super(a),this.name="MyAccountApiError",this.type=t,this.status=i,this.title=n,this.detail=a,this.validation_errors=o,Object.setPrototypeOf(this,Ge.prototype)}}const Xe={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};function Ye(e,t){this.v=e,this.k=t}function Qe(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 et(e){return new Ye(e,0)}function tt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function it(e,t){return e.get(Qe(e,t))}function nt(e,t,i){tt(e,t),t.set(e,i)}function at(e,t,i){return e.set(Qe(e,t),i),i}function ot(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 st(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 rt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?st(Object(i),!0).forEach(function(t){ot(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):st(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function ct(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 pt(e){var t,i;function n(t,i){try{var o=e[t](i),s=o.value,r=s instanceof Ye;Promise.resolve(r?s.v:s).then(function(i){if(r){var c="return"===t&&s.k?t:"next";if(!s.k||i.done)return n(c,i);i=e[c](i).value}a(!!o.done,i)},function(e){n("throw",e)})}catch(e){a(2,e)}}function a(e,a){2===e?t.reject(a):t.resolve({value:a,done:e}),(t=t.next)?n(t.key,t.arg):i=null}this._invoke=function(e,a){return new Promise(function(o,s){var r={key:e,arg:a,resolve:o,reject:s,next:null};i?i=i.next=r:(t=i=r,n(e,a))})},"function"!=typeof e.return&&(this.return=void 0)}var lt,ut;let dt;if(pt.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},pt.prototype.next=function(e){return this._invoke("next",e)},pt.prototype.throw=function(e){return this._invoke("throw",e)},pt.prototype.return=function(e){return this._invoke("return",e)},"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 n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}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,jt;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 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 At(e){return"string"==typeof e?jt(e):Et(e)}jt=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 Pt extends Error{constructor(e,t){var i;super(e,t),ot(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 Ot extends Error{constructor(e,t){var i;super(e,t),ot(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 It(e,t,i){return new Ot(e,{code:t,cause:i})}function Ct(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Ut(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 Rt(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,n,a){try{if("number"!=typeof e||!Number.isFinite(e))throw vt("".concat(i," must be a number"),ft,a);if(e>0)return;if(t){if(0!==e)throw vt("".concat(i," must be a non-negative number"),ht,a);return}throw vt("".concat(i," must be a positive number"),ht,a)}catch(e){if(n)throw It(e.message,n,a);throw e}}function Dt(e,t,i,n){try{if("string"!=typeof e)throw vt("".concat(t," must be a string"),ft,n);if(0===e.length)throw vt("".concat(t," must not be empty"),ht,n)}catch(e){if(i)throw It(e.message,i,n);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,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 It(t,Oi,e)}(e,t)}(e,"application/json")}function qt(){return At(crypto.getRandomValues(new Uint8Array(32)))}function Mt(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 Pt("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 Pt("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 Pt("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 Pt("unsupported CryptoKey algorithm name",{cause:e})}}function Wt(e){const t=null==e?void 0:e[bt];return"number"==typeof t&&Number.isFinite(t)?t:0}function $t(e){const t=null==e?void 0:e[xt];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function Ht(){return Math.floor(Date.now()/1e3)}function Jt(e){if("object"!=typeof e||null===e)throw vt('"as" must be an object',ft);Dt(e.issuer,'"as.issuer"')}function Kt(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,n,a)=>{n.set("client_id",i.client_id),n.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 It("only requests to HTTPS are allowed",Ci,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw It("only HTTP and HTTPS requests are allowed",Ui,e)}function Zt(e,t,i,n){let a;if("string"!=typeof e||!(a=Vt(e)))throw It("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(a,n),a}function Gt(e,t,i,n){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Zt(e.mtls_endpoint_aliases[t],t,i,n):Zt(e[t],t,i,n)}class Xt extends Error{constructor(e,t){var i;super(e,t),ot(this,"cause",void 0),ot(this,"code",void 0),ot(this,"error",void 0),ot(this,"status",void 0),ot(this,"error_description",void 0),ot(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,n;super(e,t),ot(this,"cause",void 0),ot(this,"code",void 0),ot(this,"error",void 0),ot(this,"error_description",void 0),this.name=this.constructor.name,this.code=ji,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 Qt extends Error{constructor(e,t){var i;super(e,t),ot(this,"cause",void 0),ot(this,"code",void 0),ot(this,"response",void 0),ot(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+")",ni=new RegExp("^[,\\s]*("+ei+")"),ai=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 n;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 n=t;for(;n;){var a;let t=n.match(ni);const o=null===(a=t)||void 0===a?void 0:a[1].toLowerCase();if(!o)return;const s=n.substring(t[0].length);if(s&&!s.match(/^[\s,]/))return;const r=s.match(/^\s+(.*)$/),c=!!r;n=r?r[1]:void 0;const p={};let l;if(c)for(;n;){let i,a;if(t=n.match(ai)){if([,i,a,n]=t,a.includes("\\"))try{a=JSON.parse('"'.concat(a,'"'))}catch(e){}p[i.toLowerCase()]=a}else{if(!(t=n.match(oi))){if(t=n.match(si)){if(Object.keys(p).length)break;[,l,n]=t;break}return}[,i,a,n]=t,p[i.toLowerCase()]=a}}else n=s||void 0;const u={scheme:o,parameters:p};l&&(u.token68=l),i.push(u)}return i.length?i:void 0}(e))throw new 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===(n=e.body)||void 0===n?void 0:n.cancel()),new Xt("server responded with an error in the response body",{cause:t,response:e});throw It('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),Ii,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,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[yt])||fetch)(n.href,{body:a,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:Rt(n,null==s?void 0:s.signal)})}async function ui(e,t,i,n,a,o){var s;const r=Gt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[gt]));a.set("grant_type",n);const c=Ut(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,a,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,n,a,o){if(Jt(e),Kt(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',Pi,{body:s}),Dt(s.token_type,'"response" body "token_type" property',Pi,{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',Pi,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&Dt(s.refresh_token,'"response" body "refresh_token" property',Pi,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw It('"response" body "scope" property must be a string',Pi,{body:s});if(void 0!==s.id_token){Dt(s.id_token,'"response" body "id_token" property',Pi,{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!=n&&n.length&&o.push(...n);const{claims:r,jwt:c}=await async function(e,t,i,n,a){let o,s,{0:r,1:c,length:p}=e.split(".");if(5===p){if(void 0===a)throw new Pt("JWE decryption is not configured",{cause:e});e=await a(e),({0:r,1:c,length:p}=e.split("."))}if(3!==p)throw It("Invalid JWT",Pi,e);try{o=JSON.parse(Tt(At(r)))}catch(e){throw It("failed to parse JWT Header body as base64url encoded JSON",Ai,e)}if(!Ct(o))throw It("JWT Header must be a top level object",Pi,e);if(t(o),void 0!==o.crit)throw new Pt('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(Tt(At(c)))}catch(e){throw It("failed to parse JWT Payload body as base64url encoded JSON",Ai,e)}if(!Ct(s))throw It("JWT Payload must be a top level object",Pi,e);const l=Ht()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw It('unexpected JWT "exp" (expiration time) claim type',Pi,{claims:s});if(s.exp<=l-n)throw It('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Ri,{claims:s,now:l,tolerance:n,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw It('unexpected JWT "iat" (issued at) claim type',Pi,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw It('unexpected JWT "iss" (issuer) claim type',Pi,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw It('unexpected JWT "nbf" (not before) claim type',Pi,{claims:s});if(s.nbf>l+n)throw It('unexpected JWT "nbf" (not before) claim value',Ri,{claims:s,now:l,tolerance:n,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw It('unexpected JWT "aud" (audience) claim type',Pi,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,$i.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Wt(t),$t(t),a).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 It('ID Token "aud" (audience) claim includes additional untrusted audiences',Li,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw It('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)',Pi,{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 Pt("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 It('unexpected JWT "aud" (audience) claim value',Li,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw It('unexpected JWT "aud" (audience) claim value',Li,{expected:e,claims:t.claims,claim:"aud"});return t}function gi(e,t){var i,n;const a=null!==(i=null===(n=e[Bi])||void 0===n?void 0:n.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==a)throw It('unexpected JWT "iss" (issuer) claim value',Li,{expected:a,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 It('JWT "'.concat(i,'" (').concat(yi[i],") claim missing"),Pi,{claims:t.claims});return t}const _i=Symbol(),ki=Symbol(),Si="OAUTH_WWW_AUTHENTICATE_CHALLENGE",Ti="OAUTH_RESPONSE_BODY_ERROR",Ei="OAUTH_UNSUPPORTED_OPERATION",ji="OAUTH_AUTHORIZATION_RESPONSE_ERROR",Ai="OAUTH_PARSE_ERROR",Pi="OAUTH_INVALID_RESPONSE",Oi="OAUTH_RESPONSE_IS_NOT_JSON",Ii="OAUTH_RESPONSE_IS_NOT_CONFORM",Ci="OAUTH_HTTP_REQUEST_FORBIDDEN",Ui="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Ri="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 Mi(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new Pt("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Wi(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 Pt("unsupported ECDSA namedCurve",{cause:e})}}function $i(e,t,i,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw It('unexpected JWT "alg" header parameter',Pi,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw It('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 It('unexpected JWT "alg" header parameter',Pi,{header:n,expected:i,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw It('unexpected JWT "alg" header parameter',Pi,{header:n,expected:e,reason:"client configuration"})}function Hi(e,t){const{0:i,length:n}=e.getAll(t);if(n>1)throw It('"'.concat(t,'" parameter must be provided only once'),Pi);return i}const Ji=Symbol(),Ki=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),It('failed to parse "response" body as JSON',Ai,t)}if(!Ct(t))throw It('"response" body must be a top level object',Pi,{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 n=e.charCodeAt(i);if(n>127)throw new TypeError("non-ASCII string encountered in encode()");t[i]=n}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 en=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))},tn=(e,t)=>e.name===t;function nn(e,t){var i;if(i=e.hash,parseInt(i.name.slice(4),10)!==t)throw en("SHA-".concat(t),"algorithm.hash")}function an(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 on=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 an("Key for the ".concat(e," algorithm must be "),t,...n)};class sn extends Error{constructor(e,t){var i;super(e,t),ot(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}ot(sn,"code","ERR_JOSE_GENERIC");class rn extends sn{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}}),ot(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),ot(this,"claim",void 0),ot(this,"reason",void 0),ot(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}ot(rn,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class cn extends sn{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}}),ot(this,"code","ERR_JWT_EXPIRED"),ot(this,"claim",void 0),ot(this,"reason",void 0),ot(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}ot(cn,"code","ERR_JWT_EXPIRED");class pn extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}ot(pn,"code","ERR_JOSE_ALG_NOT_ALLOWED");class ln extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JOSE_NOT_SUPPORTED")}}ot(ln,"code","ERR_JOSE_NOT_SUPPORTED"),ot(class extends sn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),ot(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),ot(class extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class un extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JWS_INVALID")}}ot(un,"code","ERR_JWS_INVALID");class dn extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JWT_INVALID")}}ot(dn,"code","ERR_JWT_INVALID"),ot(class extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class mn extends sn{constructor(){super(...arguments),ot(this,"code","ERR_JWKS_INVALID")}}ot(mn,"code","ERR_JWKS_INVALID");class hn extends sn{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),ot(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}ot(hn,"code","ERR_JWKS_NO_MATCHING_KEY");class fn extends sn{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),ot(this,Symbol.asyncIterator,void 0),ot(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}ot(fn,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class vn extends sn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),ot(this,"code","ERR_JWKS_TIMEOUT")}}ot(vn,"code","ERR_JWKS_TIMEOUT");class gn extends sn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),ot(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}ot(gn,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const bn=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},xn=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),yn=e=>bn(e)||xn(e);function wn(e,t,i){try{return Qi(e)}catch(e){throw new i("Failed to base64url decode the ".concat(t))}}function _n(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 kn=e=>_n(e)&&"string"==typeof e.kty;const Sn='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function Tn(e){var t,i;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:a}=function(e){let t,i;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},i=e.priv?["sign"]:["verify"];break;default:throw new ln(Sn)}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 ln(Sn)}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 ln(Sn)}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 ln(Sn)}break;default:throw new ln('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=rt({},e);return"AKP"!==o.kty&&delete o.alg,delete o.use,crypto.subtle.importKey("jwk",o,n,null!==(t=e.ext)&&void 0!==t?t:!e.d&&!e.priv,null!==(i=e.key_ops)&&void 0!==i?i:a)}const En="given KeyObject instance cannot be used for this algorithm";let jn;const An=async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];jn||(jn=new WeakMap);let a=jn.get(e);if(null!=a&&a[i])return a[i];const o=await Tn(rt(rt({},t),{},{alg:i}));return n&&Object.freeze(e),a?a[i]=o:jn.set(e,{[i]:o}),o},Pn=(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},On=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},In=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},Cn=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i},Un=e=>null==e?void 0:e[Symbol.toStringTag],Rn=(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 Ln,zn;let Dn,Nn;if("undefined"==typeof navigator||null===(Ln=navigator.userAgent)||void 0===Ln||null===(zn=Ln.startsWith)||void 0===zn||!zn.call(Ln,"Mozilla/5.0 ")){const e="v6.8.3";Nn="".concat("openid-client","/").concat(e),Dn={"user-agent":Nn}}const qn=e=>Mn.get(e);let Mn,Wn;function $n(e){return void 0!==e?Ft(e):(Wn||(Wn=new WeakMap),(e,t,i,n)=>{let a;return(a=Wn.get(t))||(function(e,t){if("string"!=typeof e)throw Fn("".concat(t," must be a string"),Kn);if(0===e.length)throw Fn("".concat(t," must not be empty"),Jn)}(t.client_secret,'"metadata.client_secret"'),a=Ft(t.client_secret),Wn.set(t,a)),a(e,t,i,n)})}const Hn=yt,Jn="ERR_INVALID_ARG_VALUE",Kn="ERR_INVALID_ARG_TYPE";function Fn(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}class Vn extends Error{constructor(e,t){var i;super(e,t),ot(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 Bn(e,t,i){return new Vn(e,{cause:t,code:i})}function Zn(e){if(e instanceof TypeError||e instanceof Vn||e instanceof Xt||e instanceof Yt||e instanceof Qt)throw e;if(e instanceof Ot)switch(e.code){case Ci:throw Bn("only requests to HTTPS are allowed",e,e.code);case Ui:throw Bn("only requests to HTTP or HTTPS are allowed",e,e.code);case Ii:throw Bn("unexpected HTTP response status code",e.cause,e.code);case Oi:throw Bn("unexpected response content-type",e.cause,e.code);case Ai:throw Bn("parsing error occured",e,e.code);case Pi:throw Bn("invalid response encountered",e,e.code);case Li:throw Bn("unexpected JWT claim value encountered",e,e.code);case zi:throw Bn("unexpected JSON attribute value encountered",e,e.code);case Ri:throw Bn("JWT timestamp claim value failed validation",e,e.code);default:throw Bn(e.message,e,e.code)}if(e instanceof Pt)throw Bn("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Bn("runtime operation error",e,Ei);case"NotSupportedError":throw Bn("runtime unsupported operation",e,Ei);case"TimeoutError":throw Bn("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Bn("operation aborted",e,"OAUTH_ABORT")}throw new Vn("something went wrong",{cause:e})}new TextDecoder;const Gn=Symbol();class Xn{constructor(e,t,i,n){var a,o,s,r,c;if("string"!=typeof t||!t.length)throw Fn('"clientId" must be a non-empty string',Kn);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 Fn('"clientId" and "metadata.client_id" must be the same',Jn);const p=rt(rt({},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=n||("string"==typeof p.client_secret&&p.client_secret.length?$n(p.client_secret):(e,t,i,n)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const d=structuredClone(e);Gn in e&&(d[Bi]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let m=Object.freeze(d);Mn||(Mn=new WeakMap),Mn.set(this,{__proto__:null,as:m,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(qn(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(qn(this).c)}get timeout(){return qn(this).timeout}set timeout(e){qn(this).timeout=e}get[Hn](){return qn(this).fetch}set[Hn](e){qn(this).fetch=e}}function Yn(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 Qn(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 Ot("invalid Retry-After header value",{cause:e});s>t&&await ea(s-t,i)}function ea(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 ta(e,t){pa(e);const{as:i,c:n,auth:a,fetch:o,tlsOnly:s,timeout:r}=qn(e);return async function(e,t,i,n,a){Jt(e),Kt(t);const o=Gt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[gt])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const r=Ut(null==a?void 0:a.headers);return r.set("accept","application/json"),li(e,t,i,o,s,r,a)}(i,n,a,t,{[yt]:o,[gt]:!s,headers:new Headers(Dn),signal:la(r)}).then(e=>async function(e,t,i){if(Jt(e),Kt(t),!mt(i,Response))throw vt('"response" must be an instance of Response',ft);await ri(i,200,"Backchannel Authentication Endpoint"),qi(i);const n=await Fi(i);Dt(n.auth_req_id,'"response" body "auth_req_id" property',Pi,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return zt(a,!0,'"response" body "expires_in" property',Pi,{body:n}),n.expires_in=a,void 0!==n.interval&&zt(n.interval,!1,'"response" body "interval" property',Pi,{body:n}),n}(i,n,e)).catch(Zn)}async function ia(e,t,i,n){var a,o;pa(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 ea(s,r)}catch(e){Zn(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:d,nonRepudiation:m,timeout:h,decrypt:f}=qn(e),v=(a,o)=>ia(e,rt(rt({},t),{},{interval:a}),i,rt(rt({},n),{},{signal:r,flag:o})),g=await async function(e,t,i,n,a){Jt(e),Kt(t),Dt(n,'"authReqId"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("auth_req_id",n),ui(e,t,i,"urn:openid:params:grant-type:ciba",o,a)}(c,p,l,t.auth_req_id,{[yt]:u,[gt]:!d,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Dn),signal:r.aborted?r:la(h)}).catch(Zn);var b;if(503===g.status&&g.headers.has("retry-after"))return await Qn(g,s,r,!0),await(null===(b=g.body)||void 0===b?void 0:b.cancel()),v(s);const x=async function(e,t,i,n){return fi(e,t,i,void 0,null==n?void 0:n[_t],null==n?void 0:n.recognizedTokenTypes)}(c,p,g,{[_t]:f});let y;try{y=await x}catch(e){if(ua(e,n))return v(s,da);if(e instanceof Xt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Qn(e.response,s,r),v(s)}Zn(e)}return y.id_token&&await(null==m?void 0:m(g)),Yn(y),y}function na(e){qn(e).tlsOnly=!1}async function aa(e,t,i,n,a){if(pa(e),!((null==a?void 0:a.flag)===da||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Fn('"currentUrl" must be an instance of URL, or Request',Kn);let o,s;const{as:r,c,auth:p,fetch:l,tlsOnly:u,jarm:d,hybrid:m,nonRepudiation:h,timeout:f,decrypt:v,implicit:g}=qn(e);if((null==a?void 0:a.flag)===da)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 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(m)t.hash=i.toString();else for(const[e,n]of i.entries())t.searchParams.append(e,n);break;default:throw Fn("unexpected Request HTTP method",Jn)}}switch(s=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!d:o=await d(t,null==i?void 0:i.expectedState);break;case!!m:o=await m(t,null==i?void 0:i.expectedNonce,null==i?void 0:i.expectedState,null==i?void 0:i.maxAge);break;case!!g:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{o=function(e,t,i,n){if(Jt(e),Kt(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw vt('"parameters" must be an instance of URLSearchParams, or URL',ft);if(Hi(i,"response"))throw It('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',Pi,{parameters:i});const a=Hi(i,"iss"),o=Hi(i,"state");if(!a&&e.authorization_response_iss_parameter_supported)throw It('response parameter "iss" (issuer) missing',Pi,{parameters:i});if(a&&a!==e.issuer)throw It('unexpected "iss" (issuer) response parameter value',Pi,{expected:e.issuer,parameters:i});switch(n){case void 0:case Ki:if(void 0!==o)throw It('unexpected "state" response parameter encountered',Pi,{expected:void 0,parameters:i});break;case Ji:break;default:if(Dt(n,'"expectedState" argument'),o!==n)throw It(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',Pi,{expected:n,parameters:i})}if(Hi(i,"error"))throw new Yt("authorization response from the server is an error",{cause:i});const s=Hi(i,"id_token"),r=Hi(i,"token");if(void 0!==s||void 0!==r)throw new Pt("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){Zn(e)}}}const b=await async function(e,t,i,n,a,o,s){if(Jt(e),Kt(t),!bi.has(n))throw vt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',ht);Dt(a,'"redirectUri"');const r=Hi(n,"code");if(!r)throw It('no authorization code in "callbackParameters"',Pi);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",a),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:n,[yt]:l,[gt]:!u,DPoP:null==a?void 0:a.DPoP,headers:new Headers(Dn),signal:la(f)}).catch(Zn);"string"!=typeof(null==i?void 0:i.expectedNonce)&&"number"!=typeof(null==i?void 0:i.maxAge)||(i.idTokenExpected=!0);const x=async function(e,t,i,n){return"string"==typeof(null==n?void 0:n.expectedNonce)||"number"==typeof(null==n?void 0:n.maxAge)||null!=n&&n.requireIdToken?async function(e,t,i,n,a,o,s){const r=[];switch(n){case void 0:n=_i;break;case _i:break;default:Dt(n,'"expectedNonce" argument'),r.push("nonce")}switch(null!=a||(a=t.default_max_age),a){case void 0:a=ki;break;case ki:break;default:zt(a,!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',Pi,{body:c});const p=hi(c);if(a!==ki){const e=Ht()+Wt(t),i=$t(t);if(p.auth_time+a<e-i)throw It("too much time has elapsed since the last End-User authentication",Ri,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(n===_i){if(void 0!==p.nonce)throw It('unexpected ID Token "nonce" claim value',Li,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==n)throw It('unexpected ID Token "nonce" claim value',Li,{expected:n,claims:p,claim:"nonce"});return c}(e,t,i,n.expectedNonce,n.maxAge,n[_t],n.recognizedTokenTypes):async function(e,t,i,n,a){const o=await fi(e,t,i,void 0,n,a),s=hi(o);if(s){if(void 0!==t.default_max_age){zt(t.default_max_age,!0,'"client.default_max_age"');const e=Ht()+Wt(t),i=$t(t);if(s.auth_time+t.default_max_age<e-i)throw It("too much time has elapsed since the last End-User authentication",Ri,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw It('unexpected ID Token "nonce" claim value',Li,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==n?void 0:n[_t],null==n?void 0:n.recognizedTokenTypes)}(r,c,b,{expectedNonce:null==i?void 0:i.expectedNonce,maxAge:null==i?void 0:i.maxAge,requireIdToken:null==i?void 0:i.idTokenExpected,[_t]:v});let y;try{y=await x}catch(t){if(ua(t,a))return aa(e,void 0,i,n,rt(rt({},a),{},{flag:da,authResponse:o,redirectUri:s}));Zn(t)}return y.id_token&&await(null==h?void 0:h(b)),Yn(y),y}async function oa(e,t,i,n){pa(e),i=new URLSearchParams(i);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=qn(e),d=await async function(e,t,i,n,a){Jt(e),Kt(t),Dt(n,'"refreshToken"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("refresh_token",n),ui(e,t,i,"refresh_token",o,a)}(a,o,s,t,{[yt]:r,[gt]:!c,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Dn),signal:la(l)}).catch(Zn),m=async function(e,t,i,n){return fi(e,t,i,void 0,null==n?void 0:n[_t],null==n?void 0:n.recognizedTokenTypes)}(a,o,d,{[_t]:u});let h;try{h=await m}catch(a){if(ua(a,n))return oa(e,t,i,rt(rt({},n),{},{flag:da}));Zn(a)}return h.id_token&&await(null==p?void 0:p(d)),Yn(h),h}async function sa(e,t,i){pa(e),t=new URLSearchParams(t);const{as:n,c:a,auth:o,fetch:s,tlsOnly:r,timeout:c}=qn(e),p=await async function(e,t,i,n,a){return Jt(e),Kt(t),ui(e,t,i,"client_credentials",new URLSearchParams(n),a)}(n,a,o,t,{[yt]:s,[gt]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Dn),signal:la(c)}).catch(Zn),l=async function(e,t,i){return fi(e,t,i,void 0,void 0,void 0)}(n,a,p);let u;try{u=await l}catch(n){if(ua(n,i))return sa(e,t,rt(rt({},i),{},{flag:da}));Zn(n)}return Yn(u),u}function ra(e,t){pa(e);const{as:i,c:n,tlsOnly:a,hybrid:o,jarm:s,implicit:r}=qn(e),c=Gt(i,"authorization_endpoint",!1,a);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",n.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",o?"code id_token":r?"id_token":"code"),r&&!t.has("nonce"))throw Fn("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Jn);s&&t.set("response_mode","jwt")}for(const[e,i]of t.entries())c.searchParams.append(e,i);return c}async function ca(e,t,i){pa(e);const n=ra(e,t),{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=qn(e),l=await async function(e,t,i,n,a){var o;Jt(e),Kt(t);const s=Gt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[gt])),r=new URLSearchParams(n);r.set("client_id",t.client_id);const c=Ut(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(ci(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const p=await li(e,t,i,s,r,c,a);return null==a||null===(o=a.DPoP)||void 0===o||o.cacheNonce(p,s),p}(a,o,s,n.searchParams,{[yt]:r,[gt]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(Dn),signal:la(p)}).catch(Zn),u=async function(e,t,i){if(Jt(e),Kt(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 n=await Fi(i);Dt(n.request_uri,'"response" body "request_uri" property',Pi,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return zt(a,!0,'"response" body "expires_in" property',Pi,{body:n}),n.expires_in=a,n}(a,o,l);let d;try{d=await u}catch(n){if(ua(n,i))return ca(e,t,rt(rt({},i),{},{flag:da}));Zn(n)}return ra(e,{request_uri:d.request_uri})}function pa(e){if(!(e instanceof Xn))throw Fn('"config" must be an instance of Configuration',Kn);if(Object.getPrototypeOf(e)!==Xn.prototype)throw Fn("subclassing Configuration is not allowed",Jn)}function la(e){return e?AbortSignal.timeout(1e3*e):void 0}function ua(e,t){return!(null==t||!t.DPoP||t.flag===da)&&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(Xn.prototype);const da=Symbol();async function ma(e,t,i,n){pa(e);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=qn(e),u=await async function(e,t,i,n,a,o){return Jt(e),Kt(t),Dt(n,'"grantType"'),ui(e,t,i,n,new URLSearchParams(a),o)}(a,o,s,t,new URLSearchParams(i),{[yt]:r,[gt]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Dn),signal:la(p)}).then(e=>{let i;return"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(i={n_a:()=>{}}),async function(e,t,i,n){return fi(e,t,i,void 0,null==n?void 0:n[_t],null==n?void 0:n.recognizedTokenTypes)}(a,o,e,{[_t]:l,recognizedTokenTypes:i})}).catch(Zn);return Yn(u),u}async function ha(e,t,i){if(!_n(e))throw new un("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new un('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new un("JWS Protected Header incorrect type");if(void 0===e.payload)throw new un("JWS Payload missing");if("string"!=typeof e.signature)throw new un("JWS Signature missing or incorrect type");if(void 0!==e.header&&!_n(e.header))throw new un("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=Qi(e.protected);n=JSON.parse(Gi.decode(t))}catch(e){throw new un("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 un("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a=rt(rt({},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 ln('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)}(un,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 un('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=a;if("string"!=typeof r||!r)throw new un('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 pn('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new un("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new un("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(kn(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Rn(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(!yn(t))throw new TypeError(on(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(Un(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(kn(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Rn(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)&&Rn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!yn(t))throw new TypeError(on(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(Un(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(Un(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Un(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(Un(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Un(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,i)}}(r,t,"verify");const l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.reduce((e,t)=>{let{length:i}=t;return e+i},0),a=new Uint8Array(n);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(void 0!==e.protected?Xi(e.protected):new Uint8Array,Xi("."),"string"==typeof e.payload?s?Xi(e.payload):Zi.encode(e.payload):e.payload),u=wn(e.signature,"signature",un),d=await async function(e,t){if(e instanceof Uint8Array)return e;if(bn(e))return e;if(xn(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{jn||(jn=new WeakMap);let i=jn.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(En)}o=e.toCryptoKey(e.asymmetricKeyType,a,n?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(En);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(En);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(En)}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(En);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(En);return i?i[t]=o:jn.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return An(e,i,t)}if(kn(e))return e.k?Qi(e.k):An(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 an("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(!tn(e.algorithm,"HMAC"))throw en("HMAC");nn(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if(!tn(e.algorithm,"RSASSA-PKCS1-v1_5"))throw en("RSASSA-PKCS1-v1_5");nn(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if(!tn(e.algorithm,"RSA-PSS"))throw en("RSA-PSS");nn(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if(!tn(e.algorithm,"Ed25519"))throw en("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!tn(e.algorithm,t))throw en(t);break;case"ES256":case"ES384":case"ES512":{if(!tn(e.algorithm,"ECDSA"))throw en("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 en(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t&&!e.usages.includes(t))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(t,"."))}(e,i)}(t,e,i),t}(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:i}=t.algorithm;if("number"!=typeof i||i<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}}(e,a);const o=function(e,t){const i="SHA-".concat(e.slice(-3));switch(e){case"HS256":case"HS384":case"HS512":return{hash:i,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:i,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:i,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:i,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new ln("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 gn;let m;m=s?wn(e.payload,"payload",un):"string"==typeof e.payload?Zi.encode(e.payload):e.payload;const h={payload:m};return void 0!==e.protected&&(h.protectedHeader=n),void 0!==e.header&&(h.unprotectedHeader=e.header),p?rt(rt({},h),{},{key:d}):h}const fa=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function va(e){const t=fa.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 ga=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function ba(e,t){let i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Gi.decode(t))}catch(e){}if(!_n(i))throw new dn("JWT Claims Set must be a top-level JSON object");const{typ:a}=n;if(a&&("string"!=typeof e.typ||ga(e.typ)!==ga(a)))throw new rn('unexpected "typ" JWT header value',i,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:r,audience:c,maxTokenAge:p}=n,l=[...o];void 0!==p&&l.push("iat"),void 0!==c&&l.push("aud"),void 0!==r&&l.push("sub"),void 0!==s&&l.push("iss");for(const e of new Set(l.reverse()))if(!(e in i))throw new rn('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new rn('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new rn('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 rn('unexpected "aud" claim value',i,"aud","check_failed");var u,d;let m;switch(typeof n.clockTolerance){case"string":m=va(n.clockTolerance);break;case"number":m=n.clockTolerance;break;case"undefined":m=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=n,f=(v=h||new Date,Math.floor(v.getTime()/1e3));var v;if((void 0!==i.iat||p)&&"number"!=typeof i.iat)throw new rn('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new rn('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>f+m)throw new rn('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new rn('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=f-m)throw new cn('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=f-i.iat;if(e-m>("number"==typeof p?p:va(p)))throw new cn('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-m)throw new rn('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}function xa(e){return _n(e)}var ya,wa,_a=new WeakMap,ka=new WeakMap;class Sa{constructor(e){if(nt(this,_a,void 0),nt(this,ka,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(xa)}(e))throw new mn("JSON Web Key Set malformed");at(_a,this,structuredClone(e))}jwks(){return it(_a,this)}async getKey(e,t){const{alg:i,kid:n}=rt(rt({},e),null==t?void 0:t.header),a=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new ln('Unsupported "alg" value for a JSON Web Key Set')}}(i),o=it(_a,this).keys.filter(e=>{let t=a===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),!t||"string"!=typeof e.alg&&"AKP"!==a||(t=i===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(i){case"ES256":t="P-256"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":case"EdDSA":t="Ed25519"===e.crv}return t}),{0:s,length:r}=o;if(0===r)throw new hn;if(1!==r){const e=new fn,t=it(ka,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new pt(e.apply(this,arguments))}}(function*(){for(const e of o)try{yield yield et(Ta(t,e,i))}catch(e){}}),e}return Ta(it(ka,this),s,i)}}async function Ta(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(!_n(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 ln('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return Tn(rt(rt({},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 Tn(rt(rt({},e),{},{ext:i}));case"EC":case"OKP":return Tn(rt(rt({},e),{},{alg:t,ext:i}));default:throw new ln('Unsupported "kty" (Key Type) Parameter value')}}(rt(rt({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new mn("JSON Web Key Set members must be public keys");n[i]=e}return n[i]}function Ea(e){const t=new Sa(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 ja;if("undefined"==typeof navigator||null===(ya=navigator.userAgent)||void 0===ya||null===(wa=ya.startsWith)||void 0===wa||!wa.call(ya,"Mozilla/5.0 ")){const e="v6.2.2";ja="".concat("jose","/").concat(e)}const Aa=Symbol(),Pa=Symbol();var Oa=new WeakMap,Ia=new WeakMap,Ca=new WeakMap,Ua=new WeakMap,Ra=new WeakMap,La=new WeakMap,za=new WeakMap,Da=new WeakMap,Na=new WeakMap,qa=new WeakMap;class Ma{constructor(e,t){if(nt(this,Oa,void 0),nt(this,Ia,void 0),nt(this,Ca,void 0),nt(this,Ua,void 0),nt(this,Ra,void 0),nt(this,La,void 0),nt(this,za,void 0),nt(this,Da,void 0),nt(this,Na,void 0),nt(this,qa,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,n;at(Oa,this,new URL(e.href)),at(Ia,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),at(Ca,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),at(Ua,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),at(za,this,new Headers(null==t?void 0:t.headers)),ja&&!it(za,this).has("User-Agent")&&it(za,this).set("User-Agent",ja),it(za,this).has("accept")||(it(za,this).set("accept","application/json"),it(za,this).append("accept","application/jwk-set+json")),at(Da,this,null==t?void 0:t[Aa]),void 0!==(null==t?void 0:t[Pa])&&(at(qa,this,null==t?void 0:t[Pa]),i=null==t?void 0:t[Pa],n=it(Ua,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=n)&&"jwks"in i&&_n(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,_n)&&(at(Ra,this,it(qa,this).uat),at(Na,this,Ea(it(qa,this).jwks))))}pendingFetch(){return!!it(La,this)}coolingDown(){return"number"==typeof it(Ra,this)&&Date.now()<it(Ra,this)+it(Ca,this)}fresh(){return"number"==typeof it(Ra,this)&&Date.now()<it(Ra,this)+it(Ua,this)}jwks(){var e;return null===(e=it(Na,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){it(Na,this)&&this.fresh()||await this.reload();try{return await it(Na,this).call(this,e,t)}catch(i){if(i instanceof hn&&!1===this.coolingDown())return await this.reload(),it(Na,this).call(this,e,t);throw i}}async reload(){it(La,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&at(La,this,void 0),it(La,this)||at(La,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 vn;throw e});if(200!==a.status)throw new sn("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new sn("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(it(Oa,this).href,it(za,this),AbortSignal.timeout(it(Ia,this)),it(Da,this)).then(e=>{at(Na,this,Ea(e)),it(qa,this)&&(it(qa,this).uat=Date.now(),it(qa,this).jwks=e),at(Ra,this,Date.now()),at(La,this,void 0)}).catch(e=>{throw at(La,this,void 0),e})),await it(La,this)}}const Wa=["mfaToken"],$a=["mfaToken"];var Ha,Ja,Ka,Fa,Va,Ba,Za,Ga,Xa,Ya,Qa,eo,to,io,no,ao,oo=class extends Error{constructor(e,t){super(t),ot(this,"code",void 0),this.name="NotSupportedError",this.code=e}},so=class extends Error{constructor(e,t,i){super(t),ot(this,"cause",void 0),ot(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),ot(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),ot(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."),ot(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)=>rt(rt({},e),{},{[t[0]]:t[1]}),{})}var wo=class extends Error{constructor(e,t,i){super(t),ot(this,"cause",void 0),ot(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 jo=(Ha=new WeakMap,Ja=new WeakMap,Ka=new WeakMap,class{constructor(e){var t;nt(this,Ha,void 0),nt(this,Ja,void 0),nt(this,Ka,void 0),at(Ha,this,"https://".concat(e.domain)),at(Ja,this,e.clientId),at(Ka,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(it(Ha,this),"/mfa/authenticators"),{mfaToken:i}=e,n=await it(Ka,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!n.ok){const e=await n.json();throw new _o(e.error_description||"Failed to list authenticators",e)}return(await n.json()).map(Eo)}async enrollAuthenticator(e){const t="".concat(it(Ha,this),"/mfa/associate"),{mfaToken:i}=e,n=ct(e,Wa),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 it(Ka,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){const e=await o.json();throw new 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,n="".concat(it(Ha,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),a=await it(Ka,this).call(this,n,{method:"DELETE",headers:{Authorization:"Bearer ".concat(i),"Content-Type":"application/json"}});if(!a.ok){const e=await a.json();throw new So(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(it(Ha,this),"/mfa/challenge"),{mfaToken:i}=e,n=ct(e,$a),a={mfa_token:i,client_id:it(Ja,this),challenge_type:n.challengeType};n.authenticatorId&&(a.authenticator_id=n.authenticatorId);const o=await it(Ka,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!o.ok){const e=await o.json();throw new 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())}}),Ao=class e{constructor(e,t,i,n,a,o,s){ot(this,"accessToken",void 0),ot(this,"idToken",void 0),ot(this,"refreshToken",void 0),ot(this,"expiresAt",void 0),ot(this,"scope",void 0),ot(this,"claims",void 0),ot(this,"authorizationDetails",void 0),ot(this,"tokenType",void 0),ot(this,"issuedTokenType",void 0),this.accessToken=e,this.idToken=i,this.refreshToken=n,this.expiresAt=t,this.scope=a,this.claims=o,this.authorizationDetails=s}static fromTokenEndpointResponse(t){const i=t.id_token?t.claims():void 0,n=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,i,t.authorization_details);return n.tokenType=t.token_type,n.issuedTokenType=t.issued_token_type,n}},Po=(Fa=new WeakMap,Va=new WeakMap,Ba=new WeakMap,class{constructor(e,t){nt(this,Fa,new Map),nt(this,Va,void 0),nt(this,Ba,void 0),at(Ba,this,Math.max(1,Math.floor(e))),at(Va,this,Math.max(0,Math.floor(t)))}get(e){const t=it(Fa,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return it(Fa,this).delete(e),it(Fa,this).set(e,t),t.value;it(Fa,this).delete(e)}}set(e,t){for(it(Fa,this).has(e)&&it(Fa,this).delete(e),it(Fa,this).set(e,{value:t,expiresAt:Date.now()+it(Va,this)});it(Fa,this).size>it(Ba,this);){const e=it(Fa,this).keys().next().value;if(void 0===e)break;it(Fa,this).delete(e)}}}),Oo=new Map;function Io(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,n=e.ttlMs,"".concat(i,":").concat(n));var i,n;let a=(o=t,Oo.get(o));var o;return a||(a=new Po(e.maxEntries,e.ttlMs),Oo.set(t,a)),a}static createJwksCache(){return{}}},Uo="openid profile email offline_access",Ro=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,n]of Object.entries(t))if(!Ro.has(i))if(Array.isArray(n)){if(n.length>20)throw new mo("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));n.forEach(t=>{e.append(i,t)})}else e.append(i,n)}var Do="urn:ietf:params:oauth:token-type:access_token",No=(Za=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,no=new WeakMap,ao=new WeakSet,class{constructor(e){var t,i,n,a;if(function(e,t){tt(e,t),t.add(e)}(this,ao),nt(this,Za,void 0),nt(this,Ga,void 0),nt(this,Xa,void 0),nt(this,Ya,void 0),nt(this,Qa,void 0),nt(this,eo,void 0),nt(this,to,void 0),nt(this,io,void 0),nt(this,no,void 0),ot(this,"mfa",void 0),at(Ya,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");at(Qa,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,rt(rt({},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.6.0"}));const o=Io(e.discoveryCache);at(to,this,Co.createDiscoveryCache(o)),at(io,this,new Map),at(no,this,Co.createJwksCache()),this.mfa=new jo({domain:it(Ya,this).domain,clientId:it(Ya,this).clientId,customFetch:it(Qa,this)})}async getServerMetadata(){const{serverMetadata:e}=await Qe(ao,this,Wo).call(this);return e}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Qe(ao,this,Wo).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 Qe(ao,this,Ko).call(this,e)}catch(e){throw new vo(e)}}async buildLinkUserUrl(e){try{const t=await Qe(ao,this,Ko).call(this,{authorizationParams:rt(rt({},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 Qe(ao,this,Ko).call(this,{authorizationParams:rt(rt({},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 Qe(ao,this,Wo).call(this),n=yo(rt(rt({},it(Ya,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(rt(rt({scope:Uo},n),{},{client_id:it(Ya,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&a.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&a.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await ta(t,a),i=await ia(t,e);return Ao.fromTokenEndpointResponse(i)}catch(e){throw new fo(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Qe(ao,this,Wo).call(this),n=yo(rt(rt({},it(Ya,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(rt(rt({scope:Uo},n),{},{client_id:it(Ya,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:i.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&a.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&a.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const e=await ta(t,a);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 Qe(ao,this,Wo).call(this),n=new URLSearchParams({auth_req_id:t});try{const e=await ma(i,"urn:openid:params:grant-type:ciba",n);return Ao.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?Qe(ao,this,$o).call(this,e):Qe(ao,this,Ho).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await Qe(ao,this,Wo).call(this);try{const n=await aa(i,e,{pkceCodeVerifier:t.codeVerifier});return Ao.fromTokenEndpointResponse(n)}catch(e){throw new ro("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await Qe(ao,this,Wo).call(this),i=new URLSearchParams;e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope);try{const n=await oa(t,e.refreshToken,i);return Ao.fromTokenEndpointResponse(n)}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 Qe(ao,this,Wo).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 n=t;if(e.auth0ForwardedFor){const i=await Qe(ao,this,Jo).call(this);n=new Xn(t.serverMetadata(),it(Ya,this).clientId,it(Ya,this).clientSecret,i),n[Hn]=(t,i)=>it(Qa,this).call(this,t,rt(rt({},i),{},{headers:rt(rt({},i.headers),{},{"auth0-forwarded-for":e.auth0ForwardedFor})}))}try{const e=await ma(n,"password",i);return Ao.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 Qe(ao,this,Wo).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const n=await sa(t,i);return Ao.fromTokenEndpointResponse(n)}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 Qe(ao,this,Wo).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(it(Ya,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",it(Ya,this).clientId),t}return function(e,t){pa(e);const{as:i,c:n,tlsOnly:a}=qn(e),o=Gt(i,"end_session_endpoint",!1,a);(t=new URLSearchParams(t)).has("client_id")||t.set("client_id",n.client_id);for(const[e,i]of t.entries())o.searchParams.append(e,i);return o}(t,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const{serverMetadata:t}=await Qe(ao,this,Wo).call(this),i=Io(it(Ya,this).discoveryCache),n=t.jwks_uri;it(eo,this)||at(eo,this,function(e,t){const i=new Ma(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,[Aa]:it(Qa,this),[Pa]:it(no,this)}));const{payload:a}=await async function(e,t,i){var n;const a=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Gi.decode(e)),"string"!=typeof e)throw new un("Compact JWS must be a string or Uint8Array");const{0:n,1:a,2:o,length:s}=e.split(".");if(3!==s)throw new un("Invalid Compact JWS");const r=await ha({payload:a,protected:n,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?rt(rt({},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 dn("JWTs MUST NOT use unencoded payload");const o={payload:ba(a.protectedHeader,a.payload,i),protectedHeader:a.protectedHeader};return"function"==typeof t?rt(rt({},o),{},{key:a.key}):o}(e.logoutToken,it(eo,this),{issuer:t.issuer,audience:it(Ya,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in a)&&!("sub"in a))throw new ho('either "sid" or "sub" (or both) claims must be present');if("sid"in a&&"string"!=typeof a.sid)throw new ho('"sid" claim must be a string');if("sub"in a&&"string"!=typeof a.sub)throw new ho('"sub" claim must be a string');if("nonce"in a)throw new ho('"nonce" claim is prohibited');if(!("events"in a))throw new ho('"events" claim is missing');if("object"!=typeof a.events||null===a.events)throw new ho('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in a.events))throw new ho('"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 ho('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:a.sid,sub:a.sub}}});function qo(){const e=it(Ya,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(it(Ya,this).useMtls?"1":"0")}async function Mo(e){const t=await Qe(ao,this,Jo).call(this),i=new Xn(e,it(Ya,this).clientId,it(Ya,this).clientSecret,t);return i[Hn]=it(Qa,this),i}async function Wo(){if(it(Za,this)&&it(Ga,this))return{configuration:it(Za,this),serverMetadata:it(Ga,this)};const e=Qe(ao,this,qo).call(this),t=it(to,this).get(e);if(t)return at(Ga,this,t.serverMetadata),at(Za,this,await Qe(ao,this,Mo).call(this,t.serverMetadata)),{configuration:it(Za,this),serverMetadata:it(Ga,this)};const i=it(io,this).get(e);if(i){const e=await i;return at(Ga,this,e.serverMetadata),at(Za,this,await Qe(ao,this,Mo).call(this,e.serverMetadata)),{configuration:it(Za,this),serverMetadata:it(Ga,this)}}const n=(async()=>{const t=await Qe(ao,this,Jo).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 Fn('"server" must be an instance of URL',Kn);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 vt('"'.concat("issuerIdentifier",'" must be an instance of URL'),ft);Bt(e,!0!==(null==n?void 0:n[gt]));const a=i(new URL(e.href)),o=Ut(null==n?void 0:n.headers);return o.set("accept","application/json"),((null==n?void 0:n[yt])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:Rt(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=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[Hn],[gt]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(na),signal:s,headers:new Headers(Dn)}):((null==t?void 0:t[Hn])||fetch)((Bt(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(na)),e.href),{headers:Object.fromEntries(new Headers(rt({accept:"application/json"},Dn)).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 It('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Ii,t);qi(t);const n=await Fi(t);if(Dt(n.issuer,'"response" body "issuer" property',Pi,{body:n}),i!==Vi&&new URL(n.issuer).href!==i.href)throw It('"response" body "issuer" property does not match the expected value',zi,{expected:i.href,body:n,attribute:"issuer"});return n}(Vi,e)).catch(Zn);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[Gn]=!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 Vn("discovered metadata issuer does not match the expected issuer",{code:zi,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,a),s=new Xn(o,t,i,n);let r=qn(s);if(null!=a&&a[Hn]&&(r.fetch=a[Hn]),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(it(Ya,this).domain)),it(Ya,this).clientId,{use_mtls_endpoint_aliases:it(Ya,this).useMtls},t,{[Hn]:it(Qa,this)}),n=i.serverMetadata();return it(to,this).set(e,{serverMetadata:n}),{configuration:i,serverMetadata:n}})(),a=n.then(e=>{let{serverMetadata:t}=e;return{serverMetadata:t}});a.catch(()=>{}),it(io,this).set(e,a);try{const{configuration:e,serverMetadata:t}=await n;at(Za,this,e),at(Ga,this,t),it(Za,this)[Hn]=it(Qa,this)}finally{it(io,this).delete(e)}return{configuration:it(Za,this),serverMetadata:it(Ga,this)}}async function $o(e){var t,i;const{configuration:n}=await Qe(ao,this,Wo).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 a=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&&a.append("login_hint",e.loginHint),e.scope&&a.append("scope",e.scope),zo(a,e.extra);try{const e=await ma(n,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",a);return Ao.fromTokenEndpointResponse(e)}catch(t){throw new mo("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function Ho(e){const{configuration:t}=await Qe(ao,this,Wo).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 ma(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Ao.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 Jo(){return it(Xa,this)||at(Xa,this,(async()=>{if(!it(Ya,this).clientSecret&&!it(Ya,this).clientAssertionSigningKey&&!it(Ya,this).useMtls)throw new xo;if(it(Ya,this).useMtls)return(e,t,i,n)=>{i.set("client_id",t.client_id)};let e=it(Ya,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=>Yi(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){In(e,48,"Invalid PKCS#8 structure"),On(e),In(e,2,"Expected version field");const t=On(e);e.pos+=t,In(e,48,"Expected algorithm identifier"),On(e),e.pos}(t),(e=>{const t=(e=>{In(e,6,"Expected algorithm OID");const t=On(e);return Cn(e,t)})(e);if(Pn(t,[43,101,110]))return"X25519";if(!Pn(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");In(e,6,"Expected curve OID");const i=On(e),n=Cn(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(Pn(n,t))return e;throw new Error("Unsupported named curve")})(t)}),(async(e,t,i,n)=>{var a;let o,s;switch(i){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(i.slice(-3))},s=["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(i.slice(-3),10)||1)},s=["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":o={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[i]},s=["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const e=n.getNamedCurve(t);o="X25519"===e?{name:"X25519"}:{name:"ECDH",namedCurve:e}}catch(e){throw new ln("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 ln('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,it(Ya,this).clientAssertionSigningAlg||"RS256")),e?function(e){return function(e,t){const{key:i,kid:n}=(a=e)instanceof CryptoKey?{key:a}:(null==a?void 0:a.key)instanceof CryptoKey?(void 0!==a.kid&&Dt(a.kid,'"kid"'),{key:a.key,kid:a.kid}):{};var a;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,a,o,s)=>{var r;const c={alg:Mt(i),kid:n},p=function(e,t){const i=Ht()+Wt(t);return{jti:qt(),aud:e.issuer,exp:i+60,iat:i,nbf:i,iss:t.client_id,sub:t.client_id}}(e,a);null==t||null===(r=t[wt])||void 0===r||r.call(t,c,p),o.set("client_id",a.client_id),o.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),o.set("client_assertion",await async function(e,t,i){if(!i.usages.includes("sign"))throw vt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',ht);const n="".concat(At(Tt(JSON.stringify(e))),".").concat(At(Tt(JSON.stringify(t)))),a=At(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Wi(e)};case"RSA-PSS":switch(Mi(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 Pt("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Mi(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new Pt("unsupported CryptoKey algorithm name",{cause:e})}(i),i,Tt(n)));return"".concat(n,".").concat(a)}(c,p,i))}}(e,void 0)}(e):$n(it(Ya,this).clientSecret)})().catch(e=>{throw at(Xa,this,void 0),e})),it(Xa,this)}async function Ko(e){const{configuration:t}=await Qe(ao,this,Wo).call(this),i=qt(),n=await function(e){return async function(e){return Dt(e,"codeVerifier"),At(await crypto.subtle.digest("SHA-256",Tt(e)))}(e)}(i),a=yo(rt(rt({},it(Ya,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(rt(rt({scope:Uo},a),{},{client_id:it(Ya,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await ca(t,o):await ra(t,o),codeVerifier:i}}class Fo extends l{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;this.contexts=new Map,this.ttlMs=e}set(e,t){this.cleanup(),this.contexts.set(e,Object.assign(Object.assign({},t),{createdAt:Date.now()}))}get(e){const t=this.contexts.get(e);if(t){if(!(Date.now()-t.createdAt>this.ttlMs))return t;this.contexts.delete(e)}}remove(e){this.contexts.delete(e)}cleanup(){const e=Date.now();for(const[t,i]of this.contexts)e-i.createdAt>this.ttlMs&&this.contexts.delete(t)}get size(){return this.contexts.size}}class Qo{constructor(e,t){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new Yo}setMFAAuthDetails(e,t,i,n){this.contextManager.set(e,{scope:t,audience:i,mfaRequirements:n})}async getAuthenticators(e){var t,i;const n=this.contextManager.get(e);if(!(null===(t=null==n?void 0:n.mfaRequirements)||void 0===t?void 0:t.challenge)||0===n.mfaRequirements.challenge.length)throw new Vo("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const a=n.mfaRequirements.challenge.map(e=>e.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:e})).filter(e=>!!e.type&&a.includes(e.type))}catch(e){if(e instanceof _o)throw new Vo(null===(i=e.cause)||void 0===i?void 0:i.error,e.message);throw e}}async enroll(e){var t;const i=function(e){const t=Xe[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 ko)throw new Bo(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 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 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 g)this.setMFAAuthDetails(e.mfa_token,n,a,e.mfa_requirements);else if(e instanceof Go)throw new Go(e.error,e.error_description);throw e}}}class es{constructor(e){let t,i;if(this.userCache=(new xe).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(!_())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===_().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=(V||(V=function(){return"undefined"!=typeof navigator&&"function"==typeof(null===(e=navigator.locks)||void 0===e?void 0:e.request)?new K:new F;var e}()),V),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||s,!We(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=We(t)()}var n;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:o,this.cookieStorage=!1===e.legacySameSiteCookie?Pe:Ie,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:Ce;var r;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{[p]:me(t,e,...n)};let o={[p]:me(t,...n)};return Object.keys(e).forEach(i=>{const a=e[i];o[i]=me(t,a,...n)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new we(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||c,this.cacheManager=new ye(i,i.allKeys?void 0:new Ne(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Fe(this.options.clientId):void 0,this.domainUrl=(r=this.options.domain,/^https?:\/\//.test(r)?r:"https://".concat(r)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const l="".concat(this.domainUrl,"/me/"),u=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:l},detailedResponse:!0})}));this.myAccountApi=new Ze(u,l),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===s&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new ze,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||r,i=E(t,!0),n=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(n)}_authorizeUrl(e){return this._url("/authorize?".concat(j(e)))}async _verifyIdToken(e,t,i){const n=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[i,n,a]=t;if(3!==t.length||!i||!n||!a)throw new Error("ID token could not be decoded");const o=JSON.parse(P(n)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],ke.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:n,signature:a},header:JSON.parse(P(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&&!_e(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||!_e(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!_e(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&&_e(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&&_e(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=S(k()),o=S(k()),s=k(),r=await A(s),c=O(r),l=await(null===(n=this.dpop)||void 0===n?void 0:n.calculateThumbprint()),u=((e,t,i,n,a,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:he(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,l),d=this._authorizeUrl(u);return{nonce:o,code_verifier:s,scope:u.scope,audience:u.audience||p,redirect_uri:u.redirect_uri,state:a,url:d}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(e,",top=").concat(t,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new v;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 f(e.popup)))},1e3),s=setTimeout(()=>{clearInterval(o),n(new h(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(l.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 l("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=$e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:i,fragment:a,appState:o}=t,s=n(t,["openUrl","fragment","appState"]),r=(null===(e=s.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,c=this._applySessionTransferToken(s.authorizationParams||{}),p=await this._prepareAuthorizeUrl(c),{url:l}=p,u=n(p,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o,response_type:Ue.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 l("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===Ue.ConnectCode?this._handleConnectAccountRedirectCallback(i,t):this._handleLoginRedirectCallback(i,t)}async _handleLoginRedirectCallback(e,t){const{code:i,state:n,error:a,error_description:o}=e;if(a)throw new u(a,o||a,n,t.appState);if(!t.code_verifier||t.state&&t.state!==n)throw new l("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:Ue.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:n,error:a,error_description:o}=e;if(a)throw new d(a,o||a,t.connection,n,t.appState);if(!i)throw new l("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===n))throw new l("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:i,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier});return Object.assign(Object.assign({},s),{appState:t.appState,response_type:Ue.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(qe))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(qe)}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:he(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=De[t];return i||(i=e().finally(()=>{delete De[t],i=null}),De[t]=i),i})(()=>this._getTokenSilently(n),"".concat(this.options.clientId,"::").concat(n.authorizationParams.audience,"::").concat(n.authorizationParams.scope));return e.detailedResponse?a:null==a?void 0:a.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,i=n(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||p,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||p,clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(i):await this._getTokenFromIFrame(i),{id_token:n,token_type:a,access_token:o,oauthTokenScope:s,expires_in:r}=e;return Object.assign(Object.assign({id_token:n,token_type:a,access_token:o},s?{scope:s}:null),{expires_in:r})})}catch(e){if(this._isInteractiveError(e)&&"popup"===this.options.interactiveErrorHandler)return await this._handleInteractiveErrorWithPopup(i);throw e}}_isInteractiveError(e){return e instanceof g||e instanceof l&&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||p,clientId:this.options.clientId});if(!t)throw new l("interactive_handler_cache_miss","Token not found in cache after interactive authentication");return t}catch(e){throw e}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;const o=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:he(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},a),t),await this.loginWithPopup(o,t),(await this.cacheManager.get(new ge({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||p,clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:i}=t,a=n(t,["federated"]),o=i?"&federated":"";return this._url("/v2/logout?".concat(j(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||p,i=await this.cacheManager.getRefreshTokensByAudience(t,this.options.clientId);await async function(e,t){let{baseUrl:i,timeout:n,auth0Client:a,useFormData:s,refreshTokens:c,audience:u,client_id:d,onRefreshTokenRevoked:m}=e;const h=n||o,f="refresh_token",v="".concat(i,"/oauth/revoke"),g={"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(E(a||r)))};if(t){const i={client_id:d,token_type_hint:f},n=s?j(i):JSON.stringify(i);try{return await ce({type:"revoke",timeout:h,fetchUrl:v,fetchOptions:{method:"POST",body:n,headers:g},useFormData:s,auth:{audience:null!=u?u:p}},t)}catch(e){throw new l("revoke_error",e.message)}}for(const t of c){const i={client_id:d,token_type_hint:f,token:t},n=s?j(i):JSON.stringify(i),a=await pe(v,{method:"POST",body:n,headers:g},h);if(!a.ok){let t,i;try{({error:t,error_description:i}=JSON.parse(await a.text()))}catch(e){}throw new l(t||"revoke_error",i||"HTTP error ".concat(a.status))}await(null==m?void 0:m(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=$e(e),{openUrl:a}=i,o=n(i,["openUrl"]);if(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(ve),await(null===(t=this.dpop)||void 0===t?void 0:t.clear()),this.worker)try{await ce({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{url:n,state:a,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 l("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 m),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(l.fromPayload(e.data.response)):n(e.data.response),clearTimeout(c),window.removeEventListener("message",r,!1),setTimeout(s,2e3)},window.addEventListener("message",r,!1),window.document.body.appendChild(o),o.setAttribute("src",e)})}(n,d,u);if(a!==h.state)throw new l("state_mismatch","Invalid state");const f=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},f),{scope:c,oauthTokenScope:f.scope,audience:p})})}catch(e){throw"login_required"===e.error&&(e instanceof l&&this._isIframeMfaError(e)&&"popup"===this.options.interactiveErrorHandler||this.logout({openUrl:!1})),e}}async _getTokenUsingRefreshToken(e){var t,i;const n=await this.cacheManager.get(new ge({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||p,clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(n&&n.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new b(e.authorizationParams.audience||p,e.authorizationParams.scope)}const a=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,o="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,s=((e,t,i,n)=>{var a;if(e&&i&&n){if(t.audience!==i)return t.scope;const e=n.split(" "),o=(null===(a=t.scope)||void 0===a?void 0:a.split(" "))||[],s=o.every(t=>e.includes(t));return e.length>=o.length&&s?n:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==n?void 0:n.audience,null==n?void 0:n.scope);try{const t=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:n&&n.refresh_token,redirect_uri:a}),o&&{timeout:o}),{scopesToRequest:s});if(t.refresh_token&&(null==n?void 0:n.refresh_token)&&await this.cacheManager.updateEntry(n.refresh_token,t.refresh_token),this.options.useMrrt&&(r=null==n?void 0:n.audience,c=null==n?void 0:n.scope,l=e.authorizationParams.audience,u=e.authorizationParams.scope,!(r===l&&He(u,c)||He(s,t.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const i=((e,t)=>{const i=(null==e?void 0:e.split(" "))||[],n=(null==t?void 0:t.split(" "))||[];return i.filter(e=>-1==n.indexOf(e)).join(",")})(s,t.scope);throw new x(e.authorizationParams.audience||"default",i)}return Object.assign(Object.assign({},t),{scope:e.authorizationParams.scope,oauthTokenScope:t.scope,audience:e.authorizationParams.audience||p})}catch(n){if(n.message){if(n.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),n;if((n.message.includes("Missing Refresh Token")||n.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e)}throw n instanceof g&&this.mfa.setMFAAuthDetails(n.mfa_token,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.audience,n.mfa_requirements),n}var r,c,l,u}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,a=n(e,["id_token","decodedToken"]);this.userCache.set(ve,{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||p,t=this.scope[e],i=await this.cacheManager.getIdToken(new ge({clientId:this.options.clientId,audience:e,scope:t})),n=this.userCache.get(ve);return i&&i.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set(ve,i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:n,cacheMode:a}=e;const o=await this.cacheManager.get(new ge({scope:t,audience:i,clientId:n}),60,this.options.useMrrt,a);if(o&&o.access_token){const{token_type:e,access_token:t,oauthTokenScope:i,expires_in:n}=o,a=await this._getIdTokenFromCache();return a&&Object.assign(Object.assign({id_token:a.id_token,token_type:e||"Bearer",access_token:t},i?{scope:i}:null),{expires_in:n})}}async _requestToken(e,t){var i,n;const{nonceIn:a,organization:o,scopesToRequest:s}=t||{},r=await de(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:s||e.scope}),this.worker),c=await this._verifyIdToken(r.id_token,a,o);if("authorization_code"===e.grant_type){const e=await this._getIdTokenFromCache();(null===(n=null===(i=null==e?void 0:e.decodedToken)||void 0===i?void 0:i.claims)||void 0===n?void 0:n.sub)&&e.decodedToken.claims.sub!==c.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove(ve))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},r),{decodedToken:c,scope:e.scope,audience:e.audience||p}),r.scope?{oauthTokenScope:r.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(o||c.claims.org_id),Object.assign(Object.assign({},r),{decodedToken:c})}async loginWithCustomTokenExchange(e){return this._requestToken(Object.assign(Object.assign({},e),{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:he(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 Be(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null===(t=null==e?void 0:e.scope)||void 0===t?void 0:t.join(" "),audience:null==e?void 0:e.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t,e.dpopNonceId),generateDpopProof:e=>this.generateDpopProof(e)})}async connectAccountWithRedirect(e){const{openUrl:t,appState:i,connection:n,scopes:a,authorization_params:o,redirectUri:s=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!n)throw new Error("connection is required");const r=S(k()),c=k(),p=await A(c),l=O(p),{connect_uri:u,connect_params:d,auth_session:m}=await this.myAccountApi.connectAccount({connection:n,scopes:a,redirect_uri:s,state:r,code_challenge:l,code_challenge_method:"S256",authorization_params:o});this.transactionManager.create({state:r,code_verifier:c,auth_session:m,redirect_uri:s,appState:i,connection:n,response_type:Ue.ConnectCode});const h=new URL(u);h.searchParams.set("ticket",d.ticket),t?await t(h.toString()):window.location.assign(h)}async _requestTokenForMfa(e,t){const{mfaToken:i}=e,a=n(e,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},a),{mfa_token:i}),t)}}async function ts(e){const t=new es(e);return await t.checkSession(),t}},991(e,t){"use strict";t.byteLength=function(e){var t=r(e),i=t[0],n=t[1];return 3*(i+n)/4-n},t.toByteArray=function(e){var t,i,o=r(e),s=o[0],c=o[1],p=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,c)),l=0,u=c>0?s-4:s;for(i=0;i<u;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],p[l++]=t>>16&255,p[l++]=t>>8&255,p[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,p[l++]=255&t),1===c&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,p[l++]=t>>8&255,p[l++]=255&t),p},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],s=16383,r=0,c=n-a;r<c;r+=s)o.push(p(e,r,r+s>c?c:r+s));return 1===a?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),o.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=o[s],n[o.charCodeAt(s)]=s;function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function p(e,t,i){for(var n,a=[],o=t;o<i;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(c(n));return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},318(e,t){t.read=function(e,t,i,n,a){var o,s,r=8*a-n-1,c=(1<<r)-1,p=c>>1,l=-7,u=i?a-1:0,d=i?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-l)-1,m>>=-l,l+=r;l>0;o=256*o+e[t+u],u+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+u],u+=d,l-=8);if(0===o)o=1-p;else{if(o===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),o-=p}return(m?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,i,n,a,o){var s,r,c,p=8*o-a-1,l=(1<<p)-1,u=l>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:o-1,h=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=l?(r=0,s=l):s+u>=1?(r=(t*c-1)*Math.pow(2,a),s+=u):(r=t*Math.pow(2,u-1)*Math.pow(2,a),s=0));a>=8;e[i+m]=255&r,m+=h,r/=256,a-=8);for(s=s<<a|r,p+=a;p>0;e[i+m]=255&s,m+=h,s/=256,p-=8);e[i+m-h]|=128*f}},526(e,t,i){"use strict";var n=i(991),a=i(318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;var s=2147483647;function r(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return p(e,t,i)}function p(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|f(e,t),n=r(i),a=n.write(e,t);return a!==i&&(n=n.slice(0,a)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(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(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return m(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,i);var a=function(e){if(c.isBuffer(e)){var t=0|h(e.length),i=r(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||$(e.length)?r(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),r(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),i=r(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function m(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(e).length;default:if(a)return n?-1:N(e).length;t=(""+t).toLowerCase(),a=!0}}function v(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,i);case"utf8":case"utf-8":return 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 I(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b(e,t,i,n,a){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),$(i=+i)&&(i=a?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(a)return-1;i=e.length-1}else if(i<0){if(!a)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:x(e,t,i,n,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):x(e,[t],i,n,a);throw new TypeError("val must be string, number or Buffer")}function x(e,t,i,n,a){var o,s=1,r=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,r/=2,c/=2,i/=2}function p(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){var l=-1;for(o=i;o<r;o++)if(p(e,o)===p(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(i+c>r&&(i=r-c),o=i;o>=0;o--){for(var u=!0,d=0;d<c;d++)if(p(e,o+d)!==p(t,d)){u=!1;break}if(u)return o}return-1}function y(e,t,i,n){i=Number(i)||0;var a=e.length-i;n?(n=Number(n))>a&&(n=a):n=a;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var r=parseInt(t.substr(2*s,2),16);if($(r))return s;e[i+s]=r}return s}function w(e,t,i,n){return M(N(t,e.length-i),e,i,n)}function _(e,t,i,n){return M(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function k(e,t,i,n){return M(q(t),e,i,n)}function S(e,t,i,n){return M(function(e,t){for(var i,n,a,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,a=i%256,o.push(a),o.push(n);return o}(t,e.length-i),e,i,n)}function 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(W(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),W(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(W(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(W(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=i)return 0;if(n>=a)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(n>>>=0),s=(i>>>=0)-(t>>>=0),r=Math.min(o,s),p=this.slice(n,a),l=e.slice(t,i),u=0;u<r;++u)if(p[u]!==l[u]){o=p[u],s=l[u];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return b(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return b(this,e,t,i,!1)},c.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var a=this.length-t;if((void 0===i||i>a)&&(i=a),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,i);case"utf8":case"utf-8":return w(this,e,t,i);case"ascii":case"latin1":case"binary":return _(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function A(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(127&e[a]);return n}function P(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(e[a]);return n}function O(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var a="",o=t;o<i;++o)a+=H[e[o]];return a}function I(e,t,i){for(var n=e.slice(t,i),a="",o=0;o<n.length-1;o+=2)a+=String.fromCharCode(n[o]+256*n[o+1]);return a}function C(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,i,n,a,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function R(e,t,i,n,a,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(e,t,i,n,o){return t=+t,i>>>=0,o||R(e,0,i,4),a.write(e,t,i,n,23,4),i+4}function z(e,t,i,n,o){return t=+t,i>>>=0,o||R(e,0,i,8),a.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var n=t,a=1,o=this[e+--n];n>0&&(a*=256);)o+=this[e+--n]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||U(this,e,t,i,Math.pow(2,8*i)-1,0);var a=1,o=0;for(this[t]=255&e;++o<i&&(a*=256);)this[t+o]=e/a&255;return t+i},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||U(this,e,t,i,Math.pow(2,8*i)-1,0);var a=i-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+i},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*i-1);U(this,e,t,i,a-1,-a)}var o=0,s=1,r=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===r&&0!==this[t+o-1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*i-1);U(this,e,t,i,a-1,-a)}var o=i-1,s=1,r=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===r&&0!==this[t+o+1]&&(r=1),this[t+o]=(e/s|0)-r&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,i){return L(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return L(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return z(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return z(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var a=n-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),t),a},c.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=c.isBuffer(e)?e:c.from(e,n),r=s.length;if(0===r)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=s[o%r]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(e,t){var i;t=t||1/0;for(var n=e.length,a=null,o=[],s=0;s<n;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!a){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}a=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),a=i;continue}i=65536+(a-55296<<10|i-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,i,n){for(var a=0;a<n&&!(a+i>=t.length||a>=e.length);++a)t[a+i]=e[a];return a}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var H=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var n=16*i,a=0;a<16;++a)t[n+a]=e[i]+e[a];return t}()},942(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",a=0,o=-1,s=0,r=0;r<=e.length;++r){if(r<e.length)i=e.charCodeAt(r);else{if(47===i)break;i=47}if(47===i){if(o===r-1||1===s);else if(o!==r-1&&2===s){if(n.length<2||2!==a||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",a=0):a=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=r,s=0;continue}}else if(2===n.length||1===n.length){n="",a=0,o=r,s=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(o+1,r):n=e.slice(o+1,r),a=r-o-1;o=r,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,a=47===s.charCodeAt(0))}return n=i(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var a=arguments[i];t(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var o=e.length,s=o-a,r=1;r<i.length&&47===i.charCodeAt(r);++r);for(var c=i.length-r,p=s<c?s:c,l=-1,u=0;u<=p;++u){if(u===p){if(c>p){if(47===i.charCodeAt(r+u))return i.slice(r+u+1);if(0===u)return i.slice(r+u)}else s>p&&(47===e.charCodeAt(a+u)?l=u:0===u&&(l=0));break}var d=e.charCodeAt(a+u);if(d!==i.charCodeAt(r+u))break;47===d&&(l=u)}var m="";for(u=a+l+1;u<=o;++u)u!==o&&47!==e.charCodeAt(u)||(0===m.length?m+="..":m+="/..");return m.length>0?m+i.slice(r+l):(r+=l,47===i.charCodeAt(r)&&++r,i.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,a=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(i=e.charCodeAt(s))){if(!o){a=s;break}}else o=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,o=-1,s=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var r=i.length-1,c=-1;for(n=e.length-1;n>=0;--n){var p=e.charCodeAt(n);if(47===p){if(!s){a=n+1;break}}else-1===c&&(s=!1,c=n+1),r>=0&&(p===i.charCodeAt(r)?-1===--r&&(o=n):(r=-1,o=c))}return a===o?o=c:-1===o&&(o=e.length),e.slice(a,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){a=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(a,o)},extname:function(e){t(e);for(var i=-1,n=0,a=-1,o=!0,s=0,r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47!==c)-1===a&&(o=!1,a=r+1),46===c?-1===i?i=r:1!==s&&(s=1):-1!==i&&(s=-1);else if(!o){n=r+1;break}}return-1===i||-1===a||0===s||1===s&&i===a-1&&i===n+1?"":e.slice(i,a)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,a=e.charCodeAt(0),o=47===a;o?(i.root="/",n=1):n=0;for(var s=-1,r=0,c=-1,p=!0,l=e.length-1,u=0;l>=n;--l)if(47!==(a=e.charCodeAt(l)))-1===c&&(p=!1,c=l+1),46===a?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!p){r=l+1;break}return-1===s||-1===c||0===u||1===u&&s===c-1&&s===r+1?-1!==c&&(i.base=i.name=0===r&&o?e.slice(1,c):e.slice(r,c)):(0===r&&o?(i.name=e.slice(1,s),i.base=e.slice(1,c)):(i.name=e.slice(r,s),i.base=e.slice(r,c)),i.ext=e.slice(s,c)),r>0?i.dir=e.slice(0,r-1):o&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},930(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,i,n){var a=n&&n.stringify||t;if("object"==typeof e&&null!==e){var o=i.length+1;if(1===o)return e;var s=new Array(o);s[0]=a(e);for(var r=1;r<o;r++)s[r]=a(i[r]);return s.join(" ")}if("string"!=typeof e)return e;var c=i.length;if(0===c)return e;for(var p="",l=0,u=-1,d=e&&e.length||0,m=0;m<d;){if(37===e.charCodeAt(m)&&m+1<d){switch(u=u>-1?u:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Number(i[l]),u=m+2,m++;break;case 105:if(l>=c)break;if(null==i[l])break;u<m&&(p+=e.slice(u,m)),p+=Math.floor(Number(i[l])),u=m+2,m++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===i[l])break;u<m&&(p+=e.slice(u,m));var h=typeof i[l];if("string"===h){p+="'"+i[l]+"'",u=m+2,m++;break}if("function"===h){p+=i[l].name||"<anonymous>",u=m+2,m++;break}p+=a(i[l]),u=m+2,m++;break;case 115:if(l>=c)break;u<m&&(p+=e.slice(u,m)),p+=String(i[l]),u=m+2,m++;break;case 37:u<m&&(p+=e.slice(u,m)),p+="%",u=m+2,m++,l--}++l}++m}return-1===u?e:(u<d&&(p+=e.slice(u)),p)}},122(){},360(){},826(){},713(e,t,i){"use strict";const n=i(930);e.exports=u;const a=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:f,errWithCause:f};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}const r=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),p={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(e,t){const i={logger:t,parent:e[c]};t[c]=i}function u(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const i=e.browser.write||a;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter(function(e){return"!stdSerializers.err"!==e}):!0===e&&Object.keys(t)}(e.browser.serialize,n);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const f=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(f);"function"==typeof i&&g.forEach(function(e){i[e]=i}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",y=Object.create(i);y.log||(y.log=x),function(e,t,i){const n={};t.forEach(e=>{n[e]=i[e]?i[e]:a[e]||a[p[e]||"log"]||x}),e[r]=n}(y,g,i),l({},y),Object.defineProperty(y,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(y,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,w,y,"error"),d(this,w,y,"fatal"),d(this,w,y,"warn"),d(this,w,y,"info"),d(this,w,y,"debug"),d(this,w,y,"trace"),f.forEach(e=>{d(this,w,y,e)})}});const w={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:v(e)};return y.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},u.levels.values,t),labels:Object.assign({},u.levels.labels,function(e){const t={};return Object.keys(e).forEach(function(i){t[e[i]]=i}),t}(t))}}(e),y.level=b,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=x,y.serializers=n,y._serialize=o,y._stdErrSerialize=c,y.child=function(i,a){if(!i)throw new Error("missing bindings for child Pino");a=a||{},o&&i.serializers&&(a.serializers=i.serializers);const s=a.serializers;if(o&&s){var r=Object.assign({},n,s),c=!0===e.browser.serialize?Object.keys(r):o;delete i.serializers,m([i],c,r,this._stdErrSerialize)}function p(e){this._childLevel=1+(0|e._childLevel),this.bindings=i,r&&(this.serializers=r,this._serialize=c),t&&(this._logEvent=h([].concat(e._logEvent.bindings,i)))}p.prototype=this;const u=new p(this);return l(this,u),u.level=this.level,u},t&&(y._logEvent=h()),y}function d(e,t,i,o){if(Object.defineProperty(e,o,{value:s(e.level,i)>s(o,i)?x:i[r][o],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[o]===x)return;e[o]=function(e,t,i,o){return c=e[r][o],function(){const r=t.timestamp(),p=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===a?a:this;for(var u=0;u<p.length;u++)p[u]=arguments[u];if(t.serialize&&!t.asObject&&m(p,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?c.call(l,function(e,t,i,a,o={}){const{level:s=()=>e.levels.values[t],log:r=e=>e}=o;e._serialize&&m(i,e._serialize,e.serializers,e._stdErrSerialize);const c=i.slice();let p=c[0];const l={};a&&(l.time=a),l.level=s(t,e.levels.values[t]);let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==p&&"object"==typeof p){for(;u--&&"object"==typeof c[0];)Object.assign(l,c.shift());p=c.length?n(c.shift(),c):void 0}else"string"==typeof p&&(p=n(c.shift(),c));return void 0!==p&&(l.msg=p),r(l)}(this,o,p,r,t.formatters)):c.apply(l,p),t.transmit){const n=t.transmit.level||e._level,a=i.levels.values[n],c=i.levels.values[o];if(c<a)return;!function(e,t,i){const n=t.send,a=t.ts,o=t.methodLevel,s=t.methodValue,r=t.val,c=e._logEvent.bindings;m(i,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=i.filter(function(e){return-1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=s,n(o,e._logEvent,r),e._logEvent=h(c)}(this,{ts:r,methodLevel:o,methodValue:c,transmitLevel:n,transmitValue:i.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,i)},p)}};var c}(e,t,i,o);const p=function(e){const t=[];e.bindings&&t.push(e.bindings);let i=e[c];for(;i.parent;)i=i.parent,i.logger.bindings&&t.push(i.logger.bindings);return t.reverse()}(e);0!==p.length&&(e[o]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(p,e[o]))}function m(e,t,i,n){for(const a in e)if(n&&e[a]instanceof Error)e[a]=u.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const n in e[a])t&&t.indexOf(n)>-1&&n in i&&(e[a][n]=i[n](e[a][n]))}function h(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const i in e)void 0===t[i]&&(t[i]=e[i]);return t}function v(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?y:w}function g(){return{}}function b(e){return e}function x(){}function y(){return!1}function w(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=o,u.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:w,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},797(e,t,i){"use strict";var n,a=i(526).hp,o=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,p=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[c(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of c(t))l.call(e,a)||a===i||s(e,a,{get:()=>t[a],enumerable:!(n=r(t,a))||n.enumerable});return e},m=u({"../../node_modules/mime-db/db.json"(e,t){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}}}),h=u({"../../node_modules/mime-db/index.js"(e,t){t.exports=m()}}),f=u({"../../node_modules/mime-types/index.js"(e){var t,n,a,o=h(),s=i(942).extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=r.exec(e),i=t&&o[t[1].toLowerCase()];return i&&i.charset?i.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=p,e.charsets={lookup:p},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var i=-1===t.indexOf("/")?e.lookup(t):t;if(!i)return!1;if(-1===i.indexOf("charset")){var n=e.charset(i);n&&(i+="; charset="+n.toLowerCase())}return i},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var i=r.exec(t),n=i&&e.extensions[i[1].toLowerCase()];return!(!n||!n.length)&&n[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var i=s("x."+t).toLowerCase().substr(1);return i&&e.types[i]||!1},e.types=Object.create(null),t=e.extensions,n=e.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach(function(e){var i=o[e],s=i.extensions;if(s&&s.length){t[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(n[c]){var p=a.indexOf(o[n[c]].source),l=a.indexOf(i.source);if("application/octet-stream"!==n[c]&&(p>l||p===l&&"application/"===n[c].substr(0,12)))continue}n[c]=e}}})}}),v={};((e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})})(v,{AbstractJob:()=>R,AnnotationInclusionMode:()=>re,AnnotationType:()=>ae,AreaType:()=>le,ArtifactType:()=>ve,AssetInclusionMode:()=>se,AssetStatus:()=>ne,AssetUrlType:()=>_e,AutoAnnotateStatus:()=>ie,AutoAnnotateTask:()=>ce,ChangeType:()=>be,ContourType:()=>P,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>ee,DataEndpoint:()=>Ie,Endpoint:()=>F,EndpointState:()=>g,EvaluationStatus:()=>ke,ExportedBy:()=>fe,EyePop:()=>Oe,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>E,InferenceType:()=>j,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>he,ModelFormat:()=>ye,ModelPrecisionType:()=>we,ModelStatus:()=>me,ModelTask:()=>de,ModelTrainingStage:()=>ge,ModelType:()=>ue,MotionModel:()=>A,PopComponentType:()=>T,PredictionVersion:()=>_,Semaphore:()=>H,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:()=>U,WorkerEndpoint:()=>Y,WorkflowPhase:()=>xe,default:()=>Re,getBaseUrl:()=>te,readableStreamFromString:()=>w}),e.exports=(n=v,d(s({},"__esModule",{value:!0}),n));var g=(e=>(e.Idle="Idle",e.Busy="Busy",e.Authenticating="Authenticating",e.FetchConfig="FetchConfig",e.Error="Error",e.NotAvailable="NotAvailable",e))(g||{}),b=class e{constructor(e,t){this.iterator=e,this.controller=t}static iterFromReadableStream(e,t,i){let n=!1;return async function*(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let a=!1;try{for await(const t of async function*(){const t=new y,i=function(e){if(e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}(await e);for await(let e of i)for(const i of t.decode(e))yield i;for(const e of t.flush())yield e}())if(!a&&t){const e=JSON.parse(t),n=e.event;void 0!==n?await i(n):yield e}a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||t.abort()}}()}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],i=[],n=this.iterator(),a=e=>({next:()=>{if(0===e.length){const e=n.next();t.push(e),i.push(e)}return e.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(i),this.controller)]}},x=class e{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let i=this.decodeText(t);if(this.trailingCR&&(i="\r"+i,this.trailingCR=!1),i.endsWith("\r")&&(this.trailingCR=!0,i=i.slice(0,-1)),!i)return[];const n=e.NEWLINE_CHARS.has(i[i.length-1]||"");let a=i.split(e.NEWLINE_REGEXP);return 1!==a.length||n?(this.buffer.length>0&&(a=[this.buffer.join("")+a[0],...a.slice(1)],this.buffer=[]),n||(this.buffer=[a.pop()||""]),a):(this.buffer.push(a[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==a){if(e instanceof a)return e.toString();if(e instanceof Uint8Array)return a.from(e).toString();throw new Error(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new Error(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new Error("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}};x.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","
","\u2028","\u2029"]),x.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var y=x;function w(e){return new ReadableStream({start(t){t.enqueue(a.from(e)),t.close()}})}var _=(e=>(e[e.V1=1]="V1",e[e.V2=2]="V2",e))(_||{}),k=2,S=(e=>(e.STREAM="stream",e.BUFFER="buffer",e))(S||{}),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||{}),O=i(182),I=((e,t,i)=>(i=null!=e?o(p(e)):{},d(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(942)),C=class e{constructor(e,t,i,n,a,o){this._getSession=e,this._client=t,this._requestLogger=o,this._ingressId=i,this._urlPath=`${n}/${this._ingressId}`,this._is_pipeline_direct=a,this._pc=null,this._eTag="",this._location=null,this._queuedCandidates=[],this._offerData=null}async close(){const e=this._pc;if(this._pc=null,e)return e.close()}ingressId(){return this._ingressId}gresUrl(e,t=null){let i,n;if(this._is_pipeline_direct){if(!e.pipelineId)throw new Error("cannot connect with is_pipeline_direct=true but !session.pipelineId");i=I.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=I.default.join(i,t)),n=e.baseUrl?.endsWith("/")?e.baseUrl:e.baseUrl+"/",new URL(i,n)}async onLocalOffer(t){if(!this._pc)throw new Error("onLocalOffer no peer connection");if(!t.sdp)throw new Error("onLocalOffer no sdp");this._offerData=e.parseOffer(t.sdp),await this._pc.setLocalDescription(t);const i=await this._getSession(),n=this.gresUrl(i),a={...i.authenticationHeaders(),"Content-Type":"application/sdp"},o=await this._client.fetch(n,{headers:a,method:"POST",body:t.sdp});return o.status>=300?Promise.reject(`unknown status code for POST '${n}': ${o.status} (${o.statusText})`):(this._eTag=o.headers.get("ETag")??"",this._location=o.headers.get("Location"),await this.onRemoteAnswer(new RTCSessionDescription({type:"answer",sdp:await o.text()})))}async sendLocalCandidates(t){if(!this._offerData)throw new Error("sendLocalCandidates no offerData");const i=await this._getSession(),n=this.gresUrl(i,this._location),a={...i.authenticationHeaders(),"Content-Type":"application/trickle-ice-sdpfrag","If-Match":this._eTag},o=await this._client.fetch(n,{headers:a,method:"PATCH",body:e.generateSdpFragment(this._offerData,t)});return o.status>=300?Promise.reject(`unknown status code for PATCH '${n}': ${o.status} (${o.statusText})`):this}async onLocalCandidate(e){return null!==e.candidate&&(""===this._eTag?this._queuedCandidates.push(e.candidate):await this.sendLocalCandidates([e.candidate])),this}static linkToIceServers(e){return(null!==e?e.split(", ").map(e=>{let t=e.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);return t||(t=e.match(/^(.+?); rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i)),t?{urls:[t[1]],username:U.unquoteCredential(t[3]),credential:U.unquoteCredential(t[4])}:null}):[]).filter(function(e){return null!=e})}static editAnswer(e,t,i,n,a,o){const s=e.split("m=");for(let e=0;e<s.length;e++){const r=s[e];r&&r.startsWith("video")?s[e]=U.setVideoBitrate(U.setCodec(r,t),n):r&&r.startsWith("audio")&&(s[e]=U.setAudioBitrate(U.setCodec(r,i),a,o))}return s.join("m=")}static setCodec(e,t){const i=e.split("\r\n"),n=[],a=[];for(const e of i)e.startsWith("a=rtpmap:")?t&&e.toLowerCase().includes(t)&&(a.push(e.slice(9).split(" ")[0]),n.push(e)):n.push(e);const o=[];for(const e of n)e.startsWith("a=fmtp:")?a.includes(e.slice(7).split(" ")[0])&&o.push(e):e.startsWith("a=rtcp-fb:")?a.includes(e.slice(10).split(" ")[0])&&o.push(e):o.push(e);return o.join("\r\n")}static setVideoBitrate(e,t){let i=e.split("\r\n");for(let e=0;e<i.length;e++){const n=i[e];if(n&&n.startsWith("c=")){i=[...i.slice(0,e+1),"b=TIAS:"+(1024*t).toString(),...i.slice(e+1)];break}}return i.join("\r\n")}static setAudioBitrate(e,t,i){let n="",a=e.split("\r\n");for(let e=0;e<a.length;e++){const t=a[e];if(t&&t.startsWith("a=rtpmap:")&&t.toLowerCase().includes("opus/")){n=t.slice(9).split(" ")[0]||"";break}}if(""===n)return e;for(let e=0;e<a.length;e++){const o=a[e];o&&o.startsWith("a=fmtp:"+n+" ")&&(a[e]=i?"a=fmtp:"+n+" minptime=10;useinbandfec=1;maxaveragebitrate="+(1024*(t??0)).toString():"a=fmtp:"+n+" maxplaybackrate=48000;stereo=1;sprop-stereo=1;maxaveragebitrate"+(1024*(t??0)).toString())}return a.join("\r\n")}static parseOffer(e){let t=[],i="",n="";for(const a of e.split("\r\n"))a.startsWith("m=")?t.push(a.slice(2)):""===i&&a.startsWith("a=ice-ufrag:")?i=a.slice(12):""===n&&a.startsWith("a=ice-pwd:")&&(n=a.slice(10));return{iceUfrag:i,icePwd:n,medias:t}}static generateSdpFragment(e,t){const i=new Map;for(const e of t)if(null!==e.sdpMLineIndex){const t=e.sdpMLineIndex;let n=i.get(t);void 0===n&&(n=[],i.set(t,n)),n.push(e)}let n="a=ice-ufrag:"+e.iceUfrag+"\r\na=ice-pwd:"+e.icePwd+"\r\n",a=0;for(const t of e.medias){let e=i.get(a);if(void 0!==e){n+="m="+t+"\r\na=mid:"+a+"\r\n";for(const t of e)n+="a="+t.candidate+"\r\n"}a++}return n}static unquoteCredential(e){return e?JSON.parse(`"${e}"`):""}},U=class extends C{constructor(e,t,i,n,a){super(t,i,(0,O.v4)().toString(),"liveIngress/whip",n,a),this._stream=e}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):await this.onIceServers(i)}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(!this._stream)throw new Error("onIceServers no stream");const t=this._stream,i=new RTCPeerConnection({iceServers:C.linkToIceServers(e.headers.get("Link"))});return this._pc=i,i.onicecandidate=e=>this.onLocalCandidate(e),new Promise(async(e,n)=>{i.oniceconnectionstatechange=()=>{switch(i.iceConnectionState){case"failed":case"disconnected":n(`peer connection: ${i.iceConnectionState}`);break;case"connected":e(this)}},t.getTracks().forEach(e=>{this._requestLogger.debug("onIceServers our stream has track: %s",e),i.addTrack(e,t)}),t.addEventListener("addtrack",e=>{this._requestLogger.debug("onIceServers got lazy track: ",e.track),i.addTrack(e.track,t)}),await this.onLocalOffer(await i.createOffer())})}async close(){const e=this._stream;return this._stream=null,e&&e.getTracks().forEach(e=>{e.stop()}),super.close()}},R=class{constructor(e,t,i,n,a=k){this._responseStream=null,this._controller=new AbortController,this._getSession=t,this._params=e,this._client=i,this._requestLogger=n,this._version=a}[Symbol.asyncIterator](){if(!this._responseStream)throw Error("logical bug");return b.iterFromReadableStream(this._responseStream,this._controller,async e=>await this.onEvent(e))}async startJob(){return Promise.reject("abstract class")}async onEvent(e){return"error"==e.type?Promise.reject(`Error event for source ${e.source_id}: ${e.message}`):Promise.resolve()}start(e,t){return this._responseStream=new Promise(async(i,n)=>{try{let e=1;for(;;)try{const a=await this.startJob();if(401==a.status){if(t(a.status),!e--){n(`response ${a.status}: ${a.statusText}`);break}this._requestLogger.info("received 401 response, attempt to reauthorize once")}else{if(404!=a.status){if(a.ok){if(a.body){i(a.body);break}{const e=await a.text();if(e){i(w(e));break}n("response body is empty");break}}n(`upload error ${a.status}: ${await a.text()}`);break}if(t(a.status),!e--){n(`response ${a.status}: ${a.statusText}`);break}this._requestLogger.info("received 404 response, attempt to restart pop")}}catch(i){if(!e--){t(500),n(i);break}this._requestLogger.info("unknown, attempt to restart pop (as if we received 404)",i),t(404)}}catch(e){n(e)}finally{e()}}),this}cancel(){this._controller.abort("cancelled")}};R.n=0;var L,z,D=class extends R{get[Symbol.toStringTag](){return"uploadJob"}constructor(e,t,i,n,a,o,s,r){super(a,o,s,r),this._uploadStream=e,this._mimeType=t,this._size=i,this._videoMode=n,this._needsFullDuplex=!s.isFullDuplex()&&t.startsWith("video/")&&"stream"==n}async onEvent(e){if("prepared"==e.type){if(!e.source_id)return Promise.reject("did not get a prepared sourceId to simulate full duplex");const t=await this._getSession();if(!t.baseUrl)return Promise.reject("session.baseUrl must not ne null");let i;const n=new URLSearchParams({mode:"queue",processing:"async",sourceId:e.source_id});if(void 0!==this._videoMode&&n.set("videoMode",this._videoMode),void 0!==this._version&&n.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))n.set(e,t);const a=`${t.baseUrl.replace(/\/+$/,"")}/pipelines/${t.pipelineId}/source?${n.toString()}`;if(this._params.componentParams||this._params.roi){const e=new FormData;if(this._params.componentParams){const t=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});e.append("params",t)}if(this._params.roi){const t=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});e.append("roi",t)}if(this._params.fps){const t=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});e.append("fps",t)}const n=await new Response(this._uploadStream).blob();e.append("file",n);const o={...t.authenticationHeaders(),Accept:"application/jsonl"};i=this._client.fetch(a,{headers:o,method:"POST",body:e,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const e={...t.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(e["Content-Length"]=`${this._size}`),i=this._client.fetch(a,{headers:e,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}i.then(async e=>{204!=e.status&&this._requestLogger.debug(`unexpected status ${e.status} (${await e.text()}) for POST ${a}`)}).catch(e=>{this._requestLogger.debug(`error ${e} for POST ${a}`)})}return Promise.resolve()}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not be null");let t;if(this._needsFullDuplex){const i=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/prepareSource?timeout=10s`,n={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(i,{headers:n,method:"POST",signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i=new URLSearchParams({mode:"queue",processing:"sync"});if(void 0!==this._videoMode&&i.set("videoMode",this._videoMode),void 0!==this._version&&i.set("version",this._version.toString()),this._params.motionDetect)for(const[e,t]of Object.entries(this._params.motionDetect))i.set(e,t);const n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?${i.toString()}`;if(this._params.componentParams||this._params.roi){const i=new FormData;if(this._params.componentParams){const e=new Blob([JSON.stringify(this._params.componentParams)],{type:"application/json"});i.append("params",e)}if(this._params.roi){const e=new Blob([JSON.stringify(this._params.roi)],{type:"application/json"});i.append("roi",e)}if(this._params.fps){const e=new Blob([JSON.stringify(this._params.fps)],{type:"application/json"});i.append("fps",e)}const a=await new Response(this._uploadStream).blob();i.append("file",a);const o={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(n,{headers:o,method:"POST",body:i,signal:this._controller.signal,duplex:"half",eyepop:{responseStreaming:!0}})}else{const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":this._mimeType};this._size&&(i["Content-Length"]=`${this._size}`),t=await this._client.fetch(n,{headers:i,method:"POST",body:this._uploadStream,signal:this._controller.signal,duplex:"half"})}}return t}},N=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._location=e}get[Symbol.toStringTag](){return"loadFromJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"URL",url:this._location,params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(n,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},q=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._assetUuid=e}get[Symbol.toStringTag](){return"loadFromAssetUuidJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t={sourceType:"ASSET_UUID",assetUuid:this._assetUuid,params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(t,this._params.motionDetect);const i={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},n=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync`;return await this._client.fetch(n,{headers:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},M=class extends R{constructor(e,t,i,n,a){super(t,i,n,a),this._mediaStream=e}get[Symbol.toStringTag](){return"loadLiveIngressJob"}async startJob(){const e=await this._getSession();if(!e.baseUrl)return Promise.reject("session.baseUrl must not ne null");const t=new U(this._mediaStream,async()=>e,this._client,!0,this._requestLogger);t.start().then(e=>{this._requestLogger.debug("direct whip for ingressId=%s successful",t.ingressId())}).catch(e=>{this._controller.abort(e)});const i={sourceType:"WHIP",whipIngressId:t.ingressId(),params:this._params.componentParams,roi:this._params.roi,fps:this._params.fps,version:this._version};this._params.motionDetect&&Object.assign(i,this._params.motionDetect);const n={...e.authenticationHeaders(),Accept:"application/jsonl","Content-Type":"application/json"},a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=preempt&processing=sync`;return await this._client.fetch(a,{headers:n,method:"PATCH",body:JSON.stringify(i),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}};if("document"in globalThis&&"implementation"in globalThis.document)L=async(e,t)=>{throw new DOMException("resolving a path to a file is not supported in browser")};else{let 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 W(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=W(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 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=W(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 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()}}},J=i(713),K=i(262);$="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,K.createAuth0Client)(i);await n.isAuthenticated()||await n.loginWithPopup();const a=await n.getTokenSilently();if(!a)return Promise.reject("auth0 login failed");let o;const s=t;return o=void 0!==s.popId?{eyepopUrl:t.eyepopUrl,accessToken:a,validUntil:Date.now()+36e5,popId:s.popId,baseUrl:void 0,pipelineId:void 0,authenticationHeaders:()=>({Authorization:`Bearer ${a}`})}:{eyepopUrl:t.eyepopUrl,accessToken:a,validUntil:Date.now()+36e5},o}:(e,t)=>Promise.reject("auth0 login not supported server-side");var F=class{constructor(e){let t;this._options=e,this._token=null,this._expire_token_time=null,this._client=null,this._statusRetryHandlers=new Map,this._statusRetryHandlers.set(401,this.statusHandler401),this._limit=new H(this._options.jobQueueLength??1024),this._state="Idle",this._message=null,this._stateChangeHandler=null,t=e.logger?e.logger:(0,J.pino)(),this._logger=t.child({module:"eyepop"}),this._requestLogger=this._logger.child({module:"requests"})}setStatusRetryHandlers(e=void 0){this._statusRetryHandlers=new Map(e),this._statusRetryHandlers.set(401,this.statusHandler401)}eyepopUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,""):"https://compute.eyepop.ai"}eyepopWebApiUrl(){return this._options.eyepopUrl?this._options.eyepopUrl.replace(/\/+$/,"").replace(/compute\./,"web-api."):"https://api.eyepop.ai"}pendingJobs(){return(this._options.jobQueueLength??1024)-this._limit.getPermits()}state(){return this._state}lastMessage(){return this._message}onStateChanged(e){return this._stateChangeHandler=e,this}updateState(e=void 0,t=void 0){const i=this._state;null==e&&(e=this._limit.getPermits()==this._options.jobQueueLength?"Idle":"Busy"),this._state=e,this._message=t||null,this._stateChangeHandler&&this._stateChangeHandler(i,this._state)}async connect(){if(this._client)return this._logger.warn("endpoint already connected"),this;if(!this._options.eyepopUrl)return Promise.reject("option eyepopUrl or environment variable EYEPOP_URL is required");if(void 0===this._options.auth)return Promise.reject("cannot connect without defined auth option");if(void 0!==this._options.auth.session)this._token=this._options.auth.session.accessToken,this._expire_token_time=this._options.auth.session.validUntil/1e3;else if(void 0!==this._options.auth.oAuth2);else if(void 0!==this._options.auth.apiKey);else if(void 0===this._options.auth.isLocal)return Promise.reject("option apiKey or environment variable EYEPOP_API_KEY is required");return void 0!==this._options.platformSupport?.createHttpClient?this._client=await this._options.platformSupport.createHttpClient(this._requestLogger):this._client=await z(this._requestLogger),await this.reconnect()}async disconnect(e=!0){if(e&&this._limit)for(let e=0;e<this._options.jobQueueLength;e++)await this._limit.acquire();this._limit=new H(this._options.jobQueueLength??1024),this._client&&(await this._client.close(),this._client=null)}async session(){return await this.currentAccessToken(),null==this._token||null==this._expire_token_time?Promise.reject("endpoint not connected"):{eyepopUrl:this._options.eyepopUrl,accessToken:this._token,validUntil:1e3*this._expire_token_time}}statusHandler401(e){this._token=null,this._expire_token_time=null}async fetchWithRetry(e,t=1){for(;;)try{const i=await e();if(i.ok)return i;{const e=this._statusRetryHandlers.get(i.status);if(null==e)return i;if(e(i.status),!t--)return i;this._requestLogger.info("received %d response, retry",i.status)}}catch(e){const i=this._statusRetryHandlers.get(404);if(null==i)return Promise.reject(`error ${e}`);if(i(e),!t--)return Promise.reject(`error ${e}`);this._requestLogger.info("error %s, retry",e)}}async reconnect(){throw new Error("reconnect() not implemented")}async authorizationHeader(){return void 0!==this._options.auth.isLocal?"Implicit":`Bearer ${await this.currentAccessToken()}`}async currentAccessToken(){const e=Date.now()/1e3;if(!this._token||this._expire_token_time<e){this.updateState("Authenticating");try{if(!this._client)return Promise.reject("endpoint not connected");if(void 0!==this._options.auth.isLocal)this._token="implicit",this._expire_token_time=Number.MAX_VALUE;else{if(void 0!==this._options.auth.session)return Promise.reject("temporary access token expired");if(void 0!==this._options.auth.oAuth2&&this._options.eyepopUrl){const e=await $(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}},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 n={"Content-Type":"application/json",...this._authenticationHeaders(i)};const a=`${i.baseUrl}/pipelines/${i.pipelineId}/pop`;return await t.fetch(a,{method:"PATCH",body:JSON.stringify(e),headers:n})});if(204!=i.status){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}this._pipeline?this._pipeline.pop=e:this._pipeline={id:this._pipelineId||"unknown",state:"idle",startTime:(new Date).toString(),pop:e}}_authenticationHeaders(e){return void 0!==this._options.auth.isLocal?{}:{Authorization:`Bearer ${e.accessToken}`}}popId(){return this.options().popId||null}async process(e,t){return void 0!==e.source?await this.processV2(e):await this.processV1(e,t)}async processV1(e,t){return void 0!==e.file?this.uploadFile(e,{componentParams:t}):void 0!==e.stream?this.uploadStream(e,{componentParams:t}):void 0!==e.path?this.uploadPath(e,{componentParams:t}):void 0!==e.url?this.loadFrom(e,{componentParams:t}):void 0!==e.assetUuid?this.loadFromAssetUuid(e,{componentParams:t}):void 0!==e.mediaStream?this.loadMediaStream(e,{componentParams:t}):Promise.reject("unknown source type")}async processV2(e){return void 0!==e.source.file?this.uploadFile(e.source,e):void 0!==e.source.stream?this.uploadStream(e.source,e):void 0!==e.source.path?this.uploadPath(e.source,e):void 0!==e.source.url?this.loadFrom(e.source,e):void 0!==e.source.assetUuid?this.loadFromAssetUuid(e.source,e):void 0!==e.source.mediaStream?this.loadMediaStream(e.source,e):Promise.reject("unknown source type")}async uploadFile(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.file,e.file.type,e.file.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.stream,e.mimeType,e.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadPath(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{let i;this.updateState(),i=this._options.platformSupport?.resolvePath?await this._options.platformSupport.resolvePath(e,this._logger):await L(e,this._logger);const n=new D(i.stream,i.mimeType,i.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return n.start(()=>{this.jobDone(n)},e=>{this.jobStatus(n,e)})}catch(e){throw this._limit.release(),e}}async loadFrom(e,t){if(e.url.startsWith("file://"))return await this.uploadPath({path:e.url.substring(7)},t);if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new N(e.url,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadFromAssetUuid(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new q(e.assetUuid,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadMediaStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new M(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.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 Z(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||{}),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||{}),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 Oe,Ie=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}&`:"",m=void 0!==r?`&approved_threshold=${r}&`:"";return this.request(`/assets/${e}/annotations?${c}${p}${l}${u}${d}${m}`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}async updateAssetAnnotationApproval(e,t,i,n,a,o,s){const r=t?`dataset_uuid=${t}&`:"",c=i?`&dataset_version=${i}&`:"",p=n?`&auto_annotate=${n}&`:"",l=a?`&source=${encodeURIComponent(a)}&`:"",u=o?`&user_review=${o}&`:"",d=s?`&approved_threshold=${s}&`:"";return this.request(`/assets/${e}/annotations?${r}${c}${p}${l}${u}${d}`,{method:"PATCH"})}async downloadAsset(e,t,i,n="original",a,o,s){const r=i?`&dataset_version=${i}`:"",c=t?`&dataset_uuid=${t}`:"",p=a?`&start_timestamp=${a}`:"",l=o?`&end_timestamp=${o}`:"",u=s?`&url_type=${s}`:"";return this.request(`/assets/${e}/download?transcode_mode=${n}${c}${r}${p}${l}${u}`,{method:"GET"})}async previewAutoAnnotateAsset(e,t,i){return this.request(`/assets/${e}/preview_auto_annotate?auto_annotate=${t}`,{method:"POST",body:i?JSON.stringify(i):null,headers:i?{"Content-Type":"application/json"}:{}})}async addAssetRoi(e,t,i,n,a){const o=n?`&dataset_version=${n}`:"",s=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois?${s}${o}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteAssetRoi(e,t,i,n){const a=n?`&dataset_version=${n}`:"",o=i?`&dataset_uuid=${i}`:"";return this.request(`/assets/${e}/rois/${encodeURIComponent(t)}?${o}${a}`,{method:"DELETE"})}async listModels(){return this.request(`/models?account_uuid=${this._accountId}`,{method:"GET"})}async findModelsForDataset(e){return this.request(`/models?dataset_uuid=${e}`,{method:"GET"})}async createModel(e,t,i,n=!0){return this.request(`/models?dataset_uuid=${e}&dataset_version=${t}&start_training=${n}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getModel(e){return this.request(`/models/${e}`,{method:"GET"})}async getModelTrainingProgress(e){return this.request(`/models/${e}/progress`,{method:"GET"})}async updateModel(e,t){return this.request(`/models/${e}`,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}async deleteModel(e){return this.request(`/models/${e}`,{method:"DELETE"})}async trainModel(e){return this.request(`/models/${e}/train`,{method:"POST"})}async publishModel(e){return this.request(`/models/${e}/publish`,{method:"POST"})}async exportModel(e,t,i){if("qc_ai_hub"!=t)return Promise.reject(`Unexpected export_by ${t}, must be 'qc_ai_hub'`);await this.request(`/models/${e}/exports/qc_ai_hub`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async downloadModelArtifacts(e,t,i,n){const a=n?`artifact_type=${n}&`:"",o=i?`device_name=${encodeURIComponent(i)}&`:"";let s="";if(t)for(const e of t)s+=`model_format=${e}&`;return this.request(`/exports/model_artifacts/?model_uuid=${e}&${a}${o}${s}`,{method:"GET"})}addAccountEventHandler(e){this._account_event_handlers.push(e)}removeAccountEventHandler(e){this._account_event_handlers=this._account_event_handlers.filter(t=>t!==e)}addDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(this._logger.debug("addDatasetEventHandler %s",i),void 0===i){i=[],this._dataset_uuid_to_event_handlers.set(e,i);const t=this._ws;if(t){const i=JSON.stringify({subscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}}i.find(e=>e===t)!==t&&(this._logger.debug("addDatasetEventHandler event_handlers=%s",i),i.push(t))}removeDatasetEventHandler(e,t){let i=this._dataset_uuid_to_event_handlers.get(e);if(void 0!==i&&(i=i.filter(e=>e!==t),0==i.length)){const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}}removeAllDatasetEventHandlers(e){if(void 0===this._dataset_uuid_to_event_handlers.get(e))return;const t=this._ws;if(t){const i=JSON.stringify({unsubscribe:{dataset_uuid:e}});this._requestLogger.debug("ws send: %s",i),t.send(i)}this._dataset_uuid_to_event_handlers.delete(e)}async startWorkflow(e,t,i){return this.request(`/workflows?account_uuid=${e}&template_name=${t}`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}})}async getWorkflow(e,t){return this.request(`/workflows/${e}?account_uuid=${t}`,{method:"GET"})}async listWorkflows(e,t,i,n){const a=[t?.map(e=>`dataset_uuid=${e}`).join("&")||"",i?.map(e=>`model_uuid=${e}`).join("&")||"",n?.map(e=>`phase=${e}`).join("&")||""].filter(e=>e).join("&");return this.request(`/workflows?account_uuid=${e}${a?`&${a}`:""}`,{method:"GET"})}async inferAsset(e,t,i,n,a,o,s){const r=`ai.eyepop://data/assets/${e}?${a?`transcode_mode=${a}&`:""}${i?`dataset_uuid=${i}&`:""}${n?`dataset_version=${n}&`:""}${o?`start_timestamp=${o}&`:""}${s?`end_timestamp=${s}&`:""}`;if(!this.vlmApiUrl||!this._client||!this._limit)throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const e=new 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())})}},Ue=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=Ue("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})(Ue("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=Ue("EYEPOP_SESSION_UUID")),void 0===e.popId&&void 0===e.sessionUuid&&(e.popId=Ue("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=Ue("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=Ue("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Ie(e)}})(Oe||(Oe={}));var Re=Oe},182(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=i(196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var a=i(465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return a.default}});var o=i(178);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=i(11);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var r=i(425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}});var c=i(568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var p=i(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return p.default}});var l=i(286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var u=i(557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}});var d=i(356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var m=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return m.default}});var h=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var f=i(746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return f.default}});var v=i(770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return v.default}})},196(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338(e,t){"use strict";function i(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function a(e,t,i,a,o,s){return n((r=n(n(t,e),n(a,s)))<<(c=o)|r>>>32-c,i);var r,c}function o(e,t,i,n,o,s,r){return a(t&i|~t&n,e,t,o,s,r)}function s(e,t,i,n,o,s,r){return a(t&n|i&~n,e,t,o,s,r)}function r(e,t,i,n,o,s,r){return a(t^i^n,e,t,o,s,r)}function c(e,t,i,n,o,s,r){return a(i^(t|~n),e,t,o,s,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<4*e.length;i++)t[i]=e[i>>2]>>>i%4*8&255;return t}(function(e,t){const a=new Uint32Array(i(t)).fill(0);a.set(e),a[t>>5]|=128<<t%32,a[a.length-1]=t,e=a;let p=1732584193,l=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const i=p,a=l,m=u,h=d;p=o(p,l,u,d,e[t],7,-680876936),d=o(d,p,l,u,e[t+1],12,-389564586),u=o(u,d,p,l,e[t+2],17,606105819),l=o(l,u,d,p,e[t+3],22,-1044525330),p=o(p,l,u,d,e[t+4],7,-176418897),d=o(d,p,l,u,e[t+5],12,1200080426),u=o(u,d,p,l,e[t+6],17,-1473231341),l=o(l,u,d,p,e[t+7],22,-45705983),p=o(p,l,u,d,e[t+8],7,1770035416),d=o(d,p,l,u,e[t+9],12,-1958414417),u=o(u,d,p,l,e[t+10],17,-42063),l=o(l,u,d,p,e[t+11],22,-1990404162),p=o(p,l,u,d,e[t+12],7,1804603682),d=o(d,p,l,u,e[t+13],12,-40341101),u=o(u,d,p,l,e[t+14],17,-1502002290),l=o(l,u,d,p,e[t+15],22,1236535329),p=s(p,l,u,d,e[t+1],5,-165796510),d=s(d,p,l,u,e[t+6],9,-1069501632),u=s(u,d,p,l,e[t+11],14,643717713),l=s(l,u,d,p,e[t],20,-373897302),p=s(p,l,u,d,e[t+5],5,-701558691),d=s(d,p,l,u,e[t+10],9,38016083),u=s(u,d,p,l,e[t+15],14,-660478335),l=s(l,u,d,p,e[t+4],20,-405537848),p=s(p,l,u,d,e[t+9],5,568446438),d=s(d,p,l,u,e[t+14],9,-1019803690),u=s(u,d,p,l,e[t+3],14,-187363961),l=s(l,u,d,p,e[t+8],20,1163531501),p=s(p,l,u,d,e[t+13],5,-1444681467),d=s(d,p,l,u,e[t+2],9,-51403784),u=s(u,d,p,l,e[t+7],14,1735328473),l=s(l,u,d,p,e[t+12],20,-1926607734),p=r(p,l,u,d,e[t+5],4,-378558),d=r(d,p,l,u,e[t+8],11,-2022574463),u=r(u,d,p,l,e[t+11],16,1839030562),l=r(l,u,d,p,e[t+14],23,-35309556),p=r(p,l,u,d,e[t+1],4,-1530992060),d=r(d,p,l,u,e[t+4],11,1272893353),u=r(u,d,p,l,e[t+7],16,-155497632),l=r(l,u,d,p,e[t+10],23,-1094730640),p=r(p,l,u,d,e[t+13],4,681279174),d=r(d,p,l,u,e[t],11,-358537222),u=r(u,d,p,l,e[t+3],16,-722521979),l=r(l,u,d,p,e[t+6],23,76029189),p=r(p,l,u,d,e[t+9],4,-640364487),d=r(d,p,l,u,e[t+12],11,-421815835),u=r(u,d,p,l,e[t+15],16,530742520),l=r(l,u,d,p,e[t+2],23,-995338651),p=c(p,l,u,d,e[t],6,-198630844),d=c(d,p,l,u,e[t+7],10,1126891415),u=c(u,d,p,l,e[t+14],15,-1416354905),l=c(l,u,d,p,e[t+5],21,-57434055),p=c(p,l,u,d,e[t+12],6,1700485571),d=c(d,p,l,u,e[t+3],10,-1894986606),u=c(u,d,p,l,e[t+10],15,-1051523),l=c(l,u,d,p,e[t+1],21,-2054922799),p=c(p,l,u,d,e[t+8],6,1873313359),d=c(d,p,l,u,e[t+15],10,-30611744),u=c(u,d,p,l,e[t+6],15,-1560198380),l=c(l,u,d,p,e[t+13],21,1309151649),p=c(p,l,u,d,e[t+4],6,-145523070),d=c(d,p,l,u,e[t+11],10,-1120210379),u=c(u,d,p,l,e[t+2],15,718787259),l=c(l,u,d,p,e[t+9],21,-343485551),p=n(p,i),l=n(l,a),u=n(u,m),d=n(d,h)}return Uint32Array.of(p,l,u,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(i(8*e.length)).fill(0);for(let i=0;i<e.length;i++)t[i>>2]|=(255&e[i])<<i%4*8;return t}(e),8*e.length))}},779(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:i}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},178(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},697(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291(e,t){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(16);t.default=function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(n)}},829(e,t){"use strict";function i(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,r=Math.ceil(s/16),c=new Array(r);for(let t=0;t<r;++t){const i=new Uint32Array(16);for(let n=0;n<16;++n)i[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=i}c[r-1][14]=8*(e.length-1)/Math.pow(2,32),c[r-1][14]=Math.floor(c[r-1][14]),c[r-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<r;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=a[0],r=a[1],p=a[2],l=a[3],u=a[4];for(let e=0;e<80;++e){const a=Math.floor(e/20),c=n(s,5)+i(a,r,p,l)+u+t[a]+o[e]>>>0;u=l,l=p,p=n(r,30)>>>0,r=s,s=c}a[0]=a[0]+s>>>0,a[1]=a[1]+r>>>0,a[2]=a[2]+p>>>0,a[3]=a[3]+l>>>0,a[4]=a[4]+u>>>0}return Uint8Array.of(a[0]>>24,a[0]>>16,a[0]>>8,a[0],a[1]>>24,a[1]>>16,a[1]>>8,a[1],a[2]>>24,a[2]>>16,a[2]>>8,a[2],a[3]>>24,a[3]>>16,a[3]>>8,a[3],a[4]>>24,a[4]>>16,a[4]>>8,a[4])}},11(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const n=i(746),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const i=o(e,t);if(!(0,n.default)(i))throw TypeError("Stringified UUID is invalid");return i}},425(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const n=i(291),a=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9])),e.msecs=t,e}function r(e,t,i,n,a,o,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),i??=0,n??=16383&(e[8]<<8|e[9]),a??=e.slice(10,16);const r=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[s++]=r>>>24&255,o[s++]=r>>>16&255,o[s++]=r>>>8&255,o[s++]=255&r;const c=t/4294967296*1e4&268435455;o[s++]=c>>>8&255,o[s++]=255&c,o[s++]=c>>>24&15|16,o[s++]=c>>>16&255,o[s++]=n>>>8|128,o[s++]=255&n;for(let e=0;e<6;++e)o[s++]=a[e];return o}t.updateV1State=s,t.default=function(e,t,i){let c;const p=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=r(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,i);else{const e=Date.now(),a=(0,n.default)();s(o,e,a),c=r(a,o.msecs,o.nsecs,p?void 0:o.clockseq,p?void 0:o.node,t,i)}return t??(0,a.unsafeStringify)(c)}},568(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(178),a=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&i[6])<<4|i[7]>>4&15,(15&i[7])<<4|(240&i[4])>>4,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,(15&i[1])<<4|(240&i[2])>>4,96|15&i[2],i[3],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,a.unsafeStringify)(t):t}},591(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=i(338),a=i(988);var o=i(988);function s(e,t,i,o){return(0,a.default)(48,n.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=a.DNS,s.URL=a.URL,t.default=s},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const n=i(178),a=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,n.default)(s):s;if("string"==typeof s&&(s=(0,n.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){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)})());
|