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vB,EAAYuB,cAAc,CAAG,KAEjC,IAGK,IACT,yBC5EAC,EAAA1E,OAAA,CAAArD,EAAA,uIC6CA,eAAAgI,IACA,IACIC,EAAAC,CAAW,EAAIC,EAAAC,EAAM,CAAAC,GAAA,uBACzB,MAAU,GAAAC,EAAAC,EAAA,EAAK,KACXN,EAAAC,CAAW,EAAIC,EAAAC,EAAM,CAAAC,GAAA,wBACzB,CAAI,MAAAG,EAAA,CACAP,EAAAC,CAAW,EAAIC,EAAAC,EAAM,CAAAC,GAAA,kCAAAG,EACzB,CACA,CC7CA,eAAAC,EAAAC,CAAA,EACA,IAAUC,IAAAA,CAAA,CAAArI,IAAAA,CAAA,CAAAC,IAAAA,CAAA,EAAgBmI,EAG1BlI,EAAA,GAAAF,EAAAE,UAAA,EAAAkI,EAAAlI,UAAA,CACA,GAAAA,GAAAA,EAAA,KAWA,CAAAkI,EAAAE,QAAA,CAVA,OAAA/I,QAAAC,OAAA,GAcE,GAAAwI,EAAAO,EAAA,EAASC,IACXH,GACAG,EAAAC,wBAAA,EAAuCC,QAAAL,CAAA,GAKnC,GAAAL,EAAAW,EAAA,EAAgB1I,GAAA,sCAA8CA,EAAI,IACtE2I,UAAA,CACAlF,KAAA,aACAmF,QAAA,GACAC,KAAA,CACAC,SAAA,wBACA,CACA,CACA,EACA,GAIA,MAAQrB,GACR,yBC3BA,IAAMsB,EAAuBtH,GAKpB,GAAAuH,EAAAjH,GAAA,EAACkH,IAAkBA,CAAChJ,WAAYwB,EAAMxB,UAAU,EAGzD8I,CAAAA,EAAqBzG,eAAe,CAAG,MAAM4G,IAG3C,MAAMC,EAAuCD,GAGtCD,IAAAA,eAAkC,CAACC,IAG5C,IAAAE,EAAeL","sources":["webpack://_N_E/?a1e4","webpack://_N_E/../pages/_error.tsx","webpack://_N_E/../../../src/shared/lib/amp-context.shared-runtime.ts","webpack://_N_E/../../../src/shared/lib/amp-mode.ts","webpack://_N_E/../../../src/shared/lib/head.tsx","webpack://_N_E/../../../src/shared/lib/side-effect.tsx","webpack://_N_E/./node_modules/next/error.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/common/utils/responseEnd.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/common/_error.js","webpack://_N_E/./src/app/error.js"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src3430008616/src/supplier-web/src/app/error.js\");\n",null,null,null,null,null,"module.exports = require('./dist/pages/_error')\n","import { flush, setHttpStatus } from '@sentry/core';\nimport { logger, fill } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\n\n/**\n * Wrap `res.end()` so that it ends the span and flushes events before letting the request finish.\n *\n * Note: This wraps a sync method with an async method. While in general that's not a great idea in terms of keeping\n * things in the right order, in this case it's safe, because the native `.end()` actually *is* (effectively) async, and\n * its run actually *is* (literally) awaited, just manually so (which reflects the fact that the core of the\n * request/response code in Node by far predates the introduction of `async`/`await`). When `.end()` is done, it emits\n * the `prefinish` event, and only once that fires does request processing continue. See\n * https://github.com/nodejs/node/commit/7c9b607048f13741173d397795bac37707405ba7.\n *\n * Also note: `res.end()` isn't called until *after* all response data and headers have been sent, so blocking inside of\n * `end` doesn't delay data getting to the end user. See\n * https://nodejs.org/api/http.html#responseenddata-encoding-callback.\n *\n * @param span The span tracking the request\n * @param res: The request's corresponding response\n */\nfunction autoEndSpanOnResponseEnd(span, res) {\n const wrapEndMethod = (origEnd) => {\n return function sentryWrappedEnd( ...args) {\n finishSpan(span, this);\n return origEnd.call(this, ...args);\n };\n };\n\n // Prevent double-wrapping\n // res.end may be undefined during build when using `next export` to statically export a Next.js app\n if (res.end && !(res.end ).__sentry_original__) {\n fill(res, 'end', wrapEndMethod);\n }\n}\n\n/** Finish the given response's span and set HTTP status data */\nfunction finishSpan(span, res) {\n if (span) {\n setHttpStatus(span, res.statusCode);\n span.end();\n }\n}\n\n/** Flush the event queue to ensure that events get sent to Sentry before the response is finished and the lambda ends */\nasync function flushQueue() {\n try {\n DEBUG_BUILD && logger.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && logger.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && logger.log('Error while flushing events:\\n', e);\n }\n}\n\nexport { autoEndSpanOnResponseEnd, finishSpan, flushQueue };\n//# sourceMappingURL=responseEnd.js.map\n","import { withScope, captureException } from '@sentry/core';\nimport { flushQueue } from './utils/responseEnd.js';\n\n/**\n * Capture the exception passed by nextjs to the `_error` page, adding context data as appropriate.\n *\n * @param contextOrProps The data passed to either `getInitialProps` or `render` by nextjs\n */\nasync function captureUnderscoreErrorException(contextOrProps) {\n const { req, res, err } = contextOrProps;\n\n // 404s (and other 400-y friends) can trigger `_error`, but we don't want to send them to Sentry\n const statusCode = (res && res.statusCode) || contextOrProps.statusCode;\n if (statusCode && statusCode < 500) {\n return Promise.resolve();\n }\n\n // In previous versions of the suggested `_error.js` page in which this function is meant to be used, there was a\n // workaround for https://github.com/vercel/next.js/issues/8592 which involved an extra call to this function, in the\n // custom error component's `render` method, just in case it hadn't been called by `getInitialProps`. Now that that\n // issue has been fixed, the second call is unnecessary, but since it lives in user code rather than our code, users\n // have to be the ones to get rid of it, and guaraneteedly, not all of them will. So, rather than capture the error\n // twice, we just bail if we sense we're in that now-extraneous second call. (We can tell which function we're in\n // because Nextjs passes `pathname` to `getInitialProps` but not to `render`.)\n if (!contextOrProps.pathname) {\n return Promise.resolve();\n }\n\n withScope(scope => {\n if (req) {\n scope.setSDKProcessingMetadata({ request: req });\n }\n\n // If third-party libraries (or users themselves) throw something falsy, we want to capture it as a message (which\n // is what passing a string to `captureException` will wind up doing)\n captureException(err || `_error.js called with falsy error (${err})`, {\n mechanism: {\n type: 'instrument',\n handled: false,\n data: {\n function: '_error.getInitialProps',\n },\n },\n });\n });\n\n // In case this is being run as part of a serverless function (as is the case with the server half of nextjs apps\n // deployed to vercel), make sure the error gets sent to Sentry before the lambda exits.\n await flushQueue();\n}\n\nexport { captureUnderscoreErrorException };\n//# sourceMappingURL=_error.js.map\n","'use client';\n/**\n * NOTE: This requires `@sentry/nextjs` version 7.3.0 or higher.\n *\n * NOTE: If using this with `next` version 12.2.0 or lower, uncomment the\n * penultimate line in `CustomErrorComponent`.\n *\n * This page is loaded by Nextjs:\n * - on the server, when data-fetching methods throw or reject\n * - on the client, when `getInitialProps` throws or rejects\n * - on the client, when a React lifecycle method throws or rejects, and it's\n * caught by the built-in Nextjs error boundary\n *\n * See:\n * - https://nextjs.org/docs/basic-features/data-fetching/overview\n * - https://nextjs.org/docs/api-reference/data-fetching/get-initial-props\n * - https://reactjs.org/docs/error-boundaries.html\n */\n\nimport * as Sentry from '@sentry/nextjs';\nimport NextErrorComponent from 'next/error';\n\nconst CustomErrorComponent = props => {\n // If you're using a Nextjs version prior to 12.2.1, uncomment this to\n // compensate for https://github.com/vercel/next.js/issues/8592\n // Sentry.captureUnderscoreErrorException(props);\n\n return ;\n};\n\nCustomErrorComponent.getInitialProps = async contextData => {\n // In case this is running in a serverless function, await this in order to give Sentry\n // time to send the error before the lambda exits\n await Sentry.captureUnderscoreErrorException(contextData);\n\n // This will contain the status code of the response\n return NextErrorComponent.getInitialProps(contextData);\n};\n\nexport default CustomErrorComponent;\n"],"names":["Promise","resolve","then","__webpack_require__","bind","Error","statusCodes","_getInitialProps","param","res","err","statusCode","styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","lineHeight","h1","margin","paddingRight","fontSize","fontWeight","verticalAlign","h2","wrap","React","Component","render","withDarkMode","props","title","_jsxruntime","jsxs","div","style","jsx","Head","dangerouslySetInnerHTML","__html","className","Fragment","displayName","getInitialProps","origGetInitialProps","AmpStateContext","createContext","isInAmpMode","ampFirst","hybrid","hasQuery","exports","defaultHead","_","require","inAmpMode","head","name","content","onlyReactElement","list","child","type","concat","default","Children","_react","fragmentList","fragmentChild","METATYPES","headChildrenElements","i","tags","Set","metaTypes","metaCategories","h","hasKey","key","indexOf","keys","isUnique","add","metatype","len","hasOwnProperty","categories","has","category","process","env","NODE_ENV","c","some","newProps","startsWith","url","undefined","cloneElement","ampState","useContext","headManager","HeadManagerContext","Effect","reduceComponentsToState","reduceComponents","children","SideEffect","isServer","window","useClientOnlyLayoutEffect","useLayoutEffect","useClientOnlyEffect","useEffect","emitChange","mountedInstances","headElements","toArray","Array","from","filter","Boolean","updateHead","delete","_pendingUpdate","module","flushQueue","debug_build","X","logger","kg","log","esm_exports","yl","e","captureUnderscoreErrorException","contextOrProps","req","pathname","$e","scope","setSDKProcessingMetadata","request","Tb","mechanism","handled","data","function","CustomErrorComponent","jsx_runtime","NextErrorComponent","contextData","Sentry","app_error"],"sourceRoot":""}