!function(){"use strict";var s,e=function(e){var t,n=$(e.currentTarget).closest("form"),r=window.location.pathname;return console.debug("path -> ",r),console.debug("Call URL -> ",window.datas.sslHost),t=jQuery.Event("sslAttempt"),$(document).trigger(t),t.isDefaultPrevented()||$.ajax(window.datas.sslHost,{dataType:"json",xhrFields:{withCredentials:!0},success:function(e){if(console.debug("Success -> ",e),t=jQuery.Event("sslSuccess"),$(document).trigger(t,[e]),!t.isDefaultPrevented())return e.ajax_auth_token&&n.find('input[name="ajax_auth_token"]').attr("value",e.ajax_auth_token),s(n,r)},error:function(e){if(console.error("Error during AJAX SSL authentication",e),t=jQuery.Event("sslFailure"),$(document).trigger(t,[e]),!t.isDefaultPrevented()&&(0===e.status&&s(n,r),e.responseJSON&&"error"in e.responseJSON&&"9"===e.responseJSON.error&&s(n,r),e.responseJSON)&&"html"in e.responseJSON)return $("#errormsg").html(e.responseJSON.html),$(window).trigger("load")}}),!1};window.ssl_start=e,s=function(e,t){var n=e.attr("action");return n.match(/^#$/)?n=t:n+=t,console.debug("form action URL -> ",n),e.attr("action",n),e.submit()},$(document).ready(function(){if(!window._ssl_js_done)return window._ssl_js_done=!0,$(".sslclick").on("click",e)})}();