@eyepop.ai/eyepop 3.10.0 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,()=>(()=>{var e={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}},122(){},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)}},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"},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:()=>co,AuthenticationError:()=>w,CacheKey:()=>se,ConnectError:()=>_,GenericError:()=>y,InMemoryCache:()=>ce,LocalStorageCache:()=>re,MfaRequiredError:()=>A,MissingRefreshTokenError:()=>j,MyAccountApiError:()=>$e,PopupCancelledError:()=>E,PopupOpenError:()=>T,PopupTimeoutError:()=>S,ResponseType:()=>we,TimeoutError:()=>k,UseDpopNonceError:()=>I,User:()=>_e,createAuth0Client:()=>po}),"function"==typeof SuppressedError&&SuppressedError;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},o={},s={};Object.defineProperty(s,"__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}();s.default=function(){return r.getInstance()};var c=a&&a.__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())})},p=a&&a.__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])}}},l=a;Object.defineProperty(o,"__esModule",{value:!0});var u=s,d={key:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},clear:function(){return c(l,void 0,void 0,function(){return p(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function m(e){return new Promise(function(t){return setTimeout(t,e)})}function h(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var f=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+h(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),c(this,void 0,void 0,function(){var n,a,o,s,r,c,l;return p(this,function(p){switch(p.label){case 0:n=Date.now()+h(4),a=Date.now()+i,o="browser-tabs-lock-key-"+t,s=void 0===this.storageHandler?d:this.storageHandler,p.label=1;case 1:return Date.now()<a?[4,m(30)]:[3,8];case 2:return p.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+n,[4,m(Math.floor(25*Math.random()))]);case 3:return p.sent(),s.setItemSync(o,JSON.stringify({id:this.id,iat:n,timeoutKey:r,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,m(30)];case 4:return p.sent(),null!==(c=s.getItemSync(o))&&(l=JSON.parse(c)).id===this.id&&l.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(o,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?d:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:p.sent(),p.label=7;case 7:return n=Date.now()+h(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return c(this,void 0,void 0,function(){var i=this;return p(this,function(n){return setTimeout(function(){return c(i,void 0,void 0,function(){var i,n,a;return p(this,function(o){switch(o.label){case 0:return[4,u.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?d:this.storageHandler,null===(n=i.getItemSync(e))?(u.default().unlock(t),[2]):((a=JSON.parse(n)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(a)),u.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(u.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return c(this,void 0,void 0,function(){return p(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 c(this,void 0,void 0,function(){return p(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 c(this,void 0,void 0,function(){var i,n,a,o;return p(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?d:this.storageHandler,n="browser-tabs-lock-key-"+t,null===(a=i.getItemSync(n))?[2]:(o=JSON.parse(a)).id!==this.id?[3,2]:[4,u.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(n),u.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("browser-tabs-lock-key")){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}(),v=o.default=f;const g={timeoutInSeconds:60},b={name:"auth0-spa-js",version:"2.12.0"},x=()=>Date.now();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 n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=i,this.appState=n,Object.setPrototypeOf(this,w.prototype)}}class _ extends y{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,_.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 E extends y{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,E.prototype)}}class T extends y{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,T.prototype)}}class A extends y{constructor(e,t,i){super(e,t),this.mfa_token=i,Object.setPrototypeOf(this,A.prototype)}}class j extends y{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(O(e,["default"]),"', scope: '").concat(O(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,j.prototype)}}class P extends y{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(O(e,["default"]),"', missing scope: '").concat(O(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,P.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 O(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const R=()=>window.crypto,U=()=>{let e="";return Array.from(R().getRandomValues(new Uint8Array(43))).forEach(t=>e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[t%66]),e},C=e=>btoa(e),L=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],z=e=>Object.keys(e).reduce((t,i)=>{const n=L.find(e=>e.key===i);return n&&n.type.includes(typeof e[i])&&(t[i]=e[i]),t},{}),D=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()},N=async e=>{const t=R().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},q=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),$=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))},H=new TextEncoder,K=new TextDecoder;function W(e){return"string"==typeof e?H.encode(e):K.decode(e)}function M(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new B(`${e.name} modulusLength must be at least 2048 bits`)}let J;if(Uint8Array.prototype.toBase64)J=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;J=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 F(e){return J(e)}class V 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 B 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 G(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new V("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new V("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new V("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new V("unsupported CryptoKey algorithm name")}}function Z(e){return e instanceof CryptoKey}function Y(e){return Z(e)&&"public"===e.type}async function X(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 Q=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"],ee=async(e,t)=>{const i=await fetch(e,t);return{ok:i.ok,json:await i.json(),headers:(n=i.headers,[...n].reduce((e,t)=>{let[i,n]=t;return e[i]=n,e},{}))};var n},te=async function(e,t,i,n,a,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return a?(async(e,t,i,n,a,o,s,r)=>((e,t)=>new Promise(function(i,n){const a=new MessageChannel;a.port1.onmessage=function(e){e.data.error?n(new Error(e.data.error)):i(e.data),a.port1.close()},t.postMessage(e,[a.port2])}))({auth:{audience:t,scope:i},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:s,useMrrt:r},o))(e,t,i,n,s,a,o,arguments.length>7?arguments[7]:void 0):(async(e,t,i)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([ee(e,t),new Promise((e,t)=>{a=setTimeout(()=>{n.abort(),t(new Error("Timeout when executing 'fetch'"))},i)})]).finally(()=>{clearTimeout(a)})})(e,n,s)};async function ie(e,t,i,a,o,s,r,c,p,l){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 u,d=null;for(let n=0;n<3;n++)try{u=await te(e,i,a,o,s,r,t,c),d=null;break}catch(e){d=e}if(d)throw d;const m=u.json,{error:h,error_description:f}=m,v=n(m,["error","error_description"]),{headers:g,ok:b}=u;let x;if(p&&(x=g["dpop-nonce"],x&&await p.setNonce(x)),!b){const n=f||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===h)throw new A(h,n,v.mfa_token);if("missing_refresh_token"===h)throw new j(i,a);if("use_dpop_nonce"===h){if(!p||!x||l)throw new I(x);return ie(e,t,i,a,o,s,r,c,p,!0)}throw new y(h||"request_error",n)}return v}async function ne(e,t){var{baseUrl:i,timeout:a,audience:o,scope:s,auth0Client:r,useFormData:c,useMrrt:p,dpop:l}=e,u=n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const d="urn:ietf:params:oauth:grant-type:token-exchange"===u.grant_type,m="refresh_token"===u.grant_type&&p,h=Object.assign(Object.assign(Object.assign(Object.assign({},u),d&&o&&{audience:o}),d&&s&&{scope:s}),m&&{audience:o,scope:s}),f=c?D(h):JSON.stringify(h),v=(g=u.grant_type,Q.includes(g));var g;return await ie("".concat(i,"/oauth/token"),a,o||"default",s,{method:"POST",body:f,headers:{"Content-Type":c?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(z(r||b)))}},t,c,p,v?l:void 0)}const ae=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(e=>Array.from(new Set(e)))(t.filter(Boolean).join(" ").trim().split(/\s+/)).join(" ")},oe=(e,t,i)=>{let n;return i&&(n=e[i]),n||(n=e.default),ae(n,t)};class se{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@@auth0spajs@@",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 se({clientId:i,scope:a,audience:n},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:n}=e;return new se({scope:t,audience:i,clientId:n})}}class re{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("@@auth0spajs@@"))}}class ce{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 pe{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||x}async setIdToken(e,t,i){var n;const a=this.getIdTokenCacheKey(e);await this.cache.set(a,{id_token:t,decodedToken:i}),await(null===(n=this.keyManifest)||void 0===n?void 0:n.add(a))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;var a;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const a=this.matchExistingCacheKey(e,t);if(a&&(o=await this.cache.get(a)),!o&&i&&"cache-only"!==n)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const s=await this.nowProvider(),r=Math.floor(s/1e3);return o.expiresAt-t<r?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await(null===(a=this.keyManifest)||void 0===a?void 0:a.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const i=new se({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 se({clientId:e,scope:i,audience:t});await this.cache.remove(n.toKey())}async clear(e){var t;const i=await this.getCacheKeys();i&&(await i.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new se({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const n=se.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"@@auth0spajs@@"===n.prefix&&n.clientId===e.clientId&&n.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const n of t){const t=se.fromKey(n);if("@@auth0spajs@@"===t.prefix&&t.clientId===e.clientId){const t=await this.cache.get(n);if(null===(i=null==t?void 0:t.body)||void 0===i?void 0:i.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var i;const n=await this.getCacheKeys();if(n)for(const a of n){const n=await this.cache.get(a);if((null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.refresh_token)===e){const e=Object.assign(Object.assign({},n.body),{refresh_token:t});await this.set(e)}}}}class le{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 ue=e=>"number"==typeof e,de=["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 me=a&&a.__assign||function(){return me=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},me.apply(this,arguments)};function he(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function fe(e,t,i){document.cookie=function(e,t,i){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return he("Expires",e.expires?e.expires.toUTCString():"")+he("Domain",e.domain)+he("Path",e.path)+he("Secure",e.secure)+he("SameSite",e.sameSite)}(i)}(e,t,me({path:"/"},i))}var ve=fe,ge=function(e,t){fe(e,"",me(me({},t),{expires:-1}))};const be={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),ve(e,JSON.stringify(t),n)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),ge(e,i)}},xe={get:e=>be.get(e)||be.get("".concat("_legacy_").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),ve("".concat("_legacy_").concat(e),JSON.stringify(t),n),be.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),ge(e,i),be.remove(e,t),be.remove("".concat("_legacy_").concat(e),t)}},ye={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 we;!function(e){e.Code="code",e.ConnectCode="connect_code"}(we||(we={}));class _e{}var ke,Se=function(e){return ke=ke||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtsZXQgdD1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W107cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQodCk7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jIGU9PntsZXQgcixjLHtkYXRhOnt0aW1lb3V0OmksYXV0aDphLGZldGNoVXJsOmYsZmV0Y2hPcHRpb25zOmwsdXNlRm9ybURhdGE6cCx1c2VNcnJ0Omh9LHBvcnRzOlt1XX09ZSxkPXt9O2NvbnN0e2F1ZGllbmNlOmcsc2NvcGU6eX09YXx8e307dHJ5e2NvbnN0IGU9cD8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShsLmJvZHkpOkpTT04ucGFyc2UobC5ib2R5KTtpZighZS5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1lLmdyYW50X3R5cGUpe2lmKGM9KChlLHQpPT5vW24oZSx0KV0pKGcseSksIWMmJmgpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKCIiLmNvbmNhdChlLCJ8IikpKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxnKTtlJiYhdCYmKGM9ZSl9aWYoIWMpdGhyb3cgbmV3IHQoZyx5KTtsLmJvZHk9cD9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpfWxldCBhLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGE9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1hLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaj1pLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaikpKSksZmV0Y2goZixPYmplY3QuYXNzaWduKHt9LGwpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBhJiZhLmFib3J0KCksdm9pZCB1LnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO189ay5oZWFkZXJzLGQ9Wy4uLl9dLnJlZHVjZSgoKGUsdCk9PntsZXRbcixzXT10O3JldHVybiBlW3JdPXMsZX0pLHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKChlPT57bGV0W3Qscl09ZTtyPT09TyYmKG9bdF09Yil9KSkpLCgoZSx0LHIpPT57b1tuKHQscildPWV9KShyLnJlZnJlc2hfdG9rZW4sZyx5KSxkZWxldGUgci5yZWZyZXNoX3Rva2VuKTooKGUsdCk9PntkZWxldGUgb1tuKGUsdCldfSkoZyx5KSx1LnBvc3RNZXNzYWdlKHtvazprLm9rLGpzb246cixoZWFkZXJzOmR9KX1jYXRjaChlKXt1LnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX0saGVhZGVyczpkfSl9dmFyIE8sYixfLGp9KSl9KCk7Cgo="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",n=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(n)}(),new Worker(ke,e)};const Ee={},Te=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;for(let i=0;i<t;i++)if(await e())return!0;return!1};class Ae{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("@@auth0spajs@@","::").concat(e)}}const je={memory:()=>(new ce).enclosedCache,localstorage:()=>new re},Pe=e=>je[e],Ie=e=>{const{openUrl:t,onRedirect:i}=e,a=n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},a),{openUrl:!1===t||t?t:i})},Oe=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},Re={NONCE:"nonce",KEYPAIR:"keypair"};class Ue{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(Re).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(Re.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(Re.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(Re.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Re.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(Re.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Re.KEYPAIR,this.clientId)}}class Ce{constructor(e){this.storage=new Ue(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(!Z(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!Y(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=`${F(W(JSON.stringify(e)))}.${F(W(JSON.stringify(t)))}`;return`${n}.${F(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return M(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return M(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new V}(i),i,W(n)))}`}({alg:G(s),typ:"dpop+jwt",jwk:await X(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:n,htu:t,ath:a?F(await crypto.subtle.digest("SHA-256",W(a))):void 0}),s)}(t,s,n,a,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!Y(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 X(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 V("unsupported JWK kty")}return F(await crypto.subtle.digest({name:"SHA-256"},W(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Le,ze,De;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(Le||(Le={}));class Ne{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]:Le.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?Le.DPoP:Le.Bearer,a=i):(n=i.token_type,a=i.access_token),this.setAuthorizationHeader(e,a,n),n===Le.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,"dpop-nonce");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,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 qe{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 $e({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new $e(t)}}class $e 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,$e.prototype)}}function He(e,t){this.v=e,this.k=t}function Ke(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 We(e){return new He(e,0)}function Me(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Je(e,t){return e.get(Ke(e,t))}function Fe(e,t,i){Me(e,t),t.set(e,i)}function Ve(e,t,i){return e.set(Ke(e,t),i),i}function Be(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 Ge(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 Ze(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(i),!0).forEach(function(t){Be(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ge(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Ye(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 Xe(e){var t,i;function n(t,i){try{var o=e[t](i),s=o.value,r=s instanceof He;Promise.resolve(r?s.v:s).then(function(i){if(r){var c="return"===t?"return":"next";if(!s.k||i.done)return n(c,i);i=e[c](i).value}a(o.done?"return":"normal",i)},function(e){n("throw",e)})}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(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)}let Qe;if(Xe.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xe.prototype.next=function(e){return this._invoke("next",e)},Xe.prototype.throw=function(e){return this._invoke("throw",e)},Xe.prototype.return=function(e){return this._invoke("return",e)},"undefined"==typeof navigator||null===(ze=navigator.userAgent)||void 0===ze||null===(De=ze.startsWith)||void 0===De||!De.call(ze,"Mozilla/5.0 ")){const e="v3.8.3";Qe="".concat("oauth4webapi","/").concat(e)}function et(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}}function tt(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}const it=Symbol(),nt=Symbol(),at=Symbol(),ot=Symbol(),st=Symbol(),rt=Symbol(),ct=new TextEncoder,pt=new TextDecoder;function lt(e){return"string"==typeof e?ct.encode(e):pt.decode(e)}let ut,dt;if(Uint8Array.prototype.toBase64)ut=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;ut=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 mt(e){return"string"==typeof e?dt(e):ut(e)}dt=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw tt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",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 tt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",e)}};class ht extends Error{constructor(e,t){var i;super(e,t),Be(this,"code",void 0),this.name=this.constructor.name,this.code=ci,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class ft extends Error{constructor(e,t){var i;super(e,t),Be(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 vt(e,t,i){return new ft(e,{code:t,cause:i})}function gt(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function bt(e){et(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(Qe&&!t.has("user-agent")&&t.set("user-agent",Qe),t.has("authorization"))throw tt('"options.headers" must not include the "authorization" header name',"ERR_INVALID_ARG_VALUE");return t}function xt(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw tt('"options.signal" must return or be an instance of AbortSignal',"ERR_INVALID_ARG_TYPE");return t}}function yt(e){return e.includes("//")?e.replace("//","/"):e}function wt(e,t,i,n,a){try{if("number"!=typeof e||!Number.isFinite(e))throw tt("".concat(i," must be a number"),"ERR_INVALID_ARG_TYPE",a);if(e>0)return;if(t){if(0!==e)throw tt("".concat(i," must be a non-negative number"),"ERR_INVALID_ARG_VALUE",a);return}throw tt("".concat(i," must be a positive number"),"ERR_INVALID_ARG_VALUE",a)}catch(e){if(n)throw vt(e.message,n,a);throw e}}function _t(e,t,i,n){try{if("string"!=typeof e)throw tt("".concat(t," must be a string"),"ERR_INVALID_ARG_TYPE",n);if(0===e.length)throw tt("".concat(t," must not be empty"),"ERR_INVALID_ARG_VALUE",n)}catch(e){if(i)throw vt(e.message,i,n);throw e}}function kt(e){!function(e,t){if(Jt(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 vt(t,di,e)}(e,t)}(e,"application/json")}function St(){return mt(crypto.getRandomValues(new Uint8Array(32)))}function Et(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 ht("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 ht("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 ht("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 ht("unsupported CryptoKey algorithm name",{cause:e})}}function Tt(e){const t=null==e?void 0:e[nt];return"number"==typeof t&&Number.isFinite(t)?t:0}function At(e){const t=null==e?void 0:e[at];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function jt(){return Math.floor(Date.now()/1e3)}function Pt(e){if("object"!=typeof e||null===e)throw tt('"as" must be an object',"ERR_INVALID_ARG_TYPE");_t(e.issuer,'"as.issuer"')}function It(e){if("object"!=typeof e||null===e)throw tt('"client" must be an object',"ERR_INVALID_ARG_TYPE");_t(e.client_id,'"client.client_id"')}function Ot(e){return _t(e,'"clientSecret"'),(t,i,n,a)=>{n.set("client_id",i.client_id),n.set("client_secret",e)}}const Rt=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Ut(e,t){if(t&&"https:"!==e.protocol)throw vt("only requests to HTTPS are allowed",hi,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw vt("only HTTP and HTTPS requests are allowed",fi,e)}function Ct(e,t,i,n){let a;if("string"!=typeof e||!(a=Rt(e)))throw vt("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?xi:yi,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Ut(a,n),a}function Lt(e,t,i,n){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Ct(e.mtls_endpoint_aliases[t],t,i,n):Ct(e[t],t,i,n)}class zt extends Error{constructor(e,t){var i;super(e,t),Be(this,"cause",void 0),Be(this,"code",void 0),Be(this,"error",void 0),Be(this,"status",void 0),Be(this,"error_description",void 0),Be(this,"response",void 0),this.name=this.constructor.name,this.code=ri,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 Dt extends Error{constructor(e,t){var i,n;super(e,t),Be(this,"cause",void 0),Be(this,"code",void 0),Be(this,"error",void 0),Be(this,"error_description",void 0),this.name=this.constructor.name,this.code=pi,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 Nt extends Error{constructor(e,t){var i;super(e,t),Be(this,"cause",void 0),Be(this,"code",void 0),Be(this,"response",void 0),Be(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 qt=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)"),$t=new RegExp('^[,\\s]*([a-zA-Z0-9!#$%&\\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"[,\\s]*(.*)'),Ht=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)[,\\s]*(.*)"),Kt=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Wt(e,t,i){if(e.status!==t){let t;var n;if(function(e){let t;if(t=function(e){if(!et(e,Response))throw tt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let n=t;for(;n;){var a;let t=n.match(qt);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($t)){if([,i,a,n]=t,a.includes("\\"))try{a=JSON.parse('"'.concat(a,'"'))}catch(e){}p[i.toLowerCase()]=a}else{if(!(t=n.match(Ht))){if(t=n.match(Kt)){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 Nt("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){wi(e),kt(e);try{const t=await e.clone().json();if(gt(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 zt("server responded with an error in the response body",{cause:t,response:e});throw vt('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),mi,e)}}function Mt(e){if(!ei.has(e))throw tt('"options.DPoP" is not a valid DPoPHandle',"ERR_INVALID_ARG_VALUE")}function Jt(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function Ft(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[ot])||fetch)(n.href,{body:a,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:xt(n,null==s?void 0:s.signal)})}async function Vt(e,t,i,n,a,o){var s;const r=Lt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[it]));a.set("grant_type",n);const c=bt(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(Mt(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await Ft(e,t,i,r,a,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const Bt=new WeakMap,Gt=new WeakMap;function Zt(e){if(!e.id_token)return;const t=Bt.get(e);if(!t)throw tt('"ref" was already garbage collected or did not resolve from the proper sources',"ERR_INVALID_ARG_VALUE");return t}async function Yt(e,t,i,n,a,o){if(Pt(e),It(t),!et(i,Response))throw tt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,200,"Token Endpoint"),wi(i);const s=await ji(i);if(_t(s.access_token,'"response" body "access_token" property',ui,{body:s}),_t(s.token_type,'"response" body "token_type" property',ui,{body:s}),s.token_type=s.token_type.toLowerCase(),void 0!==s.expires_in){let e="number"!=typeof s.expires_in?parseFloat(s.expires_in):s.expires_in;wt(e,!0,'"response" body "expires_in" property',ui,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&_t(s.refresh_token,'"response" body "refresh_token" property',ui,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw vt('"response" body "scope" property must be a string',ui,{body:s});if(void 0!==s.id_token){_t(s.id_token,'"response" body "id_token" property',ui,{body:s});const o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(wt(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 ht("JWE decryption is not configured",{cause:e});e=await a(e),({0:r,1:c,length:p}=e.split("."))}if(3!==p)throw vt("Invalid JWT",ui,e);try{o=JSON.parse(lt(mt(r)))}catch(e){throw vt("failed to parse JWT Header body as base64url encoded JSON",li,e)}if(!gt(o))throw vt("JWT Header must be a top level object",ui,e);if(t(o),void 0!==o.crit)throw new ht('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(lt(mt(c)))}catch(e){throw vt("failed to parse JWT Payload body as base64url encoded JSON",li,e)}if(!gt(s))throw vt("JWT Payload must be a top level object",ui,e);const l=jt()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw vt('unexpected JWT "exp" (expiration time) claim type',ui,{claims:s});if(s.exp<=l-n)throw vt('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',vi,{claims:s,now:l,tolerance:n,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw vt('unexpected JWT "iat" (issued at) claim type',ui,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw vt('unexpected JWT "iss" (issuer) claim type',ui,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw vt('unexpected JWT "nbf" (not before) claim type',ui,{claims:s});if(s.nbf>l+n)throw vt('unexpected JWT "nbf" (not before) claim value',vi,{claims:s,now:l,tolerance:n,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw vt('unexpected JWT "aud" (audience) claim type',ui,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Si.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Tt(t),At(t),a).then(ni.bind(void 0,o)).then(Qt.bind(void 0,e)).then(Xt.bind(void 0,t.client_id));if(Array.isArray(r.aud)&&1!==r.aud.length){if(void 0===r.azp)throw vt('ID Token "aud" (audience) claim includes additional untrusted audiences',gi,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw vt('unexpected ID Token "azp" (authorized party) claim value',gi,{expected:t.client_id,claims:r,claim:"azp"})}void 0!==r.auth_time&&wt(r.auth_time,!0,'ID Token "auth_time" (authentication time)',ui,{claims:r}),Gt.set(i,c),Bt.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 ht("unsupported `token_type` value",{cause:{body:s}});return s}function Xt(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw vt('unexpected JWT "aud" (audience) claim value',gi,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw vt('unexpected JWT "aud" (audience) claim value',gi,{expected:e,claims:t.claims,claim:"aud"});return t}function Qt(e,t){var i,n;const a=null!==(i=null===(n=e[Ii])||void 0===n?void 0:n.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==a)throw vt('unexpected JWT "iss" (issuer) claim value',gi,{expected:a,claims:t.claims,claim:"iss"});return t}const ei=new WeakSet,ti=Symbol(),ii={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 ni(e,t){for(const i of e)if(void 0===t.claims[i])throw vt('JWT "'.concat(i,'" (').concat(ii[i],") claim missing"),ui,{claims:t.claims});return t}const ai=Symbol(),oi=Symbol(),si="OAUTH_WWW_AUTHENTICATE_CHALLENGE",ri="OAUTH_RESPONSE_BODY_ERROR",ci="OAUTH_UNSUPPORTED_OPERATION",pi="OAUTH_AUTHORIZATION_RESPONSE_ERROR",li="OAUTH_PARSE_ERROR",ui="OAUTH_INVALID_RESPONSE",di="OAUTH_RESPONSE_IS_NOT_JSON",mi="OAUTH_RESPONSE_IS_NOT_CONFORM",hi="OAUTH_HTTP_REQUEST_FORBIDDEN",fi="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",vi="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",gi="OAUTH_JWT_CLAIM_COMPARISON_FAILED",bi="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",xi="OAUTH_MISSING_SERVER_METADATA",yi="OAUTH_INVALID_SERVER_METADATA";function wi(e){if(e.bodyUsed)throw tt('"response" body has been used already',"ERR_INVALID_ARG_VALUE")}function _i(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new ht("unsupported ".concat(t.name," modulusLength"),{cause:e})}function ki(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 ht("unsupported ECDSA namedCurve",{cause:e})}}function Si(e,t,i,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw vt('unexpected JWT "alg" header parameter',ui,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw vt('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 vt('unexpected JWT "alg" header parameter',ui,{header:n,expected:i,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw vt('unexpected JWT "alg" header parameter',ui,{header:n,expected:e,reason:"client configuration"})}function Ei(e,t){const{0:i,length:n}=e.getAll(t);if(n>1)throw vt('"'.concat(t,'" parameter must be provided only once'),ui);return i}const Ti=Symbol(),Ai=Symbol();async function ji(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kt;try{t=await e.json()}catch(t){throw i(e),vt('failed to parse "response" body as JSON',li,t)}if(!gt(t))throw vt('"response" body must be a top level object',ui,{body:t});return t}const Pi=Symbol(),Ii=Symbol(),Oi=new TextEncoder,Ri=new TextDecoder;function Ui(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 Ci(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 Li(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:Ri.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Ri.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return Ci(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}class zi extends Error{constructor(e,t){var i;super(e,t),Be(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}Be(zi,"code","ERR_JOSE_GENERIC");class Di extends zi{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}}),Be(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),Be(this,"claim",void 0),Be(this,"reason",void 0),Be(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}Be(Di,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class Ni extends zi{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}}),Be(this,"code","ERR_JWT_EXPIRED"),Be(this,"claim",void 0),Be(this,"reason",void 0),Be(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}Be(Ni,"code","ERR_JWT_EXPIRED");class qi extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}Be(qi,"code","ERR_JOSE_ALG_NOT_ALLOWED");class $i extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JOSE_NOT_SUPPORTED")}}Be($i,"code","ERR_JOSE_NOT_SUPPORTED"),Be(class extends zi{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),Be(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),Be(class extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Hi extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JWS_INVALID")}}Be(Hi,"code","ERR_JWS_INVALID");class Ki extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JWT_INVALID")}}Be(Ki,"code","ERR_JWT_INVALID"),Be(class extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Wi extends zi{constructor(){super(...arguments),Be(this,"code","ERR_JWKS_INVALID")}}Be(Wi,"code","ERR_JWKS_INVALID");class Mi extends zi{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),Be(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}Be(Mi,"code","ERR_JWKS_NO_MATCHING_KEY");class Ji extends zi{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),Be(this,Symbol.asyncIterator,void 0),Be(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}Be(Ji,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class Fi extends zi{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),Be(this,"code","ERR_JWKS_TIMEOUT")}}Be(Fi,"code","ERR_JWKS_TIMEOUT");class Vi extends zi{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),Be(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}Be(Vi,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const Bi=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))},Gi=(e,t)=>e.name===t;function Zi(e){return parseInt(e.name.slice(4),10)}function Yi(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 Xi=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 Yi("Key for the ".concat(e," algorithm must be "),t,...n)},Qi=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},en=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),tn=e=>Qi(e)||en(e);function nn(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let i=e;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(e)===i}const an=(e,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},sn=(e,t,i)=>{if(e.data[e.pos++]!==t)throw new Error(i)},rn=(e,t)=>{const i=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,i};async function cn(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 $i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}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 $i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},i=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},i=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},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 $i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}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 $i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new $i('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=Ze({},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 pn=e=>nn(e)&&"string"==typeof e.kty;let ln;const un=async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ln||(ln=new WeakMap);let a=ln.get(e);if(null!=a&&a[i])return a[i];const o=await cn(Ze(Ze({},t),{},{alg:i}));return n&&Object.freeze(e),a?a[i]=o:ln.set(e,{[i]:o}),o},dn=e=>null==e?void 0:e[Symbol.toStringTag],mn=(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 hn,fn;let vn,gn;if("undefined"==typeof navigator||null===(hn=navigator.userAgent)||void 0===hn||null===(fn=hn.startsWith)||void 0===fn||!fn.call(hn,"Mozilla/5.0 ")){const e="v6.8.1";gn="".concat("openid-client","/").concat(e),vn={"user-agent":gn}}const bn=e=>xn.get(e);let xn,yn;function wn(e){return void 0!==e?Ot(e):(yn||(yn=new WeakMap),(e,t,i,n)=>{let a;return(a=yn.get(t))||(function(e,t){if("string"!=typeof e)throw En("".concat(t," must be a string"),Sn);if(0===e.length)throw En("".concat(t," must not be empty"),kn)}(t.client_secret,'"metadata.client_secret"'),a=Ot(t.client_secret),yn.set(t,a)),a(e,t,i,n)})}const _n=ot,kn="ERR_INVALID_ARG_VALUE",Sn="ERR_INVALID_ARG_TYPE";function En(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}class Tn extends Error{constructor(e,t){var i;super(e,t),Be(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 An(e,t,i){return new Tn(e,{cause:t,code:i})}function jn(e){if(e instanceof TypeError||e instanceof Tn||e instanceof zt||e instanceof Dt||e instanceof Nt)throw e;if(e instanceof ft)switch(e.code){case hi:throw An("only requests to HTTPS are allowed",e,e.code);case fi:throw An("only requests to HTTP or HTTPS are allowed",e,e.code);case mi:throw An("unexpected HTTP response status code",e.cause,e.code);case di:throw An("unexpected response content-type",e.cause,e.code);case li:throw An("parsing error occured",e,e.code);case ui:throw An("invalid response encountered",e,e.code);case gi:throw An("unexpected JWT claim value encountered",e,e.code);case bi:throw An("unexpected JSON attribute value encountered",e,e.code);case vi:throw An("JWT timestamp claim value failed validation",e,e.code);default:throw An(e.message,e,e.code)}if(e instanceof ht)throw An("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw An("runtime operation error",e,ci);case"NotSupportedError":throw An("runtime unsupported operation",e,ci);case"TimeoutError":throw An("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw An("operation aborted",e,"OAUTH_ABORT")}throw new Tn("something went wrong",{cause:e})}new TextDecoder;const Pn=Symbol();class In{constructor(e,t,i,n){var a,o,s,r,c;if("string"!=typeof t||!t.length)throw En('"clientId" must be a non-empty string',Sn);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 En('"clientId" and "metadata.client_id" must be the same',kn);const p=Ze(Ze({},structuredClone(i)),{},{client_id:t});let l;p[nt]=null!==(o=null===(s=i)||void 0===s?void 0:s[nt])&&void 0!==o?o:0,p[at]=null!==(r=null===(c=i)||void 0===c?void 0:c[at])&&void 0!==r?r:30,l=n||("string"==typeof p.client_secret&&p.client_secret.length?wn(p.client_secret):(e,t,i,n)=>{i.set("client_id",t.client_id)});let u=Object.freeze(p);const d=structuredClone(e);Pn in e&&(d[Ii]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let m=Object.freeze(d);xn||(xn=new WeakMap),xn.set(this,{__proto__:null,as:m,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(bn(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(bn(this).c)}get timeout(){return bn(this).timeout}set timeout(e){bn(this).timeout=e}get[_n](){return bn(this).fetch}set[_n](e){bn(this).fetch=e}}function On(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 Zt(this)}catch(e){return}}}}}(e))}async function Rn(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 ft("invalid Retry-After header value",{cause:e});s>t&&await Un(s-t,i)}function Un(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 Cn(e,t){Kn(e);const{as:i,c:n,auth:a,fetch:o,tlsOnly:s,timeout:r}=bn(e);return async function(e,t,i,n,a){Pt(e),It(t);const o=Lt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[it])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const r=bt(null==a?void 0:a.headers);return r.set("accept","application/json"),Ft(e,t,i,o,s,r,a)}(i,n,a,t,{[ot]:o,[it]:!s,headers:new Headers(vn),signal:Wn(r)}).then(e=>async function(e,t,i){if(Pt(e),It(t),!et(i,Response))throw tt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,200,"Backchannel Authentication Endpoint"),wi(i);const n=await ji(i);_t(n.auth_req_id,'"response" body "auth_req_id" property',ui,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return wt(a,!0,'"response" body "expires_in" property',ui,{body:n}),n.expires_in=a,void 0!==n.interval&&wt(n.interval,!1,'"response" body "interval" property',ui,{body:n}),n}(i,n,e)).catch(jn)}async function Ln(e,t,i,n){var a,o;Kn(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 Un(s,r)}catch(e){jn(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:d,nonRepudiation:m,timeout:h,decrypt:f}=bn(e),v=(a,o)=>Ln(e,Ze(Ze({},t),{},{interval:a}),i,Ze(Ze({},n),{},{signal:r,flag:o})),g=await async function(e,t,i,n,a){Pt(e),It(t),_t(n,'"authReqId"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("auth_req_id",n),Vt(e,t,i,"urn:openid:params:grant-type:ciba",o,a)}(c,p,l,t.auth_req_id,{[ot]:u,[it]:!d,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(vn),signal:r.aborted?r:Wn(h)}).catch(jn);var b;if(503===g.status&&g.headers.has("retry-after"))return await Rn(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 Yt(e,t,i,void 0,null==n?void 0:n[rt],null==n?void 0:n.recognizedTokenTypes)}(c,p,g,{[rt]:f});let y;try{y=await x}catch(e){if(Mn(e,n))return v(s,Jn);if(e instanceof zt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Rn(e.response,s,r),v(s)}jn(e)}return y.id_token&&await(null==m?void 0:m(g)),On(y),y}function zn(e){bn(e).tlsOnly=!1}async function Dn(e,t,i,n,a){if(Kn(e),!((null==a?void 0:a.flag)===Jn||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw En('"currentUrl" must be an instance of URL, or Request',Sn);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}=bn(e);if((null==a?void 0:a.flag)===Jn)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 tt("form_post responses are expected to use the POST method","ERR_INVALID_ARG_VALUE",{cause:e});if("application/x-www-form-urlencoded"!==Jt(e))throw tt("form_post responses are expected to use the application/x-www-form-urlencoded content-type","ERR_INVALID_ARG_VALUE",{cause:e});return async function(e){if(e.bodyUsed)throw tt("form_post Request instances must contain a readable body","ERR_INVALID_ARG_VALUE",{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 En("unexpected Request HTTP method",kn)}}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(Pt(e),It(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw tt('"parameters" must be an instance of URLSearchParams, or URL',"ERR_INVALID_ARG_TYPE");if(Ei(i,"response"))throw vt('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',ui,{parameters:i});const a=Ei(i,"iss"),o=Ei(i,"state");if(!a&&e.authorization_response_iss_parameter_supported)throw vt('response parameter "iss" (issuer) missing',ui,{parameters:i});if(a&&a!==e.issuer)throw vt('unexpected "iss" (issuer) response parameter value',ui,{expected:e.issuer,parameters:i});switch(n){case void 0:case Ai:if(void 0!==o)throw vt('unexpected "state" response parameter encountered',ui,{expected:void 0,parameters:i});break;case Ti:break;default:if(_t(n,'"expectedState" argument'),o!==n)throw vt(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',ui,{expected:n,parameters:i})}if(Ei(i,"error"))throw new Dt("authorization response from the server is an error",{cause:i});const s=Ei(i,"id_token"),r=Ei(i,"token");if(void 0!==s||void 0!==r)throw new ht("implicit and hybrid flows are not supported");return c=new URLSearchParams(i),ei.add(c),c;var c}(r,c,t.searchParams,null==i?void 0:i.expectedState)}catch(e){jn(e)}}}const b=await async function(e,t,i,n,a,o,s){if(Pt(e),It(t),!ei.has(n))throw tt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',"ERR_INVALID_ARG_VALUE");_t(a,'"redirectUri"');const r=Ei(n,"code");if(!r)throw vt('no authorization code in "callbackParameters"',ui);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",a),c.set("code",r),o!==ti&&(_t(o,'"codeVerifier"'),c.set("code_verifier",o)),Vt(e,t,i,"authorization_code",c,s)}(r,c,p,o,s,(null==i?void 0:i.pkceCodeVerifier)||ti,{additionalParameters:n,[ot]:l,[it]:!u,DPoP:null==a?void 0:a.DPoP,headers:new Headers(vn),signal:Wn(f)}).catch(jn);"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=ai;break;case ai:break;default:_t(n,'"expectedNonce" argument'),r.push("nonce")}switch(null!=a||(a=t.default_max_age),a){case void 0:a=oi;break;case oi:break;default:wt(a,!0,'"maxAge" argument'),r.push("auth_time")}const c=await Yt(e,t,i,r,o,s);_t(c.id_token,'"response" body "id_token" property',ui,{body:c});const p=Zt(c);if(a!==oi){const e=jt()+Tt(t),i=At(t);if(p.auth_time+a<e-i)throw vt("too much time has elapsed since the last End-User authentication",vi,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(n===ai){if(void 0!==p.nonce)throw vt('unexpected ID Token "nonce" claim value',gi,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==n)throw vt('unexpected ID Token "nonce" claim value',gi,{expected:n,claims:p,claim:"nonce"});return c}(e,t,i,n.expectedNonce,n.maxAge,n[rt],n.recognizedTokenTypes):async function(e,t,i,n,a){const o=await Yt(e,t,i,void 0,n,a),s=Zt(o);if(s){if(void 0!==t.default_max_age){wt(t.default_max_age,!0,'"client.default_max_age"');const e=jt()+Tt(t),i=At(t);if(s.auth_time+t.default_max_age<e-i)throw vt("too much time has elapsed since the last End-User authentication",vi,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw vt('unexpected ID Token "nonce" claim value',gi,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==n?void 0:n[rt],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,[rt]:v});let y;try{y=await x}catch(t){if(Mn(t,a))return Dn(e,void 0,i,n,Ze(Ze({},a),{},{flag:Jn,authResponse:o,redirectUri:s}));jn(t)}return y.id_token&&await(null==h?void 0:h(b)),On(y),y}async function Nn(e,t,i,n){Kn(e),i=new URLSearchParams(i);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=bn(e),d=await async function(e,t,i,n,a){Pt(e),It(t),_t(n,'"refreshToken"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("refresh_token",n),Vt(e,t,i,"refresh_token",o,a)}(a,o,s,t,{[ot]:r,[it]:!c,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(vn),signal:Wn(l)}).catch(jn),m=async function(e,t,i,n){return Yt(e,t,i,void 0,null==n?void 0:n[rt],null==n?void 0:n.recognizedTokenTypes)}(a,o,d,{[rt]:u});let h;try{h=await m}catch(a){if(Mn(a,n))return Nn(e,t,i,Ze(Ze({},n),{},{flag:Jn}));jn(a)}return h.id_token&&await(null==p?void 0:p(d)),On(h),h}async function qn(e,t,i){Kn(e),t=new URLSearchParams(t);const{as:n,c:a,auth:o,fetch:s,tlsOnly:r,timeout:c}=bn(e),p=await async function(e,t,i,n,a){return Pt(e),It(t),Vt(e,t,i,"client_credentials",new URLSearchParams(n),a)}(n,a,o,t,{[ot]:s,[it]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(vn),signal:Wn(c)}).catch(jn),l=async function(e,t,i){return Yt(e,t,i,void 0,void 0,void 0)}(n,a,p);let u;try{u=await l}catch(n){if(Mn(n,i))return qn(e,t,Ze(Ze({},i),{},{flag:Jn}));jn(n)}return On(u),u}function $n(e,t){Kn(e);const{as:i,c:n,tlsOnly:a,hybrid:o,jarm:s,implicit:r}=bn(e),c=Lt(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 En("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",kn);s&&t.set("response_mode","jwt")}for(const[e,i]of t.entries())c.searchParams.append(e,i);return c}async function Hn(e,t,i){Kn(e);const n=$n(e,t),{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=bn(e),l=await async function(e,t,i,n,a){var o;Pt(e),It(t);const s=Lt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[it])),r=new URLSearchParams(n);r.set("client_id",t.client_id);const c=bt(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(Mt(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const p=await Ft(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,{[ot]:r,[it]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(vn),signal:Wn(p)}).catch(jn),u=async function(e,t,i){if(Pt(e),It(t),!et(i,Response))throw tt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,201,"Pushed Authorization Request Endpoint"),wi(i);const n=await ji(i);_t(n.request_uri,'"response" body "request_uri" property',ui,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return wt(a,!0,'"response" body "expires_in" property',ui,{body:n}),n.expires_in=a,n}(a,o,l);let d;try{d=await u}catch(n){if(Mn(n,i))return Hn(e,t,Ze(Ze({},i),{},{flag:Jn}));jn(n)}return $n(e,{request_uri:d.request_uri})}function Kn(e){if(!(e instanceof In))throw En('"config" must be an instance of Configuration',Sn);if(Object.getPrototypeOf(e)!==In.prototype)throw En("subclassing Configuration is not allowed",kn)}function Wn(e){return e?AbortSignal.timeout(1e3*e):void 0}function Mn(e,t){return!(null==t||!t.DPoP||t.flag===Jn)&&function(e){if(e instanceof Nt){const{0:t,length:i}=e.cause;return 1===i&&"dpop"===t.scheme&&"use_dpop_nonce"===t.parameters.error}return e instanceof zt&&"use_dpop_nonce"===e.error}(e)}Object.freeze(In.prototype);const Jn=Symbol();async function Fn(e,t,i,n){Kn(e);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=bn(e),u=await async function(e,t,i,n,a,o){return Pt(e),It(t),_t(n,'"grantType"'),Vt(e,t,i,n,new URLSearchParams(a),o)}(a,o,s,t,new URLSearchParams(i),{[ot]:r,[it]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers(vn),signal:Wn(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 Yt(e,t,i,void 0,null==n?void 0:n[rt],null==n?void 0:n.recognizedTokenTypes)}(a,o,e,{[rt]:l,recognizedTokenTypes:i})}).catch(jn);return On(u),u}async function Vn(e,t,i){if(!nn(e))throw new Hi("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Hi('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Hi("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Hi("JWS Payload missing");if("string"!=typeof e.signature)throw new Hi("JWS Signature missing or incorrect type");if(void 0!==e.header&&!nn(e.header))throw new Hi("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=Li(e.protected);n=JSON.parse(Ri.decode(t))}catch(e){throw new Hi("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 Hi("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a=Ze(Ze({},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 $i('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)}(Hi,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 Hi('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=a;if("string"!=typeof r||!r)throw new Hi('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 qi('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new Hi("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Hi("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(pn(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&mn(e,t,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!tn(t))throw new TypeError(Xi(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(dn(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(pn(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&mn(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)&&mn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!tn(t))throw new TypeError(Xi(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(dn(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(dn(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(dn(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(dn(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(dn(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,i)}}(r,t,"verify");const l=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.reduce((e,t)=>{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?Ui(e.protected):new Uint8Array,Ui("."),"string"==typeof e.payload?s?Ui(e.payload):Oi.encode(e.payload):e.payload);let u;try{u=Li(e.signature)}catch(e){throw new Hi("Failed to base64url decode the signature")}const d=await async function(e,t){if(e instanceof Uint8Array)return e;if(Qi(e))return e;if(en(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{ln||(ln=new WeakMap);let i=ln.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("given KeyObject instance cannot be used for this algorithm")}o=e.toCryptoKey(e.asymmetricKeyType,a,n?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError("given KeyObject instance cannot be used for this algorithm");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("given KeyObject instance cannot be used for this algorithm");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("given KeyObject instance cannot be used for this algorithm")}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("given KeyObject instance cannot be used for this algorithm");"ES256"===t&&"P-256"===i&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},a,[n?"verify":"sign"])),"ES384"===t&&"P-384"===i&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},a,[n?"verify":"sign"])),"ES512"===t&&"P-521"===i&&(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("given KeyObject instance cannot be used for this algorithm");return i?i[t]=o:ln.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return un(e,i,t)}if(pn(e))return e.k?Li(e.k):un(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 Yi("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(!Gi(e.algorithm,"HMAC"))throw Bi("HMAC");const i=parseInt(t.slice(2),10);if(Zi(e.algorithm.hash)!==i)throw Bi("SHA-".concat(i),"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Gi(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Bi("RSASSA-PKCS1-v1_5");const i=parseInt(t.slice(2),10);if(Zi(e.algorithm.hash)!==i)throw Bi("SHA-".concat(i),"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Gi(e.algorithm,"RSA-PSS"))throw Bi("RSA-PSS");const i=parseInt(t.slice(2),10);if(Zi(e.algorithm.hash)!==i)throw Bi("SHA-".concat(i),"algorithm.hash");break}case"Ed25519":case"EdDSA":if(!Gi(e.algorithm,"Ed25519"))throw Bi("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Gi(e.algorithm,t))throw Bi(t);break;case"ES256":case"ES384":case"ES512":{if(!Gi(e.algorithm,"ECDSA"))throw Bi("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 Bi(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 $i("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 Vi;let m;if(s)try{m=Li(e.payload)}catch(e){throw new Hi("Failed to base64url decode the payload")}else m="string"==typeof e.payload?Oi.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?Ze(Ze({},h),{},{key:d}):h}const Bn=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function Gn(e){const t=Bn.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 Zn=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function Yn(e){return nn(e)}var Xn,Qn,ea=new WeakMap,ta=new WeakMap;class ia{constructor(e){if(Fe(this,ea,void 0),Fe(this,ta,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Yn)}(e))throw new Wi("JSON Web Key Set malformed");Ve(ea,this,structuredClone(e))}jwks(){return Je(ea,this)}async getKey(e,t){const{alg:i,kid:n}=Ze(Ze({},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 $i('Unsupported "alg" value for a JSON Web Key Set')}}(i),o=Je(ea,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 Mi;if(1!==r){const e=new Ji,t=Je(ta,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new Xe(e.apply(this,arguments))}}(function*(){for(const e of o)try{yield yield We(na(t,e,i))}catch(e){}}),e}return na(Je(ta,this),s,i)}}async function na(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(!nn(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 Li(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new $i('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return cn(Ze(Ze({},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 cn(Ze(Ze({},e),{},{ext:i}));case"EC":case"OKP":return cn(Ze(Ze({},e),{},{alg:t,ext:i}));default:throw new $i('Unsupported "kty" (Key Type) Parameter value')}}(Ze(Ze({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new Wi("JSON Web Key Set members must be public keys");n[i]=e}return n[i]}function aa(e){const t=new ia(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 oa;if("undefined"==typeof navigator||null===(Xn=navigator.userAgent)||void 0===Xn||null===(Qn=Xn.startsWith)||void 0===Qn||!Qn.call(Xn,"Mozilla/5.0 ")){const e="v6.1.3";oa="".concat("jose","/").concat(e)}const sa=Symbol(),ra=Symbol();var ca=new WeakMap,pa=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,ma=new WeakMap,ha=new WeakMap,fa=new WeakMap,va=new WeakMap,ga=new WeakMap;class ba{constructor(e,t){if(Fe(this,ca,void 0),Fe(this,pa,void 0),Fe(this,la,void 0),Fe(this,ua,void 0),Fe(this,da,void 0),Fe(this,ma,void 0),Fe(this,ha,void 0),Fe(this,fa,void 0),Fe(this,va,void 0),Fe(this,ga,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,n;Ve(ca,this,new URL(e.href)),Ve(pa,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),Ve(la,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),Ve(ua,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),Ve(ha,this,new Headers(null==t?void 0:t.headers)),oa&&!Je(ha,this).has("User-Agent")&&Je(ha,this).set("User-Agent",oa),Je(ha,this).has("accept")||(Je(ha,this).set("accept","application/json"),Je(ha,this).append("accept","application/jwk-set+json")),Ve(fa,this,null==t?void 0:t[sa]),void 0!==(null==t?void 0:t[ra])&&(Ve(ga,this,null==t?void 0:t[ra]),i=null==t?void 0:t[ra],n=Je(ua,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=n)&&"jwks"in i&&nn(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,nn)&&(Ve(da,this,Je(ga,this).uat),Ve(va,this,aa(Je(ga,this).jwks))))}pendingFetch(){return!!Je(ma,this)}coolingDown(){return"number"==typeof Je(da,this)&&Date.now()<Je(da,this)+Je(la,this)}fresh(){return"number"==typeof Je(da,this)&&Date.now()<Je(da,this)+Je(ua,this)}jwks(){var e;return null===(e=Je(va,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){Je(va,this)&&this.fresh()||await this.reload();try{return await Je(va,this).call(this,e,t)}catch(i){if(i instanceof Mi&&!1===this.coolingDown())return await this.reload(),Je(va,this).call(this,e,t);throw i}}async reload(){Je(ma,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&Ve(ma,this,void 0),Je(ma,this)||Ve(ma,this,async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fetch;const a=await n(e,{method:"GET",signal:i,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new Fi;throw e});if(200!==a.status)throw new zi("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new zi("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(Je(ca,this).href,Je(ha,this),AbortSignal.timeout(Je(pa,this)),Je(fa,this)).then(e=>{Ve(va,this,aa(e)),Je(ga,this)&&(Je(ga,this).uat=Date.now(),Je(ga,this).jwks=e),Ve(da,this,Date.now()),Ve(ma,this,void 0)}).catch(e=>{throw Ve(ma,this,void 0),e})),await Je(ma,this)}}const xa=["mfaToken"],ya=["mfaToken"];var wa,_a,ka,Sa,Ea,Ta,Aa,ja,Pa=class extends Error{constructor(e,t){super(t),Be(this,"code",void 0),this.name="NotSupportedError",this.code=e}},Ia=class extends Error{constructor(e,t,i){super(t),Be(this,"cause",void 0),Be(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},Oa=class extends Ia{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},Ra=class extends Ia{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},Ua=class extends Ia{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},Ca=class extends Ia{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},La=class extends Ia{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},za=class extends Error{constructor(e){super(e),Be(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Da=class extends Ia{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),Be(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},Na=class extends Ia{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},qa=class extends Ia{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},$a=class extends Ia{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Ha=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),Be(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function Ka(e){return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).reduce((e,t)=>Ze(Ze({},e),{},{[t[0]]:t[1]}),{})}var Wa=class extends Error{constructor(e,t,i){super(t),Be(this,"cause",void 0),Be(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},Ma=class extends Wa{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},Ja=class extends Wa{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},Fa=class extends Wa{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},Va=class extends Wa{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function Ba(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var Ga=(wa=new WeakMap,_a=new WeakMap,ka=new WeakMap,class{constructor(e){var t;Fe(this,wa,void 0),Fe(this,_a,void 0),Fe(this,ka,void 0),Ve(wa,this,"https://".concat(e.domain)),Ve(_a,this,e.clientId),Ve(ka,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(Je(wa,this),"/mfa/authenticators"),{mfaToken:i}=e,n=await Je(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 Ma(e.error_description||"Failed to list authenticators",e)}return(await n.json()).map(Ba)}async enrollAuthenticator(e){const t="".concat(Je(wa,this),"/mfa/associate"),{mfaToken:i}=e,n=Ye(e,xa),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 Je(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 Ja(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};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await o.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:i}=e,n="".concat(Je(wa,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),a=await Je(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 Fa(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(Je(wa,this),"/mfa/challenge"),{mfaToken:i}=e,n=Ye(e,ya),a={mfa_token:i,client_id:Je(_a,this),challenge_type:n.challengeType};n.authenticatorId&&(a.authenticator_id=n.authenticatorId);const o=await Je(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 Va(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())}}),Za=class e{constructor(e,t,i,n,a,o,s){Be(this,"accessToken",void 0),Be(this,"idToken",void 0),Be(this,"refreshToken",void 0),Be(this,"expiresAt",void 0),Be(this,"scope",void 0),Be(this,"claims",void 0),Be(this,"authorizationDetails",void 0),Be(this,"tokenType",void 0),Be(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}},Ya="openid profile email offline_access",Xa=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 Qa(e){if(null==e)throw new La("subject_token is required");if("string"!=typeof e)throw new La("subject_token must be a string");if(0===e.trim().length)throw new La("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new La("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new La("subject_token must not include the 'Bearer ' prefix")}function eo(e,t){if(t)for(const[i,n]of Object.entries(t))if(!Xa.has(i))if(Array.isArray(n)){if(n.length>20)throw new La("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));n.forEach(t=>{e.append(i,t)})}else e.append(i,n)}var to=(Sa=new WeakMap,Ea=new WeakMap,Ta=new WeakMap,Aa=new WeakMap,ja=new WeakSet,class{constructor(e){if(function(e,t){Me(e,t),t.add(e)}(this,ja),Fe(this,Sa,void 0),Fe(this,Ea,void 0),Fe(this,Ta,void 0),Fe(this,Aa,void 0),Be(this,"mfa",void 0),Ve(Ta,this,e),e.useMtls&&!e.customFetch)throw new Pa("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");this.mfa=new Ga({domain:Je(Ta,this).domain,clientId:Je(Ta,this).clientId,customFetch:Je(Ta,this).customFetch})}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Ke(ja,this,io).call(this);if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new Pa("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 Ke(ja,this,so).call(this,e)}catch(e){throw new Na(e)}}async buildLinkUserUrl(e){try{const t=await Ke(ja,this,so).call(this,{authorizationParams:Ze(Ze({},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 qa(e)}}async buildUnlinkUserUrl(e){try{const t=await Ke(ja,this,so).call(this,{authorizationParams:Ze(Ze({},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 $a(e)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ke(ja,this,io).call(this),n=Ka(Ze(Ze({},Je(Ta,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(Ze(Ze({scope:Ya},n),{},{client_id:Je(Ta,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 Cn(t,a),i=await Ln(t,e);return Za.fromTokenEndpointResponse(i)}catch(e){throw new Da(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Ke(ja,this,io).call(this),n=Ka(Ze(Ze({},Je(Ta,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(Ze(Ze({scope:Ya},n),{},{client_id:Je(Ta,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 Cn(t,a);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new Da(e)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:i}=await Ke(ja,this,io).call(this),n=new URLSearchParams({auth_req_id:t});try{const e=await Fn(i,"urn:openid:params:grant-type:ciba",n);return Za.fromTokenEndpointResponse(e)}catch(e){throw new Da(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new Ca("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 Ca("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?"urn:ietf:params:oauth:token-type:access_token":"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof La)throw new Ca(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?Ke(ja,this,no).call(this,e):Ke(ja,this,ao).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await Ke(ja,this,io).call(this);try{const n=await Dn(i,e,{pkceCodeVerifier:t.codeVerifier});return Za.fromTokenEndpointResponse(n)}catch(e){throw new Oa("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await Ke(ja,this,io).call(this);try{const i=await Nn(t,e.refreshToken);return Za.fromTokenEndpointResponse(i)}catch(e){throw new Ua("The access token has expired and there was an error while trying to refresh it.",e)}}async getTokenByClientCredentials(e){const{configuration:t}=await Ke(ja,this,io).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const n=await qn(t,i);return Za.fromTokenEndpointResponse(n)}catch(e){throw new Ra("There was an error while trying to request a token.",e)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:i}=await Ke(ja,this,io).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(Je(Ta,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",Je(Ta,this).clientId),t}return function(e,t){Kn(e);const{as:i,c:n,tlsOnly:a}=bn(e),o=Lt(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 Ke(ja,this,io).call(this);Je(Aa,this)||Ve(Aa,this,function(e,t){const i=new ba(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(t.jwks_uri),{[sa]:Je(Ta,this).customFetch}));const{payload:i}=await async function(e,t,i){var n;const a=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Ri.decode(e)),"string"!=typeof e)throw new Hi("Compact JWS must be a string or Uint8Array");const{0:n,1:a,2:o,length:s}=e.split(".");if(3!==s)throw new Hi("Invalid Compact JWS");const r=await Vn({payload:a,protected:n,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?Ze(Ze({},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 Ki("JWTs MUST NOT use unencoded payload");const o=function(e,t){let i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Ri.decode(t))}catch(e){}if(!nn(i))throw new Ki("JWT Claims Set must be a top-level JSON object");const{typ:a}=n;if(a&&("string"!=typeof e.typ||Zn(e.typ)!==Zn(a)))throw new Di('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 Di('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new Di('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new Di('unexpected "sub" claim value',i,"sub","check_failed");if(c&&!((e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e))))(i.aud,"string"==typeof c?[c]:c))throw new Di('unexpected "aud" claim value',i,"aud","check_failed");let u;switch(typeof n.clockTolerance){case"string":u=Gn(n.clockTolerance);break;case"number":u=n.clockTolerance;break;case"undefined":u=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:d}=n,m=(e=>Math.floor(e.getTime()/1e3))(d||new Date);if((void 0!==i.iat||p)&&"number"!=typeof i.iat)throw new Di('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new Di('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>m+u)throw new Di('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new Di('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=m-u)throw new Ni('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=m-i.iat;if(e-u>("number"==typeof p?p:Gn(p)))throw new Ni('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-u)throw new Di('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}(a.protectedHeader,a.payload,i),s={payload:o,protectedHeader:a.protectedHeader};return"function"==typeof t?Ze(Ze({},s),{},{key:a.key}):s}(e.logoutToken,Je(Aa,this),{issuer:t.issuer,audience:Je(Ta,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in i)&&!("sub"in i))throw new za('either "sid" or "sub" (or both) claims must be present');if("sid"in i&&"string"!=typeof i.sid)throw new za('"sid" claim must be a string');if("sub"in i&&"string"!=typeof i.sub)throw new za('"sub" claim must be a string');if("nonce"in i)throw new za('"nonce" claim is prohibited');if(!("events"in i))throw new za('"events" claim is missing');if("object"!=typeof i.events||null===i.events)throw new za('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in i.events))throw new za('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if("object"!=typeof i.events["http://schemas.openid.net/event/backchannel-logout"])throw new za('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:i.sid,sub:i.sub}}});async function io(){if(Je(Sa,this)&&Je(Ea,this))return{configuration:Je(Sa,this),serverMetadata:Je(Ea,this)};const e=await Ke(ja,this,oo).call(this);return Ve(Sa,this,await async function(e,t,i,n,a){const o=await async function(e,t){var i,n;if(!(e instanceof URL))throw En('"server" must be an instance of URL',Sn);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 tt('"'.concat("issuerIdentifier",'" must be an instance of URL'),"ERR_INVALID_ARG_TYPE");Ut(e,!0!==(null==n?void 0:n[it]));const a=i(new URL(e.href)),o=bt(null==n?void 0:n.headers);return o.set("accept","application/json"),((null==n?void 0:n[ot])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:xt(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=yt("".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=yt("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw tt('"options.algorithm" must be "oidc" (default), or "oauth2"',"ERR_INVALID_ARG_VALUE")}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[ot]:null==t?void 0:t[_n],[it]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(zn),signal:s,headers:new Headers(vn)}):((null==t?void 0:t[_n])||fetch)((Ut(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(zn)),e.href),{headers:Object.fromEntries(new Headers(Ze({accept:"application/json"},vn)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Pi)throw tt('"expectedIssuerIdentifier" must be an instance of URL',"ERR_INVALID_ARG_TYPE");if(!et(t,Response))throw tt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");if(200!==t.status)throw vt('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',mi,t);wi(t);const n=await ji(t);if(_t(n.issuer,'"response" body "issuer" property',ui,{body:n}),i!==Pi&&new URL(n.issuer).href!==i.href)throw vt('"response" body "issuer" property does not match the expected value',bi,{expected:i.href,body:n,attribute:"issuer"});return n}(Pi,e)).catch(jn);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[Pn]=!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 Tn("discovered metadata issuer does not match the expected issuer",{code:bi,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,a),s=new In(o,t,i,n);let r=bn(s);if(null!=a&&a[_n]&&(r.fetch=a[_n]),null!=a&&a.timeout&&(r.timeout=a.timeout),null!=a&&a.execute)for(const e of a.execute)e(s);return s}(new URL("https://".concat(Je(Ta,this).domain)),Je(Ta,this).clientId,{use_mtls_endpoint_aliases:Je(Ta,this).useMtls},e,{[_n]:Je(Ta,this).customFetch})),Ve(Ea,this,Je(Sa,this).serverMetadata()),Je(Sa,this)[_n]=Je(Ta,this).customFetch||fetch,{configuration:Je(Sa,this),serverMetadata:Je(Ea,this)}}async function no(e){var t,i;const{configuration:n}=await Ke(ja,this,io).call(this);if("audience"in e||"resource"in e)throw new La("audience and resource parameters are not supported for Token Vault exchanges");Qa(e.subjectToken);const a=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:"urn:ietf:params:oauth:token-type:access_token",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),eo(a,e.extra);try{const e=await Fn(n,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",a);return Za.fromTokenEndpointResponse(e)}catch(t){throw new La("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function ao(e){const{configuration:t}=await Ke(ja,this,io).call(this);Qa(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),eo(i,e.extra);try{const e=await Fn(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Za.fromTokenEndpointResponse(e)}catch(t){throw new La("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function oo(){if(!Je(Ta,this).clientSecret&&!Je(Ta,this).clientAssertionSigningKey&&!Je(Ta,this).useMtls)throw new Ha;if(Je(Ta,this).useMtls)return(e,t,i,n)=>{i.set("client_id",t.client_id)};let e=Je(Ta,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=>Ci(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){sn(e,48,"Invalid PKCS#8 structure"),on(e),sn(e,2,"Expected version field");const t=on(e);e.pos+=t,sn(e,48,"Expected algorithm identifier"),on(e),e.pos}(t),(e=>{const t=(e=>{sn(e,6,"Expected algorithm OID");const t=on(e);return rn(e,t)})(e);if(an(t,[43,101,110]))return"X25519";if(!an(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");sn(e,6,"Expected curve OID");const i=on(e),n=rn(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(an(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 $i("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 $i('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,Je(Ta,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&&_t(a.kid,'"kid"'),{key:a.key,kid:a.kid}):{};var a;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw tt("".concat(t," must be a CryptoKey"),"ERR_INVALID_ARG_TYPE")}(e,t),"private"!==e.type)throw tt("".concat(t," must be a private CryptoKey"),"ERR_INVALID_ARG_VALUE")}(i,'"clientPrivateKey.key"'),async(e,a,o,s)=>{var r;const c={alg:Et(i),kid:n},p=function(e,t){const i=jt()+Tt(t);return{jti:St(),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[st])||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 tt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',"ERR_INVALID_ARG_VALUE");const n="".concat(mt(lt(JSON.stringify(e))),".").concat(mt(lt(JSON.stringify(t)))),a=mt(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:ki(e)};case"RSA-PSS":switch(_i(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new ht("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return _i(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new ht("unsupported CryptoKey algorithm name",{cause:e})}(i),i,lt(n)));return"".concat(n,".").concat(a)}(c,p,i))}}(e,void 0)}(e):wn(Je(Ta,this).clientSecret)}async function so(e){const{configuration:t}=await Ke(ja,this,io).call(this),i=St(),n=await function(e){return async function(e){return _t(e,"codeVerifier"),mt(await crypto.subtle.digest("SHA-256",lt(e)))}(e)}(i),a=Ka(Ze(Ze({},Je(Ta,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(Ze(Ze({scope:Ya},a),{},{client_id:Je(Ta,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await Hn(t,o):await $n(t,o),codeVerifier:i}}const ro=new v;class co{constructor(e){let t,i;if(this.userCache=(new ce).enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const e=Array.from(this.activeLockKeys);for(const t of e)await ro.releaseLock(t);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},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(!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 ")})(),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||"memory",!Pe(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=Pe(t)()}var n;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?be:xe,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:ye;var o;this.scope=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];if("object"!=typeof e)return{default:ae(t,e,...n)};let o={default:ae(t,...n)};return Object.keys(e).forEach(i=>{const a=e[i];o[i]=ae(t,a,...n)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new le(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||x,this.cacheManager=new pe(i,i.allKeys?void 0:new Ae(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Ce(this.options.clientId):void 0,this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),r=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new qe(r,s),this.authJsClient=new to({domain:this.options.domain,clientId:this.options.clientId}),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Se)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||b)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)}_authorizeUrl(e){return this._url("/authorize?".concat(D(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(q(n)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],de.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:n,signature:a},header:JSON.parse(q(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&&!ue(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||!ue(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ue(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&&ue(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&&ue(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})}async _prepareAuthorizeUrl(e,t,i){var n;const a=C(U()),o=C(U()),s=U(),r=await N(s),c=$(r),p=await(null===(n=this.dpop)||void 0===n?void 0:n.calculateThumbprint()),l=((e,t,i,n,a,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:oe(t,i.scope,i.audience),response_type:"code",response_mode:r||"query",state:n,nonce:a,redirect_uri:s||e.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256",dpop_jkt:c}))(this.options,this.scope,e,a,o,c,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,p),u=this._authorizeUrl(l);return{nonce:o,code_verifier:s,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:a,url:u}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(e,",top=").concat(t,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new T;const n=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=n.url;const a=await(e=>new Promise((t,i)=>{let n;const a=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(a),clearTimeout(o),window.removeEventListener("message",n,!1),i(new E(e.popup)))},1e3),o=setTimeout(()=>{clearInterval(a),i(new S(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(o),clearInterval(a),window.removeEventListener("message",n,!1),!1!==e.closePopup&&e.popup.close(),s.data.response.error)return i(y.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",n)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(n.state!==a.state)throw new y("state_mismatch","Invalid state");const o=(null===(i=e.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:a.code,redirect_uri:n.redirect_uri},{nonceIn:n.nonce,organization:o})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=Ie(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=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:p}=c,l=n(c,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},l),{appState:o,response_type:we.Code}),r&&{organization:r}));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===we.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 w(a,o||a,n,t.appState);if(!t.code_verifier||t.state&&t.state!==n)throw new y("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:we.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:n,error:a,error_description:o}=e;if(a)throw new _(a,o||a,t.connection,n,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===n))throw new y("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:we.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,i;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:oe(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(i=e.authorizationParams)||void 0===i?void 0:i.audience)||this.options.authorizationParams.audience)})}),a=await((e,t)=>{let i=Ee[t];return i||(i=e().finally(()=>{delete Ee[t],i=null}),Ee[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||"default",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;if(!await Te(()=>ro.acquireLock(a,5e3),10))throw new k;this.activeLockKeys.add(a),1===this.activeLockKeys.size&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",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})}finally{await ro.releaseLock(a),this.activeLockKeys.delete(a),0===this.activeLockKeys.size&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;const a=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:oe(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},g),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new se({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",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(D(Object.assign({clientId:e.clientId},a))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const i=Ie(e),{openUrl:a}=i,o=n(i,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const s=this._buildLogoutUrl(o);a?await a(s):!1!==a&&window.location.assign(s)}async _getTokenFromIFrame(e){const t=(i=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(i));var i;if(!await Te(()=>ro.acquireLock(t,5e3),10))throw new k;try{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 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 d=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 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?a(y.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,u,l);if(a!==d.state)throw new y("state_mismatch","Invalid state");const m=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},m),{scope:c,oauthTokenScope:m.scope,audience:p})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}finally{await ro.releaseLock(t)}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new se({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",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 j(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const i=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,n="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,a=((e,t,i,n)=>{var a;if(e&&i&&n){if(t.audience!==i)return t.scope;const e=n.split(" "),o=(null===(a=t.scope)||void 0===a?void 0:a.split(" "))||[],s=o.every(t=>e.includes(t));return e.length>=o.length&&s?n:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==t?void 0:t.audience,null==t?void 0:t.scope);try{const p=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:i}),n&&{timeout:n}),{scopesToRequest:a});if(p.refresh_token&&(null==t?void 0:t.refresh_token)&&await this.cacheManager.updateEntry(t.refresh_token,p.refresh_token),this.options.useMrrt&&(o=null==t?void 0:t.audience,s=null==t?void 0:t.scope,r=e.authorizationParams.audience,c=e.authorizationParams.scope,!(o===r&&Oe(c,s)||Oe(a,p.scope)))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const t=((e,t)=>{const i=(null==e?void 0:e.split(" "))||[],n=(null==t?void 0:t.split(" "))||[];return i.filter(e=>-1==n.indexOf(e)).join(",")})(a,p.scope);throw new P(e.authorizationParams.audience||"default",t)}return Object.assign(Object.assign({},p),{scope:e.authorizationParams.scope,oauthTokenScope:p.scope,audience:e.authorizationParams.audience||"default"})}catch(t){if((t.message.indexOf("Missing Refresh Token")>-1||t.message&&t.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}var o,s,r,c}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,a=n(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{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||"default",t=this.scope[e],i=await this.cacheManager.getIdToken(new se({clientId:this.options.clientId,audience:e,scope:t})),n=this.userCache.get("@@user@@");return i&&i.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:n,cacheMode:a}=e;const o=await this.cacheManager.get(new se({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 ne(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("@@user@@"))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},r),{decodedToken:c,scope:e.scope,audience:e.audience||"default"}),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 exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:oe(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization})}_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 Ne(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=C(U()),c=U(),p=await N(c),l=$(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:we.ConnectCode});const h=new URL(u);h.searchParams.set("ticket",d.ticket),t?await t(h.toString()):window.location.assign(h)}}async function po(e){const t=new co(e);return await t.checkSession(),t}},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}},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)}},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)}},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)}},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}},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))}},356(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(11),a=i(425),o=i(568);t.default=function(e,t,i){e??={},i??=0;let s=(0,a.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[i+e]=s[e];return t}return(0,n.unsafeStringify)(s)}},360(){},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)}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},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(H(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(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(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||K(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)||H(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 I(this,t,i);case"utf8":case"utf-8":return T(this,t,i);case"ascii":return j(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b(e,t,i,n,a){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),K(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(K(r))return s;e[i+s]=r}return s}function w(e,t,i,n){return $(N(t,e.length-i),e,i,n)}function _(e,t,i,n){return $(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 $(q(t),e,i,n)}function S(e,t,i,n){return $(function(e,t){for(var i,n,a,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,a=i%256,o.push(a),o.push(n);return o}(t,e.length-i),e,i,n)}function E(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function T(e,t,i){i=Math.min(e.length,i);for(var n=[],a=t;a<i;){var o,s,r,c,p=e[a],l=null,u=p>239?4:p>223?3:p>191?2:1;if(a+u<=i)switch(u){case 1:p<128&&(l=p);break;case 2:128==(192&(o=e[a+1]))&&(c=(31&p)<<6|63&o)>127&&(l=c);break;case 3:o=e[a+1],s=e[a+2],128==(192&o)&&128==(192&s)&&(c=(15&p)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[a+1],s=e[a+2],r=e[a+3],128==(192&o)&&128==(192&s)&&128==(192&r)&&(c=(15&p)<<18|(63&o)<<12|(63&s)<<6|63&r)>65535&&c<1114112&&(l=c)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=A));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(H(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),H(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(H(o,Uint8Array))a+o.length>n.length?c.from(o).copy(n,a):Uint8Array.prototype.set.call(n,o,a);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a)}a+=o.length}return n},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,i,n,a){if(H(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 A=4096;function j(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(127&e[a]);return n}function P(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(e[a]);return n}function I(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var a="",o=t;o<i;++o)a+=W[e[o]];return a}function O(e,t,i){for(var n=e.slice(t,i),a="",o=0;o<n.length-1;o+=2)a+=String.fromCharCode(n[o]+256*n[o+1]);return a}function R(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 C(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||C(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||C(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||R(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||R(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||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(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||R(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||R(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||R(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||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(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||R(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||R(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||R(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||R(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(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 $(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 H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}var W=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}()},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},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},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},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},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)}},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}},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:()=>C,AnnotationType:()=>se,ArtifactType:()=>fe,AssetStatus:()=>oe,AssetUrlType:()=>we,AutoAnnotateStatus:()=>ae,AutoAnnotateTask:()=>ce,ChangeType:()=>ge,ContourType:()=>P,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>te,DataEndpoint:()=>Te,Endpoint:()=>V,EndpointState:()=>g,EvaluationStatus:()=>_e,ExportedBy:()=>he,EyePop:()=>ne,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>T,InferenceType:()=>A,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadLiveIngressJob:()=>$,LoadMediaStreamJob:()=>H,ModelExportStatus:()=>me,ModelFormat:()=>xe,ModelPrecisionType:()=>ye,ModelStatus:()=>de,ModelTask:()=>ue,ModelTrainingStage:()=>ve,ModelType:()=>le,MotionModel:()=>j,PopComponentType:()=>E,PredictionVersion:()=>_,Semaphore:()=>M,SessionStatus:()=>G,Stream:()=>b,TranscodeMode:()=>pe,TransientPopId:()=>B,UploadJob:()=>D,UserReview:()=>re,VideoMode:()=>S,VlmAbilityStatus:()=>ke,WebrtcBase:()=>R,WebrtcWhep:()=>Ae,WebrtcWhip:()=>U,WorkerEndpoint:()=>Q,WorkflowPhase:()=>be,default:()=>Pe,getBaseUrl:()=>ie,readableStreamFromString:()=>w}),e.exports=(n=v,d(s({},"__esModule",{value:!0}),n));var g=(e=>(e.Idle="Idle",e.Busy="Busy",e.Authenticating="Authenticating",e.FetchConfig="FetchConfig",e.Error="Error",e.NotAvailable="NotAvailable",e))(g||{}),b=class e{constructor(e,t){this.iterator=e,this.controller=t}static iterFromReadableStream(e,t,i){let n=!1;return async function*(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let a=!1;try{for await(const t of async function*(){const t=new y,i=function(e){if(e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}(await e);for await(let e of i)for(const i of t.decode(e))yield i;for(const e of t.flush())yield e}())if(!a&&t){const e=JSON.parse(t),n=e.event;void 0!==n?await i(n):yield e}a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||t.abort()}}()}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],i=[],n=this.iterator(),a=e=>({next:()=>{if(0===e.length){const e=n.next();t.push(e),i.push(e)}return e.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(i),this.controller)]}},x=class e{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let i=this.decodeText(t);if(this.trailingCR&&(i="\r"+i,this.trailingCR=!1),i.endsWith("\r")&&(this.trailingCR=!0,i=i.slice(0,-1)),!i)return[];const n=e.NEWLINE_CHARS.has(i[i.length-1]||"");let a=i.split(e.NEWLINE_REGEXP);return 1!==a.length||n?(this.buffer.length>0&&(a=[this.buffer.join("")+a[0],...a.slice(1)],this.buffer=[]),n||(this.buffer=[a.pop()||""]),a):(this.buffer.push(a[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==a){if(e instanceof a)return e.toString();if(e instanceof Uint8Array)return a.from(e).toString();throw new Error(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new Error(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new Error("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}};x.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","
","\u2028","\u2029"]),x.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var y=x;function w(e){return new ReadableStream({start(t){t.enqueue(a.from(e)),t.close()}})}var _=(e=>(e[e.V1=1]="V1",e[e.V2=2]="V2",e))(_||{}),k=2,S=(e=>(e.STREAM="stream",e.BUFFER="buffer",e))(S||{}),E=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(E||{}),T=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(T||{}),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||{}),j=(e=>(e.RANDOM_WALK="random_walk",e.CONSTANT_VELOCITY="constant_velocity",e.CONSTANT_ACCELERATION="constant_acceleration",e))(j||{}),P=(e=>(e.ALL_PIXELS="all_pixels",e.POLYGON="polygon",e.CONVEX_HULL="convex_hull",e.HOUGH_CIRCLES="hough_circles",e.CIRCLE="circle",e.TRIANGLE="triangle",e.RECTANGLE="rectangle",e))(P||{}),I=i(182),O=((e,t,i)=>(i=null!=e?o(p(e)):{},d(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(942)),R=class e{constructor(e,t,i,n,a,o){this._getSession=e,this._client=t,this._requestLogger=o,this._ingressId=i,this._urlPath=`${n}/${this._ingressId}`,this._is_pipeline_direct=a,this._pc=null,this._eTag="",this._location=null,this._queuedCandidates=[],this._offerData=null}async close(){const e=this._pc;if(this._pc=null,e)return e.close()}ingressId(){return this._ingressId}gresUrl(e,t=null){let i,n;if(this._is_pipeline_direct){if(!e.pipelineId)throw new Error("cannot connect with is_pipeline_direct=true but !session.pipelineId");i=O.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=O.default.join(i,t)),n=e.baseUrl?.endsWith("/")?e.baseUrl:e.baseUrl+"/",new URL(i,n)}async onLocalOffer(t){if(!this._pc)throw new Error("onLocalOffer no peer connection");if(!t.sdp)throw new Error("onLocalOffer no sdp");this._offerData=e.parseOffer(t.sdp),await this._pc.setLocalDescription(t);const i=await this._getSession(),n=this.gresUrl(i),a={...i.authenticationHeaders(),"Content-Type":"application/sdp"},o=await this._client.fetch(n,{headers:a,method:"POST",body:t.sdp});return o.status>=300?Promise.reject(`unknown status code for POST '${n}': ${o.status} (${o.statusText})`):(this._eTag=o.headers.get("ETag")??"",this._location=o.headers.get("Location"),await this.onRemoteAnswer(new RTCSessionDescription({type:"answer",sdp:await o.text()})))}async sendLocalCandidates(t){if(!this._offerData)throw new Error("sendLocalCandidates no offerData");const i=await this._getSession(),n=this.gresUrl(i,this._location),a={...i.authenticationHeaders(),"Content-Type":"application/trickle-ice-sdpfrag","If-Match":this._eTag},o=await this._client.fetch(n,{headers:a,method:"PATCH",body:e.generateSdpFragment(this._offerData,t)});return o.status>=300?Promise.reject(`unknown status code for PATCH '${n}': ${o.status} (${o.statusText})`):this}async onLocalCandidate(e){return null!==e.candidate&&(""===this._eTag?this._queuedCandidates.push(e.candidate):await this.sendLocalCandidates([e.candidate])),this}static linkToIceServers(e){return(null!==e?e.split(", ").map(e=>{let t=e.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);return t||(t=e.match(/^(.+?); rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i)),t?{urls:[t[1]],username: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 R{constructor(e,t,i,n,a){super(t,i,(0,I.v4)().toString(),"liveIngress/whip",n,a),this._stream=e}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):await this.onIceServers(i)}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(!this._stream)throw new Error("onIceServers no stream");const t=this._stream,i=new RTCPeerConnection({iceServers:R.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()}},C=class{constructor(e,t,i,n,a=k){this._responseStream=null,this._controller=new AbortController,this._getSession=t,this._params=e??null,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(200!=a.status){n(`upload error ${a.status}: ${await a.text()}`);break}if(a.body){i(a.body);break}{const e=await a.text();if(e){i(w(e));break}n("response body is empty");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")}};C.n=0;var L,z,D=class extends C{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=this._videoMode?`&videoMode=${this._videoMode}`:"",a=this._version?`&version=${this._version}`:"",o=`${t.baseUrl.replace(/\/+$/,"")}/pipelines/${t.pipelineId}/source?mode=queue&processing=async&sourceId=${e.source_id}${n}${a}`;if(this._params){const e=JSON.stringify(this._params),n=new Blob([e],{type:"application/json"}),a=new FormData,s=await new Response(this._uploadStream).blob();a.append("params",n),a.append("file",s);const r={...t.authenticationHeaders(),Accept:"application/jsonl"};i=this._client.fetch(o,{headers:r,method:"POST",body:a,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(o,{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 ${o}`)}).catch(e=>{this._requestLogger.debug(`error ${e} for POST ${o}`)})}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=this._videoMode?`&videoMode=${this._videoMode}`:"",n=this._version?`&version=${this._version}`:"",a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync${i}${n}`;if(this._params){const i=JSON.stringify(this._params),n=new Blob([i],{type:"application/json"}),o=new FormData,s=await new Response(this._uploadStream).blob();o.append("params",n),o.append("file",s);const r={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(a,{headers:r,method:"POST",body:o,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 C{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,version:this._version},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 C{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,version:this._version},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}})}},$=class extends C{constructor(e,t,i,n,a){super(t,i,n,a),this._ingressId=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={sourceType:"LIVE_INGRESS",liveIngressId:this._ingressId,params:this._params,version:this._version},i={...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:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},H=class extends C{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,version:this._version},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 Ie=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*Oe(e){for await(const t of e)yield t}L=async(e,t)=>{const n=f(),a=i(122),o=Oe((await a.open(e.path,"r")).createReadStream());return{stream:Ie(o),mimeType:e.mimeType?e.mimeType:n.lookup(e.path)||"image/*"}}}function K(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 Re{constructor(e){this._logger=e}async fetch(e,t){const i=K(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 Re(e)}else{class Ue{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=K(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 Ue(t,e)}}var W,M=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),F=i(262);W="document"in globalThis&&"implementation"in globalThis.document?async(e,t)=>{if(null==t.eyepopUrl)return Promise.reject("options.eyepopUrl cannot be null");const i={clientId:e.clientId,domain:e.domain,authorizationParams:{scope:e.scope,audience:e.audience}},n=await(0,F.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 V=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 M(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 M(this._options.jobQueueLength??1024),this._client&&(await this._client.close(),this._client=null)}async session(){return await this.currentAccessToken(),null==this._token||null==this._expire_token_time?Promise.reject("endpoint not connected"):{eyepopUrl:this._options.eyepopUrl,accessToken:this._token,validUntil:1e3*this._expire_token_time}}statusHandler401(e){this._token=null,this._expire_token_time=null}async fetchWithRetry(e,t=1){for(;;)try{const i=await e();if(i.ok)return i;{const e=this._statusRetryHandlers.get(i.status);if(null==e)return i;if(e(i.status),!t--)return i;this._requestLogger.info("received %d response, retry",i.status)}}catch(e){const i=this._statusRetryHandlers.get(404);if(null==i)return Promise.reject(`error ${e}`);if(i(e),!t--)return Promise.reject(`error ${e}`);this._requestLogger.info("error %s, retry",e)}}async reconnect(){throw new Error("reconnect() not implemented")}async authorizationHeader(){return void 0!==this._options.auth.isLocal?"Implicit":`Bearer ${await this.currentAccessToken()}`}async currentAccessToken(){const e=Date.now()/1e3;if(!this._token||this._expire_token_time<e){this.updateState("Authenticating");try{if(!this._client)return Promise.reject("endpoint not connected");if(void 0!==this._options.auth.isLocal)this._token="implicit",this._expire_token_time=Number.MAX_VALUE;else{if(void 0!==this._options.auth.session)return Promise.reject("temporary access token expired");if(void 0!==this._options.auth.oAuth2&&this._options.eyepopUrl){const e=await W(this._options.auth.oAuth2,this._options);this._token=e.accessToken,this._expire_token_time=e.validUntil/1e3}else{if(void 0===this._options.auth.apiKey||!this._options.eyepopUrl)return Promise.reject("no valid auth option");{const t={Authorization:`Bearer ${this._options.auth.apiKey}`},i=`${this.eyepopUrl()}/v1/auth/authenticate`,n=await this._client.fetch(i,{method:"POST",headers:t});if(200!=n.status){const e=await n.text();return Promise.reject(`Unexpected status ${n.status}: ${e}`)}const a=await n.json();this._token=a.access_token,this._expire_token_time=e+a.expires_in-60}}}}finally{this.updateState()}}return this._logger.debug("using access token, valid for at least %d seconds",this._expire_token_time-e),this._token}},B=(e=>(e.Transient="transient",e))(B||{}),G=(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))(G||{}),Z=e=>new Promise(t=>setTimeout(t,e)),Y=class e extends V{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.file?this.uploadFile(e,t):void 0!==e.stream?this.uploadStream(e,t):void 0!==e.path?this.uploadPath(e,t):void 0!==e.url?this.loadFrom(e,t):void 0!==e.assetUuid?this.loadFromAssetUuid(e,t):void 0!==e.mediaStream?this.loadMediaStream(e,t):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 H(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.startComputeSession(),this._pipelineId=await this.startTransientPipeline()):await this.startWebApiSessionWithPopId(),this.updateState(),Promise.resolve(this)}async startWebApiSessionWithPopId(){if(!this._client)throw new Error("endpoint not initialized");const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=false`,t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let i=await this._client.fetch(e,{headers:t});if(401==i.status){this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",e),this.statusHandler401(i.status);const t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig"),i=await this._client.fetch(e,{headers:t})}if(200!=i.status){const e=await i.text();throw 429==i.status?this.updateState("NotAvailable",e):this.updateState("Error",e),new Error(`Unexpected status ${i.status}: ${e}`)}let n=await i.json();if(!n.base_url&&this.options().autoStart){const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=true`;this._requestLogger.debug("pop was not running, trying to autostart with: %s",e);const t={Authorization:await this.authorizationHeader()};if(i=await this._client.fetch(e,{headers:t}),200!=i.status){this.updateState("Error");const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}n=await i.json()}const a=new URL(n.base_url,this.eyepopUrl());if(this._baseUrl=a.toString(),this._baseUrl){if(this._baseUrl=this._baseUrl.replace(/\/+$/,""),this._pipelineId=n.pipeline_id,this._popName=n.name,!this._pipelineId||!this._baseUrl)throw new Error("Pop not started");const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await this._client.fetch(e,{method:"GET",headers:t});if(i.status>200){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}if(this._pipeline=await i.json(),this.options().stopJobs){const e={sourceType:"NONE"},t={Authorization:await this.authorizationHeader(),"Content-Type":"application/json"},i=`${this._baseUrl}/pipelines/${this._pipeline.id}/source?mode=preempt&processing=sync`;let n=await this._client.fetch(i,{method:"PATCH",headers:t,body:JSON.stringify(e)});if(n.status>=300){const e=await n.text();throw new Error(`Unexpected status ${n.status}: ${e}`)}}}}async startComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t=null;const i=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",i);const n={Authorization:await this.authorizationHeader()};let a,o=await this._client.fetch(i,{headers:n});if(404==o.status)a=[];else{if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}a=await o.json()}if(a.length>0){this._logger.debug(`User has ${a.length} sessions, inspecting for active session`);for(let i of a)if(!e.SESSION_DEAD.has(i.session_status)){t=i,this._logger.debug(`Use active session ${i.session_uuid} with pipeline ${i.pipeline_uuid}`);break}}if(!t){if(this._requestLogger.debug("creating a new session at: %s",i),o=await this._client.fetch(i,{headers:n,method:"POST"}),200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} creating a compute session: ${e}`)}if(a=await o.json(),0==a.length)throw new Error("Unexpected, no compute session after attempt to create one");t=a[0]||null}if(!t)throw new Error("unexpected undefined session");let s=!1;const r=Date.now()+e.WAIT_FOR_IS_READY;for(;!s;){const i=`${t.session_endpoint}/health`;if(o=await this._client.fetch(i,{headers:n}),o.status<300)s=!0;else{if(Date.now()>r)throw new Error(`Created session ${t.session_uuid} did not become healthy after ${e.WAIT_FOR_IS_READY/1e3} seconds`);this._logger.debug(`session ${t.session_uuid} health check status ${o.status}, wait and poll for update`),await 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 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}};Y.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),Y.WAIT_FOR_IS_READY=6e4,Y.CHECK_FOR_IS_READY_INTERVAL=250;var X,Q=Y;function ee(){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 te=(e=>(e.dataset="dataset",e.vlm="vlm",e))(te||{});function ie(e,t){switch(t){case"dataset":return e.datasetApiUrl??"";case"vlm":return e.vlmApiUrl??"";default:throw new Error(`unsupported type ${t}`)}}var ne,ae=(e=>(e.error="error",e.requested="requested",e.in_progress="in_progress",e.completed="completed",e))(ae||{}),oe=(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))(oe||{}),se=(e=>(e.ground_truth="ground_truth",e.prediction="prediction",e.auto="auto",e))(se||{}),re=(e=>(e.approved="approved",e.rejected="rejected",e.unknown="unknown",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.epdet_b1="epdet_b1",e.imported="imported",e.vlm_ability="vlm_ability",e))(le||{}),ue=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e.keypoint_detection="keypoint_detection",e))(ue||{}),de=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(de||{}),me=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(me||{}),he=(e=>(e.eyepop="eyepop",e.qc_ai_hub="qc_ai_hub",e))(he||{}),fe=(e=>(e.eyepop_bundle="eyepop_bundle",e.weights_file="weights_file",e))(fe||{}),ve=(e=>(e.waiting="waiting",e.scheduling="scheduling",e.preparing="preparing",e.training="training",e.exporting="exporting",e))(ve||{}),ge=(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))(ge||{}),be=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(be||{}),xe=(e=>(e.TensorFlowLite="TensorFlowLite",e.TensorFlowGraphDef="TensorFlowGraphDef",e.ONNX="ONNX",e.TorchScript="TorchScript",e.TorchScriptCpu="TorchScriptCpu",e.TorchScriptCuda="TorchScriptCuda",e.PyTorch="PyTorch",e.ModelLess="ModelLess",e))(xe||{}),ye=(e=>(e.float32="float32",e.float16="float16",e.int32="int32",e.int8="int8",e.uint8="uint8",e))(ye||{}),we=(e=>(e.gcs="gcs",e.s3="s3",e.https_signed="https_signed",e))(we||{}),_e=(e=>(e.success="success",e.failed="failed",e))(_e||{}),ke=(e=>(e.draft="draft",e.published="published",e))(ke||{}),Se=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")}},Ee=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")}},Te=class extends V{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=ee(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=ee(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=ie(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(ee(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){const a=t?`&dataset_version=${t}`:"",o=i?"&include_annotations=true":"",s=n?`&top_k=${n}`:"";return this.request(`/assets?dataset_uuid=${e}${a}${o}${s}`,{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 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 Se(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 Ee(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),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),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 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"})}},Ae=class extends R{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:R.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())})}},je=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=je("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})(je("EYEPOP_LOCAL_MODE"))),e.isLocalMode&&(e.eyepopUrl="http://127.0.0.1:8080"),a(e),void 0===e.auth){if(!e.isLocalMode)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");e.auth={isLocal:!0}}return void 0===e.popId&&(e.popId=je("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 Q(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=je("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=je("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Te(e)}})(ne||(ne={}));var Pe=ne},826(){},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])}},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)}},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},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const n=i(178),a=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,n.default)(s):s;if("string"==typeof s&&(s=(0,n.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){c=c||0;for(let e=0;e<16;++e)r[c+e]=u[e];return r}return(0,a.unsafeStringify)(u)}},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}},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)})());
|
|
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:()=>bo,AuthenticationError:()=>w,CacheKey:()=>se,ConnectError:()=>_,GenericError:()=>y,InMemoryCache:()=>ce,LocalStorageCache:()=>re,MfaApiClient:()=>vo,MfaChallengeError:()=>uo,MfaEnrollmentError:()=>lo,MfaEnrollmentFactorsError:()=>ho,MfaError:()=>co,MfaListAuthenticatorsError:()=>po,MfaRequiredError:()=>A,MfaVerifyError:()=>mo,MissingRefreshTokenError:()=>j,MyAccountApiError:()=>Ne,PopupCancelledError:()=>E,PopupOpenError:()=>T,PopupTimeoutError:()=>S,ResponseType:()=>we,TimeoutError:()=>k,UseDpopNonceError:()=>I,User:()=>_e,createAuth0Client:()=>xo}),"function"==typeof SuppressedError&&SuppressedError;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},o={},s={};Object.defineProperty(s,"__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}();s.default=function(){return r.getInstance()};var c=a&&a.__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())})},p=a&&a.__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])}}},l=a;Object.defineProperty(o,"__esModule",{value:!0});var u=s,d={key:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},clear:function(){return c(l,void 0,void 0,function(){return p(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return c(l,void 0,void 0,function(){return p(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function m(e){return new Promise(function(t){return setTimeout(t,e)})}function h(e){for(var t="",i=0;i<e;i++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var f=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+h(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),c(this,void 0,void 0,function(){var n,a,o,s,r,c,l;return p(this,function(p){switch(p.label){case 0:n=Date.now()+h(4),a=Date.now()+i,o="browser-tabs-lock-key-"+t,s=void 0===this.storageHandler?d:this.storageHandler,p.label=1;case 1:return Date.now()<a?[4,m(30)]:[3,8];case 2:return p.sent(),null!==s.getItemSync(o)?[3,5]:(r=this.id+"-"+t+"-"+n,[4,m(Math.floor(25*Math.random()))]);case 3:return p.sent(),s.setItemSync(o,JSON.stringify({id:this.id,iat:n,timeoutKey:r,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,m(30)];case 4:return p.sent(),null!==(c=s.getItemSync(o))&&(l=JSON.parse(c)).id===this.id&&l.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(o,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?d:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:p.sent(),p.label=7;case 7:return n=Date.now()+h(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return c(this,void 0,void 0,function(){var i=this;return p(this,function(n){return setTimeout(function(){return c(i,void 0,void 0,function(){var i,n,a;return p(this,function(o){switch(o.label){case 0:return[4,u.default().lock(t)];case 1:return o.sent(),this.acquiredIatSet.has(t)?(i=void 0===this.storageHandler?d:this.storageHandler,null===(n=i.getItemSync(e))?(u.default().unlock(t),[2]):((a=JSON.parse(n)).timeRefreshed=Date.now(),i.setItemSync(e,JSON.stringify(a)),u.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(u.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return c(this,void 0,void 0,function(){return p(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 c(this,void 0,void 0,function(){return p(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 c(this,void 0,void 0,function(){var i,n,a,o;return p(this,function(s){switch(s.label){case 0:return i=void 0===this.storageHandler?d:this.storageHandler,n="browser-tabs-lock-key-"+t,null===(a=i.getItemSync(n))?[2]:(o=JSON.parse(a)).id!==this.id?[3,2]:[4,u.default().lock(o.iat)];case 1:s.sent(),this.acquiredIatSet.delete(o.iat),i.removeItemSync(n),u.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("browser-tabs-lock-key")){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}(),v=o.default=f;const g={timeoutInSeconds:60},b={name:"auth0-spa-js",version:"2.14.0"},x=()=>Date.now();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 n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=i,this.appState=n,Object.setPrototypeOf(this,w.prototype)}}class _ extends y{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,_.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 E extends y{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,E.prototype)}}class T extends y{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,T.prototype)}}class A extends y{constructor(e,t,i,n){super(e,t),this.mfa_token=i,this.mfa_requirements=n,Object.setPrototypeOf(this,A.prototype)}}class j extends y{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(O(e,["default"]),"', scope: '").concat(O(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,j.prototype)}}class P extends y{constructor(e,t){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(O(e,["default"]),"', missing scope: '").concat(O(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,P.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 O(e){return e&&!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).includes(e)?e:""}const R=()=>window.crypto,U=()=>{let e="";return Array.from(R().getRandomValues(new Uint8Array(43))).forEach(t=>e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[t%66]),e},C=e=>btoa(e),L=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],z=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=L.find(e=>e.key===n);return a&&a.type.includes(typeof e[n])&&(i[n]=e[n]),i},{})},D=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()},N=async e=>{const t=R().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},q=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),$=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))},M=new TextEncoder,H=new TextDecoder;function K(e){return"string"==typeof e?M.encode(e):H.decode(e)}function W(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new B(`${e.name} modulusLength must be at least 2048 bits`)}let J;if(Uint8Array.prototype.toBase64)J=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;J=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 F(e){return J(e)}class V 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 B 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 G(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new V("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new V("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new V("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new V("unsupported CryptoKey algorithm name")}}function Z(e){return e instanceof CryptoKey}function Y(e){return Z(e)&&"public"===e.type}async function X(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 Q=["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"],ee=async(e,t)=>{const i=await fetch(e,t);return{ok:i.ok,json:await i.json(),headers:(n=i.headers,[...n].reduce((e,t)=>{let[i,n]=t;return e[i]=n,e},{}))};var n},te=async function(e,t,i,n,a,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return a?(async(e,t,i,n,a,o,s,r)=>((e,t)=>new Promise(function(i,n){const a=new MessageChannel;a.port1.onmessage=function(e){e.data.error?n(new Error(e.data.error)):i(e.data),a.port1.close()},t.postMessage(e,[a.port2])}))({auth:{audience:t,scope:i},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:s,useMrrt:r},o))(e,t,i,n,s,a,o,arguments.length>7?arguments[7]:void 0):(async(e,t,i)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([ee(e,t),new Promise((e,t)=>{a=setTimeout(()=>{n.abort(),t(new Error("Timeout when executing 'fetch'"))},i)})]).finally(()=>{clearTimeout(a)})})(e,n,s)};async function ie(e,t,i,a,o,s,r,c,p,l){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 u,d=null;for(let n=0;n<3;n++)try{u=await te(e,i,a,o,s,r,t,c),d=null;break}catch(e){d=e}if(d)throw d;const m=u.json,{error:h,error_description:f}=m,v=n(m,["error","error_description"]),{headers:g,ok:b}=u;let x;if(p&&(x=g["dpop-nonce"],x&&await p.setNonce(x)),!b){const n=f||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===h)throw new A(h,n,v.mfa_token,v.mfa_requirements);if("missing_refresh_token"===h)throw new j(i,a);if("use_dpop_nonce"===h){if(!p||!x||l)throw new I(x);return ie(e,t,i,a,o,s,r,c,p,!0)}throw new y(h||"request_error",n)}return v}async function ne(e,t){var{baseUrl:i,timeout:a,audience:o,scope:s,auth0Client:r,useFormData:c,useMrrt:p,dpop:l}=e,u=n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const d="urn:ietf:params:oauth:grant-type:token-exchange"===u.grant_type,m="refresh_token"===u.grant_type&&p,h=Object.assign(Object.assign(Object.assign(Object.assign({},u),d&&o&&{audience:o}),d&&s&&{scope:s}),m&&{audience:o,scope:s}),f=c?D(h):JSON.stringify(h),v=(g=u.grant_type,Q.includes(g));var g;return await ie("".concat(i,"/oauth/token"),a,o||"default",s,{method:"POST",body:f,headers:{"Content-Type":c?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(z(r||b)))}},t,c,p,v?l:void 0)}const ae=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(e=>Array.from(new Set(e)))(t.filter(Boolean).join(" ").trim().split(/\s+/)).join(" ")},oe=(e,t,i)=>{let n;return i&&(n=e[i]),n||(n=e.default),ae(n,t)};class se{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@@auth0spajs@@",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 se({clientId:i,scope:a,audience:n},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:n}=e;return new se({scope:t,audience:i,clientId:n})}}class re{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("@@auth0spajs@@"))}}class ce{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 pe{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||x}async setIdToken(e,t,i){var n;const a=this.getIdTokenCacheKey(e);await this.cache.set(a,{id_token:t,decodedToken:i}),await(null===(n=this.keyManifest)||void 0===n?void 0:n.add(a))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;var a;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const a=this.matchExistingCacheKey(e,t);if(a&&(o=await this.cache.get(a)),!o&&i&&"cache-only"!==n)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const s=await this.nowProvider(),r=Math.floor(s/1e3);return o.expiresAt-t<r?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await(null===(a=this.keyManifest)||void 0===a?void 0:a.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const i=new se({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 se({clientId:e,scope:i,audience:t});await this.cache.remove(n.toKey())}async clear(e){var t;const i=await this.getCacheKeys();i&&(await i.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new se({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var i;const n=se.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"@@auth0spajs@@"===n.prefix&&n.clientId===e.clientId&&n.audience===e.audience&&s})[0]}async getEntryWithRefreshToken(e,t){var i;for(const n of t){const t=se.fromKey(n);if("@@auth0spajs@@"===t.prefix&&t.clientId===e.clientId){const t=await this.cache.get(n);if(null===(i=null==t?void 0:t.body)||void 0===i?void 0:i.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var i;const n=await this.getCacheKeys();if(n)for(const a of n){const n=await this.cache.get(a);if((null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.refresh_token)===e){const e=Object.assign(Object.assign({},n.body),{refresh_token:t});await this.set(e)}}}}class le{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 ue=e=>"number"==typeof e,de=["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 me=a&&a.__assign||function(){return me=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},me.apply(this,arguments)};function he(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function fe(e,t,i){document.cookie=function(e,t,i){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return he("Expires",e.expires?e.expires.toUTCString():"")+he("Domain",e.domain)+he("Path",e.path)+he("Secure",e.secure)+he("SameSite",e.sameSite)}(i)}(e,t,me({path:"/"},i))}var ve=fe,ge=function(e,t){fe(e,"",me(me({},t),{expires:-1}))};const be={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),ve(e,JSON.stringify(t),n)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),ge(e,i)}},xe={get:e=>be.get(e)||be.get("".concat("_legacy_").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),ve("".concat("_legacy_").concat(e),JSON.stringify(t),n),be.save(e,t,i)},remove(e,t){let i={};(null==t?void 0:t.cookieDomain)&&(i.domain=t.cookieDomain),ge(e,i),be.remove(e,t),be.remove("".concat("_legacy_").concat(e),t)}},ye={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 we;!function(e){e.Code="code",e.ConnectCode="connect_code"}(we||(we={}));class _e{}var ke,Se=function(e){return ke=ke||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtsZXQgdD1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W107cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQodCk7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jIGU9PntsZXQgcixjLHtkYXRhOnt0aW1lb3V0OmksYXV0aDphLGZldGNoVXJsOmYsZmV0Y2hPcHRpb25zOmwsdXNlRm9ybURhdGE6cCx1c2VNcnJ0Omh9LHBvcnRzOlt1XX09ZSxkPXt9O2NvbnN0e2F1ZGllbmNlOmcsc2NvcGU6eX09YXx8e307dHJ5e2NvbnN0IGU9cD8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShsLmJvZHkpOkpTT04ucGFyc2UobC5ib2R5KTtpZighZS5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1lLmdyYW50X3R5cGUpe2lmKGM9KChlLHQpPT5vW24oZSx0KV0pKGcseSksIWMmJmgpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKCIiLmNvbmNhdChlLCJ8IikpKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxnKTtlJiYhdCYmKGM9ZSl9aWYoIWMpdGhyb3cgbmV3IHQoZyx5KTtsLmJvZHk9cD9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpfWxldCBhLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGE9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1hLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaj1pLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaikpKSksZmV0Y2goZixPYmplY3QuYXNzaWduKHt9LGwpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBhJiZhLmFib3J0KCksdm9pZCB1LnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO189ay5oZWFkZXJzLGQ9Wy4uLl9dLnJlZHVjZSgoKGUsdCk9PntsZXRbcixzXT10O3JldHVybiBlW3JdPXMsZX0pLHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKChlPT57bGV0W3Qscl09ZTtyPT09TyYmKG9bdF09Yil9KSkpLCgoZSx0LHIpPT57b1tuKHQscildPWV9KShyLnJlZnJlc2hfdG9rZW4sZyx5KSxkZWxldGUgci5yZWZyZXNoX3Rva2VuKTooKGUsdCk9PntkZWxldGUgb1tuKGUsdCldfSkoZyx5KSx1LnBvc3RNZXNzYWdlKHtvazprLm9rLGpzb246cixoZWFkZXJzOmR9KX1jYXRjaChlKXt1LnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX0saGVhZGVyczpkfSl9dmFyIE8sYixfLGp9KSl9KCk7Cgo="),t=e.indexOf("\n",10)+1,i=e.substring(t)+"",n=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(n)}(),new Worker(ke,e)};const Ee={},Te=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;for(let i=0;i<t;i++)if(await e())return!0;return!1};class Ae{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("@@auth0spajs@@","::").concat(e)}}const je={memory:()=>(new ce).enclosedCache,localstorage:()=>new re},Pe=e=>je[e],Ie=e=>{const{openUrl:t,onRedirect:i}=e,a=n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},a),{openUrl:!1===t||t?t:i})},Oe=(e,t)=>{const i=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>i.includes(e))},Re={NONCE:"nonce",KEYPAIR:"keypair"};class Ue{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(Re).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(Re.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(Re.KEYPAIR,this.buildKey(),e)}async save(e,t,i){await this.executeDbRequest(e,"readwrite",e=>e.put(i,t))}findNonce(e){return this.find(Re.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Re.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(Re.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Re.KEYPAIR,this.clientId)}}class Ce{constructor(e){this.storage=new Ue(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(!Z(c=s)||"private"!==c.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!Y(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=`${F(K(JSON.stringify(e)))}.${F(K(JSON.stringify(t)))}`;return`${n}.${F(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return W(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return W(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new V}(i),i,K(n)))}`}({alg:G(s),typ:"dpop+jwt",jwk:await X(r)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:i,nonce:n,htu:t,ath:a?F(await crypto.subtle.digest("SHA-256",K(a))):void 0}),s)}(t,s,n,a,o)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!Y(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 X(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 V("unsupported JWK kty")}return F(await crypto.subtle.digest({name:"SHA-256"},K(JSON.stringify(i))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Le;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(Le||(Le={}));class ze{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]:Le.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?Le.DPoP:Le.Bearer,a=i):(n=i.token_type,a=i.access_token),this.setAuthorizationHeader(e,a,n),n===Le.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,"dpop-nonce");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,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 De{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 Ne({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(i)})}if(e.ok)return t;throw new Ne(t)}}class Ne 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,Ne.prototype)}}const qe={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}};function $e(e,t){this.v=e,this.k=t}function Me(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 He(e){return new $e(e,0)}function Ke(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function We(e,t){return e.get(Me(e,t))}function Je(e,t,i){Ke(e,t),t.set(e,i)}function Fe(e,t,i){return e.set(Me(e,t),i),i}function Ve(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 Be(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 Ge(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(i),!0).forEach(function(t){Ve(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Be(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Ze(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 Ye(e){var t,i;function n(t,i){try{var o=e[t](i),s=o.value,r=s instanceof $e;Promise.resolve(r?s.v:s).then(function(i){if(r){var c="return"===t?"return":"next";if(!s.k||i.done)return n(c,i);i=e[c](i).value}a(o.done?"return":"normal",i)},function(e){n("throw",e)})}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(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 Xe,Qe;let et;if(Ye.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ye.prototype.next=function(e){return this._invoke("next",e)},Ye.prototype.throw=function(e){return this._invoke("throw",e)},Ye.prototype.return=function(e){return this._invoke("return",e)},"undefined"==typeof navigator||null===(Xe=navigator.userAgent)||void 0===Xe||null===(Qe=Xe.startsWith)||void 0===Qe||!Qe.call(Xe,"Mozilla/5.0 ")){const e="v3.8.3";et="".concat("oauth4webapi","/").concat(e)}function tt(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}}function it(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}const nt=Symbol(),at=Symbol(),ot=Symbol(),st=Symbol(),rt=Symbol(),ct=Symbol(),pt=new TextEncoder,lt=new TextDecoder;function ut(e){return"string"==typeof e?pt.encode(e):lt.decode(e)}let dt,mt;if(Uint8Array.prototype.toBase64)dt=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;dt=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 ht(e){return"string"==typeof e?mt(e):dt(e)}mt=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw it("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",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 it("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",e)}};class ft extends Error{constructor(e,t){var i;super(e,t),Ve(this,"code",void 0),this.name=this.constructor.name,this.code=pi,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}class vt extends Error{constructor(e,t){var i;super(e,t),Ve(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 gt(e,t,i){return new vt(e,{code:t,cause:i})}function bt(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function xt(e){tt(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(et&&!t.has("user-agent")&&t.set("user-agent",et),t.has("authorization"))throw it('"options.headers" must not include the "authorization" header name',"ERR_INVALID_ARG_VALUE");return t}function yt(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw it('"options.signal" must return or be an instance of AbortSignal',"ERR_INVALID_ARG_TYPE");return t}}function wt(e){return e.includes("//")?e.replace("//","/"):e}function _t(e,t,i,n,a){try{if("number"!=typeof e||!Number.isFinite(e))throw it("".concat(i," must be a number"),"ERR_INVALID_ARG_TYPE",a);if(e>0)return;if(t){if(0!==e)throw it("".concat(i," must be a non-negative number"),"ERR_INVALID_ARG_VALUE",a);return}throw it("".concat(i," must be a positive number"),"ERR_INVALID_ARG_VALUE",a)}catch(e){if(n)throw gt(e.message,n,a);throw e}}function kt(e,t,i,n){try{if("string"!=typeof e)throw it("".concat(t," must be a string"),"ERR_INVALID_ARG_TYPE",n);if(0===e.length)throw it("".concat(t," must not be empty"),"ERR_INVALID_ARG_VALUE",n)}catch(e){if(i)throw gt(e.message,i,n);throw e}}function St(e){!function(e,t){if(Ft(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 gt(t,mi,e)}(e,t)}(e,"application/json")}function Et(){return ht(crypto.getRandomValues(new Uint8Array(32)))}function Tt(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 ft("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 ft("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 ft("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 ft("unsupported CryptoKey algorithm name",{cause:e})}}function At(e){const t=null==e?void 0:e[at];return"number"==typeof t&&Number.isFinite(t)?t:0}function jt(e){const t=null==e?void 0:e[ot];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function Pt(){return Math.floor(Date.now()/1e3)}function It(e){if("object"!=typeof e||null===e)throw it('"as" must be an object',"ERR_INVALID_ARG_TYPE");kt(e.issuer,'"as.issuer"')}function Ot(e){if("object"!=typeof e||null===e)throw it('"client" must be an object',"ERR_INVALID_ARG_TYPE");kt(e.client_id,'"client.client_id"')}function Rt(e){return kt(e,'"clientSecret"'),(t,i,n,a)=>{n.set("client_id",i.client_id),n.set("client_secret",e)}}const Ut=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Ct(e,t){if(t&&"https:"!==e.protocol)throw gt("only requests to HTTPS are allowed",fi,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw gt("only HTTP and HTTPS requests are allowed",vi,e)}function Lt(e,t,i,n){let a;if("string"!=typeof e||!(a=Ut(e)))throw gt("authorization server metadata does not contain a valid ".concat(i?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?yi:wi,{attribute:i?"mtls_endpoint_aliases.".concat(t):t});return Ct(a,n),a}function zt(e,t,i,n){return i&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Lt(e.mtls_endpoint_aliases[t],t,i,n):Lt(e[t],t,i,n)}class Dt extends Error{constructor(e,t){var i;super(e,t),Ve(this,"cause",void 0),Ve(this,"code",void 0),Ve(this,"error",void 0),Ve(this,"status",void 0),Ve(this,"error_description",void 0),Ve(this,"response",void 0),this.name=this.constructor.name,this.code=ci,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 Nt extends Error{constructor(e,t){var i,n;super(e,t),Ve(this,"cause",void 0),Ve(this,"code",void 0),Ve(this,"error",void 0),Ve(this,"error_description",void 0),this.name=this.constructor.name,this.code=li,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),Ve(this,"cause",void 0),Ve(this,"code",void 0),Ve(this,"response",void 0),Ve(this,"status",void 0),this.name=this.constructor.name,this.code=ri,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 $t=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)"),Mt=new RegExp('^[,\\s]*([a-zA-Z0-9!#$%&\\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"[,\\s]*(.*)'),Ht=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)[,\\s]*(.*)"),Kt=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Wt(e,t,i){if(e.status!==t){let t;var n;if(function(e){let t;if(t=function(e){if(!tt(e,Response))throw it('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");const t=e.headers.get("www-authenticate");if(null===t)return;const i=[];let n=t;for(;n;){var a;let t=n.match($t);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(Mt)){if([,i,a,n]=t,a.includes("\\"))try{a=JSON.parse('"'.concat(a,'"'))}catch(e){}p[i.toLowerCase()]=a}else{if(!(t=n.match(Ht))){if(t=n.match(Kt)){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){_i(e),St(e);try{const t=await e.clone().json();if(bt(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 Dt("server responded with an error in the response body",{cause:t,response:e});throw gt('"response" is not a conform '.concat(i," response (unexpected HTTP status code)"),hi,e)}}function Jt(e){if(!ti.has(e))throw it('"options.DPoP" is not a valid DPoPHandle',"ERR_INVALID_ARG_VALUE")}function Ft(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function Vt(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[st])||fetch)(n.href,{body:a,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:yt(n,null==s?void 0:s.signal)})}async function Bt(e,t,i,n,a,o){var s;const r=zt(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[nt]));a.set("grant_type",n);const c=xt(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(Jt(o.DPoP),await o.DPoP.addProof(r,c,"POST"));const p=await Vt(e,t,i,r,a,c,o);return null==o||null===(s=o.DPoP)||void 0===s||s.cacheNonce(p,r),p}const Gt=new WeakMap,Zt=new WeakMap;function Yt(e){if(!e.id_token)return;const t=Gt.get(e);if(!t)throw it('"ref" was already garbage collected or did not resolve from the proper sources',"ERR_INVALID_ARG_VALUE");return t}async function Xt(e,t,i,n,a,o){if(It(e),Ot(t),!tt(i,Response))throw it('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,200,"Token Endpoint"),_i(i);const s=await Pi(i);if(kt(s.access_token,'"response" body "access_token" property',di,{body:s}),kt(s.token_type,'"response" body "token_type" property',di,{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;_t(e,!0,'"response" body "expires_in" property',di,{body:s}),s.expires_in=e}if(void 0!==s.refresh_token&&kt(s.refresh_token,'"response" body "refresh_token" property',di,{body:s}),void 0!==s.scope&&"string"!=typeof s.scope)throw gt('"response" body "scope" property must be a string',di,{body:s});if(void 0!==s.id_token){kt(s.id_token,'"response" body "id_token" property',di,{body:s});const o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(_t(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 ft("JWE decryption is not configured",{cause:e});e=await a(e),({0:r,1:c,length:p}=e.split("."))}if(3!==p)throw gt("Invalid JWT",di,e);try{o=JSON.parse(ut(ht(r)))}catch(e){throw gt("failed to parse JWT Header body as base64url encoded JSON",ui,e)}if(!bt(o))throw gt("JWT Header must be a top level object",di,e);if(t(o),void 0!==o.crit)throw new ft('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{s=JSON.parse(ut(ht(c)))}catch(e){throw gt("failed to parse JWT Payload body as base64url encoded JSON",ui,e)}if(!bt(s))throw gt("JWT Payload must be a top level object",di,e);const l=Pt()+i;if(void 0!==s.exp){if("number"!=typeof s.exp)throw gt('unexpected JWT "exp" (expiration time) claim type',di,{claims:s});if(s.exp<=l-n)throw gt('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',gi,{claims:s,now:l,tolerance:n,claim:"exp"})}if(void 0!==s.iat&&"number"!=typeof s.iat)throw gt('unexpected JWT "iat" (issued at) claim type',di,{claims:s});if(void 0!==s.iss&&"string"!=typeof s.iss)throw gt('unexpected JWT "iss" (issuer) claim type',di,{claims:s});if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw gt('unexpected JWT "nbf" (not before) claim type',di,{claims:s});if(s.nbf>l+n)throw gt('unexpected JWT "nbf" (not before) claim value',gi,{claims:s,now:l,tolerance:n,claim:"nbf"})}if(void 0!==s.aud&&"string"!=typeof s.aud&&!Array.isArray(s.aud))throw gt('unexpected JWT "aud" (audience) claim type',di,{claims:s});return{header:o,claims:s,jwt:e}}(s.id_token,Ei.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),At(t),jt(t),a).then(ai.bind(void 0,o)).then(ei.bind(void 0,e)).then(Qt.bind(void 0,t.client_id));if(Array.isArray(r.aud)&&1!==r.aud.length){if(void 0===r.azp)throw gt('ID Token "aud" (audience) claim includes additional untrusted audiences',bi,{claims:r,claim:"aud"});if(r.azp!==t.client_id)throw gt('unexpected ID Token "azp" (authorized party) claim value',bi,{expected:t.client_id,claims:r,claim:"azp"})}void 0!==r.auth_time&&_t(r.auth_time,!0,'ID Token "auth_time" (authentication time)',di,{claims:r}),Zt.set(i,c),Gt.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 ft("unsupported `token_type` value",{cause:{body:s}});return s}function Qt(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw gt('unexpected JWT "aud" (audience) claim value',bi,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw gt('unexpected JWT "aud" (audience) claim value',bi,{expected:e,claims:t.claims,claim:"aud"});return t}function ei(e,t){var i,n;const a=null!==(i=null===(n=e[Oi])||void 0===n?void 0:n.call(e,t))&&void 0!==i?i:e.issuer;if(t.claims.iss!==a)throw gt('unexpected JWT "iss" (issuer) claim value',bi,{expected:a,claims:t.claims,claim:"iss"});return t}const ti=new WeakSet,ii=Symbol(),ni={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 ai(e,t){for(const i of e)if(void 0===t.claims[i])throw gt('JWT "'.concat(i,'" (').concat(ni[i],") claim missing"),di,{claims:t.claims});return t}const oi=Symbol(),si=Symbol(),ri="OAUTH_WWW_AUTHENTICATE_CHALLENGE",ci="OAUTH_RESPONSE_BODY_ERROR",pi="OAUTH_UNSUPPORTED_OPERATION",li="OAUTH_AUTHORIZATION_RESPONSE_ERROR",ui="OAUTH_PARSE_ERROR",di="OAUTH_INVALID_RESPONSE",mi="OAUTH_RESPONSE_IS_NOT_JSON",hi="OAUTH_RESPONSE_IS_NOT_CONFORM",fi="OAUTH_HTTP_REQUEST_FORBIDDEN",vi="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",gi="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",bi="OAUTH_JWT_CLAIM_COMPARISON_FAILED",xi="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",yi="OAUTH_MISSING_SERVER_METADATA",wi="OAUTH_INVALID_SERVER_METADATA";function _i(e){if(e.bodyUsed)throw it('"response" body has been used already',"ERR_INVALID_ARG_VALUE")}function ki(e){const{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new ft("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Si(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 ft("unsupported ECDSA namedCurve",{cause:e})}}function Ei(e,t,i,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw gt('unexpected JWT "alg" header parameter',di,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===i)throw gt('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 gt('unexpected JWT "alg" header parameter',di,{header:n,expected:i,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw gt('unexpected JWT "alg" header parameter',di,{header:n,expected:e,reason:"client configuration"})}function Ti(e,t){const{0:i,length:n}=e.getAll(t);if(n>1)throw gt('"'.concat(t,'" parameter must be provided only once'),di);return i}const Ai=Symbol(),ji=Symbol();async function Pi(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:St;try{t=await e.json()}catch(t){throw i(e),gt('failed to parse "response" body as JSON',ui,t)}if(!bt(t))throw gt('"response" body must be a top level object',di,{body:t});return t}const Ii=Symbol(),Oi=Symbol(),Ri=new TextEncoder,Ui=new TextDecoder;function Ci(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 Li(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 zi(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:Ui.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Ui.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return Li(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}}class Di extends Error{constructor(e,t){var i;super(e,t),Ve(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(i=Error.captureStackTrace)||void 0===i||i.call(Error,this,this.constructor)}}Ve(Di,"code","ERR_JOSE_GENERIC");class Ni extends Di{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}}),Ve(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),Ve(this,"claim",void 0),Ve(this,"reason",void 0),Ve(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}Ve(Ni,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class qi extends Di{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}}),Ve(this,"code","ERR_JWT_EXPIRED"),Ve(this,"claim",void 0),Ve(this,"reason",void 0),Ve(this,"payload",void 0),this.claim=i,this.reason=n,this.payload=t}}Ve(qi,"code","ERR_JWT_EXPIRED");class $i extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}Ve($i,"code","ERR_JOSE_ALG_NOT_ALLOWED");class Mi extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JOSE_NOT_SUPPORTED")}}Ve(Mi,"code","ERR_JOSE_NOT_SUPPORTED"),Ve(class extends Di{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),Ve(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),Ve(class extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Hi extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JWS_INVALID")}}Ve(Hi,"code","ERR_JWS_INVALID");class Ki extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JWT_INVALID")}}Ve(Ki,"code","ERR_JWT_INVALID"),Ve(class extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Wi extends Di{constructor(){super(...arguments),Ve(this,"code","ERR_JWKS_INVALID")}}Ve(Wi,"code","ERR_JWKS_INVALID");class Ji extends Di{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),Ve(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}Ve(Ji,"code","ERR_JWKS_NO_MATCHING_KEY");class Fi extends Di{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),Ve(this,Symbol.asyncIterator,void 0),Ve(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}Ve(Fi,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class Vi extends Di{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),Ve(this,"code","ERR_JWKS_TIMEOUT")}}Ve(Vi,"code","ERR_JWKS_TIMEOUT");class Bi extends Di{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),Ve(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}Ve(Bi,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const Gi=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))},Zi=(e,t)=>e.name===t;function Yi(e){return parseInt(e.name.slice(4),10)}function Xi(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 Qi=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 Xi("Key for the ".concat(e," algorithm must be "),t,...n)},en=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},tn=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),nn=e=>en(e)||tn(e);function an(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 on=(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},sn=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},rn=(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};async function pn(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 Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}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 Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},i=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},i=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},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 Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}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 Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Mi('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),o=Ge({},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 ln=e=>an(e)&&"string"==typeof e.kty;let un;const dn=async function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];un||(un=new WeakMap);let a=un.get(e);if(null!=a&&a[i])return a[i];const o=await pn(Ge(Ge({},t),{},{alg:i}));return n&&Object.freeze(e),a?a[i]=o:un.set(e,{[i]:o}),o},mn=e=>null==e?void 0:e[Symbol.toStringTag],hn=(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 fn,vn;let gn,bn;if("undefined"==typeof navigator||null===(fn=navigator.userAgent)||void 0===fn||null===(vn=fn.startsWith)||void 0===vn||!vn.call(fn,"Mozilla/5.0 ")){const e="v6.8.1";bn="".concat("openid-client","/").concat(e),gn={"user-agent":bn}}const xn=e=>yn.get(e);let yn,wn;function _n(e){return void 0!==e?Rt(e):(wn||(wn=new WeakMap),(e,t,i,n)=>{let a;return(a=wn.get(t))||(function(e,t){if("string"!=typeof e)throw Tn("".concat(t," must be a string"),En);if(0===e.length)throw Tn("".concat(t," must not be empty"),Sn)}(t.client_secret,'"metadata.client_secret"'),a=Rt(t.client_secret),wn.set(t,a)),a(e,t,i,n)})}const kn=st,Sn="ERR_INVALID_ARG_VALUE",En="ERR_INVALID_ARG_TYPE";function Tn(e,t,i){const n=new TypeError(e,{cause:i});return Object.assign(n,{code:t}),n}class An extends Error{constructor(e,t){var i;super(e,t),Ve(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 jn(e,t,i){return new An(e,{cause:t,code:i})}function Pn(e){if(e instanceof TypeError||e instanceof An||e instanceof Dt||e instanceof Nt||e instanceof qt)throw e;if(e instanceof vt)switch(e.code){case fi:throw jn("only requests to HTTPS are allowed",e,e.code);case vi:throw jn("only requests to HTTP or HTTPS are allowed",e,e.code);case hi:throw jn("unexpected HTTP response status code",e.cause,e.code);case mi:throw jn("unexpected response content-type",e.cause,e.code);case ui:throw jn("parsing error occured",e,e.code);case di:throw jn("invalid response encountered",e,e.code);case bi:throw jn("unexpected JWT claim value encountered",e,e.code);case xi:throw jn("unexpected JSON attribute value encountered",e,e.code);case gi:throw jn("JWT timestamp claim value failed validation",e,e.code);default:throw jn(e.message,e,e.code)}if(e instanceof ft)throw jn("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw jn("runtime operation error",e,pi);case"NotSupportedError":throw jn("runtime unsupported operation",e,pi);case"TimeoutError":throw jn("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw jn("operation aborted",e,"OAUTH_ABORT")}throw new An("something went wrong",{cause:e})}new TextDecoder;const In=Symbol();class On{constructor(e,t,i,n){var a,o,s,r,c;if("string"!=typeof t||!t.length)throw Tn('"clientId" must be a non-empty string',En);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 Tn('"clientId" and "metadata.client_id" must be the same',Sn);const p=Ge(Ge({},structuredClone(i)),{},{client_id:t});let l;p[at]=null!==(o=null===(s=i)||void 0===s?void 0:s[at])&&void 0!==o?o:0,p[ot]=null!==(r=null===(c=i)||void 0===c?void 0:c[ot])&&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);In in e&&(d[Oi]=t=>{let{claims:{tid:i}}=t;return e.issuer.replace("{tenantid}",i)});let m=Object.freeze(d);yn||(yn=new WeakMap),yn.set(this,{__proto__:null,as:m,c:u,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(xn(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(xn(this).c)}get timeout(){return xn(this).timeout}set timeout(e){xn(this).timeout=e}get[kn](){return xn(this).fetch}set[kn](e){xn(this).fetch=e}}function Rn(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 Yt(this)}catch(e){return}}}}}(e))}async function Un(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 vt("invalid Retry-After header value",{cause:e});s>t&&await Cn(s-t,i)}function Cn(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 Ln(e,t){Kn(e);const{as:i,c:n,auth:a,fetch:o,tlsOnly:s,timeout:r}=xn(e);return async function(e,t,i,n,a){It(e),Ot(t);const o=zt(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[nt])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const r=xt(null==a?void 0:a.headers);return r.set("accept","application/json"),Vt(e,t,i,o,s,r,a)}(i,n,a,t,{[st]:o,[nt]:!s,headers:new Headers(gn),signal:Wn(r)}).then(e=>async function(e,t,i){if(It(e),Ot(t),!tt(i,Response))throw it('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,200,"Backchannel Authentication Endpoint"),_i(i);const n=await Pi(i);kt(n.auth_req_id,'"response" body "auth_req_id" property',di,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return _t(a,!0,'"response" body "expires_in" property',di,{body:n}),n.expires_in=a,void 0!==n.interval&&_t(n.interval,!1,'"response" body "interval" property',di,{body:n}),n}(i,n,e)).catch(Pn)}async function zn(e,t,i,n){var a,o;Kn(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 Cn(s,r)}catch(e){Pn(e)}const{as:c,c:p,auth:l,fetch:u,tlsOnly:d,nonRepudiation:m,timeout:h,decrypt:f}=xn(e),v=(a,o)=>zn(e,Ge(Ge({},t),{},{interval:a}),i,Ge(Ge({},n),{},{signal:r,flag:o})),g=await async function(e,t,i,n,a){It(e),Ot(t),kt(n,'"authReqId"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("auth_req_id",n),Bt(e,t,i,"urn:openid:params:grant-type:ciba",o,a)}(c,p,l,t.auth_req_id,{[st]:u,[nt]:!d,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(gn),signal:r.aborted?r:Wn(h)}).catch(Pn);var b;if(503===g.status&&g.headers.has("retry-after"))return await Un(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 Xt(e,t,i,void 0,null==n?void 0:n[ct],null==n?void 0:n.recognizedTokenTypes)}(c,p,g,{[ct]:f});let y;try{y=await x}catch(e){if(Jn(e,n))return v(s,Fn);if(e instanceof Dt)switch(e.error){case"slow_down":s+=5;case"authorization_pending":return await Un(e.response,s,r),v(s)}Pn(e)}return y.id_token&&await(null==m?void 0:m(g)),Rn(y),y}function Dn(e){xn(e).tlsOnly=!1}async function Nn(e,t,i,n,a){if(Kn(e),!((null==a?void 0:a.flag)===Fn||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Tn('"currentUrl" must be an instance of URL, or Request',En);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}=xn(e);if((null==a?void 0:a.flag)===Fn)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 it("form_post responses are expected to use the POST method","ERR_INVALID_ARG_VALUE",{cause:e});if("application/x-www-form-urlencoded"!==Ft(e))throw it("form_post responses are expected to use the application/x-www-form-urlencoded content-type","ERR_INVALID_ARG_VALUE",{cause:e});return async function(e){if(e.bodyUsed)throw it("form_post Request instances must contain a readable body","ERR_INVALID_ARG_VALUE",{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 Tn("unexpected Request HTTP method",Sn)}}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(It(e),Ot(t),i instanceof URL&&(i=i.searchParams),!(i instanceof URLSearchParams))throw it('"parameters" must be an instance of URLSearchParams, or URL',"ERR_INVALID_ARG_TYPE");if(Ti(i,"response"))throw gt('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',di,{parameters:i});const a=Ti(i,"iss"),o=Ti(i,"state");if(!a&&e.authorization_response_iss_parameter_supported)throw gt('response parameter "iss" (issuer) missing',di,{parameters:i});if(a&&a!==e.issuer)throw gt('unexpected "iss" (issuer) response parameter value',di,{expected:e.issuer,parameters:i});switch(n){case void 0:case ji:if(void 0!==o)throw gt('unexpected "state" response parameter encountered',di,{expected:void 0,parameters:i});break;case Ai:break;default:if(kt(n,'"expectedState" argument'),o!==n)throw gt(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',di,{expected:n,parameters:i})}if(Ti(i,"error"))throw new Nt("authorization response from the server is an error",{cause:i});const s=Ti(i,"id_token"),r=Ti(i,"token");if(void 0!==s||void 0!==r)throw new ft("implicit and hybrid flows are not supported");return c=new URLSearchParams(i),ti.add(c),c;var c}(r,c,t.searchParams,null==i?void 0:i.expectedState)}catch(e){Pn(e)}}}const b=await async function(e,t,i,n,a,o,s){if(It(e),Ot(t),!ti.has(n))throw it('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',"ERR_INVALID_ARG_VALUE");kt(a,'"redirectUri"');const r=Ti(n,"code");if(!r)throw gt('no authorization code in "callbackParameters"',di);const c=new URLSearchParams(null==s?void 0:s.additionalParameters);return c.set("redirect_uri",a),c.set("code",r),o!==ii&&(kt(o,'"codeVerifier"'),c.set("code_verifier",o)),Bt(e,t,i,"authorization_code",c,s)}(r,c,p,o,s,(null==i?void 0:i.pkceCodeVerifier)||ii,{additionalParameters:n,[st]:l,[nt]:!u,DPoP:null==a?void 0:a.DPoP,headers:new Headers(gn),signal:Wn(f)}).catch(Pn);"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=oi;break;case oi:break;default:kt(n,'"expectedNonce" argument'),r.push("nonce")}switch(null!=a||(a=t.default_max_age),a){case void 0:a=si;break;case si:break;default:_t(a,!0,'"maxAge" argument'),r.push("auth_time")}const c=await Xt(e,t,i,r,o,s);kt(c.id_token,'"response" body "id_token" property',di,{body:c});const p=Yt(c);if(a!==si){const e=Pt()+At(t),i=jt(t);if(p.auth_time+a<e-i)throw gt("too much time has elapsed since the last End-User authentication",gi,{claims:p,now:e,tolerance:i,claim:"auth_time"})}if(n===oi){if(void 0!==p.nonce)throw gt('unexpected ID Token "nonce" claim value',bi,{expected:void 0,claims:p,claim:"nonce"})}else if(p.nonce!==n)throw gt('unexpected ID Token "nonce" claim value',bi,{expected:n,claims:p,claim:"nonce"});return c}(e,t,i,n.expectedNonce,n.maxAge,n[ct],n.recognizedTokenTypes):async function(e,t,i,n,a){const o=await Xt(e,t,i,void 0,n,a),s=Yt(o);if(s){if(void 0!==t.default_max_age){_t(t.default_max_age,!0,'"client.default_max_age"');const e=Pt()+At(t),i=jt(t);if(s.auth_time+t.default_max_age<e-i)throw gt("too much time has elapsed since the last End-User authentication",gi,{claims:s,now:e,tolerance:i,claim:"auth_time"})}if(void 0!==s.nonce)throw gt('unexpected ID Token "nonce" claim value',bi,{expected:void 0,claims:s,claim:"nonce"})}return o}(e,t,i,null==n?void 0:n[ct],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,[ct]:v});let y;try{y=await x}catch(t){if(Jn(t,a))return Nn(e,void 0,i,n,Ge(Ge({},a),{},{flag:Fn,authResponse:o,redirectUri:s}));Pn(t)}return y.id_token&&await(null==h?void 0:h(b)),Rn(y),y}async function qn(e,t,i,n){Kn(e),i=new URLSearchParams(i);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,nonRepudiation:p,timeout:l,decrypt:u}=xn(e),d=await async function(e,t,i,n,a){It(e),Ot(t),kt(n,'"refreshToken"');const o=new URLSearchParams(null==a?void 0:a.additionalParameters);return o.set("refresh_token",n),Bt(e,t,i,"refresh_token",o,a)}(a,o,s,t,{[st]:r,[nt]:!c,additionalParameters:i,DPoP:null==n?void 0:n.DPoP,headers:new Headers(gn),signal:Wn(l)}).catch(Pn),m=async function(e,t,i,n){return Xt(e,t,i,void 0,null==n?void 0:n[ct],null==n?void 0:n.recognizedTokenTypes)}(a,o,d,{[ct]:u});let h;try{h=await m}catch(a){if(Jn(a,n))return qn(e,t,i,Ge(Ge({},n),{},{flag:Fn}));Pn(a)}return h.id_token&&await(null==p?void 0:p(d)),Rn(h),h}async function $n(e,t,i){Kn(e),t=new URLSearchParams(t);const{as:n,c:a,auth:o,fetch:s,tlsOnly:r,timeout:c}=xn(e),p=await async function(e,t,i,n,a){return It(e),Ot(t),Bt(e,t,i,"client_credentials",new URLSearchParams(n),a)}(n,a,o,t,{[st]:s,[nt]:!r,DPoP:null==i?void 0:i.DPoP,headers:new Headers(gn),signal:Wn(c)}).catch(Pn),l=async function(e,t,i){return Xt(e,t,i,void 0,void 0,void 0)}(n,a,p);let u;try{u=await l}catch(n){if(Jn(n,i))return $n(e,t,Ge(Ge({},i),{},{flag:Fn}));Pn(n)}return Rn(u),u}function Mn(e,t){Kn(e);const{as:i,c:n,tlsOnly:a,hybrid:o,jarm:s,implicit:r}=xn(e),c=zt(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 Tn("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Sn);s&&t.set("response_mode","jwt")}for(const[e,i]of t.entries())c.searchParams.append(e,i);return c}async function Hn(e,t,i){Kn(e);const n=Mn(e,t),{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p}=xn(e),l=await async function(e,t,i,n,a){var o;It(e),Ot(t);const s=zt(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[nt])),r=new URLSearchParams(n);r.set("client_id",t.client_id);const c=xt(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(Jt(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const p=await Vt(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,{[st]:r,[nt]:!c,DPoP:null==i?void 0:i.DPoP,headers:new Headers(gn),signal:Wn(p)}).catch(Pn),u=async function(e,t,i){if(It(e),Ot(t),!tt(i,Response))throw it('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wt(i,201,"Pushed Authorization Request Endpoint"),_i(i);const n=await Pi(i);kt(n.request_uri,'"response" body "request_uri" property',di,{body:n});let a="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return _t(a,!0,'"response" body "expires_in" property',di,{body:n}),n.expires_in=a,n}(a,o,l);let d;try{d=await u}catch(n){if(Jn(n,i))return Hn(e,t,Ge(Ge({},i),{},{flag:Fn}));Pn(n)}return Mn(e,{request_uri:d.request_uri})}function Kn(e){if(!(e instanceof On))throw Tn('"config" must be an instance of Configuration',En);if(Object.getPrototypeOf(e)!==On.prototype)throw Tn("subclassing Configuration is not allowed",Sn)}function Wn(e){return e?AbortSignal.timeout(1e3*e):void 0}function Jn(e,t){return!(null==t||!t.DPoP||t.flag===Fn)&&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 Dt&&"use_dpop_nonce"===e.error}(e)}Object.freeze(On.prototype);const Fn=Symbol();async function Vn(e,t,i,n){Kn(e);const{as:a,c:o,auth:s,fetch:r,tlsOnly:c,timeout:p,decrypt:l}=xn(e),u=await async function(e,t,i,n,a,o){return It(e),Ot(t),kt(n,'"grantType"'),Bt(e,t,i,n,new URLSearchParams(a),o)}(a,o,s,t,new URLSearchParams(i),{[st]:r,[nt]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers(gn),signal:Wn(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 Xt(e,t,i,void 0,null==n?void 0:n[ct],null==n?void 0:n.recognizedTokenTypes)}(a,o,e,{[ct]:l,recognizedTokenTypes:i})}).catch(Pn);return Rn(u),u}async function Bn(e,t,i){if(!an(e))throw new Hi("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Hi('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Hi("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Hi("JWS Payload missing");if("string"!=typeof e.signature)throw new Hi("JWS Signature missing or incorrect type");if(void 0!==e.header&&!an(e.header))throw new Hi("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=zi(e.protected);n=JSON.parse(Ui.decode(t))}catch(e){throw new Hi("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 Hi("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a=Ge(Ge({},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 Mi('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)}(Hi,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 Hi('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:r}=a;if("string"!=typeof r||!r)throw new Hi('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 $i('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new Hi("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Hi("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(ln(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&hn(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(!nn(t))throw new TypeError(Qi(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(mn(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,i);break;default:((e,t,i)=>{if(ln(t))switch(i){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&hn(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)&&hn(e,t,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!nn(t))throw new TypeError(Qi(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(mn(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(i){case"sign":throw new TypeError("".concat(mn(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(mn(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(i){case"verify":throw new TypeError("".concat(mn(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(mn(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?Ci(e.protected):new Uint8Array,Ci("."),"string"==typeof e.payload?s?Ci(e.payload):Ri.encode(e.payload):e.payload);let u;try{u=zi(e.signature)}catch(e){throw new Hi("Failed to base64url decode the signature")}const d=await async function(e,t){if(e instanceof Uint8Array)return e;if(en(e))return e;if(tn(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{un||(un=new WeakMap);let i=un.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("given KeyObject instance cannot be used for this algorithm")}o=e.toCryptoKey(e.asymmetricKeyType,a,n?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError("given KeyObject instance cannot be used for this algorithm");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("given KeyObject instance cannot be used for this algorithm");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("given KeyObject instance cannot be used for this algorithm")}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("given KeyObject instance cannot be used for this algorithm");"ES256"===t&&"P-256"===i&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},a,[n?"verify":"sign"])),"ES384"===t&&"P-384"===i&&(o=e.toCryptoKey({name:"ECDSA",namedCurve:i},a,[n?"verify":"sign"])),"ES512"===t&&"P-521"===i&&(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("given KeyObject instance cannot be used for this algorithm");return i?i[t]=o:un.set(e,{[t]:o}),o})(e,t)}catch(e){if(e instanceof TypeError)throw e}let i=e.export({format:"jwk"});return dn(e,i,t)}if(ln(e))return e.k?zi(e.k):dn(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 Xi("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(!Zi(e.algorithm,"HMAC"))throw Gi("HMAC");const i=parseInt(t.slice(2),10);if(Yi(e.algorithm.hash)!==i)throw Gi("SHA-".concat(i),"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Zi(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Gi("RSASSA-PKCS1-v1_5");const i=parseInt(t.slice(2),10);if(Yi(e.algorithm.hash)!==i)throw Gi("SHA-".concat(i),"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Zi(e.algorithm,"RSA-PSS"))throw Gi("RSA-PSS");const i=parseInt(t.slice(2),10);if(Yi(e.algorithm.hash)!==i)throw Gi("SHA-".concat(i),"algorithm.hash");break}case"Ed25519":case"EdDSA":if(!Zi(e.algorithm,"Ed25519"))throw Gi("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Zi(e.algorithm,t))throw Gi(t);break;case"ES256":case"ES384":case"ES512":{if(!Zi(e.algorithm,"ECDSA"))throw Gi("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 Gi(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 Mi("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 Bi;let m;if(s)try{m=zi(e.payload)}catch(e){throw new Hi("Failed to base64url decode the payload")}else m="string"==typeof e.payload?Ri.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?Ge(Ge({},h),{},{key:d}):h}const Gn=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function Zn(e){const t=Gn.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 Yn=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function Xn(e){return an(e)}var Qn,ea,ta=new WeakMap,ia=new WeakMap;class na{constructor(e){if(Je(this,ta,void 0),Je(this,ia,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Xn)}(e))throw new Wi("JSON Web Key Set malformed");Fe(ta,this,structuredClone(e))}jwks(){return We(ta,this)}async getKey(e,t){const{alg:i,kid:n}=Ge(Ge({},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 Mi('Unsupported "alg" value for a JSON Web Key Set')}}(i),o=We(ta,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 Ji;if(1!==r){const e=new Fi,t=We(ia,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new Ye(e.apply(this,arguments))}}(function*(){for(const e of o)try{yield yield He(aa(t,e,i))}catch(e){}}),e}return aa(We(ia,this),s,i)}}async function aa(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(!an(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 zi(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new Mi('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return pn(Ge(Ge({},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 pn(Ge(Ge({},e),{},{ext:i}));case"EC":case"OKP":return pn(Ge(Ge({},e),{},{alg:t,ext:i}));default:throw new Mi('Unsupported "kty" (Key Type) Parameter value')}}(Ge(Ge({},t),{},{ext:!0}),i);if(e instanceof Uint8Array||"public"!==e.type)throw new Wi("JSON Web Key Set members must be public keys");n[i]=e}return n[i]}function oa(e){const t=new na(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 sa;if("undefined"==typeof navigator||null===(Qn=navigator.userAgent)||void 0===Qn||null===(ea=Qn.startsWith)||void 0===ea||!ea.call(Qn,"Mozilla/5.0 ")){const e="v6.1.3";sa="".concat("jose","/").concat(e)}const ra=Symbol(),ca=Symbol();var pa=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,ma=new WeakMap,ha=new WeakMap,fa=new WeakMap,va=new WeakMap,ga=new WeakMap,ba=new WeakMap;class xa{constructor(e,t){if(Je(this,pa,void 0),Je(this,la,void 0),Je(this,ua,void 0),Je(this,da,void 0),Je(this,ma,void 0),Je(this,ha,void 0),Je(this,fa,void 0),Je(this,va,void 0),Je(this,ga,void 0),Je(this,ba,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,n;Fe(pa,this,new URL(e.href)),Fe(la,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),Fe(ua,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),Fe(da,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),Fe(fa,this,new Headers(null==t?void 0:t.headers)),sa&&!We(fa,this).has("User-Agent")&&We(fa,this).set("User-Agent",sa),We(fa,this).has("accept")||(We(fa,this).set("accept","application/json"),We(fa,this).append("accept","application/jwk-set+json")),Fe(va,this,null==t?void 0:t[ra]),void 0!==(null==t?void 0:t[ca])&&(Fe(ba,this,null==t?void 0:t[ca]),i=null==t?void 0:t[ca],n=We(da,this),"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=n)&&"jwks"in i&&an(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,an)&&(Fe(ma,this,We(ba,this).uat),Fe(ga,this,oa(We(ba,this).jwks))))}pendingFetch(){return!!We(ha,this)}coolingDown(){return"number"==typeof We(ma,this)&&Date.now()<We(ma,this)+We(ua,this)}fresh(){return"number"==typeof We(ma,this)&&Date.now()<We(ma,this)+We(da,this)}jwks(){var e;return null===(e=We(ga,this))||void 0===e?void 0:e.jwks()}async getKey(e,t){We(ga,this)&&this.fresh()||await this.reload();try{return await We(ga,this).call(this,e,t)}catch(i){if(i instanceof Ji&&!1===this.coolingDown())return await this.reload(),We(ga,this).call(this,e,t);throw i}}async reload(){We(ha,this)&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&Fe(ha,this,void 0),We(ha,this)||Fe(ha,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 Vi;throw e});if(200!==a.status)throw new Di("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new Di("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(We(pa,this).href,We(fa,this),AbortSignal.timeout(We(la,this)),We(va,this)).then(e=>{Fe(ga,this,oa(e)),We(ba,this)&&(We(ba,this).uat=Date.now(),We(ba,this).jwks=e),Fe(ma,this,Date.now()),Fe(ha,this,void 0)}).catch(e=>{throw Fe(ha,this,void 0),e})),await We(ha,this)}}const ya=["mfaToken"],wa=["mfaToken"];var _a,ka,Sa,Ea,Ta,Aa,ja,Pa,Ia=class extends Error{constructor(e,t){super(t),Ve(this,"code",void 0),this.name="NotSupportedError",this.code=e}},Oa=class extends Error{constructor(e,t,i){super(t),Ve(this,"cause",void 0),Ve(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},Ra=class extends Oa{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},Ua=class extends Oa{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},Ca=class extends Oa{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},La=class extends Oa{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},za=class extends Oa{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},Da=class extends Error{constructor(e){super(e),Ve(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Na=class extends Oa{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),Ve(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},qa=class extends Oa{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},$a=class extends Oa{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},Ma=class extends Oa{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Ha=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),Ve(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function Ka(e){return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).reduce((e,t)=>Ge(Ge({},e),{},{[t[0]]:t[1]}),{})}var Wa=class extends Error{constructor(e,t,i){super(t),Ve(this,"cause",void 0),Ve(this,"code",void 0),this.code=e,this.cause=i&&{error:i.error,error_description:i.error_description,message:i.message}}},Ja=class extends Wa{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},Fa=class extends Wa{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},Va=class extends Wa{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},Ba=class extends Wa{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function Ga(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var Za=(_a=new WeakMap,ka=new WeakMap,Sa=new WeakMap,class{constructor(e){var t;Je(this,_a,void 0),Je(this,ka,void 0),Je(this,Sa,void 0),Fe(_a,this,"https://".concat(e.domain)),Fe(ka,this,e.clientId),Fe(Sa,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(We(_a,this),"/mfa/authenticators"),{mfaToken:i}=e,n=await We(Sa,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 Ja(e.error_description||"Failed to list authenticators",e)}return(await n.json()).map(Ga)}async enrollAuthenticator(e){const t="".concat(We(_a,this),"/mfa/associate"),{mfaToken:i}=e,n=Ze(e,ya),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 We(Sa,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 Fa(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};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await o.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:i}=e,n="".concat(We(_a,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),a=await We(Sa,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 Va(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(We(_a,this),"/mfa/challenge"),{mfaToken:i}=e,n=Ze(e,wa),a={mfa_token:i,client_id:We(ka,this),challenge_type:n.challengeType};n.authenticatorId&&(a.authenticator_id=n.authenticatorId);const o=await We(Sa,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 Ba(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())}}),Ya=class e{constructor(e,t,i,n,a,o,s){Ve(this,"accessToken",void 0),Ve(this,"idToken",void 0),Ve(this,"refreshToken",void 0),Ve(this,"expiresAt",void 0),Ve(this,"scope",void 0),Ve(this,"claims",void 0),Ve(this,"authorizationDetails",void 0),Ve(this,"tokenType",void 0),Ve(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}},Xa="openid profile email offline_access",Qa=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 eo(e){if(null==e)throw new za("subject_token is required");if("string"!=typeof e)throw new za("subject_token must be a string");if(0===e.trim().length)throw new za("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new za("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new za("subject_token must not include the 'Bearer ' prefix")}function to(e,t){if(t)for(const[i,n]of Object.entries(t))if(!Qa.has(i))if(Array.isArray(n)){if(n.length>20)throw new za("Parameter '".concat(i,"' exceeds maximum array size of ").concat(20));n.forEach(t=>{e.append(i,t)})}else e.append(i,n)}var io=(Ea=new WeakMap,Ta=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Pa=new WeakSet,class{constructor(e){if(function(e,t){Ke(e,t),t.add(e)}(this,Pa),Je(this,Ea,void 0),Je(this,Ta,void 0),Je(this,Aa,void 0),Je(this,ja,void 0),Ve(this,"mfa",void 0),Fe(Aa,this,e),e.useMtls&&!e.customFetch)throw new Ia("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");this.mfa=new Za({domain:We(Aa,this).domain,clientId:We(Aa,this).clientId,customFetch:We(Aa,this).customFetch})}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Me(Pa,this,no).call(this);if(null!=e&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new Ia("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 Me(Pa,this,ro).call(this,e)}catch(e){throw new qa(e)}}async buildLinkUserUrl(e){try{const t=await Me(Pa,this,ro).call(this,{authorizationParams:Ge(Ge({},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 $a(e)}}async buildUnlinkUserUrl(e){try{const t=await Me(Pa,this,ro).call(this,{authorizationParams:Ge(Ge({},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 Ma(e)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Me(Pa,this,no).call(this),n=Ka(Ge(Ge({},We(Aa,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(Ge(Ge({scope:Xa},n),{},{client_id:We(Aa,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 Ln(t,a),i=await zn(t,e);return Ya.fromTokenEndpointResponse(i)}catch(e){throw new Na(e)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:i}=await Me(Pa,this,no).call(this),n=Ka(Ge(Ge({},We(Aa,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(Ge(Ge({scope:Xa},n),{},{client_id:We(Aa,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 Ln(t,a);return{authReqId:e.auth_req_id,expiresIn:e.expires_in,interval:e.interval}}catch(e){throw new Na(e)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:i}=await Me(Pa,this,no).call(this),n=new URLSearchParams({auth_req_id:t});try{const e=await Vn(i,"urn:openid:params:grant-type:ciba",n);return Ya.fromTokenEndpointResponse(e)}catch(e){throw new Na(e)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new La("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 La("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:i,subjectTokenType:e.accessToken?"urn:ietf:params:oauth:token-type:access_token":"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(e){if(e instanceof za)throw new La(e.message,e.cause);throw e}}async exchangeToken(e){return"connection"in e?Me(Pa,this,ao).call(this,e):Me(Pa,this,oo).call(this,e)}async getTokenByCode(e,t){const{configuration:i}=await Me(Pa,this,no).call(this);try{const n=await Nn(i,e,{pkceCodeVerifier:t.codeVerifier});return Ya.fromTokenEndpointResponse(n)}catch(e){throw new Ra("There was an error while trying to request a token.",e)}}async getTokenByRefreshToken(e){const{configuration:t}=await Me(Pa,this,no).call(this);try{const i=await qn(t,e.refreshToken);return Ya.fromTokenEndpointResponse(i)}catch(e){throw new Ca("The access token has expired and there was an error while trying to refresh it.",e)}}async getTokenByClientCredentials(e){const{configuration:t}=await Me(Pa,this,no).call(this);try{const i=new URLSearchParams({audience:e.audience});e.organization&&i.append("organization",e.organization);const n=await $n(t,i);return Ya.fromTokenEndpointResponse(n)}catch(e){throw new Ua("There was an error while trying to request a token.",e)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:i}=await Me(Pa,this,no).call(this);if(!i.end_session_endpoint){const t=new URL("https://".concat(We(Aa,this).domain,"/v2/logout"));return t.searchParams.set("returnTo",e.returnTo),t.searchParams.set("client_id",We(Aa,this).clientId),t}return function(e,t){Kn(e);const{as:i,c:n,tlsOnly:a}=xn(e),o=zt(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 Me(Pa,this,no).call(this);We(ja,this)||Fe(ja,this,function(e,t){const i=new xa(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(t.jwks_uri),{[ra]:We(Aa,this).customFetch}));const{payload:i}=await async function(e,t,i){var n;const a=await async function(e,t,i){if(e instanceof Uint8Array&&(e=Ui.decode(e)),"string"!=typeof e)throw new Hi("Compact JWS must be a string or Uint8Array");const{0:n,1:a,2:o,length:s}=e.split(".");if(3!==s)throw new Hi("Invalid Compact JWS");const r=await Bn({payload:a,protected:n,signature:o},t,i),c={payload:r.payload,protectedHeader:r.protectedHeader};return"function"==typeof t?Ge(Ge({},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 Ki("JWTs MUST NOT use unencoded payload");const o=function(e,t){let i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{i=JSON.parse(Ui.decode(t))}catch(e){}if(!an(i))throw new Ki("JWT Claims Set must be a top-level JSON object");const{typ:a}=n;if(a&&("string"!=typeof e.typ||Yn(e.typ)!==Yn(a)))throw new Ni('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 Ni('missing required "'.concat(e,'" claim'),i,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(i.iss))throw new Ni('unexpected "iss" claim value',i,"iss","check_failed");if(r&&i.sub!==r)throw new Ni('unexpected "sub" claim value',i,"sub","check_failed");if(c&&!((e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e))))(i.aud,"string"==typeof c?[c]:c))throw new Ni('unexpected "aud" claim value',i,"aud","check_failed");let u;switch(typeof n.clockTolerance){case"string":u=Zn(n.clockTolerance);break;case"number":u=n.clockTolerance;break;case"undefined":u=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:d}=n,m=(e=>Math.floor(e.getTime()/1e3))(d||new Date);if((void 0!==i.iat||p)&&"number"!=typeof i.iat)throw new Ni('"iat" claim must be a number',i,"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new Ni('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>m+u)throw new Ni('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new Ni('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=m-u)throw new qi('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){const e=m-i.iat;if(e-u>("number"==typeof p?p:Zn(p)))throw new qi('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(e<0-u)throw new Ni('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i}(a.protectedHeader,a.payload,i),s={payload:o,protectedHeader:a.protectedHeader};return"function"==typeof t?Ge(Ge({},s),{},{key:a.key}):s}(e.logoutToken,We(ja,this),{issuer:t.issuer,audience:We(Aa,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in i)&&!("sub"in i))throw new Da('either "sid" or "sub" (or both) claims must be present');if("sid"in i&&"string"!=typeof i.sid)throw new Da('"sid" claim must be a string');if("sub"in i&&"string"!=typeof i.sub)throw new Da('"sub" claim must be a string');if("nonce"in i)throw new Da('"nonce" claim is prohibited');if(!("events"in i))throw new Da('"events" claim is missing');if("object"!=typeof i.events||null===i.events)throw new Da('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in i.events))throw new Da('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if("object"!=typeof i.events["http://schemas.openid.net/event/backchannel-logout"])throw new Da('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:i.sid,sub:i.sub}}});async function no(){if(We(Ea,this)&&We(Ta,this))return{configuration:We(Ea,this),serverMetadata:We(Ta,this)};const e=await Me(Pa,this,so).call(this);return Fe(Ea,this,await async function(e,t,i,n,a){const o=await async function(e,t){var i,n;if(!(e instanceof URL))throw Tn('"server" must be an instance of URL',En);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 it('"'.concat("issuerIdentifier",'" must be an instance of URL'),"ERR_INVALID_ARG_TYPE");Ct(e,!0!==(null==n?void 0:n[nt]));const a=i(new URL(e.href)),o=xt(null==n?void 0:n.headers);return o.set("accept","application/json"),((null==n?void 0:n[st])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:yt(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=wt("".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=wt("".concat(t,"/").concat(i?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw it('"options.algorithm" must be "oidc" (default), or "oauth2"',"ERR_INVALID_ARG_VALUE")}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[st]:null==t?void 0:t[kn],[nt]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(Dn),signal:s,headers:new Headers(gn)}):((null==t?void 0:t[kn])||fetch)((Ct(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(Dn)),e.href),{headers:Object.fromEntries(new Headers(Ge({accept:"application/json"},gn)).entries()),body:void 0,method:"GET",redirect:"manual",signal:s})).then(e=>async function(e,t){const i=e;if(!(i instanceof URL)&&i!==Ii)throw it('"expectedIssuerIdentifier" must be an instance of URL',"ERR_INVALID_ARG_TYPE");if(!tt(t,Response))throw it('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");if(200!==t.status)throw gt('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',hi,t);_i(t);const n=await Pi(t);if(kt(n.issuer,'"response" body "issuer" property',di,{body:n}),i!==Ii&&new URL(n.issuer).href!==i.href)throw gt('"response" body "issuer" property does not match the expected value',xi,{expected:i.href,body:n,attribute:"issuer"});return n}(Ii,e)).catch(Pn);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[In]=!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 An("discovered metadata issuer does not match the expected issuer",{code:xi,cause:{expected:e.href,body:r,attribute:"issuer"}})})()),r}(e,a),s=new On(o,t,i,n);let r=xn(s);if(null!=a&&a[kn]&&(r.fetch=a[kn]),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(We(Aa,this).domain)),We(Aa,this).clientId,{use_mtls_endpoint_aliases:We(Aa,this).useMtls},e,{[kn]:We(Aa,this).customFetch})),Fe(Ta,this,We(Ea,this).serverMetadata()),We(Ea,this)[kn]=We(Aa,this).customFetch||fetch,{configuration:We(Ea,this),serverMetadata:We(Ta,this)}}async function ao(e){var t,i;const{configuration:n}=await Me(Pa,this,no).call(this);if("audience"in e||"resource"in e)throw new za("audience and resource parameters are not supported for Token Vault exchanges");eo(e.subjectToken);const a=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:"urn:ietf:params:oauth:token-type:access_token",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),to(a,e.extra);try{const e=await Vn(n,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",a);return Ya.fromTokenEndpointResponse(e)}catch(t){throw new za("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function oo(e){const{configuration:t}=await Me(Pa,this,no).call(this);eo(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),to(i,e.extra);try{const e=await Vn(t,"urn:ietf:params:oauth:grant-type:token-exchange",i);return Ya.fromTokenEndpointResponse(e)}catch(t){throw new za("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function so(){if(!We(Aa,this).clientSecret&&!We(Aa,this).clientAssertionSigningKey&&!We(Aa,this).useMtls)throw new Ha;if(We(Aa,this).useMtls)return(e,t,i,n)=>{i.set("client_id",t.client_id)};let e=We(Aa,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=>Li(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){rn(e,48,"Invalid PKCS#8 structure"),sn(e),rn(e,2,"Expected version field");const t=sn(e);e.pos+=t,rn(e,48,"Expected algorithm identifier"),sn(e),e.pos}(t),(e=>{const t=(e=>{rn(e,6,"Expected algorithm OID");const t=sn(e);return cn(e,t)})(e);if(on(t,[43,101,110]))return"X25519";if(!on(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");rn(e,6,"Expected curve OID");const i=sn(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(on(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 Mi("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 Mi('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,We(Aa,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&&kt(a.kid,'"kid"'),{key:a.key,kid:a.kid}):{};var a;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw it("".concat(t," must be a CryptoKey"),"ERR_INVALID_ARG_TYPE")}(e,t),"private"!==e.type)throw it("".concat(t," must be a private CryptoKey"),"ERR_INVALID_ARG_VALUE")}(i,'"clientPrivateKey.key"'),async(e,a,o,s)=>{var r;const c={alg:Tt(i),kid:n},p=function(e,t){const i=Pt()+At(t);return{jti:Et(),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[rt])||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 it('CryptoKey instances used for signing assertions must include "sign" in their "usages"',"ERR_INVALID_ARG_VALUE");const n="".concat(ht(ut(JSON.stringify(e))),".").concat(ht(ut(JSON.stringify(t)))),a=ht(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Si(e)};case"RSA-PSS":switch(ki(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 ft("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return ki(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new ft("unsupported CryptoKey algorithm name",{cause:e})}(i),i,ut(n)));return"".concat(n,".").concat(a)}(c,p,i))}}(e,void 0)}(e):_n(We(Aa,this).clientSecret)}async function ro(e){const{configuration:t}=await Me(Pa,this,no).call(this),i=Et(),n=await function(e){return async function(e){return kt(e,"codeVerifier"),ht(await crypto.subtle.digest("SHA-256",ut(e)))}(e)}(i),a=Ka(Ge(Ge({},We(Aa,this).authorizationParams),null==e?void 0:e.authorizationParams)),o=new URLSearchParams(Ge(Ge({scope:Xa},a),{},{client_id:We(Aa,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await Hn(t,o):await Mn(t,o),codeVerifier:i}}class co extends y{constructor(e,t){super(e,t),Object.setPrototypeOf(this,co.prototype)}static fromPayload(e){let{error:t,error_description:i}=e;return new co(t,i)}}class po extends co{constructor(e,t){super(e,t),Object.setPrototypeOf(this,po.prototype)}}class lo extends co{constructor(e,t){super(e,t),Object.setPrototypeOf(this,lo.prototype)}}class uo extends co{constructor(e,t){super(e,t),Object.setPrototypeOf(this,uo.prototype)}}class mo extends co{constructor(e,t){super(e,t),Object.setPrototypeOf(this,mo.prototype)}}class ho extends co{constructor(e,t){super(e,t),Object.setPrototypeOf(this,ho.prototype)}}class fo{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 vo{constructor(e,t){this.authJsMfaClient=e,this.auth0Client=t,this.contextManager=new fo}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 po("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 Ja)throw new po(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=qe[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 Fa)throw new lo(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 Ba)throw new uo(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 ho("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 mo("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 mo("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 A)this.setMFAAuthDetails(e.mfa_token,n,a,e.mfa_requirements);else if(e instanceof mo)throw new mo(e.error,e.error_description);throw e}}}const go=new v;class bo{constructor(e){let t,i;if(this.userCache=(new ce).enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const e=Array.from(this.activeLockKeys);for(const t of e)await go.releaseLock(t);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},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(!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 ")})(),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||"memory",!Pe(t))throw new Error('Invalid cache location "'.concat(t,'"'));i=Pe(t)()}var n;this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?be:xe,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:ye;var o;this.scope=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];if("object"!=typeof e)return{default:ae(t,e,...n)};let o={default:ae(t,...n)};return Object.keys(e).forEach(i=>{const a=e[i];o[i]=ae(t,a,...n)}),o}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new le(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||x,this.cacheManager=new pe(i,i.allKeys?void 0:new Ae(i,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Ce(this.options.clientId):void 0,this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),r=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new De(r,s),this.authJsClient=new io({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new vo(this.authJsClient.mfa,this),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Se)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(e){const t=this.options.auth0Client||b,i=z(t,!0),n=encodeURIComponent(btoa(JSON.stringify(i)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(n)}_authorizeUrl(e){return this._url("/authorize?".concat(D(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(q(n)),s={__raw:e},r={};return Object.keys(o).forEach(e=>{s[e]=o[e],de.includes(e)||(r[e]=o[e])}),{encoded:{header:i,payload:n,signature:a},header:JSON.parse(q(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&&!ue(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||!ue(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ue(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&&ue(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&&ue(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})}async _prepareAuthorizeUrl(e,t,i){var n;const a=C(U()),o=C(U()),s=U(),r=await N(s),c=$(r),p=await(null===(n=this.dpop)||void 0===n?void 0:n.calculateThumbprint()),l=((e,t,i,n,a,o,s,r,c)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:oe(t,i.scope,i.audience),response_type:"code",response_mode:r||"query",state:n,nonce:a,redirect_uri:s||e.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256",dpop_jkt:c}))(this.options,this.scope,e,a,o,c,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode,p),u=this._authorizeUrl(l);return{nonce:o,code_verifier:s,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:a,url:u}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(e,",top=").concat(t,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new T;const n=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=n.url;const a=await(e=>new Promise((t,i)=>{let n;const a=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(a),clearTimeout(o),window.removeEventListener("message",n,!1),i(new E(e.popup)))},1e3),o=setTimeout(()=>{clearInterval(a),i(new S(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(o),clearInterval(a),window.removeEventListener("message",n,!1),!1!==e.closePopup&&e.popup.close(),s.data.response.error)return i(y.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",n)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(n.state!==a.state)throw new y("state_mismatch","Invalid state");const o=(null===(i=e.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:a.code,redirect_uri:n.redirect_uri},{nonceIn:n.nonce,organization:o})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=Ie(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=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:p}=c,l=n(c,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},l),{appState:o,response_type:we.Code}),r&&{organization:r}));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===we.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 w(a,o||a,n,t.appState);if(!t.code_verifier||t.state&&t.state!==n)throw new y("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:we.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:i,state:n,error:a,error_description:o}=e;if(a)throw new _(a,o||a,t.connection,n,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===n))throw new y("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:we.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,i;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:oe(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(i=e.authorizationParams)||void 0===i?void 0:i.audience)||this.options.authorizationParams.audience)})}),a=await((e,t)=>{let i=Ee[t];return i||(i=e().finally(()=>{delete Ee[t],i=null}),Ee[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||"default",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;if(!await Te(()=>go.acquireLock(a,5e3),10))throw new k;this.activeLockKeys.add(a),1===this.activeLockKeys.size&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if("off"!==t){const e=await this._getEntryFromCache({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",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})}finally{await go.releaseLock(a),this.activeLockKeys.delete(a),0===this.activeLockKeys.size&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;const a=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:oe(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},g),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new se({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",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(D(Object.assign({clientId:e.clientId},a))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const i=Ie(e),{openUrl:a}=i,o=n(i,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const s=this._buildLogoutUrl(o);a?await a(s):!1!==a&&window.location.assign(s)}async _getTokenFromIFrame(e){const t=(i=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(i));var i;if(!await Te(()=>go.acquireLock(t,5e3),10))throw new k;try{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 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 d=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 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?a(y.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,u,l);if(a!==d.state)throw new y("state_mismatch","Invalid state");const m=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:r,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},m),{scope:c,oauthTokenScope:m.scope,audience:p})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}finally{await go.releaseLock(t)}}async _getTokenUsingRefreshToken(e){var t,i;const n=await this.cacheManager.get(new se({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",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 j(e.authorizationParams.audience||"default",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,p=e.authorizationParams.audience,l=e.authorizationParams.scope,!(r===p&&Oe(l,c)||Oe(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 P(e.authorizationParams.audience||"default",i)}return Object.assign(Object.assign({},t),{scope:e.authorizationParams.scope,oauthTokenScope:t.scope,audience:e.authorizationParams.audience||"default"})}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 A&&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,p,l}async _saveEntryInCache(e){const{id_token:t,decodedToken:i}=e,a=n(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{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||"default",t=this.scope[e],i=await this.cacheManager.getIdToken(new se({clientId:this.options.clientId,audience:e,scope:t})),n=this.userCache.get("@@user@@");return i&&i.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",i),i)}async _getEntryFromCache(e){let{scope:t,audience:i,clientId:n,cacheMode:a}=e;const o=await this.cacheManager.get(new se({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 ne(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("@@user@@"))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},r),{decodedToken:c,scope:e.scope,audience:e.audience||"default"}),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:oe(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization}))}async 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 ze(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=C(U()),c=U(),p=await N(c),l=$(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:we.ConnectCode});const h=new URL(u);h.searchParams.set("ticket",d.ticket),t?await t(h.toString()):window.location.assign(h)}async _requestTokenForMfa(e,t){const{mfaToken:i}=e,a=n(e,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},a),{mfa_token:i}),t)}}async function xo(e){const t=new bo(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(M(e,Uint8Array)){var t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(M(e,ArrayBuffer)||e&&M(e.buffer,ArrayBuffer))return m(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(M(e,SharedArrayBuffer)||e&&M(e.buffer,SharedArrayBuffer)))return m(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var 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||H(e.length)?r(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),r(e<0?0:0|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)||M(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,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 I(this,t,i);case"utf8":case"utf-8":return T(this,t,i);case"ascii":return j(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b(e,t,i,n,a){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),H(i=+i)&&(i=a?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(a)return-1;i=e.length-1}else if(i<0){if(!a)return-1;i=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1: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(H(r))return s;e[i+s]=r}return s}function w(e,t,i,n){return $(N(t,e.length-i),e,i,n)}function _(e,t,i,n){return $(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 $(q(t),e,i,n)}function S(e,t,i,n){return $(function(e,t){for(var i,n,a,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(i=e.charCodeAt(s))>>8,a=i%256,o.push(a),o.push(n);return o}(t,e.length-i),e,i,n)}function E(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function T(e,t,i){i=Math.min(e.length,i);for(var n=[],a=t;a<i;){var o,s,r,c,p=e[a],l=null,u=p>239?4:p>223?3:p>191?2:1;if(a+u<=i)switch(u){case 1:p<128&&(l=p);break;case 2:128==(192&(o=e[a+1]))&&(c=(31&p)<<6|63&o)>127&&(l=c);break;case 3:o=e[a+1],s=e[a+2],128==(192&o)&&128==(192&s)&&(c=(15&p)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[a+1],s=e[a+2],r=e[a+3],128==(192&o)&&128==(192&s)&&128==(192&r)&&(c=(15&p)<<18|(63&o)<<12|(63&s)<<6|63&r)>65535&&c<1114112&&(l=c)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=A));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(M(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,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(M(o,Uint8Array))a+o.length>n.length?c.from(o).copy(n,a):Uint8Array.prototype.set.call(n,o,a);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a)}a+=o.length}return n},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,i,n,a){if(M(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===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 A=4096;function j(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(127&e[a]);return n}function P(e,t,i){var n="";i=Math.min(e.length,i);for(var a=t;a<i;++a)n+=String.fromCharCode(e[a]);return n}function I(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var a="",o=t;o<i;++o)a+=K[e[o]];return a}function O(e,t,i){for(var n=e.slice(t,i),a="",o=0;o<n.length-1;o+=2)a+=String.fromCharCode(n[o]+256*n[o+1]);return a}function R(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 C(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||C(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||C(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||R(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||R(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||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(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||R(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||R(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||R(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||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(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||R(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||R(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||R(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||R(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(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 $(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 M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var K=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:()=>C,AnnotationType:()=>se,ArtifactType:()=>fe,AssetStatus:()=>oe,AssetUrlType:()=>we,AutoAnnotateStatus:()=>ae,AutoAnnotateTask:()=>ce,ChangeType:()=>ge,ContourType:()=>P,DEFAULT_PREDICTION_VERSION:()=>k,DataApiType:()=>te,DataEndpoint:()=>Te,Endpoint:()=>V,EndpointState:()=>g,EvaluationStatus:()=>_e,ExportedBy:()=>he,EyePop:()=>ne,EyepopLineDecoder:()=>y,ForwardOperatorType:()=>T,InferenceType:()=>A,LoadFromAssetUuidJob:()=>q,LoadFromJob:()=>N,LoadLiveIngressJob:()=>$,LoadMediaStreamJob:()=>M,ModelExportStatus:()=>me,ModelFormat:()=>xe,ModelPrecisionType:()=>ye,ModelStatus:()=>de,ModelTask:()=>ue,ModelTrainingStage:()=>ve,ModelType:()=>le,MotionModel:()=>j,PopComponentType:()=>E,PredictionVersion:()=>_,Semaphore:()=>W,SessionStatus:()=>G,Stream:()=>b,TranscodeMode:()=>pe,TransientPopId:()=>B,UploadJob:()=>D,UserReview:()=>re,VideoMode:()=>S,VlmAbilityStatus:()=>ke,WebrtcBase:()=>R,WebrtcWhep:()=>Ae,WebrtcWhip:()=>U,WorkerEndpoint:()=>Q,WorkflowPhase:()=>be,default:()=>Pe,getBaseUrl:()=>ie,readableStreamFromString:()=>w}),e.exports=(n=v,d(s({},"__esModule",{value:!0}),n));var g=(e=>(e.Idle="Idle",e.Busy="Busy",e.Authenticating="Authenticating",e.FetchConfig="FetchConfig",e.Error="Error",e.NotAvailable="NotAvailable",e))(g||{}),b=class e{constructor(e,t){this.iterator=e,this.controller=t}static iterFromReadableStream(e,t,i){let n=!1;return async function*(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let a=!1;try{for await(const t of async function*(){const t=new y,i=function(e){if(e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();const t=e.getReader();return{async next(){try{const e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}(await e);for await(let e of i)for(const i of t.decode(e))yield i;for(const e of t.flush())yield e}())if(!a&&t){const e=JSON.parse(t),n=e.event;void 0!==n?await i(n):yield e}a=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{a||t.abort()}}()}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],i=[],n=this.iterator(),a=e=>({next:()=>{if(0===e.length){const e=n.next();t.push(e),i.push(e)}return e.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(i),this.controller)]}},x=class e{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let i=this.decodeText(t);if(this.trailingCR&&(i="\r"+i,this.trailingCR=!1),i.endsWith("\r")&&(this.trailingCR=!0,i=i.slice(0,-1)),!i)return[];const n=e.NEWLINE_CHARS.has(i[i.length-1]||"");let a=i.split(e.NEWLINE_REGEXP);return 1!==a.length||n?(this.buffer.length>0&&(a=[this.buffer.join("")+a[0],...a.slice(1)],this.buffer=[]),n||(this.buffer=[a.pop()||""]),a):(this.buffer.push(a[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==a){if(e instanceof a)return e.toString();if(e instanceof Uint8Array)return a.from(e).toString();throw new Error(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new Error(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new Error("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}};x.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","","","","
","\u2028","\u2029"]),x.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var y=x;function w(e){return new ReadableStream({start(t){t.enqueue(a.from(e)),t.close()}})}var _=(e=>(e[e.V1=1]="V1",e[e.V2=2]="V2",e))(_||{}),k=2,S=(e=>(e.STREAM="stream",e.BUFFER="buffer",e))(S||{}),E=(e=>(e.FORWARD="forward",e.INFERENCE="inference",e.TRACING="tracing",e.TRACKING="tracking",e.CONTOUR_FINDER="contour_finder",e.COMPONENT_FINDER="component_finder",e))(E||{}),T=(e=>(e.FULL="full",e.CROP="crop",e.CROP_WITH_FULL_FALLBACK="crop_with_full_fallback",e))(T||{}),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||{}),j=(e=>(e.RANDOM_WALK="random_walk",e.CONSTANT_VELOCITY="constant_velocity",e.CONSTANT_ACCELERATION="constant_acceleration",e))(j||{}),P=(e=>(e.ALL_PIXELS="all_pixels",e.POLYGON="polygon",e.CONVEX_HULL="convex_hull",e.HOUGH_CIRCLES="hough_circles",e.CIRCLE="circle",e.TRIANGLE="triangle",e.RECTANGLE="rectangle",e))(P||{}),I=i(182),O=((e,t,i)=>(i=null!=e?o(p(e)):{},d(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(942)),R=class e{constructor(e,t,i,n,a,o){this._getSession=e,this._client=t,this._requestLogger=o,this._ingressId=i,this._urlPath=`${n}/${this._ingressId}`,this._is_pipeline_direct=a,this._pc=null,this._eTag="",this._location=null,this._queuedCandidates=[],this._offerData=null}async close(){const e=this._pc;if(this._pc=null,e)return e.close()}ingressId(){return this._ingressId}gresUrl(e,t=null){let i,n;if(this._is_pipeline_direct){if(!e.pipelineId)throw new Error("cannot connect with is_pipeline_direct=true but !session.pipelineId");i=O.default.join("pipelines",e.pipelineId,this._urlPath)}else i=this._urlPath;return t&&(i=O.default.join(i,t)),n=e.baseUrl?.endsWith("/")?e.baseUrl:e.baseUrl+"/",new URL(i,n)}async onLocalOffer(t){if(!this._pc)throw new Error("onLocalOffer no peer connection");if(!t.sdp)throw new Error("onLocalOffer no sdp");this._offerData=e.parseOffer(t.sdp),await this._pc.setLocalDescription(t);const i=await this._getSession(),n=this.gresUrl(i),a={...i.authenticationHeaders(),"Content-Type":"application/sdp"},o=await this._client.fetch(n,{headers:a,method:"POST",body:t.sdp});return o.status>=300?Promise.reject(`unknown status code for POST '${n}': ${o.status} (${o.statusText})`):(this._eTag=o.headers.get("ETag")??"",this._location=o.headers.get("Location"),await this.onRemoteAnswer(new RTCSessionDescription({type:"answer",sdp:await o.text()})))}async sendLocalCandidates(t){if(!this._offerData)throw new Error("sendLocalCandidates no offerData");const i=await this._getSession(),n=this.gresUrl(i,this._location),a={...i.authenticationHeaders(),"Content-Type":"application/trickle-ice-sdpfrag","If-Match":this._eTag},o=await this._client.fetch(n,{headers:a,method:"PATCH",body:e.generateSdpFragment(this._offerData,t)});return o.status>=300?Promise.reject(`unknown status code for PATCH '${n}': ${o.status} (${o.statusText})`):this}async onLocalCandidate(e){return null!==e.candidate&&(""===this._eTag?this._queuedCandidates.push(e.candidate):await this.sendLocalCandidates([e.candidate])),this}static linkToIceServers(e){return(null!==e?e.split(", ").map(e=>{let t=e.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);return t||(t=e.match(/^(.+?); rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i)),t?{urls:[t[1]],username: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 R{constructor(e,t,i,n,a){super(t,i,(0,I.v4)().toString(),"liveIngress/whip",n,a),this._stream=e}async start(){const e=await this._getSession(),t=this.gresUrl(e),i=await this._client.fetch(t,{headers:e.authenticationHeaders(),method:"GET"});return i.status>=300?Promise.reject(`unknown status code for GET '${t}': ${i.status} (${i.statusText})`):await this.onIceServers(i)}async stream(){return this._stream?Promise.resolve(this._stream):Promise.reject("fetching stream failed")}async onRemoteAnswer(e){if(!this._pc)throw new Error("onLocalOffer no peer connection");return await this._pc.setRemoteDescription(new RTCSessionDescription(e)),0!==this._queuedCandidates.length&&(await this.sendLocalCandidates(this._queuedCandidates),this._queuedCandidates=[]),this}async onIceServers(e){if(!this._stream)throw new Error("onIceServers no stream");const t=this._stream,i=new RTCPeerConnection({iceServers:R.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()}},C=class{constructor(e,t,i,n,a=k){this._responseStream=null,this._controller=new AbortController,this._getSession=t,this._params=e??null,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(200!=a.status){n(`upload error ${a.status}: ${await a.text()}`);break}if(a.body){i(a.body);break}{const e=await a.text();if(e){i(w(e));break}n("response body is empty");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")}};C.n=0;var L,z,D=class extends C{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=this._videoMode?`&videoMode=${this._videoMode}`:"",a=this._version?`&version=${this._version}`:"",o=`${t.baseUrl.replace(/\/+$/,"")}/pipelines/${t.pipelineId}/source?mode=queue&processing=async&sourceId=${e.source_id}${n}${a}`;if(this._params){const e=JSON.stringify(this._params),n=new Blob([e],{type:"application/json"}),a=new FormData,s=await new Response(this._uploadStream).blob();a.append("params",n),a.append("file",s);const r={...t.authenticationHeaders(),Accept:"application/jsonl"};i=this._client.fetch(o,{headers:r,method:"POST",body:a,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(o,{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 ${o}`)}).catch(e=>{this._requestLogger.debug(`error ${e} for POST ${o}`)})}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=this._videoMode?`&videoMode=${this._videoMode}`:"",n=this._version?`&version=${this._version}`:"",a=`${e.baseUrl.replace(/\/+$/,"")}/pipelines/${e.pipelineId}/source?mode=queue&processing=sync${i}${n}`;if(this._params){const i=JSON.stringify(this._params),n=new Blob([i],{type:"application/json"}),o=new FormData,s=await new Response(this._uploadStream).blob();o.append("params",n),o.append("file",s);const r={...e.authenticationHeaders(),Accept:"application/jsonl"};t=await this._client.fetch(a,{headers:r,method:"POST",body:o,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 C{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,version:this._version},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 C{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,version:this._version},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}})}},$=class extends C{constructor(e,t,i,n,a){super(t,i,n,a),this._ingressId=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={sourceType:"LIVE_INGRESS",liveIngressId:this._ingressId,params:this._params,version:this._version},i={...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:i,method:"PATCH",body:JSON.stringify(t),signal:this._controller.signal,eyepop:{responseStreaming:!0}})}},M=class extends C{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,version:this._version},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 Ie=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*Oe(e){for await(const t of e)yield t}L=async(e,t)=>{const n=f(),a=i(122),o=Oe((await a.open(e.path,"r")).createReadStream());return{stream:Ie(o),mimeType:e.mimeType?e.mimeType:n.lookup(e.path)||"image/*"}}}function H(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 Re{constructor(e){this._logger=e}async fetch(e,t){const i=H(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 Re(e)}else{class Ue{constructor(e,t){this._agent=e,this._logger=t}async fetch(e,t){t||(t={}),t.dispatcher=this._agent;const i=H(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 Ue(t,e)}}var K,W=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),F=i(262);K="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,F.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 V=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 W(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 W(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 K(this._options.auth.oAuth2,this._options);this._token=e.accessToken,this._expire_token_time=e.validUntil/1e3}else{if(void 0===this._options.auth.apiKey||!this._options.eyepopUrl)return Promise.reject("no valid auth option");{const t={Authorization:`Bearer ${this._options.auth.apiKey}`},i=`${this.eyepopUrl()}/v1/auth/authenticate`,n=await this._client.fetch(i,{method:"POST",headers:t});if(200!=n.status){const e=await n.text();return Promise.reject(`Unexpected status ${n.status}: ${e}`)}const a=await n.json();this._token=a.access_token,this._expire_token_time=e+a.expires_in-60}}}}finally{this.updateState()}}return this._logger.debug("using access token, valid for at least %d seconds",this._expire_token_time-e),this._token}},B=(e=>(e.Transient="transient",e))(B||{}),G=(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))(G||{}),Z=e=>new Promise(t=>setTimeout(t,e)),Y=class e extends V{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.file?this.uploadFile(e,t):void 0!==e.stream?this.uploadStream(e,t):void 0!==e.path?this.uploadPath(e,t):void 0!==e.url?this.loadFrom(e,t):void 0!==e.assetUuid?this.loadFromAssetUuid(e,t):void 0!==e.mediaStream?this.loadMediaStream(e,t):Promise.reject("unknown source type")}async uploadFile(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.file,e.file.type,e.file.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))return Promise.reject("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new D(e.stream,e.mimeType,e.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async uploadPath(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{let i;this.updateState(),i=this._options.platformSupport?.resolvePath?await this._options.platformSupport.resolvePath(e,this._logger):await L(e,this._logger);const n=new D(i.stream,i.mimeType,i.size,e.videoMode,t,async()=>this.session(),this._client,this._requestLogger);return n.start(()=>{this.jobDone(n)},e=>{this.jobStatus(n,e)})}catch(e){throw this._limit.release(),e}}async loadFrom(e,t){if(e.url.startsWith("file://"))return await this.uploadPath({path:e.url.substring(7)},t);if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new N(e.url,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadFromAssetUuid(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new q(e.assetUuid,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}async loadMediaStream(e,t){if(!(this._baseUrl&&this._pipelineId&&this._client&&this._limit))throw new Error("endpoint not connected, use connect()");await this._limit.acquire();try{this.updateState();const i=new M(e.mediaStream,t,async()=>this.session(),this._client,this._requestLogger);return i.start(()=>{this.jobDone(i)},e=>{this.jobStatus(i,e)})}catch(e){throw this._limit.release(),e}}jobDone(e){this._limit?.release(),this.updateState()}jobStatus(e,t){404==t?this.statusHandler404(t):401==t&&this.statusHandler401(t)}async reconnect(){return"transient"==this.options().popId?(await this.startComputeSession(),this._pipelineId=await this.startTransientPipeline()):await this.startWebApiSessionWithPopId(),this.updateState(),Promise.resolve(this)}async startWebApiSessionWithPopId(){if(!this._client)throw new Error("endpoint not initialized");const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=false`,t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig");let i=await this._client.fetch(e,{headers:t});if(401==i.status){this._requestLogger.debug("GET %s: 401, about to retry with fresh access token",e),this.statusHandler401(i.status);const t={Authorization:await this.authorizationHeader()};this.updateState("FetchConfig"),i=await this._client.fetch(e,{headers:t})}if(200!=i.status){const e=await i.text();throw 429==i.status?this.updateState("NotAvailable",e):this.updateState("Error",e),new Error(`Unexpected status ${i.status}: ${e}`)}let n=await i.json();if(!n.base_url&&this.options().autoStart){const e=`${this.eyepopWebApiUrl()}/pops/${this.options().popId}/config?auto_start=true`;this._requestLogger.debug("pop was not running, trying to autostart with: %s",e);const t={Authorization:await this.authorizationHeader()};if(i=await this._client.fetch(e,{headers:t}),200!=i.status){this.updateState("Error");const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}n=await i.json()}const a=new URL(n.base_url,this.eyepopUrl());if(this._baseUrl=a.toString(),this._baseUrl){if(this._baseUrl=this._baseUrl.replace(/\/+$/,""),this._pipelineId=n.pipeline_id,this._popName=n.name,!this._pipelineId||!this._baseUrl)throw new Error("Pop not started");const e=`${this._baseUrl}/pipelines/${this._pipelineId}`,t={Authorization:await this.authorizationHeader()};let i=await this._client.fetch(e,{method:"GET",headers:t});if(i.status>200){const e=await i.text();throw new Error(`Unexpected status ${i.status}: ${e}`)}if(this._pipeline=await i.json(),this.options().stopJobs){const e={sourceType:"NONE"},t={Authorization:await this.authorizationHeader(),"Content-Type":"application/json"},i=`${this._baseUrl}/pipelines/${this._pipeline.id}/source?mode=preempt&processing=sync`;let n=await this._client.fetch(i,{method:"PATCH",headers:t,body:JSON.stringify(e)});if(n.status>=300){const e=await n.text();throw new Error(`Unexpected status ${n.status}: ${e}`)}}}}async startComputeSession(){if(!this._client)throw new Error("endpoint not initialized");let t=null;const i=`${this.eyepopUrl()}/v1/sessions`;this._requestLogger.debug("fetching sessions from: %s",i);const n={Authorization:await this.authorizationHeader()};let a,o=await this._client.fetch(i,{headers:n});if(404==o.status)a=[];else{if(200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} fetching compute sessions: ${e}`)}a=await o.json()}if(a.length>0){this._logger.debug(`User has ${a.length} sessions, inspecting for active session`);for(let i of a)if(!e.SESSION_DEAD.has(i.session_status)){t=i,this._logger.debug(`Use active session ${i.session_uuid} with pipeline ${i.pipeline_uuid}`);break}}if(!t){if(this._requestLogger.debug("creating a new session at: %s",i),o=await this._client.fetch(i,{headers:n,method:"POST"}),200!=o.status){this.updateState("Error");const e=await o.text();throw new Error(`Unexpected status ${o.status} creating a compute session: ${e}`)}if(a=await o.json(),0==a.length)throw new Error("Unexpected, no compute session after attempt to create one");t=a[0]||null}if(!t)throw new Error("unexpected undefined session");let s=!1;const r=Date.now()+e.WAIT_FOR_IS_READY;for(;!s;){const i=`${t.session_endpoint}/health`;if(o=await this._client.fetch(i,{headers:n}),o.status<300)s=!0;else{if(Date.now()>r)throw new Error(`Created session ${t.session_uuid} did not become healthy after ${e.WAIT_FOR_IS_READY/1e3} seconds`);this._logger.debug(`session ${t.session_uuid} health check status ${o.status}, wait and poll for update`),await 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 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}};Y.SESSION_DEAD=new Set(["error","failed","stopped","pipeline_error","unknown"]),Y.WAIT_FOR_IS_READY=6e4,Y.CHECK_FOR_IS_READY_INTERVAL=250;var X,Q=Y;function ee(){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 te=(e=>(e.dataset="dataset",e.vlm="vlm",e))(te||{});function ie(e,t){switch(t){case"dataset":return e.datasetApiUrl??"";case"vlm":return e.vlmApiUrl??"";default:throw new Error(`unsupported type ${t}`)}}var ne,ae=(e=>(e.error="error",e.requested="requested",e.in_progress="in_progress",e.completed="completed",e))(ae||{}),oe=(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))(oe||{}),se=(e=>(e.ground_truth="ground_truth",e.prediction="prediction",e.auto="auto",e))(se||{}),re=(e=>(e.approved="approved",e.rejected="rejected",e.unknown="unknown",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.epdet_b1="epdet_b1",e.imported="imported",e.vlm_ability="vlm_ability",e))(le||{}),ue=(e=>(e.object_detection="object_detection",e.image_classification="image_classification",e.keypoint_detection="keypoint_detection",e))(ue||{}),de=(e=>(e.error="error",e.draft="draft",e.requested="requested",e.in_progress="in_progress",e.available="available",e.published="published",e))(de||{}),me=(e=>(e.in_progress="in_progress",e.finished="finished",e.error="error",e))(me||{}),he=(e=>(e.eyepop="eyepop",e.qc_ai_hub="qc_ai_hub",e))(he||{}),fe=(e=>(e.eyepop_bundle="eyepop_bundle",e.weights_file="weights_file",e))(fe||{}),ve=(e=>(e.waiting="waiting",e.scheduling="scheduling",e.preparing="preparing",e.training="training",e.exporting="exporting",e))(ve||{}),ge=(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))(ge||{}),be=(e=>(e.unknown="Unknown",e.pending="Pending",e.running="Running",e.succeeded="Succeeded",e.failed="Failed",e.error="Error",e))(be||{}),xe=(e=>(e.TensorFlowLite="TensorFlowLite",e.TensorFlowGraphDef="TensorFlowGraphDef",e.ONNX="ONNX",e.TorchScript="TorchScript",e.TorchScriptCpu="TorchScriptCpu",e.TorchScriptCuda="TorchScriptCuda",e.PyTorch="PyTorch",e.ModelLess="ModelLess",e))(xe||{}),ye=(e=>(e.float32="float32",e.float16="float16",e.int32="int32",e.int8="int8",e.uint8="uint8",e))(ye||{}),we=(e=>(e.gcs="gcs",e.s3="s3",e.https_signed="https_signed",e))(we||{}),_e=(e=>(e.success="success",e.failed="failed",e))(_e||{}),ke=(e=>(e.draft="draft",e.published="published",e))(ke||{}),Se=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")}},Ee=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")}},Te=class extends V{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=ee(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=ee(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=ie(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(ee(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){const a=t?`&dataset_version=${t}`:"",o=i?"&include_annotations=true":"",s=n?`&top_k=${n}`:"";return this.request(`/assets?dataset_uuid=${e}${a}${o}${s}`,{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 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 Se(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 Ee(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),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),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 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"}})}},Ae=class extends R{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:R.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())})}},je=e=>{if("undefined"!=typeof process)return process.env?.[e]??void 0};(e=>{const t=je("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})(je("EYEPOP_LOCAL_MODE"))),e.isLocalMode&&(e.eyepopUrl="http://127.0.0.1:8080"),a(e),void 0===e.auth){if(!e.isLocalMode)throw new Error("auth option or EYEPOP_API_KEY environment variable is required");e.auth={isLocal:!0}}return void 0===e.popId&&(e.popId=je("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 Q(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=je("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=je("EYEPOP_ACCOUNT_ID")),void 0!==e.auth.session&&void 0!==e.auth.session&&e.auth.session.accountId&&(e.accountId=e.auth.session.accountId),new Te(e)}})(ne||(ne={}));var Pe=ne},182(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var n=i(196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return n.default}});var a=i(465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return a.default}});var o=i(178);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=i(11);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var r=i(425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}});var c=i(568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var p=i(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return p.default}});var l=i(286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return l.default}});var u=i(557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}});var d=i(356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var m=i(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return m.default}});var h=i(299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return h.default}});var f=i(746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return f.default}});var v=i(770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return v.default}})},196(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338(e,t){"use strict";function i(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function a(e,t,i,a,o,s){return n((r=n(n(t,e),n(a,s)))<<(c=o)|r>>>32-c,i);var r,c}function o(e,t,i,n,o,s,r){return a(t&i|~t&n,e,t,o,s,r)}function s(e,t,i,n,o,s,r){return a(t&n|i&~n,e,t,o,s,r)}function r(e,t,i,n,o,s,r){return a(t^i^n,e,t,o,s,r)}function c(e,t,i,n,o,s,r){return a(i^(t|~n),e,t,o,s,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<4*e.length;i++)t[i]=e[i>>2]>>>i%4*8&255;return t}(function(e,t){const a=new Uint32Array(i(t)).fill(0);a.set(e),a[t>>5]|=128<<t%32,a[a.length-1]=t,e=a;let p=1732584193,l=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const i=p,a=l,m=u,h=d;p=o(p,l,u,d,e[t],7,-680876936),d=o(d,p,l,u,e[t+1],12,-389564586),u=o(u,d,p,l,e[t+2],17,606105819),l=o(l,u,d,p,e[t+3],22,-1044525330),p=o(p,l,u,d,e[t+4],7,-176418897),d=o(d,p,l,u,e[t+5],12,1200080426),u=o(u,d,p,l,e[t+6],17,-1473231341),l=o(l,u,d,p,e[t+7],22,-45705983),p=o(p,l,u,d,e[t+8],7,1770035416),d=o(d,p,l,u,e[t+9],12,-1958414417),u=o(u,d,p,l,e[t+10],17,-42063),l=o(l,u,d,p,e[t+11],22,-1990404162),p=o(p,l,u,d,e[t+12],7,1804603682),d=o(d,p,l,u,e[t+13],12,-40341101),u=o(u,d,p,l,e[t+14],17,-1502002290),l=o(l,u,d,p,e[t+15],22,1236535329),p=s(p,l,u,d,e[t+1],5,-165796510),d=s(d,p,l,u,e[t+6],9,-1069501632),u=s(u,d,p,l,e[t+11],14,643717713),l=s(l,u,d,p,e[t],20,-373897302),p=s(p,l,u,d,e[t+5],5,-701558691),d=s(d,p,l,u,e[t+10],9,38016083),u=s(u,d,p,l,e[t+15],14,-660478335),l=s(l,u,d,p,e[t+4],20,-405537848),p=s(p,l,u,d,e[t+9],5,568446438),d=s(d,p,l,u,e[t+14],9,-1019803690),u=s(u,d,p,l,e[t+3],14,-187363961),l=s(l,u,d,p,e[t+8],20,1163531501),p=s(p,l,u,d,e[t+13],5,-1444681467),d=s(d,p,l,u,e[t+2],9,-51403784),u=s(u,d,p,l,e[t+7],14,1735328473),l=s(l,u,d,p,e[t+12],20,-1926607734),p=r(p,l,u,d,e[t+5],4,-378558),d=r(d,p,l,u,e[t+8],11,-2022574463),u=r(u,d,p,l,e[t+11],16,1839030562),l=r(l,u,d,p,e[t+14],23,-35309556),p=r(p,l,u,d,e[t+1],4,-1530992060),d=r(d,p,l,u,e[t+4],11,1272893353),u=r(u,d,p,l,e[t+7],16,-155497632),l=r(l,u,d,p,e[t+10],23,-1094730640),p=r(p,l,u,d,e[t+13],4,681279174),d=r(d,p,l,u,e[t],11,-358537222),u=r(u,d,p,l,e[t+3],16,-722521979),l=r(l,u,d,p,e[t+6],23,76029189),p=r(p,l,u,d,e[t+9],4,-640364487),d=r(d,p,l,u,e[t+12],11,-421815835),u=r(u,d,p,l,e[t+15],16,530742520),l=r(l,u,d,p,e[t+2],23,-995338651),p=c(p,l,u,d,e[t],6,-198630844),d=c(d,p,l,u,e[t+7],10,1126891415),u=c(u,d,p,l,e[t+14],15,-1416354905),l=c(l,u,d,p,e[t+5],21,-57434055),p=c(p,l,u,d,e[t+12],6,1700485571),d=c(d,p,l,u,e[t+3],10,-1894986606),u=c(u,d,p,l,e[t+10],15,-1051523),l=c(l,u,d,p,e[t+1],21,-2054922799),p=c(p,l,u,d,e[t+8],6,1873313359),d=c(d,p,l,u,e[t+15],10,-30611744),u=c(u,d,p,l,e[t+6],15,-1560198380),l=c(l,u,d,p,e[t+13],21,1309151649),p=c(p,l,u,d,e[t+4],6,-145523070),d=c(d,p,l,u,e[t+11],10,-1120210379),u=c(u,d,p,l,e[t+2],15,718787259),l=c(l,u,d,p,e[t+9],21,-343485551),p=n(p,i),l=n(l,a),u=n(u,m),d=n(d,h)}return Uint32Array.of(p,l,u,d)}(function(e){if(0===e.length)return new Uint32Array;const t=new Uint32Array(i(8*e.length)).fill(0);for(let i=0;i<e.length;i++)t[i>>2]|=(255&e[i])<<i%4*8;return t}(e),8*e.length))}},779(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:i}},465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},178(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},697(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291(e,t){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(16);t.default=function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(n)}},829(e,t){"use strict";function i(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,r=Math.ceil(s/16),c=new Array(r);for(let t=0;t<r;++t){const i=new Uint32Array(16);for(let n=0;n<16;++n)i[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];c[t]=i}c[r-1][14]=8*(e.length-1)/Math.pow(2,32),c[r-1][14]=Math.floor(c[r-1][14]),c[r-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<r;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=c[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=a[0],r=a[1],p=a[2],l=a[3],u=a[4];for(let e=0;e<80;++e){const a=Math.floor(e/20),c=n(s,5)+i(a,r,p,l)+u+t[a]+o[e]>>>0;u=l,l=p,p=n(r,30)>>>0,r=s,s=c}a[0]=a[0]+s>>>0,a[1]=a[1]+r>>>0,a[2]=a[2]+p>>>0,a[3]=a[3]+l>>>0,a[4]=a[4]+u>>>0}return Uint8Array.of(a[0]>>24,a[0]>>16,a[0]>>8,a[0],a[1]>>24,a[1]>>16,a[1]>>8,a[1],a[2]>>24,a[2]>>16,a[2]>>8,a[2],a[3]>>24,a[3]>>16,a[3]>>8,a[3],a[4]>>24,a[4]>>16,a[4]>>8,a[4])}},11(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const n=i(746),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const i=o(e,t);if(!(0,n.default)(i))throw TypeError("Stringified UUID is invalid");return i}},425(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const n=i(291),a=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9])),e.msecs=t,e}function r(e,t,i,n,a,o,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),i??=0,n??=16383&(e[8]<<8|e[9]),a??=e.slice(10,16);const r=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[s++]=r>>>24&255,o[s++]=r>>>16&255,o[s++]=r>>>8&255,o[s++]=255&r;const c=t/4294967296*1e4&268435455;o[s++]=c>>>8&255,o[s++]=255&c,o[s++]=c>>>24&15|16,o[s++]=c>>>16&255,o[s++]=n>>>8|128,o[s++]=255&n;for(let e=0;e<6;++e)o[s++]=a[e];return o}t.updateV1State=s,t.default=function(e,t,i){let c;const p=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=r(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,i);else{const e=Date.now(),a=(0,n.default)();s(o,e,a),c=r(a,o.msecs,o.nsecs,p?void 0:o.clockseq,p?void 0:o.node,t,i)}return t??(0,a.unsafeStringify)(c)}},568(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(178),a=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&i[6])<<4|i[7]>>4&15,(15&i[7])<<4|(240&i[4])>>4,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,(15&i[1])<<4|(240&i[2])>>4,96|15&i[2],i[3],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,a.unsafeStringify)(t):t}},591(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=i(338),a=i(988);var o=i(988);function s(e,t,i,o){return(0,a.default)(48,n.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=a.DNS,s.URL=a.URL,t.default=s},988(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const n=i(178),a=i(11);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}t.stringToBytes=o,t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t.default=function(e,t,i,s,r,c){const p="string"==typeof i?o(i):i,l="string"==typeof s?(0,n.default)(s):s;if("string"==typeof s&&(s=(0,n.default)(s)),16!==s?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+p.length);if(u.set(l),u.set(p,l.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){c=c||0;for(let e=0;e<16;++e)r[c+e]=u[e];return r}return(0,a.unsafeStringify)(u)}},286(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(779),a=i(291),o=i(11);t.default=function(e,t,i){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,a.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},557(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const n=i(829),a=i(988);var o=i(988);function s(e,t,i,o){return(0,a.default)(80,n.default,e,t,i,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=a.DNS,s.URL=a.URL,t.default=s},356(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(11),a=i(425),o=i(568);t.default=function(e,t,i){e??={},i??=0;let s=(0,a.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[i+e]=s[e];return t}return(0,n.unsafeStringify)(s)}},268(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(178),a=i(11);t.default=function(e){const t=(i="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&i[3])<<4|i[4]>>4&15,(15&i[4])<<4|(240&i[5])>>4,(15&i[5])<<4|15&i[6],i[7],(15&i[1])<<4|(240&i[2])>>4,(15&i[2])<<4|(240&i[3])>>4,16|(240&i[0])>>4,(15&i[0])<<4|(240&i[1])>>4,i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]));var i;return"string"==typeof e?(0,a.unsafeStringify)(t):t}},299(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const n=i(291),a=i(11),o={};function s(e,t,i){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=i[6]<<23|i[7]<<16|i[8]<<8|i[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function r(e,t,i,n,a=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(a<0||a+16>n.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else n=new Uint8Array(16),a=0;return t??=Date.now(),i??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[a++]=t/1099511627776&255,n[a++]=t/4294967296&255,n[a++]=t/16777216&255,n[a++]=t/65536&255,n[a++]=t/256&255,n[a++]=255&t,n[a++]=112|i>>>28&15,n[a++]=i>>>20&255,n[a++]=128|i>>>14&63,n[a++]=i>>>6&255,n[a++]=i<<2&255|3&e[10],n[a++]=e[11],n[a++]=e[12],n[a++]=e[13],n[a++]=e[14],n[a++]=e[15],n}t.updateV7State=s,t.default=function(e,t,i){let c;if(e)c=r(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,i);else{const e=Date.now(),a=(0,n.default)();s(o,e,a),c=r(a,o.msecs,o.seq,t,i)}return t??(0,a.unsafeStringify)(c)}},746(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(697);t.default=function(e){return"string"==typeof e&&n.default.test(e)}},770(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(746);t.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(797)})());
|