text: P.register("cvfVersion",function(){return{version:"0.1.0.0-2019-04-25"}});
  P.when("A","cvfFormDataGenerator","ready").register("cvf-account-switcher",function(f,k){function n(c,d){c.preventDefault();var e=k.retrieveFormData(c.target),h=e.inputData.serializeArray();h.push(b(c.target));f.ajax(window.location.protocol+"//"+window.location.host+e.requestPath,{method:"POST",params:h,success:d,error:a})}function b(a){a=c(a);var b=a.attr("name");b||(b=a.closest(".cvf-account-switcher-sign-out-link").attr("data-name"));var d=a.attr("value");d||(d=a.closest(".cvf-account-switcher-sign-out-link").attr("data-value"));
  return{name:b,value:d}}function a(a,b,c){f.trigger(h.error,c)}function e(a){var b=/([^@\s]+)@([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9._-]+)/ig.exec(a);if(null!==b){a=b[1];a=c.trim(a);var d=a.length;if(1!==d){for(var e=a.charAt(0),h=0;h<d-2;h++)e+="*";a=e+=a.charAt(d-1)}a+="@";e=b[2];e=c.trim(e);d=e.length;e=e.charAt(0);for(h=0;h<d-1;h++)e+="*";return a+e+b[3]}b=c.trim(a);a=b.length;if(!(4>=a)){d="";for(e=0;e<a-4;e++)d+="*";b=d+b.substr(a-4,a-1)}return b}function d(){0===c(".cvf-account-switcher-check-mark:visible").length&&
  (c(".cvf-account-switcher-check-mark-area").remove(),c(".cvf-account-switcher-profile-details").toggleClass("cvf-account-switcher-profile-details cvf-account-switcher-profile-details-after-account-removed"))}var c=f.$,h={success:"cvf:account_switcher:success",error:"cvf:account_switcher:error"};(function(){var a=c("#ap-account-switcher-container")[0],b=window.MutationObserver||window.WebKitMutationObserver;if(void 0!==a&&void 0!==b){var e=new b(function(a){for(var b=0;b<a.length;b++)if(null!==a[b].addedNodes){d();
  e.disconnect();break}});e.observe(a,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}})();(function(){c(".cvf-account-switcher-sign-out-link").live("click",function(a){n(a,function(b){if(b.redirectUrl)window.location=b.redirectUrl,f.trigger("cvf:account_switcher","redirectOnSignOut");else if(b.succeeded){var g="."+c(a.target).attr("class").match(/cvf-account-switcher-account-group-\w+/g)[0];c(g+"-hide").hide();c(g+"-name").text(c("#cvf-account-switcher-sign-out-replace-text").text());c(g+
  "-claim").text(e(c(g+"-claim").text()));c(g+"-image").replaceWith(c("<div />").append(c("#cvf-account-switcher-sign-out-replace-image").clone().removeClass("cvf-hidden")).html());c(g+"-button").removeClass("cvf-widget-btn-val cvf-widget-btn-verify-account-switcher");b=b.switchedAccountId;void 0!==b&&c(".cvf-account-switcher-account-group-"+b+"-check-mark").show();d()}else f.trigger(h.error,b)})})})()});
  P.when("A","cvfVersion","cvfFormDataGenerator","ready").register("cvf",function(f,k,n){function b(a){function b(a){"string"===typeof p.options.widgetMetricsScope&&"function"===typeof window.uet&&window.uex("ld",p.options.widgetMetricsScope,{wb:1});p.options.spinnerTarget&&p.options.spinnerTarget.hide();a.hasOwnProperty("error")?f.trigger(C.error,a.error):a.redirectUrl?window.location=a.redirectUrl:a.redirect?(f.trigger(C.success,a.token,a.status,a.redirect),p.options.autoDestroy?p.destroy():(e(".cvf-widget-alert").hide(),
  a.status?e(".cvf-widget-status-success").show():e(".cvf-widget-status-error").show(),t()),f.trigger("cvf:verification:complete",a.status),q.find(".cvf-widget-btn").unbind("click",m),q.find(".cvf-widget-btn-val").unbind("click",m),f.off(C.success),f.off(C.error)):(q.html(a.replace(/<form/g,"<div").replace(/<\/form/g,"</div")),r())}function m(a,c){a.preventDefault();e(".cvf-widget-alert").hide();p.options.spinnerTarget&&p.options.spinnerTarget.show();var d=n.retrieveFormData(a.target),g=d.inputData.serializeArray();
  c&&g.push(n.getNameValue(a.target));f.ajax(u+d.requestPath,{method:"POST",params:g,success:b,error:z})}function g(a){13===a.keyCode&&m(a)}function r(){q.find(".cvf-widget-btn").click(function(a){m(a,!1)});q.find(".cvf-widget-btn-val").click(function(a){m(a,!0)});q.find('input[name="code"]').focus().keypress(g)}function v(a){return function(b,c,d){"timeout"!==c||3<=D?f.trigger(C.error,d):f.delay(a,10*D++)}}function z(a,b,c){p.options.spinnerTarget&&p.options.spinnerTarget.hide();f.trigger(C.error,
  c)}function t(){e.each(q.find("input"),function(a,b){var c=e(b);c.attr("disabled","disabled");c.hasClass("a-input-text")?c.addClass("a-form-disabled"):c.hasClass("a-button-input")?c.closest(".a-button").addClass("a-button-disabled"):c.closest(".a-input-text-wrapper").length&&c.closest(".a-input-text-wrapper").addClass("a-form-disabled")});e.each(q.find("a"),function(a,b){var c=e(b);c.hasClass("cvf-widget-link-disable-target")&&c.addClass("cvf-link-disabled")})}var p=this;c++;var C={success:"cvf:"+
  c+":success",error:"cvf:"+c+":error"};p.options={};e.extend(p.options,d,a);(function(a){if(1!==e(a.target).length)throw Error("The CVF widget requires a unique element.");if(!e.isFunction(a.onSuccess))throw Error("The CVF widget requires a success callback function.");if(!e.isFunction(a.onError))throw Error("The CVF widget requires an error callback function.");})(p.options);var u=p.options.server,q=e(p.options.target);f.on(C.success,p.options.onSuccess);f.on(C.error,p.options.onError);p.start=function(){if(0===
  e.trim(p.options.requestToken).length)throw Error("The CVF widget requires a request token.");var a=u+"/ap/cvf/request.embed",c=p.options.requestToken,d=p.options.requestArbToken,g={};0===e.trim(d).length?g.requestToken=c:g.arb=d;g.CVFVersion=k.version;g.AUIVersion=P.AUI_BUILD_DATE;"string"===typeof p.options.widgetMetricsScope&&"function"===typeof window.uet&&window.uet("bb",p.options.widgetMetricsScope,{wb:1});f.ajax(a,{method:"GET",params:g,success:b,error:v(p.start)})};p.destroy=function(){q.html("")};
  r();var D=0;p.options.autoStart&&p.start()}function a(a){return new b(a)}var e=f.$,d={server:"",target:void 0,requestToken:void 0,requestArbToken:void 0,onSuccess:void 0,onError:void 0,spinnerTarget:void 0,autoStart:!0,autoDestroy:!0,widgetMetricsScope:void 0},c=0;f.on("cvf:verification:request",function(b){var c=e("#"+b),d=c.data("token"),g=c.data("spinnerId"),g=e("#"+g);a({target:c,spinnerTarget:g,requestToken:d,onSuccess:function(a,c,d){f.trigger("cvf:verification:complete:"+b,a,c,d)},onError:function(a){f.trigger("cvf:verification:error:"+
  b,a)},autoStart:!0,autoDestroy:!1})});return{create:a}});P.when("A","cvf","ready").execute(function(f,k){var n=f.$;n(document).ready(function(){function b(a,b,c){window.location=c;console.log("Client Side: "+a)}function a(a){console.log(a)}var e=n(".cvf-widget-spinner"),d=n("#cvf-widget-content");if(1===d.length){var c=n('[name="requestToken"]').first().attr("value");k.create({target:d,spinnerTarget:e,requestToken:c,onSuccess:b,onError:a,autoStart:!1})}})});
  P.when("A").execute(function(f){f.declarative("auth-popup","click",function(f){var n=f.data;f=f.$target.closest("a")[0];(n=window.open(f.href,f.target,n.windowOptions))&&n.focus()})});P.when("A","cvfFormDataGenerator","ready").execute(function(f,k){});
  P.when("A","cvfFormDataGenerator","ready").execute(function(f,k){var n=f.$;n(".cvf-widget-btn-val").click(function(b){var a=n(b.target).closest(".cvf-widget-form");b=k.getNameValue(n(b.target));a.append('<input type="hidden" name="'+b.name+'" value="'+b.value+'">').submit()})});
  P.when("A","ready").register("cvfFormDataGenerator",function(f){var k=f.$;return{retrieveFormData:function(f){f=k(f).closest(".cvf-widget-form");return{requestPath:f.data("use-only-form-action")?f.attr("action"):"/ap/cvf/"+f.attr("action")+".embed",inputData:f.find(".cvf-widget-input,.cvf-widget-hidden-fields,.cvf-widget-input :input"),form:f}},getNameValue:function(f){f=k(f);var b=f.attr("name");b||(b=f.closest(".cvf-widget-btn-val").attr("data-name"));var a=f.attr("value");a||(a=f.closest(".cvf-widget-btn-val").attr("data-value"));
  return{name:b,value:a}}}});P.when("A","ready").register("codeResendTimer",function(f){function k(k,b,a){var e=(new Date).getTime(),d=setInterval(function(){var c=(new Date).getTime()-e,c=k-c;if(0>=c)clearInterval(d),f.$("#timer").html(a);else{var c=Math.floor(c/1E3),h=b.split(" +timeleft+ "),c=h[0].split('"').join("")+c+h[1].split('"').join("");f.$("#timer").html(c)}},100)}return{createTimer:function(f,b,a){return new k(f,b,a)}}});