let currentErrorCount=0;$(document).ready(function(){function t(t,i){var u,r;if(t!=null){if(n==null){alert("logErrorUrl must be defined.");return}u=t.fileName!=null?t.fileName:document.location;i==null&&t.stack!=null&&(i=t.stack);r=t.message!=null?t.name+": "+t.message:t;r+=": at document path '"+u+"'.";i!=null&&(r+="\n  at "+i.join("\n  at "));currentErrorCount>50?QVFtoastr.Error("We experienced an excessive number of errors in a short amount of time. Please try your task again.",!0):($.ajax({type:"POST",headers:{MvicCsrfToken:$('input[name="__mvic_csrf_token"]').val()},url:n,data:{message:r}}),currentErrorCount++)}}var n="/Error/LogJSError/";Function.prototype.trace=function(){for(var t=[],n=this;n;)t.push(n.signature()),n=n.caller;return t};Function.prototype.signature=function(){var t={name:this.getName(),params:[],toString:function(){var n=this.params.length>0?"'"+this.params.join("', '")+"'":"";return this.name+"("+n+")"}},n;if(this.arguments)for(n=0;n<this.arguments.length;n++)t.params.push(this.arguments[n]);return t};Function.prototype.getName=function(){if(this.name)return this.name;var n=this.toString().split("\n")[0],t=/^function ([^\s(]+).+/;return t.test(n)?n.split("\n")[0].replace(t,"$1")||"anonymous":"anonymous"};window.onerror=function(n){arguments!=null&&arguments.callee!=null&&arguments.callee.trace&&t(n,arguments.callee.trace())}})