@qonto/embed-sdk 0.63.0 → 0.64.1
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/dist/auth-links/client/auth-links.client.d.ts.map +1 -1
- package/dist/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
- package/dist/cards/client/cards.client.d.ts.map +1 -1
- package/dist/common/analytics/analytics-tracker.d.ts +18 -2
- package/dist/common/analytics/analytics-tracker.d.ts.map +1 -1
- package/dist/common/analytics/analytics.constants.d.ts +18 -2
- package/dist/common/analytics/analytics.constants.d.ts.map +1 -1
- package/dist/index.server.d.ts +7 -1
- package/dist/index.server.d.ts.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/organizations/client/organizations.client.d.ts.map +1 -1
- package/dist/organizations/index.d.ts +2 -2
- package/dist/organizations/index.server.d.ts +2 -2
- package/dist/payment-links/client/payment-links.client.d.ts +95 -0
- package/dist/payment-links/client/payment-links.client.d.ts.map +1 -0
- package/dist/payment-links/client/payment-links.client.test.d.ts +2 -0
- package/dist/payment-links/client/payment-links.client.test.d.ts.map +1 -0
- package/dist/payment-links/index.d.ts +27 -6
- package/dist/payment-links/index.d.ts.map +1 -1
- package/dist/payment-links/index.server.d.ts +35 -0
- package/dist/payment-links/index.server.d.ts.map +1 -0
- package/dist/payment-links/server/payment-links.server.d.ts +50 -0
- package/dist/payment-links/server/payment-links.server.d.ts.map +1 -0
- package/dist/payment-links/server/payment-links.server.test.d.ts +2 -0
- package/dist/payment-links/server/payment-links.server.test.d.ts.map +1 -0
- package/dist/payment-links/shared/currency.validation.d.ts.map +1 -0
- package/dist/payment-links/shared/payment-links.shared.test.d.ts +2 -0
- package/dist/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
- package/dist/payment-links/{payment-links.types.d.ts → shared/payment-links.types.d.ts} +2 -2
- package/dist/payment-links/shared/payment-links.types.d.ts.map +1 -0
- package/dist/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
- package/dist/payment-links/shared/payment-links.validate.d.ts.map +1 -0
- package/dist/payment-links/shared/unit.validation.d.ts.map +1 -0
- package/dist/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
- package/dist/sepa-transfers/client/sepa-transfers.client.d.ts.map +1 -1
- package/dist/server/auth-links/client/auth-links.client.d.ts.map +1 -1
- package/dist/server/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
- package/dist/server/cards/client/cards.client.d.ts.map +1 -1
- package/dist/server/common/analytics/analytics-tracker.d.ts +18 -2
- package/dist/server/common/analytics/analytics-tracker.d.ts.map +1 -1
- package/dist/server/common/analytics/analytics.constants.d.ts +18 -2
- package/dist/server/common/analytics/analytics.constants.d.ts.map +1 -1
- package/dist/server/index.server.d.ts +7 -1
- package/dist/server/index.server.d.ts.map +1 -1
- package/dist/server/index.server.umd.js +1 -1
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/attribution/helpers.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/attribution/web-attribution.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/browser-client-factory.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/config/joined-config.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/config.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/constants.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/cookie-migration/index.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/default-tracking.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/det-notification.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/index.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/lib-prefix.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/plugins/context.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/plugins/form-interaction-tracking.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/plugins/network-connectivity-checker.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/storage/local-storage.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/storage/session-storage.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/transports/send-beacon.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/transports/xhr.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/types.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/utils/snippet-helper.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/version.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-connector@1.6.4/node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/analytics-connector.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/config.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/core-client.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-client.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-storage.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/diagnostics/uncaught-sdk-errors.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/language.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/logger.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/network-observer.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/network-request-event.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/identity.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/query-params.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config-localstorage.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/session.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/cookie.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/helpers.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/timeline.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/fetch.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/frustration-interactions.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/status.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/json-query.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/sampling.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-action-click.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-change.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-click.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-dead-click.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-rage-click.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture-plugin.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/constants.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/data-extractor.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/frustration-plugin.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/helpers.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/hierarchy.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/libs/messenger.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/observables.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/pageActions/actions.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/pageActions/matchEventToFilter.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/pageActions/triggers.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/version.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-network-capture-browser@1.7.2/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/constants.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-network-capture-browser@1.7.2/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/network-capture-plugin.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-network-capture-browser@1.7.2/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/track-network-event.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-page-url-enrichment-browser@0.5.8/node_modules/@amplitude/plugin-page-url-enrichment-browser/lib/esm/page-url-enrichment.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-page-view-tracking-browser@2.6.5/node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/page-view-tracking.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-page-view-tracking-browser@2.6.5/node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/utils.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-web-vitals-browser@1.1.2/node_modules/@amplitude/plugin-web-vitals-browser/lib/esm/constants.js +1 -0
- package/dist/server/node_modules/.pnpm/@amplitude_plugin-web-vitals-browser@1.1.2/node_modules/@amplitude/plugin-web-vitals-browser/lib/esm/web-vitals-plugin.js +1 -0
- package/dist/server/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js +1 -0
- package/dist/server/node_modules/.pnpm/web-vitals@5.0.1/node_modules/web-vitals/dist/web-vitals.js +1 -0
- package/dist/server/node_modules/.pnpm/zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js +1 -0
- package/dist/server/organizations/client/organizations.client.d.ts.map +1 -1
- package/dist/server/organizations/index.d.ts +2 -2
- package/dist/server/organizations/index.server.d.ts +2 -2
- package/dist/server/payment-links/client/payment-links.client.d.ts +95 -0
- package/dist/server/payment-links/client/payment-links.client.d.ts.map +1 -0
- package/dist/server/payment-links/client/payment-links.client.test.d.ts +2 -0
- package/dist/server/payment-links/client/payment-links.client.test.d.ts.map +1 -0
- package/dist/server/payment-links/index.d.ts +27 -6
- package/dist/server/payment-links/index.d.ts.map +1 -1
- package/dist/server/payment-links/index.server.d.ts +35 -0
- package/dist/server/payment-links/index.server.d.ts.map +1 -0
- package/dist/server/payment-links/server/payment-links.server.d.ts +50 -0
- package/dist/server/payment-links/server/payment-links.server.d.ts.map +1 -0
- package/dist/server/payment-links/server/payment-links.server.test.d.ts +2 -0
- package/dist/server/payment-links/server/payment-links.server.test.d.ts.map +1 -0
- package/dist/server/payment-links/shared/currency.validation.d.ts.map +1 -0
- package/dist/server/payment-links/shared/payment-links.shared.test.d.ts +2 -0
- package/dist/server/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
- package/dist/server/payment-links/{payment-links.types.d.ts → shared/payment-links.types.d.ts} +2 -2
- package/dist/server/payment-links/shared/payment-links.types.d.ts.map +1 -0
- package/dist/server/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
- package/dist/server/payment-links/shared/payment-links.validate.d.ts.map +1 -0
- package/dist/server/payment-links/shared/unit.validation.d.ts.map +1 -0
- package/dist/server/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
- package/dist/server/sepa-transfers/client/sepa-transfers.client.d.ts.map +1 -1
- package/dist/server/src/auth-links/auth-links.js +1 -1
- package/dist/server/src/auth-links/index.server.js +1 -0
- package/dist/server/src/auth-links/server/auth-links.server.js +1 -0
- package/dist/server/src/beneficiaries/index.server.js +1 -0
- package/dist/server/src/beneficiaries/server/beneficiaries.server.js +1 -0
- package/dist/server/src/beneficiaries/shared/beneficiaries.api.js +1 -1
- package/dist/server/src/beneficiaries/shared/beneficiaries.serializer.js +1 -1
- package/dist/server/src/beneficiaries/shared/beneficiaries.validate.js +1 -1
- package/dist/server/src/cards/index.server.js +1 -0
- package/dist/server/src/cards/server/cards.server.js +1 -0
- package/dist/server/src/cards/shared/cards.api.js +1 -0
- package/dist/server/src/cards/shared/cards.serializer.js +1 -0
- package/dist/server/src/cards/shared/cards.types.js +1 -0
- package/dist/server/src/cards/shared/cards.validate.js +1 -0
- package/dist/server/src/common/analytics/amplitude-manager.js +1 -0
- package/dist/server/src/common/analytics/analytics-tracker.js +1 -0
- package/dist/server/src/common/analytics/analytics.constants.js +1 -0
- package/dist/server/src/common/logger/logger.js +1 -0
- package/dist/server/src/index.server.js +1 -1
- package/dist/server/src/organizations/index.server.js +1 -0
- package/dist/server/src/organizations/server/organizations.server.js +1 -0
- package/dist/server/src/organizations/shared/organizations.api.js +1 -0
- package/dist/server/src/organizations/shared/organizations.serializer.js +1 -0
- package/dist/server/src/payment-links/index.server.js +1 -0
- package/dist/server/src/payment-links/server/payment-links.server.js +1 -0
- package/dist/server/src/payment-links/shared/payment-links.validate.js +1 -0
- package/dist/server/src/transactions/index.server.js +1 -0
- package/dist/server/src/transactions/server/transactions.server.js +1 -0
- package/dist/server/src/transactions/shared/transactions.api.js +1 -0
- package/dist/server/src/transactions/shared/transactions.serializer.js +1 -0
- package/dist/server/src/transactions/shared/transactions.validation.js +1 -0
- package/dist/server/transactions/client/transactions.client.d.ts.map +1 -1
- package/dist/server/types/types.public-api.d.ts +1 -1
- package/dist/server/types/types.public-api.d.ts.map +1 -1
- package/dist/server/validation/operation-settings-validation.d.ts +2 -1
- package/dist/server/validation/operation-settings-validation.d.ts.map +1 -1
- package/dist/src/auth-links/client/auth-links.client.js +1 -1
- package/dist/src/auth-links/shared/auth-links.api.js +1 -1
- package/dist/src/beneficiaries/client/beneficiaries.client.js +1 -1
- package/dist/src/cards/client/cards.client.js +1 -1
- package/dist/src/common/analytics/analytics-tracker.js +1 -1
- package/dist/src/common/analytics/analytics.constants.js +1 -1
- package/dist/src/organizations/client/organizations.client.js +1 -1
- package/dist/src/payment-links/client/payment-links.client.js +1 -0
- package/dist/src/payment-links/index.js +1 -1
- package/dist/src/payment-links/shared/currency.validation.js +1 -0
- package/dist/src/payment-links/shared/payment-links.types.js +1 -0
- package/dist/src/payment-links/shared/payment-links.validate.js +1 -0
- package/dist/src/payment-links/shared/unit.validation.js +1 -0
- package/dist/src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.js +1 -1
- package/dist/src/sepa-transfers/client/sepa-transfers.client.js +1 -1
- package/dist/src/transactions/client/transactions.client.js +1 -1
- package/dist/transactions/client/transactions.client.d.ts.map +1 -1
- package/dist/types/types.public-api.d.ts +1 -1
- package/dist/types/types.public-api.d.ts.map +1 -1
- package/dist/validation/operation-settings-validation.d.ts +2 -1
- package/dist/validation/operation-settings-validation.d.ts.map +1 -1
- package/package.json +5 -1
- package/dist/payment-links/payment-links.d.ts +0 -58
- package/dist/payment-links/payment-links.d.ts.map +0 -1
- package/dist/payment-links/payment-links.public-api.d.ts +0 -5
- package/dist/payment-links/payment-links.public-api.d.ts.map +0 -1
- package/dist/payment-links/payment-links.test.d.ts +0 -2
- package/dist/payment-links/payment-links.test.d.ts.map +0 -1
- package/dist/payment-links/payment-links.types.d.ts.map +0 -1
- package/dist/payment-links/validation/currency.validation.d.ts.map +0 -1
- package/dist/payment-links/validation/payment-links.validate.d.ts.map +0 -1
- package/dist/payment-links/validation/unit.validation.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.d.ts +0 -58
- package/dist/server/payment-links/payment-links.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.public-api.d.ts +0 -5
- package/dist/server/payment-links/payment-links.public-api.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.test.d.ts +0 -2
- package/dist/server/payment-links/payment-links.test.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.types.d.ts.map +0 -1
- package/dist/server/payment-links/validation/currency.validation.d.ts.map +0 -1
- package/dist/server/payment-links/validation/payment-links.validate.d.ts.map +0 -1
- package/dist/server/payment-links/validation/unit.validation.d.ts.map +0 -1
- package/dist/src/auth-links/auth-links.js +0 -1
- package/dist/src/payment-links/payment-links.js +0 -1
- package/dist/src/payment-links/payment-links.public-api.js +0 -1
- package/dist/src/payment-links/validation/payment-links.validate.js +0 -1
- /package/dist/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
- /package/dist/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
- /package/dist/server/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
- /package/dist/server/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
- /package/dist/{src/payment-links/validation → server/src/payment-links/shared}/currency.validation.js +0 -0
- /package/dist/{src/payment-links → server/src/payment-links/shared}/payment-links.types.js +0 -0
- /package/dist/{src/payment-links/validation → server/src/payment-links/shared}/unit.validation.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as e,__assign as r,__read as i}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BASE_CAMPAIGN as n}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";import{Identify as t}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";import{createIdentifyEvent as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js";var a=function(e){var r=e.split(".");return r.length<=2?e:r.slice(r.length-2,r.length).join(".")},o=function(r,i,n,t,s){void 0===s&&(s=!0),r.referrer;var o=r.referring_domain,c=e(r,["referrer","referring_domain"]),l=i||{};l.referrer;var d=l.referring_domain,m=e(l,["referrer","referring_domain"]);if(u(n.excludeReferrers,r.referring_domain))return t.debug("This is not a new campaign because ".concat(r.referring_domain," is in the exclude referrer list.")),!1;if(!s&&function(e){return Object.values(e).every((function(e){return!e}))}(r)&&i)return t.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var f=JSON.stringify(c)!==JSON.stringify(m),p=a(o||"")!==a(d||""),g=!i||f||p;return g?t.debug("This is a new campaign. An $identify event will be sent."):t.debug("This is not a new campaign because it's the same as the previous one."),g},u=function(e,r){return void 0===e&&(e=[]),void 0===r&&(r=""),e.some((function(e){return e instanceof RegExp?e.test(r):e===r}))},c=function(e,a){var o=r(r({},n),e),u=Object.entries(o).reduce((function(e,r){var n,t=i(r,2),s=t[0],o=t[1];return e.setOnce("initial_".concat(s),null!==(n=null!=o?o:a.initialEmptyValue)&&void 0!==n?n:"EMPTY"),o?e.set(s,o):e.unset(s)}),new t);return s(u)},l=function(e){var r=e;return r?(r.startsWith(".")&&(r=r.substring(1)),[new RegExp("".concat(r.replace(".","\\."),"$"))]):[]};export{c as createCampaignEvent,l as getDefaultExcludedReferrers,u as isExcludedReferrer,o as isNewCampaign};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i,__read as s}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getDefaultExcludedReferrers as a,isNewCampaign as r,createCampaignEvent as o}from"./helpers.js";import{getStorageKey as n}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/helpers.js";import{BASE_CAMPAIGN as p}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";import{isNewSession as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/session.js";import{CampaignParser as m}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js";var u=function(){function u(t,i){var s;this.shouldTrackNewCampaign=!1,this.options=e({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:a(null===(s=i.cookieOptions)||void 0===s?void 0:s.domain)},t),this.storage=i.cookieStorage,this.storageKey=n(i.apiKey,"MKTG"),this.webExpStorageKey=n(i.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=p,this.sessionTimeout=i.sessionTimeout,this.lastEventTime=i.lastEventTime,this.logger=i.loggerProvider,i.loggerProvider.log("Installing web attribution tracking.")}return u.prototype.init=function(){return t(this,void 0,void 0,(function(){var e,t;return i(this,(function(i){switch(i.label){case 0:return[4,this.fetchCampaign()];case 1:return t=s.apply(void 0,[i.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||l(this.sessionTimeout,this.lastEventTime),r(this.currentCampaign,this.previousCampaign,this.options,this.logger,e)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))},u.prototype.fetchCampaign=function(){return t(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new m).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}}))}))},u.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t=o(this.currentCampaign,this.options);return e&&(t.event_id=e),t},u.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},u}();export{u as WebAttribution};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AmplitudeBrowser as e}from"./browser-client.js";import{debugWrapper as i,getClientStates as n,getClientLogConfig as t}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js";var d=function(){var d=new e;return{init:i(d.init.bind(d),"init",t(d),n(d,["config"])),add:i(d.add.bind(d),"add",t(d),n(d,["config.apiKey","timeline.plugins"])),remove:i(d.remove.bind(d),"remove",t(d),n(d,["config.apiKey","timeline.plugins"])),track:i(d.track.bind(d),"track",t(d),n(d,["config.apiKey","timeline.queue.length"])),logEvent:i(d.logEvent.bind(d),"logEvent",t(d),n(d,["config.apiKey","timeline.queue.length"])),identify:i(d.identify.bind(d),"identify",t(d),n(d,["config.apiKey","timeline.queue.length"])),groupIdentify:i(d.groupIdentify.bind(d),"groupIdentify",t(d),n(d,["config.apiKey","timeline.queue.length"])),setGroup:i(d.setGroup.bind(d),"setGroup",t(d),n(d,["config.apiKey","timeline.queue.length"])),revenue:i(d.revenue.bind(d),"revenue",t(d),n(d,["config.apiKey","timeline.queue.length"])),flush:i(d.flush.bind(d),"flush",t(d),n(d,["config.apiKey","timeline.queue.length"])),getUserId:i(d.getUserId.bind(d),"getUserId",t(d),n(d,["config","config.userId"])),setUserId:i(d.setUserId.bind(d),"setUserId",t(d),n(d,["config","config.userId"])),getDeviceId:i(d.getDeviceId.bind(d),"getDeviceId",t(d),n(d,["config","config.deviceId"])),setDeviceId:i(d.setDeviceId.bind(d),"setDeviceId",t(d),n(d,["config","config.deviceId"])),reset:i(d.reset.bind(d),"reset",t(d),n(d,["config","config.userId","config.deviceId"])),getSessionId:i(d.getSessionId.bind(d),"getSessionId",t(d),n(d,["config"])),setSessionId:i(d.setSessionId.bind(d),"setSessionId",t(d),n(d,["config"])),extendSession:i(d.extendSession.bind(d),"extendSession",t(d),n(d,["config"])),setOptOut:i(d.setOptOut.bind(d),"setOptOut",t(d),n(d,["config"])),setTransport:i(d.setTransport.bind(d),"setTransport",t(d),n(d,["config"])),getIdentity:i(d.getIdentity.bind(d),"getIdentity",t(d),n(d,["config"])),getOptOut:i(d.getOptOut.bind(d),"getOptOut",t(d),n(d,["config"])),_setDiagnosticsSampleRate:i(d._setDiagnosticsSampleRate.bind(d),"_setDiagnosticsSampleRate",t(d),n(d,["config"]))}},s=d();export{d as createInstance,s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as i,__assign as e,__awaiter as t,__generator as s,__rest as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isSessionTrackingEnabled as n,isPageUrlEnrichmentEnabled as r,isWebVitalsEnabled as a,isNetworkTrackingEnabled as d,getNetworkTrackingConfig as c,isFrustrationInteractionsEnabled as l,getFrustrationInteractionsConfig as u,isElementInteractionsEnabled as p,getElementInteractionsConfig as g,isPageViewTrackingEnabled as m,getPageViewTrackingConfig as f,isFormInteractionTrackingEnabled as h,isFileDownloadTrackingEnabled as v,isAttributionTrackingEnabled as b,getAttributionTrackingConfig as y}from"./default-tracking.js";import{isInstanceProxy as _,convertProxyObjectToRealObject as I}from"./utils/snippet-helper.js";import{Context as w}from"./plugins/context.js";import{createTransport as j,useBrowserConfig as k}from"./config.js";import{formInteractionTracking as S}from"./plugins/form-interaction-tracking.js";import{fileDownloadTracking as P}from"./plugins/file-download-tracking.js";import{DEFAULT_SESSION_END_EVENT as C,DEFAULT_SESSION_START_EVENT as T}from"./constants.js";import{detNotify as D}from"./det-notification.js";import{networkConnectivityCheckerPlugin as N}from"./plugins/network-connectivity-checker.js";import{updateBrowserConfigWithRemoteConfig as A}from"./config/joined-config.js";import{WebAttribution as E}from"./attribution/web-attribution.js";import{LIBPREFIX as q}from"./lib-prefix.js";import{VERSION as R}from"./version.js";import{returnWrapper as O}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js";import{setConnectorUserId as U,setConnectorDeviceId as K,getAnalyticsConnector as x}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/analytics-connector.js";import{UUID as z}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";import{createIdentifyEvent as B}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js";import{AmplitudeCore as F}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/core-client.js";import{pageUrlEnrichmentPlugin as J}from"../../../../../../@amplitude_plugin-page-url-enrichment-browser@0.5.8/node_modules/@amplitude/plugin-page-url-enrichment-browser/lib/esm/page-url-enrichment.js";import{webVitalsPlugin as Q}from"../../../../../../@amplitude_plugin-web-vitals-browser@1.1.2/node_modules/@amplitude/plugin-web-vitals-browser/lib/esm/web-vitals-plugin.js";import{networkCapturePlugin as Z}from"../../../../../../@amplitude_plugin-network-capture-browser@1.7.2/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/network-capture-plugin.js";import{frustrationPlugin as Y}from"../../../../../../@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/frustration-plugin.js";import{autocapturePlugin as G}from"../../../../../../@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture-plugin.js";import{pageViewTrackingPlugin as H}from"../../../../../../@amplitude_plugin-page-view-tracking-browser@2.6.5/node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/page-view-tracking.js";import{IdentityEventSender as L}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/identity.js";import{Destination as M}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js";import{getQueryParams as V}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/query-params.js";import{OfflineDisabled as W}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js";import{DiagnosticsClient as X}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-client.js";import{RemoteConfigClient as $}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config.js";import{Identify as ii}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";import{Revenue as ei}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";import{isNewSession as ti}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/session.js";import{SpecialEventType as si}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";var oi=function(F){function oi(){var i=null!==F&&F.apply(this,arguments)||this;return i._diagnosticsSampleRate=0,i}return i(oi,F),oi.prototype.init=function(i,t,s){var o,n;return void 0===i&&(i=""),arguments.length>2?(o=t,n=s):"string"==typeof t?(o=t,n=void 0):(o=null==t?void 0:t.userId,n=t),O(this._init(e(e({},n),{userId:o,apiKey:i})))},oi.prototype._init=function(i){var e,n,_,I;return t(this,void 0,void 0,(function(){var t,j,C,T,O,U,K,z,B,ii=this;return s(this,(function(s){switch(s.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,k(i.apiKey,i,this)]);case 1:return t=s.sent(),t.remoteConfig&&t.remoteConfig.fetchRemoteConfig?(j=new $(t.apiKey,t.loggerProvider,t.serverZone,null===(e=t.remoteConfig)||void 0===e?void 0:e.serverUrl),[4,new Promise((function(i){null==j||j.subscribe("configs.analyticsSDK.browserSDK","all",(function(e,s,o){t.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:e,source:s,lastFetch:o},null,2)),e&&A(e,t),i()}))}))]):[3,4];case 2:return s.sent(),[4,new Promise((function(i){null==j||j.subscribe("configs.diagnostics.browserSDK","all",(function(e,s,o){if(t.loggerProvider.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:e,source:s,lastFetch:o},null,2)),e){var n=e.sampleRate;"number"!=typeof n||isNaN(n)||(t.diagnosticsSampleRate=n);var r=e.enabled;"boolean"==typeof r&&(t.enableDiagnostics=r)}i()}))}))];case 3:s.sent(),s.label=4;case 4:return(C=new X(t.apiKey,t.loggerProvider,t.serverZone,{enabled:t.enableDiagnostics,sampleRate:t.diagnosticsSampleRate})).setTag("library","".concat(q,"/").concat(R)),C.setTag("user_agent",navigator.userAgent),[4,F.prototype._init.call(this,t)];case 5:return s.sent(),this.logBrowserOptions(t),this.config.diagnosticsClient=C,this.config.remoteConfigClient=j,b(this.config.defaultTracking)?(T=y(this.config),this.webAttribution=new E(T,this.config),[4,this.webAttribution.init()]):[3,7];case 6:s.sent(),s.label=7;case 7:return O=V(),U=O.ampTimestamp?Number(O.ampTimestamp):void 0,K=!U||Date.now()<U,z=K&&!Number.isNaN(Number(O.ampSessionId))?Number(O.ampSessionId):void 0,this.setSessionId(null!==(I=null!==(_=null!==(n=i.sessionId)&&void 0!==n?n:z)&&void 0!==_?_:this.config.sessionId)&&void 0!==I?I:Date.now()),(B=x(i.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===W?[3,9]:[4,this.add(N()).promise];case 8:s.sent(),s.label=9;case 9:return[4,this.add(new M({diagnosticsClient:C})).promise];case 10:return s.sent(),[4,this.add(new w).promise];case 11:return s.sent(),[4,this.add(new L).promise];case 12:return s.sent(),D(this.config),v(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(P()).promise]):[3,14];case 13:s.sent(),s.label=14;case 14:return h(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(S()).promise]):[3,16];case 15:s.sent(),s.label=16;case 16:return m(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(H(f(this.config))).promise]):[3,18];case 17:s.sent(),s.label=18;case 18:return p(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(G(g(this.config),{diagnosticsClient:C})).promise]):[3,20];case 19:s.sent(),s.label=20;case 20:return l(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(Y(u(this.config))).promise]):[3,22];case 21:s.sent(),s.label=22;case 22:return d(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(Z(c(this.config))).promise]):[3,24];case 23:s.sent(),s.label=24;case 24:return a(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Q()).promise]):[3,26];case 25:s.sent(),s.label=26;case 26:return r(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(J()).promise]):[3,28];case 27:s.sent(),s.label=28;case 28:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 29:return s.sent(),B.eventBridge.setEventReceiver((function(i){var e=i.eventProperties||{},t=e.time,s=o(e,["time"]),n="number"==typeof t?{time:t}:void 0;ii.track(i.eventType,s,n)})),[2]}}))}))},oi.prototype.getUserId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.userId},oi.prototype.setUserId=function(i){this.config?(this.config.loggerProvider.debug("function setUserId: ",i),i===this.config.userId&&void 0!==i||(this.config.userId=i,this.timeline.onIdentityChanged({userId:i}),U(i,this.config.instanceName))):this.q.push(this.setUserId.bind(this,i))},oi.prototype.getDeviceId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.deviceId},oi.prototype.setDeviceId=function(i){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",i),i!==this.config.deviceId&&(this.config.deviceId=i,this.timeline.onIdentityChanged({deviceId:i}),K(i,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,i))},oi.prototype.reset=function(){this.setDeviceId(z()),this.setUserId(void 0),this.timeline.onReset()},oi.prototype.getIdentity=function(){var i,e;return{deviceId:null===(i=this.config)||void 0===i?void 0:i.deviceId,userId:null===(e=this.config)||void 0===e?void 0:e.userId,userProperties:this.userProperties}},oi.prototype.getOptOut=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.optOut},oi.prototype.getSessionId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.sessionId},oi.prototype.setSessionId=function(i){var e,t=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,i)),O(Promise.resolve());if(i===this.config.sessionId)return O(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",i);var s=this.getSessionId();s!==i&&this.timeline.onSessionIdChanged(i);var o=this.config.lastEventTime,r=null!==(e=this.config.lastEventId)&&void 0!==e?e:-1;this.config.sessionId=i,this.config.lastEventTime=void 0,this.config.pageCounter=0,n(this.config.defaultTracking)&&(s&&o&&t.push(this.track(C,void 0,{device_id:this.previousSessionDeviceId,event_id:++r,session_id:s,time:o+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++r,t);return this.config.identify&&t.push(this.track(B(this.config.identify)).promise),n(this.config.defaultTracking)&&t.push(this.track(T,void 0,{event_id:a?++r:r,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,O(Promise.all(t))},oi.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},oi.prototype.setTransport=function(i){this.config?this.config.transportProvider=j(i):this.q.push(this.setTransport.bind(this,i))},oi.prototype.identify=function(i,e){if(_(i)){var t=i._q;i._q=[],i=I(new ii,t)}return(null==e?void 0:e.user_id)&&this.setUserId(e.user_id),(null==e?void 0:e.device_id)&&this.setDeviceId(e.device_id),F.prototype.identify.call(this,i,e)},oi.prototype.groupIdentify=function(i,e,t,s){if(_(t)){var o=t._q;t._q=[],t=I(new ii,o)}return F.prototype.groupIdentify.call(this,i,e,t,s)},oi.prototype.revenue=function(i,e){if(_(i)){var t=i._q;i._q=[],i=I(new ei,t)}return F.prototype.revenue.call(this,i,e)},oi.prototype.trackCampaignEventIfNeeded=function(i,e){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var t=this.webAttribution.generateCampaignEvent(i);return e?e.push(this.track(t).promise):this.track(t),this.config.loggerProvider.log("Tracking attribution."),!0},oi.prototype.process=function(i){return t(this,void 0,void 0,(function(){var e,t,o;return s(this,(function(s){return e=Date.now(),t=ti(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),i.event_type===T||i.event_type===C||i.session_id&&i.session_id!==this.getSessionId()||(t||o?(this.setSessionId(e),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):t||this.trackCampaignEventIfNeeded()),i.event_type===si.IDENTIFY&&i.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(i.user_properties)),[2,F.prototype.process.call(this,i)]}))}))},oi.prototype.logBrowserOptions=function(i){try{var t=e(e({},i),{apiKey:i.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},oi.prototype._setDiagnosticsSampleRate=function(i){i>1||i<0||this.config||(this._diagnosticsSampleRate=i)},oi}(F);export{oi as AmplitudeBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e,__values as t,__spreadArray as r,__read as a}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{SAFE_HEADERS as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";function l(e){var n,u,i,c,p,d,s,f,v,g,y;if("object"==typeof e&&null!==e&&!Array.isArray(e)){var k=Object.keys(e);try{for(var w=t(k),b=w.next();!b.done;b=w.next()){var m=b.value;try{var h=e[m];"boolean"==typeof(null==h?void 0:h.enabled)&&(h.enabled?(delete h.enabled,0===Object.keys(h).length&&(e[m]=!0)):e[m]=!1),l(h)}catch(e){}}}catch(e){n={error:e}}finally{try{b&&!b.done&&(u=w.return)&&u.call(w)}finally{if(n)throw n.error}}try{if(null===(v=null===(f=null===(s=e.autocapture)||void 0===s?void 0:s.networkTracking)||void 0===f?void 0:f.captureRules)||void 0===v?void 0:v.length)try{for(var x=t(e.autocapture.networkTracking.captureRules),I=x.next();!I.done;I=x.next()){var R=I.value;try{for(var j=(p=void 0,t(["responseHeaders","requestHeaders"])),A=j.next();!A.done;A=j.next()){var T=A.value,C=null!==(g=R[T])&&void 0!==g?g:{},_=C.captureSafeHeaders,U=C.allowlist;(_||U)&&(void 0===U||Array.isArray(U)?R[T]=r(r([],a(_?o:[]),!1),a(null!=U?U:[]),!1):delete R[T])}}catch(e){p={error:e}}finally{try{A&&!A.done&&(d=j.return)&&d.call(j)}finally{if(p)throw p.error}}}}catch(e){i={error:e}}finally{try{I&&!I.done&&(c=x.return)&&c.call(x)}finally{if(i)throw i.error}}}catch(e){}var O=null===(y=e.autocapture)||void 0===y?void 0:y.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick))}}function n(e,r,a){var o,l,n=[];try{for(var u=t(null!=r?r:[]),i=u.next();!i.done;i=u.next()){var c=i.value;try{n.push(new RegExp(c))}catch(e){a.loggerProvider.warn("Invalid regex pattern: ".concat(c),e)}}}catch(e){o={error:e}}finally{try{i&&!i.done&&(l=u.return)&&l.call(u)}finally{if(o)throw o.error}}return e.concat(n)}function u(r,a){var o,u,i,c,p,d,s;if(r){l(r);try{a.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(r));var f=r;if(f&&"autocapture"in f){if("boolean"==typeof f.autocapture&&(a.autocapture=f.autocapture),"object"==typeof f.autocapture&&null!==f.autocapture){var v=e({},f.autocapture);if(void 0===a.autocapture&&(a.autocapture=f.autocapture),"object"==typeof f.autocapture.elementInteractions&&null!==f.autocapture.elementInteractions&&(null===(i=f.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){v.elementInteractions=e({},f.autocapture.elementInteractions);var g=v.elementInteractions,y=null!==(c=g.pageUrlAllowlist)&&void 0!==c?c:[],k=f.autocapture.elementInteractions.pageUrlAllowlistRegex;g.pageUrlAllowlist=n(y,k,a),delete g.pageUrlAllowlistRegex}if("object"==typeof f.autocapture.networkTracking&&null!==f.autocapture.networkTracking&&(null===(p=f.autocapture.networkTracking.captureRules)||void 0===p?void 0:p.length)){v.networkTracking=e({},f.autocapture.networkTracking);var w=null!==(d=v.networkTracking.captureRules)&&void 0!==d?d:[];try{for(var b=t(w),m=b.next();!m.done;m=b.next()){var h=m.value;h.urls=n(null!==(s=h.urls)&&void 0!==s?s:[],h.urlsRegex,a),delete h.urlsRegex}}catch(e){o={error:e}}finally{try{m&&!m.done&&(u=b.return)&&u.call(b)}finally{if(o)throw o.error}}}"boolean"==typeof a.autocapture&&(a.autocapture=e({attribution:a.autocapture,fileDownloads:a.autocapture,formInteractions:a.autocapture,pageViews:a.autocapture,sessions:a.autocapture,elementInteractions:a.autocapture,webVitals:a.autocapture,frustrationInteractions:a.autocapture},v)),"object"==typeof a.autocapture&&(a.autocapture=e(e({},a.autocapture),v))}a.defaultTracking=a.autocapture}a.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(a))}catch(e){a.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}export{l as translateRemoteConfigToLocal,u as updateBrowserConfigWithRemoteConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as e,__awaiter as t,__generator as o,__assign as i}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{LocalStorage as n}from"./storage/local-storage.js";import{SessionStorage as r}from"./storage/session-storage.js";import{XHRTransport as s}from"./transports/xhr.js";import{SendBeaconTransport as a}from"./transports/send-beacon.js";import{parseLegacyCookies as d}from"./cookie-migration/index.js";import{DEFAULT_IDENTITY_STORAGE as l,DEFAULT_SERVER_ZONE as u}from"./constants.js";import{VERSION as c}from"./version.js";import{FetchTransport as p}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/fetch.js";import{Logger as g}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/logger.js";import{LogLevel as v}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js";import{getCookieName as m}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js";import{Config as f}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/config.js";import{MemoryStorage as h}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js";import{getQueryParams as b}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/query-params.js";import{UUID as _}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";import{CookieStorage as y}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/cookie.js";var I=function(t){function o(e,o,i,r,s,a,d,p,m,f,b,_,y,I,S,O,j,k,w,P,T,C,L,x,R,D,M,A,K,N,U,z,B,Q,V,Z,q,F,W,G){void 0===i&&(i=new h),void 0===r&&(r={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===p&&(p=1e3),void 0===m&&(m=5),void 0===f&&(f=30),void 0===b&&(b=l),void 0===O&&(O=new g),void 0===j&&(j=v.Warn),void 0===w&&(w=!1),void 0===P&&(P=!1),void 0===L&&(L=""),void 0===x&&(x=u),void 0===D&&(D=18e5),void 0===M&&(M=new n({loggerProvider:O})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===K&&(K="fetch"),void 0===N&&(N=!1),void 0===U&&(U=!0),void 0===q&&(q=!0),void 0===F&&(F=0);var H,J=t.call(this,{apiKey:e,storageProvider:M,transportProvider:E(K)})||this;return J.apiKey=e,J.appVersion=o,J.cookieOptions=r,J.defaultTracking=s,J.autocapture=a,J.flushIntervalMillis=p,J.flushMaxRetries=m,J.flushQueueSize=f,J.identityStorage=b,J.ingestionMetadata=_,J.instanceName=y,J.loggerProvider=O,J.logLevel=j,J.minIdLength=k,J.offline=w,J.partnerId=T,J.plan=C,J.serverUrl=L,J.serverZone=x,J.sessionTimeout=D,J.storageProvider=M,J.trackingOptions=A,J.transport=K,J.useBatch=N,J.fetchRemoteConfig=U,J.networkTrackingOptions=V,J.identify=Z,J.enableDiagnostics=q,J.diagnosticsSampleRate=F,J.diagnosticsClient=W,J.remoteConfig=G,J.version=c,J._optOut=!1,J._cookieStorage=i,J.deviceId=d,J.lastEventId=I,J.lastEventTime=S,J.optOut=P,J.sessionId=R,J.pageCounter=B,J.userId=z,J.debugLogsEnabled=Q,J.loggerProvider.enable(Q?v.Debug:J.logLevel),J.networkTrackingOptions=V,J.identify=Z,J.enableDiagnostics=q,J.diagnosticsSampleRate=F,J.diagnosticsClient=W,H=!0===(null==G?void 0:G.fetchRemoteConfig)||!1!==(null==G?void 0:G.fetchRemoteConfig)&&!1!==U,J.remoteConfig=J.remoteConfig||{},J.remoteConfig.fetchRemoteConfig=H,J.fetchRemoteConfig=H,J}return e(o,t),Object.defineProperty(o.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),o.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(m(this.apiKey),e)},o}(f),S=function(e,n,r){return void 0===n&&(n={}),t(void 0,void 0,void 0,(function(){var t,s,a,u,c,p,g,v,f,y,S,E,k,w,P,T,C,L,x,R,D,M,A,K,N,U,z,B,Q,V,Z,q,F,W,G,H,J,X,Y,$,ee,te,oe,ie,ne;return o(this,(function(o){switch(o.label){case 0:return t=n.identityStorage||l,D={},t===l?[3,1]:(a="",[3,5]);case 1:return null===(A=null===(M=n.cookieOptions)||void 0===M?void 0:M.domain)||void 0===A?[3,2]:(u=A,[3,4]);case 2:return[4,j()];case 3:u=o.sent(),o.label=4;case 4:a=u,o.label=5;case 5:return s=i.apply(void 0,[(D.domain=a,D.expiration=365,D.sameSite="Lax",D.secure=!1,D.upgrade=!0,D),n.cookieOptions]),c=O(n.identityStorage,s),[4,d(e,c,null===(N=null===(K=n.cookieOptions)||void 0===K?void 0:K.upgrade)||void 0===N||N)];case 6:return p=o.sent(),[4,c.get(m(e))];case 7:return g=o.sent(),v=b(),f=v.ampTimestamp?Number(v.ampTimestamp):void 0,y=!f||Date.now()<f,S=null!==(V=null!==(Q=null!==(B=null!==(U=n.deviceId)&&void 0!==U?U:y?null!==(z=v.ampDeviceId)&&void 0!==z?z:v.deviceId:void 0)&&void 0!==B?B:null==g?void 0:g.deviceId)&&void 0!==Q?Q:p.deviceId)&&void 0!==V?V:_(),E=null!==(Z=null==g?void 0:g.lastEventId)&&void 0!==Z?Z:p.lastEventId,k=null!==(q=null==g?void 0:g.lastEventTime)&&void 0!==q?q:p.lastEventTime,w=null!==(W=null!==(F=n.optOut)&&void 0!==F?F:null==g?void 0:g.optOut)&&void 0!==W?W:p.optOut,P=null!==(G=null==g?void 0:g.sessionId)&&void 0!==G?G:p.sessionId,T=null!==(J=null!==(H=n.userId)&&void 0!==H?H:null==g?void 0:g.userId)&&void 0!==J?J:p.userId,r.previousSessionDeviceId=null!==(X=null==g?void 0:g.deviceId)&&void 0!==X?X:p.deviceId,r.previousSessionUserId=null!==(Y=null==g?void 0:g.userId)&&void 0!==Y?Y:p.userId,C={ipAddress:null===(ee=null===($=n.trackingOptions)||void 0===$?void 0:$.ipAddress)||void 0===ee||ee,language:null===(oe=null===(te=n.trackingOptions)||void 0===te?void 0:te.language)||void 0===oe||oe,platform:null===(ne=null===(ie=n.trackingOptions)||void 0===ie?void 0:ie.platform)||void 0===ne||ne},L=null==g?void 0:g.pageCounter,x=null==g?void 0:g.debugLogsEnabled,void 0!==n.autocapture&&(n.defaultTracking=n.autocapture),[4,(R=new I(e,n.appVersion,c,s,n.defaultTracking,n.autocapture,S,n.flushIntervalMillis,n.flushMaxRetries,n.flushQueueSize,t,n.ingestionMetadata,n.instanceName,E,k,n.loggerProvider,n.logLevel,n.minIdLength,n.offline,w,n.partnerId,n.plan,n.serverUrl,n.serverZone,P,n.sessionTimeout,n.storageProvider,C,n.transport,n.useBatch,n.fetchRemoteConfig,T,L,x,n.networkTrackingOptions,n.identify,n.enableDiagnostics,r._diagnosticsSampleRate,void 0,n.remoteConfig)).storageProvider.isEnabled()];case 8:return o.sent()||(R.loggerProvider.warn("Storage provider ".concat(R.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),R.storageProvider=new h),[2,R]}}))}))},O=function(e,t){switch(void 0===e&&(e=l),void 0===t&&(t={}),e){case"localStorage":return new n;case"sessionStorage":return new r;case"none":return new h;default:return new y(i(i({},t),{expirationDays:t.expiration}))}},E=function(e){return"xhr"===e?new s:"beacon"===e?new a:new p},j=function(e){return t(void 0,void 0,void 0,(function(){var e,t,i,n,r,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,(new y).isEnabled()];case 1:if(!o.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=location.hostname,t=e.split("."),i=[],n="AMP_TLDTEST",r=t.length-2;r>=0;--r)i.push(t.slice(r).join("."));r=0,o.label=2;case 2:return r<i.length?(s=i[r],[4,(a=new y({domain:"."+s})).set(n,1)]):[3,7];case 3:return o.sent(),[4,a.get(n)];case 4:return o.sent()?[4,a.remove(n)]:[3,6];case 5:return o.sent(),[2,"."+s];case 6:return r++,[3,2];case 7:return[2,""]}}))}))};export{I as BrowserConfig,O as createCookieStorage,E as createTransport,j as getTopLevelDomain,S as useBrowserConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o="[Amplitude]",c="".concat(o," Form Started"),t="".concat(o," Form Submitted"),n="".concat(o," File Downloaded"),a="session_start",e="session_end",i="".concat(o," File Extension"),m="".concat(o," File Name"),r="".concat(o," Link ID"),s="".concat(o," Link Text"),F="".concat(o," Link URL"),d="".concat(o," Form ID"),l="".concat(o," Form Name"),k="".concat(o," Form Destination"),D="cookie",L="US";export{o as DEFAULT_EVENT_PREFIX,n as DEFAULT_FILE_DOWNLOAD_EVENT,c as DEFAULT_FORM_START_EVENT,t as DEFAULT_FORM_SUBMIT_EVENT,D as DEFAULT_IDENTITY_STORAGE,L as DEFAULT_SERVER_ZONE,e as DEFAULT_SESSION_END_EVENT,a as DEFAULT_SESSION_START_EVENT,i as FILE_EXTENSION,m as FILE_NAME,k as FORM_DESTINATION,d as FORM_ID,l as FORM_NAME,r as LINK_ID,s as LINK_TEXT,F as LINK_URL};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t,__read as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getOldCookieName as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js";var n=function(n,a,c){return void 0===c&&(c=!0),e(void 0,void 0,void 0,(function(){var e,l,u,p,d,m,v,f,b;return t(this,(function(t){switch(t.label){case 0:return e=r(n),[4,a.getRaw(e)];case 1:return(l=t.sent())?c?[4,a.remove(e)]:[3,3]:[2,{optOut:!1}];case 2:t.sent(),t.label=3;case 3:return u=o(l.split("."),6),p=u[0],d=u[1],m=u[2],v=u[3],f=u[4],b=u[5],[2,{deviceId:p,userId:s(d),sessionId:i(v),lastEventId:i(b),lastEventTime:i(f),optOut:Boolean(m)}]}}))}))},i=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},s=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}};export{s as decode,n as parseLegacyCookies,i as parseTime};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e=function(t,e){return"boolean"==typeof t?t:!1!==(null==t?void 0:t[e])},n=function(t){return e(t,"attribution")},o=function(t){return e(t,"fileDownloads")},r=function(t){return e(t,"formInteractions")},a=function(t){return e(t,"pageViews")},i=function(t){return e(t,"sessions")},u=function(t){return e(t,"pageUrlEnrichment")},c=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.networkTracking||"object"==typeof t.networkTracking)},f=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.elementInteractions||"object"==typeof t.elementInteractions)},s=function(t){return"boolean"==typeof t?t:"object"==typeof t&&!0===t.webVitals},p=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.frustrationInteractions||"object"==typeof t.frustrationInteractions)},l=function(t){if(f(t.autocapture)&&"object"==typeof t.autocapture&&"object"==typeof t.autocapture.elementInteractions)return t.autocapture.elementInteractions},g=function(t){if(p(t.autocapture)&&"object"==typeof t.autocapture&&"object"==typeof t.autocapture.frustrationInteractions)return t.autocapture.frustrationInteractions},d=function(e){var n;if(c(e.autocapture)){var o=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?o=e.autocapture.networkTracking:e.networkTrackingOptions&&(o=e.networkTrackingOptions),t(t({},o),{captureRules:null===(n=null==o?void 0:o.captureRules)||void 0===n?void 0:n.map((function(n){var o,r,a;if((null===(o=n.urls)||void 0===o?void 0:o.length)&&(null===(r=n.hosts)||void 0===r?void 0:r.length)){var i=JSON.stringify(n.hosts),u=JSON.stringify(n.urls);return null===(a=e.loggerProvider)||void 0===a||a.warn("Found network capture rule with both urls='".concat(u,"' and hosts='").concat(i,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),t(t({},n),{hosts:void 0})}return n}))})}},k=function(t){var e,n=function(){return!1},o=void 0,r=t.pageCounter;return a(t.defaultTracking)&&(n=void 0,e=void 0,t.defaultTracking&&"object"==typeof t.defaultTracking&&t.defaultTracking.pageViews&&"object"==typeof t.defaultTracking.pageViews&&("trackOn"in t.defaultTracking.pageViews&&(n=t.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in t.defaultTracking.pageViews&&(o=t.defaultTracking.pageViews.trackHistoryChanges),"eventType"in t.defaultTracking.pageViews&&t.defaultTracking.pageViews.eventType&&(e=t.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:o,eventType:e,pageCounter:r}},y=function(e){return n(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.attribution&&"object"==typeof e.defaultTracking.attribution?t({},e.defaultTracking.attribution):{}};export{y as getAttributionTrackingConfig,l as getElementInteractionsConfig,g as getFrustrationInteractionsConfig,d as getNetworkTrackingConfig,k as getPageViewTrackingConfig,n as isAttributionTrackingEnabled,f as isElementInteractionsEnabled,o as isFileDownloadTrackingEnabled,r as isFormInteractionTrackingEnabled,p as isFrustrationInteractionsEnabled,c as isNetworkTrackingEnabled,u as isPageUrlEnrichmentEnabled,a as isPageViewTrackingEnabled,i as isSessionTrackingEnabled,s as isWebVitalsEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=!1,t=function(t){if(!e&&void 0===t.defaultTracking){t.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),e=!0}};export{t as detNotify};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./browser-client-factory.js";export{createInstance}from"./browser-client-factory.js";export{AmplitudeBrowser}from"./browser-client.js";export{runQueuedFunctions}from"./utils/snippet-helper.js";import*as t from"./types.js";export{t as Types};export{Revenue}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";export{Identify}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";var s=e.add,r=e.extendSession,o=e.flush,i=e.getDeviceId,n=e.getIdentity,a=e.getOptOut,p=e.getSessionId,d=e.getUserId,l=e.groupIdentify,c=e.identify,m=e.init,u=e.logEvent,f=e.remove,y=e.reset,I=e.revenue,g=e.setDeviceId,v=e.setGroup,x=e.setOptOut,j=e.setSessionId,b=e.setTransport,_=e.setUserId,w=e.track,O=e._setDiagnosticsSampleRate;export{O as _setDiagnosticsSampleRate,s as add,r as extendSession,o as flush,i as getDeviceId,n as getIdentity,a as getOptOut,p as getSessionId,d as getUserId,l as groupIdentify,c as identify,m as init,u as logEvent,f as remove,y as reset,I as revenue,g as setDeviceId,v as setGroup,x as setOptOut,j as setSessionId,b as setTransport,_ as setUserId,w as track};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t="amplitude-ts";export{t as LIBPREFIX};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as i,__generator as t,__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{VERSION as n}from"../version.js";import{LIBPREFIX as o}from"../lib-prefix.js";import{getLanguage as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/language.js";import{UUID as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";var a=function(){function a(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(o,"/").concat(n),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return a.prototype.setup=function(i){return this.config=i,Promise.resolve(void 0)},a.prototype.execute=function(n){var o,a;return i(this,void 0,void 0,(function(){var i,c,p;return t(this,(function(t){return i=(new Date).getTime(),c=null!==(o=this.config.lastEventId)&&void 0!==o?o:-1,p=null!==(a=n.event_id)&&void 0!==a?a:c+1,this.config.lastEventId=p,n.time||(this.config.lastEventTime=i),[2,e(e(e(e(e(e(e(e({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:s()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:r(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),n),{event_id:p,library:this.library,user_agent:this.userAgent})]}))}))},a}();export{a as Context};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DEFAULT_FILE_DOWNLOAD_EVENT as n,FILE_EXTENSION as r,FILE_NAME as o,LINK_ID as i,LINK_TEXT as a,LINK_URL as d}from"../constants.js";import{getGlobalScope as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var u=function(){var u,c=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(s,f){return e(void 0,void 0,void 0,(function(){var e,m;return t(this,(function(t){return e=function(){if(f){if("undefined"!=typeof document){var e=function(e){var l;try{l=new URL(e.href,window.location.href)}catch(e){return}var u=t.exec(l.href),s=null==u?void 0:u[1];s&&function(e,t,n){e.addEventListener(t,n),c.push({element:e,type:t,handler:n})}(e,"click",(function(){var t;s&&f.track(n,((t={})[r]=s,t[o]=l.pathname,t[i]=e.id,t[a]=e.text,t[d]=e.href,t))}))},t=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(e),"undefined"!=typeof MutationObserver&&(u=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){"A"===t.nodeName&&e(t),"querySelectorAll"in t&&"function"==typeof t.querySelectorAll&&Array.from(t.querySelectorAll("a")).map(e)}))}))}))).observe(document.body,{subtree:!0,childList:!0})}}else s.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?e():(m=l())?m.addEventListener("load",e):s.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]}))}))},execute:function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,n]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return null==u||u.disconnect(),c.forEach((function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)})),c=[],[2]}))}))}}};export{u as fileDownloadTracking};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DEFAULT_FORM_START_EVENT as t,FORM_ID as r,FORM_NAME as o,FORM_DESTINATION as i,DEFAULT_FORM_SUBMIT_EVENT as a}from"../constants.js";import{getGlobalScope as u}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var c=function(){var c,f=[],s=function(e,n,t){e.addEventListener(n,t),f.push({element:e,type:n,handler:t})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(f,m){return e(void 0,void 0,void 0,(function(){var e,v;return n(this,(function(n){return e=function(){if(m){if("undefined"!=typeof document){var e=function(e){var n=!1;s(e,"change",(function(){var a,u=l(e);n||m.track(t,((a={})[r]=d(e.id),a[o]=d(e.name),a[i]=u,a)),n=!0})),s(e,"submit",(function(){var u,c,f=l(e);n||m.track(t,((u={})[r]=d(e.id),u[o]=d(e.name),u[i]=f,u)),m.track(a,((c={})[r]=d(e.id),c[o]=d(e.name),c[i]=f,c)),n=!1}))};Array.from(document.getElementsByTagName("form")).forEach(e),"undefined"!=typeof MutationObserver&&(c=new MutationObserver((function(n){n.forEach((function(n){n.addedNodes.forEach((function(n){"FORM"===n.nodeName&&e(n),"querySelectorAll"in n&&"function"==typeof n.querySelectorAll&&Array.from(n.querySelectorAll("form")).map(e)}))}))}))).observe(document.body,{subtree:!0,childList:!0})}}else f.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?e():(v=u())?v.addEventListener("load",e):f.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]}))}))},execute:function(t){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,t]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return null==c||c.disconnect(),f.forEach((function(e){var n=e.element,t=e.type,r=e.handler;null==n||n.removeEventListener(t,r)})),f=[],[2]}))}))}}},d=function(e){if("string"==typeof e)return e},l=function(e){var n=e.getAttribute("action");try{n=new URL(encodeURI(null!=n?n:""),window.location.href).href}catch(e){}return n};export{l as extractFormAction,c as formInteractionTracking,d as stringOrUndefined};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as i}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var o=function(){var o=i(),t=[],r=function(e,n){(null==o?void 0:o.addEventListener)&&(null==o||o.addEventListener(e,n),t.push({type:e,handler:n}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(i,o){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return"undefined"==typeof navigator?(i.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),i.offline=!1,[2]):(i.offline=!navigator.onLine,r("online",(function(){i.loggerProvider.debug("Network connectivity changed to online."),i.offline=!1,setTimeout((function(){o.flush()}),i.flushIntervalMillis)})),r("offline",(function(){i.loggerProvider.debug("Network connectivity changed to offline."),i.offline=!0})),[2])}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return t.forEach((function(e){var n=e.type,i=e.handler;null==o||o.removeEventListener(n,i)})),t=[],[2]}))}))}}};export{o as networkConnectivityCheckerPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as e,__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{BrowserStorage as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js";var i=1e3,s=function(l){function s(e){var t,r,i,s=this;try{i=null===(t=o())||void 0===t?void 0:t.localStorage}catch(t){null===(r=null==e?void 0:e.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(t))),i=void 0}return(s=l.call(this,i)||this).loggerProvider=null==e?void 0:e.loggerProvider,s}return e(s,l),s.prototype.set=function(e,o){var s;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return Array.isArray(o)&&o.length>i?(t=o.length-i,[4,l.prototype.set.call(this,e,o.slice(0,i))]):[3,2];case 1:return r.sent(),null===(s=this.loggerProvider)||void 0===s||s.error("Failed to save ".concat(t," events because the queue length exceeded ").concat(i,".")),[3,4];case 2:return[4,l.prototype.set.call(this,e,o)];case 3:r.sent(),r.label=4;case 4:return[2]}}))}))},s}(l);export{s as LocalStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as e}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{BrowserStorage as t}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js";var l=function(t){function l(){var o;return t.call(this,null===(o=e())||void 0===o?void 0:o.sessionStorage)||this}return o(l,t),l}(t);export{l as SessionStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as e,__awaiter as t,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js";import{getGlobalScope as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var i=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return e(i,o),i.prototype.send=function(e,o){return t(this,void 0,void 0,(function(){var t=this;return n(this,(function(n){return[2,new Promise((function(n,i){var s=r();if(!(null==s?void 0:s.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var l=JSON.stringify(o);return n(s.navigator.sendBeacon(e,JSON.stringify(o))?t.buildResponse({code:200,events_ingested:o.events.length,payload_size_bytes:l.length,server_upload_time:Date.now()}):t.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},i}(o);export{i as SendBeaconTransport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as t,__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js";var r=function(s){function r(){var t=null!==s&&s.apply(this,arguments)||this;return t.state={done:4},t}return t(r,s),r.prototype.send=function(t,s){return e(this,void 0,void 0,(function(){var e=this;return n(this,(function(n){return[2,new Promise((function(n,r){"undefined"==typeof XMLHttpRequest&&r(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",t,!0),o.onreadystatechange=function(){if(o.readyState===e.state.done){var t=o.responseText;try{n(e.buildResponse(JSON.parse(t)))}catch(t){n(e.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(s))}))]}))}))},r}(s);export{r as XHRTransport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{IdentifyOperation,SpecialEventType}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";export{RevenueProperty}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";export{LogLevel}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js";export{ServerZone}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js";export{OfflineDisabled}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js";export{DEFAULT_ACTION_CLICK_ALLOWLIST,DEFAULT_CSS_SELECTOR_ALLOWLIST,DEFAULT_DATA_ATTRIBUTE_PREFIX}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(n,r){o(n,r)},o=function(n,o){for(var r=0;r<o.length;r++){var t=o[r],e=t.name,f=t.args,i=t.resolve,u=n&&n[e];if("function"==typeof u){var a=u.apply(n,f);"function"==typeof i&&i(null==a?void 0:a.promise)}}return n},r=function(n){return n&&void 0!==n._q};export{o as convertProxyObjectToRealObject,r as isInstanceProxy,n as runQueuedFunctions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="2.32.2";export{r as VERSION};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:t(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),t=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},r=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(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 o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var s=function(e,t){var r,n,o=typeof e;if(o!==typeof t)return!1;try{for(var u=i(["string","number","boolean","undefined"]),a=u.next();!a.done;a=u.next()){if(a.value===o)return e===t}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var c=Array.isArray(e),l=Array.isArray(t);if(c!==l)return!1;if(!c||!l){var f=Object.keys(e).sort(),y=Object.keys(t).sort();if(!s(f,y))return!1;var h=!0;return Object.keys(e).forEach((function(r){s(e[r],t[r])||(h=!1)})),h}for(var d=0;d<e.length;d++)if(!s(e[d],t[d]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var u=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=n({},this.identity.userProperties),r=n(n({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,s,u,a,c,l=r.userProperties||{};try{for(var f=i(Object.entries(e)),y=f.next();!y.done;y=f.next()){var h=o(y.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var v=(s=void 0,i(Object.entries(p))),g=v.next();!g.done;g=v.next()){var b=o(g.value,2),I=b[0],O=b[1];l[I]=O}}catch(e){s={error:e}}finally{try{g&&!g.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}break;case"$unset":try{for(var w=(a=void 0,i(Object.keys(p))),m=w.next();!m.done;m=w.next()){delete l[I=m.value]}}catch(e){a={error:e}}finally{try{m&&!m.done&&(c=w.return)&&c.call(w)}finally{if(a)throw a.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return n({},this.identity)},e.prototype.setIdentity=function(e){var t=n({},this.identity);this.identity=n({},e),s(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,c=function(){function t(){this.identityStore=new u,this.eventBridge=new r,this.applicationContextProvider=new e}return t.getInstance=function(e){return a.analyticsConnectorInstances||(a.analyticsConnectorInstances={}),a.analyticsConnectorInstances[e]||(a.analyticsConnectorInstances[e]=new t),a.analyticsConnectorInstances[e]},t}();export{c as AnalyticsConnector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AnalyticsConnector as t}from"../../../../../../@amplitude_analytics-connector@1.6.4/node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js";import{DEFAULT_INSTANCE_NAME as e}from"./types/constants.js";var n=function(n){return void 0===n&&(n=e),t.getInstance(n)},i=function(t,e){n(e).identityStore.editIdentity().setUserId(t).commit()},o=function(t,e){n(e).identityStore.editIdentity().setDeviceId(t).commit()};export{n as getAnalyticsConnector,o as setConnectorDeviceId,i as setConnectorUserId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getQueryParams as o}from"../query-params.js";import{BASE_CAMPAIGN as i,UTM_CAMPAIGN as n,UTM_CONTENT as u,UTM_ID as m,UTM_MEDIUM as p,UTM_SOURCE as s,UTM_TERM as c,DCLID as f,FBCLID as d,GBRAID as a,GCLID as l,KO_CLICK_ID as v,LI_FAT_ID as _,MSCLKID as g,RDT_CID as y,TTCLID as h,TWCLID as b,WBRAID as j}from"../types/constants.js";var k=function(){function k(){}return k.prototype.parse=function(){return r(this,void 0,void 0,(function(){return t(this,(function(r){return[2,e(e(e(e({},i),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},k.prototype.getUtmParam=function(){var r=o();return{utm_campaign:r[n],utm_content:r[u],utm_id:r[m],utm_medium:r[p],utm_source:r[s],utm_term:r[c]}},k.prototype.getReferrer=function(){var r,t,e={referrer:void 0,referring_domain:void 0};try{e.referrer=document.referrer||void 0,e.referring_domain=null!==(t=null===(r=e.referrer)||void 0===r?void 0:r.split("/")[2])&&void 0!==t?t:void 0}catch(r){}return e},k.prototype.getClickIds=function(){var r,t=o();return(r={})[f]=t[f],r[d]=t[d],r[a]=t[a],r[l]=t[l],r[v]=t[v],r[_]=t[_],r[g]=t[g],r[y]=t[y],r[h]=t[h],r[b]=t[b],r[j]=t[j],r},k}();export{k as CampaignParser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AMPLITUDE_SERVER_URL as e,DEFAULT_INSTANCE_NAME as r,EU_AMPLITUDE_BATCH_SERVER_URL as t,EU_AMPLITUDE_SERVER_URL as i,AMPLITUDE_BATCH_SERVER_URL as s}from"./types/constants.js";import{Logger as o}from"./logger.js";import{LogLevel as n}from"./types/loglevel.js";var l=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:r,logLevel:n.Warn,loggerProvider:new o,offline:!1,optOut:!1,serverUrl:e,serverZone:"US",useBatch:!1}},u=function(){function e(e){var r,t,i,s;this._optOut=!1;var o=l();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(r=e.flushIntervalMillis)&&void 0!==r?r:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(i=e.optOut)&&void 0!==i?i:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(s=e.useBatch)&&void 0!==s?s:o.useBatch,this.loggerProvider.enable(this.logLevel);var n=a(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=n.serverZone,this.serverUrl=n.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),v=function(r,o){return"EU"===r?o?t:i:o?s:e},a=function(e,r,t){if(void 0===e&&(e=""),void 0===r&&(r=l().serverZone),void 0===t&&(t=l().useBatch),e)return{serverUrl:e,serverZone:void 0};var i=["US","EU"].includes(r)?r:l().serverZone;return{serverZone:i,serverUrl:v(i,t)}},h=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,r){this.sdk.metrics.histogram[e]=r},e}();export{u as Config,h as RequestMetadata,a as createServerConfig,l as getDefaultConfig,v as getServerUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AMPLITUDE_PREFIX as o}from"./types/constants.js";var t=function(t,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[o,n,t.substring(0,r)].filter(Boolean).join("_")},n=function(t){return"".concat(o.toLowerCase(),"_").concat(t.substring(0,6))};export{t as getCookieName,n as getOldCookieName};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as e,__values as i}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{IdentifyOperation as r,SpecialEventType as n}from"./types/event/event.js";import{OrderedIdentifyOperations as s}from"./identify.js";import{CLIENT_NOT_INITIALIZED as o,OPT_OUT_MESSAGE as u}from"./types/messages.js";import{Timeline as c}from"./timeline.js";import{createTrackEvent as p,createIdentifyEvent as h,createGroupIdentifyEvent as a,createGroupEvent as l,createRevenueEvent as f}from"./utils/event-builder.js";import{buildResult as d}from"./utils/result-builder.js";import{returnWrapper as g}from"./utils/return-wrapper.js";var y=function(){function y(t){void 0===t&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new c(this),this.name=t}return y.prototype._init=function(i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.config=i,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}}))}))},y.prototype.runQueuedFunctions=function(r){return t(this,void 0,void 0,(function(){var t,n,s,o,u,c,p,h;return e(this,(function(e){switch(e.label){case 0:t=this[r],this[r]=[],e.label=1;case 1:e.trys.push([1,8,9,10]),n=i(t),s=n.next(),e.label=2;case 2:return s.done?[3,7]:(o=s.value,(u=o())&&"promise"in u?[4,u.promise]:[3,4]);case 3:return e.sent(),[3,6];case 4:return[4,u];case 5:e.sent(),e.label=6;case 6:return s=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),p={error:c},[3,10];case 9:try{s&&!s.done&&(h=n.return)&&h.call(n)}finally{if(p)throw p.error}return[7];case 10:return this[r].length?[4,this.runQueuedFunctions(r)]:[3,12];case 11:e.sent(),e.label=12;case 12:return[2]}}))}))},y.prototype.track=function(t,e,i){var r=p(t,e,i);return g(this.dispatch(r))},y.prototype.identify=function(t,e){var i=h(t,e);return g(this.dispatch(i))},y.prototype.groupIdentify=function(t,e,i,r){var n=a(t,e,i,r);return g(this.dispatch(n))},y.prototype.setGroup=function(t,e,i){var r=l(t,e,i);return g(this.dispatch(r))},y.prototype.revenue=function(t,e){var i=f(t,e);return g(this.dispatch(i))},y.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),g())},y.prototype._addPlugin=function(t){return g(this.timeline.register(t,this.config))},y.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),g())},y.prototype._removePlugin=function(t){return g(this.timeline.deregister(t,this.config))},y.prototype.dispatchWithCallback=function(t,e){if(!this.isReady)return e(d(t,0,o));this.process(t).then(e)},y.prototype.dispatch=function(i){return t(this,void 0,void 0,(function(){var t=this;return e(this,(function(e){return this.isReady?[2,this.process(i)]:[2,new Promise((function(e){t.dispatchQ.push(t.dispatchWithCallback.bind(t,i,e))}))]}))}))},y.prototype.getOperationAppliedUserProperties=function(t){var e={};if(void 0===t)return e;var i={};return Object.keys(t).forEach((function(e){Object.values(r).includes(e)||(i[e]=t[e])})),s.forEach((function(i){if(Object.keys(t).includes(i)){var n=t[i];switch(i){case r.CLEAR_ALL:Object.keys(e).forEach((function(t){delete e[t]}));break;case r.UNSET:Object.keys(n).forEach((function(t){delete e[t]}));break;case r.SET:Object.assign(e,n)}}})),Object.assign(e,i),e},y.prototype.process=function(i){return t(this,void 0,void 0,(function(){var t,r,s,o;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.config.optOut?[2,d(i,0,u)]:(i.event_type===n.IDENTIFY&&(t=this.getOperationAppliedUserProperties(i.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(i)]);case 1:return 200===(o=e.sent()).code?this.config.loggerProvider.log(o.message):100===o.code?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=e.sent(),s=String(r),this.config.loggerProvider.error(s),[2,o=d(i,0,s)];case 3:return[2]}}))}))},y.prototype.setOptOut=function(t){this.isReady?this._setOptOut(t):this.q.push(this._setOptOut.bind(this,Boolean(t)))},y.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.timeline.onOptOutChanged(t),this.config.optOut=Boolean(t))},y.prototype.flush=function(){return g(this.timeline.flush())},y.prototype.plugin=function(t){var e=this.timeline.plugins.find((function(e){return e.name===t}));if(void 0!==e)return e;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t))},y.prototype.plugins=function(t){return this.timeline.plugins.filter((function(e){return e instanceof t}))},y}();export{y as AmplitudeCore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t,__awaiter as e,__generator as s,__spreadArray as i,__read as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DiagnosticsStorage as r}from"./diagnostics-storage.js";import{getGlobalScope as o}from"../global-scope.js";import{isTimestampInSampleTemp as a}from"../utils/sampling.js";import{enableSdkErrorListeners as l}from"./uncaught-sdk-errors.js";var h=1e3,u=3e5,c="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",g="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",m=1e4,d=10,p=function(){function h(e,s,i,n){void 0===i&&(i="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=s,this.serverUrl="US"===i?c:g,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=t({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=a(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,r.isSupported()?this.storage=new r(e,s):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),l(this))}return h.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},h.prototype.setTag=function(t,e){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=m?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[t]=e,this.startTimersIfNeeded()))},h.prototype.increment=function(t,e){void 0===e&&(e=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=m?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+e,this.startTimersIfNeeded()))},h.prototype.recordHistogram=function(t,e){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=m)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var s=this.inMemoryHistograms[t];s?(s.count+=1,s.min=Math.min(s.min,e),s.max=Math.max(s.max,e),s.sum+=e):this.inMemoryHistograms[t]={count:1,min:e,max:e,sum:e},this.startTimersIfNeeded()}},h.prototype.recordEvent=function(t,e){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:e}),this.startTimersIfNeeded()))},h.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout((function(){t.saveAllDataToStorage().catch((function(e){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",e)})).finally((function(){t.saveTimer=null}))}),1e3)),this.flushTimer||(this.flushTimer=setTimeout((function(){t._flush().catch((function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)})).finally((function(){t.flushTimer=null}))}),u))},h.prototype.saveAllDataToStorage=function(){return e(this,void 0,void 0,(function(){var e,r,o,a;return s(this,(function(s){switch(s.label){case 0:return this.storage?(e=t({},this.inMemoryTags),r=t({},this.inMemoryCounters),o=t({},this.inMemoryHistograms),a=i([],n(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(r),this.storage.setHistogramStats(o),this.storage.addEventRecords(a)])]):[2];case 1:return s.sent(),[2]}}))}))},h.prototype._flush=function(){return e(this,void 0,void 0,(function(){var t,e,i,n,r,o,a,l,h,u;return s(this,(function(s){switch(s.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return s.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=s.sent(),e=t.tags,i=t.counters,n=t.histogramStats,r=t.events,this.storage.setLastFlushTimestamp(Date.now()),o={},e.forEach((function(t){o[t.key]=t.value})),a={},i.forEach((function(t){a[t.key]=t.value})),l={},n.forEach((function(t){l[t.key]={count:t.count,min:t.min,max:t.max,avg:Math.round(t.sum/t.count*100)/100}})),h=r.map((function(t){return{event_name:t.event_name,time:t.time,event_properties:t.event_properties}})),0===Object.keys(a).length&&0===Object.keys(l).length&&0===h.length?[2]:(u={tags:o,histogram:l,counters:a,events:h},this.fetch(u),[2])}}))}))},h.prototype.fetch=function(t){return e(this,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,2,,3]),!o())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return s.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return e=s.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",e),[3,3];case 3:return[2]}}))}))},h.prototype.initializeFlushInterval=function(){return e(this,void 0,void 0,(function(){var t,e,i;return s(this,(function(s){switch(s.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(e=s.sent()||-1)?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(u),[2]):(i=t-e)>=u?(this._flush(),[2]):(this._setFlushTimer(u-i),[2])}}))}))},h.prototype._setFlushTimer=function(t){var e=this;this.flushTimer=setTimeout((function(){e._flush().catch((function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)})).finally((function(){e.flushTimer=null}))}),t)},h.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=a(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},h}();export{g as DIAGNOSTICS_EU_SERVER_URL,c as DIAGNOSTICS_US_SERVER_URL,p as DiagnosticsClient,u as FLUSH_INTERVAL_MS,m as MAX_MEMORY_STORAGE_COUNT,d as MAX_MEMORY_STORAGE_EVENTS_COUNT,h as SAVE_INTERVAL_MS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as e,__read as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var o={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},s={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},i=function(){function i(t,e){this.dbPromise=null,this.logger=e,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return i.isSupported=function(){var t;return void 0!==(null===(t=n())||void 0===t?void 0:t.indexedDB)},i.prototype.getDB=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]}))}))},i.prototype.openDB=function(){var t=this;return new Promise((function(e,r){var n=indexedDB.open(t.dbName,1);n.onerror=function(){t.dbPromise=null,r(new Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(e){t.logger.debug("DiagnosticsStorage: A global database error occurred.",e),r.close()},e(r)},n.onupgradeneeded=function(e){var r=e.target.result;t.createTables(r)}}))},i.prototype.createTables=function(t){(t.objectStoreNames.contains(o.TAGS)||t.createObjectStore(o.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(o.COUNTERS)||t.createObjectStore(o.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(o.HISTOGRAMS)||t.createObjectStore(o.HISTOGRAMS,{keyPath:"key"}),t.objectStoreNames.contains(o.EVENTS))||t.createObjectStore(o.EVENTS,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});t.objectStoreNames.contains(o.INTERNAL)||t.createObjectStore(o.INTERNAL,{keyPath:"key"})},i.prototype.setTags=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.TAGS],"readwrite"),i=s.objectStore(o.TAGS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1];i.put({key:n,value:o}).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",a),[3,3];case 3:return[2]}}))}))},i.prototype.incrementCounters=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.COUNTERS],"readwrite"),i=s.objectStore(o.COUNTERS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1],s=i.get(n);s.onsuccess=function(){var t=s.result,e=t?t.value:0;i.put({key:n,value:e+o}).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to update counter",n,t)}},s.onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",a),[3,3];case 3:return[2]}}))}))},i.prototype.setHistogramStats=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.HISTOGRAMS],"readwrite"),i=s.objectStore(o.HISTOGRAMS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1],s=i.get(n);s.onsuccess=function(){var t,e=s.result;t=e?{key:n,count:e.count+o.count,min:Math.min(e.min,o.min),max:Math.max(e.max,o.max),sum:e.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},i.put(t).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,t)}},s.onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",a),[3,3];case 3:return[2]}}))}))},i.prototype.addEventRecords=function(r){return t(this,void 0,void 0,(function(){var t,n,s,i,a=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===r.length?[2]:[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.EVENTS],"readwrite"),s=n.objectStore(o.EVENTS),[2,new Promise((function(t){n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var e=s.count();e.onsuccess=function(){var t=e.result,n=Math.max(0,10-t);n<r.length&&a.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(r.length," events due to storage limit")),r.slice(0,n).forEach((function(t){s.add(t).onerror=function(t){a.logger.debug("DiagnosticsStorage: Failed to add event record",t)}}))},e.onerror=function(t){a.logger.debug("DiagnosticsStorage: Failed to count existing events",t)}}))];case 2:return i=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}}))}))},i.prototype.setInternal=function(r,n){return t(this,void 0,void 0,(function(){var t,s,i,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.INTERNAL],"readwrite"),i=s.objectStore(o.INTERNAL),[2,new Promise((function(t,e){s.onabort=function(){return e(new Error("Failed to set internal value"))};var o=i.put({key:r,value:n});o.onsuccess=function(){return t()},o.onerror=function(){return e(new Error("Failed to set internal value"))}}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",a),[3,3];case 3:return[2]}}))}))},i.prototype.getInternal=function(r){return t(this,void 0,void 0,(function(){var t,n,s,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.INTERNAL],"readonly"),s=n.objectStore(o.INTERNAL),[2,new Promise((function(t,e){n.onabort=function(){return e(new Error("Failed to get internal value"))};var o=s.get(r);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return e(new Error("Failed to get internal value"))}}))];case 2:return i=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}}))}))},i.prototype.getLastFlushTimestamp=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getInternal(s.LAST_FLUSH_TIMESTAMP)];case 1:return[2,(t=e.sent())?parseInt(t.value,10):void 0];case 2:return r=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",r),[2,void 0];case 3:return[2]}}))}))},i.prototype.setLastFlushTimestamp=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.setInternal(s.LAST_FLUSH_TIMESTAMP,r.toString())];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}}))}))},i.prototype.clearTable=function(t,e){return new Promise((function(r,n){var o=t.objectStore(e).clear();o.onsuccess=function(){return r()},o.onerror=function(){return n(new Error("Failed to clear table ".concat(e)))}}))},i.prototype.getAllAndClear=function(){return t(this,void 0,void 0,(function(){var t,n,s,i,a,c,u,l;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.TAGS,o.COUNTERS,o.HISTOGRAMS,o.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(n,o.TAGS),this.getAllFromStore(n,o.COUNTERS),this.getAllFromStore(n,o.HISTOGRAMS),this.getAllFromStore(n,o.EVENTS)])];case 2:return s=r.apply(void 0,[e.sent(),4]),i=s[0],a=s[1],c=s[2],u=s[3],[4,Promise.all([this.clearTable(n,o.COUNTERS),this.clearTable(n,o.HISTOGRAMS),this.clearTable(n,o.EVENTS)])];case 3:return e.sent(),[2,{tags:i,counters:a,histogramStats:c,events:u}];case 4:return l=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",l),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}}))}))},i.prototype.getAllFromStore=function(t,e){return new Promise((function(r,n){var o=t.objectStore(e).getAll();o.onsuccess=function(){return r(o.result)},o.onerror=function(){return n(new Error("Failed to get all from ".concat(e)))}}))},i}();export{i as DiagnosticsStorage,s as INTERNAL_KEYS,o as TABLE_NAMES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var r="__AMPLITUDE_SCRIPT_URL__",t="sdk.error.uncaught",a=function(r){var a=n();if(a&&"function"==typeof a.addEventListener){var l=function(n){r.recordEvent(t,e({type:n.type,message:n.message,filename:n.filename,error_name:n.errorName,stack:n.stack},n.metadata))};a.addEventListener("error",(function(e){var n=e.error instanceof Error?e.error:void 0,r=null==n?void 0:n.stack,t=i({filename:e.filename,stack:r});t&&l({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==n?void 0:n.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:t}})}),!0),a.addEventListener("unhandledrejection",(function(e){var n,r=e.reason instanceof Error?e.reason:void 0,t=null==r?void 0:r.stack,a=o(t),c=i({filename:a,stack:t});c&&l({type:"unhandledrejection",message:null!==(n=null==r?void 0:r.message)&&void 0!==n?n:s(e.reason),stack:t,filename:a,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:c}})}),!0)}},i=function(e){var t,a=null==(t=n())?void 0:t[r];if(a)return e.filename&&e.filename.includes(a)?"filename":e.stack&&e.stack.includes(a)?"stack":void 0},o=function(e){if(e){var n=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return n?n[1]:void 0}},s=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}};export{t as EVENT_NAME_ERROR_UNCAUGHT,r as GLOBAL_KEY,a as enableSdkErrorListeners};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=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};export{e as getGlobalScope};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{UNSET_VALUE as e}from"./types/constants.js";import{isValidProperties as r}from"./utils/valid-properties.js";var s,p=function(){function p(){this._propertySet=new Set,this._properties={}}return p.prototype.getUserProperties=function(){return t({},this._properties)},p.prototype.set=function(t,e){return this._safeSet(s.SET,t,e),this},p.prototype.setOnce=function(t,e){return this._safeSet(s.SET_ONCE,t,e),this},p.prototype.append=function(t,e){return this._safeSet(s.APPEND,t,e),this},p.prototype.prepend=function(t,e){return this._safeSet(s.PREPEND,t,e),this},p.prototype.postInsert=function(t,e){return this._safeSet(s.POSTINSERT,t,e),this},p.prototype.preInsert=function(t,e){return this._safeSet(s.PREINSERT,t,e),this},p.prototype.remove=function(t,e){return this._safeSet(s.REMOVE,t,e),this},p.prototype.add=function(t,e){return this._safeSet(s.ADD,t,e),this},p.prototype.unset=function(t){return this._safeSet(s.UNSET,t,e),this},p.prototype.clearAll=function(){return this._properties={},this._properties[s.CLEAR_ALL]=e,this},p.prototype._safeSet=function(t,e,r){if(this._validate(t,e,r)){var s=this._properties[t];return void 0===s&&(s={},this._properties[t]=s),s[e]=r,this._propertySet.add(e),!0}return!1},p.prototype._validate=function(t,e,p){return void 0===this._properties[s.CLEAR_ALL]&&(!this._propertySet.has(e)&&(t===s.ADD?"number"==typeof p:t===s.UNSET||t===s.REMOVE||r(e,p)))},p}();!function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"}(s||(s={}));var o=[s.CLEAR_ALL,s.UNSET,s.SET,s.SET_ONCE,s.ADD,s.APPEND,s.PREPEND,s.PREINSERT,s.POSTINSERT,s.REMOVE];export{p as Identify,s as IdentifyOperation,o as OrderedIdentifyOperations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=function(){var a,n,r,i;if("undefined"==typeof navigator)return"";var o=navigator.userLanguage;return null!==(i=null!==(r=null!==(n=null===(a=navigator.languages)||void 0===a?void 0:a[0])&&void 0!==n?n:navigator.language)&&void 0!==r?r:o)&&void 0!==i?i:""};export{a as getLanguage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LogLevel as o}from"./types/loglevel.js";var e="Amplitude Logger ",n=function(){function n(){this.logLevel=o.None}return n.prototype.disable=function(){this.logLevel=o.None},n.prototype.enable=function(e){void 0===e&&(e=o.Warn),this.logLevel=e},n.prototype.log=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Verbose||console.log("".concat(e,"[Log]: ").concat(n.join(" ")))},n.prototype.warn=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Warn||console.warn("".concat(e,"[Warn]: ").concat(n.join(" ")))},n.prototype.error=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Error||console.error("".concat(e,"[Error]: ").concat(n.join(" ")))},n.prototype.debug=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Debug||console.log("".concat(e,"[Debug]: ").concat(n.join(" ")))},n}();export{n as Logger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t,__read as r,__assign as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{UUID as n}from"./utils/uuid.js";import{NetworkRequestEvent as i,RequestWrapperFetch as l,ResponseWrapperFetch as s,ResponseWrapperXhr as a,RequestWrapperXhr as c}from"./network-request-event.js";import{getGlobalScope as u}from"./global-scope.js";var d=function(e,t){void 0===t&&(t=n()),this.callback=e,this.id=t},p=function(){function n(e){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var t=u();n.isSupported()&&(this.globalScope=t)}return n.isSupported=function(){var e=u();return!!e&&!!e.fetch},n.prototype.subscribe=function(e,t){var r,o,n,i,l,s,a,c,u,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var p=null===(n=null===(o=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===o?void 0:o.prototype)||void 0===n?void 0:n.open,v=null===(s=null===(l=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===s?void 0:s.send,h=null===(u=null===(c=null===(a=this.globalScope)||void 0===a?void 0:a.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===u?void 0:u.setRequestHeader;p&&v&&h&&this.observeXhr(p,v,h);var g=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;g&&this.observeFetch(g),this.isObserving=!0}},n.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},n.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach((function(r){var o;try{r.callback(e)}catch(e){null===(o=t.logger)||void 0===o||o.debug("an unexpected error occurred while triggering event callbacks",e)}}))},n.prototype.handleNetworkRequestEvent=function(e,t,r,o,n,l,s){var a;if(void 0!==l&&void 0!==s){var c,u,d,p="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?c=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.call(t):(c=t.url,p=t.method),c)try{var v=new URL(c);c="".concat(v.protocol,"//").concat(v.host).concat(v.pathname).concat(v.search).concat(v.hash)}catch(e){}p=(null==r?void 0:r.method)||p,o&&(u=o.status),n&&(d={name:n.name||"UnknownError",message:n.message||"An unknown error occurred"},u=0);var h=Math.floor(performance.now()-s),g=Math.floor(l+h),f=new i(e,p,l,l,c,r,u,h,o,d,g);this.triggerEventCallbacks(f)}},n.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)}},n.prototype.observeFetch=function(r){var o=this;this.globalScope&&r&&(this.globalScope.fetch=function(n,i){return e(o,void 0,void 0,(function(){var e,o,a,c,u,d;return t(this,(function(t){switch(t.label){case 0:try{e=this.getTimestamps()}catch(e){null===(u=this.logger)||void 0===u||u.debug("an unexpected error occurred while retrieving timestamps",e)}t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r(n,i)];case 2:return o=t.sent(),[3,4];case 3:return c=t.sent(),a=c,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,i?new l(i):void 0,o?new s(o):void 0,a,null==e?void 0:e.startTime,null==e?void 0:e.durationStart)}catch(e){null===(d=this.logger)||void 0===d||d.debug("an unexpected error occurred while handling fetch",e)}if(o)return[2,o];throw a}}))}))})},n.createXhrJsonParser=function(e,t){return function(){var r,o;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===(o=t.logger)||void 0===o||o.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))),null}return null}},n.prototype.observeXhr=function(e,t,i){if(this.globalScope&&e&&t){var l=this.globalScope.XMLHttpRequest.prototype,s=this;l.open=function(){for(var t,n,i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];var a=r(i,2),c=a[0],u=a[1];try{this.$$AmplitudeAnalyticsEvent=o({method:c,url:null===(t=null==u?void 0:u.toString)||void 0===t?void 0:t.call(u),headers:{}},s.getTimestamps())}catch(e){null===(n=s.logger)||void 0===n||n.error("an unexpected error occurred while calling xhr open",e)}return e.apply(this,i)},l.send=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=this,i=n.createXhrJsonParser(this,s),l=e[0],u=o.$$AmplitudeAnalyticsEvent;return o.addEventListener("loadend",(function(){var e;try{var t=o.getAllResponseHeaders(),r=o.getResponseHeader("content-length"),n=new a(o.status,t,r?parseInt(r,10):void 0,i),d=o.$$AmplitudeAnalyticsEvent.headers,p=new c(l,d);u.status=o.status,s.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},p,n,void 0,u.startTime,u.durationStart)}catch(t){null===(e=s.logger)||void 0===e||e.error("an unexpected error occurred while handling xhr send",t)}})),t.apply(o,e)},l.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)}i.apply(this,[e,t])}}},n}(),v=new p;export{d as NetworkEventCallback,p as NetworkObserver,v as networkObserver};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t,__values as r,__read as n,__spreadArray as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as i}from"./global-scope.js";import{pruneJson as s}from"./utils/json-query.js";import{FORBIDDEN_HEADERS as u,SAFE_HEADERS as a}from"./types/constants.js";var l=100,f=function(){function o(e){this.request=e}return o.prototype.headers=function(e){var t,o;void 0===e&&(e=[]);var i=this.request.headers,s={};if(Array.isArray(i))i.forEach((function(e){var t=n(e,2),r=t[0],o=t[1];s[r]=o}));else if(i instanceof Headers)i.forEach((function(e,t){s[t]=e}));else if("object"==typeof i&&null!==i)try{for(var u=r(Object.entries(i)),a=u.next();!a.done;a=u.next()){var l=n(a.value,2),f=l[0],d=l[1];s[f]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return m(s,{allow:e})},Object.defineProperty(o.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=i();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=c(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),o.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){return 0===r.length?[2,null]:[2,v(this.body,r,n)]}))}))},o}(),d=function(){function r(e,t){this.bodyRaw=e,this.requestHeaders=t}return r.prototype.headers=function(e){return void 0===e&&(e=[]),m(this.requestHeaders,{allow:e})},Object.defineProperty(r.prototype,"bodySize",{get:function(){return c(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),r.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){return 0===r.length?[2,null]:[2,v(this.body,r,n)]}))}))},r}();function c(e,t){var o,s,u,a=i(),l=null==a?void 0:a.TextEncoder;if(l){var f;if("string"==typeof e)f=e,u=(new l).encode(f).length;else if(e instanceof Blob)u=(f=e).size;else if(e instanceof URLSearchParams)f=e,u=(new l).encode(f.toString()).length;else if(ArrayBuffer.isView(e))u=(f=e).byteLength;else if(e instanceof ArrayBuffer)u=(f=e).byteLength;else if(e instanceof FormData){var d=e,c=0,h=0;try{for(var p=r(d.entries()),y=p.next();!y.done;y=p.next()){var v=n(y.value,2),b=v[0],m=v[1];if(c+=b.length,"string"==typeof m)c+=(new l).encode(m).length;else{if(!(m instanceof Blob))return;c+=m.size}if(++h>=t)return}}catch(e){o={error:e}}finally{try{y&&!y.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}u=c}else if(e instanceof ReadableStream)return void(f=e);return u}}var h,p=function(){function r(e){this.response=e}return r.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})),m(n,{allow:e})}},Object.defineProperty(r.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(r.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),r.prototype.text=function(){return e(this,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),t.label=1;case 1:return t.trys.push([1,3,,4]),e=this.clonedResponse.text(),r=new Promise((function(e){return setTimeout((function(){return e(null)}),500)})),[4,Promise.race([e,r])];case 2:return[2,t.sent()];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},r.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return 0===r.length?[2,null]:[4,this.text()];case 1:return[2,v(e.sent(),r,n)]}}))}))},r}(),y=function(){function o(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(o.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),o.prototype.headers=function(e){var t,o;if(void 0===e&&(e=[]),!this.headersString)return{};var i={},s=this.headersString.split("\r\n");try{for(var u=r(s),a=u.next();!a.done;a=u.next()){var l=a.value,f=n(l.split(": "),2),d=f[0],c=f[1];d&&c&&(i[d]=c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return m(i,{allow:e})},o.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){var e;return t(this,(function(t){return 0===r.length?[2,null]:(e=this.getJson())?(s(e,r,n),[2,e]):[2,null]}))}))},o}();function v(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return s(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(h||(h={}));var b="[REDACTED]",m=function(e,t){var i,s,a=t.allow,l=void 0===a?[]:a,f=t.strategy,d=void 0===f?h.REMOVE:f,c=o([],n(u),!1),p={},y=function(t){var r=t.toLowerCase();c.find((function(e){return e.toLowerCase()===r}))?d===h.REDACT&&(p[t]=b):l.find((function(e){return e.toLowerCase()===r}))?p[t]=e[t]:d===h.REDACT&&(p[t]=b)};try{for(var v=r(Object.keys(e)),m=v.next();!m.done;m=v.next()){y(m.value)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return p},g=function(){function e(e,t,r,n,o,i,s,u,a,l,f){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=l,this.endTime=f}return e.prototype.toSerializable=function(){var e,t,r,i,s={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(o([],n(a),!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(o([],n(a),!1)),responseBodySize:null===(i=this.responseWrapper)||void 0===i?void 0:i.bodySize};return Object.fromEntries(Object.entries(s).filter((function(e){var t=n(e,2);return t[0],void 0!==t[1]})))},e}();export{l as MAXIMUM_ENTRIES,g as NetworkRequestEvent,h as PRUNE_STRATEGY,f as RequestWrapperFetch,d as RequestWrapperXhr,p as ResponseWrapperFetch,y as ResponseWrapperXhr,m as pruneHeaders};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t,__rest as s,__spreadArray as i,__read as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{Status as o}from"../types/status.js";import{MAX_RETRIES_EXCEEDED_MESSAGE as r,UNEXPECTED_ERROR_MESSAGE as u,MISSING_API_KEY_MESSAGE as l,SUCCESS_MESSAGE as a,INVALID_API_KEY as c}from"../types/messages.js";import{STORAGE_PREFIX as h}from"../types/constants.js";import{chunk as d}from"../utils/chunk.js";import{buildResult as f}from"../utils/result-builder.js";import{createServerConfig as v,RequestMetadata as p}from"../config.js";import{UUID as g}from"../utils/uuid.js";import{isSuccessStatusCode as m}from"../utils/status-code.js";import{getStacktrace as y}from"../utils/debug.js";function b(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var R=function(){function R(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return R.prototype.setup=function(s){var i;return e(this,void 0,void 0,(function(){var e,n=this;return t(this,(function(t){switch(t.label){case 0:return this.config=s,this.storageKey="".concat(h,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(i=this.config.storageProvider)||void 0===i?void 0:i.get(this.storageKey)];case 1:return(e=t.sent())&&e.length>0&&Promise.all(e.map((function(e){return n.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},R.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=g()),new Promise((function(s){var i={event:e,attempts:0,callback:function(e){return s(e)},timeout:0};t.queue.push(i),t.schedule(t.config.flushIntervalMillis),t.saveEvents()}))},R.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter((function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,r),!1)}))},R.prototype.scheduleEvents=function(e){var t=this;e.forEach((function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)}))},R.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout((function(){t.queue=t.queue.map((function(e){return e.timeout=0,e})),t.flush(!0)}),e))):void 0},R.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},R.prototype.flush=function(s){return void 0===s&&(s=!1),e(this,void 0,void 0,(function(){var i,n,o=this;return t(this,(function(r){switch(r.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),i=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?i.push(e):n.push(e)})),[4,d(i,this.config.flushQueueSize).reduce((function(i,n){return e(o,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,i];case 1:return e.sent(),[4,this.send(n,s)];case 2:return[2,e.sent()]}}))}))}),Promise.resolve())]);case 1:return r.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}}))}))},R.prototype.send=function(i,n){var r;return void 0===n&&(n=!0),e(this,void 0,void 0,(function(){var e,a,c,h,d;return t(this,(function(t){switch(t.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(i,400,l)];e={api_key:this.config.apiKey,events:i.map((function(e){var t=e.event;return t.extra,s(t,["extra"])})),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new p,t.label=1;case 1:return t.trys.push([1,3,,4]),a=v(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(a,e)];case 2:return null===(c=t.sent())?(this.fulfillRequest(i,0,u),[2]):n?(this.handleResponse(c,i),[3,4]):("body"in c?this.fulfillRequest(i,c.statusCode,"".concat(c.status,": ").concat(b(c))):this.fulfillRequest(i,c.statusCode,c.status),[2]);case 3:return h=t.sent(),d=(f=h)instanceof Error?f.message:String(f),this.config.loggerProvider.error(d),null===(r=this.diagnosticsClient)||void 0===r||r.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:i.map((function(e){return e.event.event_type})),message:d,stack_trace:y()}),this.handleResponse({status:o.Failed,statusCode:0},i),[3,4];case 4:return[2]}var f}))}))},R.prototype.handleResponse=function(e,t){var s;m(e.statusCode)||null===(s=this.diagnosticsClient)||void 0===s||s.recordEvent("analytics.events.unsuccessful",{events:t.map((function(e){return e.event.event_type})),code:e.statusCode,status:e.status,body:b(e),stack_trace:y()});var i=e.status;switch(i){case o.Success:this.handleSuccessResponse(e,t);break;case o.Invalid:this.handleInvalidResponse(e,t);break;case o.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case o.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(i,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},R.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,a)},R.prototype.handleInvalidResponse=function(e,t){var s=this;if(e.body.missingField||e.body.error.startsWith(c))this.fulfillRequest(t,e.statusCode,e.body.error);else{var o=i(i(i(i([],n(Object.values(e.body.eventsWithInvalidFields)),!1),n(Object.values(e.body.eventsWithMissingFields)),!1),n(Object.values(e.body.eventsWithInvalidIdLengths)),!1),n(e.body.silencedEvents),!1).flat(),r=new Set(o),u=t.filter((function(t,i){if(!r.has(i))return!0;s.fulfillRequest([t],e.statusCode,e.body.error)}));u.length>0&&this.config.loggerProvider.warn(b(e));var l=this.removeEventsExceedFlushMaxRetries(u);this.scheduleEvents(l)}},R.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(b(e)),this.config.flushQueueSize/=2;var s=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(s)}else this.fulfillRequest(t,e.statusCode,e.body.error)},R.prototype.handleRateLimitResponse=function(e,t){var s=this,i=Object.keys(e.body.exceededDailyQuotaUsers),n=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,r=new Set(i),u=new Set(n),l=new Set(o),a=t.filter((function(t,i){if(!(t.event.user_id&&r.has(t.event.user_id)||t.event.device_id&&u.has(t.event.device_id)))return l.has(i)&&(t.timeout=s.throttleTimeout),!0;s.fulfillRequest([t],e.statusCode,e.body.error)}));a.length>0&&this.config.loggerProvider.warn(b(e));var c=this.removeEventsExceedFlushMaxRetries(a);this.scheduleEvents(c)},R.prototype.handleOtherResponse=function(e){var t=this,s=e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e})),i=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(i)},R.prototype.fulfillRequest=function(e,t,s){var i,n,o;m(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(i=this.diagnosticsClient)||void 0===i||i.increment("analytics.events.dropped",e.length),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.dropped",{events:e.map((function(e){return e.event.event_type})),code:t,message:s,stack_trace:y()})),this.removeEvents(e),e.forEach((function(e){return e.callback(f(e.event,t,s))}))},R.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map((function(e){return e.event}));this.config.storageProvider.set(this.storageKey,e)}},R.prototype.removeEvents=function(e){this.queue=this.queue.filter((function(t){return!e.some((function(e){return e.event.insert_id===t.event.insert_id}))})),this.saveEvents()},R}();export{R as Destination,b as getResponseBodyString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__values as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e="data-amp-mask",r="*****",l=/\b(?:\d[ -]*?){13,16}\b/,n=/(\d{3}-?\d{2}-?\d{4})/g,o=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,i=function(e,i){var a,u;if(void 0===i&&(i=[]),"string"!=typeof e)return"";var c=e;c=(c=(c=c.replace(l,r)).replace(n,r)).replace(o,r);try{for(var d=t(i),p=d.next();!p.done;p=d.next()){var s=p.value;try{c=c.replace(s,r)}catch(t){}}}catch(t){a={error:t}}finally{try{p&&!p.done&&(u=d.return)&&u.call(d)}finally{if(a)throw a.error}}return c},a=function(t){if("undefined"==typeof document||!document.title)return"";var l=document.querySelector("title");return l&&l.hasAttribute(e)?r:t?t(document.title):document.title};export{l as CC_REGEX,o as EMAIL_REGEX,r as MASKED_TEXT_VALUE,n as SSN_REGEX,e as TEXT_MASK_ATTRIBUTE,a as getPageTitle,i as replaceSensitiveString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getAnalyticsConnector as e}from"../analytics-connector.js";var n=function(){function n(){this.name="identity",this.type="before",this.identityStore=e().identityStore}return n.prototype.execute=function(e){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},n.prototype.setup=function(n){return t(this,void 0,void 0,(function(){return i(this,(function(t){return n.instanceName&&(this.identityStore=e(n.instanceName).identityStore),[2]}))}))},n}();export{n as IdentityEventSender};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getGlobalScope as o}from"./global-scope.js";var r=function(){var r,t=o();return(null===(r=null==t?void 0:t.location)||void 0===r?void 0:r.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(o,r){var t=r.split("=",2),e=n(t[0]),i=n(t[1]);return i?(o[e]=i,o):o}),{}):{}},n=function(o){void 0===o&&(o="");try{return decodeURIComponent(o)}catch(o){return""}};export{r as getQueryParams,n as tryDecodeURIComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var o=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(o))),Promise.resolve({remoteConfig:o.remoteConfig,lastFetch:new Date(o.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();export{e as RemoteConfigLocalStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{RemoteConfigLocalStorage as r}from"./remote-config-localstorage.js";import{UUID as o}from"../utils/uuid.js";var i="https://sr-client-cfg.amplitude.com/config",n="https://sr-client-cfg.eu.amplitude.com/config",c=3,s=function(){function c(e,t,o,c){void 0===o&&(o="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.apiKey=e,this.serverUrl=c||("US"===o?i:n),this.logger=t,this.storage=new r(e,t)}return c.prototype.subscribe=function(e,t,r){var i=o(),n={id:i,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(n),"all"===t?this.subscribeAll(n):this.subscribeWaitForRemote(n,t.timeout),i},c.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex((function(t){return t.id===e}));return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},c.prototype.updateConfigs=function(){return e(this,void 0,void 0,(function(){var e,r=this;return t(this,(function(t){switch(t.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=t.sent(),this.storage.setConfig(e),this.callbackInfos.forEach((function(t){r.sendCallback(t,e,"remote")})),[2]}}))}))},c.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.fetchPromise=this.fetch().then((function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t})).finally((function(){e.fetchPromise=null}))),this.fetchPromise},c.prototype.subscribeAll=function(r){return e(this,void 0,void 0,(function(){var e,o,i,n=this;return t(this,(function(t){switch(t.label){case 0:return e=this.getOrCreateFetchPromise().then((function(e){n.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(e))),n.sendCallback(r,e,"remote"),n.storage.setConfig(e)})),o=this.storage.fetchConfig().then((function(e){return e})),[4,Promise.race([e,o])];case 1:return void 0!==(i=t.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),null!==i.remoteConfig?this.sendCallback(r,i,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,e];case 2:return t.sent(),[2]}}))}))},c.prototype.subscribeWaitForRemote=function(r,o){return e(this,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:e=new Promise((function(e,t){setTimeout((function(){t("Timeout exceeded")}),o)})),t.label=1;case 1:return t.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),e])];case 2:return i=t.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(r,i,"remote"),this.storage.setConfig(i),[3,5];case 3:return t.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(i=t.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(r,i,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(r,i,"remote")),[3,5];case 5:return[2]}}))}))},c.prototype.sendCallback=function(e,t,r){var o;e.lastCallback=new Date,o=e.key?e.key.split(".").reduce((function(e,t){return null===e?e:t in e?e[t]:null}),t.remoteConfig):t.remoteConfig,e.callback(o,r,t.lastFetch)},c.prototype.fetch=function(r,o){return void 0===r&&(r=3),void 0===o&&(o=1e3),e(this,void 0,void 0,(function(){var e,i,n,c,s,a,l=this;return t(this,(function(u){switch(u.label){case 0:e=o/r,i={remoteConfig:null,lastFetch:new Date},n=function(i){var n,s,a,u,f;return t(this,(function(t){switch(t.label){case 0:n=new AbortController,s=setTimeout((function(){return n.abort()}),o),t.label=1;case 1:return t.trys.push([1,7,8,9]),[4,fetch(c.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:n.signal})];case 2:return(a=t.sent()).ok?[3,4]:[4,a.text()];case 3:return u=t.sent(),c.logger.debug("Remote config client fetch with retry time ".concat(r," failed with ").concat(a.status,": ").concat(u)),[3,6];case 4:return[4,a.json()];case 5:return[2,{value:{remoteConfig:t.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(f=t.sent())instanceof Error&&"AbortError"===f.name?c.logger.debug("Remote config client fetch with retry time ".concat(r," timed out after ").concat(o,"ms")):c.logger.debug("Remote config client fetch with retry time ".concat(r," is rejected because: "),f),[3,9];case 8:return clearTimeout(s),[7];case 9:return i<r-1?[4,new Promise((function(t){return setTimeout(t,l.getJitterDelay(e))}))]:[3,11];case 10:t.sent(),t.label=11;case 11:return[2]}}))},c=this,s=0,u.label=1;case 1:return s<r?[5,n(s)]:[3,4];case 2:if("object"==typeof(a=u.sent()))return[2,a.value];u.label=3;case 3:return s++,[3,1];case 4:return[2,i]}}))}))},c.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},c.prototype.getUrlParams=function(){var e=encodeURIComponent(this.apiKey),t=new URLSearchParams;return t.append("config_group",c.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(e,"?").concat(t.toString())},c.CONFIG_GROUP="browser",c}();export{c as DEFAULT_MAX_RETRIES,n as EU_SERVER_URL,s as RemoteConfigClient,i as US_SERVER_URL};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isValidObject as e}from"./utils/valid-properties.js";var r,i=function(){function i(){this.productId="",this.quantity=1,this.price=0}return i.prototype.setProductId=function(t){return this.productId=t,this},i.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},i.prototype.setPrice=function(t){return this.price=t,this},i.prototype.setRevenueType=function(t){return this.revenueType=t,this},i.prototype.setCurrency=function(t){return this.currency=t,this},i.prototype.setRevenue=function(t){return this.revenue=t,this},i.prototype.setReceipt=function(t){return this.receipt=t,this},i.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},i.prototype.setEventProperties=function(t){return e(t)&&(this.properties=t),this},i.prototype.getEventProperties=function(){var e=this.properties?t({},this.properties):{};return e[r.REVENUE_PRODUCT_ID]=this.productId,e[r.REVENUE_QUANTITY]=this.quantity,e[r.REVENUE_PRICE]=this.price,e[r.REVENUE_TYPE]=this.revenueType,e[r.REVENUE_CURRENCY]=this.currency,e[r.REVENUE]=this.revenue,e[r.RECEIPT]=this.receipt,e[r.RECEIPT_SIG]=this.receiptSig,e},i}();!function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue",t.RECEIPT="$receipt",t.RECEIPT_SIG="$receiptSig"}(r||(r={}));export{i as Revenue,r as RevenueProperty};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(n,o){return void 0===o&&(o=Date.now()),Date.now()-o>n};export{n as isNewSession};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e=function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return t(this,void 0,void 0,(function(){var t,n,o;return r(this,(function(r){switch(r.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),o="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,n.set(o,t)];case 2:return r.sent(),[4,n.get(o)];case 3:return[2,r.sent()===t];case 4:return r.sent(),[2,!1];case 5:return[4,n.remove(o)];case 6:return r.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=r.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,(null===(n=this.storage)||void 0===n?void 0:n.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var o;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(o=this.storage)||void 0===o||o.setItem(e,JSON.stringify(n))}catch(t){}return[2]}))}))},e.prototype.remove=function(e){var n;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(n=this.storage)||void 0===n||n.removeItem(e)}catch(t){}return[2]}))}))},e.prototype.reset=function(){var e;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(t){}return[2]}))}))},e}();export{e as BrowserStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t,__awaiter as e,__generator as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var r=function(){function r(e){this.options=t({},e)}return r.prototype.isEnabled=function(){return e(this,void 0,void 0,(function(){var t,e;return o(this,(function(o){switch(o.label){case 0:if(!n())return[2,!1];r.testValue=String(Date.now()),t=new r(this.options),e="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,t.set(e,r.testValue)];case 2:return o.sent(),[4,t.get(e)];case 3:return[2,o.sent()===r.testValue];case 4:return o.sent(),[2,!1];case 5:return[4,t.remove(e)];case 6:return o.sent(),[7];case 7:return[2]}}))}))},r.prototype.get=function(t){var n;return e(this,void 0,void 0,(function(){var e,r;return o(this,(function(o){switch(o.label){case 0:return[4,this.getRaw(t)];case 1:if(!(e=o.sent()))return[2,void 0];try{return void 0===(r=null!==(n=i(e))&&void 0!==n?n:s(e))?(console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(e)),[2,void 0]):[2,JSON.parse(r)]}catch(o){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(e)),[2,void 0]}return[2]}}))}))},r.prototype.getRaw=function(t){var r,i;return e(this,void 0,void 0,(function(){var e,s,c;return o(this,(function(o){return e=n(),s=null!==(i=null===(r=null==e?void 0:e.document)||void 0===r?void 0:r.cookie.split("; "))&&void 0!==i?i:[],(c=s.find((function(e){return 0===e.indexOf(t+"=")})))?[2,c.substring(t.length+1)]:[2,void 0]}))}))},r.prototype.set=function(t,r){var i;return e(this,void 0,void 0,(function(){var e,s,c,u,a,l,d;return o(this,(function(o){try{e=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,c=void 0,(s=null!==r?e:-1)&&((u=new Date).setTime(u.getTime()+24*s*60*60*1e3),c=u),a="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),c&&(a+="; expires=".concat(c.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=n())&&(l.document.cookie=a)}catch(e){d=e instanceof Error?e.message:String(e),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(d))}return[2]}))}))},r.prototype.remove=function(t){return e(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.set(t,null)];case 1:return e.sent(),[2]}}))}))},r.prototype.reset=function(){return e(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},r}(),i=function(t){try{return decodeURIComponent(atob(t))}catch(t){return}},s=function(t){try{return decodeURIComponent(atob(decodeURIComponent(t)))}catch(t){return}};export{r as CookieStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AMPLITUDE_PREFIX as o}from"../types/constants.js";var t=function(t,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[o,n,t.substring(0,r)].filter(Boolean).join("_")};export{t as getStorageKey};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var n=function(){function n(){this.memoryStorage=new Map}return n.prototype.isEnabled=function(){return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,!0]}))}))},n.prototype.get=function(n){return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.memoryStorage.get(n)]}))}))},n.prototype.getRaw=function(n){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,this.get(n)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}}))}))},n.prototype.set=function(n,o){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.set(n,o),[2]}))}))},n.prototype.remove=function(n){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.delete(n),[2]}))}))},n.prototype.reset=function(){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.clear(),[2]}))}))},n}();export{n as MemoryStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as n,__assign as t,__read as i,__values as r}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{buildResult as o}from"./utils/result-builder.js";import{UUID as l}from"./utils/uuid.js";var u=function(){function u(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return u.prototype.register=function(t,i){var r,o;return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return this.plugins.some((function(e){return e.name===t.name}))?(this.loggerProvider.warn("Plugin with name ".concat(t.name," already exists, skipping registration")),[2]):(void 0===t.name&&(t.name=l(),this.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(t.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),t.type=null!==(r=t.type)&&void 0!==r?r:"enrichment",[4,null===(o=t.setup)||void 0===o?void 0:o.call(t,i,this.client)]);case 1:return e.sent(),this.plugins.push(t),[2]}}))}))},u.prototype.deregister=function(t,i){var r;return e(this,void 0,void 0,(function(){var e,o;return n(this,(function(n){switch(n.label){case 0:return e=this.plugins.findIndex((function(e){return e.name===t})),-1===e?(i.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[e],this.plugins.splice(e,1),[4,null===(r=o.teardown)||void 0===r?void 0:r.call(o)]);case 1:return n.sent(),[2]}}))}))},u.prototype.reset=function(e){this.applying=!1,this.plugins.map((function(e){var n;return null===(n=e.teardown)||void 0===n?void 0:n.call(e)})),this.plugins=[],this.client=e},u.prototype.push=function(e){var n=this;return new Promise((function(t){n.queue.push([e,t]),n.scheduleApply(0)}))},u.prototype.scheduleApply=function(e){var n=this;this.applying||(this.applying=!0,setTimeout((function(){n.apply(n.queue.shift()).then((function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)}))}),e))},u.prototype.apply=function(l){return e(this,void 0,void 0,(function(){var e,u,s,a,c,p,h,g,f,d,v,y,m,b,P,w,x,S,E,O;return n(this,(function(n){switch(n.label){case 0:if(!l)return[2];e=i(l,1),u=e[0],s=i(l,2),a=s[1],this.loggerProvider.log("Timeline.apply: Initial event",u),c=this.plugins.filter((function(e){return"before"===e.type})),n.label=1;case 1:n.trys.push([1,6,7,8]),p=r(c),h=p.next(),n.label=2;case 2:return h.done?[3,5]:(y=h.value).execute?[4,y.execute(t({},u))]:[3,4];case 3:if(null===(m=n.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),a({event:u,code:0,message:""}),[2];u=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),n.label=4;case 4:return h=p.next(),[3,2];case 5:return[3,8];case 6:return g=n.sent(),x={error:g},[3,8];case 7:try{h&&!h.done&&(S=p.return)&&S.call(p)}finally{if(x)throw x.error}return[7];case 8:f=this.plugins.filter((function(e){return"enrichment"===e.type||void 0===e.type})),n.label=9;case 9:n.trys.push([9,14,15,16]),d=r(f),v=d.next(),n.label=10;case 10:return v.done?[3,13]:(y=v.value).execute?[4,y.execute(t({},u))]:[3,12];case 11:if(null===(m=n.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),a({event:u,code:0,message:""}),[2];u=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),n.label=12;case 12:return v=d.next(),[3,10];case 13:return[3,16];case 14:return b=n.sent(),E={error:b},[3,16];case 15:try{v&&!v.done&&(O=d.return)&&O.call(d)}finally{if(E)throw E.error}return[7];case 16:return P=this.plugins.filter((function(e){return"destination"===e.type})),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(u))),w=P.map((function(e){var n=t({},u);return e.execute(n).catch((function(e){return o(n,0,String(e))}))})),Promise.all(w).then((function(e){var n=i(e,1)[0]||o(u,100,"Event not tracked, no destination plugins on the instance");a(n)})),[2]}}))}))},u.prototype.flush=function(){return e(this,void 0,void 0,(function(){var e,t,i,r=this;return n(this,(function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return n.sent(),t=this.plugins.filter((function(e){return"destination"===e.type})),i=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return n.sent(),[2]}}))}))},u.prototype.onIdentityChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onIdentityChanged)||void 0===t||t.call(n,e)}))},u.prototype.onSessionIdChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onSessionIdChanged)||void 0===t||t.call(n,e)}))},u.prototype.onOptOutChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onOptOutChanged)||void 0===t||t.call(n,e)}))},u.prototype.onReset=function(){this.plugins.forEach((function(e){var n;null===(n=e.onReset)||void 0===n||n.call(e)}))},u}();export{u as Timeline};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Status as e}from"../types/status.js";import{isSuccessStatusCode as t}from"../utils/status-code.js";var s=function(){function s(){}return s.prototype.send=function(e,t){return Promise.resolve(null)},s.prototype.buildResponse=function(t){var s,d,i,l,o,n,r,u,v,a,c,_,h,y,p,m,f,g,b,D,x,T;if("object"!=typeof t)return null;var I=t.code||0,w=this.buildStatus(I);switch(w){case e.Success:return{status:w,statusCode:I,body:{eventsIngested:null!==(s=t.events_ingested)&&void 0!==s?s:0,payloadSizeBytes:null!==(d=t.payload_size_bytes)&&void 0!==d?d:0,serverUploadTime:null!==(i=t.server_upload_time)&&void 0!==i?i:0}};case e.Invalid:return{status:w,statusCode:I,body:{error:null!==(l=t.error)&&void 0!==l?l:"",missingField:null!==(o=t.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(n=t.events_with_invalid_fields)&&void 0!==n?n:{},eventsWithMissingFields:null!==(r=t.events_with_missing_fields)&&void 0!==r?r:{},eventsWithInvalidIdLengths:null!==(u=t.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(v=t.eps_threshold)&&void 0!==v?v:0,exceededDailyQuotaDevices:null!==(a=t.exceeded_daily_quota_devices)&&void 0!==a?a:{},silencedDevices:null!==(c=t.silenced_devices)&&void 0!==c?c:[],silencedEvents:null!==(_=t.silenced_events)&&void 0!==_?_:[],throttledDevices:null!==(h=t.throttled_devices)&&void 0!==h?h:{},throttledEvents:null!==(y=t.throttled_events)&&void 0!==y?y:[]}};case e.PayloadTooLarge:return{status:w,statusCode:I,body:{error:null!==(p=t.error)&&void 0!==p?p:""}};case e.RateLimit:return{status:w,statusCode:I,body:{error:null!==(m=t.error)&&void 0!==m?m:"",epsThreshold:null!==(f=t.eps_threshold)&&void 0!==f?f:0,throttledDevices:null!==(g=t.throttled_devices)&&void 0!==g?g:{},throttledUsers:null!==(b=t.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(D=t.exceeded_daily_quota_devices)&&void 0!==D?D:{},exceededDailyQuotaUsers:null!==(x=t.exceeded_daily_quota_users)&&void 0!==x?x:{},throttledEvents:null!==(T=t.throttled_events)&&void 0!==T?T:[]}};case e.Timeout:default:return{status:w,statusCode:I}}},s.prototype.buildStatus=function(s){return t(s)?e.Success:429===s?e.RateLimit:413===s?e.PayloadTooLarge:408===s?e.Timeout:s>=400&&s<500?e.Invalid:s>=500?e.Failed:e.Unknown},s}();export{s as BaseTransport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__extends as t,__awaiter as e,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as n}from"./base.js";var s=function(n){function s(){return null!==n&&n.apply(this,arguments)||this}return t(s,n),s.prototype.send=function(t,n){return e(this,void 0,void 0,(function(){var e,s,o;return r(this,(function(r){switch(r.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return e={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(t,e)];case 1:return[4,(s=r.sent()).text()];case 2:o=r.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(t){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},s}(n);export{s as FetchTransport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t="-",i="AMP",e="".concat("AMP","_unsent"),c="$default_instance",o="https://api2.amplitude.com/2/httpapi",a="https://api.eu.amplitude.com/2/httpapi",d="https://api2.amplitude.com/batch",n="https://api.eu.amplitude.com/batch",r="utm_campaign",l="utm_content",s="utm_id",m="utm_medium",p="utm_source",u="utm_term",_="dclid",v="fbclid",g="gbraid",h="gclid",w="ko_click_id",b="li_fat_id",f="msclkid",k="rdt_cid",x="ttclid",y="twclid",A="wbraid",M={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},P=["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"],z=["authorization","cookie","set-cookie"];export{d as AMPLITUDE_BATCH_SERVER_URL,i as AMPLITUDE_PREFIX,o as AMPLITUDE_SERVER_URL,M as BASE_CAMPAIGN,_ as DCLID,c as DEFAULT_INSTANCE_NAME,n as EU_AMPLITUDE_BATCH_SERVER_URL,a as EU_AMPLITUDE_SERVER_URL,v as FBCLID,z as FORBIDDEN_HEADERS,g as GBRAID,h as GCLID,w as KO_CLICK_ID,b as LI_FAT_ID,f as MSCLKID,k as RDT_CID,P as SAFE_HEADERS,e as STORAGE_PREFIX,x as TTCLID,y as TWCLID,t as UNSET_VALUE,r as UTM_CAMPAIGN,l as UTM_CONTENT,s as UTM_ID,m as UTM_MEDIUM,p as UTM_SOURCE,u as UTM_TERM,A as WBRAID};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],t="data-amp-track-",e=["div","span","h1","h2","h3","h4","h5","h6"];export{e as DEFAULT_ACTION_CLICK_ALLOWLIST,a as DEFAULT_CSS_SELECTOR_ALLOWLIST,t as DEFAULT_DATA_ATTRIBUTE_PREFIX};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,E;!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(e||(e={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(E||(E={}));export{e as IdentifyOperation,E as SpecialEventType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__spreadArray as e,__read as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var i=e(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],t(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),o=["*"],l=1e3,p=4,r=50;export{i as DEFAULT_DEAD_CLICK_ALLOWLIST,o as DEFAULT_RAGE_CLICK_ALLOWLIST,r as DEFAULT_RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD,p as DEFAULT_RAGE_CLICK_THRESHOLD,l as DEFAULT_RAGE_CLICK_WINDOW_MS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r;!function(r){r[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Verbose=3]="Verbose",r[r.Debug=4]="Debug"}(r||(r={}));export{r as LogLevel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="Event tracked successfully",t="Unexpected error occurred",d="Event rejected due to exceeded retry count",n="Event skipped due to optOut config",r="Event rejected due to missing API key",c="Invalid API key",i="Client not initialized";export{i as CLIENT_NOT_INITIALIZED,c as INVALID_API_KEY,d as MAX_RETRIES_EXCEEDED_MESSAGE,r as MISSING_API_KEY_MESSAGE,n as OPT_OUT_MESSAGE,e as SUCCESS_MESSAGE,t as UNEXPECTED_ERROR_MESSAGE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=null;export{l as OfflineDisabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var G;!function(G){G.US="US",G.EU="EU",G.STAGING="STAGING"}(G||(G={}));export{G as ServerZone};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e;!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(e||(e={}));export{e as Status};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r,t){var a=Math.max(t,1);return r.reduce((function(r,t,n){var u=Math.floor(n/a);return r[u]||(r[u]=[]),r[u].push(t),r}),[])};export{r as chunk};
|