Comparing version 3.9.2 to 3.10.0
{ | ||
"name": "raven-js", | ||
"version": "3.9.2", | ||
"version": "3.10.0", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "main": "dist/raven.js", |
# Changelog | ||
## 3.10.0 | ||
* NEW: Raven.js will exponentially back off if server returns a 400-level error (e.g. 429 too many requests). See: https://github.com/getsentry/raven-js/pull/839 | ||
* CHANGE: Raven.js will not set lastEventId if transmission failed because Raven is not configured. See: https://github.com/getsentry/raven-js/pull/839 | ||
* BUGFIX: Raven.js now properly handles Firefox resource:// URLs (extensions). See: https://github.com/getsentry/raven-js/pull/837 | ||
## 3.9.2 | ||
@@ -4,0 +10,0 @@ * BUGFIX: Use json-stringify-safe in React Native plugin to avoid circular refs. See: https://github.com/getsentry/raven-js/pull/829 |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Angular=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){function c(){this.$get=["$window",function(b){return a}]}function e(a){a.decorator("$exceptionHandler",["Raven","$delegate",f])}function f(a,b){return function(c,d){a.captureException(c,{extra:{cause:d}}),b(c,d)}}b=b||window.angular,b&&(b.module("ngRaven",[]).provider("Raven",c).config(["$provide",e]),a.setDataCallback(function(a,b){d.a(a),b&&b(a)}))}var e=/^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;d.a=function(a){var b=a.exception;if(b){b=b.values[0];var c=e.exec(b.value);c&&(b.type=c[1],b.value=c[2],a.message=b.type+": "+b.value,a.extra.angularDocs=c[3].substr(0,250))}},b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=angular.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Console=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c){b=b||window.console||{},c=c||{};for(var d=c.levels||["debug","info","warn","error"],f=d.pop(),g=function(b,c){a.captureMessage(b,c)};f;)e(b,f,g),f=d.pop()}var e=a(2).wrapMethod;b.exports=d},{2:2}],2:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=console.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Ember=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Ember){var c=b.onerror;b.onerror=function(b){a.captureException(b),"function"==typeof c&&c.call(this,b)},b.RSVP.on("error",function(b){b instanceof Error?a.captureException(b,{extra:{context:"Unhandled Promise error detected"}}):a.captureMessage("Unhandled Promise error detected",{extra:{reason:b}})})}}b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=ember.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Require=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";function e(c){"function"==typeof a&&a.amd&&(window.define=c.wrap({deep:!1},a),window.require=c.wrap({deep:!1},b))}c.exports=e},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=require.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Vue=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Vue,b&&b.config){var c=b.config.errorHandler;b.config.errorHandler=function(d,e){a.captureException(d,{extra:{componentName:b.util.formatComponentName(e),propsData:e.$options.propsData}}),"function"==typeof c&&c.call(this,d,e)}}}b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=vue.min.js.map |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.9.2 (5286373) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){(function(c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b=!f(D),this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=C.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=C.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}function f(a){return void 0===a}function g(a){return"function"==typeof a}function h(a){return"[object String]"===E.toString.call(a)}function i(a){return"object"==typeof a&&null!==a}function j(a){for(var b in a)return!1;return!0}function k(a){var b=E.toString.call(a);return i(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function l(a,b){var c,d;if(f(a.length))for(c in a)o(a,c)&&b.call(null,c,a[c]);else if(d=a.length)for(c=0;c<d;c++)b.call(null,c,a[c])}function m(a,b){return b?(l(b,function(b,c){a[b]=c}),a):a}function n(a,b){return!b||a.length<=b?a:a.substr(0,b)+"…"}function o(a,b){return E.hasOwnProperty.call(a,b)}function p(a){for(var b,c=[],d=0,e=a.length;d<e;d++)b=a[d],h(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function q(a){var b=[];return l(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function r(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function s(){var a=C.crypto||C.msCrypto;if(!f(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);b.length<4;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function t(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=u(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function u(a){var b,c,d,e,f,g=[];if(!a||!a.tagName)return"";if(g.push(a.tagName.toLowerCase()),a.id&&g.push("#"+a.id),b=a.className,b&&h(b))for(c=b.split(" "),f=0;f<c.length;f++)g.push("."+c[f]);var i=["type","name","title","alt"];for(f=0;f<i.length;f++)d=i[f],e=a.getAttribute(d),e&&g.push("["+d+'="'+e+'"]');return g.join("")}function v(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var w=a(6),x=a(2),y=a(1),z=a(3).wrapMethod,A="source protocol user pass host port path".split(" "),B=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/,C="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:{},D=C.document;e.prototype={VERSION:"3.9.2",debug:!1,TraceKit:w,config:function(a,b){var c=this;if(c.e)return this.v("error","Error: Raven has already been configured"),c;if(!a)return c;var d=c.i;b&&l(b,function(a,b){"tags"===a||"extra"===a||"user"===a?c.h[a]=b:d[a]=b}),c.setDSN(a),d.ignoreErrors.push(/^Script error\.?$/),d.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),d.ignoreErrors=p(d.ignoreErrors),d.ignoreUrls=!!d.ignoreUrls.length&&p(d.ignoreUrls),d.whitelistUrls=!!d.whitelistUrls.length&&p(d.whitelistUrls),d.includePaths=p(d.includePaths),d.maxBreadcrumbs=Math.max(0,Math.min(d.maxBreadcrumbs||100,100));var e={xhr:!0,console:!0,dom:!0,location:!0},f=d.autoBreadcrumbs;return"[object Object]"==={}.toString.call(f)?f=m(e,f):f!==!1&&(f=e),d.autoBreadcrumbs=f,w.collectWindowErrors=!!d.collectWindowErrors,c},install:function(){var a=this;return a.isSetup()&&!a.k&&(w.report.subscribe(function(){a.w.apply(a,arguments)}),a.x(),a.i.autoBreadcrumbs&&a.y(),a.z(),a.k=!0),Error.stackTraceLimit=a.i.stackTraceLimit,this},setDSN:function(a){var b=this,c=b.A(a),d=c.path.lastIndexOf("/"),e=c.path.substr(1,d);b.B=a,b.f=c.user,b.C=c.pass&&c.pass.substr(1),b.g=c.path.substr(d+1),b.e=b.D(c),b.E=b.e+"/"+e+"api/"+b.g+"/store/"},context:function(a,b,c){return g(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,h=!a||a&&a.deep!==!1;for(c&&g(c)&&c.apply(this,arguments);f--;)d[f]=h?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(i){throw e.F(),e.captureException(i,a),i}}var e=this;if(f(b)&&!g(a))return a;if(g(a)&&(b=a,a=void 0),!g(b))return b;try{if(b.G)return b;if(b.H)return b.H}catch(h){return b}for(var i in b)o(b,i)&&(d[i]=b[i]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return w.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!k(a))return this.captureMessage(a,m({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=w.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){b=b||{};var c=m({message:a+""},b);if(this.i.stacktrace||b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=m({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var f=w.computeStackTrace(d),g=this.L(f,b);c.stacktrace={frames:g.reverse()}}return this.M(c),this}},captureBreadcrumb:function(a){var b=m({timestamp:d()/1e3},a);if(g(this.i.breadcrumbCallback)){var c=this.i.breadcrumbCallback(b);if(i(c)&&!j(c))b=c;else if(c===!1)return this}return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=[].slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(y(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=g(a)?function(c){return a(c,b)}:a,this},setBreadcrumbCallback:function(a){var b=this.i.breadcrumbCallback;return this.i.breadcrumbCallback=g(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=g(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return!!this.a&&(!!this.e||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var a=C.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(D){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new x("Missing eventId");var c=a.dsn||this.B;if(!c)throw new x("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var g=this.D(this.A(c)),h=D.createElement("script");h.async=!0,h.src=g+"/api/embed/error-page/"+e,(D.head||D.body).appendChild(h)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),D.createEvent?(c=D.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=D.createEventObject(),c.eventType=a);for(d in b)o(b,d)&&(c[d]=b[d]);if(D.createEvent)D.dispatchEvent(c);else try{D.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=t(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e||d.isContentEditable)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=r(this.t.href),d=r(b),e=r(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var h=e[0];return g(h)&&(e[0]=c.wrap(h)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=C[a]&&C[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(v(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j,k,l;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&(k=c.P("click"),l=c.R(),j=function(a){if(a)return"click"===a.type?k(a):"keypress"===a.type?l(a):void 0}),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),v(b,"removeEventListener",function(a){return function(b,c,d,e){try{c=c&&(c.H?c.H:c)}catch(f){}return a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;v(C,"setTimeout",a,d),v(C,"setInterval",a,d),C.requestAnimationFrame&&v(C,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],h=0;h<f.length;h++)b(f[h]);var i=C.jQuery||C.$;i&&i.fn&&i.fn.ready&&v(i.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},y:function(){function a(a,c){a in c&&g(c[a])&&v(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in C){var e=XMLHttpRequest.prototype;v(e,"open",function(a){return function(c,d){return h(d)&&d.indexOf(b.f)===-1&&(this.T={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),v(e,"send",function(c){return function(d){function e(){if(f.T&&(1===f.readyState||4===f.readyState)){try{f.T.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.T})}}for(var f=this,h=["onload","onerror","onprogress"],i=0;i<h.length;i++)a(h[i],f);return"onreadystatechange"in f&&g(f.onreadystatechange)?v(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.xhr&&"fetch"in C&&v(C,"fetch",function(a){return function(c,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var g="GET";e[1]&&e[1].method&&(g=e[1].method);var h={method:g,url:e[0],status_code:null};return b.captureBreadcrumb({type:"http",category:"fetch",data:h}),a.apply(this,e).then(function(a){return h.status_code=a.status,a})}},d),c.dom&&this.b&&(D.addEventListener?(D.addEventListener("click",b.P("click"),!1),D.addEventListener("keypress",b.R(),!1)):(D.attachEvent("onclick",b.P("click")),D.attachEvent("onkeypress",b.R())));var f=C.chrome,i=f&&f.app&&f.app.runtime,j=!i&&C.history&&history.pushState;if(c.location&&j){var k=C.onpopstate;C.onpopstate=function(){var a=b.t.href;if(b.S(b.u,a),k)return k.apply(this,arguments)},v(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in C&&console.log){var m=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};l(["debug","info","warn","error","log"],function(a,b){z(console,b,m)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},z:function(){var a=this;l(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=B.exec(a),c={},d=7;try{for(;d--;)c[A[d]]=b[d]||""}catch(e){throw new x("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new x("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(l(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;e<b.trimHeadFrames&&e<d.length;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},V:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=m({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.M(h)}},W:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=n(a.message,b)),a.exception){var c=a.exception.values[0];c.value=n(c.value,b)}return a},X:function(){if(this.b&&D.location&&D.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=D.location.href,D.referrer&&(a.headers.Referer=D.referrer),a}},M:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.X();e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=m(c,a),a.tags=m(m({},this.h.tags),a.tags),a.extra=m(m({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),j(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),g(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!j(a)&&(g(b.shouldSendCallback)&&!b.shouldSendCallback(a)||this.Y(a))},Z:function(){return s()},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=this.Z()),a=this.W(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.C&&(e.sentry_secret=this.C);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.E;(d.transport||this.$).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},$:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+q(a.auth)),c.send(y(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){f(b)?delete this.h[a]:this.h[a]=m(this.h[a]||{},b)}};var E=Object.prototype;e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,6:6}],5:[function(a,b,c){(function(c){"use strict";var d=a(4),e="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:{},f=e.Raven,g=new d;g.noConflict=function(){return e.Raven=f,g},g.afterLoad(),b.exports=g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{4:4}],6:[function(a,b,c){(function(a){"use strict";function c(){return"undefined"==typeof document||"undefined"==typeof document.location?"":document.location.href}var d={collectWindowErrors:!0,debug:!1},e="undefined"!=typeof window?window:"undefined"!=typeof a?a:"undefined"!=typeof self?self:{},f=[].slice,g="?",h=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;d.report=function(){function a(a){l(),r.push(a)}function b(a){for(var b=r.length-1;b>=0;--b)r[b]===a&&r.splice(b,1)}function i(){m(),r=[]}function j(a,b){var c=null;if(!b||d.collectWindowErrors){for(var e in r)if(r.hasOwnProperty(e))try{r[e].apply(null,[a].concat(f.call(arguments,2)))}catch(g){c=g}if(c)throw c}}function k(a,b,e,f,i){var k=null;if(u)d.computeStackTrace.augmentStackTraceWithInitialElement(u,b,e,a),n();else if(i)k=d.computeStackTrace(i),j(k,!0);else{var l,m={url:b,line:e,column:f},o=void 0,q=a;if("[object String]"==={}.toString.call(a)){var l=a.match(h);l&&(o=l[1],q=l[2])}m.func=g,k={name:o,message:q,url:c(),stack:[m]},j(k,!0)}return!!p&&p.apply(this,arguments)}function l(){q||(p=e.onerror,e.onerror=k,q=!0)}function m(){q&&(e.onerror=p,q=!1,p=void 0)}function n(){var a=u,b=s;s=null,u=null,t=null,j.apply(null,[a,!1].concat(b))}function o(a,b){var c=f.call(arguments,1);if(u){if(t===a)return;n()}var e=d.computeStackTrace(a);if(u=e,t=a,s=c,setTimeout(function(){t===a&&n()},e.incomplete?2e3:0),b!==!1)throw a}var p,q,r=[],s=null,t=null,u=null;return o.subscribe=a,o.unsubscribe=b,o.uninstall=i,o}(),d.computeStackTrace=function(){function a(a){if("undefined"!=typeof a.stack&&a.stack){for(var b,d,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,h=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],k=(/^(.*) is undefined$/.exec(a.message),0),l=i.length;k<l;++k){if(b=e.exec(i[k])){var m=b[2]&&b[2].indexOf("native")!==-1;d={url:m?null:b[2],func:b[1]||g,args:m?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=h.exec(i[k]))d={url:b[2],func:b[1]||g,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[k])))continue;d={url:b[3],func:b[1]||g,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!d.func&&d.line&&(d.func=g),j.push(d)}return j.length?(j[0].column||"undefined"==typeof a.columnNumber||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:c(),stack:j}):null}}function b(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=g),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function e(a,h){for(var i,j,k=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=e.caller;o&&!n;o=o.caller)if(o!==f&&o!==d.report){if(j={url:null,func:g,line:null,column:null},o.name?j.func=o.name:(i=k.exec(o.toString()))&&(j.func=i[1]),"undefined"==typeof j.func)try{j.func=i.input.substring(0,i.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(j)}h&&l.splice(0,h);var q={name:a.name,message:a.message,url:c(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function f(b,f){var g=null;f=null==f?0:+f;try{if(g=a(b))return g}catch(h){if(d.debug)throw h}try{if(g=e(b,f+1))return g}catch(h){if(d.debug)throw h}return{name:b.name,message:b.message,url:c()}}return f.augmentStackTraceWithInitialElement=b,f.computeStackTraceFromStackProp=a,f}(),b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[5])(5)}); | ||
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){(function(c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b=!f(D),this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=C.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=C.location,this.u=this.t&&this.t.href,this.v();for(var a in this.m)this.n[a]=this.m[a]}function f(a){return void 0===a}function g(a){return"function"==typeof a}function h(a){return"[object String]"===E.toString.call(a)}function i(a){return"object"==typeof a&&null!==a}function j(a){for(var b in a)return!1;return!0}function k(a){var b=E.toString.call(a);return i(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function l(a,b){var c,d;if(f(a.length))for(c in a)o(a,c)&&b.call(null,c,a[c]);else if(d=a.length)for(c=0;c<d;c++)b.call(null,c,a[c])}function m(a,b){return b?(l(b,function(b,c){a[b]=c}),a):a}function n(a,b){return!b||a.length<=b?a:a.substr(0,b)+"…"}function o(a,b){return E.hasOwnProperty.call(a,b)}function p(a){for(var b,c=[],d=0,e=a.length;d<e;d++)b=a[d],h(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function q(a){var b=[];return l(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function r(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function s(){var a=C.crypto||C.msCrypto;if(!f(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);b.length<4;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function t(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=u(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function u(a){var b,c,d,e,f,g=[];if(!a||!a.tagName)return"";if(g.push(a.tagName.toLowerCase()),a.id&&g.push("#"+a.id),b=a.className,b&&h(b))for(c=b.split(" "),f=0;f<c.length;f++)g.push("."+c[f]);var i=["type","name","title","alt"];for(f=0;f<i.length;f++)d=i[f],e=a.getAttribute(d),e&&g.push("["+d+'="'+e+'"]');return g.join("")}function v(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var w=a(6),x=a(2),y=a(1),z=a(3).wrapMethod,A="source protocol user pass host port path".split(" "),B=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/,C="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:{},D=C.document;e.prototype={VERSION:"3.10.0",debug:!1,TraceKit:w,config:function(a,b){var c=this;if(c.e)return this.w("error","Error: Raven has already been configured"),c;if(!a)return c;var d=c.i;b&&l(b,function(a,b){"tags"===a||"extra"===a||"user"===a?c.h[a]=b:d[a]=b}),c.setDSN(a),d.ignoreErrors.push(/^Script error\.?$/),d.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),d.ignoreErrors=p(d.ignoreErrors),d.ignoreUrls=!!d.ignoreUrls.length&&p(d.ignoreUrls),d.whitelistUrls=!!d.whitelistUrls.length&&p(d.whitelistUrls),d.includePaths=p(d.includePaths),d.maxBreadcrumbs=Math.max(0,Math.min(d.maxBreadcrumbs||100,100));var e={xhr:!0,console:!0,dom:!0,location:!0},f=d.autoBreadcrumbs;return"[object Object]"==={}.toString.call(f)?f=m(e,f):f!==!1&&(f=e),d.autoBreadcrumbs=f,w.collectWindowErrors=!!d.collectWindowErrors,c},install:function(){var a=this;return a.isSetup()&&!a.k&&(w.report.subscribe(function(){a.x.apply(a,arguments)}),a.y(),a.i.autoBreadcrumbs&&a.z(),a.A(),a.k=!0),Error.stackTraceLimit=a.i.stackTraceLimit,this},setDSN:function(a){var b=this,c=b.B(a),d=c.path.lastIndexOf("/"),e=c.path.substr(1,d);b.C=a,b.f=c.user,b.D=c.pass&&c.pass.substr(1),b.g=c.path.substr(d+1),b.e=b.E(c),b.F=b.e+"/"+e+"api/"+b.g+"/store/",this.v()},context:function(a,b,c){return g(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,h=!a||a&&a.deep!==!1;for(c&&g(c)&&c.apply(this,arguments);f--;)d[f]=h?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(i){throw e.G(),e.captureException(i,a),i}}var e=this;if(f(b)&&!g(a))return a;if(g(a)&&(b=a,a=void 0),!g(b))return b;try{if(b.H)return b;if(b.I)return b.I}catch(h){return b}for(var i in b)o(b,i)&&(d[i]=b[i]);return d.prototype=b.prototype,b.I=d,d.H=!0,d.J=b,d},uninstall:function(){return w.report.uninstall(),this.K(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!k(a))return this.captureMessage(a,m({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=w.computeStackTrace(a);this.L(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){b=b||{};var c=m({message:a+""},b);if(this.i.stacktrace||b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=m({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var f=w.computeStackTrace(d),g=this.M(f,b);c.stacktrace={frames:g.reverse()}}return this.N(c),this}},captureBreadcrumb:function(a){var b=m({timestamp:d()/1e3},a);if(g(this.i.breadcrumbCallback)){var c=this.i.breadcrumbCallback(b);if(i(c)&&!j(c))b=c;else if(c===!1)return this}return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=[].slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.A(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.O("extra",a),this},setTagsContext:function(a){return this.O("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(y(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=g(a)?function(c){return a(c,b)}:a,this},setBreadcrumbCallback:function(a){var b=this.i.breadcrumbCallback;return this.i.breadcrumbCallback=g(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=g(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return!!this.a&&(!!this.e||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.w("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var a=C.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(D){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new x("Missing eventId");var c=a.dsn||this.C;if(!c)throw new x("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var g=this.E(this.B(c)),h=D.createElement("script");h.async=!0,h.src=g+"/api/embed/error-page/"+e,(D.head||D.body).appendChild(h)}},G:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},P:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),D.createEvent?(c=D.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=D.createEventObject(),c.eventType=a);for(d in b)o(b,d)&&(c[d]=b[d]);if(D.createEvent)D.dispatchEvent(c);else try{D.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},Q:function(a){var b=this;return function(c){if(b.R=null,b.s!==c){b.s=c;var d,e=c.target;try{d=t(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},S:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e||d.isContentEditable)){var f=a.R;f||a.Q("input")(c),clearTimeout(f),a.R=setTimeout(function(){a.R=null},b)}}},T:function(a,b){var c=r(this.t.href),d=r(b),e=r(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},y:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var h=e[0];return g(h)&&(e[0]=c.wrap(h)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=C[a]&&C[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(v(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j,k,l;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&(k=c.Q("click"),l=c.S(),j=function(a){if(a)return"click"===a.type?k(a):"keypress"===a.type?l(a):void 0}),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),v(b,"removeEventListener",function(a){return function(b,c,d,e){try{c=c&&(c.I?c.I:c)}catch(f){}return a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;v(C,"setTimeout",a,d),v(C,"setInterval",a,d),C.requestAnimationFrame&&v(C,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],h=0;h<f.length;h++)b(f[h]);var i=C.jQuery||C.$;i&&i.fn&&i.fn.ready&&v(i.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},z:function(){function a(a,c){a in c&&g(c[a])&&v(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in C){var e=XMLHttpRequest.prototype;v(e,"open",function(a){return function(c,d){return h(d)&&d.indexOf(b.f)===-1&&(this.U={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),v(e,"send",function(c){return function(d){function e(){if(f.U&&(1===f.readyState||4===f.readyState)){try{f.U.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.U})}}for(var f=this,h=["onload","onerror","onprogress"],i=0;i<h.length;i++)a(h[i],f);return"onreadystatechange"in f&&g(f.onreadystatechange)?v(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.xhr&&"fetch"in C&&v(C,"fetch",function(a){return function(c,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var g="GET";e[1]&&e[1].method&&(g=e[1].method);var h={method:g,url:e[0],status_code:null};return b.captureBreadcrumb({type:"http",category:"fetch",data:h}),a.apply(this,e).then(function(a){return h.status_code=a.status,a})}},d),c.dom&&this.b&&(D.addEventListener?(D.addEventListener("click",b.Q("click"),!1),D.addEventListener("keypress",b.S(),!1)):(D.attachEvent("onclick",b.Q("click")),D.attachEvent("onkeypress",b.S())));var f=C.chrome,i=f&&f.app&&f.app.runtime,j=!i&&C.history&&history.pushState;if(c.location&&j){var k=C.onpopstate;C.onpopstate=function(){var a=b.t.href;if(b.T(b.u,a),k)return k.apply(this,arguments)},v(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.T(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in C&&console.log){var m=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};l(["debug","info","warn","error","log"],function(a,b){z(console,b,m)})}},K:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},A:function(){var a=this;l(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},B:function(a){var b=B.exec(a),c={},d=7;try{for(;d--;)c[A[d]]=b[d]||""}catch(e){throw new x("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new x("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},E:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},x:function(){this.j||this.L.apply(this,arguments)},L:function(a,b){var c=this.M(a,b);this.P("handle",{stackInfo:a,options:b}),this.V(a.name,a.message,a.url,a.lineno,c,b)},M:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(l(a.stack,function(a,b){var e=c.W(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;e<b.trimHeadFrames&&e<d.length;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},W:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},V:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=m({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.N(h)}},X:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=n(a.message,b)),a.exception){var c=a.exception.values[0];c.value=n(c.value,b)}return a},Y:function(){if(this.b&&D.location&&D.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=D.location.href,D.referrer&&(a.headers.Referer=D.referrer),a}},v:function(){this.Z=0,this.$=null},_:function(){return this.Z&&d()-this.$<this.Z},aa:function(a){if(!this._()){var b=a.status;if(400===b||401===b||429===b){var c;try{c=a.getResponseHeader("Retry-After"),c=parseInt(c,10)}catch(e){}this.Z=c?c:2*this.Z||1e3,this.$=d()}}},N:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.Y();if(e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=m(c,a),a.tags=m(m({},this.h.tags),a.tags),a.extra=m(m({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),j(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),g(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!j(a)&&(!g(b.shouldSendCallback)||b.shouldSendCallback(a)))return this._()?void this.w("warn","Raven dropped error due to backoff: ",a):void this.ba(a)},ca:function(){return s()},ba:function(a,b){var c=this,d=this.i;if(this.isSetup()){this.d=a.event_id||(a.event_id=this.ca()),a=this.X(a),this.w("debug","Raven about to send:",a);var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.D&&(e.sentry_secret=this.D);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.F;(d.transport||this.da).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.v(),c.P("success",{data:a,src:g}),b&&b()},onError:function(d){c.w("error","Raven transport failed to send: ",d),d.request&&c.aa(d.request),c.P("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},da:function(a){function b(){if(200===c.status)a.onSuccess&&a.onSuccess();else if(a.onError){var b=new Error("Sentry error code: "+c.status);b.request=c,a.onError(b)}}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+q(a.auth)),c.send(y(a.data))}},w:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},O:function(a,b){f(b)?delete this.h[a]:this.h[a]=m(this.h[a]||{},b)}};var E=Object.prototype;e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,6:6}],5:[function(a,b,c){(function(c){"use strict";var d=a(4),e="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:{},f=e.Raven,g=new d;g.noConflict=function(){return e.Raven=f,g},g.afterLoad(),b.exports=g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{4:4}],6:[function(a,b,c){(function(a){"use strict";function c(){return"undefined"==typeof document||"undefined"==typeof document.location?"":document.location.href}var d={collectWindowErrors:!0,debug:!1},e="undefined"!=typeof window?window:"undefined"!=typeof a?a:"undefined"!=typeof self?self:{},f=[].slice,g="?",h=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;d.report=function(){function a(a){l(),r.push(a)}function b(a){for(var b=r.length-1;b>=0;--b)r[b]===a&&r.splice(b,1)}function i(){m(),r=[]}function j(a,b){var c=null;if(!b||d.collectWindowErrors){for(var e in r)if(r.hasOwnProperty(e))try{r[e].apply(null,[a].concat(f.call(arguments,2)))}catch(g){c=g}if(c)throw c}}function k(a,b,e,f,i){var k=null;if(u)d.computeStackTrace.augmentStackTraceWithInitialElement(u,b,e,a),n();else if(i)k=d.computeStackTrace(i),j(k,!0);else{var l,m={url:b,line:e,column:f},o=void 0,q=a;if("[object String]"==={}.toString.call(a)){var l=a.match(h);l&&(o=l[1],q=l[2])}m.func=g,k={name:o,message:q,url:c(),stack:[m]},j(k,!0)}return!!p&&p.apply(this,arguments)}function l(){q||(p=e.onerror,e.onerror=k,q=!0)}function m(){q&&(e.onerror=p,q=!1,p=void 0)}function n(){var a=u,b=s;s=null,u=null,t=null,j.apply(null,[a,!1].concat(b))}function o(a,b){var c=f.call(arguments,1);if(u){if(t===a)return;n()}var e=d.computeStackTrace(a);if(u=e,t=a,s=c,setTimeout(function(){t===a&&n()},e.incomplete?2e3:0),b!==!1)throw a}var p,q,r=[],s=null,t=null,u=null;return o.subscribe=a,o.unsubscribe=b,o.uninstall=i,o}(),d.computeStackTrace=function(){function a(a){if("undefined"!=typeof a.stack&&a.stack){for(var b,d,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|resource|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,h=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],k=(/^(.*) is undefined$/.exec(a.message),0),l=i.length;k<l;++k){if(b=e.exec(i[k])){var m=b[2]&&b[2].indexOf("native")!==-1;d={url:m?null:b[2],func:b[1]||g,args:m?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=h.exec(i[k]))d={url:b[2],func:b[1]||g,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[k])))continue;d={url:b[3],func:b[1]||g,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!d.func&&d.line&&(d.func=g),j.push(d)}return j.length?(j[0].column||"undefined"==typeof a.columnNumber||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:c(),stack:j}):null}}function b(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=g),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function e(a,h){for(var i,j,k=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=e.caller;o&&!n;o=o.caller)if(o!==f&&o!==d.report){if(j={url:null,func:g,line:null,column:null},o.name?j.func=o.name:(i=k.exec(o.toString()))&&(j.func=i[1]),"undefined"==typeof j.func)try{j.func=i.input.substring(0,i.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(j)}h&&l.splice(0,h);var q={name:a.name,message:a.message,url:c(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function f(b,f){var g=null;f=null==f?0:+f;try{if(g=a(b))return g}catch(h){if(d.debug)throw h}try{if(g=e(b,f+1))return g}catch(h){if(d.debug)throw h}return{name:b.name,message:b.message,url:c()}}return f.augmentStackTraceWithInitialElement=b,f.computeStackTraceFromStackProp=a,f}(),b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[5])(5)}); | ||
//# sourceMappingURL=raven.min.js.map |
{ | ||
"@dist/raven.js": { | ||
"hashes": { | ||
"sha256": "Ys1HQR6AleMV2krlqqcgwN3c5N4pmvshjql3Gqh4lAs=", | ||
"sha512": "Bxo/PvUYWXEydrDuy7Rt9tC6b1s345htx2826JIQ6WBrr4WW0aiUDVPJz3G99con//Y58kpqZirX7YfMgKiiZg==" | ||
"sha256": "sUOL9Hkw6IjQ13VMuWDH02zuTs5ijJVdqyT50G62/UQ=", | ||
"sha512": "JCTujNvLWEBwFKhLc71aUBwllOexED/7B2BVvgxCLsHu5OZkJ324XTmCbGwvL3ZtnGkiaHVBbG5sh5uoHmK7GQ==" | ||
}, | ||
"type": null, | ||
"integrity": "sha256-Ys1HQR6AleMV2krlqqcgwN3c5N4pmvshjql3Gqh4lAs= sha512-Bxo/PvUYWXEydrDuy7Rt9tC6b1s345htx2826JIQ6WBrr4WW0aiUDVPJz3G99con//Y58kpqZirX7YfMgKiiZg==", | ||
"integrity": "sha256-sUOL9Hkw6IjQ13VMuWDH02zuTs5ijJVdqyT50G62/UQ= sha512-JCTujNvLWEBwFKhLc71aUBwllOexED/7B2BVvgxCLsHu5OZkJ324XTmCbGwvL3ZtnGkiaHVBbG5sh5uoHmK7GQ==", | ||
"path": "dist/raven.js" | ||
@@ -13,9 +13,9 @@ }, | ||
"hashes": { | ||
"sha256": "FUlyzCCcGC0KyC/Kz5SHya4DjzFZy5Qiqu1Lwn85Rw4=", | ||
"sha512": "Lui8cCX+5QtuqtW38Jhdyn1I04lzqjY7bMJkqSKXTkq0piu1OlQDSRVArtZoiONZYNA2dFoDfZxlMGI/fkJQWQ==" | ||
"sha256": "ogdspac+f8EOgkWiSKLCiLhfiS1abJ+GGsW6TNBhB5M=", | ||
"sha512": "zHEr75bJv4JDjP4Nn4at8e1nK/wIQxiY9+1EAhHkyB4KfsDG+3s9mBLkeebBS8YEqOms1p3/X/Yc+ww0+Acw/g==" | ||
}, | ||
"type": null, | ||
"integrity": "sha256-FUlyzCCcGC0KyC/Kz5SHya4DjzFZy5Qiqu1Lwn85Rw4= sha512-Lui8cCX+5QtuqtW38Jhdyn1I04lzqjY7bMJkqSKXTkq0piu1OlQDSRVArtZoiONZYNA2dFoDfZxlMGI/fkJQWQ==", | ||
"integrity": "sha256-ogdspac+f8EOgkWiSKLCiLhfiS1abJ+GGsW6TNBhB5M= sha512-zHEr75bJv4JDjP4Nn4at8e1nK/wIQxiY9+1EAhHkyB4KfsDG+3s9mBLkeebBS8YEqOms1p3/X/Yc+ww0+Acw/g==", | ||
"path": "dist/raven.min.js" | ||
} | ||
} |
@@ -69,4 +69,4 @@ { | ||
"vars": { | ||
"RAVEN_VERSION": "3.9.2" | ||
"RAVEN_VERSION": "3.10.0" | ||
} | ||
} |
{ | ||
"name": "raven-js", | ||
"version": "3.9.2", | ||
"version": "3.10.0", | ||
"license": "BSD-2-Clause", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/getsentry/raven-js", |
@@ -185,3 +185,5 @@ /*global ErrorUtils:false*/ | ||
if (options.onError) { | ||
options.onError(new Error('Sentry error code: ' + request.status)); | ||
var err = new Error('Sentry error code: ' + request.status); | ||
err.request = request; | ||
options.onError(err); | ||
} | ||
@@ -188,0 +190,0 @@ } |
@@ -64,2 +64,3 @@ /*global XDomainRequest:false, __DEV__:false*/ | ||
this._lastHref = this._location && this._location.href; | ||
this._resetBackoff(); | ||
@@ -82,3 +83,3 @@ for (var method in this._originalConsole) { // eslint-disable-line guard-for-in | ||
// See: https://github.com/getsentry/raven-js/issues/465 | ||
VERSION: '3.9.2', | ||
VERSION: '3.10.0', | ||
@@ -202,2 +203,6 @@ debug: false, | ||
'/' + path + 'api/' + self._globalProject + '/store/'; | ||
// Reset backoff state since we may be pointing at a | ||
// new project/server | ||
this._resetBackoff(); | ||
}, | ||
@@ -1326,3 +1331,45 @@ | ||
_resetBackoff: function() { | ||
this._backoffDuration = 0; | ||
this._backoffStart = null; | ||
}, | ||
_shouldBackoff: function() { | ||
return this._backoffDuration && now() - this._backoffStart < this._backoffDuration; | ||
}, | ||
_setBackoffState: function(request) { | ||
// If we are already in a backoff state, don't change anything | ||
if (this._shouldBackoff()) { | ||
return; | ||
} | ||
var status = request.status; | ||
// 400 - project_id doesn't exist or some other fatal | ||
// 401 - invalid/revoked dsn | ||
// 429 - too many requests | ||
if (!(status === 400 || status === 401 || status === 429)) | ||
return; | ||
var retry; | ||
try { | ||
// If Retry-After is not in Access-Control-Expose-Headers, most | ||
// browsers will throw an exception trying to access it | ||
retry = request.getResponseHeader('Retry-After'); | ||
retry = parseInt(retry, 10); | ||
} catch (e) { | ||
/* eslint no-empty:0 */ | ||
} | ||
this._backoffDuration = retry | ||
// If Sentry server returned a Retry-After value, use it | ||
? retry | ||
// Otherwise, double the last backoff duration (starts at 1 sec) | ||
: this._backoffDuration * 2 || 1000; | ||
this._backoffStart = now(); | ||
}, | ||
_send: function(data) { | ||
@@ -1392,2 +1439,9 @@ var globalOptions = this._globalOptions; | ||
// Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests), | ||
// so drop requests until "cool-off" period has elapsed. | ||
if (this._shouldBackoff()) { | ||
this._logDebug('warn', 'Raven dropped error due to backoff: ', data); | ||
return; | ||
} | ||
this._sendProcessedPayload(data); | ||
@@ -1404,2 +1458,4 @@ }, | ||
if (!this.isSetup()) return; | ||
// Send along an event_id if not explicitly passed. | ||
@@ -1415,4 +1471,2 @@ // This event_id can be used to reference the error within Sentry itself. | ||
if (!this.isSetup()) return; | ||
var auth = { | ||
@@ -1444,2 +1498,4 @@ sentry_version: '7', | ||
onSuccess: function success() { | ||
self._resetBackoff(); | ||
self._triggerEvent('success', { | ||
@@ -1452,2 +1508,8 @@ data: data, | ||
onError: function failure(error) { | ||
self._logDebug('error', 'Raven transport failed to send: ', error); | ||
if (error.request) { | ||
self._setBackoffState(error.request); | ||
} | ||
self._triggerEvent('failure', { | ||
@@ -1480,3 +1542,5 @@ data: data, | ||
} else if (opts.onError) { | ||
opts.onError(new Error('Sentry error code: ' + request.status)); | ||
var err = new Error('Sentry error code: ' + request.status); | ||
err.request = request; | ||
opts.onError(err); | ||
} | ||
@@ -1483,0 +1547,0 @@ } |
@@ -177,4 +177,6 @@ var Promise = require('bluebird'); | ||
assert.isFalse(onSuccess.calledOnce); | ||
assert.isTrue(onError.calledOnce); | ||
assert.isFalse(onSuccess.calledOnce); | ||
assert.isTrue(onError.lastCall.args[0] instanceof Error); | ||
assert.equal(onError.lastCall.args[0].request.status, 401); | ||
}); | ||
@@ -181,0 +183,0 @@ |
@@ -343,2 +343,13 @@ var CapturedExceptions = {}; | ||
CapturedExceptions.FIREFOX_50_RESOURCE_URL= { | ||
stack: 'render@resource://path/data/content/bundle.js:5529:16\n' + | ||
'dispatchEvent@resource://path/data/content/vendor.bundle.js:18:23028\n' + | ||
'wrapped@resource://path/data/content/bundle.js:7270:25', | ||
fileName: 'resource://path/data/content/bundle.js', | ||
lineNumber: 5529, | ||
columnNumber: 16, | ||
message: 'this.props.raw[this.state.dataSource].rows is undefined', | ||
name: 'TypeError' | ||
}; | ||
module.exports = CapturedExceptions; |
@@ -212,3 +212,11 @@ /*global Mocha, assert*/ | ||
}); | ||
it('should parse Firefox errors with resource: URLs', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.FIREFOX_50_RESOURCE_URL); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 3); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'resource://path/data/content/bundle.js', func: 'render', args: [], line: 5529, column: 16 }); | ||
}); | ||
}); | ||
}); |
'use strict'; | ||
/* | ||
TraceKit - Cross brower stack traces - github.com/occ/TraceKit | ||
TraceKit - Cross brower stack traces | ||
This was originally forked from github.com/occ/TraceKit, but has since been | ||
largely re-written and is now maintained as part of raven-js. Tests for | ||
this are in test/vendor. | ||
MIT license | ||
@@ -384,3 +389,3 @@ */ | ||
var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, | ||
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i, | ||
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|resource|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i, | ||
winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i, | ||
@@ -387,0 +392,0 @@ lines = ex.stack.split('\n'), |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
659313
10424