From e83373942870ded8c1cfeaa0f85853631ed83b7c Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 16 Dec 2024 18:46:19 +1300 Subject: [PATCH] DEP Upgrade redux dependencies --- client/dist/js/bundle.js | 2 +- package.json | 4 +-- yarn.lock | 61 +++++++++++++--------------------------- 3 files changed, 23 insertions(+), 44 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 58f0484..b47d0f3 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(){var e={62038:function(e,t,n){"use strict";var r=f(n(96540)),o=n(5338),i=f(n(34121)),a=f(n(90420)),u=f(n(55207)),s=n(91829),c=n(60134),l=f(n(52291));function f(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,i.default)(),(0,a.default)(),u.default.ready((()=>{const e=window.document.getElementById("mfa-app"),t=e.dataset.schemaurl,n=(0,s.createStore)((0,s.combineReducers)(u.default.reducer.getAll()),window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__());(0,o.createRoot)(e).render(r.default.createElement(c.Provider,{store:n},r.default.createElement(l.default,{schemaURL:t})))})),window.setTimeout((()=>u.default.load()),1)}))},34121:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(25420)),o=a(n(28044)),i=a(n(55207));function a(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{i.default.component.registerMany({BackupCodeRegister:r.default,BackupCodeVerify:o.default})}},90420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(55207)),o=a(n(21711)),i=a(n(82087));function a(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.reducer.register("mfaRegister",o.default),r.default.reducer.register("mfaVerify",i.default)}},25420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=s(n(5556)),i=s(n(50052)),a=n(59399),u=n(82283);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class l extends r.Component{constructor(e){super(e),this.state={recentlyCopied:!1},this.printRef=null,this.setPrintRef=e=>{this.printRef=e},this.copyMessageTimeout=null,this.handlePrint=this.handlePrint.bind(this),this.handleCopy=this.handleCopy.bind(this)}getFormattedCodes(){const{codes:e}=this.props;return e.map((e=>(0,u.formatCode)(e)))}handlePrint(e){e.preventDefault(),(new i.default).print(this.printRef,['body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif }'])}handleCopy(e){e.preventDefault();const{copyFeedbackDuration:t}=this.props;this.setState({recentlyCopied:!0}),this.copyMessageTimeout&&clearTimeout(this.copyMessageTimeout),this.copyMessageTimeout=setTimeout((()=>{this.setState({recentlyCopied:!1})}),t)}renderCodes(){return r.default.createElement("pre",{ref:this.setPrintRef,className:"mfa-register-backup-codes__code-grid"},this.getFormattedCodes().map((e=>r.default.createElement("div",{key:e},e))))}renderDescription(){const{ss:{i18n:e}}=window,{method:{supportLink:t,supportText:n}}=this.props;return r.default.createElement("p",null,e._t("MFABackupCodesRegister.DESCRIPTION","Recovery codes enable you to log into your account in the event your primary authentication is not available. Each code can only be used once. Store these codes somewhere safe, as they will not be viewable after leaving this page.")," ",t&&r.default.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer"},n||e._t("MFARegister.RECOVERY_HELP","Learn more about recovery codes.")))}renderPrintAction(){const{ss:{i18n:e}}=window;return r.default.createElement("button",{type:"button",onClick:this.handlePrint,className:"btn btn-link"},e._t("MFABackupCodesRegister.PRINT","Print codes"))}renderDownloadAction(){const{codes:e,method:t}=this.props,{Blob:n,URL:o,ss:{i18n:i},navigator:a}=window,u=`${t.name}.txt`,s=new n([e.join("\r\n")],{type:"text/plain;charset=UTF-8"}),c=o.createObjectURL(s);return r.default.createElement("a",{download:u,href:c,className:"btn btn-link",onClick:e=>{a.msSaveBlob&&(e.preventDefault(),a.msSaveBlob(s,u))}},i._t("MFABackupCodesRegister.DOWNLOAD","Download"))}renderCopyAction(){const{codes:e}=this.props,{recentlyCopied:t}=this.state,{ss:{i18n:n}}=window,o=t?n._t("MFABackupCodesRegister.COPY_RECENT","Copied!"):n._t("MFABackupCodesRegister.COPY","Copy codes");return r.default.createElement(a.CopyToClipboard,{text:e.join("\n")},r.default.createElement("button",{type:"button",className:"mfa-register-backup-codes__copy-to-clipboard btn btn-link",onClick:this.handleCopy},o))}render(){const{onCompleteRegistration:e}=this.props,{ss:{i18n:t}}=window;return r.default.createElement("div",{className:"mfa-register-backup-codes__container"},this.renderDescription(),this.renderCodes(),r.default.createElement("div",{className:"mfa-register-backup-codes__helper-links"},this.renderPrintAction(),this.renderDownloadAction(),this.renderCopyAction()),r.default.createElement("button",{className:"btn btn-primary",onClick:()=>e()},t._t("MFABackupCodesRegister.FINISH","Finish")))}}l.propTypes={codes:o.default.arrayOf(o.default.string),copyFeedbackDuration:o.default.number},l.defaultProps={copyFeedbackDuration:3e3};t.default=l},28044:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),i=(r=n(46942))&&r.__esModule?r:{default:r};function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}class u extends o.Component{constructor(e){super(e),this.state={value:""},this.codeInput=o.default.createRef(),this.handleChange=this.handleChange.bind(this),this.handleCompleteVerification=this.handleCompleteVerification.bind(this)}componentDidMount(){this.codeInput.current&&this.codeInput.current.focus()}handleChange(e){this.setState({value:e.target.value})}handleCompleteVerification(e){e.preventDefault();const{onCompleteVerification:t}=this.props;t({code:this.state.value})}renderControls(){const{moreOptionsControl:e}=this.props,{ss:{i18n:t}}=window;return o.default.createElement("ul",{className:"mfa-action-list mfa-action-list--backup-codes"},o.default.createElement("li",{className:"mfa-action-list__item"},o.default.createElement("button",{className:"btn btn-primary",disabled:0===this.state.value.length,onClick:this.handleCompleteVerification},t._t("MFABackupCodesVerify.NEXT","Next"))),e&&o.default.createElement("li",{className:"mfa-action-list__item"},e))}renderDescription(){const{ss:{i18n:e}}=window,{method:t}=this.props;return o.default.createElement("p",null,e._t("MFABackupCodesVerify.DESCRIPTION","Use one of the recovery codes you received")," ",t&&t.supportLink&&o.default.createElement("a",{href:t.supportLink,target:"_blank",rel:"noopener noreferrer"},e._t("MFARegister.RECOVERY_HELP","How to use recovery codes.")))}renderInput(){const{error:e}=this.props,{ss:{i18n:t}}=window,n=t._t("MFABackupCodesVerify.LABEL","Enter recovery code"),r=(0,i.default)("mfa-verify-backup-codes__input-container",{"has-error":!!e});return o.default.createElement("div",{className:r},o.default.createElement("label",{htmlFor:"backup-code",className:"control-label"},n),o.default.createElement("input",{className:"mfa-verify-backup-codes__input text form-control",type:"text",placeholder:n,id:"backup-code",ref:this.codeInput,onChange:this.handleChange}),e&&o.default.createElement("div",{className:"help-block"},e))}render(){const{graphic:e,name:t}=this.props;return o.default.createElement("form",{className:"mfa-verify-backup-codes__container"},o.default.createElement("div",{className:"mfa-verify-backup-codes__content"},this.renderDescription(),this.renderInput()),o.default.createElement("div",{className:"mfa-verify-backup-codes__image-holder"},o.default.createElement("img",{className:"mfa-verify-backup-codes__image",src:e,alt:t})),this.renderControls())}}t.default=u},54559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(96540))&&r.__esModule?r:{default:r};t.default=e=>{let{color:t="currentColor",size:n="3em"}=e;return o.default.createElement("svg",{className:"mfa-icon-circle-warning",width:n,height:n,viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("g",{fill:t,fillRule:"nonzero"},o.default.createElement("path",{d:"M39.8233243,0 C17.9664349,0 0.272762495,17.8947368 0.272762495,40 C0.272762495,62.1052632 17.9664349,80 39.8233243,80 C61.6802137,80 79.3738861,62.1052632 79.3738861,40 C79.3738861,17.8947368 61.6802137,0 39.8233243,0 Z M44.5069435,62.6315789 C43.2926718,63.8596491 41.7314654,64.5614035 40.170259,64.5614035 C38.4355853,64.5614035 36.8743789,63.8596491 35.8335746,62.6315789 C34.619303,61.5789474 33.9254335,60 33.9254335,58.245614 C33.9254335,56.6666667 34.619303,55.0877193 35.8335746,53.8596491 C38.0886505,51.5789474 42.2518676,51.5789474 44.5069435,53.8596491 C45.7212151,55.0877193 46.2416172,56.6666667 46.2416172,58.245614 C46.4150846,60 45.7212151,61.5789474 44.5069435,62.6315789 Z M47.2824215,23.3333333 L45.0273456,44.0350877 C44.8538782,46.8421053 42.4253349,48.7719298 39.6498569,48.5964912 C37.2213136,48.245614 35.4866399,46.4912281 35.3131725,44.0350877 L33.0580966,23.3333333 C32.7111619,19.2982456 35.4866399,15.7894737 39.4763895,15.2631579 C43.4661392,14.9122807 46.9354867,17.8947368 47.2824215,21.9298246 C47.4558889,22.2807018 47.4558889,22.8070175 47.2824215,23.3333333 Z"})))}},20222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556)),i=a(n(54559));function a(e){return e&&e.__esModule?e:{default:e}}const u=e=>{let{title:t,message:n,controls:o}=e;return r.default.createElement("div",{className:"mfa-method mfa-method--unavailable"},r.default.createElement("div",{className:"mfa-method-icon mfa-method-icon--unavailable"},r.default.createElement(i.default,{size:"80px"})),r.default.createElement("h2",{className:"mfa-method-title mfa-method-title--unavailable"},t),n&&r.default.createElement("p",null,n),r.default.createElement("div",{className:"mfa-method-options"},o))};u.propTypes={title:o.default.string.isRequired,message:o.default.string,controls:o.default.oneOfType([o.default.node,o.default.func])};t.default=u},72013:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(96540)),o=i(n(46942));function i(e){return e&&e.__esModule?e:{default:e}}t.default=e=>{let{block:t=!1,size:n="6em"}=e;return r.default.createElement("div",{style:{height:n,width:n},className:(0,o.default)({"mfa-loading-indicator":!0,"mfa-loading-indicator--block":t})})}},91973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SCREEN_REGISTER_METHOD=t.SCREEN_INTRODUCTION=t.SCREEN_COMPLETE=t.SCREEN_CHOOSE_METHOD=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=y(n(5556)),i=y(n(84469)),a=n(55207),u=y(n(49701)),s=y(n(86026)),c=y(n(72013)),l=y(n(82840)),f=y(n(57163)),d=y(n(51137)),p=n(60134),h=n(8228),v=y(n(96324));function y(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;te.json().then((e=>{const{SecurityID:t,...n}=e;this.setState({registerProps:n,token:t})}))))}handleBack(){const{availableMethods:e,onShowIntroduction:t,onShowChooseMethod:n}=this.props;return 1===e.length&&t?t():(this.setState({registerProps:null}),n())}handleCompleteRegistration(e){const{endpoints:{register:t},selectedMethod:n,onRemoveAvailableMethod:r,onRegister:o}=this.props,{token:a}=this.state,u=a?`?SecurityID=${a}`:"";(0,i.default)(`${t.replace("{urlSegment}",n.urlSegment)}${u}`,"POST",JSON.stringify(e)).then((e=>201===e.status?(this.setState({registerProps:null}),"function"==typeof o&&o(n),r(n),this.setupBackupMethod(),null):e.json())).then((e=>{if(e&&e.errors){const t=e.errors.join(", ");this.setState((e=>({registerProps:{...e.registerProps,error:t}})))}}))}shouldSetupBackupMethod(){const{backupMethod:e,registeredMethods:t}=this.props;return!!e&&!t.find((t=>t.urlSegment===e.urlSegment))}handleSkip(){const{skip:e}=this.props.endpoints;e&&(window.location=this.props.endpoints.skip)}renderIntroduction(){const{canSkip:e,resources:t,endpoints:{skip:n},showSubTitle:o,IntroductionComponent:i}=this.props;return r.default.createElement(i,{canSkip:n&&e,onSkip:this.handleSkip,resources:t,showTitle:o})}renderMethod(){const{selectedMethod:e,showSubTitle:t,TitleComponent:n}=this.props,{registerProps:o}=this.state;if(!e)return null;if(!o)return r.default.createElement(c.default,{block:!0});const i=(0,a.loadComponent)(e.component);return r.default.createElement("div",null,t&&r.default.createElement(n,null),r.default.createElement(i,m({},o,{method:e,onBack:this.handleBack,onCompleteRegistration:this.handleCompleteRegistration})))}renderOptions(){const{availableMethods:e,showSubTitle:t,SelectMethodComponent:n}=this.props;return r.default.createElement(n,{methods:e,showTitle:t})}render(){const{screen:e,onCompleteRegistration:t,showTitle:n,showSubTitle:o,completeMessage:i,CompleteComponent:a}=this.props,{ss:{i18n:u}}=window;if(e===S)return r.default.createElement(a,{showTitle:o,onComplete:t,message:i});let s;switch(e){case E:s=this.renderOptions();break;case w:s=this.renderMethod();break;default:s=this.renderIntroduction()}return r.default.createElement("div",null,n&&r.default.createElement("h1",{className:"mfa-app-title"},u._t("MFARegister.TITLE","Multi-factor authentication")),s)}}t.Component=_,_.propTypes={availableMethods:o.default.arrayOf(u.default),backupMethod:u.default,canSkip:o.default.bool,endpoints:o.default.shape({register:o.default.string.isRequired,skip:o.default.string}),onRegister:o.default.func,onCompleteRegistration:o.default.func.isRequired,registeredMethods:o.default.arrayOf(s.default),resources:o.default.object,showTitle:o.default.bool,showSubTitle:o.default.bool,IntroductionComponent:o.default.oneOfType([o.default.object,o.default.func]),SelectMethodComponent:o.default.oneOfType([o.default.object,o.default.func]),CompleteComponent:o.default.oneOfType([o.default.object,o.default.func]),TitleComponent:o.default.oneOfType([o.default.object,o.default.func])},_.defaultProps={resources:{},showTitle:!0,showSubTitle:!0,showIntroduction:!0,IntroductionComponent:l.default,SelectMethodComponent:d.default,CompleteComponent:f.default,TitleComponent:v.default};t.default=(0,p.connect)((e=>{const t=e.mfaRegister||e;return{screen:t.screen,selectedMethod:t.method,availableMethods:t.availableMethods}}),(e=>({onShowIntroduction:()=>e((0,h.showScreen)(b)),onShowComplete:()=>e((0,h.showScreen)(S)),onSelectMethod:t=>e((0,h.chooseMethod)(t)),onShowChooseMethod:()=>{e((0,h.chooseMethod)(null)),e((0,h.showScreen)(E))},onRemoveAvailableMethod:t=>e((0,h.removeAvailableMethod)(t))})))(_)},57163:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556)),i=a(n(96324));function a(e){return e&&e.__esModule?e:{default:e}}const u=e=>{let{onComplete:t,showTitle:n,message:o}=e;return r.default.createElement("div",{className:"mfa-register-confirmation"},r.default.createElement("i",{className:"font-icon-check-mark mfa-register-confirmation__icon"}),n&&r.default.createElement(i.default,{className:"mfa-register-confirmation__title"}),r.default.createElement("p",{className:"mfa-register-confirmation__description"},o||window.ss.i18n._t("MFARegister.SETUP_COMPLETE_DESCRIPTION","You will be able to edit these settings later from your profile area.")),r.default.createElement("button",{onClick:t,className:"mfa-register-confirmation__continue btn btn-primary"},window.ss.i18n._t("MFARegister.SETUP_COMPLETE_CONTINUE","Continue")))};u.propTypes={onComplete:o.default.func.isRequired,showTitle:o.default.bool},u.defaultProps={showTitle:!0};t.default=u},82840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=t.ActionList=void 0;var r=l(n(96540)),o=l(n(5556)),i=n(8228),a=n(60134),u=n(91973),s=l(n(96324)),c=l(n(10231));function l(e){return e&&e.__esModule?e:{default:e}}const f=e=>{let{canSkip:t,onContinue:n,onSkip:o}=e;const{ss:{i18n:i}}=window;return r.default.createElement("ul",{className:"mfa-action-list"},r.default.createElement("li",{className:"mfa-action-list__item"},r.default.createElement("button",{className:"btn btn-primary",onClick:n},i._t("MultiFactorAuthentication.GET_STARTED",c.default["MultiFactorAuthentication.GET_STARTED"]))),t&&r.default.createElement("li",{className:"mfa-action-list__item"},r.default.createElement("button",{className:"btn btn-secondary",onClick:o},i._t("MultiFactorAuthentication.SETUP_LATER",c.default["MultiFactorAuthentication.SETUP_LATER"]))))};t.ActionList=f;const d=e=>{let{canSkip:t,onContinue:n,onSkip:o,resources:i,showTitle:a,TitleComponent:u}=e;const{ss:{i18n:s}}=window;return r.default.createElement("div",null,a&&r.default.createElement(u,null),r.default.createElement("h4",{className:"mfa-feature-list-title"},s._t("MultiFactorAuthentication.HOW_IT_WORKS",c.default["MultiFactorAuthentication.HOW_IT_WORKS"])),r.default.createElement("ul",{className:"mfa-feature-list"},r.default.createElement("li",{className:"mfa-feature-list-item"},i.extra_factor_image_url&&r.default.createElement("img",{alt:s._t("MultiFactorAuthentication.EXTRA_LAYER_IMAGE_ALT",c.default["MultiFactorAuthentication.EXTRA_LAYER_IMAGE_ALT"]),"aria-hidden":"true",className:"mfa-feature-list-item__icon",src:i.extra_factor_image_url}),r.default.createElement("div",{className:"mfa-feature-list-item__content"},r.default.createElement("h5",{className:"mfa-block-heading mfa-feature-list-item__title"},s._t("MultiFactorAuthentication.EXTRA_LAYER_TITLE",c.default["MultiFactorAuthentication.EXTRA_LAYER_TITLE"])),r.default.createElement("p",{className:"mfa-feature-list-item__description"},s._t("MultiFactorAuthentication.EXTRA_LAYER_DESCRIPTION",c.default["MultiFactorAuthentication.EXTRA_LAYER_DESCRIPTION"])," ",i.user_help_link&&r.default.createElement("a",{href:i.user_help_link},s._t("MultiFactorAuthentication.HOW_MFA_WORKS",c.default["MultiFactorAuthentication.HOW_MFA_WORKS"]))))),r.default.createElement("li",{className:"mfa-feature-list-item"},i.unique_image_url&&r.default.createElement("img",{alt:s._t("MultiFactorAuthentication.UNIQUE_IMAGE_ALT",c.default["MultiFactorAuthentication.UNIQUE_IMAGE_ALT"]),"aria-hidden":"true",className:"mfa-feature-list-item__icon",src:i.unique_image_url}),r.default.createElement("div",{className:"mfa-feature-list-item__content"},r.default.createElement("h5",{className:"mfa-block-heading mfa-feature-list-item__title"},s._t("MultiFactorAuthentication.UNIQUE_TITLE",c.default["MultiFactorAuthentication.UNIQUE_TITLE"])),r.default.createElement("p",{className:"mfa-feature-list-item__description"},s._t("MultiFactorAuthentication.UNIQUE_DESCRIPTION",c.default["MultiFactorAuthentication.UNIQUE_DESCRIPTION"]))))),r.default.createElement(f,{canSkip:t,onContinue:n,onSkip:o}))};t.Component=d,d.propTypes={canSkip:o.default.bool,onContinue:o.default.func.isRequired,onSkip:o.default.func,resources:o.default.shape({user_help_link:o.default.string,extra_factor_image_url:o.default.string,unique_image_url:o.default.string}).isRequired,showTitle:o.default.bool,TitleComponent:o.default.oneOfType([o.default.object,o.default.func])},d.defaultProps={showTitle:!0,TitleComponent:s.default};t.default=(0,a.connect)(null,(e=>({onContinue:()=>{e((0,i.chooseMethod)(null)),e((0,i.showScreen)(u.SCREEN_REGISTER_METHOD))}})))(d)},5917:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=s(n(5556)),i=s(n(46942)),a=s(n(49701)),u=s(n(71974));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class l extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}handleClick(e){const{method:{isAvailable:t},onClick:n}=this.props;t&&n&&n(e)}handleKeyUp(e){13===e.keyCode&&this.handleClick(e)}renderSupportLink(e){const{ss:{i18n:t}}=window,{supportLink:n,supportText:o}=e;return n?r.default.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"mfa-method-tile__support-link"},o||t._t("MFARegister.HELP","Find out more.")):null}renderUnavailableMask(){const{ss:{i18n:e}}=window,{isAvailable:t,getUnavailableMessage:n}=this.props;if(t())return null;const o=n();return r.default.createElement("div",{className:"mfa-method-tile__unavailable-mask"},r.default.createElement("h3",{className:"mfa-method-tile__unavailable-title"},e._t("MFAMethodTile.UNAVAILABLE","Unsupported: ")),o&&r.default.createElement("p",{className:"mfa-method-tile__unavailable-text"},o))}render(){const{isActive:e,method:t}=this.props,{ss:{i18n:n}}=window,o=(0,i.default)("mfa-method-tile",{"mfa-method-tile--active":e,"mfa-method-tile--unsupported":!t.isAvailable}),a=(0,i.default)("mfa-method-tile__thumbnail-container",{"mfa-method-tile__thumbnail-container--unsupported":!t.isAvailable}),u=n.inject(n._t("MFARegister.REGISTER_WITH","Register with {method}"),{method:t.name.toLowerCase()});return r.default.createElement("li",{className:o},r.default.createElement("div",{className:"mfa-method-tile__content",onClick:this.handleClick,onKeyUp:this.handleKeyUp,tabIndex:"0",role:"button"},t.thumbnail&&r.default.createElement("div",{className:a},r.default.createElement("img",{src:t.thumbnail,className:"mfa-method-tile__thumbnail",alt:t.name})),r.default.createElement("h3",{className:"mfa-method-tile__title"},u),r.default.createElement("p",{className:"mfa-method-tile__description"},t.description&&`${t.description}. `,this.renderSupportLink(t))),this.renderUnavailableMask())}}t.Component=l,l.propTypes={getUnavailableMessage:o.default.func.isRequired,isActive:o.default.bool,isAvailable:o.default.func.isRequired,method:a.default.isRequired,onClick:o.default.func.isRequired},l.defaultProps={isActive:!1};t.default=(0,u.default)(l)},51137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=h(n(5556)),i=h(n(49701)),a=h(n(46942)),u=n(8228),s=n(91829),c=n(60134),l=h(n(71974)),f=n(91973),d=h(n(5917)),p=h(n(96324));function h(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}class y extends r.Component{constructor(e){super(e);let t=null;1===e.methods.length&&e.isAvailable&&e.isAvailable(e.methods[0])&&(t=e.methods[0]),this.state={highlightedMethod:t},this.handleGoToNext=this.handleGoToNext.bind(this),this.handleBack=this.handleBack.bind(this)}componentDidMount(){const{highlightedMethod:e}=this.state;e&&this.handleGoToNext()}handleGoToNext(){const{highlightedMethod:e}=this.state;this.props.onSelectMethod(e)}handleClick(e){this.setState({highlightedMethod:e})}handleBack(){this.props.onClickBack&&this.props.onClickBack()}renderActions(){const{ss:{i18n:e}}=window,{highlightedMethod:t}=this.state;return r.default.createElement("ul",{className:"mfa-action-list"},r.default.createElement("li",{className:"mfa-action-list__item"},r.default.createElement("button",{className:"btn btn-primary",disabled:null===t,onClick:this.handleGoToNext},e._t("MFARegister.NEXT","Next"))),r.default.createElement("li",{className:"mfa-action-list__item"},r.default.createElement("button",{className:"btn btn-secondary",onClick:this.handleBack},e._t("MFARegister.BACK","Back"))))}render(){const{methods:e,showTitle:t,TitleComponent:n,MethodTileComponent:o}=this.props,{highlightedMethod:i}=this.state,u=(0,a.default)("mfa-method-tile-group",{"mfa-method-tile-group--three-columns":e.length%3==0});return r.default.createElement("div",null,t&&r.default.createElement(n,null),r.default.createElement("ul",{className:u},e.map((e=>r.default.createElement(o,{isActive:i===e,key:e.urlSegment,method:e,onClick:()=>this.handleClick(e)})))),this.renderActions())}}t.Component=y,y.propTypes={methods:o.default.arrayOf(i.default),onSelectMethod:o.default.func,onClickBack:o.default.func,showTitle:o.default.bool,TitleComponent:o.default.oneOfType([o.default.object,o.default.func]),MethodTileComponent:o.default.oneOfType([o.default.object,o.default.func])},y.defaultProps={showTitle:!0,TitleComponent:p.default,MethodTileComponent:d.default};t.default=(0,s.compose)((0,c.connect)(null,(e=>({onClickBack:()=>e((0,u.showScreen)(f.SCREEN_INTRODUCTION)),onSelectMethod:t=>{e((0,u.chooseMethod)(t)),e((0,u.showScreen)(f.SCREEN_REGISTER_METHOD))}}))),l.default)(y)},96324:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=u(n(96540)),o=n(60134),i=n(91973),a=u(n(10231));function u(e){return e&&e.__esModule?e:{default:e}}const s=e=>{let{screen:t,method:n,Tag:o="h2",className:u="mfa-section-title"}=e;const{ss:{i18n:s}}=window;let c;switch(t){case i.SCREEN_INTRODUCTION:c=s._t("MultiFactorAuthentication.TITLE",a.default["MultiFactorAuthentication.TITLE"]);break;case i.SCREEN_CHOOSE_METHOD:c=s._t("MultiFactorAuthentication.SELECT_METHOD",a.default["MultiFactorAuthentication.SELECT_METHOD"]);break;case i.SCREEN_COMPLETE:c=s._t("MultiFactorAuthentication.SETUP_COMPLETE_TITLE",a.default["MultiFactorAuthentication.SETUP_COMPLETE_TITLE"]);break;case i.SCREEN_REGISTER_METHOD:c=n&&s.inject(s._t("MFARegister.REGISTER_WITH","Register with {method}"),{method:n.name.toLowerCase()});break;default:c=!1}if(!c||!c.length)return null;const l=o||"span";return r.default.createElement(l,{className:u},c)};t.Component=s;t.default=(0,o.connect)((e=>{const t=e.mfaRegister||e;return{screen:t.screen,method:t.method}}))(s)},81645:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=h(n(5556)),i=h(n(46942)),a=n(55207),u=h(n(84469)),s=h(n(86026)),c=h(n(72013)),l=h(n(93161)),f=h(n(71974)),d=h(n(20222)),p=h(n(10231));function h(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;tt.urlSegment===e));r?this.setSelectedMethod(r):this.setSelectedMethod(n?t.find((e=>e.urlSegment!==n.urlSegment)):t[0])}componentDidUpdate(e,t){const{selectedMethod:n}=this.state;(!t.selectedMethod&&n||t.selectedMethod&&n&&t.selectedMethod.urlSegment!==n.urlSegment)&&this.fetchStartVerifyData()}setSelectedMethod(e){this.setState({selectedMethod:e,showOtherMethods:!1})}getOtherMethods(){const{registeredMethods:e}=this.props,{selectedMethod:t}=this.state;return t?e.filter((e=>e.urlSegment!==t.urlSegment)):e}fetchStartVerifyData(){const{endpoints:{verify:e}}=this.props,{selectedMethod:t}=this.state,n=e.replace("{urlSegment}",t.urlSegment);this.setState({loading:!0}),(0,u.default)(n).then((e=>e.json().then((e=>{const{SecurityID:t,...n}=e;this.setState({loading:!1,verifyProps:n,token:t})}))))}handleCompleteVerification(e){const{endpoints:{verify:t},onCompleteVerification:n}=this.props,{selectedMethod:r,token:o}=this.state,i=o?`?SecurityID=${o}`:"",a=`${t.replace("{urlSegment}",r.urlSegment)}${i}`,{ss:{i18n:s}}=window;this.setState({loading:!0}),(0,u.default)(a,"POST",JSON.stringify(e)).then((e=>{switch(e.status){case 200:return n(),null;case 202:return this.setState({loading:!1}),null;case 429:return this.setState({loading:!1,message:s._t("MultiFactorAuthentication.TRY_AGAIN_ERROR",p.default["MultiFactorAuthentication.TRY_AGAIN_ERROR"])}),null;default:return e.status.toString().match(/^5[0-9]{2}$/)?(this.setState({loading:!1,message:s._t("MultiFactorAuthentication.UNKNOWN_ERROR",p.default["MultiFactorAuthentication.UNKNOWN_ERROR"])}),null):e.json()}})).then((e=>{e&&this.setState({loading:!1,...e})}))}handleShowOtherMethodsPane(e){e.preventDefault(),this.setState({showOtherMethods:!0,message:""})}handleHideOtherMethodsPane(e){e.preventDefault(),this.setState({showOtherMethods:!1})}handleClickOtherMethod(e,t){e.preventDefault();const{registeredMethods:n}=this.props;t&&this.setSelectedMethod(n.find((e=>e.urlSegment===t.urlSegment)))}renderOtherMethodsControl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=this.getOtherMethods(),{ss:{i18n:n}}=window;return Array.isArray(t)&&t.length?r.default.createElement("a",{href:"#",className:(0,i.default)("btn btn-secondary",e),onClick:this.handleShowOtherMethodsPane},n._t("MFAVerify.MORE_OPTIONS","More options")):null}renderOtherMethods(){const e=this.getOtherMethods(),{selectedMethod:t,showOtherMethods:n}=this.state,{resources:o,SelectMethodComponent:i}=this.props;return t&&!n?null:r.default.createElement(r.default.Fragment,null,this.renderTitle(),r.default.createElement(i,{resources:o,methods:e,onClickBack:this.handleHideOtherMethodsPane,onSelectMethod:e=>t=>this.handleClickOtherMethod(t,e)}))}renderSelectedMethod(){const{isAvailable:e,getUnavailableMessage:t}=this.props,{selectedMethod:n,showOtherMethods:o,verifyProps:i,message:u}=this.state,{ss:{i18n:s}}=window;if(!n||o)return null;if(e&&!e(n)){const e=t(n);return r.default.createElement(d.default,{title:s._t("MFAVerify.METHOD_UNAVAILABLE","This authentication method is unavailable"),message:e,controls:this.renderOtherMethodsControl("btn-outline-secondary")})}const c=(0,a.loadComponent)(n.component),l=s.inject(s._t("MFAVerify.VERIFY_WITH","Verify with {method}"),{method:n.name.toLowerCase()});return r.default.createElement(r.default.Fragment,null,this.renderTitle(),r.default.createElement("h2",{className:"mfa-section-title"},l),c&&r.default.createElement(c,y({},i,{method:n,error:u,onCompleteVerification:this.handleCompleteVerification,moreOptionsControl:this.renderOtherMethodsControl()})))}renderTitle(){const{ss:{i18n:e}}=window;return r.default.createElement("h1",{className:"mfa-app-title"},e._t("MFAVerify.TITLE","Log in"))}render(){const{loading:e}=this.state;return e?r.default.createElement(c.default,{block:!0}):r.default.createElement(r.default.Fragment,null,this.renderSelectedMethod(),this.renderOtherMethods())}}t.Component=g,g.propTypes={endpoints:o.default.shape({verify:o.default.string.isRequired,register:o.default.string}),registeredMethods:o.default.arrayOf(s.default),defaultMethod:o.default.string,SelectMethodComponent:o.default.oneOfType([o.default.object,o.default.func])},g.defaultProps={SelectMethodComponent:l.default};t.default=(0,f.default)(g)},93161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=s(n(5556)),i=s(n(46942)),a=s(n(86026)),u=s(n(71974));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class l extends r.PureComponent{renderControls(){const{ss:{i18n:e}}=window,{onClickBack:t}=this.props;return r.default.createElement("div",{className:"mfa-verify-select-method__actions"},r.default.createElement("a",{href:"#",className:"mfa-verify-select-method__back",onClick:t},e._t("MFAVerify.BACK","Back")))}renderLastResortMessage(){const{ss:{i18n:e}}=window;return r.default.createElement("p",null,e._t("MFAVerify.LAST_RESORT_MESSAGE","Contact your site administrator if you require your multi-factor authentication to be reset."))}renderMethod(e){const{isAvailable:t,getUnavailableMessage:n,onSelectMethod:o}=this.props,{ss:{i18n:a}}=window,u=a.inject(a._t("MFAVerify.VERIFY_WITH","Verify with {method}"),{method:e.name.toLowerCase()});if(!t(e)){const t=e.supportLink&&r.default.createElement("span",null,"(",r.default.createElement("a",{href:e.supportLink,target:"_blank",rel:"noreferrer noopener"},a._t("MFASelectMethod.UNAVAILABLE","unavailable")),")"),o=n(e),s=(0,i.default)("mfa-verify-select-method__method","mfa-verify-select-method__method--unavailable");return r.default.createElement("li",{key:e.urlSegment,className:s},u," ",t,o&&r.default.createElement("span",{className:"mfa-verify-select-method__method-message"},o))}return r.default.createElement("li",{key:e.urlSegment,className:"mfa-verify-select-method__method"},r.default.createElement("a",{href:"#",onClick:o(e)},u))}renderMethodList(){const{methods:e}=this.props;return r.default.createElement("ul",{className:"mfa-verify-select-method__method-list"},e.map(this.renderMethod.bind(this)))}render(){const{ss:{i18n:e}}=window,{resources:t}=this.props;return r.default.createElement("div",{className:"mfa-verify-select-method"},r.default.createElement("h2",{className:"mfa-section-title"},e._t("MFAVerify.OTHER_METHODS_TITLE","Try another way to verify")),r.default.createElement("div",{className:"mfa-verify-select-method__container"},r.default.createElement("div",{className:"mfa-verify-select-method__content"},this.renderMethodList(),this.renderLastResortMessage(),this.renderControls()),t&&t.more_options_image_url&&r.default.createElement("img",{alt:e._t("MultiFactorAuthentication.MORE_OPTIONS_IMAGE_ALT","Graphic depicting various MFA options"),"aria-hidden":"true",className:"mfa-verify-select-method__image",src:t.more_options_image_url})))}}t.Component=l,l.propTypes={methods:o.default.arrayOf(a.default),getUnavailableMessage:o.default.func.isRequired,isAvailable:o.default.func.isRequired,onSelectMethod:o.default.func,onClickBack:o.default.func,resources:o.default.object};t.default=(0,u.default)(l)},52291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=p(n(5556)),i=p(n(84469)),a=p(n(81645)),u=p(n(91973)),s=p(n(72013)),c=p(n(20222)),l=n(8228),f=n(85612),d=n(60134);function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t200!==e.status?(this.setState({schemaLoaded:!0}),Promise.reject()):e.json())).then((e=>{this.setState({schema:e}),t(e.allMethods)})).catch((()=>{}))}componentDidUpdate(e,t){if(!this.state.schema)return;const{availableMethods:n}=this.state.schema;if(!t.schema)return void this.props.onSetAvailableMethods(n);const{availableMethods:r}=t.schema;r.map((e=>e.urlSegment)).sort().toString()!==n.map((e=>e.urlSegment)).sort().toString()&&this.props.onSetAvailableMethods(n)}handleCompleteVerify(){const{schema:{isFullyRegistered:e,backupMethod:t,registeredMethods:n}}=this.state;this.setState({verificationCompleted:!0}),e?this.handleCompleteLogin():n&&n.length&&0===n.filter((e=>e.urlSegment===t.urlSegment)).length&&this.props.onChooseMethod(t)}handleCompleteLogin(){const{complete:e}=this.state.schema.endpoints;this.setState({loading:!0}),window.location=e}renderRegister(){const{schema:e,verificationCompleted:t}=this.state;return e&&e.endpoints&&e.endpoints.register&&(t||!e.registeredMethods.length)?r.default.createElement(u.default,v({},e,{onCompleteRegistration:this.handleCompleteLogin})):null}renderVerify(){const{schema:e,verificationCompleted:t}=this.state;return e&&!t&&e.registeredMethods.length?r.default.createElement(a.default,v({},e,{onCompleteVerification:this.handleCompleteVerify})):null}render(){const{schema:e,schemaLoaded:t,loading:n}=this.state,{ss:{i18n:o}}=window;return!e||n?!e&&t?r.default.createElement(c.default,{title:o._t("MFALogin.SOMETHING_WENT_WRONG","Something went wrong!"),controls:r.default.createElement("button",{type:"button",onClick:()=>window.location.reload(),className:"btn btn-outline-secondary"},o._t("MFALogin.TRY_AGAIN","Try again"))}):r.default.createElement(s.default,{block:!0}):r.default.createElement(r.default.Fragment,null,this.renderRegister(),this.renderVerify())}}t.Component=y,y.propTypes={schemaURL:o.default.string.isRequired};t.default=(0,d.connect)(null,(e=>({onChooseMethod:t=>e((0,l.chooseMethod)(t)),onSetAvailableMethods:t=>e((0,l.setAvailableMethods)(t)),onSetAllMethods:t=>e((0,f.setAllMethods)(t))})))(y)},84469:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return fetch(e,{body:arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,credentials:"same-origin",headers:arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},method:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET"})}},82283:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatCode=void 0;t.formatCode=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";if(e.length<6)return e;if(e.length%4==0)return e.split(/(.{4})/g).filter((e=>e)).join(t).trim();if(e.length%3==0)return e.split(/(.{3})/g).filter((e=>e)).join(t).trim();const n=4-e.length%4,r=(e.length-3*n)/4,o=[...[...Array(r).keys()].map((()=>4)),...[...Array(n).keys()].map((()=>3))];let i=0;return o.map((t=>e.substring(i,i+=t))).join(t).trim()}},71974:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hoc=t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(96540)),o=n(60134),i=n(91829);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=class extends r.Component{constructor(e){super(e),this.getAvailabilityOverride=this.getAvailabilityOverride.bind(this),this.isAvailable=this.isAvailable.bind(this),this.getUnavailableMessage=this.getUnavailableMessage.bind(this)}getAvailabilityOverride(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{availableMethodOverrides:t}=this.props,n=e||this.props.method,{urlSegment:r}=n;return void 0!==t[r]?t[r]:{}}getUnavailableMessage(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.props.method;return this.getAvailabilityOverride(e).unavailableMessage||e.unavailableMessage}isAvailable(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.props.method,t=this.getAvailabilityOverride(e);let n=e.isAvailable;return void 0!==t.isAvailable&&(n=t.isAvailable),n}render(){return r.default.createElement(e,u({},this.props,{isAvailable:this.isAvailable,getUnavailableMessage:this.getUnavailableMessage}))}},n=(e=>e.displayName||e.name||"Component")(e);return t.displayName=`WithMethodAvailability(${n})`,t};t.hoc=s;const c=(0,i.compose)((0,o.connect)((e=>{const t=[...e.mfaRegister.availableMethods,...e.mfaVerify.allMethods],n={};return Object.values(t).forEach((t=>{const{urlSegment:r}=t,o=`${r}Availability`;void 0!==e[o]&&(n[r]=e[o])})),{availableMethodOverrides:n}})),s);t.default=c},29716:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=["ADD_AVAILABLE_METHOD","REMOVE_AVAILABLE_METHOD","SET_AVAILABLE_METHODS","SET_SCREEN","SET_METHOD"].reduce(((e,t)=>Object.assign(e,{[t]:`MFA_REGISTER.${t}`})),{})},8228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showScreen=t.setAvailableMethods=t.removeAvailableMethod=t.chooseMethod=t.addAvailableMethod=void 0;var r,o=(r=n(29716))&&r.__esModule?r:{default:r};t.showScreen=e=>({type:o.default.SET_SCREEN,payload:{screen:e}});t.chooseMethod=e=>({type:o.default.SET_METHOD,payload:{method:e}});t.setAvailableMethods=e=>({type:o.default.SET_AVAILABLE_METHODS,payload:{availableMethods:e}});t.addAvailableMethod=e=>({type:o.default.ADD_AVAILABLE_METHOD,payload:{method:e}});t.removeAvailableMethod=e=>({type:o.default.REMOVE_AVAILABLE_METHOD,payload:{method:e}})},21711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case i.default.SET_SCREEN:{const{screen:t}=n;return null===e.method&&t===o.SCREEN_REGISTER_METHOD?{...e,screen:o.SCREEN_CHOOSE_METHOD}:{...e,screen:t}}case i.default.SET_METHOD:return{...e,method:n.method};case i.default.SET_AVAILABLE_METHODS:return{...e,availableMethods:n.availableMethods};case i.default.ADD_AVAILABLE_METHOD:return{...e,availableMethods:[...e.availableMethods,n.method]};case i.default.REMOVE_AVAILABLE_METHOD:return{...e,availableMethods:e.availableMethods.filter((e=>e.urlSegment!==n.method.urlSegment))};default:return e}};var r,o=n(91973),i=(r=n(29716))&&r.__esModule?r:{default:r};const a={screen:o.SCREEN_INTRODUCTION,method:null,availableMethods:[]}},30892:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=["SET_ALL_METHODS"].reduce(((e,t)=>Object.assign(e,{[t]:`MFA_VERIFY.${t}`})),{})},85612:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAllMethods=void 0;var r,o=(r=n(30892))&&r.__esModule?r:{default:r};t.setAllMethods=e=>({type:o.default.SET_ALL_METHODS,payload:{allMethods:e}})},82087:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t===o.default.SET_ALL_METHODS)return{...e,allMethods:n.allMethods};return e};var r,o=(r=n(30892))&&r.__esModule?r:{default:r};const i={allMethods:[]}},49701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(5556))&&r.__esModule?r:{default:r};t.default=o.default.shape({urlSegment:o.default.string,name:o.default.string,description:o.default.string,supportLink:o.default.string,supportText:o.default.string,thumbnail:o.default.string,component:o.default.string,isAvailable:o.default.bool,unavailableMessage:o.default.string})},86026:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(5556))&&r.__esModule?r:{default:r};t.default=o.default.shape({name:o.default.string,urlSegment:o.default.string,isAvailable:o.default.bool,unavailableMessage:o.default.string,component:o.default.string,supportLink:o.default.string,thumbnail:o.default.string})},17965:function(e,t,n){"use strict";var r=n(16426),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,u,s,c,l=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),u=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),u.selectNodeContents(c),s.addRange(u),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(u):s.removeAllRanges()),c&&document.body.removeChild(c),a()}return l}},5542:function(e,t,n){"use strict";e.exports=n(64583).polyfill()},64583:function(e,t,n){e.exports=function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,u=function(e,t){w[o]=e,w[o+1]=t,2===(o+=2)&&(a?a(E):_())};function s(e){a=e}function c(e){u=e}var l="undefined"!=typeof window?window:void 0,f=l||{},d=f.MutationObserver||f.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return process.nextTick(E)}}function y(){return void 0!==i?function(){i(E)}:b()}function g(){var e=0,t=new d(E),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function m(){var e=new MessageChannel;return e.port1.onmessage=E,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(E,1)}}var w=new Array(1e3);function E(){for(var e=0;e'),this.addEvents();var f=this.opts,d=f.headElements,p=f.bodyElements;Array.isArray(d)&&d.forEach((function(e){return l.head.appendChild(e)})),Array.isArray(p)&&p.forEach((function(e){return l.body.appendChild(e)})),Array.isArray(t)&&t.forEach((function(e){e&&l.head.appendChild(o(e)?a(l,e):i(l,e))})),l.body.appendChild(this.elCopy),Array.isArray(n)&&n.forEach((function(e){if(e){var t=l.createElement("script");o(e)?t.src=e:t.innerText=e,l.body.appendChild(t)}})),l.close()}}},e.prototype.printURL=function(e,t){this.isLoading||(this.addEvents(),this.isLoading=!0,this.callback=t,this.iframe.src=e)},e.prototype.onBeforePrint=function(e){this.onbeforeprint=e},e.prototype.onAfterPrint=function(e){this.onafterprint=e},e.prototype.launchPrint=function(e){this.isLoading||e.print()},e.prototype.addEvents=function(){var e=this;if(!this.hasEvents){this.hasEvents=!0,this.iframe.addEventListener("load",(function(){return e.onLoad()}),!1);var t=this.iframe.contentWindow;t&&(this.onbeforeprint&&t.addEventListener("beforeprint",this.onbeforeprint),this.onafterprint&&t.addEventListener("afterprint",this.onafterprint))}},e.prototype.onLoad=function(){var e=this;if(this.iframe){this.isLoading=!1;var t=this.iframe,n=t.contentDocument,r=t.contentWindow;if(!n||!r)return;"function"==typeof this.callback?this.callback({iframe:this.iframe,element:this.elCopy,launchPrint:function(){return e.launchPrint(r)}}):this.launchPrint(r)}},e}();t.Printd=c,t.default=c},2694:function(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556:function(e,t,n){e.exports=n(2694)()},6925:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},25264:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=u(n(96540)),i=u(n(17965)),a=["text","onCopy","options","children"];function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){for(var n=0;n