@amplitude/plugin-network-capture-browser 1.6.13 → 1.7.0-zen-observable-migration.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/network-capture-plugin.d.ts +1 -7
- package/lib/cjs/network-capture-plugin.d.ts.map +1 -1
- package/lib/cjs/network-capture-plugin.js +7 -22
- package/lib/cjs/network-capture-plugin.js.map +1 -1
- package/lib/cjs/track-network-event.d.ts +2 -2
- package/lib/cjs/track-network-event.d.ts.map +1 -1
- package/lib/cjs/track-network-event.js +3 -4
- package/lib/cjs/track-network-event.js.map +1 -1
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.d.ts.map +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/network-capture-plugin.d.ts +1 -7
- package/lib/esm/network-capture-plugin.d.ts.map +1 -1
- package/lib/esm/network-capture-plugin.js +7 -22
- package/lib/esm/network-capture-plugin.js.map +1 -1
- package/lib/esm/track-network-event.d.ts +2 -2
- package/lib/esm/track-network-event.d.ts.map +1 -1
- package/lib/esm/track-network-event.js +3 -4
- package/lib/esm/track-network-event.js.map +1 -1
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.d.ts.map +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/scripts/amplitude-min.js +1 -1
- package/lib/scripts/amplitude-min.js.gz +0 -0
- package/lib/scripts/amplitude-min.js.map +1 -1
- package/lib/scripts/amplitude-min.umd.js +1 -1
- package/lib/scripts/amplitude-min.umd.js.gz +0 -0
- package/lib/scripts/network-capture-plugin.d.ts +1 -7
- package/lib/scripts/network-capture-plugin.d.ts.map +1 -1
- package/lib/scripts/track-network-event.d.ts +2 -2
- package/lib/scripts/track-network-event.d.ts.map +1 -1
- package/lib/scripts/version.d.ts +1 -1
- package/lib/scripts/version.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,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=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function o(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function u(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,u)}a((n=n.apply(e,t||[])).next())})}function i(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(a){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function a(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var c=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],l=["authorization","cookie","set-cookie"],d=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},f=a([],u(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),h=function(e){var t,r=d();if(!(null===(t=null==r?void 0:r.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,h)}(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,a([],u(n.entries()),!1).map(function(e){var t=u(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(f[n]):f[n]}).join("")};function p(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function v(e,t,r){e&&y({json:e,allowlist:t.map(b),excludelist:r.map(b),ancestors:[]})}function y(e){var t,r,n=e.json,o=e.targetObject,i=e.allowlist,c=e.excludelist,l=e.ancestors,d=e.parentObject,f=e.targetKey;o||(o=n);var h=Object.keys(o);try{for(var v=s(h),b=v.next();!b.done;b=v.next()){var m=b.value,w=a(a([],u(l),!1),[m],!1);p(o[m])?g(w,i)&&!g(w,c)||delete o[m]:y({json:n,targetObject:o[m],allowlist:i,excludelist:c,ancestors:w,parentObject:o,targetKey:m})}}catch(e){t={error:e}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}0===Object.keys(o).length&&d&&f&&delete d[f]}function b(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function m(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&"**"===t[n];)n++;return n===t.length}var o=t[n];if("**"===o){if(n+1===t.length)return!0;for(var i=r;i<=e.length;i++)if(m(e,t,i,n+1))return!0;return!1}return("*"===o||o===e[r])&&m(e,t,r+1,n+1)}function g(e,t){return t.some(function(t){return m(e,t)})}var w=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,r;void 0===e&&(e=[]);var n=this.request.headers,o={};if(Array.isArray(n))n.forEach(function(e){var t=u(e,2),r=t[0],n=t[1];o[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){o[t]=e});else if("object"==typeof n&&null!==n)try{for(var i=s(Object.entries(n)),a=i.next();!a.done;a=i.next()){var c=u(a.value,2),l=c[0],d=c[1];o[l]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return T(o,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=d();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=x(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),o(this,void 0,void 0,function(){return i(this,function(r){return 0===e.length?[2,null]:[2,E(this.body,e,t)]})})},e}(),_=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),T(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return x(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),o(this,void 0,void 0,function(){return i(this,function(r){return 0===e.length?[2,null]:[2,E(this.body,e,t)]})})},e}();function x(e,t){var r,n,o,i=d(),a=null==i?void 0:i.TextEncoder;if(a){var c;if("string"==typeof e)c=e,o=(new a).encode(c).length;else if(e instanceof Blob)o=(c=e).size;else if(e instanceof URLSearchParams)c=e,o=(new a).encode(c.toString()).length;else if(ArrayBuffer.isView(e))o=(c=e).byteLength;else if(e instanceof ArrayBuffer)o=(c=e).byteLength;else if(e instanceof FormData){var l=e,f=0,h=0;try{for(var p=s(l.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 a).encode(m).length;else{if(!(m instanceof Blob))return;f+=m.size}if(++h>=t)return}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}o=f}else if(e instanceof ReadableStream)return void(c=e);return o}}var S,A=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null===(t=null==r?void 0:r.forEach)||void 0===t||t.call(r,function(e,t){n[t]=e}),T(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var r=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return o(this,void 0,void 0,function(){var e,t;return i(this,function(r){switch(r.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),r.label=1;case 1:return r.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,r.sent()];case 3:return r.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),o(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,E(r.sent(),e,t)]}})})},e}(),O=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,r;if(void 0===e&&(e=[]),!this.headersString)return{};var n={},o=this.headersString.split("\r\n");try{for(var i=s(o),a=i.next();!a.done;a=i.next()){var c=u(a.value.split(": "),2),l=c[0],d=c[1];l&&d&&(n[l]=d)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return T(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),o(this,void 0,void 0,function(){var r;return i(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(v(r,e,t),[2,r]):[2,null]})})},e}();function E(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return v(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(S||(S={}));var q="[REDACTED]",T=function(e,t){var r,n,o=t.allow,i=void 0===o?[]:o,c=t.strategy,d=void 0===c?S.REMOVE:c,f=a([],u(l),!1),h={},p=function(t){var r=t.toLowerCase();f.find(function(e){return e.toLowerCase()===r})?d===S.REDACT&&(h[t]=q):i.find(function(e){return e.toLowerCase()===r})?h[t]=e[t]:d===S.REDACT&&(h[t]=q)};try{for(var v=s(Object.keys(e)),y=v.next();!y.done;y=v.next()){p(y.value)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return h},k=function(){function e(e,t,r,n,o,i,s,u,a,c,l){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=o,this.requestWrapper=i,this.status=s,this.duration=u,this.responseWrapper=a,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,r,n,o={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===(e=this.requestWrapper)||void 0===e?void 0:e.headers(a([],u(c),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers(a([],u(c),!1)),responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(o).filter(function(e){var t=u(e,2);return t[0],void 0!==t[1]}))},e}();var j=function(e,t){void 0===t&&(t=h()),this.callback=e,this.id=t},R=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=d();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=d();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,o,i,s,u,a,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(o=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===o?void 0:o.open,h=null===(u=null===(s=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===u?void 0:u.send,p=null===(l=null===(c=null===(a=this.globalScope)||void 0===a?void 0:a.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&h&&p&&this.observeXhr(f,h,p);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){var n;try{r.callback(e)}catch(e){null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,o,i,s){var u;if(void 0!==i&&void 0!==s){var a,c,l,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?a=null===(u=null==t?void 0:t.toString)||void 0===u?void 0:u.call(t):(a=t.url,d=t.method),a)try{var f=new URL(a);a="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(c=n.status),o&&(l={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},c=0);var h=Math.floor(performance.now()-s),p=Math.floor(i+h),v=new k(e,d,i,i,a,r,c,h,n,l,p);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(r,n){return o(t,void 0,void 0,function(){var t,o,s,u,a,c;return i(this,function(i){switch(i.label){case 0:try{t=this.getTimestamps()}catch(e){null===(a=this.logger)||void 0===a||a.debug("an unexpected error occurred while retrieving timestamps",e)}i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e(r,n)];case 2:return o=i.sent(),[3,4];case 3:return u=i.sent(),s=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new w(n):void 0,o?new A(o):void 0,s,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){null===(c=this.logger)||void 0===c||c.debug("an unexpected error occurred while handling fetch",e)}if(o)return[2,o];throw s}})})})},e.createXhrJsonParser=function(e,t){return function(){var r,n;try{if("json"===e.responseType){if(null===(r=t.globalScope)||void 0===r?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&"InvalidStateError"===r.name&&(null===(n=t.logger)||void 0===n||n.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))),null}return null}},e.prototype.observeXhr=function(t,r,o){if(this.globalScope&&t&&r){var i=this.globalScope.XMLHttpRequest.prototype,s=this;i.open=function(){for(var e,r,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=u(o,2),c=a[0],l=a[1];try{this.$$AmplitudeAnalyticsEvent=n({method:c,url:null===(e=null==l?void 0:l.toString)||void 0===e?void 0:e.call(l),headers:{}},s.getTimestamps())}catch(e){null===(r=s.logger)||void 0===r||r.error("an unexpected error occurred while calling xhr open",e)}return t.apply(this,o)},i.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=this,i=e.createXhrJsonParser(this,s),u=t[0],a=o.$$AmplitudeAnalyticsEvent;return o.addEventListener("loadend",function(){var e;try{var t=o.getAllResponseHeaders(),r=o.getResponseHeader("content-length"),n=new O(o.status,t,r?parseInt(r,10):void 0,i),c=o.$$AmplitudeAnalyticsEvent.headers,l=new _(u,c);a.status=o.status,s.handleNetworkRequestEvent("xhr",{url:a.url,method:a.method},l,n,void 0,a.startTime,a.durationStart)}catch(t){null===(e=s.logger)||void 0===e||e.error("an unexpected error occurred while handling xhr send",t)}}),r.apply(o,t)},i.setRequestHeader=function(e,t){var r;try{this.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){null===(r=s.logger)||void 0===r||r.error("an unexpected error occurred while calling xhr setRequestHeader",e)}o.apply(this,[e,t])}}},e}(),C=new R,P="[Amplitude] Network Request";function z(e){return"function"==typeof e}function I(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var F=I(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function B(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var H=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var c=s(i),l=c.next();!l.done;l=c.next()){l.value.remove(this)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else i.remove(this);var d=this.initialTeardown;if(z(d))try{d()}catch(e){o=e instanceof F?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=s(f),p=h.next();!p.done;p=h.next()){var v=p.value;try{M(v)}catch(e){o=null!=o?o:[],e instanceof F?o=a(a([],u(o)),u(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}}if(o)throw new F(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)M(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&B(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&B(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),W=H.EMPTY;function L(e){return e instanceof H||e&&"closed"in e&&z(e.remove)&&z(e.add)&&z(e.unsubscribe)}function M(e){z(e)?e():e.unsubscribe()}var N={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},J=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,a([e,t],u(r)))};function U(){}function D(e){e()}var V=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,L(t)&&t.add(r)):r.destination=K,r}return r(t,e),t.create=function(e,t,r){return new Q(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(H),$=Function.prototype.bind;function X(e,t){return $.call(e,t)}var Y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){G(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){G(e)}else G(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){G(e)}},e}(),Q=function(e){function t(t,r,n){var o,i,s=e.call(this)||this;z(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&N.useDeprecatedNextContext?((i=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&X(t.next,i),error:t.error&&X(t.error,i),complete:t.complete&&X(t.complete,i)}):o=t;return s.destination=new Y(o),s}return r(t,e),t}(V);function G(e){var t;t=e,J(function(){throw t})}var K={closed:!0,next:U,error:function(e){throw e},complete:U},Z="function"==typeof Symbol&&Symbol.observable||"@@observable";function ee(e){return e}var te=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof V||function(e){return e&&z(e.next)&&z(e.error)&&z(e.complete)}(n)&&L(n)?e:new Q(e,t,r);return D(function(){var e=o,t=e.operator,r=e.source;i.add(t?t.call(i,r):r?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=re(t))(function(t,n){var o=new Q({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Z]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?ee:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=re(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function re(e){var t;return null!==(t=null!=e?e:N.Promise)&&void 0!==t?t:Promise}function ne(e){return z(null==e?void 0:e.lift)}function oe(e){return function(t){if(ne(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function ie(e,t,r,n,o){return new se(e,t,r,n,o)}var se=function(e){function t(t,r,n,o,i,s){var u=e.call(this,t)||this;return u.onFinalize=i,u.shouldUnsubscribe=s,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return r(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(V);!function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,ne(t)&&(n.lift=t.lift),n}r(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new H;var r=this.getSubject();t.add(this.source.subscribe(ie(r,void 0,function(){e._teardown(),r.complete()},function(t){e._teardown(),r.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=H.EMPTY)}return t},t.prototype.refCount=function(){return oe(function(e,t){var r=null;e._refCount++;var n=ie(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,o=r;r=null,!n||o&&n!==o||n.unsubscribe(),t.unsubscribe()}});e.subscribe(n),n.closed||(r=e.connect())})(this)}}(te);var ue,ae={now:function(){return(ae.delegate||performance).now()},delegate:void 0},ce={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=t(function(t){r=void 0,e(t)});return new H(function(){return null==r?void 0:r(n)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ce.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,a([],u(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return cancelAnimationFrame.apply(void 0,a([],u(e)))},delegate:void 0};new te(function(e){var t=ue||ae,r=t.now(),n=0,o=function(){e.closed||(n=ce.requestAnimationFrame(function(i){n=0;var s=t.now();e.next({timestamp:ue?s:i,elapsed:s-r}),o()}))};return o(),function(){n&&ce.cancelAnimationFrame(n)}});var le=I(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),de=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r(t,e),t.prototype.lift=function(e){var t=new fe(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new le},t.prototype.next=function(e){var t=this;D(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=s(t.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(e)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;D(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;D(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?W:(this.currentObservers=null,i.push(e),new H(function(){t.currentObservers=null,B(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new te;return e.source=this,e},t.create=function(e,t){return new fe(e,t)},t}(te),fe=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return r(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:W},t}(de);!function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)}}(de);var he={now:function(){return(he.delegate||Date).now()},delegate:void 0};!function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=he);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}r(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;n||(o.push(t),!i&&o.push(s.now()+u)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var s=r.now(),u=0,a=1;a<n.length&&n[a]<=s;a+=2)u=a;u&&n.splice(0,u+1)}}}(de),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}r(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,o=t._value,i=t.thrownError,s=t.isStopped,u=t._isComplete;r?e.error(i):(s||u)&&(n&&e.next(o),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))}}(de);var pe,ve=function(e){function t(t,r){return e.call(this)||this}return r(t,e),t.prototype.schedule=function(e,t){return this},t}(H),ye=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,a([e,t],u(r)))},be=function(e){return clearInterval(e)},me=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return r(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),ye(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&be(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,B(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(ve),ge=1,we={};function _e(e){return e in we&&(delete we[e],!0)}var xe=function(e){var t=ge++;return we[t]=!0,pe||(pe=Promise.resolve()),pe.then(function(){return _e(t)&&e()}),t},Se=function(e){_e(e)},Ae={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ae.delegate;return((null==r?void 0:r.setImmediate)||xe).apply(void 0,a([],u(e)))},clearImmediate:function(e){return Se(e)},delegate:void 0},Oe=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=Ae.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var o;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var i=t.actions;null!=r&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==r&&(Ae.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},t}(me),Ee=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=he.now,e}(),qe=function(e){function t(t,r){void 0===r&&(r=Ee.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return r(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(Ee),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(qe);new Te(Oe),new qe(me);var ke=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(me),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(qe);new je(ke);var Re=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=ce.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,r,n){var o;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var i=t.actions;null!=r&&r===t._scheduled&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==r&&(ce.cancelAnimationFrame(r),t._scheduled=void 0)},t}(me),Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(qe);new Ce(Re),function(e){function t(t,r){void 0===t&&(t=ze),void 0===r&&(r=1/0);var n=e.call(this,t,function(){return n.frame})||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10}(qe);var Pe,ze=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o.index=n,o.active=!0,o.index=t.index=n,o}return r(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)}return H.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var o=e.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(me);new te(function(e){return e.complete()}),function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(Pe||(Pe={})),I(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),I(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),I(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}),I(function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}),I(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}),new te(U);var Ie,Fe="500-599";function Be(e,t){var r="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(e)}function He(e,t){var r,n,o=t.split(",");try{for(var i=s(o),a=i.next();!a.done;a=i.next()){var c=u(a.value.split("-").map(Number),2),l=c[0],d=c[1];if(e===l&&void 0===d)return!0;if(e>=l&&e<=d)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}function We(e){var t;if(e)try{var r=null===(t=d())||void 0===t?void 0:t.location.href,n=new URL(e,r),o=n.searchParams.toString(),i=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:o,fragment:i,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(e){return}}function Le(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return a([],u(c),!1);if(void 0===e){return}}}function Me(e){var t,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.blocklist)||void 0===r?void 0:r.length)}function Ne(e,t){var r;void 0===t&&(t={});var n=We(e.url);if(!n)return!1;var o,i=n.host;if(!1!==t.ignoreAmplitudeRequests&&(Be(i,"*.amplitude.com")||Be(i,"amplitude.com")))return!1;if(null===(r=t.ignoreHosts)||void 0===r?void 0:r.find(function(e){return Be(i,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!He(e.status,Fe))return!1;if(t.captureRules&&(a([],u(t.captureRules),!1).reverse().find(function(t){if(o=function(e,t,r,n,o){if((!e.hosts||e.hosts.find(function(e){return Be(t,e)}))&&(!n||!e.urls||function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})}(n,e.urls))&&(!o||!e.methods||e.methods.find(function(e){return o.toLowerCase()===e.toLowerCase()||"*"===e})))return!((r||0===r)&&!He(r,e.statusCodeRange||Fe))}(t,i,e.status,e.url,e.method),o){var r=Le(t.responseHeaders);if(e.responseWrapper&&r){var n=e.responseWrapper.headers(r);n&&(e.responseHeaders=n)}var s=Le(t.requestHeaders);if(e.requestWrapper&&s){var u=e.requestWrapper.headers(s);u&&(e.requestHeaders=u)}e.responseWrapper&&t.responseBody&&!Me(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!Me(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==o}),!o))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===P}))return!0}catch(e){}return!1}(i,e.requestWrapper)}function Je(e){var t,r,n=e.allObservables,s=e.networkTrackingOptions,a=e.amplitude,c=e.loggerProvider;return n.networkObservable.pipe((t=function(e){return Ne(e.event,s)},oe(function(e,n){var o=0;e.subscribe(ie(n,function(e){return t.call(r,e,o++)&&n.next(e)}))}))).subscribe(function(e){var t,r,n,s=e.event,l=We(s.url);if(l){var d=null===(r=s.responseWrapper)||void 0===r?void 0:r.bodySize,f=null===(n=s.requestWrapper)||void 0===n?void 0:n.bodySize;!function(e,t,r,n){o(this,void 0,void 0,function(){var o,s,a;return i(this,function(i){switch(i.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(o=u.apply(void 0,[i.sent(),2]),s=o[0],a=o[1],s)try{e["[Amplitude] Request Body"]=JSON.stringify(s)}catch(e){null==n||n.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==n||n.debug("Failed to stringify response body")}i.label=2;case 2:return null==r||r.track(P,e),[2]}})})}(((t={})["[Amplitude] URL"]=l.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=l.query,t["[Amplitude] URL Fragment"]=l.fragment,t["[Amplitude] Request Method"]=s.method,t["[Amplitude] Status Code"]=s.status,t["[Amplitude] Start Time"]=s.startTime,t["[Amplitude] Completion Time"]=s.endTime,t["[Amplitude] Duration"]=s.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=s.type,t["[Amplitude] Request Headers"]=s.requestHeaders,t["[Amplitude] Response Headers"]=s.responseHeaders,t),s,a,c)}})}!function(e){e.NetworkObservable="networkObservable"}(Ie||(Ie={}));var Ue=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-network-capture-browser",n=[],u=function(){var e,r=new te(function(e){var r=new j(function(t){var r=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(r)});return C.subscribe(r,t),function(){C.unsubscribe(r)}});return(e={})[Ie.NetworkObservable]=r,e};return{name:r,type:"enrichment",setup:function(s,a){return o(void 0,void 0,void 0,function(){var o,c;return i(this,function(i){return"undefined"==typeof document||(o=u(),t=null==s?void 0:s.loggerProvider,c=Je({allObservables:o,networkTrackingOptions:e,amplitude:a,loggerProvider:t}),n.push(c),null==t||t.log("".concat(r," has been successfully added."))),[2]})})},execute:function(e){return o(void 0,void 0,void 0,function(){return i(this,function(t){return[2,e]})})},teardown:function(){return o(void 0,void 0,void 0,function(){var e,t,r,o;return i(this,function(i){try{for(e=s(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(r)throw r.error}}return[2]})})}}};e.networkCapturePlugin=Ue,e.plugin=Ue,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))(function(o,i){function u(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(u,s)}a((n=n.apply(e,t||[])).next())})}function n(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function u(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var s=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],a=["authorization","cookie","set-cookie"],l=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},c=u([],i(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),f=function(e){var t,r=l();if(!(null===(t=null==r?void 0:r.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,f)}(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,u([],i(n.entries()),!1).map(function(e){var t=i(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(c[n]):c[n]}).join("")};function d(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function p(e,t,r){e&&h({json:e,allowlist:t.map(v),excludelist:r.map(v),ancestors:[]})}function h(e){var t,r,n=e.json,s=e.targetObject,a=e.allowlist,l=e.excludelist,c=e.ancestors,f=e.parentObject,p=e.targetKey;s||(s=n);var v=Object.keys(s);try{for(var y=o(v),g=y.next();!g.done;g=y.next()){var m=g.value,w=u(u([],i(c),!1),[m],!1);d(s[m])?b(w,a)&&!b(w,l)||delete s[m]:h({json:n,targetObject:s[m],allowlist:a,excludelist:l,ancestors:w,parentObject:s,targetKey:m})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}0===Object.keys(s).length&&f&&p&&delete f[p]}function v(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function y(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&"**"===t[n];)n++;return n===t.length}var o=t[n];if("**"===o){if(n+1===t.length)return!0;for(var i=r;i<=e.length;i++)if(y(e,t,i,n+1))return!0;return!1}return("*"===o||o===e[r])&&y(e,t,r+1,n+1)}function b(e,t){return t.some(function(t){return y(e,t)})}var g=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,r;void 0===e&&(e=[]);var n=this.request.headers,u={};if(Array.isArray(n))n.forEach(function(e){var t=i(e,2),r=t[0],n=t[1];u[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){u[t]=e});else if("object"==typeof n&&null!==n)try{for(var s=o(Object.entries(n)),a=s.next();!a.done;a=s.next()){var l=i(a.value,2),c=l[0],f=l[1];u[c]=f}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return E(u,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=l();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=w(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,T(this.body,e,t)]})})},e}(),m=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),E(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return w(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,T(this.body,e,t)]})})},e}();function w(e,t){var r,n,u,s=l(),a=null==s?void 0:s.TextEncoder;if(a){var c;if("string"==typeof e)c=e,u=(new a).encode(c).length;else if(e instanceof Blob)u=(c=e).size;else if(e instanceof URLSearchParams)c=e,u=(new a).encode(c.toString()).length;else if(ArrayBuffer.isView(e))u=(c=e).byteLength;else if(e instanceof ArrayBuffer)u=(c=e).byteLength;else if(e instanceof FormData){var f=e,d=0,p=0;try{for(var h=o(f.entries()),v=h.next();!v.done;v=h.next()){var y=i(v.value,2),b=y[0],g=y[1];if(d+=b.length,"string"==typeof g)d+=(new a).encode(g).length;else{if(!(g instanceof Blob))return;d+=g.size}if(++p>=t)return}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}u=d}else if(e instanceof ReadableStream)return void(c=e);return u}}var S,x=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null===(t=null==r?void 0:r.forEach)||void 0===t||t.call(r,function(e,t){n[t]=e}),E(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var r=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return r(this,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),r.label=1;case 1:return r.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,r.sent()];case 3:return r.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,T(r.sent(),e,t)]}})})},e}(),q=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,r;if(void 0===e&&(e=[]),!this.headersString)return{};var n={},u=this.headersString.split("\r\n");try{for(var s=o(u),a=s.next();!a.done;a=s.next()){var l=i(a.value.split(": "),2),c=l[0],f=l[1];c&&f&&(n[c]=f)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return E(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){var r;return n(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(p(r,e,t),[2,r]):[2,null]})})},e}();function T(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return p(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(S||(S={}));var O="[REDACTED]",E=function(e,t){var r,n,s=t.allow,l=void 0===s?[]:s,c=t.strategy,f=void 0===c?S.REMOVE:c,d=u([],i(a),!1),p={},h=function(t){var r=t.toLowerCase();d.find(function(e){return e.toLowerCase()===r})?f===S.REDACT&&(p[t]=O):l.find(function(e){return e.toLowerCase()===r})?p[t]=e[t]:f===S.REDACT&&(p[t]=O)};try{for(var v=o(Object.keys(e)),y=v.next();!y.done;y=v.next()){h(y.value)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return p},R=function(){function e(e,t,r,n,o,i,u,s,a,l,c){void 0===u&&(u=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=o,this.requestWrapper=i,this.status=u,this.duration=s,this.responseWrapper=a,this.error=l,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n,o={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===(e=this.requestWrapper)||void 0===e?void 0:e.headers(u([],i(s),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers(u([],i(s),!1)),responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(o).filter(function(e){var t=i(e,2);return t[0],void 0!==t[1]}))},e}();var j=function(e,t){void 0===t&&(t=f()),this.callback=e,this.id=t},k=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=l();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=l();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,o,i,u,s,a,l,c,f;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var d=null===(o=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===o?void 0:o.open,p=null===(s=null===(u=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===u?void 0:u.prototype)||void 0===s?void 0:s.send,h=null===(c=null===(l=null===(a=this.globalScope)||void 0===a?void 0:a.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===c?void 0:c.setRequestHeader;d&&p&&h&&this.observeXhr(d,p,h);var v=null===(f=this.globalScope)||void 0===f?void 0:f.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){var n;try{r.callback(e)}catch(e){null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,o,i,u){var s;if(void 0!==i&&void 0!==u){var a,l,c,f="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?a=null===(s=null==t?void 0:t.toString)||void 0===s?void 0:s.call(t):(a=t.url,f=t.method),a)try{var d=new URL(a);a="".concat(d.protocol,"//").concat(d.host).concat(d.pathname).concat(d.search).concat(d.hash)}catch(e){}f=(null==r?void 0:r.method)||f,n&&(l=n.status),o&&(c={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},l=0);var p=Math.floor(performance.now()-u),h=Math.floor(i+p),v=new R(e,f,i,i,a,r,l,p,n,c,h);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(o,i){return r(t,void 0,void 0,function(){var t,r,u,s,a,l;return n(this,function(n){switch(n.label){case 0:try{t=this.getTimestamps()}catch(e){null===(a=this.logger)||void 0===a||a.debug("an unexpected error occurred while retrieving timestamps",e)}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e(o,i)];case 2:return r=n.sent(),[3,4];case 3:return s=n.sent(),u=s,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",o,i?new g(i):void 0,r?new x(r):void 0,u,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){null===(l=this.logger)||void 0===l||l.debug("an unexpected error occurred while handling fetch",e)}if(r)return[2,r];throw u}})})})},e.createXhrJsonParser=function(e,t){return function(){var r,n;try{if("json"===e.responseType){if(null===(r=t.globalScope)||void 0===r?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&"InvalidStateError"===r.name&&(null===(n=t.logger)||void 0===n||n.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))),null}return null}},e.prototype.observeXhr=function(r,n,o){if(this.globalScope&&r&&n){var u=this.globalScope.XMLHttpRequest.prototype,s=this;u.open=function(){for(var e,n,o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];var a=i(o,2),l=a[0],c=a[1];try{this.$$AmplitudeAnalyticsEvent=t({method:l,url:null===(e=null==c?void 0:c.toString)||void 0===e?void 0:e.call(c),headers:{}},s.getTimestamps())}catch(e){null===(n=s.logger)||void 0===n||n.error("an unexpected error occurred while calling xhr open",e)}return r.apply(this,o)},u.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=e.createXhrJsonParser(this,s),u=t[0],a=o.$$AmplitudeAnalyticsEvent;return o.addEventListener("loadend",function(){var e;try{var t=o.getAllResponseHeaders(),r=o.getResponseHeader("content-length"),n=new q(o.status,t,r?parseInt(r,10):void 0,i),l=o.$$AmplitudeAnalyticsEvent.headers,c=new m(u,l);a.status=o.status,s.handleNetworkRequestEvent("xhr",{url:a.url,method:a.method},c,n,void 0,a.startTime,a.durationStart)}catch(t){null===(e=s.logger)||void 0===e||e.error("an unexpected error occurred while handling xhr send",t)}}),n.apply(o,t)},u.setRequestHeader=function(e,t){var r;try{this.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){null===(r=s.logger)||void 0===r||r.error("an unexpected error occurred while calling xhr setRequestHeader",e)}o.apply(this,[e,t])}}},e}(),A=new k;function _(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function C(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),e}var H=function(){return"function"==typeof Symbol},B=function(e){return H()&&Boolean(Symbol[e])},W=function(e){return B(e)?Symbol[e]:"@@"+e};H()&&!B("observable")&&(Symbol.observable=Symbol("observable"));var L=W("iterator"),J=W("observable"),M=W("species");function N(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function $(e){var t=e.constructor;return void 0!==t&&null===(t=t[M])&&(t=void 0),void 0!==t?t:Y}function D(e){return e instanceof Y}function I(e){I.log?I.log(e):setTimeout(function(){throw e})}function U(e){Promise.resolve().then(function(){try{e()}catch(e){I(e)}})}function X(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=N(t,"unsubscribe");r&&r.call(t)}}catch(e){I(e)}}function F(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function V(e,t,r){e._state="running";var n=e._observer;try{var o=N(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(F(e),!o)throw r;o.call(n,r);break;case"complete":F(e),o&&o.call(n)}}catch(e){I(e)}"closed"===e._state?X(e):"running"===e._state&&(e._state="ready")}function Q(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void U(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(V(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)})):void V(e,t,r);e._queue.push({type:t,value:r})}}var G=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new K(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(F(this),X(this))},C(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),K=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){Q(this._subscription,"next",e)},t.error=function(e){Q(this._subscription,"error",e)},t.complete=function(){Q(this._subscription,"complete")},C(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Y=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new G(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(r,n){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){n(e),o.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function i(){o.unsubscribe(),r()}})},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new($(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this),n=arguments.length>1,o=!1,i=arguments[1];return new r(function(r){return t.subscribe({next:function(t){var u=!o;if(o=!0,!u||n)try{i=e(i,t)}catch(e){return r.error(e)}else i=t},error:function(e){r.error(e)},complete:function(){if(!o&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(i),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=$(this);return new o(function(t){var n,i=0;return function e(u){n=u.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){i===r.length?(n=void 0,t.complete()):e(o.from(r[i++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=$(this);return new r(function(n){var o=[],i=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var i=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=o.indexOf(i);e>=0&&o.splice(e,1),u()}});o.push(i)},error:function(e){n.error(e)},complete:function(){u()}});function u(){i.closed&&0===o.length&&n.complete()}return function(){o.forEach(function(e){return e.unsubscribe()}),i.unsubscribe()}})},t[J]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=N(t,J);if(n){var o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return D(o)&&o.constructor===r?o:new r(function(e){return o.subscribe(e)})}if(B("iterator")&&(n=N(t,L)))return new r(function(e){U(function(){if(!e.closed){for(var r,o=_(n.call(t));!(r=o()).done;){var i=r.value;if(e.next(i),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){U(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){U(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})},C(e,null,[{key:M,get:function(){return this}}]),e}();H()&&Object.defineProperty(Y,Symbol("extensions"),{value:{symbol:J,hostReportError:I},configurable:!0});var Z,ee,te="[Amplitude] Network Request",re="500-599";function ne(e,t){var r="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(e)}function oe(e,t){var r,n,u=t.split(",");try{for(var s=o(u),a=s.next();!a.done;a=s.next()){var l=i(a.value.split("-").map(Number),2),c=l[0],f=l[1];if(e===c&&void 0===f)return!0;if(e>=c&&e<=f)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1}function ie(e){var t;if(e)try{var r=null===(t=l())||void 0===t?void 0:t.location.href,n=new URL(e,r),o=n.searchParams.toString(),i=n.hash.replace("#",""),u=n.href,s=n.host;return n.hash="",n.search="",{query:o,fragment:i,href:u,hrefWithoutQueryOrHash:n.href,host:s}}catch(e){return}}function ue(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return u([],i(s),!1);if(void 0===e){return}}}function se(e){var t,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.blocklist)||void 0===r?void 0:r.length)}function ae(e,t){var r;void 0===t&&(t={});var n=ie(e.url);if(!n)return!1;var o,s=n.host;if(!1!==t.ignoreAmplitudeRequests&&(ne(s,"*.amplitude.com")||ne(s,"amplitude.com")))return!1;if(null===(r=t.ignoreHosts)||void 0===r?void 0:r.find(function(e){return ne(s,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!oe(e.status,re))return!1;if(t.captureRules&&(u([],i(t.captureRules),!1).reverse().find(function(t){if(o=function(e,t,r,n,o){if((!e.hosts||e.hosts.find(function(e){return ne(t,e)}))&&(!n||!e.urls||function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})}(n,e.urls))&&(!o||!e.methods||e.methods.find(function(e){return o.toLowerCase()===e.toLowerCase()||"*"===e})))return!((r||0===r)&&!oe(r,e.statusCodeRange||re))}(t,s,e.status,e.url,e.method),o){var r=ue(t.responseHeaders);if(e.responseWrapper&&r){var n=e.responseWrapper.headers(r);n&&(e.responseHeaders=n)}var i=ue(t.requestHeaders);if(e.requestWrapper&&i){var u=e.requestWrapper.headers(i);u&&(e.requestHeaders=u)}e.responseWrapper&&t.responseBody&&!se(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!se(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==o}),!o))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===te}))return!0}catch(e){}return!1}(s,e.requestWrapper)}function le(e){var t=e.allObservables,o=e.networkTrackingOptions,u=e.amplitude,s=e.loggerProvider;return t.networkObservable.filter(function(e){return ae(e.event,o)}).subscribe(function(e){var t,o,a,l=e.event,c=ie(l.url);if(c){var f=null===(o=l.responseWrapper)||void 0===o?void 0:o.bodySize,d=null===(a=l.requestWrapper)||void 0===a?void 0:a.bodySize;!function(e,t,o,u){r(this,void 0,void 0,function(){var r,s,a;return n(this,function(n){switch(n.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(r=i.apply(void 0,[n.sent(),2]),s=r[0],a=r[1],s)try{e["[Amplitude] Request Body"]=JSON.stringify(s)}catch(e){null==u||u.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==u||u.debug("Failed to stringify response body")}n.label=2;case 2:return null==o||o.track(te,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=l.method,t["[Amplitude] Status Code"]=l.status,t["[Amplitude] Start Time"]=l.startTime,t["[Amplitude] Completion Time"]=l.endTime,t["[Amplitude] Duration"]=l.duration,t["[Amplitude] Request Body Size"]=d,t["[Amplitude] Response Body Size"]=f,t["[Amplitude] Request Type"]=l.type,t["[Amplitude] Request Headers"]=l.requestHeaders,t["[Amplitude] Response Headers"]=l.responseHeaders,t),l,u,s)}})}!function(e){e.NetworkObservable="networkObservable"}(Z||(Z={}));var ce=function(e){void 0===e&&(e={});var t,o="@amplitude/plugin-network-capture-browser",i=function(){var e,r=new Y(function(e){var r=new j(function(t){var r=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(r)});return A.subscribe(r,t),function(){A.unsubscribe(r)}});return(e={})[Z.NetworkObservable]=r,e};return{name:o,type:"enrichment",setup:function(u,s){return r(void 0,void 0,void 0,function(){var r;return n(this,function(n){return"undefined"==typeof document||(r=i(),t=null==u?void 0:u.loggerProvider,ee=le({allObservables:r,networkTrackingOptions:e,amplitude:s,loggerProvider:t}),null==t||t.log("".concat(o," has been successfully added."))),[2]})})},execute:function(e){return r(void 0,void 0,void 0,function(){return n(this,function(t){return[2,e]})})},teardown:function(){return r(void 0,void 0,void 0,function(){return n(this,function(e){return ee.unsubscribe(),[2]})})}}};e.networkCapturePlugin=ce,e.plugin=ce,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
Binary file
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { BrowserClient, BrowserConfig, EnrichmentPlugin, NetworkRequestEvent, NetworkTrackingOptions } from '@amplitude/analytics-core';
|
|
2
|
-
import { Observable } from '
|
|
3
|
-
import { HasEventTargetAddRemove } from 'rxjs/internal/observable/fromEvent';
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
navigation: HasEventTargetAddRemove<Event>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
2
|
+
import { Observable } from '@amplitude/analytics-core';
|
|
9
3
|
export type BrowserEnrichmentPlugin = EnrichmentPlugin<BrowserClient, BrowserConfig>;
|
|
10
4
|
export declare enum ObservablesEnum {
|
|
11
5
|
NetworkObservable = "networkObservable"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-capture-plugin.d.ts","sourceRoot":"","sources":["../../src/network-capture-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EAGnB,sBAAsB,EAEvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"network-capture-plugin.d.ts","sourceRoot":"","sources":["../../src/network-capture-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EAGnB,sBAAsB,EAEvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAkB,MAAM,2BAA2B,CAAC;AAGvE,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AAErF,oBAAY,eAAe;IACzB,iBAAiB,sBAAsB;CACxC;AAGD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;CACnF,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,KAAK,CAAC;AACnD,MAAM,MAAM,4BAA4B,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG;IACtE,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC;IAC1B,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9C,CAAC;AAGF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAC,CAAC;AAE5F,MAAM,WAAW,oBAAoB;IACnC,CAAC,eAAe,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC;CACxF;AAID,eAAO,MAAM,oBAAoB,aAAa,sBAAsB,KAAQ,uBA2E3E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrowserClient, NetworkRequestEvent, NetworkTrackingOptions, ILogger } from '@amplitude/analytics-core';
|
|
1
|
+
import { BrowserClient, NetworkRequestEvent, NetworkTrackingOptions, ILogger, Unsubscribable } from '@amplitude/analytics-core';
|
|
2
2
|
import { AllWindowObservables } from './network-capture-plugin';
|
|
3
3
|
/**
|
|
4
4
|
* Takes a user provided header capture rule and returns a
|
|
@@ -32,5 +32,5 @@ export declare function trackNetworkEvents({ allObservables, networkTrackingOpti
|
|
|
32
32
|
networkTrackingOptions: NetworkTrackingOptions;
|
|
33
33
|
amplitude: BrowserClient;
|
|
34
34
|
loggerProvider?: ILogger;
|
|
35
|
-
}):
|
|
35
|
+
}): Unsubscribable;
|
|
36
36
|
//# sourceMappingURL=track-network-event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-network-event.d.ts","sourceRoot":"","sources":["../../src/track-network-event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEnB,sBAAsB,EAItB,OAAO,
|
|
1
|
+
{"version":3,"file":"track-network-event.d.ts","sourceRoot":"","sources":["../../src/track-network-event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEnB,sBAAsB,EAItB,OAAO,EAEP,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,0BAA0B,CAAC;AA8GlF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,SAAS,CAmBxG;AAOD,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,mBAAmB,EAAE,OAAO,GAAE,sBAA2B,WA2F9G;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC5B,CAAC,uBAAuB,CAAC,CAAC,EAAE,MAAM,CAAC;IACnC,CAAC,0BAA0B,CAAC,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACvC,CAAC,yBAAyB,CAAC,CAAC,EAAE,MAAM,CAAC;IACrC,CAAC,wBAAwB,CAAC,CAAC,EAAE,MAAM,CAAC;IACpC,CAAC,6BAA6B,CAAC,CAAC,EAAE,MAAM,CAAC;IACzC,CAAC,sBAAsB,CAAC,CAAC,EAAE,MAAM,CAAC;IAClC,CAAC,+BAA+B,CAAC,CAAC,EAAE,MAAM,CAAC;IAC3C,CAAC,6BAA6B,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC,0BAA0B,CAAC,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,gCAAgC,CAAC,CAAC,EAAE,MAAM,CAAC;IAC5C,CAAC,8BAA8B,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,2BAA2B,CAAC,CAAC,EAAE,MAAM,CAAC;IACvC,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAChD,CAAC;AAEF,wBAAsB,wBAAwB,CAC5C,qBAAqB,EAAE,qBAAqB,EAC5C,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,aAAa,EACxB,cAAc,CAAC,EAAE,OAAO,iBAuBzB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,cAAc,GACf,EAAE;IACD,cAAc,EAAE,oBAAoB,CAAC;IACrC,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,SAAS,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,cAAc,CA6CjB"}
|
package/lib/scripts/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.7.0-zen-observable-migration.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,qCAAqC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/plugin-network-capture-browser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-zen-observable-migration.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"url": "https://github.com/amplitude/Amplitude-TypeScript/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@amplitude/analytics-core": "
|
|
43
|
+
"@amplitude/analytics-core": "2.32.0-zen-observable-migration.0",
|
|
44
44
|
"rxjs": "^7.8.1",
|
|
45
45
|
"tslib": "^2.4.1"
|
|
46
46
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"files": [
|
|
58
58
|
"lib"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f9e2f80ea7b6b81839b87a7eb047e7e8bc965fae"
|
|
61
61
|
}
|