diff --git a/build/bundle.js b/build/bundle.js index 51b95772..666b7483 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -1,2 +1,2 @@ "use strict"; -module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){var r=t(1),o=t(2),i=t(10),a=t(5),s=r.createServer(function(e,n){return i.info("Starting Account Link Extension - Version:","2.6.5"),i.info(" > WT_URL:",e("WT_URL")),i.info(" > PUBLIC_WT_URL:",e("PUBLIC_WT_URL")),o(e,n)});e.exports=function(e,n,t){n.x_wt&&n.x_wt.ectx&&n.x_wt.ectx.PUBLIC_WT_URL||!1||a.setValue("PUBLIC_WT_URL",r.urlHelpers.getWebtaskUrl(n)),s(e,n,t)}},function(e,n){e.exports=require("auth0-extension-hapi-tools@1.3.1")},function(e,n,t){(function(n){var r=t(3),o=t(4),i=o.FileStorageContext,a=o.WebtaskStorageContext,s=t(5),c=t(6),l=t(10),u=t(30).init,d=function(e){e?(l.error("Hapi initialization failed."),l.error(e)):l.info("Hapi initialization completed.")};e.exports=function(e,t,o){return s.setProvider(function(n){return e(n)||Object({NODE_ENV:"production",CLIENT_VERSION:"2.6.5"})[n]}),u(t?new a(t,{force:1}):new i(r.join(n,"../data.json"))),c(o||d)}}).call(this,"/")},function(e,n){e.exports=require("path")},function(e,n){e.exports=require("auth0-extension-tools@1.4.0")},function(e,n,t){var r=t(4).config;e.exports=r()},function(e,n,t){(function(n){var r=t(3),o=t(7),i=t(8),a=t(9),s=t(5),c=t(10),l=t(12),u=t(71),d=t(72);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,p=new o.Server;return p.connection({host:"localhost",port:s("PORT"),routes:{cors:!0,validate:{},files:{relativeTo:r.join(n,"../public")}}}),p.register([a,i],function(){}),p.route({method:"GET",path:"/js/{file*}",config:{auth:!1},handler:{directory:{path:r.join(n,"../public/js")}}}),p.route({method:"GET",path:"/css/{file*}",config:{auth:!1},handler:{directory:{path:r.join(n,"../public/css")}}}),p.register([d,t,l],function(n){c.debug=function(){for(var e=arguments.length,n=new Array(e),t=0;t0?[o[0].identities[0]]:[]).map(function(e){return e.provider}).map(u),c=d(i,e("or"));n(s({dynamicSettings:y,stylesheetTag:m,currentUser:r,matchingUsers:o,customCSSTag:v,locale:a,identities:c,params:g,token:t}))})})}).catch(function(r){var o=e.query.state;c.error("An error was encountered: ",r),c.info(`Redirecting to failed link to /continue: ${t.iss}continue?state=${e.query.state}`),n.redirect(`${t.iss}continue?state=${o}`)})}).catch(function(e){c.error("An invalid token was provided",e),s({dynamicSettings:y,stylesheetTag:m,currentUser:null,matchingUsers:[],customCSSTag:v}).then(function(e){n(e).code(400)})})}}}}},function(e,n){e.exports=require("jsonwebtoken@7.1.9")},function(e,n){e.exports=require("lodash@3.10.1")},function(e,n,t){var r=t(17);e.exports=function(e){return r({path:"users-by-email",qs:{email:e}})}},function(e,n,t){var r=t(18),o=t(19),i=["path"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}var s=t(4).managementApi,c=t(21),l=t(5),u=t(10),d={base:void 0,getBaseUrl(){return this.base||(this.base=`https://${l("AUTH0_DOMAIN")}/api/v2`),this.base},endpoint(e){return`${this.getBaseUrl()}/${e}`}};e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.path,t=o(e,i);return s.getAccessTokenCached(l("AUTH0_DOMAIN"),l("AUTH0_CLIENT_ID"),l("AUTH0_CLIENT_SECRET")).then(function(e){return new Promise(function(o,i){c(function(e){for(var n=1;n=300?(u.error("API call failed: ",n.status,t),i(new Error(t))):o(n.body)})})})}},function(e,n){e.exports=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n,t){var r=t(20);e.exports=function(e,n){if(null==e)return{};var t,o,i=r(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=require("request@2.81.0")},function(e,n,t){var r=t(23),o=t(29),i=t(30).get,a=t(31),s=t(37),c=/\{\{\s*(.*?)\s*\}\}/g;e.exports=function(e){var n=e.stylesheetTag,t=e.customCSSTag,l=e.currentUser,u=e.matchingUsers,d=e.dynamicSettings,p=e.identities,h=e.locale,f=e.params,m=e.token;return Promise.all([a(d,p,h),i().read()]).then(function(e){var i=r(e,2),a=i[0],d=i[1];return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"string"!=typeof e)throw new Error("Invalid template provided");return e.replace(c,function(e,t){return n[t]||""})}(d.settings?d.settings.template:o,{ExtensionCSS:n,CustomCSS:t,Auth0Widget:a,ExtensionScripts:s(l,u,f,m)})})}},function(e,n,t){var r=t(24),o=t(25),i=t(26),a=t(28);e.exports=function(e,n){return r(e)||o(e,n)||i(e,n)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n,t){var r=t(27);e.exports=function(e,n){if(e){if("string"==typeof e)return r(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,n):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=function(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t\n\n \n \n \n \n \n Auth0 Account Linking Extension\n \n {{ ExtensionCSS }}\n {{ CustomCSS }}\n \n \n \n {{ Auth0Widget }}\n {{ ExtensionScripts }}\n \n\n'},function(e,n){var t=null;e.exports.init=function(e){t=e},e.exports.get=function(){if(!t)throw new Error("The DB has not been initialized.");return t}},function(e,n,t){var r=t(32).resolveLocale,o=t(34).getSettings,i=t(35),a=t(36),s=t(36).lockOutlineClass,c=new RegExp(/\{\{(\s+)?identities(\s+)?\}\}/);e.exports=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return o().then(function(o){var l=Object.assign(o,e);return r(t).then(function(e){return`\n
\n
\n ${a(l.removeOverlay)}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(e){return""!==e.logoPath?``:`\n `}(l)}\n
${function(e,n){return""!==e.title?e.title:n("accountLinking")}(l,e)}
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n

\n ${e("introduction")} ${e("identities").replace(c,n)}.\n

\n

\n \n

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(e,n){var t="";return""!==e.color&&(t=`style="background-color: ${e.color}"`),`\n `}(l,e)}\n
\n
\n
\n
\n
\n
\n
\n