%PDF- %PDF-
Direktori : /home1/dimen328/.trash/espace/verification/index/ |
Current File : //home1/dimen328/.trash/espace/verification/index/main.js.tВlВchargement |
bnpp.define("fullAuthentication/../../app/authenticationCommons/validateAuthentication",["jquery","qtip","underscore"],function(t,e,n){var i={};return i.hostUrl="",i.count=-1,String.prototype.includes||(String.prototype.includes=function(t){var e=!1;return-1!==this.indexOf(t)&&(e=!0),e}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,value:function(t){var e=this.filter(function(e){return e==t});return e.length>0}}),i.startsWith=function(t,e){var n=0;return t.indexOf(e,n)===n},String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.indexOf(t,e)===e}),String.prototype.replaceAll||(String.prototype.replaceAll=function(t,e){return"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,e):this.replace(new RegExp(t,"g"),e)}),i.initTooltip=function(e,n){var i=t(e),a="mouseenter";("ontouchstart"in window||navigator.maxTouchPoints)&&(a="click");var s="qtip-light tooltip"+(i.hasClass("alertTooltipBtn")?" alerte":"");i.qtip({content:{text:n.find("#"+i.data("tooltip")).html()},position:{my:i.hasClass("infoContent")?"top right":i.data("orientation"),at:i.hasClass("infoContent")?"bottom center":i.data("position"),target:i.data("target")?t(i.data("target")):i,viewport:t(window),adjust:{method:"shift shift"}},show:i.data("stay")?"click":a,hide:{fixed:!0,delay:250},style:{classes:s,width:t(e).hasClass("infoContent")===!0?280:t(e).hasClass("resetBtn")===!0?80:320,tip:{width:15,height:15}},events:{show:function(){i.addClass("on")},hide:function(){i.removeClass("on")},render:function(e,n){t(".close",n.elements.content).click(function(t){n.hide(t)}),window.connectingCall()}}})},i.numericCheck=function(t){8!=t.keyCode&&0!=t.keyCode&&(t.keyCode<48||t.keyCode>57)&&t.preventDefault()},i.print=function(e,n){function i(t){var e=window.open("",n,"height=1000,width=1000");return e.document.write("<html><head><title>"+n+"</title>"),e.document.write("</head><body >"),e.document.write(t),e.document.write("</body></html>"),e.print(),e.close(),!0}i(t(e).html())},i.validateEmail=function(t,e){var n=/^([\w-\.\u00C0-\u017F]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-\u00C0-\u017F]+\.)+))([a-zA-Z\u00C0-\u017F]{2,4}|[0-9]{1,3})(\]?)$/;return n.test(t)&&n.test(e)?!0:!1},i.validateFullEmail=function(t,e,n){var i=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-])+\.([a-zA-Z0-9])+$/,a=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-])+\.([a-zA-Z0-9])+\.([a-zA-Z0-9])+$/,s=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9_\-])+\.([a-zA-Z0-9_\-])+\.([a-zA-Z0-9_\-])+\.([a-zA-Z0-9_\-])+$/,o=t.substring(0,t.indexOf("@")),r=t.substring(t.indexOf("@"),t.length),l=r.substring(r.indexOf("@")+1,r.indexOf(".")),c=r.substring(r.indexOf(".")+1,r.length);return i.test(t)||a.test(t)||s.test(t)?e.includes(t.split("@")[0])||n.includes(t.split("@")[1])||o.length>=50||l.length>=50||c.length>=50||"."==l.charAt(0)||"."==l.charAt(l.charAt(l.length))||"."==c.charAt(0)||"."==c.charAt(c.charAt(c.length))?!1:!0:!1},i.validateEmail=function(t){var e=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-])+\.([a-zA-Z0-9]{1,3})+$/,n=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-])+\.([a-zA-Z0-9]{1,3})+\.([a-zA-Z0-9]{1,3})+$/;return e.test(t)||n.test(t)?!0:!1},i.validatePhoneNumber=function(t){var e=/^[0-9]+$/;return t.match(e)?!0:!1},i.validatePhoneNumberLength=function(t){return 10!==t.length?!1:!0},i.requiredPhone=function(t){return""===t?!1:!0},i.validateNumberformat=function(t){var e=/^\+?(0|[0-9]\d*)$/;return e.test(t)?-1!=t.indexOf("+")?!1:-1!=t.indexOf("-")?!1:!0:!1},i.isNullOrWhiteSpace=function(t){return null===t||null!==t.match(/^\s*$/)},i.validateName=function(t){var e=/^[-'a-zA-Z\u00C0-\u017F\u2018 ]+$/;return e.test(t)?!0:!1},i.validateAddress=function(t){var e=/^[-.',\s a-zA-Z0-9]+$/;return e.test(t)?!0:!1},i.validatePostalCode=function(t){var e=/^[0-9]+$/;return e.test(t)?!0:!1},i.validatePhoneNumber=function(t){var e=/^[\s 0-9]+$/;return e.test(t)?!0:!1},i.loadContent=function(t,e,i,a){require(["text!"+t],function(t){n.template(t,e),a.find(i).html(t)})},i.loadTempWCM=function(e,i,a,s){require(["text!"+e],function(e){var o=n.template(e,i);t(a).append(o),s&&s()})},i.invalidCheck=function(t){var e,a;a=[],a=i.restrictedParameters.split(","),n.each(a,function(t,n){e=n>0?e+"|"+t:t});var s=new RegExp(e);return s.test(t)?!0:!1},i.updateProgress=function(t,e){var a,s,a={},o=["Chargement ...","Chargement ...","Chargement ..."];i.count=i.count+1,i.count>2?(i.count=2,a.error=o[i.count]):a.error=o[i.count],s=n.template(e,a),t.html(s)},i.updateError=function(t,e,i){var a,s;t.empty();var a={};a.error=i,s=n.template(e,a),t.html(s)},i.loadContentWithCallBack=function(t,e,i,a,s){require(["text!"+t],function(t){n.template(t,e),a.find(i).html(t),s&&s()})},i.assignTopics=function(e,n){t.each(e,function(t,e){n[t]=e})},i.checkDelimiter=function(t){return-1!==t.indexOf("<%=")?!0:!1},i.currencyFormatter=function(t,e){var i;return i=n.template(t,e)},i}),bnpp.define("fullAuthentication/../../app/lib/authenticationRivetsConfig",["rivets","backbone"],function(t,e){t.formatters.translatable=function(t){return"TRANSLATED: "+t},t.formatters.date=function(t){return"DATE: "+t},t.formatters.amount=function(t){return"AMOUNT: "+t},t.formatters.accountNumber=function(t){return""!==t?t=t.toString().replace(/(\d{4})(\d{3})(\d{3})(\d{4})/,"$1 $2 $3 $4"):void 0},t.binders.src=function(t,e){t.src=e},t.binders.href=function(t,e){t.href=e},t.binders.input={publishes:!0,routine:t.binders.value.routine,bind:function(t){t.addEventListener("input",this.publish)},unbind:function(t){t.removeEventListener("input",this.publish)}},t.formatters.currencyFormatter=function(t){if(t){if(0!==t)return-1!==t.toString().indexOf(".")?(t=t.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "),t=t.replace(/\./g,","),1===t.toString().substring(t.indexOf(",")+1).length&&(t+="0")):-1===t.toString().indexOf(",")&&(t=t.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "),t+=",00"),t;var e=0;return e}return"0,00"},t.formatters.blank=function(t){return""===t?"-":t},t.formatters.phone=function(t){return""!==t?t=t.toString().replace(/\B(?=(\d{2})+(?!\d))/g," "):void 0};var n=t.adapters["."],i=n.subscribe,a=n.unsubscribe;return n.subscribe=function(t,n,a){void 0!==t&&null!==t&&(t&&n&&t[n]instanceof e.Collection?t[n].on("add remove reset",function(){a(t[n])}):t instanceof e.Model?t.on("change:"+n,function(t,e){a(e)}):i.apply(this,arguments))},n.unsubscribe=function(t,n,i){void 0!==t&&null!==t&&(t&&n&&t[n]instanceof e.Collection?t[n].off("add remove reset",function(){i(t[n])}):t instanceof e.Model?t.off("change:"+n,function(t,e){i(e)}):a.apply(this,arguments))},n.read=function(t,n){if(null!==t&&void 0!==t){if(t instanceof e.Model)return t.get(n);var i=t[n];return i instanceof e.Collection?i.models:i}},n.publish=function(t,n,i){t instanceof e.Collection?t.models=i:t instanceof e.Model?t.set(n,i):t[n]=i},t}),bnpp.define("fullAuthentication/model/authenticationConfigModel",["backbone","underscore"],function(t,e){return t.Model.extend({defaults:{keyPadUrl:"",mappedValues:[],enteredValue:[],distId:"",width:"",height:"",density:"",numeroVendeur:""},initialize:function(t){this.url=t.url},parse:function(t){var n=this;e.each(t.map,function(t){n.get("mappedValues").push(t.split(",")[4])}),this.set("kUrl",t.url),this.set("map",t.map),this.set("id",t.id)}})}),bnpp.define("fullAuthentication/model/multiLanConfigModel",["backbone","backboneDeepModel"],function(t){return t.DeepModel.extend({initialize:function(t){this.url=t.url}})}),bnpp.define("fullAuthentication/model/authenticationSubmitModel",["backbone","underscore","../../../app/authenticationCommons/validateAuthentication"],function(t,e,n){return t.Model.extend({defaults:{status:"",progressFlagStatus:"",flag:!1,decisionFlag:"",conventionFlag:"",dateSignatureConvention:"",statutCodeSecret:"",addressMail:"",nomPersonne:"",prenomPersonne:"",dateDerniereAuthentReussie:"",bankingAgreementFlag:!1,secretCodeFlag:!1,emailFlag:!1,statusCode:"1",constructNextView:"",nextView:[],loadNextView:"",previousView:[],email:"",confirmEmail:"",oldEmail:"","opt-in":!1,crFlag:!1,responseCode:"",userPassword:"",userId:"",navigation:!1,isoptinSelected:"",signAgreement:"",Agreement:"",clientId:"",text:[],progressBar:!1,antiPhishing:""},initialize:function(){},fetch:function(e){return e.dataType="html",t.Model.prototype.fetch.call(this,e)},parse:function(t){var e;try{e=JSON.parse(t)}catch(n){e={htmlcontent:t}}return e},validateEmail:function(t,e){var i=this,a=i.get("email").toLowerCase(),s=i.get("confirmEmail").toLowerCase();n.isNullOrWhiteSpace(i.get("confirmEmail"))?(t.set("emailFlag",!1),t.set("confirmEmail",!0),t.set("confirmEmailText",e.get("app.authentication.S18.ERRF05-027_1"))):n.validateEmail(i.get("confirmEmail"))?(t.set("emailFlag",!0),t.set("confirmEmail",!1),t.set("confirmEmailFormat",!1)):(t.set("emailFlag",!1),t.set("confirmEmail",!0),t.set("confirmEmailText",e.get("app.authentication.S18.ERRF05-003_2"))),t.get("emailFlag")===!0&&""!==a&&(a!==s?(t.set("confirmEmail",!0),t.set("confirmEmailText",e.get("app.authentication.S18.ERRF05-027_2"))):i.set("navigation",!0))},validateEmailFormat:function(t,e,i){var a=this;n.isNullOrWhiteSpace(a.get("email"))||n.validateEmail(a.get("email"))?n.isNullOrWhiteSpace(a.get("email"))?(t.set("emailFlag",!1),t.set("emailFormat",!0),t.set("email",!0),"goToNext"===i&&t.set("emailText",e.get("app.authentication.S18.ERRF05-027_1"))):(t.set("email",!1),t.set("emailFlag",!0),t.set("emailFormat",!1)):(t.set("emailFlag",!1),t.set("email",!0),t.set("emailFormat",!0),t.set("emailText",e.get("app.authentication.S18.ERRF05-003_2")))},validateConfirmEmailFormat:function(t,e){var i=this;n.isNullOrWhiteSpace(i.get("confirmEmail"))||n.validateEmail(i.get("confirmEmail"))||(t.set("emailFlag",!1),t.set("confirmEmail",!0),t.set("confirmEmailText",e.get("app.authentication.S18.ERRF05-003_2")))}})}),bnpp.define("fullAuthentication/model/authenticationErrorModel",["backbone"],function(t){return t.Model.extend({defaults:{userId:!1,password:!1,userIdText:"",passwordText:"",isError:!1,emailEmpty:!1,confirmEmail:!1,emailError:"",confirmEmailError:"",confirmEmailFormat:!1,emailFormat:!1,emailMatch:!1,misMatchText:"",clientidRestrictedErrorFlag:!1,clientidRestrictedMessage:""},initialize:function(t){this.url=t.url}})}),bnpp.define("fullAuthentication/model/authenticationFetchVendModel",["backbone"],function(t){return t.Model.extend({initialize:function(t){this.url=t.url}})}),bnpp.define("fullAuthentication/model/authenticationFetchParamsModel",["backbone","underscore"],function(t){return t.Model.extend({defaults:{authProcId:"",distId:"",meanId:"",name:"",eaiAuthType:"",eaiResponseType:"",smId:"",agreeId:"",authenticationMeanId:"",valid:"",value:!1,fingerPrint:""},initialize:function(t){this.url=t.url},parse:function(t){this.set("numServClient",t.numServClient.text)}})}),bnpp.define("fullAuthentication/model/jslogModel",["backbone"],function(t){return t.Model.extend({initialize:function(){this.url="rpc/logGeneric/jslogs"},defaults:{},getRequest:function(t,e,n){var i={moduleName:t||"defaultModule",eventName:e||"defaultEvent",objectJson:JSON.stringify(n)||"defaultJSON"};return JSON.stringify(i)}})}),bnpp.define("fullAuthentication/view/webAnalytics",["backbone","underscore","jquery","sf","../model/jslogModel"],function(t,e,n,i,a){return t.View.extend({events:{},authenticationWebAnalyticsTopic:function(t){i.messaging.publishTopic(t.constant.WEBANALYTICSTOPIC,{event:t.constant.PAGELOADED})},analyticsPublishAuthentication:function(t){i.messaging.publishTopic(t.constant.ANALYTICSONLOADTOPIC,{ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSAUTHENTICATION})},authenticationLoginSuccess:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSAUTHENTICATION}),i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSAUTHENTICATION,loginID:t.publishModel.get("userId")})},authenticationLoginError:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSAUTHENTICATIONERROR,ErrorType:t.publishModel.get("ErrorType"),ErrorNumber:t.publishModel.get("ErrorNumber")})},analyticsLostPin:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSLOSTPIN})},analyticsPublishBankingConvention:function(t){i.messaging.publishTopic(t.constant.ANALYTICSONLOADTOPIC,{ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION})},analyticsAgreedBankingAgreement:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION}),i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION,Convention_bancaire:t.constant.ANALYTICSAGREEMENTACCEPTED})},analyticsCancelBankingAgreement:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION})},analyticsRefusedBankingAgreement:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION}),i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSBANKINGCONVENTION,Convention_bancaire:t.constant.ANALYTICSAGREEMENTREFUSED})},analyticsPublishEmailModification:function(t){i.messaging.publishTopic(t.constant.ANALYTICSONLOADTOPIC,{ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.authenticationSubmitModel.get("analyticsEmailText")})},analyticsChangeEmail:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.authenticationSubmitModel.get("analyticsEmailText")})},analyticsPublishSecretCodeModification:function(t){i.messaging.publishTopic(t.constant.ANALYTICSONLOADTOPIC,{ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSSECRETCODEMODIFICATIONS})},analyticsCodeSecretSubmit:function(t){i.messaging.publishTopic(t.constant.ANALYTICSTOPIC,{event:t.constant.MODULEINTERACTION,ModuleName:t.constant.ANALYTICSAUTHENTICATIONMODULE,vpageName:t.constant.ANALYTICSSECRETCODEMODIFICATIONS})},analyticsPublishAuthenticationError:function(t,e,n){i.messaging.publishTopic("ia.sf.webanalytics",{ModuleName:t,event:e,vpageName:n})},logWebAnalytics:function(t,n,a,s,o){var r={};switch(r.event=n,r.ModuleName=a,s&&(r.vpageName=s),e.isEmpty(o)||(o.loginID?r.loginID=o.loginID:r.Json=o),t){case"onload":i.messaging.publishTopic("ia.sf.loaded",r);break;case"screen":i.messaging.publishTopic("ia.sf.webanalytics",r)}},logEvent:function(t,e,n,i){this.jsLogModel=new a,this.jsLogModel.fetch({url:i+this.jsLogModel.url,contentType:"application/json",type:"POST",data:this.jsLogModel.getRequest(t,e,n),success:function(){window.console.log("success")},error:function(){window.console.log("error")}})}})}),bnpp.define("fullAuthentication/model/authenticationPublishDetailsModel",["backbone","underscore","../../../app/authenticationCommons/validateAuthentication"],function(t,e,n){return t.Model.extend({defaults:{userId:"",reload:!1,hover:!1},initialize:function(t){this.url=t.url},validateData:function(t,e){var i=this;t.set("userId",!1),t.set("isError",!1),n.isNullOrWhiteSpace(i.get("userId"))?(t.set("userId",!0),t.set("isError",!0)):i.get("userId").match(/^[0-9]*$/)?8!==i.get("userId").length&&10!==i.get("userId").length?(t.set("userId",!0),t.set("isError",!0),t.set("userIdText",e.get("app.authentication.S18.ERRF05-003_1"))):(t.set("userId",!1),t.set("isError",!1)):(t.set("userId",!0),t.set("isError",!0),t.set("userIdText",e.get("app.authentication.S18.ERRF05-003_2")))}})}),bnpp.define("text!fullAuthentication/template/authenticate.html",[],function(){return'<!-- WCM content 1 starts-->\n<div class="intro">\n</div>\n<!-- WCM content 1 ends-->\n<div class="formIdentification large">\n <!-- maintanenceText starts-->\n <div rv-if="view.wcmMaintanenceTextKey" class="maintanenceText"></div>\n <!-- maintanenceText ends-->\n <form id="accesClientIdentification">\n <div class="col">\n <div class="title identification cpay-color">\n <span rv-text="model.app.authentication.S18.LIBF05-003_1_1"></span>\n </div>\n <div>\n <label for="accesClientIdentifiantClient">\n <strong rv-html="model.app.authentication.S18.LIBF05-003_2_2"></strong><br></label>\n <div class="helperContainer">\n <span>\n <input type="tel" id="accesClientIdentifiantClient" name="accesClientIdentifiantClient"\n rv-value="publish.userId" tabindex="1" maxlength="10" autocomplete="on"\n placeholder="Votre identifiant client">\n </span>\n\n\n <div class="helperBtn hasTooltip" data-tooltip="helperContent" data-position="right center"\n data-orientation="left top"></div>\n <div id="helperContent" class="hide helpWCMCOntent">\n\n </div>\n </div>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.userIdText" rv-show="errors.userId"></span> <span\n class="required" rv-text="errors.clientidRestrictedMessage"\n rv-show="errors.clientidRestrictedErrorFlag"></span>\n </div>\n </div>\n <!-- memeory text -->\n <div class="row">\n <div class="columns">\n <div class="ml customCheckboxContainer">\n <input type="checkbox" value="1" id="to_store">\n <a class="customCheckbox"></a>\n <label class="pf_inline_block" rv-text="model.app.authentication.S18.LIBF05-003_11"></label>\n <span data-tooltip="infoContent"\n class="infoContent small-push-3 margin-top-reduce borderedGreenBox hasTooltip icon-mini pf_inline_block borderedBox content-pad radius text-center large-push-3 medium-push-4 small-push-3 h4-like weak main-color right padding-left-reduce padding-right-reduce padding-top-reduce padding-bottom-reduce grey-box "\n data-hasqtip="6" aria-describedby="qtip-6">i</span>\n <br />\n <div class="icm-lost-link"><u><a class="identifiantOublie cpay-color"></a></u>\n </div>\n <div id="infoContent" class="hide infoWCMContent"></div>\n </div>\n </div>\n </div>\n\n <!-- <div><u><a class="cpay-color" href="/fr/identifiantperdu">Identifiant oublié ?</a></u></div> -->\n\n <div class="bgSubConnection">\n <span class="credito-subnav"></span>\n </div>\n </div>\n </div>\n <div class="col">\n <div class="title codeSecret cpay-color">\n <span rv-text="model.app.authentication.S18.LIBF05-003_4"></span>\n </div>\n <div>\n <label for="accesClientCodeSecret"><strong\n rv-text="model.app.authentication.S18.LIBF05-003_5"></strong></label>\n <div class="inputResetContainer">\n <span>\n <input type="text" readonly="readonly" id="accesClientCodeSecret" name="accesClientCodeSecret"\n class="password_text" placeholder="Votre code secret">\n </span>\n <a class="resetBtn hasTooltip" data-resetid="accesClientCodeSecret" data-tooltip="resetContent"\n data-position="right center" data-orientation="left top"></a>\n <div id="resetContent" class="hide">\n <span rv-text="model.app.authentication.S18.LIBF05-003_9"></span>\n </div>\n </div>\n <div class="row">\n <div class="columns">\n <span class="required" rv-html="errors.passwordText" rv-show="errors.password"></span>\n </div>\n </div>\n <div class="securedKeyboard">\n <div class="passwordKeyboard">\n <img class="keyPadImg pf_keypad_outline" tabindex="2" />\n </div>\n <a class="codeSecretOublie lastPwdRD" rv-text="model.app.authentication.S18.LIBF05-003_7"></a>\n </div>\n <div>\n <input type="button" id="accesClientSubmit"\n class="button radius large next-arrow spacedTop nowrap padding-mini"\n rv-value="model.app.authentication.S18.LIBF05-003_8" />\n </div>\n <div class="conventionBancaire">\n <a></a> <span></span>\n </div>\n </div>\n\n </div>\n </form>\n</div>\n\n<!-- WCM content 2 starts-->\n<div class="autresEspacesDedies">\n</div>\n<!-- WCM content2 ends-->'}),bnpp.define("json",["text"],function(text){function cacheBust(t){return t=t.replace(CACHE_BUST_FLAG,""),t+=t.indexOf("?")<0?"?":"&",t+CACHE_BUST_QUERY_PARAM+"="+Math.round(2147483647*Math.random())}var CACHE_BUST_QUERY_PARAM="bust",CACHE_BUST_FLAG="!bust",jsonParse="undefined"!=typeof JSON&&"function"==typeof JSON.parse?JSON.parse:function(val){return eval("("+val+")")},buildMap={};return{load:function(t,e,n,i){i.isBuild&&(i.inlineJSON===!1||-1!==t.indexOf(CACHE_BUST_QUERY_PARAM+"="))||0===e.toUrl(t).indexOf("empty:")?n(null):text.get(e.toUrl(t),function(e){var a;if(i.isBuild)buildMap[t]=e,n(e);else{try{a=jsonParse(e)}catch(s){n.error(s)}n(a)}},n.error,{accept:"application/json"})},normalize:function(t,e){return-1!==t.indexOf(CACHE_BUST_FLAG)&&(t=cacheBust(t)),e(t)},write:function(t,e,n){if(e in buildMap){var i=buildMap[e];n('define("'+t+"!"+e+'", function(){ return '+i+";});\n")}}}}),bnpp.define("json!fullAuthentication/../../app/authenticationCommons/constantAuthentication.json",function(){return{fullAuthentication:{REDIRECT:"REDIRECT",ICMSTORELABEL:"icmStoreLabel",ICMSTOREPOPINALERTETOPIC:"icmStoreInfoTop",MODULENAME:"authentication",AUTHCODE:"redirect",LPREDIRECTCODE:"AU01",LOSTPSWDREDIRECTLABEL:"lostPassword",DASHBOARDLABEL:"dashBoard",DASHBOARDREDIRECTCODE:"AU02",EBILLINGREDIERCTCODE:"AU03",EBILLINGREDIERCTLABEL:"ebilling",AUTHENTICATIONREDIRECTCODE:"AU04",AUTHENTICATIONREDIRECTLABEL:"fullAuthentication",AGREEMENTCONTENT:"URL_agreementContent",PARAMVENDOR:"paramVendor",NUMEROVENDEUR:"URL_numberDuVendeur",COLORCODE_GRID:"colorCodeGridMvk",NEWPWD_GRID:"newPwdGridFlag",CMCORAVENDORS:["2361987536","1401987874","1341982503","1331982511","1331982503"],LOGINREDIRECTURL:"loginRedirectURL",PUSHPAGECONTENT:"URL_pushPage",DISTID:"001",NEWDISTID:"002",WIDTH:"336",HEIGHT:"160",DENSITY:"1",ZERO:0,ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,SIX:6,SEVEN:7,EIGHT:8,NINE:9,TEN:10,NINESIX:96,NINESIXTY:960,ONESIXEIGHT:"168",EUR:"EUR",APPLICATIONNAME:"FrHomeBK",TREATEMENT:"P",NET:"NET",SERROR1:"AUTC00Y0000000",ERRTHIRTYTHREE:"AUTC00Y0000033",SERROR2:"AUBS00N0000010",SERROR3:"AUBS00N0000011",SERROR4:"AUBS00N0000002",SERROR5:"AUBS00N0000012",SERROR6:"AUBS00N0000014",SERROR7:"AUBS00N0000015",SERROR8:"AUBS00N0000001",ERRF050252:"AUTC00N0000016",ERRF050253:"AUTC00N0000017",ALLTHREEVIEWS:"AUBS00N0000002",BANKINGANDEMAIL:"AUBS00N0000003",BANKINGANDSECRETCODE:"AUBS00N0000004",BANKINGAGREEMENTONLY:"AUBS00N0000006",SECRETCODEANDEMAIL:"AUBS00N0000005",EMAILONLY:"AUBS00N0000007",ALLTHREEVIEWSWITHCRLIBERTY:"AUBS00N0000008",DASHBOARD:"AUBS00N0000009",ONLYSECRETCODE:"AUBS00N0000013",BANKINGSUCCESSEIGHTEEN:"AUBS00N0000018",BANKINGERRORNINETEEN:"AUTC00Y0000019",BANKINGREFUSALTWENTY:"AUBS00N0000020",BANKINGREFUSALTWENTYONE:"AUBS00N0000021",EMAILERRORCODETWENTYTWO:"AUTC00Y0000022",SERROR23:"AUTC00N0000023",SERROR26:"AUBS00N0000026",SERROR27:"AUBS00N0000027",OPTINERR:"AUTC00N0000024",TARFICATIONERR1:"AUTC00Y0000030",PUSHPAGECODE:"AUBS00N0000032",DISPLAYAGREEDTEXT:".displayAgreedText",DISAGREEDAGREEMENT:".disagreedagreement",SELECTACCPET:".selectAccept",SELECTREFUSAL:".selectRefusal",HIDECLASS:"pf_hide",BankingConventionPage:"bankingConventionPage",AUTHENTICATIONVIEW:"authenticationView",BANKINGCONVENTIONVIEW:"bankingConventionView",LASTCONNECTIONVIEW:"lastConnectionView",DASHBOARDPAGE:"dashboardView",PUSHPAGE:"pushPageView",DECISIONFLAG:"decisionFlag",SUCCESS:"success",EXCEPTIONS:"exceptions",SUCCESSRESPONSECODE:"200",EXCEPTIONRESPONSECODE:"100",EMAILMODIFICATIONVIEW:"emailmodificationview",SECRETCODEMODIFICATIONVIEW:"secretcodemodificationview",PASSWORD:"password",NEWPASSWORD:"newPassword",CONFIRMPASSWORD:"confirmPassword",PASSWORDTEXT:"input-actualClientPassword",NEWPASSWORDTEXT:"input-newClientPassword",CONFIRMPASSWORDTEXT:"input-confirmNewClientPassword",PASSWORDKEYBOARDTEXT:"passwordKeyboardText",NEWPASSWORDKEYBOARDTEXT:"newPasswordKeyboardText",CONFIRMPASSWORDKEYBOARDTEXT:"confirmPasswordKeyboardText",NULLPOINTEREXCEPTION:"NPE",UNEXPECTEDEXCEPTION:"UNEXPECTED_EXCEPTION",JAXBEXCEPTION:"JAXB_EXCEPTION",IAE:"IAE",LSPSTEPONE:"lossPSWStepone",LSPSTEPTWO:"lossPSWSteptwo",LSPSTEPTHREE:"lossPSWStepthree",TWOHUNDRED:"200",THREEHUNDRED:"300",SIXHUNDRED:600,CONFIRMKEYBOARD:".confirm_password_keyboard",PASSWORDKEYBOARD:".securedKeyboard",NEWPASSWORDKEYBOARD:".new_password_keyboard",AUTHENTICATEKEYBOARDCONTAINER:".keyPadImg",CONFIRMQUESTIONMARK:".confirm_password_question_mark",PASSWORDQUESTIONMARK:".password_question_mark",NEWPASSWORDQUESTIONMARK:".new_password_question_mark",NEWSECRETCODETOOLTIP:".new_secretcode_tooltip",PASSWORDTOOLTIP:".password_tooltip",QUESTIONMARK:"pf_img_question_mark",CROSSMARK:"pf_img_cross_mark",SECRETCODECONTINUE:".password_continuer_btn",multiLan:"rpc/config/get",PASSWORDKEYBOARDID:"passwordKeyboard",NEWPASSWORDKEYBOARDID:"newPasswordKeyboard",CONFIRMPASSWORDKEYBOARDID:"confirmPasswordKeyboard",NEWPASSWORDTEXTCLASS:"#input-newClientPassword",CONFIRMPASSWORDTEXTCLASS:"#input-confirmNewClientPassword",PASSWORDTEXTCLASS:"#accesClientCodeSecret",SECRETCHECK:".authenticate_id_block_check",AUTHENTICATEGRAY:".authenticate_btn_gray",AUTHENTICATEGRAYCLASS:"authenticate_btn_gray","AUTHENTICATION.PUBLISHTOPIC.GOTODASHBOARD":"goToDashboardView",YES:"Y",NO:"N",CHECKBOXCLASS:"#input-offresCommerciales",OPTINCLASS:".offresCommerciales",PFGREYROUNDCLASS:"bullet",PFGREENTICKCLASS:"passed",AUTHENTICATIONPROGRESSCLASS:"authenticate_progress",PFLEFTCLASS:"pf_f_left",LINE:"Line",IMAGE:"img",PFGREENROUNDCLASS:"active",GREYLABEL:"pf_label_gray",Text:"Text",BULLETPROGRESSCONTAINER:".bulletProgressContainer",GENERALHEADING:".general_heading",PROGRESSBARHEADER:".authenticate_progress_header",PGROGRESSBARMARGIN:".authenticate_progress_header_margin",BANKINGAGREEMENTHEADING:".banking_agreement_heading",EMAILHEADING:".email_heading",SECRETCODEHEADING:".secret_code_heading",PFLABELGREEN:"pf_label_green",PFBOLDTEXT:"pf_bold_text",RADIOCUSTOMYES:".radio_custom_yes",RADIOCUSTOMNO:".radio_custom_no",CONVENTIONLABELID:".conventionLabel",AUTHAGREEMENTINNER:".authentication_agreement_inner",CRLABELCLASS:".crLabel",RADIOBUTTONCLASS:".radioButton",AGREEMENTHEADERTEXT:".agreedHeaderText",EMAILDID:"#input-emailClient",CONFIRMEMAILID:"#input-confirmEmailClient",PASSWORDLOSSSMSCLASS:".pwd_loss_sms",PASSWORDLOSSRADIOBTN:".pwd_loss_radio_btn",TRIPLEZEROONE:"0001",TRIPLEZEROTWO:"0002",COURIER:"courrier",SMS:"SMS",PASSWORDLOSSERRTWO:"PD000F00002",PASSWORDLOSSERRTHREE:"PD000F00003",MODALBACKDROPCLSS:".modal-backdrop",LPCLIENTTEXTBOXCLS:".client_id_textbox",FRA:"FRA",HUNDRED:"100",LSPPOPOVERCLS:".lsp_popover",LSPTOOLTIPCLS:"authenticate_tooltip_lsp",M:"M",MONSIEUR:"Monsieur",MR:"MR",MME:"Mme",MADAME:"Madame",MLLE:"Mlle",MADEMOISELLE:"Mademoiselle",MLE:"MLE",ZEROSIX:"06",ZEROSEVEN:"07",MECONNECTERCLASS:".login_btn",ADDGREEN:"pf_bg_green",AUTHENTICATEOOLTIP:".authenticate_tooltip",AUTHUSERIDTEXT:"#accesClientIdentifiantClient",CLIENTID:"clientid",AUTHMODALID:"#authenticateModal",RESTRICTEDERRORFLAG:"RestrictedErrorFlag",RESTRICTEDMESSAGE:"RestrictedMessage",EMAILTEXTCLASS:".emailText",PROGRESSBARCLASS:".progressBar",MULTILAN:"rpc/config/get",ANALYTICSONLOADTOPIC:"ia.sf.loaded",ANALYTICSTOPIC:"ia.sf.webanalytics",ANALYTICSAUTHENTICATIONMODULE:"fullAuthentication",ANALYTICSAUTHENTICATION:"Connexion",ANALYTICSBANKINGCONVENTION:"bankingConvention",ANALYTICSEMAILMODIFICATION:"emailModification",ANALYTICSSECRETCODEMODIFICATIONS:"Personnalisation code : Accueil",PROGRESSTEMPLATEPAGE:"app/fullAuthentication/template/error.html",WCMKEYAUTH:"wcmkey_newAuthApproach",WCMMAINTANENCETEXT:"wcmkey_maintanenceText",MEDIATORTOPIC:"target.ia.authentication.sf.action",LOSSPASSWORDREDIRECT:"lostpassword_redirect",LOSSICMREDIRECT:"lostICM_redirect",FULLAUTHENTICATIONREDIRECT:"fullauthentication_redirect",EBILLINGREDIRECTTOPIC:"target.ia.monthlyAlert.sf.action",EBILLINGREDIERCT:"subscribeUnsubscribeEbillingRedirect",SFACTION:"ia.sf.action",MODULEINTERACTION:"interaction_authentication",ANALYTICSAUTHENTICATIONERROR:"Erreur",ANALYTICSLOSTPIN:"Aide",ANALYTICSAGREEMENTACCEPTED:"accepted",ANALYTICSAGREEMENTREFUSED:"refused",ANALYTICSEMAILBLANK:"Changer email : Accueil",ANALYTICSEMAILUPDATE:"Confirmer email : Accueil",ANALYTICSLOSTPWDSTEPONE:"Demande nouveau code : Accueil",ANALYTICSLOSTPWDSTEPTWO:"Demande nouveau code : Confirmation",ANALYTICSLOSTPWDSTEPTHREE:"Demande nouveau code : Notification",AUTHENTICATIONREDIRECT:"target.ia.authentication.sf.action",SUBSCRIPTIONAUTHENTICATIONREDIRECT:"subscription_redirect",FAQAUTHENTICATIONREDIRECT:"target.ia.faqauthentication.sf.action",LASTCONNECTIONPUBLISH:"fr.bnpp.pf.authentication.lastConnection",AUTHREDIRECT:"authentciationredirect",SERVERERROR:"Erreur du serveur",SIEGE:"SIEGE",SUBSCRIPTIONERROR:"AUBS00N0000037",SUBSCRIPTIONERRORPUBLISH:"subscription_error",SUBSCRIPTIONMESSAGE:"Unknown error in authentication",SUBSCRIPTIONAUTHENTICATIONLABEL:"subscription",FAQAUTHENTICATIONLABEL:"faq",COMPLETEAUTHENTICATION:"AUTH",SUBSCRIPTIONAUTHTYPE:"SUBSCRIPTION",FAQAUTHTYPE:"FAQ",libelleExpediteur:"Libelle_expediteur",mentionsLegales:"Mentions_legales",WEBANALYTICSTOPIC:"ia.sf.webanalytics",PAGELOADED:"pageLoaded",WEBANALYTICS:{ONLOAD:"onload",ONSCREEN:"screen",ONLOADEVENT:"pageLoaded",SCREENEVENT:"module_interaction",ONLOADPAGE:"Connexion",LOGINOK:"Confirmation",LOGINKO:"Erreur",EMAILSCREEN:"Confirmer email : Accueil",CHANEMAIL:"Changer email : Accueil",ONBANKSCREEN:"Convention bancaire : Proposition",ONBANKUPDATE:"Convention bancaire : Mise a jour",ONPASSCODE:"Personnalisation code : Accueil",CLICKHELPLB:"Aide",LOSTONLOAD:"Demande nouveau code : Accueil",LOSTCHOICE:"Demande nouveau code : Choix mode envoi",LOSTONSCREEN:"Demande nouveau code : Confirmation",LOSTICMMODULE:"EC connexion",LOSTICMPAGENAME:"Recuperer ICM"},webViewKey:"wcmkey-webview",infoRedirect:"detail_EBR_redirect",deccoRedirect:"detail_EB_redirect",onlineRedirect:"retardPaiement_redirect",inboxRedirect:"detail_msg_redirect",dashboardRedirect:"dashboard_redirect",ModifyADDR:"Modify_PostalAddress",ModifyTEL:"Modify_Telephone",ModifyBANK:"Modify_Bank",ModifyCIVIL:"Modify_CivilStatus",ModifyOPT:"Modify_Optin",ModifyEMAIL:"Modify_Email",ModifyPASSWORD:"Modify_Password",authForteRedirect:"detail_AFM_redirect"},commonConstants:{multiLan:"rpc/config/get"},dashBoard:{multiLan:"rpc/config/get"},URL:{lostICM:"rpc/icm/remind"}}}),bnpp.define("fullAuthentication/view/authenticateView",["backbone","underscore","jquery","../../../app/authenticationCommons/validateAuthentication","sf","../../../app/lib/authenticationRivetsConfig","qtip","../view/webAnalytics","../model/authenticationErrorModel","../model/authenticationPublishDetailsModel","../model/multiLanConfigModel","text!../template/authenticate.html","json!../../../app/authenticationCommons/constantAuthentication.json"],function(t,e,n,i,a,s,o,r,l,c,d,u,E){return r.extend({model:null,initialize:function(t){var n=this;e.bindAll(this,"render","validate","configFetch","getSecretCode","resetText","postLoginDetails","submitEAI","showLoader","hideLoader","icmToStoreEvent"),this.hostUrl=t.hostUrl,this.require=t.require,this.config=t.configModel,this.constant=t.constant,this.authConstant=E.fullAuthentication,this.analyticsObj=this.constant.WEBANALYTICS,this.fetchParams=t.fetchParams,this.maintanenceText=this.fetchParams.maintanenceText,this.wcmMaintanenceTextKey=window.wcmkey.keys[window.sfSiteId][n.constant.WCMMAINTANENCETEXT],n.model=t.multiLanConfigModel,t.fetchParams.forgetPassLabel&&n.model.set("app.authentication.S18.LIBF05-003_7",t.fetchParams.forgetPassLabel),this.errors=t.errors,this.paramVendor=t.paramVendor,this.siteName=window.sfSiteId?window.sfSiteId:"cetelem",this.publishModel=new c({url:n.errors.get("host")+n.errors.get("pathname")+n.model.get("app.authentication.cetelem.URLs.authenticate")}),this.publishLastConnection=new c({url:n.hostUrl+"rpc/identifierProfilCtl/identifierProfil"}),n.require(["text!"+n.hostUrl+n.constant.PROGRESSTEMPLATEPAGE],function(t){n.errorTemplate=t }),this.submitModel=t.submitModel,this.isPageLoad=!1,n.configFetch()},loadWcmDynamicContent:function(t,e,n){var a=this;i.loadTemplate(t,e,n,a.$el,function(){})},renderAuthentication:function(){var t=this,a=t.errors.get("host")+t.config.get("kUrl");t.config.set("keyPadUrl",a),this.$el.html(u),""!==this.fetchParams.icmLabel&&n(".title.identification").text(this.fetchParams.icmLabel),""!==this.fetchParams.codeSecretLabel&&n(".title.codeSecret").text(this.fetchParams.codeSecretLabel),n(".identifiantOublie").text(this.fetchParams.identifiantOublieText),n(".identifiantOublie").attr("href",this.fetchParams.identifiantOublieUrl),t.$el.find(".keyPadImg").attr("src",this.config.get("keyPadUrl")),e.each(t.model.get("app.authentication.S18"),function(e,n){i.checkDelimiter(e)&&-1===n.indexOf("splitLabel")&&t.model.set("app.authentication.S18."+n+"splitLabel",e)}),t.dynamicValues={SPDAT_4000:t.submitModel.get("numServClient")};var o=t.dynamicValues;e.each(t.model.get("app.authentication.S18"),function(n,a){if(-1!==a.indexOf("splitLabel")){var s=a.replace("splitLabel","");e.each(o,function(e,a){-1!==n.indexOf(a)&&t.model.set("app.authentication.S18."+s,i.currencyFormatter(n,o))})}}),t.fetchParams.authenticationFlag===t.constant.SUBSCRIPTIONAUTHTYPE?t.$el.find(".codeSecretOublie").hide():t.$el.find(".codeSecretOublie").show(),s.bind(t.$el,{errors:t.errors,view:this,config:t.config,model:t.model,publish:t.publishModel}),window.PageBus.subscribe("popUpICM",null,function(){t.modalManager()}),i.loadContentWithCallBack(this.fetchParams.authenticateTooltip,{},".helpWCMCOntent",t.$el,function(){t.isPageLoad||(t.logWebAnalytics(t.analyticsObj.ONLOAD,t.analyticsObj.ONLOADEVENT,"fullAuthentication","",{}),t.isPageLoad=!0),t.modalManager(),t.$el.find(".hasTooltip").each(function(){i.initTooltip(n(this),t.$el)})}),i.loadContentWithCallBack(this.fetchParams.authenticateInfoTooltip,{},".infoWCMContent",t.$el,function(){t.isPageLoad||(t.logWebAnalytics(t.analyticsObj.ONLOAD,t.analyticsObj.ONLOADEVENT,"fullAuthentication","",{}),t.isPageLoad=!0),t.modalManager(),t.$el.find(".hasTooltip").each(function(){i.initTooltip(n(this),t.$el)})}),i.loadContent(this.fetchParams.authenticateIntroWCMContent,{},".intro",t.$el),i.loadContent(this.fetchParams.authenticateAutreseSpacesDediesWCMContent,{},".autresEspacesDedies",t.$el),i.loadContent(this.fetchParams.maintanenceText,{},".maintanenceText",t.$el),t.publishModel.set("hover",!1),t.$el.find("#accesClientSubmit").removeClass("primary").addClass("secondary"),t.errors.get("userId")===!0&&t.errorSuccess()},modalManager:function(){var t,i,a=this;a.$el.find(".hasModal").each(function(){n(this).qtip({content:{text:function(s,o){return n.ajax({url:a.fetchParams.lossPassword}).then(function(n){i={numServClient:a.submitModel.get("numServClient")},t=e.template(n,i),o.set("content.text",t),o.elements.content.find("a.forgotPassword").click(function(t){o.hide(t),a.calltoLastPwdPage()}),o.elements.content.find(".close").click(function(t){o.hide(t)})},function(t,e,n){o.set("content.text",e+";"+n)}),"Loading..."}},position:{my:"center",at:"center",target:n(window),viewport:n(window)},show:{event:"click",modal:{on:!0}},events:{show:function(){a.logWebAnalytics(a.analyticsObj.ONSCREEN,a.analyticsObj.SCREENEVENT,"fullAuthentication",a.analyticsObj.CLICKHELPLB,{})}},hide:!1,style:{classes:"qtip-light modal qtip-width-custom qtip-top-custom lostPassPopin",width:function(){for(var t=352,e=0;e<a.constant.CMCORAVENDORS.length;e++)a.fetchParams[a.constant.NUMEROVENDEUR]===a.constant.CMCORAVENDORS[e]&&(t=487);return t},height:function(){for(var t=400,e=0;e<a.constant.CMCORAVENDORS.length;e++)a.fetchParams[a.constant.NUMEROVENDEUR]===a.constant.CMCORAVENDORS[e]&&(t=400),a.fetchParams[a.constant.NUMEROVENDEUR]===a.constant.CMCORAVENDORS[1]&&(t=576);return t}}})})},calltoLastPwdPage:function(){var t=this;if("/fr/perte-mdp"===window.location.pathname)return n(".close").click(),void 0;var e={codeSociete:t.fetchParams[t.constant.NUMEROVENDEUR].substring(0,3),company:t.submitModel.get("company"),numServClient:t.submitModel.get("numServClient"),horairesRelationClient:t.submitModel.get("horairesRelationClient"),distId:t.fetchParams[t.constant.NUMEROVENDEUR],siegeData:t.submitModel.get("siegeData"),rcs:t.submitModel.get("rcs"),mCompany:t.submitModel.get("company"),mRaisonSociale:t.submitModel.get("mRaisonSociale")||"",mCodeLegalStatus:t.submitModel.get("mCodeLegalStatus")||"",mCapital:t.submitModel.get("mCapital")||"",mAddress:t.submitModel.get("mAddress")||"",mCity:t.submitModel.get("mCity")||"",mPostCode:t.submitModel.get("mPostCode")||"",mRcs:t.submitModel.get("mRcs")||"",mOriasNumber:t.submitModel.get("mOriasNumber")||""};a.messaging.publishTopic(t.constant[t.constant.LOSSPASSWORDREDIRECT],{ModuleName:"fullAuthentication",Code:"REDIRECT",Label:"action Link lost password",Json:[{type:"lostPassword",iaData:e}]})},configFetch:function(){var t=this;t.config.set("distId",t.fetchParams[this.constant.NEWPWD_GRID]?t.constant.NEWDISTID:t.constant.DISTID),t.config.set("width",t.constant.WIDTH),t.config.set("height",t.constant.HEIGHT),t.config.set("density",t.constant.DENSITY),t.config.set("numeroVendeur",t.fetchParams[this.constant.NUMEROVENDEUR]),t.config.set("colorCodeGrid",t.fetchParams[this.constant.COLORCODE_GRID]),t.config.set("enteredValue",[]),t.config.set("mappedValues",[]),t.config.fetch({data:JSON.stringify({distId:t.config.get("distId"),width:t.config.get("width"),height:t.config.get("height"),density:t.config.get("density"),numeroVendeur:t.config.get("numeroVendeur"),colorCode:t.config.get("colorCodeGrid")}),type:"POST",contentType:"application/json; charset=utf-8",success:function(){t.renderAuthentication(),t.hideLoader()},error:function(e){t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Erreur"),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError(),t.hideLoader(),t.logEvent("connexion","error on getAuthenticationRandomGrid WS with OOPS form",e,t.hostUrl)}})},validate:function(t){var e=this,n=e.$el.find(e.constant.PASSWORDTEXTCLASS).val();e.$el.find(e.constant.AUTHUSERIDTEXT).val().length;var i;i=!0,a.messaging.publishTopic("ia.sf.webanalytics",{event:"field_ICM_completion"}),"accesClientCodeSecret"===t.target.id?t.keyCode&&t.keyCode!==e.constant.NINE&&(e.errors.set("password",!0),e.errors.set("isError",!0),e.errors.set("passwordText",e.model.get("app.authentication.S18.ERRF05-003_5"))):(e.publishModel.validateData(e.errors,e.model),e.publishModel.get("userId").length>e.constant.TEN&&(e.errors.set("userId",!1),e.errors.set("isError",!1),e.publishModel.set("userId",e.publishModel.get("userId").substring(e.constant.ZERO,e.constant.TEN)),t.preventDefault()),e.errors.get("isError")?(e.$el.find("#accesClientSubmit").removeClass("primary").addClass("secondary"),e.$el.find(e.constant.AUTHUSERIDTEXT).parent().hasClass("input-success")&&e.$el.find(e.constant.AUTHUSERIDTEXT).parent().removeClass("input-success"),e.$el.find(e.constant.AUTHUSERIDTEXT).parent().addClass("input-error"),i&&(i=!1)):n.length!==e.constant.SIX||e.errors.get("isError")?(e.$el.find(e.constant.AUTHUSERIDTEXT).parent().hasClass("input-error")&&e.$el.find(e.constant.AUTHUSERIDTEXT).parent().removeClass("input-error"),e.$el.find(e.constant.AUTHUSERIDTEXT).parent().addClass("input-success")):e.$el.find("#accesClientSubmit").removeClass("secondary").addClass("primary"))},getSecretCode:function(t){var e,n,i,a,s,o=this,r=o.$el.find("#accesClientCodeSecret").val();o.$el.find(".passwordKeyboard").focus(),e=o.$el.find(o.constant.AUTHENTICATEKEYBOARDCONTAINER),n=e.offset().left,i=e.offset().top,a=e.width()/o.constant.FIVE,s=e.height()/o.constant.TWO;var l=e.width()/o.constant.NINESIX;if(r.length===o.constant.FIVE&&(o.publishModel.validateData(o.errors,o.model),o.errors.get("isError")||o.$el.find("#accesClientSubmit").removeClass("secondary").addClass("primary")),r.length<o.constant.SIX){for(var c=o.constant.ZERO;c<=o.constant.FIVE;c++)t.pageX-n>a*c+l&&t.pageX-n<a*(c+1)-l&&t.pageY-i<s-l?(o.config.get("enteredValue").push(o.config.get("mappedValues")[c]),o.$el.find(o.constant.PASSWORDTEXTCLASS).val(r+"*")):t.pageX-n>a*c+l&&t.pageX-n<a*(c+1)-l&&t.pageY-i>s+l&&t.pageY-i<2*s-l&&(o.config.get("enteredValue").push(o.config.get("mappedValues")[c+5]),o.$el.find(o.constant.PASSWORDTEXTCLASS).val(r+"*"));o.errors.set("password",!1),o.errors.set("isError",!1)}else o.errors.set("password",!0),o.errors.set("passwordText",o.model.get("app.authentication.S18.ERRF05-003_4")),o.$el.find(o.constant.PASSWORDTEXTCLASS).parent().hasClass("input-error")&&o.$el.find(o.constant.PASSWORDTEXTCLASS).parent().removeClass("input-error"),o.$el.find(o.constant.PASSWORDTEXTCLASS).parent().addClass("input-success"),o.$el.find(o.constant.PASSWORDTEXTCLASS).focus(),t.preventDefault()},resetText:function(t){var e=this;e.errors.set("password",!1),e.errors.set("isError",!1),n("#"+n(t.target).data("resetid")).val(""),e.config.set("enteredValue",[]),e.$el.find("#accesClientSubmit").removeClass("primary").addClass("secondary"),e.publishModel.set("hover",!1)},postLoginDetails:function(){var t=this,e=t.$el.find(t.constant.AUTHUSERIDTEXT).val();t.userIcm=window.getCookie("meomICM"),""!==e&&""!==t.userIcm&&(e=t.userIcm),t.publishModel.set("userId",e);var a=t.$el.find(t.constant.PASSWORDTEXTCLASS).val();t.publishModel.validateData(t.errors,t.model);var s=t.model.get("app.authentication.S18.restrictedCharacters");i.restrictedParameters=s;var o;if(o=!0,e){var r=i.invalidCheck(e);r===!0?(t.errors.set(t.constant.CLIENTID+t.constant.RESTRICTEDERRORFLAG,!0),t.errors.set(t.constant.CLIENTID+t.constant.RESTRICTEDMESSAGE,t.model.get("app.authentication.S18.restrictedCharactersError")),t.errors.set("userId",!0),t.errors.set("isError",!0),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().hasClass("input-success")&&t.$el.find(t.constant.AUTHUSERIDTEXT).parent().removeClass("input-success"),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().addClass("input-error"),o&&(o=!1,t.$el.find(t.constant.AUTHUSERIDTEXT).focus())):(t.errors.set(t.constant.CLIENTID+t.constant.RESTRICTEDERRORFLAG,!1),t.errors.set("isError",!1),t.errors.set("userId",!1),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().hasClass("input-error")&&t.$el.find(t.constant.AUTHUSERIDTEXT).parent().removeClass("input-error"),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().addClass("input-success"))}else i.isNullOrWhiteSpace(e)&&(t.errors.set("userId",!0),t.errors.set("isError",!0),t.errors.set("userIdText",t.model.get("app.authentication.S18.ERRF05-003_3")),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().hasClass("input-success")&&t.$el.find(t.constant.AUTHUSERIDTEXT).parent().removeClass("input-success"),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().addClass("input-error"),o&&(o=!1,t.$el.find(t.constant.AUTHUSERIDTEXT).focus()));a.length<t.constant.SIX?(t.errors.set("password",!0),t.errors.set("isError",!0),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().hasClass("input-success")&&t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().removeClass("input-success"),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().addClass("input-error"),i.isNullOrWhiteSpace(a)?t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-003_3")):t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-003_4")),o&&(o=!1,t.$el.find(t.constant.PASSWORDTEXTCLASS).focus())):(t.errors.set("password",!1),t.errors.set("isError",!1),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().hasClass("input-error")&&t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().removeClass("input-error"),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().addClass("input-success")),t.errors.get("userId")||t.errors.get("password")||(t.showLoader(),this.publishModel.fetch({data:JSON.stringify({id:this.config.get("id"),mappedValues:this.config.get("enteredValue")}),type:"POST",contentType:"application/json; charset=utf-8",success:function(i){if(null!==i.get("code"))if(window.wcmkey.keys[window.sfSiteId][t.constant.WCMKEYAUTH]){t.eaiRequest=i;var a={personId:i.get("userId")};n.ajax({url:t.hostUrl+"rpc/identifierProfilCtl/encryptIcm",method:"POST",data:JSON.stringify(a),contentType:"application/json",success:function(e){t.encryptedICM=e.encryptedICM,t.submitEAI(t.eaiRequest)},error:function(e){if(t.publishModel.set("reload",!0),t.errors.set("userId",!0),t.errors.set("userIdText",t.model.get("app.authentication.S18.ERRF05-003_14")),""!==t.userIcm){var i=t.publishModel.get("userId");t.publishModel.set("userId",new Array(i.length-2+1).join("x")+i.slice(-2))}t.errorSuccess(),n("#accesClientCodeSecret").val(""),t.hideLoader(),t.logEvent("connexion","error on encryptIcm WS",e,t.hostUrl)}})}else t.eaiRequest=i,t.publishLastConnection.fetch({data:JSON.stringify({numeroVendeur:t.fetchParams[t.constant.NUMEROVENDEUR],inputType:"lastConnection",personId:e}),type:"POST",contentType:"application/json; charset=utf-8",success:function(e){t.encryptedICM=e.get("identifierProfil").loginId,t.submitEAI(t.eaiRequest)},error:function(e){if(t.publishModel.set("reload",!0),t.errors.set("userId",!0),t.errors.set("userIdText",t.model.get("app.authentication.S18.ERRF05-003_14")),""!==t.userIcm){var i=t.publishModel.get("userId");t.publishModel.set("userId",new Array(i.length-2+1).join("x")+i.slice(-2))}t.errorSuccess(),n("#accesClientCodeSecret").val(""),t.hideLoader(),t.logEvent("connexion","error on lastConnexion WS",e,t.hostUrl)}});else t.configFetch(),t.errors.set("password",!0),t.notifyError(i.get("code"),t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError(),t.logEvent("connexion","error on mvk authenticate WS with OOPS form: no code",i,t.hostUrl)},error:function(e){t.hideLoader(),t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Erreur"),t.errors.set("password",!0),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError(),t.logEvent("connexion","error on mvk authenticate WS with OOPS form",e,t.hostUrl)}}))},submitEAI:function(t){var a=this;a.showLoader();var s,o=a.publishModel.get("userId"),r=t.get("value").replace(/^\s+|\s+$/g,"");a.submitModel.set("userPassword",r),a.submitModel.set("clientId",o),s=window.wcmkey.keys[window.sfSiteId][a.constant.WCMKEYAUTH]?encodeURIComponent("<DIST_ID>"+this.fetchParams[this.constant.NUMEROVENDEUR]+"</DIST_ID><AUTH_PROC_ID>new</AUTH_PROC_ID><MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+this.submitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID><PERS_ID></PERS_ID><SMID>"+o+"</SMID><AGRE_ID> </AGRE_ID></EBANKING_USER_ID><EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID><AUTHENTICATION_MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION><CHALLENGE_RESPONSE><VALUE>"+r+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+a.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)}):encodeURIComponent("<DIST_ID>"+this.fetchParams[this.constant.NUMEROVENDEUR]+"</DIST_ID><AUTH_PROC_ID></AUTH_PROC_ID><MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+this.submitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID><PERS_ID></PERS_ID><SMID>"+o+"</SMID><AGRE_ID> </AGRE_ID></EBANKING_USER_ID><EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID><AUTHENTICATION_MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION><CHALLENGE_RESPONSE><VALUE>"+r+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+a.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)}),this.submitModel.fetch({data:"AUTH="+s,type:"POST",contentType:"application/x-www-form-urlencoded",success:function(t){clearInterval(a.myVar);var s;if(e(t.attributes).has("htmlcontent")&&""!==t.attributes.htmlcontent){var o=n(t.attributes.htmlcontent).filter(function(t,e){return 1===e.nodeType&&"resultURI"===e.id});s=a.constant.DASHBOARD,""===a.fetchParams.authenticationFlag?a.submitModel.set("authType",a.constant.COMPLETEAUTHENTICATION):a.submitModel.set("authType",a.fetchParams.authenticationFlag),o.attr("value")?a.submitModel.set("redirectUrl",o.attr("value")):(a.errors.set("password",!0),a.notifyError("",a.model.get("app.authentication.S18.error20"),"fullAuthentication"),a.loadServerError(),a.logEvent("connexion","error on seeaserver: no value in inputFragment",t,a.hostUrl))}else s=t.get("code");if(e(t.attributes).has("message")||t.get("message")&&""!==t.get("message")){var r=t.get("message");if(-1!==r.indexOf("#")){var l=r.split("#")||"",c=l[1].split("-")||"",d=JSON.parse(c),u=d.email,E=!0;u&&(u=u.replace(/[',']+/g,"-"),E=!1);var h=d.lastconnecteddetail||"";a.submitModel.set("addressMail",d.addresse),a.submitModel.set("nomPersonne",d.lastname),a.submitModel.set("prenomPersonne",d.firstname),a.submitModel.set("civilitePersonneCd",d.civilitePersonneCd),a.submitModel.set("antiPhishing",d.ANTIPHISHING),a.submitModel.set("parnterWebsite2",d.PARTNERWEBSITE2),a.submitModel.set("expediteurMail",d.EXPEDITEURMAIL),a.submitModel.set("dateDerniereAuthentReussie",h),a.submitModel.set("email",u),a.submitModel.set("isEmptyEmail",E),a.submitModel.set("crFlag","0"===d.crlflag?!1:!0)}}if(a.submitModel.set("responseCode",s),!i.isNullOrWhiteSpace(s))switch(a.publishModel.set("userId",""),s){case a.constant.SERROR1:case a.constant.JAXBEXCEPTION:case a.constant.IAE:case a.constant.NULLPOINTEREXCEPTION:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("password",!0),a.errors.set("passwordText",a.model.get("app.authentication.S18.ERRF05-003_6")),a.errorSuccess();break;case a.constant.UNEXPECTEDEXCEPTION:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("password",!0),a.errors.set("passwordText",a.model.get("app.authentication.S18.error21")),a.notifyError(s,a.model.get("app.authentication.S18.error21"),"fullAuthentication"),a.logEvent("connexion","error on mvk authenticate WS with OOPS form: "+a.constant.UNEXPECTEDEXCEPTION,t,a.hostUrl),a.errorSuccess();break;case a.constant.SERROR8:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_9")),a.errorSuccess();break;case a.constant.SERROR2:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_7")),a.errorSuccess();break;case a.constant.SERROR3:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_8")),a.errorSuccess();break;case a.constant.SERROR5:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("password",!0),a.errors.set("passwordText",a.model.get("app.authentication.S18.ERRF05-003_10")),a.errorSuccess();break;case a.constant.ERRF050252:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_14")),a.errorSuccess();break;case a.constant.ERRF050253:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_15")),a.errorSuccess();break;case a.constant.SERROR6:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-025_2")),a.errorSuccess();break;case a.constant.SERROR7:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("userId",!0),a.errors.set("userIdText",a.model.get("app.authentication.S18.ERRF05-003_11")),a.errorSuccess();break;case a.constant.TARFICATIONERR1:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("password",!0),a.errors.set("passwordText",a.model.get("app.authentication.S18.error21")),a.notifyError(s,a.model.get("app.authentication.S18.error21"),"fullAuthentication"),a.logEvent("connexion","error on mvk authenticate WS with OOPS form: "+a.constant.TARFICATIONERR1,t,a.hostUrl),a.errorSuccess();break;case a.constant.ERRTHIRTYTHREE:a.publishModel.set("reload",!0),a.configFetch(),a.errors.set("password",!0),a.errors.set("passwordText",a.model.get("app.authentication.S18.rctrerror")),a.notifyError(s,a.model.get("app.authentication.S18.rctrerror"),"fullAuthentication"),a.logEvent("connexion","error on mvk authenticate WS with OOPS form: "+a.constant.ERRTHIRTYTHREE,t,a.hostUrl),a.errorSuccess();break;default:a.submitModel.set(a.constant.DECISIONFLAG,a.constant.SUCCESS),a.submitModel.set("constructNextView","fg")}a.submitModel.get(a.constant.DECISIONFLAG)===a.constant.SUCCESS?a.logWebAnalytics(a.analyticsObj.ONSCREEN,a.analyticsObj.SCREENEVENT,"fullAuthentication",a.analyticsObj.LOGINOK,{loginID:a.encryptedICM}):a.logWebAnalytics(a.analyticsObj.ONSCREEN,a.analyticsObj.SCREENEVENT,"fullAuthentication",a.analyticsObj.LOGINKO,{ErrorType:s,loginID:a.encryptedICM}),a.hideLoader()},error:function(t,e){a.hideLoader(),a.logEvent("connexion","error on seeaserver",e,a.hostUrl),window.location.href="/SEEA-pa01/logoff",a.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Erreur"),clearInterval(a.myVar),a.publishModel.set("ErrorType",e.statusText),a.publishModel.set("ErrorNumber",e.status),a.errors.set("password",!0),a.$el.find(a.constant.AUTHUSERIDTEXT).parent().hasClass("input-success")&&a.$el.find(a.constant.AUTHUSERIDTEXT).parent().removeClass("input-success"),a.$el.find(a.constant.AUTHUSERIDTEXT).parent().addClass("input-error"),a.$el.find(a.constant.PASSWORDTEXTCLASS).parent().hasClass("input-success")&&a.$el.find(a.constant.PASSWORDTEXTCLASS).parent().removeClass("input-success"),a.$el.find(a.constant.PASSWORDTEXTCLASS).parent().addClass("input-error"),a.$el.find(a.constant.AUTHUSERIDTEXT).focus(),a.loadServerError()}})},errorSuccess:function(){var t=this;t.$el.find(t.constant.AUTHUSERIDTEXT).parent().hasClass("input-success")&&t.$el.find(t.constant.AUTHUSERIDTEXT).parent().removeClass("input-success"),t.$el.find(t.constant.AUTHUSERIDTEXT).parent().addClass("input-error"),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().hasClass("input-success")&&t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().removeClass("input-success"),t.$el.find(t.constant.PASSWORDTEXTCLASS).parent().addClass("input-error"),t.$el.find(t.constant.AUTHUSERIDTEXT).focus()},addClassGreen:function(){var t=this;t.$el.find("#accesClientSubmit").hasClass("primary")?t.publishModel.set("hover",!0):t.$el.find("#accesClientSubmit").removeClass("secondary").addClass("primary")},removeClassGreen:function(){var t=this;t.publishModel.get("hover")||t.$el.find("#accesClientSubmit").removeClass("primary").addClass("secondary")},formatCheck:function(){var t=this,e=t.$el.find(t.constant.PASSWORDTEXTCLASS).val();e.length<t.constant.SIX&&(i.isNullOrWhiteSpace(e)?(t.errors.set("password",!1),t.errors.set("isError",!1)):(t.errors.set("password",!0),t.errors.set("isError",!0),t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-003_4"))))},checkError:function(){var t=this,e=t.$el.find(t.constant.PASSWORDTEXTCLASS).val();i.isNullOrWhiteSpace(e)&&(t.errors.set("password",!1),t.errors.set("isError",!1))},validateKeys:function(t){var e=this;t.keyCode&&t.keyCode!==e.constant.NINE&&(e.errors.set("password",!0),e.errors.set("isError",!0),e.errors.set("passwordText",e.model.get("app.authentication.S18.ERRF05-003_5")))},notifyError:function(t,e,n){a.wcm.notifyError({code:t,message:e,ModuleName:n})},loadProgress:function(){var t=this;t.myVar=setInterval(function(){i.updateProgress(t.$el,t.errorTemplate)},3e3)},loadServerError:function(){var t=this;t.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){i.updateError(t.$el,e,t.model.get("app.authentication.S18.error20"))})},helpBtnClickEvent:function(){},showLoader:function(){n(".pf_loader_div").removeClass("pf_hide"),n(".loader-cont1").removeClass("pf_hide")},hideLoader:function(){n(".loader-cont1").addClass("pf_hide"),n(".pf_loader_div").addClass("pf_hide")},icmToStoreEvent:function(){var t=this;if(""===n("#accesClientIdentifiantClient").val()||isNaN(n("#accesClientIdentifiantClient").val())||8!==n("#accesClientIdentifiantClient").val().length&&10!==n("#accesClientIdentifiantClient").val().length)n("#to_store").prop("checked",!1),window.setCookie("meomICM","",250),n("#accesClientIdentifiantClient").removeAttr("disabled");else if(n("#to_store").is(":checked")){n("#to_store").attr("disabled",!0);var e=t.authConstant.ICMSTOREPOPINALERTETOPIC;e?a.messaging.publishTopic(t.constant[e],{ModuleName:t.authConstant.MODULENAME,Code:t.authConstant.REDIRECT,Label:t.authConstant.ICMSTORELABEL,Json:{}}):(n("#to_store").prop("checked",!1),window.setCookie("meomICM","",250),n("#accesClientIdentifiantClient").removeAttr("disabled"))}else n("#to_store").is(":checked")===!1&&(window.setCookie("meomICM","",250),n("#accesClientIdentifiantClient").removeAttr("disabled"))},events:function(){return e.extend({},e.result(r.prototype,"events")||{},{"click .keyPadImg":"getSecretCode","click .lastPwdRD":"calltoLastPwdPage","click .resetBtn":"resetText","click #accesClientSubmit":"postLoginDetails","keyup #accesClientCodeSecret":"validate","focusout #accesClientIdentifiantClient":"validate","focus #accesClientSubmit,#accesClientIdentifiantClient":"checkError","mouseenter #accesClientSubmit":"addClassGreen","mouseleave #accesClientSubmit":"removeClassGreen","focusout .passwordKeyboard":"formatCheck","keypress .passwordKeyboard":"validateKeys","click .authenticate_link_two":"forgotPassword","click .helperBtn":"helpBtnClickEvent","click #to_store":"icmToStoreEvent"})}})}),bnpp.define("fullAuthentication/model/bankingConventionPublishModel",["backbone","jquery"],function(t){return t.Model.extend({defaults:{agreed:!0,flag:!1,isAcceptedFlag:""},initialize:function(t){this.url=t.url},fetch:function(e){return e.dataType="html",t.Model.prototype.fetch.call(this,e)},parse:function(t){var e;try{e=JSON.parse(t)}catch(n){e={htmlcontent:t}}return e}})}),bnpp.define("fullAuthentication/model/bankingConventionConfigModel",["backbone"],function(t){return t.Model.extend({initialize:function(t){this.url=t.url}})}),bnpp.define("text!fullAuthentication/template/bankingConvention.html",[],function(){return'<div class="columns authentification">\n <form id="formConventionAdhesion">\n <div class="row">\n <h1 rv-text="model.app.authentication.S18.LIBF05-012_1" class="general_heading pf_hide"></h1>\n </div> \n <!--ProgerssBar starts -->\n <div class="row progressBar">\n <div class="columns small-centered small-10 medium-8 large-6">\n <ol class="bulletProgressContainer">\n \n </ol>\n </div>\n </div>\n <!--ends-->\n <!--text if only banking -->\n <div class="row bankingText pf_hide pf_textcenter">\n <div class="columns small-centered small-12 medium-6 large-6">\n <h1 rv-text="model.app.authentication.S18.LIBF05-012_17"></h1>\n </div>\n </div>\n <!--text if only banking -->\n <div class="row">\n <p rv-text="model.app.authentication.S18.LIBF05-012_5"></p>\n </div>\n <div class="row">\n <div class="conventionAdhesion authentication_agreement_container">\n <div class="authentication_agreement_inner pf_left" id="authentication_agreement_scroll">\n <div class="authentication_agreement_content" rv-html="content.template">\n </div>\n </div> \n </div>\n </div>\n <div class="row radioButton">\n <div class="columns small-centered text-center small-11 medium-10 large-7 acceptConventionAdhesion">\n <label rv-text="model.app.authentication.S18.LIBF05-012_6"></label>\n <ul>\n <li>\n <input class="radioSwitch" type="radio" id="radio-conventionAdhesion-accept" name="radio-conventionAdhesion" value="conventionAdhesionAcceptContainer">\n <label for="radio-conventionAdhesion-accept" rv-text="model.app.authentication.S18.LIBF05-012_8"></label>\n </li>\n <li>\n <input class="radioSwitch" type="radio" id="radio-conventionAdhesion-refuse" name="radio-conventionAdhesion" value="conventionAdhesionRefuseContainer">\n <label for="radio-conventionAdhesion-refuse" rv-text="model.app.authentication.S18.LIBF05-012_9"></label>\n </li>\n </ul>\n </div>\n </div>\n <div id="conventionAdhesionAcceptContainer">\n <div class="row">\n <div class="columns text-center">\n <label rv-text="model.app.authentication.S18.LIBF05-012_7"></label>\n </div>\n </div>\n <div class="row">\n <div class="columns text-center">\n <a class="button secondary radius resetRadio spacedBottom cancelAgreement" data-reset="radio-conventionAdhesion" rv-text="model.app.authentication.S18.LIBF05-012_10"></a>\n <a class="button success radius spacedBottom acceptAgreement" rv-text="model.app.authentication.S18.LIBF05-012_11" ></a>\n </div>\n </div>\n </div>\n <div id="conventionAdhesionRefuseContainer">\n <div class="row">\n <div class="columns text-center">\n <label rv-text="model.app.authentication.S18.LIBF05-012_12_1"></label>\n </div>\n </div>\n <div class="row">\n <div class="columns">\n <p>\n <span rv-text="model.app.authentication.S18.LIBF05-012_12_2"></span><br class="crLabel">\n <span rv-html="model.app.authentication.S18.LIBF05-012_15" class="crLabel"></span></span><br><br>\n <strong rv-text="model.app.authentication.S18.LIBF05-012_16"></strong>\n </p>\n </div>\n </div>\n <div class="row">\n <div class="columns text-center">\n <a class="button secondary radius resetRadio spacedBottom cancelRefusal" data-reset="radio-conventionAdhesion" rv-text="model.app.authentication.S18.LIBF05-012_13"></a>\n <a href="#" class="button success radius spacedBottom refusalAgreement" rv-text="model.app.authentication.S18.LIBF05-012_14"></a>\n </div>\n </div>\n </div>\n </form>\n</div>\n '}),bnpp.define("fullAuthentication/view/bankingConventionView",["backbone","underscore","jquery","../../../app/authenticationCommons/validateAuthentication","../../../app/lib/authenticationRivetsConfig","sf","../view/webAnalytics","../model/multiLanConfigModel","../model/bankingConventionPublishModel","../model/bankingConventionConfigModel","text!../template/bankingConvention.html"],function(t,e,n,i,a,s,o,r,l,c,d){return o.extend({model:null,initialize:function(t){var n=this;e.bindAll(this,"renderBankingConvention","agreed","scrollToTop","disagreed","showLoader","hideLoader"),this.hostUrl=t.hostUrl,this.require=t.require,this.constant=t.constant,this.analyticsObj=this.constant.WEBANALYTICS,this.values=t.values,this.authenticationSubmitModel=t.submitModel,this.fetchParams=t.fetchParams,this.errors=t.errors,this.multiLanUrl=t.hostUrl+this.constant.MULTILAN,this.model=new r({url:this.multiLanUrl}),this.require(["text!"+n.hostUrl+n.constant.PROGRESSTEMPLATEPAGE],function(t){n.errorTemplate=t}),this.model.fetch({success:function(){n.bankingConventionPublishModel=new l({url:n.errors.get("eaiurl")}),n.bankingConventionConfigModel=new c({url:n.errors.get("eaiurl")}),n.authenticationSubmitModel.set("function","initialize"),n.renderBankingConvention() },error:function(){n.$el.append(n.constant.SERVERERROR)}}),n.logWebAnalytics(n.analyticsObj.ONSCREEN,n.analyticsObj.SCREENEVENT,"fullAuthentication",n.analyticsObj.ONBANKSCREEN,{})},renderBankingConvention:function(){var e=this;this.$el.html(d),this.content=new t.Model,e.bankingConventionPublishModel.set("templatePath",this.fetchParams.agreementContent),i.loadContent(this.fetchParams.agreementContent,{},".authentication_agreement_content",e.$el),this.authenticationSubmitModel.get("progressBar")===!0?(n(".bankingText").hide(),n(".progressBar").show(),"initialize"!==this.authenticationSubmitModel.get("progressFlagStatus")?this.authenticationSubmitModel.set("progressFlagStatus",this.authenticationSubmitModel.get("function")):this.authenticationSubmitModel.set("progressFlagStatus","")):(n(".progressBar").hide(),n(".bankingText").show()),this.$el.find(this.constant.CONVENTIONLABELID).removeClass(this.constant.HIDECLASS),this.$el.find(this.constant.AUTHAGREEMENTINNER).scroll(this.scrollToTop),a.bind(e.$el,{errors:e.errors,view:this,model:e.model,publishModel:e.bankingConventionPublishModel,content:this.content}),this.radioSwitchManager()},agreed:function(){this.bankingConventionPublishModel.set("agreed",!0),this.bankingConventionPublishModel.set("isAcceptedFlag",this.constant.YES),this.bankingConventionPublishModel.set("signAgreement",this.constant.YES)},disagreed:function(){this.authenticationSubmitModel.get("crFlag")===!0?this.$el.find(this.constant.CRLABELCLASS).removeClass(this.constant.HIDECLASS):this.authenticationSubmitModel.get("crFlag")===!1&&this.$el.find(this.constant.CRLABELCLASS).addClass(this.constant.HIDECLASS),this.bankingConventionPublishModel.set("agreed",!1),this.bankingConventionPublishModel.set("isAcceptedFlag",this.constant.NO),this.bankingConventionPublishModel.set("refuseAgreement",this.constant.YES)},signBankingAgreement:function(){var t=this;t.showLoader(),t.loadProgress(),t.logWebAnalytics(t.analyticsObj.ONSCREEN,t.analyticsObj.SCREENEVENT,"fullAuthentication",t.analyticsObj.ONBANKUPDATE,{Convention_bancaire:"accepted"});var i,a,s,o,r;i=t.authenticationSubmitModel.get("clientId"),a=t.authenticationSubmitModel.get("userPassword").replace(/^\s+|\s+$/g,""),s=t.bankingConventionPublishModel.get("signAgreement"),o=t.bankingConventionPublishModel.get("refuseAgreement"),r=encodeURIComponent("<DIST_ID>"+this.fetchParams[this.constant.NUMEROVENDEUR]+"</DIST_ID><AUTH_PROC_ID></AUTH_PROC_ID><MEAN_ID>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID><PERS_ID></PERS_ID><SMID>"+i+"</SMID><AGRE_ID> </AGRE_ID></EBANKING_USER_ID><EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID><AUTHENTICATION_MEAN_ID>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.meanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION><CHALLENGE_RESPONSE><VALUE>"+a+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+s+"</VALUE><CHALLENGE>signAgreement</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+t.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)}),t.bankingConventionPublishModel.fetch({data:"AUTH="+r,type:"POST",contentType:"application/x-www-form-urlencoded",success:function(i){clearInterval(t.myVar);var a;if(e(i.attributes).has("htmlcontent")&&""!==i.attributes.htmlcontent){var s=n(i.attributes.htmlcontent).filter(function(t,e){return 1===e.nodeType&&"resultURI"===e.id});a=t.constant.DASHBOARD,""===t.fetchParams.authenticationFlag?t.authenticationSubmitModel.set("authType",t.constant.COMPLETEAUTHENTICATION):t.authenticationSubmitModel.set("authType",t.fetchParams.authenticationFlag),t.authenticationSubmitModel.set("redirectUrl",s.attr("value"))}else a=i.get("code");a===t.constant.BANKINGSUCCESSEIGHTEEN||a===t.constant.ONLYSECRETCODE?(t.authenticationSubmitModel.set(t.constant.DECISIONFLAG,t.constant.SUCCESS),t.authenticationSubmitModel.set("loadNextView","loadNextView")):a===t.constant.BANKINGERRORNINETEEN?(t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW),t.notifyError("view.constant.BANKINGERRORNINETEEN",t.model.get("app.authentication.S18.error22"),"fullAuthentication")):a===t.constant.DASHBOARD&&t.authenticationSubmitModel.set("status",t.constant.DASHBOARDPAGE),t.hideLoader()},error:function(){clearInterval(t.myVar),t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),t.errors.set("serverError",!0),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError()}})},scrollToTop:function(t){var e=n(t.currentTarget);Math.round(e[0].scrollHeight-e.scrollTop())<=Number(e.outerHeight())+100&&this.$el.find(this.constant.RADIOBUTTONCLASS).removeClass("hide")},returnToAuthentication:function(){this.authenticationSubmitModel.set("progressFlagStatus","bankingViewreturn"),this.authenticationSubmitModel.set("constructNextView",""),this.authenticationSubmitModel.set("nextView",[]),this.authenticationSubmitModel.set("status",this.constant.AUTHENTICATIONVIEW)},hidePanels:function(t){var e=this;e.$el.find('[name="'+t.attr("name")+'"]').each(function(){n("#"+n(this).attr("value")).hide()})},changePanel:function(t){var e=this;e.hidePanels(t),t.is(":checked")&&n("#"+t.val()).show(),n(window).resize()},radioSwitchManager:function(){var t=this;t.$el.find(".radioSwitch").each(function(){n(this).change(function(){t.changePanel(n(this))}),t.hidePanels(n(this))}),t.$el.find(".radioSwitch").each(function(){n(this).hasClass("active")&&n(this).removeClass("active").click()})},refuseBankingAgreement:function(){var t=this;t.showLoader(),t.logWebAnalytics(t.analyticsObj.ONSCREEN,t.analyticsObj.SCREENEVENT,"fullAuthentication",t.analyticsObj.ONBANKUPDATE,{Convention_bancaire:"refused"}),t.loadProgress();var e,n,i,a;e=this.authenticationSubmitModel.get("clientId"),n=this.authenticationSubmitModel.get("userPassword").replace(/^\s+|\s+$/g,""),i=t.bankingConventionPublishModel.get("refuseAgreement"),t.authenticationSubmitModel.set("constructNextView",""),t.authenticationSubmitModel.set("nextView",[]),a=encodeURIComponent("<DIST_ID>"+this.fetchParams[this.constant.NUMEROVENDEUR]+"</DIST_ID><AUTH_PROC_ID></AUTH_PROC_ID><MEAN_ID>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID><PERS_ID></PERS_ID><SMID>"+e+"</SMID><AGRE_ID></AGRE_ID></EBANKING_USER_ID><EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID><AUTHENTICATION_MEAN_ID>"+this.authenticationSubmitModel.get("eaiParams").eaiParams.authenticationMeanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION><CHALLENGE_RESPONSE><VALUE>"+n+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+i+"</VALUE><CHALLENGE>agreement</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+t.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)}),t.bankingConventionPublishModel.fetch({data:"AUTH="+a,type:"POST",contentType:"application/x-www-form-urlencoded",success:function(e){clearInterval(t.myVar);var n=e.get("code");n===t.constant.BANKINGREFUSALTWENTY?t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW):n===t.constant.BANKINGREFUSALTWENTYONE?t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW):n===t.constant.PUSHPAGECODE?t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW):n===t.constant.EBILLINGFAILURE?(t.errors.set("serverErrorFlag",!0),t.errors.set("serverErrorText",t.model.get("app.authentication.S18.ebillingerror")),t.notifyError(t.constant.EBILLINGFAILURE,t.model.get("app.authentication.S18.ebillingerror"),"fullAuthentication")):t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW),t.hideLoader()},error:function(){clearInterval(t.myVar),t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),t.errors.set("serverError",!0),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError()}})},goToBankingAgreement:function(){this.authenticationSubmitModel.set("progressFlagStatus",""),this.authenticationSubmitModel.set("function","cancel"),this.renderBankingConvention()},notifyError:function(t,e,n){s.wcm.notifyError({code:t,message:e,ModuleName:n})},loadProgress:function(){var t=this;t.myVar=setInterval(function(){i.updateProgress(t.$el,t.errorTemplate)},3e3)},loadServerError:function(){var t=this;t.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){i.updateError(t.$el,e,t.model.get("app.authentication.S18.error20"))}),t.hideLoader()},showLoader:function(){n(".pf_loader_div").removeClass("pf_hide"),n(".loader-cont1").removeClass("pf_hide")},hideLoader:function(){n(".loader-cont1").addClass("pf_hide"),n(".pf_loader_div").addClass("pf_hide")},events:function(){return e.extend({},e.result(o.prototype,"events")||{},{"click .acceptAgreement":"signBankingAgreement","click .cancelAgreement":"returnToAuthentication","click .refusalAgreement":"refuseBankingAgreement","click #radio-conventionAdhesion-accept":"agreed","click #radio-conventionAdhesion-refuse":"disagreed","click .cancelRefusal":"goToBankingAgreement"})}})}),bnpp.define("fullAuthentication/model/emailModificationSubmitModel",["backbone","jquery"],function(t){return t.Model.extend({initialize:function(t){this.url=t.url},fetch:function(e){return e.dataType="html",t.Model.prototype.fetch.call(this,e)},parse:function(t){var e;try{e=JSON.parse(t)}catch(n){e={htmlcontent:t}}return e}})}),bnpp.define("fullAuthentication/model/authenticationSendEmailModel",["backbone","jquery"],function(t){return t.Model.extend({initialize:function(t){this.url=t.url}})}),bnpp.define("text!fullAuthentication/template/emailModification.html",[],function(){return'<div class="columns authentification">\n <div class="row">\n <h1 rv-text="model.app.authentication.S18.LIBF05-012_1" class="general_heading pf_hide"></h1>\n </div>\n <!--starts -->\n <div class="row progressBar">\n <div class="columns small-centered small-10 medium-8 large-6">\n <ol class="bulletProgressContainer">\n \n </ol>\n </div>\n </div>\n <!--ends-->\n <!--text if only email -->\n <div class="row emailText pf_hide pf_textcenter">\n <div class="columns small-centered small-12 medium-6 large-6">\n <h1 rv-text="model.app.authentication.S18.LIBF05-027_8"></h1>\n </div>\n </div>\n <!--text if only email -->\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.serverErrorText" rv-show="errors.serverErrorFlag"> </span>\n </div>\n </div>\n <div class="row">\n <div class="columns">\n <h2 rv-text="model.app.authentication.S18.LIBF05-027_2"></h2>\n <!--p rv-text="model.app.authentication.S18.LIBF05-027_3"></p-->\n </div>\n </div>\n <div class="row spacedTop">\n <div class="columns large-5">\n <label for="input-emailClient" rv-text="model.app.authentication.S18.LIBF05-027_4"></label>\n <div class="inputResetContainer">\n <span>\n <input type="text" id="input-emailClient" class="hasRPF" data-rpf="emailRestrictedErrorFlag" name="input-emailClient" rv-value="submitModel.email" maxlength="80">\n </span>\n <a class="resetBtn" data-resetid="input-emailClient"></a>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.emailText" rv-show="errors.email"></span>\n <span class="required" rv-text="errors.emailRestrictedErrorFlagText" rv-show="errors.emailRestrictedErrorFlag"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="columns large-5 left">\n <label for="input-confirmEmailClient" rv-text="model.app.authentication.S18.LIBF05-027_5"></label>\n <div class="inputResetContainer">\n <span>\n <input type="text" id="input-confirmEmailClient" class="hasRPF" data-rpf="confirmEmailRestrictedErrorFlag" name="input-confirmEmailClient" rv-value="submitModel.confirmEmail" maxlength="80">\n </span>\n <a class="resetBtn" data-resetid="input-confirmEmailClient"></a>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.confirmEmailText" rv-show="errors.confirmEmail"></span>\n <span class="required" rv-text="errors.confirmEmailRestrictedErrorFlagText" rv-show="errors.confirmEmailRestrictedErrorFlag"></span>\n <span class="required" rv-text="errors.misMatchtext" rv-show="errors.emailMatch"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="row spacedTop">\n <div class="columns">\n <div class="customCheckboxContainer offresCommerciales pf_hide">\n <input type="checkbox" id="input-offresCommerciales" tabindex="-1" name="input-offresCommerciales">\n <a class="customCheckbox" tabindex="0"></a>\n <label for="input-offresCommerciales" rv-text="model.app.authentication.S18.LIBF05-027_6"></label>\n </div>\n </div>\n </div>\n <div class="row spacedTop">\n <div class="columns text-center">\n <input type="button" class="button success radius validateEmail" tabindex="0" rv-value="model.app.authentication.S18.LIBF05-027_7"/>\n </div>\n </div>\n </div>\n '}),bnpp.define("fullAuthentication/view/emailModificationView",["backbone","underscore","jquery","sf","../../../app/lib/authenticationRivetsConfig","../../../app/authenticationCommons/validateAuthentication","../view/webAnalytics","../model/multiLanConfigModel","../model/emailModificationSubmitModel","../model/authenticationSendEmailModel","text!../template/emailModification.html"],function(t,e,n,i,a,s,o,r,l,c,d){return o.extend({model:null,initialize:function(t){var n=this;e.bindAll(this,"renderEmailView","goToNext","showLoader","hideLoader"),this.require=t.require,this.hostUrl=t.hostUrl,this.constant=t.constant,this.analyticsObj=this.constant.WEBANALYTICS,this.values=t.values,this.authenticationSubmitModel=t.submitModel,this.errors=t.errors,this.fetchParams=t.fetchParams,this.multiLanUrl=t.hostUrl+this.constant.multiLan,this.model=new r({url:this.multiLanUrl}),this.model.fetch({success:function(){n.emailModificationSubmitModel=new l({url:n.errors.get("eaiurl")}),n.authenticationSendEmailModel=new c({url:n.hostUrl+"rpc/notification/notify"}),n.renderEmailView()},error:function(){n.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),n.$el.append(n.constant.SERVERERROR)}}),n.logWebAnalytics(n.analyticsObj.ONSCREEN,n.analyticsObj.SCREENEVENT,"fullAuthentication",n.analyticsObj.EMAILSCREEN,{})},renderEmailView:function(){var t=this;e.each(t.model.get("app.authentication.S18"),function(e,n){s.checkDelimiter(e)&&-1===n.indexOf("splitLabel")&&t.model.set("app.authentication.S18."+n+"splitLabel",e)}),t.dynamicValues={SPDAT_4003:t.authenticationSubmitModel.get("company")};var i=t.dynamicValues;e.each(t.model.get("app.authentication.S18"),function(n,a){if(-1!==a.indexOf("splitLabel")){var o=a.replace("splitLabel","");e.each(i,function(e,a){-1!==n.indexOf(a)&&t.model.set("app.authentication.S18."+o,s.currencyFormatter(n,i))})}}),t.$el.html(d),this.authenticationSubmitModel.get("progressBar")===!0?(n(".emailText").hide(),n(".progressBar").show(),this.authenticationSubmitModel.set("progressFlagStatus","emailView")):(n(".progressBar").hide(),n(".emailText").show()),a.bind(t.$el,{submitModel:t.authenticationSubmitModel,model:this.model,errors:this.errors});var o=this.authenticationSubmitModel.get("email");this.authenticationSubmitModel.set("oldEmail",o),""===this.authenticationSubmitModel.get("oldEmail")?this.authenticationSubmitModel.set("analyticsEmailText",this.constant.ANALYTICSEMAILBLANK):this.authenticationSubmitModel.set("analyticsEmailText",this.constant.ANALYTICSEMAILUPDATE)},changeOptin:function(){var t=this.$el.find(this.constant.CHECKBOXCLASS).is(":checked");t===!0?this.authenticationSubmitModel.set("isoptinSelected",this.constant.YES):this.authenticationSubmitModel.set("isoptinSelected",this.constant.NO)},resetBtnManager:function(t){n("#"+n(t.target).data("resetid")).val("")},rpfValidations:function(){var t=this;t.$el.find(".hasRPF").each(function(){var e=n(this).val(),i=n(this).data("rpf");if(e){var a=s.invalidCheck(e);a===!0?(t.errors.set(i,!0),t.errors.set("emailFlag",!0)):(t.errors.set(i,!1),t.errors.set("emailFlag",!1))}else t.errors.set(i,!1),t.errors.set("emailFlag",!1)})},goToNext:function(){var t,i,a,o,r,l=this,c=l.model.get("app.authentication.S18.restrictedCharacters");s.restrictedParameters=c,this.rpfValidations(),setTimeout(function(){l.authenticationSubmitModel.set("email",l.$el.find(l.constant.EMAILDID).val()),l.authenticationSubmitModel.set("confirmEmail",l.$el.find(l.constant.CONFIRMEMAILID).val()),l.authenticationSubmitModel.validateEmailFormat(l.errors,l.model,"goToNext"),l.authenticationSubmitModel.validateEmail(l.errors,l.model);var s;s=!0,l.errors.get("email")?(l.$el.find("#input-emailClient").parent().hasClass("input-success")&&l.$el.find("#input-emailClient").parent().removeClass("input-success"),l.$el.find("#input-emailClient").parent().addClass("input-error"),s&&(s=!1,l.$el.find("#input-emailClient").focus())):(l.$el.find("#input-emailClient").parent().hasClass("input-error")&&l.$el.find("#input-emailClient").parent().removeClass("input-error"),l.$el.find("#input-emailClient").parent().addClass("input-success")),l.errors.get("confirmEmail")?(l.$el.find("#input-confirmEmailClient").parent().hasClass("input-success")&&l.$el.find("#input-confirmEmailClient").parent().removeClass("input-success"),l.$el.find("#input-confirmEmailClient").parent().addClass("input-error"),s&&(s=!1,l.$el.find("#input-confirmEmailClient").focus())):(l.$el.find("#input-confirmEmailClient").parent().hasClass("input-error")&&l.$el.find("#input-confirmEmailClient").parent().removeClass("input-error"),l.$el.find("#input-confirmEmailClient").parent().addClass("input-success")),l.authenticationSubmitModel.get("navigation")===!0&&(l.showLoader(),l.loadProgress(),t=l.authenticationSubmitModel.get("clientId"),i=l.authenticationSubmitModel.get("userPassword").replace(/^\s+|\s+$/g,""),a=l.authenticationSubmitModel.get("email"),o=l.authenticationSubmitModel.get("isoptinSelected"),r=encodeURIComponent("<DIST_ID>"+l.fetchParams[l.constant.NUMEROVENDEUR]+"</DIST_ID><AUTH_PROC_ID></AUTH_PROC_ID><MEAN_ID>"+l.authenticationSubmitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+l.authenticationSubmitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID><PERS_ID></PERS_ID><SMID>"+t+"</SMID><AGRE_ID> </AGRE_ID></EBANKING_USER_ID><EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID><AUTHENTICATION_MEAN_ID>"+l.authenticationSubmitModel.get("eaiParams").eaiParams.meanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION><CHALLENGE_RESPONSE><VALUE>"+i+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+a+"</VALUE><CHALLENGE>newEmail</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+o+"</VALUE><CHALLENGE>optin</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+l.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)}),l.emailModificationSubmitModel.fetch({data:"AUTH="+r,type:"POST",contentType:"application/x-www-form-urlencoded",success:function(t){clearInterval(l.myVar);var i,a=t.get("message");if(e(t.attributes).has("htmlcontent")&&""!==t.attributes.htmlcontent){var s=n(t.attributes.htmlcontent).filter(function(t,e){return 1===e.nodeType&&"resultURI"===e.id});i=l.constant.DASHBOARD,""===l.fetchParams.authenticationFlag?l.authenticationSubmitModel.set("authType",l.constant.COMPLETEAUTHENTICATION):l.authenticationSubmitModel.set("authType",l.fetchParams.authenticationFlag),l.authenticationSubmitModel.set("redirectUrl",s.attr("value"))}else i=t.get("code");if(-1!==a.indexOf("#")){var o=a.split("#")||"",r=o[1].split("-")||"",c=JSON.parse(r);c.CIVILITEPERSONNECD?l.authenticationSubmitModel.set("civilitePersonneCd",c.CIVILITEPERSONNECD):l.authenticationSubmitModel.set("civilitePersonneCd",l.authenticationSubmitModel.get("civilitePersonneCd")),c.PARTNERWEBSITE2?l.authenticationSubmitModel.set("parnterWebsite2",c.PARTNERWEBSITE2):l.authenticationSubmitModel.set("parnterWebsite2",l.authenticationSubmitModel.get("parnterWebsite2")),c.ANTIPHISHING?l.authenticationSubmitModel.set("antiPhishing",c.ANTIPHISHING):l.authenticationSubmitModel.set("antiPhishing",l.authenticationSubmitModel.get("antiPhishing")),c.EXPEDITEURMAIL?l.authenticationSubmitModel.set("expediteurMail",c.EXPEDITEURMAIL):l.authenticationSubmitModel.set("expediteurMail",l.authenticationSubmitModel.get("expediteurMail"))}i===l.constant.ONLYSECRETCODE?(l.authenticationSubmitModel.get("oldEmail")!==l.authenticationSubmitModel.get("confirmEmail").toUpperCase()&&(l.callEmailService("old"),l.callEmailService("new")),l.authenticationSubmitModel.set("loadNextView","loadthirdView")):i===l.constant.DASHBOARD?(l.authenticationSubmitModel.get("oldEmail")!==l.authenticationSubmitModel.get("confirmEmail")&&(l.callEmailService("old"),l.callEmailService("new")),l.authenticationSubmitModel.set("status",l.constant.DASHBOARDPAGE)):i===l.constant.OPTINERR?(l.authenticationSubmitModel.get("oldEmail")!==l.authenticationSubmitModel.get("confirmEmail")&&(l.callEmailService("old"),l.callEmailService("new")),l.errors.set("serverErrorFlag",!0),l.errors.set("serverErrorText",l.model.get("app.authentication.S18.optionerror")),l.notifyError(l.constant.OPTINERR,l.model.get("app.authentication.S18.optionerror"),"fullAuthentication")):i===l.constant.EMAILERRORCODETWENTYTWO&&(l.errors.set("serverErrorFlag",!0),l.errors.set("serverErrorText",l.model.get("app.authentication.S18.emailServerError")),l.notifyError(l.constant.EMAILERRORCODETWENTYTWO,l.model.get("app.authentication.S18.emailServerError"),"fullAuthentication"),l.loadServerError()),l.hideLoader()},error:function(){clearInterval(l.myVar),l.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),l.errors.set("serverErrorFlag",!0),l.errors.set("serverErrorText",l.model.get("app.authentication.S18.error20")),l.notifyError("",l.model.get("app.authentication.S18.error20"),"fullAuthentication"),l.loadServerError()}}))},l.constant.ONE)},callEmailService:function(t){var e=this;if(e.authenticationSubmitModel.get("isEmptyEmail"))return!0;"old"===t&&e.logWebAnalytics(e.analyticsObj.ONSCREEN,e.analyticsObj.SCREENEVENT,"fullAuthentication",e.analyticsObj.CHANEMAIL,{});var n={internationalDistributorNumber:e.fetchParams[e.constant.NUMEROVENDEUR],idTemplate:"old"===t?"S18_EMAIL_OLD":"S18_EMAIL_NEW",email:"old"===t?e.authenticationSubmitModel.get("oldEmail"):this.authenticationSubmitModel.get("email"),dyn:{ancienMail:this.authenticationSubmitModel.get("oldEmail"),civilite:e.authenticationSubmitModel.get("civilitePersonneCd"),lastName:e.authenticationSubmitModel.get("nomPersonne"),firstName:e.authenticationSubmitModel.get("prenomPersonne"),brand:e.authenticationSubmitModel.get("company"),raisonSociale:e.authenticationSubmitModel.get("mRaisonSociale"),refLegalStatusCd:e.authenticationSubmitModel.get("mCodeLegalStatus"),capital:e.authenticationSubmitModel.get("mCapital"),address:e.authenticationSubmitModel.get("mAddress"),city:e.authenticationSubmitModel.get("mCity"),postCode:e.authenticationSubmitModel.get("mPostCode"),rcs:e.authenticationSubmitModel.get("mRcs"),oriasNumber:e.authenticationSubmitModel.get("mOriasNumber")}};e.authenticationSendEmailModel.fetch({data:JSON.stringify(n),type:"POST",contentType:"application/json; charset=utf-8",error:function(){}})},displayOptin:function(){var t=this;this.authenticationSubmitModel.validateEmailFormat(this.errors,this.model,"displayOptin"),this.errors.get("emailFormat")===!1&&this.authenticationSubmitModel.get("oldEmail").toUpperCase()!==this.authenticationSubmitModel.get("email").toUpperCase()?this.$el.find(this.constant.OPTINCLASS).removeClass(this.constant.HIDECLASS):(this.$el.find(this.constant.OPTINCLASS).addClass(this.constant.HIDECLASS),this.$el.find("#input-offresCommerciales").attr("checked",!1)),t.errors.get("email")?(t.$el.find("#input-emailClient").parent().hasClass("input-success")&&t.$el.find("#input-emailClient").parent().removeClass("input-success"),t.$el.find("#input-emailClient").parent().addClass("input-error")):(t.$el.find("#input-emailClient").parent().hasClass("input-error")&&t.$el.find("#input-emailClient").parent().removeClass("input-error"),t.$el.find("#input-emailClient").parent().addClass("input-success"))},accepted:function(){this.authenticationSubmitModel.set("opt-in",!0)},ignoreClick:function(){return!1},continueFocus:function(t){t.shiftKey||13===t.which&&n(t.target).trigger("mousedown")},notifyError:function(t,e,n){i.wcm.notifyError({code:t,message:e,ModuleName:n})},restrictPaste:function(t){t.preventDefault()},loadProgress:function(){var t=this;this.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){t.myVar=setInterval(function(){s.updateProgress(t.$el,e)},3e3)})},loadServerError:function(){var t=this;t.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){s.updateError(t.$el,e,t.model.get("app.authentication.S18.error20"))}),t.hideLoader()},checkEmailFormat:function(){this.authenticationSubmitModel.validateConfirmEmailFormat(this.errors,this.model),this.errors.get("confirmEmail")?(this.$el.find("#input-confirmEmailClient").parent().hasClass("input-success")&&this.$el.find("#input-confirmEmailClient").parent().removeClass("input-success"),this.$el.find("#input-confirmEmailClient").parent().addClass("input-error")):(this.$el.find("#input-confirmEmailClient").parent().hasClass("input-error")&&this.$el.find("#input-confirmEmailClient").parent().removeClass("input-error"),this.$el.find("#input-confirmEmailClient").parent().addClass("input-success"))},showLoader:function(){n(".pf_loader_div").removeClass("pf_hide"),n(".loader-cont1").removeClass("pf_hide")},hideLoader:function(){n(".loader-cont1").addClass("pf_hide"),n(".pf_loader_div").addClass("pf_hide")},events:function(){return e.extend({},e.result(o.prototype,"events")||{},{"mousedown .validateEmail":"goToNext","mousedown .resetBtn":"resetBtnManager","focusout #input-emailClient":"displayOptin","focusout #input-confirmEmailClient":"checkEmailFormat","click #input-offresCommerciales":"accepted","change #input-offresCommerciales":"changeOptin","paste #input-confirmEmailClient":"restrictPaste","keypress .validateEmail":"continueFocus"})}})}),bnpp.define("fullAuthentication/model/modifySecretCodeErrorModel",["backbone"],function(t){return t.Model.extend({defaults:{password:!1,newPassword:!1,confirmPassword:!1,passwordText:"",newPasswordText:"",confirmPasswordText:"",isError:!1}})}),bnpp.define("fullAuthentication/model/modifySecretCodePublishDetailsModel",["backbone","underscore"],function(t){return t.Model.extend({defaults:{reload:!1},initialize:function(t){this.url=t.url}})}),bnpp.define("fullAuthentication/model/modifySecretCodeConfigModel",["backbone","underscore"],function(t,e){return t.Model.extend({defaults:{keyPadUrl:"",confirmedNewGridMappedValues:[],newPwdGridMappedValues:[],pwdGridMappedValues:[],passwordEnteredValue:[],newPasswordEnteredValue:[],confirmPasswordEnteredValue:[],distId:"",width:"",height:"",density:"",numeroVendeur:""},initialize:function(t){this.url=t.url},parse:function(t){var n=this;e.each(t.confirmedNewGrid.map,function(t){n.get("confirmedNewGridMappedValues").push(t.split(",")[4])}),e.each(t.newPwdGrid.map,function(t){n.get("newPwdGridMappedValues").push(t.split(",")[4])}),e.each(t.pwdGrid.map,function(t){n.get("pwdGridMappedValues").push(t.split(",")[4])}),this.set("cGridUrl",t.confirmedNewGrid.url),this.set("confirmedpasswordId",t.confirmedNewGrid.id),this.set("nGridUrl",t.newPwdGrid.url),this.set("newPwdId",t.newPwdGrid.id),this.set("pGridUrl",t.pwdGrid.url),this.set("pwdId",t.pwdGrid.id)}})}),bnpp.define("fullAuthentication/model/modifySecretCodeSubmitModel",["backbone","underscore"],function(t){return t.Model.extend({defaults:{},initialize:function(t){this.url=t.url},fetch:function(e){return e.dataType="html",t.Model.prototype.fetch.call(this,e)},parse:function(t){var e;try{e=JSON.parse(t)}catch(n){e={htmlcontent:t}}return e}})}),bnpp.define("text!fullAuthentication/template/changeSecretCode.html",[],function(){return' <div class="columns authentification">\n <form id="formPasswordClient">\n <div class="row">\n <h1 rv-text="model.app.authentication.S18.LIBF05-012_1" class="general_heading pf_hide"></h1>\n </div>\n <!--progressbar starts -->\n <div class="row progressBar">\n <div class="columns small-centered small-10 medium-8 large-6">\n <ol class="bulletProgressContainer">\n \n </ol>\n </div>\n </div>\n <!--progressbar ends-->\n <!--text if only secrectcode -->\n <div class="row secretText pf_hide pf_textcenter">\n <div class="columns small-centered small-12 medium-6 large-6"> \n <h1 rv-text="model.app.authentication.S18.LIBF05-014_1"></h1>\n </div>\n </div>\n <!--text if only secrectcode -->\n <div class="row">\n <div class="columns">\n <h2 rv-text="model.app.authentication.S18.LIBF05-014_2"></h2>\n <label rv-text="model.app.authentication.S18.LIBF05-014_3"></label>\n \n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.codeSecretServerErrText" rv-show="errors.codeSecretServerErr"></span>\n </div>\n </div>\n </div>\n </div>\n \n \n <div class="row spacedTop">\n <div class="columns large-5 passwordEdit">\n <label >\n <span rv-text="model.app.authentication.S18.LIBF05-014_4"></span>\n <span class="helperBtn hasTooltip" data-tooltip="helperPasswordContent" data-position="right center" data-orientation="left top"></span>\n <div id="helperPasswordContent" class="hide">\n <span rv-html="model.app.authentication.S18.LIBF05-014_8"></span>\n </div>\n </label>\n <div class="inputResetContainer">\n <span >\n <input type="text" readonly="readonly" id="input-actualClientPassword" name="input-actualClientPassword" tabindex="1">\n </span>\n <a class="resetBtn" data-resetid="input-actualClientPassword"></a>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.passwordText" rv-show="errors.password"></span>\n </div>\n </div>\n </div>\n <div class="securedKeyboard spacedBottom hide">\n <label rv-text="model.app.authentication.S18.LIBF05-014_10"></label>\n <img class ="passwordKeyboard authenticate_keyboard_container" id ="passwordKeyboard" alt="">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="columns large-5 passwordEdit">\n <label >\n <span rv-text="model.app.authentication.S18.LIBF05-014_5"></span>\n <span class="helperBtn hasTooltip" data-tooltip="helperNewPasswordContent" data-position="right center" data-orientation="left top"></span>\n <div id="helperNewPasswordContent" class="hide">\n <strong rv-text="model.app.authentication.S18.LIBF05-014_9_1"></strong>\n <ul class="dashList">\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_2"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_3"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_4"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_5"></li>\n </ul>\n </div>\n </label>\n <div class="inputResetContainer">\n <span >\n <input type="text" readonly="readonly" id="input-newClientPassword" name="input-newClientPassword" tabindex="2">\n </span>\n <a class="resetBtn" data-resetid="input-newClientPassword"></a>\n <div class="row">\n <div class="columns">\n <span class="required" rv-html="errors.newPasswordText" rv-show="errors.newPassword"></span>\n </div>\n </div>\n </div>\n <div class="securedKeyboard spacedBottom hide">\n <label rv-text="model.app.authentication.S18.LIBF05-014_10"></label>\n <img class ="newPasswordKeyboard authenticate_keyboard_container" id="newPasswordKeyboard" alt="">\n </div>\n </div>\n <div class="columns large-5 left passwordEdit">\n <label >\n <span rv-text="model.app.authentication.S18.LIBF05-014_6"></span>\n <!--span class="helperBtn hasTooltip" data-tooltip="helperNewPasswordContent" data-position="right center" data-orientation="left top"></span-->\n <div id="helperNewPasswordContent" class="hide">\n <strong rv-text="model.app.authentication.S18.LIBF05-014_9_1"></strong>\n <ul class="dashList">\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_2"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_3"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_4"></li>\n <li rv-text="model.app.authentication.S18.LIBF05-014_9_5"></li>\n </ul>\n </div>\n </label>\n <div class="inputResetContainer">\n <span >\n <input type="text" readonly="readonly" id="input-confirmNewClientPassword" name="input-confirmNewClientPassword" tabindex="3">\n </span>\n <a class="resetBtn" data-resetid="input-confirmNewClientPassword"></a>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.confirmPasswordText" rv-show="errors.confirmPassword"></span>\n </div>\n </div>\n </div>\n <div class="securedKeyboard spacedBottom hide">\n <label rv-text="model.app.authentication.S18.LIBF05-014_10"></label>\n <img class ="confirmPasswordKeyboard authenticate_keyboard_container" id ="confirmPasswordKeyboard" alt="">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="columns">\n <span class="required" rv-text="errors.serverErrorText" rv-class-pf_show_active="errors.serverError"></span>\n </div>\n </div>\n <div class="row spacedTop">\n <div class="columns text-center">\n <input type="button" class="button success radius secretCodeResetContinue" rv-value="model.app.authentication.S18.LIBF05-014_7" tabindex="4"/>\n </div>\n </div>\n </form>\n </div>\n ' }),bnpp.define("fullAuthentication/view/secretCodeModificationView",["backbone","underscore","jquery","sf","../../../app/authenticationCommons/validateAuthentication","../../../app/lib/authenticationRivetsConfig","../view/webAnalytics","../model/modifySecretCodeErrorModel","../model/modifySecretCodePublishDetailsModel","../model/modifySecretCodeConfigModel","../model/multiLanConfigModel","../model/modifySecretCodeSubmitModel","../model/authenticationSendEmailModel","text!../template/changeSecretCode.html"],function(t,e,n,i,a,s,o,r,l,c,d,u,E,h){return o.extend({model:null,initialize:function(t){var n=this;e.bindAll(this,"renderSecretCodeView","validate","configFetch","getGridValue","resetText","postPasswordDetails","submitEAI","showLoader","hideLoader"),n.hostUrl=t.hostUrl,n.submitModel=t.submitModel,this.require=t.require,n.constant=t.constant,this.analyticsObj=this.constant.WEBANALYTICS,n.multiLanUrl=n.hostUrl+n.constant.MULTILAN,n.model=new d({url:n.multiLanUrl}),this.require(["text!"+n.hostUrl+n.constant.PROGRESSTEMPLATEPAGE],function(t){n.errorTemplate=t}),n.authenticationSecretCodeModel=new E({url:n.hostUrl+"rpc/notification/notify"}),n.model.fetch({success:function(){n.configFetch()},error:function(){n.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),n.$el.append(n.constant.SERVERERROR)}}),n.fetchParams=t.fetchParams,n.errors=new r,n.logWebAnalytics(n.analyticsObj.ONSCREEN,n.analyticsObj.SCREENEVENT,"fullAuthentication",n.analyticsObj.ONPASSCODE,{})},renderSecretCodeView:function(t){var e=this,i=e.submitModel.get("host")+e.config.get("cGridUrl"),o=e.submitModel.get("host")+e.config.get("nGridUrl"),r=e.submitModel.get("host")+e.config.get("pGridUrl");if(e.config.set("confirmedNewGridUrl",i),e.config.set("newPwdGridUrl",o),e.config.set("pwdGridUrl",r),e.$el.html(h),e.workFlow(),e.initEvents(t),e.$el.find(".passwordKeyboard").attr("src",e.config.get("pwdGridUrl")),e.$el.find(".newPasswordKeyboard").attr("src",e.config.get("newPwdGridUrl")),e.$el.find(".confirmPasswordKeyboard").attr("src",e.config.get("confirmedNewGridUrl")),"initialize"!==this.submitModel.get("progressFlagStatus")?this.submitModel.set("progressFlagStatus",this.submitModel.get("function")):this.submitModel.set("progressFlagStatus",""),e.$el.find("#"+e.constant.PASSWORDTEXT).focus(),"reload"===t){var l=e.$el.find("#"+e.constant.PASSWORDTEXT),c=e.$el.find("#"+e.constant.NEWPASSWORDTEXT),d=e.$el.find("#"+e.constant.CONFIRMPASSWORDTEXT);e.errors.get("password")&&(l.parent().hasClass("input-success")&&l.parent().removeClass("input-success"),l.parent().addClass("input-error")),e.errors.get("newPassword")&&(c.parent().hasClass("input-success")&&c.parent().removeClass("input-success"),c.parent().addClass("input-error")),e.errors.get("confirmPassword")&&(d.parent().hasClass("input-success")&&d.parent().removeClass("input-success"),d.parent().addClass("input-error"))}s.bind(e.$el,{errors:e.errors,view:e,config:e.config,model:e.model,publish:e.publishModel}),e.$el.find(".hasTooltip").each(function(){a.initTooltip(n(this),e.$el)})},workFlow:function(){this.submitModel.get("progressBar")===!0?(n(".secretText").hide(),n(".progressBar").show()):(n(".progressBar").hide(),n(".secretText").show())},initEvents:function(t){var e=this;t?e.$el.find(".securedKeyboard").last().removeClass("hide"):e.$el.find(".securedKeyboard").first().removeClass("hide"),e.$el.find(".passwordEdit").each(function(){var t=n(this).find("input"),i=n(this).find(".securedKeyboard");t.focus(function(){e.$el.find(".securedKeyboard").addClass("hide"),i.removeClass("hide"),e.activeVirtualKeyBoard(t.attr("id"))})})},configFetch:function(t,e){var n=this;n.config=new c({url:n.submitModel.get("host")+n.submitModel.get("pathname")+n.model.get("app.authentication.cetelem.URLs.changePassword")}),n.publishModel=new l({url:n.submitModel.get("host")+n.submitModel.get("pathname")+n.model.get("app.authentication.cetelem.URLs.changePasswordVerify")}),n.publishModel.set("reload",!0),n.secretCodeSubmitModel=new u({url:n.submitModel.get("eaiurl")}),n.submitModel.set("function","initialize"),n.config.defaults.newPasswordEnteredValue=[],n.config.defaults.confirmedNewGridMappedValues=[],n.config.defaults.confirmPasswordEnteredValue=[],n.config.defaults.newPwdGridMappedValues=[],n.config.defaults.passwordEnteredValue=[],n.config.defaults.pwdGridMappedValues=[],n.config.set("distId",n.constant.DISTID),n.config.set("width",n.constant.WIDTH),n.config.set("height",n.constant.HEIGHT),n.config.set("density",n.constant.DENSITY),n.config.set("numeroVendeur",n.fetchParams[this.constant.NUMEROVENDEUR]),n.config.set("colorCodeGrid",n.fetchParams[this.constant.COLORCODE_GRID]),n.config.fetch({data:JSON.stringify({distId:n.config.get("distId"),width:n.config.get("width"),height:n.config.get("height"),density:n.config.get("density"),numeroVendeur:n.config.get("numeroVendeur"),colorCode:n.config.get("colorCodeGrid")}),type:"POST",contentType:"application/json; charset=utf-8",success:function(){n.renderSecretCodeView(t,e)},error:function(){n.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),n.notifyError("",n.model.get("app.authentication.S18.error20"),"fullAuthentication"),n.loadServerError()}})},validate:function(t){var e=this;t.keyCode!==e.constant.NINE&&(t.target.id===e.constant.PASSWORDTEXT?(e.errors.set("password",!0),e.errors.set("passwordText",e.model.get("app.authentication.S18.ERRF05-003_5"))):t.target.id===e.constant.NEWPASSWORDTEXT?(e.errors.set("newPassword",!0),e.errors.set("newPasswordText",e.model.get("app.authentication.S18.ERRF05-003_5"))):t.target.id===e.constant.CONFIRMPASSWORDTEXT&&(e.errors.set("confirmPassword",!0),e.errors.set("confirmPasswordText",e.model.get("app.authentication.S18.ERRF05-003_5"))))},activeVirtualKeyBoard:function(t){var e=this,n=e.$el.find("#"+e.constant.PASSWORDTEXT),i=e.$el.find("#"+e.constant.NEWPASSWORDTEXT),s=e.$el.find("#"+e.constant.CONFIRMPASSWORDTEXT);t===e.constant.PASSWORDTEXT?(s.val().length<e.constant.SIX?a.isNullOrWhiteSpace(s.val())||(s.parent().hasClass("input-success")&&s.parent().removeClass("input-success"),s.parent().addClass("input-error"),e.errors.set("confirmPassword",!0),e.errors.set("isError",!0),e.errors.set("confirmPasswordText",e.model.get("app.authentication.S18.ERRF05-003_4")),s.focus()):(e.errors.set("confirmPassword",!1),e.errors.set("isError",!1),s.parent().hasClass("input-error")&&s.parent().removeClass("input-error"),s.parent().addClass("input-success")),i.val().length<e.constant.SIX?a.isNullOrWhiteSpace(i.val())||(i.parent().hasClass("input-success")&&i.parent().removeClass("input-success"),i.parent().addClass("input-error"),e.errors.set("newPassword",!0),e.errors.set("isError",!0),e.errors.set("newPasswordText",e.model.get("app.authentication.S18.ERRF05-003_4")),i.focus()):(e.errors.set("newPassword",!1),e.errors.set("isError",!1),i.parent().hasClass("input-error")&&i.parent().removeClass("input-error"),i.parent().addClass("input-success"))):t===e.constant.NEWPASSWORDTEXT?(n.val().length<e.constant.SIX?a.isNullOrWhiteSpace(n.val())||(n.parent().hasClass("input-success")&&n.parent().removeClass("input-success"),n.parent().addClass("input-error"),e.errors.set("password",!0),e.errors.set("isError",!0),e.errors.set("passwordText",e.model.get("app.authentication.S18.ERRF05-003_4")),n.focus()):(e.errors.set("password",!1),e.errors.set("isError",!1),n.parent().removeClass("input-error"),n.parent().addClass("input-success")),s.val().length<e.constant.SIX?a.isNullOrWhiteSpace(s.val())||(s.parent().hasClass("input-success")&&s.parent().removeClass("input-success"),s.parent().addClass("input-error"),e.errors.set("confirmPassword",!0),e.errors.set("isError",!0),e.errors.set("confirmPasswordText",e.model.get("app.authentication.S18.ERRF05-003_4")),s.focus()):(e.errors.set("confirmPassword",!1),e.errors.set("isError",!1),s.parent().hasClass("input-error")&&s.parent().removeClass("input-error"),s.parent().addClass("input-success"))):t===e.constant.CONFIRMPASSWORDTEXT&&(i.val().length<e.constant.SIX?a.isNullOrWhiteSpace(i.val())||(s.parent().hasClass("input-success")&&s.parent().removeClass("input-success"),i.parent().addClass("input-error"),e.errors.set("newPassword",!0),e.errors.set("isError",!0),e.errors.set("newPasswordText",e.model.get("app.authentication.S18.ERRF05-003_4")),s.focus()):(e.errors.set("newPassword",!1),e.errors.set("isError",!1),i.parent().hasClass("input-error")&&i.parent().removeClass("input-error"),i.parent().addClass("input-success")),n.val().length<e.constant.SIX?a.isNullOrWhiteSpace(n.val())||(n.parent().hasClass("input-success")&&n.parent().removeClass("input-success"),n.parent().addClass("input-error"),e.errors.set("password",!0),e.errors.set("isError",!0),e.errors.set("passwordText",e.model.get("app.authentication.S18.ERRF05-003_4")),n.focus()):(e.errors.set("password",!1),e.errors.set("isError",!1),n.parent().hasClass("input-error")&&n.parent().removeClass("input-error"),n.parent().addClass("input-success")))},getPassword:function(t){var e=this;n(t.target).hasClass(e.constant.PASSWORDKEYBOARDID)?e.getGridValue(t,e.constant.PASSWORDTEXT,e.config.get("passwordEnteredValue"),e.config.get("pwdGridMappedValues"),e.constant.PASSWORD):n(t.target).hasClass(e.constant.NEWPASSWORDKEYBOARDID)?e.getGridValue(t,e.constant.NEWPASSWORDTEXT,e.config.get("newPasswordEnteredValue"),e.config.get("newPwdGridMappedValues"),e.constant.NEWPASSWORD):n(t.target).hasClass(e.constant.CONFIRMPASSWORDKEYBOARDID)&&e.getGridValue(t,e.constant.CONFIRMPASSWORDTEXT,e.config.get("confirmPasswordEnteredValue"),e.config.get("confirmedNewGridMappedValues"),e.constant.CONFIRMPASSWORD)},getGridValue:function(t,e,n,i,a){var s=this,o=s.$el.find("#"+e).val();s.$el.find("#"+e).focus();var r,l,c,d,u;r=s.$el.find("#"+t.target.id),l=r.offset().left,c=r.offset().top,d=r.width()/s.constant.FIVE,u=r.height()/s.constant.TWO;var E=r.width()/s.constant.NINESIX;if(o.length<s.constant.SIX){for(var h=s.constant.ZERO;h<=s.constant.FIVE;h++)t.pageX-l>d*h+E&&t.pageX-l<d*(h+1)-E&&t.pageY-c<u-E?(n.push(i[h]),s.$el.find("#"+e).val(o+"*")):t.pageX-l>d*h+E&&t.pageX-l<d*(h+1)-E&&t.pageY-c>u+E&&t.pageY-c<2*u-E&&(n.push(i[h+5]),s.$el.find("#"+e).val(o+"*"));s.errors.set(a,!1)}else s.errors.set(a,!0),e===s.constant.PASSWORDTEXT?s.errors.set("passwordText",s.model.get("app.authentication.S18.ERRF05-003_4")):e===s.constant.NEWPASSWORDTEXT?s.errors.set("newPasswordText",s.model.get("app.authentication.S18.ERRF05-003_4")):e===s.constant.CONFIRMPASSWORDTEXT&&s.errors.set("confirmPasswordText",s.model.get("app.authentication.S18.ERRF05-003_4")),s.$el.find("#"+e).parent().removeClass("input-error"),s.$el.find("#"+e).parent().addClass("input-success"),t.preventDefault();o.length===s.constant.FIVE&&s.publishModel.set(e,!0)},resetText:function(t){var e=this;e.$el.find("#"+n(t.target).data("resetid")).val(""),n(t.target).prev().find("input").attr("id")===e.constant.PASSWORDTEXT?e.config.set("passwordEnteredValue",[]):n(t.target).prev().find("input").attr("id")===e.constant.NEWPASSWORDTEXT?e.config.set("newPasswordEnteredValue",[]):n(t.target).prev().find("input").attr("id")===e.constant.CONFIRMPASSWORDTEXT&&e.config.set("confirmPasswordEnteredValue",[]),n(t.target).prev().find("input").trigger("focus")},hideErrorRemoveGrid:function(){var t=this;t.errors.set("password",!1),t.errors.set("newPassword",!1),t.errors.set("confirmPassword",!1),t.$el.find(".passwordEdit").each(function(){t.$el.find(".securedKeyboard").addClass("hide")})},postPasswordDetails:function(){var t=this,e=t.$el.find("#"+t.constant.PASSWORDTEXT),n=t.$el.find("#"+t.constant.NEWPASSWORDTEXT),i=t.$el.find("#"+t.constant.CONFIRMPASSWORDTEXT);t.errors.get("newPassword")||t.errors.get("password")||t.errors.get("confirmPassword")||t.errors.set("isError",!1),n.val().length<t.constant.SIX&&(t.errors.set("newPassword",!0),t.errors.set("isError",!0),n.parent().hasClass("input-success")&&n.parent().removeClass("input-success"),n.parent().addClass("input-error"),a.isNullOrWhiteSpace(n.val())?t.errors.set("newPasswordText",t.model.get("app.authentication.S18.ERRF05-003_3")):t.errors.set("newPasswordText",t.model.get("app.authentication.S18.ERRF05-003_4"))),e.val().length<t.constant.SIX?(t.errors.set("password",!0),t.errors.set("isError",!0),e.parent().hasClass("input-success")&&e.parent().removeClass("input-success"),e.parent().addClass("input-error"),a.isNullOrWhiteSpace(e.val())?t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-003_3")):t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-003_4"))):e.val().length===t.constant.SIX&&(t.errors.set("password",!1),t.errors.set("isError",!1),e.parent().hasClass("input-error")&&e.parent().removeClass("input-error"),e.parent().addClass("input-success")),i.val().length<t.constant.SIX&&(t.errors.set("confirmPassword",!0),t.errors.set("isError",!0),i.parent().hasClass("input-success")&&i.parent().removeClass("input-success"),i.parent().addClass("input-error"),a.isNullOrWhiteSpace(i.val())?t.errors.set("confirmPasswordText",t.model.get("app.authentication.S18.ERRF05-003_3")):t.errors.set("confirmPasswordText",t.model.get("app.authentication.S18.ERRF05-003_4"))),i.val()===n.val()&&i.val().length===t.constant.SIX&&(t.errors.set("confirmPassword",!1),t.errors.set("isError",!1),i.parent().hasClass("input-error")&&i.parent().removeClass("input-error"),i.parent().addClass("input-success")),t.errors.get("password")||t.errors.get("newPassword")||t.errors.get("confirmPassword")||(t.loadProgress(),t.publishModel.fetch({data:JSON.stringify({smid:"",distId:"",currentPassword:{id:t.config.get("pwdId"),mappedValues:t.config.get("passwordEnteredValue")},newPassword:{id:t.config.get("newPwdId"),mappedValues:t.config.get("newPasswordEnteredValue")},confirmNewPassword:{id:t.config.get("confirmedpasswordId"),mappedValues:t.config.get("confirmPasswordEnteredValue")}}),type:"POST",contentType:"application/json; charset=utf-8",success:function(a){clearInterval(t.myVar),a.get("code")===t.constant.TWOHUNDRED?(t.publishModel.set("reload",!0),t.configFetch("reload"),t.errors.set("confirmPassword",!0),t.errors.set("confirmPasswordText",t.model.get("app.authentication.S18.ERRF05-014_1")),t.errors.set("password",!1),t.errors.set("newPassword",!1),i.parent().hasClass("input-success")&&i.parent().removeClass("input-success"),i.parent().addClass("input-error"),n.parent().hasClass("input-error")&&n.parent().removeClass("input-error"),n.parent().hasClass("input-success")&&n.parent().removeClass("input-success"),e.parent().hasClass("input-success")&&e.parent().removeClass("input-success"),e.parent().hasClass("input-error")&&e.parent().removeClass("input-error")):a.get("code")===t.constant.THREEHUNDRED?(t.publishModel.set("reload",!0),t.configFetch("reload"),t.errors.set("newPassword",!0),t.errors.set("newPasswordText",t.model.get("app.authentication.S18.ERRF05-003_16")),t.errors.set("confirmPassword",!1),t.errors.set("password",!1),n.parent().hasClass("input-success")&&n.parent().removeClass("input-success"),n.parent().addClass("input-error"),e.parent().hasClass("input-success")&&e.parent().removeClass("input-success"),e.parent().hasClass("input-error")&&e.parent().removeClass("input-error"),i.parent().hasClass("input-error")&&i.parent().removeClass("input-error"),i.parent().hasClass("input-success")&&i.parent().removeClass("input-success")):(t.showLoader(),t.submitEAI(a))},error:function(){t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),clearInterval(t.myVar),t.publishModel.set("reload",!0),t.errors.set("serverError",!0),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.logWebAnalytics(t.analyticsObj.ONSCREEN,t.analyticsObj.SCREENEVENT,"fullAuthentication","Personnalisation code : Erreur",{}),t.loadServerError()}}))},submitEAI:function(){var t=this;t.hideErrorRemoveGrid();var i=t.submitModel.get("clientId"),a=t.publishModel.get("currentPassword").replace(/^\s+|\s+$/g,""),s=t.publishModel.get("newPassword").replace(/^\s+|\s+$/g,""),o=encodeURIComponent("<DIST_ID>"+this.fetchParams[this.constant.NUMEROVENDEUR]+"</DIST_ID>"+"<AUTH_PROC_ID></AUTH_PROC_ID><MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</MEAN_ID><SILENT_IDENTIFICATION_SUPPORT>"+this.submitModel.get("eaiParams").eaiParams.value+"</SILENT_IDENTIFICATION_SUPPORT><EAI_AUTH_TYPE></EAI_AUTH_TYPE><EAI_RESPONSE_TYPE></EAI_RESPONSE_TYPE><EBANKING_USER_ID>"+"<PERS_ID></PERS_ID><SMID >"+i+"</SMID><AGRE_ID></AGRE_ID></EBANKING_USER_ID>"+"<EBANKING_USER_AUTHENTICITY_VALIDATION><VALIDATION_DATE></VALIDATION_DATE><VALID></VALID>"+"<AUTHENTICATION_MEAN_ID>"+this.submitModel.get("eaiParams").eaiParams.meanId+"</AUTHENTICATION_MEAN_ID></EBANKING_USER_AUTHENTICITY_VALIDATION>"+"<CHALLENGE_RESPONSE><VALUE>"+a+"</VALUE><CHALLENGE>password</CHALLENGE><AUTH_FACTOR_ID />"+"</CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+s+"</VALUE><CHALLENGE>newPassword</CHALLENGE>"+"<AUTH_FACTOR_ID /></CHALLENGE_RESPONSE><CHALLENGE_RESPONSE><VALUE>"+t.fetchParams.authenticationFlag+"</VALUE><CHALLENGE>AUTH_FLAG</CHALLENGE><AUTH_FACTOR_ID></AUTH_FACTOR_ID></CHALLENGE_RESPONSE><DEVICE_ID><FINGER_PRINT></FINGER_PRINT><NAME></NAME></DEVICE_ID>").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)});t.secretCodeSubmitModel.fetch({data:"AUTH="+o,type:"POST",contentType:"application/x-www-form-urlencoded",success:function(i){var a;if(e(i.attributes).has("htmlcontent")&&""!==i.attributes.htmlcontent){var s=n(i.attributes.htmlcontent).filter(function(t,e){return 1===e.nodeType&&"resultURI"===e.id});a=t.constant.DASHBOARD,""===t.fetchParams.authenticationFlag?t.submitModel.set("authType",t.constant.COMPLETEAUTHENTICATION):t.submitModel.set("authType",t.fetchParams.authenticationFlag),t.submitModel.set("redirectUrl",s.attr("value"))}else a=i.get("code");a===t.constant.DASHBOARD?t.emailNotify():a===t.constant.PUSHPAGECODE?t.submitModel.set("status",t.constant.PUSHPAGE):a===t.constant.SERROR23?(t.configFetch(),t.errors.set("codeSecretServerErr",!0),t.errors.set("codeSecretServerErrText",t.model.get("app.authentication.S18.secretCodeServerError")),t.notifyError(a,t.model.get("app.authentication.S18.secretCodeServerError"),"fullAuthentication")):a===t.constant.SERROR26?(t.configFetch(),t.errors.set("newPassword",!0),t.errors.set("newPasswordText",t.model.get("app.authentication.S18.ERRF05-030_1"))):a===t.constant.SERROR27&&(t.configFetch("reload"),t.errors.set("password",!0),t.errors.set("passwordText",t.model.get("app.authentication.S18.ERRF05-030_2"))),t.hideLoader()},error:function(){t.analyticsPublishAuthenticationError("fullAuthentication","module_interaction","Connexion : Aide"),t.publishModel.set("reload",!0),t.configFetch(),t.errors.set("serverError",!0),t.notifyError("",t.model.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError()}})},emailNotify:function(){var t=this,e={internationalDistributorNumber:t.fetchParams[t.constant.NUMEROVENDEUR],idTemplate:"S18_CODESECRET",email:t.submitModel.get("email"),dyn:{civilite:t.submitModel.get("civilitePersonneCd"),lastName:t.submitModel.get("nomPersonne"),firstName:t.submitModel.get("prenomPersonne"),brand:t.submitModel.get("company"),raisonSociale:t.submitModel.get("mRaisonSociale"),refLegalStatusCd:t.submitModel.get("mCodeLegalStatus"),capital:t.submitModel.get("mCapital"),address:t.submitModel.get("mAddress"),city:t.submitModel.get("mCity"),postCode:t.submitModel.get("mPostCode"),rcs:t.submitModel.get("mRcs"),oriasNumber:t.submitModel.get("mOriasNumber")}};t.authenticationSecretCodeModel.fetch({data:JSON.stringify(e),type:"POST",contentType:"application/json; charset=utf-8",success:function(){t.submitModel.set("status",t.constant.DASHBOARDPAGE)},error:function(){t.submitModel.set("status",t.constant.DASHBOARDPAGE)}})},closeOpenKeypad:function(t){var e=this;e.$el.find(".passwordEdit").each(function(){e.$el.find(".securedKeyboard").addClass("hide")}),e.$el.find(".securedKeyboard").last().removeClass("hide");var i=e.$el.find("#"+e.constant.CONFIRMPASSWORDTEXT).val();if(i.length<e.constant.SIX){if(a.isNullOrWhiteSpace(i))return e.$el.find("#"+e.constant.PASSWORDTEXT).focus(),!1;e.errors.set("confirmPassword",!0),e.errors.set("isError",!0),e.errors.set("confirmPasswordText",e.model.get("app.authentication.S18.ERRF05-003_4"))}t.shiftKey||13===t.which&&n(t.target).trigger("mousedown")},notifyError:function(t,e,n){i.wcm.notifyError({code:t,message:e,ModuleName:n})},loadProgress:function(){var t=this;t.myVar=setInterval(function(){a.updateProgress(t.$el,t.errorTemplate)},3e3)},loadServerError:function(){var t=this;t.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){a.updateError(t.$el,e,t.model.get("app.authentication.S18.error20"))}),t.hideLoader()},showLoader:function(){n(".pf_loader_div").removeClass("pf_hide"),n(".loader-cont1").removeClass("pf_hide")},hideLoader:function(){n(".loader-cont1").addClass("pf_hide"),n(".pf_loader_div").addClass("pf_hide")},events:function(){return e.extend({},e.result(o.prototype,"events")||{},{"click .authenticate_keyboard_container":"getPassword","click .resetBtn":"resetText","mousedown .secretCodeResetContinue":"postPasswordDetails","keyup #input-actualClientPassword,#input-newClientPassword,#input-confirmNewClientPassword":"validate","focus .secretCodeResetContinue":"closeOpenKeypad"})}})}),bnpp.define("json!fullAuthentication/config/setDetails.json",function(){return{eaiParams:{authProcID:"94567812",meanId:"SMP",name:"",eaiAuthType:"12/12/2014",eaiResponseType:"HTML",smID:"4566",agreeId:"20121106",authenticationMeanId:"Paris",valid:"600019",value:!1,fingerPrint:"Iagree",brand:"",companyLb:"",organizationalStructureNameLb:"",addressComplement:"",postalCode:"",postalCity:""}}}),bnpp.define("fullAuthentication/view/authenticationControllerView",["backbone","underscore","jquery","../../../app/authenticationCommons/validateAuthentication","../../../app/lib/authenticationRivetsConfig","sf","../model/authenticationConfigModel","../model/multiLanConfigModel","../model/authenticationSubmitModel","../model/authenticationErrorModel","../model/authenticationFetchVendModel","../model/authenticationFetchParamsModel","../view/authenticateView","../view/bankingConventionView","../view/emailModificationView","../view/secretCodeModificationView","json!../config/setDetails.json","json!../../../app/authenticationCommons/constantAuthentication.json"],function(t,e,n,i,a,s,o,r,l,c,d,u,E,h,p,m,S,A){return t.View.extend({model:null,initialize:function(t){var n=this;e.bindAll(this,"render","constructWorkFlow","displayNextView","displayProgressBar","displayImage"),this.hostUrl=t.hostUrl,this.require=t.require,this.constant=A.fullAuthentication,this.require(["text!"+n.hostUrl+n.constant.PROGRESSTEMPLATEPAGE],function(t){n.errorTemplate=t}),n.multiLanUrl=n.hostUrl+this.constant.MULTILAN,n.multiLanConfigModel=new r({url:n.multiLanUrl}),n.multiLanConfigModel.fetch({success:function(){n.fetchParams=t.authenticationParams,i.assignTopics(t.authenticationTopicParams,n.constant),n.fetchParams.authenticationFlag||(n.fetchParams.authenticationFlag=""),n.errorModel=new c({url:n.hostUrl+n.multiLanConfigModel.get("app.authentication.cetelem.URLs.mvkURL")}),n.vendorTarificationModel=new d({url:n.hostUrl+n.multiLanConfigModel.get("app.authentication.cetelem.URLs.vendorTarification")}),n.paramVendor=new u({url:n.fetchParams.paramVendor+n.fetchParams[n.constant.NUMEROVENDEUR].substring(0,3)+"/"+n.fetchParams[n.constant.NUMEROVENDEUR].substring(3)+".json"}),n.authenticationSubmitModel=new l,n.authenticationSubmitModel.set("eaiParams",S),n.mvkContextFetch()},error:function(){n.$el.append(n.constant.SERVERERROR)}})},paramVendorFetch:function(){var t=this;t.loadProgress(),t.paramVendor.fetch({success:function(e,n){t.authenticationSubmitModel.set("numServClient",n.numServClient.text),t.authenticationSubmitModel.set("horairesRelationClient",n.horairesRelationClient.text),t.authenticationSubmitModel.set("libelleExpediteur",n[t.constant.libelleExpediteur]),t.authenticationSubmitModel.set("mentionsLegales",n[t.constant.mentionsLegales]),t.tarificationFetch()},error:function(){clearInterval(t.myVar),t.loadServerError()}})},tarificationFetch:function(){var t=this,n={};t.fetchParams[this.constant.NUMEROVENDEUR];var i={vendor:{society:t.fetchParams[t.constant.NUMEROVENDEUR].substring(0,3),luhnKey:"",countryCode:"",numeroVendeur:t.fetchParams[this.constant.NUMEROVENDEUR],currencyCode:""},standardApp:{}};t.vendorTarificationModel.fetch({data:JSON.stringify(i),type:"POST",contentType:"application/json; charset=utf-8",success:function(i,a){t.authenticationSubmitModel.set("rcs",a.rcs),n=e.find(a.organizationelStructures,function(e){return e.role===t.constant.SIEGE}),t.authenticationSubmitModel.set("rcsSociete",a.rcs),t.authenticationSubmitModel.set("siegeData",n),t.authenticationSubmitModel.set("raisonSocial",a.raisonSociale),t.authenticationSubmitModel.set("company",i.get("brandCode")),t.authenticationSubmitModel.set("mRaisonSociale",i.get("company")||""),t.authenticationSubmitModel.set("mCodeLegalStatus",i.get("codeLegalStatus")||""),t.authenticationSubmitModel.set("mCapital",i.get("capital")||"");var s=i.get("adresseSiege")||"";t.authenticationSubmitModel.set("mAddress",s.address||""),t.authenticationSubmitModel.set("mCity",s.city||""),t.authenticationSubmitModel.set("mPostCode",s.postCode||""),t.authenticationSubmitModel.set("mRcs",i.get("rcs")||""),t.authenticationSubmitModel.set("mOriasNumber",i.get("oraisNumber")||""),t.invokeController()},error:function(){clearInterval(t.myVar),t.notifyError("",t.multiLanConfigModel.get("app.authentication.S18.error20"),"fullAuthentication"),t.loadServerError()}})},mvkContextFetch:function(){var t,e=this;e.errorModel.fetch({dataType:"text",success:function(n,i){t=JSON.parse(i),e.errorModel.set("eaiurl",t.eaiurl),e.authenticationSubmitModel.url=e.errorModel.get("eaiurl"),e.authenticationSubmitModel.set("eaiurl",t.eaiurl);var a=document.createElement("a");a.href=t.mvkurl;var s="",o="";""!==a.host?(s=a.protocol+"//"+a.host,o=a.pathname):(s=location.protocol+"//"+location.host,o="/"+a.pathname),e.errorModel.set("host",s),e.errorModel.set("pathname",o),e.paramVendorFetch()},error:function(){e.$el.append(e.constant.SERVERERROR)}})},invokeController:function(){var t=this,e=t.errorModel.get("host")+t.errorModel.get("pathname")+t.multiLanConfigModel.get("app.authentication.cetelem.URLs.virtualKeyPad");t.configModel=new o({url:e}),clearInterval(t.myVar),t.authenticationSubmitModel.on("change:status",t.render),t.authenticationSubmitModel.set("status",t.constant.AUTHENTICATIONVIEW),t.authenticationSubmitModel.on("change:constructNextView",t.constructWorkFlow),t.authenticationSubmitModel.on("change:loadNextView",t.displayNextView),t.authenticationSubmitModel.on("change:progressFlagStatus",t.displayProgressBar)},render:function(){var t,n,i,a,o,r={};n=this,i=this.authenticationSubmitModel.get("status");var l=n.fetchParams[n.constant.webViewKey];switch(i){case this.constant.AUTHENTICATIONVIEW:this.$el.empty(),this.createInstance(this.authenticationView,E);break;case this.constant.BANKINGCONVENTIONVIEW:this.$el.empty(),this.createInstance(this.bankingConventionView,h);break;case this.constant.EMAILMODIFICATIONVIEW:this.$el.empty(),this.createInstance(this.emailModificationView,p);break;case this.constant.SECRETCODEMODIFICATIONVIEW:this.$el.empty(),n.authenticationSubmitModel.set("host",n.errorModel.get("host")),n.authenticationSubmitModel.set("pathname",n.errorModel.get("pathname")),this.createInstance(this.secretModification,m);break;case this.constant.DASHBOARDPAGE:if(this.$el.empty(),a=n.authenticationSubmitModel.get("redirectUrl"),t=n.authenticationSubmitModel.get("authType"),!n.fetchParams[this.constant.LOGINREDIRECTURL]||e.isEmpty(a)||t!==n.constant.COMPLETEAUTHENTICATION&&t!==n.constant.FAQAUTHTYPE)if(a=n.authenticationSubmitModel.get("redirectUrl"),t=n.authenticationSubmitModel.get("authType"),e.isEmpty(t)||e.isEmpty(a)||t!==n.constant.COMPLETEAUTHENTICATION&&t!==n.constant.FAQAUTHTYPE)e.isEmpty(t)||t!==n.constant.SUBSCRIPTIONAUTHTYPE||s.messaging.publishTopic(n.constant[n.constant.SUBSCRIPTIONAUTHENTICATIONREDIRECT],{ModuleName:"fullAuthentication",Code:"REDIRECT",Label:"redirect subscription",Json:{}});else{switch(-1===a.indexOf("/fr/")&&(a="/fr"+a),l){case"mdp_add":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyADDR;break;case"mdp_cs":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyCIVIL;break;case"mdp_ph":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyTEL;break;case"mdp_em":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyEMAIL;break;case"mdp_pwd":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyPASSWORD;break;case"mdp_bi":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyBANK;break;case"mdp_opt":o=n.constant[n.constant.infoRedirect],r.savModifier=n.constant.ModifyOPT;break;case"mdp_doc":o=n.constant[n.constant.deccoRedirect];break;case"mdp_sms":o=n.constant[n.constant.inboxRedirect];break;case"mdp_op":o=n.constant[n.constant.onlineRedirect];break;case"espaf":o=n.constant[n.constant.authForteRedirect];break;default:o=n.constant[n.constant.dashboardRedirect]}r=r?r:{},s.messaging.publishTopic(o,{ModuleName:"fullAuthenticationWeb",Code:"REDIRECT",Label:"redirect",Json:r})}else window.location.href=n.fetchParams[this.constant.LOGINREDIRECTURL]}},constructWorkFlow:function(){var t,e=this;if(this.authenticationSubmitModel.get("decisionFlag")===this.constant.SUCCESS)switch(t=this.authenticationSubmitModel.get("responseCode")){case this.constant.ALLTHREEVIEWS:this.authenticationSubmitModel.get("nextView").push(this.constant.BANKINGCONVENTIONVIEW,this.constant.EMAILMODIFICATIONVIEW,this.constant.SECRETCODEMODIFICATIONVIEW),this.authenticationSubmitModel.set("status",this.constant.BANKINGCONVENTIONVIEW),this.authenticationSubmitModel.set("progressBar",!0),this.authenticationSubmitModel.get("text").push(e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_2")),this.authenticationSubmitModel.get("text").push(e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_3")),this.authenticationSubmitModel.get("text").push(e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_4"));break;case this.constant.ALLTHREEVIEWSWITHCRLIBERTY:this.authenticationSubmitModel.get("nextView").push(this.constant.BANKINGCONVENTIONVIEW,this.constant.EMAILMODIFICATIONVIEW,this.constant.SECRETCODEMODIFICATIONVIEW),this.authenticationSubmitModel.set("status",this.constant.BANKINGCONVENTIONVIEW),this.authenticationSubmitModel.set("progressBar",!0);break;case this.constant.BANKINGANDSECRETCODE:this.authenticationSubmitModel.get("nextView").push(this.constant.BANKINGCONVENTIONVIEW,this.constant.SECRETCODEMODIFICATIONVIEW),this.authenticationSubmitModel.set("status",this.constant.BANKINGCONVENTIONVIEW),this.authenticationSubmitModel.set("progressBar",!0),this.authenticationSubmitModel.set("currentText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_2")),this.authenticationSubmitModel.set("nextText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_4"));break;case this.constant.BANKINGANDEMAIL:this.authenticationSubmitModel.get("nextView").push(this.constant.BANKINGCONVENTIONVIEW,this.constant.EMAILMODIFICATIONVIEW),this.authenticationSubmitModel.set("status",this.constant.BANKINGCONVENTIONVIEW),this.authenticationSubmitModel.set("progressBar",!0),this.authenticationSubmitModel.set("currentText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_2")),this.authenticationSubmitModel.set("nextText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_3"));break;case this.constant.SECRETCODEANDEMAIL:this.authenticationSubmitModel.get("nextView").push(this.constant.EMAILMODIFICATIONVIEW,this.constant.SECRETCODEMODIFICATIONVIEW),this.authenticationSubmitModel.set("status",this.constant.EMAILMODIFICATIONVIEW),this.authenticationSubmitModel.set("progressBar",!0),this.authenticationSubmitModel.set("currentText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_3")),this.authenticationSubmitModel.set("nextText",e.multiLanConfigModel.get("app.authentication.S18.LIBF05-012_4")); break;case this.constant.ONLYSECRETCODE:this.authenticationSubmitModel.get("nextView").push(this.constant.SECRETCODEMODIFICATIONVIEW,this.constant.DASHBOARDPAGE),this.authenticationSubmitModel.set("status",this.constant.SECRETCODEMODIFICATIONVIEW),this.authenticationSubmitModel.set("progressBar",!1);break;case this.constant.BANKINGAGREEMENTONLY:this.authenticationSubmitModel.get("nextView").push(this.constant.BANKINGCONVENTIONVIEW,this.constant.DASHBOARDPAGE),this.authenticationSubmitModel.set("status",this.constant.BANKINGCONVENTIONVIEW),this.authenticationSubmitModel.set("progressBar",!1);break;case this.constant.EMAILONLY:this.authenticationSubmitModel.get("nextView").push(this.constant.EMAILMODIFICATIONVIEW,this.constant.DASHBOARDPAGE),this.authenticationSubmitModel.set("status",this.constant.EMAILMODIFICATIONVIEW),this.authenticationSubmitModel.set("progressBar",!1);break;case e.constant.SUBSCRIPTIONERROR:s.messaging.publishTopic(e.constant[e.constant.SUBSCRIPTIONERRORPUBLISH],{message:e.constant.SUBSCRIPTIONMESSAGE,code:e.constant.SUBSCRIPTIONERROR});break;case this.constant.DASHBOARD:this.authenticationSubmitModel.set("status",this.constant.DASHBOARDPAGE)}},displayNextView:function(){var t;for(t=0;t<this.authenticationSubmitModel.get("nextView").length;t++)if(this.authenticationSubmitModel.get("nextView")[t]===this.authenticationSubmitModel.get("status")){this.authenticationSubmitModel.get("previousView").push(this.authenticationSubmitModel.get("nextView")[t]);var e=t+1;this.authenticationSubmitModel.set("status",this.authenticationSubmitModel.get("nextView")[e]);break}},displayImage:function(){var t,e,i,a,s,o,r,l,c=this;for(t=0;t<this.authenticationSubmitModel.get("nextView").length;t++){if(a=this.authenticationSubmitModel.get("nextView")[t],s=this.authenticationSubmitModel.get("nextView")[t+1],r=this.authenticationSubmitModel.get("currentText"),l=this.authenticationSubmitModel.get("nextText"),2===this.authenticationSubmitModel.get("nextView").length&&0===t)c.$el.find(c.constant.GENERALHEADING).removeClass(c.constant.HIDECLASS),c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append(n("<li><span>"+r+"</span></li>").addClass(a+"img")),c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append("<li></li>"),c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append(n("<li><span>"+l+"</span></li>").addClass(s+"img"));else if(3===this.authenticationSubmitModel.get("nextView").length){c.$el.find(c.constant.GENERALHEADING).removeClass(c.constant.HIDECLASS),o=this.authenticationSubmitModel.get("nextView")[t+2];var d=this.authenticationSubmitModel.get("text")[t];2!==t?(c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append(n("<li><span>"+d+"</span></li>").addClass(a+"img")),c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append("<li></li>")):2===t&&c.$el.find(c.constant.BULLETPROGRESSCONTAINER).append(n("<li><span>"+d+"</span></li>").addClass(a+"img"))}c.$el.find("."+a+c.constant.IMAGE).addClass(c.constant.PFGREYROUNDCLASS)}for(c.$el.find("."+this.authenticationSubmitModel.get("status")+c.constant.IMAGE).addClass(c.constant.PFGREYROUNDCLASS),c.$el.find("."+this.authenticationSubmitModel.get("status")+c.constant.IMAGE).addClass(c.constant.PFGREENROUNDCLASS),c.$el.find("."+this.authenticationSubmitModel.get("previousView")+c.constant.IMAGE).removeClass(c.constant.PFGREENTICKCLASS),e=0;e<this.authenticationSubmitModel.get("previousView").length;e++)i=this.authenticationSubmitModel.get("previousView")[e],c.$el.find("."+i+c.constant.IMAGE).addClass(c.constant.PFGREYROUNDCLASS),c.$el.find("."+i+c.constant.IMAGE).addClass(c.constant.PFGREENTICKCLASS)},displayProgressBar:function(){var t=this;t.$el.find(t.constant.BANKINGCONVENTIONVIEW).removeClass(t.constant.HIDECLASS),t.$el.find(t.constant.EMAILMODIFICATIONVIEW).removeClass(t.constant.HIDECLASS),t.$el.find(t.constant.SECRETCODEMODIFICATIONVIEW).removeClass(t.constant.HIDECLASS);var n=this.authenticationSubmitModel.get("nextView").length;e.contains(this.authenticationSubmitModel.get("nextView"),"dashboardView")&&(n-=1),2===n?this.displayImage():3===n?this.displayImage():1===n&&(this.$el.find(t.constant.GENERALHEADING).addClass(t.constant.HIDECLASS),this.$el.find(this.constant.BULLETPROGRESSCONTAINER).addClass(t.constant.HIDECLASS),this.$el.find(t.constant.PROGRESSBARHEADER).removeClass(t.constant.PGROGRESSBARMARGIN),e.contains(this.authenticationSubmitModel.get("nextView"),this.constant.BANKINGCONVENTIONVIEW)?this.$el.find(this.constant.BANKINGAGREEMENTHEADING).removeClass(t.constant.HIDECLASS):e.contains(this.authenticationSubmitModel.get("nextView"),this.constant.EMAILMODIFICATIONVIEW)?(this.$el.find(this.constant.BANKINGAGREEMENTHEADING).addClass(t.constant.HIDECLASS),this.$el.find(this.constant.EMAILHEADING).removeClass(t.constant.HIDECLASS)):e.contains(this.authenticationSubmitModel.get("nextView"),this.constant.SECRETCODEMODIFICATIONVIEW)&&(this.$el.find(this.constant.BANKINGAGREEMENTHEADING).addClass(t.constant.HIDECLASS),this.$el.find(this.constant.EMAILHEADING).addClass(t.constant.HIDECLASS),this.$el.find().removeClass(t.constant.HIDECLASS)))},loadProgress:function(){var t=this;t.myVar=setInterval(function(){i.updateProgress(t.$el,t.errorTemplate)},3e4)},loadServerError:function(){var t=this;t.require(["text!"+t.hostUrl+t.constant.PROGRESSTEMPLATEPAGE],function(e){i.updateError(t.$el,e,t.multiLanConfigModel.get("app.authentication.S18.error20"))})},notifyError:function(t,e,n){s.wcm.notifyError({code:t,message:e,ModuleName:n})},createInstance:function(t,e){t instanceof e||(t=new e({errors:this.errorModel,hostUrl:this.hostUrl,constant:this.constant,require:this.require,fetchParams:this.fetchParams,configModel:this.configModel,multiLanConfigModel:this.multiLanConfigModel,submitModel:this.authenticationSubmitModel,paramVendor:this.paramVendor})),t.render().$el.appendTo(this.$el)}})}),bnpp.define("fullAuthentication/main",["require","jquery","./view/authenticationControllerView","sf"],function(t){var e=t("jquery"),n=t("./view/authenticationControllerView"),i=t("sf");return function(a,s,o){var r=i.getApplicationContext(a);new n({el:e(a),hostUrl:r,authenticationParams:s,authenticationTopicParams:o,require:t})}}),bnpp.define("fullAuthentication",["fullAuthentication/main"],function(t){return t});