!function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t,r=(function(e,t){function r(e,t){for(var r=0;r0){var s=r(n,this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,o):i.push(o),~r(n,a)&&(a=t.call(this,o,a))}else n.push(a);return null==e?a instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(a):a:e.call(this,o,a)}}(e.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n}(t={exports:{}},t.exports),t.exports),n=r.getSerialize,i=Object.freeze({default:r,__moduleExports:r,getSerialize:n}),o=i&&r||i,a="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function s(e){return void 0===e}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e){return"[object String]"===Object.prototype.toString.call(e)}function u(e){return"[object Array]"===Object.prototype.toString.call(e)}function p(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function h(){if(!("fetch"in a))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function f(e,t){var r,n;if(s(e.length))for(r in e)g(e,r)&&t.call(null,r,e[r]);else if(n=e.length)for(r=0;r ".length;e&&n++<5&&!("html"===(t=v(e))||n>1&&i+r.length*o+t.length>=80);)r.push(t),i+=t.length,e=e.parentNode;return r.reverse().join(" > ")},htmlElementAsString:v,isSameException:function(e,t){return!m(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&(r=e.stacktrace,n=t.stacktrace,(!s(r)||!s(n))&&b(e.stacktrace,t.stacktrace)));var r,n},isSameStacktrace:b,parseUrl:function(e){if("string"!=typeof e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/),r=t[6]||"",n=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+r+n}},fill:function(e,t,r,n){if(null!=e){var i=e[t];e[t]=r(i),e[t].__raven__=!0,e[t].__orig__=i,n&&n.push([e,t,i])}},safeJoin:function(e,t){if(!u(e))return"";for(var r=[],n=0;nn?e(t,r-1):i},serializeKeysForMessage:function(e,t){if("number"==typeof e||"string"==typeof e)return e.toString();if(!Array.isArray(e))return"";if(0===(e=e.filter(function(e){return"string"==typeof e})).length)return"[object has no keys]";if(t="number"!=typeof t?w:t,e[0].length>=t)return e[0];for(var r=e.length;r>0;r--){var n=e.slice(0,r).join(", ");if(!(n.length>t))return r===e.length?n:n+"…"}return""},sanitize:function(e,t){if(!u(t)||u(t)&&0===t.length)return e;var r,n=_(t),i="********";try{r=JSON.parse(o(e))}catch(t){return e}return function e(t){return u(t)?t.map(function(t){return e(t)}):c(t)?Object.keys(t).reduce(function(r,o){return n.test(o)?r[o]=i:r[o]=e(t[o]),r},{}):t}(r)}},O=S.isObject,j=S.isError,C=S.isErrorEvent,R=S.isUndefined,T=S.isFunction,F=S.isPlainObject,A=S.isString,B=S.isArray,P=S.isEmptyObject,D=S.supportsErrorEvent,M=S.supportsFetch,U=S.supportsReferrerPolicy,H=S.supportsPromiseRejectionEvent,L=S.wrappedCallback,I=S.each,N=S.objectMerge,z=S.truncate,q=S.objectFrozen,K=S.hasKey,W=S.joinRegExp,V=S.urlencode,J=S.uuid4,$=S.htmlTreeAsString,X=S.htmlElementAsString,G=S.isSameException,Y=S.isSameStacktrace,Z=S.parseUrl,Q=S.fill,ee=S.safeJoin,te=S.serializeException,re=S.serializeKeysForMessage,ne=S.sanitize,ie=Object.freeze({default:S,__moduleExports:S,isObject:O,isError:j,isErrorEvent:C,isUndefined:R,isFunction:T,isPlainObject:F,isString:A,isArray:B,isEmptyObject:P,supportsErrorEvent:D,supportsFetch:M,supportsReferrerPolicy:U,supportsPromiseRejectionEvent:H,wrappedCallback:L,each:I,objectMerge:N,truncate:z,objectFrozen:q,hasKey:K,joinRegExp:W,urlencode:V,uuid4:J,htmlTreeAsString:$,htmlElementAsString:X,isSameException:G,isSameStacktrace:Y,parseUrl:Z,fill:Q,safeJoin:ee,serializeException:te,serializeKeysForMessage:re,sanitize:ne}),oe=ie&&S||ie,ae={collectWindowErrors:!0,debug:!1},se="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},ce=[].slice,le="?",ue=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function pe(){return"undefined"==typeof document||null==document.location?"":document.location.href}ae.report=function(){var e,t,r=[],n=null,i=null,o=null;function a(e,t){var n=null;if(!t||ae.collectWindowErrors){for(var i in r)if(r.hasOwnProperty(i))try{r[i].apply(null,[e].concat(ce.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function s(t,r,n,i,s){var l=oe.isErrorEvent(s)?s.error:s,u=oe.isErrorEvent(t)?t.message:t;if(o)ae.computeStackTrace.augmentStackTraceWithInitialElement(o,r,n,u),c();else if(l&&oe.isError(l))a(ae.computeStackTrace(l),!0);else{var p,h={url:r,line:n,column:i},f=void 0;if("[object String]"==={}.toString.call(u))(p=u.match(ue))&&(f=p[1],u=p[2]);h.func=le,a({name:f,message:u,url:pe(),stack:[h]},!0)}return!!e&&e.apply(this,arguments)}function c(){var e=o,t=n;n=null,o=null,i=null,a.apply(null,[e,!1].concat(t))}function l(e,t){var r=ce.call(arguments,1);if(o){if(i===e)return;c()}var a=ae.computeStackTrace(e);if(o=a,i=e,n=r,setTimeout(function(){i===e&&c()},a.incomplete?2e3:0),!1!==t)throw e}return l.subscribe=function(n){t||(e=se.onerror,se.onerror=s,t=!0),r.push(n)},l.unsubscribe=function(e){for(var t=r.length-1;t>=0;--t)r[t]===e&&r.splice(t,1)},l.uninstall=function(){t&&(se.onerror=e,t=!1,e=void 0),r=[]},l}(),ae.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,r,n,i=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack||[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=e.stack.split("\n"),u=[],p=(/^(.*) is undefined$/.exec(e.message),0),h=l.length;p eval")>-1&&(t=s.exec(r[3]))?(r[3]=t[1],r[4]=t[2],r[5]=null):0!==p||r[5]||void 0===e.columnNumber||(u[0].column=e.columnNumber+1),n={url:r[3],func:r[1]||le,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}!n.func&&n.line&&(n.func=le),u.push(n)}return u.length?{name:e.name,message:e.message,url:pe(),stack:u}:null}}function t(e,t,r,n){var i={url:t,line:r};if(i.url&&i.line){if(e.incomplete=!1,i.func||(i.func=le),e.stack.length>0&&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,!1}return e.stack.unshift(i),e.partial=!0,!0}return e.incomplete=!0,!1}function r(e,i){for(var o,a,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],l={},u=!1,p=r.caller;p&&!u;p=p.caller)if(p!==n&&p!==ae.report){if(a={url:null,func:le,line:null,column:null},p.name?a.func=p.name:(o=s.exec(p.toString()))&&(a.func=o[1]),void 0===a.func)try{a.func=o.input.substring(0,o.input.indexOf("{"))}catch(e){}l[""+p]?u=!0:l[""+p]=!0,c.push(a)}i&&c.splice(0,i);var h={name:e.name,message:e.message,url:pe(),stack:c};return t(h,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),h}function n(t,n){var i=null;n=null==n?0:+n;try{if(i=e(t))return i}catch(e){if(ae.debug)throw e}try{if(i=r(t,n+1))return i}catch(e){if(ae.debug)throw e}return{name:t.name,message:t.message,url:pe()}}return n.augmentStackTraceWithInitialElement=t,n.computeStackTraceFromStackProp=e,n}();var he=ae,fe=Object.freeze({default:he,__moduleExports:he});function de(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ge(e,t,r,n,i,o){return de((a=de(de(t,e),de(n,o)))<<(s=i)|a>>>32-s,r);var a,s}function _e(e,t,r,n,i,o,a){return ge(t&r|~t&n,e,t,i,o,a)}function ve(e,t,r,n,i,o,a){return ge(t&n|r&~n,e,t,i,o,a)}function me(e,t,r,n,i,o,a){return ge(t^r^n,e,t,i,o,a)}function be(e,t,r,n,i,o,a){return ge(r^(t|~n),e,t,i,o,a)}function ye(e,t){var r,n,i,o,a;e[t>>5]|=128<>>9<<4)]=t;var s=1732584193,c=-271733879,l=-1732584194,u=271733878;for(r=0;r>5]>>>t%32&255);return r}function we(e){var t,r=[];for(r[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+"0123456789abcdef".charAt(15&t);return n}function ke(e){return unescape(encodeURIComponent(e))}function Se(e){return function(e){return Ee(ye(we(e),8*e.length))}(ke(e))}function Oe(e,t){return function(e,t){var r,n,i=we(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=ye(i,8*e.length)),r=0;r<16;r+=1)o[r]=909522486^i[r],a[r]=1549556828^i[r];return n=ye(o.concat(we(t)),512+8*t.length),Ee(ye(a.concat(n),640))}(ke(e),ke(t))}var je=function(e,t,r){return t?r?Oe(t,e):xe(Oe(t,e)):r?Se(e):xe(Se(e))},Ce=Object.freeze({default:je,__moduleExports:je});function Re(e){this.name="RavenConfigError",this.message=e}Re.prototype=new Error,Re.prototype.constructor=Re;var Te=Re,Fe=Object.freeze({default:Te,__moduleExports:Te}),Ae={wrapMethod:function(e,t,r){var n=e[t],i=e;if(t in e){var o="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),a=oe.safeJoin(e," "),s={level:o,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(a="Assertion failed: "+(oe.safeJoin(e.slice(1)," ")||"console.assert"),s.extra.arguments=e.slice(1),r&&r(a,s)):r&&r(a,s),n&&Function.prototype.apply.call(n,i,e)}}}},Be=Ae.wrapMethod,Pe=Object.freeze({default:Ae,__moduleExports:Ae,wrapMethod:Be}),De=fe&&he||fe,Me=Ce&&je||Ce,Ue=Fe&&Te||Fe,He=Pe&&Ae||Pe,Le=oe.isError,Ie=oe.isObject,Ne=oe.isPlainObject,ze=oe.isErrorEvent,qe=oe.isUndefined,Ke=oe.isFunction,We=oe.isString,Ve=oe.isArray,Je=oe.isEmptyObject,$e=oe.each,Xe=oe.objectMerge,Ge=oe.truncate,Ye=oe.objectFrozen,Ze=oe.hasKey,Qe=oe.joinRegExp,et=oe.urlencode,tt=oe.uuid4,rt=oe.htmlTreeAsString,nt=oe.isSameException,it=oe.isSameStacktrace,ot=oe.parseUrl,at=oe.fill,st=oe.supportsFetch,ct=oe.supportsReferrerPolicy,lt=oe.serializeKeysForMessage,ut=oe.serializeException,pt=oe.sanitize,ht=He.wrapMethod,ft="source protocol user pass host port path".split(" "),dt=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function gt(){return+new Date}var _t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},vt=_t.document,mt=_t.navigator;function bt(e,t){return Ke(t)?function(r){return t(r,e)}:t}function yt(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!qe(vt),this._hasNavigator=!qe(mt),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:_t.SENTRY_RELEASE&&_t.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,captureUnhandledRejections:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1,sanitizeKeys:[]},this._fetchDefaults={method:"POST",keepalive:!0,referrerPolicy:ct()?"origin":""},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=_t.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=gt(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=_t.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}yt.prototype={VERSION:"3.24.2",debug:!1,TraceKit:De,config:function(e,t){var r=this;if(r._globalServer)return this._logDebug("error","Error: Raven has already been configured"),r;if(!e)return r;var n=r._globalOptions;t&&$e(t,function(e,t){"tags"===e||"extra"===e||"user"===e?r._globalContext[e]=t:n[e]=t}),r.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=Qe(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&Qe(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&Qe(n.whitelistUrls),n.includePaths=Qe(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var i={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},o=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(o)?o=Xe(i,o):!1!==o&&(o=i),n.autoBreadcrumbs=o;var a={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=Xe(a,s):!1!==s&&(s=a),n.instrument=s,De.collectWindowErrors=!!n.collectWindowErrors,r},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(De.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.captureUnhandledRejections&&e._attachPromiseRejectionHandler(),e._patchFunctionToString(),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),r=t.path.lastIndexOf("/"),n=t.path.substr(1,r);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(r+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+n+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,r){return Ke(e)&&(r=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,r)},wrap:function(e,t,r){var n=this;if(qe(t)&&!Ke(e))return e;if(Ke(e)&&(t=e,e=void 0),!Ke(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function i(){var i=[],o=arguments.length,a=!e||e&&!1!==e.deep;for(r&&Ke(r)&&r.apply(this,arguments);o--;)i[o]=a?n.wrap(e,arguments[o]):arguments[o];try{return t.apply(this,i)}catch(t){throw n._ignoreNextOnError(),n.captureException(t,e),t}}for(var o in t)Ze(t,o)&&(i[o]=t[o]);return i.prototype=t.prototype,t.__raven_wrapper__=i,i.__raven__=!0,i.__orig__=t,i},uninstall:function(){return De.report.uninstall(),this._detachPromiseRejectionHandler(),this._unpatchFunctionToString(),this._restoreBuiltIns(),this._restoreConsole(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},_promiseRejectionHandler:function(e){this._logDebug("debug","Raven caught unhandled promise rejection:",e),this.captureException(e.reason,{extra:{unhandledPromiseRejection:!0}})},_attachPromiseRejectionHandler:function(){return this._promiseRejectionHandler=this._promiseRejectionHandler.bind(this),_t.addEventListener&&_t.addEventListener("unhandledrejection",this._promiseRejectionHandler),this},_detachPromiseRejectionHandler:function(){return _t.removeEventListener&&_t.removeEventListener("unhandledrejection",this._promiseRejectionHandler),this},captureException:function(e,t){if(t=Xe({trimHeadFrames:0},t||{}),ze(e)&&e.error)e=e.error;else if(Le(e))e=e;else{if(!Ne(e))return this.captureMessage(e,Xe(t,{stacktrace:!0,trimHeadFrames:t.trimHeadFrames+1}));t=this._getCaptureExceptionOptionsFromPlainObject(t,e),e=new Error(t.message)}this._lastCapturedException=e;try{var r=De.computeStackTrace(e);this._handleStackInfo(r,t)}catch(t){if(e!==t)throw t}return this},_getCaptureExceptionOptionsFromPlainObject:function(e,t){var r=Object.keys(t).sort(),n=Xe(e,{message:"Non-Error exception captured with keys: "+lt(r),fingerprint:[Me(r)],extra:e.extra||{}});return n.extra.__serialized__=ut(t),n},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var r,n=Xe({message:e+=""},t=t||{});try{throw new Error(e)}catch(e){r=e}r.name=null;var i=De.computeStackTrace(r),o=Ve(i.stack)&&i.stack[1];o&&"Raven.captureException"===o.func&&(o=i.stack[2]);var a=o&&o.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(a))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(a))){if(this._globalOptions.stacktrace||t&&t.stacktrace){n.fingerprint=null==n.fingerprint?e:n.fingerprint,(t=Xe({trimHeadFrames:0},t)).trimHeadFrames+=1;var s=this._prepareFrames(i,t);n.stacktrace={frames:s.reverse()}}return n.fingerprint&&(n.fingerprint=Ve(n.fingerprint)?n.fingerprint:[n.fingerprint]),this._send(n),this}}},captureBreadcrumb:function(e){var t=Xe({timestamp:gt()/1e3},e);if(Ke(this._globalOptions.breadcrumbCallback)){var r=this._globalOptions.breadcrumbCallback(t);if(Ie(r)&&!Je(r))t=r;else if(!1===r)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(o(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=bt(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=bt(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=bt(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=_t.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(vt){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new Ue("Missing eventId");var r=e.dsn||this._dsn;if(!r)throw new Ue("Missing DSN");var n=encodeURIComponent,i="";i+="?eventId="+n(t),i+="&dsn="+n(r);var o=e.user||this._globalContext.user;o&&(o.name&&(i+="&name="+n(o.name)),o.email&&(i+="&email="+n(o.email)));var a=this._getGlobalServer(this._parseDSN(r)),s=vt.createElement("script");s.async=!0,s.src=a+"/api/embed/error-page/"+i,(vt.head||vt.body).appendChild(s)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var r,n;if(this._hasDocument){for(n in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),vt.createEvent?(r=vt.createEvent("HTMLEvents")).initEvent(e,!0,!0):(r=vt.createEventObject()).eventType=e,t)Ze(t,n)&&(r[n]=t[n]);if(vt.createEvent)vt.dispatchEvent(r);else try{vt.fireEvent("on"+r.eventType.toLowerCase(),r)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(r){if(t._keypressTimeout=null,t._lastCapturedEvent!==r){var n;t._lastCapturedEvent=r;try{n=rt(r.target)}catch(e){n=""}t.captureBreadcrumb({category:"ui."+e,message:n})}}},_keypressEventHandler:function(){var e=this;return function(t){var r;try{r=t.target}catch(e){return}var n=r&&r.tagName;if(n&&("INPUT"===n||"TEXTAREA"===n||r.isContentEditable)){var i=e._keypressTimeout;i||e._breadcrumbEventHandler("input")(t),clearTimeout(i),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var r=ot(this._location.href),n=ot(t),i=ot(e);this._lastHref=t,r.protocol===n.protocol&&r.host===n.host&&(t=n.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_patchFunctionToString:function(){var e=this;e._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return"function"==typeof this&&this.__raven__?e._originalFunctionToString.apply(this.__orig__,arguments):e._originalFunctionToString.apply(this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function r(t){return function(r,n){for(var i=new Array(arguments.length),o=0;o2?arguments[2]:void 0;return r&&e._captureUrlChange(e._lastHref,r+""),t.apply(this,arguments)}};at(history,"pushState",c,r),at(history,"replaceState",c,r)}if(t.console&&"console"in _t&&console.log){var l=function(t,r){e.captureBreadcrumb({message:t,level:r.level,category:"console"})};$e(["debug","info","warn","error","log"],function(e,t){ht(console,t,l)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],r=e[1],n=e[2];t[r]=n}},_restoreConsole:function(){for(var e in this._originalConsoleMethods)this._originalConsole[e]=this._originalConsoleMethods[e]},_drainPlugins:function(){var e=this;$e(this._plugins,function(t,r){var n=r[0],i=r[1];n.apply(e,[e].concat(i))})},_parseDSN:function(e){var t=dt.exec(e),r={},n=7;try{for(;n--;)r[ft[n]]=t[n]||""}catch(t){throw new Ue("Invalid DSN: "+e)}if(r.pass&&!this._globalOptions.allowSecretKey)throw new Ue("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return r},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var r=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,r,t)},_prepareFrames:function(e,t){var r=this,n=[];if(e.stack&&e.stack.length&&($e(e.stack,function(t,i){var o=r._normalizeFrame(i,e.url);o&&n.push(o)}),t&&t.trimHeadFrames))for(var i=0;i0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),e=this._sanitizeData(e),Object.keys(e).forEach(function(t){(null==e[t]||""===e[t]||Je(e[t]))&&delete e[t]}),Ke(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!Je(e)&&(Ke(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()