vviinn-widgets 2.1.0 → 2.2.2
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/cjs/Handler-d1a8a86a.js +329 -0
- package/dist/{vviinn-widgets/app-globals-e0943e34.js → cjs/app-globals-30781f30.js} +15 -925
- package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
- package/dist/{vviinn-widgets/customized-slots-f3449695.js → cjs/customized-slots-5d904d8e.js} +6 -3
- package/dist/cjs/highlight-box_22.cjs.entry.js +737 -0
- package/{www/build/imageSearch.store-407f49f0.js → dist/cjs/imageSearch.store-128957a4.js} +11573 -11902
- package/dist/cjs/index-741a970d.js +1354 -0
- package/dist/cjs/index-c493804d.js +41 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
- package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
- package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +31 -30
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +5 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +5 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -32
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +102 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +138 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +115 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-c9483145.js → collection/components/vviinn-icons/index.js} +13 -12
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
- package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +441 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +74 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +177 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +247 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +26 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +138 -0
- package/dist/collection/store/store.js +11 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/dist/esm/Handler-639a4cb3.js +308 -0
- package/{www/build/app-globals-e0943e34.js → dist/esm/app-globals-345e497d.js} +10 -922
- package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
- package/{www/build/customized-slots-f3449695.js → dist/esm/customized-slots-a76a8d41.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +712 -0
- package/dist/{vviinn-widgets/imageSearch.store-407f49f0.js → esm/imageSearch.store-8eab0da1.js} +11510 -11872
- package/dist/esm/index-6fa21e24.js +1323 -0
- package/{www/build/index-c9483145.js → dist/esm/index-8cb063df.js} +6 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
- package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
- package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
- package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +4 -7
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
- package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +13 -3
- package/dist/types/components.d.ts +54 -0
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-04b06ea9.entry.js +1 -0
- package/dist/vviinn-widgets/p-400eb62f.entry.js +1 -0
- package/dist/vviinn-widgets/p-56fc949a.js +1 -0
- package/dist/vviinn-widgets/p-59edfbe2.js +1 -0
- package/dist/vviinn-widgets/p-78ccc9eb.js +15 -0
- package/dist/vviinn-widgets/p-9d24f51e.entry.js +1 -0
- package/dist/vviinn-widgets/p-d085199d.entry.js +1 -0
- package/dist/vviinn-widgets/p-e1ba8626.js +1 -0
- package/dist/vviinn-widgets/p-e38f4aa2.entry.js +1 -0
- package/dist/vviinn-widgets/p-e67cae57.js +1 -0
- package/dist/vviinn-widgets/p-f47e82b2.entry.js +1 -0
- package/dist/vviinn-widgets/p-f582db5c.js +1 -0
- package/dist/vviinn-widgets/p-fb14e3cc.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +3 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-04b06ea9.entry.js +1 -0
- package/www/build/p-400eb62f.entry.js +1 -0
- package/www/build/p-56fc949a.js +1 -0
- package/www/build/p-59edfbe2.js +1 -0
- package/www/build/p-78ccc9eb.js +15 -0
- package/www/build/p-7e4978d5.js +1 -0
- package/www/build/p-9d24f51e.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-d085199d.entry.js +1 -0
- package/www/build/p-e1ba8626.js +1 -0
- package/www/build/p-e38f4aa2.entry.js +1 -0
- package/www/build/p-e67cae57.js +1 -0
- package/www/build/p-f47e82b2.entry.js +1 -0
- package/www/build/p-f582db5c.js +1 -0
- package/www/build/p-fb14e3cc.entry.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +6 -13
- package/dist/vviinn-widgets/Array-4b9f84cf.js +0 -4295
- package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
- package/dist/vviinn-widgets/NonEmptyArray-6ef0d207.js +0 -4370
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/index-b6d739a9.js +0 -3010
- package/dist/vviinn-widgets/number-98d54dd6.js +0 -1533
- package/dist/vviinn-widgets/search-filters.entry.js +0 -73
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -205
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -52
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -176
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -128
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-4b9f84cf.js +0 -4295
- package/www/build/Handler-47db9890.js +0 -1428
- package/www/build/NonEmptyArray-6ef0d207.js +0 -4370
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/image-cropper.entry.js +0 -113
- package/www/build/index-b6d739a9.js +0 -3010
- package/www/build/number-98d54dd6.js +0 -1533
- package/www/build/search-filters.entry.js +0 -73
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -52
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -176
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -128
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Env } from './index-
|
|
1
|
+
import { E as Env } from './index-6fa21e24.js';
|
|
2
2
|
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
@@ -52,68 +52,6 @@ function __rest(s, e) {
|
|
|
52
52
|
return t;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function __decorate(decorators, target, key, desc) {
|
|
56
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
57
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
58
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
59
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function __param(paramIndex, decorator) {
|
|
63
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function __metadata(metadataKey, metadataValue) {
|
|
67
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
71
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
72
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
73
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
74
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
75
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
76
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function __generator(thisArg, body) {
|
|
81
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
82
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
83
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
84
|
-
function step(op) {
|
|
85
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
86
|
-
while (_) try {
|
|
87
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
88
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
89
|
-
switch (op[0]) {
|
|
90
|
-
case 0: case 1: t = op; break;
|
|
91
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
92
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
93
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
94
|
-
default:
|
|
95
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
96
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
97
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
98
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
99
|
-
if (t[2]) _.ops.pop();
|
|
100
|
-
_.trys.pop(); continue;
|
|
101
|
-
}
|
|
102
|
-
op = body.call(thisArg, _);
|
|
103
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
104
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function __createBinding(o, m, k, k2) {
|
|
109
|
-
if (k2 === undefined) k2 = k;
|
|
110
|
-
o[k2] = m[k];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function __exportStar(m, exports) {
|
|
114
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
55
|
function __values(o) {
|
|
118
56
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
119
57
|
if (m) return m.call(o);
|
|
@@ -147,91 +85,8 @@ function __spread() {
|
|
|
147
85
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
148
86
|
ar = ar.concat(__read(arguments[i]));
|
|
149
87
|
return ar;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function __spreadArrays() {
|
|
153
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
154
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
155
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
156
|
-
r[k] = a[j];
|
|
157
|
-
return r;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
function __await(v) {
|
|
161
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
165
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
166
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
167
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
168
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
169
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
170
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
171
|
-
function fulfill(value) { resume("next", value); }
|
|
172
|
-
function reject(value) { resume("throw", value); }
|
|
173
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function __asyncDelegator(o) {
|
|
177
|
-
var i, p;
|
|
178
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
179
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function __asyncValues(o) {
|
|
183
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
184
|
-
var m = o[Symbol.asyncIterator], i;
|
|
185
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
186
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
187
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function __makeTemplateObject(cooked, raw) {
|
|
191
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
192
|
-
return cooked;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
function __importStar(mod) {
|
|
196
|
-
if (mod && mod.__esModule) return mod;
|
|
197
|
-
var result = {};
|
|
198
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
199
|
-
result.default = mod;
|
|
200
|
-
return result;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function __importDefault(mod) {
|
|
204
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
208
|
-
if (!privateMap.has(receiver)) {
|
|
209
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
210
|
-
}
|
|
211
|
-
return privateMap.get(receiver);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
215
|
-
if (!privateMap.has(receiver)) {
|
|
216
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
217
|
-
}
|
|
218
|
-
privateMap.set(receiver, value);
|
|
219
|
-
return value;
|
|
220
88
|
}
|
|
221
89
|
|
|
222
|
-
/** Console logging verbosity for the SDK. */
|
|
223
|
-
var LogLevel;
|
|
224
|
-
(function (LogLevel) {
|
|
225
|
-
/** No logs will be generated. */
|
|
226
|
-
LogLevel[LogLevel["None"] = 0] = "None";
|
|
227
|
-
/** Only SDK internal errors will be logged. */
|
|
228
|
-
LogLevel[LogLevel["Error"] = 1] = "Error";
|
|
229
|
-
/** Information useful for debugging the SDK will be logged. */
|
|
230
|
-
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
231
|
-
/** All SDK actions will be logged. */
|
|
232
|
-
LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
|
|
233
|
-
})(LogLevel || (LogLevel = {}));
|
|
234
|
-
|
|
235
90
|
/**
|
|
236
91
|
* Session Status
|
|
237
92
|
*/
|
|
@@ -349,14 +204,6 @@ var Status;
|
|
|
349
204
|
Status.fromHttpCode = fromHttpCode;
|
|
350
205
|
})(Status || (Status = {}));
|
|
351
206
|
|
|
352
|
-
var TransactionSamplingMethod;
|
|
353
|
-
(function (TransactionSamplingMethod) {
|
|
354
|
-
TransactionSamplingMethod["Explicit"] = "explicitly_set";
|
|
355
|
-
TransactionSamplingMethod["Sampler"] = "client_sampler";
|
|
356
|
-
TransactionSamplingMethod["Rate"] = "client_rate";
|
|
357
|
-
TransactionSamplingMethod["Inheritance"] = "inheritance";
|
|
358
|
-
})(TransactionSamplingMethod || (TransactionSamplingMethod = {}));
|
|
359
|
-
|
|
360
207
|
var Outcome;
|
|
361
208
|
(function (Outcome) {
|
|
362
209
|
Outcome["BeforeSend"] = "before_send";
|
|
@@ -402,36 +249,6 @@ function dynamicRequire(mod, request) {
|
|
|
402
249
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
403
250
|
return mod.require(request);
|
|
404
251
|
}
|
|
405
|
-
/**
|
|
406
|
-
* Helper for dynamically loading module that should work with linked dependencies.
|
|
407
|
-
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
|
|
408
|
-
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
|
|
409
|
-
* build time. `require.resolve` is also not available in any other way, so we cannot create,
|
|
410
|
-
* a fake helper like we do with `dynamicRequire`.
|
|
411
|
-
*
|
|
412
|
-
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
|
|
413
|
-
* That is to mimic the behavior of `require.resolve` exactly.
|
|
414
|
-
*
|
|
415
|
-
* @param moduleName module name to require
|
|
416
|
-
* @returns possibly required module
|
|
417
|
-
*/
|
|
418
|
-
function loadModule(moduleName) {
|
|
419
|
-
var mod;
|
|
420
|
-
try {
|
|
421
|
-
mod = dynamicRequire(module, moduleName);
|
|
422
|
-
}
|
|
423
|
-
catch (e) {
|
|
424
|
-
// no-empty
|
|
425
|
-
}
|
|
426
|
-
try {
|
|
427
|
-
var cwd = dynamicRequire(module, 'process').cwd;
|
|
428
|
-
mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
|
|
429
|
-
}
|
|
430
|
-
catch (e) {
|
|
431
|
-
// no-empty
|
|
432
|
-
}
|
|
433
|
-
return mod;
|
|
434
|
-
}
|
|
435
252
|
|
|
436
253
|
/**
|
|
437
254
|
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
|
|
@@ -1009,44 +826,6 @@ function truncate(str, max) {
|
|
|
1009
826
|
}
|
|
1010
827
|
return str.length <= max ? str : str.substr(0, max) + "...";
|
|
1011
828
|
}
|
|
1012
|
-
/**
|
|
1013
|
-
* This is basically just `trim_line` from
|
|
1014
|
-
* https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
|
|
1015
|
-
*
|
|
1016
|
-
* @param str An object that contains serializable values
|
|
1017
|
-
* @param max Maximum number of characters in truncated string
|
|
1018
|
-
* @returns string Encoded
|
|
1019
|
-
*/
|
|
1020
|
-
function snipLine(line, colno) {
|
|
1021
|
-
var newLine = line;
|
|
1022
|
-
var ll = newLine.length;
|
|
1023
|
-
if (ll <= 150) {
|
|
1024
|
-
return newLine;
|
|
1025
|
-
}
|
|
1026
|
-
if (colno > ll) {
|
|
1027
|
-
// eslint-disable-next-line no-param-reassign
|
|
1028
|
-
colno = ll;
|
|
1029
|
-
}
|
|
1030
|
-
var start = Math.max(colno - 60, 0);
|
|
1031
|
-
if (start < 5) {
|
|
1032
|
-
start = 0;
|
|
1033
|
-
}
|
|
1034
|
-
var end = Math.min(start + 140, ll);
|
|
1035
|
-
if (end > ll - 5) {
|
|
1036
|
-
end = ll;
|
|
1037
|
-
}
|
|
1038
|
-
if (end === ll) {
|
|
1039
|
-
start = Math.max(end - 140, 0);
|
|
1040
|
-
}
|
|
1041
|
-
newLine = newLine.slice(start, end);
|
|
1042
|
-
if (start > 0) {
|
|
1043
|
-
newLine = "'{snip} " + newLine;
|
|
1044
|
-
}
|
|
1045
|
-
if (end < ll) {
|
|
1046
|
-
newLine += ' {snip}';
|
|
1047
|
-
}
|
|
1048
|
-
return newLine;
|
|
1049
|
-
}
|
|
1050
829
|
/**
|
|
1051
830
|
* Join values in array
|
|
1052
831
|
* @param input array of values to be joined together
|
|
@@ -1088,22 +867,6 @@ function isMatchingPattern(value, pattern) {
|
|
|
1088
867
|
}
|
|
1089
868
|
return false;
|
|
1090
869
|
}
|
|
1091
|
-
/**
|
|
1092
|
-
* Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
|
|
1093
|
-
* `new RegExp()`.
|
|
1094
|
-
*
|
|
1095
|
-
* Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime
|
|
1096
|
-
* type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node
|
|
1097
|
-
* 12+).
|
|
1098
|
-
*
|
|
1099
|
-
* @param regexString The string to escape
|
|
1100
|
-
* @returns An version of the string with all special regex characters escaped
|
|
1101
|
-
*/
|
|
1102
|
-
function escapeStringForRegex(regexString) {
|
|
1103
|
-
// escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
|
|
1104
|
-
// discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
|
|
1105
|
-
return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
|
|
1106
|
-
}
|
|
1107
870
|
|
|
1108
871
|
/**
|
|
1109
872
|
* Replace a method in an object with a wrapped version of itself.
|
|
@@ -1435,88 +1198,7 @@ function dropUndefinedKeys(val) {
|
|
|
1435
1198
|
}
|
|
1436
1199
|
return val;
|
|
1437
1200
|
}
|
|
1438
|
-
/**
|
|
1439
|
-
* Ensure that something is an object.
|
|
1440
|
-
*
|
|
1441
|
-
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
|
|
1442
|
-
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
|
|
1443
|
-
*
|
|
1444
|
-
* @param wat The subject of the objectification
|
|
1445
|
-
* @returns A version of `wat` which can safely be used with `Object` class methods
|
|
1446
|
-
*/
|
|
1447
|
-
function objectify(wat) {
|
|
1448
|
-
var objectified;
|
|
1449
|
-
switch (true) {
|
|
1450
|
-
case wat === undefined || wat === null:
|
|
1451
|
-
objectified = new String(wat);
|
|
1452
|
-
break;
|
|
1453
|
-
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
|
|
1454
|
-
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
|
|
1455
|
-
// an object in order to wrap it.
|
|
1456
|
-
case typeof wat === 'symbol' || typeof wat === 'bigint':
|
|
1457
|
-
objectified = Object(wat);
|
|
1458
|
-
break;
|
|
1459
|
-
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
|
|
1460
|
-
case isPrimitive(wat):
|
|
1461
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1462
|
-
objectified = new wat.constructor(wat);
|
|
1463
|
-
break;
|
|
1464
|
-
// by process of elimination, at this point we know that `wat` must already be an object
|
|
1465
|
-
default:
|
|
1466
|
-
objectified = wat;
|
|
1467
|
-
break;
|
|
1468
|
-
}
|
|
1469
|
-
return objectified;
|
|
1470
|
-
}
|
|
1471
1201
|
|
|
1472
|
-
/**
|
|
1473
|
-
* Tells whether current environment supports ErrorEvent objects
|
|
1474
|
-
* {@link supportsErrorEvent}.
|
|
1475
|
-
*
|
|
1476
|
-
* @returns Answer to the given question.
|
|
1477
|
-
*/
|
|
1478
|
-
function supportsErrorEvent() {
|
|
1479
|
-
try {
|
|
1480
|
-
new ErrorEvent('');
|
|
1481
|
-
return true;
|
|
1482
|
-
}
|
|
1483
|
-
catch (e) {
|
|
1484
|
-
return false;
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
/**
|
|
1488
|
-
* Tells whether current environment supports DOMError objects
|
|
1489
|
-
* {@link supportsDOMError}.
|
|
1490
|
-
*
|
|
1491
|
-
* @returns Answer to the given question.
|
|
1492
|
-
*/
|
|
1493
|
-
function supportsDOMError() {
|
|
1494
|
-
try {
|
|
1495
|
-
// Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
|
|
1496
|
-
// 1 argument required, but only 0 present.
|
|
1497
|
-
// @ts-ignore It really needs 1 argument, not 0.
|
|
1498
|
-
new DOMError('');
|
|
1499
|
-
return true;
|
|
1500
|
-
}
|
|
1501
|
-
catch (e) {
|
|
1502
|
-
return false;
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
/**
|
|
1506
|
-
* Tells whether current environment supports DOMException objects
|
|
1507
|
-
* {@link supportsDOMException}.
|
|
1508
|
-
*
|
|
1509
|
-
* @returns Answer to the given question.
|
|
1510
|
-
*/
|
|
1511
|
-
function supportsDOMException() {
|
|
1512
|
-
try {
|
|
1513
|
-
new DOMException('');
|
|
1514
|
-
return true;
|
|
1515
|
-
}
|
|
1516
|
-
catch (e) {
|
|
1517
|
-
return false;
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
1202
|
/**
|
|
1521
1203
|
* Tells whether current environment supports Fetch API
|
|
1522
1204
|
* {@link supportsFetch}.
|
|
@@ -1582,15 +1264,6 @@ function supportsNativeFetch() {
|
|
|
1582
1264
|
}
|
|
1583
1265
|
return result;
|
|
1584
1266
|
}
|
|
1585
|
-
/**
|
|
1586
|
-
* Tells whether current environment supports ReportingObserver API
|
|
1587
|
-
* {@link supportsReportingObserver}.
|
|
1588
|
-
*
|
|
1589
|
-
* @returns Answer to the given question.
|
|
1590
|
-
*/
|
|
1591
|
-
function supportsReportingObserver() {
|
|
1592
|
-
return 'ReportingObserver' in getGlobalObject();
|
|
1593
|
-
}
|
|
1594
1267
|
/**
|
|
1595
1268
|
* Tells whether current environment supports Referrer Policy API
|
|
1596
1269
|
* {@link supportsReferrerPolicy}.
|
|
@@ -2283,25 +1956,6 @@ function addExceptionMechanism(event, newMechanism) {
|
|
|
2283
1956
|
exceptionValue0.mechanism.data = mergedData;
|
|
2284
1957
|
}
|
|
2285
1958
|
}
|
|
2286
|
-
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
|
2287
|
-
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
2288
|
-
/**
|
|
2289
|
-
* Parses input into a SemVer interface
|
|
2290
|
-
* @param input string representation of a semver version
|
|
2291
|
-
*/
|
|
2292
|
-
function parseSemver(input) {
|
|
2293
|
-
var match = input.match(SEMVER_REGEXP) || [];
|
|
2294
|
-
var major = parseInt(match[1], 10);
|
|
2295
|
-
var minor = parseInt(match[2], 10);
|
|
2296
|
-
var patch = parseInt(match[3], 10);
|
|
2297
|
-
return {
|
|
2298
|
-
buildmetadata: match[5],
|
|
2299
|
-
major: isNaN(major) ? undefined : major,
|
|
2300
|
-
minor: isNaN(minor) ? undefined : minor,
|
|
2301
|
-
patch: isNaN(patch) ? undefined : patch,
|
|
2302
|
-
prerelease: match[4],
|
|
2303
|
-
};
|
|
2304
|
-
}
|
|
2305
1959
|
var defaultRetryAfter = 60 * 1000; // 60 seconds
|
|
2306
1960
|
/**
|
|
2307
1961
|
* Extracts Retry-After value from the request header or returns default value
|
|
@@ -2322,36 +1976,6 @@ function parseRetryAfterHeader(now, header) {
|
|
|
2322
1976
|
}
|
|
2323
1977
|
return defaultRetryAfter;
|
|
2324
1978
|
}
|
|
2325
|
-
/**
|
|
2326
|
-
* This function adds context (pre/post/line) lines to the provided frame
|
|
2327
|
-
*
|
|
2328
|
-
* @param lines string[] containing all lines
|
|
2329
|
-
* @param frame StackFrame that will be mutated
|
|
2330
|
-
* @param linesOfContext number of context lines we want to add pre/post
|
|
2331
|
-
*/
|
|
2332
|
-
function addContextToFrame(lines, frame, linesOfContext) {
|
|
2333
|
-
if (linesOfContext === void 0) { linesOfContext = 5; }
|
|
2334
|
-
var lineno = frame.lineno || 0;
|
|
2335
|
-
var maxLines = lines.length;
|
|
2336
|
-
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
|
|
2337
|
-
frame.pre_context = lines
|
|
2338
|
-
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
|
|
2339
|
-
.map(function (line) { return snipLine(line, 0); });
|
|
2340
|
-
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
|
|
2341
|
-
frame.post_context = lines
|
|
2342
|
-
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
|
|
2343
|
-
.map(function (line) { return snipLine(line, 0); });
|
|
2344
|
-
}
|
|
2345
|
-
/**
|
|
2346
|
-
* Strip the query string and fragment off of a given URL or path (if present)
|
|
2347
|
-
*
|
|
2348
|
-
* @param urlPath Full URL or path, including possible query string and/or fragment
|
|
2349
|
-
* @returns URL or path without query string or fragment
|
|
2350
|
-
*/
|
|
2351
|
-
function stripUrlQueryAndFragment(urlPath) {
|
|
2352
|
-
// eslint-disable-next-line no-useless-escape
|
|
2353
|
-
return urlPath.split(/[\?#]/, 1)[0];
|
|
2354
|
-
}
|
|
2355
1979
|
/**
|
|
2356
1980
|
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
|
|
2357
1981
|
* in question), and marks it captured if not.
|
|
@@ -2392,168 +2016,6 @@ function checkOrSetAlreadyCaught(exception) {
|
|
|
2392
2016
|
return false;
|
|
2393
2017
|
}
|
|
2394
2018
|
|
|
2395
|
-
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
|
|
2396
|
-
// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
|
|
2397
|
-
/** JSDoc */
|
|
2398
|
-
function normalizeArray(parts, allowAboveRoot) {
|
|
2399
|
-
// if the path tries to go above the root, `up` ends up > 0
|
|
2400
|
-
var up = 0;
|
|
2401
|
-
for (var i = parts.length - 1; i >= 0; i--) {
|
|
2402
|
-
var last = parts[i];
|
|
2403
|
-
if (last === '.') {
|
|
2404
|
-
parts.splice(i, 1);
|
|
2405
|
-
}
|
|
2406
|
-
else if (last === '..') {
|
|
2407
|
-
parts.splice(i, 1);
|
|
2408
|
-
// eslint-disable-next-line no-plusplus
|
|
2409
|
-
up++;
|
|
2410
|
-
}
|
|
2411
|
-
else if (up) {
|
|
2412
|
-
parts.splice(i, 1);
|
|
2413
|
-
// eslint-disable-next-line no-plusplus
|
|
2414
|
-
up--;
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
2418
|
-
if (allowAboveRoot) {
|
|
2419
|
-
// eslint-disable-next-line no-plusplus
|
|
2420
|
-
for (; up--; up) {
|
|
2421
|
-
parts.unshift('..');
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
return parts;
|
|
2425
|
-
}
|
|
2426
|
-
// Split a filename into [root, dir, basename, ext], unix version
|
|
2427
|
-
// 'root' is just a slash, or nothing.
|
|
2428
|
-
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
|
|
2429
|
-
/** JSDoc */
|
|
2430
|
-
function splitPath(filename) {
|
|
2431
|
-
var parts = splitPathRe.exec(filename);
|
|
2432
|
-
return parts ? parts.slice(1) : [];
|
|
2433
|
-
}
|
|
2434
|
-
// path.resolve([from ...], to)
|
|
2435
|
-
// posix version
|
|
2436
|
-
/** JSDoc */
|
|
2437
|
-
function resolve() {
|
|
2438
|
-
var args = [];
|
|
2439
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2440
|
-
args[_i] = arguments[_i];
|
|
2441
|
-
}
|
|
2442
|
-
var resolvedPath = '';
|
|
2443
|
-
var resolvedAbsolute = false;
|
|
2444
|
-
for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
2445
|
-
var path = i >= 0 ? args[i] : '/';
|
|
2446
|
-
// Skip empty entries
|
|
2447
|
-
if (!path) {
|
|
2448
|
-
continue;
|
|
2449
|
-
}
|
|
2450
|
-
resolvedPath = path + "/" + resolvedPath;
|
|
2451
|
-
resolvedAbsolute = path.charAt(0) === '/';
|
|
2452
|
-
}
|
|
2453
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
2454
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
2455
|
-
// Normalize the path
|
|
2456
|
-
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');
|
|
2457
|
-
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
|
|
2458
|
-
}
|
|
2459
|
-
/** JSDoc */
|
|
2460
|
-
function trim(arr) {
|
|
2461
|
-
var start = 0;
|
|
2462
|
-
for (; start < arr.length; start++) {
|
|
2463
|
-
if (arr[start] !== '') {
|
|
2464
|
-
break;
|
|
2465
|
-
}
|
|
2466
|
-
}
|
|
2467
|
-
var end = arr.length - 1;
|
|
2468
|
-
for (; end >= 0; end--) {
|
|
2469
|
-
if (arr[end] !== '') {
|
|
2470
|
-
break;
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
if (start > end) {
|
|
2474
|
-
return [];
|
|
2475
|
-
}
|
|
2476
|
-
return arr.slice(start, end - start + 1);
|
|
2477
|
-
}
|
|
2478
|
-
// path.relative(from, to)
|
|
2479
|
-
// posix version
|
|
2480
|
-
/** JSDoc */
|
|
2481
|
-
function relative(from, to) {
|
|
2482
|
-
/* eslint-disable no-param-reassign */
|
|
2483
|
-
from = resolve(from).substr(1);
|
|
2484
|
-
to = resolve(to).substr(1);
|
|
2485
|
-
/* eslint-enable no-param-reassign */
|
|
2486
|
-
var fromParts = trim(from.split('/'));
|
|
2487
|
-
var toParts = trim(to.split('/'));
|
|
2488
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
2489
|
-
var samePartsLength = length;
|
|
2490
|
-
for (var i = 0; i < length; i++) {
|
|
2491
|
-
if (fromParts[i] !== toParts[i]) {
|
|
2492
|
-
samePartsLength = i;
|
|
2493
|
-
break;
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
var outputParts = [];
|
|
2497
|
-
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
2498
|
-
outputParts.push('..');
|
|
2499
|
-
}
|
|
2500
|
-
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
2501
|
-
return outputParts.join('/');
|
|
2502
|
-
}
|
|
2503
|
-
// path.normalize(path)
|
|
2504
|
-
// posix version
|
|
2505
|
-
/** JSDoc */
|
|
2506
|
-
function normalizePath(path) {
|
|
2507
|
-
var isPathAbsolute = isAbsolute(path);
|
|
2508
|
-
var trailingSlash = path.substr(-1) === '/';
|
|
2509
|
-
// Normalize the path
|
|
2510
|
-
var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');
|
|
2511
|
-
if (!normalizedPath && !isPathAbsolute) {
|
|
2512
|
-
normalizedPath = '.';
|
|
2513
|
-
}
|
|
2514
|
-
if (normalizedPath && trailingSlash) {
|
|
2515
|
-
normalizedPath += '/';
|
|
2516
|
-
}
|
|
2517
|
-
return (isPathAbsolute ? '/' : '') + normalizedPath;
|
|
2518
|
-
}
|
|
2519
|
-
// posix version
|
|
2520
|
-
/** JSDoc */
|
|
2521
|
-
function isAbsolute(path) {
|
|
2522
|
-
return path.charAt(0) === '/';
|
|
2523
|
-
}
|
|
2524
|
-
// posix version
|
|
2525
|
-
/** JSDoc */
|
|
2526
|
-
function join() {
|
|
2527
|
-
var args = [];
|
|
2528
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2529
|
-
args[_i] = arguments[_i];
|
|
2530
|
-
}
|
|
2531
|
-
return normalizePath(args.join('/'));
|
|
2532
|
-
}
|
|
2533
|
-
/** JSDoc */
|
|
2534
|
-
function dirname(path) {
|
|
2535
|
-
var result = splitPath(path);
|
|
2536
|
-
var root = result[0];
|
|
2537
|
-
var dir = result[1];
|
|
2538
|
-
if (!root && !dir) {
|
|
2539
|
-
// No dirname whatsoever
|
|
2540
|
-
return '.';
|
|
2541
|
-
}
|
|
2542
|
-
if (dir) {
|
|
2543
|
-
// It has a dirname, strip trailing slash
|
|
2544
|
-
dir = dir.substr(0, dir.length - 1);
|
|
2545
|
-
}
|
|
2546
|
-
return root + dir;
|
|
2547
|
-
}
|
|
2548
|
-
/** JSDoc */
|
|
2549
|
-
function basename(path, ext) {
|
|
2550
|
-
var f = splitPath(path)[2];
|
|
2551
|
-
if (ext && f.substr(ext.length * -1) === ext) {
|
|
2552
|
-
f = f.substr(0, f.length - ext.length);
|
|
2553
|
-
}
|
|
2554
|
-
return f;
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
2019
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2558
2020
|
/** SyncPromise internal states */
|
|
2559
2021
|
var States;
|
|
@@ -2928,27 +2390,16 @@ var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSo
|
|
|
2928
2390
|
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
|
2929
2391
|
*/
|
|
2930
2392
|
var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
|
2931
|
-
// Re-exported with an old name for backwards-compatibility.
|
|
2932
|
-
var timestampWithMs = timestampInSeconds;
|
|
2933
|
-
/**
|
|
2934
|
-
* A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
|
|
2935
|
-
*/
|
|
2936
|
-
var usingPerformanceAPI = platformPerformance !== undefined;
|
|
2937
|
-
/**
|
|
2938
|
-
* Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
|
|
2939
|
-
*/
|
|
2940
|
-
var _browserPerformanceTimeOriginMode;
|
|
2941
2393
|
/**
|
|
2942
2394
|
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
|
2943
2395
|
* performance API is available.
|
|
2944
2396
|
*/
|
|
2945
|
-
|
|
2397
|
+
((function () {
|
|
2946
2398
|
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
|
2947
2399
|
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
|
2948
2400
|
// data as reliable if they are within a reasonable threshold of the current time.
|
|
2949
2401
|
var performance = getGlobalObject().performance;
|
|
2950
2402
|
if (!performance || !performance.now) {
|
|
2951
|
-
_browserPerformanceTimeOriginMode = 'none';
|
|
2952
2403
|
return undefined;
|
|
2953
2404
|
}
|
|
2954
2405
|
var threshold = 3600 * 1000;
|
|
@@ -2973,18 +2424,14 @@ var browserPerformanceTimeOrigin = (function () {
|
|
|
2973
2424
|
if (timeOriginIsReliable || navigationStartIsReliable) {
|
|
2974
2425
|
// Use the more reliable time origin
|
|
2975
2426
|
if (timeOriginDelta <= navigationStartDelta) {
|
|
2976
|
-
_browserPerformanceTimeOriginMode = 'timeOrigin';
|
|
2977
2427
|
return performance.timeOrigin;
|
|
2978
2428
|
}
|
|
2979
2429
|
else {
|
|
2980
|
-
_browserPerformanceTimeOriginMode = 'navigationStart';
|
|
2981
2430
|
return navigationStart;
|
|
2982
2431
|
}
|
|
2983
2432
|
}
|
|
2984
|
-
// Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
|
|
2985
|
-
_browserPerformanceTimeOriginMode = 'dateNow';
|
|
2986
2433
|
return dateNow;
|
|
2987
|
-
})();
|
|
2434
|
+
}))();
|
|
2988
2435
|
|
|
2989
2436
|
/**
|
|
2990
2437
|
* Absolute maximum number of breadcrumbs added to an event.
|
|
@@ -3978,17 +3425,6 @@ function getCurrentHub() {
|
|
|
3978
3425
|
// Return hub that lives on a global object
|
|
3979
3426
|
return getHubFromCarrier(registry);
|
|
3980
3427
|
}
|
|
3981
|
-
/**
|
|
3982
|
-
* Returns the active domain, if one exists
|
|
3983
|
-
* @deprecated No longer used; remove in v7
|
|
3984
|
-
* @returns The domain, or undefined if there is no active domain
|
|
3985
|
-
*/
|
|
3986
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
3987
|
-
function getActiveDomain() {
|
|
3988
|
-
logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
|
|
3989
|
-
var sentry = getMainCarrier().__SENTRY__;
|
|
3990
|
-
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
|
|
3991
|
-
}
|
|
3992
3428
|
/**
|
|
3993
3429
|
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
|
|
3994
3430
|
* @returns discovered hub
|
|
@@ -4048,106 +3484,6 @@ function setHubOnCarrier(carrier, hub) {
|
|
|
4048
3484
|
return true;
|
|
4049
3485
|
}
|
|
4050
3486
|
|
|
4051
|
-
/**
|
|
4052
|
-
* @inheritdoc
|
|
4053
|
-
*/
|
|
4054
|
-
var SessionFlusher = /** @class */ (function () {
|
|
4055
|
-
function SessionFlusher(transport, attrs) {
|
|
4056
|
-
var _this = this;
|
|
4057
|
-
this.flushTimeout = 60;
|
|
4058
|
-
this._pendingAggregates = {};
|
|
4059
|
-
this._isEnabled = true;
|
|
4060
|
-
this._transport = transport;
|
|
4061
|
-
// Call to setInterval, so that flush is called every 60 seconds
|
|
4062
|
-
this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
|
|
4063
|
-
this._sessionAttrs = attrs;
|
|
4064
|
-
}
|
|
4065
|
-
/** Sends session aggregates to Transport */
|
|
4066
|
-
SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
|
|
4067
|
-
if (!this._transport.sendSession) {
|
|
4068
|
-
logger.warn("Dropping session because custom transport doesn't implement sendSession");
|
|
4069
|
-
return;
|
|
4070
|
-
}
|
|
4071
|
-
void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
|
|
4072
|
-
logger.error("Error while sending session: " + reason);
|
|
4073
|
-
});
|
|
4074
|
-
};
|
|
4075
|
-
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
|
|
4076
|
-
SessionFlusher.prototype.flush = function () {
|
|
4077
|
-
var sessionAggregates = this.getSessionAggregates();
|
|
4078
|
-
if (sessionAggregates.aggregates.length === 0) {
|
|
4079
|
-
return;
|
|
4080
|
-
}
|
|
4081
|
-
this._pendingAggregates = {};
|
|
4082
|
-
this.sendSessionAggregates(sessionAggregates);
|
|
4083
|
-
};
|
|
4084
|
-
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
|
|
4085
|
-
SessionFlusher.prototype.getSessionAggregates = function () {
|
|
4086
|
-
var _this = this;
|
|
4087
|
-
var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
|
|
4088
|
-
return _this._pendingAggregates[parseInt(key)];
|
|
4089
|
-
});
|
|
4090
|
-
var sessionAggregates = {
|
|
4091
|
-
attrs: this._sessionAttrs,
|
|
4092
|
-
aggregates: aggregates,
|
|
4093
|
-
};
|
|
4094
|
-
return dropUndefinedKeys(sessionAggregates);
|
|
4095
|
-
};
|
|
4096
|
-
/** JSDoc */
|
|
4097
|
-
SessionFlusher.prototype.close = function () {
|
|
4098
|
-
clearInterval(this._intervalId);
|
|
4099
|
-
this._isEnabled = false;
|
|
4100
|
-
this.flush();
|
|
4101
|
-
};
|
|
4102
|
-
/**
|
|
4103
|
-
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
|
|
4104
|
-
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
|
|
4105
|
-
* `_incrementSessionStatusCount` along with the start date
|
|
4106
|
-
*/
|
|
4107
|
-
SessionFlusher.prototype.incrementSessionStatusCount = function () {
|
|
4108
|
-
var _a, _b;
|
|
4109
|
-
if (!this._isEnabled) {
|
|
4110
|
-
return;
|
|
4111
|
-
}
|
|
4112
|
-
var scope = getCurrentHub().getScope();
|
|
4113
|
-
var requestSession = (_a = scope) === null || _a === void 0 ? void 0 : _a.getRequestSession();
|
|
4114
|
-
if (requestSession && requestSession.status) {
|
|
4115
|
-
this._incrementSessionStatusCount(requestSession.status, new Date());
|
|
4116
|
-
// This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
|
|
4117
|
-
// case captureRequestSession is called more than once to prevent double count
|
|
4118
|
-
(_b = scope) === null || _b === void 0 ? void 0 : _b.setRequestSession(undefined);
|
|
4119
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
4120
|
-
}
|
|
4121
|
-
};
|
|
4122
|
-
/**
|
|
4123
|
-
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
|
|
4124
|
-
* the session received
|
|
4125
|
-
*/
|
|
4126
|
-
SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
|
|
4127
|
-
// Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
|
|
4128
|
-
var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
|
|
4129
|
-
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
|
|
4130
|
-
// corresponds to aggregated sessions in one specific minute bucket
|
|
4131
|
-
// for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
|
|
4132
|
-
var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
|
|
4133
|
-
if (!aggregationCounts.started) {
|
|
4134
|
-
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
|
|
4135
|
-
}
|
|
4136
|
-
switch (status) {
|
|
4137
|
-
case RequestSessionStatus.Errored:
|
|
4138
|
-
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
|
|
4139
|
-
return aggregationCounts.errored;
|
|
4140
|
-
case RequestSessionStatus.Ok:
|
|
4141
|
-
aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
|
|
4142
|
-
return aggregationCounts.exited;
|
|
4143
|
-
case RequestSessionStatus.Crashed:
|
|
4144
|
-
aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
|
|
4145
|
-
return aggregationCounts.crashed;
|
|
4146
|
-
}
|
|
4147
|
-
};
|
|
4148
|
-
return SessionFlusher;
|
|
4149
|
-
}());
|
|
4150
|
-
|
|
4151
3487
|
/**
|
|
4152
3488
|
* This calls a function on the current hub.
|
|
4153
3489
|
* @param method function to call on hub.
|
|
@@ -4187,104 +3523,6 @@ function captureException(exception, captureContext) {
|
|
|
4187
3523
|
syntheticException: syntheticException,
|
|
4188
3524
|
});
|
|
4189
3525
|
}
|
|
4190
|
-
/**
|
|
4191
|
-
* Captures a message event and sends it to Sentry.
|
|
4192
|
-
*
|
|
4193
|
-
* @param message The message to send to Sentry.
|
|
4194
|
-
* @param level Define the level of the message.
|
|
4195
|
-
* @returns The generated eventId.
|
|
4196
|
-
*/
|
|
4197
|
-
function captureMessage(message, captureContext) {
|
|
4198
|
-
var syntheticException;
|
|
4199
|
-
try {
|
|
4200
|
-
throw new Error(message);
|
|
4201
|
-
}
|
|
4202
|
-
catch (exception) {
|
|
4203
|
-
syntheticException = exception;
|
|
4204
|
-
}
|
|
4205
|
-
// This is necessary to provide explicit scopes upgrade, without changing the original
|
|
4206
|
-
// arity of the `captureMessage(message, level)` method.
|
|
4207
|
-
var level = typeof captureContext === 'string' ? captureContext : undefined;
|
|
4208
|
-
var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;
|
|
4209
|
-
return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));
|
|
4210
|
-
}
|
|
4211
|
-
/**
|
|
4212
|
-
* Captures a manually created event and sends it to Sentry.
|
|
4213
|
-
*
|
|
4214
|
-
* @param event The event to send to Sentry.
|
|
4215
|
-
* @returns The generated eventId.
|
|
4216
|
-
*/
|
|
4217
|
-
function captureEvent(event) {
|
|
4218
|
-
return callOnHub('captureEvent', event);
|
|
4219
|
-
}
|
|
4220
|
-
/**
|
|
4221
|
-
* Callback to set context information onto the scope.
|
|
4222
|
-
* @param callback Callback function that receives Scope.
|
|
4223
|
-
*/
|
|
4224
|
-
function configureScope(callback) {
|
|
4225
|
-
callOnHub('configureScope', callback);
|
|
4226
|
-
}
|
|
4227
|
-
/**
|
|
4228
|
-
* Records a new breadcrumb which will be attached to future events.
|
|
4229
|
-
*
|
|
4230
|
-
* Breadcrumbs will be added to subsequent events to provide more context on
|
|
4231
|
-
* user's actions prior to an error or crash.
|
|
4232
|
-
*
|
|
4233
|
-
* @param breadcrumb The breadcrumb to record.
|
|
4234
|
-
*/
|
|
4235
|
-
function addBreadcrumb(breadcrumb) {
|
|
4236
|
-
callOnHub('addBreadcrumb', breadcrumb);
|
|
4237
|
-
}
|
|
4238
|
-
/**
|
|
4239
|
-
* Sets context data with the given name.
|
|
4240
|
-
* @param name of the context
|
|
4241
|
-
* @param context Any kind of data. This data will be normalized.
|
|
4242
|
-
*/
|
|
4243
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4244
|
-
function setContext(name, context) {
|
|
4245
|
-
callOnHub('setContext', name, context);
|
|
4246
|
-
}
|
|
4247
|
-
/**
|
|
4248
|
-
* Set an object that will be merged sent as extra data with the event.
|
|
4249
|
-
* @param extras Extras object to merge into current context.
|
|
4250
|
-
*/
|
|
4251
|
-
function setExtras(extras) {
|
|
4252
|
-
callOnHub('setExtras', extras);
|
|
4253
|
-
}
|
|
4254
|
-
/**
|
|
4255
|
-
* Set an object that will be merged sent as tags data with the event.
|
|
4256
|
-
* @param tags Tags context object to merge into current context.
|
|
4257
|
-
*/
|
|
4258
|
-
function setTags(tags) {
|
|
4259
|
-
callOnHub('setTags', tags);
|
|
4260
|
-
}
|
|
4261
|
-
/**
|
|
4262
|
-
* Set key:value that will be sent as extra data with the event.
|
|
4263
|
-
* @param key String of extra
|
|
4264
|
-
* @param extra Any kind of data. This data will be normalized.
|
|
4265
|
-
*/
|
|
4266
|
-
function setExtra(key, extra) {
|
|
4267
|
-
callOnHub('setExtra', key, extra);
|
|
4268
|
-
}
|
|
4269
|
-
/**
|
|
4270
|
-
* Set key:value that will be sent as tags data with the event.
|
|
4271
|
-
*
|
|
4272
|
-
* Can also be used to unset a tag, by passing `undefined`.
|
|
4273
|
-
*
|
|
4274
|
-
* @param key String key of tag
|
|
4275
|
-
* @param value Value of tag
|
|
4276
|
-
*/
|
|
4277
|
-
function setTag(key, value) {
|
|
4278
|
-
callOnHub('setTag', key, value);
|
|
4279
|
-
}
|
|
4280
|
-
/**
|
|
4281
|
-
* Updates user context information for future events.
|
|
4282
|
-
*
|
|
4283
|
-
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
4284
|
-
*/
|
|
4285
|
-
function setUser(user) {
|
|
4286
|
-
callOnHub('setUser', user);
|
|
4287
|
-
}
|
|
4288
3526
|
/**
|
|
4289
3527
|
* Creates a new scope with and executes the given operation within.
|
|
4290
3528
|
* The scope is automatically removed once the operation
|
|
@@ -4301,44 +3539,6 @@ function setUser(user) {
|
|
|
4301
3539
|
function withScope(callback) {
|
|
4302
3540
|
callOnHub('withScope', callback);
|
|
4303
3541
|
}
|
|
4304
|
-
/**
|
|
4305
|
-
* Calls a function on the latest client. Use this with caution, it's meant as
|
|
4306
|
-
* in "internal" helper so we don't need to expose every possible function in
|
|
4307
|
-
* the shim. It is not guaranteed that the client actually implements the
|
|
4308
|
-
* function.
|
|
4309
|
-
*
|
|
4310
|
-
* @param method The method to call on the client/client.
|
|
4311
|
-
* @param args Arguments to pass to the client/fontend.
|
|
4312
|
-
* @hidden
|
|
4313
|
-
*/
|
|
4314
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4315
|
-
function _callOnClient(method) {
|
|
4316
|
-
var args = [];
|
|
4317
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4318
|
-
args[_i - 1] = arguments[_i];
|
|
4319
|
-
}
|
|
4320
|
-
callOnHub.apply(void 0, __spread(['_invokeClient', method], args));
|
|
4321
|
-
}
|
|
4322
|
-
/**
|
|
4323
|
-
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
4324
|
-
*
|
|
4325
|
-
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
|
|
4326
|
-
* new child span within the transaction or any span, call the respective `.startChild()` method.
|
|
4327
|
-
*
|
|
4328
|
-
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
|
|
4329
|
-
*
|
|
4330
|
-
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
|
|
4331
|
-
* finished child spans will be sent to Sentry.
|
|
4332
|
-
*
|
|
4333
|
-
* @param context Properties of the new `Transaction`.
|
|
4334
|
-
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
|
|
4335
|
-
* default values). See {@link Options.tracesSampler}.
|
|
4336
|
-
*
|
|
4337
|
-
* @returns The transaction which was just started
|
|
4338
|
-
*/
|
|
4339
|
-
function startTransaction(context, customSamplingContext) {
|
|
4340
|
-
return callOnHub('startTransaction', __assign({}, context), customSamplingContext);
|
|
4341
|
-
}
|
|
4342
3542
|
|
|
4343
3543
|
var SENTRY_API_VERSION = '7';
|
|
4344
3544
|
/**
|
|
@@ -5429,12 +4629,6 @@ var InboundFilters = /** @class */ (function () {
|
|
|
5429
4629
|
return InboundFilters;
|
|
5430
4630
|
}());
|
|
5431
4631
|
|
|
5432
|
-
const CoreIntegrations = /*#__PURE__*/Object.freeze({
|
|
5433
|
-
__proto__: null,
|
|
5434
|
-
FunctionToString: FunctionToString,
|
|
5435
|
-
InboundFilters: InboundFilters
|
|
5436
|
-
});
|
|
5437
|
-
|
|
5438
4632
|
/**
|
|
5439
4633
|
* This was originally forked from https://github.com/occ/TraceKit, but has since been
|
|
5440
4634
|
* largely modified and is now maintained as part of Sentry JS SDK.
|
|
@@ -6402,7 +5596,7 @@ function ignoreNextOnError() {
|
|
|
6402
5596
|
* @returns The wrapped function.
|
|
6403
5597
|
* @hidden
|
|
6404
5598
|
*/
|
|
6405
|
-
function wrap
|
|
5599
|
+
function wrap(fn, options, before) {
|
|
6406
5600
|
if (options === void 0) { options = {}; }
|
|
6407
5601
|
if (typeof fn !== 'function') {
|
|
6408
5602
|
return fn;
|
|
@@ -6432,7 +5626,7 @@ function wrap$1(fn, options, before) {
|
|
|
6432
5626
|
before.apply(this, arguments);
|
|
6433
5627
|
}
|
|
6434
5628
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
6435
|
-
var wrappedArguments = args.map(function (arg) { return wrap
|
|
5629
|
+
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
|
6436
5630
|
if (fn.handleEvent) {
|
|
6437
5631
|
// Attempt to invoke user-land function
|
|
6438
5632
|
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
|
@@ -6806,7 +6000,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6806
6000
|
args[_i] = arguments[_i];
|
|
6807
6001
|
}
|
|
6808
6002
|
var originalCallback = args[0];
|
|
6809
|
-
args[0] = wrap
|
|
6003
|
+
args[0] = wrap(originalCallback, {
|
|
6810
6004
|
mechanism: {
|
|
6811
6005
|
data: { function: getFunctionName(original) },
|
|
6812
6006
|
handled: true,
|
|
@@ -6822,7 +6016,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6822
6016
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6823
6017
|
return function (callback) {
|
|
6824
6018
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6825
|
-
return original.call(this, wrap
|
|
6019
|
+
return original.call(this, wrap(callback, {
|
|
6826
6020
|
mechanism: {
|
|
6827
6021
|
data: {
|
|
6828
6022
|
function: 'requestAnimationFrame',
|
|
@@ -6848,7 +6042,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6848
6042
|
return function (eventName, fn, options) {
|
|
6849
6043
|
try {
|
|
6850
6044
|
if (typeof fn.handleEvent === 'function') {
|
|
6851
|
-
fn.handleEvent = wrap
|
|
6045
|
+
fn.handleEvent = wrap(fn.handleEvent.bind(fn), {
|
|
6852
6046
|
mechanism: {
|
|
6853
6047
|
data: {
|
|
6854
6048
|
function: 'handleEvent',
|
|
@@ -6866,7 +6060,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6866
6060
|
}
|
|
6867
6061
|
return original.call(this, eventName,
|
|
6868
6062
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6869
|
-
wrap
|
|
6063
|
+
wrap(fn, {
|
|
6870
6064
|
mechanism: {
|
|
6871
6065
|
data: {
|
|
6872
6066
|
function: 'addEventListener',
|
|
@@ -6943,7 +6137,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6943
6137
|
wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);
|
|
6944
6138
|
}
|
|
6945
6139
|
// Otherwise wrap directly
|
|
6946
|
-
return wrap
|
|
6140
|
+
return wrap(original, wrapOptions);
|
|
6947
6141
|
});
|
|
6948
6142
|
}
|
|
6949
6143
|
});
|
|
@@ -7480,16 +6674,6 @@ var Dedupe = /** @class */ (function () {
|
|
|
7480
6674
|
return Dedupe;
|
|
7481
6675
|
}());
|
|
7482
6676
|
|
|
7483
|
-
const BrowserIntegrations = /*#__PURE__*/Object.freeze({
|
|
7484
|
-
__proto__: null,
|
|
7485
|
-
GlobalHandlers: GlobalHandlers,
|
|
7486
|
-
TryCatch: TryCatch,
|
|
7487
|
-
Breadcrumbs: Breadcrumbs,
|
|
7488
|
-
LinkedErrors: LinkedErrors,
|
|
7489
|
-
UserAgent: UserAgent,
|
|
7490
|
-
Dedupe: Dedupe
|
|
7491
|
-
});
|
|
7492
|
-
|
|
7493
6677
|
/**
|
|
7494
6678
|
* The Sentry Browser SDK Client.
|
|
7495
6679
|
*
|
|
@@ -7648,91 +6832,6 @@ function init(options) {
|
|
|
7648
6832
|
startSessionTracking();
|
|
7649
6833
|
}
|
|
7650
6834
|
}
|
|
7651
|
-
/**
|
|
7652
|
-
* Present the user with a report dialog.
|
|
7653
|
-
*
|
|
7654
|
-
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
7655
|
-
*/
|
|
7656
|
-
function showReportDialog(options) {
|
|
7657
|
-
if (options === void 0) { options = {}; }
|
|
7658
|
-
var hub = getCurrentHub();
|
|
7659
|
-
var scope = hub.getScope();
|
|
7660
|
-
if (scope) {
|
|
7661
|
-
options.user = __assign(__assign({}, scope.getUser()), options.user);
|
|
7662
|
-
}
|
|
7663
|
-
if (!options.eventId) {
|
|
7664
|
-
options.eventId = hub.lastEventId();
|
|
7665
|
-
}
|
|
7666
|
-
var client = hub.getClient();
|
|
7667
|
-
if (client) {
|
|
7668
|
-
client.showReportDialog(options);
|
|
7669
|
-
}
|
|
7670
|
-
}
|
|
7671
|
-
/**
|
|
7672
|
-
* This is the getter for lastEventId.
|
|
7673
|
-
*
|
|
7674
|
-
* @returns The last event id of a captured event.
|
|
7675
|
-
*/
|
|
7676
|
-
function lastEventId() {
|
|
7677
|
-
return getCurrentHub().lastEventId();
|
|
7678
|
-
}
|
|
7679
|
-
/**
|
|
7680
|
-
* This function is here to be API compatible with the loader.
|
|
7681
|
-
* @hidden
|
|
7682
|
-
*/
|
|
7683
|
-
function forceLoad() {
|
|
7684
|
-
// Noop
|
|
7685
|
-
}
|
|
7686
|
-
/**
|
|
7687
|
-
* This function is here to be API compatible with the loader.
|
|
7688
|
-
* @hidden
|
|
7689
|
-
*/
|
|
7690
|
-
function onLoad(callback) {
|
|
7691
|
-
callback();
|
|
7692
|
-
}
|
|
7693
|
-
/**
|
|
7694
|
-
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
|
7695
|
-
*
|
|
7696
|
-
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
|
7697
|
-
* the client to wait until all events are sent before resolving the promise.
|
|
7698
|
-
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7699
|
-
* doesn't (or if there's no client defined).
|
|
7700
|
-
*/
|
|
7701
|
-
function flush(timeout) {
|
|
7702
|
-
var client = getCurrentHub().getClient();
|
|
7703
|
-
if (client) {
|
|
7704
|
-
return client.flush(timeout);
|
|
7705
|
-
}
|
|
7706
|
-
logger.warn('Cannot flush events. No client defined.');
|
|
7707
|
-
return SyncPromise.resolve(false);
|
|
7708
|
-
}
|
|
7709
|
-
/**
|
|
7710
|
-
* Call `close()` on the current client, if there is one. See {@link Client.close}.
|
|
7711
|
-
*
|
|
7712
|
-
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
|
7713
|
-
* parameter will cause the client to wait until all events are sent before disabling itself.
|
|
7714
|
-
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7715
|
-
* doesn't (or if there's no client defined).
|
|
7716
|
-
*/
|
|
7717
|
-
function close(timeout) {
|
|
7718
|
-
var client = getCurrentHub().getClient();
|
|
7719
|
-
if (client) {
|
|
7720
|
-
return client.close(timeout);
|
|
7721
|
-
}
|
|
7722
|
-
logger.warn('Cannot flush events and disable SDK. No client defined.');
|
|
7723
|
-
return SyncPromise.resolve(false);
|
|
7724
|
-
}
|
|
7725
|
-
/**
|
|
7726
|
-
* Wrap code within a try/catch block so the SDK is able to capture errors.
|
|
7727
|
-
*
|
|
7728
|
-
* @param fn A function to wrap.
|
|
7729
|
-
*
|
|
7730
|
-
* @returns The result of wrapped function call.
|
|
7731
|
-
*/
|
|
7732
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7733
|
-
function wrap(fn) {
|
|
7734
|
-
return wrap$1(fn)();
|
|
7735
|
-
}
|
|
7736
6835
|
/**
|
|
7737
6836
|
* Enable automatic Session Tracking for the initial page load.
|
|
7738
6837
|
*/
|
|
@@ -7774,17 +6873,6 @@ function startSessionTracking() {
|
|
|
7774
6873
|
});
|
|
7775
6874
|
}
|
|
7776
6875
|
|
|
7777
|
-
// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata
|
|
7778
|
-
var SDK_NAME = 'sentry.javascript.browser';
|
|
7779
|
-
|
|
7780
|
-
var windowIntegrations = {};
|
|
7781
|
-
// This block is needed to add compatibility with the integrations packages when used with a CDN
|
|
7782
|
-
var _window = getGlobalObject();
|
|
7783
|
-
if (_window.Sentry && _window.Sentry.Integrations) {
|
|
7784
|
-
windowIntegrations = _window.Sentry.Integrations;
|
|
7785
|
-
}
|
|
7786
|
-
var INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);
|
|
7787
|
-
|
|
7788
6876
|
const getExeptionValues = (event) => { var _a, _b; return (_b = (_a = event === null || event === void 0 ? void 0 : event.exception) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []; };
|
|
7789
6877
|
const getExeptionStackFrames = (exeption) => { var _a, _b; return (_b = (_a = exeption === null || exeption === void 0 ? void 0 : exeption.stacktrace) === null || _a === void 0 ? void 0 : _a.frames) !== null && _b !== void 0 ? _b : []; };
|
|
7790
6878
|
const filterStackFrameByFilename = (query) => (frame) => {
|