You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@amplitude/plugin-network-capture-browser

Package Overview
Dependencies
Maintainers
11
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/plugin-network-capture-browser - npm Package Compare versions

Comparing version

to
1.2.0

3

lib/cjs/network-capture-plugin.d.ts

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

import { BrowserClient, BrowserConfig, EnrichmentPlugin, ElementInteractionsOptions, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { BrowserClient, BrowserConfig, EnrichmentPlugin, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { Observable } from 'rxjs';

@@ -10,3 +10,2 @@ import { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';

export type BrowserEnrichmentPlugin = EnrichmentPlugin<BrowserClient, BrowserConfig>;
export type AutoCaptureOptionsWithDefaults = Required<Pick<ElementInteractionsOptions, 'debounceTime' | 'cssSelectorAllowlist' | 'actionClickAllowlist'>> & ElementInteractionsOptions;
export declare enum ObservablesEnum {

@@ -13,0 +12,0 @@ NetworkObservable = "networkObservable"

@@ -15,2 +15,3 @@ import { BrowserClient, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';

['[Amplitude] Response Body Size']?: number;
['[Amplitude] Request Type']?: 'xhr' | 'fetch';
};

@@ -17,0 +18,0 @@ export declare function trackNetworkEvents({ allObservables, networkTrackingOptions, amplitude, }: {

@@ -57,2 +57,5 @@ "use strict";

var _a;
if (!url) {
return;
}
try {

@@ -129,2 +132,3 @@ /* istanbul ignore next */

var _a;
var _b, _c;
var request = networkEvent.event;

@@ -141,2 +145,5 @@ // convert to NetworkAnalyticsEvent

}
var responseBodySize = (_b = request.responseWrapper) === null || _b === void 0 ? void 0 : _b.bodySize;
/* istanbul ignore next */
var requestBodySize = (_c = request.requestWrapper) === null || _c === void 0 ? void 0 : _c.bodySize;
var networkAnalyticsEvent = (_a = {},

@@ -151,4 +158,5 @@ _a['[Amplitude] URL'] = urlObj.hrefWithoutQueryOrHash,

_a['[Amplitude] Duration'] = request.duration,
_a['[Amplitude] Request Body Size'] = request.requestBodySize,
_a['[Amplitude] Response Body Size'] = request.responseBodySize,
_a['[Amplitude] Request Body Size'] = requestBodySize,
_a['[Amplitude] Response Body Size'] = responseBodySize,
_a['[Amplitude] Request Type'] = request.type,
_a);

@@ -155,0 +163,0 @@ /* istanbul ignore next */

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

export declare const VERSION = "1.1.4";
export declare const VERSION = "1.2.0";
//# sourceMappingURL=version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '1.1.4';
exports.VERSION = '1.2.0';
//# sourceMappingURL=version.js.map

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

import { BrowserClient, BrowserConfig, EnrichmentPlugin, ElementInteractionsOptions, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { BrowserClient, BrowserConfig, EnrichmentPlugin, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { Observable } from 'rxjs';

@@ -10,3 +10,2 @@ import { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';

export type BrowserEnrichmentPlugin = EnrichmentPlugin<BrowserClient, BrowserConfig>;
export type AutoCaptureOptionsWithDefaults = Required<Pick<ElementInteractionsOptions, 'debounceTime' | 'cssSelectorAllowlist' | 'actionClickAllowlist'>> & ElementInteractionsOptions;
export declare enum ObservablesEnum {

@@ -13,0 +12,0 @@ NetworkObservable = "networkObservable"

@@ -15,2 +15,3 @@ import { BrowserClient, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';

['[Amplitude] Response Body Size']?: number;
['[Amplitude] Request Type']?: 'xhr' | 'fetch';
};

@@ -17,0 +18,0 @@ export declare function trackNetworkEvents({ allObservables, networkTrackingOptions, amplitude, }: {

@@ -54,2 +54,5 @@ import { __read, __spreadArray, __values } from "tslib";

var _a;
if (!url) {
return;
}
try {

@@ -125,2 +128,3 @@ /* istanbul ignore next */

var _a;
var _b, _c;
var request = networkEvent.event;

@@ -137,2 +141,5 @@ // convert to NetworkAnalyticsEvent

}
var responseBodySize = (_b = request.responseWrapper) === null || _b === void 0 ? void 0 : _b.bodySize;
/* istanbul ignore next */
var requestBodySize = (_c = request.requestWrapper) === null || _c === void 0 ? void 0 : _c.bodySize;
var networkAnalyticsEvent = (_a = {},

@@ -147,4 +154,5 @@ _a['[Amplitude] URL'] = urlObj.hrefWithoutQueryOrHash,

_a['[Amplitude] Duration'] = request.duration,
_a['[Amplitude] Request Body Size'] = request.requestBodySize,
_a['[Amplitude] Response Body Size'] = request.responseBodySize,
_a['[Amplitude] Request Body Size'] = requestBodySize,
_a['[Amplitude] Response Body Size'] = responseBodySize,
_a['[Amplitude] Request Type'] = request.type,
_a);

@@ -151,0 +159,0 @@ /* istanbul ignore next */

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

export declare const VERSION = "1.1.5";
export declare const VERSION = "1.2.0";
//# sourceMappingURL=version.d.ts.map

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

export var VERSION = '1.1.5';
export var VERSION = '1.2.0';
//# sourceMappingURL=version.js.map

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

var amplitudeNetworkCapturePlugin=function(t){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},e(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function n(t,e,r,n){return new(r||(r=Promise))((function(i,o){function u(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(u,s)}c((n=n.apply(t,e||[])).next())}))}function i(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function o(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function s(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var c=function(){var t="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},a=s([],u(Array(256).keys()),!1).map((function(t){return t.toString(16).padStart(2,"0")})),l=function(t){var e,r=c();if(!(null===(e=null==r?void 0:r.crypto)||void 0===e?void 0:e.getRandomValues))return function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,l)}(t);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,s([],u(n.entries()),!1).map((function(t){var e=u(t,2),r=e[0],n=e[1];return[4,6,8,10].includes(r)?"-".concat(a[n]):a[n]})).join("")};function f(t){var e,r,n=c();if(null==n?void 0:n.TextEncoder){var i=n.TextEncoder;if("string"==typeof t)return(new i).encode(t).length;if(t instanceof Blob)return t.size;if(t instanceof URLSearchParams)return(new i).encode(t.toString()).length;if(t instanceof ArrayBuffer)return t.byteLength;if(ArrayBuffer.isView(t))return t.byteLength;if(t instanceof FormData){var s=t,a=0,l=0;try{for(var f=o(s.entries()),h=f.next();!h.done;h=f.next()){var p=u(h.value,2),d=p[0],v=p[1];if(a+=d.length,"string"==typeof v?a+=(new i).encode(v).length:v.size&&(a+=v.size),++l>=100)return}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}return a}}}var h=function(t,e){void 0===e&&(e=l()),this.callback=t,this.id=e},p=new(function(){function t(e){var r;this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var n=c();t.isSupported()&&(this.globalScope=n,this.originalFetch=null===(r=this.globalScope)||void 0===r?void 0:r.fetch)}return t.isSupported=function(){var t=c();return!!t&&!!t.fetch},t.prototype.subscribe=function(t,e){this.logger||(this.logger=e),this.eventCallbacks.set(t.id,t),this.isObserving||(this.observeFetch(),this.isObserving=!0)},t.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id),this.originalFetch&&this.globalScope&&0===this.eventCallbacks.size&&this.isObserving&&(this.globalScope.fetch=this.originalFetch,this.isObserving=!1)},t.prototype.triggerEventCallbacks=function(t){var e=this;this.eventCallbacks.forEach((function(r){var n;try{r.callback(t)}catch(t){null===(n=e.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",t)}}))},t.prototype.observeFetch=function(){var t=this;if(this.globalScope&&this.originalFetch){var e=this.globalScope.fetch;this.globalScope.fetch=function(r,o){return n(t,void 0,void 0,(function(){var t,n,u,s,c,a,l,h,p;return i(this,(function(i){switch(i.label){case 0:t=Date.now(),n=performance.now(),u={timestamp:t,startTime:t,type:"fetch",method:(null==o?void 0:o.method)||"GET",url:r.toString(),requestHeaders:null==o?void 0:o.headers,requestBodySize:f(null==o?void 0:o.body)},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e(r,o)];case 2:return s=i.sent(),u.status=s.status,u.duration=Math.floor(performance.now()-n),u.startTime=t,u.endTime=Math.floor(t+u.duration),c={},a=void 0,s.headers.forEach((function(t,e){c[e]=t,"content-length"===e&&(a=parseInt(t,10)||void 0)})),u.responseHeaders=c,u.responseBodySize=a,this.triggerEventCallbacks(u),[2,s];case 3:throw l=i.sent(),h=Date.now(),u.duration=h-t,p=l,u.error={name:p.name||"UnknownError",message:p.message||"An unknown error occurred"},"AbortError"===p.name&&(u.error.name="AbortError",u.status=0),this.triggerEventCallbacks(u),l;case 4:return[2]}}))}))}}},t}());function d(t){return"function"==typeof t}function v(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var y=v((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function b(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var m=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var a=o(c),l=a.next();!l.done;l=a.next()){l.value.remove(this)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else c.remove(this);var f=this.initialTeardown;if(d(f))try{f()}catch(t){i=t instanceof y?t.errors:[t]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=o(h),v=p.next();!v.done;v=p.next()){var b=v.value;try{_(b)}catch(t){i=null!=i?i:[],t instanceof y?i=s(s([],u(i)),u(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}if(i)throw new y(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)_(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&b(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&b(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),w=m.EMPTY;function g(t){return t instanceof m||t&&"closed"in t&&d(t.remove)&&d(t.add)&&d(t.unsubscribe)}function _(t){d(t)?t():t.unsubscribe()}var x={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},S=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,s([t,e],u(r)))};function A(){}function E(t){t()}var k=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,g(e)&&e.add(r)):r.destination=P,r}return r(e,t),e.create=function(t,e,r){return new I(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(m),O=Function.prototype.bind;function T(t,e){return O.call(t,e)}var C=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){F(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){F(t)}else F(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){F(t)}},t}(),I=function(t){function e(e,r,n){var i,o,u=t.call(this)||this;d(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&x.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return u.unsubscribe()},i={next:e.next&&T(e.next,o),error:e.error&&T(e.error,o),complete:e.complete&&T(e.complete,o)}):i=e;return u.destination=new C(i),u}return r(e,t),e}(k);function F(t){var e;e=t,S((function(){throw e}))}var P={closed:!0,next:A,error:function(t){throw t},complete:A},q="function"==typeof Symbol&&Symbol.observable||"@@observable";function j(t){return t}var z=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof k||function(t){return t&&d(t.next)&&d(t.error)&&d(t.complete)}(n)&&g(n)?t:new I(t,e,r);return E((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=R(e))((function(e,n){var i=new I({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[q]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?j:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=R(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function R(t){var e;return null!==(e=null!=t?t:x.Promise)&&void 0!==e?e:Promise}function U(t){return d(null==t?void 0:t.lift)}function M(t){return function(e){if(U(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}function B(t,e,r,n,i){return new N(t,e,r,n,i)}var N=function(t){function e(e,r,n,i,o,u){var s=t.call(this,e)||this;return s.onFinalize=o,s.shouldUnsubscribe=u,s._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return r(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(k);!function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,U(e)&&(n.lift=e.lift),n}r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new m;var r=this.getSubject();e.add(this.source.subscribe(B(r,void 0,(function(){t._teardown(),r.complete()}),(function(e){t._teardown(),r.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=m.EMPTY)}return e},e.prototype.refCount=function(){return M((function(t,e){var r=null;t._refCount++;var n=B(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)r=null;else{var n=t._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),e.unsubscribe()}}));t.subscribe(n),n.closed||(r=t.connect())}))(this)}}(z);var D,V={now:function(){return(V.delegate||performance).now()},delegate:void 0},L={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=e((function(e){r=void 0,t(e)}));return new m((function(){return null==r?void 0:r(n)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=L.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,s([],u(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,s([],u(t)))},delegate:void 0};new z((function(t){var e=D||V,r=e.now(),n=0,i=function(){t.closed||(n=L.requestAnimationFrame((function(o){n=0;var u=e.now();t.next({timestamp:D?u:o,elapsed:u-r}),i()})))};return i(),function(){n&&L.cancelAnimationFrame(n)}}));var W=v((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),H=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r(e,t),e.prototype.lift=function(t){var e=new Y(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new W},e.prototype.next=function(t){var e=this;E((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=o(e.currentObservers),u=i.next();!u.done;u=i.next()){u.value.next(t)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;E((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?w:(this.currentObservers=null,o.push(t),new m((function(){e.currentObservers=null,b(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new z;return t.source=this,t},e.create=function(t,e){return new Y(t,e)},e}(z),Y=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return r(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:w},e}(H);!function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){var t=this,e=t.hasError,r=t.thrownError,n=t._value;if(e)throw r;return this._throwIfClosed(),n},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(H);var Q={now:function(){return(Q.delegate||Date).now()},delegate:void 0};!function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Q);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}r(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,u=r._timestampProvider,s=r._windowTime;n||(i.push(e),!o&&i.push(u.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var u=r.now(),s=0,c=1;c<n.length&&n[c]<=u;c+=2)s=c;s&&n.splice(0,s+1)}}}(H),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}r(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e._hasValue,i=e._value,o=e.thrownError,u=e.isStopped,s=e._isComplete;r?t.error(o):(u||s)&&(n&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))}}(H);var $,G=function(t){function e(e,r){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return this},e}(m),X=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,s([t,e],u(r)))},J=function(t){return clearInterval(t)},K=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return r(e,t),e.prototype.schedule=function(t,e){var r;if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),X(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&J(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,b(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(G),Z=1,tt={};function et(t){return t in tt&&(delete tt[t],!0)}var rt=function(t){var e=Z++;return tt[e]=!0,$||($=Promise.resolve()),$.then((function(){return et(e)&&t()})),e},nt=function(t){et(t)},it={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=it.delegate;return((null==r?void 0:r.setImmediate)||rt).apply(void 0,s([],u(t)))},clearImmediate:function(t){return nt(t)},delegate:void 0},ot=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=it.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(it.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))},e}(K),ut=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=Q.now,t}(),st=function(t){function e(e,r){void 0===r&&(r=ut.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return r(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(ut),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(st);new ct(ot),new st(K);var at=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},e}(K),lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(st);new lt(at);var ft=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=L.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&r===e._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(L.cancelAnimationFrame(r),e._scheduled=void 0)},e}(K),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){var e;this._active=!0,t?e=t.id:(e=this._scheduled,this._scheduled=void 0);var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(st);new ht(ft),function(t){function e(e,r){void 0===e&&(e=dt),void 0===r&&(r=1/0);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(st);var pt,dt=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return r(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return m.EMPTY},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,e,r){},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(K);new z((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(pt||(pt={})),v((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),v((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),v((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),v((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),v((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new z(A);var vt,yt="500-599";function bt(t,e){var r="^"+e.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function mt(t,e){var r,n,i=e.split(",");try{for(var s=o(i),c=s.next();!c.done;c=s.next()){var a=u(c.value.split("-").map(Number),2),l=a[0],f=a[1];if(t===l&&void 0===f)return!0;if(t>=l&&t<=f)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1}function wt(t){var e;try{var r=null===(e=c())||void 0===e?void 0:e.location.href,n=new URL(t,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),u=n.href,s=n.host;return n.hash="",n.search="",{query:i,fragment:o,href:u,hrefWithoutQueryOrHash:n.href,host:s}}catch(t){return}}function gt(t,e){var r;void 0===e&&(e={});var n=wt(t.url);if(!n)return!1;var i,o=n.host;if(!1!==e.ignoreAmplitudeRequests&&(bt(o,"*.amplitude.com")||bt(o,"amplitude.com")))return!1;if(null===(r=e.ignoreHosts)||void 0===r?void 0:r.find((function(t){return bt(o,t)})))return!1;if(!e.captureRules&&void 0!==t.status&&!mt(t.status,yt))return!1;if(e.captureRules&&(s([],u(e.captureRules),!1).reverse().find((function(e){return i=function(t,e,r){if(!t.hosts||t.hosts.find((function(t){return bt(e,t)})))return!((r||0===r)&&!mt(r,t.statusCodeRange||yt))}(e,o,t.status),void 0!==i})),!i))return!1;return!0}function _t(t){var e,r,n=t.allObservables,i=t.networkTrackingOptions,o=t.amplitude;return n.networkObservable.pipe((e=function(t){return gt(t.event,i)},M((function(t,n){var i=0;t.subscribe(B(n,(function(t){return e.call(r,t,i++)&&n.next(t)})))})))).subscribe((function(t){var e,r=t.event,n=wt(r.url);if(n){var i=((e={})["[Amplitude] URL"]=n.hrefWithoutQueryOrHash,e["[Amplitude] URL Query"]=n.query,e["[Amplitude] URL Fragment"]=n.fragment,e["[Amplitude] Request Method"]=r.method,e["[Amplitude] Status Code"]=r.status,e["[Amplitude] Start Time"]=r.startTime,e["[Amplitude] Completion Time"]=r.endTime,e["[Amplitude] Duration"]=r.duration,e["[Amplitude] Request Body Size"]=r.requestBodySize,e["[Amplitude] Response Body Size"]=r.responseBodySize,e);null==o||o.track("[Amplitude] Network Request",i)}}))}!function(t){t.NetworkObservable="networkObservable"}(vt||(vt={}));var xt=function(t){void 0===t&&(t={});var e,r="@amplitude/plugin-network-capture-browser",u=[],s=function(){var t,r=new z((function(t){var r=new h((function(e){var r=function(t,e){return{event:t,timestamp:Date.now(),type:e}}(e,"network");t.next(r)}));return p.subscribe(r,e),function(){p.unsubscribe(r)}}));return(t={})[vt.NetworkObservable]=r,t};return{name:r,type:"enrichment",setup:function(o,c){return n(void 0,void 0,void 0,(function(){var n,a;return i(this,(function(i){return"undefined"==typeof document||(n=s(),a=_t({allObservables:n,networkTrackingOptions:t,amplitude:c}),u.push(a),null==(e=null==o?void 0:o.loggerProvider)||e.log("".concat(r," has been successfully added."))),[2]}))}))},execute:function(t){return n(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,t]}))}))},teardown:function(){return n(void 0,void 0,void 0,(function(){var t,e,r,n;return i(this,(function(i){try{for(t=o(u),e=t.next();!e.done;e=t.next())e.value.unsubscribe()}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=t.return)&&n.call(t)}finally{if(r)throw r.error}}return[2]}))}))}}};return t.networkCapturePlugin=xt,t.plugin=xt,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
var amplitudeNetworkCapturePlugin=function(t){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},e(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function u(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function c(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var a=function(){var t="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},l=c([],u(Array(256).keys()),!1).map((function(t){return t.toString(16).padStart(2,"0")})),h=function(t){var e,r=a();if(!(null===(e=null==r?void 0:r.crypto)||void 0===e?void 0:e.getRandomValues))return function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,h)}(t);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,c([],u(n.entries()),!1).map((function(t){var e=u(t,2),r=e[0],n=e[1];return[4,6,8,10].includes(r)?"-".concat(l[n]):l[n]})).join("")},f=function(){function t(t){this.request=t}return Object.defineProperty(t.prototype,"headers",{get:function(){if(this._headers)return this._headers;var t=this.request.headers;if(Array.isArray(t)){var e=t;this._headers=e.reduce((function(t,e){var r=u(e,2),n=r[0],i=r[1];return t[n]=i,t}),{})}else if(t instanceof Headers){var r={};t.forEach((function(t,e){r[e]=t})),this._headers=r}else"object"==typeof t&&(this._headers=t);return this._headers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var t=a();if(null==t?void 0:t.TextEncoder){var e=this.request.body;return this._bodySize=p(e,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),t}(),d=function(){function t(t){this.body=t}return Object.defineProperty(t.prototype,"bodySize",{get:function(){return p(this.body,100)},enumerable:!1,configurable:!0}),t}();function p(t,e){var r,n,i,o=a(),c=null==o?void 0:o.TextEncoder;if(c){var l;if("string"==typeof t)l=t,i=(new c).encode(l).length;else if(t instanceof Blob)i=(l=t).size;else if(t instanceof URLSearchParams)l=t,i=(new c).encode(l.toString()).length;else if(ArrayBuffer.isView(t))i=(l=t).byteLength;else if(t instanceof ArrayBuffer)i=(l=t).byteLength;else if(t instanceof FormData){var h=t,f=0,d=0;try{for(var p=s(h.entries()),v=p.next();!v.done;v=p.next()){var y=u(v.value,2),b=y[0],m=y[1];if(f+=b.length,"string"==typeof m)f+=(new c).encode(m).length;else{if(!(m instanceof Blob))return;f+=m.size}if(++d>=e)return}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}i=f}else if(t instanceof ReadableStream)return void(l=t);return i}}var v=function(){function t(t){this.response=t}return Object.defineProperty(t.prototype,"headers",{get:function(){var t;if(this._headers)return this._headers;if(this.response.headers instanceof Headers){var e=this.response.headers,r={};return null===(t=null==e?void 0:e.forEach)||void 0===t||t.call(e,(function(t,e){r[e]=t})),this._headers=r,r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodySize",{get:function(){var t,e;if(void 0!==this._bodySize)return this._bodySize;var r=null===(e=null===(t=this.response.headers)||void 0===t?void 0:t.get)||void 0===e?void 0:e.call(t,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),t}(),y=function(){function t(t,e,r){this.statusCode=t,this.headersString=e,this.size=r}return Object.defineProperty(t.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){var t,e;if(this.headersString){var r={},n=this.headersString.split("\r\n");try{for(var i=s(n),o=i.next();!o.done;o=i.next()){var c=u(o.value.split(": "),2),a=c[0],l=c[1];a&&l&&(r[a]=l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r}},enumerable:!1,configurable:!0}),t}(),b=function(){function t(t,e,r,n,i,o,s,u,c,a,l){void 0===s&&(s=0),this.type=t,this.method=e,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=s,this.duration=u,this.responseWrapper=c,this.error=a,this.endTime=l}return t.prototype.toSerializable=function(){var t,e,r,n,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(t=this.requestWrapper)||void 0===t?void 0:t.headers,requestBodySize:null===(e=this.requestWrapper)||void 0===e?void 0:e.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers,responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(i).filter((function(t){var e=u(t,2);return e[0],void 0!==e[1]})))},t}();var m=function(t,e){void 0===e&&(e=h()),this.callback=t,this.id=e},g=function(){function t(e){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var r=a();t.isSupported()&&(this.globalScope=r)}return t.isSupported=function(){var t=a();return!!t&&!!t.fetch},t.prototype.subscribe=function(t,e){var r,n,i,o,s,u,c;if(this.logger||(this.logger=e),this.eventCallbacks.set(t.id,t),!this.isObserving){var a=null===(i=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.open,l=null===(u=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===u?void 0:u.send;a&&l&&this.observeXhr(a,l);var h=null===(c=this.globalScope)||void 0===c?void 0:c.fetch;h&&this.observeFetch(h),this.isObserving=!0}},t.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},t.prototype.triggerEventCallbacks=function(t){var e=this;this.eventCallbacks.forEach((function(r){var n;try{r.callback(t)}catch(t){null===(n=e.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",t)}}))},t.prototype.handleNetworkRequestEvent=function(t,e,r,n,i,o,s){var u;if(void 0!==o&&void 0!==s){var c,a,l,h="GET";!function(t){return"object"==typeof t&&null!==t&&"url"in t&&"method"in t}(e)?c=null===(u=null==e?void 0:e.toString)||void 0===u?void 0:u.call(e):(c=e.url,h=e.method),h=(null==r?void 0:r.method)||h,n&&(a=n.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},a=0);var f=Math.floor(performance.now()-s),d=Math.floor(o+f),p=new b(t,h,o,o,c,r,a,f,n,l,d);this.triggerEventCallbacks(p)}},t.prototype.getTimestamps=function(){var t,e;return{startTime:null===(t=Date.now)||void 0===t?void 0:t.call(Date),durationStart:null===(e=null===performance||void 0===performance?void 0:performance.now)||void 0===e?void 0:e.call(performance)}},t.prototype.observeFetch=function(t){var e=this;this.globalScope&&t&&(this.globalScope.fetch=function(r,n){return i(e,void 0,void 0,(function(){var e,i,s,u,c,a;return o(this,(function(o){switch(o.label){case 0:try{e=this.getTimestamps()}catch(t){null===(c=this.logger)||void 0===c||c.debug("an unexpected error occurred while retrieving timestamps",t)}o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t(r,n)];case 2:return i=o.sent(),[3,4];case 3:return u=o.sent(),s=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new f(n):void 0,i?new v(i):void 0,s,null==e?void 0:e.startTime,null==e?void 0:e.durationStart)}catch(t){null===(a=this.logger)||void 0===a||a.debug("an unexpected error occurred while handling fetch",t)}if(i)return[2,i];throw s}}))}))})},t.prototype.observeXhr=function(t,e){if(this.globalScope&&t&&e){var r=this.globalScope.XMLHttpRequest.prototype,i=this;r.open=function(){for(var e,r,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c=u(o,2),a=c[0],l=c[1];try{this.$$AmplitudeAnalyticsEvent=n({method:a,url:null===(e=null==l?void 0:l.toString)||void 0===e?void 0:e.call(l)},i.getTimestamps())}catch(t){null===(r=i.logger)||void 0===r||r.debug("an unexpected error occurred while calling xhr open",t)}return t.apply(this,o)},r.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,o=t[0],s=n.$$AmplitudeAnalyticsEvent;return n.addEventListener("loadend",(function(){var t;try{var e=n.getAllResponseHeaders(),r=n.getResponseHeader("content-length"),u=new y(n.status,e,r?parseInt(r,10):void 0),c=new d(o);s.status=n.status,i.handleNetworkRequestEvent("xhr",{url:s.url,method:s.method},c,u,void 0,s.startTime,s.durationStart)}catch(e){null===(t=i.logger)||void 0===t||t.debug("an unexpected error occurred while handling xhr send",e)}})),e.apply(n,t)}}},t}(),w=new g;function _(t){return"function"==typeof t}function S(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var x=S((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function A(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var O=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=s(o),l=a.next();!l.done;l=a.next()){l.value.remove(this)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(_(h))try{h()}catch(t){i=t instanceof x?t.errors:[t]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=s(f),p=d.next();!p.done;p=d.next()){var v=p.value;try{T(v)}catch(t){i=null!=i?i:[],t instanceof x?i=c(c([],u(i)),u(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}if(i)throw new x(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)T(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&A(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&A(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),E=O.EMPTY;function k(t){return t instanceof O||t&&"closed"in t&&_(t.remove)&&_(t.add)&&_(t.unsubscribe)}function T(t){_(t)?t():t.unsubscribe()}var j={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},P=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,c([t,e],u(r)))};function q(){}function z(t){t()}var C=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,k(e)&&e.add(r)):r.destination=W,r}return r(e,t),e.create=function(t,e,r){return new M(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(O),I=Function.prototype.bind;function R(t,e){return I.call(t,e)}var F=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){N(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){N(t)}else N(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){N(t)}},t}(),M=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;_(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&j.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&R(e.next,o),error:e.error&&R(e.error,o),complete:e.complete&&R(e.complete,o)}):i=e;return s.destination=new F(i),s}return r(e,t),e}(C);function N(t){var e;e=t,P((function(){throw e}))}var W={closed:!0,next:q,error:function(t){throw t},complete:q},U="function"==typeof Symbol&&Symbol.observable||"@@observable";function H(t){return t}var L=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof C||function(t){return t&&_(t.next)&&_(t.error)&&_(t.complete)}(n)&&k(n)?t:new M(t,e,r);return z((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=B(e))((function(e,n){var i=new M({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[U]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?H:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=B(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function B(t){var e;return null!==(e=null!=t?t:j.Promise)&&void 0!==e?e:Promise}function D(t){return _(null==t?void 0:t.lift)}function V(t){return function(e){if(D(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}function $(t,e,r,n,i){return new X(t,e,r,n,i)}var X=function(t){function e(e,r,n,i,o,s){var u=t.call(this,e)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,u._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,u}return r(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(C);!function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,D(e)&&(n.lift=e.lift),n}r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new O;var r=this.getSubject();e.add(this.source.subscribe($(r,void 0,(function(){t._teardown(),r.complete()}),(function(e){t._teardown(),r.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=O.EMPTY)}return e},e.prototype.refCount=function(){return V((function(t,e){var r=null;t._refCount++;var n=$(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)r=null;else{var n=t._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),e.unsubscribe()}}));t.subscribe(n),n.closed||(r=t.connect())}))(this)}}(L);var Y,Q={now:function(){return(Q.delegate||performance).now()},delegate:void 0},G={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=e((function(e){r=void 0,t(e)}));return new O((function(){return null==r?void 0:r(n)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=G.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,c([],u(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,c([],u(t)))},delegate:void 0};new L((function(t){var e=Y||Q,r=e.now(),n=0,i=function(){t.closed||(n=G.requestAnimationFrame((function(o){n=0;var s=e.now();t.next({timestamp:Y?s:o,elapsed:s-r}),i()})))};return i(),function(){n&&G.cancelAnimationFrame(n)}}));var J=S((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),K=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r(e,t),e.prototype.lift=function(t){var e=new Z(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new J},e.prototype.next=function(t){var e=this;z((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=s(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;z((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;z((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?E:(this.currentObservers=null,o.push(t),new O((function(){e.currentObservers=null,A(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new L;return t.source=this,t},e.create=function(t,e){return new Z(t,e)},e}(L),Z=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return r(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:E},e}(K);!function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){var t=this,e=t.hasError,r=t.thrownError,n=t._value;if(e)throw r;return this._throwIfClosed(),n},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(K);var tt={now:function(){return(tt.delegate||Date).now()},delegate:void 0};!function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=tt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}r(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),u=0,c=1;c<n.length&&n[c]<=s;c+=2)u=c;u&&n.splice(0,u+1)}}}(K),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}r(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,u=e._isComplete;r?t.error(o):(s||u)&&(n&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))}}(K);var et,rt=function(t){function e(e,r){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return this},e}(O),nt=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,c([t,e],u(r)))},it=function(t){return clearInterval(t)},ot=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return r(e,t),e.prototype.schedule=function(t,e){var r;if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),nt(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&it(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,A(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(rt),st=1,ut={};function ct(t){return t in ut&&(delete ut[t],!0)}var at=function(t){var e=st++;return ut[e]=!0,et||(et=Promise.resolve()),et.then((function(){return ct(e)&&t()})),e},lt=function(t){ct(t)},ht={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ht.delegate;return((null==r?void 0:r.setImmediate)||at).apply(void 0,c([],u(t)))},clearImmediate:function(t){return lt(t)},delegate:void 0},ft=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=ht.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(ht.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))},e}(ot),dt=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=tt.now,t}(),pt=function(t){function e(e,r){void 0===r&&(r=dt.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return r(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(dt),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(pt);new vt(ft),new pt(ot);var yt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},e}(ot),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(pt);new bt(yt);var mt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=G.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&r===e._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(G.cancelAnimationFrame(r),e._scheduled=void 0)},e}(ot),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){var e;this._active=!0,t?e=t.id:(e=this._scheduled,this._scheduled=void 0);var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(pt);new gt(mt),function(t){function e(e,r){void 0===e&&(e=_t),void 0===r&&(r=1/0);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(pt);var wt,_t=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return r(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return O.EMPTY},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,e,r){},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(ot);new L((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(wt||(wt={})),S((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),S((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),S((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),S((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),S((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new L(q);var St,xt="500-599";function At(t,e){var r="^"+e.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function Ot(t,e){var r,n,i=e.split(",");try{for(var o=s(i),c=o.next();!c.done;c=o.next()){var a=u(c.value.split("-").map(Number),2),l=a[0],h=a[1];if(t===l&&void 0===h)return!0;if(t>=l&&t<=h)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function Et(t){var e;if(t)try{var r=null===(e=a())||void 0===e?void 0:e.location.href,n=new URL(t,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(t){return}}function kt(t,e){var r;void 0===e&&(e={});var n=Et(t.url);if(!n)return!1;var i,o=n.host;if(!1!==e.ignoreAmplitudeRequests&&(At(o,"*.amplitude.com")||At(o,"amplitude.com")))return!1;if(null===(r=e.ignoreHosts)||void 0===r?void 0:r.find((function(t){return At(o,t)})))return!1;if(!e.captureRules&&void 0!==t.status&&!Ot(t.status,xt))return!1;if(e.captureRules&&(c([],u(e.captureRules),!1).reverse().find((function(e){return i=function(t,e,r){if(!t.hosts||t.hosts.find((function(t){return At(e,t)})))return!((r||0===r)&&!Ot(r,t.statusCodeRange||xt))}(e,o,t.status),void 0!==i})),!i))return!1;return!0}function Tt(t){var e,r,n=t.allObservables,i=t.networkTrackingOptions,o=t.amplitude;return n.networkObservable.pipe((e=function(t){return kt(t.event,i)},V((function(t,n){var i=0;t.subscribe($(n,(function(t){return e.call(r,t,i++)&&n.next(t)})))})))).subscribe((function(t){var e,r,n,i=t.event,s=Et(i.url);if(s){var u=null===(r=i.responseWrapper)||void 0===r?void 0:r.bodySize,c=null===(n=i.requestWrapper)||void 0===n?void 0:n.bodySize,a=((e={})["[Amplitude] URL"]=s.hrefWithoutQueryOrHash,e["[Amplitude] URL Query"]=s.query,e["[Amplitude] URL Fragment"]=s.fragment,e["[Amplitude] Request Method"]=i.method,e["[Amplitude] Status Code"]=i.status,e["[Amplitude] Start Time"]=i.startTime,e["[Amplitude] Completion Time"]=i.endTime,e["[Amplitude] Duration"]=i.duration,e["[Amplitude] Request Body Size"]=c,e["[Amplitude] Response Body Size"]=u,e["[Amplitude] Request Type"]=i.type,e);null==o||o.track("[Amplitude] Network Request",a)}}))}!function(t){t.NetworkObservable="networkObservable"}(St||(St={}));var jt=function(t){void 0===t&&(t={});var e,r="@amplitude/plugin-network-capture-browser",n=[],u=function(){var t,r=new L((function(t){var r=new m((function(e){var r=function(t,e){return{event:t,timestamp:Date.now(),type:e}}(e,"network");t.next(r)}));return w.subscribe(r,e),function(){w.unsubscribe(r)}}));return(t={})[St.NetworkObservable]=r,t};return{name:r,type:"enrichment",setup:function(s,c){return i(void 0,void 0,void 0,(function(){var i,a;return o(this,(function(o){return"undefined"==typeof document||(i=u(),a=Tt({allObservables:i,networkTrackingOptions:t,amplitude:c}),n.push(a),null==(e=null==s?void 0:s.loggerProvider)||e.log("".concat(r," has been successfully added."))),[2]}))}))},execute:function(t){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,t]}))}))},teardown:function(){return i(void 0,void 0,void 0,(function(){var t,e,r,i;return o(this,(function(o){try{for(t=s(n),e=t.next();!e.done;e=t.next())e.value.unsubscribe()}catch(t){r={error:t}}finally{try{e&&!e.done&&(i=t.return)&&i.call(t)}finally{if(r)throw r.error}}return[2]}))}))}}};return t.networkCapturePlugin=jt,t.plugin=jt,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
//# sourceMappingURL=amplitude-min.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).amplitude={})}(this,(function(t){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},e(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function n(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function u(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,u)}c((n=n.apply(t,e||[])).next())}))}function i(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function o(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function u(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var c=function(){var t="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},a=u([],s(Array(256).keys()),!1).map((function(t){return t.toString(16).padStart(2,"0")})),l=function(t){var e,r=c();if(!(null===(e=null==r?void 0:r.crypto)||void 0===e?void 0:e.getRandomValues))return function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,l)}(t);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,u([],s(n.entries()),!1).map((function(t){var e=s(t,2),r=e[0],n=e[1];return[4,6,8,10].includes(r)?"-".concat(a[n]):a[n]})).join("")};function f(t){var e,r,n=c();if(null==n?void 0:n.TextEncoder){var i=n.TextEncoder;if("string"==typeof t)return(new i).encode(t).length;if(t instanceof Blob)return t.size;if(t instanceof URLSearchParams)return(new i).encode(t.toString()).length;if(t instanceof ArrayBuffer)return t.byteLength;if(ArrayBuffer.isView(t))return t.byteLength;if(t instanceof FormData){var u=t,a=0,l=0;try{for(var f=o(u.entries()),h=f.next();!h.done;h=f.next()){var p=s(h.value,2),d=p[0],v=p[1];if(a+=d.length,"string"==typeof v?a+=(new i).encode(v).length:v.size&&(a+=v.size),++l>=100)return}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}return a}}}var h=function(t,e){void 0===e&&(e=l()),this.callback=t,this.id=e},p=new(function(){function t(e){var r;this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var n=c();t.isSupported()&&(this.globalScope=n,this.originalFetch=null===(r=this.globalScope)||void 0===r?void 0:r.fetch)}return t.isSupported=function(){var t=c();return!!t&&!!t.fetch},t.prototype.subscribe=function(t,e){this.logger||(this.logger=e),this.eventCallbacks.set(t.id,t),this.isObserving||(this.observeFetch(),this.isObserving=!0)},t.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id),this.originalFetch&&this.globalScope&&0===this.eventCallbacks.size&&this.isObserving&&(this.globalScope.fetch=this.originalFetch,this.isObserving=!1)},t.prototype.triggerEventCallbacks=function(t){var e=this;this.eventCallbacks.forEach((function(r){var n;try{r.callback(t)}catch(t){null===(n=e.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",t)}}))},t.prototype.observeFetch=function(){var t=this;if(this.globalScope&&this.originalFetch){var e=this.globalScope.fetch;this.globalScope.fetch=function(r,o){return n(t,void 0,void 0,(function(){var t,n,s,u,c,a,l,h,p;return i(this,(function(i){switch(i.label){case 0:t=Date.now(),n=performance.now(),s={timestamp:t,startTime:t,type:"fetch",method:(null==o?void 0:o.method)||"GET",url:r.toString(),requestHeaders:null==o?void 0:o.headers,requestBodySize:f(null==o?void 0:o.body)},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e(r,o)];case 2:return u=i.sent(),s.status=u.status,s.duration=Math.floor(performance.now()-n),s.startTime=t,s.endTime=Math.floor(t+s.duration),c={},a=void 0,u.headers.forEach((function(t,e){c[e]=t,"content-length"===e&&(a=parseInt(t,10)||void 0)})),s.responseHeaders=c,s.responseBodySize=a,this.triggerEventCallbacks(s),[2,u];case 3:throw l=i.sent(),h=Date.now(),s.duration=h-t,p=l,s.error={name:p.name||"UnknownError",message:p.message||"An unknown error occurred"},"AbortError"===p.name&&(s.error.name="AbortError",s.status=0),this.triggerEventCallbacks(s),l;case 4:return[2]}}))}))}}},t}());function d(t){return"function"==typeof t}function v(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var y=v((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function b(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var m=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var a=o(c),l=a.next();!l.done;l=a.next()){l.value.remove(this)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else c.remove(this);var f=this.initialTeardown;if(d(f))try{f()}catch(t){i=t instanceof y?t.errors:[t]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=o(h),v=p.next();!v.done;v=p.next()){var b=v.value;try{_(b)}catch(t){i=null!=i?i:[],t instanceof y?i=u(u([],s(i)),s(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}if(i)throw new y(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)_(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&b(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&b(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),g=m.EMPTY;function w(t){return t instanceof m||t&&"closed"in t&&d(t.remove)&&d(t.add)&&d(t.unsubscribe)}function _(t){d(t)?t():t.unsubscribe()}var x={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},S=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,u([t,e],s(r)))};function A(){}function E(t){t()}var k=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,w(e)&&e.add(r)):r.destination=P,r}return r(e,t),e.create=function(t,e,r){return new I(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(m),O=Function.prototype.bind;function T(t,e){return O.call(t,e)}var C=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){F(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){F(t)}else F(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){F(t)}},t}(),I=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;d(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&x.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&T(e.next,o),error:e.error&&T(e.error,o),complete:e.complete&&T(e.complete,o)}):i=e;return s.destination=new C(i),s}return r(e,t),e}(k);function F(t){var e;e=t,S((function(){throw e}))}var P={closed:!0,next:A,error:function(t){throw t},complete:A},j="function"==typeof Symbol&&Symbol.observable||"@@observable";function q(t){return t}var z=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof k||function(t){return t&&d(t.next)&&d(t.error)&&d(t.complete)}(n)&&w(n)?t:new I(t,e,r);return E((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=R(e))((function(e,n){var i=new I({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[j]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?q:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=R(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function R(t){var e;return null!==(e=null!=t?t:x.Promise)&&void 0!==e?e:Promise}function U(t){return d(null==t?void 0:t.lift)}function M(t){return function(e){if(U(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}function B(t,e,r,n,i){return new N(t,e,r,n,i)}var N=function(t){function e(e,r,n,i,o,s){var u=t.call(this,e)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,u._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,u}return r(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(k);!function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,U(e)&&(n.lift=e.lift),n}r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new m;var r=this.getSubject();e.add(this.source.subscribe(B(r,void 0,(function(){t._teardown(),r.complete()}),(function(e){t._teardown(),r.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=m.EMPTY)}return e},e.prototype.refCount=function(){return M((function(t,e){var r=null;t._refCount++;var n=B(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)r=null;else{var n=t._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),e.unsubscribe()}}));t.subscribe(n),n.closed||(r=t.connect())}))(this)}}(z);var D,V={now:function(){return(V.delegate||performance).now()},delegate:void 0},L={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=e((function(e){r=void 0,t(e)}));return new m((function(){return null==r?void 0:r(n)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=L.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,u([],s(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,u([],s(t)))},delegate:void 0};new z((function(t){var e=D||V,r=e.now(),n=0,i=function(){t.closed||(n=L.requestAnimationFrame((function(o){n=0;var s=e.now();t.next({timestamp:D?s:o,elapsed:s-r}),i()})))};return i(),function(){n&&L.cancelAnimationFrame(n)}}));var W=v((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),H=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r(e,t),e.prototype.lift=function(t){var e=new Y(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new W},e.prototype.next=function(t){var e=this;E((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=o(e.currentObservers),s=i.next();!s.done;s=i.next()){s.value.next(t)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;E((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?g:(this.currentObservers=null,o.push(t),new m((function(){e.currentObservers=null,b(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new z;return t.source=this,t},e.create=function(t,e){return new Y(t,e)},e}(z),Y=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return r(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:g},e}(H);!function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){var t=this,e=t.hasError,r=t.thrownError,n=t._value;if(e)throw r;return this._throwIfClosed(),n},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(H);var Q={now:function(){return(Q.delegate||Date).now()},delegate:void 0};!function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Q);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}r(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),u=0,c=1;c<n.length&&n[c]<=s;c+=2)u=c;u&&n.splice(0,u+1)}}}(H),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}r(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,u=e._isComplete;r?t.error(o):(s||u)&&(n&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))}}(H);var $,G=function(t){function e(e,r){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return this},e}(m),X=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,u([t,e],s(r)))},J=function(t){return clearInterval(t)},K=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return r(e,t),e.prototype.schedule=function(t,e){var r;if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),X(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&J(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,b(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(G),Z=1,tt={};function et(t){return t in tt&&(delete tt[t],!0)}var rt=function(t){var e=Z++;return tt[e]=!0,$||($=Promise.resolve()),$.then((function(){return et(e)&&t()})),e},nt=function(t){et(t)},it={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=it.delegate;return((null==r?void 0:r.setImmediate)||rt).apply(void 0,u([],s(t)))},clearImmediate:function(t){return nt(t)},delegate:void 0},ot=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=it.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(it.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))},e}(K),st=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=Q.now,t}(),ut=function(t){function e(e,r){void 0===r&&(r=st.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return r(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(st),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(ut);new ct(ot),new ut(K);var at=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},e}(K),lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(ut);new lt(at);var ft=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=L.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&r===e._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(L.cancelAnimationFrame(r),e._scheduled=void 0)},e}(K),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){var e;this._active=!0,t?e=t.id:(e=this._scheduled,this._scheduled=void 0);var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(ut);new ht(ft),function(t){function e(e,r){void 0===e&&(e=dt),void 0===r&&(r=1/0);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(ut);var pt,dt=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return r(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return m.EMPTY},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,e,r){},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(K);new z((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(pt||(pt={})),v((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),v((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),v((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),v((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),v((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new z(A);var vt,yt="500-599";function bt(t,e){var r="^"+e.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function mt(t,e){var r,n,i=e.split(",");try{for(var u=o(i),c=u.next();!c.done;c=u.next()){var a=s(c.value.split("-").map(Number),2),l=a[0],f=a[1];if(t===l&&void 0===f)return!0;if(t>=l&&t<=f)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1}function gt(t){var e;try{var r=null===(e=c())||void 0===e?void 0:e.location.href,n=new URL(t,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(t){return}}function wt(t,e){var r;void 0===e&&(e={});var n=gt(t.url);if(!n)return!1;var i,o=n.host;if(!1!==e.ignoreAmplitudeRequests&&(bt(o,"*.amplitude.com")||bt(o,"amplitude.com")))return!1;if(null===(r=e.ignoreHosts)||void 0===r?void 0:r.find((function(t){return bt(o,t)})))return!1;if(!e.captureRules&&void 0!==t.status&&!mt(t.status,yt))return!1;if(e.captureRules&&(u([],s(e.captureRules),!1).reverse().find((function(e){return i=function(t,e,r){if(!t.hosts||t.hosts.find((function(t){return bt(e,t)})))return!((r||0===r)&&!mt(r,t.statusCodeRange||yt))}(e,o,t.status),void 0!==i})),!i))return!1;return!0}function _t(t){var e,r,n=t.allObservables,i=t.networkTrackingOptions,o=t.amplitude;return n.networkObservable.pipe((e=function(t){return wt(t.event,i)},M((function(t,n){var i=0;t.subscribe(B(n,(function(t){return e.call(r,t,i++)&&n.next(t)})))})))).subscribe((function(t){var e,r=t.event,n=gt(r.url);if(n){var i=((e={})["[Amplitude] URL"]=n.hrefWithoutQueryOrHash,e["[Amplitude] URL Query"]=n.query,e["[Amplitude] URL Fragment"]=n.fragment,e["[Amplitude] Request Method"]=r.method,e["[Amplitude] Status Code"]=r.status,e["[Amplitude] Start Time"]=r.startTime,e["[Amplitude] Completion Time"]=r.endTime,e["[Amplitude] Duration"]=r.duration,e["[Amplitude] Request Body Size"]=r.requestBodySize,e["[Amplitude] Response Body Size"]=r.responseBodySize,e);null==o||o.track("[Amplitude] Network Request",i)}}))}!function(t){t.NetworkObservable="networkObservable"}(vt||(vt={}));var xt=function(t){void 0===t&&(t={});var e,r="@amplitude/plugin-network-capture-browser",s=[],u=function(){var t,r=new z((function(t){var r=new h((function(e){var r=function(t,e){return{event:t,timestamp:Date.now(),type:e}}(e,"network");t.next(r)}));return p.subscribe(r,e),function(){p.unsubscribe(r)}}));return(t={})[vt.NetworkObservable]=r,t};return{name:r,type:"enrichment",setup:function(o,c){return n(void 0,void 0,void 0,(function(){var n,a;return i(this,(function(i){return"undefined"==typeof document||(n=u(),a=_t({allObservables:n,networkTrackingOptions:t,amplitude:c}),s.push(a),null==(e=null==o?void 0:o.loggerProvider)||e.log("".concat(r," has been successfully added."))),[2]}))}))},execute:function(t){return n(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,t]}))}))},teardown:function(){return n(void 0,void 0,void 0,(function(){var t,e,r,n;return i(this,(function(i){try{for(t=o(s),e=t.next();!e.done;e=t.next())e.value.unsubscribe()}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=t.return)&&n.call(t)}finally{if(r)throw r.error}}return[2]}))}))}}};t.networkCapturePlugin=xt,t.plugin=xt,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).amplitude={})}(this,(function(t){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},e(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function u(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function c(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var a=function(){var t="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},l=c([],u(Array(256).keys()),!1).map((function(t){return t.toString(16).padStart(2,"0")})),h=function(t){var e,r=a();if(!(null===(e=null==r?void 0:r.crypto)||void 0===e?void 0:e.getRandomValues))return function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,h)}(t);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,c([],u(n.entries()),!1).map((function(t){var e=u(t,2),r=e[0],n=e[1];return[4,6,8,10].includes(r)?"-".concat(l[n]):l[n]})).join("")},f=function(){function t(t){this.request=t}return Object.defineProperty(t.prototype,"headers",{get:function(){if(this._headers)return this._headers;var t=this.request.headers;if(Array.isArray(t)){var e=t;this._headers=e.reduce((function(t,e){var r=u(e,2),n=r[0],i=r[1];return t[n]=i,t}),{})}else if(t instanceof Headers){var r={};t.forEach((function(t,e){r[e]=t})),this._headers=r}else"object"==typeof t&&(this._headers=t);return this._headers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var t=a();if(null==t?void 0:t.TextEncoder){var e=this.request.body;return this._bodySize=p(e,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),t}(),d=function(){function t(t){this.body=t}return Object.defineProperty(t.prototype,"bodySize",{get:function(){return p(this.body,100)},enumerable:!1,configurable:!0}),t}();function p(t,e){var r,n,i,o=a(),c=null==o?void 0:o.TextEncoder;if(c){var l;if("string"==typeof t)l=t,i=(new c).encode(l).length;else if(t instanceof Blob)i=(l=t).size;else if(t instanceof URLSearchParams)l=t,i=(new c).encode(l.toString()).length;else if(ArrayBuffer.isView(t))i=(l=t).byteLength;else if(t instanceof ArrayBuffer)i=(l=t).byteLength;else if(t instanceof FormData){var h=t,f=0,d=0;try{for(var p=s(h.entries()),v=p.next();!v.done;v=p.next()){var y=u(v.value,2),b=y[0],m=y[1];if(f+=b.length,"string"==typeof m)f+=(new c).encode(m).length;else{if(!(m instanceof Blob))return;f+=m.size}if(++d>=e)return}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}i=f}else if(t instanceof ReadableStream)return void(l=t);return i}}var v=function(){function t(t){this.response=t}return Object.defineProperty(t.prototype,"headers",{get:function(){var t;if(this._headers)return this._headers;if(this.response.headers instanceof Headers){var e=this.response.headers,r={};return null===(t=null==e?void 0:e.forEach)||void 0===t||t.call(e,(function(t,e){r[e]=t})),this._headers=r,r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodySize",{get:function(){var t,e;if(void 0!==this._bodySize)return this._bodySize;var r=null===(e=null===(t=this.response.headers)||void 0===t?void 0:t.get)||void 0===e?void 0:e.call(t,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),t}(),y=function(){function t(t,e,r){this.statusCode=t,this.headersString=e,this.size=r}return Object.defineProperty(t.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){var t,e;if(this.headersString){var r={},n=this.headersString.split("\r\n");try{for(var i=s(n),o=i.next();!o.done;o=i.next()){var c=u(o.value.split(": "),2),a=c[0],l=c[1];a&&l&&(r[a]=l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r}},enumerable:!1,configurable:!0}),t}(),b=function(){function t(t,e,r,n,i,o,s,u,c,a,l){void 0===s&&(s=0),this.type=t,this.method=e,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=s,this.duration=u,this.responseWrapper=c,this.error=a,this.endTime=l}return t.prototype.toSerializable=function(){var t,e,r,n,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(t=this.requestWrapper)||void 0===t?void 0:t.headers,requestBodySize:null===(e=this.requestWrapper)||void 0===e?void 0:e.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers,responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(i).filter((function(t){var e=u(t,2);return e[0],void 0!==e[1]})))},t}();var m=function(t,e){void 0===e&&(e=h()),this.callback=t,this.id=e},g=function(){function t(e){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var r=a();t.isSupported()&&(this.globalScope=r)}return t.isSupported=function(){var t=a();return!!t&&!!t.fetch},t.prototype.subscribe=function(t,e){var r,n,i,o,s,u,c;if(this.logger||(this.logger=e),this.eventCallbacks.set(t.id,t),!this.isObserving){var a=null===(i=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.open,l=null===(u=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===u?void 0:u.send;a&&l&&this.observeXhr(a,l);var h=null===(c=this.globalScope)||void 0===c?void 0:c.fetch;h&&this.observeFetch(h),this.isObserving=!0}},t.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},t.prototype.triggerEventCallbacks=function(t){var e=this;this.eventCallbacks.forEach((function(r){var n;try{r.callback(t)}catch(t){null===(n=e.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",t)}}))},t.prototype.handleNetworkRequestEvent=function(t,e,r,n,i,o,s){var u;if(void 0!==o&&void 0!==s){var c,a,l,h="GET";!function(t){return"object"==typeof t&&null!==t&&"url"in t&&"method"in t}(e)?c=null===(u=null==e?void 0:e.toString)||void 0===u?void 0:u.call(e):(c=e.url,h=e.method),h=(null==r?void 0:r.method)||h,n&&(a=n.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},a=0);var f=Math.floor(performance.now()-s),d=Math.floor(o+f),p=new b(t,h,o,o,c,r,a,f,n,l,d);this.triggerEventCallbacks(p)}},t.prototype.getTimestamps=function(){var t,e;return{startTime:null===(t=Date.now)||void 0===t?void 0:t.call(Date),durationStart:null===(e=null===performance||void 0===performance?void 0:performance.now)||void 0===e?void 0:e.call(performance)}},t.prototype.observeFetch=function(t){var e=this;this.globalScope&&t&&(this.globalScope.fetch=function(r,n){return i(e,void 0,void 0,(function(){var e,i,s,u,c,a;return o(this,(function(o){switch(o.label){case 0:try{e=this.getTimestamps()}catch(t){null===(c=this.logger)||void 0===c||c.debug("an unexpected error occurred while retrieving timestamps",t)}o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t(r,n)];case 2:return i=o.sent(),[3,4];case 3:return u=o.sent(),s=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new f(n):void 0,i?new v(i):void 0,s,null==e?void 0:e.startTime,null==e?void 0:e.durationStart)}catch(t){null===(a=this.logger)||void 0===a||a.debug("an unexpected error occurred while handling fetch",t)}if(i)return[2,i];throw s}}))}))})},t.prototype.observeXhr=function(t,e){if(this.globalScope&&t&&e){var r=this.globalScope.XMLHttpRequest.prototype,i=this;r.open=function(){for(var e,r,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c=u(o,2),a=c[0],l=c[1];try{this.$$AmplitudeAnalyticsEvent=n({method:a,url:null===(e=null==l?void 0:l.toString)||void 0===e?void 0:e.call(l)},i.getTimestamps())}catch(t){null===(r=i.logger)||void 0===r||r.debug("an unexpected error occurred while calling xhr open",t)}return t.apply(this,o)},r.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,o=t[0],s=n.$$AmplitudeAnalyticsEvent;return n.addEventListener("loadend",(function(){var t;try{var e=n.getAllResponseHeaders(),r=n.getResponseHeader("content-length"),u=new y(n.status,e,r?parseInt(r,10):void 0),c=new d(o);s.status=n.status,i.handleNetworkRequestEvent("xhr",{url:s.url,method:s.method},c,u,void 0,s.startTime,s.durationStart)}catch(e){null===(t=i.logger)||void 0===t||t.debug("an unexpected error occurred while handling xhr send",e)}})),e.apply(n,t)}}},t}(),w=new g;function _(t){return"function"==typeof t}function S(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var x=S((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function A(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var O=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=s(o),l=a.next();!l.done;l=a.next()){l.value.remove(this)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(_(h))try{h()}catch(t){i=t instanceof x?t.errors:[t]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=s(f),p=d.next();!p.done;p=d.next()){var v=p.value;try{k(v)}catch(t){i=null!=i?i:[],t instanceof x?i=c(c([],u(i)),u(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}if(i)throw new x(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)k(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&A(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&A(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),E=O.EMPTY;function T(t){return t instanceof O||t&&"closed"in t&&_(t.remove)&&_(t.add)&&_(t.unsubscribe)}function k(t){_(t)?t():t.unsubscribe()}var j={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},q=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,c([t,e],u(r)))};function P(){}function z(t){t()}var C=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,T(e)&&e.add(r)):r.destination=N,r}return r(e,t),e.create=function(t,e,r){return new M(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(O),I=Function.prototype.bind;function R(t,e){return I.call(t,e)}var F=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){W(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){W(t)}else W(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){W(t)}},t}(),M=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;_(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&j.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&R(e.next,o),error:e.error&&R(e.error,o),complete:e.complete&&R(e.complete,o)}):i=e;return s.destination=new F(i),s}return r(e,t),e}(C);function W(t){var e;e=t,q((function(){throw e}))}var N={closed:!0,next:P,error:function(t){throw t},complete:P},U="function"==typeof Symbol&&Symbol.observable||"@@observable";function H(t){return t}var L=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof C||function(t){return t&&_(t.next)&&_(t.error)&&_(t.complete)}(n)&&T(n)?t:new M(t,e,r);return z((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=B(e))((function(e,n){var i=new M({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[U]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?H:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=B(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function B(t){var e;return null!==(e=null!=t?t:j.Promise)&&void 0!==e?e:Promise}function D(t){return _(null==t?void 0:t.lift)}function V(t){return function(e){if(D(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}function $(t,e,r,n,i){return new X(t,e,r,n,i)}var X=function(t){function e(e,r,n,i,o,s){var u=t.call(this,e)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,u._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,u}return r(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(C);!function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,D(e)&&(n.lift=e.lift),n}r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new O;var r=this.getSubject();e.add(this.source.subscribe($(r,void 0,(function(){t._teardown(),r.complete()}),(function(e){t._teardown(),r.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=O.EMPTY)}return e},e.prototype.refCount=function(){return V((function(t,e){var r=null;t._refCount++;var n=$(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)r=null;else{var n=t._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),e.unsubscribe()}}));t.subscribe(n),n.closed||(r=t.connect())}))(this)}}(L);var Y,Q={now:function(){return(Q.delegate||performance).now()},delegate:void 0},G={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=e((function(e){r=void 0,t(e)}));return new O((function(){return null==r?void 0:r(n)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=G.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,c([],u(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,c([],u(t)))},delegate:void 0};new L((function(t){var e=Y||Q,r=e.now(),n=0,i=function(){t.closed||(n=G.requestAnimationFrame((function(o){n=0;var s=e.now();t.next({timestamp:Y?s:o,elapsed:s-r}),i()})))};return i(),function(){n&&G.cancelAnimationFrame(n)}}));var J=S((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),K=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r(e,t),e.prototype.lift=function(t){var e=new Z(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new J},e.prototype.next=function(t){var e=this;z((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=s(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;z((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;z((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?E:(this.currentObservers=null,o.push(t),new O((function(){e.currentObservers=null,A(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new L;return t.source=this,t},e.create=function(t,e){return new Z(t,e)},e}(L),Z=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return r(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:E},e}(K);!function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){var t=this,e=t.hasError,r=t.thrownError,n=t._value;if(e)throw r;return this._throwIfClosed(),n},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(K);var tt={now:function(){return(tt.delegate||Date).now()},delegate:void 0};!function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=tt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}r(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),u=0,c=1;c<n.length&&n[c]<=s;c+=2)u=c;u&&n.splice(0,u+1)}}}(K),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}r(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,u=e._isComplete;r?t.error(o):(s||u)&&(n&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))}}(K);var et,rt=function(t){function e(e,r){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return this},e}(O),nt=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,c([t,e],u(r)))},it=function(t){return clearInterval(t)},ot=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return r(e,t),e.prototype.schedule=function(t,e){var r;if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),nt(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&it(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,A(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(rt),st=1,ut={};function ct(t){return t in ut&&(delete ut[t],!0)}var at=function(t){var e=st++;return ut[e]=!0,et||(et=Promise.resolve()),et.then((function(){return ct(e)&&t()})),e},lt=function(t){ct(t)},ht={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ht.delegate;return((null==r?void 0:r.setImmediate)||at).apply(void 0,c([],u(t)))},clearImmediate:function(t){return lt(t)},delegate:void 0},ft=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=ht.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(ht.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))},e}(ot),dt=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=tt.now,t}(),pt=function(t){function e(e,r){void 0===r&&(r=dt.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return r(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(dt),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(pt);new vt(ft),new pt(ot);var yt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},e}(ot),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(pt);new bt(yt);var mt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return r(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=G.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);var o=e.actions;null!=r&&r===e._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(G.cancelAnimationFrame(r),e._scheduled=void 0)},e}(ot),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){var e;this._active=!0,t?e=t.id:(e=this._scheduled,this._scheduled=void 0);var r,n=this.actions;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}},e}(pt);new gt(mt),function(t){function e(e,r){void 0===e&&(e=_t),void 0===r&&(r=1/0);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(pt);var wt,_t=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return r(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return O.EMPTY},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,e,r){},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(ot);new L((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(wt||(wt={})),S((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),S((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),S((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),S((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),S((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new L(P);var St,xt="500-599";function At(t,e){var r="^"+e.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function Ot(t,e){var r,n,i=e.split(",");try{for(var o=s(i),c=o.next();!c.done;c=o.next()){var a=u(c.value.split("-").map(Number),2),l=a[0],h=a[1];if(t===l&&void 0===h)return!0;if(t>=l&&t<=h)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function Et(t){var e;if(t)try{var r=null===(e=a())||void 0===e?void 0:e.location.href,n=new URL(t,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(t){return}}function Tt(t,e){var r;void 0===e&&(e={});var n=Et(t.url);if(!n)return!1;var i,o=n.host;if(!1!==e.ignoreAmplitudeRequests&&(At(o,"*.amplitude.com")||At(o,"amplitude.com")))return!1;if(null===(r=e.ignoreHosts)||void 0===r?void 0:r.find((function(t){return At(o,t)})))return!1;if(!e.captureRules&&void 0!==t.status&&!Ot(t.status,xt))return!1;if(e.captureRules&&(c([],u(e.captureRules),!1).reverse().find((function(e){return i=function(t,e,r){if(!t.hosts||t.hosts.find((function(t){return At(e,t)})))return!((r||0===r)&&!Ot(r,t.statusCodeRange||xt))}(e,o,t.status),void 0!==i})),!i))return!1;return!0}function kt(t){var e,r,n=t.allObservables,i=t.networkTrackingOptions,o=t.amplitude;return n.networkObservable.pipe((e=function(t){return Tt(t.event,i)},V((function(t,n){var i=0;t.subscribe($(n,(function(t){return e.call(r,t,i++)&&n.next(t)})))})))).subscribe((function(t){var e,r,n,i=t.event,s=Et(i.url);if(s){var u=null===(r=i.responseWrapper)||void 0===r?void 0:r.bodySize,c=null===(n=i.requestWrapper)||void 0===n?void 0:n.bodySize,a=((e={})["[Amplitude] URL"]=s.hrefWithoutQueryOrHash,e["[Amplitude] URL Query"]=s.query,e["[Amplitude] URL Fragment"]=s.fragment,e["[Amplitude] Request Method"]=i.method,e["[Amplitude] Status Code"]=i.status,e["[Amplitude] Start Time"]=i.startTime,e["[Amplitude] Completion Time"]=i.endTime,e["[Amplitude] Duration"]=i.duration,e["[Amplitude] Request Body Size"]=c,e["[Amplitude] Response Body Size"]=u,e["[Amplitude] Request Type"]=i.type,e);null==o||o.track("[Amplitude] Network Request",a)}}))}!function(t){t.NetworkObservable="networkObservable"}(St||(St={}));var jt=function(t){void 0===t&&(t={});var e,r="@amplitude/plugin-network-capture-browser",n=[],u=function(){var t,r=new L((function(t){var r=new m((function(e){var r=function(t,e){return{event:t,timestamp:Date.now(),type:e}}(e,"network");t.next(r)}));return w.subscribe(r,e),function(){w.unsubscribe(r)}}));return(t={})[St.NetworkObservable]=r,t};return{name:r,type:"enrichment",setup:function(s,c){return i(void 0,void 0,void 0,(function(){var i,a;return o(this,(function(o){return"undefined"==typeof document||(i=u(),a=kt({allObservables:i,networkTrackingOptions:t,amplitude:c}),n.push(a),null==(e=null==s?void 0:s.loggerProvider)||e.log("".concat(r," has been successfully added."))),[2]}))}))},execute:function(t){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,t]}))}))},teardown:function(){return i(void 0,void 0,void 0,(function(){var t,e,r,i;return o(this,(function(o){try{for(t=s(n),e=t.next();!e.done;e=t.next())e.value.unsubscribe()}catch(t){r={error:t}}finally{try{e&&!e.done&&(i=t.return)&&i.call(t)}finally{if(r)throw r.error}}return[2]}))}))}}};t.networkCapturePlugin=jt,t.plugin=jt,Object.defineProperty(t,"__esModule",{value:!0})}));

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

import { BrowserClient, BrowserConfig, EnrichmentPlugin, ElementInteractionsOptions, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { BrowserClient, BrowserConfig, EnrichmentPlugin, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
import { Observable } from 'rxjs';

@@ -10,3 +10,2 @@ import { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';

export type BrowserEnrichmentPlugin = EnrichmentPlugin<BrowserClient, BrowserConfig>;
export type AutoCaptureOptionsWithDefaults = Required<Pick<ElementInteractionsOptions, 'debounceTime' | 'cssSelectorAllowlist' | 'actionClickAllowlist'>> & ElementInteractionsOptions;
export declare enum ObservablesEnum {

@@ -13,0 +12,0 @@ NetworkObservable = "networkObservable"

@@ -15,2 +15,3 @@ import { BrowserClient, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';

['[Amplitude] Response Body Size']?: number;
['[Amplitude] Request Type']?: 'xhr' | 'fetch';
};

@@ -17,0 +18,0 @@ export declare function trackNetworkEvents({ allObservables, networkTrackingOptions, amplitude, }: {

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

export declare const VERSION = "1.1.4";
export declare const VERSION = "1.2.0";
//# sourceMappingURL=version.d.ts.map
{
"name": "@amplitude/plugin-network-capture-browser",
"version": "1.2.0-prereleasenetworkcapture.0",
"version": "1.2.0",
"description": "",

@@ -43,3 +43,3 @@ "author": "Amplitude Inc",

"dependencies": {
"@amplitude/analytics-core": "^2.13.0-prereleasenetworkcapture.0",
"@amplitude/analytics-core": "^2.14.0",
"rxjs": "^7.8.1",

@@ -49,3 +49,2 @@ "tslib": "^2.4.1"

"devDependencies": {
"@amplitude/analytics-browser": "^2.18.0-prereleasenetworkcapture.0",
"@rollup/plugin-commonjs": "^23.0.4",

@@ -63,3 +62,3 @@ "@rollup/plugin-node-resolve": "^15.0.1",

],
"gitHead": "bd3f0cbb9079182d6bbb15fe6b6ddaae5f894616"
"gitHead": "d54bd9c08df3fec7480bd8834b4a4bf0e5d8eddd"
}

@@ -13,3 +13,3 @@ <p align="center">

Browser SDK plugin for autocapture.
Browser SDK plugin for network capture.

@@ -30,5 +30,5 @@ ## Installation

This plugin works on top of the Amplitude Browser SDK, generating auto-tracked events and sending to Amplitude.
This plugin works on top of the Amplitude Browser SDK, and tracks network request events
To use this plugin, you need to install `@amplitude/analytics-browser` version `v1.9.1` or later.
To use this plugin, you need to install `@amplitude/plugin-network-capture-browser`

@@ -35,0 +35,0 @@ ### 1. Import Amplitude packages

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

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

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

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