PageSourceSearch

https://realfit.co/_next/static/chunks/8384.29c600a305da7cea.js

js realfit.co collected 2026-10-05 03:06:54 UTC 4,588 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8384],{8384:function(e,t,n){n.r(t),n.d(t,{amplify_select_mfa_type:function(){return T}});var i=n(2508),s=n(3769),r=n(1953),a=n(5573),o=n(531),u=n(8063),l=n(4636),h=function(e,t){var n,i,s,r,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(s=(s=a.trys).length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}},c=new s.k("SelectMFAType"),T=function(){function e(e){var t=this;(0,i.r)(this,e),this.handleSubmit=function(e){return t.verify(e)},this.TOTPSetup=!1,this.selectMessage=null,this.MFAMethod=null,this.isTOTP=!1,this.isNoMFA=!1,this.isSMS=!1,this.loading=!1,this.isToastVisible=!1}return e.prototype.handleRadioButtonChange=function(e){this.TOTPSetup=!1,this.selectMessage=null,this.isNoMFA=!1,this.isTOTP=!1,this.isSMS=!1,this.isToastVisible=!1;var t=e.target,n=t.value,i=t.type,s=t.checked,r=["radio","checkbox"].includes(i);n===a.M.SMS&&r&&(this.isSMS=s),n===a.M.TOTP&&r&&(this.isTOTP=s),n===a.M.NOMFA&&r&&(this.isNoMFA=s)},e.prototype.verify=function(e){var t,n,i,s;return t=this,n=void 0,i=void 0,s=function(){var t,n,i,s;return h(this,function(h){switch(h.label){case 0:if(e&&e.preventDefault(),c.debug("MFA Type Values",{TOTP:this.isTOTP,SMS:this.isSMS,"No MFA":this.isNoMFA}),this.isTOTP?this.MFAMethod=a.M.TOTP:this.isSMS?this.MFAMethod=a.M.SMS:this.isNoMFA&&(this.MFAMethod=a.M.NOMFA),t=this.authData,!o.g||"function"!=typeof o.g.setPreferredMFA)throw Error(l.N);this.loading=!0,h.label=1;case 1:return h.trys.push([1,3,4,5]),[4,o.g.setPreferredMFA(t,this.MFAMethod)];case 2:return n=h.sent(),c.debug("Set Preferred MFA Succeeded",n),this.selectMessage=r.o.get(u.T.SUCCESS_MFA_TYPE)+" "+this.MFAMethod,[3,5];case 3:return(s=(i=h.sent()).message)===l.e||s===l.f?(this.TOTPSetup=!0,this.selectMessage=r.o.get(u.T.SETUP_TOTP_REQUIRED)):(c.debug("Set Preferred MFA failed",i),this.selectMessage=r.o.get(u.T.UNABLE_TO_SETUP_MFA_AT_THIS_TIME)),[3,5];case 4:return this.loading=!1,this.isToastVisible=!0,[7];case 5:return[2]}})},new(i||(i=Promise))(function(e,r){function a(e){try{u(s.next(e))}catch(e){r(e)}}function o(e){try{u(s.throw(e))}catch(e){r(e)}}function u(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(a,o)}u((s=s.apply(t,n||[])).next())})},e.prototype.contentBuilder=function(){var e=this;if(!this.MFATypes||Object.keys(this.MFATypes).length<2)return c.debug(r.o.get(u.T.LESS_THAN_TWO_MFA_VALUES_MESSAGE)),(0,i.h)("div",null,(0,i.h)("a",null,r.o.get(u.T.LESS_THAN_TWO_MFA_VALUES_MESSAGE)));var t=this.MFATypes,n=t.SMS,s=t.TOTP,a=t.Optional;return(0,i.h)("amplify-form-section",{submitButtonText:r.o.get(u.T.SELECT_MFA_TYPE_SUBMIT_BUTTON_TEXT),headerText:r.o.get(u.T.SELECT_MFA_TYPE_HEADER_TEXT),handleSubmit:function(t){return e.handleSubmit(t)},loading:this.loading},n?(0,i.h)("amplify-radio-button",{key:"sms",name:"MFAType",value:"SMS",label:"SMS",handleInputChange:function(t){return e.handleRadioButtonChange(t)}}):null,s?(0,i.h)("amplify-radio-button",{key:"totp",name:"MFAType",value:"TOTP",label:"TOTP",handleInputChange:function(t){return e.handleRadioButtonChange(t)}}):null,a?(0,i.h)("amplify-radio-button",{key:"noMFA",name:"MFAType",value:"NOMFA",label:"No MFA",handleInputChange:function(t){return e.handleRadioButtonChange(t)}
1}):null)},e.prototype.renderToast=function(){var e=this;return this.isToastVisible&&this.selectMessage?(0,i.h)("amplify-toast",{message:this.selectMessage,handleClose:function(){e.selectMessage=null,e.isToastVisible=!1}}):null},e.prototype.render=function(){return(0,i.h)("div",null,this.contentBuilder(),this.TOTPSetup?(0,i.h)("amplify-totp-setup",{user:this.authData}):null,this.renderToast())},e}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.