!function(e,t){"use strict";function n(e,t,n){return e.addEventListener?(e.addEventListener(t,n),{remove:function(){e.removeEventListener(t,n)}}):(e.attachEvent(t,n),{remove:function(){e.detachEvent(t,n)}})}function o(e,t){var n=document.createElement("iframe");return n.src=t,n.id="hiddenIframe",n.style.display="none",e.appendChild(n),n}function i(t,i,a){function r(e){clearTimeout(s),d.remove(),a()}var s=setTimeout(function(){i(),d.remove()},L),c=document.querySelector("#hiddenIframe");c||(c=o(document.body,"about:blank"));var d=n(e,"blur",r);c.contentWindow.location.href=t}function a(t,o,i){function a(){clearTimeout(r),s.remove(),i()}var r=setTimeout(function(){o(),s.remove()},L),s=n(e,"blur",a);e.location=t}function r(e,t,n){var i=document.querySelector("#hiddenIframe");i||(i=o(document.body,"about:blank"));try{i.contentWindow.location.href=e,n()}catch(a){"NS_ERROR_UNKNOWN_PROTOCOL"==a.name&&t()}}function s(e,t,n){var o=navigator.userAgent.toLowerCase(),a=/windows nt 6.2/.test(o)||/windows nt 6.3/.test(o),r=/Edge\/12./i.test(o),s=p();a?l(e,t,n):r?c(e,t,n):10===s?d(e,t,n):9===s||11===s?i(e,t,n):u(e,t,n)}function c(e,t,i){function a(e){clearTimeout(r),c.remove(),i()}var r=setTimeout(function(){t(),c.remove()},L),s=document.querySelector("#hiddenIframe");s||(s=o(document.body,"about:blank"));var c=n(s,"blur",a);s.src=e}function d(t,n,i){var a=setTimeout(n,L);e.addEventListener("blur",function(){clearTimeout(a),i()});var r=document.querySelector("#hiddenIframe");r||(r=o(document.body,"about:blank"));try{r.contentWindow.location.href=t}catch(s){n(),clearTimeout(a)}}function u(t,n,o){var i=e.open("","","width=0,height=0");i.document.write(""),setTimeout(function(){try{i.location.href=t,i.setTimeout("window.close()",1e3),o()}catch(e){i.close(),n()}},L)}function l(t,n,o){navigator.msLaunchUri&&navigator.msLaunchUri(t,function(){e.location=t,o()},n)}function f(){var t=navigator.userAgent.toLowerCase(),n=!!e.opera||navigator.userAgent.indexOf(" OPR/")>=0,o=/Edge\/12./i.test(t),i={isOpera:n,isFirefox:"undefined"!=typeof InstallTrigger,isSafari:Object.prototype.toString.call(e.HTMLElement).indexOf("Constructor")>0,isChrome:!!e.chrome&&!n&&!o,isIE:!!document.documentMode,isEdge:o};for(var a in i)i[a]===!0;return i}function p(){var e,t,n=-1;return"Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,t=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),null!==t.exec(e)&&(n=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,t=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),null!==t.exec(e)&&(n=parseFloat(RegExp.$1))),n}function m(e,t,n){function o(){return t&&t()}function i(){return n&&n()}var c=f();c.isFirefox||c.isOpera?r(e,o,i):c.isChrome?a(e,o,i):(c.isIE||c.isEdge)&&s(e,o,i)}function v(){t("head").find("#installedFontStyle").remove(),t("head").find("#testFontStyle").remove(),t("body").find("#installedFontDisplay").remove(),t("body").find("#testFontDisplay").remove()}function h(e){E=e}function y(){return"undefined"!=typeof E?E:R}function g(){T=setInterval(function(){var e=y();if(e==U&&k===!1||w!==e)switch(w=e){case S:F();break;case D:b(!1,!0);break;case O:I.updateFn(),F(!0);break;case A:I.runningFn(),clearInterval(T);break;case U:b();break;case _:I.agentCheckTimeoutFn(),clearInterval(T)}},1e3)}function b(e,n){k=!0,"undefined"==typeof e&&(e=!1);var o=I.agentURL+"/version?path="+I.versionCheckURL,i={crossDomain:!0,async:!0,cache:!1,timeout:1e3,dataType:"json",contentType:"text/plain",success:function(t,n,o){k=!1;var i=t.info.update;e?h(U):i?N===!1&&(N=!0,h(O)):h(A)},error:function(e,t,o){var i=-1;void 0!==I.agentCheckTimeoutInterval&&(i=I.agentCheckTimeoutInterval),i>x||-1==i?(x++,k=!1,y()==R?h(S):(n&&I.installFn(),h(U))):h(_)}};t.ajax(o,i)}function F(e){var t=I.updateURL;m(t,function(){h(U)},function(){b(!0)})}var E,T,w,I,x=0,k=!1,N=!1,C=!1,L=5e3,R="READY",S="NOT_RUNNING",D="INSTALL",O="UPDATE",A="RUNNING",U="CHECKING",_="TIMEOUT",W=0,M=0,j=0,q=0,G=0;e.Agentcheck=function(){},Agentcheck.prototype.options=function(e){t.each(e,function(e,t){}),I=e,t("#testFont").length||(t("head").append(''),t("body").append(t('
')),t("#testFontDisplay").append(''+I.test_content+""),W=t("#testFontDisplay").find("span").width(),M=t("#testFontDisplay").find("span").height())},Agentcheck.prototype.start=function(){G++;var e='';t("head").find("#installedFontStyle").remove().end().append(e),t("body").append(t('')),t("#installedFontDisplay").append(''+I.test_content+""),j=t("#installedFontDisplay").find("span").width(),q=t("#installedFontDisplay").find("span").height(),t("#testFontWidth").text("(width : "+W+", height : "+M+")"),t("#installedFontWidth").text("(width : "+j+", height : "+q+")"),C=W!=j||M!==q,"undefined"!=typeof I.timeoutCount&&(L=I.timeoutCount),g(),C?b():h(D),v()}}(window,jQuery);