{"version":3,"file":"js/common-5c188699e8728b1c36cd.js","mappings":"uKAYA,GAAsB,qBAAXA,OAAwB,CAAC,IAADC,EAAAC,EACjC,MAAMC,IAA0B,QAAhBF,EAACD,OAAOI,gBAAQ,IAAAH,GAAQ,QAARA,EAAfA,EAAiBI,cAAM,IAAAJ,GAAvBA,EAAyBK,UACpCC,GAAgC,QAAfL,EAAAF,OAAOI,gBAAQ,IAAAF,GAAQ,QAARA,EAAfA,EAAiBG,cAAM,IAAAH,OAAA,EAAvBA,EAAyBK,iBAAkB,EAC5DC,EAAeD,EAAiB,EAEhCE,EAAa,CACjBC,IAAKC,EAAAA,IACLC,QAASC,EAAAA,IACTC,YAAaC,aACbC,eAAgB,EAChBb,UACAc,OAAQ,UACRC,aAAc,CAAC,SAAU,YAAa,aACtCC,aAAc,CAACC,EAAAA,KACfC,iBAAkB,CAChBC,QAAS,CACP,eAAgB,6BAGpBC,UAAAA,CAAWC,EAAOC,GAChB,OA5BqBC,EA4BCD,EAAKE,6BA3BVC,EAAAA,IAAc,CAAC,IAAK,IAAK,IAAK,KAAKC,SAAc,OAALH,QAAK,IAALA,OAAK,EAALA,EAAOI,QA4B3D,KAGFN,EAhCb,IAA2BE,CAiCvB,GAQElB,IACFC,EAAWsB,yBAA2BxB,EACtCE,EAAWU,aAAaa,KACtBZ,EAAAA,EAAyB,CACvBa,aAAa,MAKnBb,EAAAA,EAAYX,EACd,C","sources":["webpack://artprice/./app/javascript/sentry.js"],"sourcesContent":["import * as Sentry from '@sentry/react';\nimport { AxiosError } from 'axios';\nimport { SENTRY_DSN, VERSION } from './constants/rails';\n\nfunction shouldIgnoreError(error) {\n if (error instanceof AxiosError && [429, 449, 401, 403].includes(error?.status)) {\n return true;\n }\n\n return false;\n}\n\nif (typeof window !== 'undefined') {\n const enabled = !window.artprice?.sentry?.disabled;\n const replaySampling = window.artprice?.sentry?.replaySampling || 0.0;\n const enableReplay = replaySampling > 0.0;\n\n const sentryConf = {\n dsn: SENTRY_DSN,\n release: VERSION,\n environment: process.env.RAILS_ENV,\n normalizeDepth: 6,\n enabled,\n tunnel: '/tunnel',\n ignoreErrors: ['jQuery', 'Hydration', 'hydrating'],\n integrations: [Sentry.extraErrorDataIntegration()],\n transportOptions: {\n headers: {\n 'Content-Type': 'text/plain;charset=UTF-8',\n },\n },\n beforeSend(event, hint) {\n if (shouldIgnoreError(hint.originalException)) {\n return null;\n }\n\n return event;\n },\n // integrations(integrations) {\n // const filteredIntregrations = integrations.filter(integration => integration.name !== 'Dedupe');\n //\n // return [...filteredIntregrations, Sentry.extraErrorDataIntegration()];\n // },\n };\n\n if (enableReplay) {\n sentryConf.replaysOnErrorSampleRate = replaySampling;\n sentryConf.integrations.push(\n Sentry.replayIntegration({\n maskAllText: false,\n }),\n );\n }\n\n Sentry.init(sentryConf);\n}\n"],"names":["window","_window$artprice","_window$artprice2","enabled","artprice","sentry","disabled","replaySampling","enableReplay","sentryConf","dsn","SENTRY_DSN","release","VERSION","environment","process","normalizeDepth","tunnel","ignoreErrors","integrations","Sentry","transportOptions","headers","beforeSend","event","hint","error","originalException","AxiosError","includes","status","replaysOnErrorSampleRate","push","maskAllText"],"sourceRoot":""}