"use strict"; module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=n(1),o=n(98).default,i=n(106),a=n(126),s=r.createServer(function(e,t){return a.info("Starting SSO Dashboard Extension - Version:","2.4.1"),o(e,t)});e.exports=function(e,t,n){t.x_wt&&t.x_wt.ectx&&t.x_wt.ectx.PUBLIC_WT_URL||!1||i.setValue("PUBLIC_WT_URL",r.urlHelpers.getWebtaskUrl(t)),s(e,t,n)}},function(e,t,n){const r=n(2),o=n(5),i=n(7),a=n(91);e.exports.createServer=r.createServer,e.exports.urlHelpers=o,e.exports.middlewares=i,e.exports.routes=a},function(e,t,n){const r=n(3),o=n(4);e.exports.createServer=function(e){const t=r.createServer(e);var n=null;return o.fromExpress(function(e,r){return n||(n=t(e.webtaskContext)),n(e,r)})}},function(e,t){e.exports=require("auth0-extension-tools@1.3.2")},function(e,t){e.exports=require("webtask-tools")},function(e,t,n){const r=n(6),o=3,i=2,a=1,s=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports.getBasePath=function(e){return t=e.originalUrl||"",n=e.path,(o=(o=r.parse(t).pathname||"").replace(n,"").replace(/^\/|\/$/g,"")).startsWith("/")||(o="/"+o),o.endsWith("/")||(o+="/"),o;var t,n,o},e.exports.getBaseUrl=function(e,t){var n=t;const o=r.parse(e.originalUrl||"").pathname||"";return r.format({protocol:n||"https",host:e.headers.host,pathname:o.replace(e.path,"").replace(/\/$/g,"")})},e.exports.getWebtaskUrl=function(e){const t=function(e){if(!e.container)return null;const t=e.container.replace(s,"\\$&"),n=e.jtn?e.jtn.replace(s,"\\$&"):"";if(e.url_format===a)return new RegExp("^/api/run/"+t+"/(?:"+n+"/?)?");if(e.url_format===i)return new RegExp("^/"+t+"/(?:"+n+"/?)?");if(e.url_format===o)return new RegExp("^/(?:"+n+"/?)?");throw new Error("Unsupported webtask URL format.")}(e.x_wt),n=e.url,u=e.url.replace(t,"/"),c=r.parse(u||"").pathname,l=e.x_wt&&e.x_wt.ectx&&e.x_wt.ectx.ISOLATED_DOMAIN||!1,f=r.parse(n||"").pathname||"";var p;if(l){p=r.format({protocol:"https",host:e.headers.host,pathname:f.replace(c,"").replace(/\/$/g,"")});const t=".it.auth0.com/api/run/"+e.x_wt.container+"/",n=function(e,t){if(!e)return null;const n=e.indexOf("sandbox8")>=0?"8":"";return"https://"+t+"."+(e.split(".it.auth0.com")[0].split("-")[1]||"us")+n+".webtask.io/"}(p,e.x_wt.container);p.indexOf(t)>=0&&(p=p.replace("https://"+e.headers.host+"/api/run/"+e.x_wt.container+"/",n))}else p=f;return p}},function(e,t){e.exports=require("url")},function(e,t,n){e.exports.authenticateAdmins=n(8),e.exports.authenticateUsers=n(21),e.exports.requireAuthentication=n(86),e.exports.errorHandler=n(87),e.exports.managementApiClient=n(88),e.exports.validateHookToken=n(89),e.exports.webtaskConfig=n(90)},function(e,t,n){const r=n(9),o=n(12),i=n(3),a=n(18);e.exports=function(e){if(!e||"object"!=typeof e)throw new i.ArgumentError("Must provide the options");if(null===e.secret||void 0===e.secret)throw new i.ArgumentError("Must provide a valid secret");if("string"!=typeof e.secret||0===e.secret.length)throw new i.ArgumentError("The provided secret is invalid: "+e.secret);if(null===e.audience||void 0===e.audience)throw new i.ArgumentError("Must provide a valid secret");if("string"!=typeof e.audience||0===e.audience.length)throw new i.ArgumentError("The provided audience is invalid: "+e.audience);if(null===e.baseUrl||void 0===e.baseUrl)throw new i.ArgumentError("Must provide a valid base URL");if("string"!=typeof e.baseUrl||0===e.baseUrl.length)throw new i.ArgumentError("The provided base URL is invalid: "+e.baseUrl);const t=o({audience:e.audience,issuer:e.baseUrl,secret:e.secret,algorithms:["HS256"],credentialsRequired:e.credentialsRequired||!0});return function(n,r,o){t(n,r,function(t){return t?o(t):e.onLoginSuccess?e.onLoginSuccess(n,r,o):o()})}},e.exports.optional=function(t){const n=e.exports(t);return a(function(e){if(e&&e.headers&&e.headers.authorization&&0===e.headers.authorization.indexOf("Bearer "))try{const n=r(e.headers.authorization.split(" ")[1]);return n&&n.iss===t.baseUrl}catch(e){return!1}return!1},n)}},function(e,t,n){"use strict";var r=n(10);function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new o("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=o},function(e,t,n){var r=n(11);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return r(t)}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u}},function(e,t,n){var r=n(13),o=n(14),i=n(15),a=n(16),s=n(17),u=function(e,t,n){return n(null,!1)},c={}.toString;e.exports=function(e){if(!e||!e.secret)throw new Error("secret should be set");var t,n,l=e.secret;(n=l)&&"[object Function]"==c.call(n)||(t=l,l=function(e,n,r){return r(null,t)});var f=e.isRevoked||u,p=e.userProperty||e.requestProperty||"user",d=void 0===e.credentialsRequired||e.credentialsRequired,h=function(t,n,i){var u;if("OPTIONS"===t.method&&t.headers.hasOwnProperty("access-control-request-headers")&&!!~t.headers["access-control-request-headers"].split(",").map(function(e){return e.trim()}).indexOf("authorization"))return i();if(void 0!==e.skip&&(console.warn("WARN: express-jwt: options.skip is deprecated"),console.warn("WARN: use app.use(jwt(options).unless({path: '/x'}))"),e.skip.indexOf(t.url)>-1))return i();if(e.getToken&&"function"==typeof e.getToken)try{u=e.getToken(t)}catch(e){return i(e)}else if(t.headers&&t.headers.authorization){var c=t.headers.authorization.split(" ");if(2!=c.length)return i(new o("credentials_bad_format",{message:"Format is Authorization: Bearer [token]"}));var h=c[0],v=c[1];if(!/^Bearer$/i.test(h))return i(new o("credentials_bad_scheme",{message:"Format is Authorization: Bearer [token]"}));u=v}if(!u)return d?i(new o("credentials_required",{message:"No authorization token was found"})):i();var g=r.decode(u,{complete:!0})||{};a.waterfall([function(e){4==l.length?l(t,g.header,g.payload,e):l(t,g.payload,e)},function(t,n){r.verify(u,t,e,function(e,t){e&&d?n(new o("invalid_token",e)):n(null,t)})},function(e,n){f(t,g.payload,function(t,r){t?n(t):r?n(new o("revoked_token",{message:"The token has been revoked."})):n(null,e)})}],function(e,n){if(e)return i(e);s(t,p,n),i()})};return h.unless=i,h}},function(e,t){e.exports=require("jsonwebtoken@7.1.9")},function(e,t){function n(e,t){Error.call(this,t.message),Error.captureStackTrace(this,this.constructor),this.name="UnauthorizedError",this.message=t.message,this.code=e,this.status=401,this.inner=t}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.exports=n},function(e,t,n){var r=n(6);e.exports=function(e){var t=this,n="function"==typeof e?{custom:e}:e;return n.useOriginalUrl=void 0===n.useOriginalUrl||n.useOriginalUrl,function(e,o,i){var a=r.parse((n.useOriginalUrl?e.originalUrl:e.url)||e.url||"",!0),s=!1;n.custom&&(s=s||n.custom(e));var u=!n.path||Array.isArray(n.path)?n.path:[n.path];u&&(s=s||u.some(function(t){return function e(t,n){var r="string"==typeof t&&t===n||t instanceof RegExp&&!!t.exec(n);t instanceof RegExp&&(t.lastIndex=0);t&&t.url&&(r=e(t.url,n));return r}(t,a.pathname)&&function(e,t){if(!e)return!0;return!!~(e=Array.isArray(e)?e:[e]).indexOf(t)}(t.methods,e.method)}));var c=!n.ext||Array.isArray(n.ext)?n.ext:[n.ext];c&&(s=s||c.some(function(e){return a.pathname.substr(-1*e.length)===e}));var l=!n.method||Array.isArray(n.method)?n.method:[n.method];if(l&&(s=s||!!~l.indexOf(e.method)),s)return i();t(e,o,i)}}},function(e,t,n){var r;!function(){var n,o={};function i(){}function a(e){return e}function s(e){return!!e}function u(e){return!e}var c="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function l(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}function f(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}null!=c&&(n=c.async),o.noConflict=function(){return c.async=n,o};var p=Object.prototype.toString,d=Array.isArray||function(e){return"[object Array]"===p.call(e)};function h(e){return d(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}function v(e,t){for(var n=-1,r=e.length;++n3?e(r,o,u,s):(a=i,i=o,e(r,u,s))}}function I(e,t){return t}function L(e,t,n){n=n||i;var r=h(t)?[]:{};e(t,function(e,t,n){e(_(function(e,o){o.length<=1&&(o=o[0]),r[t]=o,n(e)}))},function(e){n(e,r)})}function P(e,t,n,r){var o=[];e(t,function(e,t,r){n(e,function(e,t){o=o.concat(t||[]),r(e)})},function(e){r(e,o)})}function N(e,t,n){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");function r(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,d(t)||(t=[t]),0===t.length&&e.idle())return o.setImmediate(function(){e.drain()});v(t,function(t){var o={data:t,callback:r||i};n?e.tasks.unshift(o):e.tasks.push(o),e.tasks.length===e.concurrency&&e.saturated()}),o.setImmediate(e.process)}function a(e,t){return function(){s-=1;var n=!1,r=arguments;v(t,function(e){v(u,function(t,r){t!==e||n||(u.splice(r,1),n=!0)}),e.callback.apply(e,r)}),e.tasks.length+s===0&&e.drain(),e.process()}}var s=0,u=[],c={tasks:[],concurrency:t,payload:n,saturated:i,empty:i,drain:i,started:!1,paused:!1,push:function(e,t){r(c,e,!1,t)},kill:function(){c.drain=i,c.tasks=[]},unshift:function(e,t){r(c,e,!0,t)},process:function(){for(;!c.paused&&sr?1:0}o.map(e,function(e,n){t(e,function(t,r){t?n(t):n(null,{value:e,criteria:r})})},function(e,t){if(e)return n(e);n(null,g(t.sort(r),function(e){return e.value}))})},o.auto=function(e,t,n){"function"==typeof arguments[1]&&(n=t,t=null),n=f(n||i);var r=b(e),a=r.length;if(!a)return n(null);t||(t=a);var s={},u=0,c=!1,l=[];function p(e){l.unshift(e)}function h(){a--,v(l.slice(0),function(e){e()})}p(function(){a||n(null,s)}),v(r,function(r){if(!c){for(var i,a=d(e[r])?e[r]:[e[r]],f=_(function(e,t){if(u--,t.length<=1&&(t=t[0]),e){var i={};l=function(e,t){i[t]=e},v(b(a=s),function(e){l(a[e],e)}),i[r]=t,c=!0,n(e,i)}else s[r]=t,o.setImmediate(h);var a,l}),g=a.slice(0,a.length-1),m=g.length;m--;){if(!(i=e[g[m]]))throw new Error("Has nonexistent dependency in "+g.join(", "));if(d(i)&&y(i,r)>=0)throw new Error("Has cyclic dependencies")}w()?(u++,a[a.length-1](f,s)):p(function e(){w()&&(u++,(t=y(l,e))>=0&&l.splice(t,1),a[a.length-1](f,s));var t})}function w(){return u3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function c(e,t){function n(e,n){return function(r){e(function(e,t){r(!e||n,{err:e,result:t})},t)}}function r(e){return function(t){setTimeout(function(){t(null)},e)}}for(;s.times;){var i=!(s.times-=1);a.push(n(s.task,i)),!i&&s.interval>0&&a.push(r(s.interval))}o.series(a,function(t,n){n=n[n.length-1],(e||s.callback)(n.err,n.result)})}return u<=2&&"function"==typeof e&&(n=t,t=e),"function"!=typeof e&&function(e,t){if("number"==typeof t)e.times=parseInt(t,10)||r;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);e.times=parseInt(t.times,10)||r,e.interval=parseInt(t.interval,10)||i}}(s,e),s.callback=n,s.task=t,s.callback?c():c},o.waterfall=function(e,t){if(t=f(t||i),!d(e)){var n=new Error("First argument to waterfall must be an array of functions");return t(n)}if(!e.length)return t();!function e(n){return _(function(r,o){if(r)t.apply(null,[r].concat(o));else{var i=n.next();i?o.push(e(i)):o.push(t),D(n).apply(null,o)}})}(o.iterator(e))()},o.parallel=function(e,t){L(o.eachOf,e,t)},o.parallelLimit=function(e,t,n){L(E(t),e,n)},o.series=function(e,t){L(o.eachOfSeries,e,t)},o.iterator=function(e){return function t(n){function r(){return e.length&&e[n].apply(null,arguments),r.next()}return r.next=function(){return n>>1);n(t,e[i])>=0?r=i:o=i-1}return r}(e.tasks,s,n)+1,0,s),e.tasks.length===e.concurrency&&e.saturated(),o.setImmediate(e.process)})}(r,e,t,a)},delete r.unshift,r},o.cargo=function(e,t){return N(e,1,t)},o.log=q("log"),o.dir=q("dir"),o.memoize=function(e,t){var n={},r={},i=Object.prototype.hasOwnProperty;t=t||a;var s=_(function(a){var s=a.pop(),u=t.apply(null,a);i.call(n,u)?o.setImmediate(function(){s.apply(null,n[u])}):i.call(r,u)?r[u].push(s):(r[u]=[s],e.apply(null,a.concat([_(function(e){n[u]=e;var t=r[u];delete r[u];for(var o=0,i=t.length;o-1&&e%1==0&&e-1},N.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},q.prototype.clear=function(){this.__data__={hash:new P,map:new(U||N),string:new P}},q.prototype.delete=function(e){return z(this,e).delete(e)},q.prototype.get=function(e){return z(this,e).get(e)},q.prototype.has=function(e){return z(this,e).has(e)},q.prototype.set=function(e,t){return z(this,e).set(e,t),this};var F=V(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Z(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return f.test(e)&&n.push(""),e.replace(p,function(e,t,r,o){n.push(r?o.replace(d,"$1"):t||e)}),n});function J(e){if("string"==typeof e||Z(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(V.Cache||q),r}function W(e,t){return e===t||e!=e&&t!=t}V.Cache=q;var G=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&j.call(e)==u}e.exports=function(e,t,n){return null==e?e:H(e,t,n)}},function(e,t,n){"use strict";var r=n(19);e.exports=function(e,t,n){return function(o,i,a){var s=r(a);return!0===e||"function"==typeof e&&e(o,i,s)?t(o,i,s):n?n(o,i,s):s()}}},function(e,t,n){var r=n(20);function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(o),e.exports.strict=r(i),o.proto=o(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})})},function(e,t){e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){r[e]=t[e]});return r;function r(){for(var e=new Array(arguments.length),n=0;n1)return n.logger("No KID specified and JWKS endpoint returned more than 1 key"),t(new u.default("No KID specified and JWKS endpoint returned more than 1 key"));var a=o.find(function(t){return!i||t.kid===e});return a?t(null,a):(n.logger("Unable to find a signing key that matches '"+e+"'"),t(new u.default("Unable to find a signing key that matches '"+e+"'")))})},this.options=r({rateLimit:!1,cache:!0,timeout:3e4},t),this.logger=(0,i.default)("jwks"),this.options.rateLimit&&(this.getSigningKey=(0,l.rateLimitSigningKey)(this,t)),this.options.cache&&(this.getSigningKey=(0,l.cacheSigningKey)(this,t))}return o(e,[{key:"getKeys",value:function(e){var t=this;this.logger("Fetching keys from '"+this.options.jwksUri+"'"),(0,a.default)({uri:this.options.jwksUri,strictSSL:this.options.strictSsl,headers:this.options.requestHeaders,agentOptions:this.options.requestAgentOptions,proxy:this.options.proxy,timeout:this.options.timeout},function(n,r){if(n){var o=n.response;return t.logger("Failure:",o&&o.data||n),e(o?new s.default(o.data||o.statusText||"Http Error "+o.status):n)}return t.logger("Keys:",r.data.keys),e(null,r.data.keys)})}},{key:"getSigningKeys",value:function(e){var t=this;this.getKeys(function(n,r){if(n)return e(n);if(!r||!r.length)return e(new s.default("The JWKS endpoint did not contain any keys"));var o=r.filter(function(e){return"RSA"===e.kty&&((!e.hasOwnProperty("use")||"sig"===e.use)&&(e.x5c&&e.x5c.length||e.n&&e.e))}).map(function(e){var t={kid:e.kid,nbf:e.nbf};return e.x5c&&e.x5c.length?(t.publicKey=(0,c.certToPEM)(e.x5c[0]),t.getPublicKey=function(){return t.publicKey}):(t.rsaPublicKey=(0,c.rsaPublicKeyToPEM)(e.n,e.e),t.getPublicKey=function(){return t.rsaPublicKey}),t});return o.length?(t.logger("Signing Keys:",o),e(null,o)):e(new s.default("The JWKS endpoint did not contain any signing keys"))})}}]),e}()},function(e,t){e.exports=require("debug@2.2.0")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u},function(e,t,n){"use strict";var r=n(30);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(30),o=n(41),i=n(33),a=n(44),s=n(47),u=n(48),c=n(42);e.exports=function(e){return new Promise(function(t,l){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",v=e.auth.password||"";p.Authorization="Basic "+btoa(h+":"+v)}var g=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),i(g,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,l,r),d=null}},d.onabort=function(){d&&(l(c("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(c(t,e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(49),y=(e.withCredentials||u(g))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),l(e),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(e,t,n){"use strict";var r=n(42);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(43);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(45),o=n(46);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(30),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(30);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(30);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(30),o=n(41),i=n(44),a=n(33),s=n(26),u=n(27),c=n(51).http,l=n(51).https,f=n(6),p=n(54),d=n(55),h=n(42),v=n(43),g=/https:?/;e.exports=function(e){return new Promise(function(t,n){var m=function(e){t(e)},y=function(e){n(e)},b=e.data,w=e.headers;if(w["User-Agent"]||w["user-agent"]||(w["User-Agent"]="axios/"+d.version),b&&!r.isStream(b)){if(Buffer.isBuffer(b));else if(r.isArrayBuffer(b))b=Buffer.from(new Uint8Array(b));else{if(!r.isString(b))return y(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));b=Buffer.from(b,"utf-8")}w["Content-Length"]=b.length}var _=void 0;e.auth&&(_=(e.auth.username||"")+":"+(e.auth.password||""));var x=i(e.baseURL,e.url),k=f.parse(x),S=k.protocol||"http:";if(!_&&k.auth){var E=k.auth.split(":");_=(E[0]||"")+":"+(E[1]||"")}_&&delete w.Authorization;var O=g.test(S),j=O?e.httpsAgent:e.httpAgent,A={path:a(k.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:w,agent:j,agents:{http:e.httpAgent,https:e.httpsAgent},auth:_};e.socketPath?A.socketPath=e.socketPath:(A.hostname=k.hostname,A.port=k.port);var T,C=e.proxy;if(!C&&!1!==C){var U=S.slice(0,-1)+"_proxy",R=Object({AUTHZ_API_URL:"adf6e2f2b84784b57522e3b19dfc9201/api",NODE_ENV:"production",CLIENT_VERSION:"2.4.1"})[U]||Object({AUTHZ_API_URL:"adf6e2f2b84784b57522e3b19dfc9201/api",NODE_ENV:"production",CLIENT_VERSION:"2.4.1"})[U.toUpperCase()];if(R){var I=f.parse(R),L=Object({AUTHZ_API_URL:"adf6e2f2b84784b57522e3b19dfc9201/api",NODE_ENV:"production",CLIENT_VERSION:"2.4.1"}).no_proxy||Object({AUTHZ_API_URL:"adf6e2f2b84784b57522e3b19dfc9201/api",NODE_ENV:"production",CLIENT_VERSION:"2.4.1"}).NO_PROXY,P=!0;if(L)P=!L.split(",").map(function(e){return e.trim()}).some(function(e){return!!e&&("*"===e||("."===e[0]&&k.hostname.substr(k.hostname.length-e.length)===e||k.hostname===e))});if(P&&(C={host:I.hostname,port:I.port},I.auth)){var N=I.auth.split(":");C.auth={username:N[0],password:N[1]}}}}if(C&&(A.hostname=C.host,A.host=C.host,A.headers.host=k.hostname+(k.port?":"+k.port:""),A.port=C.port,A.path=S+"//"+k.hostname+(k.port?":"+k.port:"")+A.path,C.auth)){var q=Buffer.from(C.auth.username+":"+C.auth.password,"utf8").toString("base64");A.headers["Proxy-Authorization"]="Basic "+q}var B=O&&(!C||g.test(C.protocol));e.transport?T=e.transport:0===e.maxRedirects?T=B?u:s:(e.maxRedirects&&(A.maxRedirects=e.maxRedirects),T=B?l:c),e.maxContentLength&&e.maxContentLength>-1&&(A.maxBodyLength=e.maxContentLength);var M=T.request(A,function(t){if(!M.aborted){var n=t;switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=204===t.statusCode?n:n.pipe(p.createUnzip()),delete t.headers["content-encoding"]}var r=t.req||M,i={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:r};if("stream"===e.responseType)i.data=n,o(m,y,i);else{var a=[];n.on("data",function(t){a.push(t),e.maxContentLength>-1&&Buffer.concat(a).length>e.maxContentLength&&(n.destroy(),y(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,r)))}),n.on("error",function(t){M.aborted||y(v(t,e,null,r))}),n.on("end",function(){var t=Buffer.concat(a);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding)),i.data=t,o(m,y,i)})}}});M.on("error",function(t){M.aborted||y(v(t,e,null,M))}),e.timeout&&M.setTimeout(e.timeout,function(){M.abort(),y(h("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",M))}),e.cancelToken&&e.cancelToken.promise.then(function(e){M.aborted||(M.abort(),y(e))}),r.isStream(b)?b.on("error",function(t){y(v(t,e,null,M))}).pipe(M):M.end(b)})}},function(e,t,n){var r=n(6),o=n(26),i=n(27),a=n(52),s=n(53).Writable,u=n(24)("follow-redirects"),c={GET:!0,HEAD:!0,OPTIONS:!0,TRACE:!0},l=Object.create(null);function f(e,t){s.call(this),e.headers=e.headers||{},this._options=e,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e.host&&(e.hostname||(e.hostname=e.host),delete e.host),t&&this.on("response",t);var n=this;if(this._onNativeResponse=function(e){n._processResponse(e)},!e.pathname&&e.path){var r=e.path.indexOf("?");r<0?e.pathname=e.path:(e.pathname=e.path.substring(0,r),e.search=e.path.substring(r))}this._performRequest()}function p(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(o){var i=o+":",s=n[i]=e[o],c=t[o]=Object.create(s);c.request=function(e,o){return"string"==typeof e?(e=r.parse(e)).maxRedirects=t.maxRedirects:e=Object.assign({protocol:i,maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e),e.nativeProtocols=n,a.equal(e.protocol,i,"protocol mismatch"),u("options",e),new f(e,o)},c.get=function(e,t){var n=c.request(e,t);return n.end(),n}}),t}["abort","aborted","error","socket","timeout"].forEach(function(e){l[e]=function(t){this._redirectable.emit(e,t)}}),f.prototype=Object.create(s.prototype),f.prototype.write=function(e,t,n){if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new Error("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Error("Request body larger than maxBodyLength limit")),this.abort()):n&&n()},f.prototype.end=function(e,t,n){"function"==typeof e?(n=e,e=t=null):"function"==typeof t&&(n=t,t=null);var r=this._currentRequest;this.write(e||"",t,function(){r.end(null,null,n)})},f.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},f.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach(function(e){f.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(f.prototype,e,{get:function(){return this._currentRequest[e]}})}),f.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.substr(0,e.length-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i in this._currentUrl=r.format(this._options),o._redirectable=this,l)i&&o.on(i,l[i]);if(this._isRedirect){var a=0,s=this._requestBodyBuffers;!function e(){if(a=300&&e.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var n,o=this._options.headers;if(307!==e.statusCode&&!(this._options.method in c))for(n in this._options.method="GET",this._requestBodyBuffers=[],o)/^content-/i.test(n)&&delete o[n];if(!this._isRedirect)for(n in o)/^host$/i.test(n)&&delete o[n];var i=r.resolve(this._currentUrl,t);u("redirecting to",i),Object.assign(this._options,r.parse(i)),this._isRedirect=!0,this._performRequest(),e.destroy()}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=p({http:o,https:i}),e.exports.wrap=p},function(e,t){e.exports=require("assert")},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("zlib")},function(e){e.exports=JSON.parse('{"_from":"axios@^0.19.2","_id":"axios@0.19.2","_inBundle":false,"_integrity":"sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==","_location":"/jwks-rsa/axios","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"axios@^0.19.2","name":"axios","escapedName":"axios","rawSpec":"^0.19.2","saveSpec":null,"fetchSpec":"^0.19.2"},"_requiredBy":["/jwks-rsa"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.19.2.tgz","_shasum":"3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27","_spec":"axios@^0.19.2","_where":"/Users/danbaker/workspace/auth0-sso-dashboard-extension/node_modules/jwks-rsa","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundleDependencies":false,"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"1.5.10"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.2"}')},function(e,t,n){"use strict";var r=n(30);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(e){void 0!==t[e]&&(n[e]=t[e])}),r.forEach(i,function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])}),r.forEach(a,function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])});var s=o.concat(i).concat(a),u=Object.keys(t).filter(function(e){return-1===s.indexOf(e)});return r.forEach(u,function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(57);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksError",this.message=e}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";function r(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="SigningKeyNotFoundError",this.message=e}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";function r(e){var t=e[0];return t<"0"||t>"7"?"00"+e:e}function o(e){var t=e.toString(16);return t.length%2?"0"+t:t}function i(e){if(e<=127)return o(e);var t=o(e);return o(128+t.length/2)+t}Object.defineProperty(t,"__esModule",{value:!0}),t.certToPEM=function(e){return e="-----BEGIN CERTIFICATE-----\n"+(e=e.match(/.{1,64}/g).join("\n"))+"\n-----END CERTIFICATE-----\n"},t.rsaPublicKeyToPEM=function(e,t){var n=new Buffer(e,"base64"),o=new Buffer(t,"base64"),a=r(n.toString("hex")),s=r(o.toString("hex")),u=a.length/2,c=s.length/2,l=i(u),f=i(c),p="30"+i(u+c+l.length/2+f.length/2+2)+"02"+l+a+"02"+f+s,d=new Buffer(p,"hex").toString("base64"),h="-----BEGIN RSA PUBLIC KEY-----\n";return h+=""+d.match(/.{1,64}/g).join("\n"),h+="\n-----END RSA PUBLIC KEY-----\n"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rateLimitSigningKey=t.cacheSigningKey=void 0;var r=i(n(64)),o=i(n(74));function i(e){return e&&e.__esModule?e:{default:e}}t.cacheSigningKey=r.default,t.rateLimitSigningKey=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:options,n=t.cacheMaxEntries,a=void 0===n?5:n,s=t.cacheMaxAge,u=void 0===s?(0,r.default)("10m"):s,c=(0,o.default)("jwks"),l=e.getSigningKey;return c("Configured caching of singing keys. Max: "+a+" / Age: "+u),(0,i.default)({load:function(e,t){l(e,function(n,r){return n?t(n):(c("Caching signing key for '"+e+"':",r),t(null,r))})},hash:function(e){return e},maxAge:u,max:a})};var r=a(n(65)),o=a(n(24)),i=a(n(66));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=require("ms@0.7.1")},function(e,t,n){"use strict";var r=n(67);e.exports=r.asyncMemoizer},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(68)),u=n(69),c=a(n(70)),l=n(72),f=n(73);function p(e){var t=new s.default(e),n=e.load,r=e.hash,a=e.bypass,f=e.itemMaxAge,p=e.freeze,d=e.clone,h=e.queueMaxAge||1e3,v=new Map,g=new u.EventEmitter,m=Object.assign({del:function(){for(var e=[],n=0;nDate.now())return g.queue.push(c),void b.apply(void 0,o(["queue"],u));b.apply(void 0,o(["miss"],u));var m=Date.now(),w=[c];v.set(s,{queue:w,expiresAt:m+h}),n.apply(void 0,o(u,[function(){for(var e=[],n=0;n-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||Ee),string:new Se}},Oe.prototype.delete=function(e){return Pe(this,e).delete(e)},Oe.prototype.get=function(e){return Pe(this,e).get(e)},Oe.prototype.has=function(e){return Pe(this,e).has(e)},Oe.prototype.set=function(e,t){return Pe(this,e).set(e,t),this},je.prototype.clear=function(){this.__data__=new Ee},je.prototype.delete=function(e){return this.__data__.delete(e)},je.prototype.get=function(e){return this.__data__.get(e)},je.prototype.has=function(e){return this.__data__.has(e)},je.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ee){var o=r.__data__;if(!pe||o.length-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Je(e)}var Fe=ce||function(){return!1};function Je(e){var t=Ve(e)?Q.call(e):"";return t==u||t==c}function Ve(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function We(e){return $e(e)?Ae(e):function(e){if(!De(e))return le(e);var t=[];for(var n in Object(e))Y.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Ue(e,!0,!0)}}).call(this,n(71)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepFreeze=function e(t){return t&&(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(function(n){!t.hasOwnProperty(n)||null===t[n]||"object"!=typeof t[n]&&"function"!=typeof t[n]||t[n].constructor===Buffer||Object.isFrozen(t[n])||e(t[n])})),t}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:options).jwksRequestsPerMinute,n=void 0===t?10:t,a=(0,r.default)("jwks"),s=e.getSigningKey,u=new o.RateLimiter(n,"minute",!0);return a("Configured rate limiting to JWKS endpoint at "+n+"/minute"),function(e,t){u.removeTokens(1,function(n,r){return n?t(n):(a("Requests to the JWKS endpoint available for the next minute:",r),r<0?(a("Too many requests to the JWKS endpoint"),t(new i.default("Too many requests to the JWKS endpoint"))):s(e,t))})}};var r=a(n(24)),o=n(75),i=a(n(79));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){t.RateLimiter=n(76),t.TokenBucket=n(77)},function(e,t,n){var r=n(77),o=n(78),i=function(e,t,n){this.tokenBucket=new r(e,e,t,null),this.tokenBucket.content=e,this.curIntervalStart=o(),this.tokensThisInterval=0,this.fireImmediately=n};i.prototype={tokenBucket:null,curIntervalStart:0,tokensThisInterval:0,fireImmediately:!1,removeTokens:function(e,t){if(e>this.tokenBucket.bucketSize)return process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds maximum tokens per interval "+this.tokenBucket.bucketSize,null)),!1;var n=this,r=o();if((r=this.tokenBucket.interval)&&(this.curIntervalStart=r,this.tokensThisInterval=0),e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval){if(this.fireImmediately)process.nextTick(t.bind(null,null,-1));else{var i=Math.ceil(this.curIntervalStart+this.tokenBucket.interval-r);setTimeout(function(){n.tokenBucket.removeTokens(e,a)},i)}return!1}return this.tokenBucket.removeTokens(e,a);function a(r,o){if(r)return t(r,null);n.tokensThisInterval+=e,t(null,o)}},tryRemoveTokens:function(e){if(e>this.tokenBucket.bucketSize)return!1;var t=o();if((t=this.tokenBucket.interval)&&(this.curIntervalStart=t,this.tokensThisInterval=0),e>this.tokenBucket.tokensPerInterval-this.tokensThisInterval)return!1;var n=this.tokenBucket.tryRemoveTokens(e);return n&&(this.tokensThisInterval+=e),n},getTokensRemaining:function(){return this.tokenBucket.drip(),this.tokenBucket.content}},e.exports=i},function(e,t){var n=function(e,t,n,r){if(this.bucketSize=e,this.tokensPerInterval=t,"string"==typeof n)switch(n){case"sec":case"second":this.interval=1e3;break;case"min":case"minute":this.interval=6e4;break;case"hr":case"hour":this.interval=36e5;break;case"day":this.interval=864e5;break;default:throw new Error("Invaid interval "+n)}else this.interval=n;this.parentBucket=r,this.content=0,this.lastDrip=+new Date};n.prototype={bucketSize:1,tokensPerInterval:1,interval:1e3,parentBucket:null,content:0,lastDrip:0,removeTokens:function(e,t){var n=this;return this.bucketSize?e>this.bucketSize?(process.nextTick(t.bind(null,"Requested tokens "+e+" exceeds bucket size "+this.bucketSize,null)),!1):(this.drip(),e>this.content?r():this.parentBucket?this.parentBucket.removeTokens(e,function(o,i){return o?t(o,null):e>n.content?r():(n.content-=e,void t(null,Math.min(i,n.content)))}):(this.content-=e,process.nextTick(t.bind(null,null,this.content)),!0)):(process.nextTick(t.bind(null,null,e,Number.POSITIVE_INFINITY)),!0);function r(){var r=Math.ceil((e-n.content)*(n.interval/n.tokensPerInterval));return setTimeout(function(){n.removeTokens(e,t)},r),!1}},tryRemoveTokens:function(e){return!this.bucketSize||!(e>this.bucketSize)&&(this.drip(),!(e>this.content)&&(!(this.parentBucket&&!this.parentBucket.tryRemoveTokens(e))&&(this.content-=e,!0)))},drip:function(){if(this.tokensPerInterval){var e=+new Date,t=Math.max(e-this.lastDrip,0);this.lastDrip=e;var n=t*(this.tokensPerInterval/this.interval);this.content=Math.min(this.content+n,this.bucketSize)}else this.content=this.bucketSize}},e.exports=n},function(e,t){e.exports=function(){if("undefined"!=typeof process&&process.hrtime){var e=process.hrtime(),t=e[0],n=e[1];return 1e3*t+Math.floor(n/1e6)}return(new Date).getTime()}},function(e,t,n){"use strict";function r(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="JwksRateLimitError",this.message=e}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKeyNotFoundError=t.JwksRateLimitError=t.JwksError=t.ArgumentError=void 0;var r=s(n(81)),o=s(n(60)),i=s(n(79)),a=s(n(61));function s(e){return e&&e.__esModule?e:{default:e}}t.ArgumentError=r.default,t.JwksError=o.default,t.JwksRateLimitError=i.default,t.SigningKeyNotFoundError=a.default},function(e,t,n){"use strict";function r(e){Error.call(this,e),Error.captureStackTrace(this,this.constructor),this.name="ArgumentError",this.message=e}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";var r=n(80),o=n(23),i=function(e,t){return e&&"SigningKeyNotFoundError"===e.name?t(e,null,null):e?t(e,null,null):void 0};e.exports.hapiJwt2KeyAsync=function(t){var n=e.exports.hapiJwt2Key(t);return function(e){return new Promise(function(t,r){n(e,function(e,n){!n||e?r(e):t({key:n})})})}},e.exports.hapiJwt2Key=function(e){if(null===e||void 0===e)throw new r.ArgumentError("An options object must be provided when initializing hapiJwt2Key");var t=new o.JwksClient(e),n=e.handleSigningKeyError||i;return function(e,r){return e&&e.header?"RS256"!==e.header.alg?r(new Error("Unsupported algorithm "+e.header.alg+" supplied. node-jwks-rsa supports only RS256"),null,null):void t.getSigningKey(e.header.kid,function(e,t){return e?n(e,function(e){return r(e,null,null)}):r(null,t.publicKey||t.rsaPublicKey,t)}):r(new Error("Cannot find a signing certificate if there is no header"),null,null)}}},function(e,t,n){"use strict";var r=n(80),o=n(23),i=function(e,t){return e&&"SigningKeyNotFoundError"===e.name?t(null):e?t(e):void 0};e.exports.expressJwtSecret=function(e){if(null===e||void 0===e)throw new r.ArgumentError("An options object must be provided when initializing expressJwtSecret");var t=new o.JwksClient(e),n=e.handleSigningKeyError||i;return function(e,r,o,i){if(!r||"RS256"!==r.alg)return i(null,null);t.getSigningKey(r.kid,function(e,t){return e?n(e,function(e){return i(e,null)}):i(null,t.publicKey||t.rsaPublicKey)})}}},function(e,t,n){"use strict";var r=n(80),o=n(23);e.exports.koaJwtSecret=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.jwksUri)throw new r.ArgumentError("No JWKS URI provided");var t=new o.JwksClient(e);return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.alg,o=n.kid;return new Promise(function(n,i){if("RS256"!==r)return i(new Error("Missing / invalid token algorithm"));t.getSigningKey(o,function(t,r){if(t)return e.handleSigningKeyError?e.handleSigningKeyError(t).then(i):i(t);n(r.publicKey||r.rsaPublicKey)})})}}},function(e,t,n){"use strict";var r,o=n(13),i=(r=o)&&r.__esModule?r:{default:r},a=n(80),s=n(23);var u=function(e,t){return e&&"SigningKeyNotFoundError"===e.name?t(null):e?t(e):void 0};e.exports.passportJwtSecret=function(e){if(null===e||void 0===e)throw new a.ArgumentError("An options object must be provided when initializing passportJwtSecret");var t=new s.JwksClient(e),n=e.handleSigningKeyError||u;return function(e,r,o){var a=i.default.decode(r,{complete:!0});if(!a||!a.header||"RS256"!==a.header.alg)return o(null,null);t.getSigningKey(a.header.kid,function(e,t){return e?n(e,function(e){return o(e,null)}):o(null,t.publicKey||t.rsaPublicKey)})}}},function(e,t,n){const r=n(3).UnauthorizedError;e.exports=function(e,t,n){return e.user?n():n(new r("Authentication required for this endpoint."))}},function(e,t,n){e.exports=function(e){return function(t,n,r,o){return e&&e(t),t&&t.status?(r.status(t.status),r.json({error:t.code||t.name,message:t.message||t.name})):(r.status(t.status||500),r.json({error:"InternalServerError",message:t.message||t.name}))}}},function(e,t,n){const r=n(3);e.exports=function(e){return function(t,n,o){const i=t,a=t.user&&t.user.access_token&&t.user.access_token.length?{domain:e.domain,accessToken:t.user.access_token,headers:e.headers}:e;r.managementApi.getClient(a).then(function(e){return i.auth0=e,o(),null}).catch(function(e){o(e)})}}},function(e,t,n){const r=n(3);e.exports=function(e,t,n){if(null===e||void 0===e)throw new r.ArgumentError("Must provide the domain");if("string"!=typeof e||0===e.length)throw new r.ArgumentError("The provided domain is invalid: "+e);if(null===t||void 0===t)throw new r.ArgumentError("Must provide the webtaskUrl");if("string"!=typeof t||0===t.length)throw new r.ArgumentError("The provided webtaskUrl is invalid: "+t);if(null===n||void 0===n)throw new r.ArgumentError("Must provide the extensionSecret");if("string"!=typeof n||0===n.length)throw new r.ArgumentError("The provided extensionSecret is invalid: "+n);return function(o){if(null===o||void 0===o)throw new r.ArgumentError("Must provide the hookPath");if("string"!=typeof o||0===o.length)throw new r.ArgumentError("The provided hookPath is invalid: "+o);return function(i,a,s){if(i.headers.authorization&&"Bearer"===i.headers.authorization.split(" ")[0]){const a=i.headers.authorization.split(" ")[1];try{if(r.validateHookToken(e,t,o,n,a))return s()}catch(e){return s(e)}}return s(new r.HookTokenError("Hook token missing for the call to: "+o))}}}},function(e,t,n){const r=n(3);e.exports=function(e){return function(t,n,o){return t.webtaskContext&&e.setProvider(r.configProvider.fromWebtaskContext(t.webtaskContext)),o()}}},function(e,t,n){e.exports.dashboardAdmins=n(92)},function(e,t,n){const r=n(93),o=n(94),i=n(95),a=n(13),s=n(3),u=n(5);e.exports=function(e){if(!e||"object"!=typeof e)throw new s.ArgumentError("Must provide the options");if(null===e.secret||void 0===e.secret)throw new s.ArgumentError("Must provide a valid secret");if("string"!=typeof e.secret||0===e.secret.length)throw new s.ArgumentError("The provided secret is invalid: "+e.secret);if(null===e.audience||void 0===e.audience)throw new s.ArgumentError("Must provide a valid audience");if("string"!=typeof e.audience||0===e.audience.length)throw new s.ArgumentError("The provided audience is invalid: "+e.audience);if(null===e.rta||void 0===e.rta)throw new s.ArgumentError("Must provide a valid rta");if("string"!=typeof e.rta||0===e.rta.length)throw new s.ArgumentError("The provided rta is invalid: "+e.rta);if(null===e.domain||void 0===e.domain)throw new s.ArgumentError("Must provide a valid domain");if("string"!=typeof e.domain||0===e.domain.length)throw new s.ArgumentError("The provided domain is invalid: "+e.domain);if(null===e.baseUrl||void 0===e.baseUrl)throw new s.ArgumentError("Must provide a valid base URL");if("string"!=typeof e.baseUrl||0===e.baseUrl.length)throw new s.ArgumentError("The provided base URL is invalid: "+e.baseUrl);if(null===e.clientName||void 0===e.clientName)throw new s.ArgumentError("Must provide a valid client name");if("string"!=typeof e.clientName||0===e.clientName.length)throw new s.ArgumentError("The provided client name is invalid: "+e.clientName);if(void 0!==e.storageType&&"sessionStorage"!==e.storageType&&"localStorage"!==e.storageType)throw new s.ArgumentError('The storageType must be either "sessionStorage" or "localStorage". Incorrect storageType: '+e.storageType);const t=e.stateKey||"state",n=e.nonceKey||"nonce",c=e.urlPrefix||"",l=e.storageType||"sessionStorage",f=e.storageKey||e.sessionStorageKey||"apiToken",p=new s.SessionManager(e.rta,e.domain,e.baseUrl),d=r.Router();return d.get(c+"/login",function(r,i){const a=u.getBasePath(r),s=o.randomBytes(16).toString("hex"),l=o.randomBytes(16).toString("hex"),f={httpOnly:!0,path:a};i.cookie(t,s,Object.assign({},f,{sameSite:"None",secure:!0})),i.cookie(n,l,Object.assign({},f,{sameSite:"None",secure:!0})),i.cookie(t+"_compat",s,f),i.cookie(n+"_compat",l,f);const d=p.createAuthorizeUrl({redirectUri:u.getBaseUrl(r)+c+"/login/callback",scopes:e.scopes,expiration:e.expiration,nonce:l,state:s});i.redirect(d)}),d.post(c+"/login/callback",i(),function(r,o,i){var c;try{c=a.decode(r.body.id_token)}catch(e){c=null}if(!c)return i(new s.ValidationError("Login failed. Invalid token."));if(r.cookies&&r.cookies[n]&&r.cookies[n]!==c.nonce||r.cookies&&r.cookies[n+"_compat"]&&r.cookies[n+"_compat"]!==c.nonce)return i(new s.ValidationError("Login failed. Nonce mismatch."));if(r.cookies&&r.cookies[t]&&r.cookies[t]!==r.body.state||r.cookies&&r.cookies[t+"_compat"]&&r.cookies[t+"_compat"]!==r.body.state)return i(new s.ValidationError("Login failed. State mismatch."));const d=u.getBasePath(r);return p.create(r.body.id_token,r.body.access_token,{secret:e.secret,issuer:e.baseUrl,audience:e.audience,noAccessToken:e.noAccessToken}).then(function(e){o.clearCookie(t,{path:d}),o.clearCookie(n,{path:d}),o.clearCookie(t+"_compat",{path:d}),o.clearCookie(n+"_compat",{path:d}),o.header("Content-Type","text/html"),o.status(200).send('