Module 260447

1,619 characters · in 96e3fa4009a3c1b8.js, ae3a0fe725b67ea8.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{z:()=>d});var l=n(64700),r=n(192308),i=n(139033),o=n(626584),s=n(38405),a=n(794400),u=n(375708);let c=new o.A("RevenueErrorBoundary.tsx");class d extends l.PureComponent{state={error:null,info:null};getSentryTags(e,t){return{app_context:this.getSentryAppContext(),...t?{crashed:"true"}:{}}}getSentryExtras(e){return e instanceof a.v&&null!=e.extraSentryInformation?{...e.extraSentryInformation}:{}}onErrorCaught(e,t){}closeAndShowAlert(){(0,r.closeAllModals)(),(0,i.A)({title:u.intl.string(u.t.iufib1),subtitle:u.intl.string(u.t.ZUEGFn),confirmText:u.intl.string(u.t.TyCVIq)})}getErrorHandlingBehavior(e){return e instanceof a.v?e.errorHandlingBehavior:this.props.errorHandlingBehavior}getCrashedFlag(e){return"rethrow"===this.getErrorHandlingBehavior(e)}emitSentryException(e,t){let{additionalAnalyticsData:n}=this.props,l=this.getCrashedFlag(e),r=this.getSentryExtras(e),i={tags:this.getSentryTags(e,l),extra:{...r,...n??{},...null!=t?{reactErrorInfo:t}:{}}};return e instanceof a.v&&e.skipReportingToSentry||s.A.captureException(e,i),c.error("Revenue error occurred:",{error:e,additionalErrorContext:r}),{sentryErrorOptions:i}}componentDidCatch(e,t){let{sentryErrorOptions:n}=this.emitSentryException(e,t);if(this.onErrorCaught(e,t),this.setState({error:e,info:t}),null!=this.props.onErrorReported&&this.props.onErrorReported(e,t,n),"rethrow"===this.getErrorHandlingBehavior(e))throw e;this.closeAndShowAlert()}render(){return null!=this.state.error?null!=this.props.renderCustomErrorComponent?this.props.renderCustomErrorComponent(this.state.error,this.state.info):null:this.props.children}}}