Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/integrations

Package Overview
Dependencies
Maintainers
13
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/integrations - npm Package Compare versions

Comparing version 5.22.1 to 5.22.2

2

build/offline.min.js

@@ -1,2 +0,2 @@

!function(e){var n={};Object.defineProperty(n,"__esModule",{value:!0});var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function r(e,n,t,r){return new(t||(t=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new t(function(n){n(e.value)}).then(a,u)}c((r=r.apply(e,n||[])).next())})}function o(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,n){return e.__proto__=n,e}:function(e,n){for(var t in n)e.hasOwnProperty(t)||(e[t]=n[t]);return e});!function(e){function n(n){var t=this.constructor,r=e.call(this,n)||this;return r.message=n,r.name=t.prototype.constructor.name,i(r,t.prototype),r}(function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)})(n,e)}(Error);function a(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var u={};function c(){return a()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:u}function f(){var e=c(),n=e.crypto||e.msCrypto;if(void 0!==n&&n.getRandomValues){var t=new Uint16Array(8);n.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var r=function(e){for(var n=e.toString(16);n.length<4;)n="0"+n;return n};return r(t[0])+r(t[1])+r(t[2])+r(t[3])+r(t[4])+r(t[5])+r(t[6])+r(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})}function s(e){var n=c();if(!("console"in n))return e();var t=n.console,r={};["debug","info","warn","error","log","assert"].forEach(function(e){e in n.console&&t[e].__sentry_original__&&(r[e]=t[e],t[e]=t[e].__sentry_original__)});var o=e();return Object.keys(r).forEach(function(e){t[e]=r[e]}),o}var l=Date.now(),d=0,v={now:function(){var e=Date.now()-l;return e<d&&(e=d),d=e,e},timeOrigin:l},h=(function(){if(a())try{return(e=module,n="perf_hooks",e.require(n)).performance}catch(e){return v}var e,n,t=c().performance;t&&t.now&&(void 0===t.timeOrigin&&(t.timeOrigin=t.timing&&t.timing.navigationStart||l))}(),c()),p="Sentry Logger ",y=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._enabled&&s(function(){h.console.log(p+"[Log]: "+e.join(" "))})},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._enabled&&s(function(){h.console.warn(p+"[Warn]: "+e.join(" "))})},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._enabled&&s(function(){h.console.error(p+"[Error]: "+e.join(" "))})},e}();h.__SENTRY__=h.__SENTRY__||{};var b,g=h.__SENTRY__.logger||(h.__SENTRY__.logger=new y);!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(b||(b={}));(function(){function e(e){var n=this;this._state=b.PENDING,this._handlers=[],this._resolve=function(e){n._setResult(b.RESOLVED,e)},this._reject=function(e){n._setResult(b.REJECTED,e)},this._setResult=function(e,t){var r;n._state===b.PENDING&&(r=t,Boolean(r&&r.then&&"function"==typeof r.then)?t.then(n._resolve,n._reject):(n._state=e,n._value=t,n._executeHandlers()))},this._attachHandler=function(e){n._handlers=n._handlers.concat(e),n._executeHandlers()},this._executeHandlers=function(){if(n._state!==b.PENDING){var e=n._handlers.slice();n._handlers=[],e.forEach(function(e){e.done||(n._state===b.RESOLVED&&e.onfulfilled&&e.onfulfilled(n._value),n._state===b.REJECTED&&e.onrejected&&e.onrejected(n._value),e.done=!0)})}};try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}e.resolve=function(n){return new e(function(e){e(n)})},e.reject=function(n){return new e(function(e,t){t(n)})},e.all=function(n){return new e(function(t,r){if(Array.isArray(n))if(0!==n.length){var o=n.length,i=[];n.forEach(function(n,a){e.resolve(n).then(function(e){i[a]=e,0===(o-=1)&&t(i)}).then(null,r)})}else t([]);else r(new TypeError("Promise.all requires an array as input."))})},e.prototype.then=function(n,t){var r=this;return new e(function(e,o){r._attachHandler({done:!1,onfulfilled:function(t){if(n)try{return void e(n(t))}catch(e){return void o(e)}else e(t)},onrejected:function(n){if(t)try{return void e(t(n))}catch(e){return void o(e)}else o(n)}})})},e.prototype.catch=function(e){return this.then(function(e){return e},e)},e.prototype.finally=function(n){var t=this;return new e(function(e,r){var o,i;return t.then(function(e){i=!1,o=e,n&&n()},function(e){i=!0,o=e,n&&n()}).then(function(){i?r(o):e(o)})})},e.prototype.toString=function(){return"[object SyncPromise]"}})(),c();var m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}!function(e,n){e(n={exports:{}},n.exports)}(function(e,n){e.exports=function e(n,t,r){function o(a,u){if(!t[a]){if(!n[a]){var c=_;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=t[a]={exports:{}};n[a][0].call(s.exports,function(e){var t=n[a][1][e];return o(t||e)},s,s.exports,e,n,t,r)}return t[a].exports}for(var i=_,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,n,t){(function(e){var t,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(s),u=e.document.createTextNode("");a.observe(u,{characterData:!0}),t=function(){u.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var n=e.document.createElement("script");n.onreadystatechange=function(){s(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n)}:function(){setTimeout(s,0)};else{var c=new e.MessageChannel;c.port1.onmessage=s,t=function(){c.port2.postMessage(0)}}var f=[];function s(){var e,n;r=!0;for(var t=f.length;t;){for(n=f,f=[],e=-1;++e<t;)n[e]();t=f.length}r=!1}n.exports=function(e){1!==f.push(e)||r||t()}}).call(this,void 0!==m?m:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,n,t){var r=e(1);function o(){}var i={},a=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function f(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&v(this,e)}function s(e,n,t){this.promise=e,"function"==typeof n&&(this.onFulfilled=n,this.callFulfilled=this.otherCallFulfilled),"function"==typeof t&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}function l(e,n,t){r(function(){var r;try{r=n(t)}catch(n){return i.reject(e,n)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function d(e){var n=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof n)return function(){n.apply(e,arguments)}}function v(e,n){var t=!1;function r(n){t||(t=!0,i.reject(e,n))}function o(n){t||(t=!0,i.resolve(e,n))}var a=h(function(){n(o,r)});"error"===a.status&&r(a.value)}function h(e,n){var t={};try{t.value=e(n),t.status="success"}catch(e){t.status="error",t.value=e}return t}n.exports=f,f.prototype.catch=function(e){return this.then(null,e)},f.prototype.then=function(e,n){if("function"!=typeof e&&this.state===u||"function"!=typeof n&&this.state===a)return this;var t=new this.constructor(o);if(this.state!==c){var r=this.state===u?e:n;l(t,r,this.outcome)}else this.queue.push(new s(t,e,n));return t},s.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},s.prototype.otherCallFulfilled=function(e){l(this.promise,this.onFulfilled,e)},s.prototype.callRejected=function(e){i.reject(this.promise,e)},s.prototype.otherCallRejected=function(e){l(this.promise,this.onRejected,e)},i.resolve=function(e,n){var t=h(d,n);if("error"===t.status)return i.reject(e,t.value);var r=t.value;if(r)v(e,r);else{e.state=u,e.outcome=n;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(n)}return e},i.reject=function(e,n){e.state=a,e.outcome=n;for(var t=-1,r=e.queue.length;++t<r;)e.queue[t].callRejected(n);return e},f.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},f.reject=function(e){var n=new this(o);return i.reject(n,e)},f.all=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var a=new Array(t),u=0,c=-1,f=new this(o);++c<t;)s(e[c],c);return f;function s(e,o){n.resolve(e).then(function(e){a[o]=e,++u!==t||r||(r=!0,i.resolve(f,a))},function(e){r||(r=!0,i.reject(f,e))})}},f.race=function(e){var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var a,u=-1,c=new this(o);++u<t;)a=e[u],n.resolve(a).then(function(e){r||(r=!0,i.resolve(c,e))},function(e){r||(r=!0,i.reject(c,e))});return c}},{1:1}],3:[function(e,n,t){(function(n){"function"!=typeof n.Promise&&(n.Promise=e(2))}).call(this,void 0!==m?m:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,n,t){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function i(e,n){e=e||[],n=n||{};try{return new Blob(e,n)}catch(i){if("TypeError"!==i.name)throw i;for(var t="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,r=new t,o=0;o<e.length;o+=1)r.append(e[o]);return r.getBlob(n.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function u(e,n){n&&e.then(function(e){n(null,e)},function(e){n(e)})}function c(e,n,t){"function"==typeof n&&e.then(n),"function"==typeof t&&e.catch(t)}function f(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function s(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var l="local-forage-detect-blob-support",d=void 0,v={},h=Object.prototype.toString,p="readonly",y="readwrite";function b(e){return"boolean"==typeof d?a.resolve(d):function(e){return new a(function(n){var t=e.transaction(l,y),r=i([""]);t.objectStore(l).put(r,"key"),t.onabort=function(e){e.preventDefault(),e.stopPropagation(),n(!1)},t.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),t=navigator.userAgent.match(/Edge\//);n(t||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}(e).then(function(e){return d=e})}function g(e){var n=v[e.name],t={};t.promise=new a(function(e,n){t.resolve=e,t.reject=n}),n.deferredOperations.push(t),n.dbReady?n.dbReady=n.dbReady.then(function(){return t.promise}):n.dbReady=t.promise}function m(e){var n=v[e.name],t=n.deferredOperations.pop();if(t)return t.resolve(),t.promise}function _(e,n){var t=v[e.name],r=t.deferredOperations.pop();if(r)return r.reject(n),r.promise}function w(e,n){return new a(function(t,r){if(v[e.name]=v[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!n)return t(e.db);g(e),e.db.close()}var i=[e.name];n&&i.push(e.version);var a=o.open.apply(o,i);n&&(a.onupgradeneeded=function(n){var t=a.result;try{t.createObjectStore(e.storeName),n.oldVersion<=1&&t.createObjectStore(l)}catch(t){if("ConstraintError"!==t.name)throw t;console.warn('The database "'+e.name+'" has been upgraded from version '+n.oldVersion+" to version "+n.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){t(a.result),m(e)}})}function E(e){return w(e,!1)}function S(e){return w(e,!0)}function I(e,n){if(!e.db)return!0;var t=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==n&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||t){if(t){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function x(e){var n=function(e){for(var n=e.length,t=new ArrayBuffer(n),r=new Uint8Array(t),o=0;o<n;o++)r[o]=e.charCodeAt(o);return t}(atob(e.data));return i([n],{type:e.type})}function N(e){return e&&e.__local_forage_encoded_blob}function j(e){var n=this,t=n._initReady().then(function(){var e=v[n._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return c(t,e,e),t}function O(e,n,t,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,n);t(null,o)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),S(e)}).then(function(){return function(e){g(e);for(var n=v[e.name],t=n.forages,r=0;r<t.length;r++){var o=t[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,E(e).then(function(n){return e.db=n,I(e)?S(e):n}).then(function(r){e.db=n.db=r;for(var o=0;o<t.length;o++)t[o]._dbInfo.db=r}).catch(function(n){throw _(e,n),n})}(e).then(function(){O(e,n,t,r-1)})}).catch(t);t(o)}}var R={_driver:"asyncStorage",_initStorage:function(e){var n=this,t={db:null};if(e)for(var r in e)t[r]=e[r];var o=v[t.name];o||(o={forages:[],db:null,dbReady:null,deferredOperations:[]},v[t.name]=o),o.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=j);var i=[];function u(){return a.resolve()}for(var c=0;c<o.forages.length;c++){var f=o.forages[c];f!==n&&i.push(f._initReady().catch(u))}var s=o.forages.slice(0);return a.all(i).then(function(){return t.db=o.db,E(t)}).then(function(e){return t.db=e,I(t,n._defaultConfig.version)?S(t):e}).then(function(e){t.db=o.db=e,n._dbInfo=t;for(var r=0;r<s.length;r++){var i=s[r];i!==n&&(i._dbInfo.db=t.db,i._dbInfo.version=t.version)}})},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),n="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||n)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,n){var t=this,r=new a(function(n,r){t.ready().then(function(){O(t._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(t._dbInfo.storeName),u=a.openCursor(),c=1;u.onsuccess=function(){var t=u.result;if(t){var r=t.value;N(r)&&(r=x(r));var o=e(r,t.key,c++);void 0!==o?n(o):t.continue()}else n()},u.onerror=function(){r(u.error)}}catch(e){r(e)}})}).catch(r)});return u(r,n),r},getItem:function(e,n){var t=this;e=f(e);var r=new a(function(n,r){t.ready().then(function(){O(t._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(t._dbInfo.storeName),u=a.get(e);u.onsuccess=function(){var e=u.result;void 0===e&&(e=null),N(e)&&(e=x(e)),n(e)},u.onerror=function(){r(u.error)}}catch(e){r(e)}})}).catch(r)});return u(r,n),r},setItem:function(e,n,t){var r=this;e=f(e);var o=new a(function(t,o){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===h.call(n)?b(i.db).then(function(e){return e?n:(t=n,new a(function(e,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");e({__local_forage_encoded_blob:!0,data:r,type:t.type})},r.readAsBinaryString(t)}));var t}):n}).then(function(n){O(r._dbInfo,y,function(i,a){if(i)return o(i);try{var u=a.objectStore(r._dbInfo.storeName);null===n&&(n=void 0);var c=u.put(n,e);a.oncomplete=function(){void 0===n&&(n=null),t(n)},a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;o(e)}}catch(e){o(e)}})}).catch(o)});return u(o,t),o},removeItem:function(e,n){var t=this;e=f(e);var r=new a(function(n,r){t.ready().then(function(){O(t._dbInfo,y,function(o,i){if(o)return r(o);try{var a=i.objectStore(t._dbInfo.storeName),u=a.delete(e);i.oncomplete=function(){n()},i.onerror=function(){r(u.error)},i.onabort=function(){var e=u.error?u.error:u.transaction.error;r(e)}}catch(e){r(e)}})}).catch(r)});return u(r,n),r},clear:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){O(n._dbInfo,y,function(r,o){if(r)return t(r);try{var i=o.objectStore(n._dbInfo.storeName),a=i.clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;t(e)}}catch(e){t(e)}})}).catch(t)});return u(t,e),t},length:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){O(n._dbInfo,p,function(r,o){if(r)return t(r);try{var i=o.objectStore(n._dbInfo.storeName),a=i.count();a.onsuccess=function(){e(a.result)},a.onerror=function(){t(a.error)}}catch(e){t(e)}})}).catch(t)});return u(t,e),t},key:function(e,n){var t=this,r=new a(function(n,r){e<0?n(null):t.ready().then(function(){O(t._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(t._dbInfo.storeName),u=!1,c=a.openKeyCursor();c.onsuccess=function(){var t=c.result;t?0===e?n(t.key):u?n(t.key):(u=!0,t.advance(e)):n(null)},c.onerror=function(){r(c.error)}}catch(e){r(e)}})}).catch(r)});return u(r,n),r},keys:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){O(n._dbInfo,p,function(r,o){if(r)return t(r);try{var i=o.objectStore(n._dbInfo.storeName),a=i.openKeyCursor(),u=[];a.onsuccess=function(){var n=a.result;n?(u.push(n.key),n.continue()):e(u)},a.onerror=function(){t(a.error)}}catch(e){t(e)}})}).catch(t)});return u(t,e),t},dropInstance:function(e,n){n=s.apply(this,arguments);var t,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db,c=i?a.resolve(this._dbInfo.db):E(e).then(function(n){var t=v[e.name],r=t.forages;t.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n;return n});t=e.storeName?c.then(function(n){if(n.objectStoreNames.contains(e.storeName)){var t=n.version+1;g(e);var r=v[e.name],i=r.forages;n.close();for(var u=0;u<i.length;u++){var c=i[u];c._dbInfo.db=null,c._dbInfo.version=t}var f=new a(function(n,r){var i=o.open(e.name,t);i.onerror=function(e){var n=i.result;n.close(),r(e)},i.onupgradeneeded=function(){var n=i.result;n.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),n(e)}});return f.then(function(e){r.db=e;for(var n=0;n<i.length;n++){var t=i[n];t._dbInfo.db=e,m(t._dbInfo)}}).catch(function(n){throw(_(e,n)||a.resolve()).catch(function(){}),n})}}):c.then(function(n){g(e);var t=v[e.name],r=t.forages;n.close();for(var i=0;i<r.length;i++){var u=r[i];u._dbInfo.db=null}var c=new a(function(n,t){var r=o.deleteDatabase(e.name);r.onerror=r.onblocked=function(e){var n=r.result;n&&n.close(),t(e)},r.onsuccess=function(){var e=r.result;e&&e.close(),n(e)}});return c.then(function(e){t.db=e;for(var n=0;n<r.length;n++){var o=r[n];m(o._dbInfo)}}).catch(function(n){throw(_(e,n)||a.resolve()).catch(function(){}),n})})}else t=a.reject("Invalid arguments");return u(t,n),t}},D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A="~~local_forage_type~",T=/^~~local_forage_type~([^~]+)~/,k="__lfsc__:",B=k.length,C="arbf",L="blob",P="si08",F="ui08",M="uic8",z="si16",U="si32",q="ur16",W="ui32",H="fl32",G="fl64",V=B+C.length,K=Object.prototype.toString;function J(e){var n,t,r,o,i,a=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var f=new ArrayBuffer(a),s=new Uint8Array(f);for(n=0;n<u;n+=4)t=D.indexOf(e[n]),r=D.indexOf(e[n+1]),o=D.indexOf(e[n+2]),i=D.indexOf(e[n+3]),s[c++]=t<<2|r>>4,s[c++]=(15&r)<<4|o>>2,s[c++]=(3&o)<<6|63&i;return f}function Y(e){var n,t=new Uint8Array(e),r="";for(n=0;n<t.length;n+=3)r+=D[t[n]>>2],r+=D[(3&t[n])<<4|t[n+1]>>4],r+=D[(15&t[n+1])<<2|t[n+2]>>6],r+=D[63&t[n+2]];return t.length%3==2?r=r.substring(0,r.length-1)+"=":t.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var Q={serialize:function(e,n){var t="";if(e&&(t=K.call(e)),e&&("[object ArrayBuffer]"===t||e.buffer&&"[object ArrayBuffer]"===K.call(e.buffer))){var r,o=k;e instanceof ArrayBuffer?(r=e,o+=C):(r=e.buffer,"[object Int8Array]"===t?o+=P:"[object Uint8Array]"===t?o+=F:"[object Uint8ClampedArray]"===t?o+=M:"[object Int16Array]"===t?o+=z:"[object Uint16Array]"===t?o+=q:"[object Int32Array]"===t?o+=U:"[object Uint32Array]"===t?o+=W:"[object Float32Array]"===t?o+=H:"[object Float64Array]"===t?o+=G:n(new Error("Failed to get type for BinaryArray"))),n(o+Y(r))}else if("[object Blob]"===t){var i=new FileReader;i.onload=function(){var t=A+e.type+"~"+Y(this.result);n(k+L+t)},i.readAsArrayBuffer(e)}else try{n(JSON.stringify(e))}catch(t){console.error("Couldn't convert value into a JSON string: ",e),n(null,t)}},deserialize:function(e){if(e.substring(0,B)!==k)return JSON.parse(e);var n,t=e.substring(V),r=e.substring(B,V);if(r===L&&T.test(t)){var o=t.match(T);n=o[1],t=t.substring(o[0].length)}var a=J(t);switch(r){case C:return a;case L:return i([a],{type:n});case P:return new Int8Array(a);case F:return new Uint8Array(a);case M:return new Uint8ClampedArray(a);case z:return new Int16Array(a);case q:return new Uint16Array(a);case U:return new Int32Array(a);case W:return new Uint32Array(a);case H:return new Float32Array(a);case G:return new Float64Array(a);default:throw new Error("Unkown type: "+r)}},stringToBuffer:J,bufferToString:Y};function X(e,n,t,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+n.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],t,r)}function Z(e,n,t,r,o,i){e.executeSql(t,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[n.storeName],function(e,u){u.rows.length?i(e,a):X(e,n,function(){e.executeSql(t,r,o,i)},i)},i):i(e,a)},i)}var $={_driver:"webSQLStorage",_initStorage:function(e){var n=this,t={db:null};if(e)for(var r in e)t[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new a(function(e,r){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(e){return r(e)}t.db.transaction(function(o){X(o,t,function(){n._dbInfo=t,e()},function(e,n){r(n)})},r)});return t.serializer=Q,o},_support:"function"==typeof openDatabase,iterate:function(e,n){var t=this,r=new a(function(n,r){t.ready().then(function(){var o=t._dbInfo;o.db.transaction(function(t){Z(t,o,"SELECT * FROM "+o.storeName,[],function(t,r){for(var i=r.rows,a=i.length,u=0;u<a;u++){var c=i.item(u),f=c.value;if(f&&(f=o.serializer.deserialize(f)),void 0!==(f=e(f,c.key,u+1)))return void n(f)}n()},function(e,n){r(n)})})}).catch(r)});return u(r,n),r},getItem:function(e,n){var t=this;e=f(e);var r=new a(function(n,r){t.ready().then(function(){var o=t._dbInfo;o.db.transaction(function(t){Z(t,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,t){var r=t.rows.length?t.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),n(r)},function(e,n){r(n)})})}).catch(r)});return u(r,n),r},setItem:function(e,n,t){return function e(n,t,r,o){var i=this;n=f(n);var c=new a(function(a,u){i.ready().then(function(){void 0===t&&(t=null);var c=t,f=i._dbInfo;f.serializer.serialize(t,function(t,s){s?u(s):f.db.transaction(function(e){Z(e,f,"INSERT OR REPLACE INTO "+f.storeName+" (key, value) VALUES (?, ?)",[n,t],function(){a(c)},function(e,n){u(n)})},function(t){if(t.code===t.QUOTA_ERR){if(o>0)return void a(e.apply(i,[n,c,r,o-1]));u(t)}})})}).catch(u)});return u(c,r),c}.apply(this,[e,n,t,1])},removeItem:function(e,n){var t=this;e=f(e);var r=new a(function(n,r){t.ready().then(function(){var o=t._dbInfo;o.db.transaction(function(t){Z(t,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){n()},function(e,n){r(n)})})}).catch(r)});return u(r,n),r},clear:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){Z(n,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,n){t(n)})})}).catch(t)});return u(t,e),t},length:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){Z(n,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(n,t){var r=t.rows.item(0).c;e(r)},function(e,n){t(n)})})}).catch(t)});return u(t,e),t},key:function(e,n){var t=this,r=new a(function(n,r){t.ready().then(function(){var o=t._dbInfo;o.db.transaction(function(t){Z(t,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,t){var r=t.rows.length?t.rows.item(0).key:null;n(r)},function(e,n){r(n)})})}).catch(r)});return u(r,n),r},keys:function(e){var n=this,t=new a(function(e,t){n.ready().then(function(){var r=n._dbInfo;r.db.transaction(function(n){Z(n,r,"SELECT key FROM "+r.storeName,[],function(n,t){for(var r=[],o=0;o<t.rows.length;o++)r.push(t.rows.item(o).key);e(r)},function(e,n){t(n)})})}).catch(t)});return u(t,e),t},dropInstance:function(e,n){n=s.apply(this,arguments);var t=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var r,o=this;return u(r=e.name?new a(function(n){var r;r=e.name===t.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?n({db:r,storeNames:[e.storeName]}):n(function(e){return new a(function(n,t){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(t,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);n({db:e,storeNames:o})},function(e,n){t(n)})},function(e){t(e)})})}(r))}).then(function(e){return new a(function(n,t){e.db.transaction(function(r){function o(e){return new a(function(n,t){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){n()},function(e,n){t(n)})})}for(var i=[],u=0,c=e.storeNames.length;u<c;u++)i.push(o(e.storeNames[u]));a.all(i).then(function(){n()}).catch(function(e){t(e)})},function(e){t(e)})})}):a.reject("Invalid arguments"),n),r}};function ee(e,n){var t=e.name+"/";return e.storeName!==n.storeName&&(t+=e.storeName+"/"),t}function ne(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var te={_driver:"localStorageWrapper",_initStorage:function(e){var n={};if(e)for(var t in e)n[t]=e[t];return n.keyPrefix=ee(e,this._defaultConfig),ne()?(this._dbInfo=n,n.serializer=Q,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,n){var t=this,r=t.ready().then(function(){for(var n=t._dbInfo,r=n.keyPrefix,o=r.length,i=localStorage.length,a=1,u=0;u<i;u++){var c=localStorage.key(u);if(0===c.indexOf(r)){var f=localStorage.getItem(c);if(f&&(f=n.serializer.deserialize(f)),void 0!==(f=e(f,c.substring(o),a++)))return f}}});return u(r,n),r},getItem:function(e,n){var t=this;e=f(e);var r=t.ready().then(function(){var n=t._dbInfo,r=localStorage.getItem(n.keyPrefix+e);return r&&(r=n.serializer.deserialize(r)),r});return u(r,n),r},setItem:function(e,n,t){var r=this;e=f(e);var o=r.ready().then(function(){void 0===n&&(n=null);var t=n;return new a(function(o,i){var a=r._dbInfo;a.serializer.serialize(n,function(n,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,n),o(t)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}})})});return u(o,t),o},removeItem:function(e,n){var t=this;e=f(e);var r=t.ready().then(function(){var n=t._dbInfo;localStorage.removeItem(n.keyPrefix+e)});return u(r,n),r},clear:function(e){var n=this,t=n.ready().then(function(){for(var e=n._dbInfo.keyPrefix,t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}});return u(t,e),t},length:function(e){var n=this.keys().then(function(e){return e.length});return u(n,e),n},key:function(e,n){var t=this,r=t.ready().then(function(){var n,r=t._dbInfo;try{n=localStorage.key(e)}catch(e){n=null}return n&&(n=n.substring(r.keyPrefix.length)),n});return u(r,n),r},keys:function(e){var n=this,t=n.ready().then(function(){for(var e=n._dbInfo,t=localStorage.length,r=[],o=0;o<t;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return u(t,e),t},dropInstance:function(e,n){if(n=s.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}var r,o=this;return u(r=e.name?new a(function(n){e.storeName?n(ee(e,o._defaultConfig)):n(e.name+"/")}).then(function(e){for(var n=localStorage.length-1;n>=0;n--){var t=localStorage.key(n);0===t.indexOf(e)&&localStorage.removeItem(t)}}):a.reject("Invalid arguments"),n),r}},re=function(e,n){for(var t=e.length,r=0;r<t;){if((o=e[r])===(i=n)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;r++}var o,i;return!1},oe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ie={},ae={},ue={INDEXEDDB:R,WEBSQL:$,LOCALSTORAGE:te},ce=[ue.INDEXEDDB._driver,ue.WEBSQL._driver,ue.LOCALSTORAGE._driver],fe=["dropInstance"],se=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(fe),le={description:"",driver:ce.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function de(e,n){e[n]=function(){var t=arguments;return e.ready().then(function(){return e[n].apply(e,t)})}}function ve(){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var t in n)n.hasOwnProperty(t)&&(oe(n[t])?arguments[0][t]=n[t].slice():arguments[0][t]=n[t])}return arguments[0]}var he=function(){function e(n){for(var t in function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),ue)if(ue.hasOwnProperty(t)){var r=ue[t],o=r._driver;this[t]=o,ie[o]||this.defineDriver(r)}this._defaultConfig=ve({},le),this._config=ve({},this._defaultConfig,n),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var n in e){if("storeName"===n&&(e[n]=e[n].replace(/\W/g,"_")),"version"===n&&"number"!=typeof e[n])return new Error("Database version must be a number.");this._config[n]=e[n]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,n,t){var r=new a(function(n,t){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void t(o);for(var i=se.concat("_initStorage"),c=0,f=i.length;c<f;c++){var s=i[c],l=!re(fe,s);if((l||e[s])&&"function"!=typeof e[s])return void t(o)}!function(){for(var n=function(e){return function(){var n=new Error("Method "+e+" is not implemented by the current driver"),t=a.reject(n);return u(t,arguments[arguments.length-1]),t}},t=0,r=fe.length;t<r;t++){var o=fe[t];e[o]||(e[o]=n(o))}}();var d=function(t){ie[r]&&console.info("Redefining LocalForage driver: "+r),ie[r]=e,ae[r]=t,n()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,t):d(!!e._support):d(!0)}catch(e){t(e)}});return c(r,n,t),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,n,t){var r=ie[e]?a.resolve(ie[e]):a.reject(new Error("Driver not found."));return c(r,n,t),r},e.prototype.getSerializer=function(e){var n=a.resolve(Q);return c(n,e),n},e.prototype.ready=function(e){var n=this,t=n._driverSet.then(function(){return null===n._ready&&(n._ready=n._initDriver()),n._ready});return c(t,e,e),t},e.prototype.setDriver=function(e,n,t){var r=this;oe(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function u(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}var f=null!==this._driverSet?this._driverSet.catch(function(){return a.resolve()}):a.resolve();return this._driverSet=f.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var n=0;return function t(){for(;n<e.length;){var o=e[n];return n++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(u).catch(t)}i();var c=new Error("No available storage method found.");return r._driverSet=a.reject(c),r._driverSet}()}}(o)})}).catch(function(){i();var e=new Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet}),c(this._driverSet,n,t),this._driverSet},e.prototype.supports=function(e){return!!ae[e]},e.prototype._extend=function(e){ve(this,e)},e.prototype._getSupportedDrivers=function(e){for(var n=[],t=0,r=e.length;t<r;t++){var o=e[t];this.supports(o)&&n.push(o)}return n},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,n=se.length;e<n;e++)de(this,se[e])},e.prototype.createInstance=function(n){return new e(n)},e}(),pe=new he;n.exports=pe},{3:3}]},{},[4])(4)});var w=function(){function e(n){var t=this;void 0===n&&(n={}),this.name=e.id,this.global=c(),this.maxStoredEvents=n.maxStoredEvents||30,this.offlineEventStore=(void 0)({name:"sentry/offlineEventStore"}),"addEventListener"in this.global&&this.global.addEventListener("online",function(){t._sendEvents().catch(function(){g.warn("could not send cached events")})})}return e.prototype.setupOnce=function(n,t){var r=this;this.hub=t(),n(function(n){return r.hub&&r.hub.getIntegration(e)&&"navigator"in r.global&&"onLine"in r.global.navigator&&!r.global.navigator.onLine?(r._cacheEvent(n).then(function(e){return r._enforceMaxEvents()}).catch(function(e){g.warn("could not cache event while offline")}),null):n}),"navigator"in this.global&&"onLine"in this.global.navigator&&this.global.navigator.onLine&&this._sendEvents().catch(function(){g.warn("could not send cached events")})},e.prototype._cacheEvent=function(e){return r(this,void 0,void 0,function(){return o(this,function(n){return[2,this.offlineEventStore.setItem(f(),e)]})})},e.prototype._enforceMaxEvents=function(){return r(this,void 0,void 0,function(){var e,n=this;return o(this,function(t){return e=[],[2,this.offlineEventStore.iterate(function(n,t,r){e.push({cacheKey:t,event:n})}).then(function(){return n._purgeEvents(e.sort(function(e,n){return(n.event.timestamp||0)-(e.event.timestamp||0)}).slice(n.maxStoredEvents<e.length?n.maxStoredEvents:e.length).map(function(e){return e.cacheKey}))}).catch(function(e){g.warn("could not enforce max events")})]})})},e.prototype._purgeEvent=function(e){return r(this,void 0,void 0,function(){return o(this,function(n){return[2,this.offlineEventStore.removeItem(e)]})})},e.prototype._purgeEvents=function(e){return r(this,void 0,void 0,function(){var n=this;return o(this,function(t){return[2,Promise.all(e.map(function(e){return n._purgeEvent(e)})).then()]})})},e.prototype._sendEvents=function(){return r(this,void 0,void 0,function(){var e=this;return o(this,function(n){return[2,this.offlineEventStore.iterate(function(n,t,r){e.hub?e.hub.captureEvent(n)&&e._purgeEvent(t).catch(function(e){g.warn("could not purge event from cache")}):g.warn("no hub found - could not send cached event")})]})})},e.id="Offline",e}();for(var E in n.Offline=w,e.Sentry=e.Sentry||{},e.Sentry.Integrations=e.Sentry.Integrations||{},n)Object.prototype.hasOwnProperty.call(n,E)&&(e.Sentry.Integrations[E]=n[E])}(window);
!function(n){var t={};Object.defineProperty(t,"__esModule",{value:!0});var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(n,t)};function r(n,t,e,r){return new(e||(e=Promise))(function(o,i){function c(n){try{a(r.next(n))}catch(n){i(n)}}function u(n){try{a(r.throw(n))}catch(n){i(n)}}function a(n){n.done?o(n.value):new e(function(t){t(n.value)}).then(c,u)}a((r=r.apply(n,t||[])).next())})}function o(n,t){var e,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;c;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(n,c)}catch(n){i=[6,n],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,t){return n.__proto__=t,n}:function(n,t){for(var e in t)n.hasOwnProperty(e)||(n[e]=t[e]);return n});!function(n){function t(t){var e=this.constructor,r=n.call(this,t)||this;return r.message=t,r.name=e.prototype.constructor.name,i(r,e.prototype),r}(function(n,t){function r(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})(t,n)}(Error);function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var u={};function a(){return c()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:u}function f(){var n=a(),t=n.crypto||n.msCrypto;if(void 0!==t&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var r=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t};return r(e[0])+r(e[1])+r(e[2])+r(e[3])+r(e[4])+r(e[5])+r(e[6])+r(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=16*Math.random()|0;return("x"===n?t:3&t|8).toString(16)})}function s(n){var t=a();if(!("console"in t))return n();var e=t.console,r={};["debug","info","warn","error","log","assert"].forEach(function(n){n in t.console&&e[n].__sentry_original__&&(r[n]=e[n],e[n]=e[n].__sentry_original__)});var o=n();return Object.keys(r).forEach(function(n){e[n]=r[n]}),o}var l=Date.now(),h=0,v={now:function(){var n=Date.now()-l;return n<h&&(n=h),h=n,n},timeOrigin:l},p=(function(){if(c())try{return(n=module,t="perf_hooks",n.require(t)).performance}catch(n){return v}var n,t,e=a().performance;e&&e.now&&(void 0===e.timeOrigin&&(e.timeOrigin=e.timing&&e.timing.navigationStart||l))}(),a()),d="Sentry Logger ",_=function(){function n(){this._enabled=!1}return n.prototype.disable=function(){this._enabled=!1},n.prototype.enable=function(){this._enabled=!0},n.prototype.log=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this._enabled&&s(function(){p.console.log(d+"[Log]: "+n.join(" "))})},n.prototype.warn=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this._enabled&&s(function(){p.console.warn(d+"[Warn]: "+n.join(" "))})},n.prototype.error=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this._enabled&&s(function(){p.console.error(d+"[Error]: "+n.join(" "))})},n}();p.__SENTRY__=p.__SENTRY__||{};var y,g=p.__SENTRY__.logger||(p.__SENTRY__.logger=new _);!function(n){n.PENDING="PENDING",n.RESOLVED="RESOLVED",n.REJECTED="REJECTED"}(y||(y={}));(function(){function n(n){var t=this;this._state=y.PENDING,this._handlers=[],this._resolve=function(n){t._setResult(y.RESOLVED,n)},this._reject=function(n){t._setResult(y.REJECTED,n)},this._setResult=function(n,e){var r;t._state===y.PENDING&&(r=e,Boolean(r&&r.then&&"function"==typeof r.then)?e.then(t._resolve,t._reject):(t._state=n,t._value=e,t._executeHandlers()))},this._attachHandler=function(n){t._handlers=t._handlers.concat(n),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==y.PENDING){var n=t._handlers.slice();t._handlers=[],n.forEach(function(n){n.done||(t._state===y.RESOLVED&&n.onfulfilled&&n.onfulfilled(t._value),t._state===y.REJECTED&&n.onrejected&&n.onrejected(t._value),n.done=!0)})}};try{n(this._resolve,this._reject)}catch(n){this._reject(n)}}n.resolve=function(t){return new n(function(n){n(t)})},n.reject=function(t){return new n(function(n,e){e(t)})},n.all=function(t){return new n(function(e,r){if(Array.isArray(t))if(0!==t.length){var o=t.length,i=[];t.forEach(function(t,c){n.resolve(t).then(function(n){i[c]=n,0===(o-=1)&&e(i)}).then(null,r)})}else e([]);else r(new TypeError("Promise.all requires an array as input."))})},n.prototype.then=function(t,e){var r=this;return new n(function(n,o){r._attachHandler({done:!1,onfulfilled:function(e){if(t)try{return void n(t(e))}catch(n){return void o(n)}else n(e)},onrejected:function(t){if(e)try{return void n(e(t))}catch(n){return void o(n)}else o(t)}})})},n.prototype.catch=function(n){return this.then(function(n){return n},n)},n.prototype.finally=function(t){var e=this;return new n(function(n,r){var o,i;return e.then(function(n){i=!1,o=n,t&&t()},function(n){i=!0,o=n,t&&t()}).then(function(){i?r(o):n(o)})})},n.prototype.toString=function(){return"[object SyncPromise]"}})(),a();var E=require("localforage"),b=function(){function n(t){var e=this;void 0===t&&(t={}),this.name=n.id,this.global=a(),this.maxStoredEvents=t.maxStoredEvents||30,this.offlineEventStore=E.createInstance({name:"sentry/offlineEventStore"}),"addEventListener"in this.global&&this.global.addEventListener("online",function(){e._sendEvents().catch(function(){g.warn("could not send cached events")})})}return n.prototype.setupOnce=function(t,e){var r=this;this.hub=e(),t(function(t){return r.hub&&r.hub.getIntegration(n)&&"navigator"in r.global&&"onLine"in r.global.navigator&&!r.global.navigator.onLine?(r._cacheEvent(t).then(function(n){return r._enforceMaxEvents()}).catch(function(n){g.warn("could not cache event while offline")}),null):t}),"navigator"in this.global&&"onLine"in this.global.navigator&&this.global.navigator.onLine&&this._sendEvents().catch(function(){g.warn("could not send cached events")})},n.prototype._cacheEvent=function(n){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,this.offlineEventStore.setItem(f(),n)]})})},n.prototype._enforceMaxEvents=function(){return r(this,void 0,void 0,function(){var n,t=this;return o(this,function(e){return n=[],[2,this.offlineEventStore.iterate(function(t,e,r){n.push({cacheKey:e,event:t})}).then(function(){return t._purgeEvents(n.sort(function(n,t){return(t.event.timestamp||0)-(n.event.timestamp||0)}).slice(t.maxStoredEvents<n.length?t.maxStoredEvents:n.length).map(function(n){return n.cacheKey}))}).catch(function(n){g.warn("could not enforce max events")})]})})},n.prototype._purgeEvent=function(n){return r(this,void 0,void 0,function(){return o(this,function(t){return[2,this.offlineEventStore.removeItem(n)]})})},n.prototype._purgeEvents=function(n){return r(this,void 0,void 0,function(){var t=this;return o(this,function(e){return[2,Promise.all(n.map(function(n){return t._purgeEvent(n)})).then()]})})},n.prototype._sendEvents=function(){return r(this,void 0,void 0,function(){var n=this;return o(this,function(t){return[2,this.offlineEventStore.iterate(function(t,e,r){n.hub?n.hub.captureEvent(t)&&n._purgeEvent(e).catch(function(n){g.warn("could not purge event from cache")}):g.warn("no hub found - could not send cached event")})]})})},n.id="Offline",n}();for(var x in t.Offline=b,n.Sentry=n.Sentry||{},n.Sentry.Integrations=n.Sentry.Integrations||{},t)Object.prototype.hasOwnProperty.call(t,x)&&(n.Sentry.Integrations[x]=t[x])}(window);
//# sourceMappingURL=offline.min.js.map
import { EventProcessor, Hub, Integration } from '@sentry/types';
import * as localForageType from 'localforage';
/**

@@ -29,3 +30,3 @@ * cache offline errors and send when connected

*/
offlineEventStore: LocalForage;
offlineEventStore: typeof localForageType;
/**

@@ -32,0 +33,0 @@ * @inheritDoc

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils_1 = require("@sentry/utils");
var localForage = require("localforage");
// eslint-disable-next-line @typescript-eslint/no-var-requires
var localForage = require('localforage');
/**

@@ -21,2 +22,3 @@ * cache offline errors and send when connected

this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
this.offlineEventStore = localForage.createInstance({

@@ -23,0 +25,0 @@ name: 'sentry/offlineEventStore',

import { EventProcessor, Hub, Integration } from '@sentry/types';
import * as localForageType from 'localforage';
/**

@@ -29,3 +30,3 @@ * cache offline errors and send when connected

*/
offlineEventStore: LocalForage;
offlineEventStore: typeof localForageType;
/**

@@ -32,0 +33,0 @@ * @inheritDoc

import { __awaiter, __generator } from "tslib";
import { getGlobalObject, logger, uuid4 } from '@sentry/utils';
import * as localForage from 'localforage';
// eslint-disable-next-line @typescript-eslint/no-var-requires
var localForage = require('localforage');
/**

@@ -20,2 +21,3 @@ * cache offline errors and send when connected

this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
this.offlineEventStore = localForage.createInstance({

@@ -22,0 +24,0 @@ name: 'sentry/offlineEventStore',

{
"name": "@sentry/integrations",
"version": "5.22.1",
"version": "5.22.2",
"description": "Pluggable integrations that can be used to enhance JS SDKs",

@@ -19,9 +19,9 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/types": "5.22.1",
"@sentry/utils": "5.22.1",
"localforage": "^1.8.1",
"@sentry/types": "5.22.2",
"@sentry/utils": "5.22.2",
"localforage": "1.8.1",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "5.22.1",
"@sentry-internal/eslint-config-sdk": "5.22.2",
"chai": "^4.1.2",

@@ -28,0 +28,0 @@ "eslint": "7.6.0",

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 not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc