1(self["__LOADABLE_LOADED_CHUNKS__"]=self["__LOADABLE_LOADED_CHUNKS__"]||[]).push([[642],{30642:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var react_router_dom__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(85781);var react_router_dom__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(15028);var react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(37703);var react_spinners_BeatLoader__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(18498);var react_spinners_BeatLoader__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react_spinners_BeatLoader__WEBPACK_IMPORTED_MODULE_2__);var client_lib_jwt__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(86402);var __hasOwnProp=Object.prototype.hasOwnProperty;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __propIsEnum=Object.prototype.propertyIsEnumerable;var __assign=Object.assign;var __rest=(source,exclude)=>{var target={};for(var prop in source)if(__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0)target[prop]=source[prop];if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source)){if(exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop))target[prop]=source[prop]}return target};function PrivateRoute(_a){var{component:Component,isAuthenticated,didUserLogOut,verifiedOnly=false,isVerified,accreditedOnly=false,isAccredited,isFetchingProfile,profile,confirmedEmailOnly=false,isEmailConfirmed,adminOnly,isAdmin,isFetchingWallet,inMobileApp}=_a,rest=__rest(_a,["component","isAuthenticated","didUserLogOut","verifiedOnly","isVerified","accreditedOnly","isAccredited","isFetchingProfile","profile","confirmedEmailOnly","isEmailConfirmed","adminOnly","isAdmin","isFetchingWallet","inMobileApp"]);const redirectSearchParams=window.location.pathname&&window.location.pathname!=="/"&&!didUserLogOut&&!/next=/.test(window.location.search)?`?next=${window.location.pathname}${window.location.search?encodeURIComponent(window.location.search):""}`:void 0;const authToken=client_lib_jwt__WEBPACK_IMPORTED_MODULE_3__.LP();if(!authToken){isAuthenticated=false}if(!isFetchingProfile&&!client_lib_jwt__WEBPACK_IMPORTED_MODULE_3__.n5()){if(didUserLogOut){return null}return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/login",search:redirectSearchParams}})}if(!profile&&isFetchingProfile){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexGrow:2}},react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_spinners_BeatLoader__WEBPACK_IMPORTED_MODULE_2___default(),{color:"#BDBDBD",size:30,margin:"2px"}))}return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.Z,__assign(__assign({},rest),{render:props=>{if(!isAuthenticated){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/login",state:{from:props.location},search:redirectSearchParams}})}if(confirmedEmailOnly&&!isEmailConfirmed&&!inMobileApp){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/confirm-email",state:{from:props.location}}})}if(verifiedOnly&&!isVerified){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/verify",state:{from:props.location}}})}if(adminOnly&&!isAdmin){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/wallet",state:{from:props.location}}})}if(accreditedOnly&&!isAccredited){return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_4__.Z,{to:{pathname:"/accreditation",state:{from:props.location}}})}return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component,__assign({},props))}}))}const mapStateToProps=(state,ownProps)=>({didUserLogOut:Boolean(state.user.didUserLogOut),isAuthenticated:!!(state.user.profile&&state.user.profile.id),location:ownProps.location,isVerified:state.user.profile&&state.user.profile.isIdentityVerified,isAccredited:state.user.profile&&state.user.profile.accreditationState==="APPROVED",isFetchingProfile:state.user.isFetchingProfile,profile:state.user.profile,isEmailConfirmed:state.user.profile&&state.user.profile.isEmailVerified,isAdmin:!!(state.user.profile&&state.user.profile.isAdmin),isFetchingWallet:state.wallet.isFetchingWallet,inMobileApp:state.app.isEmbeddedInMobileApp});const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.$j)(mapStateToProps)(PrivateRoute)}}]); 2 3//# sourceMappingURL=642.161d19e6f10be0c199f8.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.