@duffel/components 3.7.20 → 3.7.22
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/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -1
- package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -1
- package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -1
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -1
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -1
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -1
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -1
- package/components/DuffelAncillaries/seats/Amenity.d.ts +0 -1
- package/components/DuffelAncillaries/seats/Element.d.ts +0 -1
- package/components/DuffelAncillaries/seats/Legend.d.ts +0 -1
- package/components/DuffelAncillaries/seats/Row.d.ts +0 -1
- package/components/DuffelAncillaries/seats/RowSection.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -1
- package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -1
- package/components/DuffelCardForm/DuffelCardForm.d.ts +1 -4
- package/components/DuffelNGSView/DuffelNGSView.d.ts +2 -3
- package/components/DuffelNGSView/NGSSliceFareCard.d.ts +0 -1
- package/components/DuffelNGSView/NGSTable.d.ts +0 -1
- package/components/DuffelNGSView/SliceSummary.d.ts +0 -1
- package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +3 -4
- package/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.d.ts +1 -2
- package/components/DuffelNGSView/lib/filter-results.d.ts +1 -2
- package/components/DuffelNGSView/lib/get-initial-filter-values.d.ts +0 -1
- package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +1 -2
- package/components/DuffelNGSView/lib/getAirlines.d.ts +0 -1
- package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +1 -2
- package/components/DuffelNGSView/lib/index.d.ts +0 -1
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.d.ts +1 -2
- package/components/DuffelNGSView/lib/useFilters.d.ts +7 -20
- package/components/OfferSlice/OfferSlice.d.ts +0 -1
- package/components/OfferSlice/lib/getHighlightStyles.d.ts +1 -1
- package/components/Stays/StaysAmenities.d.ts +2 -3
- package/components/Stays/StaysRoomRateCard.d.ts +0 -1
- package/components/Stays/lib/getRateLabel.d.ts +1 -2
- package/components/Stays/lib/types.d.ts +2 -3
- package/components/shared/ErrorBoundary.d.ts +1 -1
- package/components/shared/Icon.d.ts +80 -80
- package/components/shared/SliceCarriersTitle.d.ts +0 -1
- package/fixtures/passengers/mock_passengers.d.ts +0 -1
- package/functions/createThreeDSecureSession/client.d.ts +2 -2
- package/lib/captureErrorInSentry.d.ts +1 -1
- package/lib/compileCreateOrderPayload.d.ts +1 -2
- package/lib/formatAvailableServices.d.ts +0 -1
- package/lib/getAirlinesText.d.ts +0 -1
- package/lib/getBaggageServiceDescription.d.ts +0 -1
- package/lib/getCabinsForSegmentAndDeck.d.ts +1 -3
- package/lib/getCarriers.d.ts +2 -3
- package/lib/getCurrencyForServices.d.ts +0 -1
- package/lib/getFareBrandName.d.ts +1 -1
- package/lib/getFirstSeatElementMatchingCriteria.d.ts +1 -2
- package/lib/getPassengerBySegmentList.d.ts +1 -6
- package/lib/getPassengerMapById.d.ts +2 -3
- package/lib/getPassengerName.d.ts +1 -1
- package/lib/getRowNumber.d.ts +0 -1
- package/lib/getSegmentDates.d.ts +2 -2
- package/lib/getSegmentList.d.ts +1 -3
- package/lib/getServicePriceMapById.d.ts +0 -1
- package/lib/getTotalAmountForServices.d.ts +3 -3
- package/lib/getTotalQuantity.d.ts +1 -2
- package/lib/hasAvailableSeatService.d.ts +0 -1
- package/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -1
- package/lib/hasService.d.ts +2 -2
- package/lib/hasWings.d.ts +0 -1
- package/lib/isBaggageService.d.ts +0 -2
- package/lib/isCancelForAnyReasonService.d.ts +0 -2
- package/lib/isFixtureOfferId.d.ts +1 -2
- package/lib/isPayloadComplete.d.ts +1 -3
- package/lib/isSeatElement.d.ts +0 -1
- package/lib/offerIsExpired.d.ts +1 -2
- package/lib/retrieveOffer.d.ts +0 -1
- package/lib/retrieveSeatMaps.d.ts +0 -1
- package/package.json +1 -1
- package/stories/AirlineLogo.stories.d.ts +1 -1
- package/stories/AirlineSelector.stories.d.ts +2 -2
- package/stories/BaggageSelectionModalHeader.stories.d.ts +1 -1
- package/stories/Button.stories.d.ts +1 -1
- package/stories/DuffelAncillaries.stories.d.ts +1 -1
- package/stories/DuffelCardForm.stories.d.ts +1 -1
- package/stories/DuffelNGSView.stories.d.ts +1 -1
- package/stories/DuffelPayments.stories.d.ts +1 -1
- package/stories/Icon.stories.d.ts +1 -1
- package/stories/IconButton.stories.d.ts +1 -1
- package/stories/MapboxPlacesLookup.stories.d.ts +1 -1
- package/stories/NGSSliceFareCard.stories.d.ts +1 -1
- package/stories/OfferSlice.stories.d.ts +1 -1
- package/stories/OfferSliceModal.stories.d.ts +1 -1
- package/stories/PlacesLookup.stories.d.ts +1 -1
- package/stories/SliceCarriersTitle.stories.d.ts +1 -1
- package/stories/SliceSummary.stories.d.ts +1 -1
- package/stories/StaysAmenities.stories.d.ts +3 -4
- package/stories/StaysRating.stories.d.ts +3 -3
- package/stories/StaysRoomRateCard.stories.d.ts +11 -68
- package/stories/StaysSummary.stories.d.ts +4 -28
- package/tsconfig.tsbuildinfo +1 -1
- package/types/DuffelAncillariesProps.d.ts +0 -1
- package/types/TravelDetails.d.ts +0 -1
- package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -12
- package/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.d.ts +0 -1
- package/components/DuffelCardForm/lib/postMessageToSaveCard.d.ts +0 -1
- package/components/DuffelCardForm/lib/postMessageWithStyles.d.ts +0 -2
- package/components/DuffelNGSView/FilterControls.d.ts +0 -13
- package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -13
- package/components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement.d.ts +0 -13
- package/components/OfferSlice/OfferSliceConditions.d.ts +0 -7
- package/components/OfferSlice/OfferSliceDetailTravelItem.d.ts +0 -9
- package/components/OfferSliceModal/OfferSliceModal.d.ts +0 -7
- package/components/Stays/StaysAmenitiesCustomElement.d.ts +0 -12
- package/components/Stays/StaysRatingCustomElement.d.ts +0 -14
- package/components/Stays/StaysRoomRateCardCustomElement.d.ts +0 -14
- package/components/Stays/StaysSummary.d.ts +0 -12
- package/components/Stays/StaysSummaryCustomElement.d.ts +0 -12
- package/custom-elements.js +0 -69
- package/custom-elements.js.map +0 -7
- package/index.js +0 -60
- package/index.js.map +0 -7
- package/stories/NGSShelfInfoCard.stories.d.ts +0 -3
package/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../.yarn/berry/cache/classnames-npm-2.3.2-d2fdae468d-10c0.zip/node_modules/classnames/index.js", "../.yarn/__virtual__/@stripe-react-stripe-js-virtual-25ff75fca0/3/.yarn/berry/cache/@stripe-react-stripe-js-npm-2.1.0-2f15e96dd7-10c0.zip/node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js", "../../../.yarn/berry/cache/classnames-npm-2.5.1-c7273f3423-10c0.zip/node_modules/classnames/index.js", "../../../.yarn/berry/cache/react-is-npm-18.3.0-da422f699a-10c0.zip/node_modules/react-is/cjs/react-is.production.min.js", "../../../.yarn/berry/cache/react-is-npm-18.3.0-da422f699a-10c0.zip/node_modules/react-is/index.js", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/units.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/negate.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/numberUtils.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/parseISODuration.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/validate.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/cleanDurationObject.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/parse.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/toUnit.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/isNegative.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/abs.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/dateUtils.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/apply.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/between.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/isZero.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/normalize.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/sum.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/subtract.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/getUnitCount.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/lib/checkAllUnitsNegative.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/toString.ts", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/dist/types.js", "../../../.yarn/berry/cache/duration-fns-npm-3.0.2-d94da6c53a-10c0.zip/node_modules/duration-fns/src/index.ts", "../src/index.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/is.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/string.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/aggregate-errors.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/worldwide.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/browser.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/logger.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/dsn.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/error.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/object.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/misc.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/stacktrace.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/supports.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/vendor/supportsHistory.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/instrument.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/env.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/node.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/memo.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/normalize.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/syncpromise.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/promisebuffer.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/url.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/severity.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/time.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/baggage.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/tracing.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/envelope.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/clientreport.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/ratelimit.ts", "../../../.yarn/berry/cache/@sentry-utils-npm-7.77.0-2a4acebef5-10c0.zip/node_modules/@sentry/src/eventbuilder.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/constants.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/eventProcessors.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/session.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/scope.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/hub.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/utils.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/errors.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/span.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/dynamicSamplingContext.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/transaction.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/idletransaction.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/utils/hasTracingEnabled.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/sampling.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/tracing/hubextensions.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/exports.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/api.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/envelope.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/integration.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/utils/prepareEvent.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/baseclient.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/sdk.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/transports/base.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/version.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/core/esm/integrations/index.js", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/integrations/functiontostring.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/integrations/inboundfilters.ts", "../../../.yarn/berry/cache/@sentry-core-npm-7.77.0-5a2669a07e-10c0.zip/node_modules/@sentry/src/integrations/linkederrors.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/helpers.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/eventbuilder.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/userfeedback.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/client.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/transports/utils.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/transports/fetch.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/transports/xhr.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/stack-parsers.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/globalhandlers.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/trycatch.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/breadcrumbs.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/linkederrors.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/httpcontext.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/integrations/dedupe.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/sdk.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/@sentry/browser/esm/integrations/index.js", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/types.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/backgroundtab.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/bindReporter.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/generateUniqueID.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/getNavigationEntry.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/getActivationStart.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/initMetric.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/observe.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/onHidden.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/getCLS.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/lib/getVisibilityWatcher.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/getFID.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/web-vitals/getLCP.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/instrument.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/metrics/utils.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/metrics/index.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/request.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/router.ts", "../../../.yarn/berry/cache/@sentry-internal-tracing-npm-7.77.0-dd5d7f5a08-10c0.zip/node_modules/@sentry-internal/src/browser/browsertracing.ts", "../../../.yarn/berry/cache/@sentry-browser-npm-7.77.0-3002d70329-10c0.zip/node_modules/src/index.ts", "../../../.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js", "../src/lib/captureErrorInSentry.ts", "../src/components/shared/ErrorBoundary.tsx", "../src/lib/logging.ts", "../src/components/shared/Icon.tsx", "../src/components/shared/Button.tsx", "../src/components/shared/NonIdealState.tsx", "../src/components/shared/FetchOfferErrorState.tsx", "../src/components/shared/WithComponentStyles.tsx", "../src/lib/getServicePriceMapById.ts", "../src/lib/getTotalAmountForServices.ts", "../src/lib/compileCreateOrderPayload.ts", "../src/lib/createPriceFormatters.ts", "../src/lib/isBaggageService.ts", "../src/lib/isCancelForAnyReasonService.ts", "../src/lib/formatAvailableServices.ts", "../src/lib/isSeatElement.ts", "../src/lib/formatSeatMaps.ts", "../src/lib/hasHighLuminance.ts", "../src/lib/isPayloadComplete.ts", "../src/lib/offerIsExpired.ts", "../src/lib/fetchFromDuffelAPI.ts", "../src/lib/fetchFromFixtures.ts", "../src/lib/isFixtureOfferId.ts", "../src/lib/retrieveOfferFromDuffelAPI.ts", "../src/lib/retrieveOffer.ts", "../src/lib/retrieveSeatMapsFromDuffelAPI.ts", "../src/lib/retrieveSeatMaps.ts", "../src/lib/validateProps.ts", "../src/components/DuffelAncillaries/DuffelAncillaries.tsx", "../src/components/shared/AnimatedLoaderEllipsis.tsx", "../src/components/shared/Stamp.tsx", "../src/lib/getCurrencyForServices.ts", "../src/lib/getTotalQuantity.ts", "../src/lib/hasService.ts", "../src/lib/moneyStringFormatter.ts", "../src/lib/withPlural.ts", "../src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx", "../src/components/DuffelAncillaries/Card.tsx", "../src/lib/setBodyScrollability.ts", "../src/components/shared/Modal.tsx", "../src/components/shared/IconButton.tsx", "../src/lib/getPassengerMapById.ts", "../src/lib/getSegmentList.ts", "../src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx", "../src/lib/getPassengerName.ts", "../src/lib/getBaggageServiceDescription.ts", "../src/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.ts", "../src/components/DuffelAncillaries/Counter.tsx", "../src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx", "../src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx", "../src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx", "../src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx", "../src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx", "../src/lib/formatDate.ts", "../src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx", "../src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx", "../src/lib/getFirstSeatElementMatchingCriteria.ts", "../src/lib/getCurrencyForSeatMaps.ts", "../src/lib/hasAvailableSeatService.ts", "../src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx", "../src/lib/getPassengerBySegmentList.ts", "../src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx", "../src/lib/getCabinsForSegmentAndDeck.ts", "../src/lib/getSymbols.ts", "../src/lib/hasWings.ts", "../src/components/DuffelAncillaries/seats/SeatMap.tsx", "../src/components/shared/Tabs.tsx", "../src/components/DuffelAncillaries/seats/DeckSelect.tsx", "../src/components/DuffelAncillaries/seats/Legend.tsx", "../src/lib/getRowNumber.ts", "../src/components/DuffelAncillaries/seats/RowSection.tsx", "../src/components/DuffelAncillaries/seats/Amenity.tsx", "../src/components/DuffelAncillaries/seats/EmptyElement.tsx", "../src/components/DuffelAncillaries/seats/ExitElement.tsx", "../src/lib/getPassengerInitials.ts", "../src/components/DuffelAncillaries/seats/SeatElement.tsx", "../src/components/DuffelAncillaries/seats/SeatInfo.tsx", "../src/components/DuffelAncillaries/seats/SeatUnavailable.tsx", "../src/components/DuffelAncillaries/seats/Element.tsx", "../src/components/DuffelAncillaries/seats/Row.tsx", "../src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx", "../src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx", "../src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx", "../src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx", "../src/components/DuffelPayments/DuffelPayments.tsx", "../../../.yarn/berry/cache/@stripe-stripe-js-npm-1.54.2-a2f6a2f69c-10c0.zip/node_modules/@stripe/stripe-js/dist/stripe.esm.js", "../src/components/shared/HSpace.tsx", "../src/components/Stays/StaysRating.tsx", "../src/components/Stays/lib/types.ts", "../src/components/shared/VSpace.tsx", "../src/lib/isValidDateString.ts", "../src/lib/getDateObject.ts", "../src/lib/getDateString.ts", "../src/components/Stays/StaysSummary.tsx", "../src/components/Stays/StaysAmenities.tsx", "../src/components/Stays/StaysRoomRateCard.tsx", "../src/components/Stays/lib/getRateLabel.ts", "../src/components/shared/RadioButton.tsx", "../src/components/DuffelNGSView/DuffelNGSView.tsx", "../src/components/shared/AirlineLogo.tsx", "../src/components/DuffelNGSView/FilterControl.tsx", "../src/components/DuffelNGSView/AirlineSelector.tsx", "../src/components/DuffelNGSView/StopsSelector.tsx", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/typeof.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/toPrimitive.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/defineProperty.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/objectSpread2.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/iterableToArray.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/slicedToArray.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Slider.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/hooks/useEvent.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/hooks/useLayoutEffect.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/Dom/canUseDom.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/hooks/useState.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/hooks/useMergedState.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/warning.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/isEqual.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/extends.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js", "../../../.yarn/berry/cache/@babel-runtime-npm-7.24.4-1a974e2dd0-10c0.zip/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Handles/index.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/util.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Handles/Handle.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/KeyCode.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/context.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Marks/index.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Marks/Mark.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Steps/index.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Steps/Dot.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Tracks/index.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/Tracks/Track.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/ref.js", "../.yarn/__virtual__/rc-util-virtual-ac32eb3b99/3/.yarn/berry/cache/rc-util-npm-5.39.1-a4973e6604-10c0.zip/node_modules/rc-util/es/hooks/useMemo.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/hooks/useDrag.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/hooks/useOffset.js", "../.yarn/__virtual__/rc-slider-virtual-72b801cebc/3/.yarn/berry/cache/rc-slider-npm-10.6.2-4035332577-10c0.zip/node_modules/rc-slider/es/index.js", "../src/components/DuffelNGSView/TimeRangeSelector.tsx", "../src/components/DuffelNGSView/FilterControls.tsx", "../src/components/shared/SliceCarriersTitle.tsx", "../src/components/DuffelNGSView/NGSTable.tsx", "../src/components/DuffelNGSView/lib/index.ts", "../src/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.ts", "../src/components/DuffelNGSView/lib/group-offers-for-ngs-view.ts", "../src/lib/isISO8601Duration.ts", "../src/lib/convertDurationToString.ts", "../src/lib/getTimeString.ts", "../src/components/DuffelNGSView/SliceSummary.tsx", "../src/lib/getDurationString.ts", "../src/components/OfferSlice/OfferSlice.tsx", "../src/components/OfferSliceModal/OfferSliceModal.tsx", "../src/components/DuffelNGSView/NGSShelfInfoCard.tsx", "../src/components/DuffelNGSView/NGSSliceFareCard.tsx", "../src/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.ts", "../src/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.ts", "../src/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.ts", "../src/components/DuffelNGSView/lib/sort-ngs-rows-by-duration.ts", "../src/components/DuffelNGSView/lib/useFilters.ts", "../src/components/DuffelNGSView/lib/filter-results.ts", "../src/components/DuffelNGSView/lib/getAirlines.ts", "../src/components/DuffelNGSView/lib/get-initial-filter-values.ts", "../src/components/DuffelNGSView/SortingControl.tsx", "../src/components/DuffelNGSView/lib/sort-ngs-rows-by-recommended.ts", "../src/components/DuffelCardForm/DuffelCardForm.tsx", "../src/components/DuffelCardForm/lib/getIFrameEventListener.ts", "../src/components/DuffelCardForm/lib/getIFrameOriginForEnvironment.ts", "../src/components/DuffelCardForm/lib/getPathnameForIntent.ts", "../src/components/DuffelCardForm/lib/getTokenFromClientKey.ts", "../src/components/DuffelCardForm/lib/getIframeURL.ts", "../src/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.ts", "../src/components/DuffelCardForm/lib/postMessageToSaveCard.ts", "../src/components/DuffelCardForm/lib/postMessageWithStyles.ts", "../src/components/DuffelCardForm/lib/useDuffelCardFormActions.ts", "../src/functions/createThreeDSecureSession/client.ts", "../src/functions/createThreeDSecureSession/initEvervault.ts", "../src/functions/createThreeDSecureSession/loadEvervaultScript.ts", "../src/functions/createThreeDSecureSession/createThreeDSecureSession.ts"],
|
|
4
|
-
"sourcesContent": ["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.ReactStripe = {}, global.React));\n}(this, (function (exports, React) { 'use strict';\n\n React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n }\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n var ReactPropTypesSecret_1 = ReactPropTypesSecret;\n\n function emptyFunction() {}\n\n function emptyFunctionWithReset() {}\n\n emptyFunctionWithReset.resetWarningCache = emptyFunction;\n\n var factoryWithThrowingShims = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret_1) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n };\n\n var propTypes = createCommonjsModule(function (module) {\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = factoryWithThrowingShims();\n }\n });\n\n var usePrevious = function usePrevious(value) {\n var ref = React.useRef(value);\n React.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n };\n\n var isUnknownObject = function isUnknownObject(raw) {\n return raw !== null && _typeof(raw) === 'object';\n };\n var isPromise = function isPromise(raw) {\n return isUnknownObject(raw) && typeof raw.then === 'function';\n }; // We are using types to enforce the `stripe` prop in this lib,\n // but in an untyped integration `stripe` could be anything, so we need\n // to do some sanity validation to prevent type errors.\n\n var isStripe = function isStripe(raw) {\n return isUnknownObject(raw) && typeof raw.elements === 'function' && typeof raw.createToken === 'function' && typeof raw.createPaymentMethod === 'function' && typeof raw.confirmCardPayment === 'function';\n };\n\n var PLAIN_OBJECT_STR = '[object Object]';\n var isEqual = function isEqual(left, right) {\n if (!isUnknownObject(left) || !isUnknownObject(right)) {\n return left === right;\n }\n\n var leftArray = Array.isArray(left);\n var rightArray = Array.isArray(right);\n if (leftArray !== rightArray) return false;\n var leftPlainObject = Object.prototype.toString.call(left) === PLAIN_OBJECT_STR;\n var rightPlainObject = Object.prototype.toString.call(right) === PLAIN_OBJECT_STR;\n if (leftPlainObject !== rightPlainObject) return false; // not sure what sort of special object this is (regexp is one option), so\n // fallback to reference check.\n\n if (!leftPlainObject && !leftArray) return left === right;\n var leftKeys = Object.keys(left);\n var rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) return false;\n var keySet = {};\n\n for (var i = 0; i < leftKeys.length; i += 1) {\n keySet[leftKeys[i]] = true;\n }\n\n for (var _i = 0; _i < rightKeys.length; _i += 1) {\n keySet[rightKeys[_i]] = true;\n }\n\n var allKeys = Object.keys(keySet);\n\n if (allKeys.length !== leftKeys.length) {\n return false;\n }\n\n var l = left;\n var r = right;\n\n var pred = function pred(key) {\n return isEqual(l[key], r[key]);\n };\n\n return allKeys.every(pred);\n };\n\n var extractAllowedOptionsUpdates = function extractAllowedOptionsUpdates(options, prevOptions, immutableKeys) {\n if (!isUnknownObject(options)) {\n return null;\n }\n\n return Object.keys(options).reduce(function (newOptions, key) {\n var isUpdated = !isUnknownObject(prevOptions) || !isEqual(options[key], prevOptions[key]);\n\n if (immutableKeys.includes(key)) {\n if (isUpdated) {\n console.warn(\"Unsupported prop change: options.\".concat(key, \" is not a mutable property.\"));\n }\n\n return newOptions;\n }\n\n if (!isUpdated) {\n return newOptions;\n }\n\n return _objectSpread2(_objectSpread2({}, newOptions || {}), {}, _defineProperty({}, key, options[key]));\n }, null);\n };\n\n var INVALID_STRIPE_ERROR = 'Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.'; // We are using types to enforce the `stripe` prop in this lib, but in a real\n // integration `stripe` could be anything, so we need to do some sanity\n // validation to prevent type errors.\n\n var validateStripe = function validateStripe(maybeStripe) {\n if (maybeStripe === null || isStripe(maybeStripe)) {\n return maybeStripe;\n }\n\n throw new Error(INVALID_STRIPE_ERROR);\n };\n\n var parseStripeProp = function parseStripeProp(raw) {\n if (isPromise(raw)) {\n return {\n tag: 'async',\n stripePromise: Promise.resolve(raw).then(validateStripe)\n };\n }\n\n var stripe = validateStripe(raw);\n\n if (stripe === null) {\n return {\n tag: 'empty'\n };\n }\n\n return {\n tag: 'sync',\n stripe: stripe\n };\n };\n\n var ElementsContext = /*#__PURE__*/React.createContext(null);\n ElementsContext.displayName = 'ElementsContext';\n var parseElementsContext = function parseElementsContext(ctx, useCase) {\n if (!ctx) {\n throw new Error(\"Could not find Elements context; You need to wrap the part of your app that \".concat(useCase, \" in an <Elements> provider.\"));\n }\n\n return ctx;\n };\n var CartElementContext = /*#__PURE__*/React.createContext(null);\n CartElementContext.displayName = 'CartElementContext';\n var parseCartElementContext = function parseCartElementContext(ctx, useCase) {\n if (!ctx) {\n throw new Error(\"Could not find Elements context; You need to wrap the part of your app that \".concat(useCase, \" in an <Elements> provider.\"));\n }\n\n return ctx;\n };\n /**\n * The `Elements` provider allows you to use [Element components](https://stripe.com/docs/stripe-js/react#element-components) and access the [Stripe object](https://stripe.com/docs/js/initializing) in any nested component.\n * Render an `Elements` provider at the root of your React app so that it is available everywhere you need it.\n *\n * To use the `Elements` provider, call `loadStripe` from `@stripe/stripe-js` with your publishable key.\n * The `loadStripe` function will asynchronously load the Stripe.js script and initialize a `Stripe` object.\n * Pass the returned `Promise` to `Elements`.\n *\n * @docs https://stripe.com/docs/stripe-js/react#elements-provider\n */\n\n var Elements = function Elements(_ref) {\n var rawStripeProp = _ref.stripe,\n options = _ref.options,\n children = _ref.children;\n var parsed = React.useMemo(function () {\n return parseStripeProp(rawStripeProp);\n }, [rawStripeProp]);\n\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n cart = _React$useState2[0],\n setCart = _React$useState2[1];\n\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n cartState = _React$useState4[0],\n setCartState = _React$useState4[1]; // For a sync stripe instance, initialize into context\n\n\n var _React$useState5 = React.useState(function () {\n return {\n stripe: parsed.tag === 'sync' ? parsed.stripe : null,\n elements: parsed.tag === 'sync' ? parsed.stripe.elements(options) : null\n };\n }),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n ctx = _React$useState6[0],\n setContext = _React$useState6[1];\n\n React.useEffect(function () {\n var isMounted = true;\n\n var safeSetContext = function safeSetContext(stripe) {\n setContext(function (ctx) {\n // no-op if we already have a stripe instance (https://github.com/stripe/react-stripe-js/issues/296)\n if (ctx.stripe) return ctx;\n return {\n stripe: stripe,\n elements: stripe.elements(options)\n };\n });\n }; // For an async stripePromise, store it in context once resolved\n\n\n if (parsed.tag === 'async' && !ctx.stripe) {\n parsed.stripePromise.then(function (stripe) {\n if (stripe && isMounted) {\n // Only update Elements context if the component is still mounted\n // and stripe is not null. We allow stripe to be null to make\n // handling SSR easier.\n safeSetContext(stripe);\n }\n });\n } else if (parsed.tag === 'sync' && !ctx.stripe) {\n // Or, handle a sync stripe instance going from null -> populated\n safeSetContext(parsed.stripe);\n }\n\n return function () {\n isMounted = false;\n };\n }, [parsed, ctx, options]); // Warn on changes to stripe prop\n\n var prevStripe = usePrevious(rawStripeProp);\n React.useEffect(function () {\n if (prevStripe !== null && prevStripe !== rawStripeProp) {\n console.warn('Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.');\n }\n }, [prevStripe, rawStripeProp]); // Apply updates to elements when options prop has relevant changes\n\n var prevOptions = usePrevious(options);\n React.useEffect(function () {\n if (!ctx.elements) {\n return;\n }\n\n var updates = extractAllowedOptionsUpdates(options, prevOptions, ['clientSecret', 'fonts']);\n\n if (updates) {\n ctx.elements.update(updates);\n }\n }, [options, prevOptions, ctx.elements]); // Attach react-stripe-js version to stripe.js instance\n\n React.useEffect(function () {\n var anyStripe = ctx.stripe;\n\n if (!anyStripe || !anyStripe._registerWrapper || !anyStripe.registerAppInfo) {\n return;\n }\n\n anyStripe._registerWrapper({\n name: 'react-stripe-js',\n version: \"2.1.0\"\n });\n\n anyStripe.registerAppInfo({\n name: 'react-stripe-js',\n version: \"2.1.0\",\n url: 'https://stripe.com/docs/stripe-js/react'\n });\n }, [ctx.stripe]);\n return /*#__PURE__*/React.createElement(ElementsContext.Provider, {\n value: ctx\n }, /*#__PURE__*/React.createElement(CartElementContext.Provider, {\n value: {\n cart: cart,\n setCart: setCart,\n cartState: cartState,\n setCartState: setCartState\n }\n }, children));\n };\n Elements.propTypes = {\n stripe: propTypes.any,\n options: propTypes.object\n };\n var useElementsContextWithUseCase = function useElementsContextWithUseCase(useCaseMessage) {\n var ctx = React.useContext(ElementsContext);\n return parseElementsContext(ctx, useCaseMessage);\n };\n var useCartElementContextWithUseCase = function useCartElementContextWithUseCase(useCaseMessage) {\n var ctx = React.useContext(CartElementContext);\n return parseCartElementContext(ctx, useCaseMessage);\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#useelements-hook\n */\n\n var useElements = function useElements() {\n var _useElementsContextWi = useElementsContextWithUseCase('calls useElements()'),\n elements = _useElementsContextWi.elements;\n\n return elements;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#usestripe-hook\n */\n\n var useStripe = function useStripe() {\n var _useElementsContextWi2 = useElementsContextWithUseCase('calls useStripe()'),\n stripe = _useElementsContextWi2.stripe;\n\n return stripe;\n };\n /**\n * @docs https://stripe.com/docs/payments/checkout/cart-element\n */\n\n var useCartElement = function useCartElement() {\n var _useCartElementContex = useCartElementContextWithUseCase('calls useCartElement()'),\n cart = _useCartElementContex.cart;\n\n return cart;\n };\n /**\n * @docs https://stripe.com/docs/payments/checkout/cart-element\n */\n\n var useCartElementState = function useCartElementState() {\n var _useCartElementContex2 = useCartElementContextWithUseCase('calls useCartElementState()'),\n cartState = _useCartElementContex2.cartState;\n\n return cartState;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#elements-consumer\n */\n\n var ElementsConsumer = function ElementsConsumer(_ref2) {\n var children = _ref2.children;\n var ctx = useElementsContextWithUseCase('mounts <ElementsConsumer>'); // Assert to satisfy the busted React.FC return type (it should be ReactNode)\n\n return children(ctx);\n };\n ElementsConsumer.propTypes = {\n children: propTypes.func.isRequired\n };\n\n var useAttachEvent = function useAttachEvent(element, event, cb) {\n var cbDefined = !!cb;\n var cbRef = React.useRef(cb); // In many integrations the callback prop changes on each render.\n // Using a ref saves us from calling element.on/.off every render.\n\n React.useEffect(function () {\n cbRef.current = cb;\n }, [cb]);\n React.useEffect(function () {\n if (!cbDefined || !element) {\n return function () {};\n }\n\n var decoratedCb = function decoratedCb() {\n if (cbRef.current) {\n cbRef.current.apply(cbRef, arguments);\n }\n };\n\n element.on(event, decoratedCb);\n return function () {\n element.off(event, decoratedCb);\n };\n }, [cbDefined, event, element, cbRef]);\n };\n\n var capitalized = function capitalized(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n\n var createElementComponent = function createElementComponent(type, isServer) {\n var displayName = \"\".concat(capitalized(type), \"Element\");\n\n var ClientElement = function ClientElement(_ref) {\n var id = _ref.id,\n className = _ref.className,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n onBlur = _ref.onBlur,\n onFocus = _ref.onFocus,\n onReady = _ref.onReady,\n onChange = _ref.onChange,\n onEscape = _ref.onEscape,\n onClick = _ref.onClick,\n onLoadError = _ref.onLoadError,\n onLoaderStart = _ref.onLoaderStart,\n onNetworksChange = _ref.onNetworksChange,\n onCheckout = _ref.onCheckout,\n onLineItemClick = _ref.onLineItemClick,\n onConfirm = _ref.onConfirm,\n onCancel = _ref.onCancel,\n onShippingAddressChange = _ref.onShippingAddressChange,\n onShippingRateChange = _ref.onShippingRateChange;\n\n var _useElementsContextWi = useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\")),\n elements = _useElementsContextWi.elements;\n\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n element = _React$useState2[0],\n setElement = _React$useState2[1];\n\n var elementRef = React.useRef(null);\n var domNode = React.useRef(null);\n\n var _useCartElementContex = useCartElementContextWithUseCase(\"mounts <\".concat(displayName, \">\")),\n setCart = _useCartElementContex.setCart,\n setCartState = _useCartElementContex.setCartState; // For every event where the merchant provides a callback, call element.on\n // with that callback. If the merchant ever changes the callback, removes\n // the old callback with element.off and then call element.on with the new one.\n\n\n useAttachEvent(element, 'blur', onBlur);\n useAttachEvent(element, 'focus', onFocus);\n useAttachEvent(element, 'escape', onEscape);\n useAttachEvent(element, 'click', onClick);\n useAttachEvent(element, 'loaderror', onLoadError);\n useAttachEvent(element, 'loaderstart', onLoaderStart);\n useAttachEvent(element, 'networkschange', onNetworksChange);\n useAttachEvent(element, 'lineitemclick', onLineItemClick);\n useAttachEvent(element, 'confirm', onConfirm);\n useAttachEvent(element, 'cancel', onCancel);\n useAttachEvent(element, 'shippingaddresschange', onShippingAddressChange);\n useAttachEvent(element, 'shippingratechange', onShippingRateChange);\n var readyCallback;\n\n if (type === 'cart') {\n readyCallback = function readyCallback(event) {\n setCartState(event);\n onReady && onReady(event);\n };\n } else if (onReady) {\n if (type === 'expressCheckout') {\n // Passes through the event, which includes visible PM types\n readyCallback = onReady;\n } else {\n // For other Elements, pass through the Element itself.\n readyCallback = function readyCallback() {\n onReady(element);\n };\n }\n }\n\n useAttachEvent(element, 'ready', readyCallback);\n var changeCallback = type === 'cart' ? function (event) {\n setCartState(event);\n onChange && onChange(event);\n } : onChange;\n useAttachEvent(element, 'change', changeCallback);\n var checkoutCallback = type === 'cart' ? function (event) {\n setCartState(event);\n onCheckout && onCheckout(event);\n } : onCheckout;\n useAttachEvent(element, 'checkout', checkoutCallback);\n React.useLayoutEffect(function () {\n if (elementRef.current === null && elements && domNode.current !== null) {\n var newElement = elements.create(type, options);\n\n if (type === 'cart' && setCart) {\n // we know that elements.create return value must be of type StripeCartElement if type is 'cart',\n // we need to cast because typescript is not able to infer which overloaded method is used based off param type\n setCart(newElement);\n } // Store element in a ref to ensure it's _immediately_ available in cleanup hooks in StrictMode\n\n\n elementRef.current = newElement; // Store element in state to facilitate event listener attachment\n\n setElement(newElement);\n newElement.mount(domNode.current);\n }\n }, [elements, options, setCart]);\n var prevOptions = usePrevious(options);\n React.useEffect(function () {\n if (!elementRef.current) {\n return;\n }\n\n var updates = extractAllowedOptionsUpdates(options, prevOptions, ['paymentRequest']);\n\n if (updates) {\n elementRef.current.update(updates);\n }\n }, [options, prevOptions]);\n React.useLayoutEffect(function () {\n return function () {\n if (elementRef.current) {\n elementRef.current.destroy();\n elementRef.current = null;\n }\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className,\n ref: domNode\n });\n }; // Only render the Element wrapper in a server environment.\n\n\n var ServerElement = function ServerElement(props) {\n // Validate that we are in the right context by calling useElementsContextWithUseCase.\n useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n useCartElementContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n var id = props.id,\n className = props.className;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className\n });\n };\n\n var Element = isServer ? ServerElement : ClientElement;\n Element.propTypes = {\n id: propTypes.string,\n className: propTypes.string,\n onChange: propTypes.func,\n onBlur: propTypes.func,\n onFocus: propTypes.func,\n onReady: propTypes.func,\n onEscape: propTypes.func,\n onClick: propTypes.func,\n onLoadError: propTypes.func,\n onLoaderStart: propTypes.func,\n onNetworksChange: propTypes.func,\n onCheckout: propTypes.func,\n onLineItemClick: propTypes.func,\n onConfirm: propTypes.func,\n onCancel: propTypes.func,\n onShippingAddressChange: propTypes.func,\n onShippingRateChange: propTypes.func,\n options: propTypes.object\n };\n Element.displayName = displayName;\n Element.__elementType = type;\n return Element;\n };\n\n var isServer = typeof window === 'undefined';\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AuBankAccountElement = createElementComponent('auBankAccount', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardElement = createElementComponent('card', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardNumberElement = createElementComponent('cardNumber', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardExpiryElement = createElementComponent('cardExpiry', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardCvcElement = createElementComponent('cardCvc', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var FpxBankElement = createElementComponent('fpxBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IbanElement = createElementComponent('iban', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IdealBankElement = createElementComponent('idealBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var P24BankElement = createElementComponent('p24Bank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var EpsBankElement = createElementComponent('epsBank', isServer);\n var PaymentElement = createElementComponent('payment', isServer);\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var ExpressCheckoutElement = createElementComponent('expressCheckout', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var PaymentRequestButtonElement = createElementComponent('paymentRequestButton', isServer);\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var LinkAuthenticationElement = createElementComponent('linkAuthentication', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AddressElement = createElementComponent('address', isServer);\n /**\n * @deprecated\n * Use `AddressElement` instead.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var ShippingAddressElement = createElementComponent('shippingAddress', isServer);\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/elements/cart-element\n */\n\n var CartElement = createElementComponent('cart', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var PaymentMethodMessagingElement = createElementComponent('paymentMethodMessaging', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AffirmMessageElement = createElementComponent('affirmMessage', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AfterpayClearpayMessageElement = createElementComponent('afterpayClearpayMessage', isServer);\n\n exports.AddressElement = AddressElement;\n exports.AffirmMessageElement = AffirmMessageElement;\n exports.AfterpayClearpayMessageElement = AfterpayClearpayMessageElement;\n exports.AuBankAccountElement = AuBankAccountElement;\n exports.CardCvcElement = CardCvcElement;\n exports.CardElement = CardElement;\n exports.CardExpiryElement = CardExpiryElement;\n exports.CardNumberElement = CardNumberElement;\n exports.CartElement = CartElement;\n exports.Elements = Elements;\n exports.ElementsConsumer = ElementsConsumer;\n exports.EpsBankElement = EpsBankElement;\n exports.ExpressCheckoutElement = ExpressCheckoutElement;\n exports.FpxBankElement = FpxBankElement;\n exports.IbanElement = IbanElement;\n exports.IdealBankElement = IdealBankElement;\n exports.LinkAuthenticationElement = LinkAuthenticationElement;\n exports.P24BankElement = P24BankElement;\n exports.PaymentElement = PaymentElement;\n exports.PaymentMethodMessagingElement = PaymentMethodMessagingElement;\n exports.PaymentRequestButtonElement = PaymentRequestButtonElement;\n exports.ShippingAddressElement = ShippingAddressElement;\n exports.useCartElement = useCartElement;\n exports.useCartElementState = useCartElementState;\n exports.useElements = useElements;\n exports.useStripe = useStripe;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n", "/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n", "// Durations defined by ISO 31-1\nconst MILLISECONDS_IN_A_SECOND = 1000;\nconst MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * 60;\nconst MILLISECONDS_IN_AN_HOUR = MILLISECONDS_IN_A_MINUTE * 60;\nconst MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_AN_HOUR * 24;\n\n// Durations defined by common sense\nconst MILLISECONDS_IN_A_WEEK = MILLISECONDS_IN_A_DAY * 7;\nconst MILLISECONDS_IN_A_YEAR = MILLISECONDS_IN_A_DAY * 365;\nconst MILLISECONDS_IN_A_MONTH = MILLISECONDS_IN_A_YEAR / 12;\n\nexport const ZERO = Object.freeze({\n\tyears: 0 as number,\n\tmonths: 0 as number,\n\tweeks: 0 as number,\n\tdays: 0 as number,\n\thours: 0 as number,\n\tminutes: 0 as number,\n\tseconds: 0 as number,\n\tmilliseconds: 0 as number,\n});\n\nexport type UnitKey = keyof typeof ZERO;\n\nexport const UNITS_META_MAP_LITERAL = {\n\tyears: {\n\t\tmilliseconds: MILLISECONDS_IN_A_YEAR,\n\t\tmonths: 12,\n\t\tdateGetter: (date: Date) => date.getFullYear(),\n\t\tISOCharacter: 'Y',\n\t\tISOPrecision: 'period',\n\t},\n\tmonths: {\n\t\tmilliseconds: MILLISECONDS_IN_A_MONTH,\n\t\tmonths: 1,\n\t\tdateGetter: (date: Date) => date.getMonth(),\n\t\tISOCharacter: 'M',\n\t\tISOPrecision: 'period',\n\t},\n\tweeks: {\n\t\tmilliseconds: MILLISECONDS_IN_A_WEEK,\n\t\tdateGetter: () => 0,\n\t\tISOCharacter: 'W',\n\t\tISOPrecision: 'period',\n\t\tstringifyConvertTo: 'days',\n\t},\n\tdays: {\n\t\tmilliseconds: MILLISECONDS_IN_A_DAY,\n\t\tdateGetter: (date: Date) => date.getDate(),\n\t\tISOCharacter: 'D',\n\t\tISOPrecision: 'period',\n\t},\n\thours: {\n\t\tmilliseconds: MILLISECONDS_IN_AN_HOUR,\n\t\tdateGetter: (date: Date) => date.getHours(),\n\t\tISOCharacter: 'H',\n\t\tISOPrecision: 'time',\n\t},\n\tminutes: {\n\t\tmilliseconds: MILLISECONDS_IN_A_MINUTE,\n\t\tdateGetter: (date: Date) => date.getMinutes(),\n\t\tISOCharacter: 'M',\n\t\tISOPrecision: 'time',\n\t},\n\tseconds: {\n\t\tmilliseconds: MILLISECONDS_IN_A_SECOND,\n\t\tdateGetter: (date: Date) => date.getSeconds(),\n\t\tISOCharacter: 'S',\n\t\tISOPrecision: 'time',\n\t},\n\tmilliseconds: {\n\t\tmilliseconds: 1,\n\t\tdateGetter: (date: Date) => date.getMilliseconds(),\n\t\tstringifyConvertTo: 'seconds',\n\t},\n} as const;\n\ninterface Unit {\n\tmilliseconds: number;\n\tmonths?: number;\n\tdateGetter(date: Date): number;\n\tISOCharacter?: string;\n\tISOPrecision?: 'period' | 'time';\n\tstringifyConvertTo?: UnitKey;\n}\n\n// Re-export with a defined signature to allow for destructuring of optional\n// properties.\n//\n// The original `UNITS_MAP_LITERAL` is useful as TypeScript does not need a null\n// check when accessing an optional property that it knows is defined for the\n// specified unit (e.g. `UNITS_MAP_LITERAL.years.months`), whereas `UNITS_MAP`\n// needs the null check.\nexport const UNITS_META_MAP: { [key in UnitKey]: Unit } = UNITS_META_MAP_LITERAL;\n\n/**\n * All the keys of the `Duration` type, ordered from largest\n * to smallest.\n */\nexport const UNITS = Object.freeze([\n\t'years',\n\t'months',\n\t'weeks',\n\t'days',\n\t'hours',\n\t'minutes',\n\t'seconds',\n\t'milliseconds',\n] as const);\n\nexport const UNITS_META = Object.freeze(\n\tUNITS.map(unit => ({\n\t\t...UNITS_META_MAP[unit],\n\t\tunit,\n\t})),\n);\n", "import { UNITS } from './lib/units';\nimport { Duration, DurationInput } from './types';\nimport { parse } from './parse';\n\n/**\n * Gets the negative of the input duration.\n *\n * @example\n * negate({ days: -1 }) // { days: 1 }\n * negate({ days: -1, hours 2 }) // { days: 1, hours: -2 }\n */\nexport const negate = (duration: DurationInput): Duration => {\n\tconst output = { ...parse(duration) };\n\n\tUNITS.forEach(unit => {\n\t\toutput[unit] = output[unit] === 0\n\t\t\t? 0\n\t\t\t: -output[unit];\n\t});\n\n\treturn output;\n};\n", "/**\n * Returns `true` if the passed value less than `0`, or equal to `-0`.\n */\nexport const isNegativelySigned = (n: number): boolean =>\n\tn < 0 || Object.is(n, -0);\n", "import { Duration } from '../types';\nimport { ZERO, UnitKey } from './units';\nimport { negate } from '../negate';\nimport { isNegativelySigned } from './numberUtils';\n\nconst millisecondsPattern = '(?:[,.](\\\\d{1,3})\\\\d*)?';\n\nconst unitPattern = (unit: string) => `(?:(-?\\\\d+)${unit})?`;\n\nconst createDurationParser = (\n\tregex: RegExp,\n\tunitsOrder: UnitKey[],\n) => {\n\treturn (duration: string): Duration | null => {\n\t\tconst match = duration.match(regex);\n\n\t\tif (!match) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst isDurationNegative = match[1] === '-';\n\t\tconst unitStrings: (string | undefined)[] = match.slice(2);\n\n\t\t// Must have at least one unit match\n\t\tif (unitStrings.every(value => value === undefined)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst unitNumbers = unitStrings.map((value, i) => {\n\t\t\tvalue = value ?? '0';\n\n\t\t\tconst isMilliseconds = i === unitStrings.length - 1;\n\n\t\t\treturn isMilliseconds\n\t\t\t\t// Pad the end of the millisecond values. For example, when taking the \"6\"\n\t\t\t\t// portion from the string \"PT3.6S\", we need to interpret that as \"600\n\t\t\t\t// milliseconds\".\n\t\t\t\t? Number(value.padEnd(3, '0'))\n\t\t\t\t: Number(value);\n\t\t});\n\n\t\tconst output = { ...ZERO };\n\n\t\tunitsOrder.forEach((unit, i) => {\n\t\t\toutput[unit] = unitNumbers[i];\n\t\t});\n\n\t\t// Milliseconds don't have their own minus symbol. It depends on the symbol\n\t\t// before the seconds value.\n\t\tif (isNegativelySigned(output.seconds)) {\n\t\t\toutput.milliseconds *= -1;\n\t\t}\n\n\t\treturn isDurationNegative\n\t\t\t? negate(output)\n\t\t\t: output;\n\t};\n};\n\n/**\n * Parse a duration string expressed in one of the following formats:\n *\n * - PYYYYMMDDThhmmss\n * - PYYYY-MM-DDThh:mm:ss\n */\nconst parseFullFormatISODuration = createDurationParser(\n\tnew RegExp([\n\t\t'^(-)?P',\n\t\t'(\\\\d{4})', '-?',\n\t\t'(\\\\d{2})', '-?',\n\t\t'(\\\\d{2})', 'T',\n\t\t'(\\\\d{2})', ':?',\n\t\t'(\\\\d{2})', ':?',\n\t\t'(\\\\d{2})', millisecondsPattern,\n\t\t'$',\n\t].join('')),\n\t[\n\t\t'years',\n\t\t'months',\n\t\t'days',\n\t\t'hours',\n\t\t'minutes',\n\t\t'seconds',\n\t\t'milliseconds',\n\t],\n);\n\n/**\n * Parse a duration string expressed via number and unit character pairs. For\n * example:\n *\n * - P6D\n * - P1Y2D\n * - P2DT6H2,5S\n */\nconst parseUnitsISODuration = createDurationParser(\n\tnew RegExp([\n\t\t'^(-)?P',\n\t\tunitPattern('Y'),\n\t\tunitPattern('M'),\n\t\tunitPattern('W'),\n\t\tunitPattern('D'),\n\t\t'(?:T',\n\t\tunitPattern('H'),\n\t\tunitPattern('M'),\n\t\tunitPattern(`${millisecondsPattern}S`),\n\t\t')?$',\n\t].join('')),\n\t[\n\t\t'years',\n\t\t'months',\n\t\t'weeks',\n\t\t'days',\n\t\t'hours',\n\t\t'minutes',\n\t\t'seconds',\n\t\t'milliseconds',\n\t],\n);\n\n/**\n * Parse an ISO 8601 duration string into an object.\n *\n * The units of duration are not normalized. For example, the string `\"P365D\"`\n * doesn't get converted to `{ years: 1 }` since not all years are the same\n * length.\n *\n * @example parseISODuration('P365D') // { days: 365 }\n */\nexport const parseISODuration = (duration: string): Duration => {\n\tconst output = (\n\t\tparseUnitsISODuration(duration) ||\n\t\tparseFullFormatISODuration(duration)\n\t);\n\n\tif (output === null) {\n\t\tthrow new SyntaxError(`Failed to parse duration. \"${duration}\" is not a valid ISO duration string.`);\n\t}\n\n\treturn output;\n};\n", "import { Duration } from '../types';\nimport { UNITS } from './units';\n\nexport const validate = (duration: Readonly<Duration>): void => {\n\t(Object.keys(duration) as (keyof Duration)[]).forEach(unit => {\n\t\tif (!UNITS.includes(unit)) {\n\t\t\tthrow new TypeError(`Unexpected property \"${unit}\" on Duration object.`);\n\t\t}\n\n\t\tif (!Number.isInteger(duration[unit])) {\n\t\t\tthrow new TypeError(`Property \"${unit}\" must be a an integer. Received ${duration[unit]}.`);\n\t\t}\n\t});\n};\n", "import { UNITS } from './units';\nimport { Duration } from '../types';\n\nexport const cleanDurationObject = (duration: Readonly<Duration>): Readonly<Duration> => {\n\tconst output = { ...duration };\n\n\tUNITS.forEach(key => {\n\t\t// Convert `-0` to `0`. Both values will evaluate as `true` here.\n\t\tif (output[key] === 0) {\n\t\t\toutput[key] = 0;\n\t\t}\n\t});\n\n\treturn output;\n};\n", "import { ZERO } from './lib/units';\nimport { Duration, DurationInput } from './types';\nimport { parseISODuration } from './lib/parseISODuration';\nimport { validate } from './lib/validate';\nimport { cleanDurationObject } from './lib/cleanDurationObject';\n\nconst baseParse = (duration: DurationInput): Duration => {\n\tif (typeof duration === 'string') {\n\t\treturn parseISODuration(duration);\n\t}\n\n\tif (typeof duration === 'number') {\n\t\treturn { ...ZERO, milliseconds: duration };\n\t}\n\n\treturn { ...ZERO, ...duration };\n};\n\n/**\n * Parse various duration formats to a simple suration object.\n */\nexport const parse = (duration: DurationInput): Duration => {\n\tconst output = baseParse(duration);\n\n\tvalidate(output);\n\n\treturn cleanDurationObject(output);\n};\n", "import { DurationInput } from './types';\nimport { parse } from './parse';\nimport { UNITS_META, UNITS_META_MAP } from './lib/units';\n\n/**\n * Convert the input value to milliseconds represented by a duration object.\n * If a number is passed this is returned verbatim as the number\n * of milliseconds.\n *\n * @example toMilliseconds({ days: 1 }) // 86400000\n */\nexport const toMilliseconds = (duration: DurationInput): number => {\n\tconst parsed = parse(duration);\n\n\treturn UNITS_META.reduce((total, { unit, milliseconds }) => {\n\t\treturn total + (parsed[unit] * milliseconds);\n\t}, 0);\n};\n\n/**\n * Convert the input value to the specificed unit.\n * @example toUnit({ minutes: 2 }, 'seconds') // 120\n */\nexport const toUnit = (\n\tduration: DurationInput,\n\tunit: keyof typeof UNITS_META_MAP,\n): number => {\n\treturn toMilliseconds(duration) / UNITS_META_MAP[unit].milliseconds;\n};\n\nconst createDurationConverter = (unit: keyof typeof UNITS_META_MAP) => {\n\treturn (duration: DurationInput): number => toUnit(duration, unit);\n};\n\n/**\n * Convert the input value to seconds.\n * @example toSeconds({ minutes: 2 }) // 120\n */\nexport const toSeconds = createDurationConverter('seconds');\n\n/**\n * Convert the input value to minutes.\n * @example toMinutes({ hours: 1, minutes: 10 }) // 70\n */\nexport const toMinutes = createDurationConverter('minutes');\n\n/**\n * Convert the input value to hours.\n * @example toHours({ days: 1 }) // 24\n */\nexport const toHours = createDurationConverter('hours');\n\n/**\n * Convert the input value to days.\n * @example toDays({ hours: 12 }) // 0.5\n */\nexport const toDays = createDurationConverter('days');\n\n/**\n * Convert the input value to weeks.\n * @example toWeeks({ days: 14 }) // 2\n */\nexport const toWeeks = createDurationConverter('weeks');\n\n/**\n * Convert the input value to months.\n * Note, this is a rough approximation as the length of a month is variable.\n *\n * @example toMonths({ months: 10, days: 365 }) // 11\n */\nexport const toMonths = createDurationConverter('months');\n\n/**\n * Convert the input value to years.\n * Note, this is a rough approximation as the length of a year is variable.\n *\n * @example toYears({ years: 10, days: 365 }) // 11\n */\nexport const toYears = createDurationConverter('years');\n", "import { DurationInput } from './types';\nimport { toMilliseconds } from './toUnit';\n\n/**\n * Returns `true` if a duration is negative overall.\n *\n * Note, this function performs implicit normalization, so ambiguous\n * units, like months, work with average values.\n *\n * @example\n * isNegative('P-1D') // true\n * isNegative({ days: 1, hours: -25 }) // true\n * isNegative({ days: 1, hours: -23 }) // false\n */\nexport const isNegative = (duration: DurationInput): boolean =>\n\ttoMilliseconds(duration) < 0;\n", "import { Duration, DurationInput } from './types';\nimport { isNegative } from './isNegative';\nimport { negate } from './negate';\nimport { parse } from './parse';\n\n/**\n * Get the absolute value of a duration.\n *\n * @example\n * abs({ days: -1, seconds: 1 })\n * // { days: 1, seconds: -1 }\n */\nexport const abs = (duration: DurationInput): Duration => {\n\tif (isNegative(duration)) {\n\t\treturn negate(duration);\n\t}\n\n\treturn parse(duration);\n};\n", "export const getDaysInMonth = (date: Date): number => {\n\tconst monthIndex = date.getMonth();\n\tconst lastDayOfMonth = new Date(0);\n\tlastDayOfMonth.setFullYear(date.getFullYear(), monthIndex + 1, 0);\n\tlastDayOfMonth.setHours(0, 0, 0, 0);\n\treturn lastDayOfMonth.getDate();\n};\n\nexport const addMonths = (date: Date, value: number): void => {\n\tconst desiredMonth = date.getMonth() + value;\n\tconst dateWithDesiredMonth = new Date(0);\n\tdateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1);\n\tdateWithDesiredMonth.setHours(0, 0, 0, 0);\n\tconst daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n\t// Set the last day of the new month\n\t// if the original date was the last day of the longer month\n\tdate.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()));\n};\n", "import { DurationInput, DateInput } from './types';\nimport { addMonths } from './lib/dateUtils';\nimport { parse } from './parse';\n\n/**\n * Return a new date with the duration applied.\n *\n * @example\n * const newDate = apply('2020-01-01T00:00:00.000Z', { years: 2 })\n * newDate.toISOString() // '2022-01-01T00:00:00.000Z'\n */\nexport const apply = (\n\tdate: DateInput,\n\tduration: DurationInput,\n): Date => {\n\tconst parsedDate = new Date(date);\n\tconst {\n\t\tyears,\n\t\tmonths,\n\t\tweeks,\n\t\tdays,\n\t\thours,\n\t\tminutes,\n\t\tseconds,\n\t\tmilliseconds,\n\t} = parse(duration);\n\n\taddMonths(parsedDate, (years * 12) + months);\n\tparsedDate.setDate(parsedDate.getDate() + (weeks * 7) + days);\n\tparsedDate.setHours(\n\t\tparsedDate.getHours() + hours,\n\t\tparsedDate.getMinutes() + minutes,\n\t\tparsedDate.getSeconds() + seconds,\n\t\tparsedDate.getMilliseconds() + milliseconds,\n\t);\n\n\treturn parsedDate;\n};\n", "import { Duration, DateInput } from './types';\nimport { ZERO, UNITS_META } from './lib/units';\n\n/**\n * Gets the difference between two dates, expressed as a duration object.\n *\n * @example\n * between('2022-01-01', '2020-01-01') // { years: -2, months: 0, weeks: 0, ... }\n */\nexport const between = (date1: DateInput, date2: DateInput): Duration => {\n\tconst a = new Date(date1);\n\tconst b = new Date(date2);\n\tconst output: Duration = { ...ZERO };\n\n\tUNITS_META.forEach(({ unit, dateGetter }) => {\n\t\toutput[unit] = dateGetter(b) - dateGetter(a);\n\t});\n\n\treturn output;\n};\n", "import { DurationInput } from './types';\nimport { toMilliseconds } from './toUnit';\n\n/**\n * Returns `true` if all the units of the duration sum to zero.\n *\n * Note, this function performs implicit normalization, so ambiguous\n * units, like months, work with average values.\n *\n * @example\n * isZero('P0D') // true\n * isZero({ years: 0 }) // true\n * isZero({ days: 1, hours: -24 }) // true\n * isZero({ days: 1 }) // false\n */\nexport const isZero = (duration: DurationInput): boolean =>\n\ttoMilliseconds(duration) === 0;\n", "import { UNITS_META_MAP_LITERAL, ZERO, UnitKey } from './lib/units';\nimport { Duration, DurationInput, DateInput } from './types';\nimport { between } from './between';\nimport { apply } from './apply';\nimport { toMilliseconds, toMonths } from './toUnit';\nimport { parse } from './parse';\n\nconst createUnitsNormalizer = <T extends UnitKey>(\n\tkeys: T[],\n\tgetDivisor: (unit: T) => number,\n) => {\n\treturn (\n\t\tduration: Readonly<Duration>,\n\t\tremaining: number,\n\t) => {\n\t\tconst output = { ...duration };\n\n\t\tkeys.forEach(unit => {\n\t\t\tconst divisor = getDivisor(unit);\n\t\t\toutput[unit] = ~~(remaining / divisor);\n\t\t\tremaining -= output[unit] * divisor;\n\t\t});\n\n\t\treturn output;\n\t};\n};\n\nconst yearMonthNormalizer = createUnitsNormalizer(\n\t['years', 'months'],\n\tunit => UNITS_META_MAP_LITERAL[unit].months,\n);\n\nconst dayAndTimeNormalizer = createUnitsNormalizer(\n\t['days', 'hours', 'minutes', 'seconds', 'milliseconds'],\n\tunit => UNITS_META_MAP_LITERAL[unit].milliseconds,\n);\n\nconst baseNormalizer = (duration: DurationInput): Duration => {\n\tconst { years, months, weeks, days, ...rest } = parse(duration);\n\tlet output = { ...ZERO };\n\n\t// Normalize years and months between themselves.\n\t// They cannot be normalized with other units due to their variable length.\n\toutput = yearMonthNormalizer(\n\t\toutput,\n\t\ttoMonths({ years, months }),\n\t);\n\n\t// Normalize unambiguous units. It could be argued that `days` is ambiguous as\n\t// a day is not always 24 hours long, but the ISO 8601 spec says a day is 24 hours.\n\t// When not changing timezones, a day is consistently 24 hours, whereas months\n\t// and years are consistently irregular.\n\toutput = dayAndTimeNormalizer(\n\t\toutput,\n\t\ttoMilliseconds({ ...rest, days: days + (weeks * 7) }),\n\t);\n\n\treturn output;\n};\n\n/**\n * Convert a duration object or number of milliseconds into a complete\n * duration object that expresses the value in the most appropriate units.\n *\n * If a `referenceDate` argument is provided, the returned duration is normalized\n * relative to that date. This means each day, month and year has an unambiguous\n * duration, and the `normalize` function can safely convert between these units.\n *\n * @example\n * normalize({ milliseconds 4000 }) // { ..., seconds: 4, milliseconds: 0 }\n * normalize('P28DT24H') // { ..., days: 29 }\n * normalize('P28DT24H', '2018-02-01') // { ..., months: 1, days: 1 }\n * normalize('P28DT24H', '2016-02-01') // { ..., months: 1, days: 0 } (leap year)\n */\nexport const normalize = (\n\tduration: DurationInput,\n\treferenceDate?: DateInput,\n): Duration => {\n\tconst durationToNormalize = referenceDate != null\n\t\t// When using a reference date, `between` may give a result like this:\n\t\t// { years: 1, months: -11 }\n\t\t// Because of this, we pass that through `baseNormalizer` too.\n\t\t? between(referenceDate, apply(referenceDate, duration))\n\t\t: duration;\n\n\treturn baseNormalizer(durationToNormalize);\n};\n", "import { Duration, DurationInput } from './types';\nimport { UNITS, ZERO } from './lib/units';\nimport { parse } from './parse';\n\n/**\n * Sum durations.\n *\n * @example\n * sum({ days: 1 }, { days: 2, hours: 12 })\n * { days: 3, hours: 12 }\n */\nexport const sum = (...durations: DurationInput[]): Duration => {\n\tconst output = { ...ZERO };\n\n\tdurations.map(parse).forEach(duration => {\n\t\tUNITS.forEach(key => {\n\t\t\toutput[key] += duration[key];\n\t\t});\n\t});\n\n\treturn output;\n};\n", "import { Duration, DurationInput } from './types';\nimport { negate } from './negate';\nimport { sum } from './sum';\n\n/**\n * Subtract durations from the first duration argument.\n *\n * @example\n * subtract({ days: 1 }, { hours: 12 })\n * // { days: 1, hours: -12 }\n */\nexport const subtract = (\n\tduration: DurationInput,\n\t...durationsToSubtract: DurationInput[]\n): Duration =>\n\tsum(duration, ...durationsToSubtract.map(negate));\n", "import { UNITS } from './units';\nimport { DurationInput } from '../types';\nimport { parse } from '../parse';\n\nexport const getUnitCount = (duration: DurationInput): number => {\n\tconst parsed = { ...parse(duration) };\n\tlet count = 0;\n\n\tUNITS.forEach(unit => {\n\t\tif (parsed[unit] !== 0) {\n\t\t\tcount++;\n\t\t}\n\t});\n\n\treturn count;\n};\n", "import type { Duration, DurationInput } from '../types';\nimport { negate } from '../negate';\nimport { parse } from '../parse';\nimport { UNITS } from './units';\n\n/**\n * Get an indication of whether all of the non-zero units in a duration are\n * negative. If they are, return a positive representation of the duration,\n * with `isAllNegative` set to `true`.\n */\nexport const checkAllUnitsNegative = (duration: DurationInput): {\n\tisAllNegative: boolean\n\tmaybeAbsDuration: Duration\n} => {\n\tconst parsed = parse(duration);\n\tlet hasPositive = false;\n\tlet hasNegative = false;\n\n\tUNITS.forEach((unit) => {\n\t\tconst value = parsed[unit];\n\t\tif (value < 0) {\n\t\t\thasNegative = true;\n\t\t} else if (value > 0) {\n\t\t\thasPositive = true;\n\t\t}\n\t});\n\n\tif (hasNegative && !hasPositive) {\n\t\treturn {\n\t\t\tisAllNegative: true,\n\t\t\tmaybeAbsDuration: negate(parsed),\n\t\t};\n\t}\n\n\treturn {\n\t\tisAllNegative: false,\n\t\tmaybeAbsDuration: parsed,\n\t};\n};\n", "import { DurationInput } from './types';\nimport { isZero } from './isZero';\nimport { getUnitCount } from './lib/getUnitCount';\nimport { UNITS_META, UNITS_META_MAP } from './lib/units';\nimport { checkAllUnitsNegative } from './lib/checkAllUnitsNegative';\n\ninterface ToStringOptions {\n\tdecimalDelimiter: string;\n}\n\nconst joinComponents = (component: string[], delimiter: ToStringOptions['decimalDelimiter']) =>\n\tcomponent\n\t\t.join('')\n\t\t.replace(/\\./g, delimiter);\n\n/**\n * Stringify a duration into an ISO duration string.\n *\n * @example\n * toString({ years: 1, hours: 6 }) // 'P1YT6H'\n * toString(6000) // 'PT6S'\n */\nexport const toString = (\n\tduration: DurationInput,\n\toptions: Partial<ToStringOptions> = {},\n): string => {\n\tconst finalOptions: ToStringOptions = {\n\t\t// Commas are mentioned in the spec as the preferred decimal delimiter\n\t\tdecimalDelimiter: ',',\n\t\t...options,\n\t};\n\n\t// Zero values are a special case, since \"P\" is not a valid value.\n\t// At least one unit must be specified.\n\tif (isZero(duration)) {\n\t\treturn 'P0D';\n\t}\n\n\tconst {\n\t\tmaybeAbsDuration: parsed,\n\t\tisAllNegative,\n\t} = checkAllUnitsNegative(duration);\n\n\t// Weeks should not be included in the output, unless it is the only unit.\n\tif (getUnitCount(parsed) === 1 && parsed.weeks !== 0) {\n\t\treturn `P${parsed.weeks}W`;\n\t}\n\n\tconst components = {\n\t\tperiod: [] as string[],\n\t\ttime: [] as string[],\n\t};\n\n\t// Some units should be converted before stringifying.\n\t// For example, weeks should not be mixed with other units, and milliseconds\n\t// don't exist on ISO duration strings.\n\tUNITS_META.forEach(({ unit: fromUnit, stringifyConvertTo: toUnit }) => {\n\t\tif (toUnit == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst millisecondValue = parsed[fromUnit] * UNITS_META_MAP[fromUnit].milliseconds;\n\n\t\tparsed[toUnit] += millisecondValue / UNITS_META_MAP[toUnit].milliseconds;\n\t\tparsed[fromUnit] = 0;\n\t});\n\n\t// Push each non-zero unit to its relevant array\n\tUNITS_META.forEach(({ unit, ISOPrecision, ISOCharacter }) => {\n\t\tconst value = parsed[unit];\n\n\t\tif (ISOPrecision != null && value !== 0) {\n\t\t\tcomponents[ISOPrecision].push(`${value}${ISOCharacter}`);\n\t\t}\n\t});\n\n\t// Build output string\n\tlet output = `P${joinComponents(components.period, finalOptions.decimalDelimiter)}`;\n\n\tif (components.time.length) {\n\t\toutput += `T${joinComponents(components.time, finalOptions.decimalDelimiter)}`;\n\t}\n\n\t// Avoid \"P-1DT-1H\". Instead, output \"-P1DT1H\".\n\t// https://github.com/dlevs/duration-fns/issues/22\n\tif (isAllNegative) {\n\t\toutput = `-${output}`;\n\t}\n\n\treturn output;\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map", "export * from './abs';\nexport * from './apply';\nexport * from './between';\nexport * from './isNegative';\nexport * from './isZero';\nexport * from './negate';\nexport * from './normalize';\nexport * from './parse';\nexport * from './subtract';\nexport * from './sum';\nexport * from './toString';\nexport * from './toUnit';\nexport * from './types';\nexport { UNITS } from './lib/units';\n", "/**\n * This file is the main entry point for the library -- `@duffel/components`.\n * If you'd like to expose other react components, please add them here.\n */\nexport * from \"./components/DuffelAncillaries/DuffelAncillaries\";\nexport * from \"./components/DuffelPayments/DuffelPayments\";\nexport * from \"./components/Stays/StaysRating\";\nexport * from \"./components/Stays/StaysSummary\";\nexport * from \"./components/Stays/StaysAmenities\";\nexport * from \"./components/Stays/StaysRoomRateCard\";\nexport * from \"./components/DuffelNGSView/DuffelNGSView\";\nexport * from \"./types\";\n\n/* --- DuffelCardForm --- */\nexport * from \"./components/DuffelCardForm/DuffelCardForm\";\nexport * from \"./components/DuffelCardForm/lib/types\";\nexport * from \"./components/DuffelCardForm/lib/useDuffelCardFormActions\";\n\n/* --- Functions --- */\nexport { createThreeDSecureSession } from \"./functions/createThreeDSecureSession/createThreeDSecureSession\";\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport type { PolymorphicEvent, Primitive } from '@sentry/types';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record<string, unknown> {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: unknown): boolean {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike<any> {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat: unknown): boolean {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\ninterface VueViewModel {\n // Vue3\n __isVue?: boolean;\n // Vue2\n _isVue?: boolean;\n}\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isVueViewModel(wat: unknown): boolean {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue));\n}\n", "import { isRegExp, isString, isVueViewModel } from './is';\n\nexport { escapeStringForRegex } from './vendor/escapeStringForRegex';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n value: string,\n pattern: RegExp | string,\n requireExactStringMatch: boolean = false,\n): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n testString: string,\n patterns: Array<string | RegExp> = [],\n requireExactStringMatch: boolean = false,\n): boolean {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n", "import type { Event, EventHint, Exception, ExtendedError, StackParser } from '@sentry/types';\n\nimport { isInstanceOf } from './is';\nimport { truncate } from './string';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nexport function applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n maxValueLimit: number = 250,\n key: string,\n limit: number,\n event: Event,\n hint?: EventHint,\n): void {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException: Exception | undefined =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException as ExtendedError,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n limit: number,\n error: ExtendedError,\n key: string,\n prevExceptions: Exception[],\n exception: Exception,\n exceptionId: number,\n): Exception[] {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception: Exception, exceptionId: number): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception: Exception,\n source: string,\n exceptionId: number,\n parentId: number | undefined,\n): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions: Exception[], maxValueLength: number): Exception[] {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n", "/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Integration } from '@sentry/types';\n\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions */\nexport interface InternalGlobal {\n navigator?: { userAgent?: string };\n console: Console;\n Sentry?: {\n Integrations?: Integration[];\n };\n onerror?: {\n (msg: unknown, url: unknown, line: unknown, column: unknown, error: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n __SENTRY_LOADER__?: true;\n };\n onunhandledrejection?: {\n (event: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n __SENTRY_LOADER__?: true;\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n SENTRY_SDK_SOURCE?: SdkSource;\n /**\n * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n * file.\n */\n _sentryDebugIds?: Record<string, string>;\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n extensions?: {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n /**\n * Raw module metadata that is injected by bundler plugins.\n *\n * Keys are `error.stack` strings, values are the metadata.\n */\n _sentryModuleMetadata?: Record<string, any>;\n}\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj: { Math?: Math }): any | undefined {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ: InternalGlobal =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function (this: any) {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nexport function getGlobalObject<T>(): T & InternalGlobal {\n return GLOBAL_OBJ as T & InternalGlobal;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton<T>(name: keyof InternalGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T {\n const gbl = (obj || GLOBAL_OBJ) as InternalGlobal;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n", "import { isString } from './is';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject<Window>();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(\n elem: unknown,\n options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getDomElement<E = any>(selector: string): E | null {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) as unknown as E;\n }\n return null;\n}\n", "import { GLOBAL_OBJ } from './worldwide';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] as const;\nexport type ConsoleLevel = (typeof CONSOLE_LEVELS)[number];\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record<ConsoleLevel, LoggerMethod>;\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key in ConsoleLevel]?: (...args: any[]) => void;\n} = {};\n\n/** JSDoc */\ninterface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n isEnabled(): boolean;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console as Console;\n const wrappedFuncs: Partial<LoggerConsoleMethods> = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] as LoggerMethod;\n wrappedFuncs[level] = console[level] as LoggerMethod | undefined;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] as LoggerMethod;\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial<Logger> = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (__DEBUG_BUILD__) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args: any[]) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\nexport const logger = makeLogger();\n", "import type { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { logger } from './logger';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!__DEBUG_BUILD__) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray<keyof DsnComponents> = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n", "import type { ConsoleLevel } from './logger';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public logLevel: ConsoleLevel;\n\n public constructor(public message: string, logLevel: ConsoleLevel = 'warn') {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { logger } from './logger';\nimport { truncate } from './string';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacementFactory(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: object, name: string, value: unknown): void {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n __DEBUG_BUILD__ && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func: WrappedFunction): WrappedFunction | undefined {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nexport function convertToPlainObject<V>(value: V):\n | {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n }\n | {\n [ownProps: string]: unknown;\n message: string;\n name: string;\n stack?: string;\n }\n | V {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj: {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n } = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target: unknown): string {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps: { [key: string]: unknown } = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj as Record<string, unknown>)[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record<string, unknown>, maxLength: number = 40): string {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nexport function dropUndefinedKeys<T>(inputValue: T): T {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map<unknown, unknown>();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys<T>(inputValue: T, memoizationMap: Map<unknown, unknown>): T {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: { [key: string]: any } = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue as T;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: unknown[] = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item: unknown) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue as unknown as T;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat as any).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Event, Exception, Mechanism, StackFrame } from '@sentry/types';\n\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n getRandomValues(array: Uint8Array): Uint8Array;\n randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n msCrypto?: CryptoInternal;\n crypto?: CryptoInternal;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = (): number => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => crypto.getRandomValues(new Uint8Array(1))[0];\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial<Mechanism>): void {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(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-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception as any).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nexport function arrayify<T = unknown>(maybeArray: T | T[]): T[] {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n", "import type { StackFrame, StackLineParser, StackParser } from '@sentry/types';\n\nimport type { GetModuleFn } from './node-stack-trace';\nimport { filenameIsInApp, node } from './node-stack-trace';\n\nexport { filenameIsInApp };\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack: string, skipFirst: number = 0): StackFrame[] => {\n const frames: StackFrame[] = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nexport function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: ReadonlyArray<StackFrame>): StackFrame[] {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nexport function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser {\n return [90, node(getModule)];\n}\n", "import { logger } from './logger';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject<Window>();\n\nexport { supportsHistory } from './vendor/supportsHistory';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n", "// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n// Copyright (c) 2010-2016 Google, Inc. http://angularjs.org\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { getGlobalObject } from '../worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject<Window>();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type {\n HandlerDataFetch,\n HandlerDataXhr,\n SentryWrappedXMLHttpRequest,\n SentryXhrData,\n WrappedFunction,\n} from '@sentry/types';\n\nimport { isString } from './is';\nimport type { ConsoleLevel } from './logger';\nimport { CONSOLE_LEVELS, logger, originalConsoleMethods } from './logger';\nimport { uuid4 } from './misc';\nimport { addNonEnumerableProperty, fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nimport { getGlobalObject, GLOBAL_OBJ } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject<Window>();\n\nexport const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v2__';\n\nexport type InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n __DEBUG_BUILD__ && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nexport function resetInstrumentationHandlers(): void {\n Object.keys(handlers).forEach(key => {\n handlers[key as InstrumentHandlerType] = undefined;\n });\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level: ConsoleLevel): void {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod: () => any): Function {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData: HandlerDataFetch = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp<T extends string>(obj: unknown, prop: T): obj is Record<string, string> {\n return !!obj && typeof obj === 'object' && !!(obj as Record<string, string>)[prop];\n}\n\ntype FetchResource = string | { toString(): string } | { url: string };\n\nfunction getUrlFromResource(resource: FetchResource): string {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */\nexport function parseFetchArgs(fetchArgs: unknown[]): { method: string; url: string } {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs as [FetchResource, object];\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg as FetchResource),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\n/** JSDoc */\nexport function instrumentXHR(): void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW as any).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: XMLHttpRequest & SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const startTimestamp = Date.now();\n\n const url = args[1];\n const xhrInfo: SentryXhrData = (this[SENTRY_XHR_DATA_KEY] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {},\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler: () => void = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args as [string, string],\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n } as HandlerDataXhr);\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (this: SentryWrappedXMLHttpRequest, ...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original: WrappedFunction): Function {\n return function (this: SentryWrappedXMLHttpRequest, ...setRequestHeaderArgs: unknown[]): void {\n const [header, value] = setRequestHeaderArgs as [string, string];\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: XMLHttpRequest & SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n if (sentryXhrData && args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEventType: string | undefined;\nlet lastCapturedEventTargetId: string | undefined;\n\ntype SentryWrappedTarget = HTMLElement & { _sentryId?: string };\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event: Event): boolean {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target as SentryWrappedTarget)._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType: string, target: SentryWrappedTarget | null): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\nfunction getEventTarget(event: Event): SentryWrappedTarget | null {\n try {\n return event.target as SentryWrappedTarget | null;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event & { _sentryCaptured?: true }): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nexport function instrumentDOM(): void {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW as any)[target] && (WINDOW as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: (typeof WINDOW)['onerror'] | null = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg: unknown, url: unknown, line: unknown, column: unknown, error: unknown): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nlet _oldOnUnhandledRejectionHandler: (typeof WINDOW)['onunhandledrejection'] | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n", "/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // @ts-expect-error __SENTRY_SDK_SOURCE__ is injected by rollup during build process\n return __SENTRY_SDK_SOURCE__;\n}\n", "/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function dynamicRequire(mod: any, request: string): any {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nexport function loadModule<T>(moduleName: string): T | undefined {\n let mod: T | undefined;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) as T;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n", "import type { Primitive } from '@sentry/types';\n\nimport { isNaN, isSyntheticEvent, isVueViewModel } from './is';\nimport type { MemoFunc } from './memo';\nimport { memoBuilder } from './memo';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n// This is a hack to placate TS, relying on the fact that technically, arrays are objects with integer keys. Normally we\n// think of those keys as actual numbers, but `arr['0']` turns out to work just as well as `arr[0]`, and doing it this\n// way lets us use a single type in the places where behave as if we are only dealing with objects, even if some of them\n// might be arrays.\ntype ObjOrArray<T> = { [key: string]: T };\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nexport function normalizeToSize<T>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized as T;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key: string,\n value: unknown,\n depth: number = +Infinity,\n maxProperties: number = +Infinity,\n memo: MemoFunc = memoBuilder(),\n): Primitive | ObjOrArray<unknown> {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value as Primitive;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value as ObjOrArray<unknown>)['__sentry_skip_normalization__']) {\n return value as ObjOrArray<unknown>;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value as ObjOrArray<unknown>)['__sentry_override_normalization_depth__'] === 'number'\n ? ((value as ObjOrArray<unknown>)['__sentry_override_normalization_depth__'] as number)\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value as unknown & { toJSON?: () => unknown };\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) as ObjOrArray<unknown>;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value as ObjOrArray<unknown>);\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/**\n * @deprecated This export will be removed in v8.\n */\nexport { visit as walk };\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key: unknown,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value: Exclude<unknown, string | number | boolean | null>,\n): string {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value as { _events: unknown })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value: unknown): string {\n const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n", "/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike<void>;\nexport function resolvedSyncPromise<T>(value: T | PromiseLike<T>): PromiseLike<T>;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise<T>(value?: T | PromiseLike<T>): PromiseLike<T> {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise<T = never>(reason?: any): PromiseLike<T> {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise<T> implements PromiseLike<T> {\n private _state: States;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]>;\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike<T> | null) => void, reject: (reason?: any) => void) => void,\n ) {\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,\n ): PromiseLike<TResult1 | TResult2> {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch<TResult = never>(\n onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,\n ): PromiseLike<T | TResult> {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult> {\n return new SyncPromise<TResult>((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike<T> | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike<T> | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike<T>).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n", "import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer<T> {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array<PromiseLike<T>>;\n add(taskProducer: () => PromiseLike<T>): PromiseLike<T>;\n drain(timeout?: number): PromiseLike<boolean>;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer<T>(limit?: number): PromiseBuffer<T> {\n const buffer: Array<PromiseLike<T>> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n function remove(task: PromiseLike<T>): PromiseLike<T> {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike<T>): PromiseLike<T> {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike<boolean> {\n return new SyncPromise<boolean>((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n", "type PartialURL = {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n search?: string;\n hash?: string;\n};\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url: string): PartialURL {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath: string): string {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nexport function getNumberOfUrlSegments(url: string): number {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlString(url: PartialURL): string {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(':80', '')\n .replace(':443', '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n", "/* eslint-disable deprecation/deprecation */\nimport type { Severity, SeverityLevel } from '@sentry/types';\n\n// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nexport const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nexport function severityFromString(level: Severity | SeverityLevel | string): Severity {\n return severityLevelFromString(level) as Severity;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') as SeverityLevel;\n}\n", "import { dynamicRequire, isNodeEnv } from './node';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject<Window>();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\ninterface TimestampSource {\n nowSeconds(): number;\n}\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource: TimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\ninterface Performance {\n /**\n * The millisecond timestamp at which measurement began, measured in Unix time.\n */\n timeOrigin: number;\n /**\n * Returns the current millisecond timestamp, where 0 represents the start of measurement.\n */\n now(): number;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance(): Performance | undefined {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance(): Performance | undefined {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance: Performance | undefined = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource: TimestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport const dateTimestampInSeconds: () => number = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport const timestampInSeconds: () => number = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nexport const timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport const usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexport let _browserPerformanceTimeOriginMode: string;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport const browserPerformanceTimeOrigin = ((): number | undefined => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n", "import type { DynamicSamplingContext } from '@sentry/types';\n\nimport { isString } from './is';\nimport { logger } from './logger';\n\nexport const BAGGAGE_HEADER_NAME = 'baggage';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nexport const MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nexport function baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader: string | string[] | number | null | undefined | boolean,\n): Partial<DynamicSamplingContext> | undefined {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject: Readonly<Record<string, string>> = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce<Record<string, string>>((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject,\n };\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce<Record<string, string>>((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext as Partial<DynamicSamplingContext>;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nexport function dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext?: Partial<DynamicSamplingContext>,\n): string | undefined {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce<Record<string, string>>(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader: string): Record<string, string> {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce<Record<string, string>>((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object: Record<string, string>): string | undefined {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n", "import type { DynamicSamplingContext, PropagationContext, TraceparentData } from '@sentry/types';\n\nimport { baggageHeaderToDynamicSamplingContext } from './baggage';\nimport { uuid4 } from './misc';\n\nexport const TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent?: string): TraceparentData | undefined {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled: boolean | undefined;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n */\nexport function tracingContextFromHeaders(\n sentryTrace: Parameters<typeof extractTraceparentData>[0],\n baggage: Parameters<typeof baggageHeaderToDynamicSamplingContext>[0],\n): {\n traceparentData: ReturnType<typeof extractTraceparentData>;\n dynamicSamplingContext: ReturnType<typeof baggageHeaderToDynamicSamplingContext>;\n propagationContext: PropagationContext;\n} {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n const propagationContext: PropagationContext = {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n };\n\n if (parentSpanId) {\n propagationContext.parentSpanId = parentSpanId;\n }\n\n if (dynamicSamplingContext) {\n propagationContext.dsc = dynamicSamplingContext as DynamicSamplingContext;\n }\n\n return {\n traceparentData,\n dynamicSamplingContext,\n propagationContext,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nexport function generateSentryTraceHeader(\n traceId: string = uuid4(),\n spanId: string = uuid4().substring(16),\n sampled?: boolean,\n): string {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n", "import type {\n Attachment,\n AttachmentItem,\n BaseEnvelopeHeaders,\n BaseEnvelopeItemHeaders,\n DataCategory,\n DsnComponents,\n Envelope,\n EnvelopeItemType,\n Event,\n EventEnvelopeHeaders,\n SdkInfo,\n SdkMetadata,\n TextEncoderInternal,\n} from '@sentry/types';\n\nimport { dsnToString } from './dsn';\nimport { normalize } from './normalize';\nimport { dropUndefinedKeys } from './object';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope<E extends Envelope>(headers: E[0], items: E[1] = []): E {\n return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] as unknown as E;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nexport function forEachEnvelopeItem<E extends Envelope>(\n envelope: Envelope,\n callback: (envelopeItem: E[1][number], envelopeItemType: E[1][number][0]['type']) => boolean | void,\n): boolean {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nexport function envelopeContainsItemType(envelope: Envelope, types: EnvelopeItemType[]): boolean {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input: string, textEncoder?: TextEncoderInternal): Uint8Array {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nexport function serializeEnvelope(envelope: Envelope, textEncoder?: TextEncoderInternal): string | Uint8Array {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts: string | Uint8Array[] = JSON.stringify(envHeaders);\n\n function append(next: string | Uint8Array): void {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload: string;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers: Uint8Array[]): Uint8Array {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\nexport interface TextDecoderInternal {\n decode(input?: Uint8Array): string;\n}\n\n/**\n * Parses an envelope\n */\nexport function parseEnvelope(\n env: string | Uint8Array,\n textEncoder: TextEncoderInternal,\n textDecoder: TextDecoderInternal,\n): Envelope {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length: number): Uint8Array {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson<T>(): T {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) as T;\n }\n\n const envelopeHeader = readJson<BaseEnvelopeHeaders>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items: [any, any][] = [];\n\n while (buffer.length) {\n const itemHeader = readJson<BaseEnvelopeItemHeaders>();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nexport function createAttachmentEnvelopeItem(\n attachment: Attachment,\n textEncoder?: TextEncoderInternal,\n): AttachmentItem {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP: Record<EnvelopeItemType, DataCategory> = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nexport function envelopeItemTypeToDataCategory(type: EnvelopeItemType): DataCategory {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nexport function getSdkMetadataForEnvelopeHeader(metadataOrEvent?: SdkMetadata | Event): SdkInfo | undefined {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nexport function createEventEnvelopeHeaders(\n event: Event,\n sdkInfo: SdkInfo | undefined,\n tunnel: string | undefined,\n dsn?: DsnComponents,\n): EventEnvelopeHeaders {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id as string,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n", "import type { ClientReport, ClientReportEnvelope, ClientReportItem } from '@sentry/types';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope<ClientReportEnvelope>(dsn ? { dsn } : {}, [clientReportItem]);\n}\n", "import type { TransportMakeRequestResponse } from '@sentry/types';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record<string, number>;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = Date.now()): number {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, category: string): number {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, category: string, now: number = Date.now()): boolean {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n limits: RateLimits,\n { statusCode, headers }: TransportMakeRequestResponse,\n now: number = Date.now(),\n): RateLimits {\n const updatedRateLimits: RateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n * <header>,<header>,..\n * where each <header> is of the form\n * <retry_after>: <categories>: <scope>: <reason_code>\n * where\n * <retry_after> is a delay in seconds\n * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * <category>;<category>;...\n * <scope> is what's being limited (org, project, or key) - ignored by SDK\n * <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n", "import type {\n Event,\n EventHint,\n Exception,\n Hub,\n Mechanism,\n Severity,\n SeverityLevel,\n StackFrame,\n StackParser,\n} from '@sentry/types';\n\nimport { isError, isPlainObject } from './is';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc';\nimport { normalizeToSize } from './normalize';\nimport { extractExceptionKeysForMessage } from './object';\n\n/**\n * Extracts stack frames from the error.stack string\n */\nexport function parseStackFrames(stackParser: StackParser, error: Error): StackFrame[] {\n return stackParser(error.stack || '', 1);\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nexport function exceptionFromError(stackParser: StackParser, error: Error): Exception {\n const exception: Exception = {\n type: error.name || error.constructor.name,\n value: error.message,\n };\n\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n return exception;\n}\n\nfunction getMessageForObject(exception: object): string {\n if ('name' in exception && typeof exception.name === 'string') {\n let message = `'${exception.name}' captured as exception`;\n\n if ('message' in exception && typeof exception.message === 'string') {\n message += ` with message '${exception.message}'`;\n }\n\n return message;\n } else if ('message' in exception && typeof exception.message === 'string') {\n return exception.message;\n } else {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n return `Object captured as exception with keys: ${extractExceptionKeysForMessage(\n exception as Record<string, unknown>,\n )}`;\n }\n}\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromUnknownInput(\n getCurrentHub: () => Hub,\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n): Event {\n let ex: unknown = exception;\n const providedMechanism: Mechanism | undefined =\n hint && hint.data && (hint.data as { mechanism: Mechanism }).mechanism;\n const mechanism: Mechanism = providedMechanism || {\n handled: true,\n type: 'generic',\n };\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n hub.configureScope(scope => {\n scope.setExtra('__serialized__', normalizeToSize(exception, normalizeDepth));\n });\n\n const message = getMessageForObject(exception);\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex as Error).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception as string);\n (ex as Error).message = exception as string;\n }\n mechanism.synthetic = true;\n }\n\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex as Error)],\n },\n };\n\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n\n return {\n ...event,\n event_id: hint && hint.event_id,\n };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {\n event_id: hint && hint.event_id,\n level,\n message,\n };\n\n if (attachStacktrace && hint && hint.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames },\n },\n ],\n };\n }\n }\n\n return event;\n}\n", "export const DEFAULT_ENVIRONMENT = 'production';\n", "import type { Event, EventHint, EventProcessor } from '@sentry/types';\nimport { getGlobalSingleton, isThenable, logger, SyncPromise } from '@sentry/utils';\n\n/**\n * Returns the global event processors.\n */\nexport function getGlobalEventProcessors(): EventProcessor[] {\n return getGlobalSingleton<EventProcessor[]>('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint: EventHint,\n index: number = 0,\n): PromiseLike<Event | null> {\n return new SyncPromise<Event | null>((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n\n __DEBUG_BUILD__ &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n", "import type { SerializedSession, Session, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit<SessionContext, 'started' | 'status'>): Session {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session: Session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n", "/* eslint-disable max-lines */\nimport type {\n Attachment,\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n PropagationContext,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Session,\n Severity,\n SeverityLevel,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { arrayify, dateTimestampInSeconds, isPlainObject, uuid4 } from '@sentry/utils';\n\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors';\nimport { updateSession } from './session';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void>;\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[];\n\n /** User */\n protected _user: User;\n\n /** Tags */\n protected _tags: { [key: string]: Primitive };\n\n /** Extra */\n protected _extra: Extras;\n\n /** Contexts */\n protected _contexts: Contexts;\n\n /** Attachments */\n protected _attachments: Attachment[];\n\n /** Propagation Context for distributed tracing */\n protected _propagationContext: PropagationContext;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata: { [key: string]: unknown };\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n protected _level?: Severity | SeverityLevel;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n public constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel,\n ): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as <T>(scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getLastBreadcrumb(): Breadcrumb | undefined {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addAttachment(attachment: Attachment): this {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getAttachments(): Attachment[] {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n public clearAttachments(): this {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n public applyToEvent(\n event: Event,\n hint: EventHint = {},\n additionalEventProcessors?: EventProcessor[],\n ): PromiseLike<Event | null> {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [...(event.breadcrumbs || []), ...scopeBreadcrumbs];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n return notifyEventProcessors(\n [...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],\n event,\n hint,\n );\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n public setSDKProcessingMetadata(newData: { [key: string]: unknown }): this {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setPropagationContext(context: PropagationContext): this {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getPropagationContext(): PropagationContext {\n return this._propagationContext;\n }\n\n /**\n * Get the breadcrumbs for this scope.\n */\n protected _getBreadcrumbs(): Breadcrumb[] {\n return this._breadcrumbs;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\nfunction generatePropagationContext(): PropagationContext {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n", "/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n Session,\n SessionContext,\n Severity,\n SeverityLevel,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalSingleton, GLOBAL_OBJ, logger, uuid4 } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from './constants';\nimport { Scope } from './scope';\nimport { closeSession, makeSession, updateSession } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\nexport interface RunWithAsyncContextOptions {\n /** Whether to reuse an existing async context if one exists. Defaults to false. */\n reuseExisting?: boolean;\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Strategy used to track async context.\n */\nexport interface AsyncContextStrategy {\n /**\n * Gets the current async context. Returns undefined if there is no current async context.\n */\n getCurrentHub: () => Hub | undefined;\n /**\n * Runs the supplied callback in its own async context.\n */\n runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions): T;\n}\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n acs?: AsyncContextStrategy;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient<C extends Client>(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint): string {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n ): string {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n const result = this._callExtensionMethod<Transaction>('startTransaction', context, customSamplingContext);\n\n if (__DEBUG_BUILD__ && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n public shouldSendDefaultPii(): boolean {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _withClient(callback: (client: Client, scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod<T>(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n __DEBUG_BUILD__ && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry: Carrier = getMainCarrier()): Hub {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nexport function ensureHubOnCarrier(carrier: Carrier, parent: Hub = getGlobalHub()): void {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nexport function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefined): void {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nexport function runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions = {}): T {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n return getGlobalSingleton<Hub>('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n", "import type { Transaction } from '@sentry/types';\n\nimport type { Hub } from '../hub';\nimport { getCurrentHub } from '../hub';\n\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * TODO(v7): Reorganize these exports\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n */\nexport { TRACEPARENT_REGEXP, extractTraceparentData } from '@sentry/utils';\n\n/** Grabs active transaction off scope, if any */\nexport function getActiveTransaction<T extends Transaction>(maybeHub?: Hub): T | undefined {\n const hub = maybeHub || getCurrentHub();\n const scope = hub.getScope();\n return scope.getTransaction() as T | undefined;\n}\n\n// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\n", "import { addInstrumentationHandler, logger } from '@sentry/utils';\n\nimport type { SpanStatusType } from './span';\nimport { getActiveTransaction } from './utils';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nexport function registerErrorInstrumentation(): void {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback(): void {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status: SpanStatusType = 'internal_error';\n __DEBUG_BUILD__ && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n", "/* eslint-disable max-lines */\nimport type {\n Instrumenter,\n Primitive,\n Span as SpanInterface,\n SpanContext,\n SpanOrigin,\n TraceContext,\n Transaction,\n} from '@sentry/types';\nimport { dropUndefinedKeys, generateSentryTraceHeader, logger, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nexport class SpanRecorder {\n public spans: Span[];\n\n private readonly _maxlen: number;\n\n public constructor(maxlen: number = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n public add(span: Span): void {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nexport class Span implements SpanInterface {\n /**\n * @inheritDoc\n */\n public traceId: string;\n\n /**\n * @inheritDoc\n */\n public spanId: string;\n\n /**\n * @inheritDoc\n */\n public parentSpanId?: string;\n\n /**\n * Internal keeper of the status\n */\n public status?: SpanStatusType | string;\n\n /**\n * @inheritDoc\n */\n public sampled?: boolean;\n\n /**\n * Timestamp in seconds when the span was created.\n */\n public startTimestamp: number;\n\n /**\n * Timestamp in seconds when the span ended.\n */\n public endTimestamp?: number;\n\n /**\n * @inheritDoc\n */\n public op?: string;\n\n /**\n * @inheritDoc\n */\n public description?: string;\n\n /**\n * @inheritDoc\n */\n public tags: { [key: string]: Primitive };\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public data: { [key: string]: any };\n\n /**\n * List of spans that were finalized\n */\n public spanRecorder?: SpanRecorder;\n\n /**\n * @inheritDoc\n */\n public transaction?: Transaction;\n\n /**\n * The instrumenter that created this span.\n */\n public instrumenter: Instrumenter;\n\n /**\n * The origin of the span, giving context about what created the span.\n */\n public origin?: SpanOrigin;\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n public constructor(spanContext: SpanContext = {}) {\n this.traceId = spanContext.traceId || uuid4();\n this.spanId = spanContext.spanId || uuid4().substring(16);\n this.startTimestamp = spanContext.startTimestamp || timestampInSeconds();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this.origin = spanContext.origin || 'manual';\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.name) {\n this.description = spanContext.name;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n\n /** An alias for `description` of the Span. */\n public get name(): string {\n return this.description || '';\n }\n /** Update the name of the span. */\n public set name(name: string) {\n this.setName(name);\n }\n\n /**\n * @inheritDoc\n */\n public startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId,\n });\n\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n\n if (__DEBUG_BUILD__ && childSpan.transaction) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = childSpan.transaction.name || '< unknown name >';\n const idStr = childSpan.transaction.spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage };\n logger.log(logMessage);\n }\n\n return childSpan;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public setData(key: string, value: any): this {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setStatus(value: SpanStatusType): this {\n this.status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setHttpStatus(httpStatus: number): this {\n this.setTag('http.status_code', String(httpStatus));\n this.setData('http.response.status_code', httpStatus);\n const spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setName(name: string): void {\n this.description = name;\n }\n\n /**\n * @inheritDoc\n */\n public isSuccess(): boolean {\n return this.status === 'ok';\n }\n\n /**\n * @inheritDoc\n */\n public finish(endTimestamp?: number): void {\n if (\n __DEBUG_BUILD__ &&\n // Don't call this for transactions\n this.transaction &&\n this.transaction.spanId !== this.spanId\n ) {\n const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) {\n logger.log((logMessage as string).replace('Starting', 'Finishing'));\n }\n }\n\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n }\n\n /**\n * @inheritDoc\n */\n public toTraceparent(): string {\n return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled);\n }\n\n /**\n * @inheritDoc\n */\n public toContext(): SpanContext {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n public updateWithContext(spanContext: SpanContext): this {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getTraceContext(): TraceContext {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n public toJSON(): {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: Primitive };\n timestamp?: number;\n trace_id: string;\n origin?: SpanOrigin;\n } {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n}\n\nexport type SpanStatusType =\n /** The operation completed successfully. */\n | 'ok'\n /** Deadline expired before operation could complete. */\n | 'deadline_exceeded'\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n | 'unauthenticated'\n /** 403 Forbidden */\n | 'permission_denied'\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n | 'not_found'\n /** 429 Too Many Requests */\n | 'resource_exhausted'\n /** Client specified an invalid argument. 4xx. */\n | 'invalid_argument'\n /** 501 Not Implemented */\n | 'unimplemented'\n /** 503 Service Unavailable */\n | 'unavailable'\n /** Other/generic 5xx. */\n | 'internal_error'\n /** Unknown. Any non-standard HTTP status code. */\n | 'unknown_error'\n /** The operation was cancelled (typically by the user). */\n | 'cancelled'\n /** Already exists (409) */\n | 'already_exists'\n /** Operation was rejected because the system is not in a state required for the operation's */\n | 'failed_precondition'\n /** The operation was aborted, typically due to a concurrency issue. */\n | 'aborted'\n /** Operation was attempted past the valid range. */\n | 'out_of_range'\n /** Unrecoverable data loss or corruption */\n | 'data_loss';\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nexport function spanStatusfromHttpCode(httpStatus: number): SpanStatusType {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n", "import type { Client, DynamicSamplingContext, Scope } from '@sentry/types';\nimport { dropUndefinedKeys } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */\nexport function getDynamicSamplingContextFromClient(\n trace_id: string,\n client: Client,\n scope?: Scope,\n): DynamicSamplingContext {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) as DynamicSamplingContext;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n", "import type {\n Context,\n Contexts,\n DynamicSamplingContext,\n Measurements,\n MeasurementUnit,\n Transaction as TransactionInterface,\n TransactionContext,\n TransactionEvent,\n TransactionMetadata,\n} from '@sentry/types';\nimport { dropUndefinedKeys, logger } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport { getCurrentHub } from '../hub';\nimport { getDynamicSamplingContextFromClient } from './dynamicSamplingContext';\nimport { Span as SpanClass, SpanRecorder } from './span';\n\n/** JSDoc */\nexport class Transaction extends SpanClass implements TransactionInterface {\n public metadata: TransactionMetadata;\n\n /**\n * The reference to the current hub.\n */\n public _hub: Hub;\n\n private _name: string;\n\n private _measurements: Measurements;\n\n private _contexts: Contexts;\n\n private _trimEnd?: boolean;\n\n private _frozenDynamicSamplingContext: Readonly<Partial<DynamicSamplingContext>> | undefined;\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n public constructor(transactionContext: TransactionContext, hub?: Hub) {\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n\n this._measurements = {};\n this._contexts = {};\n\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this.metadata = {\n source: 'custom',\n ...transactionContext.metadata,\n spanMetadata: {},\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n /** Getter for `name` property */\n public get name(): string {\n return this._name;\n }\n\n /** Setter for `name` property, which also sets `source` as custom */\n public set name(newName: string) {\n this.setName(newName);\n }\n\n /**\n * JSDoc\n */\n public setName(name: string, source: TransactionMetadata['source'] = 'custom'): void {\n this._name = name;\n this.metadata.source = source;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n public initSpanRecorder(maxlen: number = 1000): void {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): void {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setMeasurement(name: string, value: number, unit: MeasurementUnit = ''): void {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * @inheritDoc\n */\n public setMetadata(newMetadata: Partial<TransactionMetadata>): void {\n this.metadata = { ...this.metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n public finish(endTimestamp?: number): string | undefined {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) {\n return undefined;\n }\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n public toContext(): TransactionContext {\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n public updateWithContext(transactionContext: TransactionContext): this {\n super.updateWithContext(transactionContext);\n\n this.name = transactionContext.name || '';\n\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n */\n public getDynamicSamplingContext(): Readonly<Partial<DynamicSamplingContext>> {\n if (this._frozenDynamicSamplingContext) {\n return this._frozenDynamicSamplingContext;\n }\n\n const hub = this._hub || getCurrentHub();\n const client = hub.getClient();\n\n if (!client) return {};\n\n const scope = hub.getScope();\n const dsc = getDynamicSamplingContextFromClient(this.traceId, client, scope);\n\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== 'url') {\n dsc.transaction = this.name;\n }\n\n if (this.sampled !== undefined) {\n dsc.sampled = String(this.sampled);\n }\n\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n\n return dsc;\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n public setHub(hub: Hub): void {\n this._hub = hub;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n protected _finishTransaction(endTimestamp?: number): TransactionEvent | undefined {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n __DEBUG_BUILD__ && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n this.name = '<unlabeled transaction>';\n }\n\n // just sets the end timestamp\n super.finish(endTimestamp);\n\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n __DEBUG_BUILD__ && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce((prev: SpanClass, current: SpanClass) => {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n\n const metadata = this.metadata;\n\n const transaction: TransactionEvent = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext(),\n },\n ...(metadata.source && {\n transaction_info: {\n source: metadata.source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n __DEBUG_BUILD__ &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n\n return transaction;\n }\n}\n", "/* eslint-disable max-lines */\nimport type { TransactionContext } from '@sentry/types';\nimport { logger, timestampInSeconds } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport type { Span } from './span';\nimport { SpanRecorder } from './span';\nimport { Transaction } from './transaction';\n\nexport const TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nexport class IdleTransactionSpanRecorder extends SpanRecorder {\n public constructor(\n private readonly _pushActivity: (id: string) => void,\n private readonly _popActivity: (id: string) => void,\n public transactionSpanId: string,\n maxlen?: number,\n ) {\n super(maxlen);\n }\n\n /**\n * @inheritDoc\n */\n public add(span: Span): void {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp?: number) => {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n this._popActivity(span.spanId);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n super.add(span);\n }\n}\n\nexport type BeforeFinishCallback = (transactionSpan: IdleTransaction, endTimestamp: number) => void;\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nexport class IdleTransaction extends Transaction {\n // Activities store a list of active spans\n public activities: Record<string, boolean>;\n // Track state of activities in previous heartbeat\n private _prevHeartbeatString: string | undefined;\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n private _heartbeatCounter: number;\n\n // We should not use heartbeat if we finished a transaction\n private _finished: boolean;\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n private _idleTimeoutCanceledPermanently: boolean;\n\n private readonly _beforeFinishCallbacks: BeforeFinishCallback[];\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n private _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;\n\n private _finishReason: (typeof IDLE_TRANSACTION_FINISH_REASONS)[number];\n\n public constructor(\n transactionContext: TransactionContext,\n private readonly _idleHub: Hub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n private readonly _idleTimeout: number = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n private readonly _finalTimeout: number = TRACING_DEFAULTS.finalTimeout,\n private readonly _heartbeatInterval: number = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n private readonly _onScope: boolean = false,\n ) {\n super(transactionContext, _idleHub);\n\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n __DEBUG_BUILD__ && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope(scope => scope.setSpan(this));\n }\n\n this._restartIdleTimeout();\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n public finish(endTimestamp: number = timestampInSeconds()): string | undefined {\n this._finished = true;\n this.activities = {};\n\n if (this.op === 'ui.action.click') {\n this.setTag(FINISH_REASON_TAG, this._finishReason);\n }\n\n if (this.spanRecorder) {\n __DEBUG_BUILD__ &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestamp);\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span: Span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n __DEBUG_BUILD__ &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n\n if (__DEBUG_BUILD__) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n __DEBUG_BUILD__ && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n __DEBUG_BUILD__ && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) {\n scope.setSpan(undefined);\n }\n }\n\n return super.finish(endTimestamp);\n }\n\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n public registerBeforeFinishCallback(callback: BeforeFinishCallback): void {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public initSpanRecorder(maxlen?: number): void {\n if (!this.spanRecorder) {\n const pushActivity = (id: string): void => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id: string): void => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n __DEBUG_BUILD__ && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n public cancelIdleTimeout(\n endTimestamp?: Parameters<IdleTransaction['finish']>[0],\n {\n restartOnChildSpanChange,\n }: {\n restartOnChildSpanChange?: boolean;\n } = {\n restartOnChildSpanChange: true,\n },\n ): void {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n public setFinishReason(reason: string): void {\n this._finishReason = reason;\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n private _restartIdleTimeout(endTimestamp?: Parameters<IdleTransaction['finish']>[0]): void {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n private _pushActivity(spanId: string): void {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n __DEBUG_BUILD__ && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n __DEBUG_BUILD__ && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n private _popActivity(spanId: string): void {\n if (this.activities[spanId]) {\n __DEBUG_BUILD__ && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n __DEBUG_BUILD__ && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n private _beat(): void {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n __DEBUG_BUILD__ && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n private _pingHeartbeat(): void {\n __DEBUG_BUILD__ && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n", "import type { Options } from '@sentry/types';\n\nimport { getCurrentHub } from '../hub';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(\n maybeOptions?: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'> | undefined,\n): boolean {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n", "import type { Options, SamplingContext } from '@sentry/types';\nimport { isNaN, logger } from '@sentry/utils';\n\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled';\nimport type { Transaction } from './transaction';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nexport function sampleTransaction<T extends Transaction>(\n transaction: T,\n options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>,\n samplingContext: SamplingContext,\n): T {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled),\n });\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate,\n });\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n __DEBUG_BUILD__ && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < (sampleRate as number | boolean);\n\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate: unknown): boolean {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n", "import type { ClientOptions, CustomSamplingContext, TransactionContext } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport { getMainCarrier } from '../hub';\nimport { registerErrorInstrumentation } from './errors';\nimport { IdleTransaction } from './idletransaction';\nimport { sampleTransaction } from './sampling';\nimport { Transaction } from './transaction';\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders(this: Hub): { [key: string]: string } {\n const scope = this.getScope();\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': span.toTraceparent(),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): Transaction {\n const client = this.getClient();\n const options: Partial<ClientOptions> = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n __DEBUG_BUILD__ &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n transactionContext.sampled = false;\n }\n\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans as number));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nexport function startIdleTransaction(\n hub: Hub,\n transactionContext: TransactionContext,\n idleTimeout: number,\n finalTimeout: number,\n onScope?: boolean,\n customSamplingContext?: CustomSamplingContext,\n heartbeatInterval?: number,\n): IdleTransaction {\n const client = hub.getClient();\n const options: Partial<ClientOptions> = (client && client.getOptions()) || {};\n\n let transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans as number));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nexport function addTracingExtensions(): void {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n", "import type {\n Breadcrumb,\n CaptureContext,\n CheckIn,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n FinishedCheckIn,\n MonitorConfig,\n Primitive,\n Severity,\n SeverityLevel,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { isThenable, logger, timestampInSeconds, uuid4 } from '@sentry/utils';\n\nimport type { Hub } from './hub';\nimport { getCurrentHub } from './hub';\nimport type { Scope } from './scope';\n\n// Note: All functions in this file are typed with a return value of `ReturnType<Hub[HUB_FUNCTION]>`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception: any, captureContext?: CaptureContext): ReturnType<Hub['captureException']> {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n captureContext?: CaptureContext | Severity | SeverityLevel,\n): ReturnType<Hub['captureMessage']> {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event, hint?: EventHint): ReturnType<Hub['captureEvent']> {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): ReturnType<Hub['configureScope']> {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): ReturnType<Hub['addBreadcrumb']> {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name: string, context: { [key: string]: any } | null): ReturnType<Hub['setContext']> {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): ReturnType<Hub['setExtras']> {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): ReturnType<Hub['setExtra']> {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): ReturnType<Hub['setTags']> {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): ReturnType<Hub['setTag']> {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): ReturnType<Hub['setUser']> {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): ReturnType<Hub['withScope']> {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(\n context: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): ReturnType<Hub['startTransaction']> {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n __DEBUG_BUILD__ && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n __DEBUG_BUILD__ && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function withMonitor<T>(\n monitorSlug: CheckIn['monitorSlug'],\n callback: () => T,\n upsertMonitorConfig?: MonitorConfig,\n): T {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status: FinishedCheckIn['status']): void {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise<boolean> {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise<boolean> {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n", "import type { ClientOptions, DsnComponents, DsnLike, SdkInfo } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(\n dsn: DsnComponents,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions: string | ClientOptions = {} as ClientOptions,\n): string {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n", "import type {\n DsnComponents,\n Event,\n EventEnvelope,\n EventItem,\n SdkInfo,\n SdkMetadata,\n Session,\n SessionAggregates,\n SessionEnvelope,\n SessionItem,\n} from '@sentry/types';\nimport {\n createEnvelope,\n createEventEnvelopeHeaders,\n dsnToString,\n getSdkMetadataForEnvelopeHeader,\n} from '@sentry/utils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n session: Session | SessionAggregates,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): SessionEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem: SessionItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope<SessionEnvelope>(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n event: Event,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): EventEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem: EventItem = [{ type: eventType }, event];\n return createEnvelope<EventEnvelope>(envelopeHeaders, [eventItem]);\n}\n", "import type { Client, Event, EventHint, Integration, Options } from '@sentry/types';\nimport { arrayify, logger } from '@sentry/utils';\n\nimport { addGlobalEventProcessor } from './eventProcessors';\nimport { getCurrentHub } from './hub';\n\ndeclare module '@sentry/types' {\n interface Integration {\n isDefaultInstance?: boolean;\n }\n}\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n};\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n const integrationsByName: { [key: string]: Integration } = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations: Integration[];\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {\n const integrationIndex: IntegrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nexport function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) as typeof integration.preprocessEvent;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) as typeof integration.processEvent;\n\n const processor = Object.assign((event: Event, hint: EventHint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n __DEBUG_BUILD__ && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nexport function addIntegration(integration: Integration): void {\n const client = getCurrentHub().getClient();\n\n if (!client || !client.addIntegration) {\n __DEBUG_BUILD__ && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex<T>(arr: T[], callback: (item: T) => boolean): number {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n", "import type { Client, ClientOptions, Event, EventHint, StackFrame, StackParser } from '@sentry/types';\nimport { dateTimestampInSeconds, GLOBAL_OBJ, normalize, resolvedSyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors';\nimport { Scope } from '../scope';\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nexport function prepareEvent(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n scope?: Scope,\n client?: Client,\n): PromiseLike<Event | null> {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = options;\n const prepared: Event = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise<Event | null>(prepared);\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else {\n // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event: Event, options: ClientOptions): void {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap<StackParser, Map<string, StackFrame[]>>();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nexport function applyDebugIds(event: Event, stackParser: StackParser): void {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache: Map<string, StackFrame[]>;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map<string, StackFrame[]>();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce<Record<string, string>>((acc, debugIdStackTrace) => {\n let parsedStack: StackFrame[];\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event!.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nexport function applyDebugMeta(event: Event): void {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap: Record<string, string> = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event: Event, integrationNames: string[]): void {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event: Event | null, depth: number, maxBreadth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized: Event = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) {\n span.data = normalize(span.data, depth, maxBreadth);\n }\n return span;\n });\n }\n\n return normalized;\n}\n", "/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n DynamicSamplingContext,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n EventProcessor,\n Integration,\n IntegrationClass,\n Outcome,\n PropagationContext,\n SdkMetadata,\n Session,\n SessionAggregates,\n Severity,\n SeverityLevel,\n Transaction,\n TransactionEvent,\n Transport,\n TransportMakeRequestResponse,\n} from '@sentry/types';\nimport {\n addItemToEnvelope,\n checkOrSetAlreadyCaught,\n createAttachmentEnvelopeItem,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext';\nimport { prepareEvent } from './utils/prepareEvent';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient<O extends ClientOptions> implements Client<O> {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex;\n\n /** Indicates whether this client's integrations have been set up. */\n protected _integrationsInitialized: boolean;\n\n /** Number of calls being processed */\n protected _numProcessing: number;\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number };\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n private _hooks: Record<string, Function[]>;\n\n private _eventProcessors: EventProcessor[];\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n __DEBUG_BUILD__ && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n scope?: Scope,\n ): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!(typeof session.release === 'string')) {\n __DEBUG_BUILD__ && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike<boolean> {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike<boolean> {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /** Get all installed event processors. */\n public getEventProcessors(): EventProcessor[] {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n public addEventProcessor(eventProcessor: EventProcessor): void {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(forceInitialize?: boolean): void {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n public getIntegrationById(integrationId: string): Integration | undefined {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n void this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, _event?: Event): void {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n __DEBUG_BUILD__ && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n public on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(\n hook: 'afterSendEvent',\n callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void,\n ): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void): void;\n\n /** @inheritdoc */\n public on(hook: string, callback: unknown): void {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n public emit(hook: 'startTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'finishTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeEnvelope', envelope: Envelope): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;\n\n /** @inheritdoc */\n public emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: { drop: boolean }): void;\n\n /** @inheritdoc */\n public emit(hook: string, ...rest: unknown[]): void {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike<boolean> {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event | null> {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext as PropagationContext;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike<string | undefined> {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (__DEBUG_BUILD__) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason as SentryError;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event> {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory: DataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process<T>(promise: PromiseLike<T>): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): PromiseLike<void | TransportMakeRequestResponse> | void {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n __DEBUG_BUILD__ && logger.error('Error while sending event:', reason);\n });\n } else {\n __DEBUG_BUILD__ && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event>;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: string,\n // eslint-disable-next-line deprecation/deprecation\n _level?: Severity | SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike<Event>;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike<Event | null> | Event | null,\n beforeSendLabel: string,\n): PromiseLike<Event | null> | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike<Event | null> | Event | null {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n", "import type { Client, ClientOptions } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass<F extends Client, O extends ClientOptions> = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind<F extends Client, O extends ClientOptions>(\n clientClass: ClientClass<F, O>,\n options: O,\n): void {\n if (options.debug === true) {\n if (__DEBUG_BUILD__) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n", "import type {\n Envelope,\n EnvelopeItem,\n EnvelopeItemType,\n Event,\n EventDropReason,\n EventItem,\n InternalBaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequestExecutor,\n} from '@sentry/types';\nimport type { PromiseBuffer, RateLimits } from '@sentry/utils';\nimport {\n createEnvelope,\n envelopeItemTypeToDataCategory,\n forEachEnvelopeItem,\n isRateLimited,\n logger,\n makePromiseBuffer,\n resolvedSyncPromise,\n SentryError,\n serializeEnvelope,\n updateRateLimits,\n} from '@sentry/utils';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n options: InternalBaseTransportOptions,\n makeRequest: TransportRequestExecutor,\n buffer: PromiseBuffer<void | TransportMakeRequestResponse> = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n): Transport {\n let rateLimits: RateLimits = {};\n const flush = (timeout?: number): PromiseLike<boolean> => buffer.drain(timeout);\n\n function send(envelope: Envelope): PromiseLike<void | TransportMakeRequestResponse> {\n const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as any);\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason: EventDropReason): void => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = (): PromiseLike<void | TransportMakeRequestResponse> =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n __DEBUG_BUILD__ && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n __DEBUG_BUILD__ && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item: Envelope[1][number], type: EnvelopeItemType): Event | undefined {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item as EventItem)[1] : undefined;\n}\n", "export const SDK_VERSION = '7.77.0';\n", "export { FunctionToString } from './functiontostring.js';\nexport { InboundFilters } from './inboundfilters.js';\nexport { LinkedErrors } from './linkederrors.js';\n//# sourceMappingURL=index.js.map\n", "import type { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n public constructor() {\n this.name = FunctionToString.id;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n }\n}\n", "import type { Client, Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, logger, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\nexport interface InboundFiltersOptions {\n allowUrls: Array<string | RegExp>;\n denyUrls: Array<string | RegExp>;\n ignoreErrors: Array<string | RegExp>;\n ignoreTransactions: Array<string | RegExp>;\n ignoreInternal: boolean;\n disableErrorDefaults: boolean;\n disableTransactionDefaults: boolean;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private readonly _options: Partial<InboundFiltersOptions>;\n\n public constructor(options: Partial<InboundFiltersOptions> = {}) {\n this.name = InboundFilters.id;\n this._options = options;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void {\n // noop\n }\n\n /** @inheritDoc */\n public processEvent(event: Event, _eventHint: EventHint, client: Client): Event | null {\n const clientOptions = client.getOptions();\n const options = _mergeOptions(this._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n}\n\n/** JSDoc */\nexport function _mergeOptions(\n internalOptions: Partial<InboundFiltersOptions> = {},\n clientOptions: Partial<InboundFiltersOptions> = {},\n): Partial<InboundFiltersOptions> {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(event: Event, options: Partial<InboundFiltersOptions>): boolean {\n if (options.ignoreInternal && _isSentryError(event)) {\n __DEBUG_BUILD__ &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array<string | RegExp>): boolean {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event: Event, ignoreTransactions?: Array<string | RegExp>): boolean {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array<string | RegExp>): boolean {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array<string | RegExp>): boolean {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event: Event): string[] {\n const possibleMessages: string[] = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if (__DEBUG_BUILD__ && possibleMessages.length === 0) {\n logger.error(`Could not extract message for event ${getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event: Event): boolean {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n", "import type { Client, Event, EventHint, Integration } from '@sentry/types';\nimport { applyAggregateErrorsToEvent, exceptionFromError } from '@sentry/utils';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n this.name = LinkedErrors.id;\n }\n\n /** @inheritdoc */\n public setupOnce(): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public preprocessEvent(event: Event, hint: EventHint | undefined, client: Client): void {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n}\n", "import { captureException, withScope } from '@sentry/core';\nimport type { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getOriginalFunction,\n GLOBAL_OBJ,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped: WrappedFunction = function (this: unknown): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(this: void): void;\n}\n", "import { getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Exception, Severity, SeverityLevel, StackFrame, StackParser } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n extractExceptionKeysForMessage,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n normalizeToSize,\n resolvedSyncPromise,\n} from '@sentry/utils';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception: Exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n stackParser: StackParser,\n exception: Record<string, unknown>,\n syntheticException?: Error,\n isUnhandledRejection?: boolean,\n): Event {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n },\n };\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n (event.exception as { values: Exception[] }).values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromError(stackParser: StackParser, ex: Error): Event {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nexport function parseStackFrames(\n stackParser: StackParser,\n ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const popSize = getPopSize(ex);\n\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\nfunction getPopSize(ex: Error & { framesToPop?: number }): number {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n\n return 0;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: Error & { message: { error?: Error } }): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n stackParser: StackParser,\n exception: unknown,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n isUnhandledRejection?: boolean,\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n return eventFromError(stackParser, errorEvent.error as Error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromError(stackParser, exception as Error);\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception as Record<string, unknown>;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n stackParser: StackParser,\n input: string,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: input, stacktrace: { frames } }],\n };\n }\n }\n\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception: Record<string, unknown>,\n { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n try {\n const prototype: Prototype | null = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n", "import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/types';\nimport { createEnvelope, dsnToString } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n feedback: UserFeedback,\n {\n metadata,\n tunnel,\n dsn,\n }: {\n metadata: SdkMetadata | undefined;\n tunnel: string | undefined;\n dsn: DsnComponents | undefined;\n },\n): EventEnvelope {\n const headers: EventEnvelope[0] = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n const feedbackHeaders: UserFeedbackItem[0] = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n", "import type { Scope } from '@sentry/core';\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport type {\n BrowserClientProfilingOptions,\n BrowserClientReplayOptions,\n ClientOptions,\n Event,\n EventHint,\n Options,\n Severity,\n SeverityLevel,\n UserFeedback,\n} from '@sentry/types';\nimport { createClientReportEnvelope, dsnToString, getSDKSource, logger } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\nimport { createUserFeedbackEnvelope } from './userfeedback';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\nexport type BrowserOptions = Options<BrowserTransportOptions> &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions<BrowserTransportOptions> &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient<BrowserClientOptions> {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserClientOptions) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n if (!this._isEnabled()) {\n __DEBUG_BUILD__ && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n void this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event | null> {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n private _flushOutcomes(): void {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n __DEBUG_BUILD__ && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n __DEBUG_BUILD__ && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n void this._sendEnvelope(envelope);\n }\n}\n", "import { isNativeFetch, logger } from '@sentry/utils';\n\nimport { WINDOW } from '../helpers';\n\nlet cachedFetchImpl: FetchImpl | undefined = undefined;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nexport function clearCachedFetchImplementation(): void {\n cachedFetchImpl = undefined;\n}\n", "import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { rejectedSyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\nimport type { FetchImpl } from './utils';\nimport { clearCachedFetchImplementation, getNativeFetchImplementation } from './utils';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n options: BrowserTransportOptions,\n nativeFetch: FetchImpl = getNativeFetchImplementation(),\n): Transport {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions: RequestInit = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n", "import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeXHRTransport(options: BrowserTransportOptions): Transport {\n function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n", "// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/types';\nimport { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n const frame: StackFrame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome: StackLineParserFn = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Hub, Integration, Primitive, StackParser } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport type { BrowserClient } from '../client';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\n/** JSDoc */\ntype GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n private _installFunc: Record<GlobalHandlersIntegrationsOptionKeys, (() => void) | undefined>;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this.name = GlobalHandlers.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key as GlobalHandlersIntegrationsOptionKeys];\n if (installFunc && options[key as GlobalHandlersIntegrationsOptionKeys]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key as GlobalHandlersIntegrationsOptionKeys] = undefined;\n }\n }\n }\n}\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler(): void {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler(): void {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e: any) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n __DEBUG_BUILD__ && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction addMechanismAndCapture(hub: Hub, error: EventHint['originalException'], event: Event, type: string): void {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndOptions(): [Hub, StackParser, boolean | undefined] {\n const hub = getCurrentHub();\n const client = hub.getClient<BrowserClient>();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return [hub, options.stackParser, options.attachStacktrace];\n}\n", "import type { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\n\nimport { WINDOW, wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial<TryCatchOptions>) {\n this.name = TryCatch.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n if (this._options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n}\n\n/** JSDoc */\nfunction _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = WINDOW as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original: () => void): (\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn as any as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn as unknown as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport type { Event as SentryEvent, HandlerDataFetch, HandlerDataXhr, Integration } from '@sentry/types';\nimport type {\n FetchBreadcrumbData,\n FetchBreadcrumbHint,\n XhrBreadcrumbData,\n XhrBreadcrumbHint,\n} from '@sentry/types/build/types/breadcrumb';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n SENTRY_XHR_DATA_KEY,\n severityLevelFromString,\n} from '@sentry/utils';\n\nimport { WINDOW } from '../helpers';\n\ntype HandlerData = Record<string, unknown>;\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom:\n | boolean\n | {\n serializeAttribute?: string | string[];\n maxStringLength?: number;\n };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * Options of the breadcrumbs integration.\n */\n // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n public readonly options: Readonly<BreadcrumbsOptions>;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial<BreadcrumbsOptions>) {\n this.name = Breadcrumbs.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this.options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this.options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this.options.dom));\n }\n if (this.options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this.options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this.options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n if (this.options.sentry) {\n const client = getCurrentHub().getClient();\n client && client.on && client.on('beforeSendEvent', addSentryBreadcrumb);\n }\n }\n}\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction addSentryBreadcrumb(event: SentryEvent): void {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _domBreadcrumb(dom: BreadcrumbsOptions['dom']): (handlerData: HandlerData) => void {\n function _innerDomBreadcrumb(handlerData: HandlerData): void {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event as Event | Node;\n target = _isEvent(event)\n ? htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _consoleBreadcrumb(handlerData: HandlerData & { args: unknown[]; level: string }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _xhrBreadcrumb(handlerData: HandlerData & HandlerDataXhr): void {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data: XhrBreadcrumbData = {\n method,\n url,\n status_code,\n };\n\n const hint: XhrBreadcrumbHint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch & { response?: Response }): void {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data: FetchBreadcrumbData = handlerData.fetchData;\n const hint: FetchBreadcrumbHint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data: FetchBreadcrumbData = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint: FetchBreadcrumbHint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _historyBreadcrumb(handlerData: HandlerData & { from: string; to: string }): void {\n let from: string | undefined = handlerData.from;\n let to: string | undefined = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n\nfunction _isEvent(event: unknown): event is Event {\n return !!event && !!(event as Record<string, unknown>).target;\n}\n", "import type { Client, Event, EventHint, Integration } from '@sentry/types';\nimport { applyAggregateErrorsToEvent } from '@sentry/utils';\n\nimport { exceptionFromError } from '../eventbuilder';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string;\n\n /**\n * @inheritDoc\n */\n private readonly _key: LinkedErrorsOptions['key'];\n\n /**\n * @inheritDoc\n */\n private readonly _limit: LinkedErrorsOptions['limit'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial<LinkedErrorsOptions> = {}) {\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /** @inheritdoc */\n public setupOnce(): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public preprocessEvent(event: Event, hint: EventHint | undefined, client: Client): void {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n}\n", "import type { Event, Integration } from '@sentry/types';\n\nimport { WINDOW } from '../helpers';\n\n/** HttpContext integration collects information about HTTP request headers */\nexport class HttpContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'HttpContext';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n public constructor() {\n this.name = HttpContext.id;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // noop\n }\n\n /** @inheritDoc */\n public preprocessEvent(event: Event): void {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n }\n}\n", "import type { Event, Exception, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n public constructor() {\n this.name = Dedupe.id;\n }\n\n /** @inheritDoc */\n public setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public processEvent(currentEvent: Event): Event | null {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, this._previousEvent)) {\n __DEBUG_BUILD__ && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (this._previousEvent = currentEvent);\n }\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n", "import type { Hub } from '@sentry/core';\nimport {\n getCurrentHub,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n initAndBind,\n Integrations as CoreIntegrations,\n} from '@sentry/core';\nimport type { UserFeedback } from '@sentry/types';\nimport { addInstrumentationHandler, logger, stackParserFromStackParserOptions, supportsFetch } from '@sentry/utils';\n\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport type { ReportDialogOptions } from './helpers';\nimport { WINDOW, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, HttpContext, LinkedErrors, TryCatch } from './integrations';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport, makeXHRTransport } from './transports';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = getCurrentHub()): void {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n __DEBUG_BUILD__ && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n __DEBUG_BUILD__ && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n __DEBUG_BUILD__ && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\nfunction startSessionOnHub(hub: Hub): void {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n if (typeof WINDOW.document === 'undefined') {\n __DEBUG_BUILD__ &&\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getCurrentHub().getClient<BrowserClient>();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n", "export { GlobalHandlers } from './globalhandlers.js';\nexport { TryCatch } from './trycatch.js';\nexport { Breadcrumbs } from './breadcrumbs.js';\nexport { LinkedErrors } from './linkederrors.js';\nexport { HttpContext } from './httpcontext.js';\nexport { Dedupe } from './dedupe.js';\n//# sourceMappingURL=index.js.map\n", "import { GLOBAL_OBJ } from '@sentry/utils';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n", "import type { IdleTransaction, SpanStatusType } from '@sentry/core';\nimport { getActiveTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\n\nimport { WINDOW } from './types';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = getActiveTransaction() as IdleTransaction;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType: SpanStatusType = 'cancelled';\n\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n __DEBUG_BUILD__ &&\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Metric, ReportCallback } from '../types';\n\nexport const bindReporter = (\n callback: ReportCallback,\n metric: Metric,\n reportAllChanges?: boolean,\n): ((forceReport?: boolean) => void) => {\n let prevValue: number;\n let delta: number;\n return (forceReport?: boolean) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport const generateUniqueID = (): string => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport type { NavigationTimingPolyfillEntry } from '../types';\n\nconst getNavigationEntryFromPerformanceTiming = (): NavigationTimingPolyfillEntry => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry: { [key: string]: number | string } = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key as keyof PerformanceTiming] as number) - timing.navigationStart, 0);\n }\n }\n return navigationEntry as unknown as NavigationTimingPolyfillEntry;\n};\n\nexport const getNavigationEntry = (): PerformanceNavigationTiming | NavigationTimingPolyfillEntry | undefined => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const getActivationStart = (): number => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport type { Metric } from '../types';\nimport { generateUniqueID } from './generateUniqueID';\nimport { getActivationStart } from './getActivationStart';\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const initMetric = (name: Metric['name'], value?: number): Metric => {\n const navEntry = getNavigationEntry();\n let navigationType: Metric['navigationType'] = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') as Metric['navigationType'];\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FirstInputPolyfillEntry, NavigationTimingPolyfillEntry, PerformancePaintTiming } from '../types';\n\nexport interface PerformanceEntryHandler {\n (entry: PerformanceEntry): void;\n}\n\ninterface PerformanceEntryMap {\n event: PerformanceEventTiming[];\n paint: PerformancePaintTiming[];\n 'layout-shift': LayoutShift[];\n 'largest-contentful-paint': LargestContentfulPaint[];\n 'first-input': PerformanceEventTiming[] | FirstInputPolyfillEntry[];\n navigation: PerformanceNavigationTiming[] | NavigationTimingPolyfillEntry[];\n resource: PerformanceResourceTiming[];\n longtask: PerformanceEntry[];\n}\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport const observe = <K extends keyof PerformanceEntryMap>(\n type: K,\n callback: (entries: PerformanceEntryMap[K]) => void,\n opts?: PerformanceObserverInit,\n): PerformanceObserver | undefined => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() as PerformanceEntryMap[K]);\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) as PerformanceObserverInit,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\n\nexport interface OnHiddenCallback {\n (event: Event): void;\n}\n\nexport const onHidden = (cb: OnHiddenCallback, once?: boolean): void => {\n const onHiddenOrPageHide = (event: Event): void => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { CLSMetric, ReportCallback, StopListening } from './types';\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport: ReportCallback): StopListening | undefined => {\n const metric = initMetric('CLS', 0);\n let report: ReturnType<typeof bindReporter>;\n\n let sessionValue = 0;\n let sessionEntries: PerformanceEntry[] = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries: LayoutShift[]): void => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = (): void => {\n handleEntries(po.takeRecords() as CLSMetric['entries']);\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { onHidden } from './onHidden';\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = (): number => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = (): void => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nexport const getVisibilityWatcher = (): {\n readonly firstHiddenTime: number;\n} => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { FIDMetric, PerformanceEventTiming, ReportCallback } from './types';\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nexport const onFID = (onReport: ReportCallback): void => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report: ReturnType<typeof bindReporter>;\n\n const handleEntry = (entry: PerformanceEventTiming): void => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries: FIDMetric['entries']): void => {\n (entries as PerformanceEventTiming[]).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() as FIDMetric['entries']);\n po.disconnect();\n }, true);\n }\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { LCPMetric, ReportCallback, StopListening } from './types';\n\nconst reportedMetricIDs: Record<string, boolean> = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nexport const onLCP = (onReport: ReportCallback): StopListening | undefined => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report: ReturnType<typeof bindReporter>;\n\n const handleEntries = (entries: LCPMetric['entries']): void => {\n const lastEntry = entries[entries.length - 1] as LargestContentfulPaint;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = (): void => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() as LCPMetric['entries']);\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n", "import { getFunctionName, logger } from '@sentry/utils';\n\nimport { onCLS } from './web-vitals/getCLS';\nimport { onFID } from './web-vitals/getFID';\nimport { onLCP } from './web-vitals/getLCP';\nimport { observe } from './web-vitals/lib/observe';\n\ntype InstrumentHandlerTypePerformanceObserver = 'longtask' | 'event' | 'navigation' | 'paint' | 'resource';\n\ntype InstrumentHandlerTypeMetric = 'cls' | 'lcp' | 'fid';\n\n// We provide this here manually instead of relying on a global, as this is not available in non-browser environements\n// And we do not want to expose such types\ninterface PerformanceEntry {\n readonly duration: number;\n readonly entryType: string;\n readonly name: string;\n readonly startTime: number;\n toJSON(): Record<string, unknown>;\n}\n\ninterface Metric {\n /**\n * The name of the metric (in acronym form).\n */\n name: 'CLS' | 'FCP' | 'FID' | 'INP' | 'LCP' | 'TTFB';\n\n /**\n * The current value of the metric.\n */\n value: number;\n\n /**\n * The rating as to whether the metric value is within the \"good\",\n * \"needs improvement\", or \"poor\" thresholds of the metric.\n */\n rating: 'good' | 'needs-improvement' | 'poor';\n\n /**\n * The delta between the current value and the last-reported value.\n * On the first report, `delta` and `value` will always be the same.\n */\n delta: number;\n\n /**\n * A unique ID representing this particular metric instance. This ID can\n * be used by an analytics tool to dedupe multiple values sent for the same\n * metric instance, or to group multiple deltas together and calculate a\n * total. It can also be used to differentiate multiple different metric\n * instances sent from the same page, which can happen if the page is\n * restored from the back/forward cache (in that case new metrics object\n * get created).\n */\n id: string;\n\n /**\n * Any performance entries relevant to the metric value calculation.\n * The array may also be empty if the metric value was not based on any\n * entries (e.g. a CLS value of 0 given no layout shifts).\n */\n entries: PerformanceEntry[];\n\n /**\n * The type of navigation\n *\n * Navigation Timing API (or `undefined` if the browser doesn't\n * support that API). For pages that are restored from the bfcache, this\n * value will be 'back-forward-cache'.\n */\n navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender';\n}\n\ntype InstrumentHandlerType = InstrumentHandlerTypeMetric | InstrumentHandlerTypePerformanceObserver;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InstrumentHandlerCallback = (data: any) => void;\n\ntype CleanupHandlerCallback = () => void;\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\nlet _previousCls: Metric | undefined;\nlet _previousFid: Metric | undefined;\nlet _previousLcp: Metric | undefined;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addClsInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addLcpInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addFidInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\nexport function addPerformanceInstrumentationHandler(\n type: 'event',\n callback: (data: { entries: (PerformanceEntry & { target?: unknown | null })[] }) => void,\n): CleanupHandlerCallback;\nexport function addPerformanceInstrumentationHandler(\n type: InstrumentHandlerTypePerformanceObserver,\n callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback;\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addPerformanceInstrumentationHandler(\n type: InstrumentHandlerTypePerformanceObserver,\n callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls(): void {\n onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid(): void {\n onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp(): void {\n onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction addMetricObserver(\n type: InstrumentHandlerTypeMetric,\n callback: InstrumentHandlerCallback,\n instrumentFn: () => void,\n previousValue: Metric | undefined,\n): CleanupHandlerCallback {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback);\n}\n\nfunction instrumentPerformanceObserver(type: InstrumentHandlerTypePerformanceObserver): void {\n const options: PerformanceObserverInit = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): CleanupHandlerCallback {\n return () => {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n", "import type { Transaction } from '@sentry/core';\nimport type { Span, SpanContext } from '@sentry/types';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nexport function isMeasurementValue(value: unknown): value is number {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function _startChild(transaction: Transaction, { startTimestamp, ...ctx }: SpanContext): Span {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n", "/* eslint-disable max-lines */\nimport type { IdleTransaction, Transaction } from '@sentry/core';\nimport { getActiveTransaction } from '@sentry/core';\nimport type { Measurements } from '@sentry/types';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, logger } from '@sentry/utils';\n\nimport {\n addClsInstrumentationHandler,\n addFidInstrumentationHandler,\n addLcpInstrumentationHandler,\n addPerformanceInstrumentationHandler,\n} from '../instrument';\nimport { WINDOW } from '../types';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher';\nimport type { NavigatorDeviceMemory, NavigatorNetworkInformation } from '../web-vitals/types';\nimport { _startChild, isMeasurementValue } from './utils';\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time: number): number {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI(): Performance | undefined {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor: number = 0;\n\nlet _measurements: Measurements = {};\nlet _lcpEntry: LargestContentfulPaint | undefined;\nlet _clsEntry: LayoutShift | undefined;\n\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */\nexport function startTrackingWebVitals(): () => void {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return (): void => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nexport function startTrackingLongTasks(): void {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() as IdleTransaction | undefined;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nexport function startTrackingInteractions(): void {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() as IdleTransaction | undefined;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n }\n });\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS(): () => void {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry as LayoutShift;\n });\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP(): () => void {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry as LargestContentfulPaint;\n });\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID(): () => void {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin as number);\n const startTime = msToSec(entry.startTime);\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Add performance related spans to a transaction */\nexport function addPerformanceEntries(transaction: Transaction): void {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp: number | undefined;\n let requestStartTimestamp: number | undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry: Record<string, any>) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n const resourceName = (entry.name as string).replace(WINDOW.location.origin, '');\n _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n default:\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n\n __DEBUG_BUILD__ &&\n logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n transaction.setMeasurement(\n measurementName,\n _measurements[measurementName].value,\n _measurements[measurementName].unit,\n );\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nexport function _addMeasureSpans(\n transaction: Transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry: Record<string, any>,\n startTime: number,\n duration: number,\n timeOrigin: number,\n): number {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name as string,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType as string,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction: Transaction, entry: Record<string, any>, timeOrigin: number): void {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction: Transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry: Record<string, any>,\n event: string,\n timeOrigin: number,\n description?: string,\n eventEnd?: string,\n): void {\n const end = eventEnd ? (entry[eventEnd] as number | undefined) : (entry[`${event}End`] as number | undefined);\n const start = entry[`${event}Start`] as number | undefined;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction: Transaction, entry: Record<string, any>, timeOrigin: number): void {\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart as number),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd as number),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart as number),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd as number),\n });\n}\n\nexport interface ResourceEntry extends Record<string, unknown> {\n initiatorType?: string;\n transferSize?: number;\n encodedBodySize?: number;\n decodedBodySize?: number;\n renderBlockingStatus?: string;\n}\n\n/** Create resource-related spans */\nexport function _addResourceSpans(\n transaction: Transaction,\n entry: ResourceEntry,\n resourceName: string,\n startTime: number,\n duration: number,\n timeOrigin: number,\n): void {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data: Record<string, any> = {};\n if ('transferSize' in entry) {\n data['http.response_transfer_size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['http.response_content_length'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['http.decoded_response_content_length'] = entry.decodedBodySize;\n }\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction: Transaction): void {\n const navigator = WINDOW.navigator as null | (Navigator & NavigatorNetworkInformation & NavigatorDeviceMemory);\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction: Transaction): void {\n if (_lcpEntry) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n", "/* eslint-disable max-lines */\nimport { getCurrentHub, getDynamicSamplingContextFromClient, hasTracingEnabled } from '@sentry/core';\nimport type { Client, Scope, Span } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n BAGGAGE_HEADER_NAME,\n browserPerformanceTimeOrigin,\n dynamicSamplingContextToSentryBaggageHeader,\n generateSentryTraceHeader,\n isInstanceOf,\n SENTRY_XHR_DATA_KEY,\n stringMatchesSomePattern,\n} from '@sentry/utils';\n\nimport { addPerformanceInstrumentationHandler } from './instrument';\n\nexport const DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\nexport interface RequestInstrumentationOptions {\n /**\n * @deprecated Will be removed in v8.\n * Use `shouldCreateSpanForRequest` to control span creation and `tracePropagationTargets` to control\n * trace header attachment.\n */\n tracingOrigins: Array<string | RegExp>;\n\n /**\n * List of strings and/or regexes used to determine which outgoing requests will have `sentry-trace` and `baggage`\n * headers attached.\n *\n * @deprecated Use the top-level `tracePropagationTargets` option in `Sentry.init` instead.\n * This option will be removed in v8.\n *\n * Default: ['localhost', /^\\//] @see {DEFAULT_TRACE_PROPAGATION_TARGETS}\n */\n tracePropagationTargets: Array<string | RegExp>;\n\n /**\n * Flag to disable patching all together for fetch requests.\n *\n * Default: true\n */\n traceFetch: boolean;\n\n /**\n * Flag to disable patching all together for xhr requests.\n *\n * Default: true\n */\n traceXHR: boolean;\n\n /**\n * If true, Sentry will capture http timings and add them to the corresponding http spans.\n *\n * Default: true\n */\n enableHTTPTimings: boolean;\n\n /**\n * This function will be called before creating a span for a request with the given url.\n * Return false if you don't want a span for the given url.\n *\n * Default: (url: string) => true\n */\n shouldCreateSpanForRequest?(this: void, url: string): boolean;\n}\n\n/** Data returned from fetch callback */\nexport interface FetchData {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n args: any[]; // the arguments passed to the fetch call itself\n fetchData?: {\n method: string;\n url: string;\n // span_id\n __span?: string;\n };\n\n // TODO Should this be unknown instead? If we vendor types, make it a Response\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n response?: any;\n error?: unknown;\n\n startTimestamp: number;\n endTimestamp?: number;\n}\n\n/** Data returned from XHR request */\nexport interface XHRData {\n xhr?: {\n [SENTRY_XHR_DATA_KEY]?: {\n method: string;\n url: string;\n status_code: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: Record<string, any>;\n };\n __sentry_xhr_span_id__?: string;\n setRequestHeader?: (key: string, val: string) => void;\n getRequestHeader?: (key: string) => string;\n __sentry_own_request__?: boolean;\n };\n startTimestamp: number;\n endTimestamp?: number;\n}\n\ntype PolymorphicRequestHeaders =\n | Record<string, string | undefined>\n | Array<[string, string]>\n // the below is not preicsely the Header type used in Request, but it'll pass duck-typing\n | {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n append: (key: string, value: string) => void;\n get: (key: string) => string | null | undefined;\n };\n\nexport const defaultRequestInstrumentationOptions: RequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nexport function instrumentOutgoingRequests(_options?: Partial<RequestInstrumentationOptions>): void {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_: string) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url: string): boolean =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans: Record<string, Span> = {};\n\n if (traceFetch) {\n addInstrumentationHandler('fetch', (handlerData: FetchData) => {\n const createdSpan = fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler('xhr', (handlerData: XHRData) => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry as PerformanceResourceTiming).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span: Span): void {\n const url = span.data.url;\n\n if (!url) {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nexport function extractNetworkProtocol(nextHopProtocol: string): { name: string; version: string } {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time: number = 0): number {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming: PerformanceResourceTiming): [string, string | number][] {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData: [string, string | number][] = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nexport function shouldAttachHeaders(url: string, tracePropagationTargets: (string | RegExp)[] | undefined): boolean {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function fetchCallback(\n handlerData: FetchData,\n shouldCreateSpan: (url: string) => boolean,\n shouldAttachHeaders: (url: string) => boolean,\n spans: Record<string, Span>,\n): Span | undefined {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n\n const contentLength: string =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setData('http.response_content_length', contentLengthNum);\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n\n const { method, url } = handlerData.fetchData;\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n url,\n type: 'fetch',\n 'http.method': method,\n },\n description: `${method} ${url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request: string | Request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options: { [key: string]: any } = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nexport function addTracingHeadersToFetchRequest(\n request: string | unknown, // unknown is actually type Request but we can't export DOM types from this package,\n client: Client,\n scope: Scope,\n options: {\n headers?:\n | {\n [key: string]: string[] | string | undefined;\n }\n | PolymorphicRequestHeaders;\n },\n requestSpan?: Span,\n): PolymorphicRequestHeaders | undefined {\n const span = requestSpan || scope.getSpan();\n\n const transaction = span && span.transaction;\n\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n\n const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction\n ? transaction.getDynamicSamplingContext()\n : dsc\n ? dsc\n : getDynamicSamplingContextFromClient(traceId, client, scope);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n const headers =\n typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request as Request).headers : options.headers;\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers as Headers);\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders as PolymorphicRequestHeaders;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders as PolymorphicRequestHeaders;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders: string[] = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers as Exclude<typeof headers, Headers>),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nexport function xhrCallback(\n handlerData: XHRData,\n shouldCreateSpan: (url: string) => boolean,\n shouldAttachHeaders: (url: string) => boolean,\n spans: Record<string, Span>,\n): Span | undefined {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n const sentryTraceHeader = generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext =\n dsc || (client ? getDynamicSamplingContextFromClient(traceId, client, scope) : undefined);\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr: NonNullable<XHRData['xhr']>,\n sentryTraceHeader: string,\n sentryBaggageHeader: string | undefined,\n): void {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader!('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader!(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n", "import type { Transaction, TransactionContext } from '@sentry/types';\nimport { addInstrumentationHandler, browserPerformanceTimeOrigin, logger } from '@sentry/utils';\n\nimport { WINDOW } from './types';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nexport function instrumentRoutingWithDefaults<T extends Transaction>(\n customStartTransaction: (context: TransactionContext) => T | undefined,\n startTransactionOnPageLoad: boolean = true,\n startTransactionOnLocationChange: boolean = true,\n): void {\n if (!WINDOW || !WINDOW.location) {\n __DEBUG_BUILD__ && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl: string | undefined = WINDOW.location.href;\n\n let activeTransaction: T | undefined;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', ({ to, from }: { to: string; from?: string }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n __DEBUG_BUILD__ && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n", "/* eslint-disable max-lines */\nimport type { Hub, IdleTransaction } from '@sentry/core';\nimport { addTracingExtensions, getActiveTransaction, startIdleTransaction, TRACING_DEFAULTS } from '@sentry/core';\nimport type { EventProcessor, Integration, Transaction, TransactionContext, TransactionSource } from '@sentry/types';\nimport { getDomElement, logger, tracingContextFromHeaders } from '@sentry/utils';\n\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport {\n addPerformanceEntries,\n startTrackingInteractions,\n startTrackingLongTasks,\n startTrackingWebVitals,\n} from './metrics';\nimport type { RequestInstrumentationOptions } from './request';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request';\nimport { instrumentRoutingWithDefaults } from './router';\nimport { WINDOW } from './types';\n\nexport const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\nexport interface BrowserTracingOptions extends RequestInstrumentationOptions {\n /**\n * The time to wait in ms until the transaction will be finished during an idle state. An idle state is defined\n * by a moment where there are no in-progress spans.\n *\n * The transaction will use the end timestamp of the last finished span as the endtime for the transaction.\n * If there are still active spans when this the `idleTimeout` is set, the `idleTimeout` will get reset.\n * Time is in ms.\n *\n * Default: 1000\n */\n idleTimeout: number;\n\n /**\n * The max duration for a transaction. If a transaction duration hits the `finalTimeout` value, it\n * will be finished.\n * Time is in ms.\n *\n * Default: 30000\n */\n finalTimeout: number;\n\n /**\n * The heartbeat interval. If no new spans are started or open spans are finished within 3 heartbeats,\n * the transaction will be finished.\n * Time is in ms.\n *\n * Default: 5000\n */\n heartbeatInterval: number;\n\n /**\n * Flag to enable/disable creation of `navigation` transaction on history changes.\n *\n * Default: true\n */\n startTransactionOnLocationChange: boolean;\n\n /**\n * Flag to enable/disable creation of `pageload` transaction on first pageload.\n *\n * Default: true\n */\n startTransactionOnPageLoad: boolean;\n\n /**\n * Flag Transactions where tabs moved to background with \"cancelled\". Browser background tab timing is\n * not suited towards doing precise measurements of operations. By default, we recommend that this option\n * be enabled as background transactions can mess up your statistics in nondeterministic ways.\n *\n * Default: true\n */\n markBackgroundTransactions: boolean;\n\n /**\n * If true, Sentry will capture long tasks and add them to the corresponding transaction.\n *\n * Default: true\n */\n enableLongTask: boolean;\n\n /**\n * _metricOptions allows the user to send options to change how metrics are collected.\n *\n * _metricOptions is currently experimental.\n *\n * Default: undefined\n */\n _metricOptions?: Partial<{\n /**\n * @deprecated This property no longer has any effect and will be removed in v8.\n */\n _reportAllChanges: boolean;\n }>;\n\n /**\n * _experiments allows the user to send options to define how this integration works.\n * Note that the `enableLongTask` options is deprecated in favor of the option at the top level, and will be removed in v8.\n *\n * TODO (v8): Remove enableLongTask\n *\n * Default: undefined\n */\n _experiments: Partial<{\n enableLongTask: boolean;\n enableInteractions: boolean;\n onStartRouteTransaction: (t: Transaction | undefined, ctx: TransactionContext, getCurrentHub: () => Hub) => void;\n }>;\n\n /**\n * beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction\n * context data, or drop the transaction entirely (by setting `sampled = false` in the context).\n *\n * Note: For legacy reasons, transactions can also be dropped by returning `undefined`.\n *\n * @param context: The context data which will be passed to `startTransaction` by default\n *\n * @returns A (potentially) modified context object, with `sampled = false` if the transaction should be dropped.\n */\n beforeNavigate?(this: void, context: TransactionContext): TransactionContext | undefined;\n\n /**\n * Instrumentation that creates routing change transactions. By default creates\n * pageload and navigation transactions.\n */\n routingInstrumentation<T extends Transaction>(\n this: void,\n customStartTransaction: (context: TransactionContext) => T | undefined,\n startTransactionOnPageLoad?: boolean,\n startTransactionOnLocationChange?: boolean,\n ): void;\n}\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nexport class BrowserTracing implements Integration {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n public options: BrowserTracingOptions;\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _getCurrentHub?: () => Hub;\n\n private _latestRouteName?: string;\n private _latestRouteSource?: TransactionSource;\n\n private _collectWebVitals: () => void;\n\n private _hasSetTracePropagationTargets: boolean;\n\n public constructor(_options?: Partial<BrowserTracingOptions>) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if (__DEBUG_BUILD__) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if (__DEBUG_BUILD__ && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context: TransactionContext) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n private _createRouteTransaction(context: TransactionContext): Transaction | undefined {\n if (!this._getCurrentHub) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : '';\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n const expandedContext: TransactionContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n trimEnd: true,\n };\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? { ...finalContext.metadata, source: 'custom' }\n : finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n\n if (finalContext.sampled === false) {\n __DEBUG_BUILD__ &&\n logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n\n const scope = hub.getScope();\n\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) {\n scope.setPropagationContext(propagationContext);\n } else {\n // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled,\n });\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction as Transaction;\n }\n\n /** Start listener for interaction transactions */\n private _registerInteractionListener(): void {\n let inflightInteractionTransaction: IdleTransaction | undefined;\n const registerInteractionTransaction = (): void => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n __DEBUG_BUILD__ && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context: TransactionContext = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName: string): string | undefined {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n", "export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\n\nimport { WINDOW } from './helpers';\nimport * as BrowserIntegrations from './integrations';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nif (WINDOW.Sentry && WINDOW.Sentry.Integrations) {\n windowIntegrations = WINDOW.Sentry.Integrations;\n}\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations };\n\nexport { Replay } from '@sentry/replay';\nexport type {\n ReplayEventType,\n ReplayEventWithTime,\n ReplayBreadcrumbFrame,\n ReplayBreadcrumbFrameEvent,\n ReplayOptionFrameEvent,\n ReplayFrame,\n ReplayFrameEvent,\n ReplaySpanFrame,\n ReplaySpanFrameEvent,\n} from '@sentry/replay';\n\nexport {\n BrowserTracing,\n defaultRequestInstrumentationOptions,\n instrumentOutgoingRequests,\n} from '@sentry-internal/tracing';\nexport type { RequestInstrumentationOptions } from '@sentry-internal/tracing';\nexport {\n addTracingExtensions,\n setMeasurement,\n extractTraceparentData,\n getActiveTransaction,\n spanStatusfromHttpCode,\n trace,\n makeMultiplexedTransport,\n ModuleMetadata,\n} from '@sentry/core';\nexport type { SpanStatusType } from '@sentry/core';\nexport type { Span } from '@sentry/types';\nexport { makeBrowserOfflineTransport } from './transports/offline';\nexport { onProfilingStartRouteTransaction } from './profiling/hubextensions';\nexport { BrowserProfilingIntegration } from './profiling/integration';\n", "// This const is used for nothing except to make this file identifiable via its content.\n// We search for \"_sentry_release_injection_file\" in the plugin to determine for sure that the file we look at is the release injection file.\n\n// _sentry_release_injection_file\n\n var _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:\"3.7.20\"};", "import * as Sentry from \"@sentry/browser\";\n\nlet hasSentryInitiated = false;\nfunction initiateSentry() {\n Sentry.init({\n dsn: \"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504\",\n\n /**\n * The release identifier used when uploading respective source maps. Specify\n * this value to allow Sentry to resolve the correct source maps when\n * processing events.\n */\n release: process.env.COMPONENT_VERSION,\n\n /**\n * List of integrations that should be installed after SDK was initialized.\n * Accepts either a list of integrations or a function that receives\n * default integrations and returns a new, updated list.\n */\n integrations: [new Sentry.BrowserTracing()],\n\n /**\n * Sample rate to determine trace sampling.\n *\n * 0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send\n * all traces)\n *\n * Tracing is enabled if either this or `tracesSampler` is defined. If both are defined, `tracesSampleRate` is\n * ignored.\n */\n tracesSampleRate: 1,\n });\n hasSentryInitiated = true;\n}\n\nexport const captureErrorInSentry = (error: Error) => {\n if (!hasSentryInitiated) {\n initiateSentry();\n }\n\n return Sentry.captureException(error);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { captureErrorInSentry } from \"@lib/captureErrorInSentry\";\nimport React from \"react\";\nimport { Button } from \"./Button\";\nimport { NonIdealState } from \"./NonIdealState\";\n\nexport class ErrorBoundary extends React.Component<{\n children: React.ReactNode | React.ReactNode[];\n}> {\n state = { hasError: false };\n\n static getDerivedStateFromError() {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error: Error) {\n // You can also log the error to an error reporting service\n captureErrorInSentry(error);\n }\n\n render() {\n if (this.state.hasError) {\n return (\n <NonIdealState>\n <p style={{ marginBlock: \"0\" }} className=\"p1--semibold\">\n We ran into an error\n </p>\n <p\n className=\"p1--regular\"\n style={{\n color: \"var(--GREY-600)\",\n marginBlock: \"12px\",\n textAlign: \"center\",\n }}\n >\n Please try reloading. If the problem persists reach out to our\n support team.\n </p>\n <div>\n <Button\n variant=\"outlined\"\n iconBefore=\"autorenew\"\n onClick={() => location.reload()}\n >\n Try again\n </Button>\n </div>\n </NonIdealState>\n );\n }\n\n return this.props.children;\n }\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as Sentry from \"@sentry/browser\";\n\nconst MESSAGE_PREFIX = \"[Duffel Ancillaries] \";\nconst LOCAL_STORAGE_KEY = \"duffel-ancillaries-logger-state\";\nlet LOG_INITIALISED = false;\n\nconst storeLoggerState = (shouldLog: boolean) => {\n localStorage.setItem(LOCAL_STORAGE_KEY, shouldLog.toString());\n};\n\nconst shouldLog = () => localStorage.getItem(LOCAL_STORAGE_KEY) === \"true\";\n\n/**\n * The functions in this file are used to enable logging.\n *\n * Usage:\n *\n * In your app's outermost container, import the LogContext and wrap your app in it:\n *\n * ```jsx\n * import { LogContext, initializeLogger } from '@lib/logging'\n *\n * const logger = initializeLogger(props.debugMode || false)\n *\n * <LogContext.Provider value={logger}>\n * ...\n * </LogContext.Provider>\n * ```\n *\n * Then in your components nested within the above container, import the useLog hook and use it:\n *\n * import { useLog } from '@lib/logging'\n *\n * const { log, logGroup } = useLog()\n * log('This is a log message')\n * logGroup('These messages will be grouped together', ['This is a log message', 'This is another log message'])\n */\nconst initializeLogger = (debugMode: boolean): void => {\n storeLoggerState(debugMode);\n if (debugMode && !LOG_INITIALISED) {\n // eslint-disable-next-line\n console.info(\n MESSAGE_PREFIX,\n `\\n\\nDebug mode is enabled. Information about your setup will be printed to the console.\n \n If you do not want to enable debug mode (for example in a production environment), pass \"debug: false\" when initializing this component.\n \n Learn more about the Ancillaries component:\n http://duffel.com/docs/guides/ancillaries-component`,\n );\n }\n LOG_INITIALISED = true;\n};\n\n/**\n * Log a message to the console. Messages will be prefixed with \"[Duffel Ancillaries]\".\n * @param message The message to print to the console.\n */\nconst log = (message: any) => {\n if (shouldLog()) {\n // eslint-disable-next-line\n console.info(MESSAGE_PREFIX, message);\n } else {\n Sentry.addBreadcrumb({\n category: \"log\",\n message,\n });\n }\n};\n\n/**\n * Log a series of messages to the console inside a collapsible group.\n * @param groupName The name of the group of messages. This will be prefixed with \"[Duffel Ancillaries]\".\n * @param messages An array of messages to print to the console, inside the group.\n */\nfunction logGroup(groupName: string, messages: any[]): void;\n\n/**\n * Log a series of messages to the console inside a collapsible group.\n * @param groupName The name of the group of messages. This will be prefixed with \"[Duffel Ancillaries]\".\n * @param object An object to print to the console, inside the group.\n */\nfunction logGroup(groupName: string, object: { [key: string]: any }): void;\n\n// Overloaded function implementation.\n// https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads\nfunction logGroup(\n groupName: string,\n messagesOrObject: any[] | { [key: string]: any },\n): void {\n let transformedMessagesOrObject = [];\n if (Array.isArray(messagesOrObject)) {\n transformedMessagesOrObject = messagesOrObject;\n } else {\n transformedMessagesOrObject = Object.entries(messagesOrObject).map(\n ([key, value]) => ({ property: key, value }),\n );\n }\n\n if (shouldLog()) {\n // eslint-disable-next-line\n console.groupCollapsed(MESSAGE_PREFIX, groupName);\n\n transformedMessagesOrObject.forEach((message) => {\n // eslint-disable-next-line\n console.info(message);\n });\n\n // eslint-disable-next-line\n console.groupEnd();\n } else {\n Sentry.addBreadcrumb({\n category: \"log.group\",\n message: groupName,\n data: messagesOrObject,\n });\n }\n}\n\nexport { initializeLogger, log, logGroup };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Color } from \"@lib/colors\";\nimport { log } from \"@lib/logging\";\nimport * as React from \"react\";\n\n/* eslint-disable react/no-unknown-property */\n/* eslint sort-keys: \"error\" */\nexport const ICON_MAP = {\n accessible: (\n <path d=\"M12 6C11.45 6 10.9792 5.80417 10.5875 5.4125C10.1958 5.02083 10 4.55 10 4C10 3.45 10.1958 2.97917 10.5875 2.5875C10.9792 2.19583 11.45 2 12 2C12.55 2 13.0208 2.19583 13.4125 2.5875C13.8042 2.97917 14 3.45 14 4C14 4.55 13.8042 5.02083 13.4125 5.4125C13.0208 5.80417 12.55 6 12 6ZM17 22V17H12C11.45 17 10.9792 16.8042 10.5875 16.4125C10.1958 16.0208 10 15.55 10 15V9C10 8.45 10.1958 7.97917 10.5875 7.5875C10.9792 7.19583 11.45 7 12 7C12.4 7 12.7458 7.0875 13.0375 7.2625C13.3292 7.4375 13.6417 7.71667 13.975 8.1C14.8917 9.2 15.7208 9.95417 16.4625 10.3625C17.2042 10.7708 18.05 10.9833 19 11V13C18.1167 13 17.225 12.8083 16.325 12.425C15.425 12.0417 14.65 11.5833 14 11.05V14.5H17C17.55 14.5 18.0208 14.6958 18.4125 15.0875C18.8042 15.4792 19 15.95 19 16.5V22H17ZM10 22C8.61667 22 7.4375 21.5125 6.4625 20.5375C5.4875 19.5625 5 18.3833 5 17C5 15.8 5.37917 14.7417 6.1375 13.825C6.89583 12.9083 7.85 12.3333 9 12.1V14.15C8.41667 14.3833 7.9375 14.7542 7.5625 15.2625C7.1875 15.7708 7 16.35 7 17C7 17.8333 7.29167 18.5417 7.875 19.125C8.45833 19.7083 9.16667 20 10 20C10.65 20 11.2292 19.8125 11.7375 19.4375C12.2458 19.0625 12.6167 18.5833 12.85 18H14.9C14.6667 19.15 14.0917 20.1042 13.175 20.8625C12.2583 21.6208 11.2 22 10 22Z\" />\n ),\n add: (\n <path d=\"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z\" />\n ),\n airline_seat_flat: (\n <path d=\"M9.5999 14.4V7.19995H17.9999C18.9999 7.19995 19.8499 7.54995 20.5499 8.24995C21.2499 8.94995 21.5999 9.79995 21.5999 10.8V14.4H9.5999ZM2.3999 17.4V15.6H21.5999V17.4H2.3999ZM5.3999 14.4C4.56657 14.4 3.85824 14.1083 3.2749 13.525C2.69157 12.9416 2.3999 12.2333 2.3999 11.4C2.3999 10.5666 2.69157 9.85828 3.2749 9.27495C3.85824 8.69162 4.56657 8.39995 5.3999 8.39995C6.23324 8.39995 6.94157 8.69162 7.5249 9.27495C8.10824 9.85828 8.3999 10.5666 8.3999 11.4C8.3999 12.2333 8.10824 12.9416 7.5249 13.525C6.94157 14.1083 6.23324 14.4 5.3999 14.4ZM5.3999 12.6C5.7399 12.6 6.0249 12.485 6.2549 12.255C6.4849 12.025 6.5999 11.74 6.5999 11.4C6.5999 11.06 6.4849 10.775 6.2549 10.545C6.0249 10.315 5.7399 10.2 5.3999 10.2C5.0599 10.2 4.7749 10.315 4.5449 10.545C4.3149 10.775 4.1999 11.06 4.1999 11.4C4.1999 11.74 4.3149 12.025 4.5449 12.255C4.7749 12.485 5.0599 12.6 5.3999 12.6ZM11.3999 12.6H19.7999V10.8C19.7999 10.305 19.6237 9.8812 19.2712 9.5287C18.9187 9.1762 18.4949 8.99995 17.9999 8.99995H11.3999V12.6Z\" />\n ),\n airline_seat_individual_suite: (\n <path d=\"M9.5999 14.4V7.19995H17.9999C18.9999 7.19995 19.8499 7.54995 20.5499 8.24995C21.2499 8.94995 21.5999 9.79995 21.5999 10.8V14.4H9.5999ZM2.3999 17.4V15.6H21.5999V17.4H2.3999ZM5.3999 14.4C4.56657 14.4 3.85824 14.1083 3.2749 13.525C2.69157 12.9416 2.3999 12.2333 2.3999 11.4C2.3999 10.5666 2.69157 9.85828 3.2749 9.27495C3.85824 8.69162 4.56657 8.39995 5.3999 8.39995C6.23324 8.39995 6.94157 8.69162 7.5249 9.27495C8.10824 9.85828 8.3999 10.5666 8.3999 11.4C8.3999 12.2333 8.10824 12.9416 7.5249 13.525C6.94157 14.1083 6.23324 14.4 5.3999 14.4ZM5.3999 12.6C5.7399 12.6 6.0249 12.485 6.2549 12.255C6.4849 12.025 6.5999 11.74 6.5999 11.4C6.5999 11.06 6.4849 10.775 6.2549 10.545C6.0249 10.315 5.7399 10.2 5.3999 10.2C5.0599 10.2 4.7749 10.315 4.5449 10.545C4.3149 10.775 4.1999 11.06 4.1999 11.4C4.1999 11.74 4.3149 12.025 4.5449 12.255C4.7749 12.485 5.0599 12.6 5.3999 12.6ZM11.3999 12.6H19.7999V10.8C19.7999 10.305 19.6237 9.8812 19.2712 9.5287C18.9187 9.1762 18.4949 8.99995 17.9999 8.99995H11.3999V12.6Z\" />\n ),\n airline_seat_legroom_extra: (\n <path d=\"M13.1999 16.8001H4.1999C3.6999 16.8001 3.2749 16.6238 2.9249 16.2713C2.5749 15.9188 2.3999 15.4951 2.3999 15.0001V3.6001H4.1999V15.0001H13.1999V16.8001ZM17.5499 20.4001L14.4999 13.8001H7.7999C7.13324 13.8001 6.56657 13.5668 6.0999 13.1001C5.63324 12.6334 5.3999 12.0668 5.3999 11.4001V3.6001H10.7999V9.6001H14.6749C15.0268 9.6001 15.3481 9.69176 15.6388 9.8751C15.9295 10.0584 16.1416 10.3084 16.2749 10.6251L18.9249 16.4001L19.9999 15.8751C20.3999 15.6751 20.8041 15.6501 21.2124 15.8001C21.6207 15.9501 21.9082 16.2334 22.0749 16.6501C22.2249 17.0334 22.2249 17.4126 22.0749 17.7876C21.9249 18.1626 21.6666 18.4418 21.2999 18.6251L17.5499 20.4001Z\" />\n ),\n airline_seat_recline_extra: (\n <path d=\"M8.1001 6.5999C7.51676 6.5999 7.02093 6.39574 6.6126 5.9874C6.20426 5.57907 6.0001 5.08324 6.0001 4.4999C6.0001 3.91657 6.20426 3.42074 6.6126 3.0124C7.02093 2.60407 7.51676 2.3999 8.1001 2.3999C8.68343 2.3999 9.17926 2.60407 9.5876 3.0124C9.99593 3.42074 10.2001 3.91657 10.2001 4.4999C10.2001 5.08324 9.99593 5.57907 9.5876 5.9874C9.17926 6.39574 8.68343 6.5999 8.1001 6.5999ZM14.4001 19.1999H7.4751C7.04176 19.1999 6.65843 19.0666 6.3251 18.7999C5.99176 18.5332 5.78343 18.1832 5.7001 17.7499L3.6001 7.1999H5.4251L7.5251 17.3999H14.4001V19.1999ZM18.9001 20.3999L16.5001 16.1999H10.5501C9.98343 16.1999 9.48343 16.0249 9.0501 15.6749C8.61676 15.3249 8.33343 14.8749 8.2001 14.3249L7.2001 9.7249C7.06676 9.0749 7.19176 8.4874 7.5751 7.9624C7.95843 7.4374 8.4751 7.1749 9.1251 7.1749C9.6751 7.1749 10.1459 7.33324 10.5376 7.6499C10.9293 7.96657 11.1834 8.3749 11.3001 8.8749L12.4251 13.7999H16.8251C17.1418 13.7999 17.4376 13.8791 17.7126 14.0374C17.9876 14.1957 18.2084 14.4166 18.3751 14.6999L21.0001 19.1999L18.9001 20.3999Z\" />\n ),\n airline_seat_recline_normal: (\n <path d=\"M15.7872 20.9781H7.98301C7.44588 20.9781 6.9811 20.7797 6.58866 20.3829C6.19622 19.985 6 19.5139 6 18.9694V6.53741H7.61138V18.9694C7.61138 19.0528 7.65251 19.1367 7.73476 19.221C7.81701 19.3044 7.89976 19.3461 7.98301 19.3461H15.7872V20.9781ZM11.3901 6.0974C10.7083 6.0974 10.135 5.8568 9.6702 5.37559C9.20542 4.89438 8.97302 4.31875 8.97302 3.64867C8.97302 2.95851 9.21087 2.37785 9.68655 1.90669C10.1612 1.43553 10.7291 1.19995 11.3901 1.19995C12.0709 1.19995 12.6437 1.44106 13.1085 1.92327C13.5723 2.40447 13.8042 2.97961 13.8042 3.64867C13.8042 4.33984 13.5668 4.92101 13.0922 5.39217C12.6175 5.86232 12.0501 6.0974 11.3901 6.0974ZM17.5829 22.7999V17.8392H11.7617C11.0185 17.8392 10.3887 17.5775 9.87236 17.0541C9.35605 16.5307 9.09789 15.8923 9.09789 15.1388V9.33122C9.09789 8.66215 9.31443 8.10761 9.7475 7.66759C10.1816 7.22758 10.7291 7.00757 11.3901 7.00757C12.0293 7.00757 12.5709 7.24867 13.0149 7.73088C13.4588 8.21209 13.6808 8.79777 13.6808 9.48794V15.4538H17.2737C17.8108 15.4538 18.2751 15.6421 18.6666 16.0189C19.059 16.3956 19.2349 16.8557 19.1943 17.3992V22.7999H17.5829Z\" />\n ),\n airline_stops: (\n <path d=\"M9.5496 18.3504V17.0496H11.3496C11.4496 14.6832 10.6288 12.7084 8.8872 11.1252C7.1456 9.542 5.0664 8.7504 2.6496 8.7504V7.4496C4.7168 7.4496 6.6044 7.9956 8.3124 9.0876C10.0204 10.1796 11.2496 11.6836 12 13.5996C12.5168 12.2836 13.3168 11.1296 14.4 10.1376C15.4832 9.1456 16.7164 8.2496 18.0996 7.4496H14.0496V6.15H20.1504V12.1248H18.8496V8.5248C17.0168 9.5248 15.5004 10.7456 14.3004 12.1872C13.1004 13.6288 12.5504 15.2496 12.6504 17.0496H14.4504V18.3504H9.5496Z\" />\n ),\n airplane_ticket: (\n <path d=\"M4.2 18.6996C3.8336 18.6996 3.5252 18.5704 3.2748 18.312C3.0252 18.0544 2.9004 17.7504 2.9004 17.4V14.1996C3.4164 14.0996 3.8456 13.8456 4.188 13.4376C4.5296 13.0296 4.7004 12.5504 4.7004 12C4.7004 11.4496 4.5296 10.9704 4.188 10.5624C3.8456 10.1544 3.4164 9.9004 2.9004 9.8004V6.6C2.9004 6.2496 3.0252 5.9456 3.2748 5.688C3.5252 5.4296 3.8336 5.3004 4.2 5.3004H19.8C20.1664 5.3004 20.4748 5.4296 20.7252 5.688C20.9748 5.9456 21.0996 6.2496 21.0996 6.6V17.4C21.0996 17.7504 20.9748 18.0544 20.7252 18.312C20.4748 18.5704 20.1664 18.6996 19.8 18.6996H4.2ZM4.2 17.4H19.8V6.6H4.2V8.8752C4.7336 9.192 5.1668 9.6252 5.4996 10.1748C5.8332 10.7252 6 11.3336 6 12C6 12.6664 5.8332 13.2748 5.4996 13.8252C5.1668 14.3748 4.7336 14.808 4.2 15.1248V17.4ZM9.0996 15.3L17.2752 13.1004C17.5088 13.0332 17.688 12.908 17.8128 12.7248C17.9376 12.5416 17.9752 12.3416 17.9256 12.1248C17.8584 11.908 17.7248 11.7416 17.5248 11.6256C17.3248 11.5088 17.1164 11.4836 16.8996 11.55L14.5752 12.2004L10.8 8.7L9.6744 9L11.9256 12.8748L9.5256 13.5252L8.3496 12.6L7.65 12.7752L9.0996 15.3Z\" />\n ),\n apartment: (\n <path d=\"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z\" />\n ),\n arrow_downward: (\n <path d=\"M11 4V16.175L5.4 10.575L4 12L12 20L20 12L18.6 10.575L13 16.175V4H11Z\" />\n ),\n arrow_drop_down: (\n <path d=\"M11.475 14.475L7.85 10.85C7.8 10.8 7.7625 10.7458 7.7375 10.6875C7.7125 10.6292 7.7 10.5667 7.7 10.5C7.7 10.3667 7.74583 10.25 7.8375 10.15C7.92917 10.05 8.05 10 8.2 10H15.8C15.95 10 16.0708 10.05 16.1625 10.15C16.2542 10.25 16.3 10.3667 16.3 10.5C16.3 10.5333 16.25 10.65 16.15 10.85L12.525 14.475C12.4417 14.5583 12.3583 14.6167 12.275 14.65C12.1917 14.6833 12.1 14.7 12 14.7C11.9 14.7 11.8083 14.6833 11.725 14.65C11.6417 14.6167 11.5583 14.5583 11.475 14.475Z\" />\n ),\n arrow_forward: (\n <path d=\"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z\" />\n ),\n arrow_left: (\n <path d=\"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z\" />\n ),\n arrow_right: (\n <path d=\"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z\" />\n ),\n arrow_upward: (\n <path d=\"M11 20V7.825L5.4 13.425L4 12L12 4L20 12L18.6 13.425L13 7.825V20H11Z\" />\n ),\n atm: (\n <path d=\"M10.375 15V10.5H8.125V9H14.125V10.5H11.875V15H10.375ZM2 15V10C2 9.71667 2.09583 9.47917 2.2875 9.2875C2.47917 9.09583 2.71667 9 3 9H6C6.28333 9 6.52083 9.09583 6.7125 9.2875C6.90417 9.47917 7 9.71667 7 10V15H5.5V13.5H3.5V15H2ZM3.5 12H5.5V10.5H3.5V12ZM15.5 15V10C15.5 9.71667 15.5958 9.47917 15.7875 9.2875C15.9792 9.09583 16.2167 9 16.5 9H21C21.2833 9 21.5208 9.09583 21.7125 9.2875C21.9042 9.47917 22 9.71667 22 10V15H20.5V10.5H19.5V14H18V10.5H17V15H15.5Z\" />\n ),\n autorenew: (\n <path d=\"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z\" />\n ),\n bakery_dining: (\n <path d=\"M6.30001 16.5252H7.80001V15.3H16.2V16.5252H17.7V12.5496C17.7 12.2 17.5876 11.8792 17.3628 11.5872C17.138 11.296 16.8504 11.1004 16.5 11.0004V9.42481C16.5 8.97521 16.3416 8.59601 16.0248 8.28721C15.708 7.97921 15.3248 7.82521 14.8752 7.82521H12.0504C12.0168 7.82521 11.996 7.83361 11.988 7.85041C11.9792 7.86641 11.9832 7.89121 12 7.92481C12.0168 7.89121 12.0208 7.86641 12.012 7.85041C12.004 7.83361 11.9832 7.82521 11.9496 7.82521H9.12481C8.65841 7.82521 8.27081 7.97921 7.96201 8.28721C7.65401 8.59601 7.50001 8.97521 7.50001 9.42481V11.0004C7.14961 11.1004 6.86201 11.296 6.63721 11.5872C6.41241 11.8792 6.30001 12.2 6.30001 12.5496V16.5252ZM7.80001 13.8V12.6H16.2V13.8H7.80001ZM9.00001 11.1V9.62521C9.00001 9.52521 9.02921 9.44601 9.08761 9.38761C9.14601 9.32921 9.21681 9.30001 9.30001 9.30001H10.95C11.0332 9.30001 11.104 9.32921 11.1624 9.38761C11.2208 9.44601 11.25 9.52521 11.25 9.62521V11.1H9.00001ZM12.75 11.1V9.62521C12.75 9.52521 12.7792 9.44601 12.8376 9.38761C12.896 9.32921 12.9668 9.30001 13.05 9.30001H14.7C14.7832 9.30001 14.854 9.32921 14.9124 9.38761C14.9708 9.44601 15 9.52521 15 9.62521V11.1H12.75ZM4.50001 21.0996C4.05041 21.0996 3.67121 20.9456 3.36241 20.6376C3.05441 20.3288 2.90041 19.9496 2.90041 19.5V4.50001C2.90041 4.05041 3.05441 3.67121 3.36241 3.36241C3.67121 3.05441 4.05041 2.90041 4.50001 2.90041H19.5C19.9496 2.90041 20.3288 3.05441 20.6376 3.36241C20.9456 3.67121 21.0996 4.05041 21.0996 4.50001V19.5C21.0996 19.9496 20.9456 20.3288 20.6376 20.6376C20.3288 20.9456 19.9496 21.0996 19.5 21.0996H4.50001ZM4.50001 19.8H19.5C19.5664 19.8 19.6332 19.7668 19.7004 19.7004C19.7668 19.6332 19.8 19.5664 19.8 19.5V4.50001C19.8 4.43361 19.7668 4.36681 19.7004 4.29961C19.6332 4.23321 19.5664 4.20001 19.5 4.20001H4.50001C4.43361 4.20001 4.36681 4.23321 4.29961 4.29961C4.23321 4.36681 4.20001 4.43361 4.20001 4.50001V19.5C4.20001 19.5664 4.23321 19.6332 4.29961 19.7004C4.36681 19.7668 4.43361 19.8 4.50001 19.8Z\" />\n ),\n bassinet: (\n <>\n <path d=\"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z\" />\n <path d=\"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z\" />\n </>\n ),\n bedroom_parent: (\n <path d=\"M6.30001 16.5252H7.80001V15.3H16.2V16.5252H17.7V12.5496C17.7 12.2 17.5876 11.8792 17.3628 11.5872C17.138 11.296 16.8504 11.1004 16.5 11.0004V9.42481C16.5 8.97521 16.3416 8.59601 16.0248 8.28721C15.708 7.97921 15.3248 7.82521 14.8752 7.82521H12.0504C12.0168 7.82521 11.996 7.83361 11.988 7.85041C11.9792 7.86641 11.9832 7.89121 12 7.92481C12.0168 7.89121 12.0208 7.86641 12.012 7.85041C12.004 7.83361 11.9832 7.82521 11.9496 7.82521H9.12481C8.65841 7.82521 8.27081 7.97921 7.96201 8.28721C7.65401 8.59601 7.50001 8.97521 7.50001 9.42481V11.0004C7.14961 11.1004 6.86201 11.296 6.63721 11.5872C6.41241 11.8792 6.30001 12.2 6.30001 12.5496V16.5252ZM7.80001 13.8V12.6H16.2V13.8H7.80001ZM9.00001 11.1V9.62521C9.00001 9.52521 9.02921 9.44601 9.08761 9.38761C9.14601 9.32921 9.21681 9.30001 9.30001 9.30001H10.95C11.0332 9.30001 11.104 9.32921 11.1624 9.38761C11.2208 9.44601 11.25 9.52521 11.25 9.62521V11.1H9.00001ZM12.75 11.1V9.62521C12.75 9.52521 12.7792 9.44601 12.8376 9.38761C12.896 9.32921 12.9668 9.30001 13.05 9.30001H14.7C14.7832 9.30001 14.854 9.32921 14.9124 9.38761C14.9708 9.44601 15 9.52521 15 9.62521V11.1H12.75ZM4.50001 21.0996C4.05041 21.0996 3.67121 20.9456 3.36241 20.6376C3.05441 20.3288 2.90041 19.9496 2.90041 19.5V4.50001C2.90041 4.05041 3.05441 3.67121 3.36241 3.36241C3.67121 3.05441 4.05041 2.90041 4.50001 2.90041H19.5C19.9496 2.90041 20.3288 3.05441 20.6376 3.36241C20.9456 3.67121 21.0996 4.05041 21.0996 4.50001V19.5C21.0996 19.9496 20.9456 20.3288 20.6376 20.6376C20.3288 20.9456 19.9496 21.0996 19.5 21.0996H4.50001ZM4.50001 19.8H19.5C19.5664 19.8 19.6332 19.7668 19.7004 19.7004C19.7668 19.6332 19.8 19.5664 19.8 19.5V4.50001C19.8 4.43361 19.7668 4.36681 19.7004 4.29961C19.6332 4.23321 19.5664 4.20001 19.5 4.20001H4.50001C4.43361 4.20001 4.36681 4.23321 4.29961 4.29961C4.23321 4.36681 4.20001 4.43361 4.20001 4.50001V19.5C4.20001 19.5664 4.23321 19.6332 4.29961 19.7004C4.36681 19.7668 4.43361 19.8 4.50001 19.8Z\" />\n ),\n brunch_dining: (\n <path d=\"M3.15 21.2256C2.9836 21.2256 2.842 21.1672 2.7252 21.0504C2.6084 20.9336 2.55 20.792 2.55 20.6256V19.9248H15.75V20.6256C15.75 20.792 15.6916 20.9336 15.5748 21.0504C15.458 21.1672 15.3164 21.2256 15.15 21.2256H3.15ZM2.55 17.9256V17.2248C2.55 17.0584 2.6084 16.9168 2.7252 16.8C2.842 16.6832 2.9836 16.6248 3.15 16.6248H7.35V15.2496H10.95V16.6248H15.15C15.3164 16.6248 15.458 16.6832 15.5748 16.8C15.6916 16.9168 15.75 17.0584 15.75 17.2248V17.9256H2.55ZM18.2496 21.2256V14.9748C17.6336 14.7252 17.1544 14.2836 16.812 13.65C16.4704 13.0164 16.2996 12.3664 16.2996 11.7V3.02521H21.45V11.7C21.45 12.3664 21.2792 13.0164 20.9376 13.65C20.596 14.2836 20.1336 14.7252 19.5504 14.9748V19.9248H21.45V21.2256H18.2496ZM17.6004 8.70001H20.1504V4.32481H17.6004V8.70001ZM18.9 13.8504C19.2832 13.6664 19.5872 13.3788 19.812 12.9876C20.0376 12.5956 20.1504 12.1664 20.1504 11.7V9.99961H17.6004V11.7C17.6004 12.1664 17.7212 12.5956 17.9628 12.9876C18.2044 13.3788 18.5168 13.6664 18.9 13.8504Z\" />\n ),\n cabin_bag: (\n <path d=\"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z\" />\n ),\n calendar_month: (\n <path d=\"M5.69999 21.099C5.25039 21.099 4.87119 20.941 4.56239 20.625C4.25439 20.3082 4.10039 19.933 4.10039 19.4994V6.89943C4.10039 6.46583 4.25439 6.09103 4.56239 5.77503C4.87119 5.45823 5.25039 5.29983 5.69999 5.29983H7.89959V2.77383H9.22559V5.29983H14.7996V2.77383H16.1004V5.29983H18.3C18.7496 5.29983 19.1288 5.45823 19.4376 5.77503C19.7456 6.09103 19.8996 6.46583 19.8996 6.89943V19.4994C19.8996 19.933 19.7456 20.3082 19.4376 20.625C19.1288 20.941 18.7496 21.099 18.3 21.099H5.69999ZM5.69999 19.7994H18.3C18.3664 19.7994 18.4332 19.7662 18.5004 19.6998C18.5668 19.6326 18.6 19.5658 18.6 19.4994V11.0994H5.39999V19.4994C5.39999 19.5658 5.43319 19.6326 5.49959 19.6998C5.56679 19.7662 5.63359 19.7994 5.69999 19.7994ZM5.39999 9.79983H18.6V6.89943C18.6 6.83303 18.5668 6.76623 18.5004 6.69903C18.4332 6.63263 18.3664 6.59943 18.3 6.59943H5.69999C5.63359 6.59943 5.56679 6.63263 5.49959 6.69903C5.43319 6.76623 5.39999 6.83303 5.39999 6.89943V9.79983ZM12 14.4738C11.7832 14.4738 11.6 14.399 11.4504 14.2494C11.3 14.0998 11.2248 13.9166 11.2248 13.6998C11.2248 13.483 11.3 13.2954 11.4504 13.137C11.6 12.9786 11.7832 12.8994 12 12.8994C12.2168 12.8994 12.4 12.9786 12.5496 13.137C12.7 13.2954 12.7752 13.4746 12.7752 13.6746C12.7752 13.8914 12.7 14.079 12.5496 14.2374C12.4 14.395 12.2168 14.4738 12 14.4738ZM8.09999 14.4738C7.88319 14.4738 7.69999 14.399 7.55039 14.2494C7.39999 14.0998 7.32479 13.9166 7.32479 13.6998C7.32479 13.483 7.39999 13.2954 7.55039 13.137C7.69999 12.9786 7.88319 12.8994 8.09999 12.8994C8.31679 12.8994 8.49999 12.9786 8.64959 13.137C8.79999 13.2954 8.87519 13.4746 8.87519 13.6746C8.87519 13.8914 8.79999 14.079 8.64959 14.2374C8.49999 14.395 8.31679 14.4738 8.09999 14.4738ZM15.9 14.4738C15.6832 14.4738 15.5 14.399 15.3504 14.2494C15.2 14.0998 15.1248 13.9166 15.1248 13.6998C15.1248 13.483 15.2 13.2954 15.3504 13.137C15.5 12.9786 15.6832 12.8994 15.9 12.8994C16.1168 12.8994 16.3 12.9786 16.4496 13.137C16.6 13.2954 16.6752 13.4746 16.6752 13.6746C16.6752 13.8914 16.6 14.079 16.4496 14.2374C16.3 14.395 16.1168 14.4738 15.9 14.4738ZM12 17.9994C11.7832 17.9994 11.6 17.9242 11.4504 17.7738C11.3 17.6242 11.2248 17.441 11.2248 17.2242C11.2248 17.0074 11.3 16.8198 11.4504 16.6614C11.6 16.5038 11.7832 16.425 12 16.425C12.2168 16.425 12.4 16.5038 12.5496 16.6614C12.7 16.8198 12.7752 16.999 12.7752 17.199C12.7752 17.4158 12.7 17.6034 12.5496 17.7618C12.4 17.9202 12.2168 17.9994 12 17.9994ZM8.09999 17.9994C7.88319 17.9994 7.69999 17.9242 7.55039 17.7738C7.39999 17.6242 7.32479 17.441 7.32479 17.2242C7.32479 17.0074 7.39999 16.8198 7.55039 16.6614C7.69999 16.5038 7.88319 16.425 8.09999 16.425C8.31679 16.425 8.49999 16.5038 8.64959 16.6614C8.79999 16.8198 8.87519 16.999 8.87519 17.199C8.87519 17.4158 8.79999 17.6034 8.64959 17.7618C8.49999 17.9202 8.31679 17.9994 8.09999 17.9994ZM15.9 17.9994C15.6832 17.9994 15.5 17.9242 15.3504 17.7738C15.2 17.6242 15.1248 17.441 15.1248 17.2242C15.1248 17.0074 15.2 16.8198 15.3504 16.6614C15.5 16.5038 15.6832 16.425 15.9 16.425C16.1168 16.425 16.3 16.5038 16.4496 16.6614C16.6 16.8198 16.6752 16.999 16.6752 17.199C16.6752 17.4158 16.6 17.6034 16.4496 17.7618C16.3 17.9202 16.1168 17.9994 15.9 17.9994Z\" />\n ),\n carry_on_bag_inactive: (\n <path d=\"M15.6 13.0499L13.8 11.2499V8.9999H11.55L9.75 7.1999H13.8V4.1999C13.305 4.1999 12.8813 4.02365 12.5288 3.67115C12.1763 3.31865 12 2.8949 12 2.3999H15.6V13.0499ZM19.2 21.7749L18.375 20.9249C18.1583 21.5082 17.7958 21.9666 17.2875 22.2999C16.7792 22.6332 16.2167 22.7999 15.6 22.7999C14.872 22.7999 14.2233 22.5791 13.654 22.1374C13.0847 21.6957 12.75 21.1166 12.65 20.3999H7.8C7.305 20.3999 6.88125 20.2237 6.52875 19.8712C6.17625 19.5187 6 19.0949 6 18.5999V8.9999C6 8.93324 6.00417 8.86657 6.0125 8.7999C6.02083 8.73324 6.03333 8.66657 6.05 8.5999L2.25 4.7999L3.525 3.5249L20.475 20.4999L19.2 21.7749ZM9 18.5999V11.5499L7.8 10.3499V18.5999H9ZM15.6 20.9999C15.9333 20.9999 16.2167 20.8832 16.45 20.6499C16.6833 20.4166 16.8 20.1332 16.8 19.7999C16.8 19.4666 16.6833 19.1832 16.45 18.9499C16.2167 18.7166 15.9333 18.5999 15.6 18.5999C15.2667 18.5999 14.9833 18.7166 14.75 18.9499C14.5167 19.1832 14.4 19.4666 14.4 19.7999C14.4 20.1332 14.5167 20.4166 14.75 20.6499C14.9833 20.8832 15.2667 20.9999 15.6 20.9999ZM10.8 18.5999H12.85C12.9667 18.3666 13.1042 18.1499 13.2625 17.9499C13.4208 17.7499 13.6 17.5666 13.8 17.3999V16.3499L10.8 13.3499V18.5999Z\" />\n ),\n check: (\n <path d=\"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z\" />\n ),\n check_circle: (\n <path d=\"M10.6 16.6L17.65 9.55L16.25 8.15L10.6 13.8L7.75 10.95L6.35 12.35L10.6 16.6ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z\" />\n ),\n check_small: (\n <path d=\"M9.99946 16.1273L6.35026 12.4769L7.27426 11.5517L9.99946 14.2769L16.7255 7.55209L17.6495 8.47609L9.99946 16.1273Z\" />\n ),\n checked_bag: (\n <path d=\"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z\" />\n ),\n chevron: (\n <path d=\"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z\" />\n ),\n child_care: (\n <path d=\"M14.5 11.75C14.15 11.75 13.8542 11.6292 13.6125 11.3875C13.3708 11.1458 13.25 10.85 13.25 10.5C13.25 10.15 13.3708 9.85417 13.6125 9.6125C13.8542 9.37083 14.15 9.25 14.5 9.25C14.85 9.25 15.1458 9.37083 15.3875 9.6125C15.6292 9.85417 15.75 10.15 15.75 10.5C15.75 10.85 15.6292 11.1458 15.3875 11.3875C15.1458 11.6292 14.85 11.75 14.5 11.75ZM9.5 11.75C9.15 11.75 8.85417 11.6292 8.6125 11.3875C8.37083 11.1458 8.25 10.85 8.25 10.5C8.25 10.15 8.37083 9.85417 8.6125 9.6125C8.85417 9.37083 9.15 9.25 9.5 9.25C9.85 9.25 10.1458 9.37083 10.3875 9.6125C10.6292 9.85417 10.75 10.15 10.75 10.5C10.75 10.85 10.6292 11.1458 10.3875 11.3875C10.1458 11.6292 9.85 11.75 9.5 11.75ZM12 17C11 17 10.0958 16.725 9.2875 16.175C8.47917 15.625 7.88333 14.9 7.5 14H16.5C16.1167 14.9 15.5208 15.625 14.7125 16.175C13.9042 16.725 13 17 12 17ZM12 21C10.75 21 9.57917 20.7625 8.4875 20.2875C7.39583 19.8125 6.44583 19.1708 5.6375 18.3625C4.82917 17.5542 4.1875 16.6042 3.7125 15.5125C3.2375 14.4208 3 13.25 3 12C3 10.75 3.2375 9.57917 3.7125 8.4875C4.1875 7.39583 4.82917 6.44583 5.6375 5.6375C6.44583 4.82917 7.39583 4.1875 8.4875 3.7125C9.57917 3.2375 10.75 3 12 3C13.25 3 14.4208 3.2375 15.5125 3.7125C16.6042 4.1875 17.5542 4.82917 18.3625 5.6375C19.1708 6.44583 19.8125 7.39583 20.2875 8.4875C20.7625 9.57917 21 10.75 21 12C21 13.25 20.7625 14.4208 20.2875 15.5125C19.8125 16.6042 19.1708 17.5542 18.3625 18.3625C17.5542 19.1708 16.6042 19.8125 15.5125 20.2875C14.4208 20.7625 13.25 21 12 21ZM12 19C13.9333 19 15.5833 18.3167 16.95 16.95C18.3167 15.5833 19 13.9333 19 12C19 10.0667 18.3167 8.41667 16.95 7.05C15.5833 5.68333 13.9333 5 12 5H11.7C11.6 5 11.5 5.01667 11.4 5.05C11.3 5.15 11.2333 5.25833 11.2 5.375C11.1667 5.49167 11.15 5.61667 11.15 5.75C11.15 6.1 11.2708 6.39583 11.5125 6.6375C11.7542 6.87917 12.05 7 12.4 7C12.55 7 12.6875 6.975 12.8125 6.925C12.9375 6.875 13.0667 6.85 13.2 6.85C13.4 6.85 13.5667 6.925 13.7 7.075C13.8333 7.225 13.9 7.4 13.9 7.6C13.9 7.98333 13.7208 8.22917 13.3625 8.3375C13.0042 8.44583 12.6833 8.5 12.4 8.5C11.65 8.5 11.0042 8.22917 10.4625 7.6875C9.92083 7.14583 9.65 6.5 9.65 5.75V5.6C9.65 5.55 9.65833 5.48333 9.675 5.4C8.29167 5.9 7.16667 6.74167 6.3 7.925C5.43333 9.10833 5 10.4667 5 12C5 13.9333 5.68333 15.5833 7.05 16.95C8.41667 18.3167 10.0667 19 12 19Z\" />\n ),\n close: (\n <path d=\"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z\" />\n ),\n closet: (\n <path d=\"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z\" />\n ),\n concierge: (\n <path d=\"M10 22V20H23V22H10ZM11 19C11 17.65 11.425 16.4708 12.275 15.4625C13.125 14.4542 14.2 13.8333 15.5 13.6V12.975C15.5 12.6917 15.5958 12.4542 15.7875 12.2625C15.9792 12.0708 16.2167 11.975 16.5 11.975C16.7833 11.975 17.0208 12.0708 17.2125 12.2625C17.4042 12.4542 17.5 12.6917 17.5 12.975V13.6C18.7833 13.8333 19.8542 14.4542 20.7125 15.4625C21.5708 16.4708 22 17.65 22 19H11ZM13.625 16.975H19.325C19.0083 16.525 18.6042 16.1625 18.1125 15.8875C17.6208 15.6125 17.0833 15.475 16.5 15.475C15.9 15.475 15.35 15.6125 14.85 15.8875C14.35 16.1625 13.9417 16.525 13.625 16.975ZM1 13V2H7V3.45L14 1.5L22 4V5C22 5.83333 21.7083 6.54167 21.125 7.125C20.5417 7.70833 19.8333 8 19 8H17V8.6C17 9.01667 16.8792 9.39583 16.6375 9.7375C16.3958 10.0792 16.0833 10.325 15.7 10.475L8.95 13H1ZM3 11H5V4H3V11ZM7 11H8.6L14.4 8.875C14.5833 8.80833 14.7292 8.69583 14.8375 8.5375C14.9458 8.37917 15 8.2 15 8H13.225L10.3 8.95L9.7 7.05L12.825 6H19C19.15 6 19.3375 5.94583 19.5625 5.8375C19.7875 5.72917 19.9 5.6 19.9 5.45L13.95 3.6L7 5.5V11Z\" />\n ),\n credit_card: (\n <path d=\"M4 20C3.45 20 2.97933 19.8043 2.588 19.413C2.196 19.021 2 18.55 2 18V6C2 5.45 2.196 4.97933 2.588 4.588C2.97933 4.196 3.45 4 4 4H20C20.55 4 21.021 4.196 21.413 4.588C21.8043 4.97933 22 5.45 22 6V18C22 18.55 21.8043 19.021 21.413 19.413C21.021 19.8043 20.55 20 20 20H4ZM4 8V12H20V8H4Z\" />\n ),\n currency_exchange: (\n <path d=\"M12 21.6C10.1761 21.6 8.52211 21.1381 7.03805 20.2142C5.554 19.2896 4.40979 18.0507 3.60543 16.4974V19.5968H2.4V14.4696H7.50108V15.6821H4.53371C5.2134 17.1108 6.22182 18.2524 7.55896 19.1069C8.89609 19.9614 10.3764 20.3887 12 20.3887C13.1286 20.3887 14.1916 20.1791 15.1889 19.7601C16.1854 19.3403 17.0588 18.7654 17.809 18.0354C18.5584 17.3054 19.1572 16.443 19.6054 15.4483C20.0544 14.4543 20.3018 13.3825 20.3478 12.2326H21.5533C21.5228 13.5376 21.2487 14.7571 20.7307 15.8912C20.2128 17.0254 19.5286 18.0156 18.6783 18.8619C17.8279 19.709 16.8306 20.3771 15.6864 20.8663C14.5429 21.3554 13.3141 21.6 12 21.6ZM11.4201 17.9649V16.8934C11.1418 16.8315 10.7167 16.6529 10.1446 16.3576C9.57245 16.0624 9.13206 15.4565 8.82338 14.5401L9.93642 14.0502C9.99801 14.1128 10.1757 14.4275 10.4696 14.9942C10.7634 15.5616 11.3199 15.8454 12.1391 15.8454C12.5569 15.8454 12.9821 15.7208 13.4147 15.4718C13.8473 15.2235 14.0636 14.8119 14.0636 14.237C14.0636 13.7866 13.9167 13.4294 13.6228 13.1655C13.329 12.9015 12.8266 12.6372 12.1158 12.3725C11.5904 12.186 10.9645 11.9143 10.2381 11.5571C9.51161 11.1999 9.14838 10.5318 9.14838 9.55274C9.14838 9.53783 9.24485 9.18476 9.43778 8.49353C9.6307 7.80231 10.2993 7.34 11.4435 7.10661V6.03509H12.6033V7.08312C13.3913 7.2233 13.9437 7.50703 14.2606 7.93429C14.5774 8.36155 14.7744 8.65273 14.8516 8.80783L13.8321 9.25075C13.7549 9.11057 13.5809 8.88911 13.3101 8.58637C13.0392 8.28363 12.6255 8.13226 12.069 8.13226C11.7292 8.13226 11.3507 8.24486 10.9337 8.47005C10.5159 8.69524 10.3071 9.04868 10.3071 9.53037C10.3071 9.98075 10.4811 10.3223 10.8291 10.5549C11.1771 10.7883 11.7685 11.0448 12.6033 11.3244C13.6391 11.6816 14.3348 12.101 14.6902 12.5827C15.0457 13.0644 15.2234 13.6158 15.2234 14.237C15.2234 14.8119 15.1035 15.2742 14.8639 15.6239C14.6242 15.9729 14.3496 16.2447 14.0402 16.4393C13.7315 16.6332 13.434 16.761 13.1476 16.8229C12.8619 16.8856 12.6727 16.9169 12.5799 16.9169V17.9649H11.4201ZM2.44675 11.7674C2.49276 10.4311 2.77473 9.19222 3.29266 8.05061C3.8106 6.90901 4.50254 5.9184 5.36849 5.07878C6.23369 4.24066 7.23469 3.58448 8.37148 3.11024C9.50753 2.63675 10.717 2.4 12 2.4C13.8091 2.4 15.4631 2.86194 16.962 3.78581C18.4616 4.71043 19.6058 5.965 20.3946 7.54953V4.40322H21.6V9.53037H16.4989V8.31793H19.4663C18.8014 6.91982 17.8004 5.78604 16.4633 4.9166C15.1262 4.04642 13.6384 3.61132 12 3.61132C10.887 3.61132 9.83587 3.82086 8.84675 4.23992C7.85688 4.65972 6.98314 5.2309 6.22553 5.95344C5.46866 6.67524 4.86205 7.5335 4.40571 8.52821C3.94936 9.52217 3.69818 10.6019 3.65218 11.7674H2.44675Z\" />\n ),\n dinner_dining: (\n <path d=\"M4.05 20.1252L2.7504 18.8256H21.2256L19.9248 20.1252H4.05ZM4.0248 17.25C4.1248 17.0332 4.2664 16.8164 4.4496 16.5996C4.6336 16.3828 4.8588 16.1664 5.1252 15.9504V9.4248H3.9252V8.5248H5.1252V7.2504H3.9252V6.3504H5.1252V5.0496H3.9252V4.1496H9.6252C10.1748 4.1496 10.6664 4.354 11.1 4.7628C11.5336 5.1708 11.7504 5.7 11.7504 6.3504H20.4252V7.2504H11.7504C11.7504 7.8832 11.5336 8.404 11.1 8.8128C10.6664 9.2208 10.1748 9.4248 9.6252 9.4248H8.4252V15.2496C8.7748 15.3328 9.108 15.4456 9.4248 15.588C9.7416 15.7296 10.0332 15.9168 10.2996 16.1496C10.5164 15.0496 11.0832 14.1416 12 13.4256C12.9168 12.7088 13.9752 12.3504 15.1752 12.3504C16.5584 12.3504 17.7376 12.792 18.7128 13.6752C19.6872 14.5584 20.1996 15.6584 20.25 16.9752V17.25H4.0248ZM11.8248 15.9504H18.6C18.4336 15.3336 18.0296 14.796 17.388 14.3376C16.7464 13.8792 16.0088 13.65 15.1752 13.65C14.3416 13.65 13.6164 13.8752 12.9996 14.3256C12.3828 14.7752 11.9912 15.3168 11.8248 15.9504ZM8.4252 6.3504H10.4496V5.3496C10.4496 5.2832 10.4164 5.2168 10.35 5.1504C10.2836 5.0832 10.2088 5.0496 10.1256 5.0496H8.4252V6.3504ZM8.4252 8.5248H10.1256C10.2088 8.5248 10.2836 8.4956 10.35 8.4372C10.4164 8.3788 10.4496 8.308 10.4496 8.2248V7.2504H8.4252V8.5248ZM6.0252 6.3504H7.5252V5.0496H6.0252V6.3504ZM6.0252 8.5248H7.5252V7.2504H6.0252V8.5248ZM6.0252 15.5004C6.258 15.3836 6.4956 15.3 6.738 15.2496C6.9796 15.2 7.242 15.1584 7.5252 15.1248V9.4248H6.0252V15.5004Z\" />\n ),\n exit_row: (\n <path d=\"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z\" />\n ),\n exit_row_right: (\n <path d=\"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z\" />\n ),\n expand_content: <path d=\"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z\" />,\n fitness_center: (\n <path d=\"M11.4 19.9L9.99998 18.5L13.55 14.95L5.04998 6.45001L1.49998 10L0.0999756 8.60001L1.49998 7.15001L0.0999756 5.75001L2.19998 3.65001L0.799976 2.20001L2.19998 0.800006L3.64998 2.20001L5.74998 0.100006L7.14998 1.50001L8.59998 0.100006L9.99998 1.50001L6.44998 5.05001L14.95 13.55L18.5 10L19.9 11.4L18.5 12.85L19.9 14.25L17.8 16.35L19.2 17.8L17.8 19.2L16.35 17.8L14.25 19.9L12.85 18.5L11.4 19.9Z\" />\n ),\n flight: (\n <path d=\"M2.7252 8.6496L3.6 8.6496L5.1504 10.7496L11.0496 10.7496L8.7252 2.6496L10.0752 2.6496L14.7 10.7496L20.1 10.7496C20.4504 10.7496 20.7464 10.8704 20.988 11.112C21.2296 11.3536 21.3504 11.6496 21.3504 12C21.3504 12.3504 21.2296 12.6464 20.988 12.888C20.7464 13.1296 20.4504 13.2504 20.1 13.2504L14.7 13.2504L10.0752 21.3504L8.7252 21.3504L11.0496 13.2504L5.1744 13.2504L3.6 15.3504L2.7252 15.3504L3.8748 12L2.7252 8.6496Z\" />\n ),\n flight_class: (\n <path d=\"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z\" />\n ),\n flight_landing: (\n <path d=\"M3.84961 20.151V18.8502H20.1504V20.151H3.84961ZM18.45 15.3006L3.84961 11.2254V6.35098L4.89961 6.67498L5.64961 8.97538L9.84961 10.1502V2.72578L11.2752 3.20098L13.8996 11.301L19.2 12.7758C19.4664 12.8422 19.6912 12.9922 19.8744 13.2258C20.0584 13.4586 20.1504 13.7254 20.1504 14.0262C20.1504 14.4758 19.9752 14.8338 19.6248 15.1002C19.2752 15.3674 18.8836 15.4342 18.45 15.3006Z\" />\n ),\n flight_takeoff: (\n <path d=\"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z\" />\n ),\n galley: (\n <path d=\"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z\" />\n ),\n hearing: (\n <path d=\"M17 22C15.9667 22 15.1208 21.7417 14.4625 21.225C13.8042 20.7083 13.3 19.95 12.95 18.95C12.6667 18.1167 12.3958 17.5333 12.1375 17.2C11.8792 16.8667 11.2833 16.3333 10.35 15.6C9.31667 14.7667 8.5 13.825 7.9 12.775C7.3 11.725 7 10.4667 7 9.00001C7 7.01668 7.67083 5.35418 9.0125 4.01251C10.3542 2.67085 12.0167 2.00001 14 2.00001C15.9833 2.00001 17.6458 2.67085 18.9875 4.01251C20.3292 5.35418 21 7.01668 21 9.00001H19C19 7.58335 18.5208 6.39585 17.5625 5.43751C16.6042 4.47918 15.4167 4.00001 14 4.00001C12.5833 4.00001 11.3958 4.47918 10.4375 5.43751C9.47917 6.39585 9 7.58335 9 9.00001C9 10.1333 9.225 11.1 9.675 11.9C10.125 12.7 10.7667 13.4167 11.6 14.05C12.4667 14.6833 13.1417 15.3 13.625 15.9C14.1083 16.5 14.4667 17.15 14.7 17.85C14.9333 18.5833 15.2125 19.125 15.5375 19.475C15.8625 19.825 16.35 20 17 20C17.55 20 18.0208 19.8042 18.4125 19.4125C18.8042 19.0208 19 18.55 19 18H21C21 19.1 20.6083 20.0417 19.825 20.825C19.0417 21.6083 18.1 22 17 22ZM6.2 16.75C5.21667 15.75 4.4375 14.5875 3.8625 13.2625C3.2875 11.9375 3 10.5167 3 9.00001C3 7.46668 3.2875 6.03335 3.8625 4.70001C4.4375 3.36668 5.21667 2.20001 6.2 1.20001L7.65 2.60001C6.81667 3.43335 6.16667 4.39585 5.7 5.48751C5.23333 6.57918 5 7.75001 5 9.00001C5 10.2333 5.23333 11.3917 5.7 12.475C6.16667 13.5583 6.81667 14.5167 7.65 15.35L6.2 16.75ZM14 11.5C13.3 11.5 12.7083 11.2542 12.225 10.7625C11.7417 10.2708 11.5 9.68335 11.5 9.00001C11.5 8.30001 11.7417 7.70835 12.225 7.22501C12.7083 6.74168 13.3 6.50001 14 6.50001C14.7 6.50001 15.2917 6.74168 15.775 7.22501C16.2583 7.70835 16.5 8.30001 16.5 9.00001C16.5 9.68335 16.2583 10.2708 15.775 10.7625C15.2917 11.2542 14.7 11.5 14 11.5Z\" />\n ),\n image_not_supported: (\n <path d=\"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z\" />\n ),\n info_outline: (\n <path d=\"M11 17H13V11H11V17ZM12 9C12.2833 9 12.521 8.904 12.713 8.712C12.9043 8.52067 13 8.28333 13 8C13 7.71667 12.9043 7.479 12.713 7.287C12.521 7.09567 12.2833 7 12 7C11.7167 7 11.4793 7.09567 11.288 7.287C11.096 7.479 11 7.71667 11 8C11 8.28333 11.096 8.52067 11.288 8.712C11.4793 8.904 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z\" />\n ),\n laundry: (\n <path d=\"M3.125 9L0.125 3.8L6.725 0H8C8.26667 0.8 8.58333 1.5 8.95 2.1C9.31667 2.7 10 3 11 3C12 3 12.6833 2.7 13.05 2.1C13.4167 1.5 13.7333 0.8 14 0H15.275L21.85 3.825L18.875 9L17 7.975V12.775L15.425 14.15C15.375 14.1833 15.3083 14.225 15.225 14.275C15.1417 14.325 15.0667 14.3667 15 14.4V4.575L18.125 6.3L19.125 4.55L15.3 2.325C14.9 3.14167 14.3125 3.79167 13.5375 4.275C12.7625 4.75833 11.9167 5 11 5C10.0833 5 9.2375 4.75833 8.4625 4.275C7.6875 3.79167 7.1 3.14167 6.7 2.325L2.85 4.55L3.875 6.3L7 4.575V10.5C6.65 10.5333 6.30833 10.5875 5.975 10.6625C5.64167 10.7375 5.31667 10.8417 5 10.975V7.975L3.125 9ZM3.65 16.375L2.35 14.85L4.525 13C4.90833 12.6667 5.34583 12.4125 5.8375 12.2375C6.32917 12.0625 6.84167 11.975 7.375 11.975C7.90833 11.975 8.41667 12.0625 8.9 12.2375C9.38333 12.4125 9.81667 12.6667 10.2 13L13.1 15.475C13.3 15.6417 13.5375 15.7708 13.8125 15.8625C14.0875 15.9542 14.3667 16 14.65 16C14.95 16 15.2292 15.9583 15.4875 15.875C15.7458 15.7917 15.975 15.6583 16.175 15.475L18.35 13.6L19.65 15.15L17.475 17C17.0917 17.3333 16.6583 17.5833 16.175 17.75C15.6917 17.9167 15.1833 18 14.65 18C14.1167 18 13.6042 17.9167 13.1125 17.75C12.6208 17.5833 12.1833 17.3333 11.8 17L8.9 14.525C8.7 14.3583 8.47083 14.2292 8.2125 14.1375C7.95417 14.0458 7.675 14 7.375 14C7.09167 14 6.8125 14.0458 6.5375 14.1375C6.2625 14.2292 6.025 14.3583 5.825 14.525L3.65 16.375Z\" />\n ),\n lavatory: (\n <path d=\"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z\" />\n ),\n lie_flat_seat: (\n <path d=\"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z\" />\n ),\n local_bar: (\n <path d=\"M6 21V19H11V14L3 5V3H21V5L13 14V19H18V21H6ZM7.45 7H16.55L18.35 5H5.65L7.45 7ZM12 12.1L14.775 9H9.225L12 12.1Z\" />\n ),\n local_parking: (\n <path d=\"M6 21V3H13C14.6667 3 16.0833 3.58333 17.25 4.75C18.4167 5.91667 19 7.33333 19 9C19 10.6667 18.4167 12.0833 17.25 13.25C16.0833 14.4167 14.6667 15 13 15H10V21H6ZM10 11H13.2C13.75 11 14.2208 10.8042 14.6125 10.4125C15.0042 10.0208 15.2 9.55 15.2 9C15.2 8.45 15.0042 7.97917 14.6125 7.5875C14.2208 7.19583 13.75 7 13.2 7H10V11Z\" />\n ),\n loyalty: (\n <path d=\"M13 17.5L16.5 14C16.6833 13.8167 16.8293 13.6 16.938 13.35C17.046 13.1 17.1 12.8333 17.1 12.55C17.1 11.9833 16.9 11.5 16.5 11.1C16.1 10.7 15.6167 10.5 15.05 10.5C14.7333 10.5 14.421 10.5917 14.113 10.775C13.8043 10.9583 13.4333 11.2667 13 11.7C12.5 11.2333 12.1083 10.9167 11.825 10.75C11.5417 10.5833 11.25 10.5 10.95 10.5C10.3833 10.5 9.9 10.7 9.5 11.1C9.1 11.5 8.9 11.9833 8.9 12.55C8.9 12.8333 8.954 13.1 9.062 13.35C9.17067 13.6 9.31667 13.8167 9.5 14L13 17.5ZM12.85 22C12.5667 22 12.3 21.9457 12.05 21.837C11.8 21.729 11.5833 21.5833 11.4 21.4L2.6 12.6C2.41667 12.4167 2.271 12.2 2.163 11.95C2.05433 11.7 2 11.4333 2 11.15V4C2 3.45 2.196 2.979 2.588 2.587C2.97933 2.19567 3.45 2 4 2H11.15C11.4333 2 11.7 2.054 11.95 2.162C12.2 2.27067 12.4167 2.41667 12.6 2.6L21.4 11.425C21.7833 11.8083 21.975 12.279 21.975 12.837C21.975 13.3957 21.7833 13.8667 21.4 14.25L14.25 21.4C14.0667 21.5833 13.8543 21.729 13.613 21.837C13.371 21.9457 13.1167 22 12.85 22ZM6.5 8C6.91667 8 7.27067 7.854 7.562 7.562C7.854 7.27067 8 6.91667 8 6.5C8 6.08333 7.854 5.72933 7.562 5.438C7.27067 5.146 6.91667 5 6.5 5C6.08333 5 5.72933 5.146 5.438 5.438C5.146 5.72933 5 6.08333 5 6.5C5 6.91667 5.146 7.27067 5.438 7.562C5.72933 7.854 6.08333 8 6.5 8Z\" />\n ),\n luggage: (\n <path d=\"M7.5 19.8996C7.0664 19.8996 6.6912 19.754 6.3744 19.4628C6.0584 19.1708 5.9004 18.808 5.9004 18.3744V7.97521C5.9004 7.55841 6.0544 7.20841 6.3624 6.92521C6.6712 6.64201 7.0336 6.50041 7.4496 6.50041H9.8496V4.29961C9.8496 3.99961 9.9332 3.74161 10.1004 3.52561C10.2668 3.30881 10.4832 3.20041 10.7496 3.20041H13.2504C13.5168 3.20041 13.7332 3.30881 13.8996 3.52561C14.0668 3.74161 14.1504 3.99961 14.1504 4.29961V6.50041H16.5C16.9336 6.50041 17.3088 6.65881 17.6256 6.97561C17.9416 7.29161 18.0996 7.67481 18.0996 8.12521V18.3504C18.0996 18.7664 17.9416 19.1288 17.6256 19.4376C17.3088 19.7456 16.9336 19.8996 16.5 19.8996V20.0256C16.5 20.292 16.404 20.5168 16.212 20.7C16.0208 20.8832 15.8 20.9748 15.5496 20.9748C15.3168 20.9748 15.1044 20.8832 14.9124 20.7C14.7212 20.5168 14.6256 20.292 14.6256 20.0256V19.8996H9.3744V20.0496C9.3744 20.3 9.2828 20.5168 9.0996 20.7C8.9164 20.8832 8.6916 20.9748 8.4252 20.9748C8.1748 20.9748 7.958 20.8832 7.7748 20.7C7.5916 20.5168 7.5 20.3 7.5 20.0496V19.8996ZM10.7496 6.50041H13.2504V4.07521H10.7496V6.50041ZM7.5 18.6H16.5C16.5832 18.6 16.654 18.5708 16.7124 18.5124C16.7708 18.454 16.8 18.3832 16.8 18.3V8.10001C16.8 8.01681 16.7708 7.94601 16.7124 7.88761C16.654 7.82921 16.5832 7.80001 16.5 7.80001H7.5C7.4168 7.80001 7.346 7.82921 7.2876 7.88761C7.2292 7.94601 7.2 8.01681 7.2 8.10001V18.3C7.2 18.3832 7.2292 18.454 7.2876 18.5124C7.346 18.5708 7.4168 18.6 7.5 18.6ZM8.55 17.1504H9.45V9.24961H8.55V17.1504ZM11.55 17.1504H12.45V9.24961H11.55V17.1504ZM14.55 17.1504H15.45V9.24961H14.55V17.1504Z\" />\n ),\n meeting_room: (\n <path d=\"M3 21V19H5V3H15V4H19V19H21V21H17V6H15V21H3ZM11 13C11.2833 13 11.5208 12.9042 11.7125 12.7125C11.9042 12.5208 12 12.2833 12 12C12 11.7167 11.9042 11.4792 11.7125 11.2875C11.5208 11.0958 11.2833 11 11 11C10.7167 11 10.4792 11.0958 10.2875 11.2875C10.0958 11.4792 10 11.7167 10 12C10 12.2833 10.0958 12.5208 10.2875 12.7125C10.4792 12.9042 10.7167 13 11 13ZM7 19H13V5H7V19Z\" />\n ),\n minus: (\n <path d=\"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z\" />\n ),\n no_airplane: (\n <path d=\"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z\" />\n ),\n no_bag: (\n <path d=\"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z\" />\n ),\n no_seat: (\n <>\n <path d=\"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z\" />\n <path d=\"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z\" />\n </>\n ),\n no_stroller: (\n <path d=\"M5.00002 20C4.45002 20 3.97919 19.8042 3.58752 19.4125C3.19586 19.0208 3.00002 18.55 3.00002 18C3.00002 17.45 3.19586 16.9792 3.58752 16.5875C3.97919 16.1958 4.45002 16 5.00002 16C5.55002 16 6.02086 16.1958 6.41252 16.5875C6.80419 16.9792 7.00002 17.45 7.00002 18C7.00002 18.55 6.80419 19.0208 6.41252 19.4125C6.02086 19.8042 5.55002 20 5.00002 20ZM16 12.175L14 10.175V6.64999L12.4 8.54999L10.975 7.14999L15.2 2.17499C15.5334 1.79165 15.9084 1.49999 16.325 1.29999C16.7417 1.09999 17.1834 0.999988 17.65 0.999988C18.5834 0.999988 19.375 1.32499 20.025 1.97499C20.675 2.62499 21 3.41665 21 4.34999V4.99999H19V4.34999C19 3.96665 18.8709 3.64582 18.6125 3.38749C18.3542 3.12915 18.0334 2.99999 17.65 2.99999C17.4834 2.99999 17.325 3.03332 17.175 3.09999C17.025 3.16665 16.8917 3.26665 16.775 3.39999L16 4.27499V12.175ZM14 13L15.4 14.4C15.2167 14.5833 15.0084 14.7292 14.775 14.8375C14.5417 14.9458 14.2834 15 14 15H6.42502C5.99169 15 5.68752 14.8083 5.51252 14.425C5.33752 14.0417 5.39169 13.6833 5.67502 13.35L8.37502 10.175L0.400024 2.22499L1.80002 0.799988L20.2 19.2L18.775 20.6L9.77502 11.6L8.60002 13H14ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1959 19.0208 13 18.55 13 18C13 17.45 13.1959 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0209 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0209 19.8042 15.55 20 15 20ZM9.90002 6.07499L8.47502 4.64999L9.85002 3.04999C9.71669 3.01665 9.57502 2.99999 9.42502 2.99999H9.00002C8.66669 2.99999 8.34586 3.02499 8.03752 3.07499C7.72919 3.12499 7.41669 3.19165 7.10002 3.27499L5.52502 1.69999C6.07502 1.46665 6.64169 1.29165 7.22502 1.17499C7.80836 1.05832 8.40002 0.999988 9.00002 0.999988C9.75002 0.999988 10.4875 1.09165 11.2125 1.27499C11.9375 1.45832 12.6334 1.73332 13.3 2.09999L9.90002 6.07499Z\" />\n ),\n north_east: (\n <path d=\"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z\" />\n ),\n pet_supplies: (\n <path d=\"M9.5 22C8.51667 22 7.6875 21.6625 7.0125 20.9875C6.3375 20.3125 6 19.4833 6 18.5C6 18.35 6.02083 18.2333 6.0625 18.15C6.10417 18.0667 6.1 18 6.05 17.95C6 17.9 5.93333 17.8958 5.85 17.9375C5.76667 17.9792 5.65 18 5.5 18C4.51667 18 3.6875 17.6625 3.0125 16.9875C2.3375 16.3125 2 15.4833 2 14.5C2 13.5167 2.3375 12.6875 3.0125 12.0125C3.6875 11.3375 4.51667 11 5.5 11C5.88333 11 6.23333 11.05 6.55 11.15C6.86667 11.25 7.16667 11.4 7.45 11.6L11.6 7.45C11.4 7.16667 11.25 6.86667 11.15 6.55C11.05 6.23333 11 5.88333 11 5.5C11 4.51667 11.3375 3.6875 12.0125 3.0125C12.6875 2.3375 13.5167 2 14.5 2C15.4833 2 16.3125 2.3375 16.9875 3.0125C17.6625 3.6875 18 4.51667 18 5.5C18 5.65 17.9792 5.76667 17.9375 5.85C17.8958 5.93333 17.9 6 17.95 6.05C18 6.1 18.0667 6.10417 18.15 6.0625C18.2333 6.02083 18.35 6 18.5 6C19.4833 6 20.3125 6.3375 20.9875 7.0125C21.6625 7.6875 22 8.51667 22 9.5C22 10.4833 21.6625 11.3125 20.9875 11.9875C20.3125 12.6625 19.4833 13 18.5 13C18.1167 13 17.7667 12.95 17.45 12.85C17.1333 12.75 16.8333 12.6 16.55 12.4L12.4 16.55C12.6 16.8333 12.75 17.1333 12.85 17.45C12.95 17.7667 13 18.1167 13 18.5C13 19.4833 12.6625 20.3125 11.9875 20.9875C11.3125 21.6625 10.4833 22 9.5 22ZM9.5 20C9.93333 20 10.2917 19.8583 10.575 19.575C10.8583 19.2917 11 18.9333 11 18.5C11 18.35 10.9792 18.2042 10.9375 18.0625C10.8958 17.9208 10.8333 17.7833 10.75 17.65C10.4667 17.25 10.35 16.8208 10.4 16.3625C10.45 15.9042 10.65 15.5 11 15.15L15.15 11C15.5 10.65 15.9042 10.45 16.3625 10.4C16.8208 10.35 17.25 10.4667 17.65 10.75C17.7833 10.8333 17.9208 10.8958 18.0625 10.9375C18.2042 10.9792 18.35 11 18.5 11C18.9333 11 19.2917 10.8583 19.575 10.575C19.8583 10.2917 20 9.93333 20 9.5C20 9.06667 19.8583 8.70833 19.575 8.425C19.2917 8.14167 18.9333 8 18.5 8C17.9167 8 17.5083 7.97083 17.275 7.9125C17.0417 7.85417 16.8 7.7 16.55 7.45C16.3 7.2 16.1458 6.95833 16.0875 6.725C16.0292 6.49167 16 6.08333 16 5.5C16 5.06667 15.8583 4.70833 15.575 4.425C15.2917 4.14167 14.9333 4 14.5 4C14.0667 4 13.7083 4.14167 13.425 4.425C13.1417 4.70833 13 5.06667 13 5.5C13 5.68333 13.0167 5.8375 13.05 5.9625C13.0833 6.0875 13.15 6.21667 13.25 6.35C13.5333 6.75 13.65 7.17917 13.6 7.6375C13.55 8.09583 13.35 8.5 13 8.85L8.85 13C8.5 13.35 8.09583 13.55 7.6375 13.6C7.17917 13.65 6.75 13.5333 6.35 13.25C6.21667 13.1667 6.07917 13.1042 5.9375 13.0625C5.79583 13.0208 5.65 13 5.5 13C5.06667 13 4.70833 13.1417 4.425 13.425C4.14167 13.7083 4 14.0667 4 14.5C4 14.9333 4.14167 15.2917 4.425 15.575C4.70833 15.8583 5.06667 16 5.5 16C6.08333 16 6.49167 16.0292 6.725 16.0875C6.95833 16.1458 7.2 16.3 7.45 16.55C7.7 16.8 7.85417 17.0417 7.9125 17.275C7.97083 17.5083 8 17.9167 8 18.5C8 18.9333 8.14167 19.2917 8.425 19.575C8.70833 19.8583 9.06667 20 9.5 20Z\" />\n ),\n pool: (\n <path d=\"M2 21V19C2.63333 19 3.10833 18.8333 3.425 18.5C3.74167 18.1667 4.36667 18 5.3 18C6.23333 18 6.875 18.1667 7.225 18.5C7.575 18.8333 8.05 19 8.65 19C9.25 19 9.725 18.8333 10.075 18.5C10.425 18.1667 11.0667 18 12 18C12.9333 18 13.575 18.1667 13.925 18.5C14.275 18.8333 14.75 19 15.35 19C15.95 19 16.425 18.8333 16.775 18.5C17.125 18.1667 17.7667 18 18.7 18C19.6333 18 20.2583 18.1667 20.575 18.5C20.8917 18.8333 21.3667 19 22 19V21C21.0167 21 20.3708 20.8333 20.0625 20.5C19.7542 20.1667 19.3 20 18.7 20C18.1 20 17.625 20.1667 17.275 20.5C16.925 20.8333 16.2833 21 15.35 21C14.4167 21 13.775 20.8333 13.425 20.5C13.075 20.1667 12.6 20 12 20C11.4 20 10.925 20.1667 10.575 20.5C10.225 20.8333 9.58333 21 8.65 21C7.71667 21 7.075 20.8333 6.725 20.5C6.375 20.1667 5.9 20 5.3 20C4.7 20 4.24583 20.1667 3.9375 20.5C3.62917 20.8333 2.98333 21 2 21ZM2 16.5V14.5C2.63333 14.5 3.10833 14.3333 3.425 14C3.74167 13.6667 4.36667 13.5 5.3 13.5C6.23333 13.5 6.87917 13.6667 7.2375 14C7.59583 14.3333 8.06667 14.5 8.65 14.5C9.25 14.5 9.725 14.3333 10.075 14C10.425 13.6667 11.0667 13.5 12 13.5C12.9333 13.5 13.575 13.6667 13.925 14C14.275 14.3333 14.75 14.5 15.35 14.5C15.95 14.5 16.425 14.3333 16.775 14C17.125 13.6667 17.7667 13.5 18.7 13.5C19.6333 13.5 20.2583 13.6667 20.575 14C20.8917 14.3333 21.3667 14.5 22 14.5V16.5C21.0167 16.5 20.3708 16.3333 20.0625 16C19.7542 15.6667 19.3 15.5 18.7 15.5C18.1 15.5 17.6375 15.6667 17.3125 16C16.9875 16.3333 16.3333 16.5 15.35 16.5C14.4 16.5 13.7542 16.3333 13.4125 16C13.0708 15.6667 12.6 15.5 12 15.5C11.3667 15.5 10.8958 15.6667 10.5875 16C10.2792 16.3333 9.63333 16.5 8.65 16.5C7.66667 16.5 7.0125 16.3333 6.6875 16C6.3625 15.6667 5.9 15.5 5.3 15.5C4.7 15.5 4.24583 15.6667 3.9375 16C3.62917 16.3333 2.98333 16.5 2 16.5ZM6.9 11.4L10.225 8.075L9.225 7.075C8.675 6.525 8.09167 6.125 7.475 5.875C6.85833 5.625 6.1 5.5 5.2 5.5V3C6.45 3 7.48333 3.1375 8.3 3.4125C9.11667 3.6875 9.91667 4.21667 10.7 5L17.1 11.4C16.8167 11.5833 16.5417 11.7292 16.275 11.8375C16.0083 11.9458 15.7 12 15.35 12C14.75 12 14.275 11.8333 13.925 11.5C13.575 11.1667 12.9333 11 12 11C11.0667 11 10.425 11.1667 10.075 11.5C9.725 11.8333 9.25 12 8.65 12C8.3 12 7.99167 11.9458 7.725 11.8375C7.45833 11.7292 7.18333 11.5833 6.9 11.4ZM16.7 3C17.4 3 17.9917 3.24583 18.475 3.7375C18.9583 4.22917 19.2 4.81667 19.2 5.5C19.2 6.2 18.9583 6.79167 18.475 7.275C17.9917 7.75833 17.4 8 16.7 8C16 8 15.4083 7.75833 14.925 7.275C14.4417 6.79167 14.2 6.2 14.2 5.5C14.2 4.81667 14.4417 4.22917 14.925 3.7375C15.4083 3.24583 16 3 16.7 3Z\" />\n ),\n refund: (\n <path d=\"M12 22.2996C10.0336 22.2996 8.25039 21.804 6.65039 20.8128C5.05039 19.8208 3.81679 18.4916 2.94959 16.8252V20.1504H1.64999V14.6496H7.14959V15.9504H3.95039C4.68319 17.4832 5.77039 18.708 7.21199 19.6248C8.65359 20.5416 10.2496 21 12 21C13.2168 21 14.3628 20.7752 15.438 20.3256C16.5124 19.8752 17.454 19.2584 18.2628 18.4752C19.0708 17.692 19.7164 16.7668 20.1996 15.6996C20.6836 14.6332 20.9504 13.4832 21 12.2496H22.2996C22.2668 13.6496 21.9712 14.958 21.4128 16.1748C20.8544 17.3916 20.1168 18.454 19.2 19.362C18.2832 20.2708 17.208 20.9876 15.9744 21.5124C14.7416 22.0372 13.4168 22.2996 12 22.2996ZM11.3748 18.3996V17.25C11.0748 17.1836 10.6164 16.992 9.99959 16.6752C9.38279 16.3584 8.90799 15.7084 8.57519 14.7252L9.77519 14.1996C9.84159 14.2668 10.0332 14.6044 10.35 15.2124C10.6668 15.8212 11.2668 16.1256 12.15 16.1256C12.6004 16.1256 13.0588 15.992 13.5252 15.7248C13.9916 15.4584 14.2248 15.0168 14.2248 14.4C14.2248 13.9168 14.0664 13.5336 13.7496 13.2504C13.4328 12.9672 12.8912 12.6836 12.1248 12.3996C11.5584 12.1996 10.8836 11.908 10.1004 11.5248C9.31719 11.1416 8.92559 10.4248 8.92559 9.37439C8.92559 9.35839 9.02959 8.97959 9.23759 8.23799C9.44559 7.49639 10.1664 7.00039 11.4 6.74999V5.60039H12.6504V6.72479C13.5 6.87519 14.0956 7.17959 14.4372 7.63799C14.7788 8.09639 14.9912 8.40879 15.0744 8.57519L13.9752 9.05039C13.892 8.89999 13.7044 8.66239 13.4124 8.33759C13.1204 8.01279 12.6744 7.85039 12.0744 7.85039C11.708 7.85039 11.3 7.97119 10.8504 8.21279C10.4 8.45439 10.1748 8.83359 10.1748 9.35039C10.1748 9.83359 10.3624 10.2 10.7376 10.4496C11.1128 10.7 11.7504 10.9752 12.6504 11.2752C13.7672 11.6584 14.5172 12.1084 14.9004 12.6252C15.2836 13.142 15.4752 13.7336 15.4752 14.4C15.4752 15.0168 15.346 15.5128 15.0876 15.888C14.8292 16.2624 14.5332 16.554 14.1996 16.7628C13.8668 16.9708 13.546 17.108 13.2372 17.1744C12.9292 17.2416 12.7252 17.2752 12.6252 17.2752V18.3996H11.3748ZM1.70039 11.7504C1.74999 10.3168 2.05399 8.98759 2.61239 7.76279C3.17079 6.53799 3.91679 5.47519 4.85039 4.57439C5.78319 3.67519 6.86239 2.97119 8.08799 2.46239C9.31279 1.95439 10.6168 1.70039 12 1.70039C13.9504 1.70039 15.7336 2.19599 17.3496 3.18719C18.9664 4.17919 20.2 5.52519 21.0504 7.22519V3.84959H22.35V9.35039H16.8504V8.04959H20.0496C19.3328 6.54959 18.2536 5.33319 16.812 4.40039C15.3704 3.46679 13.7664 2.99999 12 2.99999C10.8 2.99999 9.66679 3.22479 8.60039 3.67439C7.53319 4.12479 6.59119 4.73759 5.77439 5.51279C4.95839 6.28719 4.30439 7.20799 3.81239 8.27519C3.32039 9.34159 3.04959 10.5 2.99999 11.7504H1.70039Z\" />\n ),\n restaurant: (\n <path d=\"M7 22V12.85C6.15 12.6167 5.4375 12.15 4.8625 11.45C4.2875 10.75 4 9.93333 4 9V2H6V9H7V2H9V9H10V2H12V9C12 9.93333 11.7125 10.75 11.1375 11.45C10.5625 12.15 9.85 12.6167 9 12.85V22H7ZM17 22V14H14V7C14 5.61667 14.4875 4.4375 15.4625 3.4625C16.4375 2.4875 17.6167 2 19 2V22H17Z\" />\n ),\n room_service: (\n <path d=\"M2 19V17H22V19H2ZM3 16V15C3 12.8667 3.65417 10.9833 4.9625 9.35C6.27083 7.71667 7.95 6.68333 10 6.25V6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6V6.25C16.0667 6.68333 17.75 7.71667 19.05 9.35C20.35 10.9833 21 12.8667 21 15V16H3ZM5.05 14H18.95C18.7167 12.2667 17.9417 10.8333 16.625 9.7C15.3083 8.56667 13.7667 8 12 8C10.2333 8 8.69583 8.56667 7.3875 9.7C6.07917 10.8333 5.3 12.2667 5.05 14Z\" />\n ),\n seat: (\n <path d=\"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z\" />\n ),\n seat_paid_indicator: (\n <path d=\"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z\" />\n ),\n shield_with_moon: (\n <path d=\"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z\" />\n ),\n shopfront: (\n <path d=\"M3.44169 24C2.85311 24 2.35274 23.7684 1.94056 23.3051C1.52836 22.8419 1.32226 22.2796 1.32226 21.6181V10.5823C0.799276 10.1582 0.418175 9.57007 0.178961 8.81775C-0.0602524 8.06547 -0.0596523 7.26924 0.180762 6.42907L1.41133 1.89967C1.57544 1.33001 1.85381 0.870996 2.24645 0.522611C2.63907 0.174204 3.10812 0 3.6536 0H20.3251C20.8669 0 21.3336 0.165285 21.7251 0.495852C22.1166 0.826396 22.3988 1.28552 22.5716 1.87322L23.8192 6.42907C24.0597 7.27089 24.0603 8.06664 23.821 8.81632C23.5818 9.56601 23.2007 10.1636 22.6777 10.6091V21.6181C22.6777 22.2796 22.4716 22.8419 22.0594 23.3051C21.6473 23.7684 21.1469 24 20.5583 24H3.44169ZM14.6927 9.6564C15.3887 9.6564 15.9059 9.42334 16.2443 8.95724C16.5826 8.49116 16.7207 7.99064 16.6586 7.45566L15.9135 1.95246H12.8687V7.43686C12.8687 8.03356 13.0477 8.55266 13.4057 8.99416C13.7636 9.43565 14.1927 9.6564 14.6927 9.6564ZM9.18021 9.6564C9.7573 9.6564 10.2268 9.43565 10.5886 8.99416C10.9504 8.55266 11.1313 8.03356 11.1313 7.43686V1.95246H8.08649L7.34736 7.50932C7.28687 7.99331 7.42697 8.47215 7.76768 8.94583C8.1084 9.41954 8.57924 9.6564 9.18021 9.6564ZM3.73063 9.6564C4.20349 9.6564 4.60648 9.47284 4.93962 9.10573C5.27276 8.73862 5.47833 8.2794 5.55633 7.72805L6.30263 1.95246H3.59092C3.45559 1.95246 3.34713 1.986 3.26554 2.05308C3.18393 2.12018 3.12521 2.22084 3.08939 2.35505L1.87984 6.86788C1.69913 7.53078 1.77793 8.16126 2.11624 8.75931C2.45458 9.35737 2.9927 9.6564 3.73063 9.6564ZM20.2694 9.6564C20.9412 9.6564 21.468 9.37101 21.8497 8.80024C22.2314 8.22947 22.3216 7.58535 22.1202 6.86788L20.8796 2.32822C20.8397 2.19401 20.779 2.09783 20.6975 2.03968C20.6159 1.98153 20.5094 1.95246 20.378 1.95246H17.7033L18.4425 7.72805C18.5213 8.27377 18.7272 8.73159 19.0604 9.10151C19.3935 9.47143 19.7965 9.6564 20.2694 9.6564ZM3.44169 22.0476H20.5583C20.6698 22.0476 20.7613 22.0073 20.833 21.9268C20.9046 21.8463 20.9404 21.7434 20.9404 21.6181V11.4961C20.8115 11.5444 20.6943 11.5753 20.5888 11.5887C20.4833 11.6021 20.3768 11.6088 20.2692 11.6088C19.7168 11.6088 19.2309 11.4952 18.8115 11.268C18.3921 11.0407 17.9909 10.6766 17.6079 10.1757C17.2727 10.6122 16.8688 10.9602 16.396 11.2197C15.9233 11.4791 15.3839 11.6088 14.7778 11.6088C14.2565 11.6088 13.7684 11.4858 13.3134 11.2398C12.8585 10.9938 12.4249 10.6391 12.0125 10.1757C11.6288 10.6391 11.1942 10.9938 10.7086 11.2398C10.2231 11.4858 9.73901 11.6088 9.25649 11.6088C8.71371 11.6088 8.19715 11.4995 7.7068 11.2807C7.21646 11.062 6.78501 10.6936 6.41247 10.1757C5.87752 10.7768 5.39472 11.166 4.96408 11.3431C4.53342 11.5203 4.12242 11.6088 3.73106 11.6088C3.62182 11.6088 3.51006 11.6021 3.39577 11.5887C3.28149 11.5753 3.16941 11.5444 3.05955 11.4961V21.6181C3.05955 21.7434 3.09538 21.8463 3.16703 21.9268C3.23868 22.0073 3.33024 22.0476 3.44169 22.0476Z\" />\n ),\n shopping_bag: (\n <path d=\"M6.9 21.0996C6.4504 21.0996 6.0712 20.9456 5.7624 20.6376C5.4544 20.3288 5.3004 19.9496 5.3004 19.5V8.7C5.3004 8.2504 5.4544 7.8712 5.7624 7.5624C6.0712 7.2544 6.4504 7.1004 6.9 7.1004H8.6496V6.45C8.6496 5.5332 8.9456 4.7248 9.5376 4.0248C10.1296 3.3248 10.8836 2.95 11.7996 2.9004C12.7828 2.85 13.6204 3.154 14.3124 3.8124C15.0044 4.4708 15.3504 5.2832 15.3504 6.2496V7.1004H17.1C17.5496 7.1004 17.9288 7.2544 18.2376 7.5624C18.5456 7.8712 18.6996 8.2504 18.6996 8.7V19.5C18.6996 19.9496 18.5456 20.3288 18.2376 20.6376C17.9288 20.9456 17.5496 21.0996 17.1 21.0996H6.9ZM6.9 19.8H17.1C17.1664 19.8 17.2332 19.7668 17.3004 19.7004C17.3668 19.6332 17.4 19.5664 17.4 19.5V8.7C17.4 8.6336 17.3668 8.5668 17.3004 8.4996C17.2332 8.4332 17.1664 8.4 17.1 8.4H15.3504V10.1496C15.3504 10.3336 15.2876 10.488 15.162 10.6128C15.0372 10.7376 14.8832 10.8 14.7 10.8C14.5168 10.8 14.3628 10.7376 14.238 10.6128C14.1124 10.488 14.0496 10.3336 14.0496 10.1496V8.4H9.9504V10.1496C9.9504 10.3336 9.8876 10.488 9.762 10.6128C9.6372 10.7376 9.4832 10.8 9.3 10.8C9.1168 10.8 8.9628 10.7376 8.838 10.6128C8.7124 10.488 8.6496 10.3336 8.6496 10.1496V8.4H6.9C6.8336 8.4 6.7668 8.4332 6.6996 8.4996C6.6332 8.5668 6.6 8.6336 6.6 8.7V19.5C6.6 19.5664 6.6332 19.6332 6.6996 19.7004C6.7668 19.7668 6.8336 19.8 6.9 19.8ZM9.9504 7.1004H14.0496V6.2496C14.0496 5.6832 13.8496 5.2 13.4496 4.8C13.0496 4.4 12.5664 4.2 12 4.2C11.4168 4.2 10.9292 4.4 10.5372 4.8C10.146 5.2 9.9504 5.6832 9.9504 6.2496V7.1004Z\" />\n ),\n spa: (\n <path d=\"M12 22C10.7833 21.85 9.575 21.5208 8.375 21.0125C7.175 20.5042 6.10417 19.775 5.1625 18.825C4.22083 17.875 3.45833 16.675 2.875 15.225C2.29167 13.775 2 12.0333 2 10V9H3C3.85 9 4.725 9.10833 5.625 9.325C6.525 9.54167 7.36667 9.86667 8.15 10.3C8.35 8.86667 8.80417 7.39583 9.5125 5.8875C10.2208 4.37917 11.05 3.08333 12 2C12.95 3.08333 13.7792 4.37917 14.4875 5.8875C15.1958 7.39583 15.65 8.86667 15.85 10.3C16.6333 9.86667 17.475 9.54167 18.375 9.325C19.275 9.10833 20.15 9 21 9H22V10C22 12.0333 21.7083 13.775 21.125 15.225C20.5417 16.675 19.7792 17.875 18.8375 18.825C17.8958 19.775 16.8292 20.5042 15.6375 21.0125C14.4458 21.5208 13.2333 21.85 12 22ZM11.95 19.95C11.7667 17.1833 10.9458 15.0917 9.4875 13.675C8.02917 12.2583 6.21667 11.3833 4.05 11.05C4.23333 13.9 5.07917 16.025 6.5875 17.425C8.09583 18.825 9.88333 19.6667 11.95 19.95ZM12 13.6C12.25 13.2333 12.5542 12.8542 12.9125 12.4625C13.2708 12.0708 13.6167 11.7333 13.95 11.45C13.9167 10.5 13.7292 9.50833 13.3875 8.475C13.0458 7.44167 12.5833 6.43333 12 5.45C11.4167 6.43333 10.9542 7.44167 10.6125 8.475C10.2708 9.50833 10.0833 10.5 10.05 11.45C10.3833 11.7333 10.7333 12.0708 11.1 12.4625C11.4667 12.8542 11.7667 13.2333 12 13.6ZM13.95 19.5C14.5667 19.3 15.2083 19.0083 15.875 18.625C16.5417 18.2417 17.1625 17.7208 17.7375 17.0625C18.3125 16.4042 18.8042 15.5833 19.2125 14.6C19.6208 13.6167 19.8667 12.4333 19.95 11.05C18.3833 11.2833 17.0083 11.8042 15.825 12.6125C14.6417 13.4208 13.7333 14.45 13.1 15.7C13.3 16.2333 13.4708 16.8167 13.6125 17.45C13.7542 18.0833 13.8667 18.7667 13.95 19.5Z\" />\n ),\n stairs: (\n <path d=\"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z\" />\n ),\n star: (\n <path d=\"M5.825 22L8.15 14.4L2 10H9.6L12 2L14.4 10H22L15.85 14.4L18.175 22L12 17.3L5.825 22Z\" />\n ),\n unfold_more: (\n <path d=\"M12 20.0256L8.2752 16.2996L9.1752 15.3996L12 18.2256L14.8248 15.3996L15.7248 16.2996L12 20.0256ZM9.1752 8.55L8.2752 7.65L12 3.9252L15.7248 7.65L14.8248 8.55L12 5.7504L9.1752 8.55Z\" />\n ),\n wallet: (\n <path d=\"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V7.5H19V5H5V19H19V16.5H21V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM13 17C12.45 17 11.9792 16.8042 11.5875 16.4125C11.1958 16.0208 11 15.55 11 15V9C11 8.45 11.1958 7.97917 11.5875 7.5875C11.9792 7.19583 12.45 7 13 7H20C20.55 7 21.0208 7.19583 21.4125 7.5875C21.8042 7.97917 22 8.45 22 9V15C22 15.55 21.8042 16.0208 21.4125 16.4125C21.0208 16.8042 20.55 17 20 17H13ZM20 15V9H13V15H20ZM16 13.5C16.4167 13.5 16.7708 13.3542 17.0625 13.0625C17.3542 12.7708 17.5 12.4167 17.5 12C17.5 11.5833 17.3542 11.2292 17.0625 10.9375C16.7708 10.6458 16.4167 10.5 16 10.5C15.5833 10.5 15.2292 10.6458 14.9375 10.9375C14.6458 11.2292 14.5 11.5833 14.5 12C14.5 12.4167 14.6458 12.7708 14.9375 13.0625C15.2292 13.3542 15.5833 13.5 16 13.5Z\" />\n ),\n warning: (\n <path d=\"M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM8.21071 9.25592L10.9548 12L8.21071 14.7441L9.38922 15.9226L12.1333 13.1785L14.8774 15.9226L16.0559 14.7441L13.3118 12L16.0559 9.25592L14.8774 8.07741L12.1333 10.8215L9.38922 8.07741L8.21071 9.25592Z\" />\n ),\n wifi: (\n <path d=\"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z\" />\n ),\n};\n/* eslint-enable */\n\nexport type IconName = keyof typeof ICON_MAP;\n\nconst getIconPath = (name: IconName) => {\n if (!(name in ICON_MAP)) {\n log(`The icon \"${name}\" is missing from ICON_MAP`);\n return null;\n }\n return ICON_MAP[name];\n};\n\ninterface IconProps {\n name: IconName;\n className?: string;\n color?: Color;\n size?: number;\n onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;\n\n ml?: string;\n viewBox?: string;\n style?: React.CSSProperties;\n}\n\nexport const Icon: React.FunctionComponent<IconProps> = ({\n name,\n size,\n className,\n viewBox,\n color,\n style,\n}) => (\n <svg\n className={className}\n width={size || 24}\n height={size || 24}\n viewBox={viewBox || \"0 0 24 24\"}\n aria-label={name}\n data-testid={name}\n style={{\n display: \"block\",\n fill: `var(${color})` || \"currentColor\",\n ...style,\n }}\n >\n {getIconPath(name)}\n </svg>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon, IconName } from \"@components/shared/Icon\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\n\nconst BUTTON_VARIANTS = {\n primary: \"button--primary\",\n outlined: \"button--outlined\",\n destructive: \"button--destructive\",\n};\ntype ButtonVariants = keyof typeof BUTTON_VARIANTS;\n\nconst BUTTON_SIZES = {\n 32: \"button--32\",\n 40: \"button--40\",\n 48: \"button--48\",\n};\n\ntype ButtonSizes = keyof typeof BUTTON_SIZES;\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>;\n\nexport interface ButtonProps\n extends Pick<\n NativeButtonProps,\n \"id\" | \"onClick\" | \"disabled\" | \"children\" | \"className\" | \"type\"\n > {\n \"data-testid\"?: string;\n iconBefore?: IconName;\n variant?: ButtonVariants;\n size?: ButtonSizes;\n}\n\nexport const Button: React.FC<ButtonProps> = ({\n iconBefore,\n variant = \"primary\",\n size = 40,\n children,\n className,\n type = \"button\",\n ...nativeButtonProps\n}) => (\n <button\n type={type}\n className={classNames(\n \"button\",\n BUTTON_VARIANTS[variant],\n BUTTON_SIZES[size],\n className,\n )}\n {...nativeButtonProps}\n >\n {iconBefore && (\n <Icon\n className=\"duffel-button__icon duffel-button__icon--before\"\n name={iconBefore}\n />\n )}\n {children}\n </button>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\n\nexport const NonIdealState: React.FC<\n React.PropsWithChildren<{ style?: React.CSSProperties }>\n> = ({ style, children }) => (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"dashed 1px var(--GREY-300)\",\n borderRadius: \"4px\",\n paddingBlock: \"32px\",\n ...style,\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n maxWidth: \"470px\",\n }}\n >\n {children}\n </div>\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport { Button } from \"./Button\";\nimport { NonIdealState } from \"./NonIdealState\";\n\nexport const FetchOfferErrorState: React.FC<{\n height: string;\n message: string;\n}> = ({ height, message }) => (\n <NonIdealState style={{ minHeight: height }}>\n <p style={{ marginBlock: \"0\" }} className=\"p1--semibold\">\n Failed to load extras\n </p>\n <p\n className=\"p2--regular\"\n style={{\n color: \"var(--GREY-600)\",\n marginBlock: \"12px\",\n textAlign: \"center\",\n }}\n >\n {message\n ? message\n : \"Please try reloading. If the problem persists reach out to our support team.\"}\n </p>\n <div>\n <Button\n variant=\"outlined\"\n onClick={() => location.reload()}\n iconBefore=\"autorenew\"\n >\n Try again\n </Button>\n </div>\n </NonIdealState>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\n\nconst COMPONENT_CDN = process.env.COMPONENT_CDN || \"\";\nexport const hrefToComponentStyles = `${COMPONENT_CDN}/global.css`;\n\ntype WithComponentStylesProps = {\n children?: React.ReactNode;\n};\n\nexport const WithComponentStyles: React.FC<WithComponentStylesProps> = ({\n children,\n}) => (\n <>\n <link rel=\"stylesheet\" href={hrefToComponentStyles}></link>\n <div className=\"duffel-components\">{children}</div>\n </>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferAvailableService } from \"@duffel/api/types\";\n\nexport type ServicePriceMapById = Record<\n OfferAvailableService[\"id\"],\n Pick<OfferAvailableService, \"total_amount\" | \"total_currency\">\n>;\n\nexport const getServicePriceMapById = (\n availableServices: OfferAvailableService[],\n): ServicePriceMapById =>\n availableServices.reduce(\n (all, { id, total_amount, total_currency }) => ({\n [id]: {\n total_amount,\n total_currency,\n },\n ...all,\n }),\n {} as ServicePriceMapById,\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrder, Offer, SeatMap } from \"@duffel/api/types\";\nimport { captureErrorInSentry } from \"./captureErrorInSentry\";\nimport {\n ServicePriceMapById,\n getServicePriceMapById,\n} from \"./getServicePriceMapById\";\n\nexport const getTotalAmountForServices = (\n offer: Offer,\n selectedServices: CreateOrder[\"services\"],\n seatMaps?: SeatMap[],\n): number => {\n if (!offer || !selectedServices || selectedServices.length === 0) return 0;\n const servicePriceMap = getServicePriceMapById(offer.available_services);\n return getTotalAmountForServicesWithPriceMap(\n servicePriceMap,\n selectedServices,\n seatMaps,\n );\n};\n\nexport const getTotalAmountForServicesWithPriceMap = (\n servicePriceMap: ServicePriceMapById,\n selectedServices: CreateOrder[\"services\"],\n seatMaps?: SeatMap[],\n) =>\n (selectedServices || []).reduce(\n (total, { quantity, id }) => {\n let newTotal = total;\n\n if (id in servicePriceMap) {\n newTotal += quantity * +servicePriceMap[id].total_amount;\n } else if (seatMaps) {\n newTotal += quantity * getTotalAmountFromSeatMaps(id, seatMaps);\n } else {\n captureErrorInSentry(\n new Error(\n `The service id (${id}) provided could not be found in neither the offer nor the seat maps.`,\n ),\n );\n }\n\n return newTotal;\n },\n\n 0,\n );\n\nconst getTotalAmountFromSeatMaps = (serviceId: string, seatMaps: SeatMap[]) => {\n for (const seatMap of seatMaps) {\n for (const cabin of seatMap.cabins) {\n for (const row of cabin.rows) {\n for (const section of row.sections) {\n for (const element of section.elements) {\n if (\n element.type === \"seat\" &&\n Array.isArray(element.available_services)\n ) {\n const serviceMatch = element.available_services.find(\n (service) => service.id === serviceId,\n );\n if (serviceMatch) return +serviceMatch.total_amount;\n }\n }\n }\n }\n }\n }\n return 0;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrder, Offer, SeatMap } from \"@duffel/api/types\";\nimport { getTotalAmountForServices } from \"./getTotalAmountForServices\";\nimport { DuffelAncillariesProps } from \"src/types\";\n\ninterface CompileCreateOrderPayloadInput {\n offer: Offer;\n passengers: DuffelAncillariesProps[\"passengers\"];\n baggageSelectedServices: CreateOrder[\"services\"];\n seatSelectedServices: CreateOrder[\"services\"];\n cfarSelectedServices: CreateOrder[\"services\"];\n seatMaps?: SeatMap[];\n}\n\nexport const compileCreateOrderPayload = ({\n baggageSelectedServices,\n seatSelectedServices,\n cfarSelectedServices,\n offer,\n seatMaps,\n passengers,\n}: CompileCreateOrderPayloadInput): Partial<CreateOrder> => {\n const selectedServicesWithInformation = [\n ...(baggageSelectedServices ? baggageSelectedServices : []),\n ...(seatSelectedServices ? seatSelectedServices : []),\n ...(cfarSelectedServices ? cfarSelectedServices : []),\n ];\n\n const totalAmountWithServices =\n +offer.total_amount +\n getTotalAmountForServices(offer, selectedServicesWithInformation, seatMaps);\n\n return {\n ...(offer && { selected_offers: [offer.id] }),\n passengers,\n services: filterServicesForPayload(selectedServicesWithInformation),\n ...(offer && {\n payments: [\n {\n type: \"balance\",\n amount: `${totalAmountWithServices}`,\n currency: offer.total_currency,\n },\n ],\n }),\n type: \"instant\",\n metadata: { source: `duffel-ancillaries@${process.env.COMPONENT_VERSION}` },\n };\n};\n\nconst filterServicesForPayload = (\n selectedServices: CreateOrder[\"services\"],\n): CreateOrder[\"services\"] => {\n if (!Array.isArray(selectedServices)) return [];\n return selectedServices\n .filter(({ quantity }) => quantity > 0)\n .map(({ id, quantity }) => ({ id, quantity }));\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n DuffelAncillariesMarkup,\n DuffelAncillariesMarkupDefinition,\n DuffelAncillariesPriceFormatters,\n} from \"../types/DuffelAncillariesProps\";\n\nconst convertMarkupIntoPriceFormatter = (\n markup: DuffelAncillariesMarkupDefinition,\n) => {\n return (amount: number, currency: string) => {\n const { rate, amount: markupAmount } = markup;\n const newAmount = amount * (1 + rate) + markupAmount;\n return { amount: newAmount, currency };\n };\n};\n\nconst errorMessage =\n \"You cannot supply both markup and priceFormatters for the same service.\";\n\n/**\n * Creates price formatters from the markup and priceFormatters passed in.\n * Throws an error if both are supplied.\n * If neither are supplied, the priceFormatters will be undefined.\n *\n * @param markup The markup to be applied to the prices of the available services of an offer.\n * @param priceFormatters Price formatters to apply to the prices of the available services of an offer.\n * @returns\n */\nconst createPriceFormatters = (\n markup?: DuffelAncillariesMarkup,\n priceFormatters?: DuffelAncillariesPriceFormatters,\n): DuffelAncillariesPriceFormatters => {\n const formatters: DuffelAncillariesPriceFormatters = {};\n\n if (priceFormatters) {\n if (priceFormatters.bags) {\n formatters.bags = priceFormatters.bags;\n }\n if (priceFormatters.seats) {\n formatters.seats = priceFormatters.seats;\n }\n if (priceFormatters.cancel_for_any_reason) {\n formatters.cancel_for_any_reason = priceFormatters.cancel_for_any_reason;\n }\n }\n\n // Markup takes precedence over priceFormatters.\n if (markup) {\n if (markup.bags) {\n if (priceFormatters && priceFormatters.bags) {\n throw new Error(errorMessage);\n }\n formatters.bags = convertMarkupIntoPriceFormatter(markup.bags);\n }\n if (markup.seats) {\n if (priceFormatters && priceFormatters.seats) {\n throw new Error(errorMessage);\n }\n formatters.seats = convertMarkupIntoPriceFormatter(markup.seats);\n }\n if (markup.cancel_for_any_reason) {\n if (priceFormatters && priceFormatters.cancel_for_any_reason) {\n throw new Error(errorMessage);\n }\n formatters.cancel_for_any_reason = convertMarkupIntoPriceFormatter(\n markup.cancel_for_any_reason,\n );\n }\n }\n return formatters;\n};\n\nexport { createPriceFormatters };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n OfferAvailableService,\n OfferAvailableServiceBaggage,\n} from \"@duffel/api/types\";\n\nexport const isBaggageService = (\n service: OfferAvailableService,\n): service is OfferAvailableServiceBaggage => service.type === \"baggage\";\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n OfferAvailableService,\n OfferAvailableServiceCFAR,\n} from \"@duffel/api/types\";\n\nexport const isCancelForAnyReasonService = (\n service: OfferAvailableService,\n): service is OfferAvailableServiceCFAR =>\n service.type === \"cancel_for_any_reason\";\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer } from \"@duffel/api/types\";\nimport { DuffelAncillariesPriceFormatters } from \"../types/DuffelAncillariesProps\";\nimport { isBaggageService } from \"./isBaggageService\";\nimport { isCancelForAnyReasonService } from \"./isCancelForAnyReasonService\";\n\nconst multipleCurrenciesErrorMessage = (\n label: string,\n currencies: Set<string>,\n) => {\n return `${label} must all have the same currency, but they have ${\n currencies.size\n } different currencies (${[...currencies].join(\n \", \",\n )}). Check the price formatters passed into the component's render function.`;\n};\n\n/**\n * Formats the prices of the available services of an offer according to the\n * priceFormatters passed in.\n *\n * @param offer An offer from the Duffel API\n * @param priceFormatters Optional price formatting functions. If not passed in, the offer will be returned unchanged.\n * @returns An offer with the prices of its available services formatted according to the priceFormatters passed in.\n */\nconst formatAvailableServices = (\n offer: Offer,\n priceFormatters?: DuffelAncillariesPriceFormatters,\n): Offer => {\n // If no custom formatters were passed in, don't do anything.\n if (!priceFormatters) {\n return offer;\n }\n\n const availableServices = offer.available_services || [];\n\n const foundCurrencies = new Set<string>();\n\n const formatters = {\n baggage: priceFormatters?.bags,\n cancel_for_any_reason: priceFormatters?.cancel_for_any_reason,\n };\n\n const servicesWithFormattedPrices = availableServices.map((service) => {\n const serviceWithFormattedPrices = { ...service };\n\n if (service.type in formatters && formatters[service.type]) {\n let { total_amount, total_currency } = service;\n\n if (isBaggageService(service)) {\n const { amount, currency } = formatters[service.type]!(\n +service.total_amount,\n service.total_currency,\n service,\n );\n\n total_amount = amount.toString();\n if (currency) {\n total_currency = currency;\n }\n }\n\n if (isCancelForAnyReasonService(service)) {\n const { amount, currency } = formatters[service.type]!(\n +service.total_amount,\n service.total_currency,\n service,\n );\n\n total_amount = amount.toString();\n if (currency) {\n total_currency = currency;\n }\n }\n\n // Guard against different currencies being passed in for different services.\n foundCurrencies.add(total_currency);\n if (foundCurrencies.size > 1) {\n throw new Error(\n multipleCurrenciesErrorMessage(service.type, foundCurrencies),\n );\n }\n\n serviceWithFormattedPrices.total_amount = total_amount;\n serviceWithFormattedPrices.total_currency = total_currency;\n }\n return serviceWithFormattedPrices;\n });\n return { ...offer, available_services: servicesWithFormattedPrices };\n};\n\nexport { formatAvailableServices };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n SeatMapCabinRowSectionElement,\n SeatMapCabinRowSectionElementSeat,\n} from \"@duffel/api/types\";\n\nexport function isSeatElement(\n element: SeatMapCabinRowSectionElement,\n): element is SeatMapCabinRowSectionElementSeat {\n return element.type === \"seat\";\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap, SeatMapCabinRowSectionElement } from \"@duffel/api/types\";\nimport { DuffelAncillariesPriceFormatterForSeats } from \"../types/DuffelAncillariesProps\";\nimport { isSeatElement } from \"./isSeatElement\";\n\nconst multipleCurrenciesErrorMessage = (currencies: Set<string>) => {\n return `Seats must all have the same currency, but they have ${\n currencies.size\n } different currencies (${[...currencies].join(\n \", \",\n )}). Check the price formatters passed into the component's render function.`;\n};\n\nconst formatElement = (\n element: SeatMapCabinRowSectionElement,\n priceFormatter: DuffelAncillariesPriceFormatterForSeats,\n foundCurrencies: Set<string>,\n) => {\n const formattedElement = { ...element };\n if (\n isSeatElement(formattedElement) &&\n formattedElement.available_services.length > 0\n ) {\n const formattedServices = formattedElement.available_services.map(\n (service) => {\n const formattedService = { ...service };\n const { amount, currency } = priceFormatter(\n +service.total_amount,\n service.total_currency,\n service,\n );\n\n formattedService.total_amount = amount.toString();\n\n // Guard against different currencies being passed in for different seats.\n if (currency) {\n formattedService.total_currency = currency;\n foundCurrencies.add(currency);\n if (foundCurrencies.size > 1) {\n throw new Error(multipleCurrenciesErrorMessage(foundCurrencies));\n }\n }\n\n return formattedService;\n },\n );\n formattedElement.available_services = formattedServices;\n }\n return formattedElement;\n};\n\nconst formatSeatMaps = (\n seatMaps: SeatMap[],\n priceFormatter?: DuffelAncillariesPriceFormatterForSeats,\n): SeatMap[] => {\n // If a custom formatter wasn't passed in, don't do anything.\n if (!priceFormatter) {\n return seatMaps;\n }\n\n const foundCurrencies = new Set<string>();\n\n const formattedSeatMaps: SeatMap[] = seatMaps.map((seatMap) => {\n const formattedCabins = seatMap.cabins.map((cabin) => {\n const formattedRows = cabin.rows.map((row) => {\n const formattedSections = row.sections.map((section) => {\n const formattedElements = section.elements.map((element) => {\n return formatElement(element, priceFormatter, foundCurrencies);\n });\n return { ...section, elements: formattedElements };\n });\n return { ...row, sections: formattedSections };\n });\n return { ...cabin, rows: formattedRows };\n });\n return { ...seatMap, cabins: formattedCabins };\n });\n\n return formattedSeatMaps;\n};\n\nexport { formatSeatMaps };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "/*\n * Use relative-luminance to determine whether the color is dark enough or not.\n * See also: https://www.w3.org/WAI/GL/wiki/Relative_luminance\n */\nexport const hasHighLuminance = (accentColor: string) => {\n const rgb = accentColor.split(\", \").map((x) => parseInt(x));\n const luminance = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n return luminance > 0.5;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrder } from \"@duffel/api/types\";\n\nexport const isPayloadComplete = (\n payload: Partial<CreateOrder>,\n): payload is CreateOrder =>\n \"selected_offers\" in payload &&\n \"passengers\" in payload &&\n \"services\" in payload &&\n \"payments\" in payload &&\n \"type\" in payload &&\n \"metadata\" in payload;\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer } from \"@duffel/api/types\";\n\nexport const offerIsExpired = (offer: Offer) => {\n return offer.expires_at && new Date(offer.expires_at) < new Date();\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { logGroup } from \"./logging\";\n\nexport interface ErrorResponse extends Response {\n data: { meta: any; errors: any[] };\n}\nexport const isErrorResponse = (response: any): response is ErrorResponse => {\n return \"data\" in response && Array.isArray(response.data.errors);\n};\n\nconst DUFFEL_API_URL = process.env.DUFFEL_API_URL;\nconst COMPONENT_VERSION = process.env.COMPONENT_VERSION;\n\nexport async function fetchFromDuffelAPI(\n withClientKey: string,\n path: string,\n method = \"GET\",\n body?: string,\n) {\n logGroup(\"Making request to the Duffel API\", { path, method });\n const fullUrl = `${DUFFEL_API_URL}/ancillaries-component/${path}`;\n let response: Response | null = null;\n try {\n response = await fetch(fullUrl, {\n method,\n body,\n headers: {\n \"Duffel-Version\": \"v1\",\n Authorization: `Bearer ${withClientKey}`,\n \"User-Agent\": `Duffel/ancillaries-component@${COMPONENT_VERSION}`,\n },\n });\n } catch (error) {\n logGroup(\"Failed to make request to the Duffel API\", { error });\n throw error;\n }\n\n const data = await response.json();\n if (Array.isArray(data.errors)) {\n logGroup(\"Request to the Duffel API failed\", {\n operation: `${method} ${fullUrl}`,\n method,\n request_id: data?.meta?.request_id,\n errors: data.errors,\n status: response.status,\n });\n throw { ...response, data };\n } else {\n logGroup(\"Request to the Duffel succeeded\", {\n request_id: data?.meta?.request_id,\n });\n }\n\n return data;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer, SeatMap } from \"@duffel/api/types\";\n\nconst COMPONENT_CDN = process.env.COMPONENT_CDN;\n\nexport const importFromOfferFixtures = async (\n offerId: string,\n): Promise<Offer> =>\n await (\n await fetch(COMPONENT_CDN + `/fixtures/offers/${offerId}.json`)\n ).json();\n\nexport const importFromSeatMapsFixtures = async (\n offerId: string,\n): Promise<SeatMap[]> =>\n await (\n await fetch(COMPONENT_CDN + `/fixtures/seat-maps/${offerId}.json`)\n ).json();\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer } from \"@duffel/api/types\";\n\nexport const isFixtureOfferId = (offerId: Offer[\"id\"]): boolean =>\n offerId.startsWith(\"fixture_off_\");\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { fetchFromDuffelAPI } from \"./fetchFromDuffelAPI\";\n\nexport async function retrieveOfferFromDuffelAPI(\n offer_id: string,\n client_key: string,\n) {\n const getOfferResponse = await fetchFromDuffelAPI(\n client_key,\n `offers/${offer_id}?return_available_services=true`,\n );\n\n return getOfferResponse.data;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer } from \"@duffel/api/types\";\nimport { captureErrorInSentry } from \"./captureErrorInSentry\";\nimport { isErrorResponse } from \"./fetchFromDuffelAPI\";\nimport { importFromOfferFixtures } from \"./fetchFromFixtures\";\nimport { isFixtureOfferId } from \"./isFixtureOfferId\";\nimport { retrieveOfferFromDuffelAPI } from \"./retrieveOfferFromDuffelAPI\";\n\nexport async function retrieveOffer(\n offer_id: string,\n client_key: string | null,\n onError: (error: string) => void,\n setIsLoading: (isLoading: boolean) => void,\n onOfferReady: (offer: Offer) => void,\n) {\n setIsLoading(true);\n const useFixture = isFixtureOfferId(offer_id);\n offer_id = useFixture ? offer_id.replace(\"fixture_\", \"\") : offer_id;\n\n if (useFixture) {\n return importFromOfferFixtures(offer_id).then((offer) => {\n setIsLoading(false);\n onOfferReady(offer);\n });\n }\n\n if (!client_key) {\n throw new Error(\n \"Attempted to retrieve seat maps but the client key is missing.\",\n );\n }\n\n try {\n const data = await retrieveOfferFromDuffelAPI(offer_id, client_key);\n onOfferReady(data);\n } catch (error) {\n let message = \"An unknown error occurred while retrieving the offer.\";\n if (error instanceof Error) {\n message = error.message;\n if (error.message.includes(\"Load failed\")) {\n message = \"The Duffel API is not available. Please try again later.\";\n }\n } else if (isErrorResponse(error)) {\n if (error.status === 404) {\n message =\n \"The offer you are looking for does not exist or has expired.\";\n }\n }\n\n if (isErrorResponse(error) && error.status >= 500 && error.status < 600) {\n captureErrorInSentry(new Error(message));\n }\n onError(message);\n } finally {\n setIsLoading(false);\n }\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { fetchFromDuffelAPI } from \"./fetchFromDuffelAPI\";\n\nexport async function retrieveSeatMapsFromDuffelAPI(\n offer_id: string,\n client_key: string,\n) {\n const getSeatMapResponse = await fetchFromDuffelAPI(\n client_key,\n `offers/${offer_id}/seat_maps`,\n );\n\n return getSeatMapResponse.data;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap } from \"@duffel/api/types\";\nimport { captureErrorInSentry } from \"./captureErrorInSentry\";\nimport { isErrorResponse } from \"./fetchFromDuffelAPI\";\nimport { importFromSeatMapsFixtures } from \"./fetchFromFixtures\";\nimport { isFixtureOfferId } from \"./isFixtureOfferId\";\nimport { retrieveSeatMapsFromDuffelAPI } from \"./retrieveSeatMapsFromDuffelAPI\";\n\nexport async function retrieveSeatMaps(\n offer_id: string,\n client_key: string | null,\n onError: () => void,\n setIsLoading: (isLoading: boolean) => void,\n onSeatMapReady: (seatMaps: SeatMap[]) => void,\n) {\n setIsLoading(true);\n\n const useFixture = isFixtureOfferId(offer_id);\n offer_id = useFixture ? offer_id.replace(\"fixture_\", \"\") : offer_id;\n\n if (useFixture) {\n return importFromSeatMapsFixtures(offer_id).then((seatMaps) => {\n setIsLoading(false);\n onSeatMapReady(seatMaps);\n });\n }\n\n if (!client_key) {\n throw new Error(\n \"Attemptted to retrieve seat maps but the client key is missing.\",\n );\n }\n\n try {\n const data = await retrieveSeatMapsFromDuffelAPI(offer_id, client_key);\n onSeatMapReady(data);\n } catch (error) {\n let message = \"An unknown error occurred while retrieving the seat maps.\";\n\n if (error instanceof Error) {\n message = error.message;\n if (error.message.includes(\"Load failed\")) {\n message = \"The Duffel API is not available. Please try again later.\";\n }\n } else if (isErrorResponse(error)) {\n message =\n error.data.errors[0]?.message ||\n \"Received an unknown error from the Duffel API.\";\n }\n\n captureErrorInSentry(new Error(message));\n onError();\n } finally {\n setIsLoading(false);\n }\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n DuffelAncillariesProps,\n DuffelAncillariesPropsWithClientKeyAndOfferId,\n DuffelAncillariesPropsWithOfferIdForFixture,\n DuffelAncillariesPropsWithOffersAndSeatMaps,\n DuffelAncillariesPropWithOfferAndClientKey,\n} from \"../types/DuffelAncillariesProps\";\n\nexport const areDuffelAncillariesPropsValid = (props: DuffelAncillariesProps) =>\n hasCommonRequiredProps(props) &&\n (isDuffelAncillariesPropsWithOfferIdForFixture(props) ||\n isDuffelAncillariesPropsWithClientKeyAndOfferId(props) ||\n isDuffelAncillariesPropsWithOfferAndSeatMaps(props) ||\n isDuffelAncillariesPropsWithOfferAndClientKey(props));\n\nexport const hasCommonRequiredProps = (props: DuffelAncillariesProps) =>\n \"onPayloadReady\" in props && \"passengers\" in props && \"services\" in props;\n\nexport const isDuffelAncillariesPropsWithOfferIdForFixture = (\n props: DuffelAncillariesProps,\n): props is DuffelAncillariesPropsWithOfferIdForFixture =>\n \"offer_id\" in props && props.offer_id.startsWith(\"fixture_\");\n\nexport const isDuffelAncillariesPropsWithClientKeyAndOfferId = (\n props: DuffelAncillariesProps,\n): props is DuffelAncillariesPropsWithClientKeyAndOfferId =>\n \"offer_id\" in props && \"client_key\" in props;\n\nexport const isDuffelAncillariesPropsWithOfferAndSeatMaps = (\n props: DuffelAncillariesProps,\n): props is DuffelAncillariesPropsWithOffersAndSeatMaps =>\n \"offer\" in props && \"seat_maps\" in props;\n\nexport const isDuffelAncillariesPropsWithOfferAndClientKey = (\n props: DuffelAncillariesProps,\n): props is DuffelAncillariesPropWithOfferAndClientKey =>\n \"offer\" in props && \"client_key\" in props;\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { ErrorBoundary } from \"@components/shared/ErrorBoundary\";\nimport { FetchOfferErrorState } from \"@components/shared/FetchOfferErrorState\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\nimport {\n CreateOrder,\n CreateOrderService,\n Offer,\n SeatMap,\n} from \"@duffel/api/types\";\nimport { compileCreateOrderPayload } from \"@lib/compileCreateOrderPayload\";\nimport { createPriceFormatters } from \"@lib/createPriceFormatters\";\nimport { formatAvailableServices } from \"@lib/formatAvailableServices\";\nimport { formatSeatMaps } from \"@lib/formatSeatMaps\";\nimport { hasHighLuminance } from \"@lib/hasHighLuminance\";\nimport { isPayloadComplete } from \"@lib/isPayloadComplete\";\nimport { initializeLogger, logGroup } from \"@lib/logging\";\nimport { offerIsExpired } from \"@lib/offerIsExpired\";\nimport { retrieveOffer } from \"@lib/retrieveOffer\";\nimport { retrieveSeatMaps } from \"@lib/retrieveSeatMaps\";\nimport {\n areDuffelAncillariesPropsValid,\n isDuffelAncillariesPropsWithClientKeyAndOfferId,\n isDuffelAncillariesPropsWithOfferAndClientKey,\n isDuffelAncillariesPropsWithOfferAndSeatMaps,\n isDuffelAncillariesPropsWithOfferIdForFixture,\n} from \"@lib/validateProps\";\nimport * as Sentry from \"@sentry/browser\";\nimport * as React from \"react\";\nimport {\n DuffelAncillariesProps,\n WithBaggageServiceInformation,\n WithSeatServiceInformation,\n WithServiceInformation,\n} from \"../../types/DuffelAncillariesProps\";\nimport { BaggageSelectionCard } from \"./bags/BaggageSelectionCard\";\nimport { CfarSelectionCard } from \"./cancel_for_any_reason/CfarSelectionCard\";\nimport { SeatSelectionCard } from \"./seats/SeatSelectionCard\";\n\nexport const DuffelAncillaries: React.FC<DuffelAncillariesProps> = (props) => {\n initializeLogger(props.debug || false);\n\n logGroup(\"Properties passed into the component:\", props);\n\n if (!areDuffelAncillariesPropsValid(props)) {\n throw new Error(\n `The props (${Object.keys(\n props,\n )}) passed to DuffelAncillaries are invalid. ` +\n \"`onPayloadReady`, `passengers` and `services` are always required. \" +\n \"Then, depending on your use case you may have one of the following combinations of required props: \" +\n \"`offer_id` and `client_key`, `offer` and `seat_maps` or `offer` and `client_key`.\" +\n \"Please refer to the documentation for more information and working examples: \" +\n \"https://duffel.com/docs/guides/ancillaries-component\",\n );\n }\n if (props.services.length === 0) {\n throw new Error(\n `You must provide at least one service in the \"services\" prop. Valid services: [\"bags\", \"seats\", \"cancel_for_any_reason\"]`,\n );\n }\n\n const isPropsWithOfferIdForFixture =\n isDuffelAncillariesPropsWithOfferIdForFixture(props);\n\n const isPropsWithClientKeyAndOfferId =\n isDuffelAncillariesPropsWithClientKeyAndOfferId(props);\n\n const isPropsWithOfferAndSeatMaps =\n isDuffelAncillariesPropsWithOfferAndSeatMaps(props);\n\n const isPropsWithOfferAndClientKey =\n isDuffelAncillariesPropsWithOfferAndClientKey(props);\n\n const shouldRetrieveSeatMaps =\n props.services.includes(\"seats\") &&\n !(\"seat_maps\" in props) &&\n (isPropsWithOfferIdForFixture ||\n isPropsWithClientKeyAndOfferId ||\n isPropsWithOfferAndClientKey);\n\n const [passengers, setPassengers] = React.useState<CreateOrder[\"passengers\"]>(\n props.passengers,\n );\n\n const [offer, setOffer] = React.useState<Offer | undefined>(\n (props as any).offer,\n );\n\n const [isOfferLoading, setIsOfferLoading] = React.useState(\n isPropsWithClientKeyAndOfferId,\n );\n\n const [seatMaps, setSeatMaps] = React.useState<SeatMap[] | undefined>(\n isPropsWithOfferAndSeatMaps ? props.seat_maps : undefined,\n );\n const [isSeatMapLoading, setIsSeatMapLoading] = React.useState(\n shouldRetrieveSeatMaps,\n );\n\n const [error, setError] = React.useState<null | string>(null);\n\n const [baggageSelectedServices, setBaggageSelectedServices] = React.useState<\n WithBaggageServiceInformation<CreateOrderService>[]\n >([]);\n const [seatSelectedServices, setSeatSelectedServices] = React.useState<\n WithSeatServiceInformation<CreateOrderService>[]\n >([]);\n const [cfarSelectedServices, setCfarSelectedServices] = React.useState<\n WithServiceInformation<CreateOrderService>[]\n >([]);\n\n const priceFormatters = createPriceFormatters(\n props.markup,\n props.priceFormatters,\n );\n\n const updateOffer = (offer: Offer) => {\n const expiryErrorMessage = \"This offer has expired.\";\n if (offerIsExpired(offer)) {\n setError(expiryErrorMessage);\n return;\n } else {\n const msUntilExpiry = new Date(offer?.expires_at)?.getTime() - Date.now();\n\n // Only show the expiry error message if the offer expires in less than a day,\n // to prevent buffer overflows when showing offers for fixtures, which expire in\n // years.\n const milisecondsInOneDay = 1000 * 60 * 60 * 24;\n if (msUntilExpiry < milisecondsInOneDay) {\n setTimeout(() => setError(expiryErrorMessage), msUntilExpiry);\n }\n }\n\n const offerWithFormattedServices = formatAvailableServices(\n offer,\n priceFormatters,\n );\n setOffer(offerWithFormattedServices);\n };\n\n const updateSeatMaps = (seatMaps: SeatMap[]) => {\n const formattedSeatMaps = formatSeatMaps(seatMaps, priceFormatters.seats);\n setSeatMaps(formattedSeatMaps);\n };\n\n React.useEffect(() => {\n // whenever the props change, we'll set the sentry context to thse values\n // so that we can see them in the sentry logs and better support the users of the component library\n Sentry.setContext(\"props\", {\n \"props.services\": props.services,\n \"props.passengers.length\": (props as any).passengers.length,\n \"props.offer_id\": (props as any).offer_id,\n \"props.client_key\": (props as any).client_key,\n \"props.offer?.id\": (props as any).offer?.id,\n \"props.seat_maps?.[0]?.id\": (props as any).seat_maps?.[0]?.id,\n });\n\n if (isPropsWithClientKeyAndOfferId || isPropsWithOfferIdForFixture) {\n retrieveOffer(\n props.offer_id,\n !isPropsWithOfferIdForFixture ? props.client_key : null,\n setError,\n setIsOfferLoading,\n (offer) => {\n updateOffer(offer);\n\n if (offer.passengers.length !== passengers.length) {\n throw new Error(\n `The number of passengers given to \\`duffel-ancillaries\\` (${props.passengers.length}) doesn't match ` +\n `the number of passengers on the given offer (${offer.passengers.length}).`,\n );\n }\n\n if (isPropsWithOfferIdForFixture) {\n // There's no way the component users will know the passenger IDs for the fixture offer\n // so we'll need to add them here\n setPassengers(\n props.passengers.map((passenger, index) => ({\n ...passenger,\n id: offer.passengers[index].id,\n })),\n );\n }\n },\n );\n }\n\n if (shouldRetrieveSeatMaps) {\n retrieveSeatMaps(\n isPropsWithClientKeyAndOfferId || isPropsWithOfferIdForFixture\n ? props.offer_id\n : props.offer.id,\n !isPropsWithOfferIdForFixture ? props.client_key : null,\n () => updateSeatMaps([]),\n setIsSeatMapLoading,\n updateSeatMaps,\n );\n }\n\n if (isPropsWithOfferAndClientKey) {\n updateOffer(props.offer);\n }\n\n if (isPropsWithOfferAndSeatMaps) {\n updateOffer(props.offer);\n updateSeatMaps(props.seat_maps);\n }\n }, [\n // `as any` is needed here because the list\n // of dependencies is different for each combination of props.\n // To satisfy typescript, we'd need to conditionally assign\n // the dependencies to the hook after checking its type,\n // however that is not possible in a react hook.\n (props as any).offer_id,\n (props as any).client_key,\n (props as any).offer?.id,\n (props as any).seat_maps?.[0]?.id,\n ]);\n\n React.useEffect(() => {\n if (!offer) return;\n\n const createOrderPayload = compileCreateOrderPayload({\n baggageSelectedServices,\n seatSelectedServices,\n cfarSelectedServices,\n offer,\n passengers,\n seatMaps,\n });\n\n if (isPayloadComplete(createOrderPayload)) {\n const metadata = {\n offer_total_amount: offer.total_amount,\n offer_total_currency: offer.total_currency,\n offer_tax_amount: offer.tax_amount,\n offer_tax_currency: offer.tax_currency,\n baggage_services: baggageSelectedServices,\n seat_services: seatSelectedServices,\n cancel_for_any_reason_services: cfarSelectedServices,\n };\n\n logGroup(\"Payload ready\", {\n \"Order creation payload\": createOrderPayload,\n \"Services metadata\": metadata,\n });\n\n props.onPayloadReady(createOrderPayload, metadata);\n }\n }, [baggageSelectedServices, seatSelectedServices, cfarSelectedServices]);\n\n if (!areDuffelAncillariesPropsValid(props)) {\n return null;\n }\n\n const nonIdealStateHeight = `${\n // 72 (card height) + 32 gap between cards\n 72 * props.services.length + 32 * (props.services.length - 1)\n }px`;\n\n const duffelComponentsStyle = {\n // Adding inline styles here to avoid the cards jumping down\n // before the css is loaded duet to the missing \"row gap\".\n display: \"flex\",\n width: \"100%\",\n flexDirection: \"column\",\n rowGap: \"12px\",\n ...(props.styles?.accentColor && {\n \"--ACCENT\": props.styles.accentColor,\n }),\n ...(props.styles?.accentColor &&\n hasHighLuminance(props.styles.accentColor) && {\n \"--SECONDARY\": \"var(--GREY-900)\",\n \"--TERTIARY\": \"var(--GREY-400)\",\n }),\n ...(props.styles?.fontFamily && {\n \"--FONT-FAMILY\": props.styles.fontFamily,\n }),\n ...(props.styles?.buttonCornerRadius && {\n \"--BUTTON-RADIUS\": props.styles.buttonCornerRadius,\n }),\n // `as any` is needed here is needed because we want to set css variables\n // that are not part of the css properties type\n } as any;\n\n const state = {\n isOfferLoading,\n isSeatMapLoading,\n baggageSelectedServices,\n seatSelectedServices,\n cfarSelectedServices,\n offer,\n seatMaps,\n error,\n };\n\n logGroup(\"Component's internal state:\", state);\n\n return (\n <WithComponentStyles>\n <div style={duffelComponentsStyle}>\n <ErrorBoundary>\n {error && (\n <FetchOfferErrorState\n height={nonIdealStateHeight}\n message={error}\n />\n )}\n\n {!error &&\n props.services.map((ancillaryName) => {\n if (ancillaryName === \"bags\")\n return (\n <BaggageSelectionCard\n key=\"bags\"\n isLoading={isOfferLoading}\n offer={offer}\n passengers={passengers}\n selectedServices={baggageSelectedServices}\n setSelectedServices={setBaggageSelectedServices}\n />\n );\n\n if (ancillaryName === \"seats\")\n return (\n <SeatSelectionCard\n key=\"seats\"\n isLoading={isOfferLoading || isSeatMapLoading}\n seatMaps={seatMaps}\n offer={offer}\n passengers={passengers}\n selectedServices={seatSelectedServices}\n setSelectedServices={setSeatSelectedServices}\n />\n );\n\n if (ancillaryName === \"cancel_for_any_reason\")\n return (\n <CfarSelectionCard\n key=\"cancel_for_any_reason\"\n isLoading={isOfferLoading}\n offer={offer}\n selectedServices={cfarSelectedServices}\n setSelectedServices={setCfarSelectedServices}\n />\n );\n })}\n </ErrorBoundary>\n </div>\n </WithComponentStyles>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\n\nexport const AnimatedLoaderEllipsis: React.FC = () => (\n <span className=\"textual-loading-indicator\" aria-hidden=\"true\" />\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\n\nexport interface StampProps {\n backgroundColor: React.CSSProperties[\"backgroundColor\"];\n color: React.CSSProperties[\"color\"];\n children: React.ReactNode;\n}\n\nexport const Stamp: React.FC<StampProps> = ({\n backgroundColor,\n color,\n children,\n}) => (\n <div\n style={{\n backgroundColor,\n color,\n padding: \"2px 8px\",\n whiteSpace: \"nowrap\",\n borderRadius: \"4px\",\n fontWeight: \"600\",\n fontSize: \"14px\",\n lineHeight: \"20px\",\n textAlign: \"center\",\n }}\n >\n {children}\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer } from \"@duffel/api/types\";\n\n/**\n *\n * Returns the currency of the first service of the given type in the offer.\n *\n * @param offer An offer\n * @returns A string representing the currency of the services in the offer.\n * @throws If there are no services, or none of the services are of the given type.\n */\nconst getCurrencyForServices = (offer: Offer, serviceType: string): string => {\n if (offer.available_services.length === 0) {\n throw new Error(\"No services available\");\n }\n const firstService = offer.available_services.find(\n (service) => service.type === serviceType,\n );\n if (!firstService) {\n throw new Error(`No ${serviceType} services available`);\n }\n return firstService.total_currency;\n};\n\nexport { getCurrencyForServices };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrder } from \"@duffel/api/types\";\n\nexport const getTotalQuantity = (\n fromSelectedServices: CreateOrder[\"services\"],\n) =>\n (fromSelectedServices || []).reduce(\n (total, { quantity }) => total + quantity,\n 0,\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer, OfferAvailableService } from \"@duffel/api/types\";\nimport { isBaggageService } from \"./isBaggageService\";\nimport { isCancelForAnyReasonService } from \"./isCancelForAnyReasonService\";\n\nconst checkFunctionsMap = {\n baggage: isBaggageService,\n cancel_for_any_reason: isCancelForAnyReasonService,\n};\n\nexport const hasService = (\n offer: Offer | undefined,\n type: OfferAvailableService[\"type\"],\n) => {\n const checkFunction = checkFunctionsMap[type];\n if (!checkFunction) throw new Error(`Unknown service type: ${type}`);\n\n return (\n offer &&\n Array.isArray(offer.available_services) &&\n offer.available_services.some(\n (service) => checkFunction(service) && service.maximum_quantity > 0,\n )\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "/**\n * Return a function to format a number into a money amount for a given currency\n *\n * @param currency The ISO-4217 currency code to be used by the formatter\n */\nexport const moneyStringFormatter = (\n currency: string,\n locale = \"en-GB\",\n options: { [option: string]: string } = {},\n) => {\n return (value: number) => {\n try {\n const formatter = new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency,\n ...options,\n });\n const numberFormatted = formatter.format(value);\n const signFormatted =\n options &&\n options[\"signDisplay\"] &&\n (options[\"signDisplay\"] === \"always\" ||\n (options[\"signDisplay\"] === \"exceptZero\" && value !== 0))\n ? numberFormatted.replace(/^([+-])/, \"$1 \")\n : numberFormatted;\n\n return signFormatted;\n } catch (error) {\n // If the currency is not supported by the browser, we return the value with the currency code.\n // This allows us to support made-up currencies, like \"1000 Duffel Points\"\n return `${value} ${currency}`;\n }\n };\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export const withPlural = (\n totalQuantity: number,\n singular: string,\n plural: string,\n) => {\n if (totalQuantity == 1) return `${totalQuantity} ${singular}`;\n else return `${totalQuantity} ${plural}`;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { AnimatedLoaderEllipsis } from \"@components/shared/AnimatedLoaderEllipsis\";\nimport { Stamp } from \"@components/shared/Stamp\";\nimport { CreateOrder, CreateOrderService, Offer } from \"@duffel/api/types\";\nimport { getCurrencyForServices } from \"@lib/getCurrencyForServices\";\nimport { getTotalAmountForServices } from \"@lib/getTotalAmountForServices\";\nimport { getTotalQuantity } from \"@lib/getTotalQuantity\";\nimport { hasService } from \"@lib/hasService\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport { withPlural } from \"@lib/withPlural\";\nimport React from \"react\";\nimport { WithBaggageServiceInformation } from \"src/types\";\nimport { Card } from \"../Card\";\nimport { BaggageSelectionModal } from \"./BaggageSelectionModal\";\n\nexport interface BaggageSelectionCardProps {\n isLoading: boolean;\n offer?: Offer;\n passengers: CreateOrder[\"passengers\"];\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[];\n setSelectedServices: (\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const BaggageSelectionCard: React.FC<BaggageSelectionCardProps> = ({\n isLoading,\n offer,\n passengers,\n selectedServices,\n setSelectedServices,\n}) => {\n const [isOpen, setIsOpen] = React.useState(false);\n\n const containsBaggageService = hasService(offer, \"baggage\");\n const totalQuantity = getTotalQuantity(selectedServices);\n const isBaggageAdded = totalQuantity > 0;\n\n const totalAmount = getTotalAmountForServices(offer!, selectedServices);\n\n let currencyToUse = offer?.base_currency || \"\";\n if (containsBaggageService) {\n currencyToUse = getCurrencyForServices(offer!, \"baggage\");\n }\n\n const totalAmountFormatted = offer\n ? moneyStringFormatter(currencyToUse)(totalAmount)\n : \"0\";\n\n const copy =\n containsBaggageService && isBaggageAdded\n ? `${withPlural(\n totalQuantity,\n \"bag\",\n \"bags\",\n )} added for ${totalAmountFormatted}`\n : \"Add any extra baggage you need for your trip\";\n\n return (\n <>\n <Card\n buttonTitle=\"Select extra baggage\"\n title=\"Extra baggage\"\n copy={copy}\n icon=\"cabin_bag\"\n onClick={containsBaggageService ? () => setIsOpen(true) : null}\n isLoading={isLoading}\n disabled={!isLoading && !containsBaggageService}\n isSelected={isBaggageAdded}\n >\n {isLoading && (\n <Stamp color=\"var(--GREY-900)\" backgroundColor=\"var(--GREY-100)\">\n Loading\n <AnimatedLoaderEllipsis />\n </Stamp>\n )}\n {!isLoading && !containsBaggageService && (\n <Stamp color=\"var(--GREY-700)\" backgroundColor=\"var(--GREY-200)\">\n Not available\n </Stamp>\n )}\n </Card>\n\n <BaggageSelectionModal\n isOpen={Boolean(isOpen && offer)}\n offer={offer}\n passengers={passengers}\n onClose={(newSelectedServices) => {\n // We need to do a deep copy here because otherwise the modal changing the quantity\n // will affect the selected services regardless of whether it's saved or not\n const newSelectedServicesDeepCopy = JSON.parse(\n JSON.stringify(newSelectedServices),\n );\n setSelectedServices(newSelectedServicesDeepCopy);\n setIsOpen(false);\n }}\n selectedServices={selectedServices}\n />\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon, IconName } from \"@components/shared/Icon\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\n\nexport interface CardProps {\n buttonTitle: string;\n title: string;\n icon: IconName;\n onClick?: (() => void) | null;\n children: React.ReactNode;\n copy: string;\n isLoading?: boolean;\n disabled?: boolean;\n isSelected?: boolean;\n}\n\nexport const Card: React.FC<CardProps> = ({\n buttonTitle,\n title,\n icon,\n copy,\n onClick,\n children,\n isLoading,\n disabled,\n isSelected,\n}) => {\n const hasChildren = React.Children.toArray(children).length > 0;\n\n return (\n <button\n type=\"button\"\n title={buttonTitle}\n {...(onClick && { onClick })}\n disabled={disabled}\n className={classNames(\n \"ancillary-card\",\n isLoading && \"ancillary-card--loading\",\n )}\n // We are using inline styles here because\n // we don't want the cards to appear unstyled\n // before the CSS stylesheet loads.\n // This is important for this component since it\n // be on visible on the page when it loads.\n style={{\n cursor: \"pointer\",\n background: \"transparent\",\n color: \"var(--GREY-900)\",\n border: \"solid 1px rgba(226, 226, 232, 1)\",\n display: \"flex\",\n rowGap: \"4px\",\n padding: \"20px\",\n borderRadius: \"8px\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n flexDirection: \"column\",\n width: \"100%\",\n boxSizing: \"border-box\",\n fontSize: \"16px\",\n fontWeight: \"400\",\n lineHeight: \"24px\",\n letterSpacing: \"0em\",\n transition:\n \"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n marginBlock: \"0\",\n textAlign: \"start\",\n marginTop: \"2px\",\n columnGap: \"12px\",\n width: \"100%\",\n }}\n >\n <div>\n {isSelected ? (\n <Icon name=\"check\" className=\"ancillary-card__selected-icon\" />\n ) : (\n <Icon name={icon} />\n )}\n </div>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"start\",\n width: \"100%\",\n }}\n >\n <p\n className=\"p1--semibold\"\n style={{\n marginBlock: \"0\",\n }}\n >\n {title}\n </p>\n <div className=\"ancillary-card__children\">\n {hasChildren ? (\n children\n ) : (\n <Icon\n name=\"expand_content\"\n className=\"ancillary-card__expand-icon\"\n />\n )}\n </div>\n </div>\n </div>\n <p\n className=\"p1--regular\"\n style={{\n textAlign: \"start\",\n color: \"var(--GREY-600)\",\n marginLeft: \"34px\",\n marginBlock: \"0\",\n }}\n >\n {copy}\n </p>\n </button>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export const setBodyScrollability = (shouldScroll: boolean) => {\n if (shouldScroll) {\n document.body.style.overflow = \"\";\n } else {\n document.body.style.overflow = \"hidden\";\n }\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { setBodyScrollability } from \"@lib/setBodyScrollability\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { IconButton } from \"./IconButton\";\n\nexport interface ModalProps {\n onClose: () => void;\n isOpen: boolean;\n children: React.ReactNode;\n}\n\nexport const Modal: React.FC<ModalProps> = ({ children, onClose, isOpen }) => {\n React.useEffect(() => {\n setBodyScrollability(!isOpen);\n return () => setBodyScrollability(true);\n }, [isOpen]);\n\n return (\n <div\n className={classNames(\"modal\", isOpen && \"modal--open\")}\n // setting inline style to avoid modal content to flash unstyled before stylesheet is loaded\n style={{ opacity: 0 }}\n >\n <div role=\"presentation\" className={\"modal--content\"}>\n {children}\n\n <IconButton\n icon=\"close\"\n onClick={onClose}\n title=\"Close modal\"\n className=\"modal--close-button\"\n />\n </div>\n </div>\n );\n};\n\ninterface ModalBodyProps {\n tall?: boolean;\n noPadding?: boolean;\n children: React.ReactNode;\n}\nexport const ModalBody: React.FC<ModalBodyProps> = ({\n children,\n tall,\n noPadding,\n}) => (\n <div\n className={classNames(\n \"modal-body\",\n noPadding && \"modal-body--no-padding\",\n tall && \"modal-body--tall\",\n )}\n >\n {children}\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import classNames from \"classnames\";\nimport * as React from \"react\";\nimport { Icon, IconName } from \"./Icon\";\n\nconst ICON_BUTTON_VARIANTS = {\n primary: \"icon-button--primary\",\n outlined: \"icon-button--outlined\",\n};\n\ntype IconButtonVariants = keyof typeof ICON_BUTTON_VARIANTS;\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>;\n\nexport interface IconButtonProps\n extends Pick<NativeButtonProps, \"id\" | \"onClick\" | \"disabled\" | \"className\"> {\n \"data-testid\"?: string;\n icon: IconName;\n title: string;\n variant?: IconButtonVariants;\n}\n\nexport const IconButton: React.FC<IconButtonProps> = ({\n icon,\n variant = \"primary\",\n className,\n ...nativeButtonProps\n}) => (\n <button\n type=\"button\"\n className={classNames(\n \"icon-button\",\n ICON_BUTTON_VARIANTS[variant],\n className,\n )}\n {...nativeButtonProps}\n >\n <Icon name={icon} />\n </button>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrder, CreateOrderPassenger } from \"@duffel/api/types\";\n\nexport type PassengerMapById = Record<\n CreateOrderPassenger[\"id\"],\n CreateOrderPassenger\n>;\n\nexport const getPassengerMapById = (\n passengers: CreateOrder[\"passengers\"],\n): PassengerMapById =>\n passengers.reduce(\n (all, passenger) => ({ [passenger.id]: passenger, ...all }),\n {} as PassengerMapById,\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Offer, OfferSliceSegment } from \"@duffel/api/types\";\n\nexport const getSegmentList = (offer: Offer) =>\n offer.slices.reduce(\n (accumulator, slice) => [...accumulator, ...slice.segments],\n new Array<OfferSliceSegment>(),\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Modal } from \"@components/shared/Modal\";\nimport { CreateOrder, CreateOrderService, Offer } from \"@duffel/api/types\";\nimport { getCurrencyForServices } from \"@lib/getCurrencyForServices\";\nimport { getPassengerMapById } from \"@lib/getPassengerMapById\";\nimport { getSegmentList } from \"@lib/getSegmentList\";\nimport { getServicePriceMapById } from \"@lib/getServicePriceMapById\";\nimport { hasService } from \"@lib/hasService\";\nimport React, { useState } from \"react\";\nimport { WithBaggageServiceInformation } from \"src/types\";\nimport { BaggageSelectionModalBody } from \"./BaggageSelectionModalBody\";\nimport { BaggageSelectionModalFooter } from \"./BaggageSelectionModalFooter\";\nimport { BaggageSelectionModalHeader } from \"./BaggageSelectionModalHeader\";\n\nexport interface BaggageSelectionModalProps {\n isOpen: boolean;\n offer?: Offer;\n passengers: CreateOrder[\"passengers\"];\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[];\n onClose: (\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const BaggageSelectionModal: React.FC<BaggageSelectionModalProps> = ({\n isOpen,\n offer,\n passengers,\n onClose,\n selectedServices,\n}) => {\n const [currentSegmentIndex, setCurrentSegmentIndex] = useState(0);\n\n const [selectedServicesState, setSelectedServicesState] =\n React.useState(selectedServices);\n\n if (!offer) return null;\n\n const segments = getSegmentList(offer);\n const currentSegment = segments[currentSegmentIndex];\n\n const passengerMapById = getPassengerMapById(passengers);\n const servicePricesMap = getServicePriceMapById(offer.available_services);\n\n let currencyToUse = offer.base_currency;\n if (hasService(offer, \"baggage\")) {\n currencyToUse = getCurrencyForServices(offer, \"baggage\");\n }\n\n return (\n <Modal isOpen={isOpen} onClose={() => onClose(selectedServices)}>\n <BaggageSelectionModalHeader\n segmentCount={segments.length}\n currentSegment={currentSegment}\n currentSegmentIndex={currentSegmentIndex}\n setCurrentSegmentIndex={(index) => setCurrentSegmentIndex(index)}\n />\n <BaggageSelectionModalBody\n offer={offer}\n selectedServices={selectedServicesState}\n passengersById={passengerMapById}\n segment={currentSegment}\n setSelectedServices={setSelectedServicesState}\n />\n <BaggageSelectionModalFooter\n currency={currencyToUse}\n selectedServices={selectedServicesState}\n servicePrices={servicePricesMap}\n isFirstSegment={currentSegmentIndex === 0}\n isLastSegment={currentSegmentIndex + 1 === segments.length}\n onNextSegmentButtonClicked={() =>\n setCurrentSegmentIndex(currentSegmentIndex + 1)\n }\n onPreviousSegmentButtonClicked={() =>\n setCurrentSegmentIndex(currentSegmentIndex - 1)\n }\n onClose={() => onClose(selectedServicesState)}\n />\n </Modal>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrderPassenger, OfferPassenger } from \"@duffel/api/types\";\n\nexport const getPassengerName = (\n createOrderPayloadPassenger: CreateOrderPassenger,\n offerPassenger: OfferPassenger | undefined,\n fallbackIndex: number,\n): string => {\n if (!createOrderPayloadPassenger) {\n return `Passenger ${fallbackIndex}`;\n }\n\n if (\n createOrderPayloadPassenger.given_name &&\n createOrderPayloadPassenger.family_name\n ) {\n return `${createOrderPayloadPassenger.given_name} ${createOrderPayloadPassenger.family_name}`;\n }\n\n if (createOrderPayloadPassenger.given_name) {\n return createOrderPayloadPassenger.given_name;\n }\n\n if (createOrderPayloadPassenger.family_name) {\n return createOrderPayloadPassenger.family_name;\n }\n\n if (offerPassenger?.given_name && offerPassenger?.family_name) {\n return `${offerPassenger.given_name} ${offerPassenger.family_name}`;\n }\n\n if (offerPassenger?.given_name) {\n return offerPassenger.given_name;\n }\n\n if (offerPassenger?.family_name) {\n return offerPassenger.family_name;\n }\n\n return `Passenger ${fallbackIndex}`;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferAvailableServiceBaggageMetadata } from \"@duffel/api/types\";\nimport { captureErrorInSentry } from \"@lib/captureErrorInSentry\";\n\nexport const getBaggageServiceDescription = (\n metadata: OfferAvailableServiceBaggageMetadata,\n) => {\n if (!metadata) {\n captureErrorInSentry(\n new Error(\"getBaggageServiceDescription was not given any metadata\"),\n );\n return null;\n }\n\n if (\n !metadata.maximum_weight_kg &&\n !metadata.maximum_length_cm &&\n !metadata.maximum_height_cm &&\n !metadata.maximum_depth_cm\n ) {\n return null;\n }\n\n const hasAllDimensions =\n metadata.maximum_length_cm &&\n metadata.maximum_height_cm &&\n metadata.maximum_depth_cm;\n\n let dimensionsLabel = \"\";\n if (hasAllDimensions) {\n dimensionsLabel = ` / ${metadata.maximum_height_cm} x ${metadata.maximum_length_cm} x ${metadata.maximum_depth_cm} cm`;\n }\n\n let weightLabel = \"\";\n if (metadata.maximum_weight_kg) {\n weightLabel = `Up to ${metadata.maximum_weight_kg}kg`;\n }\n\n return `${weightLabel}${dimensionsLabel}`;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n CreateOrderService,\n OfferAvailableServiceBaggage,\n} from \"@duffel/api/types\";\nimport { WithBaggageServiceInformation } from \"src/types\";\n\nexport function hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected(\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n availableService: OfferAvailableServiceBaggage,\n) {\n const selectedServiceMap: Record<string, string[]> = {};\n for (const service of selectedServices) {\n for (const key of getMetadataServiceUniquenessKey(service)) {\n if (!(key in selectedServiceMap)) {\n selectedServiceMap[key] = [service.id];\n } else {\n selectedServiceMap[key].push(service.id);\n }\n }\n }\n\n const availableServiceKeys =\n getMetadataServiceUniquenessKeyFromAvailableService(availableService);\n\n return availableServiceKeys.some((availableServiceKey) => {\n if (\n selectedServiceMap[availableServiceKey]?.includes(availableService.id)\n ) {\n // if the selected service is the one on the counter, don't disable it\n // the max quantity will be availableService.maximum_quantity\n return false;\n } else {\n return availableServiceKey in selectedServiceMap;\n }\n });\n}\n\n/**\n * Creates a unique key for a selected service based on its type, segmentId and passengerId\n */\nfunction getMetadataServiceUniquenessKey(\n service: WithBaggageServiceInformation<CreateOrderService>,\n) {\n const keys: string[] = [];\n for (const segmentId of service.serviceInformation.segmentIds) {\n for (const passengerId of service.serviceInformation.passengerIds) {\n keys.push(\n [service.serviceInformation.type, segmentId, passengerId].join(\":\"),\n );\n }\n }\n\n return keys;\n}\n\n/**\n * Creates a unique key for an avaialable service based on its type, segmentId and passengerId\n */\nfunction getMetadataServiceUniquenessKeyFromAvailableService(\n service: OfferAvailableServiceBaggage,\n) {\n const keys: string[] = [];\n for (const segmentId of service.segment_ids) {\n for (const passengerId of service.passenger_ids) {\n keys.push([service.metadata.type, segmentId, passengerId].join(\":\"));\n }\n }\n\n return keys;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { IconButton } from \"@components/shared/IconButton\";\nimport * as React from \"react\";\n\ninterface CounterProps {\n id: string;\n min: number;\n max: number;\n value: number;\n onChange: (value: number) => void;\n}\n\nexport const Counter: React.FC<CounterProps> = ({\n id,\n min,\n max,\n value,\n onChange,\n}) => (\n <div className=\"counter\" id={id}>\n <IconButton\n icon=\"minus\"\n title=\"Remove one\"\n id={`${id}-minus`}\n data-testid={`${id}-minus`}\n variant=\"outlined\"\n disabled={value <= min}\n onClick={() => onChange(Math.max(value - 1, min))}\n />\n <div className=\"counter__count-label\">{value}</div>\n <IconButton\n icon=\"add\"\n title=\"Add one\"\n id={`${id}-plus`}\n data-testid={`${id}-plus`}\n variant=\"outlined\"\n disabled={value >= max}\n onClick={() => onChange(Math.min(value + 1, max))}\n />\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n CreateOrderService,\n OfferAvailableServiceBaggage,\n} from \"@duffel/api/types\";\nimport { getBaggageServiceDescription } from \"@lib/getBaggageServiceDescription\";\nimport { hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected } from \"@lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport React from \"react\";\nimport { WithBaggageServiceInformation } from \"src/types\";\nimport { Counter } from \"../Counter\";\n\ninterface BaggageSelectionControllerProps {\n segmentId: string;\n passengerId: string;\n availableService: OfferAvailableServiceBaggage;\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[];\n quantity: number;\n onQuantityChanged: (quantity: number) => void;\n}\n\nexport const BaggageSelectionController: React.FC<\n BaggageSelectionControllerProps\n> = ({\n passengerId,\n availableService,\n quantity,\n onQuantityChanged,\n selectedServices,\n}) => {\n const serviceName =\n availableService.metadata.type === \"carry_on\" ? \"Cabin bag\" : \"Checked bag\";\n\n const servicePrice = moneyStringFormatter(availableService.total_currency)(\n +availableService.total_amount,\n );\n const serviceDescription = getBaggageServiceDescription(\n availableService.metadata,\n );\n\n const shouldDisableController =\n hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected(\n selectedServices,\n availableService,\n );\n\n return (\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <div>\n <p style={{ margin: 0 }} className=\"p2--regular\">\n {serviceName}\n <span\n style={{\n marginInline: \"4px\",\n color: \"var(--GREY-400)\",\n }}\n >\n \u2022\n </span>\n <span\n className=\"p2--semibold\"\n data-testid={`price-label--${availableService.id}--${passengerId}`}\n >\n {servicePrice}\n </span>\n </p>\n <p\n style={{ margin: 0, color: \"var(--GREY-600)\" }}\n className=\"p3--regular\"\n >\n {serviceDescription}\n </p>\n </div>\n <Counter\n id={`counter--${availableService.id}--${passengerId}`}\n min={0}\n value={quantity}\n onChange={onQuantityChanged}\n max={shouldDisableController ? 0 : availableService.maximum_quantity}\n />\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSliceSegmentPassengerBaggage } from \"@duffel/api/types\";\nimport { withPlural } from \"@lib/withPlural\";\nimport React from \"react\";\n\ninterface IncludedBaggageBannerProps {\n includedBaggage: OfferSliceSegmentPassengerBaggage[];\n}\n\nexport const IncludedBaggageBanner: React.FC<IncludedBaggageBannerProps> = ({\n includedBaggage,\n}) => {\n const { carryOnBagsQuantity, checkedBagsQuantity } = includedBaggage.reduce(\n (sum, { type, quantity }) => ({\n carryOnBagsQuantity:\n sum.carryOnBagsQuantity + (type === \"carry_on\" ? quantity : 0),\n checkedBagsQuantity:\n sum.checkedBagsQuantity + (type === \"checked\" ? quantity : 0),\n }),\n {\n carryOnBagsQuantity: 0,\n checkedBagsQuantity: 0,\n },\n );\n\n const baggageLabelStringArray = new Array<string>();\n if (carryOnBagsQuantity > 0) {\n baggageLabelStringArray.push(\n withPlural(carryOnBagsQuantity, \"cabin bag\", \"cabin bags\"),\n );\n }\n if (checkedBagsQuantity > 0) {\n baggageLabelStringArray.push(\n withPlural(checkedBagsQuantity, \"checked bag\", \"checked bags\"),\n );\n }\n\n return (\n <div\n style={{\n marginBlock: \"8px\",\n padding: \"8px 12px\",\n color: ` var(--GREEN-300)`,\n backgroundColor: ` var(--GREEN-100)`,\n borderRadius: \"6px\",\n }}\n className=\"p2--regular\"\n >\n {baggageLabelStringArray.join(\" and \")} included with ticket\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n CreateOrderService,\n OfferAvailableServiceBaggage,\n OfferSliceSegmentPassengerBaggage,\n} from \"@duffel/api/types\";\nimport React from \"react\";\nimport { WithBaggageServiceInformation } from \"src/types\";\nimport { BaggageSelectionController } from \"./BaggageSelectionController\";\nimport { IncludedBaggageBanner } from \"./IncludedBaggageBanner\";\n\nexport interface BaggageSelectionModalBodyPassengerProps {\n segmentId: string;\n passengerId: string;\n passengerName: string;\n includedBaggage: OfferSliceSegmentPassengerBaggage[];\n passengerServicesForSegment: OfferAvailableServiceBaggage[];\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[];\n setSelectedServices: (\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const BaggageSelectionModalBodyPassenger: React.FC<\n BaggageSelectionModalBodyPassengerProps\n> = ({\n segmentId,\n passengerId,\n passengerName,\n includedBaggage,\n passengerServicesForSegment,\n selectedServices,\n setSelectedServices,\n}) => {\n const hasIncludedBaggage = includedBaggage.reduce(\n (sum, bag) => sum + bag.quantity,\n 0,\n );\n\n return (\n <div style={{ marginTop: \"24px\" }}>\n <h3 style={{ margin: 0 }} className=\"p1--semibold\">\n {passengerName}\n </h3>\n {hasIncludedBaggage ? (\n <IncludedBaggageBanner includedBaggage={includedBaggage} />\n ) : null}\n\n <div style={{ display: \"flex\", rowGap: \"8px\", flexDirection: \"column\" }}>\n {passengerServicesForSegment.map((availableService) => (\n <BaggageSelectionController\n key={availableService.id}\n passengerId={passengerId}\n segmentId={segmentId}\n availableService={availableService}\n selectedServices={selectedServices}\n quantity={\n selectedServices.find(({ id }) => id == availableService.id)\n ?.quantity || 0\n }\n onQuantityChanged={(newQuantity) =>\n onBaggageQuantityChanged(\n newQuantity,\n passengerName,\n availableService,\n selectedServices,\n setSelectedServices,\n )\n }\n />\n ))}\n </div>\n\n {passengerServicesForSegment.length === 0 && (\n <p style={{ color: `var(--GREY-700)`, margin: 0 }}>\n Extra baggage is not available for this passenger on this flight\n </p>\n )}\n </div>\n );\n};\n\nconst onBaggageQuantityChanged = (\n newQuantity: number,\n passengerName: string,\n availableService: OfferAvailableServiceBaggage,\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n setSelectedServices: (\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n ) => void,\n) => {\n // check if the service which had its quantity changed is already in the list\n const changedServiceIndex = selectedServices.findIndex(\n ({ id }) => availableService.id === id,\n );\n\n // create a copy of the existing list of selected services\n const newSelectedServices = Array.from(selectedServices);\n\n // if the service is not in the list, add it\n if (changedServiceIndex < 0) {\n newSelectedServices.push({\n id: availableService.id,\n quantity: newQuantity,\n serviceInformation: {\n segmentIds: availableService.segment_ids,\n passengerIds: availableService.passenger_ids,\n passengerName,\n total_amount: availableService.total_amount,\n total_currency: availableService.total_currency,\n ...availableService.metadata,\n },\n });\n } else {\n // if the service is in the list, update its quantity\n newSelectedServices[changedServiceIndex].quantity = newQuantity;\n }\n\n // remove any services with a quantity of 0\n // and update the list of selected services\n setSelectedServices(\n newSelectedServices.filter(({ quantity }) => quantity !== 0),\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { ModalBody } from \"@components/shared/Modal\";\nimport { getPassengerName } from \"@lib/getPassengerName\";\nimport React from \"react\";\n\nimport {\n CreateOrderPassenger,\n CreateOrderService,\n Offer,\n OfferAvailableServiceBaggage,\n OfferSliceSegment,\n} from \"@duffel/api/types\";\nimport { WithBaggageServiceInformation } from \"src/types\";\nimport { BaggageSelectionModalBodyPassenger } from \"./BaggageSelectionModalBodyPassenger\";\n\nexport interface BaggageSelectionModalBodyProps {\n offer: Offer;\n segment: OfferSliceSegment;\n passengersById: Record<CreateOrderPassenger[\"id\"], CreateOrderPassenger>;\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[];\n setSelectedServices: (\n selectedServices: WithBaggageServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const BaggageSelectionModalBody: React.FC<\n BaggageSelectionModalBodyProps\n> = ({\n offer,\n segment,\n passengersById,\n selectedServices,\n setSelectedServices,\n}) => (\n <ModalBody>\n {segment.passengers.map(({ passenger_id, baggages }, index) => (\n <BaggageSelectionModalBodyPassenger\n key={passenger_id}\n segmentId={segment.id}\n passengerId={passenger_id}\n passengerName={getPassengerName(\n passengersById[passenger_id],\n offer.passengers.find(({ id }) => id === passenger_id),\n index + 1,\n )}\n includedBaggage={baggages}\n passengerServicesForSegment={\n offer.available_services.filter(\n ({ type, passenger_ids, segment_ids }) =>\n type === \"baggage\" &&\n passenger_ids.includes(passenger_id) &&\n segment_ids.includes(segment.id),\n ) as OfferAvailableServiceBaggage[]\n }\n selectedServices={selectedServices}\n setSelectedServices={setSelectedServices}\n />\n ))}\n </ModalBody>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Button } from \"@components/shared/Button\";\nimport { CreateOrder } from \"@duffel/api/types\";\nimport { ServicePriceMapById } from \"@lib/getServicePriceMapById\";\nimport { getTotalAmountForServicesWithPriceMap } from \"@lib/getTotalAmountForServices\";\nimport { getTotalQuantity } from \"@lib/getTotalQuantity\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport { withPlural } from \"@lib/withPlural\";\nimport React from \"react\";\n\nexport interface BaggageSelectionModalFooterProps {\n currency: string;\n selectedServices: CreateOrder[\"services\"];\n servicePrices: ServicePriceMapById;\n\n isFirstSegment: boolean;\n isLastSegment: boolean;\n\n onNextSegmentButtonClicked: () => void;\n onPreviousSegmentButtonClicked: () => void;\n onClose: () => void;\n}\n\nexport const BaggageSelectionModalFooter: React.FC<\n BaggageSelectionModalFooterProps\n> = ({\n selectedServices,\n servicePrices,\n currency,\n isFirstSegment,\n isLastSegment,\n onNextSegmentButtonClicked,\n onPreviousSegmentButtonClicked,\n onClose,\n}) => {\n const totalQuantity = getTotalQuantity(selectedServices);\n const totalAmount = getTotalAmountForServicesWithPriceMap(\n servicePrices,\n selectedServices,\n );\n const totalAmountLabel = moneyStringFormatter(currency)(totalAmount);\n const isOneWay = isFirstSegment && isFirstSegment;\n\n return (\n <div style={{ padding: \"16px 24px 24px\" }}>\n <div className=\"flex--space-between\">\n <div>\n Price for {withPlural(totalQuantity, \"extra bag\", \"extra bags\")}\n </div>\n <div className=\"h3--semibold\" data-testid=\"baggage-total-amount-label\">\n + {totalAmountLabel}\n </div>\n </div>\n\n <div\n style={\n isOneWay\n ? { marginTop: \"16px\", display: \"grid\" }\n : {\n marginTop: \"16px\",\n display: \"grid\",\n columnGap: \"12px\",\n gridTemplateColumns: \"repeat(2, 1fr)\",\n }\n }\n >\n {!isOneWay && (\n <Button\n size={48}\n variant=\"outlined\"\n disabled={isFirstSegment}\n onClick={() => onPreviousSegmentButtonClicked()}\n >\n Back\n </Button>\n )}\n <Button\n size={48}\n data-testid=\"confirm-selection-for-baggage\"\n onClick={() =>\n isLastSegment ? onClose() : onNextSegmentButtonClicked()\n }\n >\n {isLastSegment ? \"Confirm\" : \"Next\"}\n </Button>\n </div>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { captureErrorInSentry } from \"./captureErrorInSentry\";\n\nexport const formatDateString = (dateString: string) => {\n const date = new Date(dateString);\n if (!isNaN(date.valueOf())) return formatDate(date);\n else {\n captureErrorInSentry(\n new Error(\n `formatDateString attempted to parse an invalid date string: ${dateString}`,\n ),\n );\n }\n};\n\nexport const formatDate = (date: Date) => {\n const { format } = new Intl.DateTimeFormat(undefined, {\n dateStyle: \"medium\",\n });\n return format(date);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSliceSegment } from \"@duffel/api/types\";\nimport { formatDateString } from \"@lib/formatDate\";\nimport React from \"react\";\n\nexport interface BaggageSelectionModalHeaderProps {\n segmentCount: number;\n currentSegmentIndex: number;\n currentSegment: OfferSliceSegment;\n setCurrentSegmentIndex: (index: number) => void;\n}\n\nexport const BaggageSelectionModalHeader: React.FC<\n BaggageSelectionModalHeaderProps\n> = ({\n segmentCount,\n currentSegmentIndex,\n currentSegment,\n setCurrentSegmentIndex,\n}) => (\n <div style={{ padding: \"24px 24px 16px\" }}>\n {segmentCount > 1 && (\n <div style={{ display: \"flex\", columnGap: \"4px\" }}>\n {Array(segmentCount)\n .fill(0)\n .map((_, index) =>\n index === currentSegmentIndex ? (\n <ActiveSegment key={`segment_${index}`} />\n ) : (\n <InactiveSegment\n key={`segment_${index}`}\n onClick={() => setCurrentSegmentIndex(index)}\n />\n ),\n )}\n </div>\n )}\n <h2\n className=\"h3--semibold\"\n style={segmentCount > 1 ? { marginTop: \"12px\" } : {}}\n >\n Flight to {currentSegment.destination.iata_code}\n <span\n className=\"p2--regular\"\n style={{\n color: \"var(--GREY-600)\",\n marginLeft: \"8px\",\n }}\n >\n {formatDateString(currentSegment.departing_at)}\n </span>\n </h2>\n </div>\n);\n\nconst InactiveSegment: React.FC<{\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}> = ({ onClick, style }) => (\n <button\n type=\"button\"\n onClick={onClick}\n style={{\n border: \"none\",\n width: \"4px\",\n height: \"4px\",\n padding: \"0\",\n borderRadius: \"4px\",\n backgroundColor:\n \"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))\",\n transition: \"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)\",\n ...style,\n }}\n />\n);\n\nconst ActiveSegment = () => (\n <InactiveSegment\n onClick={undefined}\n style={{\n backgroundColor: \"var(--SECONDARY, rgb(var(--ACCENT)))\",\n }}\n />\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { AnimatedLoaderEllipsis } from \"@components/shared/AnimatedLoaderEllipsis\";\nimport { Stamp } from \"@components/shared/Stamp\";\nimport { CreateOrderService, Offer } from \"@duffel/api/types\";\nimport { getCurrencyForServices } from \"@lib/getCurrencyForServices\";\nimport { getTotalAmountForServices } from \"@lib/getTotalAmountForServices\";\nimport { getTotalQuantity } from \"@lib/getTotalQuantity\";\nimport { hasService } from \"@lib/hasService\";\nimport { isCancelForAnyReasonService } from \"@lib/isCancelForAnyReasonService\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport React from \"react\";\nimport { WithServiceInformation } from \"src/types\";\nimport { Card } from \"../Card\";\nimport { CfarSelectionModal } from \"./CfarSelectionModal\";\n\nexport interface CfarSelectionCardProps {\n isLoading: boolean;\n offer?: Offer;\n selectedServices: WithServiceInformation<CreateOrderService>[];\n setSelectedServices: (\n selectedServices: WithServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const CfarSelectionCard: React.FC<CfarSelectionCardProps> = ({\n isLoading,\n offer,\n selectedServices,\n setSelectedServices,\n}) => {\n const [isOpen, setIsOpen] = React.useState(false);\n\n const containsCfarService = hasService(offer, \"cancel_for_any_reason\");\n const totalQuantity = getTotalQuantity(selectedServices);\n const isCfarAdded = totalQuantity > 0;\n\n let currencyToUse = offer?.base_currency || \"\";\n if (containsCfarService) {\n currencyToUse = getCurrencyForServices(offer!, \"cancel_for_any_reason\");\n }\n\n const totalAmount = getTotalAmountForServices(offer!, selectedServices);\n const totalAmountFormatted = offer\n ? moneyStringFormatter(currencyToUse)(totalAmount)\n : \"0\";\n\n const cfarService = offer?.available_services.find(\n isCancelForAnyReasonService,\n );\n\n const copy =\n containsCfarService && isCfarAdded\n ? `Your trip is protected for ${totalAmountFormatted}`\n : `Protect your purchase if you decide to cancel`;\n\n return (\n <>\n <Card\n buttonTitle=\"Add cancel for any reason\"\n title=\"Cancel for any reason\"\n copy={copy}\n icon=\"shield_with_moon\"\n onClick={containsCfarService ? () => setIsOpen(true) : null}\n isLoading={isLoading}\n disabled={!isLoading && !containsCfarService}\n isSelected={isCfarAdded}\n >\n {isLoading && (\n <Stamp color=\"var(--GREY-900)\" backgroundColor=\"var(--GREY-100)\">\n Loading\n <AnimatedLoaderEllipsis />\n </Stamp>\n )}\n {!isLoading && !containsCfarService && (\n <Stamp color=\"var(--GREY-700)\" backgroundColor=\"var(--GREY-200)\">\n Not available\n </Stamp>\n )}\n </Card>\n\n <CfarSelectionModal\n isOpen={Boolean(isOpen && offer && cfarService)}\n offerCurrency={offer?.base_currency}\n service={cfarService}\n onClose={(newSelectedServices) => {\n setIsOpen(false);\n setSelectedServices(newSelectedServices);\n }}\n selectedServices={selectedServices}\n />\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport React, { ReactNode } from \"react\";\n\nexport const CfarSelectionModalBodyListItem: React.FC<{\n children: ReactNode;\n}> = ({ children }) => (\n <li className=\"cfar-modal-list-item\">\n <Icon name=\"check\" />\n <p>{children}</p>\n </li>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared//Icon\";\nimport { ModalBody } from \"@components/shared/Modal\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport React from \"react\";\nimport { CfarSelectionModalBodyListItem } from \"./CfarSelectionModalBodyListItem\";\nimport { Offer, OfferAvailableServiceCFAR } from \"@duffel/api/types\";\n\nexport interface CfarSelectionModalBodyProps {\n offerCurrency: Offer[\"base_currency\"];\n service: OfferAvailableServiceCFAR;\n}\n\nexport const CfarSelectionModalBody: React.FC<CfarSelectionModalBodyProps> = ({\n offerCurrency,\n service,\n}) => (\n <ModalBody>\n <ul style={{ padding: 0 }}>\n <CfarSelectionModalBodyListItem>\n Cancel your trip for any reason\n </CfarSelectionModalBodyListItem>\n\n <CfarSelectionModalBodyListItem>\n Guaranteed refund of{\" \"}\n {moneyStringFormatter(offerCurrency)(+service.metadata.refund_amount)}\n </CfarSelectionModalBodyListItem>\n\n <CfarSelectionModalBodyListItem>\n Redeemable up to 24 hours before first flight departure\n </CfarSelectionModalBodyListItem>\n </ul>\n <a\n href={service.metadata.terms_and_conditions_url}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n className=\"p2--regular\"\n style={{\n color: \"var(--GREY-600)\",\n }}\n >\n Terms and conditions\n <Icon\n name=\"north_east\"\n size={16}\n style={{\n display: \"inline\",\n verticalAlign: \"middle\",\n marginLeft: \"4px\",\n }}\n />\n </a>\n </ModalBody>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Button } from \"@components/shared/Button\";\nimport { Icon } from \"@components/shared/Icon\";\nimport {\n CreateOrderService,\n OfferAvailableServiceCFAR,\n} from \"@duffel/api/types\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport React from \"react\";\nimport { WithServiceInformation } from \"src/types\";\n\nexport interface CfarSelectionModalFooterProps {\n service: OfferAvailableServiceCFAR;\n selectedServices: WithServiceInformation<CreateOrderService>[];\n onAddCfarService: () => void;\n onRemoveCfarService: () => void;\n onClose: () => void;\n}\n\nexport const CfarSelectionModalFooter: React.FC<\n CfarSelectionModalFooterProps\n> = ({\n service,\n selectedServices,\n onAddCfarService,\n onRemoveCfarService,\n onClose,\n}) => {\n const serviceIncluded = selectedServices.some(({ id }) => id == service.id);\n const formattedPrice = moneyStringFormatter(service.total_currency)(\n +service.total_amount,\n );\n\n return (\n <div className=\"cfar-modal-footer\">\n <Button\n size={48}\n variant={serviceIncluded ? \"destructive\" : \"outlined\"}\n onClick={serviceIncluded ? onRemoveCfarService : onClose}\n >\n {serviceIncluded ? \"Remove protection\" : \"Don\u2019t protect trip\"}\n </Button>\n\n {!serviceIncluded && (\n <Button\n size={48}\n data-testid=\"confirm-selection-for-cfar\"\n onClick={onAddCfarService}\n >\n Add protection for {formattedPrice}\n </Button>\n )}\n\n {serviceIncluded && <ProtectedTripBanner />}\n </div>\n );\n};\n\nconst ProtectedTripBanner: React.FC = () => (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n columnGap: \"8px\",\n backgroundColor: \"var(--GREY-100)\",\n padding: \"var(--space-12)\",\n borderRadius: \"var(--BUTTON-RADIUS)\",\n }}\n >\n <Icon\n size={20}\n name=\"shield_with_moon\"\n style={{ fill: \"var(--SECONDARY, rgb(var(--ACCENT)))\" }}\n />\n Your trip is protected\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\n\nexport const CfarSelectionModalHeader: React.FC = () => (\n <div style={{ padding: \"24px 24px 16px\" }}>\n <h2 className=\"h3--semibold\" style={{ marginBlock: 0 }}>\n Cancel for any reason\n </h2>\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Modal } from \"@components/shared/Modal\";\nimport {\n CreateOrderService,\n Offer,\n OfferAvailableServiceCFAR,\n} from \"@duffel/api/types\";\nimport React from \"react\";\nimport { WithServiceInformation } from \"src/types\";\nimport { CfarSelectionModalBody } from \"./CfarSelectionModalBody\";\nimport { CfarSelectionModalFooter } from \"./CfarSelectionModalFooter\";\nimport { CfarSelectionModalHeader } from \"./CfarSelectionModalHeader\";\n\nexport interface CfarSelectionModalProps {\n isOpen: boolean;\n offerCurrency?: Offer[\"base_currency\"];\n service?: OfferAvailableServiceCFAR;\n selectedServices: WithServiceInformation<CreateOrderService>[];\n onClose: (\n selectedServices: WithServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const CfarSelectionModal: React.FC<CfarSelectionModalProps> = ({\n isOpen,\n offerCurrency,\n service,\n onClose,\n selectedServices,\n}) => {\n return (\n <Modal isOpen={isOpen} onClose={() => onClose(selectedServices)}>\n <CfarSelectionModalHeader />\n {service && offerCurrency && (\n <>\n <CfarSelectionModalBody\n service={service}\n offerCurrency={offerCurrency}\n />\n <CfarSelectionModalFooter\n service={service}\n selectedServices={selectedServices}\n onAddCfarService={() =>\n onClose([\n {\n id: service.id,\n quantity: 1,\n serviceInformation: {\n type: \"cancel_for_any_reason\",\n total_amount: service.total_amount,\n total_currency: service.total_currency,\n ...service.metadata,\n },\n },\n ])\n }\n onRemoveCfarService={() => onClose([])}\n onClose={() => onClose(selectedServices)}\n />\n </>\n )}\n </Modal>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap, SeatMapCabinRowSectionElement } from \"@duffel/api/types\";\n\nconst getFirstSeatElementMatchingCriteria = (\n seatMaps: SeatMap[],\n matcher: (element: SeatMapCabinRowSectionElement) => boolean,\n) => {\n for (const seatMap of seatMaps) {\n for (const cabin of seatMap.cabins) {\n for (const row of cabin.rows) {\n for (const section of row.sections) {\n for (const element of section.elements) {\n if (matcher(element)) {\n return element;\n }\n }\n }\n }\n }\n }\n};\n\nexport { getFirstSeatElementMatchingCriteria };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap, SeatMapCabinRowSectionElementSeat } from \"@duffel/api/types\";\nimport { getFirstSeatElementMatchingCriteria } from \"./getFirstSeatElementMatchingCriteria\";\n\n/**\n *\n * Returns the currency of the first service of the given seat maps.\n *\n * @param seatMaps[] Array of seat maps\n * @returns A string representing the currency of the seat maps in the offer.\n */\nconst getCurrencyForSeatMaps = (seatMaps: SeatMap[]): string | undefined => {\n const firstElementWithServices:\n | SeatMapCabinRowSectionElementSeat\n | undefined = getFirstSeatElementMatchingCriteria(\n seatMaps,\n (element) =>\n element.type === \"seat\" && element.available_services.length > 0,\n ) as SeatMapCabinRowSectionElementSeat;\n return firstElementWithServices?.available_services[0]?.total_currency;\n};\n\nexport { getCurrencyForSeatMaps };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap } from \"@duffel/api/types\";\n\nexport function hasAvailableSeatService(seatMaps?: SeatMap[]): boolean {\n if (!Array.isArray(seatMaps) || seatMaps.length === 0) return false;\n\n for (const seatMap of seatMaps) {\n for (const cabin of seatMap.cabins) {\n for (const rows of cabin.rows) {\n for (const section of rows.sections) {\n for (const element of section.elements) {\n if (\n element.type === \"seat\" &&\n element.available_services.length > 0\n ) {\n return true;\n }\n }\n }\n }\n }\n }\n\n return false;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { AnimatedLoaderEllipsis } from \"@components/shared/AnimatedLoaderEllipsis\";\nimport { Stamp } from \"@components/shared/Stamp\";\nimport {\n CreateOrder,\n CreateOrderService,\n Offer,\n SeatMap,\n} from \"@duffel/api/types\";\nimport { getCurrencyForSeatMaps } from \"@lib/getCurrencyForSeatMaps\";\nimport { getTotalAmountForServices } from \"@lib/getTotalAmountForServices\";\nimport { getTotalQuantity } from \"@lib/getTotalQuantity\";\nimport { hasAvailableSeatService } from \"@lib/hasAvailableSeatService\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport { withPlural } from \"@lib/withPlural\";\nimport React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { Card } from \"../Card\";\nimport { SeatSelectionModal } from \"./SeatSelectionModal\";\n\nexport interface SeatSelectionCardProps {\n isLoading: boolean;\n offer?: Offer;\n seatMaps?: SeatMap[];\n passengers: CreateOrder[\"passengers\"];\n selectedServices: WithSeatServiceInformation<CreateOrderService>[];\n setSelectedServices: (\n selectedServices: WithSeatServiceInformation<CreateOrderService>[],\n ) => void;\n}\n\nexport const SeatSelectionCard: React.FC<SeatSelectionCardProps> = ({\n isLoading,\n offer,\n seatMaps,\n passengers,\n selectedServices,\n setSelectedServices,\n}) => {\n const [isOpen, setIsOpen] = React.useState(false);\n\n const containsSeatService = hasAvailableSeatService(seatMaps);\n const totalQuantity = getTotalQuantity(selectedServices);\n const areSeatsAdded = totalQuantity > 0;\n\n const totalAmount = getTotalAmountForServices(\n offer!,\n selectedServices,\n seatMaps,\n );\n let currencyToUse = offer?.base_currency ?? \"\";\n if (seatMaps) {\n currencyToUse = getCurrencyForSeatMaps(seatMaps) ?? currencyToUse;\n }\n\n const totalAmountFormatted = offer\n ? moneyStringFormatter(currencyToUse)(totalAmount)\n : \"0\";\n\n const copy =\n containsSeatService && areSeatsAdded\n ? `${withPlural(\n totalQuantity,\n \"seat\",\n \"seats\",\n )} selected for ${totalAmountFormatted}`\n : \"Specify where on the plane you\u2019d like to sit\";\n\n return (\n <>\n <Card\n buttonTitle=\"Select seats\"\n title=\"Seat selection\"\n copy={copy}\n icon=\"flight_class\"\n onClick={containsSeatService ? () => setIsOpen(true) : null}\n isLoading={isLoading}\n disabled={!isLoading && !containsSeatService}\n isSelected={areSeatsAdded}\n >\n {isLoading && (\n <Stamp color=\"var(--GREY-900)\" backgroundColor=\"var(--GREY-100)\">\n Loading\n <AnimatedLoaderEllipsis />\n </Stamp>\n )}\n {!isLoading && !containsSeatService && (\n <Stamp color=\"var(--GREY-700)\" backgroundColor=\"var(--GREY-200)\">\n Not available\n </Stamp>\n )}\n </Card>\n\n <SeatSelectionModal\n isOpen={Boolean(offer && seatMaps && isOpen)}\n seatMaps={seatMaps}\n offer={offer}\n passengers={passengers}\n selectedServices={selectedServices}\n onClose={(services) => {\n setSelectedServices(services);\n setIsOpen(false);\n }}\n />\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSliceSegment } from \"@duffel/api/types\";\n\nexport const getPassengerBySegmentList = (segments: OfferSliceSegment[]) =>\n segments.flatMap((segment) =>\n segment.passengers.map((passenger, passengerIndex) => ({\n passenger,\n passengerIndex,\n segment,\n })),\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Modal } from \"@components/shared/Modal\";\nimport {\n CreateOrder,\n CreateOrderService,\n Offer,\n SeatMap,\n} from \"@duffel/api/types\";\nimport { getCurrencyForSeatMaps } from \"@lib/getCurrencyForSeatMaps\";\nimport { getPassengerBySegmentList } from \"@lib/getPassengerBySegmentList\";\nimport { getPassengerMapById } from \"@lib/getPassengerMapById\";\nimport { getPassengerName } from \"@lib/getPassengerName\";\nimport { getSegmentList } from \"@lib/getSegmentList\";\nimport { getServicePriceMapById } from \"@lib/getServicePriceMapById\";\nimport React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { SeatSelectionModalBody } from \"./SeatSelectionModalBody\";\nimport { SeatSelectionModalFooter } from \"./SeatSelectionModalFooter\";\nimport { SeatSelectionModalHeader } from \"./SeatSelectionModalHeader\";\n\ntype CreateOrderServiceWithInformation =\n WithSeatServiceInformation<CreateOrderService>;\n\nexport interface SeatSelectionModalProps {\n isOpen: boolean;\n offer?: Offer;\n seatMaps?: SeatMap[];\n selectedServices: CreateOrderServiceWithInformation[];\n passengers: CreateOrder[\"passengers\"];\n onClose: (selectedServices: CreateOrderServiceWithInformation[]) => void;\n}\n\nexport const SeatSelectionModal: React.FC<SeatSelectionModalProps> = ({\n isOpen,\n offer,\n passengers,\n seatMaps,\n selectedServices,\n onClose,\n}) => {\n const [currentPermutationIndex, setCurrentPermutationIndex] =\n React.useState(0);\n\n const [selectedServicesState, setSelectedServicesState] =\n React.useState<CreateOrderServiceWithInformation[]>(selectedServices);\n const selectedServicesStateMap = selectedServicesState.reduce(\n (all, service) => ({ ...all, [service.id]: service }),\n {} as Record<string, CreateOrderServiceWithInformation>,\n );\n\n if (!offer || !seatMaps) return null;\n\n const segments = getSegmentList(offer);\n const passengerMapById = getPassengerMapById(passengers);\n const servicePricesMap = getServicePriceMapById(offer.available_services);\n const segmentAndPassengerPermutations = getPassengerBySegmentList(segments);\n const {\n passenger: { passenger_id: currentPassengerId },\n passengerIndex: currentPassengerIndex,\n segment: { id: currentSegmentId },\n } = segmentAndPassengerPermutations[currentPermutationIndex];\n\n const currentSegment = segments.find(({ id }) => id === currentSegmentId)!;\n const currentPassenger = passengerMapById[currentPassengerId];\n const currentSeatMap = seatMaps.find(\n (seatMap) => seatMap.segment_id === currentSegmentId,\n )!;\n\n const currentPassengerName = getPassengerName(\n currentPassenger,\n offer.passengers[currentPassengerIndex],\n currentPassengerIndex + 1,\n );\n\n const onSeatToggle = (\n seatServiceToToggle: CreateOrderServiceWithInformation,\n ) => {\n let newSeatServices = new Array<CreateOrderServiceWithInformation>();\n\n for (const selectedServiceFromState of selectedServicesState) {\n const hasClickedSeatToToggleOff =\n selectedServiceFromState.id === seatServiceToToggle.id &&\n seatServiceToToggle.quantity === 0;\n\n const isSelectedServiceFromStateForTheSameSegmentAndPassengerPermutation =\n selectedServiceFromState.serviceInformation?.segmentId ===\n currentSegmentId &&\n selectedServiceFromState.serviceInformation?.passengerId ===\n currentPassengerId;\n\n if (\n !hasClickedSeatToToggleOff &&\n !isSelectedServiceFromStateForTheSameSegmentAndPassengerPermutation\n ) {\n newSeatServices = [...newSeatServices, selectedServiceFromState];\n }\n }\n\n if (seatServiceToToggle.quantity > 0) {\n newSeatServices = [...newSeatServices, seatServiceToToggle];\n }\n\n setSelectedServicesState(newSeatServices);\n };\n\n const currencyToUse =\n getCurrencyForSeatMaps(seatMaps) ?? offer.total_currency;\n\n return (\n <Modal isOpen={isOpen} onClose={() => onClose(selectedServices)}>\n <SeatSelectionModalHeader\n segmentAndPassengerPermutationsCount={\n segmentAndPassengerPermutations.length\n }\n currentSegment={currentSegment}\n currentPassengerName={currentPassengerName}\n currentSegmentAndPassengerPermutationsIndex={currentPermutationIndex}\n setCurrentSegmentAndPassengerPermutationsIndex={\n setCurrentPermutationIndex\n }\n />\n <SeatSelectionModalBody\n selectedServicesMap={selectedServicesStateMap}\n seatMap={currentSeatMap}\n onSeatToggled={onSeatToggle}\n currentPassengerId={currentPassengerId}\n currentPassengerName={currentPassengerName}\n currentSegmentId={currentSegmentId}\n />\n <SeatSelectionModalFooter\n seatMaps={seatMaps}\n currency={currencyToUse}\n selectedServices={selectedServicesState}\n servicePrices={servicePricesMap}\n isFirstSegment={currentPermutationIndex === 0}\n isLastSegment={\n currentPermutationIndex + 1 === segmentAndPassengerPermutations.length\n }\n onNextSegmentButtonClicked={() => {\n setCurrentPermutationIndex(currentPermutationIndex + 1);\n }}\n onPreviousSegmentButtonClicked={() => {\n setCurrentPermutationIndex(currentPermutationIndex - 1);\n }}\n onClose={() => onClose(selectedServicesState)}\n />\n </Modal>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMap } from \"@duffel/api/types\";\n\nexport const getCabinsForSegmentAndDeck = (forDeck: number, seatMap: SeatMap) =>\n seatMap.cabins.filter((cabin) => cabin.deck === forDeck);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n SeatMapCabin,\n SeatMapCabinRowSectionElementAmenity,\n} from \"@duffel/api/types\";\n\nexport const getSymbols = (\n cabins: SeatMapCabin[],\n): Set<SeatMapCabinRowSectionElementAmenity> => {\n const results: Set<SeatMapCabinRowSectionElementAmenity> = new Set();\n for (const cabin of cabins) {\n for (const row of cabin.rows) {\n for (const section of row.sections) {\n for (const element of section.elements) {\n if (element.type !== \"seat\" && element.type !== \"empty\") {\n results.add(element.type);\n }\n }\n }\n }\n }\n return results;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SeatMapCabin } from \"@duffel/api/types\";\n\nexport const hasWings = (cabin: SeatMapCabin, rowIndex: number) =>\n Boolean(\n cabin.wings &&\n cabin.wings.first_row_index <= rowIndex &&\n cabin.wings.last_row_index >= rowIndex,\n );\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrderService, SeatMap as SeatMapType } from \"@duffel/api/types\";\nimport { getCabinsForSegmentAndDeck } from \"@lib/getCabinsForSegmentAndDeck\";\nimport { getSymbols } from \"@lib/getSymbols\";\nimport { hasWings } from \"@lib/hasWings\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { DeckSelect } from \"./DeckSelect\";\nimport { Legend } from \"./Legend\";\nimport { Row } from \"./Row\";\nimport { SeatMapUnavailable } from \"./SeatMapUnavailable\";\n\nexport interface SeatMapProps {\n seatMap: SeatMapType;\n selectedServicesMap: Record<\n string,\n WithSeatServiceInformation<CreateOrderService>\n >;\n onSeatToggled: (\n seatService: WithSeatServiceInformation<CreateOrderService>,\n ) => void;\n currentPassengerId: string;\n currentPassengerName: string;\n currentSegmentId: string;\n}\n\nexport const SeatMap: React.FC<SeatMapProps> = ({\n seatMap,\n onSeatToggled,\n selectedServicesMap,\n currentPassengerId,\n currentPassengerName,\n currentSegmentId,\n}) => {\n const [selectedDeck, setSelectedDeck] = React.useState(0);\n\n if (!seatMap || !seatMap.cabins || !seatMap.cabins.length) {\n return <SeatMapUnavailable />;\n }\n\n const cabins = getCabinsForSegmentAndDeck(selectedDeck, seatMap);\n const hasMultipleDecks = cabins.length !== seatMap.cabins.length;\n const anyHasWings = seatMap.cabins.some((cabin) => cabin.wings);\n\n if (!cabins || !cabins.length) {\n return <SeatMapUnavailable />;\n }\n\n const symbols = getSymbols(cabins);\n\n return (\n <div\n className={classNames(\"seat-map\", {\n \"seat-map--wings\": anyHasWings,\n })}\n >\n {hasMultipleDecks && (\n <DeckSelect\n value={selectedDeck}\n setValue={(value) => {\n setSelectedDeck(value);\n }}\n />\n )}\n <div className=\"seat-map__legend-container\">\n <Legend symbols={symbols} />\n </div>\n {cabins.map((cabin, cabinIndex) => (\n <div\n key={`cabin-${cabinIndex}`}\n className=\"seat-map__map-container\"\n style={{ \"--CABIN-AISLES\": cabin.aisles } as React.CSSProperties}\n >\n {cabin.rows.map((row, rowIndex) => (\n <Row\n key={rowIndex}\n row={row}\n hasWings={hasWings(cabin, rowIndex)}\n onSeatToggled={onSeatToggled}\n selectedServicesMap={selectedServicesMap}\n currentPassengerId={currentPassengerId}\n currentPassengerName={currentPassengerName}\n currentSegmentId={currentSegmentId}\n />\n ))}\n </div>\n ))}\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import classNames from \"classnames\";\nimport React from \"react\";\n\nexport interface TabsProps {\n /**\n * The currently selected tab option\n */\n value: string;\n\n /**\n * Callback for when a new tab option is selected\n */\n onChange: (value: string) => void;\n\n /**\n * The options you want to render on the tabs\n */\n options: string[];\n}\n\nexport const Tabs: React.FC<TabsProps> = ({ value, onChange, options }) => (\n <div className=\"seat-map__tab-select\">\n {options.map((option) => (\n <button\n key={option}\n type=\"button\"\n className={classNames(\"seat-map__tab-select-option\", {\n \"seat-map__tab-select-option--selected\": option === value,\n })}\n onClick={() => value !== option && onChange(option)}\n >\n {option}\n </button>\n ))}\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Tabs } from \"@components/shared/Tabs\";\nimport * as React from \"react\";\n\nexport interface DeckSelectProps {\n /**\n * The currently selected deck number\n */\n value: number;\n /**\n * What to do when the user selects a deck\n */\n setValue: (value: number) => void;\n}\n\n/**\n * The deck selection component for the seat map.\n */\nexport const DeckSelect: React.FC<DeckSelectProps> = ({ value, setValue }) => {\n const options = [\"Lower deck\", \"Upper deck\"];\n return (\n <Tabs\n options={options}\n value={options[value]}\n onChange={(item) => setValue(options.indexOf(item))}\n />\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon, IconName } from \"@components/shared/Icon\";\nimport { SeatMapCabinRowSectionElementAmenity } from \"@duffel/api/types\";\nimport * as React from \"react\";\n\nexport interface LegendProps {\n /**\n * The set of additional symbols to display\n */\n symbols: Set<SeatMapCabinRowSectionElementAmenity>;\n}\n\n/**\n * The legend for the seat map.\n */\nexport const Legend: React.FC<LegendProps> = ({ symbols }) => (\n <div className=\"seat-map__legend\">\n <span className=\"seat-map__legend-item\">\n <span\n className=\"seat-map__legend-seat seat-map__legend-seat--fee-payable\"\n aria-label=\"Additional cost for seat\"\n >\n <Icon\n name=\"seat_paid_indicator\"\n className=\"seat-map__legend-seat--fee-payable-indicator\"\n size={12}\n />\n </span>\n Additional Cost\n </span>\n <span className=\"seat-map__legend-item\">\n <span\n className=\"seat-map__legend-seat seat-map__legend-seat--included\"\n aria-label=\"Included seat\"\n />\n Included\n </span>\n <span className=\"seat-map__legend-item\">\n <span\n className=\"seat-map__legend-seat seat-map__legend-seat--selected\"\n aria-label=\"Selected seat\"\n />\n Selected\n </span>\n <span className=\"seat-map__legend-item\">\n <span className=\"seat-map__legend-seat\" aria-label=\"Unavailable seat\">\n <Icon name=\"close\" size={14} />\n </span>\n Unavailable\n </span>\n {[...symbols].map((symbol) => (\n <span\n key={symbol}\n className=\"seat-map__legend-item seat-map__legend-item--symbol\"\n >\n <Icon name={symbol as IconName} size={20} />\n {symbol.split(\"_\")[0]}\n </span>\n ))}\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n SeatMapCabinRow,\n SeatMapCabinRowSectionElementSeat,\n} from \"@duffel/api/types\";\n\nexport const getRowNumber = (row: SeatMapCabinRow): string | null => {\n const seats = Object.values(row.sections)\n .map((section) => section.elements)\n .reduce((acc, val) => acc.concat(val), [])\n .filter(\n (element) => element.type === \"seat\",\n ) as SeatMapCabinRowSectionElementSeat[];\n\n return seats.length > 0\n ? seats[0].designator.substring(0, seats[0].designator.length - 1)\n : null;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n CreateOrderService,\n SeatMapCabinRow,\n SeatMapCabinRowSection,\n} from \"@duffel/api/types\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { Element } from \"./Element\";\nimport { EmptyElement } from \"./EmptyElement\";\n\ninterface RowSectionProps {\n row: SeatMapCabinRow;\n rowNumber: string | null;\n hasWings: boolean;\n section: SeatMapCabinRowSection;\n sectionIndex: number;\n selectedServicesMap: Record<\n string,\n WithSeatServiceInformation<CreateOrderService>\n >;\n onSeatToggled: (\n seatService: WithSeatServiceInformation<CreateOrderService>,\n ) => void;\n currentPassengerId: string;\n currentPassengerName: string;\n currentSegmentId: string;\n}\n\nexport const RowSection: React.FC<RowSectionProps> = ({\n row,\n rowNumber,\n hasWings,\n section,\n sectionIndex,\n onSeatToggled,\n selectedServicesMap,\n currentPassengerId,\n currentPassengerName,\n currentSegmentId,\n}) => {\n const rowLength = Object.keys(row.sections).length;\n const isOneSectionRow = rowLength === 1;\n\n return (\n <React.Fragment key={sectionIndex}>\n <div\n className={classNames(\"map-section\", {\n \"map-section--left\": sectionIndex === 0,\n \"map-section--right\": !isOneSectionRow\n ? sectionIndex === rowLength - 1\n : false,\n \"map-section--wing\": hasWings,\n })}\n >\n {section.elements.length > 0 ? (\n section.elements.map((element, elementIndex) => (\n <React.Fragment key={elementIndex}>\n <Element\n sectionIndex={sectionIndex}\n elementIndex={elementIndex}\n element={element}\n selectedServicesMap={selectedServicesMap}\n onSeatToggled={onSeatToggled}\n currentPassengerId={currentPassengerId}\n currentSegmentId={currentSegmentId}\n currentPassengerName={currentPassengerName}\n />\n </React.Fragment>\n ))\n ) : (\n <EmptyElement />\n )}\n </div>\n {(sectionIndex < rowLength - 1 ||\n (isOneSectionRow && sectionIndex < rowLength)) && (\n <span className=\"map-section__aisle\">{rowNumber}</span>\n )}\n {isOneSectionRow && sectionIndex === row.sections.length - 1 && (\n <EmptyElement />\n )}\n </React.Fragment>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon, IconName } from \"@components/shared/Icon\";\nimport { SeatMapCabinRowSectionElementAmenity } from \"@duffel/api/types\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\n\nconst amenitiesWithoutWrapper = [\"bassinet\", \"exit_row\"];\n\nexport interface AmenityProps {\n type: SeatMapCabinRowSectionElementAmenity;\n}\n\nexport const Amenity: React.FC<AmenityProps> = ({ type }) => (\n <div\n className={classNames(\"map-element map-element--amenity\", {\n \"map-element--wrapped\": !amenitiesWithoutWrapper.includes(type),\n })}\n aria-label={type.toString()}\n >\n <Icon name={type as IconName} size={16} />\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\n\nexport const EmptyElement: React.FC = () => (\n <div className=\"map-element map-element--empty\" />\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\n\ninterface ExitElementProps {\n isRight: boolean;\n}\n\nexport const ExitElement: React.FC<ExitElementProps> = ({ isRight }) => (\n <div\n className={classNames(\"map-element map-element--exit\", {\n \"map-element--exit--right\": isRight,\n })}\n >\n {isRight ? <Icon name=\"exit_row_right\" /> : <Icon name=\"exit_row\" />}\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export const getPassengerInitials = (passengerName = \"\") =>\n passengerName\n .split(\" \")\n .map((partOfTheName) => partOfTheName[0])\n .slice(0, 2)\n .join(\"\");\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport {\n CreateOrderService,\n SeatMapCabinRowSectionElementSeat,\n} from \"@duffel/api/types\";\nimport { getPassengerInitials } from \"@lib/getPassengerInitials\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { SeatInfo } from \"./SeatInfo\";\nimport { SeatUnavailable } from \"./SeatUnavailable\";\nimport { WithSeatServiceInformation } from \"src/types\";\n\ninterface SeatElementProps {\n element: SeatMapCabinRowSectionElementSeat;\n currentSegmentId: string;\n currentPassengerId: string;\n currentPassengerName: string;\n onSeatToggled: (\n seatService: WithSeatServiceInformation<CreateOrderService>,\n ) => void;\n selectedServicesMap: Record<\n string,\n WithSeatServiceInformation<CreateOrderService>\n >;\n}\n\nexport const SeatElement: React.FC<SeatElementProps> = ({\n element,\n currentPassengerId,\n currentSegmentId,\n currentPassengerName,\n onSeatToggled,\n selectedServicesMap,\n}) => {\n const seatServiceFromElement = element.available_services.find(\n (service) => service.passenger_id === currentPassengerId,\n );\n if (!seatServiceFromElement) return <SeatUnavailable seat={element} />;\n\n const selectedServiceFromMap = Object.values(selectedServicesMap).find(\n (service) =>\n service.serviceInformation?.designator === element.designator &&\n service.serviceInformation?.segmentId === currentSegmentId,\n );\n\n const isSeatSelected = selectedServiceFromMap != undefined;\n\n const seatLabel = isSeatSelected\n ? getPassengerInitials(\n selectedServiceFromMap.serviceInformation?.passengerName,\n )\n : element.designator.charAt(element.designator.length - 1);\n\n const isFeePayable =\n !isNaN(+seatServiceFromElement?.total_amount) &&\n +seatServiceFromElement?.total_amount !== 0;\n\n const isSeatSelectionAvaiable =\n !isSeatSelected &&\n seatServiceFromElement.passenger_id === currentPassengerId;\n\n const isActionable =\n !isSeatSelected ||\n (isSeatSelected &&\n currentSegmentId ===\n selectedServiceFromMap.serviceInformation?.segmentId &&\n currentPassengerId ===\n selectedServiceFromMap.serviceInformation?.passengerId);\n\n const seatClassName = classNames(\"map-element\", \"map-element__seat\", {\n \"map-element--available\": isSeatSelectionAvaiable,\n \"map-element--selected\": isSeatSelected,\n \"map-element--actionable\": isActionable,\n });\n\n const priceLabel = moneyStringFormatter(\n seatServiceFromElement.total_currency,\n )(+seatServiceFromElement.total_amount);\n\n const isSeatInfoDisplayed =\n isSeatSelected &&\n currentSegmentId === selectedServiceFromMap.serviceInformation?.segmentId &&\n currentPassengerId ===\n selectedServiceFromMap.serviceInformation?.passengerId;\n\n return (\n <>\n <button\n type=\"button\"\n data-testid={`seat-${element.designator}`}\n id={element.designator}\n className={seatClassName}\n onClick={() => {\n if (!isActionable) return;\n onSeatToggled({\n quantity: isSeatSelected ? 0 : 1,\n id: seatServiceFromElement.id,\n serviceInformation: {\n type: \"seat\",\n segmentId: currentSegmentId,\n passengerId: currentPassengerId,\n passengerName: currentPassengerName,\n designator: element.designator,\n disclosures: element.disclosures,\n total_amount: seatServiceFromElement.total_amount,\n total_currency: seatServiceFromElement.total_currency,\n },\n });\n }}\n aria-label={`${element.designator} ${\n element.name || \"Seat\"\n } ${priceLabel}`}\n >\n {isFeePayable && (\n <Icon\n name=\"seat_paid_indicator\"\n className=\"map-element--fee-payable\"\n size={16}\n />\n )}\n {seatLabel}\n </button>\n {isSeatInfoDisplayed && (\n <SeatInfo seat={element} service={seatServiceFromElement} />\n )}\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n SeatMapCabinRowSectionAvailableService,\n SeatMapCabinRowSectionElementSeat,\n} from \"@duffel/api/types\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport * as React from \"react\";\n\nexport interface SeatInfoProps {\n seat: SeatMapCabinRowSectionElementSeat | null;\n service: SeatMapCabinRowSectionAvailableService | undefined;\n}\n\nexport const SeatInfo: React.FC<SeatInfoProps> = ({ seat, service }) => {\n const price = service\n ? moneyStringFormatter(service.total_currency)(+service.total_amount)\n : \"\";\n\n return (\n <div className=\"seat-info\">\n <div className=\"seat-info__details\">\n <strong>{seat?.designator}</strong>\n <span>{seat?.name || \"Seat\"} </span>\n <strong>{price}</strong>\n </div>\n {seat?.disclosures.map((disclosure, index) => (\n <div key={index} className=\"seat-info__disclosure\">\n {disclosure}\n </div>\n ))}\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport { SeatMapCabinRowSectionElementSeat } from \"@duffel/api/types\";\nimport * as React from \"react\";\n\nexport const SeatUnavailable: React.FC<{\n seat: SeatMapCabinRowSectionElementSeat;\n}> = ({ seat }) => (\n <span\n className=\"map-element map-element__seat\"\n aria-label={`${seat.designator} ${seat.name || \"Seat\"} Unavailable`}\n >\n <Icon name=\"close\" size={14} />\n </span>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n CreateOrderService,\n SeatMapCabinRowSectionElement,\n} from \"@duffel/api/types\";\nimport { isSeatElement } from \"@lib/isSeatElement\";\nimport * as React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { Amenity } from \"./Amenity\";\nimport { EmptyElement } from \"./EmptyElement\";\nimport { ExitElement } from \"./ExitElement\";\nimport { SeatElement } from \"./SeatElement\";\n\ninterface ElementProps {\n sectionIndex: number;\n elementIndex: number;\n element: SeatMapCabinRowSectionElement;\n selectedServicesMap: Record<\n string,\n WithSeatServiceInformation<CreateOrderService>\n >;\n onSeatToggled: (\n seatService: WithSeatServiceInformation<CreateOrderService>,\n ) => void;\n currentPassengerId: string;\n currentSegmentId: string;\n currentPassengerName: string;\n}\n\nexport const Element: React.FC<ElementProps> = ({\n element,\n elementIndex,\n sectionIndex,\n onSeatToggled,\n selectedServicesMap,\n currentPassengerId,\n currentSegmentId,\n currentPassengerName,\n}) => {\n return (\n <>\n {isSeatElement(element) ? (\n <SeatElement\n currentSegmentId={currentSegmentId}\n currentPassengerId={currentPassengerId}\n currentPassengerName={currentPassengerName}\n selectedServicesMap={selectedServicesMap}\n key={elementIndex}\n element={element}\n onSeatToggled={onSeatToggled}\n />\n ) : element.type === \"empty\" ? (\n <EmptyElement key={elementIndex} />\n ) : element.type === \"exit_row\" ? (\n <ExitElement key={elementIndex} isRight={sectionIndex > 0} />\n ) : (\n <Amenity key={elementIndex} type={element.type} />\n )}\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { CreateOrderService, SeatMapCabinRow } from \"@duffel/api/types\";\nimport { getRowNumber } from \"@lib/getRowNumber\";\nimport * as React from \"react\";\nimport { WithSeatServiceInformation } from \"src/types\";\nimport { RowSection } from \"./RowSection\";\n\nexport interface RowProps {\n row: SeatMapCabinRow;\n hasWings: boolean;\n selectedServicesMap: Record<\n string,\n WithSeatServiceInformation<CreateOrderService>\n >;\n onSeatToggled: (\n seatService: WithSeatServiceInformation<CreateOrderService>,\n ) => void;\n currentPassengerId: string;\n currentPassengerName: string;\n currentSegmentId: string;\n}\n\nexport const Row: React.FC<RowProps> = ({\n row,\n hasWings,\n onSeatToggled,\n selectedServicesMap,\n currentPassengerId,\n currentPassengerName,\n currentSegmentId,\n}) => {\n const rowNumber = getRowNumber(row);\n\n return (\n <>\n {row.sections.map((section, sectionIndex) => (\n <RowSection\n key={sectionIndex}\n row={row}\n rowNumber={rowNumber}\n hasWings={hasWings}\n section={section}\n sectionIndex={sectionIndex}\n selectedServicesMap={selectedServicesMap}\n onSeatToggled={onSeatToggled}\n currentPassengerId={currentPassengerId}\n currentPassengerName={currentPassengerName}\n currentSegmentId={currentSegmentId}\n />\n ))}\n </>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { NonIdealState } from \"@components/shared/NonIdealState\";\nimport * as React from \"react\";\n\nexport const SeatMapUnavailable: React.FC = () => (\n <NonIdealState>\n <p style={{ marginBlock: \"0\" }} className=\"p1--semibold\">\n Seat selection unavailable\n </p>\n <p\n className=\"p1--regular\"\n style={{\n color: \"var(--GREY-600)\",\n marginBlock: \"12px\",\n textAlign: \"center\",\n }}\n >\n Unfortunately seat selection is not available for this flight. A seat will\n be allocated by the airline.\n </p>\n </NonIdealState>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { ModalBody } from \"@components/shared/Modal\";\nimport React from \"react\";\nimport { SeatMap, SeatMapProps } from \"./SeatMap\";\n\nexport type SeatSelectionModalBodyProps = SeatMapProps;\n\nexport const SeatSelectionModalBody: React.FC<SeatSelectionModalBodyProps> = (\n props,\n) => (\n <ModalBody>\n <SeatMap {...props} />\n </ModalBody>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Button } from \"@components/shared/Button\";\nimport { ServicePriceMapById } from \"@lib/getServicePriceMapById\";\nimport { getTotalAmountForServicesWithPriceMap } from \"@lib/getTotalAmountForServices\";\nimport { getTotalQuantity } from \"@lib/getTotalQuantity\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport { withPlural } from \"@lib/withPlural\";\nimport React from \"react\";\nimport { CreateOrder, SeatMap } from \"@duffel/api/types\";\n\nexport interface SeatSelectionModalFooterProps {\n currency: string;\n selectedServices: CreateOrder[\"services\"];\n servicePrices: ServicePriceMapById;\n\n isFirstSegment: boolean;\n isLastSegment: boolean;\n\n onNextSegmentButtonClicked: () => void;\n onPreviousSegmentButtonClicked: () => void;\n onClose: () => void;\n seatMaps: SeatMap[];\n}\n\nexport const SeatSelectionModalFooter: React.FC<\n SeatSelectionModalFooterProps\n> = ({\n selectedServices,\n servicePrices,\n currency,\n isFirstSegment,\n isLastSegment,\n onNextSegmentButtonClicked,\n onPreviousSegmentButtonClicked,\n onClose,\n seatMaps,\n}) => {\n const totalQuantity = getTotalQuantity(selectedServices);\n const totalAmount = getTotalAmountForServicesWithPriceMap(\n servicePrices,\n selectedServices,\n seatMaps,\n );\n const totalAmountLabel = moneyStringFormatter(currency)(totalAmount);\n const isOneWay = isFirstSegment && isLastSegment;\n\n return (\n <div style={{ padding: \"16px 24px 24px\" }}>\n <div className=\"flex--space-between\">\n <div>Price for {withPlural(totalQuantity, \"seat\", \"seats\")}</div>\n <div className=\"h3--semibold\">+ {totalAmountLabel}</div>\n </div>\n\n <div\n style={\n isOneWay\n ? { marginTop: \"16px\", display: \"grid\" }\n : {\n marginTop: \"16px\",\n display: \"grid\",\n columnGap: \"12px\",\n gridTemplateColumns: \"repeat(2, 1fr)\",\n }\n }\n >\n {!isOneWay && (\n <Button\n size={48}\n disabled={isFirstSegment}\n variant=\"outlined\"\n onClick={() => onPreviousSegmentButtonClicked()}\n >\n Back\n </Button>\n )}\n\n <Button\n size={48}\n data-testid=\"confirm-selection-for-seats\"\n onClick={() =>\n isLastSegment ? onClose() : onNextSegmentButtonClicked()\n }\n >\n {isLastSegment ? \"Confirm\" : \"Next\"}\n </Button>\n </div>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSliceSegment } from \"@duffel/api/types\";\nimport { formatDateString } from \"@lib/formatDate\";\nimport React from \"react\";\n\nexport interface SeatSelectionModalHeaderProps {\n segmentAndPassengerPermutationsCount: number;\n currentSegment: OfferSliceSegment;\n currentPassengerName: string;\n\n currentSegmentAndPassengerPermutationsIndex: number;\n setCurrentSegmentAndPassengerPermutationsIndex: (index: number) => void;\n}\n\nexport const SeatSelectionModalHeader: React.FC<\n SeatSelectionModalHeaderProps\n> = ({\n segmentAndPassengerPermutationsCount,\n currentSegmentAndPassengerPermutationsIndex,\n currentSegment,\n currentPassengerName,\n setCurrentSegmentAndPassengerPermutationsIndex,\n}) => (\n <div style={{ padding: \"24px 24px 16px\" }}>\n {segmentAndPassengerPermutationsCount > 1 && (\n <div style={{ display: \"flex\", columnGap: \"4px\" }}>\n {Array(segmentAndPassengerPermutationsCount)\n .fill(0)\n .map((_, index) =>\n index === currentSegmentAndPassengerPermutationsIndex ? (\n <ActiveSegment key={`segment_${index}`} />\n ) : (\n <InactiveSegment\n key={`segment_${index}`}\n onClick={() =>\n setCurrentSegmentAndPassengerPermutationsIndex(index)\n }\n />\n ),\n )}\n </div>\n )}\n <h2\n className=\"h3--semibold\"\n style={\n segmentAndPassengerPermutationsCount > 1\n ? { marginBlock: \"12px 0px\" }\n : {}\n }\n >\n Flight to {currentSegment.destination.iata_code}\n <span\n className=\"p2--regular\"\n style={{\n color: \"var(--GREY-600)\",\n marginLeft: \"8px\",\n }}\n >\n {formatDateString(currentSegment.departing_at)}\n </span>\n </h2>\n <p\n className=\"h3--semibold\"\n style={{ color: `var(--GREY-600)`, marginBlock: \"0 4px\" }}\n >\n {currentPassengerName}\n </p>\n </div>\n);\n\nconst InactiveSegment: React.FC<{\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}> = ({ onClick, style }) => (\n <button\n type=\"button\"\n onClick={onClick}\n style={{\n border: \"none\",\n width: \"4px\",\n height: \"4px\",\n padding: \"0\",\n borderRadius: \"4px\",\n backgroundColor:\n \"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))\",\n transition: \"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)\",\n ...style,\n }}\n />\n);\n\nconst ActiveSegment = () => (\n <InactiveSegment\n onClick={undefined}\n style={{\n backgroundColor: \"var(--SECONDARY, rgb(var(--ACCENT)))\",\n }}\n />\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { ErrorBoundary } from \"@components/shared/ErrorBoundary\";\nimport { hasHighLuminance } from \"@lib/hasHighLuminance\";\nimport { initializeLogger } from \"@lib/logging\";\nimport {\n CardElement,\n Elements,\n useElements,\n useStripe,\n} from \"@stripe/react-stripe-js\";\nimport { StripeCardElement, StripeError, loadStripe } from \"@stripe/stripe-js\";\nimport * as React from \"react\";\nimport { CustomStyles } from \"../../types\";\nimport { Button } from \"../shared/Button\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\n\nconst STRIPE_CARD_ELEMENT = \"card\";\nconst COMPONENT_VERSION = process.env.COMPONENT_VERSION;\n\nexport interface DuffelPaymentsProps {\n paymentIntentClientToken: string;\n onSuccessfulPayment: () => void;\n onFailedPayment: (error: StripeError) => void;\n\n styles?: CustomStyles;\n debug?: boolean;\n}\n\nconst CARD_ELEMENT_STYLE_BASE = {\n color: \"var(--GREY-900)\",\n fontFamily:\n '\"-apple-system\", \"BlinkMacSystemFont\", \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"sans-serif\"',\n fontSmoothing: \"antialiased\",\n fontSize: \"16px\",\n \"::placeholder\": {\n color: \"#ababb4\",\n },\n};\n\nconst CARD_ELEMENT_STYLE_INVALID = {\n color: \"#ef4444\",\n iconColor: \"#ef4444\",\n};\n\nconst CardPaymentComponent: React.FC<DuffelPaymentsProps> = ({\n styles,\n paymentIntentClientToken,\n onSuccessfulPayment,\n onFailedPayment,\n}) => {\n const [cardElement, setCardElement] =\n React.useState<StripeCardElement | null>(null);\n const [isComplete, setIsComplete] = React.useState<boolean>(false);\n const [isInvalid, setIsInvalid] = React.useState<boolean>(false);\n const [isProcessing, setIsProcessing] = React.useState<boolean>(false);\n const [errorMessage, setErrorMessage] = React.useState<string>(\"\");\n const stripe = useStripe();\n const elements = useElements();\n\n React.useEffect(() => {\n if (elements && !cardElement) {\n const maybeCard = elements?.getElement(STRIPE_CARD_ELEMENT);\n maybeCard && setCardElement(maybeCard as StripeCardElement);\n }\n }, [elements, cardElement]);\n\n React.useEffect(() => {\n if (cardElement) {\n cardElement.on(\"change\", (event) => {\n const { error, complete } = event;\n\n if (error) {\n setIsInvalid(true);\n setErrorMessage(error.message);\n } else {\n setIsInvalid(false);\n }\n complete ? setIsComplete(true) : setIsComplete(false);\n });\n }\n }, [cardElement]);\n\n // User is responsible for handling outcome of payment.\n const handleSubmit = async (\n e: React.MouseEvent<HTMLFormElement, MouseEvent>,\n ) => {\n e.preventDefault();\n if (!stripe || !elements) {\n return;\n }\n\n if (cardElement) {\n setIsProcessing(true);\n const decodedDuffelPaymentIntentClientToken = atob(\n paymentIntentClientToken,\n );\n const parsedDuffelPaymentIntentClientToken = JSON.parse(\n decodedDuffelPaymentIntentClientToken,\n );\n const { client_secret: clientSecret } =\n parsedDuffelPaymentIntentClientToken;\n\n const result = await stripe.confirmCardPayment(clientSecret, {\n payment_method: {\n card: cardElement,\n metadata: {\n duffel_components_version:\n COMPONENT_VERSION || \"failed-to-get-version\",\n },\n },\n });\n\n setIsProcessing(false);\n if (result.error) {\n const { error } = result;\n onFailedPayment(error);\n } else {\n onSuccessfulPayment();\n }\n }\n };\n\n return paymentIntentClientToken ? (\n <div className=\"card-payment__container\">\n <form onSubmit={handleSubmit}>\n {isProcessing && (\n <div\n className=\"card-payment--in-progress\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n />\n )}\n <CardElement\n className=\"card-details\"\n options={{\n style: {\n base: {\n ...CARD_ELEMENT_STYLE_BASE,\n ...(styles?.fontFamily && {\n fontFamily: styles.fontFamily,\n }),\n },\n invalid: { ...CARD_ELEMENT_STYLE_INVALID },\n },\n }}\n />\n <div className=\"card-payment__container--invalid\" role=\"alert\">\n {isInvalid && errorMessage}\n </div>\n <Button\n className=\"card-payment__pay-button\"\n type=\"submit\"\n disabled={!isComplete || isProcessing}\n aria-label=\"Pay\"\n >\n {isProcessing ? \"Processing...\" : \"Pay\"}\n </Button>\n </form>\n </div>\n ) : null;\n};\n\nexport const DuffelPayments: React.FC<DuffelPaymentsProps> = (props) => {\n const [stripe, setStripe] = React.useState<Promise<any> | null>(null);\n initializeLogger(props.debug || false);\n\n const decodedDuffelPaymentIntentClientToken = atob(\n props.paymentIntentClientToken,\n );\n\n let parsedDuffelPaymentIntentClientToken;\n\n try {\n parsedDuffelPaymentIntentClientToken = JSON.parse(\n decodedDuffelPaymentIntentClientToken,\n );\n } catch (error) {\n throw new Error(\"Invalid Duffel payment intent client token provided\");\n }\n\n const { publishable_key: duffelPublishableKey } =\n parsedDuffelPaymentIntentClientToken;\n\n React.useEffect(() => {\n if (!stripe && duffelPublishableKey) {\n const stripe = loadStripe(duffelPublishableKey);\n stripe && setStripe(stripe);\n }\n }, [stripe, duffelPublishableKey]);\n\n const duffelComponentsStyle: React.CSSProperties = {\n ...(props.styles?.accentColor && {\n \"--ACCENT\": props.styles.accentColor,\n }),\n ...(props.styles?.accentColor &&\n hasHighLuminance(props.styles.accentColor) && {\n \"--SECONDARY\": \"black\",\n \"--TERTIARY\": \"grey\",\n }),\n ...(props.styles?.fontFamily && {\n \"--FONT-FAMILY\": props.styles.fontFamily,\n }),\n ...(props.styles?.buttonCornerRadius && {\n \"--BUTTON-RADIUS\": props.styles.buttonCornerRadius,\n }),\n // `as any` is needed here is needed because we want to set css variables\n // that are not part of the css properties type\n } as any;\n\n return (\n <WithComponentStyles>\n <div style={duffelComponentsStyle}>\n <ErrorBoundary>\n <Elements stripe={stripe}>\n <CardPaymentComponent {...props} />\n </Elements>\n </ErrorBoundary>\n </div>\n </WithComponentStyles>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n", "import * as React from \"react\";\nimport classNames from \"classnames\";\n\ntype DivProps = JSX.IntrinsicElements[\"div\"];\nexport interface HSpaceProps extends DivProps {\n /**\n * A space-delimited list of class names to pass along to a child element.\n */\n className?: string;\n\n /**\n * The vertical spacing between each child element\n */\n space: 0 | 4 | 8 | 12 | 16;\n\n /**\n * If you'd like all children inside your horizontal space container\n * to be vertically aligned to the center of the div, you can set `alignCenter` to `true`\n *\n * Default: `false`\n */\n alignCenter?: boolean;\n\n /**\n * If you'd like all children inside your horizontal space container\n * to be spread out from one another, you can set `spaceBetween` to `true`\n *\n * Default: `false`\n */\n spaceBetween?: boolean;\n}\nexport const HSpace: React.FC<HSpaceProps> = ({\n className,\n space,\n alignCenter,\n spaceBetween,\n ...divProps\n}) => (\n <div\n className={classNames(\n \"h-space\",\n alignCenter && \"hspace--align-center\",\n spaceBetween && \"hspace--space-between\",\n `h-space--${space}`,\n className,\n )}\n {...divProps}\n ></div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport { HSpace } from \"@components/shared/HSpace\";\nimport { Icon } from \"@components/shared/Icon\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\n\nexport interface StaysRatingProps {\n rating: number;\n small?: boolean;\n}\n\nexport const StaysRating: React.FC<StaysRatingProps> = ({ rating, small }) => (\n <WithComponentStyles>\n <HSpace space={0} className=\"duffel-components\">\n {Array.from({ length: rating }).map((_, index) => (\n <Icon\n key={index}\n name=\"star\"\n color=\"--YELLOW-600\"\n size={small ? 8 : 12}\n />\n ))}\n </HSpace>\n </WithComponentStyles>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { IconName } from \"@components/shared/Icon\";\nimport { StaysRoomRate } from \"@duffel/api/types\";\n\nexport const LOYALTY_PROGRAMS_NAME_MAP = {\n wyndham_rewards: \"Wyndham Rewards\",\n choice_privileges: \"Choice Privileges\",\n marriott_bonvoy: \"Marriott Bonvoy\",\n best_western_rewards: \"Best Western Rewards\",\n world_of_hyatt: \"World of Hyatt\",\n hilton_honors: \"Hilton Honors\",\n ihg_one_rewards: \"IHG One Rewards\",\n leaders_club: \"Leaders Club\",\n stash_rewards: \"Stash Rewards\",\n omni_select_guest: \"Omni Select Guest\",\n i_prefer: \"I Prefer\",\n accor_live_limitless: \"Accor Live Limitless\",\n my_6: \"My 6\",\n jumeirah_one: \"Jumeirah One\",\n global_hotel_alliance_discovery: \"Global Hotel Alliance Discovery\",\n duffel_hotel_group_rewards: \"Duffel Hotel Group Rewards\",\n};\n\nexport const SOURCE_NAME_MAP = {\n bookingcom: \"Booking.com\",\n expedia: \"Expedia\",\n priceline: \"Priceline\",\n travelport: \"Travelport\",\n duffel_hotel_group: \"Duffel Hotel Group\",\n};\n\nexport const getBoardTypeLabel = (boardType: StaysRoomRate[\"board_type\"]) => {\n switch (boardType) {\n case \"room_only\":\n return \"Room only, no meals\";\n case \"breakfast\":\n return \"Breakfast included\";\n case \"half_board\":\n return \"Half board\";\n case \"full_board\":\n return \"Full board\";\n case \"all_inclusive\":\n return \"All inclusive\";\n default:\n return boardType;\n }\n};\n\nexport const boardTypeIcon = (\n boardType: StaysRoomRate[\"board_type\"],\n): IconName => {\n switch (boardType) {\n case \"room_only\":\n return \"bedroom_parent\";\n case \"breakfast\":\n return \"bakery_dining\";\n case \"half_board\":\n return \"bakery_dining\";\n case \"full_board\":\n return \"brunch_dining\";\n case \"all_inclusive\":\n return \"brunch_dining\";\n default:\n return boardType;\n }\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport classNames from \"classnames\";\n\ntype DivProps = JSX.IntrinsicElements[\"div\"];\nexport interface VSpaceProps extends DivProps {\n /**\n * A space-delimited list of class names to pass along to a child element.\n */\n className?: string;\n\n /**\n * The vertical spacing between each child element\n */\n space: 0 | 4 | 8 | 12 | 16 | 24;\n}\nexport const VSpace: React.FC<VSpaceProps> = ({\n className,\n space,\n ...divProps\n}) => (\n <div\n className={classNames(\"v-space\", `v-space--${space}`, className)}\n {...divProps}\n ></div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "/**\n * Checks if a string can be parsed into a JS date object\n *\n * @param date The string to be checked\n */\nexport const isValidDateString = (date: string) => !isNaN(Date.parse(date));\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { isValidDateString } from \"./isValidDateString\";\n\n/**\n * Creates JS date object based on an ISO string.\n * It adds a safe times to date only strings so it can be safely used by Intl\n * without breaking based on locale.\n *\n * This function return null if the string cannot be parsed into a Date\n *\n * @param fromISO The ISO-8601 date string to be converted into a JS date object\n */\nexport const getDateObject = (fromISO: string): Date | null => {\n if (!isValidDateString(fromISO)) return null;\n\n if (fromISO.match(/([0-1]?[0-9]|2[0-3]):[0-5][0-9]/)) {\n return new Date(fromISO);\n } else {\n if (fromISO.includes(\"/\")) {\n return new Date(`${fromISO} 12:00:00 UTC`);\n } else {\n return new Date(`${fromISO}T12:00:00Z`);\n }\n }\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { getDateObject } from \"./getDateObject\";\n\nconst formats = {\n short: {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n },\n shortWithTime: {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n },\n medium: {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n },\n mediumNoYear: {\n month: \"short\",\n day: \"numeric\",\n },\n mediumWithTime: {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n },\n mediumWithTimeAndTimezone: {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n timeZoneName: \"short\",\n hour12: true,\n },\n long: {\n weekday: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n },\n longNoYear: {\n weekday: \"short\",\n month: \"short\",\n day: \"numeric\",\n },\n longWithTime: {\n weekday: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n hour12: false,\n },\n timeOnlyWithTimezone: {\n hour: \"numeric\",\n minute: \"numeric\",\n hour12: true,\n timeZoneName: \"short\",\n },\n timeOnly: {\n hour: \"numeric\",\n minute: \"numeric\",\n hour12: true,\n },\n} as const;\n\nexport type DateTimeDisplayFormat = keyof typeof formats;\n\nexport const getDateString = (\n original: Date | string | null,\n format: DateTimeDisplayFormat,\n locale = \"en-GB\",\n) => {\n if (!original) return \"\";\n const date =\n typeof original === \"string\" ? getDateObject(original) : original;\n if (!date) return \"\";\n return new Intl.DateTimeFormat(locale, formats[format]).format(date);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { StaysAccommodation, StaysBooking } from \"@duffel/api/types\";\nimport { StaysRating } from \"./StaysRating\";\nimport { boardTypeIcon, getBoardTypeLabel } from \"./lib/types\";\nimport { VSpace } from \"@components/shared/VSpace\";\nimport { HSpace } from \"@components/shared/HSpace\";\nimport { Icon } from \"@components/shared/Icon\";\nimport { LOYALTY_PROGRAMS_NAME_MAP } from \"./lib/types\";\nimport { getDateString } from \"@lib/getDateString\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\n\nexport interface StaysSummaryProps {\n accommodation: StaysAccommodation;\n checkInDate: Date;\n checkOutDate: Date;\n numRooms?: number;\n\n supportedLoyaltyProgramme?: StaysBooking[\"supported_loyalty_programme\"];\n loyaltyProgrammeAccountNumber?: string | null;\n accommodationSpecialRequests?: string | null;\n}\n\nexport const StaysSummary: React.FC<\n React.PropsWithChildren<StaysSummaryProps>\n> = ({\n accommodation,\n checkInDate,\n checkOutDate,\n numRooms,\n supportedLoyaltyProgramme,\n loyaltyProgrammeAccountNumber,\n accommodationSpecialRequests,\n children,\n}) => (\n <WithComponentStyles>\n <VSpace space={24} className=\"duffel-components stays-summary-container\">\n <HSpace space={16}>\n <div\n className=\"stays-summary-photo\"\n style={\n accommodation.photos && accommodation.photos.length > 0\n ? { backgroundImage: `url(${accommodation.photos[0].url})` }\n : { backgroundColor: \"var(--GREY-100)\" }\n }\n >\n {(accommodation.photos?.length ?? 0) === 0 && (\n <Icon name=\"image_not_supported\" color=\"--GREY-200\" size={30} />\n )}\n </div>\n <VSpace space={4}>\n {accommodation.rating && (\n <StaysRating rating={accommodation.rating} />\n )}\n <p className=\"stays-summary-text--large\">{accommodation.name}</p>\n <p className=\"stays-summary-text--small\">\n {accommodation.location.address.line_one},{\" \"}\n {accommodation.location.address.region ??\n accommodation.location.address.city_name ??\n accommodation.location.address.country_code}\n </p>\n </VSpace>\n </HSpace>\n <VSpace space={8}>\n <HSpace space={8} alignCenter>\n {numRooms && <p className=\"stays-summary-stamp\">{numRooms}x</p>}\n <p>{accommodation.rooms[0].name}</p>\n </HSpace>\n {accommodation.rooms.length &&\n accommodation.rooms[0].rates.length &&\n accommodation.rooms[0].rates[0].board_type && (\n <HSpace space={12} alignCenter>\n <Icon\n name={boardTypeIcon(accommodation.rooms[0].rates[0].board_type)}\n size={20}\n color=\"--GREY-700\"\n />\n\n <p>\n {getBoardTypeLabel(accommodation.rooms[0].rates[0].board_type)}\n </p>\n </HSpace>\n )}\n </VSpace>\n <div className=\"stays-summary-times\">\n <div>\n <p className=\"stays-summary-text--small\">Check in</p>\n <p className=\"stays-summary-text--large\">\n {getDateString(checkInDate, \"longNoYear\").replace(\",\", \"\")}\n </p>\n {accommodation.check_in_information && (\n <p className=\"stays-summary-text--small\">\n from {accommodation.check_in_information?.check_in_after_time}\n </p>\n )}\n </div>\n <div className=\"stays-summary-divider\" />\n <div>\n <p className=\"stays-summary-text--small\">Check out</p>\n <p className=\"stays-summary-text--large\">\n {getDateString(checkOutDate, \"longNoYear\").replace(\",\", \"\")}\n </p>\n {accommodation.check_in_information && (\n <p className=\"stays-summary-text--small\">\n until {accommodation.check_in_information.check_out_before_time}\n </p>\n )}\n </div>\n </div>\n {supportedLoyaltyProgramme && loyaltyProgrammeAccountNumber && (\n <VSpace space={8}>\n <p className=\"stays-summary-text--small\">Loyalty number</p>\n <p>\n {LOYALTY_PROGRAMS_NAME_MAP[supportedLoyaltyProgramme]},{\" \"}\n {loyaltyProgrammeAccountNumber}\n </p>\n </VSpace>\n )}\n {accommodationSpecialRequests && (\n <VSpace space={8}>\n <p className=\"stays-summary-text--small\">Special requests</p>\n <p>{accommodationSpecialRequests}</p>\n </VSpace>\n )}\n {children}\n </VSpace>\n </WithComponentStyles>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport { HSpace } from \"@components/shared/HSpace\";\nimport { Icon, IconName } from \"@components/shared/Icon\";\nimport { StaysAccommodation, StaysAmenity } from \"@duffel/api/types\";\nimport { hrefToComponentStyles } from \"@components/shared/WithComponentStyles\";\n\nexport const amenityIcon = (type: StaysAmenity[\"type\"]): IconName => {\n switch (type) {\n case \"adult_only\":\n return \"no_stroller\";\n case \"accessibility_hearing\":\n return \"hearing\";\n case \"accessibility_mobility\":\n return \"accessible\";\n case \"cash_machine\":\n return \"atm\";\n case \"spa\":\n return \"spa\";\n case \"pool\":\n return \"pool\";\n case \"childcare_service\":\n return \"child_care\";\n case \"laundry\":\n return \"laundry\";\n case \"pets_allowed\":\n return \"pet_supplies\";\n case \"room_service\":\n return \"room_service\";\n case \"wifi\":\n return \"wifi\";\n case \"gym\":\n return \"fitness_center\";\n case \"parking\":\n return \"local_parking\";\n case \"business_centre\":\n return \"meeting_room\";\n case \"restaurant\":\n return \"restaurant\";\n case \"lounge\":\n return \"local_bar\";\n case \"24_hour_front_desk\":\n case \"concierge\":\n return \"concierge\";\n default:\n return \"check_circle\";\n }\n};\n\nexport interface StaysAmenitiesProps {\n amenities: StaysAccommodation[\"amenities\"];\n}\n\nexport const StaysAmenities: React.FC<StaysAmenitiesProps> = ({\n amenities,\n}) => (\n <>\n {/* This component doesn't use WithComponentStyles because we don't want to wrap it in a div */}\n <link rel=\"stylesheet\" href={hrefToComponentStyles}></link>\n {amenities?.map((amenity) => (\n <HSpace\n key={amenity.type}\n space={4}\n alignCenter\n className=\"duffel-components\"\n >\n <Icon name={amenityIcon(amenity.type)} size={16} />\n <p className=\"amenities__text\">{amenity.description}</p>\n </HSpace>\n ))}\n </>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import classNames from \"classnames\";\nimport * as React from \"react\";\nimport {\n LOYALTY_PROGRAMS_NAME_MAP,\n SOURCE_NAME_MAP,\n boardTypeIcon,\n getBoardTypeLabel,\n} from \"./lib/types\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport { getDateString } from \"@lib/getDateString\";\nimport { getRateLabel } from \"./lib/getRateLabel\";\nimport { HSpace } from \"@components/shared/HSpace\";\nimport { Icon, IconName } from \"@components/shared/Icon\";\nimport { VSpace } from \"@components/shared/VSpace\";\nimport {\n StaysRateCancellationTimeline,\n StaysRoomRate,\n} from \"@duffel/api/types\";\nimport { RadioButton } from \"@components/shared/RadioButton\";\nimport { withPlural } from \"@lib/withPlural\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\n\nexport interface StaysRoomRateCardProps {\n rate: StaysRoomRate;\n searchNumberOfRooms: number;\n numberOfNights: number;\n selected: boolean;\n onSelectRate: (rateId: string) => void;\n\n hidePaymentMethod?: boolean;\n hideSource?: boolean;\n}\n\nexport const StaysRoomRateCard: React.FC<StaysRoomRateCardProps> = ({\n numberOfNights,\n searchNumberOfRooms,\n rate,\n selected,\n onSelectRate,\n hidePaymentMethod = false,\n hideSource = false,\n}) => {\n const earliestCancellation: StaysRateCancellationTimeline | undefined =\n rate.cancellation_timeline[0];\n\n const quantityOfRoomsAvailable: number =\n rate.quantity_available != null && !isNaN(rate.quantity_available)\n ? rate.quantity_available\n : searchNumberOfRooms;\n\n return (\n <WithComponentStyles>\n <button\n onClick={() => onSelectRate(rate.id)}\n className={classNames(\n \"duffel-components\",\n \"stays-room-rate-card__container\",\n selected && \"stays-room-rate-card__container--selected\",\n )}\n >\n <VSpace className=\"stays-room-rate-card__content\" space={12}>\n <HSpace space={0} spaceBetween>\n <p className=\"stays-room-rate-card__text--medium\">\n {!earliestCancellation && \"Non-refundable\"}\n {earliestCancellation &&\n rate.total_amount === earliestCancellation.refund_amount &&\n \"Fully refundable\"}\n {earliestCancellation &&\n rate.total_amount !== earliestCancellation.refund_amount &&\n \"Partially refundable\"}\n {rate.board_type === \"breakfast\" && \" with breakfast\"}\n {rate.board_type === \"all_inclusive\" && \" all inclusive\"}\n </p>\n </HSpace>\n <VSpace space={8}>\n {rate.board_type && (\n <StayResultRoomRateItem\n icon={boardTypeIcon(rate.board_type)}\n label={getBoardTypeLabel(rate.board_type)}\n />\n )}\n\n {earliestCancellation ? (\n <StayResultRoomRateItem\n icon=\"refund\"\n label={\n rate.total_amount === earliestCancellation.refund_amount ? (\n `Free cancellation until ${getDateString(\n earliestCancellation.before,\n \"medium\",\n )}`\n ) : (\n <>\n Cancellation available (from{\" \"}\n {moneyStringFormatter(earliestCancellation.currency)(\n +rate.total_amount -\n +earliestCancellation.refund_amount,\n )}{\" \"}\n fee)\n </>\n )\n }\n />\n ) : (\n <StayResultRoomRateItem icon=\"close\" label=\"Non-refundable\" />\n )}\n\n {!hidePaymentMethod &&\n rate.available_payment_methods.map((paymentMethod) => (\n <StayResultRoomRateItem\n key={paymentMethod}\n icon={paymentMethod === \"card\" ? \"credit_card\" : \"wallet\"}\n label={getRateLabel(paymentMethod, rate.payment_type)}\n />\n ))}\n\n {rate.supported_loyalty_programme && (\n <StayResultRoomRateItem\n icon=\"loyalty\"\n label={\n LOYALTY_PROGRAMS_NAME_MAP[rate.supported_loyalty_programme]\n }\n />\n )}\n {!hideSource && (\n <StayResultRoomRateItem\n icon=\"shopfront\"\n label={`Sourced from ${SOURCE_NAME_MAP[rate.source]}`}\n />\n )}\n </VSpace>\n </VSpace>\n <VSpace space={8} className=\"stays-room-rate-card__footer\">\n {quantityOfRoomsAvailable && (\n <p className=\"stays-room-rate-card__text--small\">\n At least {withPlural(quantityOfRoomsAvailable, \"room\", \"rooms\")}{\" \"}\n available\n </p>\n )}\n <VSpace space={4}>\n <p className=\"stays-room-rate-card__text--small\">\n {moneyStringFormatter(rate.total_currency)(+rate.total_amount)}{\" \"}\n for {withPlural(numberOfNights, \"night\", \"nights\")}\n </p>\n\n {rate.due_at_accommodation_amount &&\n +rate.due_at_accommodation_amount > 0 && (\n <p className=\"stays-room-rate-card__text--small\">\n <i>\n +{\" \"}\n {moneyStringFormatter(rate.due_at_accommodation_currency)(\n +rate.due_at_accommodation_amount,\n )}{\" \"}\n at accommodation\n </i>\n </p>\n )}\n </VSpace>\n <HSpace space={8} spaceBetween>\n <p className=\"stays-room-rate-card__text--large\">\n {moneyStringFormatter(rate.total_currency)(\n +rate.total_amount / numberOfNights,\n )}\n <span className=\"stays-room-rate-card__text--small\">/night</span>\n </p>\n <RadioButton checked={selected} value={rate.id} />\n </HSpace>\n </VSpace>\n </button>\n </WithComponentStyles>\n );\n};\n\nconst StayResultRoomRateItem: React.FC<{\n icon: IconName;\n label: string | React.ReactNode;\n}> = ({ icon, label }) => (\n <HSpace space={8}>\n <Icon name={icon} size={16} color=\"--GREY-600\" className=\"u-marginTop2\" />\n <p className=\"stays-room-rate-card__item-label\">{label}</p>\n </HSpace>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { StaysRate } from \"@duffel/api/types\";\n\nexport const getRateLabel = (\n paymentMethod: StaysRate[\"payment_method\"],\n paymentType: StaysRate[\"payment_type\"],\n): string | undefined => {\n if (paymentMethod === \"card\" && paymentType === \"pay_now\")\n return \"Pay now with card\";\n if (paymentMethod === \"card\" && paymentType === \"guarantee\")\n return \"Card payment at accommodation\";\n if (paymentMethod === \"balance\") return \"Pay now with Duffel Balance\";\n if (paymentMethod === \"card\") return \"Pay with card\";\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import classNames from \"classnames\";\nimport * as React from \"react\";\nimport { HSpace } from \"./HSpace\";\nimport { Icon } from \"./Icon\";\n\nexport interface RadioButtonProps {\n value: string;\n checked?: boolean;\n className?: string;\n}\n\nexport const RadioButton: React.FC<RadioButtonProps> = ({\n value,\n checked = false,\n className,\n}) => {\n const inputId = `radio-${value}`;\n return (\n <div className={className}>\n <input\n id={inputId}\n type=\"radio\"\n value={value}\n checked={checked}\n className=\"radio__input\"\n />\n <label\n className=\"radio__container\"\n htmlFor={inputId}\n aria-checked={checked}\n data-testid={value}\n >\n <HSpace space={12}>\n <div\n className={classNames(\"radio\", {\n [\"radio--is-checked\"]: checked,\n })}\n >\n {checked && <Icon name=\"check\" size={18} />}\n </div>\n </HSpace>\n </label>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport { NonIdealState } from \"@components/shared/NonIdealState\";\nimport { WithComponentStyles } from \"@components/shared/WithComponentStyles\";\nimport { OfferRequest } from \"@duffel/api/types\";\nimport { getDateString } from \"@lib/getDateString\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { FilterControls } from \"./FilterControls\";\nimport { NGSTable } from \"./NGSTable\";\nimport { NGSOfferRow } from \"./lib/group-offers-for-ngs-view\";\nimport { sortNGSRowsByDuration } from \"./lib/sort-ngs-rows-by-duration\";\nimport {\n SortDirection,\n sortNGSRowsByShelfPrice,\n} from \"./lib/sort-ngs-rows-by-shelf-price\";\nimport { useFilters } from \"./lib/useFilters\";\nimport { SortOption, SortingControl } from \"./SortingControl\";\nimport { NGSShelf } from \"./lib\";\nimport { sortNGSRowsByRecommended } from \"./lib/sort-ngs-rows-by-recommended\";\n\nfunction getSortShelfAndDirection(\n sortOption: SortOption,\n): [NGSShelf, \"asc\" | \"desc\"] {\n const [shelf, direction] = sortOption.split(\"-\");\n return [parseInt(shelf), direction as SortDirection];\n}\n\nfunction getDurationSortDirection(sortOption: SortOption) {\n return sortOption.split(\"-\")[1] as SortDirection;\n}\n\nexport function useSort() {\n const [sortOption, setSortOption] = React.useState<SortOption>(\"recommended\");\n\n function sortingFunction(rows: NGSOfferRow[]) {\n if (sortOption === \"recommended\") {\n return sortNGSRowsByRecommended(rows);\n } else if (sortOption.startsWith(\"duration\")) {\n const direction = getDurationSortDirection(sortOption);\n return sortNGSRowsByDuration(rows, direction);\n } else {\n const [shelf, direction] = getSortShelfAndDirection(sortOption);\n return sortNGSRowsByShelfPrice(rows, shelf, direction);\n }\n }\n\n return {\n sortOption,\n setSortOption,\n sortingFunction,\n };\n}\n\n/*\n\nsetSortDuration(null);\nif (shelf === sortShelf) {\n setSortDirection(sortDirection === \"asc\" ? \"desc\" : \"asc\");\n} else if (selectedColumn === shelf) {\n setSortShelf(shelf);\n}\n\nsetSortShelf(null);\n\n\n*/\n\nexport interface DuffelNGSViewProps {\n offerRequest: OfferRequest;\n onSelect: (offerId: string) => void;\n}\n\nexport const DuffelNGSView: React.FC<DuffelNGSViewProps> = ({\n offerRequest,\n onSelect,\n}) => {\n const [selectedSliceKeys, setSelectedSliceKeys] = React.useState<string[]>(\n [],\n );\n const [selectedOwner, setSelectedOwner] = React.useState<string | undefined>(\n undefined,\n );\n\n const [selectedColumn, setSelectedColumn] = React.useState<NGSShelf | null>(\n null,\n );\n\n const {\n airlinesFilterOptions,\n airlinesFilter,\n timesFilter,\n stopsFilter,\n setAirlinesFilter,\n setTimesFilter,\n setStopsFilter,\n clearFilters,\n filteredOffers,\n } = useFilters(offerRequest, selectedSliceKeys);\n\n const { sortOption, setSortOption, sortingFunction } = useSort();\n\n const numSlices = offerRequest.slices.length;\n const currentSlice =\n selectedSliceKeys.length > 0\n ? offerRequest.slices[selectedSliceKeys.length]\n : offerRequest.slices[0];\n\n if (offerRequest.offers.length === 0) {\n return <NonIdealState>There are no results</NonIdealState>;\n }\n\n return (\n <div className=\"duffel-ngs-view\">\n <WithComponentStyles>\n {currentSlice && (\n <div className=\"h-space h-space--4 hspace--space-between\">\n <div>\n <div className=\"duffel-ngs-view_breadcrumbs\">\n {offerRequest.slices.map((slice, index) => (\n <>\n <button\n key={index}\n className={classNames(\n \"duffel-ngs-view_breadcrumb\",\n index < selectedSliceKeys.length &&\n \"duffel-ngs-view_breadcrumb--clickable\",\n index === selectedSliceKeys.length &&\n \"duffel-ngs-view_breadcrumb--selected\",\n )}\n onClick={() => {\n if (index < selectedSliceKeys.length) {\n const newSliceKeys = selectedSliceKeys.slice(\n 0,\n index - 1,\n );\n setSelectedSliceKeys(newSliceKeys);\n if (newSliceKeys.length === 0) {\n setSelectedOwner(undefined);\n }\n\n clearFilters();\n }\n }}\n >\n {slice.origin.iata_code} - {slice.destination.iata_code}\n </button>\n {index < numSlices - 1 && (\n <Icon name=\"arrow_right\" size={12} color=\"--GREY-500\" />\n )}\n </>\n ))}\n </div>\n <h3 className=\"duffel-ngs-view_heading\">\n {numSlices === 2 &&\n `${selectedSliceKeys.length === 0 ? \"Outbound\" : \"Inbound\"} flight to ${currentSlice.destination.name}`}\n {numSlices !== 2 &&\n `Flight to ${currentSlice.destination.name}`}\n </h3>\n <h4 className=\"duffel-ngs-view_subheading\">\n {getDateString(currentSlice.departure_date, \"long\")}\n </h4>\n </div>\n </div>\n )}\n\n {offerRequest.offers.length > 0 && (\n <>\n <div className=\"h-space h-space--8 hspace--justify-end margin-b-12\">\n <FilterControls\n {...{\n selectedOwner,\n airlines: airlinesFilterOptions,\n airlinesFilter,\n setAirlinesFilter,\n timesFilter,\n setTimesFilter,\n stopsFilter,\n setStopsFilter,\n }}\n />\n <SortingControl\n selected={sortOption}\n onChange={(sortingOption) => {\n setSortOption(sortingOption);\n if (\n !sortingOption.startsWith(\"duration\") &&\n sortingOption !== \"recommended\"\n ) {\n const shelf = parseInt(sortingOption.split(\"-\")[0]);\n setSelectedColumn(shelf);\n }\n }}\n />\n </div>\n <NGSTable\n selectedColumn={selectedColumn}\n setSelectedColumn={setSelectedColumn}\n offers={filteredOffers}\n sliceIndex={selectedSliceKeys.length}\n previousSliceKeys={selectedSliceKeys}\n onSelect={(offerId, sliceKey, offer) => {\n window.scrollTo(0, 0);\n if (selectedSliceKeys.length == numSlices - 1) {\n onSelect(offerId);\n } else {\n setSelectedOwner(offer.owner ? offer.owner.name : undefined);\n setSelectedSliceKeys([...selectedSliceKeys, sliceKey]);\n clearFilters();\n }\n }}\n sortingFunction={sortingFunction}\n />\n </>\n )}\n </WithComponentStyles>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { captureErrorInSentry } from \"@lib/captureErrorInSentry\";\nimport * as React from \"react\";\n\ninterface AirlineLogoProps {\n name: string;\n iataCode: string | null;\n size?: number;\n}\n\nconst hasManualOverride = [\"TA\"];\nconst getFallbackLogoUrl = (iataCode: string | null) =>\n `https://www.gstatic.com/flights/airline_logos/70px/${\n iataCode || \"missing\"\n }.png`;\n\nconst getSrcForIataCode = (iataCode: string | null, airlineName: string) => {\n if (!iataCode) {\n captureErrorInSentry(\n new Error(\n `iataCode is passed as \"null\" value for airline ${airlineName}`,\n ),\n );\n return getFallbackLogoUrl(\"ZZ\");\n }\n\n if (hasManualOverride.includes(iataCode)) {\n return getFallbackLogoUrl(iataCode);\n }\n\n return `https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/${iataCode}.svg`;\n};\n\nexport const AirlineLogo: React.FC<AirlineLogoProps> = ({\n name,\n iataCode,\n size = 32,\n}) => {\n const [src, setSrc] = React.useState(getSrcForIataCode(iataCode, name));\n React.useEffect(() => {\n setSrc(getSrcForIataCode(iataCode, name));\n }, [iataCode]);\n\n return (\n <React.Fragment>\n {/* disabling eslint here because using next/legacy/image made the svg disappear on the airline show page */}\n <img\n alt={name}\n title={name}\n height={size}\n width={size}\n src={src}\n onError={() => setSrc(getFallbackLogoUrl(iataCode))}\n />\n </React.Fragment>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport classNames from \"classnames\";\nimport React from \"react\";\n\ninterface FilterControlProps {\n target: React.ReactNode;\n children: (closePopover: () => void) => React.ReactNode;\n disabled?: boolean;\n popoverWidth?: string;\n popoverMaxHeigh?: string;\n targetWidth: string;\n}\n\nexport const FilterControl: React.FC<FilterControlProps> = ({\n target,\n children,\n disabled,\n popoverWidth,\n popoverMaxHeigh,\n targetWidth,\n}) => {\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n\n const closePopover = () => setIsPopoverOpen(false);\n\n return (\n <div className=\"filter-control\">\n <button\n style={{ minWidth: targetWidth }}\n onClick={() => setIsPopoverOpen(!isPopoverOpen)}\n className=\"filter-control__target\"\n disabled={disabled}\n >\n <span>{target}</span>\n <Icon name=\"arrow_drop_down\" size={24} />\n </button>\n {isPopoverOpen && (\n <>\n {/**\n * Disabling jsx-a11y/click-events-have-key-events because it expects a keyboard listener.\n * Instead the esc key listener to close is added to options in the popover through `children`\n * */}\n {/* eslint-disable-next-line */}\n <div className=\"filter-control__backdrop\" onClick={closePopover} />\n <div\n className=\"filter-control__popover\"\n style={{\n ...(popoverWidth && { width: popoverWidth }),\n ...(popoverMaxHeigh && { maxHeight: popoverMaxHeigh }),\n }}\n >\n {children(closePopover)}\n </div>\n </>\n )}\n </div>\n );\n};\n\ninterface FilterControlOptionProps {\n children: React.ReactNode;\n className?: string;\n isSelected: boolean;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n onKeyDown: React.KeyboardEventHandler<HTMLButtonElement>;\n onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const FilterControlOption: React.FC<FilterControlOptionProps> = ({\n className,\n children,\n isSelected,\n onClick,\n onKeyDown,\n onDoubleClick,\n}) => (\n <button\n onClick={onClick}\n className={classNames(\n \"filter-control__option\",\n isSelected && \"filter-control__option--selected\",\n className,\n )}\n onKeyDown={onKeyDown}\n onDoubleClick={onDoubleClick}\n >\n {children}\n {isSelected && <Icon name=\"check\" size={24} color=\"--GREY-900\" />}\n </button>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { AirlineLogo } from \"@components/shared/AirlineLogo\";\nimport React from \"react\";\nimport { FilterControl, FilterControlOption } from \"./FilterControl\";\nimport { Filters } from \"./lib/filter-results\";\n\ntype FilterAirline = Filters[\"airlines\"][number];\n\nfunction isOptionSelected(\n airline: FilterAirline,\n selectedAirlines: Filters[\"airlines\"],\n) {\n return selectedAirlines.some(\n (selectedAirline) => selectedAirline.iata_code === airline.iata_code,\n );\n}\n\nfunction getSelectLabel(\n selected: Filters[\"airlines\"],\n options: Filters[\"airlines\"],\n) {\n if (selected.length === options.length) return \"All airlines\";\n if (selected.length === 1) return selected[0].name;\n if (selected.length === 2)\n return `Airlines: ${selected.map(({ iata_code }) => iata_code).join(\", \")}`;\n\n return `${selected.length} airlines`;\n}\n\nexport interface AirlineSelectorProps {\n options: Filters[\"airlines\"];\n selected: Filters[\"airlines\"];\n onChange: (airlines: Filters[\"airlines\"]) => void;\n disabled?: boolean;\n targetLabel?: string;\n}\n\nfunction removeFromSelected(\n option: FilterAirline,\n selectedAirlines: Filters[\"airlines\"],\n) {\n if (selectedAirlines.length === 1) return selectedAirlines;\n return selectedAirlines.filter(\n (selected) => selected.iata_code != option.iata_code,\n );\n}\n\nfunction addToSelected(\n option: FilterAirline,\n selectedAirlines: Filters[\"airlines\"],\n) {\n return [option, ...selectedAirlines];\n}\n\nexport const AirlineSelector: React.FC<AirlineSelectorProps> = ({\n options,\n selected,\n onChange,\n disabled,\n targetLabel,\n}) => {\n return (\n <FilterControl\n targetWidth=\"148px\"\n popoverMaxHeigh=\"235px\"\n disabled={disabled}\n target={targetLabel || getSelectLabel(selected, options)}\n >\n {(onClose) => (\n <>\n <div className=\"h-space h-space--8 margin-b-12\">\n <button\n className=\"filter-control__target hspace--justify-center padding-inline-8 width-100\"\n disabled={selected.length === options.length}\n onClick={() => onChange(options)}\n >\n Select all\n </button>\n <button\n className=\"filter-control__target hspace--justify-center padding-inline-8 width-100\"\n disabled={selected.length === 0}\n onClick={() => onChange([])}\n >\n Unselect all\n </button>\n </div>\n {options.map((option, index) => {\n const isSelected = isOptionSelected(option, selected);\n return (\n <Option\n key={option.iata_code}\n {...option}\n isSelected={isSelected}\n onClick={() => {\n const newState = isSelected\n ? removeFromSelected(option, selected)\n : addToSelected(option, selected);\n\n onChange(newState);\n }}\n onDoubleClick={() => {\n onChange([option]);\n }}\n onKeyDown={(e) => {\n console.log(e.key);\n if (\n e.key === \"Escape\" ||\n (e.key === \"Tab\" && index === options.length - 1)\n ) {\n onClose();\n }\n }}\n />\n );\n })}\n </>\n )}\n </FilterControl>\n );\n};\n\ntype OptionProps = FilterAirline & {\n isSelected: boolean;\n onClick: (option: FilterAirline) => void;\n onKeyDown: React.KeyboardEventHandler<HTMLButtonElement>;\n onDoubleClick: React.MouseEventHandler<HTMLButtonElement>;\n};\n\nconst Option: React.FC<OptionProps> = ({\n name,\n iata_code,\n isSelected,\n onClick,\n onKeyDown,\n onDoubleClick,\n}) => (\n <FilterControlOption\n isSelected={isSelected}\n className=\"airline-selector__option\"\n onClick={() => onClick({ name, iata_code })}\n onKeyDown={onKeyDown}\n onDoubleClick={onDoubleClick}\n >\n <AirlineLogo name={name} iataCode={iata_code} size={16} />\n <span>{name}</span>\n </FilterControlOption>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\nimport { FilterControl, FilterControlOption } from \"./FilterControl\";\nimport { Filters } from \"./lib/filter-results\";\n\nconst OPTIONS: Array<Filters[\"stops\"]> = [\n \"direct-only\",\n \"1-stop-at-most\",\n \"2-stops-at-most\",\n \"any\",\n];\n\nfunction getLabel(stopsOption: Filters[\"stops\"]) {\n if (stopsOption === \"direct-only\") {\n return \"Direct only\";\n }\n if (stopsOption === \"1-stop-at-most\") {\n return \"1 stop at most\";\n }\n if (stopsOption === \"2-stops-at-most\") {\n return \"2 stops at most\";\n }\n if (stopsOption === \"any\") {\n return \"Any number of stops\";\n }\n}\n\ninterface StopsSelectorProps {\n selected: Filters[\"stops\"];\n onChange: (stopFilter: Filters[\"stops\"]) => void;\n}\n\nexport const StopsSelector: React.FC<StopsSelectorProps> = ({\n selected,\n onChange,\n}) => {\n return (\n <FilterControl target={getLabel(selected)} targetWidth=\"178px\">\n {(onClose) =>\n OPTIONS.map((option, index) => (\n <FilterControlOption\n isSelected={option === selected}\n key={option}\n onClick={() => onChange(option)}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" ||\n (e.key === \"Tab\" && index === OPTIONS.length - 1)\n ) {\n onClose();\n }\n }}\n >\n <span>{getLabel(option)}</span>\n </FilterControlOption>\n ))\n }\n </FilterControl>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}", "import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}", "import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}", "import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}", "import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}", "export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}", "import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}", "export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}", "import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}", "export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}", "import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}", "export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}", "export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}", "export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}", "import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}", "import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport cls from 'classnames';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport Handles from \"./Handles\";\nimport Marks from \"./Marks\";\nimport Steps from \"./Steps\";\nimport Tracks from \"./Tracks\";\nimport SliderContext from \"./context\";\nimport useDrag from \"./hooks/useDrag\";\nimport useOffset from \"./hooks/useOffset\";\n\n/**\n * New:\n * - click mark to update range value\n * - handleRender\n * - Fix handle with count not correct\n * - Fix pushable not work in some case\n * - No more FindDOMNode\n * - Move all position related style into inline style\n * - Key: up is plus, down is minus\n * - fix Key with step = null not align with marks\n * - Change range should not trigger onChange\n * - keyboard support pushable\n */\n\nvar Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-slider' : _props$prefixCls,\n className = props.className,\n style = props.style,\n classNames = props.classNames,\n styles = props.styles,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$keyboard = props.keyboard,\n keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n autoFocus = props.autoFocus,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n value = props.value,\n defaultValue = props.defaultValue,\n range = props.range,\n count = props.count,\n onChange = props.onChange,\n onBeforeChange = props.onBeforeChange,\n onAfterChange = props.onAfterChange,\n onChangeComplete = props.onChangeComplete,\n _props$allowCross = props.allowCross,\n allowCross = _props$allowCross === void 0 ? true : _props$allowCross,\n _props$pushable = props.pushable,\n pushable = _props$pushable === void 0 ? false : _props$pushable,\n draggableTrack = props.draggableTrack,\n reverse = props.reverse,\n vertical = props.vertical,\n _props$included = props.included,\n included = _props$included === void 0 ? true : _props$included,\n startPoint = props.startPoint,\n trackStyle = props.trackStyle,\n handleStyle = props.handleStyle,\n railStyle = props.railStyle,\n dotStyle = props.dotStyle,\n activeDotStyle = props.activeDotStyle,\n marks = props.marks,\n dots = props.dots,\n handleRender = props.handleRender,\n activeHandleRender = props.activeHandleRender,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n ariaLabelForHandle = props.ariaLabelForHandle,\n ariaLabelledByForHandle = props.ariaLabelledByForHandle,\n ariaValueTextFormatterForHandle = props.ariaValueTextFormatterForHandle;\n var handlesRef = React.useRef(null);\n var containerRef = React.useRef(null);\n var direction = React.useMemo(function () {\n if (vertical) {\n return reverse ? 'ttb' : 'btt';\n }\n return reverse ? 'rtl' : 'ltr';\n }, [reverse, vertical]);\n\n // ============================ Range =============================\n var mergedMin = React.useMemo(function () {\n return isFinite(min) ? min : 0;\n }, [min]);\n var mergedMax = React.useMemo(function () {\n return isFinite(max) ? max : 100;\n }, [max]);\n\n // ============================= Step =============================\n var mergedStep = React.useMemo(function () {\n return step !== null && step <= 0 ? 1 : step;\n }, [step]);\n\n // ============================= Push =============================\n var mergedPush = React.useMemo(function () {\n if (typeof pushable === 'boolean') {\n return pushable ? mergedStep : false;\n }\n return pushable >= 0 ? pushable : false;\n }, [pushable, mergedStep]);\n\n // ============================ Marks =============================\n var markList = React.useMemo(function () {\n return Object.keys(marks || {}).map(function (key) {\n var mark = marks[key];\n var markObj = {\n value: Number(key)\n };\n if (mark && _typeof(mark) === 'object' && ! /*#__PURE__*/React.isValidElement(mark) && ('label' in mark || 'style' in mark)) {\n markObj.style = mark.style;\n markObj.label = mark.label;\n } else {\n markObj.label = mark;\n }\n return markObj;\n }).filter(function (_ref) {\n var label = _ref.label;\n return label || typeof label === 'number';\n }).sort(function (a, b) {\n return a.value - b.value;\n });\n }, [marks]);\n\n // ============================ Format ============================\n var _useOffset = useOffset(mergedMin, mergedMax, mergedStep, markList, allowCross, mergedPush),\n _useOffset2 = _slicedToArray(_useOffset, 2),\n formatValue = _useOffset2[0],\n offsetValues = _useOffset2[1];\n\n // ============================ Values ============================\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n mergedValue = _useMergedState2[0],\n setValue = _useMergedState2[1];\n var rawValues = React.useMemo(function () {\n var valueList = mergedValue === null || mergedValue === undefined ? [] : Array.isArray(mergedValue) ? mergedValue : [mergedValue];\n var _valueList = _slicedToArray(valueList, 1),\n _valueList$ = _valueList[0],\n val0 = _valueList$ === void 0 ? mergedMin : _valueList$;\n var returnValues = mergedValue === null ? [] : [val0];\n\n // Format as range\n if (range) {\n returnValues = _toConsumableArray(valueList);\n\n // When count provided or value is `undefined`, we fill values\n if (count || mergedValue === undefined) {\n var pointCount = count >= 0 ? count + 1 : 2;\n returnValues = returnValues.slice(0, pointCount);\n\n // Fill with count\n while (returnValues.length < pointCount) {\n var _returnValues;\n returnValues.push((_returnValues = returnValues[returnValues.length - 1]) !== null && _returnValues !== void 0 ? _returnValues : mergedMin);\n }\n }\n returnValues.sort(function (a, b) {\n return a - b;\n });\n }\n\n // Align in range\n returnValues.forEach(function (val, index) {\n returnValues[index] = formatValue(val);\n });\n return returnValues;\n }, [mergedValue, range, mergedMin, count, formatValue]);\n\n // =========================== onChange ===========================\n var rawValuesRef = React.useRef(rawValues);\n rawValuesRef.current = rawValues;\n var getTriggerValue = function getTriggerValue(triggerValues) {\n return range ? triggerValues : triggerValues[0];\n };\n var triggerChange = function triggerChange(nextValues) {\n // Order first\n var cloneNextValues = _toConsumableArray(nextValues).sort(function (a, b) {\n return a - b;\n });\n\n // Trigger event if needed\n if (onChange && !isEqual(cloneNextValues, rawValuesRef.current, true)) {\n onChange(getTriggerValue(cloneNextValues));\n }\n\n // We set this later since it will re-render component immediately\n setValue(cloneNextValues);\n };\n var finishChange = function finishChange() {\n var finishValue = getTriggerValue(rawValuesRef.current);\n onAfterChange === null || onAfterChange === void 0 || onAfterChange(finishValue);\n warning(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');\n onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(finishValue);\n };\n var _useDrag = useDrag(containerRef, direction, rawValues, mergedMin, mergedMax, formatValue, triggerChange, finishChange, offsetValues),\n _useDrag2 = _slicedToArray(_useDrag, 4),\n draggingIndex = _useDrag2[0],\n draggingValue = _useDrag2[1],\n cacheValues = _useDrag2[2],\n onStartDrag = _useDrag2[3];\n var changeToCloseValue = function changeToCloseValue(newValue, e) {\n if (!disabled) {\n var valueIndex = 0;\n var valueDist = mergedMax - mergedMin;\n rawValues.forEach(function (val, index) {\n var dist = Math.abs(newValue - val);\n if (dist <= valueDist) {\n valueDist = dist;\n valueIndex = index;\n }\n });\n\n // Create new values\n var cloneNextValues = _toConsumableArray(rawValues);\n cloneNextValues[valueIndex] = newValue;\n\n // Fill value to match default 2\n if (range && !rawValues.length && count === undefined) {\n cloneNextValues.push(newValue);\n }\n onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(cloneNextValues));\n triggerChange(cloneNextValues);\n if (e) {\n var _document$activeEleme, _document$activeEleme2;\n (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || (_document$activeEleme2 = _document$activeEleme.blur) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.call(_document$activeEleme);\n handlesRef.current.focus(valueIndex);\n onStartDrag(e, valueIndex, cloneNextValues);\n }\n }\n };\n\n // ============================ Click =============================\n var onSliderMouseDown = function onSliderMouseDown(e) {\n e.preventDefault();\n var _containerRef$current = containerRef.current.getBoundingClientRect(),\n width = _containerRef$current.width,\n height = _containerRef$current.height,\n left = _containerRef$current.left,\n top = _containerRef$current.top,\n bottom = _containerRef$current.bottom,\n right = _containerRef$current.right;\n var clientX = e.clientX,\n clientY = e.clientY;\n var percent;\n switch (direction) {\n case 'btt':\n percent = (bottom - clientY) / height;\n break;\n case 'ttb':\n percent = (clientY - top) / height;\n break;\n case 'rtl':\n percent = (right - clientX) / width;\n break;\n default:\n percent = (clientX - left) / width;\n }\n var nextValue = mergedMin + percent * (mergedMax - mergedMin);\n changeToCloseValue(formatValue(nextValue), e);\n };\n\n // =========================== Keyboard ===========================\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n keyboardValue = _React$useState2[0],\n setKeyboardValue = _React$useState2[1];\n var onHandleOffsetChange = function onHandleOffsetChange(offset, valueIndex) {\n if (!disabled) {\n var next = offsetValues(rawValues, offset, valueIndex);\n onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));\n triggerChange(next.values);\n setKeyboardValue(next.value);\n }\n };\n React.useEffect(function () {\n if (keyboardValue !== null) {\n var valueIndex = rawValues.indexOf(keyboardValue);\n if (valueIndex >= 0) {\n handlesRef.current.focus(valueIndex);\n }\n }\n setKeyboardValue(null);\n }, [keyboardValue]);\n\n // ============================= Drag =============================\n var mergedDraggableTrack = React.useMemo(function () {\n if (draggableTrack && mergedStep === null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, '`draggableTrack` is not supported when `step` is `null`.');\n }\n return false;\n }\n return draggableTrack;\n }, [draggableTrack, mergedStep]);\n var onStartMove = function onStartMove(e, valueIndex) {\n onStartDrag(e, valueIndex);\n onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValuesRef.current));\n };\n\n // Auto focus for updated handle\n var dragging = draggingIndex !== -1;\n React.useEffect(function () {\n if (!dragging) {\n var valueIndex = rawValues.lastIndexOf(draggingValue);\n handlesRef.current.focus(valueIndex);\n }\n }, [dragging]);\n\n // =========================== Included ===========================\n var sortedCacheValues = React.useMemo(function () {\n return _toConsumableArray(cacheValues).sort(function (a, b) {\n return a - b;\n });\n }, [cacheValues]);\n\n // Provide a range values with included [min, max]\n // Used for Track, Mark & Dot\n var _React$useMemo = React.useMemo(function () {\n if (!range) {\n return [mergedMin, sortedCacheValues[0]];\n }\n return [sortedCacheValues[0], sortedCacheValues[sortedCacheValues.length - 1]];\n }, [sortedCacheValues, range, mergedMin]),\n _React$useMemo2 = _slicedToArray(_React$useMemo, 2),\n includedStart = _React$useMemo2[0],\n includedEnd = _React$useMemo2[1];\n\n // ============================= Refs =============================\n React.useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n handlesRef.current.focus(0);\n },\n blur: function blur() {\n var _containerRef$current2;\n var _document = document,\n activeElement = _document.activeElement;\n if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(activeElement)) {\n activeElement === null || activeElement === void 0 || activeElement.blur();\n }\n }\n };\n });\n\n // ========================== Auto Focus ==========================\n React.useEffect(function () {\n if (autoFocus) {\n handlesRef.current.focus(0);\n }\n }, []);\n\n // =========================== Context ============================\n var context = React.useMemo(function () {\n return {\n min: mergedMin,\n max: mergedMax,\n direction: direction,\n disabled: disabled,\n keyboard: keyboard,\n step: mergedStep,\n included: included,\n includedStart: includedStart,\n includedEnd: includedEnd,\n range: range,\n tabIndex: tabIndex,\n ariaLabelForHandle: ariaLabelForHandle,\n ariaLabelledByForHandle: ariaLabelledByForHandle,\n ariaValueTextFormatterForHandle: ariaValueTextFormatterForHandle,\n styles: styles || {},\n classNames: classNames || {}\n };\n }, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, range, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaValueTextFormatterForHandle, styles, classNames]);\n\n // ============================ Render ============================\n return /*#__PURE__*/React.createElement(SliderContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: containerRef,\n className: cls(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, \"\".concat(prefixCls, \"-disabled\"), disabled), \"\".concat(prefixCls, \"-vertical\"), vertical), \"\".concat(prefixCls, \"-horizontal\"), !vertical), \"\".concat(prefixCls, \"-with-marks\"), markList.length)),\n style: style,\n onMouseDown: onSliderMouseDown\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: cls(\"\".concat(prefixCls, \"-rail\"), classNames === null || classNames === void 0 ? void 0 : classNames.rail),\n style: _objectSpread(_objectSpread({}, railStyle), styles === null || styles === void 0 ? void 0 : styles.rail)\n }), /*#__PURE__*/React.createElement(Tracks, {\n prefixCls: prefixCls,\n style: trackStyle,\n values: sortedCacheValues,\n startPoint: startPoint,\n onStartMove: mergedDraggableTrack ? onStartMove : undefined\n }), /*#__PURE__*/React.createElement(Steps, {\n prefixCls: prefixCls,\n marks: markList,\n dots: dots,\n style: dotStyle,\n activeStyle: activeDotStyle\n }), /*#__PURE__*/React.createElement(Handles, {\n ref: handlesRef,\n prefixCls: prefixCls,\n style: handleStyle,\n values: cacheValues,\n draggingIndex: draggingIndex,\n onStartMove: onStartMove,\n onOffsetChange: onHandleOffsetChange,\n onFocus: onFocus,\n onBlur: onBlur,\n handleRender: handleRender,\n activeHandleRender: activeHandleRender,\n onChangeComplete: finishChange\n }), /*#__PURE__*/React.createElement(Marks, {\n prefixCls: prefixCls,\n marks: markList,\n onClick: changeToCloseValue\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Slider.displayName = 'Slider';\n}\nexport default Slider;", "import * as React from 'react';\nexport default function useEvent(callback) {\n var fnRef = React.useRef();\n fnRef.current = callback;\n var memoFn = React.useCallback(function () {\n var _fnRef$current;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));\n }, []);\n return memoFn;\n}", "import * as React from 'react';\nimport canUseDom from \"../Dom/canUseDom\";\n\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useInternalLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = function useLayoutEffect(callback, deps) {\n var firstMountRef = React.useRef(true);\n useInternalLayoutEffect(function () {\n return callback(firstMountRef.current);\n }, deps);\n\n // We tell react that first mount has passed\n useInternalLayoutEffect(function () {\n firstMountRef.current = false;\n return function () {\n firstMountRef.current = true;\n };\n }, []);\n};\nexport var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n useLayoutEffect(function (firstMount) {\n if (!firstMount) {\n return callback();\n }\n }, deps);\n};\nexport default useLayoutEffect;", "export default function canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}", "import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nexport default function useSafeState(defaultValue) {\n var destroyRef = React.useRef(false);\n var _React$useState = React.useState(defaultValue),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n value = _React$useState2[0],\n setValue = _React$useState2[1];\n React.useEffect(function () {\n destroyRef.current = false;\n return function () {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}", "import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useEvent from \"./useEvent\";\nimport { useLayoutUpdateEffect } from \"./useLayoutEffect\";\nimport useState from \"./useState\";\n/** We only think `undefined` is empty */\nfunction hasValue(value) {\n return value !== undefined;\n}\n\n/**\n * Similar to `useState` but will use props value if provided.\n * Note that internal use rc-util `useState` hook.\n */\nexport default function useMergedState(defaultStateValue, option) {\n var _ref = option || {},\n defaultValue = _ref.defaultValue,\n value = _ref.value,\n onChange = _ref.onChange,\n postState = _ref.postState;\n\n // ======================= Init =======================\n var _useState = useState(function () {\n if (hasValue(value)) {\n return value;\n } else if (hasValue(defaultValue)) {\n return typeof defaultValue === 'function' ? defaultValue() : defaultValue;\n } else {\n return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;\n }\n }),\n _useState2 = _slicedToArray(_useState, 2),\n innerValue = _useState2[0],\n setInnerValue = _useState2[1];\n var mergedValue = value !== undefined ? value : innerValue;\n var postMergedValue = postState ? postState(mergedValue) : mergedValue;\n\n // ====================== Change ======================\n var onChangeFn = useEvent(onChange);\n var _useState3 = useState([mergedValue]),\n _useState4 = _slicedToArray(_useState3, 2),\n prevValue = _useState4[0],\n setPrevValue = _useState4[1];\n useLayoutUpdateEffect(function () {\n var prev = prevValue[0];\n if (innerValue !== prev) {\n onChangeFn(innerValue, prev);\n }\n }, [prevValue]);\n\n // Sync value back to `undefined` when it from control to un-control\n useLayoutUpdateEffect(function () {\n if (!hasValue(value)) {\n setInnerValue(value);\n }\n }, [value]);\n\n // ====================== Update ======================\n var triggerChange = useEvent(function (updater, ignoreDestroy) {\n setInnerValue(updater, ignoreDestroy);\n setPrevValue([mergedValue], ignoreDestroy);\n });\n return [postMergedValue, triggerChange];\n}", "/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nexport var preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nexport function warning(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nexport function note(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nexport function resetWarned() {\n warned = {};\n}\nexport function call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nexport function warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nexport function noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\nexport default warningOnce;", "import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport warning from \"./warning\";\n\n/**\n * Deeply compares two object literals.\n * @param obj1 object 1\n * @param obj2 object 2\n * @param shallow shallow compare\n * @returns\n */\nfunction isEqual(obj1, obj2) {\n var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f\n var refSet = new Set();\n function deepEqual(a, b) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var circular = refSet.has(a);\n warning(!circular, 'Warning: There may be circular references');\n if (circular) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (shallow && level > 1) {\n return false;\n }\n refSet.add(a);\n var newLevel = level + 1;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i], newLevel)) {\n return false;\n }\n }\n return true;\n }\n if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false;\n }\n return keys.every(function (key) {\n return deepEqual(a[key], b[key], newLevel);\n });\n }\n // other\n return false;\n }\n return deepEqual(obj1, obj2);\n}\nexport default isEqual;", "export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}", "export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}", "import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}", "import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"style\", \"onStartMove\", \"onOffsetChange\", \"values\", \"handleRender\", \"activeHandleRender\", \"draggingIndex\", \"onFocus\"];\nimport * as React from 'react';\nimport { getIndex } from \"../util\";\nimport Handle from \"./Handle\";\nvar Handles = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n style = props.style,\n onStartMove = props.onStartMove,\n onOffsetChange = props.onOffsetChange,\n values = props.values,\n handleRender = props.handleRender,\n activeHandleRender = props.activeHandleRender,\n draggingIndex = props.draggingIndex,\n onFocus = props.onFocus,\n restProps = _objectWithoutProperties(props, _excluded);\n var handlesRef = React.useRef({});\n React.useImperativeHandle(ref, function () {\n return {\n focus: function focus(index) {\n var _handlesRef$current$i;\n (_handlesRef$current$i = handlesRef.current[index]) === null || _handlesRef$current$i === void 0 || _handlesRef$current$i.focus();\n }\n };\n });\n\n // =========================== Active ===========================\n var _React$useState = React.useState(-1),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n activeIndex = _React$useState2[0],\n setActiveIndex = _React$useState2[1];\n var onHandleFocus = function onHandleFocus(e, index) {\n setActiveIndex(index);\n onFocus === null || onFocus === void 0 || onFocus(e);\n };\n var onHandleMouseEnter = function onHandleMouseEnter(e, index) {\n setActiveIndex(index);\n };\n\n // =========================== Render ===========================\n // Handle Props\n var handleProps = _objectSpread({\n prefixCls: prefixCls,\n onStartMove: onStartMove,\n onOffsetChange: onOffsetChange,\n render: handleRender,\n onFocus: onHandleFocus,\n onMouseEnter: onHandleMouseEnter\n }, restProps);\n return /*#__PURE__*/React.createElement(React.Fragment, null, values.map(function (value, index) {\n return /*#__PURE__*/React.createElement(Handle, _extends({\n ref: function ref(node) {\n if (!node) {\n delete handlesRef.current[index];\n } else {\n handlesRef.current[index] = node;\n }\n },\n dragging: draggingIndex === index,\n style: getIndex(style, index),\n key: index,\n value: value,\n valueIndex: index\n }, handleProps));\n }), activeHandleRender && /*#__PURE__*/React.createElement(Handle, _extends({\n key: \"a11y\"\n }, handleProps, {\n value: values[activeIndex],\n valueIndex: null,\n dragging: draggingIndex !== -1,\n render: activeHandleRender,\n style: {\n pointerEvents: 'none'\n },\n tabIndex: null,\n \"aria-hidden\": true\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Handles.displayName = 'Handles';\n}\nexport default Handles;", "export function getOffset(value, min, max) {\n return (value - min) / (max - min);\n}\nexport function getDirectionStyle(direction, value, min, max) {\n var offset = getOffset(value, min, max);\n var positionStyle = {};\n switch (direction) {\n case 'rtl':\n positionStyle.right = \"\".concat(offset * 100, \"%\");\n positionStyle.transform = 'translateX(50%)';\n break;\n case 'btt':\n positionStyle.bottom = \"\".concat(offset * 100, \"%\");\n positionStyle.transform = 'translateY(50%)';\n break;\n case 'ttb':\n positionStyle.top = \"\".concat(offset * 100, \"%\");\n positionStyle.transform = 'translateY(-50%)';\n break;\n default:\n positionStyle.left = \"\".concat(offset * 100, \"%\");\n positionStyle.transform = 'translateX(-50%)';\n break;\n }\n return positionStyle;\n}\n\n/** Return index value if is list or return value directly */\nexport function getIndex(value, index) {\n return Array.isArray(value) ? value[index] : value;\n}", "import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"value\", \"valueIndex\", \"onStartMove\", \"style\", \"render\", \"dragging\", \"onOffsetChange\", \"onChangeComplete\", \"onFocus\", \"onMouseEnter\"];\nimport cls from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport SliderContext from \"../context\";\nimport { getDirectionStyle, getIndex } from \"../util\";\nvar Handle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n value = props.value,\n valueIndex = props.valueIndex,\n onStartMove = props.onStartMove,\n style = props.style,\n render = props.render,\n dragging = props.dragging,\n onOffsetChange = props.onOffsetChange,\n onChangeComplete = props.onChangeComplete,\n onFocus = props.onFocus,\n onMouseEnter = props.onMouseEnter,\n restProps = _objectWithoutProperties(props, _excluded);\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n direction = _React$useContext.direction,\n disabled = _React$useContext.disabled,\n keyboard = _React$useContext.keyboard,\n range = _React$useContext.range,\n tabIndex = _React$useContext.tabIndex,\n ariaLabelForHandle = _React$useContext.ariaLabelForHandle,\n ariaLabelledByForHandle = _React$useContext.ariaLabelledByForHandle,\n ariaValueTextFormatterForHandle = _React$useContext.ariaValueTextFormatterForHandle,\n styles = _React$useContext.styles,\n classNames = _React$useContext.classNames;\n var handlePrefixCls = \"\".concat(prefixCls, \"-handle\");\n\n // ============================ Events ============================\n var onInternalStartMove = function onInternalStartMove(e) {\n if (!disabled) {\n onStartMove(e, valueIndex);\n }\n };\n var onInternalFocus = function onInternalFocus(e) {\n onFocus === null || onFocus === void 0 || onFocus(e, valueIndex);\n };\n var onInternalMouseEnter = function onInternalMouseEnter(e) {\n onMouseEnter(e, valueIndex);\n };\n\n // =========================== Keyboard ===========================\n var onKeyDown = function onKeyDown(e) {\n if (!disabled && keyboard) {\n var offset = null;\n\n // Change the value\n switch (e.which || e.keyCode) {\n case KeyCode.LEFT:\n offset = direction === 'ltr' || direction === 'btt' ? -1 : 1;\n break;\n case KeyCode.RIGHT:\n offset = direction === 'ltr' || direction === 'btt' ? 1 : -1;\n break;\n\n // Up is plus\n case KeyCode.UP:\n offset = direction !== 'ttb' ? 1 : -1;\n break;\n\n // Down is minus\n case KeyCode.DOWN:\n offset = direction !== 'ttb' ? -1 : 1;\n break;\n case KeyCode.HOME:\n offset = 'min';\n break;\n case KeyCode.END:\n offset = 'max';\n break;\n case KeyCode.PAGE_UP:\n offset = 2;\n break;\n case KeyCode.PAGE_DOWN:\n offset = -2;\n break;\n }\n if (offset !== null) {\n e.preventDefault();\n onOffsetChange(offset, valueIndex);\n }\n }\n };\n var handleKeyUp = function handleKeyUp(e) {\n switch (e.which || e.keyCode) {\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n case KeyCode.UP:\n case KeyCode.DOWN:\n case KeyCode.HOME:\n case KeyCode.END:\n case KeyCode.PAGE_UP:\n case KeyCode.PAGE_DOWN:\n onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete();\n break;\n }\n };\n\n // ============================ Offset ============================\n var positionStyle = getDirectionStyle(direction, value, min, max);\n\n // ============================ Render ============================\n var divProps = {};\n if (valueIndex !== null) {\n var _getIndex;\n divProps = {\n tabIndex: disabled ? null : getIndex(tabIndex, valueIndex),\n role: 'slider',\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuenow': value,\n 'aria-disabled': disabled,\n 'aria-label': getIndex(ariaLabelForHandle, valueIndex),\n 'aria-labelledby': getIndex(ariaLabelledByForHandle, valueIndex),\n 'aria-valuetext': (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value),\n 'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical',\n onMouseDown: onInternalStartMove,\n onTouchStart: onInternalStartMove,\n onFocus: onInternalFocus,\n onMouseEnter: onInternalMouseEnter,\n onKeyDown: onKeyDown,\n onKeyUp: handleKeyUp\n };\n }\n var handleNode = /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n className: cls(handlePrefixCls, _defineProperty(_defineProperty({}, \"\".concat(handlePrefixCls, \"-\").concat(valueIndex + 1), valueIndex !== null && range), \"\".concat(handlePrefixCls, \"-dragging\"), dragging), classNames.handle),\n style: _objectSpread(_objectSpread(_objectSpread({}, positionStyle), style), styles.handle)\n }, divProps, restProps));\n\n // Customize\n if (render) {\n handleNode = render(handleNode, {\n index: valueIndex,\n prefixCls: prefixCls,\n value: value,\n dragging: dragging\n });\n }\n return handleNode;\n});\nif (process.env.NODE_ENV !== 'production') {\n Handle.displayName = 'Handle';\n}\nexport default Handle;", "/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\n\nvar KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n // NUMLOCK on FF/Safari Mac\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n // also NUM_NORTH_EAST\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n // also NUM_SOUTH_EAST\n /**\n * END\n */\n END: 35,\n // also NUM_SOUTH_WEST\n /**\n * HOME\n */\n HOME: 36,\n // also NUM_NORTH_WEST\n /**\n * LEFT\n */\n LEFT: 37,\n // also NUM_WEST\n /**\n * UP\n */\n UP: 38,\n // also NUM_NORTH\n /**\n * RIGHT\n */\n RIGHT: 39,\n // also NUM_EAST\n /**\n * DOWN\n */\n DOWN: 40,\n // also NUM_SOUTH\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n // also NUM_INSERT\n /**\n * DELETE\n */\n DELETE: 46,\n // also NUM_DELETE\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n // needs localization\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n // WIN_KEY_LEFT\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n // needs localization\n /**\n * DASH\n */\n DASH: 189,\n // needs localization\n /**\n * EQUALS\n */\n EQUALS: 187,\n // needs localization\n /**\n * COMMA\n */\n COMMA: 188,\n // needs localization\n /**\n * PERIOD\n */\n PERIOD: 190,\n // needs localization\n /**\n * SLASH\n */\n SLASH: 191,\n // needs localization\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n // needs localization\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n // needs localization\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n // needs localization\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n // needs localization\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n // needs localization\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n // Firefox (Gecko) fires this for the meta key instead of 91\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n var keyCode = e.keyCode;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n }\n};\nexport default KeyCode;", "import * as React from 'react';\nvar SliderContext = /*#__PURE__*/React.createContext({\n min: 0,\n max: 0,\n direction: 'ltr',\n step: 1,\n includedStart: 0,\n includedEnd: 0,\n tabIndex: 0,\n keyboard: true,\n styles: {},\n classNames: {}\n});\nexport default SliderContext;", "import * as React from 'react';\nimport Mark from \"./Mark\";\nvar Marks = function Marks(props) {\n var prefixCls = props.prefixCls,\n marks = props.marks,\n onClick = props.onClick;\n var markPrefixCls = \"\".concat(prefixCls, \"-mark\");\n\n // Not render mark if empty\n if (!marks.length) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: markPrefixCls\n }, marks.map(function (_ref) {\n var value = _ref.value,\n style = _ref.style,\n label = _ref.label;\n return /*#__PURE__*/React.createElement(Mark, {\n key: value,\n prefixCls: markPrefixCls,\n style: style,\n value: value,\n onClick: onClick\n }, label);\n }));\n};\nexport default Marks;", "import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport SliderContext from \"../context\";\nimport { getDirectionStyle } from \"../util\";\nvar Mark = function Mark(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n children = props.children,\n value = props.value,\n _onClick = props.onClick;\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n direction = _React$useContext.direction,\n includedStart = _React$useContext.includedStart,\n includedEnd = _React$useContext.includedEnd,\n included = _React$useContext.included;\n var textCls = \"\".concat(prefixCls, \"-text\");\n\n // ============================ Offset ============================\n var positionStyle = getDirectionStyle(direction, value, min, max);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(textCls, _defineProperty({}, \"\".concat(textCls, \"-active\"), included && includedStart <= value && value <= includedEnd)),\n style: _objectSpread(_objectSpread({}, positionStyle), style),\n onMouseDown: function onMouseDown(e) {\n e.stopPropagation();\n },\n onClick: function onClick() {\n _onClick(value);\n }\n }, children);\n};\nexport default Mark;", "import * as React from 'react';\nimport SliderContext from \"../context\";\nimport Dot from \"./Dot\";\nvar Steps = function Steps(props) {\n var prefixCls = props.prefixCls,\n marks = props.marks,\n dots = props.dots,\n style = props.style,\n activeStyle = props.activeStyle;\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n step = _React$useContext.step;\n var stepDots = React.useMemo(function () {\n var dotSet = new Set();\n\n // Add marks\n marks.forEach(function (mark) {\n dotSet.add(mark.value);\n });\n\n // Fill dots\n if (dots && step !== null) {\n var current = min;\n while (current <= max) {\n dotSet.add(current);\n current += step;\n }\n }\n return Array.from(dotSet);\n }, [min, max, step, dots, marks]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-step\")\n }, stepDots.map(function (dotValue) {\n return /*#__PURE__*/React.createElement(Dot, {\n prefixCls: prefixCls,\n key: dotValue,\n value: dotValue,\n style: style,\n activeStyle: activeStyle\n });\n }));\n};\nexport default Steps;", "import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport SliderContext from \"../context\";\nimport { getDirectionStyle } from \"../util\";\nvar Dot = function Dot(props) {\n var prefixCls = props.prefixCls,\n value = props.value,\n style = props.style,\n activeStyle = props.activeStyle;\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n direction = _React$useContext.direction,\n included = _React$useContext.included,\n includedStart = _React$useContext.includedStart,\n includedEnd = _React$useContext.includedEnd;\n var dotClassName = \"\".concat(prefixCls, \"-dot\");\n var active = included && includedStart <= value && value <= includedEnd;\n\n // ============================ Offset ============================\n var mergedStyle = _objectSpread(_objectSpread({}, getDirectionStyle(direction, value, min, max)), typeof style === 'function' ? style(value) : style);\n if (active) {\n mergedStyle = _objectSpread(_objectSpread({}, mergedStyle), typeof activeStyle === 'function' ? activeStyle(value) : activeStyle);\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(dotClassName, _defineProperty({}, \"\".concat(dotClassName, \"-active\"), active)),\n style: mergedStyle\n });\n};\nexport default Dot;", "import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport cls from 'classnames';\nimport * as React from 'react';\nimport SliderContext from \"../context\";\nimport { getIndex } from \"../util\";\nimport Track from \"./Track\";\nvar Tracks = function Tracks(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n values = props.values,\n startPoint = props.startPoint,\n onStartMove = props.onStartMove;\n var _React$useContext = React.useContext(SliderContext),\n included = _React$useContext.included,\n range = _React$useContext.range,\n min = _React$useContext.min,\n styles = _React$useContext.styles,\n classNames = _React$useContext.classNames;\n\n // =========================== List ===========================\n var trackList = React.useMemo(function () {\n if (!range) {\n // null value do not have track\n if (values.length === 0) {\n return [];\n }\n var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;\n var endValue = values[0];\n return [{\n start: Math.min(startValue, endValue),\n end: Math.max(startValue, endValue)\n }];\n }\n\n // Multiple\n var list = [];\n for (var i = 0; i < values.length - 1; i += 1) {\n list.push({\n start: values[i],\n end: values[i + 1]\n });\n }\n return list;\n }, [values, range, startPoint, min]);\n if (!included) {\n return null;\n }\n\n // ========================== Render ==========================\n var tracksNode = classNames.tracks || styles.tracks ? /*#__PURE__*/React.createElement(Track, {\n index: null,\n prefixCls: prefixCls,\n start: trackList[0].start,\n end: trackList[trackList.length - 1].end,\n replaceCls: cls(classNames.tracks, \"\".concat(prefixCls, \"-tracks\")),\n style: styles.tracks\n }) : null;\n return /*#__PURE__*/React.createElement(React.Fragment, null, tracksNode, trackList.map(function (_ref, index) {\n var start = _ref.start,\n end = _ref.end;\n return /*#__PURE__*/React.createElement(Track, {\n index: index,\n prefixCls: prefixCls,\n style: _objectSpread(_objectSpread({}, getIndex(style, index)), styles.track),\n start: start,\n end: end,\n key: index,\n onStartMove: onStartMove\n });\n }));\n};\nexport default Tracks;", "import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport cls from 'classnames';\nimport * as React from 'react';\nimport SliderContext from \"../context\";\nimport { getOffset } from \"../util\";\nvar Track = function Track(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n start = props.start,\n end = props.end,\n index = props.index,\n onStartMove = props.onStartMove,\n replaceCls = props.replaceCls;\n var _React$useContext = React.useContext(SliderContext),\n direction = _React$useContext.direction,\n min = _React$useContext.min,\n max = _React$useContext.max,\n disabled = _React$useContext.disabled,\n range = _React$useContext.range,\n classNames = _React$useContext.classNames;\n var trackPrefixCls = \"\".concat(prefixCls, \"-track\");\n var offsetStart = getOffset(start, min, max);\n var offsetEnd = getOffset(end, min, max);\n\n // ============================ Events ============================\n var onInternalStartMove = function onInternalStartMove(e) {\n if (!disabled && onStartMove) {\n onStartMove(e, -1);\n }\n };\n\n // ============================ Render ============================\n var positionStyle = {};\n switch (direction) {\n case 'rtl':\n positionStyle.right = \"\".concat(offsetStart * 100, \"%\");\n positionStyle.width = \"\".concat(offsetEnd * 100 - offsetStart * 100, \"%\");\n break;\n case 'btt':\n positionStyle.bottom = \"\".concat(offsetStart * 100, \"%\");\n positionStyle.height = \"\".concat(offsetEnd * 100 - offsetStart * 100, \"%\");\n break;\n case 'ttb':\n positionStyle.top = \"\".concat(offsetStart * 100, \"%\");\n positionStyle.height = \"\".concat(offsetEnd * 100 - offsetStart * 100, \"%\");\n break;\n default:\n positionStyle.left = \"\".concat(offsetStart * 100, \"%\");\n positionStyle.width = \"\".concat(offsetEnd * 100 - offsetStart * 100, \"%\");\n }\n var className = replaceCls || cls(trackPrefixCls, _defineProperty(_defineProperty({}, \"\".concat(trackPrefixCls, \"-\").concat(index + 1), index !== null && range), \"\".concat(prefixCls, \"-track-draggable\"), onStartMove), classNames.track);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: _objectSpread(_objectSpread({}, positionStyle), style),\n onMouseDown: onInternalStartMove,\n onTouchStart: onInternalStartMove\n });\n};\nexport default Track;", "import _typeof from \"@babel/runtime/helpers/esm/typeof\";\n/* eslint-disable no-param-reassign */\n\nimport { isValidElement } from 'react';\nimport { ForwardRef, isFragment, isMemo } from 'react-is';\nimport useMemo from \"./hooks/useMemo\";\nexport function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n}\n\n/**\n * Merge refs into one ref function to support ref passing.\n */\nexport function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(function (ref) {\n return ref;\n });\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n}\nexport function useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return useMemo(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length !== next.length || prev.every(function (ref, i) {\n return ref !== next[i];\n });\n });\n}\nexport function supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== ForwardRef) {\n return false;\n }\n\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== ForwardRef) {\n return false;\n }\n return true;\n}\nexport function supportNodeRef(node) {\n if (! /*#__PURE__*/isValidElement(node)) {\n return false;\n }\n if (isFragment(node)) {\n return false;\n }\n return supportRef(node);\n}\n/* eslint-enable */", "import * as React from 'react';\nexport default function useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = React.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}", "import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent } from 'rc-util';\nimport * as React from 'react';\nfunction getPosition(e) {\n var obj = 'touches' in e ? e.touches[0] : e;\n return {\n pageX: obj.pageX,\n pageY: obj.pageY\n };\n}\nfunction useDrag(containerRef, direction, rawValues, min, max, formatValue, triggerChange, finishChange, offsetValues) {\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n draggingValue = _React$useState2[0],\n setDraggingValue = _React$useState2[1];\n var _React$useState3 = React.useState(-1),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n draggingIndex = _React$useState4[0],\n setDraggingIndex = _React$useState4[1];\n var _React$useState5 = React.useState(rawValues),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n cacheValues = _React$useState6[0],\n setCacheValues = _React$useState6[1];\n var _React$useState7 = React.useState(rawValues),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n originValues = _React$useState8[0],\n setOriginValues = _React$useState8[1];\n var mouseMoveEventRef = React.useRef(null);\n var mouseUpEventRef = React.useRef(null);\n React.useLayoutEffect(function () {\n if (draggingIndex === -1) {\n setCacheValues(rawValues);\n }\n }, [rawValues, draggingIndex]);\n\n // Clean up event\n React.useEffect(function () {\n return function () {\n document.removeEventListener('mousemove', mouseMoveEventRef.current);\n document.removeEventListener('mouseup', mouseUpEventRef.current);\n document.removeEventListener('touchmove', mouseMoveEventRef.current);\n document.removeEventListener('touchend', mouseUpEventRef.current);\n };\n }, []);\n var flushValues = function flushValues(nextValues, nextValue) {\n // Perf: Only update state when value changed\n if (cacheValues.some(function (val, i) {\n return val !== nextValues[i];\n })) {\n if (nextValue !== undefined) {\n setDraggingValue(nextValue);\n }\n setCacheValues(nextValues);\n triggerChange(nextValues);\n }\n };\n var updateCacheValue = useEvent(function (valueIndex, offsetPercent) {\n // Basic point offset\n\n if (valueIndex === -1) {\n // >>>> Dragging on the track\n var startValue = originValues[0];\n var endValue = originValues[originValues.length - 1];\n var maxStartOffset = min - startValue;\n var maxEndOffset = max - endValue;\n\n // Get valid offset\n var offset = offsetPercent * (max - min);\n offset = Math.max(offset, maxStartOffset);\n offset = Math.min(offset, maxEndOffset);\n\n // Use first value to revert back of valid offset (like steps marks)\n var formatStartValue = formatValue(startValue + offset);\n offset = formatStartValue - startValue;\n var cloneCacheValues = originValues.map(function (val) {\n return val + offset;\n });\n flushValues(cloneCacheValues);\n } else {\n // >>>> Dragging on the handle\n var offsetDist = (max - min) * offsetPercent;\n\n // Always start with the valueIndex origin value\n var cloneValues = _toConsumableArray(cacheValues);\n cloneValues[valueIndex] = originValues[valueIndex];\n var next = offsetValues(cloneValues, offsetDist, valueIndex, 'dist');\n flushValues(next.values, next.value);\n }\n });\n var onStartMove = function onStartMove(e, valueIndex, startValues) {\n e.stopPropagation();\n\n // \u5982\u679C\u662F\u70B9\u51FB track \u89E6\u53D1\u7684\uFF0C\u9700\u8981\u4F20\u5165\u53D8\u5316\u540E\u7684\u521D\u59CB\u503C\uFF0C\u800C\u4E0D\u80FD\u76F4\u63A5\u7528 rawValues\n var initialValues = startValues || rawValues;\n var originValue = initialValues[valueIndex];\n setDraggingIndex(valueIndex);\n setDraggingValue(originValue);\n setOriginValues(initialValues);\n var _getPosition = getPosition(e),\n startX = _getPosition.pageX,\n startY = _getPosition.pageY;\n\n // Moving\n var onMouseMove = function onMouseMove(event) {\n event.preventDefault();\n var _getPosition2 = getPosition(event),\n moveX = _getPosition2.pageX,\n moveY = _getPosition2.pageY;\n var offsetX = moveX - startX;\n var offsetY = moveY - startY;\n var _containerRef$current = containerRef.current.getBoundingClientRect(),\n width = _containerRef$current.width,\n height = _containerRef$current.height;\n var offSetPercent;\n switch (direction) {\n case 'btt':\n offSetPercent = -offsetY / height;\n break;\n case 'ttb':\n offSetPercent = offsetY / height;\n break;\n case 'rtl':\n offSetPercent = -offsetX / width;\n break;\n default:\n offSetPercent = offsetX / width;\n }\n updateCacheValue(valueIndex, offSetPercent);\n };\n\n // End\n var onMouseUp = function onMouseUp(event) {\n event.preventDefault();\n document.removeEventListener('mouseup', onMouseUp);\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('touchend', onMouseUp);\n document.removeEventListener('touchmove', onMouseMove);\n mouseMoveEventRef.current = null;\n mouseUpEventRef.current = null;\n setDraggingIndex(-1);\n finishChange();\n };\n document.addEventListener('mouseup', onMouseUp);\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('touchend', onMouseUp);\n document.addEventListener('touchmove', onMouseMove);\n mouseMoveEventRef.current = onMouseMove;\n mouseUpEventRef.current = onMouseUp;\n };\n\n // Only return cache value when it mapping with rawValues\n var returnValues = React.useMemo(function () {\n var sourceValues = _toConsumableArray(rawValues).sort(function (a, b) {\n return a - b;\n });\n var targetValues = _toConsumableArray(cacheValues).sort(function (a, b) {\n return a - b;\n });\n return sourceValues.every(function (val, index) {\n return val === targetValues[index];\n }) ? cacheValues : rawValues;\n }, [rawValues, cacheValues]);\n return [draggingIndex, draggingValue, returnValues, onStartMove];\n}\nexport default useDrag;", "import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\n\n/** Format the value in the range of [min, max] */\n\n/** Format value align with step */\n\n/** Format value align with step & marks */\n\nexport default function useOffset(min, max, step, markList, allowCross, pushable) {\n var formatRangeValue = React.useCallback(function (val) {\n return Math.max(min, Math.min(max, val));\n }, [min, max]);\n var formatStepValue = React.useCallback(function (val) {\n if (step !== null) {\n var stepValue = min + Math.round((formatRangeValue(val) - min) / step) * step;\n\n // Cut number in case to be like 0.30000000000000004\n var getDecimal = function getDecimal(num) {\n return (String(num).split('.')[1] || '').length;\n };\n var maxDecimal = Math.max(getDecimal(step), getDecimal(max), getDecimal(min));\n var fixedValue = Number(stepValue.toFixed(maxDecimal));\n return min <= fixedValue && fixedValue <= max ? fixedValue : null;\n }\n return null;\n }, [step, min, max, formatRangeValue]);\n var formatValue = React.useCallback(function (val) {\n var formatNextValue = formatRangeValue(val);\n\n // List align values\n var alignValues = markList.map(function (mark) {\n return mark.value;\n });\n if (step !== null) {\n alignValues.push(formatStepValue(val));\n }\n\n // min & max\n alignValues.push(min, max);\n\n // Align with marks\n var closeValue = alignValues[0];\n var closeDist = max - min;\n alignValues.forEach(function (alignValue) {\n var dist = Math.abs(formatNextValue - alignValue);\n if (dist <= closeDist) {\n closeValue = alignValue;\n closeDist = dist;\n }\n });\n return closeValue;\n }, [min, max, markList, step, formatRangeValue, formatStepValue]);\n\n // ========================== Offset ==========================\n // Single Value\n var offsetValue = function offsetValue(values, offset, valueIndex) {\n var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';\n if (typeof offset === 'number') {\n var nextValue;\n var originValue = values[valueIndex];\n\n // Only used for `dist` mode\n var targetDistValue = originValue + offset;\n\n // Compare next step value & mark value which is best match\n var potentialValues = [];\n markList.forEach(function (mark) {\n potentialValues.push(mark.value);\n });\n\n // Min & Max\n potentialValues.push(min, max);\n\n // In case origin value is align with mark but not with step\n potentialValues.push(formatStepValue(originValue));\n\n // Put offset step value also\n var sign = offset > 0 ? 1 : -1;\n if (mode === 'unit') {\n potentialValues.push(formatStepValue(originValue + sign * step));\n } else {\n potentialValues.push(formatStepValue(targetDistValue));\n }\n\n // Find close one\n potentialValues = potentialValues.filter(function (val) {\n return val !== null;\n })\n // Remove reverse value\n .filter(function (val) {\n return offset < 0 ? val <= originValue : val >= originValue;\n });\n if (mode === 'unit') {\n // `unit` mode can not contain itself\n potentialValues = potentialValues.filter(function (val) {\n return val !== originValue;\n });\n }\n var compareValue = mode === 'unit' ? originValue : targetDistValue;\n nextValue = potentialValues[0];\n var valueDist = Math.abs(nextValue - compareValue);\n potentialValues.forEach(function (potentialValue) {\n var dist = Math.abs(potentialValue - compareValue);\n if (dist < valueDist) {\n nextValue = potentialValue;\n valueDist = dist;\n }\n });\n\n // Out of range will back to range\n if (nextValue === undefined) {\n return offset < 0 ? min : max;\n }\n\n // `dist` mode\n if (mode === 'dist') {\n return nextValue;\n }\n\n // `unit` mode may need another round\n if (Math.abs(offset) > 1) {\n var cloneValues = _toConsumableArray(values);\n cloneValues[valueIndex] = nextValue;\n return offsetValue(cloneValues, offset - sign, valueIndex, mode);\n }\n return nextValue;\n } else if (offset === 'min') {\n return min;\n } else if (offset === 'max') {\n return max;\n }\n };\n\n /** Same as `offsetValue` but return `changed` mark to tell value changed */\n var offsetChangedValue = function offsetChangedValue(values, offset, valueIndex) {\n var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';\n var originValue = values[valueIndex];\n var nextValue = offsetValue(values, offset, valueIndex, mode);\n return {\n value: nextValue,\n changed: nextValue !== originValue\n };\n };\n var needPush = function needPush(dist) {\n return pushable === null && dist === 0 || typeof pushable === 'number' && dist < pushable;\n };\n\n // Values\n var offsetValues = function offsetValues(values, offset, valueIndex) {\n var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';\n var nextValues = values.map(formatValue);\n var originValue = nextValues[valueIndex];\n var nextValue = offsetValue(nextValues, offset, valueIndex, mode);\n nextValues[valueIndex] = nextValue;\n if (allowCross === false) {\n // >>>>> Allow Cross\n var pushNum = pushable || 0;\n\n // ============ AllowCross ===============\n if (valueIndex > 0 && nextValues[valueIndex - 1] !== originValue) {\n nextValues[valueIndex] = Math.max(nextValues[valueIndex], nextValues[valueIndex - 1] + pushNum);\n }\n if (valueIndex < nextValues.length - 1 && nextValues[valueIndex + 1] !== originValue) {\n nextValues[valueIndex] = Math.min(nextValues[valueIndex], nextValues[valueIndex + 1] - pushNum);\n }\n } else if (typeof pushable === 'number' || pushable === null) {\n // >>>>> Pushable\n // =============== Push ==================\n\n // >>>>>> Basic push\n // End values\n for (var i = valueIndex + 1; i < nextValues.length; i += 1) {\n var changed = true;\n while (needPush(nextValues[i] - nextValues[i - 1]) && changed) {\n var _offsetChangedValue = offsetChangedValue(nextValues, 1, i);\n nextValues[i] = _offsetChangedValue.value;\n changed = _offsetChangedValue.changed;\n }\n }\n\n // Start values\n for (var _i = valueIndex; _i > 0; _i -= 1) {\n var _changed = true;\n while (needPush(nextValues[_i] - nextValues[_i - 1]) && _changed) {\n var _offsetChangedValue2 = offsetChangedValue(nextValues, -1, _i - 1);\n nextValues[_i - 1] = _offsetChangedValue2.value;\n _changed = _offsetChangedValue2.changed;\n }\n }\n\n // >>>>> Revert back to safe push range\n // End to Start\n for (var _i2 = nextValues.length - 1; _i2 > 0; _i2 -= 1) {\n var _changed2 = true;\n while (needPush(nextValues[_i2] - nextValues[_i2 - 1]) && _changed2) {\n var _offsetChangedValue3 = offsetChangedValue(nextValues, -1, _i2 - 1);\n nextValues[_i2 - 1] = _offsetChangedValue3.value;\n _changed2 = _offsetChangedValue3.changed;\n }\n }\n\n // Start to End\n for (var _i3 = 0; _i3 < nextValues.length - 1; _i3 += 1) {\n var _changed3 = true;\n while (needPush(nextValues[_i3 + 1] - nextValues[_i3]) && _changed3) {\n var _offsetChangedValue4 = offsetChangedValue(nextValues, 1, _i3 + 1);\n nextValues[_i3 + 1] = _offsetChangedValue4.value;\n _changed3 = _offsetChangedValue4.changed;\n }\n }\n }\n return {\n value: nextValues[valueIndex],\n values: nextValues\n };\n };\n return [formatValue, offsetValues];\n}", "import Slider from \"./Slider\";\nexport default Slider;", "import Slider from \"rc-slider\";\nimport React from \"react\";\nimport { FilterControl } from \"./FilterControl\";\nimport { Filters } from \"./lib/filter-results\";\n\ntype Range = Filters[\"times\"][\"departure\"];\n\nconst targetLabelConectors = {\n before: \" before \",\n after: \" after \",\n between: \" between \",\n};\n\nfunction getTargetLabel(selectedRange: Filters[\"times\"]) {\n const [departureStart, departureEnd] = selectedRange.departure;\n const isDepartureChanged = departureStart !== 0 || departureEnd !== 1440;\n\n const [arrivalStart, arrivalEnd] = selectedRange.arrival;\n const isArrivalChanged = arrivalStart !== 0 || arrivalEnd !== 1440;\n\n if (isDepartureChanged && isArrivalChanged) {\n return \"Departure and arrival times\";\n }\n\n if (isDepartureChanged) {\n return getSliderLabel(\n \"Departing\",\n selectedRange.departure,\n targetLabelConectors,\n );\n }\n\n if (isArrivalChanged) {\n return getSliderLabel(\n \"Arriving\",\n selectedRange.arrival,\n targetLabelConectors,\n );\n }\n\n return \"Any time\";\n}\n\nconst sliderMarks = [0, 360, 720, 1080, 1440].reduce(\n (marks, minutes) => ({\n ...marks,\n [minutes.toString()]: transformMinutesToTimeString(minutes),\n }),\n {},\n);\n\nfunction getSliderLabel(\n prefix: string,\n range: Range,\n connectors = {\n before: \": Before \",\n after: \": After \",\n between: \": \",\n },\n) {\n const [start, end] = range;\n\n if (start === 0 && end === 1440) return `${prefix}: Any time`;\n if (start === 0)\n return `${prefix}${connectors.before}${transformMinutesToTimeString(end)}`;\n if (end === 1440)\n return `${prefix}${connectors.after}${transformMinutesToTimeString(start)}`;\n\n return `${prefix}${connectors.between}${transformMinutesToTimeString(start)} - ${transformMinutesToTimeString(end)}`;\n}\n\nfunction transformMinutesToTimeString(minutes: number) {\n if (minutes === 1440) return \"23:59\";\n\n const hours = Math.floor(minutes / 60);\n const mins = minutes % 60;\n\n const hoursString = hours.toString().padStart(2, \"0\");\n const minsString = mins.toString().padStart(2, \"0\");\n\n return `${hoursString}:${minsString}`;\n}\n\ninterface TimeRangeSelectorProps {\n selected: Filters[\"times\"];\n onChange: (stopFilter: Filters[\"times\"]) => void;\n}\n\nexport const TimeRangeSelector: React.FC<TimeRangeSelectorProps> = ({\n selected,\n onChange,\n}) => {\n return (\n <FilterControl target={getTargetLabel(selected)} targetWidth=\"220px\">\n {() => (\n <div className=\"padding-8 v-space v-space--24\">\n <div className=\"v-space \">\n <p className=\"font-size-14\">\n {getSliderLabel(\"Departure time\", selected.departure)}\n </p>\n <div className=\"padding-12\">\n <Slider\n className=\"time-range-slider\"\n range\n min={0}\n max={1440}\n step={30}\n allowCross={false}\n value={selected.departure}\n onChange={(value) =>\n onChange({ ...selected, departure: value as Range })\n }\n marks={sliderMarks}\n />\n </div>\n </div>\n <div className=\"v-space v-space--8\">\n <p className=\"font-size-14\">\n {getSliderLabel(\"Arrival time\", selected.arrival)}\n </p>\n <div className=\"padding-12\">\n <Slider\n className=\"time-range-slider\"\n range\n min={0}\n max={1440}\n step={30}\n allowCross={false}\n value={selected.arrival}\n onChange={(value) =>\n onChange({ ...selected, arrival: value as Range })\n }\n marks={sliderMarks}\n />\n </div>\n </div>\n </div>\n )}\n </FilterControl>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { AirlineSelector } from \"./AirlineSelector\";\nimport { StopsSelector } from \"./StopsSelector\";\nimport { TimeRangeSelector } from \"./TimeRangeSelector\";\nimport { Filters } from \"./lib/filter-results\";\n\ninterface FilterControlsProps {\n selectedOwner?: string;\n airlines: Filters[\"airlines\"];\n airlinesFilter: Filters[\"airlines\"];\n setAirlinesFilter: (airlines: Filters[\"airlines\"]) => void;\n timesFilter: Filters[\"times\"];\n setTimesFilter: (times: Filters[\"times\"]) => void;\n stopsFilter: Filters[\"stops\"];\n setStopsFilter: (stops: Filters[\"stops\"]) => void;\n}\n\nexport const FilterControls: React.FC<FilterControlsProps> = ({\n selectedOwner,\n airlines,\n airlinesFilter,\n setAirlinesFilter,\n timesFilter,\n setTimesFilter,\n stopsFilter,\n setStopsFilter,\n}) => {\n return (\n <div className=\"h-space h-space--8\">\n <AirlineSelector\n targetLabel={selectedOwner}\n disabled={selectedOwner !== undefined}\n options={airlines}\n selected={airlinesFilter}\n onChange={setAirlinesFilter}\n />\n\n <StopsSelector selected={stopsFilter} onChange={setStopsFilter} />\n <TimeRangeSelector selected={timesFilter} onChange={setTimesFilter} />\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSlice, OfferSliceSegment } from \"@duffel/api/types\";\nimport * as React from \"react\";\nimport { AirlineLogo } from \"./AirlineLogo\";\nimport { HSpace } from \"./HSpace\";\n\nexport interface SliceCarriersTitleProps {\n slice: OfferSlice;\n}\n\nexport const SliceCarriersTitle: React.FC<SliceCarriersTitleProps> = ({\n slice,\n}) => {\n const marketingCarriers = slice.segments.map(\n ({ marketing_carrier }) => marketing_carrier,\n );\n const operatingCarriers = slice.segments.map(\n ({ operating_carrier }) => operating_carrier,\n );\n\n const firstMarketingCarrier = marketingCarriers[0];\n const marketingCarrierNamesSet = new Set<string>(\n marketingCarriers.map(({ name }) => name),\n );\n const operatingCarrierNamesSet = new Set<string>(\n operatingCarriers.map(({ name }) => name),\n );\n\n const marketingCarriersLabel = Array.from(marketingCarrierNamesSet).join(\n \" & \",\n );\n\n const operatingCarriersLabel = Array.from(operatingCarrierNamesSet)\n .filter((name) => !marketingCarrierNamesSet.has(name))\n .join(\" & \");\n\n const isPartialOperarion = Array.from(operatingCarrierNamesSet).some((name) =>\n marketingCarrierNamesSet.has(name),\n );\n\n return (\n <HSpace space={8}>\n <AirlineLogo\n size={20}\n name={firstMarketingCarrier.name}\n iataCode={firstMarketingCarrier.iata_code}\n />\n <div className=\"slice-carriers-title\">\n {marketingCarriersLabel}{\" \"}\n {operatingCarriersLabel && (\n <span className=\"slice-carriers-title__operating-carrier\">\n ({isPartialOperarion && \"partially \"}operated by{\" \"}\n {operatingCarriersLabel})\n </span>\n )}\n <span className=\"slice-carriers-title__operating-carrier\">\n {\" \"}\n \u00B7{\" \"}\n {slice.segments\n .map(\n (segment) =>\n segment.marketing_carrier.iata_code +\n segment.marketing_carrier_flight_number,\n )\n .join(\", \")}\n </span>\n </div>\n </HSpace>\n );\n};\n\nexport function getSegmentCarriersTitle(segment: OfferSliceSegment) {\n const marketingCarrier = segment.marketing_carrier;\n const operatingCarrier = segment.operating_carrier;\n\n const isOperatedByMarketingCarrier =\n marketingCarrier.name === operatingCarrier.name;\n\n return `${marketingCarrier.name}${\n isOperatedByMarketingCarrier ? \"\" : ` operated by ${operatingCarrier.name} `\n }`;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport { SliceCarriersTitle } from \"@components/shared/SliceCarriersTitle\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { NGSShelf, NGS_SHELF_INFO, NGS_SHELVES } from \"./lib\";\nimport {\n NGSOfferRow,\n getNGSSliceKey,\n groupOffersForNGSView,\n} from \"./lib/group-offers-for-ngs-view\";\n\nimport { OfferSliceModal } from \"@components/OfferSliceModal/OfferSliceModal\";\nimport { NonIdealState } from \"@components/shared/NonIdealState\";\nimport { OfferRequest, OfferSlice } from \"@duffel/api/types\";\nimport { NGSShelfInfoCard } from \"./NGSShelfInfoCard\";\nimport { NGSSliceFareCard } from \"./NGSSliceFareCard\";\nimport { SliceSummary } from \"./SliceSummary\";\nimport {\n getCheapestOffer,\n getFareBrandNameForOffer,\n} from \"./lib/deduplicate-mapped-offers-by-fare-brand\";\nimport { doOffersHaveMixedCabin } from \"./lib/does-slice-have-mixed-cabins\";\nimport { getCheapestOfferAmount } from \"./lib/sort-ngs-rows-by-shelf-price\";\n\nexport interface NGSTableProps {\n offers: OfferRequest[\"offers\"];\n sliceIndex: number;\n previousSliceKeys: string[]; // For filtering the current set of offers\n onSelect: (\n offerId: string,\n sliceKey: string,\n offer: OfferRequest[\"offers\"][number],\n ) => void;\n sortingFunction: (rows: NGSOfferRow[]) => NGSOfferRow[];\n selectedColumn: NGSShelf | null;\n setSelectedColumn: (shelf: NGSShelf | null) => void;\n}\n\ntype OfferPosition = {\n row: number;\n shelf: NGSShelf;\n};\n\nexport const NGSTable: React.FC<NGSTableProps> = ({\n offers,\n sliceIndex,\n onSelect,\n previousSliceKeys,\n sortingFunction,\n selectedColumn,\n setSelectedColumn,\n}) => {\n const [expandedOffer, setExpandedOffer] =\n React.useState<OfferPosition | null>(null);\n const [isOfferSliceModalOpen, setIsOfferSliceModalOpen] =\n React.useState<boolean>(false);\n const [offerSliceModalSlice, setOfferSliceModalSlice] =\n React.useState<OfferSlice>(offers[0]?.slices[sliceIndex]);\n\n React.useEffect(() => {\n setSelectedColumn(null);\n setExpandedOffer(null);\n setIsOfferSliceModalOpen(false);\n }, [previousSliceKeys]);\n\n const rows = groupOffersForNGSView(offers, sliceIndex, previousSliceKeys);\n const sortedRows = sortingFunction(rows);\n\n if (offers.length === 0) {\n return (\n <NonIdealState>There are no offers matching your filters.</NonIdealState>\n );\n }\n\n let tripType = \"\";\n if (offers[0].slices.length == 1) tripType = \"One-way\";\n if (\n offers[0].slices.length == 2 &&\n offers[0].slices[0].origin.iata_code ===\n offers[0].slices[1].destination.iata_code\n ) {\n tripType = \"Roundtrip\";\n }\n\n return (\n <div className=\"ngs-table\">\n <table className=\"ngs-table_table\">\n <thead>\n <tr className=\"ngs-table_table-header\">\n <th className=\"ngs-table_th ngs-table_th--sticky\"></th>\n {NGS_SHELVES.map((shelf) => (\n <th\n key={shelf}\n onClick={() => {\n setSelectedColumn(shelf);\n setExpandedOffer(null);\n }}\n className=\"ngs-table_th--sticky\"\n >\n <div\n className={classNames(\n \"ngs-table_column-header\",\n selectedColumn === shelf &&\n \"ngs-table_column-header--selected\",\n )}\n >\n <Icon\n name={NGS_SHELF_INFO[shelf].icon}\n size={14}\n color={\n selectedColumn === shelf ? \"--GREY-900\" : \"--GREY-500\"\n }\n className=\"ngs-table_shelf-icon\"\n />\n {NGS_SHELF_INFO[shelf].short_title}\n {selectedColumn === shelf && (\n <Icon\n name=\"unfold_more\"\n size={12}\n color=\"--GREY-900\"\n className=\"ngs-table_sort-icon\"\n />\n )}\n <NGSShelfInfoCard\n ngs_shelf={shelf}\n className={classNames(\n \"ngs-table_column-header-tooltip\",\n +shelf >= 3 && \"ngs-table_column-header-tooltip--left\",\n )}\n />\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {sortedRows.map((row, index) => (\n <>\n <tr key={index}>\n <td className=\"ngs-table_slice-info\">\n <SliceCarriersTitle slice={row[\"slice\"]} />\n <SliceSummary slice={row[\"slice\"]} />\n <button\n onClick={() => {\n setOfferSliceModalSlice(row[\"slice\"]);\n setIsOfferSliceModalOpen(true);\n }}\n className=\"ngs-table_slice-details-button\"\n >\n View details\n </button>\n </td>\n {NGS_SHELVES.map((shelf) => (\n <td\n key={shelf}\n onClick={() => {\n if (\n expandedOffer?.row === index &&\n expandedOffer?.shelf === shelf\n ) {\n setExpandedOffer(null);\n } else {\n setSelectedColumn(shelf);\n setExpandedOffer({ row: index, shelf });\n }\n }}\n className={classNames(\n \"ngs-table_table-data\",\n selectedColumn === shelf &&\n \"ngs-table_table-data--selected\",\n expandedOffer?.row === index &&\n expandedOffer?.shelf === shelf &&\n \"ngs-table_table-data--expanded\",\n )}\n >\n {row[shelf] ? (\n <div>\n <p className=\"ngs-table_table-data--details\">\n {getFareBrandNameForOffer(\n getCheapestOffer(row[shelf]!),\n sliceIndex,\n )}\n </p>\n <p>\n {moneyStringFormatter(row[shelf]![0].total_currency)(\n getCheapestOfferAmount(row[shelf])!,\n )}\n </p>\n <p className=\"ngs-table_table-data--details\">\n {tripType}\n </p>\n {doOffersHaveMixedCabin(\n [getCheapestOffer(row[shelf]!)],\n sliceIndex,\n ) && (\n <div className=\"ngs-slice-fare-card_mixed-cabins\">\n <Icon name=\"info_outline\" size={12} />\n Multiple cabins\n </div>\n )}\n </div>\n ) : (\n \"-\"\n )}\n </td>\n ))}\n </tr>\n {expandedOffer?.row === index &&\n sortedRows[index][expandedOffer.shelf] && (\n <tr>\n <td colSpan={6} className=\"ngs-table_expanded\">\n <div>\n {sortedRows[index][expandedOffer.shelf]?.map(\n (offer) => (\n <NGSSliceFareCard\n key={offer.id}\n offer={offer}\n sliceIndex={sliceIndex}\n onSelect={() =>\n onSelect(\n offer.id,\n getNGSSliceKey(\n offer.slices[sliceIndex],\n offer.owner.iata_code,\n true,\n ),\n offer,\n )\n }\n />\n ),\n )}\n </div>\n </td>\n </tr>\n )}\n </>\n ))}\n </tbody>\n </table>\n <OfferSliceModal\n slice={offerSliceModalSlice}\n isOpen={isOfferSliceModalOpen}\n onClose={() => setIsOfferSliceModalOpen(false)}\n />\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { IconName } from \"@components/shared/Icon\";\nimport { OfferSlice, SeatType } from \"@duffel/api/types\";\nexport const NGS_SHELVES = [1, 2, 3, 4, 5] as const;\nexport type NGSShelf = OfferSlice[\"ngs_shelf\"];\ntype ShelfInfo = {\n short_title: string;\n full_title: string;\n description: string;\n icon: IconName;\n};\n\nexport const NGS_SHELF_INFO: Record<OfferSlice[\"ngs_shelf\"], ShelfInfo> = {\n 1: {\n short_title: \"Basic\",\n full_title: \"Basic Economy\",\n description:\n \"Basic economy seats without seat selection, flexible change/cancellation options or checked baggage.\",\n icon: \"carry_on_bag_inactive\",\n },\n 2: {\n short_title: \"Standard\",\n full_title: \"Standard Economy\",\n description:\n \"Economy seats that allow seat selection, flexible change/cancellation options and checked baggage.\",\n icon: \"airline_seat_recline_normal\",\n },\n 3: {\n short_title: \"Plus\",\n full_title: \"Plus\",\n description:\n \"Preferred seating that offers more comfort to passengers, such as additional legroom, width or having the middle seat free for the row.\",\n icon: \"airline_seat_legroom_extra\",\n },\n 4: {\n short_title: \"Premium\",\n full_title: \"Premium\",\n description:\n \"Premium seating with additional legroom and recline. Seats shall be typically situated in the premium economy cabin or higher.\",\n icon: \"airline_seat_recline_extra\",\n },\n 5: {\n short_title: \"Luxury\",\n full_title: \"Luxury\",\n description:\n \"Luxury seating with additional legroom and reclines to a lie flat position. Seats shall be typically situated in business class or higher.\",\n icon: \"airline_seat_flat\",\n },\n};\n\nexport const SEAT_ICONS_MAP: Record<SeatType, IconName> = {\n standard: \"airline_seat_recline_normal\",\n extra_legroom: \"airline_seat_legroom_extra\",\n skycouch: \"airline_seat_recline_extra\",\n recliner: \"airline_seat_recline_extra\",\n angle_flat: \"airline_seat_recline_extra\",\n full_flat: \"airline_seat_flat\",\n private_suite: \"airline_seat_individual_suite\",\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n Offer,\n OfferRequest,\n OfferSliceSegmentPassenger,\n} from \"@duffel/api/types\";\nimport { NGSOfferRow } from \"./group-offers-for-ngs-view\";\nimport { NGS_SHELVES } from \".\";\n\n// Deduplicate fare brands (only show the cheapest offer within fare brand)\nexport const deduplicateMappedOffersByFareBrand = (\n offersMap: Record<string, NGSOfferRow>,\n) => {\n Object.entries(offersMap).map(([sliceKey, row]) => {\n const deduplicatedRow: NGSOfferRow = {\n slice: row.slice,\n 1: null,\n 2: null,\n 3: null,\n 4: null,\n 5: null,\n };\n NGS_SHELVES.map((shelf) => {\n if (row[shelf]) {\n deduplicatedRow[shelf] = groupByFareBrandName(row[shelf]!)\n .map((offers) => getCheapestOffer(offers))\n .flat();\n }\n });\n offersMap[sliceKey] = deduplicatedRow;\n });\n return offersMap;\n};\n\nexport const getFareBrandNameForOffer = (\n offer: Omit<Offer, \"available_services\">,\n sliceIndex?: number,\n): string => {\n // Cabin class can vary within a slice across passengers and segments. Here we\n // make a list of all cabin classes present in the slice.\n const cabinClasses = offer.slices[sliceIndex || 0].segments\n .flatMap((segment) => segment.passengers)\n .reduce<OfferSliceSegmentPassenger[\"cabin_class\"][]>(\n (cabinClasses, passenger) => {\n if (cabinClasses.includes(passenger.cabin_class)) {\n return cabinClasses;\n }\n return [...cabinClasses, passenger.cabin_class];\n },\n [],\n );\n\n const fareBrandName =\n offer.slices[sliceIndex || 0].fare_brand_name || cabinClasses.join(\"/\");\n return fareBrandName\n .replace(/_/g, \" \")\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n};\n\nexport const getCheapestOffer = (offers: OfferRequest[\"offers\"]) =>\n offers.find(\n (offer) =>\n +offer.total_amount ==\n Math.min(...offers.map((offer) => +offer.total_amount)),\n )!;\n\nexport const groupByFareBrandName = (offers: OfferRequest[\"offers\"]) => {\n const groupedResult: { [key: string]: OfferRequest[\"offers\"] } =\n offers.reduce(\n (\n previous: { [key: string]: OfferRequest[\"offers\"] },\n current: Omit<Offer, \"available_services\">,\n ) => {\n const key = getFareBrandNameForOffer(current);\n if (!previous[key]) {\n previous[key] = [];\n }\n\n previous[key].push(current);\n return previous;\n },\n {},\n );\n return Object.values(groupedResult);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferRequest, OfferSlice } from \"@duffel/api/types\";\nimport { NGSShelf } from \".\";\nimport { deduplicateMappedOffersByFareBrand } from \"./deduplicate-mapped-offers-by-fare-brand\";\n\nexport type NGSOfferRow = Record<\"slice\", OfferSlice> &\n Record<NGSShelf, OfferRequest[\"offers\"] | null>;\n\nexport const getNGSSliceKey = (\n slice: OfferSlice,\n ownerId: string | null,\n includeFareBrand?: boolean,\n): string => {\n const flightNumbers = slice.segments\n .map((segment) => segment.marketing_carrier_flight_number)\n .join(\"-\");\n return `${ownerId}-${flightNumbers}${includeFareBrand ? `-${slice.fare_brand_name}` : \"\"}`;\n};\n\nconst filterOffersThatMatchCurrentSlice = (\n offers: OfferRequest[\"offers\"],\n previousSliceKeys: string[],\n) => {\n const filteredOffers = previousSliceKeys.length > 0 ? [] : offers;\n if (previousSliceKeys.length > 0) {\n for (const offer of offers) {\n let match = true;\n for (const [index, sliceKey] of previousSliceKeys.entries()) {\n if (\n sliceKey !==\n getNGSSliceKey(offer.slices[index], offer.owner.iata_code, true)\n ) {\n match = false;\n break;\n }\n }\n if (match) {\n filteredOffers.push(offer);\n }\n }\n }\n return filteredOffers;\n};\n\nexport const groupOffersForNGSView = (\n offers: OfferRequest[\"offers\"],\n sliceIndex: number,\n previousSliceKeys: string[],\n): NGSOfferRow[] => {\n // Only display offers where previous slices match the current selection\n const filteredOffers = filterOffersThatMatchCurrentSlice(\n offers,\n previousSliceKeys,\n );\n\n const offersMap: Record<string, NGSOfferRow> = {};\n filteredOffers.forEach((offer) => {\n if (sliceIndex > offer.slices.length) {\n throw new Error(\n \"Attempted to call `groupOffersForNGSView` with an invalid slice index\",\n );\n }\n\n const slice = offer.slices[sliceIndex];\n const sliceKey = getNGSSliceKey(slice, offer.owner.iata_code);\n if (offersMap[sliceKey]) {\n if (offersMap[sliceKey][slice.ngs_shelf]) {\n offersMap[sliceKey][slice.ngs_shelf]?.push(offer);\n } else {\n offersMap[sliceKey][slice.ngs_shelf] = [offer];\n }\n } else {\n offersMap[sliceKey] = {\n slice: offer.slices[sliceIndex],\n 1: null,\n 2: null,\n 3: null,\n 4: null,\n 5: null,\n [slice.ngs_shelf]: [offer],\n };\n }\n });\n\n return Object.values(deduplicateMappedOffersByFareBrand(offersMap));\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export const iso8601DurationRegex =\n /P(?:([.,\\d]+)D)?T(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?/i;\n\nexport const isISO8601Duration = (durationString: string) => {\n return durationString.match(iso8601DurationRegex);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { isISO8601Duration } from \"./isISO8601Duration\";\n\nexport function convertDurationToString(duration: string): string {\n const matches = isISO8601Duration(duration);\n if (!matches) return duration;\n\n const daysString = matches[1] && matches[1] !== \"0\" ? `${matches[1]}d` : \"\";\n const hoursString =\n matches[2] && matches[2] !== \"0\"\n ? `${matches[2].toString().padStart(2, \"0\")}h`\n : \"\";\n const minutesString =\n matches[3] && matches[3] !== \"0\"\n ? `${matches[3].toString().padStart(2, \"0\")}m`\n : \"\";\n\n return `${daysString} ${hoursString} ${minutesString}`.trim();\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export const getTimeString = (original: Date | string, locale = \"en-GB\") => {\n const date = typeof original === \"string\" ? new Date(original) : original;\n return new Intl.DateTimeFormat(locale, {\n hour: \"numeric\",\n minute: \"numeric\",\n hour12: false,\n }).format(date);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon } from \"@components/shared/Icon\";\nimport { OfferSlice } from \"@duffel/api/types\";\nimport { convertDurationToString } from \"@lib/convertDurationToString\";\nimport { getTimeString } from \"@lib/getTimeString\";\nimport { withPlural } from \"@lib/withPlural\";\nimport classNames from \"classnames\";\nimport React from \"react\";\n\nexport interface SliceSummaryProps {\n slice: OfferSlice;\n}\n\nexport const SliceSummary: React.FC<SliceSummaryProps> = ({ slice }) => {\n const firstSegment = slice.segments[0];\n const lastSegment = slice.segments[slice.segments.length - 1];\n\n const segmentsAndStops = slice.segments.flatMap((segment, index) => {\n const stops = (segment.stops || []).map((stop) => stop.airport.iata_code!);\n if (index == 0) {\n // we use origins to identify the stop, so we ignore first segment since\n // it's origin is already shown in the first `SliceSummaryTimeAndPlace`\n return stops;\n } else {\n return [segment.origin.iata_code!, ...stops];\n }\n });\n\n return (\n <div className=\"slice-summary\">\n <SliceSummaryTimeAndPlace\n time={getTimeString(firstSegment.departing_at)}\n place={firstSegment.origin.iata_code!}\n alignment=\"end\"\n />\n <SliceStopsAndDurationOverview\n duration={convertDurationToString(slice.duration!)}\n stops={segmentsAndStops}\n />\n <Icon name=\"flight\" size={20} className=\"slice-summary__plane\" />\n <SliceSummaryTimeAndPlace\n time={getTimeString(lastSegment.arriving_at)}\n place={lastSegment.destination.iata_code!}\n alignment=\"start\"\n />\n </div>\n );\n};\n\nconst SliceSummaryTimeAndPlace: React.FC<{\n time: string;\n place: string;\n alignment: \"start\" | \"end\";\n}> = ({ time, place, alignment }) => (\n <div\n className={classNames(\n \"slice-summary__time-and-place\",\n `slice-summary__time-and-place--align-${alignment}`,\n )}\n >\n <div className=\"slice-summary__time\">{time}</div>\n <div className=\"slice-summary__place\">{place}</div>\n </div>\n);\n\nconst SliceStopsAndDurationOverview: React.FC<{\n duration: string;\n stops: string[];\n}> = ({ duration, stops }) => {\n return (\n <div>\n <p className=\"slice-summary__duration\">{duration}</p>\n\n <div\n className=\"slice-summary__flight-line-container\"\n style={{\n gridTemplateColumns:\n stops.length === 0\n ? \"1fr\"\n : `auto repeat(${stops.length}, 20px auto)`,\n }}\n >\n {stops.length === 0 ? (\n <div\n className={classNames(\n \"slice-summary__flight-line-color\",\n \"slice-summary__flight-line-color--full-width\",\n )}\n />\n ) : (\n <>\n {new Array(stops.length + 1).fill(0).map((_value, index, all) => (\n <React.Fragment key={index}>\n <div className=\"slice-summary__flight-line-color\" />\n {index !== all.length - 1 && (\n <div className=\"slice-summary__flight-line-dot\" />\n )}\n </React.Fragment>\n ))}\n </>\n )}\n </div>\n\n <p className=\"slice-summary__stops\">\n {stops.length === 0\n ? \"Direct\"\n : `${withPlural(stops.length, \"stop\", \"stops\")}, ${stops.join(\", \")}`}\n </p>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "const MS = 1000;\nconst MS_PER_MINUTE = MS * 60;\nconst MS_PER_HOUR = MS_PER_MINUTE * 60;\nconst MS_PER_DAY = MS_PER_HOUR * 24;\n\nexport function getDurationString(\n start: Date | string,\n end: Date | string,\n format?: \"long\",\n): string {\n let startDate: Date = typeof start === \"string\" ? new Date(start) : start;\n let prefix = \"\";\n\n let endDate = new Date();\n if (end) {\n if (typeof end === \"string\") {\n endDate = new Date(end);\n } else {\n endDate = end;\n }\n }\n\n // If the end date is before the start date, this usually indicates an error\n // But we still want to make sure we show that to the user nicely\n if (endDate < startDate) {\n const temp = startDate;\n startDate = endDate;\n endDate = temp;\n prefix = \"-\";\n }\n\n const diff = endDate.valueOf() - startDate.valueOf();\n\n const days = Math.floor(diff / MS_PER_DAY);\n const hours = Math.floor((diff - days * MS_PER_DAY) / MS_PER_HOUR);\n const minutes = Math.floor(\n (diff - days * MS_PER_DAY - hours * MS_PER_HOUR) / MS_PER_MINUTE,\n );\n\n let daysString = \"\";\n let hoursString = \"\";\n let minutesString = \"\";\n\n let suffix = \"\";\n\n if (format !== \"long\") {\n daysString = days ? `${days}d` : \"\";\n hoursString = hours ? `${hours.toString().padStart(2, \"0\")}h` : \"\";\n minutesString = minutes ? `${minutes.toString().padStart(2, \"0\")}m` : \"\";\n } else {\n if (days >= 1) {\n daysString = `${days}d`;\n }\n\n if (hours >= 1) {\n hoursString = `${hours.toString()}h`;\n }\n\n if (minutes >= 1) {\n minutesString = `${minutes.toString()}m`;\n }\n\n suffix = end < start ? \"earlier\" : \"later\";\n }\n\n return format !== \"long\"\n ? prefix + `${daysString} ${hoursString} ${minutesString}`.trim()\n : `${daysString} ${hoursString} ${minutesString} ${suffix}`.trim();\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Icon, IconName } from \"@components/shared/Icon\";\nimport { getSegmentCarriersTitle } from \"@components/shared/SliceCarriersTitle\";\nimport { OfferSlice as OfferSliceType } from \"@duffel/api/types\";\nimport { convertDurationToString } from \"@lib/convertDurationToString\";\nimport { getDateString } from \"@lib/getDateString\";\nimport { getDurationString } from \"@lib/getDurationString\";\nimport { getTimeString } from \"@lib/getTimeString\";\nimport { withPlural } from \"@lib/withPlural\";\nimport classNames from \"classnames\";\nimport React from \"react\";\n\nexport interface OfferSliceProps {\n slice: OfferSliceType;\n}\n\nexport const OfferSlice: React.FC<OfferSliceProps> = ({ slice }) => {\n const firstSegment = slice.segments[0];\n const lastSegment = slice.segments[slice.segments.length - 1];\n\n const startDate = getDateString(firstSegment.departing_at!, \"long\");\n const endDate = getDateString(lastSegment.departing_at!, \"long\");\n const endsOnDifferentDate = startDate != endDate;\n\n return (\n <div>\n {/* start date */}\n <OfferSliceRow\n withGreyBackground\n icon=\"calendar_month\"\n dottedLine=\"after\"\n >\n {startDate}\n </OfferSliceRow>\n\n {/* segments information */}\n {slice.segments.map((segment, index) => {\n const isLast = index === slice.segments.length - 1;\n return (\n <>\n <OfferSliceRow\n dottedLine=\"before\"\n icon=\"flight_takeoff\"\n time={getTimeString(segment.departing_at)}\n >\n Depart from {segment.origin.name} ({segment.origin.iata_code})\n </OfferSliceRow>\n\n <OfferSliceRow compact>\n {[\n convertDurationToString(segment.duration!),\n getSegmentCarriersTitle(segment),\n `${segment.marketing_carrier.iata_code}${segment.marketing_carrier_flight_number}`,\n segment.aircraft?.name,\n segment.passengers[0].cabin_class_marketing_name ||\n segment.passengers[0].cabin_class,\n ].join(\" \u00B7 \")}\n </OfferSliceRow>\n\n {segment.stops && segment.stops.length > 0 && (\n <OfferSliceRow compactCallout>\n <p>\n {withPlural(segment.stops.length, \"stop\", \"stops\")}:{\" \"}\n {segment.stops\n .map(\n (stop) =>\n `${convertDurationToString(stop.duration)} in ${stop.airport.iata_code}`,\n )\n .join(\",\")}\n </p>\n </OfferSliceRow>\n )}\n\n <OfferSliceRow\n icon=\"flight_landing\"\n time={getTimeString(segment.arriving_at)}\n >\n Arrive at {segment.destination.name} (\n {segment.destination.iata_code})\n </OfferSliceRow>\n\n {!isLast && (\n <OfferSliceRow\n dottedLine=\"both\"\n withGreyBackground\n icon=\"airline_stops\"\n >\n {getDurationString(\n segment.arriving_at,\n slice.segments[index + 1].departing_at,\n )}{\" \"}\n Layover at {segment.destination.name} (\n {segment.destination.iata_code})\n </OfferSliceRow>\n )}\n </>\n );\n })}\n\n {/* end date, if not the same */}\n {endsOnDifferentDate && (\n <OfferSliceRow\n withGreyBackground\n icon=\"calendar_month\"\n dottedLine=\"before\"\n >\n {endDate}\n </OfferSliceRow>\n )}\n </div>\n );\n};\n\ntype OfferSliceRow = React.PropsWithChildren<{\n time?: string;\n icon?: IconName;\n withGreyBackground?: boolean;\n compact?: boolean;\n compactCallout?: boolean;\n dottedLine?: \"before\" | \"after\" | \"both\";\n}>;\n\nconst OfferSliceRow: React.FC<OfferSliceRow> = ({\n time,\n icon,\n withGreyBackground,\n compact,\n dottedLine,\n compactCallout,\n children,\n}) => (\n <div\n className={classNames(\n \"offer-slice__row\",\n withGreyBackground && \"offer-slice__row--grey-background\",\n compact && \"offer-slice__row--compact\",\n compactCallout && `offer-slice__row--compact-callout`,\n )}\n >\n <div className=\"offer-slice__row-time\">{time && <span>{time}</span>}</div>\n <div\n className={classNames(\n \"offer-slice__row-icon-container\",\n !icon && \"offer-slice__row-icon-container--no-icon\",\n dottedLine && `offer-slice__row-icon-container--dotted-${dottedLine}`,\n )}\n >\n {icon && <Icon color=\"--GREY-600\" size={16} name={icon} />}\n </div>\n <div>{children}</div>\n </div>\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { SliceSummary } from \"@components/DuffelNGSView/SliceSummary\";\nimport { OfferSlice, OfferSliceProps } from \"@components/OfferSlice/OfferSlice\";\nimport { Modal, ModalBody, ModalProps } from \"@components/shared/Modal\";\nimport { SliceCarriersTitle } from \"@components/shared/SliceCarriersTitle\";\nimport { VSpace } from \"@components/shared/VSpace\";\n\ninterface OfferSliceModalProps extends Pick<ModalProps, \"isOpen\" | \"onClose\"> {\n slice: OfferSliceProps[\"slice\"];\n}\n\nexport const OfferSliceModal: React.FC<OfferSliceModalProps> = ({\n slice,\n ...modalProps\n}) => {\n return (\n <Modal {...modalProps}>\n <div className=\"offer-slice-modal-title offer-slice-modal-padding\">\n Flight Details\n </div>\n <hr className=\"offer-slice-modal-divider\" />\n <ModalBody tall noPadding>\n <VSpace space={24} className=\"offer-slice-modal-padding\">\n <SliceCarriersTitle slice={slice} />\n <SliceSummary slice={slice} />\n </VSpace>\n <OfferSlice slice={slice} />\n <div className=\"offer-slice-modal-footer\" />\n </ModalBody>\n </Modal>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport { NGSShelf, NGS_SHELF_INFO } from \"./lib\";\nimport { Icon } from \"@components/shared/Icon\";\nimport classNames from \"classnames\";\n\nexport interface NGSShelfInfoCardProps {\n ngs_shelf: NGSShelf;\n className?: string;\n}\n\nexport const NGSShelfInfoCard: React.FC<NGSShelfInfoCardProps> = ({\n ngs_shelf,\n className,\n}) => {\n const shelfInfo = NGS_SHELF_INFO[ngs_shelf];\n return (\n <div className={classNames(\"ngs-shelf-info-card_container\", className)}>\n <Icon name={shelfInfo.icon} size={24} />\n <h3 className=\"ngs-shelf-info-card_title\">{shelfInfo.full_title}</h3>\n <p className=\"ngs-shelf-info-card_text\">{shelfInfo.description}</p>\n </div>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { Button } from \"@components/shared/Button\";\nimport { Icon } from \"@components/shared/Icon\";\nimport { Offer } from \"@duffel/api/types\";\nimport { moneyStringFormatter } from \"@lib/moneyStringFormatter\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { NGS_SHELF_INFO } from \"./lib\";\nimport { getFareBrandNameForOffer } from \"./lib/deduplicate-mapped-offers-by-fare-brand\";\nimport { doesSliceHaveMixedCabins } from \"./lib/does-slice-have-mixed-cabins\";\nimport { getMaxBaggagesForOfferSlice } from \"./lib/get-max-baggages-for-offer-slice\";\n\nexport interface NGSSliceFareCardProps {\n offer: Omit<Offer, \"available_services\">;\n sliceIndex: number;\n\n onSelect?: () => void;\n\n className?: string;\n}\n\nexport const NGSSliceFareCard: React.FC<NGSSliceFareCardProps> = ({\n offer,\n sliceIndex,\n onSelect,\n className,\n}) => {\n if (sliceIndex >= offer.slices.length) {\n throw new Error(\n \"Attempted to create `NGSSliceFareCard` with invalid slice index\",\n );\n }\n\n const slice = offer.slices[sliceIndex];\n const shelfInfo = NGS_SHELF_INFO[slice.ngs_shelf];\n\n const brandName = getFareBrandNameForOffer(offer, sliceIndex);\n\n // A null property indicates the API can't provide the information for this\n // slice, so we default to using the offer condition.\n const changeBeforeDepartureCondition = slice.conditions\n .change_before_departure\n ? slice.conditions.change_before_departure\n : offer.conditions.change_before_departure;\n const refundBeforeDepartureCondition = slice.conditions\n .refund_before_departure\n ? slice.conditions.refund_before_departure\n : offer.conditions.refund_before_departure;\n\n const checkedBagItems = getMaxBaggagesForOfferSlice(slice, \"checked\");\n const carryOnBagItems = getMaxBaggagesForOfferSlice(slice, \"carry_on\");\n\n return (\n <button\n className={classNames(\"ngs-slice-fare-card_container\", className)}\n onClick={() => {\n onSelect && onSelect();\n }}\n >\n <div>\n <div className=\"ngs-slice-fare-card_header\">\n <div>\n <span>{shelfInfo.short_title}</span>\n <h4 className=\"ngs-slice-fare-card_title\">{brandName}</h4>\n {doesSliceHaveMixedCabins(slice) && (\n <div className=\"ngs-slice-fare-card_mixed-cabins margin-t-8\">\n <Icon name=\"info_outline\" size={12} />\n Multiple cabins\n <div className=\"ngs-slice-fare-card_mixed-cabins-popover\">\n {slice.segments.map((segment, index) => (\n <p key={`slice_${index}`}>\n {segment.origin.iata_code} \u2192{\" \"}\n {segment.destination.iata_code}\n <span className=\"margin-x-12\">|</span>\n {segment.passengers[0].cabin_class_marketing_name}\n </p>\n ))}\n </div>\n </div>\n )}\n </div>\n <Icon name={shelfInfo.icon} color=\"--GREY-900\" />\n </div>\n <div>\n {changeBeforeDepartureCondition && (\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={\n changeBeforeDepartureCondition.allowed\n ? \"currency_exchange\"\n : \"close\"\n }\n color=\"--GREY-600\"\n size={20}\n />\n Changeable\n {changeBeforeDepartureCondition.allowed &&\n changeBeforeDepartureCondition.penalty_currency &&\n changeBeforeDepartureCondition.penalty_amount\n ? ` (${moneyStringFormatter(\n changeBeforeDepartureCondition.penalty_currency,\n )(+changeBeforeDepartureCondition.penalty_amount)})`\n : \"\"}\n </div>\n )}\n {refundBeforeDepartureCondition && (\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={\n refundBeforeDepartureCondition.allowed\n ? \"airplane_ticket\"\n : \"close\"\n }\n color=\"--GREY-600\"\n size={20}\n />\n Refundable\n {refundBeforeDepartureCondition.allowed &&\n refundBeforeDepartureCondition.penalty_currency &&\n refundBeforeDepartureCondition.penalty_amount\n ? ` (${moneyStringFormatter(\n refundBeforeDepartureCondition.penalty_currency,\n )(+refundBeforeDepartureCondition.penalty_amount)})`\n : \"\"}\n </div>\n )}\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={carryOnBagItems.length > 0 ? \"shopping_bag\" : \"close\"}\n color=\"--GREY-600\"\n size={20}\n />\n Carry-on bag\n </div>\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={checkedBagItems.length > 0 ? \"luggage\" : \"close\"}\n color=\"--GREY-600\"\n size={20}\n />\n Checked bag\n </div>\n {slice.conditions.advance_seat_selection !== null && (\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={\n slice.conditions.advance_seat_selection\n ? \"check_small\"\n : \"close\"\n }\n color=\"--GREY-600\"\n size={20}\n />\n Seat selection\n </div>\n )}\n {slice.conditions.priority_boarding !== null && (\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={\n slice.conditions.priority_boarding ? \"check_small\" : \"close\"\n }\n color=\"--GREY-600\"\n size={20}\n />\n Priority boarding\n </div>\n )}\n {slice.conditions.priority_check_in !== null && (\n <div className=\"ngs-slice-fare-card_item\">\n <Icon\n name={\n slice.conditions.priority_check_in ? \"check_small\" : \"close\"\n }\n color=\"--GREY-600\"\n size={20}\n />\n Priority check-in\n </div>\n )}\n </div>\n </div>\n <div className=\"ngs-slice-fare-card_footer\">\n <span className=\"ngs-slice-fare-card_price\">\n {moneyStringFormatter(offer.total_currency)(+offer.total_amount)}\n </span>\n <div>\n <Button size={32} className=\"ngs-slice-fare-card_button\">\n Select\n </Button>\n </div>\n </div>\n </button>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferRequest, OfferSlice } from \"@duffel/api/types\";\n\nexport function doesSliceHaveMixedCabins(slice: OfferSlice) {\n const cabinMarketingNames = new Set<string>();\n for (const segment of slice.segments) {\n cabinMarketingNames.add(segment.passengers[0].cabin_class_marketing_name);\n }\n\n return cabinMarketingNames.size > 1;\n}\n\nexport function doOffersHaveMixedCabin(\n offer: OfferRequest[\"offers\"] | null,\n sliceIndex: number = 0,\n) {\n if (offer === null) {\n return false;\n }\n\n return offer.some((offer) =>\n doesSliceHaveMixedCabins(offer.slices[sliceIndex]),\n );\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import {\n OfferAvailableServiceBaggageMetadata,\n OfferSlice,\n OfferSliceSegmentPassenger,\n} from \"@duffel/api/types\";\n\nconst getBaggagesQuantity = (\n baggages: OfferSliceSegmentPassenger[\"baggages\"],\n type: OfferAvailableServiceBaggageMetadata[\"type\"],\n): number => {\n return baggages\n .filter((baggage) => baggage.type === type)\n .reduce((quantity, baggage) => {\n return quantity + baggage.quantity;\n }, 0);\n};\n\n/**\n * Returns the passenger baggages object with the largest quantity of baggages\n * of a specified type for a slice. Baggage quantity can (very occasionally)\n * vary across passengers and segments in a slice, so the 'max' baggages can\n * be used as the baseline for a slice.\n */\nexport const getMaxBaggagesForOfferSlice = (\n offerSlice: OfferSlice,\n type: OfferAvailableServiceBaggageMetadata[\"type\"],\n): OfferSliceSegmentPassenger[\"baggages\"] => {\n let maxBaggages = offerSlice.segments[0].passengers[0].baggages.filter(\n (baggage) => baggage.type === type,\n );\n let maxBaggagesQuantity = getBaggagesQuantity(maxBaggages, type);\n\n offerSlice.segments.forEach((segment) => {\n segment.passengers\n .filter((passenger) => passenger.baggages.length > 0)\n .forEach((passenger) => {\n const baggagesQuantity = getBaggagesQuantity(passenger.baggages, type);\n\n if (baggagesQuantity > maxBaggagesQuantity) {\n maxBaggages = passenger.baggages;\n maxBaggagesQuantity = getBaggagesQuantity(maxBaggages, type);\n }\n });\n });\n\n // The API will always return a checked baggage item even if the quantity is\n // 0, so here we filter them out\n return maxBaggages.filter((baggages) => baggages.quantity > 0);\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferRequest } from \"@duffel/api/types\";\nimport { NGSShelf } from \".\";\nimport { NGSOfferRow } from \"./group-offers-for-ngs-view\";\n\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport const getCheapestOfferAmount = (\n offers: OfferRequest[\"offers\"] | null,\n) => (offers ? Math.min(...offers.map((offer) => +offer.total_amount)) : null);\n\nexport const sortNGSRowsByShelfPrice = (\n rows: NGSOfferRow[],\n sortShelf: NGSShelf,\n sortDirection: SortDirection,\n): NGSOfferRow[] => {\n const sortedRows = [...rows].sort((a, b) => {\n const aAmount = +(getCheapestOfferAmount(a[sortShelf!]) || 0);\n const bAmount = +(getCheapestOfferAmount(b[sortShelf!]) || 0);\n if (aAmount && bAmount) {\n return sortDirection === \"asc\" ? aAmount - bAmount : bAmount - aAmount;\n }\n if (aAmount) return -1;\n if (bAmount) return 1;\n return 0;\n });\n\n return sortedRows;\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { NGSOfferRow } from \"./group-offers-for-ngs-view\";\nimport { parse, toMinutes } from \"duration-fns\";\n\ntype DurationSortDirection = \"asc\" | \"desc\";\nexport type DurationSort = DurationSortDirection | null;\n\nexport const sortNGSRowsByDuration = (\n rows: NGSOfferRow[],\n sortDirection: DurationSortDirection,\n): NGSOfferRow[] =>\n rows.sort((aRow, bRow) => {\n if (aRow.slice.duration === null || bRow.slice.duration === null) return 0;\n\n const aParsedDuration = parse(aRow.slice.duration);\n const bParsedDuration = parse(bRow.slice.duration);\n\n const aDurationInMinutes = toMinutes(aParsedDuration);\n const bDurationInMinutes = toMinutes(bParsedDuration);\n\n if (sortDirection === \"asc\") {\n return aDurationInMinutes - bDurationInMinutes;\n } else {\n return bDurationInMinutes - aDurationInMinutes;\n }\n });\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { useState } from \"react\";\nimport { Filters, filterResults } from \"./filter-results\";\nimport { OfferRequest } from \"@duffel/api/types\";\nimport { getInitialFilterValues } from \"./get-initial-filter-values\";\n\nexport function useFilters(\n offerRequest: OfferRequest,\n selectedSliceKeys: string[],\n) {\n const initialFilterValues = getInitialFilterValues(offerRequest);\n\n const [airlinesFilter, setAirlinesFilter] = useState<Filters[\"airlines\"]>(\n initialFilterValues.airlines,\n );\n\n const [timesFilter, setTimesFilter] = useState<Filters[\"times\"]>(\n initialFilterValues.times,\n );\n\n const [stopsFilter, setStopsFilter] = useState<Filters[\"stops\"]>(\n initialFilterValues.stops,\n );\n\n function clearFilters() {\n setAirlinesFilter(initialFilterValues.airlines);\n setTimesFilter(initialFilterValues.times);\n setStopsFilter(initialFilterValues.stops);\n }\n\n const filteredOffers = filterResults(\n offerRequest.offers,\n selectedSliceKeys.length > 0 ? selectedSliceKeys.length : 0,\n {\n airlines: airlinesFilter,\n times: timesFilter,\n stops: stopsFilter,\n },\n );\n\n return {\n airlinesFilterOptions: initialFilterValues.airlines,\n airlinesFilter,\n timesFilter,\n stopsFilter,\n setAirlinesFilter,\n setTimesFilter,\n setStopsFilter,\n clearFilters,\n filteredOffers,\n };\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferSlice } from \"@duffel/api/types\";\nimport { NGSTableProps } from \"../NGSTable\";\n\nexport interface Filters {\n airlines: Array<{ iata_code: string; name: string }>;\n stops: \"direct-only\" | \"1-stop-at-most\" | \"2-stops-at-most\" | \"any\";\n times: {\n departure: [number, number];\n arrival: [number, number];\n };\n}\n\nexport function filterResults(\n offers: NGSTableProps[\"offers\"],\n currentSliceIndex: number,\n filters: Filters,\n) {\n return offers.filter((offer) => {\n const currentOfferSlice = offer.slices[currentSliceIndex];\n return [\n isMatchOnAirlines(offer, filters.airlines) &&\n isMatchOnStops(currentOfferSlice, filters.stops) &&\n isMatchOnTimes(currentOfferSlice, filters.times),\n ].every((isTrue) => isTrue);\n });\n}\nfunction isMatchOnAirlines(\n offer: NGSTableProps[\"offers\"][number],\n airlines: Filters[\"airlines\"],\n) {\n return airlines.some(\n (airline) => offer.owner.iata_code === airline.iata_code,\n );\n}\n\nfunction isMatchOnStops(\n currentOfferSlice: OfferSlice,\n stops: Filters[\"stops\"],\n) {\n const sliceStops =\n currentOfferSlice.segments.length -\n 1 +\n currentOfferSlice.segments.reduce(\n (stopCount, segment) => stopCount + (segment.stops?.length || 0),\n 0,\n );\n\n switch (stops) {\n case \"direct-only\":\n return sliceStops === 0;\n case \"1-stop-at-most\":\n return sliceStops <= 1;\n case \"2-stops-at-most\":\n return sliceStops <= 2;\n case \"any\":\n return true;\n }\n}\n\nfunction isMatchOnTimes(\n currentOfferSlice: OfferSlice,\n times: Filters[\"times\"],\n) {\n const firstSegment = currentOfferSlice.segments[0];\n const lastSegment =\n currentOfferSlice.segments[currentOfferSlice.segments.length - 1];\n\n const sliceDepartureTime = new Date(firstSegment.departing_at);\n const sliceArrivalTime = new Date(lastSegment.arriving_at);\n\n const [departureRangeStart, departureRangeEnd] = times.departure;\n const [arrivalRangeStart, arrivalRangeEnd] = times.arrival;\n\n const sliceDepartureTimeInMinutes =\n transformDateToMinutes(sliceDepartureTime);\n\n const sliceArrivalTimeInMinutes = transformDateToMinutes(sliceArrivalTime);\n\n return (\n sliceDepartureTimeInMinutes >= departureRangeStart &&\n sliceDepartureTimeInMinutes <= departureRangeEnd &&\n sliceArrivalTimeInMinutes >= arrivalRangeStart &&\n sliceArrivalTimeInMinutes <= arrivalRangeEnd\n );\n}\n\nfunction transformDateToMinutes(date: Date) {\n return date.getHours() * 60 + date.getMinutes();\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferRequest } from \"@duffel/api/types\";\nimport { Filters } from \"./filter-results\";\n\nexport function getAirlines(offerRequest: OfferRequest): Filters[\"airlines\"] {\n const airlines: Filters[\"airlines\"] = [];\n const insertedAirlines = new Set<string>();\n\n for (const offer of offerRequest.offers) {\n const owner = offer.owner;\n if (owner.iata_code === null) continue;\n\n if (!insertedAirlines.has(owner.iata_code)) {\n airlines.push({\n iata_code: owner.iata_code,\n name: owner.name,\n });\n insertedAirlines.add(owner.iata_code);\n }\n }\n return airlines.sort((a, b) => a.name.localeCompare(b.name));\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { OfferRequest } from \"@duffel/api/booking/OfferRequests/OfferRequestsTypes\";\nimport { Filters } from \"./filter-results\";\nimport { getAirlines } from \"./getAirlines\";\n\nexport function getInitialFilterValues(offerRequest: OfferRequest): Filters {\n return {\n airlines: getAirlines(offerRequest),\n stops: \"any\",\n times: {\n departure: [0, 1440],\n arrival: [0, 1440],\n },\n };\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\nimport { FilterControl, FilterControlOption } from \"./FilterControl\";\n\nconst OPTIONS = {\n \"duration-asc\": \"Duration Shortest to Longest\",\n \"duration-desc\": \"Duration Longest to Shortest\",\n\n \"1-asc\": \"Price (Basic) Low to High\",\n \"1-desc\": \"Price (Basic) High to Low\",\n\n \"2-asc\": \"Price (Standard) Low to High\",\n \"2-desc\": \"Price (Standard) High to Low\",\n\n \"3-asc\": \"Price (Plus) Low to High\",\n \"3-desc\": \"Price (Plus) High to Low\",\n\n \"4-asc\": \"Price (Premium) Low to High\",\n \"4-desc\": \"Price (Premium) High to Low\",\n\n \"5-asc\": \"Price (Luxury) Low to High\",\n \"5-desc\": \"Price (Luxury) High to Low\",\n\n recommended: \"Recommended\",\n} as const;\n\nexport type SortOption = keyof typeof OPTIONS;\n\nconst OPTION_KEYS = Object.keys(OPTIONS) as SortOption[];\n\nfunction getLabel(stopsOption: SortOption) {\n return OPTIONS[stopsOption];\n}\n\ninterface StopsSelectorProps {\n selected: SortOption;\n onChange: (stopFilter: SortOption) => void;\n}\n\nexport const SortingControl: React.FC<StopsSelectorProps> = ({\n selected,\n onChange,\n}) => {\n return (\n <FilterControl\n target={`Sort by: ${getLabel(selected)}`}\n popoverWidth={\"300px\"}\n targetWidth=\"285px\"\n >\n {(onClose) =>\n OPTION_KEYS.map((option, index) => (\n <FilterControlOption\n isSelected={option === selected}\n key={option}\n onClick={() => {\n onChange(option);\n onClose();\n }}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" ||\n (e.key === \"Tab\" && index === OPTION_KEYS.length - 1)\n ) {\n onClose();\n }\n }}\n >\n <span>{getLabel(option)}</span>\n </FilterControlOption>\n ))\n }\n </FilterControl>\n );\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { NGSOfferRow } from \"./group-offers-for-ngs-view\";\nimport { parse, toMinutes } from \"duration-fns\";\nimport { getCheapestOfferAmount } from \"./sort-ngs-rows-by-shelf-price\";\n\nconst getAmountForRecommendedSort = (row: NGSOfferRow): number => {\n // Use cheapest fare in the standard shelf if it exists\n if (row[2] && row[2].length > 0) return getCheapestOfferAmount(row[2])!;\n // If it doesn\u2019t exist use the price of the shelf above (and do this until there are no shelves left to use).\n if (row[3] && row[3].length > 0) return getCheapestOfferAmount(row[3])!;\n if (row[4] && row[4].length > 0) return getCheapestOfferAmount(row[4])!;\n if (row[5] && row[5].length > 0) return getCheapestOfferAmount(row[5])!;\n // If there is nothing in shelf 2-5 then use shelf 1 but with 2 * the price.\n return 2 * (getCheapestOfferAmount(row[1]) || 0);\n};\n\n// Sort by the product of the duration and the price of the cheapest fare in the standard shelf (ideally)\nexport const sortNGSRowsByRecommended = (rows: NGSOfferRow[]): NGSOfferRow[] =>\n rows.sort((aRow, bRow) => {\n if (aRow.slice.duration === null || bRow.slice.duration === null) return 0;\n\n const aParsedDuration = parse(aRow.slice.duration);\n const bParsedDuration = parse(bRow.slice.duration);\n\n const aDurationInMinutes = toMinutes(aParsedDuration);\n const bDurationInMinutes = toMinutes(bParsedDuration);\n\n const aCheapestOfferAmount = getAmountForRecommendedSort(aRow);\n const bCheapestOfferAmount = getAmountForRecommendedSort(bRow);\n\n const aProduct = aDurationInMinutes * aCheapestOfferAmount;\n const bProduct = bDurationInMinutes * bCheapestOfferAmount;\n\n return aProduct - bProduct;\n });\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import * as React from \"react\";\nimport { getIFrameEventListener } from \"./lib/getIFrameEventListener\";\nimport { getIframeURL } from \"./lib/getIframeURL\";\nimport { postMessageToCreateCardForTemporaryUse } from \"./lib/postMessageToCreateCardForTemporaryUse\";\nimport { postMessageToSaveCard } from \"./lib/postMessageToSaveCard\";\nimport { postMessageWithStyles } from \"./lib/postMessageWithStyles\";\nimport { DuffelCardFormProps } from \"./lib/types\";\nimport { DuffelCardFormActions } from \"./lib/useDuffelCardFormActions\";\n\nexport const DuffelCardForm = React.forwardRef<\n DuffelCardFormActions,\n DuffelCardFormProps\n>(\n (\n {\n tokenProxyEnvironment = \"production\",\n clientKey,\n styles,\n intent,\n savedCardData,\n onValidateSuccess,\n onValidateFailure,\n onCreateCardForTemporaryUseSuccess,\n onCreateCardForTemporaryUseFailure,\n onSaveCardSuccess,\n onSaveCardFailure,\n onSecurityPolicyViolation,\n },\n ref,\n ) => {\n // Validates required props\n if (!clientKey) {\n throw new Error(\n \"Attempted to render `DuffelCardForm` without a clientKey.\",\n );\n }\n if (!intent) {\n throw new Error(\n \"Attempted to render `DuffelCardForm` without an `intent`. Make sure your provide one of the following: `create-card-for-temporary-use`, `save-card`, `use-saved-card`.\",\n );\n }\n if (intent == \"to-use-saved-card\" && !savedCardData) {\n throw new Error(\n \"Attempted to render `DuffelCardForm`to use a saved card but the `cardId` prop is missing. Make sure you provide the id of the saved card you'd like to use.\",\n );\n }\n\n // Post message with ref functions\n React.useImperativeHandle(\n ref,\n () => {\n return {\n saveCard: () => postMessageToSaveCard(iFrameReference, iFrameURL),\n createCardForTemporaryUse: () =>\n postMessageToCreateCardForTemporaryUse(iFrameReference, iFrameURL),\n };\n },\n [],\n );\n\n // Component state\n const [iFrameHeight, setIFrameHeight] = React.useState(\"0px\");\n const iFrameReference = React.useRef<HTMLIFrameElement>(null);\n\n // Sets the iframe src\n const iFrameURL = getIframeURL(\n tokenProxyEnvironment,\n intent,\n clientKey,\n savedCardData,\n );\n\n // Register event listeners to the window to listen to messages from the iframe.\n React.useEffect(() => {\n const iFrameEventListener = getIFrameEventListener(iFrameURL, {\n postMessageWithStyles: () =>\n postMessageWithStyles(iFrameReference, iFrameURL, styles),\n setIFrameHeight,\n onValidateSuccess,\n onValidateFailure,\n onCreateCardForTemporaryUseSuccess,\n onCreateCardForTemporaryUseFailure,\n onSaveCardSuccess,\n onSaveCardFailure,\n onSecurityPolicyViolation,\n });\n\n window.addEventListener(\"message\", iFrameEventListener);\n return () => window.removeEventListener(\"message\", iFrameEventListener);\n }, []);\n\n return (\n <iframe\n ref={iFrameReference}\n title=\"Card Payment Form\"\n src={iFrameURL.href}\n style={{\n width: \"100%\",\n border: \"none\",\n height: iFrameHeight,\n }}\n />\n );\n },\n);\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { DuffelCardFormProps } from \"./types\";\n\ntype Inputs = {\n setIFrameHeight: (height: string) => void;\n postMessageWithStyles: () => void;\n} & Pick<\n DuffelCardFormProps,\n | \"onValidateSuccess\"\n | \"onValidateFailure\"\n | \"onCreateCardForTemporaryUseSuccess\"\n | \"onCreateCardForTemporaryUseFailure\"\n | \"onSaveCardSuccess\"\n | \"onSaveCardFailure\"\n | \"onSecurityPolicyViolation\"\n>;\n\nexport function getIFrameEventListener(\n iFrameURL: URL,\n {\n postMessageWithStyles,\n setIFrameHeight,\n onValidateSuccess,\n onValidateFailure,\n onCreateCardForTemporaryUseSuccess,\n onCreateCardForTemporaryUseFailure,\n onSaveCardSuccess,\n onSaveCardFailure,\n onSecurityPolicyViolation,\n }: Inputs,\n) {\n return function iFrameEventListener(event: MessageEvent) {\n if (\n !iFrameURL.origin?.startsWith(event.origin) ||\n !event.data ||\n !event.data.type\n ) {\n return;\n }\n\n const eventType = event?.data?.type;\n\n switch (eventType) {\n case \"iframe-loaded\":\n postMessageWithStyles();\n return;\n\n case \"content-height-ready\":\n setIFrameHeight(event.data.height);\n return;\n\n case \"validate-success\":\n if (onValidateSuccess) {\n onValidateSuccess();\n } else {\n console.warn(\"`onValidateSuccess` not implemented\");\n }\n return;\n\n case \"validate-failure\":\n if (onValidateFailure) {\n onValidateFailure();\n } else {\n console.warn(\"`onValidateFailure` not implemented\");\n }\n return;\n\n case \"create-card-for-temporary-use-success\":\n if (onCreateCardForTemporaryUseSuccess) {\n onCreateCardForTemporaryUseSuccess(event.data.data);\n } else {\n console.warn(\"`onCreateCardForTemporaryUseSuccess` not implemented\");\n }\n return;\n\n case \"create-card-for-temporary-use-failure\":\n if (onCreateCardForTemporaryUseFailure) {\n onCreateCardForTemporaryUseFailure(event.data.error);\n } else {\n console.warn(\"`onCreateCardForTemporaryUseFailure` not implemented\");\n }\n return;\n\n case \"save-card-success\":\n if (onSaveCardSuccess) {\n onSaveCardSuccess(event.data.data);\n } else {\n console.warn(\"`onSaveCardSuccess` not implemented\");\n }\n return;\n\n case \"save-card-failure\":\n if (onSaveCardFailure) {\n onSaveCardFailure(event.data.error);\n } else {\n console.warn(\"`onSaveCardFailure` not implemented\");\n }\n return;\n\n case \"security-policy-violation\":\n if (onSecurityPolicyViolation) {\n onSecurityPolicyViolation(event.data.data);\n } else {\n console.warn(\"`onSecurityPolicyViolation` not implemented\");\n }\n return;\n\n case \"load\":\n return;\n\n default:\n // eslint-disable-next-line\n console.log(`Unknown event type: ${eventType}`);\n return;\n }\n };\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { DuffelCardFormProps } from \"./types\";\n\nexport function getIFrameOriginForEnvironment(\n tokenProxyEnvironment: DuffelCardFormProps[\"tokenProxyEnvironment\"],\n): string {\n let origin = \"https://api.duffel.cards\";\n if (tokenProxyEnvironment === \"staging\") {\n origin = \"https://api.staging.duffel.cards\";\n } else if (tokenProxyEnvironment === \"development\") {\n origin = \"https://localhost:8000\";\n }\n\n return origin;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { DuffelCardFormIntent } from \"./types\";\n\nexport function getPathnameForIntent(intent: DuffelCardFormIntent): string {\n switch (intent) {\n case \"to-use-saved-card\":\n return `/vault/use_saved_card`;\n case \"to-save-card\":\n return `/vault/save_card`;\n case \"to-create-card-for-temporary-use\":\n return `/vault/create_card_for_temporary_use`;\n default:\n if (!intent) {\n throw new Error(\n \"Attempted to call `getPathnameForIntent` without an intent.\",\n );\n } else {\n throw new Error(\n `Attempted to call \\`getPathnameForIntent\\` but the intent \"${intent}\" is unknown.`,\n );\n }\n }\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export function getTokenFromClientKey(clientKey: string): string {\n if (!clientKey) throw new Error(\"The client key is missing.\");\n\n if (clientKey.split(\".\").length !== 3) {\n throw new Error(\n \"Invalid clientKey attribute in DuffelCardForm. It must be a valid JWT.\",\n );\n }\n\n const payloadString = clientKey.split(\".\")[1];\n\n try {\n const payload = JSON.parse(atob(payloadString));\n return payload.token;\n } catch (error) {\n throw new Error(\n \"Invalid clientKey attribute in DuffelCardForm. It was not possible to read the payload.\",\n );\n }\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { getIFrameOriginForEnvironment } from \"./getIFrameOriginForEnvironment\";\nimport { getPathnameForIntent } from \"./getPathnameForIntent\";\nimport { getTokenFromClientKey } from \"./getTokenFromClientKey\";\nimport { DuffelCardFormProps } from \"./types\";\n\nexport function getIframeURL(\n tokenProxyEnvironment: DuffelCardFormProps[\"tokenProxyEnvironment\"],\n intent: DuffelCardFormProps[\"intent\"],\n clientKey: DuffelCardFormProps[\"clientKey\"],\n savedCardData: DuffelCardFormProps[\"savedCardData\"],\n) {\n const iFrameOrigin = getIFrameOriginForEnvironment(tokenProxyEnvironment);\n const iframeURL = new URL(iFrameOrigin);\n\n iframeURL.pathname = getPathnameForIntent(intent);\n\n iframeURL.searchParams.set(\"token\", getTokenFromClientKey(clientKey));\n\n if (savedCardData) {\n iframeURL.searchParams.set(\"card_id\", savedCardData.id);\n iframeURL.searchParams.set(\"card_brand\", savedCardData.brand);\n }\n\n return iframeURL;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export function postMessageToCreateCardForTemporaryUse(\n iFrameReference: React.RefObject<HTMLIFrameElement>,\n baseUrl: URL,\n) {\n if (!iFrameReference.current) {\n throw new Error(\n \"Attempted to call `postMessageToStoreCardForTemporaryUse` with empty iFrameReference\",\n );\n }\n\n const iFrame = iFrameReference.current;\n if (!iFrame.contentWindow) {\n throw new Error(\n \"Attempted to call `postMessageToStoreCardForTemporaryUse` but the iFrame contentWindow is null\",\n );\n }\n\n iFrame.contentWindow.postMessage(\n { type: \"create-card-for-temporary-use\" },\n baseUrl.origin,\n );\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export function postMessageToSaveCard(\n iFrameReference: React.RefObject<HTMLIFrameElement>,\n baseUrl: URL,\n) {\n if (!iFrameReference.current) {\n throw new Error(\n \"Attempted to call `postMessageToSaveCard` with empty iFrameReference\",\n );\n }\n\n const iFrame = iFrameReference.current;\n if (!iFrame.contentWindow) {\n throw new Error(\n \"Attempted to call `postMessageToSaveCard` but the iFrame contentWindow is null\",\n );\n }\n\n iFrame.contentWindow.postMessage({ type: \"save-card\" }, baseUrl.origin);\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { DuffelCardFormStyles } from \"./types\";\n\nexport function postMessageWithStyles(\n iFrameReference: React.RefObject<HTMLIFrameElement>,\n baseUrl: URL,\n styles: DuffelCardFormStyles | undefined,\n) {\n if (!iFrameReference.current) {\n throw new Error(\n \"Attempted to call `postMessageWithStyles` with empty iFrameReference\",\n );\n }\n\n const iFrame = iFrameReference.current;\n if (!iFrame.contentWindow) {\n throw new Error(\n \"Attempted to call `postMessageWithStyles` but the iFrame contentWindow is null\",\n );\n }\n\n iFrame.contentWindow.postMessage(\n { type: \"apply-styles\", styles },\n baseUrl.origin,\n );\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import React from \"react\";\n\nexport interface DuffelCardFormActions {\n saveCard: () => void;\n createCardForTemporaryUse: () => void;\n}\n\nexport interface UseDuffelCardFormActionsHook {\n /**\n * The ref you should pass to the DuffelCardForm component.\n */\n ref: React.RefObject<DuffelCardFormActions>;\n\n /**\n * Call this function to tell the component to save the card.\n */\n saveCard: () => void;\n\n /**\n * Call this function to tell the component to create a card for temporary use.\n */\n createCardForTemporaryUse: () => void;\n}\n\n/**\n * This hook abstracts the ref for convenience and readability.\n * Add `ref` to the `DuffelCardForm` `ref` prop and call the functions to trigger the actions you'd like.\n */\nexport function useDuffelCardFormActions(): UseDuffelCardFormActionsHook {\n const ref = React.useRef<DuffelCardFormActions>(null);\n\n return {\n ref,\n saveCard: () => {\n if (ref.current) {\n ref.current.saveCard();\n } else {\n console.warn(\"Attempted to save card, but ref is null\");\n }\n },\n createCardForTemporaryUse: () => {\n if (ref.current) {\n ref.current.createCardForTemporaryUse();\n } else {\n console.warn(\n \"Attempted to create card for temporary use, but ref is null\",\n );\n }\n },\n };\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "type ThreeDSSessionStatus =\n | \"challenge_required\"\n | \"ready_for_payment\"\n | \"expired\"\n | \"failed\";\n\nexport interface ThreeDSecureSession {\n id: string;\n live_mode: boolean;\n resource_id: string;\n cardholder_present: boolean;\n status: ThreeDSSessionStatus;\n external_id: string | null;\n}\n\nconst getAPIHeaders = (clientKey: string) => ({\n \"Duffel-Version\": \"v2\",\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${clientKey}`,\n \"User-Agent\": `Duffel/ancillaries-component@${process.env.COMPONENT_VERSION}`,\n});\n\ninterface Service {\n id: string;\n quantity: number;\n}\n\ninterface create3DSSessionPayload {\n card_id: string;\n resource_id: string;\n services?: Array<Service>;\n cardholder_present: boolean;\n}\n\nexport const createClient = (duffelUrl: string, clientKey: string) => {\n const create3DSSessionInDuffelAPI = async (\n data: create3DSSessionPayload,\n ): Promise<ThreeDSecureSession> => {\n const response = await fetch(`${duffelUrl}/three_d_secure_sessions`, {\n method: \"POST\",\n headers: getAPIHeaders(clientKey),\n body: JSON.stringify({ data }),\n });\n\n const responseData = await response.json();\n if (response.status !== 201) {\n throw responseData;\n }\n\n return responseData[\"data\"];\n };\n\n const refresh3DSSessionInDuffelAPI = async (\n sessionID: string,\n isFirstAttempt = true,\n ): Promise<ThreeDSecureSession> => {\n const response = await fetch(\n `${duffelUrl}/three_d_secure_sessions/${sessionID}/actions/refresh`,\n {\n method: \"POST\",\n headers: getAPIHeaders(clientKey),\n },\n );\n\n const responseData = await response.json();\n if (response.status !== 200) {\n if (!isFirstAttempt) {\n throw responseData;\n } else {\n return refresh3DSSessionInDuffelAPI(sessionID, false);\n }\n }\n\n return responseData[\"data\"];\n };\n\n return { create3DSSessionInDuffelAPI, refresh3DSSessionInDuffelAPI };\n};\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "export function initEvervault(\n sessionID: string,\n teamID: string,\n appID: string,\n) {\n // @ts-expect-error - We don't have Evervault defined as it comes from a CDN and types are not available.\n const evervault = new Evervault(teamID, appID);\n const threeDSecure = evervault.ui.threeDSecure(sessionID);\n threeDSecure.mount();\n return threeDSecure;\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "const SCRIPT_ID = \"evervault-script\";\n\nexport function loadEvervaultScript(): Promise<void> {\n return new Promise((resolve) => {\n // check if it's loaded. If it is, don't load it again\n if (document.getElementById(SCRIPT_ID)) return resolve();\n\n const script = document.createElement(\"script\");\n script.id = SCRIPT_ID;\n script.type = \"text/javascript\";\n script.src = \"https://js.evervault.com/v2\";\n script.onload = () => {\n console.log(\"Evervault script loaded\");\n resolve();\n };\n\n document.body.appendChild(script);\n });\n}\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";", "import { ThreeDSecureSession, createClient } from \"./client\";\nimport { initEvervault } from \"./initEvervault\";\nimport { loadEvervaultScript } from \"./loadEvervaultScript\";\n\nconst DEFAULT_ENVIRONMENT_CONFIGURATION = {\n duffelUrl: \"https://api.duffel.com\",\n evervaultCredentials: {\n teamID: \"team_a22f3ea22207\",\n appID: \"app_976f15bbdddd\",\n },\n};\n\ntype CreateThreeDSecureSessionFn = (\n clientKey: string,\n cardId: string,\n resourceId: string,\n services: Array<{ id: string; quantity: number }>,\n cardholderPresent: boolean,\n environmentConfiguration?: Partial<typeof DEFAULT_ENVIRONMENT_CONFIGURATION>,\n) => Promise<ThreeDSecureSession>;\n\ndeclare global {\n interface Window {\n createThreeDSecureSession: CreateThreeDSecureSessionFn;\n }\n}\n\nconst GENERIC_ERROR_MESSAGE = \"Failed to create 3DS session\";\n\nexport const createThreeDSecureSession: CreateThreeDSecureSessionFn = async (\n clientKey,\n cardId,\n resourceId,\n services,\n cardholderPresent,\n environmentConfiguration = {},\n) => {\n const env: typeof DEFAULT_ENVIRONMENT_CONFIGURATION = {\n ...DEFAULT_ENVIRONMENT_CONFIGURATION,\n ...environmentConfiguration,\n };\n\n // We want to load the Evervault script\n // onto the page as soon as this file is loaded.\n await loadEvervaultScript();\n\n return new Promise((resolve, reject) => {\n const client = createClient(env.duffelUrl, clientKey);\n\n client\n .create3DSSessionInDuffelAPI({\n card_id: cardId,\n resource_id: resourceId,\n services: services,\n cardholder_present: cardholderPresent,\n })\n .then((threeDSSession) => {\n if (!threeDSSession) {\n reject(new Error(GENERIC_ERROR_MESSAGE));\n return;\n }\n\n if (threeDSSession.status === \"ready_for_payment\") {\n resolve(threeDSSession);\n return;\n }\n\n if (threeDSSession.external_id === null) {\n reject(new Error(GENERIC_ERROR_MESSAGE));\n return;\n }\n\n const threeDSecure = initEvervault(\n threeDSSession.external_id,\n env.evervaultCredentials.teamID,\n env.evervaultCredentials.appID,\n );\n\n threeDSecure.on(\"failure\", () => {\n client\n .refresh3DSSessionInDuffelAPI(threeDSSession.id)\n .then(reject)\n .catch(reject);\n });\n\n threeDSecure.on(\"error\", () => {\n client\n .refresh3DSSessionInDuffelAPI(threeDSSession.id)\n .then(() => {\n reject(new Error(GENERIC_ERROR_MESSAGE));\n })\n .catch(() => {\n reject(new Error(GENERIC_ERROR_MESSAGE));\n });\n });\n\n threeDSecure.on(\"success\", () => {\n client\n .refresh3DSSessionInDuffelAPI(threeDSSession.id)\n .then(resolve)\n .catch((error) => {\n reject(error);\n });\n });\n })\n .catch(reject);\n });\n};\n\nexport default { createThreeDSecureSession };\n;\nimport \"/Users/igordepaula/.yarn/berry/cache/@sentry-bundler-plugin-core-npm-0.7.2-054e3436fd-10c0.zip/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js\";"],
|
|
5
|
-
"mappings": "yoBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,EAOC,UAAY,CACZ,aAEA,IAAIC,EAAS,CAAC,EAAE,eACZC,EAAmB,gBAEvB,SAASC,GAAa,CAGrB,QAFIC,EAAU,CAAC,EAENC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CAC1C,IAAIC,EAAM,UAAUD,CAAC,EACrB,GAAKC,EAEL,KAAIC,EAAU,OAAOD,EAErB,GAAIC,IAAY,UAAYA,IAAY,SACvCH,EAAQ,KAAKE,CAAG,UACN,MAAM,QAAQA,CAAG,GAC3B,GAAIA,EAAI,OAAQ,CACf,IAAIE,EAAQL,EAAW,MAAM,KAAMG,CAAG,EAClCE,GACHJ,EAAQ,KAAKI,CAAK,WAGVD,IAAY,SAAU,CAChC,GAAID,EAAI,WAAa,OAAO,UAAU,UAAY,CAACA,EAAI,SAAS,SAAS,EAAE,SAAS,eAAe,EAAG,CACrGF,EAAQ,KAAKE,EAAI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,EACvC,OAGF,GAAIc,EAAe,SAAW,oBAAqB,CACjDJ,EAAQI,CAAc,EACtB,OAGF,GAAIA,EAAe,cAAgB,KAAM,CACvCH,EAAO,IAAI,MAAMX,EAAqB,CAAC,EACvC,OAGF,IAAMe,EAAeC,GACnBF,EAAe,YACfN,EAAI,qBAAqB,OACzBA,EAAI,qBAAqB,KAC3B,EAEAO,EAAa,GAAG,UAAW,IAAM,CAC/BH,EACG,6BAA6BE,EAAe,EAAE,EAC9C,KAAKH,CAAM,EACX,MAAMA,CAAM,CACjB,CAAC,EAEDI,EAAa,GAAG,QAAS,IAAM,CAC7BH,EACG,6BAA6BE,EAAe,EAAE,EAC9C,KAAK,IAAM,CACVH,EAAO,IAAI,MAAMX,EAAqB,CAAC,CACzC,CAAC,EACA,MAAM,IAAM,CACXW,EAAO,IAAI,MAAMX,EAAqB,CAAC,CACzC,CAAC,CACL,CAAC,EAEDe,EAAa,GAAG,UAAW,IAAM,CAC/BH,EACG,6BAA6BE,EAAe,EAAE,EAC9C,KAAKJ,CAAO,EACZ,MAAOO,GAAU,CAChBN,EAAOM,CAAK,CACd,CAAC,CACL,CAAC,CACH,CAAC,EACA,MAAMN,CAAM,CACjB,CAAC,CACH",
|
|
6
|
-
"names": ["require_classnames", "__commonJSMin", "exports", "module", "hasOwn", "nativeCodeString", "classNames", "classes", "i", "arg", "argType", "inner", "key", "require_react_stripe_umd", "__commonJSMin", "exports", "module", "global", "factory", "React", "ownKeys", "object", "enumerableOnly", "keys", "symbols", "sym", "_objectSpread2", "target", "i", "source", "key", "_defineProperty", "_typeof", "obj", "value", "_slicedToArray", "arr", "_arrayWithHoles", "_iterableToArrayLimit", "_unsupportedIterableToArray", "_nonIterableRest", "_i", "_arr", "_n", "_d", "_s", "_e", "err", "o", "minLen", "_arrayLikeToArray", "n", "len", "arr2", "createCommonjsModule", "fn", "ReactPropTypesSecret", "ReactPropTypesSecret_1", "emptyFunction", "emptyFunctionWithReset", "factoryWithThrowingShims", "shim", "props", "propName", "componentName", "location", "propFullName", "secret", "getShim", "ReactPropTypes", "propTypes", "usePrevious", "ref", "isUnknownObject", "raw", "isPromise", "isStripe", "PLAIN_OBJECT_STR", "isEqual", "left", "right", "leftArray", "rightArray", "leftPlainObject", "rightPlainObject", "leftKeys", "rightKeys", "keySet", "allKeys", "l", "r", "pred", "extractAllowedOptionsUpdates", "options", "prevOptions", "immutableKeys", "newOptions", "isUpdated", "INVALID_STRIPE_ERROR", "validateStripe", "maybeStripe", "parseStripeProp", "stripe", "ElementsContext", "parseElementsContext", "ctx", "useCase", "CartElementContext", "parseCartElementContext", "Elements", "_ref", "rawStripeProp", "children", "parsed", "_React$useState", "_React$useState2", "cart", "setCart", "_React$useState3", "_React$useState4", "cartState", "setCartState", "_React$useState5", "_React$useState6", "setContext", "isMounted", "safeSetContext", "prevStripe", "updates", "anyStripe", "useElementsContextWithUseCase", "useCaseMessage", "useCartElementContextWithUseCase", "useElements", "_useElementsContextWi", "elements", "useStripe", "_useElementsContextWi2", "useCartElement", "_useCartElementContex", "useCartElementState", "_useCartElementContex2", "ElementsConsumer", "_ref2", "useAttachEvent", "element", "event", "cb", "cbDefined", "cbRef", "decoratedCb", "capitalized", "str", "createElementComponent", "type", "isServer", "displayName", "ClientElement", "id", "className", "_ref$options", "onBlur", "onFocus", "onReady", "onChange", "onEscape", "onClick", "onLoadError", "onLoaderStart", "onNetworksChange", "onCheckout", "onLineItemClick", "onConfirm", "onCancel", "onShippingAddressChange", "onShippingRateChange", "setElement", "elementRef", "domNode", "readyCallback", "changeCallback", "checkoutCallback", "newElement", "ServerElement", "Element", "AuBankAccountElement", "CardElement", "CardNumberElement", "CardExpiryElement", "CardCvcElement", "FpxBankElement", "IbanElement", "IdealBankElement", "P24BankElement", "EpsBankElement", "PaymentElement", "ExpressCheckoutElement", "PaymentRequestButtonElement", "LinkAuthenticationElement", "AddressElement", "ShippingAddressElement", "CartElement", "PaymentMethodMessagingElement", "AffirmMessageElement", "AfterpayClearpayMessageElement", "require_classnames", "__commonJSMin", "exports", "module", "hasOwn", "classNames", "classes", "i", "arg", "appendClass", "parseValue", "key", "value", "newClass", "require_react_is_production_min", "__commonJSMin", "exports", "b", "c", "d", "e", "f", "g", "h", "k", "l", "m", "n", "p", "q", "t", "u", "v", "a", "r", "require_react_is", "__commonJSMin", "exports", "module", "MILLISECONDS_IN_A_SECOND", "MILLISECONDS_IN_A_MINUTE", "MILLISECONDS_IN_AN_HOUR", "MILLISECONDS_IN_A_DAY", "MILLISECONDS_IN_A_WEEK", "MILLISECONDS_IN_A_YEAR", "MILLISECONDS_IN_A_MONTH", "exports", "date", "unit", "__assign", "units_1", "parse_1", "negate", "duration", "output", "__assign", "unit", "exports", "isNegativelySigned", "n", "exports", "units_1", "negate_1", "numberUtils_1", "millisecondsPattern", "unitPattern", "unit", "createDurationParser", "regex", "unitsOrder", "duration", "match", "isDurationNegative", "unitStrings", "value", "unitNumbers", "i", "isMilliseconds", "output", "__assign", "parseFullFormatISODuration", "parseUnitsISODuration", "parseISODuration", "exports", "units_1", "validate", "duration", "unit", "exports", "units_1", "cleanDurationObject", "duration", "output", "__assign", "key", "exports", "units_1", "parseISODuration_1", "validate_1", "cleanDurationObject_1", "baseParse", "duration", "__assign", "parse", "output", "exports", "parse_1", "units_1", "toMilliseconds", "duration", "parsed", "total", "_a", "unit", "milliseconds", "exports", "toUnit", "createDurationConverter", "toUnit_1", "isNegative", "duration", "exports", "isNegative_1", "negate_1", "parse_1", "abs", "duration", "exports", "getDaysInMonth", "date", "monthIndex", "lastDayOfMonth", "exports", "addMonths", "value", "desiredMonth", "dateWithDesiredMonth", "daysInMonth", "dateUtils_1", "parse_1", "apply", "date", "duration", "parsedDate", "_a", "years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds", "exports", "units_1", "between", "date1", "date2", "a", "b", "output", "__assign", "_a", "unit", "dateGetter", "exports", "toUnit_1", "isZero", "duration", "exports", "units_1", "between_1", "apply_1", "toUnit_1", "parse_1", "createUnitsNormalizer", "keys", "getDivisor", "duration", "remaining", "output", "__assign", "unit", "divisor", "yearMonthNormalizer", "dayAndTimeNormalizer", "baseNormalizer", "_a", "years", "months", "weeks", "days", "rest", "__rest", "normalize", "referenceDate", "durationToNormalize", "exports", "units_1", "parse_1", "sum", "durations", "_i", "output", "__assign", "duration", "key", "exports", "negate_1", "sum_1", "subtract", "duration", "durationsToSubtract", "_i", "__spreadArray", "exports", "units_1", "parse_1", "getUnitCount", "duration", "parsed", "__assign", "count", "unit", "exports", "negate_1", "parse_1", "units_1", "checkAllUnitsNegative", "duration", "parsed", "hasPositive", "hasNegative", "unit", "value", "exports", "isZero_1", "getUnitCount_1", "units_1", "checkAllUnitsNegative_1", "joinComponents", "component", "delimiter", "toString", "duration", "options", "finalOptions", "__assign", "_a", "parsed", "isAllNegative", "components", "fromUnit", "toUnit", "millisecondValue", "unit", "ISOPrecision", "ISOCharacter", "value", "output", "exports", "require_types", "__commonJSMin", "exports", "__exportStar", "exports", "units_1", "src_exports", "__export", "DuffelAncillaries", "DuffelCardForm", "DuffelNGSView", "DuffelPayments", "StaysAmenities", "StaysRating", "StaysRoomRateCard", "StaysSummary", "amenityIcon", "createThreeDSecureSession", "useDuffelCardFormActions", "useSort", "__toCommonJS", "objectToString", "isError", "wat", "isInstanceOf", "isBuiltin", "className", "isErrorEvent", "isDOMError", "isDOMException", "isString", "isPrimitive", "isPlainObject", "isEvent", "isElement", "isRegExp", "isThenable", "isSyntheticEvent", "isNaN", "base", "isVueViewModel", "truncate", "str", "max", "safeJoin", "input", "delimiter", "output", "i", "value", "isVueViewModel", "isMatchingPattern", "pattern", "requireExactStringMatch", "isString", "isRegExp", "stringMatchesSomePattern", "testString", "patterns", "applyAggregateErrorsToEvent", "exceptionFromErrorImplementation", "parser", "maxValueLimit", "key", "limit", "event", "hint", "isInstanceOf", "originalException", "truncateAggregateExceptions", "aggregateExceptionsFromError", "error", "prevExceptions", "exception", "exceptionId", "newExceptions", "applyExceptionGroupFieldsForParentException", "newException", "newExceptionId", "applyExceptionGroupFieldsForChildException", "childError", "i", "source", "parentId", "exceptions", "maxValueLength", "truncate", "isGlobalObj", "obj", "GLOBAL_OBJ", "getGlobalObject", "getGlobalSingleton", "name", "creator", "gbl", "__SENTRY__", "WINDOW", "getGlobalObject", "DEFAULT_MAX_STRING_LENGTH", "htmlTreeAsString", "elem", "options", "currentElem", "MAX_TRAVERSE_HEIGHT", "out", "height", "len", "separator", "sepLength", "nextStr", "keyAttrs", "maxStringLength", "_htmlElementAsString", "el", "className", "classes", "key", "attr", "i", "keyAttrPairs", "keyAttr", "keyAttrPair", "isString", "allowedAttrs", "getLocationHref", "getDomElement", "selector", "PREFIX", "CONSOLE_LEVELS", "originalConsoleMethods", "consoleSandbox", "callback", "GLOBAL_OBJ", "console", "wrappedFuncs", "wrappedLevels", "level", "originalConsoleMethod", "makeLogger", "enabled", "logger", "name", "args", "DSN_REGEX", "isValidProtocol", "protocol", "dsnToString", "dsn", "withPassword", "host", "path", "pass", "port", "projectId", "publicKey", "dsnFromString", "str", "match", "lastPath", "split", "projectMatch", "dsnFromComponents", "components", "validateDsn", "component", "logger", "makeDsn", "from", "SentryError", "message", "logLevel", "fill", "source", "name", "replacementFactory", "original", "wrapped", "markFunctionWrapped", "addNonEnumerableProperty", "obj", "value", "logger", "proto", "getOriginalFunction", "func", "urlEncode", "object", "key", "convertToPlainObject", "isError", "getOwnProperties", "isEvent", "newObj", "serializeEventTarget", "isInstanceOf", "target", "isElement", "htmlTreeAsString", "extractedProps", "property", "extractExceptionKeysForMessage", "exception", "maxLength", "keys", "truncate", "includedKeys", "serialized", "dropUndefinedKeys", "inputValue", "_dropUndefinedKeys", "memoizationMap", "isPlainObject", "memoVal", "returnValue", "item", "uuid4", "gbl", "GLOBAL_OBJ", "crypto", "getRandomByte", "c", "getFirstException", "event", "getEventDescription", "message", "eventId", "firstException", "addExceptionTypeValue", "value", "type", "exception", "values", "addExceptionMechanism", "newMechanism", "defaultMechanism", "currentMechanism", "mergedData", "checkOrSetAlreadyCaught", "exception", "addNonEnumerableProperty", "arrayify", "maybeArray", "STACKTRACE_FRAME_LIMIT", "WEBPACK_ERROR_REGEXP", "STRIP_FRAME_REGEXP", "createStackParser", "parsers", "sortedParsers", "a", "b", "p", "stack", "skipFirst", "frames", "lines", "line", "cleanedLine", "parser", "frame", "stripSentryFramesAndReverse", "stackParserFromStackParserOptions", "stackParser", "localStack", "defaultFunctionName", "getFunctionName", "fn", "WINDOW", "getGlobalObject", "supportsFetch", "WINDOW", "isNativeFetch", "func", "supportsNativeFetch", "result", "doc", "sandbox", "err", "logger", "WINDOW", "getGlobalObject", "supportsHistory", "chrome", "isChromePackagedApp", "hasHistoryApi", "WINDOW", "getGlobalObject", "SENTRY_XHR_DATA_KEY", "handlers", "instrumented", "instrument", "type", "instrumentConsole", "instrumentDOM", "instrumentXHR", "instrumentFetch", "instrumentHistory", "instrumentError", "instrumentUnhandledRejection", "logger", "addInstrumentationHandler", "callback", "triggerHandlers", "type", "data", "handlers", "handler", "e", "logger", "getFunctionName", "instrumentConsole", "GLOBAL_OBJ", "CONSOLE_LEVELS", "level", "fill", "originalConsoleMethod", "originalConsoleMethods", "args", "log", "instrumentFetch", "supportsNativeFetch", "originalFetch", "method", "url", "parseFetchArgs", "handlerData", "response", "error", "hasProp", "obj", "prop", "getUrlFromResource", "resource", "fetchArgs", "options", "arg", "instrumentXHR", "WINDOW", "xhrproto", "originalOpen", "startTimestamp", "xhrInfo", "SENTRY_XHR_DATA_KEY", "isString", "onreadystatechangeHandler", "original", "readyStateArgs", "setRequestHeaderArgs", "header", "value", "originalSend", "sentryXhrData", "lastHref", "instrumentHistory", "supportsHistory", "oldOnPopState", "to", "from", "historyReplacementFunction", "originalHistoryFunction", "DEBOUNCE_DURATION", "debounceTimerID", "lastCapturedEventType", "lastCapturedEventTargetId", "isSimilarToLastCapturedEvent", "event", "shouldSkipDOMEvent", "eventType", "target", "getEventTarget", "makeDOMEventHandler", "globalListener", "addNonEnumerableProperty", "uuid4", "name", "instrumentDOM", "triggerDOMHandler", "globalDOMEventHandler", "proto", "originalAddEventListener", "listener", "el", "handlerForType", "originalRemoveEventListener", "_oldOnErrorHandler", "instrumentError", "msg", "line", "column", "_oldOnUnhandledRejectionHandler", "instrumentUnhandledRejection", "isBrowserBundle", "getSDKSource", "isNodeEnv", "isBrowserBundle", "dynamicRequire", "mod", "request", "memoBuilder", "hasWeakSet", "inner", "memoize", "obj", "i", "unmemoize", "normalize", "input", "depth", "maxProperties", "visit", "err", "normalizeToSize", "object", "maxSize", "normalized", "jsonSize", "key", "value", "memo", "memoBuilder", "memoize", "unmemoize", "isNaN", "stringified", "stringifyValue", "remainingDepth", "valueWithToJSON", "jsonValue", "numAdded", "visitable", "convertToPlainObject", "visitKey", "visitValue", "isVueViewModel", "isSyntheticEvent", "getFunctionName", "objName", "getConstructorName", "prototype", "utf8Length", "States", "RESOLVED", "REJECTED", "resolvedSyncPromise", "value", "SyncPromise", "resolve", "rejectedSyncPromise", "reason", "_", "reject", "executor", "e", "onfulfilled", "onrejected", "result", "val", "onfinally", "isRejected", "state", "isThenable", "cachedHandlers", "handler", "makePromiseBuffer", "limit", "buffer", "isReady", "remove", "task", "add", "taskProducer", "rejectedSyncPromise", "SentryError", "drain", "timeout", "SyncPromise", "resolve", "reject", "counter", "capturedSetTimeout", "item", "resolvedSyncPromise", "parseUrl", "url", "match", "query", "fragment", "validSeverityLevels", "severityLevelFromString", "level", "validSeverityLevels", "WINDOW", "getGlobalObject", "dateTimestampSource", "getBrowserPerformance", "performance", "timeOrigin", "getNodePerformance", "dynamicRequire", "platformPerformance", "isNodeEnv", "timestampSource", "dateTimestampInSeconds", "timestampInSeconds", "_browserPerformanceTimeOriginMode", "browserPerformanceTimeOrigin", "performance", "WINDOW", "threshold", "performanceNow", "dateNow", "timeOriginDelta", "timeOriginIsReliable", "navigationStart", "navigationStartDelta", "navigationStartIsReliable", "BAGGAGE_HEADER_NAME", "SENTRY_BAGGAGE_KEY_PREFIX", "SENTRY_BAGGAGE_KEY_PREFIX_REGEX", "MAX_BAGGAGE_STRING_LENGTH", "baggageHeaderToDynamicSamplingContext", "baggageHeader", "isString", "baggageObject", "acc", "curr", "currBaggageObject", "baggageHeaderToObject", "dynamicSamplingContext", "key", "value", "nonPrefixedKey", "dynamicSamplingContextToSentryBaggageHeader", "sentryPrefixedDSC", "dscKey", "dscValue", "objectToBaggageHeader", "baggageEntry", "keyOrValue", "object", "objectKey", "objectValue", "currentIndex", "newBaggageHeader", "logger", "TRACEPARENT_REGEXP", "extractTraceparentData", "traceparent", "matches", "parentSampled", "tracingContextFromHeaders", "sentryTrace", "baggage", "traceparentData", "dynamicSamplingContext", "baggageHeaderToDynamicSamplingContext", "traceId", "parentSpanId", "propagationContext", "uuid4", "generateSentryTraceHeader", "spanId", "sampled", "sampledString", "createEnvelope", "headers", "items", "addItemToEnvelope", "envelope", "newItem", "forEachEnvelopeItem", "callback", "envelopeItems", "envelopeItem", "envelopeItemType", "encodeUTF8", "input", "textEncoder", "serializeEnvelope", "envelope", "envHeaders", "items", "parts", "append", "next", "item", "itemHeaders", "payload", "stringifiedPayload", "normalize", "concatBuffers", "buffers", "totalLength", "acc", "buf", "merged", "offset", "buffer", "createAttachmentEnvelopeItem", "attachment", "textEncoder", "buffer", "encodeUTF8", "dropUndefinedKeys", "ITEM_TYPE_TO_DATA_CATEGORY_MAP", "envelopeItemTypeToDataCategory", "type", "getSdkMetadataForEnvelopeHeader", "metadataOrEvent", "name", "version", "createEventEnvelopeHeaders", "event", "sdkInfo", "tunnel", "dsn", "dynamicSamplingContext", "dsnToString", "createClientReportEnvelope", "discarded_events", "dsn", "timestamp", "clientReportItem", "dateTimestampInSeconds", "createEnvelope", "parseRetryAfterHeader", "header", "now", "headerDelay", "headerDate", "disabledUntil", "limits", "category", "isRateLimited", "updateRateLimits", "statusCode", "headers", "updatedRateLimits", "rateLimitHeader", "retryAfterHeader", "limit", "retryAfter", "categories", "delay", "parseStackFrames", "stackParser", "error", "exceptionFromError", "exception", "frames", "DEFAULT_ENVIRONMENT", "getGlobalEventProcessors", "getGlobalSingleton", "addGlobalEventProcessor", "callback", "notifyEventProcessors", "processors", "event", "hint", "index", "SyncPromise", "resolve", "reject", "processor", "result", "logger", "isThenable", "final", "makeSession", "context", "startingTime", "timestampInSeconds", "session", "uuid4", "sessionToJSON", "updateSession", "duration", "closeSession", "status", "dropUndefinedKeys", "DEFAULT_MAX_BREADCRUMBS", "Scope", "generatePropagationContext", "scope", "newScope", "callback", "user", "updateSession", "requestSession", "tags", "key", "value", "extras", "extra", "fingerprint", "level", "name", "context", "span", "session", "captureContext", "updatedScope", "isPlainObject", "breadcrumb", "maxBreadcrumbs", "maxCrumbs", "mergedBreadcrumb", "dateTimestampInSeconds", "breadcrumbs", "attachment", "event", "hint", "additionalEventProcessors", "transaction", "transactionName", "scopeBreadcrumbs", "notifyEventProcessors", "getGlobalEventProcessors", "newData", "arrayify", "uuid4", "API_VERSION", "DEFAULT_BREADCRUMBS", "Hub", "client", "scope", "Scope", "_version", "version", "top", "callback", "exception", "hint", "eventId", "uuid4", "syntheticException", "message", "level", "event", "breadcrumb", "beforeBreadcrumb", "maxBreadcrumbs", "mergedBreadcrumb", "dateTimestampInSeconds", "finalBreadcrumb", "consoleSandbox", "user", "tags", "extras", "key", "value", "extra", "name", "context", "oldHub", "makeMain", "integration", "logger", "customSamplingContext", "result", "endSession", "session", "closeSession", "release", "environment", "DEFAULT_ENVIRONMENT", "userAgent", "GLOBAL_OBJ", "makeSession", "currentSession", "updateSession", "options", "method", "args", "sentry", "getMainCarrier", "hub", "registry", "getHubFromCarrier", "setHubOnCarrier", "getCurrentHub", "getGlobalHub", "hasHubOnCarrier", "hasHubOnCarrier", "carrier", "getHubFromCarrier", "getGlobalSingleton", "Hub", "setHubOnCarrier", "hub", "__SENTRY__", "getActiveTransaction", "maybeHub", "getCurrentHub", "errorsInstrumented", "registerErrorInstrumentation", "addInstrumentationHandler", "errorCallback", "activeTransaction", "getActiveTransaction", "status", "logger", "SpanRecorder", "maxlen", "span", "Span", "spanContext", "uuid4", "timestampInSeconds", "name", "childSpan", "opStr", "nameStr", "idStr", "logMessage", "logger", "key", "value", "httpStatus", "spanStatus", "spanStatusfromHttpCode", "endTimestamp", "generateSentryTraceHeader", "dropUndefinedKeys", "getDynamicSamplingContextFromClient", "trace_id", "client", "scope", "options", "public_key", "user_segment", "dsc", "dropUndefinedKeys", "DEFAULT_ENVIRONMENT", "Transaction", "SpanClass", "transactionContext", "hub", "getCurrentHub", "incomingDynamicSamplingContext", "newName", "name", "source", "maxlen", "SpanRecorder", "key", "context", "value", "unit", "newMetadata", "endTimestamp", "transaction", "spanContext", "dropUndefinedKeys", "client", "scope", "dsc", "getDynamicSamplingContextFromClient", "maybeSampleRate", "logger", "finishedSpans", "prev", "current", "metadata", "TRACING_DEFAULTS", "FINISH_REASON_TAG", "IDLE_TRANSACTION_FINISH_REASONS", "IdleTransactionSpanRecorder", "SpanRecorder", "_pushActivity", "_popActivity", "transactionSpanId", "maxlen", "span", "endTimestamp", "timestampInSeconds", "IdleTransaction", "Transaction", "transactionContext", "_idleHub", "_idleTimeout", "_finalTimeout", "_heartbeatInterval", "_onScope", "logger", "scope", "callback", "spanStartedBeforeTransactionFinish", "timeoutWithMarginOfError", "spanEndedBeforeFinalTimeout", "stringifiedSpan", "pushActivity", "id", "popActivity", "restartOnChildSpanChange", "reason", "spanId", "heartbeatString", "hasTracingEnabled", "maybeOptions", "client", "getCurrentHub", "options", "sampleTransaction", "transaction", "options", "samplingContext", "hasTracingEnabled", "sampleRate", "isValidSampleRate", "logger", "rate", "isNaN", "traceHeaders", "span", "_startTransaction", "transactionContext", "customSamplingContext", "client", "options", "configInstrumenter", "transactionInstrumenter", "logger", "transaction", "Transaction", "sampleTransaction", "startIdleTransaction", "hub", "idleTimeout", "finalTimeout", "onScope", "heartbeatInterval", "IdleTransaction", "addTracingExtensions", "carrier", "getMainCarrier", "registerErrorInstrumentation", "captureException", "exception", "captureContext", "getCurrentHub", "addBreadcrumb", "breadcrumb", "getCurrentHub", "setContext", "name", "context", "withScope", "callback", "getCurrentHub", "SENTRY_API_VERSION", "getBaseApiEndpoint", "dsn", "protocol", "port", "_getIngestEndpoint", "_encodedAuth", "sdkInfo", "urlEncode", "getEnvelopeEndpointWithUrlEncodedAuth", "tunnelOrOptions", "tunnel", "enhanceEventWithSdkInfo", "event", "sdkInfo", "createSessionEnvelope", "session", "dsn", "metadata", "tunnel", "getSdkMetadataForEnvelopeHeader", "envelopeHeaders", "dsnToString", "envelopeItem", "createEnvelope", "createEventEnvelope", "eventType", "createEventEnvelopeHeaders", "installedIntegrations", "filterDuplicates", "integrations", "integrationsByName", "currentInstance", "name", "existingInstance", "k", "getIntegrationsToSetup", "options", "defaultIntegrations", "userIntegrations", "integration", "arrayify", "finalIntegrations", "debugIndex", "findIndex", "debugInstance", "setupIntegrations", "client", "integrationIndex", "setupIntegration", "addGlobalEventProcessor", "getCurrentHub", "callback", "event", "hint", "processor", "logger", "findIndex", "arr", "callback", "i", "prepareEvent", "options", "event", "hint", "scope", "client", "normalizeDepth", "normalizeMaxBreadth", "prepared", "uuid4", "dateTimestampInSeconds", "integrations", "i", "applyClientOptions", "applyIntegrationsMetadata", "applyDebugIds", "finalScope", "Scope", "result", "resolvedSyncPromise", "clientEventProcessors", "attachments", "notifyEventProcessors", "getGlobalEventProcessors", "evt", "applyDebugMeta", "normalizeEvent", "environment", "release", "dist", "maxValueLength", "DEFAULT_ENVIRONMENT", "truncate", "exception", "request", "debugIdStackParserCache", "stackParser", "debugIdMap", "GLOBAL_OBJ", "debugIdStackFramesCache", "cachedDebugIdStackFrameCache", "filenameDebugIdMap", "acc", "debugIdStackTrace", "parsedStack", "cachedParsedStack", "stackFrame", "frame", "images", "filename", "integrationNames", "depth", "maxBreadth", "normalized", "b", "normalize", "span", "ALREADY_SEEN_ERROR", "BaseClient", "options", "makeDsn", "logger", "url", "getEnvelopeEndpointWithUrlEncodedAuth", "exception", "hint", "scope", "checkOrSetAlreadyCaught", "eventId", "event", "result", "message", "level", "promisedEvent", "isPrimitive", "session", "updateSession", "timeout", "transport", "clientFinished", "transportFlushed", "resolvedSyncPromise", "eventProcessor", "forceInitialize", "setupIntegrations", "integrationId", "integration", "setupIntegration", "env", "createEventEnvelope", "attachment", "addItemToEnvelope", "createAttachmentEnvelopeItem", "promise", "sendResponse", "createSessionEnvelope", "reason", "category", "_event", "key", "hook", "callback", "rest", "crashed", "errored", "exceptions", "ex", "mechanism", "sessionNonTerminal", "SyncPromise", "resolve", "ticked", "tick", "interval", "integrations", "prepareEvent", "evt", "propagationContext", "trace_id", "spanId", "parentSpanId", "dsc", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "finalEvent", "sentryError", "sampleRate", "isTransaction", "isTransactionEvent", "isError", "isErrorEvent", "eventType", "beforeSendLabel", "rejectedSyncPromise", "SentryError", "dataCategory", "prepared", "processBeforeSend", "_validateBeforeSendResult", "processedEvent", "transactionInfo", "source", "value", "envelope", "outcomes", "beforeSendResult", "invalidValueError", "isThenable", "isPlainObject", "e", "beforeSend", "beforeSendTransaction", "initAndBind", "clientClass", "options", "logger", "hub", "getCurrentHub", "client", "DEFAULT_TRANSPORT_BUFFER_SIZE", "createTransport", "options", "makeRequest", "buffer", "makePromiseBuffer", "rateLimits", "flush", "timeout", "send", "envelope", "filteredEnvelopeItems", "forEachEnvelopeItem", "item", "type", "envelopeItemDataCategory", "envelopeItemTypeToDataCategory", "isRateLimited", "event", "getEventForEnvelopeItem", "resolvedSyncPromise", "filteredEnvelope", "createEnvelope", "recordEnvelopeLoss", "reason", "requestTask", "serializeEnvelope", "response", "logger", "updateRateLimits", "error", "result", "SentryError", "SDK_VERSION", "integrations_exports", "__export", "FunctionToString", "InboundFilters", "LinkedErrors", "originalFunctionToString", "FunctionToString", "args", "context", "getOriginalFunction", "DEFAULT_IGNORE_ERRORS", "DEFAULT_IGNORE_TRANSACTIONS", "InboundFilters", "options", "_addGlobaleventProcessor", "_getCurrentHub", "event", "_eventHint", "client", "clientOptions", "_mergeOptions", "_shouldDropEvent", "internalOptions", "_isSentryError", "logger", "getEventDescription", "_isIgnoredError", "_isIgnoredTransaction", "_isDeniedUrl", "_getEventFilterUrl", "_isAllowedUrl", "ignoreErrors", "_getPossibleEventMessages", "message", "stringMatchesSomePattern", "ignoreTransactions", "name", "denyUrls", "url", "allowUrls", "possibleMessages", "lastException", "_getLastValidUrl", "frames", "i", "frame", "DEFAULT_KEY", "DEFAULT_LIMIT", "LinkedErrors", "options", "event", "hint", "client", "applyAggregateErrorsToEvent", "exceptionFromError", "WINDOW", "GLOBAL_OBJ", "ignoreOnError", "shouldIgnoreOnError", "ignoreNextOnError", "wrap", "fn", "options", "before", "wrapper", "getOriginalFunction", "sentryWrapped", "args", "wrappedArguments", "arg", "ex", "withScope", "scope", "event", "addExceptionTypeValue", "addExceptionMechanism", "captureException", "property", "markFunctionWrapped", "addNonEnumerableProperty", "exceptionFromError", "stackParser", "ex", "frames", "parseStackFrames", "exception", "extractMessage", "eventFromPlainObject", "syntheticException", "isUnhandledRejection", "client", "getCurrentHub", "normalizeDepth", "event", "isEvent", "getNonErrorObjectExceptionValue", "normalizeToSize", "eventFromError", "stacktrace", "popSize", "getPopSize", "reactMinifiedRegexp", "message", "eventFromException", "hint", "attachStacktrace", "eventFromUnknownInput", "addExceptionMechanism", "resolvedSyncPromise", "eventFromMessage", "level", "eventFromString", "isErrorEvent", "isDOMError", "isDOMException", "domException", "name", "addExceptionTypeValue", "isError", "isPlainObject", "input", "keys", "extractExceptionKeysForMessage", "captureType", "getObjectClassName", "obj", "prototype", "createUserFeedbackEnvelope", "feedback", "metadata", "tunnel", "dsn", "headers", "dsnToString", "item", "createUserFeedbackEnvelopeItem", "createEnvelope", "BrowserClient", "BaseClient", "options", "sdkSource", "WINDOW", "getSDKSource", "SDK_VERSION", "exception", "hint", "eventFromException", "message", "level", "eventFromMessage", "feedback", "logger", "envelope", "createUserFeedbackEnvelope", "event", "scope", "outcomes", "createClientReportEnvelope", "dsnToString", "cachedFetchImpl", "getNativeFetchImplementation", "isNativeFetch", "WINDOW", "document", "fetchImpl", "sandbox", "contentWindow", "e", "logger", "clearCachedFetchImplementation", "makeFetchTransport", "options", "nativeFetch", "getNativeFetchImplementation", "pendingBodySize", "pendingCount", "makeRequest", "request", "requestSize", "requestOptions", "response", "e", "clearCachedFetchImplementation", "rejectedSyncPromise", "createTransport", "XHR_READYSTATE_DONE", "makeXHRTransport", "options", "makeRequest", "request", "SyncPromise", "resolve", "reject", "xhr", "header", "createTransport", "UNKNOWN_FUNCTION", "CHROME_PRIORITY", "WINJS_PRIORITY", "GECKO_PRIORITY", "createFrame", "filename", "func", "lineno", "colno", "frame", "chromeRegex", "chromeEvalRegex", "chrome", "line", "parts", "subMatch", "extractSafariExtensionDetails", "UNKNOWN_FUNCTION", "chromeStackLineParser", "geckoREgex", "geckoEvalRegex", "gecko", "geckoStackLineParser", "winjsRegex", "winjs", "winjsStackLineParser", "defaultStackLineParsers", "chromeStackLineParser", "geckoStackLineParser", "winjsStackLineParser", "defaultStackParser", "createStackParser", "extractSafariExtensionDetails", "func", "filename", "isSafariExtension", "isSafariWebExtension", "UNKNOWN_FUNCTION", "GlobalHandlers", "options", "_installGlobalOnErrorHandler", "_installGlobalOnUnhandledRejectionHandler", "key", "installFunc", "globalHandlerLog", "addInstrumentationHandler", "data", "hub", "stackParser", "attachStacktrace", "getHubAndOptions", "msg", "url", "line", "column", "error", "shouldIgnoreOnError", "event", "isString", "_eventFromIncompleteOnError", "_enhanceEventWithInitialFrame", "eventFromUnknownInput", "addMechanismAndCapture", "isPrimitive", "_eventFromRejectionWithPrimitive", "reason", "ERROR_TYPES_RE", "message", "isErrorEvent", "name", "groups", "e", "ev", "ev0", "ev0s", "ev0sf", "colno", "lineno", "filename", "getLocationHref", "type", "logger", "addExceptionMechanism", "getCurrentHub", "client", "DEFAULT_EVENT_TARGET", "TryCatch", "options", "fill", "WINDOW", "_wrapTimeFunction", "_wrapRAF", "_wrapXHR", "eventTargetOption", "_wrapEventTarget", "original", "args", "originalCallback", "wrap", "getFunctionName", "callback", "originalSend", "xhr", "prop", "wrapOptions", "originalFunction", "getOriginalFunction", "target", "globalObject", "proto", "eventName", "fn", "originalRemoveEventListener", "wrappedEventHandler", "originalEventHandler", "MAX_ALLOWED_STRING_LENGTH", "Breadcrumbs", "options", "addInstrumentationHandler", "_consoleBreadcrumb", "_domBreadcrumb", "_xhrBreadcrumb", "_fetchBreadcrumb", "_historyBreadcrumb", "client", "getCurrentHub", "addSentryBreadcrumb", "event", "getEventDescription", "dom", "_innerDomBreadcrumb", "handlerData", "target", "keyAttrs", "maxStringLength", "logger", "_isEvent", "htmlTreeAsString", "breadcrumb", "severityLevelFromString", "safeJoin", "startTimestamp", "endTimestamp", "sentryXhrData", "SENTRY_XHR_DATA_KEY", "method", "url", "status_code", "body", "data", "hint", "from", "to", "parsedLoc", "parseUrl", "WINDOW", "parsedFrom", "parsedTo", "DEFAULT_KEY", "DEFAULT_LIMIT", "LinkedErrors", "options", "event", "hint", "client", "applyAggregateErrorsToEvent", "exceptionFromError", "HttpContext", "event", "WINDOW", "url", "referrer", "userAgent", "headers", "request", "Dedupe", "_addGlobaleventProcessor", "_getCurrentHub", "currentEvent", "_shouldDropEvent", "logger", "previousEvent", "_isSameMessageEvent", "_isSameExceptionEvent", "currentMessage", "previousMessage", "_isSameFingerprint", "_isSameStacktrace", "previousException", "_getExceptionFromEvent", "currentException", "currentFrames", "_getFramesFromEvent", "previousFrames", "i", "frameA", "frameB", "currentFingerprint", "previousFingerprint", "event", "exception", "defaultIntegrations", "CoreIntegrations", "TryCatch", "Breadcrumbs", "GlobalHandlers", "LinkedErrors", "Dedupe", "HttpContext", "init", "options", "WINDOW", "clientOptions", "stackParserFromStackParserOptions", "defaultStackParser", "getIntegrationsToSetup", "supportsFetch", "makeFetchTransport", "makeXHRTransport", "initAndBind", "BrowserClient", "startSessionTracking", "startSessionOnHub", "hub", "startSessionTracking", "WINDOW", "logger", "getCurrentHub", "addInstrumentationHandler", "from", "to", "integrations_exports", "__export", "Breadcrumbs", "Dedupe", "GlobalHandlers", "HttpContext", "LinkedErrors", "TryCatch", "WINDOW", "GLOBAL_OBJ", "registerBackgroundTabDetection", "WINDOW", "activeTransaction", "getActiveTransaction", "statusType", "logger", "bindReporter", "callback", "metric", "reportAllChanges", "prevValue", "delta", "forceReport", "generateUniqueID", "getNavigationEntryFromPerformanceTiming", "timing", "WINDOW", "type", "navigationEntry", "key", "getNavigationEntry", "getActivationStart", "navEntry", "getNavigationEntry", "initMetric", "name", "value", "navEntry", "getNavigationEntry", "navigationType", "WINDOW", "getActivationStart", "generateUniqueID", "observe", "type", "callback", "opts", "po", "list", "onHidden", "cb", "once", "onHiddenOrPageHide", "event", "WINDOW", "onCLS", "onReport", "metric", "initMetric", "report", "sessionValue", "sessionEntries", "handleEntries", "entries", "entry", "firstSessionEntry", "lastSessionEntry", "po", "observe", "bindReporter", "stopListening", "onHidden", "firstHiddenTime", "initHiddenTime", "WINDOW", "trackChanges", "onHidden", "timeStamp", "getVisibilityWatcher", "onFID", "onReport", "visibilityWatcher", "getVisibilityWatcher", "metric", "initMetric", "report", "handleEntry", "entry", "handleEntries", "entries", "po", "observe", "bindReporter", "onHidden", "reportedMetricIDs", "onLCP", "onReport", "visibilityWatcher", "getVisibilityWatcher", "metric", "initMetric", "report", "handleEntries", "entries", "lastEntry", "value", "getActivationStart", "po", "observe", "bindReporter", "stopListening", "type", "onHidden", "handlers", "instrumented", "_previousCls", "_previousFid", "_previousLcp", "addClsInstrumentationHandler", "callback", "addMetricObserver", "instrumentCls", "addLcpInstrumentationHandler", "instrumentLcp", "addFidInstrumentationHandler", "instrumentFid", "addPerformanceInstrumentationHandler", "type", "addHandler", "instrumentPerformanceObserver", "getCleanupCallback", "triggerHandlers", "data", "typeHandlers", "handler", "e", "logger", "getFunctionName", "onCLS", "metric", "onFID", "onLCP", "instrumentFn", "previousValue", "options", "observe", "entries", "index", "isMeasurementValue", "value", "_startChild", "transaction", "startTimestamp", "ctx", "msToSec", "time", "getBrowserPerformanceAPI", "WINDOW", "_performanceCursor", "_measurements", "_lcpEntry", "_clsEntry", "startTrackingWebVitals", "performance", "browserPerformanceTimeOrigin", "fidCallback", "_trackFID", "clsCallback", "_trackCLS", "lcpCallback", "_trackLCP", "startTrackingLongTasks", "addPerformanceInstrumentationHandler", "entries", "entry", "transaction", "getActiveTransaction", "startTime", "duration", "startTrackingInteractions", "htmlTreeAsString", "addClsInstrumentationHandler", "metric", "logger", "addLcpInstrumentationHandler", "addFidInstrumentationHandler", "timeOrigin", "addPerformanceEntries", "performanceEntries", "responseStartTimestamp", "requestStartTimestamp", "_addNavigationSpans", "_addMeasureSpans", "firstHidden", "getVisibilityWatcher", "shouldRecord", "resourceName", "_addResourceSpans", "_trackNavigator", "name", "oldValue", "measurementTimestamp", "normalizedValue", "delta", "fidMark", "_startChild", "measurementName", "_tagMetricInfo", "measureStartTimestamp", "measureEndTimestamp", "event", "_addPerformanceNavigationTiming", "_addRequest", "description", "eventEnd", "end", "start", "data", "startTimestamp", "endTimestamp", "navigator", "connection", "isMeasurementValue", "source", "index", "DEFAULT_TRACE_PROPAGATION_TARGETS", "defaultRequestInstrumentationOptions", "instrumentOutgoingRequests", "_options", "traceFetch", "traceXHR", "tracePropagationTargets", "tracingOrigins", "shouldCreateSpanForRequest", "enableHTTPTimings", "shouldCreateSpan", "_", "shouldAttachHeadersWithTargets", "url", "shouldAttachHeaders", "spans", "addInstrumentationHandler", "handlerData", "createdSpan", "fetchCallback", "addHTTPTimings", "xhrCallback", "isPerformanceResourceTiming", "entry", "span", "cleanup", "addPerformanceInstrumentationHandler", "entries", "resourceTimingEntryToSpanData", "data", "extractNetworkProtocol", "nextHopProtocol", "name", "version", "_name", "char", "getAbsoluteTime", "time", "browserPerformanceTimeOrigin", "resourceTiming", "timingSpanData", "stringMatchesSomePattern", "hasTracingEnabled", "shouldCreateSpanResult", "spanId", "contentLength", "contentLengthNum", "hub", "getCurrentHub", "scope", "client", "parentSpan", "method", "request", "options", "addTracingHeadersToFetchRequest", "requestSpan", "transaction", "traceId", "sampled", "dsc", "sentryTraceHeader", "generateSentryTraceHeader", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "sentryBaggageHeader", "dynamicSamplingContextToSentryBaggageHeader", "headers", "isInstanceOf", "newHeaders", "BAGGAGE_HEADER_NAME", "existingBaggageHeader", "newBaggageHeaders", "xhr", "sentryXhrData", "SENTRY_XHR_DATA_KEY", "setHeaderOnXhr", "instrumentRoutingWithDefaults", "customStartTransaction", "startTransactionOnPageLoad", "startTransactionOnLocationChange", "WINDOW", "logger", "startingUrl", "activeTransaction", "browserPerformanceTimeOrigin", "addInstrumentationHandler", "to", "from", "BROWSER_TRACING_INTEGRATION_ID", "DEFAULT_BROWSER_TRACING_OPTIONS", "TRACING_DEFAULTS", "instrumentRoutingWithDefaults", "defaultRequestInstrumentationOptions", "BrowserTracing", "_options", "addTracingExtensions", "startTrackingWebVitals", "startTrackingLongTasks", "startTrackingInteractions", "_", "getCurrentHub", "client", "clientOptions", "instrumentRouting", "startTransactionOnLocationChange", "startTransactionOnPageLoad", "markBackgroundTransactions", "traceFetch", "traceXHR", "shouldCreateSpanForRequest", "enableHTTPTimings", "_experiments", "clientOptionsTracePropagationTargets", "tracePropagationTargets", "logger", "context", "transaction", "registerBackgroundTabDetection", "instrumentOutgoingRequests", "hub", "beforeNavigate", "idleTimeout", "finalTimeout", "heartbeatInterval", "isPageloadTransaction", "sentryTrace", "getMetaContent", "baggage", "traceparentData", "dynamicSamplingContext", "propagationContext", "tracingContextFromHeaders", "expandedContext", "modifiedContext", "finalContext", "location", "WINDOW", "idleTransaction", "startIdleTransaction", "scope", "addPerformanceEntries", "inflightInteractionTransaction", "registerInteractionTransaction", "op", "currentTransaction", "getActiveTransaction", "type", "metaName", "metaTag", "getDomElement", "windowIntegrations", "WINDOW", "INTEGRATIONS", "CoreIntegrations", "BrowserIntegrations", "_global", "hasSentryInitiated", "initiateSentry", "init", "BrowserTracing", "captureErrorInSentry", "error", "captureException", "import_react", "MESSAGE_PREFIX", "LOCAL_STORAGE_KEY", "LOG_INITIALISED", "storeLoggerState", "shouldLog", "initializeLogger", "debugMode", "log", "message", "addBreadcrumb", "logGroup", "groupName", "messagesOrObject", "transformedMessagesOrObject", "key", "value", "import_jsx_runtime", "ICON_MAP", "getIconPath", "name", "log", "Icon", "size", "className", "viewBox", "color", "style", "import_classnames", "import_jsx_runtime", "BUTTON_VARIANTS", "BUTTON_SIZES", "Button", "iconBefore", "variant", "size", "children", "className", "type", "nativeButtonProps", "classNames", "Icon", "import_jsx_runtime", "NonIdealState", "style", "children", "import_jsx_runtime", "ErrorBoundary", "React", "error", "captureErrorInSentry", "NonIdealState", "Button", "import_jsx_runtime", "FetchOfferErrorState", "height", "message", "NonIdealState", "Button", "import_jsx_runtime", "COMPONENT_CDN", "hrefToComponentStyles", "WithComponentStyles", "children", "getServicePriceMapById", "availableServices", "all", "id", "total_amount", "total_currency", "getTotalAmountForServices", "offer", "selectedServices", "seatMaps", "servicePriceMap", "getServicePriceMapById", "getTotalAmountForServicesWithPriceMap", "total", "quantity", "id", "newTotal", "getTotalAmountFromSeatMaps", "captureErrorInSentry", "serviceId", "seatMap", "cabin", "row", "section", "element", "serviceMatch", "service", "compileCreateOrderPayload", "baggageSelectedServices", "seatSelectedServices", "cfarSelectedServices", "offer", "seatMaps", "passengers", "selectedServicesWithInformation", "totalAmountWithServices", "getTotalAmountForServices", "filterServicesForPayload", "selectedServices", "quantity", "id", "convertMarkupIntoPriceFormatter", "markup", "amount", "currency", "rate", "markupAmount", "errorMessage", "createPriceFormatters", "priceFormatters", "formatters", "isBaggageService", "service", "isCancelForAnyReasonService", "service", "multipleCurrenciesErrorMessage", "label", "currencies", "formatAvailableServices", "offer", "priceFormatters", "availableServices", "foundCurrencies", "formatters", "servicesWithFormattedPrices", "service", "serviceWithFormattedPrices", "total_amount", "total_currency", "isBaggageService", "amount", "currency", "isCancelForAnyReasonService", "isSeatElement", "element", "multipleCurrenciesErrorMessage", "currencies", "formatElement", "element", "priceFormatter", "foundCurrencies", "formattedElement", "isSeatElement", "formattedServices", "service", "formattedService", "amount", "currency", "formatSeatMaps", "seatMaps", "seatMap", "formattedCabins", "cabin", "formattedRows", "row", "formattedSections", "section", "formattedElements", "hasHighLuminance", "accentColor", "rgb", "x", "isPayloadComplete", "payload", "offerIsExpired", "offer", "isErrorResponse", "response", "DUFFEL_API_URL", "COMPONENT_VERSION", "fetchFromDuffelAPI", "withClientKey", "path", "method", "body", "logGroup", "fullUrl", "error", "data", "COMPONENT_CDN", "importFromOfferFixtures", "offerId", "importFromSeatMapsFixtures", "isFixtureOfferId", "offerId", "retrieveOfferFromDuffelAPI", "offer_id", "client_key", "fetchFromDuffelAPI", "retrieveOffer", "offer_id", "client_key", "onError", "setIsLoading", "onOfferReady", "useFixture", "isFixtureOfferId", "importFromOfferFixtures", "offer", "data", "retrieveOfferFromDuffelAPI", "error", "message", "isErrorResponse", "captureErrorInSentry", "retrieveSeatMapsFromDuffelAPI", "offer_id", "client_key", "fetchFromDuffelAPI", "retrieveSeatMaps", "offer_id", "client_key", "onError", "setIsLoading", "onSeatMapReady", "useFixture", "isFixtureOfferId", "importFromSeatMapsFixtures", "seatMaps", "data", "retrieveSeatMapsFromDuffelAPI", "error", "message", "isErrorResponse", "captureErrorInSentry", "areDuffelAncillariesPropsValid", "props", "hasCommonRequiredProps", "isDuffelAncillariesPropsWithOfferIdForFixture", "isDuffelAncillariesPropsWithClientKeyAndOfferId", "isDuffelAncillariesPropsWithOfferAndSeatMaps", "isDuffelAncillariesPropsWithOfferAndClientKey", "React", "import_jsx_runtime", "AnimatedLoaderEllipsis", "import_jsx_runtime", "Stamp", "backgroundColor", "color", "children", "getCurrencyForServices", "offer", "serviceType", "firstService", "service", "getTotalQuantity", "fromSelectedServices", "total", "quantity", "checkFunctionsMap", "isBaggageService", "isCancelForAnyReasonService", "hasService", "offer", "type", "checkFunction", "service", "moneyStringFormatter", "currency", "locale", "options", "value", "numberFormatted", "withPlural", "totalQuantity", "singular", "plural", "import_react", "import_classnames", "React", "import_jsx_runtime", "Card", "buttonTitle", "title", "icon", "copy", "onClick", "children", "isLoading", "disabled", "isSelected", "hasChildren", "classNames", "Icon", "setBodyScrollability", "shouldScroll", "import_classnames", "React", "import_classnames", "import_jsx_runtime", "ICON_BUTTON_VARIANTS", "IconButton", "icon", "variant", "className", "nativeButtonProps", "classNames", "Icon", "import_jsx_runtime", "Modal", "children", "onClose", "isOpen", "setBodyScrollability", "classNames", "IconButton", "ModalBody", "tall", "noPadding", "getPassengerMapById", "passengers", "all", "passenger", "getSegmentList", "offer", "accumulator", "slice", "import_react", "getPassengerName", "createOrderPayloadPassenger", "offerPassenger", "fallbackIndex", "getBaggageServiceDescription", "metadata", "captureErrorInSentry", "hasAllDimensions", "dimensionsLabel", "weightLabel", "hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected", "selectedServices", "availableService", "selectedServiceMap", "service", "key", "getMetadataServiceUniquenessKey", "getMetadataServiceUniquenessKeyFromAvailableService", "availableServiceKey", "keys", "segmentId", "passengerId", "import_jsx_runtime", "Counter", "id", "min", "max", "value", "onChange", "IconButton", "import_jsx_runtime", "BaggageSelectionController", "passengerId", "availableService", "quantity", "onQuantityChanged", "selectedServices", "serviceName", "servicePrice", "moneyStringFormatter", "serviceDescription", "getBaggageServiceDescription", "shouldDisableController", "hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected", "Counter", "import_jsx_runtime", "IncludedBaggageBanner", "includedBaggage", "carryOnBagsQuantity", "checkedBagsQuantity", "sum", "type", "quantity", "baggageLabelStringArray", "withPlural", "import_jsx_runtime", "BaggageSelectionModalBodyPassenger", "segmentId", "passengerId", "passengerName", "includedBaggage", "passengerServicesForSegment", "selectedServices", "setSelectedServices", "hasIncludedBaggage", "sum", "bag", "IncludedBaggageBanner", "availableService", "BaggageSelectionController", "id", "newQuantity", "onBaggageQuantityChanged", "changedServiceIndex", "newSelectedServices", "quantity", "import_jsx_runtime", "BaggageSelectionModalBody", "offer", "segment", "passengersById", "selectedServices", "setSelectedServices", "ModalBody", "passenger_id", "baggages", "index", "BaggageSelectionModalBodyPassenger", "getPassengerName", "id", "type", "passenger_ids", "segment_ids", "import_jsx_runtime", "BaggageSelectionModalFooter", "selectedServices", "servicePrices", "currency", "isFirstSegment", "isLastSegment", "onNextSegmentButtonClicked", "onPreviousSegmentButtonClicked", "onClose", "totalQuantity", "getTotalQuantity", "totalAmount", "getTotalAmountForServicesWithPriceMap", "totalAmountLabel", "moneyStringFormatter", "isOneWay", "withPlural", "Button", "formatDateString", "dateString", "date", "captureErrorInSentry", "formatDate", "format", "import_jsx_runtime", "BaggageSelectionModalHeader", "segmentCount", "currentSegmentIndex", "currentSegment", "setCurrentSegmentIndex", "_", "index", "ActiveSegment", "InactiveSegment", "formatDateString", "onClick", "style", "import_jsx_runtime", "BaggageSelectionModal", "isOpen", "offer", "passengers", "onClose", "selectedServices", "currentSegmentIndex", "setCurrentSegmentIndex", "selectedServicesState", "setSelectedServicesState", "React", "segments", "getSegmentList", "currentSegment", "passengerMapById", "getPassengerMapById", "servicePricesMap", "getServicePriceMapById", "currencyToUse", "hasService", "getCurrencyForServices", "Modal", "BaggageSelectionModalHeader", "index", "BaggageSelectionModalBody", "BaggageSelectionModalFooter", "import_jsx_runtime", "BaggageSelectionCard", "isLoading", "offer", "passengers", "selectedServices", "setSelectedServices", "isOpen", "setIsOpen", "React", "containsBaggageService", "hasService", "totalQuantity", "getTotalQuantity", "isBaggageAdded", "totalAmount", "getTotalAmountForServices", "currencyToUse", "getCurrencyForServices", "totalAmountFormatted", "moneyStringFormatter", "copy", "withPlural", "Card", "Stamp", "AnimatedLoaderEllipsis", "BaggageSelectionModal", "newSelectedServices", "newSelectedServicesDeepCopy", "import_react", "import_jsx_runtime", "CfarSelectionModalBodyListItem", "children", "Icon", "import_jsx_runtime", "CfarSelectionModalBody", "offerCurrency", "service", "ModalBody", "CfarSelectionModalBodyListItem", "moneyStringFormatter", "Icon", "import_jsx_runtime", "CfarSelectionModalFooter", "service", "selectedServices", "onAddCfarService", "onRemoveCfarService", "onClose", "serviceIncluded", "id", "formattedPrice", "moneyStringFormatter", "Button", "ProtectedTripBanner", "Icon", "import_jsx_runtime", "CfarSelectionModalHeader", "import_jsx_runtime", "CfarSelectionModal", "isOpen", "offerCurrency", "service", "onClose", "selectedServices", "Modal", "CfarSelectionModalHeader", "CfarSelectionModalBody", "CfarSelectionModalFooter", "import_jsx_runtime", "CfarSelectionCard", "isLoading", "offer", "selectedServices", "setSelectedServices", "isOpen", "setIsOpen", "React", "containsCfarService", "hasService", "isCfarAdded", "getTotalQuantity", "currencyToUse", "getCurrencyForServices", "totalAmount", "getTotalAmountForServices", "totalAmountFormatted", "moneyStringFormatter", "cfarService", "isCancelForAnyReasonService", "copy", "Card", "Stamp", "AnimatedLoaderEllipsis", "CfarSelectionModal", "newSelectedServices", "getFirstSeatElementMatchingCriteria", "seatMaps", "matcher", "seatMap", "cabin", "row", "section", "element", "getCurrencyForSeatMaps", "seatMaps", "getFirstSeatElementMatchingCriteria", "element", "hasAvailableSeatService", "seatMaps", "seatMap", "cabin", "rows", "section", "element", "import_react", "getPassengerBySegmentList", "segments", "segment", "passenger", "passengerIndex", "import_react", "getCabinsForSegmentAndDeck", "forDeck", "seatMap", "cabin", "getSymbols", "cabins", "results", "cabin", "row", "section", "element", "hasWings", "cabin", "rowIndex", "import_classnames", "React", "import_classnames", "import_jsx_runtime", "Tabs", "value", "onChange", "options", "option", "classNames", "import_jsx_runtime", "DeckSelect", "value", "setValue", "options", "Tabs", "item", "import_jsx_runtime", "Legend", "symbols", "Icon", "symbol", "getRowNumber", "row", "seats", "section", "acc", "val", "element", "import_classnames", "React", "import_classnames", "import_jsx_runtime", "amenitiesWithoutWrapper", "Amenity", "type", "classNames", "Icon", "import_jsx_runtime", "EmptyElement", "import_classnames", "import_jsx_runtime", "ExitElement", "isRight", "classNames", "Icon", "getPassengerInitials", "passengerName", "partOfTheName", "import_classnames", "import_jsx_runtime", "SeatInfo", "seat", "service", "price", "moneyStringFormatter", "disclosure", "index", "import_jsx_runtime", "SeatUnavailable", "seat", "Icon", "import_jsx_runtime", "SeatElement", "element", "currentPassengerId", "currentSegmentId", "currentPassengerName", "onSeatToggled", "selectedServicesMap", "seatServiceFromElement", "service", "SeatUnavailable", "selectedServiceFromMap", "isSeatSelected", "seatLabel", "getPassengerInitials", "isFeePayable", "isSeatSelectionAvaiable", "isActionable", "seatClassName", "classNames", "priceLabel", "moneyStringFormatter", "isSeatInfoDisplayed", "Icon", "SeatInfo", "import_jsx_runtime", "Element", "element", "elementIndex", "sectionIndex", "onSeatToggled", "selectedServicesMap", "currentPassengerId", "currentSegmentId", "currentPassengerName", "isSeatElement", "SeatElement", "EmptyElement", "ExitElement", "Amenity", "import_jsx_runtime", "RowSection", "row", "rowNumber", "hasWings", "section", "sectionIndex", "onSeatToggled", "selectedServicesMap", "currentPassengerId", "currentPassengerName", "currentSegmentId", "rowLength", "isOneSectionRow", "classNames", "element", "elementIndex", "Element", "EmptyElement", "import_jsx_runtime", "Row", "row", "hasWings", "onSeatToggled", "selectedServicesMap", "currentPassengerId", "currentPassengerName", "currentSegmentId", "rowNumber", "getRowNumber", "section", "sectionIndex", "RowSection", "import_jsx_runtime", "SeatMapUnavailable", "NonIdealState", "import_jsx_runtime", "SeatMap", "seatMap", "onSeatToggled", "selectedServicesMap", "currentPassengerId", "currentPassengerName", "currentSegmentId", "selectedDeck", "setSelectedDeck", "SeatMapUnavailable", "cabins", "getCabinsForSegmentAndDeck", "hasMultipleDecks", "anyHasWings", "cabin", "symbols", "getSymbols", "classNames", "DeckSelect", "value", "Legend", "cabinIndex", "row", "rowIndex", "Row", "hasWings", "import_jsx_runtime", "SeatSelectionModalBody", "props", "ModalBody", "SeatMap", "import_jsx_runtime", "SeatSelectionModalFooter", "selectedServices", "servicePrices", "currency", "isFirstSegment", "isLastSegment", "onNextSegmentButtonClicked", "onPreviousSegmentButtonClicked", "onClose", "seatMaps", "totalQuantity", "getTotalQuantity", "totalAmount", "getTotalAmountForServicesWithPriceMap", "totalAmountLabel", "moneyStringFormatter", "isOneWay", "withPlural", "Button", "import_jsx_runtime", "SeatSelectionModalHeader", "segmentAndPassengerPermutationsCount", "currentSegmentAndPassengerPermutationsIndex", "currentSegment", "currentPassengerName", "setCurrentSegmentAndPassengerPermutationsIndex", "_", "index", "ActiveSegment", "InactiveSegment", "formatDateString", "onClick", "style", "import_jsx_runtime", "SeatSelectionModal", "isOpen", "offer", "passengers", "seatMaps", "selectedServices", "onClose", "currentPermutationIndex", "setCurrentPermutationIndex", "React", "selectedServicesState", "setSelectedServicesState", "selectedServicesStateMap", "all", "service", "segments", "getSegmentList", "passengerMapById", "getPassengerMapById", "servicePricesMap", "getServicePriceMapById", "segmentAndPassengerPermutations", "getPassengerBySegmentList", "currentPassengerId", "currentPassengerIndex", "currentSegmentId", "currentSegment", "id", "currentPassenger", "currentSeatMap", "seatMap", "currentPassengerName", "getPassengerName", "onSeatToggle", "seatServiceToToggle", "newSeatServices", "selectedServiceFromState", "hasClickedSeatToToggleOff", "isSelectedServiceFromStateForTheSameSegmentAndPassengerPermutation", "currencyToUse", "getCurrencyForSeatMaps", "Modal", "SeatSelectionModalHeader", "SeatSelectionModalBody", "SeatSelectionModalFooter", "import_jsx_runtime", "SeatSelectionCard", "isLoading", "offer", "seatMaps", "passengers", "selectedServices", "setSelectedServices", "isOpen", "setIsOpen", "React", "containsSeatService", "hasAvailableSeatService", "totalQuantity", "getTotalQuantity", "areSeatsAdded", "totalAmount", "getTotalAmountForServices", "currencyToUse", "getCurrencyForSeatMaps", "totalAmountFormatted", "moneyStringFormatter", "copy", "withPlural", "Card", "Stamp", "AnimatedLoaderEllipsis", "SeatSelectionModal", "services", "import_jsx_runtime", "DuffelAncillaries", "props", "initializeLogger", "logGroup", "areDuffelAncillariesPropsValid", "isPropsWithOfferIdForFixture", "isDuffelAncillariesPropsWithOfferIdForFixture", "isPropsWithClientKeyAndOfferId", "isDuffelAncillariesPropsWithClientKeyAndOfferId", "isPropsWithOfferAndSeatMaps", "isDuffelAncillariesPropsWithOfferAndSeatMaps", "isPropsWithOfferAndClientKey", "isDuffelAncillariesPropsWithOfferAndClientKey", "shouldRetrieveSeatMaps", "passengers", "setPassengers", "offer", "setOffer", "isOfferLoading", "setIsOfferLoading", "seatMaps", "setSeatMaps", "isSeatMapLoading", "setIsSeatMapLoading", "error", "setError", "baggageSelectedServices", "setBaggageSelectedServices", "seatSelectedServices", "setSeatSelectedServices", "cfarSelectedServices", "setCfarSelectedServices", "priceFormatters", "createPriceFormatters", "updateOffer", "expiryErrorMessage", "offerIsExpired", "msUntilExpiry", "milisecondsInOneDay", "offerWithFormattedServices", "formatAvailableServices", "updateSeatMaps", "formattedSeatMaps", "formatSeatMaps", "setContext", "retrieveOffer", "passenger", "index", "retrieveSeatMaps", "createOrderPayload", "compileCreateOrderPayload", "isPayloadComplete", "metadata", "nonIdealStateHeight", "duffelComponentsStyle", "hasHighLuminance", "WithComponentStyles", "ErrorBoundary", "FetchOfferErrorState", "ancillaryName", "BaggageSelectionCard", "SeatSelectionCard", "CfarSelectionCard", "import_react_stripe_js", "V3_URL", "V3_URL_REGEX", "EXISTING_SCRIPT_MESSAGE", "findScript", "scripts", "i", "script", "injectScript", "params", "queryString", "headOrBody", "registerWrapper", "stripe", "startTime", "stripePromise", "loadScript", "resolve", "reject", "error", "initStripe", "maybeStripe", "args", "stripePromise$1", "loadCalled", "err", "loadStripe", "_len", "_key", "React", "import_jsx_runtime", "STRIPE_CARD_ELEMENT", "COMPONENT_VERSION", "CARD_ELEMENT_STYLE_BASE", "CARD_ELEMENT_STYLE_INVALID", "CardPaymentComponent", "styles", "paymentIntentClientToken", "onSuccessfulPayment", "onFailedPayment", "cardElement", "setCardElement", "isComplete", "setIsComplete", "isInvalid", "setIsInvalid", "isProcessing", "setIsProcessing", "errorMessage", "setErrorMessage", "stripe", "elements", "maybeCard", "event", "error", "complete", "e", "decodedDuffelPaymentIntentClientToken", "parsedDuffelPaymentIntentClientToken", "clientSecret", "result", "Button", "DuffelPayments", "props", "setStripe", "initializeLogger", "duffelPublishableKey", "loadStripe", "duffelComponentsStyle", "hasHighLuminance", "WithComponentStyles", "ErrorBoundary", "import_classnames", "import_jsx_runtime", "HSpace", "className", "space", "alignCenter", "spaceBetween", "divProps", "classNames", "import_jsx_runtime", "StaysRating", "rating", "small", "WithComponentStyles", "HSpace", "_", "index", "Icon", "LOYALTY_PROGRAMS_NAME_MAP", "SOURCE_NAME_MAP", "getBoardTypeLabel", "boardType", "boardTypeIcon", "import_classnames", "import_jsx_runtime", "VSpace", "className", "space", "divProps", "classNames", "isValidDateString", "date", "getDateObject", "fromISO", "isValidDateString", "formats", "getDateString", "original", "format", "locale", "date", "getDateObject", "import_jsx_runtime", "StaysSummary", "accommodation", "checkInDate", "checkOutDate", "numRooms", "supportedLoyaltyProgramme", "loyaltyProgrammeAccountNumber", "accommodationSpecialRequests", "children", "WithComponentStyles", "VSpace", "HSpace", "Icon", "StaysRating", "boardTypeIcon", "getBoardTypeLabel", "getDateString", "LOYALTY_PROGRAMS_NAME_MAP", "import_jsx_runtime", "amenityIcon", "type", "StaysAmenities", "amenities", "hrefToComponentStyles", "amenity", "HSpace", "Icon", "import_classnames", "getRateLabel", "paymentMethod", "paymentType", "import_classnames", "import_jsx_runtime", "RadioButton", "value", "checked", "className", "inputId", "HSpace", "classNames", "Icon", "import_jsx_runtime", "StaysRoomRateCard", "numberOfNights", "searchNumberOfRooms", "rate", "selected", "onSelectRate", "hidePaymentMethod", "hideSource", "earliestCancellation", "quantityOfRoomsAvailable", "WithComponentStyles", "classNames", "VSpace", "HSpace", "StayResultRoomRateItem", "boardTypeIcon", "getBoardTypeLabel", "getDateString", "moneyStringFormatter", "paymentMethod", "getRateLabel", "LOYALTY_PROGRAMS_NAME_MAP", "SOURCE_NAME_MAP", "withPlural", "RadioButton", "icon", "label", "Icon", "import_classnames", "React", "React", "import_jsx_runtime", "hasManualOverride", "getFallbackLogoUrl", "iataCode", "getSrcForIataCode", "airlineName", "captureErrorInSentry", "AirlineLogo", "name", "size", "src", "setSrc", "import_classnames", "import_react", "import_jsx_runtime", "FilterControl", "target", "children", "disabled", "popoverWidth", "popoverMaxHeigh", "targetWidth", "isPopoverOpen", "setIsPopoverOpen", "React", "closePopover", "Icon", "FilterControlOption", "className", "isSelected", "onClick", "onKeyDown", "onDoubleClick", "classNames", "import_jsx_runtime", "isOptionSelected", "airline", "selectedAirlines", "selectedAirline", "getSelectLabel", "selected", "options", "iata_code", "removeFromSelected", "option", "addToSelected", "AirlineSelector", "onChange", "disabled", "targetLabel", "FilterControl", "onClose", "index", "isSelected", "Option", "newState", "e", "name", "onClick", "onKeyDown", "onDoubleClick", "FilterControlOption", "AirlineLogo", "import_jsx_runtime", "OPTIONS", "getLabel", "stopsOption", "StopsSelector", "selected", "onChange", "FilterControl", "onClose", "option", "index", "FilterControlOption", "e", "_typeof", "o", "toPrimitive", "t", "r", "_typeof", "e", "i", "toPropertyKey", "t", "i", "toPrimitive", "_typeof", "_defineProperty", "obj", "key", "value", "toPropertyKey", "ownKeys", "r", "t", "o", "_objectSpread2", "_defineProperty", "_arrayLikeToArray", "arr", "len", "i", "arr2", "_arrayWithoutHoles", "arr", "_arrayLikeToArray", "_iterableToArray", "iter", "_unsupportedIterableToArray", "o", "minLen", "_arrayLikeToArray", "n", "_nonIterableSpread", "_toConsumableArray", "arr", "_arrayWithoutHoles", "_iterableToArray", "_unsupportedIterableToArray", "_nonIterableSpread", "_arrayWithHoles", "arr", "_iterableToArrayLimit", "r", "l", "t", "e", "n", "i", "u", "a", "f", "o", "_nonIterableRest", "_slicedToArray", "arr", "i", "_arrayWithHoles", "_iterableToArrayLimit", "_unsupportedIterableToArray", "_nonIterableRest", "import_classnames", "React", "useEvent", "callback", "fnRef", "memoFn", "_fnRef$current", "_len", "args", "_key", "React", "canUseDom", "useInternalLayoutEffect", "canUseDom", "useLayoutEffect", "callback", "deps", "firstMountRef", "useLayoutUpdateEffect", "firstMount", "React", "useSafeState", "defaultValue", "destroyRef", "_React$useState", "_React$useState2", "_slicedToArray", "value", "setValue", "safeSetState", "updater", "ignoreDestroy", "hasValue", "value", "useMergedState", "defaultStateValue", "option", "_ref", "defaultValue", "onChange", "postState", "_useState", "useSafeState", "_useState2", "_slicedToArray", "innerValue", "setInnerValue", "mergedValue", "postMergedValue", "onChangeFn", "useEvent", "_useState3", "_useState4", "prevValue", "setPrevValue", "useLayoutUpdateEffect", "prev", "triggerChange", "updater", "ignoreDestroy", "warned", "preWarningFns", "preMessage", "fn", "warning", "valid", "message", "finalMessage", "note", "resetWarned", "call", "method", "warningOnce", "noteOnce", "warning_default", "isEqual", "obj1", "obj2", "shallow", "refSet", "deepEqual", "b", "level", "circular", "warning_default", "newLevel", "i", "_typeof", "keys", "key", "isEqual_default", "React", "_extends", "target", "i", "source", "key", "_objectWithoutPropertiesLoose", "source", "excluded", "target", "sourceKeys", "key", "i", "_objectWithoutProperties", "source", "excluded", "target", "_objectWithoutPropertiesLoose", "key", "i", "sourceSymbolKeys", "React", "getOffset", "value", "min", "max", "getDirectionStyle", "direction", "offset", "positionStyle", "getIndex", "index", "import_classnames", "KeyCode", "e", "keyCode", "KeyCode_default", "React", "React", "SliderContext", "context_default", "_excluded", "Handle", "props", "ref", "prefixCls", "value", "valueIndex", "onStartMove", "style", "render", "dragging", "onOffsetChange", "onChangeComplete", "onFocus", "onMouseEnter", "restProps", "_objectWithoutProperties", "_React$useContext", "context_default", "min", "max", "direction", "disabled", "keyboard", "range", "tabIndex", "ariaLabelForHandle", "ariaLabelledByForHandle", "ariaValueTextFormatterForHandle", "styles", "classNames", "handlePrefixCls", "onInternalStartMove", "e", "onInternalFocus", "onInternalMouseEnter", "onKeyDown", "offset", "KeyCode_default", "handleKeyUp", "positionStyle", "getDirectionStyle", "divProps", "_getIndex", "getIndex", "handleNode", "_extends", "cls", "_defineProperty", "_objectSpread2", "Handle_default", "_excluded", "Handles", "props", "ref", "prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus", "restProps", "_objectWithoutProperties", "handlesRef", "index", "_handlesRef$current$i", "_React$useState", "_React$useState2", "_slicedToArray", "activeIndex", "setActiveIndex", "onHandleFocus", "e", "onHandleMouseEnter", "handleProps", "_objectSpread2", "value", "Handle_default", "_extends", "node", "getIndex", "Handles_default", "React", "import_classnames", "React", "Mark", "props", "prefixCls", "style", "children", "value", "_onClick", "_React$useContext", "context_default", "min", "max", "direction", "includedStart", "includedEnd", "included", "textCls", "positionStyle", "getDirectionStyle", "classNames", "_defineProperty", "_objectSpread2", "e", "Mark_default", "Marks", "props", "prefixCls", "marks", "onClick", "markPrefixCls", "_ref", "value", "style", "label", "Mark_default", "Marks_default", "React", "import_classnames", "React", "Dot", "props", "prefixCls", "value", "style", "activeStyle", "_React$useContext", "context_default", "min", "max", "direction", "included", "includedStart", "includedEnd", "dotClassName", "active", "mergedStyle", "_objectSpread2", "getDirectionStyle", "classNames", "_defineProperty", "Dot_default", "Steps", "props", "prefixCls", "marks", "dots", "style", "activeStyle", "_React$useContext", "context_default", "min", "max", "step", "stepDots", "dotSet", "mark", "current", "dotValue", "Dot_default", "Steps_default", "import_classnames", "React", "import_classnames", "React", "Track", "props", "prefixCls", "style", "start", "end", "index", "onStartMove", "replaceCls", "_React$useContext", "context_default", "direction", "min", "max", "disabled", "range", "classNames", "trackPrefixCls", "offsetStart", "getOffset", "offsetEnd", "onInternalStartMove", "e", "positionStyle", "className", "cls", "_defineProperty", "_objectSpread2", "Track_default", "Tracks", "props", "prefixCls", "style", "values", "startPoint", "onStartMove", "_React$useContext", "context_default", "included", "range", "min", "styles", "classNames", "trackList", "startValue", "endValue", "list", "i", "tracksNode", "Track_default", "cls", "_ref", "index", "start", "end", "_objectSpread2", "getIndex", "Tracks_default", "import_react", "import_react_is", "React", "React", "getPosition", "obj", "useDrag", "containerRef", "direction", "rawValues", "min", "max", "formatValue", "triggerChange", "finishChange", "offsetValues", "_React$useState", "_React$useState2", "_slicedToArray", "draggingValue", "setDraggingValue", "_React$useState3", "_React$useState4", "draggingIndex", "setDraggingIndex", "_React$useState5", "_React$useState6", "cacheValues", "setCacheValues", "_React$useState7", "_React$useState8", "originValues", "setOriginValues", "mouseMoveEventRef", "mouseUpEventRef", "flushValues", "nextValues", "nextValue", "val", "i", "updateCacheValue", "useEvent", "valueIndex", "offsetPercent", "startValue", "endValue", "maxStartOffset", "maxEndOffset", "offset", "formatStartValue", "cloneCacheValues", "offsetDist", "cloneValues", "_toConsumableArray", "next", "onStartMove", "e", "startValues", "initialValues", "originValue", "_getPosition", "startX", "startY", "onMouseMove", "event", "_getPosition2", "moveX", "moveY", "offsetX", "offsetY", "_containerRef$current", "width", "height", "offSetPercent", "onMouseUp", "returnValues", "sourceValues", "a", "b", "targetValues", "index", "useDrag_default", "React", "useOffset", "min", "max", "step", "markList", "allowCross", "pushable", "formatRangeValue", "val", "formatStepValue", "stepValue", "getDecimal", "num", "maxDecimal", "fixedValue", "formatValue", "formatNextValue", "alignValues", "mark", "closeValue", "closeDist", "alignValue", "dist", "offsetValue", "values", "offset", "valueIndex", "mode", "nextValue", "originValue", "targetDistValue", "potentialValues", "sign", "compareValue", "valueDist", "potentialValue", "cloneValues", "_toConsumableArray", "offsetChangedValue", "needPush", "offsetValues", "nextValues", "pushNum", "i", "changed", "_offsetChangedValue", "_i", "_changed", "_offsetChangedValue2", "_i2", "_changed2", "_offsetChangedValue3", "_i3", "_changed3", "_offsetChangedValue4", "Slider", "props", "ref", "_props$prefixCls", "prefixCls", "className", "style", "classNames", "styles", "_props$disabled", "disabled", "_props$keyboard", "keyboard", "autoFocus", "onFocus", "onBlur", "_props$min", "min", "_props$max", "max", "_props$step", "step", "value", "defaultValue", "range", "count", "onChange", "onBeforeChange", "onAfterChange", "onChangeComplete", "_props$allowCross", "allowCross", "_props$pushable", "pushable", "draggableTrack", "reverse", "vertical", "_props$included", "included", "startPoint", "trackStyle", "handleStyle", "railStyle", "dotStyle", "activeDotStyle", "marks", "dots", "handleRender", "activeHandleRender", "_props$tabIndex", "tabIndex", "ariaLabelForHandle", "ariaLabelledByForHandle", "ariaValueTextFormatterForHandle", "handlesRef", "containerRef", "direction", "mergedMin", "mergedMax", "mergedStep", "mergedPush", "markList", "key", "mark", "markObj", "_typeof", "_ref", "label", "a", "b", "_useOffset", "useOffset", "_useOffset2", "_slicedToArray", "formatValue", "offsetValues", "_useMergedState", "useMergedState", "_useMergedState2", "mergedValue", "setValue", "rawValues", "valueList", "_valueList", "_valueList$", "val0", "returnValues", "_toConsumableArray", "pointCount", "_returnValues", "val", "index", "rawValuesRef", "getTriggerValue", "triggerValues", "triggerChange", "nextValues", "cloneNextValues", "isEqual_default", "finishChange", "finishValue", "warning_default", "_useDrag", "useDrag_default", "_useDrag2", "draggingIndex", "draggingValue", "cacheValues", "onStartDrag", "changeToCloseValue", "newValue", "e", "valueIndex", "valueDist", "dist", "_document$activeEleme", "_document$activeEleme2", "onSliderMouseDown", "_containerRef$current", "width", "height", "left", "top", "bottom", "right", "clientX", "clientY", "percent", "nextValue", "_React$useState", "_React$useState2", "keyboardValue", "setKeyboardValue", "onHandleOffsetChange", "offset", "next", "mergedDraggableTrack", "onStartMove", "dragging", "sortedCacheValues", "_React$useMemo", "_React$useMemo2", "includedStart", "includedEnd", "_containerRef$current2", "_document", "activeElement", "context", "context_default", "cls", "_defineProperty", "_objectSpread2", "Tracks_default", "Steps_default", "Handles_default", "Marks_default", "Slider_default", "es_default", "Slider_default", "import_jsx_runtime", "targetLabelConectors", "getTargetLabel", "selectedRange", "departureStart", "departureEnd", "isDepartureChanged", "arrivalStart", "arrivalEnd", "isArrivalChanged", "getSliderLabel", "sliderMarks", "marks", "minutes", "transformMinutesToTimeString", "prefix", "range", "connectors", "start", "end", "hours", "mins", "hoursString", "minsString", "TimeRangeSelector", "selected", "onChange", "FilterControl", "es_default", "value", "import_jsx_runtime", "FilterControls", "selectedOwner", "airlines", "airlinesFilter", "setAirlinesFilter", "timesFilter", "setTimesFilter", "stopsFilter", "setStopsFilter", "AirlineSelector", "StopsSelector", "TimeRangeSelector", "import_jsx_runtime", "SliceCarriersTitle", "slice", "marketingCarriers", "marketing_carrier", "operatingCarriers", "operating_carrier", "firstMarketingCarrier", "marketingCarrierNamesSet", "name", "operatingCarrierNamesSet", "marketingCarriersLabel", "operatingCarriersLabel", "isPartialOperarion", "HSpace", "AirlineLogo", "segment", "getSegmentCarriersTitle", "marketingCarrier", "operatingCarrier", "isOperatedByMarketingCarrier", "import_classnames", "React", "NGS_SHELVES", "NGS_SHELF_INFO", "deduplicateMappedOffersByFareBrand", "offersMap", "sliceKey", "row", "deduplicatedRow", "NGS_SHELVES", "shelf", "groupByFareBrandName", "offers", "getCheapestOffer", "getFareBrandNameForOffer", "offer", "sliceIndex", "cabinClasses", "segment", "passenger", "c", "groupedResult", "previous", "current", "key", "getNGSSliceKey", "slice", "ownerId", "includeFareBrand", "flightNumbers", "segment", "filterOffersThatMatchCurrentSlice", "offers", "previousSliceKeys", "filteredOffers", "offer", "match", "index", "sliceKey", "groupOffersForNGSView", "sliceIndex", "offersMap", "deduplicateMappedOffersByFareBrand", "iso8601DurationRegex", "isISO8601Duration", "durationString", "convertDurationToString", "duration", "matches", "isISO8601Duration", "daysString", "hoursString", "minutesString", "getTimeString", "original", "locale", "date", "import_classnames", "import_react", "import_jsx_runtime", "SliceSummary", "slice", "firstSegment", "lastSegment", "segmentsAndStops", "segment", "index", "stops", "stop", "SliceSummaryTimeAndPlace", "getTimeString", "SliceStopsAndDurationOverview", "convertDurationToString", "Icon", "time", "place", "alignment", "classNames", "duration", "_value", "all", "React", "withPlural", "MS", "MS_PER_MINUTE", "MS_PER_HOUR", "MS_PER_DAY", "getDurationString", "start", "end", "format", "startDate", "prefix", "endDate", "temp", "diff", "days", "hours", "minutes", "daysString", "hoursString", "minutesString", "suffix", "import_classnames", "import_jsx_runtime", "OfferSlice", "slice", "firstSegment", "lastSegment", "startDate", "getDateString", "endDate", "endsOnDifferentDate", "OfferSliceRow", "segment", "index", "isLast", "getTimeString", "convertDurationToString", "getSegmentCarriersTitle", "withPlural", "stop", "getDurationString", "time", "icon", "withGreyBackground", "compact", "dottedLine", "compactCallout", "children", "classNames", "Icon", "import_jsx_runtime", "OfferSliceModal", "slice", "modalProps", "Modal", "ModalBody", "VSpace", "SliceCarriersTitle", "SliceSummary", "OfferSlice", "import_classnames", "import_jsx_runtime", "NGSShelfInfoCard", "ngs_shelf", "className", "shelfInfo", "NGS_SHELF_INFO", "classNames", "Icon", "import_classnames", "doesSliceHaveMixedCabins", "slice", "cabinMarketingNames", "segment", "doOffersHaveMixedCabin", "offer", "sliceIndex", "getBaggagesQuantity", "baggages", "type", "baggage", "quantity", "getMaxBaggagesForOfferSlice", "offerSlice", "maxBaggages", "maxBaggagesQuantity", "segment", "passenger", "import_jsx_runtime", "NGSSliceFareCard", "offer", "sliceIndex", "onSelect", "className", "slice", "shelfInfo", "NGS_SHELF_INFO", "brandName", "getFareBrandNameForOffer", "changeBeforeDepartureCondition", "refundBeforeDepartureCondition", "checkedBagItems", "getMaxBaggagesForOfferSlice", "carryOnBagItems", "classNames", "doesSliceHaveMixedCabins", "Icon", "segment", "index", "moneyStringFormatter", "Button", "getCheapestOfferAmount", "offers", "offer", "sortNGSRowsByShelfPrice", "rows", "sortShelf", "sortDirection", "a", "b", "aAmount", "bAmount", "import_jsx_runtime", "NGSTable", "offers", "sliceIndex", "onSelect", "previousSliceKeys", "sortingFunction", "selectedColumn", "setSelectedColumn", "expandedOffer", "setExpandedOffer", "isOfferSliceModalOpen", "setIsOfferSliceModalOpen", "offerSliceModalSlice", "setOfferSliceModalSlice", "rows", "groupOffersForNGSView", "sortedRows", "NonIdealState", "tripType", "NGS_SHELVES", "shelf", "classNames", "Icon", "NGS_SHELF_INFO", "NGSShelfInfoCard", "row", "index", "SliceCarriersTitle", "SliceSummary", "getFareBrandNameForOffer", "getCheapestOffer", "moneyStringFormatter", "getCheapestOfferAmount", "doOffersHaveMixedCabin", "offer", "NGSSliceFareCard", "getNGSSliceKey", "OfferSliceModal", "import_duration_fns", "sortNGSRowsByDuration", "rows", "sortDirection", "aRow", "bRow", "aParsedDuration", "bParsedDuration", "aDurationInMinutes", "bDurationInMinutes", "import_react", "filterResults", "offers", "currentSliceIndex", "filters", "offer", "currentOfferSlice", "isMatchOnAirlines", "isMatchOnStops", "isMatchOnTimes", "isTrue", "airlines", "airline", "stops", "sliceStops", "stopCount", "segment", "times", "firstSegment", "lastSegment", "sliceDepartureTime", "sliceArrivalTime", "departureRangeStart", "departureRangeEnd", "arrivalRangeStart", "arrivalRangeEnd", "sliceDepartureTimeInMinutes", "transformDateToMinutes", "sliceArrivalTimeInMinutes", "date", "getAirlines", "offerRequest", "airlines", "insertedAirlines", "offer", "owner", "a", "b", "getInitialFilterValues", "offerRequest", "getAirlines", "useFilters", "offerRequest", "selectedSliceKeys", "initialFilterValues", "getInitialFilterValues", "airlinesFilter", "setAirlinesFilter", "timesFilter", "setTimesFilter", "stopsFilter", "setStopsFilter", "clearFilters", "filteredOffers", "filterResults", "import_jsx_runtime", "OPTIONS", "OPTION_KEYS", "getLabel", "stopsOption", "SortingControl", "selected", "onChange", "FilterControl", "onClose", "option", "index", "FilterControlOption", "e", "import_duration_fns", "getAmountForRecommendedSort", "row", "getCheapestOfferAmount", "sortNGSRowsByRecommended", "rows", "aRow", "bRow", "aParsedDuration", "bParsedDuration", "aDurationInMinutes", "bDurationInMinutes", "aCheapestOfferAmount", "bCheapestOfferAmount", "aProduct", "bProduct", "import_jsx_runtime", "getSortShelfAndDirection", "sortOption", "shelf", "direction", "getDurationSortDirection", "useSort", "setSortOption", "sortingFunction", "rows", "sortNGSRowsByRecommended", "sortNGSRowsByDuration", "sortNGSRowsByShelfPrice", "DuffelNGSView", "offerRequest", "onSelect", "selectedSliceKeys", "setSelectedSliceKeys", "selectedOwner", "setSelectedOwner", "selectedColumn", "setSelectedColumn", "airlinesFilterOptions", "airlinesFilter", "timesFilter", "stopsFilter", "setAirlinesFilter", "setTimesFilter", "setStopsFilter", "clearFilters", "filteredOffers", "useFilters", "numSlices", "currentSlice", "NonIdealState", "WithComponentStyles", "slice", "index", "classNames", "newSliceKeys", "Icon", "getDateString", "FilterControls", "SortingControl", "sortingOption", "NGSTable", "offerId", "sliceKey", "offer", "React", "getIFrameEventListener", "iFrameURL", "postMessageWithStyles", "setIFrameHeight", "onValidateSuccess", "onValidateFailure", "onCreateCardForTemporaryUseSuccess", "onCreateCardForTemporaryUseFailure", "onSaveCardSuccess", "onSaveCardFailure", "onSecurityPolicyViolation", "event", "eventType", "getIFrameOriginForEnvironment", "tokenProxyEnvironment", "origin", "getPathnameForIntent", "intent", "getTokenFromClientKey", "clientKey", "payloadString", "getIframeURL", "tokenProxyEnvironment", "intent", "clientKey", "savedCardData", "iFrameOrigin", "getIFrameOriginForEnvironment", "iframeURL", "getPathnameForIntent", "getTokenFromClientKey", "postMessageToCreateCardForTemporaryUse", "iFrameReference", "baseUrl", "iFrame", "postMessageToSaveCard", "iFrameReference", "baseUrl", "iFrame", "postMessageWithStyles", "iFrameReference", "baseUrl", "styles", "iFrame", "import_jsx_runtime", "DuffelCardForm", "tokenProxyEnvironment", "clientKey", "styles", "intent", "savedCardData", "onValidateSuccess", "onValidateFailure", "onCreateCardForTemporaryUseSuccess", "onCreateCardForTemporaryUseFailure", "onSaveCardSuccess", "onSaveCardFailure", "onSecurityPolicyViolation", "ref", "postMessageToSaveCard", "iFrameReference", "iFrameURL", "postMessageToCreateCardForTemporaryUse", "iFrameHeight", "setIFrameHeight", "getIframeURL", "iFrameEventListener", "getIFrameEventListener", "postMessageWithStyles", "import_react", "useDuffelCardFormActions", "ref", "React", "getAPIHeaders", "clientKey", "createClient", "duffelUrl", "create3DSSessionInDuffelAPI", "data", "response", "responseData", "refresh3DSSessionInDuffelAPI", "sessionID", "isFirstAttempt", "initEvervault", "sessionID", "teamID", "appID", "threeDSecure", "SCRIPT_ID", "loadEvervaultScript", "resolve", "script", "DEFAULT_ENVIRONMENT_CONFIGURATION", "GENERIC_ERROR_MESSAGE", "createThreeDSecureSession", "clientKey", "cardId", "resourceId", "services", "cardholderPresent", "environmentConfiguration", "env", "loadEvervaultScript", "resolve", "reject", "client", "createClient", "threeDSSession", "threeDSecure", "initEvervault", "error"]
|
|
7
|
-
}
|