Files
monkeygg2.github.io/games/vex-3/raygun/raygun.min.js
T
2023-08-25 13:31:04 +05:30

6 lines
68 KiB
JavaScript

/*! Raygun4js - v2.25.6 - 2022-07-19
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2022 MindscapeHQ; Licensed MIT */
function getHighFidelityUAString(e){if(!window.raygunUserAgentData)return e;var t;"Windows"===window.raygunUserAgentData.platform&&(t=(window.raygunUserAgentData.platformVersion||"").split("."),13<=(parseInt(t[0],10)||0)&&(e=e.replace("Windows NT 10.0","Windows NT 11.0")));var n=window.raygunUserAgentData.fullVersionList;if(!n)return e;for(var r=/Chrome\/(\d+)\.(\d+)\.(\d+)\.(\d+)/i,i=/Edg\/(\d+)\.(\d+)\.(\d+)\.(\d+)/i,a=0;a<n.length;a++){var o=n[a].version,s=n[a].brand;"Chromium"===s&&(e=e.replace(r,"Chrome/"+o)),"Microsoft Edge"===s&&(e=e.replace(i,"Edg/"+o))}return e}function raygunCoreWebVitalFactory(n){function e(){this.cleanWebVitalData=function(e){var t=e;return t.value&&t.value.toFixed&&(t.value=t.value.toFixed(3)),t}}var r=null,i=null;return e.prototype.attach=function(e,t){r=e,i=t,void 0!==n&&n.webVitals&&(n.webVitals.getLCP&&n.webVitals.getLCP(this.handler),n.webVitals.getFID&&n.webVitals.getFID(this.handler),n.webVitals.getCLS&&n.webVitals.getCLS(this.handler))},e.prototype.handler=function(e){e.value&&e.value.toFixed&&(e.value=e.value.toFixed(3));var t={url:e.name,timing:{t:"w",du:e.value},parentResource:i};r(t)},new e}window.raygunUserAgent=navigator.userAgent,window.raygunUserAgentData=window.navigator.userAgentData||null,window.raygunUserAgentDataStatus=1,setTimeout(function(){1===window.raygunUserAgentDataStatus&&(window.raygunUserAgentDataStatus=3)},200),window&&window.navigator&&window.navigator.userAgentData&&window.navigator.userAgentData.getHighEntropyValues&&window.navigator.userAgentData.getHighEntropyValues(["platformVersion","fullVersionList"]).then(function(e){window.raygunUserAgentData=e,window.raygunUserAgent=getHighFidelityUAString(window.raygunUserAgent),window.raygunUserAgentDataStatus=2},function(e){window.console.error("Error calling getHighEntropyValues: ",e)}),function(w){var p,s,t,i,u,c,r,a,f={},e=w.TraceKit,o=[].slice,h="?";function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return void 0===e}function d(e,t){var n=null;if(!t||f.collectWindowErrors){for(var r in i)if(U(i,r))try{i[r].apply(null,[e].concat(o.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function n(e,t,n,r,i){var a,o=null;return i?o=f.computeStackTrace(i):c?(f.computeStackTrace.augmentStackTraceWithInitialElement(c,t,n,e),o=c,u=c=null):((a={url:t,line:n,column:r}).func=f.computeStackTrace.guessFunctionName(a.url,a.line),a.context=f.computeStackTrace.gatherContext(a.url,a.line),o={mode:"onerror",message:e,url:document.location.href,stack:[a],useragent:w.raygunUserAgent}),d(o,"from window.onerror"),!!s&&s.apply(this,arguments)}function g(e){var t;if("undefined"!=typeof document&&(t=o.call(arguments,1)),c){if(u===e)return;var n=c;d.apply(u=c=null,[n,null].concat(t))}var r=f.computeStackTrace(e);if(c=r,u=e,w.setTimeout(function(){u===e&&d.apply(u=c=null,[r,null].concat(t))},r.incomplete?2e3:0),!p.Utilities.isReactNative())throw e}function S(e){var t,n;return U(a,e)||(t="",e=e||"",n="undefined"!=typeof document?document.domain:w.location.hostname,e.indexOf&&-1!==e.indexOf(n)&&(t="string"!=typeof e?[]:""),a[e]=t?t.split("\n"):[]),a[e]}function E(e,t){var n,r=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",o=S(e);if(!o.length)return h;for(var s=0;s<10;++s)if(!l(a=o[t-s]+a)){if(n=i.exec(a))return n[1];if(n=r.exec(a))return n[1]}return h}function R(e,t){var n=S(e);if(!n.length)return null;var r=[],i=Math.floor(f.linesOfContext/2),a=i+f.linesOfContext%2,o=Math.max(0,t-i-1),s=Math.min(n.length,t+a-1);--t;for(var u=o;u<s;++u)l(n[u])||r.push(n[u]);return 0<r.length?r:null}function m(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function k(e){return m(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function x(e,t){for(var n,r,i=0,a=t.length;i<a;++i)if((n=S(t[i])).length&&(n=n.join("\n"),r=e.exec(n)))return{url:t[i],line:n.substring(0,r.index).split("\n").length,column:r.index-n.lastIndexOf("\n",r.index)-1};return null}function v(e,t,n){var r,i=S(t),a=new RegExp("\\b"+m(e)+"\\b");return--n,i&&i.length>n&&(r=a.exec(i[n]))?r.index:null}function y(e){for(var t,n,r,i,a,o=[w.location.href],s=document.getElementsByTagName("script"),u=""+e,c=0;c<s.length;++c){var l=s[c];l.src&&o.push(l.src)}if(n=x((t=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(u))?(r=t[1]?"\\s+"+t[1]:"",i=t[2].split(",").join("\\s*,\\s*"),a=m(t[3]).replace(/;$/,";?"),new RegExp("function"+r+"\\s*\\(\\s*"+i+"\\s*\\)\\s*{\\s*"+a+"\\s*}")):new RegExp(m(u).replace(/\s+/g,"\\s+")),o))return n;if(t=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(u)){var d=t[1];if(a=k(t[2]),n=x(new RegExp("on"+d+"=[\\'\"]\\s*"+a+"\\s*[\\'\"]","i"),o[0]))return n;if(n=x(new RegExp(a),o))return n}return null}function b(e,t,n,r){var i={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=E(i.url,i.line)),i.context||(i.context=R(i.url,i.line));var a=/ '([^']+)' /.exec(r);if(a&&(i.column=v(a[1],i.url,i.line)),0<e.stack.length&&e.stack[0].url===i.url){if(e.stack[0].line===i.line)return!1;if(!e.stack[0].line&&e.stack[0].func===i.func)return e.stack[0].line=i.line,e.stack[0].context=i.context,!1}return e.stack.unshift(i),e.partial=!0}return!(e.incomplete=!0)}function A(e,t){for(var n,r,i,a,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],u={},c=!1,l=A.caller;l&&!c;l=l.caller)if(l!==T&&l!==f.report){if(r={url:null,func:h,line:null,column:null},l.name?r.func=l.name:(n=o.exec(l.toString()))&&(r.func=n[1]),void 0===r.func)try{r.func=n.input.substring(0,n.input.indexOf("{"))}catch(e){}(i=y(l))&&(r.url=i.url,r.line=i.line,r.func===h&&(r.func=E(r.url,r.line)),(a=/ '([^']+)' /.exec(e.message||e.description))&&(r.column=v(a[1],i.url,i.line))),u[""+l]?c=!0:u[""+l]=!0,s.push(r)}t&&s.splice(0,t);var d={mode:"callers",name:e.name,message:e.message,url:document.location.href,stack:s,useragent:w.raygunUserAgent};return b(d,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),d}function T(e,t){var n=null;t=null==t?0:+t;try{if(n=function(e){for(var t,n=e.stacktrace,r=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,i=n?n.split("\n"):[],a=[],o=0,s=i.length;o<s;o+=2)if(t=r.exec(i[o])){var u={line:+t[1],column:+t[2],func:t[3]||t[4],args:t[5]?t[5].split(","):[],url:t[6]};if(!u.func&&u.line&&(u.func=E(u.url,u.line)),u.line)try{u.context=R(u.url,u.line)}catch(e){}u.context||(u.context=[i[o+1]]),a.push(u)}return a.length?{mode:"stacktrace",name:e.name,message:e.message,url:document.location.href,stack:a,useragent:w.raygunUserAgent,stackstring:n}:null}(e))return n}catch(e){if(r)throw e}try{if(n=function(e){if(!e.stack)return null;var t,n=/^\s*at (.*?) ?\(((?:file|https?|\s*|blob|chrome-extension|native|webpack|ionic|capacitor|app|eval|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,r=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|ionic|capacitor|app|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,i=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=e.stack.split("\n"),o=[],s=/^(.*) is undefined$/.exec(e.message);if(p.Utilities.isReactNative())for(var u,c,l,d=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,f=0;f<a.length;f++){null!==(l=d.exec(a[f]))&&(u=l[1]?l[1]:"anonymous@",c=l[3],a[f]=u+"file://reactnative.local/"+c)}for(var f=0,g=a.length;f<g;++f){if(l=r.exec(a[f]))t={url:l[3],func:l[1]||h,args:l[2]?l[2].split(","):"",line:+l[4],column:l[5]?+l[5]:null};else if(l=n.exec(a[f]))t={url:l[2],func:l[1]||h,line:+l[3],column:l[4]?+l[4]:null};else{if(!(l=i.exec(a[f])))continue;t={url:l[2],func:l[1]||h,line:+l[3],column:l[4]?+l[4]:null}}!t.func&&t.line&&(t.func=E(t.url,t.line)),"undefined"!=typeof document&&t.line&&(t.context=R(t.url,t.line)),o.push(t)}return o[0]&&o[0].line&&!o[0].column&&s?o[0].column=v(s[1],o[0].url,o[0].line):o[0].column||void 0===e.columnNumber||(o[0].column=e.columnNumber+1),o.length?{mode:"stack",name:e?e.name:"",message:e?e.message:"",url:"undefined"!=typeof document?document.location.href:"",stack:o,useragent:navigator?w.raygunUserAgent:"",stackstring:e&&e.stack?e.stack.toString():""}:null}(e))return n}catch(e){if(r)throw e}try{if(n=function(e){var t=e.message.split("\n");if(t.length<4)return null;var n,r,i,a=/^\s*Line (\d+) of linked script ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,s=/^\s*Line (\d+) of function script\s*$/i,u=[],c=document.getElementsByTagName("script"),l=[];for(r in c)U(c,r)&&!c[r].src&&l.push(c[r]);for(r=2,i=t.length;r<i;r+=2){var d,f,g,p,h,m,v,y,b=null;(n=a.exec(t[r]))?b={url:n[2],func:n[3],line:+n[1]}:(n=o.exec(t[r]))?(b={url:n[3],func:n[4]},d=+n[1],(f=l[n[2]-1])&&(!(p=S(b.url))||0<=(g=(p=p.join("\n")).indexOf(f.innerText))&&(b.line=d+p.substring(0,g).split("\n").length))):(n=s.exec(t[r]))&&(h=w.location.href.replace(/#.*$/,""),m=n[1],b={url:h,line:(p=x(new RegExp(k(t[r+1])),[h]))?p.line:m,func:""}),b&&(b.func||(b.func=E(b.url,b.line)),y=(v=R(b.url,b.line))?v[Math.floor(v.length/2)]:null,v&&y.replace(/^\s*/,"")===t[r+1].replace(/^\s*/,"")?b.context=v:b.context=[t[r+1]],u.push(b))}return u.length?{mode:"multiline",name:e.name,message:t[0],url:document.location.href,stack:u,useragent:w.raygunUserAgent}:null}(e))return n}catch(e){if(r)throw e}try{if(n=A(e,t+1))return n}catch(e){if(r)throw e}return{tracekitResult:"failedToComputeAnyStackTrace"}}f.setRaygun=function(e){p=p||e},f.noConflict=function(){return w.TraceKit=e,f},f.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw f.report(e),e}}},f.report=(i=[],c=u=null,g.subscribe=function(e){!0!==t&&(s=w.onerror,w.onerror=n,t=!0),i.push(e)},g.unsubscribe=function(e){for(var t=i.length-1;0<=t;--t)i[t]===e&&i.splice(t,1)},g),f.computeStackTrace=(r=!1,a={},T.augmentStackTraceWithInitialElement=b,T.guessFunctionName=E,T.gatherContext=R,T.ofCaller=function(t){t=1+(null==t?0:+t);try{throw new Error}catch(e){return T(e,t+1)}},T),f.extendToAsynchronousCallbacks=function(){function e(e){var n=w[e];w[e]=function(){var e=o.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=f.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}}e("setTimeout"),e("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),w.TraceKit=f}(window),function(o,s){"use strict";var u,t,i;o&&o.event&&o.event.add&&(u=o.event.add,o.event.add=function(e,t,n,r,i){return"function"!=typeof n&&"function"!=typeof n.handler||(n.handler?(a=n.handler,n.handler=s.wrap(n.handler)):(a=n,n=s.wrap(n)),a.guid?n.guid=a.guid:n.guid=a.guid=o.guid++),u.call(this,e,t,n,r,i);var a},t=o.fn.ready,o.fn.ready=function(e){return t.call(this,s.wrap(e))},i=o.ajax,o.ajax=function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};for(var n,r=["complete","error","success"];n=r.pop();)o.isFunction(t[n])&&(t[n]=s.wrap(t[n]));try{return e?i.call(this,e,t):i.call(this,t)}catch(e){throw s.report(e),e}})}(window.jQuery,window.TraceKit),Date.prototype.toISOString||function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),i=r.length>>>0;if(0==i)return-1;var a=0|t;if(i<=a)return-1;for(n=Math.max(0<=a?a:i-Math.abs(a),0);n<i;){if(n in r&&r[n]===e)return n;n++}return-1}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,r;if(null==this)throw new TypeError("this is null or not defined");var i,a,o=Object(this),s=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(s),r=0;r<s;){r in o&&(i=o[r],a=e.call(t,i,r,o),n[r]=a),r++}return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){var t,n;if(null==this)throw new TypeError("this is null or not defined");var r,i=Object(this),a=i.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=0;n<a;){n in i&&(r=i[n],e.call(t,r,n,i)),n++}}),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");function t(){}function n(){return i.apply(this instanceof t&&e?this:e,r.concat(Array.prototype.slice.call(arguments)))}var r=Array.prototype.slice.call(arguments,1),i=this;return t.prototype=this.prototype,n.prototype=new t,n}),function(){var n,r,i,a,s,e,t,u,o,c,l,d;"undefined"!=typeof document&&(s={passive:!0,capture:!0},e=new Date,t=function(){a=[],r=-1,n=null,l(addEventListener)},u=function(e,t){n||(n=t,r=e,i=new Date,l(removeEventListener),o())},o=function(){var t;0<=r&&r<i-e&&(t={entryType:"first-input",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+r},a.forEach(function(e){e(t)}),a=[])},c=function(e){var t,n,r,i;function a(){u(n,r),i()}function o(){i()}e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){removeEventListener("pointerup",a,s),removeEventListener("pointercancel",o,s)},addEventListener("pointerup",a,s),addEventListener("pointercancel",o,s)):u(t,e))},l=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,c,s)})},d="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(d=t.timeStamp,removeEventListener("visibilitychange",e,!0))},!0),t(),self.webVitals={firstInputPolyfill:function(e){a.push(e),o()},resetFirstInputPolyfill:t,get firstHiddenTime(){return d}})}(),window.raygunUtilityFactory=function(p,n){var r,e={getUuid:function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()},createCookie:function(e,t,n,r){var i,a,o;this.isReactNative()||(a=n?((i=new Date).setTime(i.getTime()+60*n*60*1e3),"; expires="+i.toGMTString()):"",o=r?"; secure":"",document.cookie=e+"="+t+a+"; path=/"+o)},readCookie:function(e){if(this.isReactNative())return"none";for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},clearCookie:function(e){this.isReactNative()||this.createCookie(e,"",-1)},log:function(e,t){n.Options._debugMode&&p.console&&p.console.log&&(p.console.log(e),t&&p.console.log(t))},isApiKeyConfigured:function(){return!(!n.Options._raygunApiKey||""===n.Options._raygunApiKey)||(n.Utilities.log("Raygun API key has not been configured."),!1)},isReactNative:function(){return"undefined"==typeof document&&"undefined"!=typeof __DEV__},defaultReactNativeGlobalHandler:function(e,t){"function"==typeof r&&r(e,t)},localStorageAvailable:function(){try{return"localStorage"in p&&null!==p.localStorage}catch(e){return!1}},sessionStorageAvailable:function(){try{return"sessionStorage"in p&&null!==p.sessionStorage}catch(e){return!1}},truncateURL:function(e){var t,n,r,i,a=e,o=e.split("//")[1];return o&&(t=o.indexOf("?"),r=(n=o.toString().substring(0,t)).split("/").slice(0,4).join("/"),i=n.substring(0,48),(a=r.length<i.length?r:i)!==n&&(a+="..")),a},merge:function(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r},mergeMutate:function(e,t){var n;for(n in t)e[n]=t[n];return e},mergeArray:function(e,t){return null!=t?e.concat(t):e.slice(0)},forEach:function(e,t){for(var n=0;n<e.length;n++)t.call(null,n,e[n])},isEmpty:function(e){if(this.isNil(e))return!0;if("string"==typeof e||e instanceof Array)return 0===e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},isNil:function(e){return null==e},contains:function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},getRandomInt:function(){return Math.floor(9007199254740992*Math.random())},parseUrl:function(e,t){function g(e){return!isNaN(parseFloat(e))&&isFinite(e)}return function(e,t){if("undefined"==typeof document)return"";var n=t||p.location.toString();if(!e)return n;e=e.toString(),"//"===n.substring(0,2)?n="http:"+n:1===n.split("://").length&&(n="http://"+n);var r={auth:""},i=1===(i=(t=n.split("/"))[2].split("@")).length?i[0].split(":"):(r.auth=i[0],i[1].split(":"));r.protocol=t[0],r.hostname=i[0],r.port=i[1]||("https"===r.protocol.split(":")[0].toLowerCase()?"443":"80"),r.pathname=(3<t.length?"/":"")+t.slice(3,t.length).join("/").split("?")[0].split("#")[0];var a=r.pathname;"/"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));var o=r.hostname,s=o.split("."),u=a.split("/");if("hostname"===e)return o;if("domain"===e)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(o)?o:s.slice(-2).join(".");if("sub"===e)return s.slice(0,s.length-2).join(".");if("port"===e)return r.port;if("protocol"===e)return r.protocol.split(":")[0];if("auth"===e)return r.auth;if("user"===e)return r.auth.split(":")[0];if("pass"===e)return r.auth.split(":")[1]||"";if("path"===e)return r.pathname;if("."===e.charAt(0)){if(g(e=e.substring(1)))return s[(e=parseInt(e,10))<0?s.length+e:e-1]||""}else{if(g(e))return u[(e=parseInt(e,10))<0?u.length+e:e]||"";if("file"===e)return u.slice(-1)[0];if("filename"===e)return u.slice(-1)[0].split(".")[0];if("fileext"===e)return u.slice(-1)[0].split(".")[1]||"";if("?"===e.charAt(0)||"#"===e.charAt(0)){var c=n,l=null;if("?"===e.charAt(0)?c=(c.split("?")[1]||"").split("#")[0]:"#"===e.charAt(0)&&(c=c.split("#")[1]||""),!e.charAt(1))return c;e=e.substring(1);for(var d=0,f=(c=c.split("&")).length;d<f;d++)if((l=c[d].split("="))[0]===e)return l[1]||"";return null}}return""}(e,t)},enhance:function(e,t,n){var r=e[t];return e[t]=function(){n.apply(this,arguments),"function"==typeof r&&r.apply(this,arguments)},function(){e[t]=r}},addEventHandler:function(e,t,n,r){var i=r||!1;return e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n,function(){e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=function(){}}},nodeText:function(e){var t=e.textContent||e.innerText||"";return-1!==["submit","button"].indexOf(e.type)&&(t=e.value||t),t=t.replace(/^\s+|\s+$/g,"")},nodeSelector:function(e){var t=[e.tagName];return e.id&&t.push("#"+e.id),e.className&&e.className.length&&t.push("."+e.className.split(" ").join(".")),t.join("")},truncate:function(e,t){return e.length>t?e.slice(0,t-"(...)".length)+"(...)":e},getOrigin:function(){return p.location.origin?p.location.origin:p.location.protocol+"//"+p.location.hostname+(p.location.port?":"+p.location.port:"")},resolveFullUrl:function(e){if(e&&0===e.indexOf("//")&&(e=p.location.protocol+e),e&&p.location.pathname&&-1===e.indexOf("://")){var t=this.getOrigin();if(0===e.indexOf("/"))return t+e;var n=p.location.pathname.split("/");return n.pop(),t+n.join("/")+"/"+e}return e},removeFromArray:function(e,t){for(var n=[],r=0;r<e.length;r++)e[r]!==t&&n.push(e[r]);return n},isIE:function(){return-1<p.navigator.userAgent.indexOf("Trident")||-1<p.navigator.userAgent.indexOf("MSIE")},any:function(e,t){if(this.isEmpty(e))return!1;for(var n=0;n<e.length;n++){if(!0===t(e[n]))return!0}return!1}};return e.isReactNative()&&!0!==__DEV__&&p.ErrorUtils&&p.ErrorUtils.getGlobalHandler&&(r=p.ErrorUtils.getGlobalHandler()),e},window.raygunErrorUtilitiesFactory=function(e,t){function n(e){return!s.isNil(e.line)&&0<e.line||(!s.isNil(e.column)&&0<e.column||!(s.isNil(e.url)||-1!==i.indexOf(e.url)&&"?"===e.func))}var r="Script error",o=e&&e.location?e.location:{host:null,toString:function(){return null}},i=o.toString(),s=t.Utilities;return{isScriptError:function(e,t){var n=r;return e.message?n=e.message:t&&t.status&&(n=t.status),s.isNil(n)&&(n=r),!(s.isReactNative()||"function"!=typeof n.substring||n.substring(0,r.length)!==r||s.isNil(e.stack[0].url)||-1!==e.stack[0].url.indexOf(o.host)||0!==e.stack[0].line&&"?"!==e.stack[0].func)},isBrowserExtensionError:function(e){var t=e.stack;return!s.isEmpty(t)&&s.any(t,function(e){var t,n=e.url;return!s.isNil(n)&&(0===(t=n).indexOf("chrome-extension://")||0===t.indexOf("moz-extension://")||0===t.indexOf("safari-extension://")||0===t.indexOf("safari-web-extension://"))})},isValidStackTrace:function(e){var t=e.stack;return!s.isNil(e.message)&&!s.isEmpty(t)&&s.any(t,n)},stackTraceHasValidDomain:function(e,t){for(var n=!1,r=0;!n&&e.stack&&r<e.stack.length;r++){var i=e.stack[r];if(!s.isNil(i)&&!s.isNil(i.url)){for(var a in t)t.hasOwnProperty(a)&&-1<i.url.indexOf(t[a])&&(n=!0);-1<i.url.indexOf(o.host)&&(n=!0)}}return n}}},window.raygunNetworkTrackingFactory=function(l,d){function n(){this.requestHandlers=[],this.responseHandlers=[],this.errorHandlers=[],this.wrapWithHandler=function(e){return function(){try{return e.apply(this,arguments)}catch(e){d.Utilities.log(e)}}},this.executeHandlers=this.wrapWithHandler(function(e,t){for(var n=0;n<e.length;n++)e[n](JSON.parse(JSON.stringify(t)))}),this.wrapPrototypeWithHandlers(),this.attach()}return n.prototype.on=function(e,t){switch(e){case"request":this.requestHandlers.push(t);break;case"response":this.responseHandlers.push(t);break;case"error":this.errorHandlers.push(t)}},n.prototype.off=function(e,t){switch(e){case"request":this.requestHandlers=d.Utilities.removeFromArray(this.requestHandlers,t);break;case"response":this.responseHandlers=d.Utilities.removeFromArray(this.responseHandlers,t);break;case"error":this.errorHandlers=d.Utilities.removeFromArray(this.errorHandlers,t)}},n.prototype.attach=function(){var u=this;l.XMLHttpRequest.prototype.addEventListener&&d.Utilities.enhance(l.XMLHttpRequest.prototype,"open",u.wrapWithHandler(function(){var t=(new Date).getTime(),n=d.Utilities.resolveFullUrl(arguments[1])||"Unknown",r=n.split("?")[0],i=arguments[0];d.Utilities.enhance(this,"send",u.wrapWithHandler(function(){var e={method:i,requestURL:n,baseUrl:r};arguments[0]&&"string"==typeof arguments[0]&&(e.body=arguments[0]),u.executeHandlers(u.requestHandlers,e)})),this.addEventListener("load",u.wrapWithHandler(function(){var e="N/A for non text responses";""!==this.responseType&&"text"!==this.responseType||(e=this.responseText),d.Utilities.log("Tracking XHR response for",n),u.executeHandlers(u.responseHandlers,{status:this.status,requestURL:n,responseURL:this.responseURL,baseUrl:r,body:e,duration:(new Date).getTime()-t})})),this.addEventListener("error",u.wrapWithHandler(function(){u.executeHandlers(u.errorHandlers,{requestURL:n,responseURL:this.responseURL,duration:(new Date).getTime()-t})}))}));var e,c=l.__raygunOriginalFetch||l.fetch;"function"!=typeof c||void 0!==c.polyfill||d.Utilities.isIE()||(e=function(){var i,a,e=arguments[0],t=arguments[1],n=t&&t.method||"GET",o=(new Date).getTime();"string"==typeof e?i=e:void 0!==l.Request&&e instanceof l.Request?(i=e.url,e.method&&(n=e.method)):i=String(e),i=d.Utilities.resolveFullUrl(i),a=i.split("?")[0];var r=c.apply(null,arguments);try{var s={method:n,requestURL:i,baseUrl:a};t&&t.body&&(s.body=t.body),u.executeHandlers(u.requestHandlers,s),r.then(u.wrapWithHandler(function(e){var t="N/A when the fetch response does not support clone()",n="function"==typeof e.clone?e.clone():void 0;function r(){d.Utilities.log("tracking fetch response for",i),u.executeHandlers(u.responseHandlers,{status:e.status,requestURL:i,responseURL:e.url,body:t,baseUrl:a,duration:(new Date).getTime()-o})}if(n)try{n.text().then(function(e){t=d.Utilities.truncate(e,500),r()}).catch(function(){r()})}catch(e){r()}else r()})).catch(u.wrapWithHandler(function(e){u.executeHandlers(u.errorHandlers,{metadata:{requestUrl:i,error:e.toString(),duration:(new Date).getTime()-o}})}))}catch(e){d.Utilities.log(e)}return r},l.__raygunOriginalFetch?l.__raygunFetchCallback=e:l.fetch=e)},n.prototype.wrapPrototypeWithHandlers=function(){var e,t;for(e in n.prototype)"function"==typeof(t=n.prototype[e])&&(n.prototype[e]=this.wrapWithHandler(t))},new n},window.raygunViewportFactory=function(n,r,e){"use strict";function i(e){return!a.isNil(e)&&!isNaN(e)&&0<e}var a=e.Utilities,o={width:null,height:null};return{getViewportDimensions:function(){if(a.isNil(r)||a.isNil(n))return o;var e=Math.max(r.documentElement.clientWidth||0,n.innerWidth||0),t=Math.max(r.documentElement.clientHeight||0,n.innerHeight||0);return i(e)||i(t)?{width:e,height:t}:o}}},window.raygunBreadcrumbsFactory=function(o,s){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"==typeof r&&e&&-1<e.indexOf(r))return!0;if("object"==typeof r&&r.exec(e))return!0}return!1}function n(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(e){return function(){try{return e.apply(this,arguments)}catch(e){s.Utilities.log(e)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()}return n.prototype.recordBreadcrumb=function(e,t){var n={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof e){case"object":n=s.Utilities.merge(n,e);break;case"string":n=s.Utilities.merge(s.Utilities.merge(n,{message:e,metadata:t}));break;default:return void s.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof e)}-1===this.BREADCRUMB_LEVELS.indexOf(n.level)&&(s.Utilities.log("unknown breadcrumb level "+n.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),n.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(n)&&(n.message=s.Utilities.truncate(n.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(n),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},n.prototype.shouldRecord=function(e){var t=this.BREADCRUMB_LEVELS.indexOf(e.level);return this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel)<=t},n.prototype.setBreadcrumbLevel=function(e){-1!==this.BREADCRUMB_LEVELS.indexOf(e)?this.breadcrumbLevel=e:s.Utilities.log("Breadcrumb level of '"+e+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'")},n.prototype.setOption=function(e,t){var n;"breadcrumbsLevel"===e?this.setBreadcrumbLevel(t):"xhrIgnoredHosts"===e?(this.xhrIgnoredHosts=t.concat(this.DEFAULT_XHR_IGNORED_HOSTS),(n=this).removeBreadcrumbsWithPredicate(function(e){return"request"===e.type&&i(e.metadata.requestURL||e.metadata.responseURL,n.xhrIgnoredHosts)})):"logXhrContents"===e&&(this.logXhrContents=t)},n.prototype.any=function(){return 0<this.breadcrumbs.length},n.prototype.all=function(){for(var e=[],t=0;t<this.breadcrumbs.length;t++){var n=this.breadcrumbs[t];n&&"request"===n.type&&!this.logXhrContents&&n.metadata&&n.metadata.body&&(n.metadata.body="Disabled because logContentsOfXhrCalls has not been enabled"),e.push(n)}return e},n.prototype.enableAutoBreadcrumbs=function(){this.enableAutoBreadcrumbsXHR(),this.enableAutoBreadcrumbsClicks(),this.enableAutoBreadcrumbsConsole(),this.enableAutoBreadcrumbsNavigation()},n.prototype.disableAutoBreadcrumbs=function(){this.disableAutoBreadcrumbsXHR(),this.disableAutoBreadcrumbsClicks(),this.disableAutoBreadcrumbsConsole(),this.disableAutoBreadcrumbsNavigation()},n.prototype.removeBreadcrumbsWithPredicate=function(e){for(var t=this.breadcrumbs,n=[],r=0;r<t.length;r++){var i=t[r];e(i)||n.push(i)}this.breadcrumbs=n},n.prototype.removeCrumbsOfType=function(t){this.removeBreadcrumbsWithPredicate(function(e){return e.type===t})},n.prototype.enableAutoBreadcrumbsConsole=function(){var t,n;void 0!==o.console&&(t=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=t[r];null!=i&&n.push(i.toString())}this.recordBreadcrumb({type:"console",level:e,message:Array.prototype.slice.call(n).join(", ")})}.bind(this),(n=this).disableConsoleFunctions=["log","warn","error"].map(function(e){return s.Utilities.enhance(console,e,n.wrapWithHandler(function(){t("log"===e?"info":"warn"===e?"warning":"error",arguments)}))}))},n.prototype.disableAutoBreadcrumbsConsole=function(){this.disableConsoleFunctions.forEach(function(e){e()}),this.removeCrumbsOfType("console")},n.prototype.enableAutoBreadcrumbsNavigation=function(){var i,a,t,e;o.addEventListener&&o.history&&o.history.pushState&&(i=function(e,t,n,r){var i=location.pathname+location.search+location.hash,a=null;return o.history.state&&(a=history.state),{message:"History "+e,type:"navigation",level:"info",metadata:{from:i,to:r||i,prevState:JSON.stringify(a)||"unsupported",nextState:JSON.stringify(t)}}}.bind(this),a=function(e){return e.split("#")[1]||""},this.disableNavigationFunctions=this.disableNavigationFunctions.concat(["pushState","replaceState"].map(function(r){return s.Utilities.enhance(history,r,this.wrapWithHandler(function(e,t,n){this.recordBreadcrumb(i(r,e,t,n))}.bind(this)))}.bind(this))),t=function(e){return this.wrapWithHandler(function(){this.recordBreadcrumb(e.apply(null,arguments))}.bind(this))}.bind(this),e=[{element:o,event:"hashchange",handler:function(e){var t=e.oldURL,n=e.newURL,r=t&&n?{from:a(t),to:a(n)}:{to:location.hash};return{type:"navigation",message:"Hash change",metadata:r}}},{element:o,event:"load",handler:function(){return{type:"navigation",message:"Page loaded"}}},{element:o,event:"popstate",handler:function(){return{type:"navigation",message:"Navigated back"}}},{element:o,event:"pagehide",handler:function(){return{type:"navigation",message:"Page hidden"}}},{element:o,event:"pageshow",handler:function(){return{type:"navigation",message:"Page shown"}}},{element:document,event:"DOMContentLoaded",handler:function(){return{type:"navigation",message:"DOMContentLoaded"}}}],this.disableNavigationFunctions=this.disableNavigationFunctions.concat(e.map(function(e){return s.Utilities.addEventHandler(e.element,e.event,t(e.handler))}.bind(this))))},n.prototype.disableAutoBreadcrumbsNavigation=function(){this.disableNavigationFunctions.forEach(function(e){e()}),this.disableNavigationFunctions=[],this.removeCrumbsOfType("navigation")},n.prototype.enableAutoBreadcrumbsClicks=function(){this.disableClicksTracking=s.Utilities.addEventHandler(o,"click",this.wrapWithHandler(function(e){var t,n;try{t=s.Utilities.truncate(s.Utilities.nodeText(e.target),150),n=s.Utilities.nodeSelector(e.target)}catch(e){n=t="[unknown]",s.Utilities.log("Error retrieving node text/selector. Most likely due to a cross domain error")}this.recordBreadcrumb({type:"click-event",message:"UI Click",level:"info",metadata:{text:t,selector:n}})}.bind(this),!0))},n.prototype.disableAutoBreadcrumbsClicks=function(){this.disableClicksTracking(),this.removeCrumbsOfType("click-event")},n.prototype.enableAutoBreadcrumbsXHR=function(){var t=this,e=t.wrapWithHandler(function(e){i(e.requestURL,t.xhrIgnoredHosts)||(e.body&&(e.body=s.Utilities.truncate(e.body,500)),t.recordBreadcrumb({type:"request",message:"Opening request to "+e.requestURL,level:"info",metadata:e}))}),n=t.wrapWithHandler(function(e){i(e.requestURL,t.xhrIgnoredHosts)||i(e.responseURL,t.xhrIgnoredHosts)||(e.body&&(e.body=s.Utilities.truncate(e.body,500)),e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Finished request to "+e.requestURL,level:"info",metadata:e}))}),r=t.wrapWithHandler(function(e){i(e.requestURL,t.xhrIgnoredHosts)||(e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Failed request to "+e.requestUrl,level:"info",metadata:e}))});s.NetworkTracking.on("request",e),s.NetworkTracking.on("response",n),s.NetworkTracking.on("error",r),this.disableXHRLogging=function(){s.NetworkTracking.off("request",e),s.NetworkTracking.off("response",n),s.NetworkTracking.off("error",r)}},n.prototype.disableAutoBreadcrumbsXHR=function(){this.disableXHRLogging(),this.removeCrumbsOfType("request")},n.prototype.wrapPrototypeWithHandlers=function(){var e,t;for(e in n.prototype)"function"==typeof(t=n.prototype[e])&&(n.prototype[e]=this.wrapWithHandler(t))},n},window.raygunCoreWebVitalFactory=raygunCoreWebVitalFactory;var raygunFactory=function(b,r,w){var U={};U.Utilities=raygunUtilityFactory(b,U),U.ErrorUtilities=raygunErrorUtilitiesFactory(b,U),U.NetworkTracking=raygunNetworkTrackingFactory(b,U),U.Breadcrumbs=raygunBreadcrumbsFactory(b,U),U.CoreWebVitals=raygunCoreWebVitalFactory(b),U.Viewport=raygunViewportFactory(b,document,U);var S,E,i,R,t,k,u,a,o,s,c,e,x={LOADING:0,READY:1},l="raygun4js-userid",d=TraceKit,n=b.Raygun,f=!1,g=!1,p=!1,h=!1,m=!1,A=!1,v=!1,y=!1,T=!0,C=!1,L=!1,D=!0,N=!0,O={},B=[],H=[],M="https://api.raygun.io",I=null,F=null,q="customData",P=null,V=new U.Breadcrumbs,_=null,j=!0,W=x.LOADING,X=[],J=[],K=null,$=!0,G=!1,z=!1,Q={Rand:Math.random(),Options:{},noConflict:function(){return n&&(b.Raygun=n),U},constructNewRaygun:function(){return raygunFactory(b,b.jQuery)},init:function(e,t,n){return d.remoteFetching=!1,this.Options._raygunApiKey=e,n&&(O=n),r&&(s=r(document)),t&&(g=t.allowInsecureSubmissions||!1,p=t.ignoreAjaxAbort||!1,h=t.ignoreAjaxError||!1,v=t.disableAnonymousUserTracking||!1,y=t.disableErrorTracking||!1,T=t.disablePulse===w||t.disablePulse,I=t.excludedHostnames||!1,F=t.excludedUserAgents||!1,_=t.pulseMaxVirtualPageDuration||null,j=t.pulseIgnoreUrlCasing||!1,K=t.pulseCustomLoadTimeEnabled||!1,G=t.setCookieAsSecure||!1,z=t.captureMissingRequests||!1,L=t.automaticPerformanceCustomTimings||!1,D=t.trackCoreWebVitals===w||t.trackCoreWebVitals,N=t.trackViewportDimensions===w||t.trackViewportDimensions,t.apiUrl&&(M=t.apiUrl),void 0!==t.wrapAsynchronousCallbacks&&(C=t.wrapAsynchronousCallbacks),void 0!==t.captureUnhandledRejections&&($=t.captureUnhandledRejections),t.debugMode&&(f=t.debugMode),this.Options._debugMode=f,t.ignore3rdPartyErrors&&(A=!0),t.apiEndpoint&&(M=t.apiEndpoint),t.from&&(o=t.from),t.clientIp&&(c=t.clientIp)),S||v?te():function(e){var t;if(U.Utilities.localStorageAvailable()&&null!==(t=localStorage.getItem(l)))return e(t);null!==(t=U.Utilities.readCookie(l))&&U.Utilities.localStorageAvailable()&&(U.Utilities.clearCookie(l),localStorage.setItem(l,t));e(t)}(Z),U},withCustomData:function(e){return O=e,U},withTags:function(e){return B=e,P!==w&&null!==P&&P.withTags(e),U},attach:function(){return!U.Utilities.isApiKeyConfigured()||y||(b.RaygunObject&&b[b.RaygunObject]&&b[b.RaygunObject].q&&(b.onerror=null),$&&(e=U.Utilities.addEventHandler(b,"unhandledrejection",ee)),U.Utilities.isReactNative()&&!0!==__DEV__&&b.ErrorUtils&&b.ErrorUtils.setGlobalHandler&&b.ErrorUtils.setGlobalHandler(function(e,t){var n=a;a=function(){"function"==typeof n&&n(),U.Utilities.defaultReactNativeGlobalHandler(e,t),a=n},TraceKit.report(e)}),d.report.subscribe(se),C&&d.extendToAsynchronousCallbacks(),s&&s.ajaxError&&!h&&s.ajaxError(oe)),U},detach:function(){return d.report.unsubscribe(se),s&&s.unbind("ajaxError",oe),$&&e&&e(),U},send:function(t,e,n){if(y)return U.Utilities.log("Error not sent due to disabled error tracking"),U;try{se(d.computeStackTrace(t),{customData:"function"==typeof O?U.Utilities.merge(O(),e):U.Utilities.merge(O,e),tags:"function"==typeof B?U.Utilities.mergeArray(B(),n):U.Utilities.mergeArray(B,n)},!0,t)}catch(e){if(t!==e)throw e}return U},setUser:function(e,t,n,r,i,a){return S={Identifier:e},"boolean"==typeof t&&(S.IsAnonymous=t),n&&(S.Email=n),r&&(S.FullName=r),i&&(S.FirstName=i),a&&(S.UUID=a),P!==w&&null!==P&&P.setUser(S),U},resetAnonymousUser:function(){U.Utilities.localStorageAvailable()?localStorage.removeItem(l):U.Utilities.clearCookie(l)},setVersion:function(e){return E=e,U},saveIfOffline:function(e){return void 0!==e&&"boolean"==typeof e&&(m=e),U},filterSensitiveData:function(e){return i=e,U},setFilterScope:function(e){return"customData"!==e&&"all"!==e||(q=e),U},whitelistCrossOriginDomains:function(e){return H=e,U},onBeforeSend:function(e){return R=e,U},onBeforeSendRum:function(e){return t=e,U},groupingKey:function(e){return k=e,U},onBeforeXHR:function(e){return u=e,U},onAfterSend:function(e){return a=e,U},endSession:function(){U.RealUserMonitoring!==w&&P&&P.endSession()},trackEvent:function(e,t){var n;W===x.READY?U.RealUserMonitoring!==w&&P&&(n=P.parentResource,"pageView"===e&&t.path?P.virtualPageLoaded(t.path):"customTiming"===e?P.trackCustomTiming(t.name,t.duration,t.offset,n):"customTimings"===e&&t.timings&&P.sendCustomTimings(t.timings,n)):J.push({type:e,options:t})},setClientIp:function(e){c=e},captureMissingRequests:function(e){U.RealUserMonitoring!==w&&P&&P.captureMissingRequests(e)},recordBreadcrumb:function(){V.recordBreadcrumb.apply(V,arguments)},enableAutoBreadcrumbs:function(e){e?V["enableAutoBreadcrumbs"+e]():V.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(e){e?V["disableAutoBreadcrumbs"+e]():V.disableAutoBreadcrumbs()},setBreadcrumbOption:function(e,t){V.setOption(e,t)},setBreadcrumbs:function(e){V=e},getBreadcrumbs:function(){return V.all()}};function Y(e){"function"==typeof a&&a(e)}function Z(e){var t,n="Unknown";e?n=e:(n=U.Utilities.getUuid(),t=n,U.Utilities.localStorageAvailable()?localStorage.setItem(l,t):U.Utilities.createCookie(l,t,744,G)),U.setUser(n,!0,null,null,null,n),te()}function ee(e){var t=e.reason;!t&&e.detail&&e.detail.reason&&(t=e.detail.reason),t instanceof Error||!e.reason||!e.reason.error||(t=e.reason.error),t||((t=new Error("Unhandled promise rejection")).stack=null),Q.send(t,null,["UnhandledPromiseRejection"])}function te(){var e;W!==x.READY&&(W=x.READY,U.RealUserMonitoring===w||T||(e=function(){(P=new U.RealUserMonitoring(U.Options._raygunApiKey,M,ce,S,E,B,I,F,f,_,j,K,t,G,z,L,D,N)).attach()},U.Utilities.isReactNative()?U.Utilities.log("Not enabling RUM because Raygun4JS has detected a React Native environment, see #310 on Github"):"onLoad"===o?e():b.addEventListener?b.addEventListener("load",e):b.attachEvent("onload",e)),function(){var e;for(e=0;e<X.length;e++)se(X[e].stackTrace,X[e].options,X[e].userTriggered,X[e].error);for(X=[],e=0;e<J.length;e++)Q.trackEvent(J[e].type,J[e].options);J=[]}(),re())}function ne(e,t){var n=(new Date).toJSON();try{var r="raygunjs+"+U.Options._raygunApiKey+"="+n+"="+U.Utilities.getRandomInt();void 0===localStorage[r]&&(localStorage[r]=JSON.stringify({url:e,data:t}))}catch(e){U.Utilities.log("Raygun4JS: LocalStorage full, cannot save exception")}}function re(){if(U.Utilities.localStorageAvailable())for(var e in localStorage)if(-1<e.indexOf("raygunjs+"+U.Options._raygunApiKey)){try{var t=JSON.parse(localStorage[e]);ce(t.url,t.data)}catch(e){U.Utilities.log("Raygun4JS: Invalid JSON object in LocalStorage")}try{localStorage.removeItem(e)}catch(e){U.Utilities.log("Raygun4JS: Unable to remove error")}}}function ie(e,t){if(i)for(var n=0;n<i.length;n++)if("object"==typeof i[n]&&"function"==typeof i[n].exec){var r=i[n].exec(e);if(null!==r&&r!==w)return"[removed by filter]"}else if(i[n]===e)return"[removed by filter]";return t}function ae(e,t){if(null==e)return e;if("[object Object]"!==Object.prototype.toString.call(e))return e;var n={};for(var r in e){var i=e[r];"[object Object]"===Object.prototype.toString.call(i)?n[r]="Details"!==t||"Client"!==r?ae(ie(r,i),r):i:"[object Function]"!==Object.prototype.toString.call(i)&&(void 0!==t?n[r]=ie(r,i):"OccurredOn"===r&&(n[r]=i))}return n}function oe(e,t,n,r){var i="AJAX Error: "+(t.statusText||"unknown")+" "+(n.type||"unknown")+" "+(U.Utilities.truncateURL(n.url)||"unknown");(!p||0!==t.status&&t.getAllResponseHeaders())&&U.send(r||e.type,{status:t.status,statusText:t.statusText,type:n.type,url:n.url,ajaxErrorMessage:i,contentType:n.contentType,requestData:n.data&&n.data.slice?n.data.slice(0,10240):w,responseData:t.responseText&&t.responseText.slice?t.responseText.slice(0,10240):w,activeTarget:e.target&&e.target.activeElement&&e.target.activeElement.outerHTML&&e.target.activeElement.outerHTML.slice?e.target.activeElement.outerHTML.slice(0,10240):w})}function se(e,t,n,r){if(W===x.READY){var i="Script error",a=[],o={};if(!A||!function(e,t){if(U.Utilities.isEmpty(e.stack))return U.Utilities.log("Raygun4JS: Cancelling send due to null stacktrace"),1;if(U.ErrorUtilities.isScriptError(e,t))return U.Utilities.log("Raygun4JS: cancelling send due to third-party script error with no stacktrace and message",{stackTrace:e,options:t}),1;if(U.ErrorUtilities.isBrowserExtensionError(e))return U.Utilities.log("Raygun4JS: cancelling send due to the error coming from a browser extension",e),1;return U.ErrorUtilities.isValidStackTrace(e)?!U.ErrorUtilities.stackTraceHasValidDomain(e,H)&&(U.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain"),!0):(U.Utilities.log("Raygun4JS: cancelling send due to invalid stacktrace data",e),!0)}(e,t)){if(I instanceof Array)for(var s in I)if(I.hasOwnProperty(s)&&b.location.hostname&&b.location.hostname.match(I[s]))return void U.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(F instanceof Array&&!U.Utilities.isReactNative())for(var u in F)if(F.hasOwnProperty(u)&&b.raygunUserAgent.match(F[u]))return void U.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(U.Utilities.isReactNative()||!b.raygunUserAgent.match("RaygunPulseInsightsCrawler")){e.stack&&e.stack.length&&U.Utilities.forEach(e.stack,function(e,t){a.push({LineNumber:t.line,ColumnNumber:t.column,ClassName:"line "+t.line+", column "+t.column,FileName:t.url,MethodName:t.func||"[anonymous]"})});var c=U.Utilities.parseUrl("?");0<c.length&&U.Utilities.forEach(c.split("&"),function(e,t){var n,r,i=t.split("=");i&&2===i.length&&(r=ie(n=decodeURIComponent(i[0]),i[1]),o[n]=r)}),t===w&&(t={}),U.Utilities.isEmpty(t.customData)&&(t.customData="function"==typeof O?O():O),U.Utilities.isEmpty(t.tags)&&(t.tags="function"==typeof B?B():"string"==typeof B?[B]:B),n||(t.tags||(t.tags=[]),U.Utilities.contains(t.tags,"UnhandledException")||t.tags.push("UnhandledException")),U.Utilities.isReactNative()&&!U.Utilities.contains(t.tags,"React Native")&&t.tags.push("React Native");var l=U.Viewport.getViewportDimensions(),d=b.screen||{width:l.width,height:l.height,colorDepth:8},f=t.customData&&t.customData.ajaxErrorMessage,g="customData"===q?ae(t.customData,"UserCustomData"):t.customData;try{JSON.stringify(g)}catch(e){var p="Cannot add custom data; may contain circular reference";g={error:p},U.Utilities.log("Raygun4JS: "+p)}var h,m=i;f?m=f:e.message?m=e.message:t&&t.status?m=t.status:"string"==typeof r&&(m=r),void 0===m&&(m=i),m&&"string"==typeof m&&(m=m.substring(0,512)),h=U.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var v,y={OccurredOn:new Date,Details:{Error:{ClassName:e.name,Message:m,StackTrace:a,StackString:e.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":U.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":l.width,"Browser-Height":l.height,"Screen-Width":d.width,"Screen-Height":d.height,"Color-Depth":d.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.25.6"},UserCustomData:g,Tags:t.tags,Request:{Url:h,QueryString:o,Headers:{"User-Agent":b.raygunUserAgent,Referer:U.Utilities.isReactNative()?"Not available":document.referrer,Host:U.Utilities.isReactNative()?"Not available":document.domain}},Version:E||"Not supplied"}};y.Details.User=S,V.any()&&(y.Details.Breadcrumbs=[],(V.all()||[]).forEach(function(e){e.metadata&&(e.CustomData=e.metadata,delete e.metadata),y.Details.Breadcrumbs.push(e)})),"all"===q&&(y=ae(y)),"function"==typeof k&&(U.Utilities.log("Raygun4JS: calling custom grouping key"),y.Details.GroupingKey=k(y,e,t)),"function"==typeof R?(v=R(y))&&ue(v):ue(y)}}}else X.push({stackTrace:e,options:t,userTriggered:n,error:r})}function ue(e){U.Utilities.isApiKeyConfigured()&&(U.Utilities.log("Sending exception data to Raygun:",e),ce(M+"/entries?apikey="+encodeURIComponent(U.Options._raygunApiKey),JSON.stringify(e)))}function ce(e,t,n,r){var i,a,o,s=(i="POST",a=e,"withCredentials"in(o=new b.XMLHttpRequest)||U.Utilities.isReactNative()?o.open(i,a,!0):b.XDomainRequest&&(g&&(a=a.slice(6)),(o=new b.XDomainRequest).open(i,a)),o.timeout=1e4,o);"function"==typeof s.setRequestHeader&&(s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),void 0!==c&&s.setRequestHeader("X-Remote-Address",c)),"function"==typeof u&&u(s),U.Utilities.log("Is offline enabled? "+m),"withCredentials"in s||U.Utilities.isReactNative()?(s.onreadystatechange=function(){4===s.readyState&&(202===s.status?re():m&&403!==s.status&&400!==s.status&&429!==s.status&&ne(e,t))},s.onload=function(){U.Utilities.log("posted to Raygun"),Y(this),n&&"function"==typeof n&&n(s,e,t)}):b.XDomainRequest&&(s.ontimeout=function(){m&&(U.Utilities.log("Raygun: saved locally"),ne(e,t))},s.onload=function(){U.Utilities.log("posted to Raygun"),re(),Y(this),n&&"function"==typeof n&&n(s,e,t)}),s.onerror=function(){U.Utilities.log("failed to post to Raygun"),Y(this),r&&"function"==typeof r&&r(s,e,t)},s?(U.Utilities.isReactNative()&&s.setRequestHeader("Content-type","application/json;charset=UTF-8"),s.send(t)):U.Utilities.log("CORS not supported")}return U=U.Utilities.mergeMutate(U,Q),b.__raygunNoConflict||(b.Raygun=U),TraceKit.setRaygun(U),U};window.__instantiatedRaygun=raygunFactory(window,window.jQuery),function(){var c,l,d,f,g,n,e,u,p,h,m,v;"undefined"!=typeof document&&(c=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12)}},l=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver(function(e){return e.getEntries().map(t)});return n.observe({type:e,buffered:!0}),n}}catch(e){}},d=function(t,n){function r(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||(t(e),n&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))}addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},f=function(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)},g=function(t,n,r){var i;return function(e){0<=n.value&&(e||r)&&(n.delta=n.value-(i||0),!n.delta&&void 0!==i||(i=n.value,t(n)))}},e=function(){d(function(e){var t=e.timeStamp;n=t},!0)},u=function(){return n<0&&((n=self.webVitals.firstHiddenTime)===1/0&&e(),f(function(){setTimeout(function(){n="hidden"===document.visibilityState?0:1/0,e()},0)})),{get firstHiddenTime(){return n}}},h=!(p=function(t,n){function e(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=e.startTime,a.entries.push(e),r(!0)))}var r,i=u(),a=c("FCP"),o=performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=o?null:l("paint",e);(o||s)&&(r=g(t,a,n),o&&e(o),f(function(e){a=c("FCP"),r=g(t,a,n),requestAnimationFrame(function(){requestAnimationFrame(function(){a.value=performance.now()-e.timeStamp,r(!0)})})}))}),m=n=-1,v=new Set,window.webVitals.getCLS=function(t,e){h||(p(function(e){m=e.value}),h=!0);function n(e){-1<m&&t(e)}function r(e){var t,n;e.hadRecentInput||(t=s[0],n=s[s.length-1],o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>a.value&&(a.value=o,a.entries=s,i()))}var i,a=c("CLS",0),o=0,s=[],u=l("layout-shift",r);u&&(i=g(n,a,e),d(function(){u.takeRecords().map(r),i(!0)}),f(function(){m=-1,a=c("CLS",o=0),i=g(n,a,e)}))},window.webVitals.getFCP=p,window.webVitals.getFID=function(e,t){function n(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),o(!0))}var r=u(),i=c("FID"),a=l("first-input",n),o=g(e,i,t);a&&d(function(){a.takeRecords().map(n),a.disconnect()},!0),a||window.webVitals.firstInputPolyfill(n),f(function(){i=c("FID"),o=g(e,i,t),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(n)})},window.webVitals.getLCP=function(t,n){function e(e){var t=e.startTime;t<a.firstHiddenTime&&(o.value=t,o.entries.push(e)),r()}var r,i,a=u(),o=c("LCP"),s=l("largest-contentful-paint",e);s&&(r=g(t,o,n),i=function(){v.has(o.id)||(s.takeRecords().map(e),s.disconnect(),v.add(o.id),r(!0))},["keydown","click"].forEach(function(e){addEventListener(e,i,{once:!0,capture:!0})}),d(i,!0),f(function(e){o=c("LCP"),r=g(t,o,n),requestAnimationFrame(function(){requestAnimationFrame(function(){o.value=performance.now()-e.timeStamp,v.add(o.id),r(!0)})})}))},window.webVitals.getTTFB=function(n){var e,r=c("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation"),t=e?e[0]:function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(r.value=r.delta=t.responseStart,r.value<0)return;r.entries=[t],n(r)}catch(e){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)})}();var raygunRumFactory=function(ie,e,ae){ae.RealUserMonitoring=function(e,t,s,n,r,i,a,o,u,c,l,d,f,g,p,h,m,v){var y=this,b={};this.cookieName="raygun4js-sid",this.apiKey=e,this.apiUrl=t,this.debugMode=u,this.excludedHostNames=a,this.excludedUserAgents=o,this.maxVirtualPageDuration=c||18e5,this.ignoreUrlCasing=l,this.customTimingsEnabled=d,this.automaticPerformanceCustomTimings=h,this.trackCoreWebVitals=m,this.beforeSend=f||function(e){return e},this.pendingPayloadData=d||!1,this.queuedPerformanceTimings=[],this.pendingVirtualPage=null,this.sessionId=null,this.virtualPage=null,this.user=n,this.version=r,this.tags=i,this.heartBeatInterval=null,this.heartBeatIntervalTime=3e4,this.offset=0,this._captureMissingRequests=p||!1,this.sendUsingNavigatorBeacon=!1,this.stopCollectingMetrics=!1,this.queuedItems=[],this.maxQueueItemsSent=50,this.setCookieAsSecure=g,this.xhrRequestMap={},this.xhrStatusMap={};var w={Page:"p",VirtualPage:"v",XHR:"x",CachedChildAsset:"e",ChildAsset:"c",CustomTiming:"t",CoreWebVital:"w"};function U(){T(re({sessionId:y.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:y.user,version:y.version||"Not supplied",tags:y.tags,device:ie.raygunUserAgent}))}function S(e){return new Date(te(e,"timestamp"))<new Date(new Date-18e5)}function E(){y.sessionId=K(32),Z(y.sessionId)}function R(e,t){var n=function(e,t,n){if(!$("timing","object")||void 0===ie.performance.timing.fetchStart||isNaN(ie.performance.timing.fetchStart))return null;var r=[];t&&r.push(function(){var e=ie.location.pathname;y.ignoreUrlCasing&&(e=e.toLowerCase());var t=ie.location.protocol+"//"+ie.location.host+e;800<t.length&&(t=t.substring(0,800));return{url:t,userAgent:ie.raygunUserAgent,timing:function(){var e=ie.performance.timing,t={du:e.duration,t:w.Page};t.a=e.fetchStart,e.domainLookupStart&&0<e.domainLookupStart&&(t.b=e.domainLookupStart-t.a);e.domainLookupEnd&&0<e.domainLookupEnd&&(t.c=e.domainLookupEnd-t.a);e.connectStart&&0<e.connectStart&&(t.d=e.connectStart-t.a);e.connectEnd&&0<e.connectEnd&&(t.e=e.connectEnd-t.a);e.responseStart&&0<e.responseStart&&(t.f=e.responseStart-t.a);e.responseEnd&&0<e.responseEnd&&(t.g=e.responseEnd-t.a);e.domLoading&&0<e.domLoading&&(t.h=e.domLoading-t.a);e.domInteractive&&0<e.domInteractive&&(t.i=e.domInteractive-t.a);e.domContentLoadedEventEnd&&0<e.domContentLoadedEventEnd&&(t.j=e.domContentLoadedEventEnd-t.a);e.domComplete&&0<e.domComplete&&(t.k=z(e.domComplete-t.a));e.loadEventStart&&0<e.loadEventStart&&(t.l=e.loadEventStart-t.a);e.loadEventEnd&&0<e.loadEventEnd&&(t.m=e.loadEventEnd-t.a);e.secureConnectionStart&&0<e.secureConnectionStart&&(t.n=e.secureConnectionStart-e.connectStart-t.a);return t=function(e){if(!$("getEntriesByName","function"))return e;var t=ie.performance.getEntriesByName("first-paint");0<t.length&&0<t[0].startTime?e.fp=t[0].startTime.toFixed(2):ie.performance.timing&&ie.performance.timing.msFirstPaint&&(e.fp=(ie.performance.timing.msFirstPaint-ie.performance.timing.fetchStart).toFixed(2));var n=ie.performance.getEntriesByName("first-contentful-paint");0<n.length&&0<n[0].startTime&&(e.fcp=n[0].startTime.toFixed(2));return e}(t=J(t))}(),size:0}}());O(r),e&&(r.push(function(e,t){y.ignoreUrlCasing&&(e=e.toLowerCase());-1!==e.indexOf("?")&&(e=e.split("?")[0]);var n=ie.location.protocol+"//"+ie.location.host+e;800<n.length&&(n=n.substring(0,800));return{url:n,userAgent:ie.raygunUserAgent,timing:function(e){return{t:w.VirtualPage,startTime:e,staticLoad:y.initalStaticPageLoadTimestamp,pending:!0}}(t),size:0}}(e,G(0))),O(r,!0));return r=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];n.push(P(i,t))}return n}(r,n)}(y.virtualPage,e,t);null===n||n.length<0||D(n,!1)}function k(e){e&&A();var t=[];O(t,void 0,e),D(t,e)}function x(){var e,t;0<y.queuedItems.length&&(y.queuedItems=(e=y.queuedItems,t="timestamp",e.sort(function(a){return function(e,t){if(!e.hasOwnProperty(a)||!t.hasOwnProperty(a))return Q('Raygun4JS: Property "'+a+'" not found in items in this collection'),0;var n=e[a],r=t[a],i=0;return r<n?i=1:n<r&&(i=-1),i}}(t))),C(y.queuedItems.splice(0,y.maxQueueItemsSent)))}function A(){for(var e,t,n,r=0;r<y.queuedPerformanceTimings.length;r++)(e=y.queuedPerformanceTimings[r]).timing.t===w.VirtualPage&&e.timing.pending&&(e.timing=(t=e.timing,n=G(0),{t:t.t,du:Math.min(y.maxVirtualPageDuration,n-t.startTime),o:Math.min(y.maxVirtualPageDuration,n-t.staticLoad)}))}function T(e){C([e])}function C(n){!function(e,t,n){"function"!=typeof t&&(t=function(){});"function"!=typeof n&&(n=function(){});!function(r,i,a,o){if(y.excludedUserAgents instanceof Array)for(var e in y.excludedUserAgents)if(y.excludedUserAgents.hasOwnProperty(e)&&ie.raygunUserAgent.match(y.excludedUserAgents[e]))return Q("Raygun4JS: cancelling send as error originates from an excluded user agent");if(y.excludedHostNames instanceof Array)for(var t in y.excludedHostNames)if(y.excludedHostNames.hasOwnProperty(t)&&ie.location.hostname&&ie.location.hostname.match(y.excludedHostNames[t]))return Q("Raygun4JS: cancelling send as error originates from an excluded hostname");if(ie.raygunUserAgent.match("RaygunPulseInsightsCrawler"))return;setTimeout(function(){!function(e){if(!e.eventData)return;for(var t=0;t<e.eventData.length;t++)if(e.eventData[t].data&&Array.isArray(e.eventData[t].data))for(var n=0;n<e.eventData[t].data.length;n++){var r,i=e.eventData[t].data[n];i.device&&ie.raygunUserAgentData&&ie.raygunUserAgentData.platformVersion&&(r=(ie.raygunUserAgentData.platformVersion||"").split("."),i.device={Family:ie.raygunUserAgentData.platform,Major:r[0]||"",Minor:r[1]||"",Patch:r[2]||"",PatchMinor:r[3]||""})}}(i);var e=y.beforeSend(i);if(e){if(e.eventData)for(var t=0;t<e.eventData.length;t++)e.eventData[t].data&&"string"!=typeof e.eventData[t].data&&(e.eventData[t].data=JSON.stringify(e.eventData[t].data));var n=JSON.stringify(e);if(y.sendUsingNavigatorBeacon&&navigator.sendBeacon)try{navigator.sendBeacon(r,n)}catch(e){Q(e,{url:r,payload:n})}else s(r,n,a,o)}else Q("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value")},1===ie.raygunUserAgentDataStatus?200:0)}(y.apiUrl+"/events?apikey="+encodeURIComponent(y.apiKey),e,t,n)}({eventData:n},function(){Q("Raygun4JS: Items sent successfully. Queue length: "+y.queuedItems.length)},function(e){var t;t=n,y.queuedItems=t.concat(y.queuedItems),Q("Raygun4JS: Items failed to send. Queue length: "+y.queuedItems.length+" Response status code: "+e.status)})}function L(e){if(!y.pendingPayloadData||e){function t(){a.push(Y(i)),o=!(i=[])}function n(){0<i.length&&t(),0<a.length&&(C(a),o=!(i=[]))}for(var r,i=[],a=[],o=!1,s=0;s<y.queuedPerformanceTimings.length;s++){var u=(r=y.queuedPerformanceTimings[s]).timing.t===w.Page||r.timing.t===w.VirtualPage;if(o&&u&&t(),0<i.length&&u&&t(),u&&(y.requestId=K(16)),r.timing.t===w.VirtualPage&&r.timing.pending)return n(),void y.queuedPerformanceTimings.splice(0,s);i.push(r),o=o||r.timing.t===w.Page||r.timing.t===w.VirtualPage}n(),y.queuedPerformanceTimings=[]}}function D(e,t){!1===y.stopCollectingMetrics&&(y.queuedPerformanceTimings=y.queuedPerformanceTimings.concat(e),L(t))}function N(e){T(Y([e]))}function O(e,t,n){var r;if($("getEntries","function"))try{for(var i=t?0:ie.performance.timing.navigationStart,a=ie.performance.getEntries(),o=y.offset;o<a.length;o++){var s,u=a[o];if(!n&&M(u))break;_(u)?y.automaticPerformanceCustomTimings&&(s=j(u),e.push(P(s,y.parentResource))):X((r=u).name.split("?")[0])||"paint"===r.entryType||"navigation"===r.entryType||"mark"===r.entryType||e.push(I(u,i))}y.offset=o,this._captureMissingRequests&&B(e,i)}catch(e){Q(e)}}this.Utilities={},this.attach=function(){!function(e){var t=ee(),n=null===t,r=!1;n||(r=S(t));{var i;n||r?(E(),e(!0)):(Z(i=te(t,"id")),y.sessionId=i,e(!1))}}(function(e){y.pageLoaded(e)}),this.trackCoreWebVitals&&ae.CoreWebVitals.attach(N,y.parentResource);var e=function(){this.updateStorageTimestamp()}.bind(b),t=function(){k(y.sendUsingNavigatorBeacon=!0),x()}.bind(b),n=function(){"visible"===document.visibilityState&&this.updateStorageTimestamp()}.bind(b),r=function(){k(y.sendUsingNavigatorBeacon=!0),x(),y.stopCollectingMetrics=!0}.bind(b);ie.addEventListener?(ie.addEventListener("click",e),document.addEventListener("visibilitychange",n),ie.addEventListener("beforeunload",t),ie.addEventListener("pagehide",r)):ie.attachEvent&&document.attachEvent("onclick",e),ae.NetworkTracking.on("request",function(e){this.xhrRequestMap[e.baseUrl]||(this.xhrRequestMap[e.baseUrl]=[]);Q("adding request to xhr request map",e);var t=P(e,y.parentResource);this.xhrRequestMap[e.baseUrl].push(t)}.bind(this)),ae.NetworkTracking.on("error",function(e){var t=this.xhrRequestMap[e.baseUrl];t&&0<t.length&&(this.xhrRequestMap[e.baseUrl].shift(),Q("request encountered an error",e))}.bind(this)),ae.NetworkTracking.on("response",function(e){var t=this.xhrRequestMap[e.baseUrl];{var n,r;t&&0<t.length?(n=t[0].parentResource,this.xhrRequestMap[e.baseUrl].shift(),0===this.xhrRequestMap[e.baseUrl].length&&delete this.xhrRequestMap[e.baseUrl],this.xhrStatusMap[e.baseUrl]||(this.xhrStatusMap[e.baseUrl]=[]),Q("adding response to xhr status map",e),r=P(e,n),this.xhrStatusMap[e.baseUrl].push(r)):Q("response fired from non-handled request")}}.bind(this))},this.pageLoaded=function(e){e&&U();var t=q(F(ie.location.pathname),w.Page);R(!0,y.parentResource=t),function(){if(null!==y.heartBeatInterval)return Q("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation.");y.heartBeatInterval=setInterval(function(){k(),x(),y.xhrStatusMap={}},y.heartBeatIntervalTime)}(),y.initalStaticPageLoadTimestamp=G(0)},this.virtualPageLoaded=function(e){"string"==typeof e&&(0<e.length&&"/"!==e[0]&&(e+="/"),800<e.length&&(e=e.substring(0,800)),this.virtualPage=e);var t=q(F(e),w.VirtualPage);y.parentResource=t,y.stopCollectingMetrics&&(y.offset=ie.performance.getEntries().length,y.stopCollectingMetrics=!1),A(),R(!1,t)},this.setUser=function(e){y.user=e},this.withTags=function(e){y.tags=e},this.endSession=function(){y.pendingPayloadData=!1,L(),T(re({sessionId:y.sessionId,requestId:y.requestId,timestamp:(new Date).toISOString(),type:"session_end"})),E(),U()},this.sendCustomTimings=function(e,t){"object"!=typeof e||"number"!=typeof e.custom1&&"number"!=typeof e.custom2&&"number"!=typeof e.custom3&&"number"!=typeof e.custom4&&"number"!=typeof e.custom5&&"number"!=typeof e.custom6&&"number"!=typeof e.custom7&&"number"!=typeof e.custom8&&"number"!=typeof e.custom9&&"number"!=typeof e.custom10||y.pendingPayloadData&&0<y.queuedPerformanceTimings.length&&(y.pendingPayloadData=!1,y.queuedPerformanceTimings[0].customTiming=e,y.queuedPerformanceTimings[0].parentResource=t,L())},this.trackCustomTiming=function(e,t,n,r){var i,a;"number"==typeof t?(i=[],a=W(e,t,n),i.push(P(a,r)),D(i,!1)):Q('Raygun4JS: Custom timing "'+e+'" duration value is not a number')},this.captureMissingRequests=function(e){this._captureMissingRequests=e};var B=function(e,t){for(var n in Q("checking for missing WRT data",this.xhrStatusMap),this.xhrStatusMap)if(this.xhrStatusMap.hasOwnProperty(n)){var r=this.xhrStatusMap[n];if(r&&0<r.length)do{var i,a=r.shift();Q("checking response",a),X(a.baseUrl)||(Q("adding missing WRT data for url"),i={url:a.baseUrl,statusCode:a.status,timing:{du:z(a.duration).toFixed(2),a:t.toFixed(2),t:w.XHR}},e.push(P(i,a.parentResource)))}while(0<r.length);delete this.xhrStatusMap[n]}}.bind(this);var H=function(e){var t=e.name.split("?")[0];return y.ignoreUrlCasing&&(t=t.toLowerCase()),800<t.length&&(t=t.substring(0,800)),t}.bind(this),M=function(e){var t=H(e),n=this.xhrRequestMap[t];return n&&0<n.length}.bind(this),I=function(e,t){var n=H(e),r={url:n,timing:function(e,t){var n={du:z(V(e)).toFixed(2),t:function(e){return function(e){return"xmlhttprequest"===e||"fetch"===e||"preflight"===e||"beacon"===e}(e.initiatorType)||!function(e){switch(e.initiatorType){case"img":case"css":case"script":case"link":case"other":case"use":return 1}return}(e)&&function(e){return"string"==typeof e.initiatorType&&""===e.initiatorType}(e)?w.XHR:ne(e)}(e),a:t+e.fetchStart};e.domainLookupStart&&0<e.domainLookupStart&&(n.b=t+e.domainLookupStart-n.a);e.domainLookupEnd&&0<e.domainLookupEnd&&(n.c=t+e.domainLookupEnd-n.a);e.connectStart&&0<e.connectStart&&(n.d=t+e.connectStart-n.a);e.connectEnd&&0<e.connectEnd&&(n.e=t+e.connectEnd-n.a);e.responseStart&&0<e.responseStart&&(n.f=t+e.responseStart-n.a);e.responseEnd&&0<e.responseEnd&&(n.g=t+e.responseEnd-n.a);e.secureConnectionStart&&0<e.secureConnectionStart&&(n.n=t+(e.secureConnectionStart-e.connectStart)-n.a);return n.a=n.a.toFixed(2),n=J(n)}(e,t),size:e.decodedBodySize||0,parentResource:y.parentResource};Q("retrieving secondary timing data for",e.name);var i,a=this.xhrStatusMap[n];return a&&0<a.length?(i=this.xhrStatusMap[n].shift(),r.statusCode=i.status,r.parentResource=i.parentResource,Q("found status for timing",r.statusCode),0===this.xhrStatusMap[n].length&&delete this.xhrStatusMap[n]):Q("no status found for timing",this.xhrStatusMap),r}.bind(this);function F(e,t){var n=e;t&&(n=n.toLowerCase());var r=ie.location.protocol+"//"+ie.location.host+n;return 800<r.length&&(r=r.substring(0,800)),r}function q(e,t){return{url:e,type:t}}function P(e,t){return t?ae.Utilities.merge(e,{parentResource:t}):e}function V(e){var t=e.duration;return 0!==t?t:e.responseEnd-e.startTime}function _(e){return!(!e||"measure"!==e.entryType)}function j(e){return W(e.name,e.duration,e.startTime)}function W(e,t,n){return{url:e,timing:{t:w.CustomTiming,du:t.toFixed(2),a:(n||0).toFixed(2)}}}function X(e){return 0===e.indexOf(y.apiUrl)||(0<e.indexOf("favicon.ico")||(0===e.indexOf("about:blank")||("j"===e[0]&&1===e.indexOf("avascript:")||(0===e.indexOf("chrome-extension://")||(0===e.indexOf("res://")||0===e.indexOf("file://"))))))}function J(e){for(var t in e)isNaN(e[t])&&"string"!=typeof e[t]&&(e[t]=0);return e}function K(e){return Math.round(Math.pow(36,e+1)-Math.random()*Math.pow(36,e)).toString(36).slice(1)}function $(e,t){return"object"==typeof ie.performance&&(!e||e&&typeof ie.performance[e]===t)}function G(e){return $("now","function")?ie.performance.now():e}function z(e){return Math.min(e,3e5)}function Q(e,t){y.debugMode&&ie.console&&ie.console.log&&(t?ie.console.log(e,t):ie.console.log(e))}function Y(e){return re({sessionId:y.sessionId,requestId:y.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:y.user,version:y.version||"Not supplied",device:ie.raygunUserAgent,tags:y.tags,data:e})}function Z(e){var t="id|"+e+"&timestamp|"+(new Date).toISOString();ae.Utilities.localStorageAvailable()?localStorage.setItem(y.cookieName,t):ae.Utilities.createCookie(y.cookieName,t,null,y.setCookieAsSecure)}function ee(){var e;return ae.Utilities.localStorageAvailable()&&null!==(e=localStorage.getItem(y.cookieName))||(ae.Utilities.sessionStorageAvailable()&&null!==(e=sessionStorage.getItem(y.cookieName))?Z(e):null!==(e=ae.Utilities.readCookie(y.cookieName))&&ae.Utilities.localStorageAvailable()&&(ae.Utilities.clearCookie(y.cookieName),localStorage.setItem(y.cookieName,e))),e}function te(e,t){var n=e.split(/[|&]/);return"id"===t?n[1]:"timestamp"===t?n[3]:void 0}function ne(e){return 0===e.duration?w.CachedChildAsset:w.ChildAsset}function re(e){return v&&!e.hasOwnProperty("viewport")&&(e.viewport=ae.Viewport.getViewportDimensions()),e}this.Utilities.getTimingDuration=V,this.Utilities.isCustomTimingMeasurement=_,this.Utilities.getCustomTimingMeasurement=j,this.Utilities.createCustomTimingMeasurement=W,b.updateStorageTimestamp=function(){var e=ee(),t=!1;e&&(t=S(e)),!t&&e||(y.sessionId=K(32)),Z(y.sessionId),t&&U()}}};raygunRumFactory(window,window.jQuery,window.__instantiatedRaygun),function(r,i){var a,o,s,u,c,l,d,f,g,p,h,m,v,y,b;r.RaygunObject&&r[r.RaygunObject]&&(a=r[r.RaygunObject].o,o=!1,s=[],g=["function (b,c,d,f,g){","||(g=new Error(b)),a[e].q=a[e].q||[]"],p=r[r.RaygunObject].q,m=["trackEvent","send","recordBreadcrumb"],v=function(e){var t,n,r,i=e[0],a=e[1];if(i)switch(i){case"boot":b();break;case"noConflict":f=a;break;case"apiKey":u=a,0;break;case"options":c=a;break;case"attach":case"enableCrashReporting":l=a,0;break;case"enableRUM":case"enablePulse":d=a,0;break;case"detach":h.detach();break;case"getRaygunInstance":return a&&"function"==typeof a&&a(h),h;case"setUser":h.setUser(a.identifier,a.isAnonymous,a.email,a.fullName,a.firstName,a.uuid);break;case"onBeforeSend":h.onBeforeSend(a);break;case"onBeforeSendRUM":h.onBeforeSendRum(a);break;case"onBeforeXHR":h.onBeforeXHR(a);break;case"onAfterSend":h.onAfterSend(a);break;case"withCustomData":h.withCustomData(a);break;case"withTags":h.withTags(a);break;case"setVersion":h.setVersion(a);break;case"filterSensitiveData":h.filterSensitiveData(a);break;case"setFilterScope":h.setFilterScope(a);break;case"whitelistCrossOriginDomains":h.whitelistCrossOriginDomains(a);break;case"saveIfOffline":"boolean"==typeof a&&h.saveIfOffline(a);break;case"groupingKey":h.groupingKey(a);break;case"endSession":h.endSession();break;case"send":a.error?(t=a.error,a.tags&&(n=a.tags),a.customData&&(r=a.customData)):t=a,h.send(t,r,n);break;case"trackEvent":a.type&&a.path?h.trackEvent(a.type,{path:a.path}):a.type&&a.name&&a.duration?h.trackEvent(a.type,{name:a.name,duration:a.duration,offset:a.offset}):a.type&&a.timings&&h.trackEvent(a.type,{timings:a.timings});break;case"recordBreadcrumb":h.recordBreadcrumb(e[1],e[2]);break;case"enableAutoBreadcrumbs":h.enableAutoBreadcrumbs();break;case"disableAutoBreadcrumbs":h.disableAutoBreadcrumbs();break;case"enableAutoBreadcrumbsConsole":h.enableAutoBreadcrumbs("Console");break;case"disableAutoBreadcrumbsConsole":h.disableAutoBreadcrumbs("Console");break;case"enableAutoBreadcrumbsNavigation":h.enableAutoBreadcrumbs("Navigation");break;case"disableAutoBreadcrumbsNavigation":h.disableAutoBreadcrumbs("Navigation");break;case"enableAutoBreadcrumbsClicks":h.enableAutoBreadcrumbs("Clicks");break;case"disableAutoBreadcrumbsClicks":h.disableAutoBreadcrumbs("Clicks");break;case"enableAutoBreadcrumbsXHR":h.enableAutoBreadcrumbs("XHR");break;case"disableAutoBreadcrumbsXHR":h.disableAutoBreadcrumbs("XHR");break;case"setBreadcrumbLevel":h.setBreadcrumbOption("breadcrumbsLevel",e[1]);break;case"setAutoBreadcrumbsXHRIgnoredHosts":h.setBreadcrumbOption("xhrIgnoredHosts",e[1]);break;case"logContentsOfXhrCalls":h.setBreadcrumbOption("logXhrContents",e[1]);break;case"clientIp":h.setClientIp(a);break;case"captureMissingRequests":h.captureMissingRequests(a);break;case"captureUnhandledRejections":0}},y=function(){r[r.RaygunObject]=function(){return v(arguments)},o=!0},b=function(){var e;if(function(){for(var e in a=r[r.RaygunObject].o){var t;!a.hasOwnProperty(e)||(t=a[e])&&(-1===m.indexOf(t[0])?v(t):s.push(t))}}(),f&&(h=i.noConflict()),u&&(c=c||{},d&&(c.disablePulse=!1),c.from="onLoad",h.init(u,c,null)),l)for(var t in h.attach(),p=r[r.RaygunObject].q)h.send(p[t].e,{handler:"From Raygun4JS snippet global error handler"});else"function"!=typeof r.onerror||-1!==(e=r.onerror.toString()).indexOf(g[0])&&-1!==e.indexOf(g[1])&&(r.onerror=null);for(var n in s)s.hasOwnProperty(n)&&v(s[n]);s=[],o||y(),r[r.RaygunObject].q=p},(h=i).Utilities.isReactNative()?y():"complete"===document.readyState?b():r.addEventListener?r.addEventListener("load",b):r.attachEvent("onload",b))}(window,window.__instantiatedRaygun);try{delete window.__instantiatedRaygun}catch(e){window.__instantiatedRaygun=void 0}
//# sourceMappingURL=raygun.min.js.map