@scalant/career-hub 4.0.0 → 4.0.2-alpha.0
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/dist/career-hub.es.js +107 -88
- package/dist/career-hub.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/career-hub.umd.js
CHANGED
|
@@ -431,7 +431,7 @@ You must add the middleware for RTK-Query to function correctly!`)}}function he(
|
|
|
431
431
|
In the case of an unhandled error, no tags will be "provided" or "invalidated".`,Fe):console.error(Fe),Fe;case 13:return[2]}})})};function oe(he,pe){var ce,fe,ye,_e,ge=(fe=(ce=pe[F])==null?void 0:ce.queries)==null?void 0:fe[he.queryCacheKey],be=(ye=pe[F])==null?void 0:ye.config.refetchOnMountOrArgChange,Se=ge==null?void 0:ge.fulfilledTimeStamp,Ee=(_e=he.forceRefetch)!=null?_e:he.subscribe&&be;return Ee?Ee===!0||(Number(new Date)-Number(Se))/1e3>=Ee:!1}var ie=toolkit.createAsyncThunk(F+"/executeQuery",ae,{getPendingMeta:function(){var he;return he={startedTimeStamp:Date.now()},he[toolkit.SHOULD_AUTOBATCH]=!0,he},condition:function(he,pe){var ce=pe.getState,fe,ye,_e,ge=ce(),be=(ye=(fe=ge[F])==null?void 0:fe.queries)==null?void 0:ye[he.queryCacheKey],Se=be==null?void 0:be.fulfilledTimeStamp,Ee=he.originalArgs,Ce=be==null?void 0:be.originalArgs,xe=K[he.endpointName];return isUpsertQuery(he)?!0:(be==null?void 0:be.status)==="pending"?!1:oe(he,ge)||isQueryDefinition$1(xe)&&((_e=xe==null?void 0:xe.forceRefetch)!=null&&_e.call(xe,{currentArg:Ee,previousArg:Ce,endpointState:be,state:ge}))?!0:!Se},dispatchConditionRejection:!0}),se=toolkit.createAsyncThunk(F+"/executeMutation",ae,{getPendingMeta:function(){var he;return he={startedTimeStamp:Date.now()},he[toolkit.SHOULD_AUTOBATCH]=!0,he}}),ue=function(he){return"force"in he},de=function(he){return"ifOlderThan"in he},le=function(he,pe,ce){return function(fe,ye){var _e=ue(ce)&&ce.force,ge=de(ce)&&ce.ifOlderThan,be=function(xe){return xe===void 0&&(xe=!0),ee.endpoints[he].initiate(pe,{forceRefetch:xe})},Se=ee.endpoints[he].select(pe)(ye());if(_e)fe(be());else if(ge){var Ee=Se==null?void 0:Se.fulfilledTimeStamp;if(!Ee){fe(be());return}var Ce=(Number(new Date)-Number(new Date(Ee)))/1e3>=ge;Ce&&fe(be())}else fe(be(!1))}};function ve(he){return function(pe){var ce,fe;return((fe=(ce=pe==null?void 0:pe.meta)==null?void 0:ce.arg)==null?void 0:fe.endpointName)===he}}function me(he,pe){return{matchPending:toolkit.isAllOf(toolkit.isPending(he),ve(pe)),matchFulfilled:toolkit.isAllOf(toolkit.isFulfilled(he),ve(pe)),matchRejected:toolkit.isAllOf(toolkit.isRejected(he),ve(pe))}}return{queryThunk:ie,mutationThunk:se,prefetch:le,updateQueryData:ne,upsertQueryData:re,patchQueryData:te,buildMatchThunkActions:me}}function calculateProvidedByThunk(C,$,F,V){return calculateProvidedBy(F[C.meta.arg.endpointName][$],toolkit.isFulfilled(C)?C.payload:void 0,toolkit.isRejectedWithValue(C)?C.payload:void 0,C.meta.arg.originalArgs,"baseQueryMeta"in C.meta?C.meta.baseQueryMeta:void 0,V)}function updateQuerySubstateIfExists(C,$,F){var V=C[$];V&&F(V)}function getMutationCacheKey(C){var $;return($="arg"in C?C.arg.fixedCacheKey:C.fixedCacheKey)!=null?$:C.requestId}function updateMutationSubstateIfExists(C,$,F){var V=C[getMutationCacheKey($)];V&&F(V)}var initialState$8={};function buildSlice(C){var $=C.reducerPath,F=C.queryThunk,V=C.mutationThunk,K=C.context,J=K.endpointDefinitions,ee=K.apiUid,te=K.extractRehydrationInfo,ne=K.hasRehydrationInfo,re=C.assertTagType,ae=C.config,oe=toolkit.createAction($+"/resetApiState"),ie=toolkit.createSlice({name:$+"/queries",initialState:initialState$8,reducers:{removeQueryResult:{reducer:function(ce,fe){var ye=fe.payload.queryCacheKey;delete ce[ye]},prepare:toolkit.prepareAutoBatched()},queryResultPatched:function(ce,fe){var ye=fe.payload,_e=ye.queryCacheKey,ge=ye.patches;updateQuerySubstateIfExists(ce,_e,function(be){be.data=pn(be.data,ge.concat())})}},extraReducers:function(ce){ce.addCase(F.pending,function(fe,ye){var _e=ye.meta,ge=ye.meta.arg,be,Se,Ee=isUpsertQuery(ge);(ge.subscribe||Ee)&&((Se=fe[be=ge.queryCacheKey])!=null||(fe[be]={status:QueryStatus.uninitialized,endpointName:ge.endpointName})),updateQuerySubstateIfExists(fe,ge.queryCacheKey,function(Ce){Ce.status=QueryStatus.pending,Ce.requestId=Ee&&Ce.requestId?Ce.requestId:_e.requestId,ge.originalArgs!==void 0&&(Ce.originalArgs=ge.originalArgs),Ce.startedTimeStamp=_e.startedTimeStamp})}).addCase(F.fulfilled,function(fe,ye){var _e=ye.meta,ge=ye.payload;updateQuerySubstateIfExists(fe,_e.arg.queryCacheKey,function(be){var Se;if(!(be.requestId!==_e.requestId&&!isUpsertQuery(_e.arg))){var Ee=J[_e.arg.endpointName].merge;if(be.status=QueryStatus.fulfilled,Ee)if(be.data!==void 0){var Ce=_e.fulfilledTimeStamp,xe=_e.arg,$e=_e.baseQueryMeta,Ie=_e.requestId,De=toolkit.createNextState(be.data,function(Ne){return Ee(Ne,ge,{arg:xe.originalArgs,baseQueryMeta:$e,fulfilledTimeStamp:Ce,requestId:Ie})});be.data=De}else be.data=ge;else be.data=(Se=J[_e.arg.endpointName].structuralSharing)==null||Se?copyWithStructuralSharing(be.data,ge):ge;delete be.error,be.fulfilledTimeStamp=_e.fulfilledTimeStamp}})}).addCase(F.rejected,function(fe,ye){var _e=ye.meta,ge=_e.condition,be=_e.arg,Se=_e.requestId,Ee=ye.error,Ce=ye.payload;updateQuerySubstateIfExists(fe,be.queryCacheKey,function(xe){if(!ge){if(xe.requestId!==Se)return;xe.status=QueryStatus.rejected,xe.error=Ce!=null?Ce:Ee}})}).addMatcher(ne,function(fe,ye){for(var _e=te(ye).queries,ge=0,be=Object.entries(_e);ge<be.length;ge++){var Se=be[ge],Ee=Se[0],Ce=Se[1];((Ce==null?void 0:Ce.status)===QueryStatus.fulfilled||(Ce==null?void 0:Ce.status)===QueryStatus.rejected)&&(fe[Ee]=Ce)}})}}),se=toolkit.createSlice({name:$+"/mutations",initialState:initialState$8,reducers:{removeMutationResult:{reducer:function(ce,fe){var ye=fe.payload,_e=getMutationCacheKey(ye);_e in ce&&delete ce[_e]},prepare:toolkit.prepareAutoBatched()}},extraReducers:function(ce){ce.addCase(V.pending,function(fe,ye){var _e=ye.meta,ge=ye.meta,be=ge.requestId,Se=ge.arg,Ee=ge.startedTimeStamp;Se.track&&(fe[getMutationCacheKey(_e)]={requestId:be,status:QueryStatus.pending,endpointName:Se.endpointName,startedTimeStamp:Ee})}).addCase(V.fulfilled,function(fe,ye){var _e=ye.payload,ge=ye.meta;ge.arg.track&&updateMutationSubstateIfExists(fe,ge,function(be){be.requestId===ge.requestId&&(be.status=QueryStatus.fulfilled,be.data=_e,be.fulfilledTimeStamp=ge.fulfilledTimeStamp)})}).addCase(V.rejected,function(fe,ye){var _e=ye.payload,ge=ye.error,be=ye.meta;be.arg.track&&updateMutationSubstateIfExists(fe,be,function(Se){Se.requestId===be.requestId&&(Se.status=QueryStatus.rejected,Se.error=_e!=null?_e:ge)})}).addMatcher(ne,function(fe,ye){for(var _e=te(ye).mutations,ge=0,be=Object.entries(_e);ge<be.length;ge++){var Se=be[ge],Ee=Se[0],Ce=Se[1];((Ce==null?void 0:Ce.status)===QueryStatus.fulfilled||(Ce==null?void 0:Ce.status)===QueryStatus.rejected)&&Ee!==(Ce==null?void 0:Ce.requestId)&&(fe[Ee]=Ce)}})}}),ue=toolkit.createSlice({name:$+"/invalidation",initialState:initialState$8,reducers:{},extraReducers:function(ce){ce.addCase(ie.actions.removeQueryResult,function(fe,ye){for(var _e=ye.payload.queryCacheKey,ge=0,be=Object.values(fe);ge<be.length;ge++)for(var Se=be[ge],Ee=0,Ce=Object.values(Se);Ee<Ce.length;Ee++){var xe=Ce[Ee],$e=xe.indexOf(_e);$e!==-1&&xe.splice($e,1)}}).addMatcher(ne,function(fe,ye){for(var _e,ge,be,Se,Ee=te(ye).provided,Ce=0,xe=Object.entries(Ee);Ce<xe.length;Ce++)for(var $e=xe[Ce],Ie=$e[0],De=$e[1],Ne=0,Fe=Object.entries(De);Ne<Fe.length;Ne++)for(var Oe=Fe[Ne],Te=Oe[0],Ae=Oe[1],Me=(Se=(ge=(_e=fe[Ie])!=null?_e:fe[Ie]={})[be=Te||"__internal_without_id"])!=null?Se:ge[be]=[],je=0,ze=Ae;je<ze.length;je++){var Ve=ze[je],Xe=Me.includes(Ve);Xe||Me.push(Ve)}}).addMatcher(toolkit.isAnyOf(toolkit.isFulfilled(F),toolkit.isRejectedWithValue(F)),function(fe,ye){for(var _e,ge,be,Se,Ee=calculateProvidedByThunk(ye,"providesTags",J,re),Ce=ye.meta.arg.queryCacheKey,xe=0,$e=Object.values(fe);xe<$e.length;xe++)for(var Ie=$e[xe],De=0,Ne=Object.values(Ie);De<Ne.length;De++){var Fe=Ne[De],Oe=Fe.indexOf(Ce);Oe!==-1&&Fe.splice(Oe,1)}for(var Te=0,Ae=Ee;Te<Ae.length;Te++){var Me=Ae[Te],je=Me.type,ze=Me.id,Ve=(Se=(ge=(_e=fe[je])!=null?_e:fe[je]={})[be=ze||"__internal_without_id"])!=null?Se:ge[be]=[],Xe=Ve.includes(Ce);Xe||Ve.push(Ce)}})}}),de=toolkit.createSlice({name:$+"/subscriptions",initialState:initialState$8,reducers:{updateSubscriptionOptions:function(ce,fe){},unsubscribeQueryResult:function(ce,fe){},internal_probeSubscription:function(ce,fe){}}}),le=toolkit.createSlice({name:$+"/internalSubscriptions",initialState:initialState$8,reducers:{subscriptionsUpdated:function(ce,fe){return pn(ce,fe.payload)}}}),ve=toolkit.createSlice({name:$+"/config",initialState:__spreadValues$1({online:isOnline(),focused:isDocumentVisible(),middlewareRegistered:!1},ae),reducers:{middlewareRegistered:function(ce,fe){var ye=fe.payload;ce.middlewareRegistered=ce.middlewareRegistered==="conflict"||ee!==ye?"conflict":!0}},extraReducers:function(ce){ce.addCase(onOnline,function(fe){fe.online=!0}).addCase(onOffline,function(fe){fe.online=!1}).addCase(onFocus,function(fe){fe.focused=!0}).addCase(onFocusLost,function(fe){fe.focused=!1}).addMatcher(ne,function(fe){return __spreadValues$1({},fe)})}}),me=toolkit.combineReducers({queries:ie.reducer,mutations:se.reducer,provided:ue.reducer,subscriptions:le.reducer,config:ve.reducer}),he=function(ce,fe){return me(oe.match(fe)?void 0:ce,fe)},pe=__spreadProps$1(__spreadValues$1(__spreadValues$1(__spreadValues$1(__spreadValues$1(__spreadValues$1({},ve.actions),ie.actions),de.actions),le.actions),se.actions),{unsubscribeMutationResult:se.actions.removeMutationResult,resetApiState:oe});return{reducer:he,actions:pe}}var skipToken=Symbol.for("RTKQ/skipToken"),initialSubState={status:QueryStatus.uninitialized},defaultQuerySubState=toolkit.createNextState(initialSubState,function(){}),defaultMutationSubState=toolkit.createNextState(initialSubState,function(){});function buildSelectors(C){var $=C.serializeQueryArgs,F=C.reducerPath,V=function(ae){return defaultQuerySubState},K=function(ae){return defaultMutationSubState};return{buildQuerySelector:te,buildMutationSelector:ne,selectInvalidatedBy:re};function J(ae){return __spreadValues$1(__spreadValues$1({},ae),getRequestStatusFlags(ae.status))}function ee(ae){var oe=ae[F];if(process.env.NODE_ENV!=="production"&&!oe){if(ee.triggered)return oe;ee.triggered=!0,console.error("Error: No data found at `state."+F+"`. Did you forget to add the reducer to the store?")}return oe}function te(ae,oe){return function(ie){var se=$({queryArgs:ie,endpointDefinition:oe,endpointName:ae}),ue=function(le){var ve,me,he;return(he=(me=(ve=ee(le))==null?void 0:ve.queries)==null?void 0:me[se])!=null?he:defaultQuerySubState},de=ie===skipToken?V:ue;return toolkit.createSelector(de,J)}}function ne(){return function(ae){var oe,ie;typeof ae=="object"?ie=(oe=getMutationCacheKey(ae))!=null?oe:skipToken:ie=ae;var se=function(de){var le,ve,me;return(me=(ve=(le=ee(de))==null?void 0:le.mutations)==null?void 0:ve[ie])!=null?me:defaultMutationSubState},ue=ie===skipToken?K:se;return toolkit.createSelector(ue,J)}}function re(ae,oe){for(var ie,se=ae[F],ue=new Set,de=0,le=oe.map(expandTagDescription);de<le.length;de++){var ve=le[de],me=se.provided[ve.type];if(me)for(var he=(ie=ve.id!==void 0?me[ve.id]:flatten(Object.values(me)))!=null?ie:[],pe=0,ce=he;pe<ce.length;pe++){var fe=ce[pe];ue.add(fe)}}return flatten(Array.from(ue.values()).map(function(ye){var _e=se.queries[ye];return _e?[{queryCacheKey:ye,endpointName:_e.endpointName,originalArgs:_e.originalArgs}]:[]}))}}var cache$1=WeakMap?new WeakMap:void 0,defaultSerializeQueryArgs$1=function(C){var $=C.endpointName,F=C.queryArgs,V="",K=cache$1==null?void 0:cache$1.get(F);if(typeof K=="string")V=K;else{var J=JSON.stringify(F,function(ee,te){return toolkit.isPlainObject(te)?Object.keys(te).sort().reduce(function(ne,re){return ne[re]=te[re],ne},{}):te});toolkit.isPlainObject(F)&&(cache$1==null||cache$1.set(F,J)),V=J}return $+"("+V+")"};function buildCreateApi(){for(var C=[],$=0;$<arguments.length;$++)C[$]=arguments[$];return function(V){var K=defaultMemoize(function(ae){var oe,ie;return(ie=V.extractRehydrationInfo)==null?void 0:ie.call(V,ae,{reducerPath:(oe=V.reducerPath)!=null?oe:"api"})}),J=__spreadProps$1(__spreadValues$1({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},V),{extractRehydrationInfo:K,serializeQueryArgs:function(ae){var oe=defaultSerializeQueryArgs$1;if("serializeQueryArgs"in ae.endpointDefinition){var ie=ae.endpointDefinition.serializeQueryArgs;oe=function(se){var ue=ie(se);return typeof ue=="string"?ue:defaultSerializeQueryArgs$1(__spreadProps$1(__spreadValues$1({},se),{queryArgs:ue}))}}else V.serializeQueryArgs&&(oe=V.serializeQueryArgs);return oe(ae)},tagTypes:__spreadArray$2([],V.tagTypes||[])}),ee={endpointDefinitions:{},batch:function(ae){ae()},apiUid:toolkit.nanoid(),extractRehydrationInfo:K,hasRehydrationInfo:defaultMemoize(function(ae){return K(ae)!=null})},te={injectEndpoints:re,enhanceEndpoints:function(ae){var oe=ae.addTagTypes,ie=ae.endpoints;if(oe)for(var se=0,ue=oe;se<ue.length;se++){var de=ue[se];J.tagTypes.includes(de)||J.tagTypes.push(de)}if(ie)for(var le=0,ve=Object.entries(ie);le<ve.length;le++){var me=ve[le],he=me[0],pe=me[1];typeof pe=="function"?pe(ee.endpointDefinitions[he]):Object.assign(ee.endpointDefinitions[he]||{},pe)}return te}},ne=C.map(function(ae){return ae.init(te,J,ee)});function re(ae){for(var oe=ae.endpoints({query:function(pe){return __spreadProps$1(__spreadValues$1({},pe),{type:DefinitionType$1.query})},mutation:function(pe){return __spreadProps$1(__spreadValues$1({},pe),{type:DefinitionType$1.mutation})}}),ie=0,se=Object.entries(oe);ie<se.length;ie++){var ue=se[ie],de=ue[0],le=ue[1];if(!ae.overrideExisting&&de in ee.endpointDefinitions){typeof process!="undefined"&&process.env.NODE_ENV==="development"&&console.error("called `injectEndpoints` to override already-existing endpointName "+de+" without specifying `overrideExisting: true`");continue}ee.endpointDefinitions[de]=le;for(var ve=0,me=ne;ve<me.length;ve++){var he=me[ve];he.injectEndpoint(de,le)}}return te}return te.injectEndpoints({endpoints:V.endpoints})}}function isObjectEmpty(C){for(var $ in C)return!1;return!0}var THIRTY_TWO_BIT_MAX_TIMER_SECONDS=2147483647/1e3-1,buildCacheCollectionHandler=function(C){var $=C.reducerPath,F=C.api,V=C.context,K=C.internalState,J=F.internalActions,ee=J.removeQueryResult,te=J.unsubscribeQueryResult;function ne(ie){var se=K.currentSubscriptions[ie];return!!se&&!isObjectEmpty(se)}var re={},ae=function(ie,se,ue){var de;if(te.match(ie)){var le=se.getState()[$],ve=ie.payload.queryCacheKey;oe(ve,(de=le.queries[ve])==null?void 0:de.endpointName,se,le.config)}if(F.util.resetApiState.match(ie))for(var me=0,he=Object.entries(re);me<he.length;me++){var pe=he[me],ce=pe[0],fe=pe[1];fe&&clearTimeout(fe),delete re[ce]}if(V.hasRehydrationInfo(ie))for(var le=se.getState()[$],ye=V.extractRehydrationInfo(ie).queries,_e=0,ge=Object.entries(ye);_e<ge.length;_e++){var be=ge[_e],ve=be[0],Se=be[1];oe(ve,Se==null?void 0:Se.endpointName,se,le.config)}};function oe(ie,se,ue,de){var le,ve=V.endpointDefinitions[se],me=(le=ve==null?void 0:ve.keepUnusedDataFor)!=null?le:de.keepUnusedDataFor;if(me!==1/0){var he=Math.max(0,Math.min(me,THIRTY_TWO_BIT_MAX_TIMER_SECONDS));if(!ne(ie)){var pe=re[ie];pe&&clearTimeout(pe),re[ie]=setTimeout(function(){ne(ie)||ue.dispatch(ee({queryCacheKey:ie})),delete re[ie]},he*1e3)}}}return ae},buildInvalidationByTagsHandler=function(C){var $=C.reducerPath,F=C.context,V=C.context.endpointDefinitions,K=C.mutationThunk,J=C.api,ee=C.assertTagType,te=C.refetchQuery,ne=J.internalActions.removeQueryResult,re=toolkit.isAnyOf(toolkit.isFulfilled(K),toolkit.isRejectedWithValue(K)),ae=function(ie,se){re(ie)&&oe(calculateProvidedByThunk(ie,"invalidatesTags",V,ee),se),J.util.invalidateTags.match(ie)&&oe(calculateProvidedBy(ie.payload,void 0,void 0,void 0,void 0,ee),se)};function oe(ie,se){var ue=se.getState(),de=ue[$],le=J.util.selectInvalidatedBy(ue,ie);F.batch(function(){for(var ve,me=Array.from(le.values()),he=0,pe=me;he<pe.length;he++){var ce=pe[he].queryCacheKey,fe=de.queries[ce],ye=(ve=de.subscriptions[ce])!=null?ve:{};fe&&(Object.keys(ye).length===0?se.dispatch(ne({queryCacheKey:ce})):fe.status!==QueryStatus.uninitialized&&se.dispatch(te(fe,ce)))}})}return ae},buildPollingHandler=function(C){var $=C.reducerPath,F=C.queryThunk,V=C.api,K=C.refetchQuery,J=C.internalState,ee={},te=function(se,ue){(V.internalActions.updateSubscriptionOptions.match(se)||V.internalActions.unsubscribeQueryResult.match(se))&&re(se.payload,ue),(F.pending.match(se)||F.rejected.match(se)&&se.meta.condition)&&re(se.meta.arg,ue),(F.fulfilled.match(se)||F.rejected.match(se)&&!se.meta.condition)&&ne(se.meta.arg,ue),V.util.resetApiState.match(se)&&oe()};function ne(se,ue){var de=se.queryCacheKey,le=ue.getState()[$],ve=le.queries[de],me=J.currentSubscriptions[de];if(!(!ve||ve.status===QueryStatus.uninitialized)){var he=ie(me);if(Number.isFinite(he)){var pe=ee[de];pe!=null&&pe.timeout&&(clearTimeout(pe.timeout),pe.timeout=void 0);var ce=Date.now()+he,fe=ee[de]={nextPollTimestamp:ce,pollingInterval:he,timeout:setTimeout(function(){fe.timeout=void 0,ue.dispatch(K(ve,de))},he)}}}}function re(se,ue){var de=se.queryCacheKey,le=ue.getState()[$],ve=le.queries[de],me=J.currentSubscriptions[de];if(!(!ve||ve.status===QueryStatus.uninitialized)){var he=ie(me);if(!Number.isFinite(he)){ae(de);return}var pe=ee[de],ce=Date.now()+he;(!pe||ce<pe.nextPollTimestamp)&&ne({queryCacheKey:de},ue)}}function ae(se){var ue=ee[se];ue!=null&&ue.timeout&&clearTimeout(ue.timeout),delete ee[se]}function oe(){for(var se=0,ue=Object.keys(ee);se<ue.length;se++){var de=ue[se];ae(de)}}function ie(se){se===void 0&&(se={});var ue=Number.POSITIVE_INFINITY;for(var de in se)se[de].pollingInterval&&(ue=Math.min(se[de].pollingInterval,ue));return ue}return te},buildWindowEventHandler=function(C){var $=C.reducerPath,F=C.context,V=C.api,K=C.refetchQuery,J=C.internalState,ee=V.internalActions.removeQueryResult,te=function(re,ae){onFocus.match(re)&&ne(ae,"refetchOnFocus"),onOnline.match(re)&&ne(ae,"refetchOnReconnect")};function ne(re,ae){var oe=re.getState()[$],ie=oe.queries,se=J.currentSubscriptions;F.batch(function(){for(var ue=0,de=Object.keys(se);ue<de.length;ue++){var le=de[ue],ve=ie[le],me=se[le];if(!(!me||!ve)){var he=Object.values(me).some(function(pe){return pe[ae]===!0})||Object.values(me).every(function(pe){return pe[ae]===void 0})&&oe.config[ae];he&&(Object.keys(me).length===0?re.dispatch(ee({queryCacheKey:le})):ve.status!==QueryStatus.uninitialized&&re.dispatch(K(ve,le)))}}})}return te},neverResolvedError=new Error("Promise never resolved before cacheEntryRemoved."),buildCacheLifecycleHandler=function(C){var $=C.api,F=C.reducerPath,V=C.context,K=C.queryThunk,J=C.mutationThunk;C.internalState;var ee=toolkit.isAsyncThunkAction(K),te=toolkit.isAsyncThunkAction(J),ne=toolkit.isFulfilled(K,J),re={},ae=function(se,ue,de){var le=oe(se);if(K.pending.match(se)){var ve=de[F].queries[le],me=ue.getState()[F].queries[le];!ve&&me&&ie(se.meta.arg.endpointName,se.meta.arg.originalArgs,le,ue,se.meta.requestId)}else if(J.pending.match(se)){var me=ue.getState()[F].mutations[le];me&&ie(se.meta.arg.endpointName,se.meta.arg.originalArgs,le,ue,se.meta.requestId)}else if(ne(se)){var he=re[le];he!=null&&he.valueResolved&&(he.valueResolved({data:se.payload,meta:se.meta.baseQueryMeta}),delete he.valueResolved)}else if($.internalActions.removeQueryResult.match(se)||$.internalActions.removeMutationResult.match(se)){var he=re[le];he&&(delete re[le],he.cacheEntryRemoved())}else if($.util.resetApiState.match(se))for(var pe=0,ce=Object.entries(re);pe<ce.length;pe++){var fe=ce[pe],ye=fe[0],he=fe[1];delete re[ye],he.cacheEntryRemoved()}};function oe(se){return ee(se)?se.meta.arg.queryCacheKey:te(se)?se.meta.requestId:$.internalActions.removeQueryResult.match(se)?se.payload.queryCacheKey:$.internalActions.removeMutationResult.match(se)?getMutationCacheKey(se.payload):""}function ie(se,ue,de,le,ve){var me=V.endpointDefinitions[se],he=me==null?void 0:me.onCacheEntryAdded;if(he){var pe={},ce=new Promise(function(Se){pe.cacheEntryRemoved=Se}),fe=Promise.race([new Promise(function(Se){pe.valueResolved=Se}),ce.then(function(){throw neverResolvedError})]);fe.catch(function(){}),re[de]=pe;var ye=$.endpoints[se].select(me.type===DefinitionType$1.query?ue:de),_e=le.dispatch(function(Se,Ee,Ce){return Ce}),ge=__spreadProps$1(__spreadValues$1({},le),{getCacheEntry:function(){return ye(le.getState())},requestId:ve,extra:_e,updateCachedData:me.type===DefinitionType$1.query?function(Se){return le.dispatch($.util.updateQueryData(se,ue,Se))}:void 0,cacheDataLoaded:fe,cacheEntryRemoved:ce}),be=he(ue,ge);Promise.resolve(be).catch(function(Se){if(Se!==neverResolvedError)throw Se})}}return ae},buildQueryLifecycleHandler=function(C){var $=C.api,F=C.context,V=C.queryThunk,K=C.mutationThunk,J=toolkit.isPending(V,K),ee=toolkit.isRejected(V,K),te=toolkit.isFulfilled(V,K),ne={},re=function(ae,oe){var ie,se,ue;if(J(ae)){var de=ae.meta,le=de.requestId,ve=de.arg,me=ve.endpointName,he=ve.originalArgs,pe=F.endpointDefinitions[me],ce=pe==null?void 0:pe.onQueryStarted;if(ce){var fe={},ye=new Promise(function($e,Ie){fe.resolve=$e,fe.reject=Ie});ye.catch(function(){}),ne[le]=fe;var _e=$.endpoints[me].select(pe.type===DefinitionType$1.query?he:le),ge=oe.dispatch(function($e,Ie,De){return De}),be=__spreadProps$1(__spreadValues$1({},oe),{getCacheEntry:function(){return _e(oe.getState())},requestId:le,extra:ge,updateCachedData:pe.type===DefinitionType$1.query?function($e){return oe.dispatch($.util.updateQueryData(me,he,$e))}:void 0,queryFulfilled:ye});ce(he,be)}}else if(te(ae)){var Se=ae.meta,le=Se.requestId,Ee=Se.baseQueryMeta;(ie=ne[le])==null||ie.resolve({data:ae.payload,meta:Ee}),delete ne[le]}else if(ee(ae)){var Ce=ae.meta,le=Ce.requestId,xe=Ce.rejectedWithValue,Ee=Ce.baseQueryMeta;(ue=ne[le])==null||ue.reject({error:(se=ae.payload)!=null?se:ae.error,isUnhandledError:!xe,meta:Ee}),delete ne[le]}};return re},buildDevCheckHandler=function(C){var $=C.api,F=C.context.apiUid,V=C.reducerPath;return function(K,J){var ee,te;$.util.resetApiState.match(K)&&J.dispatch($.internalActions.middlewareRegistered(F)),typeof process!="undefined"&&process.env.NODE_ENV==="development"&&$.internalActions.middlewareRegistered.match(K)&&K.payload===F&&((te=(ee=J.getState()[V])==null?void 0:ee.config)==null?void 0:te.middlewareRegistered)==="conflict"&&console.warn('There is a mismatch between slice and middleware for the reducerPath "'+V+`".
|
|
432
432
|
You can only have one api per reducer path, this will lead to crashes in various situations!`+(V==="api"?`
|
|
433
433
|
If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`:""))}},promise,queueMicrotaskShim=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis):function(C){return(promise||(promise=Promise.resolve())).then(C).catch(function($){return setTimeout(function(){throw $},0)})},buildBatchedActionsHandler=function(C){var $=C.api,F=C.queryThunk,V=C.internalState,K=$.reducerPath+"/subscriptions",J=null,ee=!1,te=$.internalActions,ne=te.updateSubscriptionOptions,re=te.unsubscribeQueryResult,ae=function(oe,ie){var se,ue,de,le,ve,me,he,pe,ce;if(ne.match(ie)){var fe=ie.payload,ye=fe.queryCacheKey,_e=fe.requestId,ge=fe.options;return(se=oe==null?void 0:oe[ye])!=null&&se[_e]&&(oe[ye][_e]=ge),!0}if(re.match(ie)){var be=ie.payload,ye=be.queryCacheKey,_e=be.requestId;return oe[ye]&&delete oe[ye][_e],!0}if($.internalActions.removeQueryResult.match(ie))return delete oe[ie.payload.queryCacheKey],!0;if(F.pending.match(ie)){var Se=ie.meta,Ee=Se.arg,_e=Se.requestId;if(Ee.subscribe){var Ce=(de=oe[ue=Ee.queryCacheKey])!=null?de:oe[ue]={};return Ce[_e]=(ve=(le=Ee.subscriptionOptions)!=null?le:Ce[_e])!=null?ve:{},!0}}if(F.rejected.match(ie)){var xe=ie.meta,$e=xe.condition,Ee=xe.arg,_e=xe.requestId;if($e&&Ee.subscribe){var Ce=(he=oe[me=Ee.queryCacheKey])!=null?he:oe[me]={};return Ce[_e]=(ce=(pe=Ee.subscriptionOptions)!=null?pe:Ce[_e])!=null?ce:{},!0}}return!1};return function(oe,ie){var se,ue;if(J||(J=JSON.parse(JSON.stringify(V.currentSubscriptions))),$.internalActions.internal_probeSubscription.match(oe)){var de=oe.payload,le=de.queryCacheKey,ve=de.requestId,me=!!((se=V.currentSubscriptions[le])!=null&&se[ve]);return[!1,me]}var he=ae(V.currentSubscriptions,oe);if(he){ee||(queueMicrotaskShim(function(){var ye=JSON.parse(JSON.stringify(V.currentSubscriptions)),_e=cn(J,function(){return ye}),ge=_e[1];ie.next($.internalActions.subscriptionsUpdated(ge)),J=ye,ee=!1}),ee=!0);var pe=!!((ue=oe.type)!=null&&ue.startsWith(K)),ce=F.rejected.match(oe)&&oe.meta.condition&&!!oe.meta.arg.subscribe,fe=!pe&&!ce;return[fe,!1]}return[!0,!1]}};function buildMiddleware(C){var $=C.reducerPath,F=C.queryThunk,V=C.api,K=C.context,J=K.apiUid,ee={invalidateTags:toolkit.createAction($+"/invalidateTags")},te=function(oe){return!!oe&&typeof oe.type=="string"&&oe.type.startsWith($+"/")},ne=[buildDevCheckHandler,buildCacheCollectionHandler,buildInvalidationByTagsHandler,buildPollingHandler,buildCacheLifecycleHandler,buildQueryLifecycleHandler],re=function(oe){var ie=!1,se={currentSubscriptions:{}},ue=__spreadProps$1(__spreadValues$1({},C),{internalState:se,refetchQuery:ae}),de=ne.map(function(me){return me(ue)}),le=buildBatchedActionsHandler(ue),ve=buildWindowEventHandler(ue);return function(me){return function(he){ie||(ie=!0,oe.dispatch(V.internalActions.middlewareRegistered(J)));var pe=__spreadProps$1(__spreadValues$1({},oe),{next:me}),ce=oe.getState(),fe=le(he,pe,ce),ye=fe[0],_e=fe[1],ge;if(ye?ge=me(he):ge=_e,oe.getState()[$]&&(ve(he,pe,ce),te(he)||K.hasRehydrationInfo(he)))for(var be=0,Se=de;be<Se.length;be++){var Ee=Se[be];Ee(he,pe,ce)}return ge}}};return{middleware:re,actions:ee};function ae(oe,ie,se){return se===void 0&&(se={}),F(__spreadValues$1({type:"query",endpointName:oe.endpointName,originalArgs:oe.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:ie},se))}}function safeAssign$1(C){for(var $=[],F=1;F<arguments.length;F++)$[F-1]=arguments[F];Object.assign.apply(Object,__spreadArray$2([C],$))}var coreModuleName=Symbol(),coreModule=function(){return{name:coreModuleName,init:function(C,$,F){var V=$.baseQuery,K=$.tagTypes,J=$.reducerPath,ee=$.serializeQueryArgs,te=$.keepUnusedDataFor,ne=$.refetchOnMountOrArgChange,re=$.refetchOnFocus,ae=$.refetchOnReconnect;T();var oe=function(Me){return typeof process!="undefined"&&process.env.NODE_ENV==="development"&&(K.includes(Me.type)||console.error("Tag type '"+Me.type+"' was used, but not specified in `tagTypes`!")),Me};Object.assign(C,{reducerPath:J,endpoints:{},internalActions:{onOnline,onOffline,onFocus,onFocusLost},util:{}});var ie=buildThunks({baseQuery:V,reducerPath:J,context:F,api:C,serializeQueryArgs:ee}),se=ie.queryThunk,ue=ie.mutationThunk,de=ie.patchQueryData,le=ie.updateQueryData,ve=ie.upsertQueryData,me=ie.prefetch,he=ie.buildMatchThunkActions,pe=buildSlice({context:F,queryThunk:se,mutationThunk:ue,reducerPath:J,assertTagType:oe,config:{refetchOnFocus:re,refetchOnReconnect:ae,refetchOnMountOrArgChange:ne,keepUnusedDataFor:te,reducerPath:J}}),ce=pe.reducer,fe=pe.actions;safeAssign$1(C.util,{patchQueryData:de,updateQueryData:le,upsertQueryData:ve,prefetch:me,resetApiState:fe.resetApiState}),safeAssign$1(C.internalActions,fe);var ye=buildMiddleware({reducerPath:J,context:F,queryThunk:se,mutationThunk:ue,api:C,assertTagType:oe}),_e=ye.middleware,ge=ye.actions;safeAssign$1(C.util,ge),safeAssign$1(C,{reducer:ce,middleware:_e});var be=buildSelectors({serializeQueryArgs:ee,reducerPath:J}),Se=be.buildQuerySelector,Ee=be.buildMutationSelector,Ce=be.selectInvalidatedBy;safeAssign$1(C.util,{selectInvalidatedBy:Ce});var xe=buildInitiate({queryThunk:se,mutationThunk:ue,api:C,serializeQueryArgs:ee,context:F}),$e=xe.buildInitiateQuery,Ie=xe.buildInitiateMutation,De=xe.getRunningMutationThunk,Ne=xe.getRunningMutationsThunk,Fe=xe.getRunningQueriesThunk,Oe=xe.getRunningQueryThunk,Te=xe.getRunningOperationPromises,Ae=xe.removalWarning;return safeAssign$1(C.util,{getRunningOperationPromises:Te,getRunningOperationPromise:Ae,getRunningMutationThunk:De,getRunningMutationsThunk:Ne,getRunningQueryThunk:Oe,getRunningQueriesThunk:Fe}),{name:coreModuleName,injectEndpoint:function(Me,je){var ze,Ve,Xe=C;(Ve=(ze=Xe.endpoints)[Me])!=null||(ze[Me]={}),isQueryDefinition$1(je)?safeAssign$1(Xe.endpoints[Me],{name:Me,select:Se(Me,je),initiate:$e(Me,je)},he(se,Me)):isMutationDefinition$1(je)&&safeAssign$1(Xe.endpoints[Me],{name:Me,select:Ee(),initiate:Ie(Me)},he(ue,Me))}}}}},__spreadArray$1=globalThis&&globalThis.__spreadArray||function(C,$){for(var F=0,V=$.length,K=C.length;F<V;F++,K++)C[K]=$[F];return C},__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=function(C,$,F){return $ in C?__defProp(C,$,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[$]=F},__spreadValues=function(C,$){for(var F in $||($={}))__hasOwnProp.call($,F)&&__defNormalProp(C,F,$[F]);if(__getOwnPropSymbols)for(var V=0,K=__getOwnPropSymbols($);V<K.length;V++){var F=K[V];__propIsEnum.call($,F)&&__defNormalProp(C,F,$[F])}return C},__spreadProps=function(C,$){return __defProps(C,__getOwnPropDescs($))};function useStableQueryArgs(C,$,F,V){var K=React.useMemo(function(){return{queryArgs:C,serialized:typeof C=="object"?$({queryArgs:C,endpointDefinition:F,endpointName:V}):C}},[C,$,F,V]),J=React.useRef(K);return React.useEffect(function(){J.current.serialized!==K.serialized&&(J.current=K)},[K]),J.current.serialized===K.serialized?J.current.queryArgs:C}var UNINITIALIZED_VALUE=Symbol();function useShallowStableValue(C){var $=React.useRef(C);return React.useEffect(function(){reactRedux.shallowEqual($.current,C)||($.current=C)},[C]),reactRedux.shallowEqual($.current,C)?$.current:C}var cache=WeakMap?new WeakMap:void 0,defaultSerializeQueryArgs=function(C){var $=C.endpointName,F=C.queryArgs,V="",K=cache==null?void 0:cache.get(F);if(typeof K=="string")V=K;else{var J=JSON.stringify(F,function(ee,te){return toolkit.isPlainObject(te)?Object.keys(te).sort().reduce(function(ne,re){return ne[re]=te[re],ne},{}):te});toolkit.isPlainObject(F)&&(cache==null||cache.set(F,J)),V=J}return $+"("+V+")"},useIsomorphicLayoutEffect=typeof window!="undefined"&&window.document&&window.document.createElement?React.useLayoutEffect:React.useEffect,defaultMutationStateSelector=function(C){return C},noPendingQueryStateSelector=function(C){return C.isUninitialized?__spreadProps(__spreadValues({},C),{isUninitialized:!1,isFetching:!0,isLoading:C.data===void 0,status:QueryStatus.pending}):C};function buildHooks(C){var $=C.api,F=C.moduleOptions,V=F.batch,K=F.useDispatch,J=F.useSelector,ee=F.useStore,te=F.unstable__sideEffectsInRender,ne=C.serializeQueryArgs,re=C.context,ae=te?function(de){return de()}:React.useEffect;return{buildQueryHooks:se,buildMutationHook:ue,usePrefetch:ie};function oe(de,le,ve){if(le!=null&&le.endpointName&&de.isUninitialized){var me=le.endpointName,he=re.endpointDefinitions[me];ne({queryArgs:le.originalArgs,endpointDefinition:he,endpointName:me})===ne({queryArgs:ve,endpointDefinition:he,endpointName:me})&&(le=void 0)}var pe=de.isSuccess?de.data:le==null?void 0:le.data;pe===void 0&&(pe=de.data);var ce=pe!==void 0,fe=de.isLoading,ye=!ce&&fe,_e=de.isSuccess||fe&&ce;return __spreadProps(__spreadValues({},de),{data:pe,currentData:de.data,isFetching:fe,isLoading:ye,isSuccess:_e})}function ie(de,le){var ve=K(),me=useShallowStableValue(le);return React.useCallback(function(he,pe){return ve($.util.prefetch(de,he,__spreadValues(__spreadValues({},me),pe)))},[de,ve,me])}function se(de){var le=function(he,pe){var ce=pe===void 0?{}:pe,fe=ce.refetchOnReconnect,ye=ce.refetchOnFocus,_e=ce.refetchOnMountOrArgChange,ge=ce.skip,be=ge===void 0?!1:ge,Se=ce.pollingInterval,Ee=Se===void 0?0:Se,Ce=$.endpoints[de].initiate,xe=K(),$e=useStableQueryArgs(be?skipToken:he,defaultSerializeQueryArgs,re.endpointDefinitions[de],de),Ie=useShallowStableValue({refetchOnReconnect:fe,refetchOnFocus:ye,pollingInterval:Ee}),De=React.useRef(!1),Ne=React.useRef(),Fe=Ne.current||{},Oe=Fe.queryCacheKey,Te=Fe.requestId,Ae=!1;if(Oe&&Te){var Me=xe($.internalActions.internal_probeSubscription({queryCacheKey:Oe,requestId:Te}));if(process.env.NODE_ENV!=="production"&&typeof Me!="boolean")throw new Error('Warning: Middleware for RTK-Query API at reducerPath "'+$.reducerPath+`" has not been added to the store.
|
|
434
|
-
You must add the middleware for RTK-Query to function correctly!`);Ae=!!Me}var je=!Ae&&De.current;return ae(function(){De.current=Ae}),ae(function(){je&&(Ne.current=void 0)},[je]),ae(function(){var ze,Ve=Ne.current;if(typeof process!="undefined"&&process.env.NODE_ENV==="removeMeOnCompilation"&&console.log(je),$e===skipToken){Ve==null||Ve.unsubscribe(),Ne.current=void 0;return}var Xe=(ze=Ne.current)==null?void 0:ze.subscriptionOptions;if(!Ve||Ve.arg!==$e){Ve==null||Ve.unsubscribe();var Ye=xe(Ce($e,{subscriptionOptions:Ie,forceRefetch:_e}));Ne.current=Ye}else Ie!==Xe&&Ve.updateSubscriptionOptions(Ie)},[xe,Ce,_e,$e,Ie,je]),React.useEffect(function(){return function(){var ze;(ze=Ne.current)==null||ze.unsubscribe(),Ne.current=void 0}},[]),React.useMemo(function(){return{refetch:function(){var ze;if(!Ne.current)throw new Error("Cannot refetch a query that has not been started yet.");return(ze=Ne.current)==null?void 0:ze.refetch()}}},[])},ve=function(he){var pe=he===void 0?{}:he,ce=pe.refetchOnReconnect,fe=pe.refetchOnFocus,ye=pe.pollingInterval,_e=ye===void 0?0:ye,ge=$.endpoints[de].initiate,be=K(),Se=React.useState(UNINITIALIZED_VALUE),Ee=Se[0],Ce=Se[1],xe=React.useRef(),$e=useShallowStableValue({refetchOnReconnect:ce,refetchOnFocus:fe,pollingInterval:_e});ae(function(){var Ne,Fe,Oe=(Ne=xe.current)==null?void 0:Ne.subscriptionOptions;$e!==Oe&&((Fe=xe.current)==null||Fe.updateSubscriptionOptions($e))},[$e]);var Ie=React.useRef($e);ae(function(){Ie.current=$e},[$e]);var De=React.useCallback(function(Ne,Fe){Fe===void 0&&(Fe=!1);var Oe;return V(function(){var Te;(Te=xe.current)==null||Te.unsubscribe(),xe.current=Oe=be(ge(Ne,{subscriptionOptions:Ie.current,forceRefetch:!Fe})),Ce(Ne)}),Oe},[be,ge]);return React.useEffect(function(){return function(){var Ne;(Ne=xe==null?void 0:xe.current)==null||Ne.unsubscribe()}},[]),React.useEffect(function(){Ee!==UNINITIALIZED_VALUE&&!xe.current&&De(Ee,!0)},[Ee,De]),React.useMemo(function(){return[De,Ee]},[De,Ee])},me=function(he,pe){var ce=pe===void 0?{}:pe,fe=ce.skip,ye=fe===void 0?!1:fe,_e=ce.selectFromResult,ge=$.endpoints[de].select,be=useStableQueryArgs(ye?skipToken:he,ne,re.endpointDefinitions[de],de),Se=React.useRef(),Ee=React.useMemo(function(){return toolkit.createSelector([ge(be),function(De,Ne){return Ne},function(De){return be}],oe)},[ge,be]),Ce=React.useMemo(function(){return _e?toolkit.createSelector([Ee],_e):Ee},[Ee,_e]),xe=J(function(De){return Ce(De,Se.current)},reactRedux.shallowEqual),$e=ee(),Ie=Ee($e.getState(),Se.current);return useIsomorphicLayoutEffect(function(){Se.current=Ie},[Ie]),xe};return{useQueryState:me,useQuerySubscription:le,useLazyQuerySubscription:ve,useLazyQuery:function(he){var pe=ve(he),ce=pe[0],fe=pe[1],ye=me(fe,__spreadProps(__spreadValues({},he),{skip:fe===UNINITIALIZED_VALUE})),_e=React.useMemo(function(){return{lastArg:fe}},[fe]);return React.useMemo(function(){return[ce,ye,_e]},[ce,ye,_e])},useQuery:function(he,pe){var ce=le(he,pe),fe=me(he,__spreadValues({selectFromResult:he===skipToken||pe!=null&&pe.skip?void 0:noPendingQueryStateSelector},pe)),ye=fe.data,_e=fe.status,ge=fe.isLoading,be=fe.isSuccess,Se=fe.isError,Ee=fe.error;return React.useDebugValue({data:ye,status:_e,isLoading:ge,isSuccess:be,isError:Se,error:Ee}),React.useMemo(function(){return __spreadValues(__spreadValues({},fe),ce)},[fe,ce])}}}function ue(de){return function(le){var ve=le===void 0?{}:le,me=ve.selectFromResult,he=me===void 0?defaultMutationStateSelector:me,pe=ve.fixedCacheKey,ce=$.endpoints[de],fe=ce.select,ye=ce.initiate,_e=K(),ge=React.useState(),be=ge[0],Se=ge[1];React.useEffect(function(){return function(){be!=null&&be.arg.fixedCacheKey||be==null||be.reset()}},[be]);var Ee=React.useCallback(function(Ve){var Xe=_e(ye(Ve,{fixedCacheKey:pe}));return Se(Xe),Xe},[_e,ye,pe]),Ce=(be||{}).requestId,xe=React.useMemo(function(){return toolkit.createSelector([fe({fixedCacheKey:pe,requestId:be==null?void 0:be.requestId})],he)},[fe,be,he,pe]),$e=J(xe,reactRedux.shallowEqual),Ie=pe==null?be==null?void 0:be.arg.originalArgs:void 0,De=React.useCallback(function(){V(function(){be&&Se(void 0),pe&&_e($.internalActions.removeMutationResult({requestId:Ce,fixedCacheKey:pe}))})},[_e,pe,be,Ce]),Ne=$e.endpointName,Fe=$e.data,Oe=$e.status,Te=$e.isLoading,Ae=$e.isSuccess,Me=$e.isError,je=$e.error;React.useDebugValue({endpointName:Ne,data:Fe,status:Oe,isLoading:Te,isSuccess:Ae,isError:Me,error:je});var ze=React.useMemo(function(){return __spreadProps(__spreadValues({},$e),{originalArgs:Ie,reset:De})},[$e,Ie,De]);return React.useMemo(function(){return[Ee,ze]},[Ee,ze])}}}var DefinitionType;(function(C){C.query="query",C.mutation="mutation"})(DefinitionType||(DefinitionType={}));function isQueryDefinition(C){return C.type===DefinitionType.query}function isMutationDefinition(C){return C.type===DefinitionType.mutation}function capitalize$1(C){return C.replace(C[0],C[0].toUpperCase())}function safeAssign(C){for(var $=[],F=1;F<arguments.length;F++)$[F-1]=arguments[F];Object.assign.apply(Object,__spreadArray$1([C],$))}var reactHooksModuleName=Symbol(),reactHooksModule=function(C){var $=C===void 0?{}:C,F=$.batch,V=F===void 0?reactRedux.batch:F,K=$.useDispatch,J=K===void 0?reactRedux.useDispatch:K,ee=$.useSelector,te=ee===void 0?reactRedux.useSelector:ee,ne=$.useStore,re=ne===void 0?reactRedux.useStore:ne,ae=$.unstable__sideEffectsInRender,oe=ae===void 0?!1:ae;return{name:reactHooksModuleName,init:function(ie,se,ue){var de=se.serializeQueryArgs,le=ie,ve=buildHooks({api:ie,moduleOptions:{batch:V,useDispatch:J,useSelector:te,useStore:re,unstable__sideEffectsInRender:oe},serializeQueryArgs:de,context:ue}),me=ve.buildQueryHooks,he=ve.buildMutationHook,pe=ve.usePrefetch;return safeAssign(le,{usePrefetch:pe}),safeAssign(ue,{batch:V}),{injectEndpoint:function(ce,fe){if(isQueryDefinition(fe)){var ye=me(ce),_e=ye.useQuery,ge=ye.useLazyQuery,be=ye.useLazyQuerySubscription,Se=ye.useQueryState,Ee=ye.useQuerySubscription;safeAssign(le.endpoints[ce],{useQuery:_e,useLazyQuery:ge,useLazyQuerySubscription:be,useQueryState:Se,useQuerySubscription:Ee}),ie["use"+capitalize$1(ce)+"Query"]=_e,ie["useLazy"+capitalize$1(ce)+"Query"]=ge}else if(isMutationDefinition(fe)){var Ce=he(ce);safeAssign(le.endpoints[ce],{useMutation:Ce}),ie["use"+capitalize$1(ce)+"Mutation"]=Ce}}}}}},createApi=buildCreateApi(coreModule(),reactHooksModule());let baseUrl="http://localhost:8000";const dynamicBaseQuery=(C,$,F)=>sr(this,null,function*(){return fetchBaseQuery({baseUrl,prepareHeaders:K=>{if(K.set("Content-Type","application/json"),typeof window!="undefined"){const J=document.querySelector('meta[name="csrf-token"]');J&&K.set("X-CSRF-Token",J.content)}return K}})(C,$,F)}),careerHubApi=createApi({reducerPath:"careerHubApi",baseQuery:dynamicBaseQuery,tagTypes:["CareerHub","Jobs","PipelineJobs","RelevantJobs","FilterOptions","JobPreview","JobAlerts"],endpoints:()=>({})}),setBaseUrl=C=>{C!==baseUrl&&(baseUrl=C)},BASE_URL="/api/v3/careers-hub/applications",createApplicationService=careerHubApi.injectEndpoints({endpoints:C=>({createApplication:C.mutation({query:({jobProfileId:$,utmMedium:F,utmSource:V,currentTab:K,utmId:J})=>({url:BASE_URL,method:"POST",body:{job_profile_id:$,medium:F!=null?F:"ch",origin:V!=null?V:"direct",tab_name:K,action_type:J!=null?J:"apply"}}),invalidatesTags:["Jobs","PipelineJobs","RelevantJobs"]}),getApplication:C.query({query:({applicationId:$,jobProfileId:F,status:V})=>({url:`${BASE_URL}/${$}`,params:{job_profile_id:F,step_name:V}})}),updateApplication:C.mutation({query:({applicationId:$,payload:F})=>({url:`${BASE_URL}/${$}`,method:"PATCH",body:F}),invalidatesTags:["Jobs","PipelineJobs","RelevantJobs"]})})}),{useCreateApplicationMutation,useGetApplicationQuery,useUpdateApplicationMutation}=createApplicationService,useCreateApplication=({jobProfileId:C,utmMedium:$,utmSource:F,currentTab:V,utmId:K})=>{const[J,ee]=React.useState(null),[te,ne]=React.useState(null),[re,{isLoading:ae,isError:oe,error:ie,isSuccess:se}]=useCreateApplicationMutation(),ue=React.useCallback(()=>sr(this,null,function*(){var le,ve,me,he;const de=yield re({jobProfileId:C,utmMedium:$,utmSource:F,currentTab:V,utmId:K});ee((ve=(le=de==null?void 0:de.data)==null?void 0:le.user_company)==null?void 0:ve.id),ne((he=(me=de==null?void 0:de.data)==null?void 0:me.user_company)==null?void 0:he.status)}),[re,C,$,F,V,K]);return React.useEffect(()=>{ue()},[ue]),{retry:ue,data:{status:te,applicationId:J},isLoading:ae,isError:oe,error:ie,isSuccess:se}},useApplicationForm=({jobProfileId:C,applicationId:$,status:F})=>{var re;const{data:V,isLoading:K,isError:J,error:ee,isSuccess:te,refetch:ne}=useGetApplicationQuery({applicationId:$,jobProfileId:C,status:F},{skip:!$||!F});return{retry:ne,data:(re=V==null?void 0:V.details)==null?void 0:re.data,isLoading:K,isError:J,error:ee,isSuccess:te}};function convertArraySingletonsToObject(C){return C.map($=>({label:$,value:$}))}const JOB_CARD_CONFIG={home:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},all:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},eligible:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},saved:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},applications:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!0,isArchivedStatusAvailable:!0,isApplicationStatusAvailable:!0},archived:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!0,isApplicationStatusAvailable:!1}},APPLICATION_STATUS$1={NOT_APPLIED:"Not Applied",SAVED:"Saved",APPLIED:"Applied",IN_PIPELINE:"In Pipeline",ARCHIVED:"Archived"},JOB_PROFILE_STATUS={ACTIVE:"active",PAUSED:"paused",INACTIVE:"inactive"},TABS={HOME:"home",ALL:"all",ELIGIBLE:"eligible",SAVED:"saved",APPLICATIONS:"applications",ARCHIVED:"archived"},WITHDRAW_REASONS=convertArraySingletonsToObject(["Got another offer","Company didn't match expectations","Need more prep time","Applied by mistake","Other"]),useJobCardState=({currentTab:C,isActive:$,jobData:F})=>{const V=React.useMemo(()=>JOB_CARD_CONFIG[C]||JOB_CARD_CONFIG.all,[C]),K=React.useMemo(()=>!0,[]),J=React.useMemo(()=>F.expiry?new Date(F.expiry)<new Date||F.jobProfileStatus!=="active":!1,[F.expiry,F.jobProfileStatus]);return{cardConfig:V,shouldShowBody:K,isExpired:J}},useJobFilters=()=>{const C=reactRedux.useSelector(F=>{var V;return((V=F.scalantCareerHub)==null?void 0:V.filter)||{}});return React.useMemo(()=>{const{filters:F,per_page:V,tab:K,page_number:J,sortings:ee,skip_expired_jobs:te}=C;return{per_page:V,tab:K,filters:F||{keyword:""},sortings:ee,page_number:J,skip_expired_jobs:te}},[C])},useInfiniteScroll=({hasMore:C=!0,isLoading:$=!1,isFetchingMore:F=!1,rootMargin:V="100px",threshold:K=.1}={})=>{const J=reactRedux.useDispatch(),ee=reactRedux.useSelector(oe=>{var ie,se;return((se=(ie=oe.scalantCareerHub)==null?void 0:ie.filter)==null?void 0:se.page_number)||1}),te=React.useRef(null),ne=React.useRef(null),re=React.useCallback(()=>{!$&&!F&&C&&J(setPageNumber(ee+1))},[J,ee,$,F,C]);return React.useEffect(()=>{const oe=te.current;if(ne.current&&(oe&&ne.current.unobserve(oe),ne.current=null),!oe||!C||$||F)return;const ie=new IntersectionObserver(se=>{const[ue]=se;ue.isIntersecting&&re()},{root:null,rootMargin:V,threshold:K});return ie.observe(oe),ne.current=ie,()=>{ne.current&&oe&&(ne.current.unobserve(oe),ne.current=null)}},[re,C,$,F,V,K]),{sentinelRef:React.useCallback(oe=>{if(te.current&&ne.current&&(ne.current.unobserve(te.current),ne.current=null),te.current=oe,oe&&C&&!$&&!F){const ie=new IntersectionObserver(se=>{const[ue]=se;ue.isIntersecting&&re()},{root:null,rootMargin:V,threshold:K});ie.observe(oe),ne.current=ie}},[re,C,$,F,V,K])}},APPLICATION_STATUS={APPLICATION_FORM:"application_form",RESUME_FITMENT_CHECK:"resume_fitment_check",RESUME_CHOICE_SELECT:"resume_choice_select",SAVED:"Saved",WITHDRAWN:"Application Withdrawn",SUCCESSFULLY_APPLIED:"successfully_applied"},SIDER_WIDTH={PROFILE_DETAILS:"25%",JOB_DETAILS:"60%"},JOB_FILTER_TAGS={relevant:{label:"Preferred Jobs",icon:UnlockOutlined$1},all:{label:"All Jobs",icon:RiseOutlined$1},saved:{label:"Saved",icon:DownloadOutlined$1},applied:{label:"Applied",icon:CheckCircleOutlined$1}},TAG_TO_TAB_MAPPING={relevant:"relevant",all:"all",saved:"saved",applied:"applications"},COUNT_TO_TAB_MAPPING={relevant:"relevant",all:"all",saved:"saved",applied:"applications"},SORTING_OPTIONS={eligibility:{label:"Eligibility",value:"eligibility",mapping:{property:"eligibility",direction:"DESC"}},popularity:{label:"Popularity",value:"popularity",mapping:{property:"popularity",direction:"DESC"}},leastApplied:{label:"Least Applied",value:"leastApplied",mapping:{property:"popularity",direction:"ASC"}},mostRecent:{label:"Most Recent",value:"mostRecent",mapping:{property:"date_posted_on",direction:"DESC"}}},JOB_BODY_TABS={ABOUT_ROLE:{key:"about-role",label:"About Role"},REQUIREMENTS:{key:"requirements",label:"Requirements"},APPLICATION_TIMELINE:{key:"application-timeline",label:"Application Timeline"}},ALERT_FREQUENCY={REALTIME:0,DAILY:1,ALTERNATE_DAY:2,WEEKLY:7},ALERT_FREQUENCY_LABELS={[ALERT_FREQUENCY.REALTIME]:"Realtime",[ALERT_FREQUENCY.DAILY]:"Daily",[ALERT_FREQUENCY.ALTERNATE_DAY]:"Every alternate day",[ALERT_FREQUENCY.WEEKLY]:"Weekly"},ALERT_NOTIFICATION_TYPE={EMAIL:"email",WHATSAPP:"whatsapp",BOTH:"both"},ALERT_NOTIFICATION_LABELS={[ALERT_NOTIFICATION_TYPE.EMAIL]:"On Email",[ALERT_NOTIFICATION_TYPE.WHATSAPP]:"On Whatsapp",[ALERT_NOTIFICATION_TYPE.BOTH]:"On Email & Whatsapp"},ALERT_STATUS={ACTIVE:"active",INACTIVE:"inactive"},DEFAULT_PROCESS_COUNTS={all:0,relevant:0,draft:0,applications:0,saved:0,archived:0},HYDRATION_KEY="__CAREERS_HUB__",getCurrentSortingValue=(C=[])=>{if(!C||C.length===0)return"eligibility";const $=C[0];for(const F of Object.values(SORTING_OPTIONS))if(F.mapping.property===$.property&&F.mapping.direction===$.direction)return F.value;return"eligibility"},accumulateJobs=(C=[],$=[])=>{if(!$||$.length===0)return C;const F=new Set(C.map(K=>K.id)),V=$.filter(K=>!F.has(K.id));return[...C,...V]},accumulateCompaniesMap=(C={},$={})=>Hn(Hn({},C),$),useAccumulatedJobs=(C,$=!1,F=!1,V=null)=>{const K=reactRedux.useSelector(le=>{var ve,me;return((me=(ve=le.scalantCareerHub)==null?void 0:ve.filter)==null?void 0:me.page_number)||1}),J=reactRedux.useSelector(le=>{var ve,me;return((me=(ve=le.scalantCareerHub)==null?void 0:ve.dashboard)==null?void 0:me.processCounts)||{}}),[ee,te]=React.useState([]),[ne,re]=React.useState({}),ae=React.useMemo(()=>(C==null?void 0:C.jobs)||(C==null?void 0:C.results)||[],[C==null?void 0:C.jobs,C==null?void 0:C.results]),oe=React.useMemo(()=>(C==null?void 0:C.companiesMap)||{},[C==null?void 0:C.companiesMap]),ie=React.useMemo(()=>V||null,[V]),se=React.useMemo(()=>typeof(C==null?void 0:C.totalEntries)=="number"?C.totalEntries:ie?J[ie]||0:null,[ie,J,C==null?void 0:C.totalEntries]);React.useEffect(()=>{K===1?(te(ae),re(oe)):ae.length>0&&(te(le=>accumulateJobs(le,ae)),re(le=>accumulateCompaniesMap(le,oe)))},[ae,oe,K]);const ue=React.useMemo(()=>se===null?ae.length>0:ee.length<se,[se,ee.length,ae.length]),de=$&&K>1;return{accumulatedJobs:ee,accumulatedCompaniesMap:ne,hasMore:ue,isFetchingMore:de,isLoading:(F||$)&&K===1}},filterService=careerHubApi.injectEndpoints({endpoints:C=>({getCompanies:C.query({query:$=>({url:"/job-tracker/filters/",params:{query_type:"companies",q:$}}),transformResponse:$=>($.data||[]).map(V=>({id:V.id,value:V.attributes.name})),providesTags:["FilterOptions"]}),getTitles:C.query({query:$=>({url:"/job-tracker/filters/",params:{query_type:"title",q:$}}),transformResponse:$=>{const F=($.data||[]).map(K=>({id:K.id,value:K.attributes.title||K.attributes.name}));let V={};return F.forEach(K=>{V[K.value]=K.value}),Object.keys(V).map(K=>({key:K,value:V[K]}))},providesTags:["FilterOptions"]}),getExperienceSkills:C.query({query:$=>({url:"/user/skills/all",params:{prefix_q:$}}),transformResponse:$=>($.all_skills||[]).map(V=>({skill_id:V.skill_id,key:V.key,skill_type:V.skill_type})).filter(V=>V.key&&V.skill_id&&V.skill_type).map(V=>({key:V.skill_id,value:V.key,type:V.skill_type})),providesTags:["FilterOptions"]})})}),{useGetCompaniesQuery,useGetTitlesQuery,useGetExperienceSkillsQuery}=filterService,convertToSelectOption=(C,$,F=$)=>!C||!Array.isArray(C)?[]:C.map(V=>({key:V[$],value:V[F]})),minCtcOptions=new Array(5).fill(1).map((C,$)=>({value:(C+$)*5,label:`>= ${(C+$)*5} Lakhs`})),minCtcUSOptions=[{value:20,label:">= 20K"},{value:30,label:">= 30K"},{value:50,label:">= 50K"},{value:75,label:">= 75K"},{value:100,label:">= 100K"}],mockInterviewSkillOptions=[{value:0,label:"Must to Have"},{value:1,label:"Good to Have"},{value:2,label:"Bar Raiser"},{value:3,label:"Must to Have (Eligibility)"}],datePostedOnOptions=[{value:1,label:"Last 24 hours"},{value:3,label:"Last 3 days"},{value:7,label:"Last 7 days"},{value:30,label:"Last 30 days"}],seniorityLevelOptions=[{value:202948,label:"Fresher"},{value:202949,label:"Entry - Mid"},{value:202950,label:"Mid - Senior"},{value:202951,label:"Senior"}],stipendOptions=[{value:1e4,label:">= 10K"},{value:2e4,label:">= 20K"},{value:3e4,label:">= 30K"},{value:4e4,label:">= 40K"},{value:5e4,label:">= 50K"},{value:6e4,label:">= 60K"}],internshipDurationOptions=[{value:3,label:">= 3 months"},{value:6,label:">= 6 months"},{value:9,label:">= 9 months"},{value:12,label:">= 12 months"}],jobTypeOptions=[{value:"Full time roles",key:"full_time"},{value:"Internship roles",key:"internship"}],MONTH_OPTIONS$1=new Array(3).fill(1).map((C,$)=>({value:((C+$+1)*30).toString(),label:`greater than ${C+$+1} Months`})),NOTICE_PERIOD_OPTIONS$1=[{value:"not filled",label:"Not Available"},{value:"0",label:"0 Days"},{value:"15",label:"greater than 15 Days"},{value:"30",label:"greater than 30 Days"},{value:"45",label:"greater than 45 Days"},...MONTH_OPTIONS$1],getMinCtcOptions=C=>C?minCtcUSOptions:minCtcOptions,getProficiencyOptions=C=>C?Object.entries(C).map(([$,F])=>({value:F,label:$})):mockInterviewSkillOptions,getMeritBasedSkillOptions=C=>!C||!Array.isArray(C)?[]:C.map($=>({value:$.id,label:$.title})),getExperienceSkillOptions=C=>!C||!Array.isArray(C)?[]:C.map($=>({value:$.subtopic_id,label:$.subtopic,type:$.eligible_class||"SubTopic"})),filterOptions={minCtcOptions,minCtcUSOptions,getMinCtcOptions,mockInterviewSkillOptions,datePostedOnOptions,seniorityLevelOptions,stipendOptions,internshipDurationOptions,jobTypeOptions,NOTICE_PERIOD_OPTIONS:NOTICE_PERIOD_OPTIONS$1,convertToSelectOption,getProficiencyOptions,getMeritBasedSkillOptions,getExperienceSkillOptions},initialState$7={companyOptions:[],titleOptions:[],experienceSkillOptions:[]},filterOptionsSlice=toolkit.createSlice({name:"filterOptions",initialState:initialState$7,reducers:{setCompanyOptions:(C,$)=>{C.companyOptions=convertToSelectOption($.payload,"id","value")},setTitleOptions:(C,$)=>{C.titleOptions=$.payload},setExperienceSkillOptions:(C,$)=>{C.experienceSkillOptions=$.payload},clearCompanyOptions:C=>{C.companyOptions=[]},clearTitleOptions:C=>{C.titleOptions=[]},clearExperienceSkillOptions:()=>{},clearAllOptions:C=>{C.companyOptions=[],C.titleOptions=[],C.experienceSkillOptions=[]}},extraReducers:C=>{C.addMatcher(filterService.endpoints.getCompanies.matchFulfilled,($,F)=>{$.companyOptions=convertToSelectOption(F.payload,"id","value")}),C.addMatcher(filterService.endpoints.getTitles.matchFulfilled,($,F)=>{$.titleOptions=F.payload}),C.addMatcher(filterService.endpoints.getExperienceSkills.matchFulfilled,($,F)=>{const V=F.payload||[],K=$.experienceSkillOptions||[],J=new Map(K.map(ee=>[ee.key,ee]));V.forEach(ee=>{J.set(ee.key,ee)}),$.experienceSkillOptions=Array.from(J.values())})}}),{setCompanyOptions,setTitleOptions,setExperienceSkillOptions,clearCompanyOptions,clearTitleOptions,clearExperienceSkillOptions,clearAllOptions}=filterOptionsSlice.actions,filterOptionsReducer=filterOptionsSlice.reducer,useDebounce=(C,$)=>{const F=React.useRef(null);return React.useCallback((...V)=>{F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{C(...V)},$)},[C,$])},useAsyncFilterOptions=()=>{const C=reactRedux.useDispatch(),[$,F]=React.useState(""),[V,K]=React.useState(""),[J,ee]=React.useState(""),{isLoading:te,isFetching:ne}=useGetCompaniesQuery($,{skip:!$||$.length<3}),{isLoading:re,isFetching:ae}=useGetTitlesQuery(V,{skip:!V||V.length<3}),{isLoading:oe,isFetching:ie}=useGetExperienceSkillsQuery(J,{skip:!J||J.length<2});React.useEffect(()=>{(!$||$.length<3)&&C(clearCompanyOptions())},[$,C]),React.useEffect(()=>{(!V||V.length<3)&&C(clearTitleOptions())},[V,C]),React.useEffect(()=>{(!J||J.length<2)&&C(clearExperienceSkillOptions())},[J,C]);const se=React.useCallback(pe=>{F(pe)},[]),ue=useDebounce(se,300),de=React.useCallback(pe=>{K(pe)},[]),le=useDebounce(de,300),ve=React.useCallback(pe=>{ee(pe)},[]),me=useDebounce(ve,300),he=React.useCallback((pe,ce)=>pe.map(fe=>{const ye=ce==null?void 0:ce.find(_e=>_e.key===fe);return{experience_skill_id:fe,skill_type:(ye==null?void 0:ye.type)||"SubTopic"}}),[]);return{handleCompanySearch:ue,handleTitleSearch:le,handleExperienceSkillSearch:me,handleExperienceSkillChange:he,loadingCompanies:te||ne,loadingTitles:re||ae,loadingExperienceSkills:oe||ie}},useFilterMetaOptions=()=>{const C=reactRedux.useSelector(se=>{var ue;return((ue=se.scalantCareerHub.metaData)==null?void 0:ue.meta)||{}}),$=React.useMemo(()=>filterOptions.jobTypeOptions,[]),F=React.useMemo(()=>convertToSelectOption(C.jobCategories||[],"value","label"),[C.jobCategories]),V=React.useMemo(()=>convertToSelectOption(C.seniorityLevels||[],"value","label"),[C.seniorityLevels]),K=React.useMemo(()=>convertToSelectOption(C.companyCategories||[],"value","label"),[C.companyCategories]),J=React.useMemo(()=>convertToSelectOption(C.jobLocations||[],"label"),[C.jobLocations]),ee=React.useMemo(()=>convertToSelectOption(C.meritBasedSkills||[],"id","title"),[C.meritBasedSkills]),te=React.useMemo(()=>filterOptions.getMinCtcOptions(!1),[]),ne=React.useMemo(()=>filterOptions.stipendOptions,[]),re=React.useMemo(()=>filterOptions.internshipDurationOptions,[]),ae=React.useMemo(()=>filterOptions.NOTICE_PERIOD_OPTIONS,[]),oe=React.useMemo(()=>filterOptions.datePostedOnOptions,[]),ie=React.useMemo(()=>filterOptions.mockInterviewSkillOptions,[]);return{jobTypes:$,functions:F,seniorityLevels:V,companyCategories:K,locations:J,mbeSkills:ee,ctcRanges:te,stipendRanges:ne,durationRanges:re,noticePeriods:ae,datePostedOptions:oe,skillRatings:ie}},initialState$6={selectedJobId:null},layoutSlice=toolkit.createSlice({name:"layout",initialState:initialState$6,reducers:{setSelectedJobId:(C,$)=>{C.selectedJobId=$.payload},clearSelectedJobId:C=>{C.selectedJobId=null}}}),{setSelectedJobId,clearSelectedJobId}=layoutSlice.actions,layoutReducer=layoutSlice.reducer,serializeFiltersToQueryParams=C=>{const $=new URLSearchParams;return!C||typeof C!="object"||Object.keys(C).forEach(F=>{const V=C[F];if(!(V==null||V===""))if(Array.isArray(V))V.length>0&&$.append(F,V.join(","));else if(typeof V=="object")try{$.append(F,JSON.stringify(V))}catch(K){}else $.append(F,String(V))}),$},deserializeQueryParamsToFilters=C=>{const $={};return(typeof C=="string"?new URLSearchParams(C):C).forEach((V,K)=>{try{const J=JSON.parse(V);if(typeof J=="object"){$[K]=J;return}}catch(J){}if(V.includes(","))$[K]=V.split(",").filter(J=>J.trim()!=="");else if(!isNaN(V)&&V!==""){const J=Number(V);isNaN(J)?$[K]=V:$[K]=J}else $[K]=V}),$},updateURLWithFilters=C=>{if(typeof window=="undefined")return;const $=serializeFiltersToQueryParams(C),F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getFiltersFromURL=()=>typeof window=="undefined"?{}:deserializeQueryParamsToFilters(window.location.search),updateURLWithJobId=C=>{if(typeof window=="undefined")return;const $=new URLSearchParams(window.location.search);C?$.set("job_ids",String(C)):$.delete("job_ids");const F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getJobIdFromURL=()=>typeof window=="undefined"?null:new URLSearchParams(window.location.search).get("job_ids")||null,updateURLWithTab=C=>{if(typeof window=="undefined")return;const $=new URLSearchParams(window.location.search);C?$.set("tab",String(C)):$.delete("tab");const F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getTabFromURL=()=>typeof window=="undefined"?null:new URLSearchParams(window.location.search).get("tab")||null;function useJobQueryParams({syncToURL:C=!0,syncFromURL:$=!0}={}){const F=reactRedux.useDispatch(),V=reactRedux.useSelector(ae=>ae.scalantCareerHub.layout.selectedJobId),K=reactRedux.useSelector(ae=>{var oe,ie;return((ie=(oe=ae.scalantCareerHub)==null?void 0:oe.filter)==null?void 0:ie.tab)||TAG_TO_TAB_MAPPING.relevant}),J=React.useRef(!1),ee=React.useRef(!1);React.useEffect(()=>{if(!$||J.current)return;ee.current=!0;const ae=getTabFromURL(),oe=getJobIdFromURL();if(ae&&Object.values(TAG_TO_TAB_MAPPING).includes(ae)&&F(setTab(ae)),oe){const ie=Number(oe);isNaN(ie)||F(setSelectedJobId(ie))}J.current=!0,ee.current=!1},[F,$]),React.useEffect(()=>{!C||ee.current||!J.current||updateURLWithTab(K)},[K,C]),React.useEffect(()=>{!C||ee.current||!J.current||updateURLWithJobId(V||null)},[V,C]);const te=ae=>{F(ae?setSelectedJobId(ae):clearSelectedJobId()),C&&updateURLWithJobId(ae)},ne=ae=>{Object.values(TAG_TO_TAB_MAPPING).includes(ae)&&(F(setTab(ae)),C&&updateURLWithTab(ae))};return{currentTab:K,selectedJobId:V,updateJobId:te,updateTab:ne,updateTabAndJobId:(ae,oe)=>{ne(ae),te(oe)}}}const PRODUCT_NAME="Jobs Page V2",container$a="_container_lsttj_1",tag$2="_tag_lsttj_6",styles$K={container:container$a,tag:tag$2};function FilterTags({analytics:C}){const $=reactRedux.useDispatch(),{selectedJobId:F,updateJobId:V}=useJobQueryParams({syncFromURL:!1}),K=()=>{C==null||C.click("Filter Tags - Remove Job Filter",PRODUCT_NAME),V(null),$(updateFormFilters({job_ids:null}))};return F?React.createElement(Flex$1,{className:styles$K.container},React.createElement(Typography$1.Text,{className:styles$K.title},"Job Selected:"),React.createElement(Tag$1,{color:"blue",className:styles$K.tag,onClick:K},`ID#${F}`,React.createElement(CloseOutlined$1,{className:styles$K.closeIcon}))):React.createElement("div",{className:styles$K.container})}const content="_content_qwyxb_1",header$2="_header_qwyxb_10",sider="_sider_qwyxb_18",layout="_layout_qwyxb_22",styles$J={content,header:header$2,sider,layout},{Header,Sider,Content}=Layout$1;function JobsLayout({analytics:C,header:$,children:F,className:V,sider:K,siderWidth:J}){return React.createElement(Layout$1,{className:V},React.createElement(Header,{className:styles$J.header},$||"Header"),React.createElement(FilterTags,{analytics:C}),React.createElement(Layout$1,{className:styles$J.layout},React.createElement(Content,{className:styles$J.content},F),K&&React.createElement(Sider,{className:styles$J.sider,width:J||"25%"},K)))}JobsLayout.propTypes={analytics:PropTypes.object,children:PropTypes.node.isRequired,className:PropTypes.string,sider:PropTypes.node,siderWidth:PropTypes.oneOfType([PropTypes.string,PropTypes.number])},JobsLayout.defaultProps={className:"",sider:null,siderWidth:"25%"};const toCamelCase=C=>C&&C.replace(/_([a-z])/g,$=>$[1].toUpperCase()),toTitleCase=C=>!C||typeof C!="string"?C:C.toLowerCase().split(/[\s_]+/).map($=>$.charAt(0).toUpperCase()+$.slice(1)).join(" "),toCase=(C,$)=>{if(!$||typeof $!="string")return $;switch(C){case"camelCase":return toCamelCase($);case"titleCase":return toTitleCase($);default:return $}},toCamelCaseObject=C=>{if(C==null)return C;if(Array.isArray(C))return C.map(toCamelCaseObject);if(typeof C=="object"){const $={};return Object.keys(C).forEach(F=>{const V=toCamelCase(F);$[V]=toCamelCaseObject(C[F])}),$}return C},countPendingSteps=(C,$)=>{let F=0;return C!=null&&C.data&&Object.values(C.data).forEach(V=>{V.contests&&V.contests.cleared===!1&&(F+=1),V.skills&&V.skills.cleared===!1&&(F+=1)}),$!=null&&$.data&&Object.values($.data).forEach(V=>{V.data&&V.data.cleared===!1&&(F+=1)}),F},checkAllOtherRequirementsMet=(C,$)=>["experience","notice_period"].every(V=>{if(V===$)return!0;const K=C[V];return!K||K.isEligible}),ELIGIBILITY_TYPES={quick_apply:"quick_apply",eligible:"eligible",ineligible:"ineligible",steps_to_apply:"steps_to_apply",notice_period_mismatch:"notice_period_mismatch",expired:"expired"},NON_WITHDRAW_STATUSES=["Rejected","Offer Withdrawn","To Be Offered","Offer Accepted","Offer Declined","Joined","Offer Received"],determineJobTag=(C,$)=>{const{isRelevant:F,expiry:V,jobProfileStatus:K}=toCamelCaseObject(C),{isEligible:J,reasons:ee=[]}=toCamelCaseObject($)||{};if(V&&(new Date(V)<new Date||K!=="active"))return{tag:"expired",text:"Job Expired",icon:"ClockCircleOutlined",color:"#FF9C6E",antdColor:"volcano"};const ne=ee.reduce((ue,de)=>(ue[de.label]=de,ue),{}),re=ne.experience,ae=ne.notice_period,oe=ne.skills,ie=ne.tech_stacks;if(J&&F)return{tag:"quick_apply",text:"Quick Apply",icon:"CheckCircleOutlined",color:"#1A8452",antdColor:"green"};if(J)return{tag:"eligible",text:"Eligible",icon:"CheckCircleOutlined",color:"#1A8452",antdColor:"green"};if(re&&!re.isEligible)return{tag:"ineligible",text:"Ineligible",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"};if(ae&&!ae.isEligible&&checkAllOtherRequirementsMet(ne,"notice_period"))return{tag:"notice_period_mismatch",text:"Notice Period Mismatch",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"};const se=countPendingSteps(oe,ie);return se>0&&checkAllOtherRequirementsMet(ne,"skills")?{tag:"steps_to_apply",text:`${se} ${se===1?"step":"steps"} pending`,icon:"RocketOutlined",color:"#2F54EB",antdColor:"geekblue",count:se}:{tag:ELIGIBILITY_TYPES.ineligible,text:"Ineligible",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"}},formatExperience$1=(C,$)=>{if(C===0&&$===0)return"Fresher";const F=Math.floor(C/12),V=Math.floor($/12);return F===V?`${F}y Experience`:V===0?"Fresher":F===0?`${V}y Experience`:`${F}y - ${V}y Experience`},formatCtc=({minCtc:C,maxCtc:$,openForDiscussionCtc:F,isInternship:V,stipend:K,userCountry:J="IN"})=>{if(V)return K?`₹${K}/month`:"Unpaid Internship";const ee=J==="US"?"$":"₹",te=J==="US"?"K":"L";return C===null||$===null||C===void 0||$===void 0?`${ee} (Flexible)`:F?`${ee}${C}${te}+ (Negotiable)`:C===$?`${ee}${C}${te} CTC`:`${ee}${C}${te} - ${ee}${$}${te} CTC`},formatNoticePeriod=C=>!C||C===0?"Immediate":`${C} days Notice Period`,formatDate=C=>{if(!C)return"";const $=new Date(C),F=String($.getDate()).padStart(2,"0"),V=String($.getMonth()+1).padStart(2,"0"),K=$.getFullYear();return`${F}/${V}/${K}`},formatLocation=C=>{if(!C)return null;const $=C.split(",").map(F=>F.trim()).filter(Boolean);return $.length===0?null:$.length===1?$[0]:`${$[0]} +${$.length-1} more`};function formatProdErrorMessage(C){return"Minified Redux error #"+C+"; visit https://redux.js.org/Errors?code="+C+" for the full message or use the non-minified dev environment for full errors. "}var randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(C){if(typeof C!="object"||C===null)return!1;for(var $=C;Object.getPrototypeOf($)!==null;)$=Object.getPrototypeOf($);return Object.getPrototypeOf(C)===$}function miniKindOf(C){if(C===void 0)return"undefined";if(C===null)return"null";var $=typeof C;switch($){case"boolean":case"string":case"number":case"symbol":case"function":return $}if(Array.isArray(C))return"array";if(isDate(C))return"date";if(isError(C))return"error";var F=ctorName(C);switch(F){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return F}return $.slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(C){return typeof C.constructor=="function"?C.constructor.name:null}function isError(C){return C instanceof Error||typeof C.message=="string"&&C.constructor&&typeof C.constructor.stackTraceLimit=="number"}function isDate(C){return C instanceof Date?!0:typeof C.toDateString=="function"&&typeof C.getDate=="function"&&typeof C.setDate=="function"}function kindOf(C){var $=typeof C;return process.env.NODE_ENV!=="production"&&($=miniKindOf(C)),$}function warning$1(C){typeof console!="undefined"&&typeof console.error=="function"&&console.error(C);try{throw new Error(C)}catch($){}}function getUnexpectedStateShapeWarningMessage(C,$,F,V){var K=Object.keys($),J=F&&F.type===ActionTypes.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(K.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject(C))return"The "+J+' has unexpected type of "'+kindOf(C)+'". Expected argument to be an object with the following '+('keys: "'+K.join('", "')+'"');var ee=Object.keys(C).filter(function(te){return!$.hasOwnProperty(te)&&!V[te]});if(ee.forEach(function(te){V[te]=!0}),!(F&&F.type===ActionTypes.REPLACE)&&ee.length>0)return"Unexpected "+(ee.length>1?"keys":"key")+" "+('"'+ee.join('", "')+'" found in '+J+". ")+"Expected to find one of the known reducer keys instead: "+('"'+K.join('", "')+'". Unexpected keys will be ignored.')}function assertReducerShape(C){Object.keys(C).forEach(function($){var F=C[$],V=F(void 0,{type:ActionTypes.INIT});if(typeof V=="undefined")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(12):'The slice reducer for key "'+$+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof F(void 0,{type:ActionTypes.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(13):'The slice reducer for key "'+$+'" returned undefined when probed with a random type. '+("Don't try to handle '"+ActionTypes.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function combineReducers(C){for(var $=Object.keys(C),F={},V=0;V<$.length;V++){var K=$[V];process.env.NODE_ENV!=="production"&&typeof C[K]=="undefined"&&warning$1('No reducer provided for key "'+K+'"'),typeof C[K]=="function"&&(F[K]=C[K])}var J=Object.keys(F),ee;process.env.NODE_ENV!=="production"&&(ee={});var te;try{assertReducerShape(F)}catch(ne){te=ne}return function(re,ae){if(re===void 0&&(re={}),te)throw te;if(process.env.NODE_ENV!=="production"){var oe=getUnexpectedStateShapeWarningMessage(re,F,ae,ee);oe&&warning$1(oe)}for(var ie=!1,se={},ue=0;ue<J.length;ue++){var de=J[ue],le=F[de],ve=re[de],me=le(ve,ae);if(typeof me=="undefined"){var he=ae&&ae.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(14):"When called with an action of type "+(he?'"'+String(he)+'"':"(unknown type)")+', the slice reducer for key "'+de+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}se[de]=me,ie=ie||me!==ve}return ie=ie||J.length!==Object.keys(re).length,ie?se:re}}const initialState$5={processCounts:DEFAULT_PROCESS_COUNTS,userProfileData:null,filterModalOpen:!1,jobAlertModalOpen:!1},dashboardSlice=toolkit.createSlice({name:"dashboard",initialState:initialState$5,reducers:{setProcessCounts:(C,$)=>{C.processCounts=$.payload},setUserProfileData:(C,$)=>{C.userProfileData=$.payload},openFilterModal:C=>{C.filterModalOpen=!0},closeFilterModal:C=>{C.filterModalOpen=!1},openJobAlertModal:C=>{C.jobAlertModalOpen=!0},closeJobAlertModal:C=>{C.jobAlertModalOpen=!1}}}),{setProcessCounts,setUserProfileData,openFilterModal,closeFilterModal,openJobAlertModal,closeJobAlertModal}=dashboardSlice.actions,dashboardReducer=dashboardSlice.reducer,initialState$4={role_type:void 0,company_ids:[],job_title:[],job_category:[],seniority_level:[],company_categories:[],location:[],min_ctc:void 0,min_stipend:void 0,min_duration:void 0,notice_period:void 0,date_posted_on:void 0,mbe_skill_ids:{},experience_skill_ids:[],min_experience:void 0,max_experience:void 0},filterFormSlice=toolkit.createSlice({name:"filterForm",initialState:initialState$4,reducers:{updateFormField:(C,$)=>{const{field:F,value:V}=$.payload;C[F]=V},resetForm:()=>initialState$4,setFormData:(C,$)=>Hn(Hn({},C),$.payload),addRatingFilterInput:C=>{(!C.mbe_skill_ids||typeof C.mbe_skill_ids!="object")&&(C.mbe_skill_ids={});const $=`mbe_skill_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;C.mbe_skill_ids[$]={subject:null,rating:null}},deleteRatingFilterInput:(C,$)=>{const{inputFieldKey:F}=$.payload;C.mbe_skill_ids&&C.mbe_skill_ids[F]&&delete C.mbe_skill_ids[F]},updateRatingFilterInput:(C,$)=>{const{inputFilterSubKey:F,value:V}=$.payload;(!C.mbe_skill_ids||typeof C.mbe_skill_ids!="object")&&(C.mbe_skill_ids={});const K=F.split("_").slice(-1)[0],J=F.replace(`_${K}`,"");C.mbe_skill_ids[J]||(C.mbe_skill_ids[J]={subject:null,rating:null}),K==="subject"?C.mbe_skill_ids[J].subject=V:K==="rating"&&(C.mbe_skill_ids[J].rating=V)}}}),{updateFormField,resetForm,setFormData,addRatingFilterInput,deleteRatingFilterInput,updateRatingFilterInput}=filterFormSlice.actions,filterFormReducer=filterFormSlice.reducer,company_categories=[{value:5,label:"large_enterprise"},{value:6,label:"large_startups"},{value:7,label:"early_startups"}],job_categories=[{value:56529,label:"Backend Engineer"},{value:56530,label:"FullStack Engineer"},{value:56531,label:"Frontend Engineer"},{value:56569,label:"Android Engineer"},{value:56570,label:"iOS Engineer"},{value:179985,label:"Testing Engineer"},{value:189726,label:"Data Scientist"},{value:189727,label:"Data Analyst"},{value:189728,label:"Business Analyst"},{value:202365,label:"Data Engineer"},{value:221192,label:"DevOps Engineer"}],job_locations=[{value:"Bangalore",label:"Bangalore"},{value:"Pune",label:"Pune"},{value:"Hyderabad",label:"Hyderabad"},{value:"Gurgaon",label:"Gurgaon"},{value:"Noida",label:"Noida"},{value:"Chennai",label:"Chennai"},{value:"Delhi",label:"Delhi"},{value:"Chandigarh",label:"Chandigarh"},{value:"Kolkata",label:"Kolkata"},{value:"Mumbai",label:"Mumbai"},{value:"Jaipur",label:"Jaipur"},{value:"Vadodara",label:"Vadodara"},{value:"Nagpur",label:"Nagpur"},{value:"Ahmedabad",label:"Ahmedabad"},{value:"Kochi",label:"Kochi"},{value:"Mysore",label:"Mysore"},{value:"Coimbatore",label:"Coimbatore"},{value:"Bangkok",label:"Bangkok"},{value:"Mauritius",label:"Mauritius"},{value:"Udaipur",label:"Udaipur"},{value:"Cochin",label:"Cochin"},{value:"Remote",label:"Remote"},{value:"Hubballi",label:"Hubballi"},{value:"Goa",label:"Goa"},{value:"Trivandrum",label:"Trivandrum"},{value:"Indore",label:"Indore"},{value:"London",label:"London"},{value:"Bhubaneswar",label:"Bhubaneswar"},{value:"Menlo Park",label:"Menlo Park"},{value:"Dehradun",label:"Dehradun"},{value:"Hosur",label:"Hosur"},{value:"Delaware",label:"Delaware"},{value:"Amsterdam",label:"Amsterdam"},{value:"California",label:"California"},{value:"Mohali",label:"Mohali"},{value:"New Jersey",label:"New Jersey"},{value:"Arizona",label:"Arizona"},{value:"North Carolina",label:"North Carolina"},{value:"Agra",label:"Agra"},{value:"Saudi Arabia",label:"Saudi Arabia"},{value:"Pondicherry",label:"Pondicherry"},{value:"Vizag",label:"Vizag"}],role_types=[{value:198018,label:"internship"},{value:198019,label:"full_time"}],seniority_levels=[{value:202948,label:"Fresher"},{value:202949,label:"Entry - Mid"},{value:202950,label:"Mid - Senior"},{value:202951,label:"Senior"}],proficiency_mapping={"Must to Have":0,"Good to Have":1,"Bar Raiser":2,"Must to Have (Eligibility)":3},onboarding_modal_clicked=!0,pipeline_stages=[{value:"draft",label:"Draft"},{value:"in_review",label:"In Review"},{value:"resume_sent",label:"Resume Sent"},{value:"resume_shortlisted",label:"Resume Shortlisted"},{value:"interviewing",label:"Interviewing"},{value:"to_be_offered",label:"To Be Offered"},{value:"rejected",label:"Rejected"},{value:"offer_received",label:"Offer Received"},{value:"offer_withdrawn",label:"Offer Withdrawn"},{value:"offer_accepted",label:"Offer Accepted"},{value:"offer_declined",label:"Offer Declined"},{value:"on_hold",label:"On Hold"},{value:"joined",label:"Joined"},{value:"saved",label:"Saved"},{value:"not_interested",label:"Not Interested"},{value:"application_withdrawn",label:"Application Withdrawn"},{value:"application_archived",label:"Application Archived"}],merit_based_skills=[{id:37223,title:"Databases and SQL",mentee_module_id:null},{id:37183,title:"Data Structures & Algorithms",mentee_module_id:null},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:3053255},{id:37188,title:"High Level Design",mentee_module_id:3053256},{id:37189,title:"Frontend (React)",mentee_module_id:3053258},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:3053258},{id:37216,title:"Django",mentee_module_id:3053258},{id:37244,title:"Angular",mentee_module_id:3053258},{id:37191,title:"Python Libraries",mentee_module_id:null},{id:37192,title:"SQL",mentee_module_id:null},{id:37193,title:"Data Analytics - Tools",mentee_module_id:null},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:null},{id:37197,title:"Computer Vision",mentee_module_id:7522793},{id:37198,title:"Natural Language Processing",mentee_module_id:7522794},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:null},{id:37201,title:"DA tools",mentee_module_id:null},{id:37202,title:"Intermediate DSA",mentee_module_id:null},{id:37245,title:"DevOps - Data Structures & Algorithms",mentee_module_id:null},{id:37245,title:"DevOps - Data Structures & Algorithms",mentee_module_id:null},{id:37183,title:"Data Structures & Algorithms",mentee_module_id:null},{id:37223,title:"Databases and SQL",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:7532826},{id:37186,title:"Javascript",mentee_module_id:7532826},{id:37187,title:"Low Level Design",mentee_module_id:7532828},{id:37189,title:"Frontend (React)",mentee_module_id:7532828},{id:37244,title:"Angular",mentee_module_id:7532828},{id:37188,title:"High Level Design",mentee_module_id:null},{id:37192,title:"SQL",mentee_module_id:null},{id:37191,title:"Python Libraries",mentee_module_id:null},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:7522864},{id:37184,title:"Python",mentee_module_id:5696347},{id:37185,title:"Java",mentee_module_id:5696347},{id:37186,title:"Javascript",mentee_module_id:5696347},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:5910715},{id:37189,title:"Frontend (React)",mentee_module_id:null},{id:37244,title:"Angular",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37226,title:"Data Structures & Algorithms Advanced",mentee_module_id:7522524},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:null},{id:37188,title:"High Level Design",mentee_module_id:null},{id:37247,title:"Shell Scripting and CS Fundamentals",mentee_module_id:7522518},{id:37194,title:"EDA Fundamentals",mentee_module_id:null}],v1_onboarding_enabled=!0,v0_onboarding_completed=!0,initial_user_application_stage=4,is_discussion_hub_enabled=!1,resume_issues={total_issues:2},default_resume_details={id:17407,user_id:674153,name:"AswanthDefaultResume",default:!0,status:"active",meta:{social_profiles:{codechef:"",codeforces:"",geeksforgeeks:"",github:"",hackerearth:"",hackerrank:"",leetcode:"",portfolio:""},job_title:"Fullstack developer 1",interactions:{relevancy_alert_modal_displayed:!0}},modified_at:"2025-05-11T15:27:35.000Z",created_at:"2024-02-13T19:39:17.000Z",updated_at:"2025-05-11T15:27:35.000Z"},resume_builder_skills={language:[1167,1150,1148,1136,1128,1276,1270,1218,1217,1215,1213,1211,1210,1209],framework:[1206,1203,1200,1198,1197,1196,1195,1158,1157,1156,1145,1133],tools:[2431,2430,2435,1234,1231,1229,1228,1176,1175,2432,46262,58475]},skill_data=[{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1128,subtopic:"Javascript",eligible_topic_id:7591,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1133,subtopic:"Angular",eligible_topic_id:7580,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1136,subtopic:"CSS",eligible_topic_id:7586,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1145,subtopic:"Flutter",eligible_topic_id:8760,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1148,subtopic:"HTML",eligible_topic_id:7589,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1150,subtopic:"JavaScript",eligible_topic_id:7591,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1156,subtopic:"React",eligible_topic_id:7597,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1157,subtopic:"React Native",eligible_topic_id:8763,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1158,subtopic:"Redux",eligible_topic_id:8764,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1167,subtopic:"TypeScript",eligible_topic_id:8768,eligible_class:"Topic"},{id:null,topic:"Mobile Development",topic_id:401,subtopic_id:1175,subtopic:"Android Development",eligible_topic_id:8753,eligible_class:"Topic"},{id:null,topic:"Mobile Development",topic_id:401,subtopic_id:1176,subtopic:"iOS Development",eligible_topic_id:8770,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1195,subtopic:".NET",eligible_topic_id:7579,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1196,subtopic:"Django",eligible_topic_id:7587,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1197,subtopic:"Express.js",eligible_topic_id:8758,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1198,subtopic:"Flask",eligible_topic_id:8759,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1200,subtopic:"Node.js",eligible_topic_id:7594,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1203,subtopic:"Ruby on Rails",eligible_topic_id:null,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1206,subtopic:"Spring Boot",eligible_topic_id:7600,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1209,subtopic:"C",eligible_topic_id:8755,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1210,subtopic:"Go",eligible_topic_id:8761,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1211,subtopic:"Java",eligible_topic_id:7590,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1213,subtopic:"Python",eligible_topic_id:7596,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1215,subtopic:"Ruby",eligible_topic_id:null,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1217,subtopic:"Scala",eligible_topic_id:8765,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1218,subtopic:"Swift",eligible_topic_id:8766,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1228,subtopic:"MongoDB",eligible_topic_id:8769,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1229,subtopic:"MySQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1231,subtopic:"PostgreSQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1234,subtopic:"SQL Server",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1270,subtopic:"C#",eligible_topic_id:7584,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1276,subtopic:"C++",eligible_topic_id:7585,eligible_class:"Topic"},{id:null,topic:"Cloud Computing",topic_id:564,subtopic_id:2430,subtopic:"AWS",eligible_topic_id:7581,eligible_class:"Topic"},{id:null,topic:"CloudComputing",topic_id:564,subtopic_id:2431,subtopic:"Azure",eligible_topic_id:8754,eligible_class:"Topic"},{id:null,topic:"System Design",topic_id:563,subtopic_id:2432,subtopic:"Microservices",eligible_topic_id:7593,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:2435,subtopic:"SQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"Machine Learning",topic_id:405,subtopic_id:46262,subtopic:"Tableau",eligible_topic_id:7604,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:58475,subtopic:"Power BI",eligible_topic_id:null,eligible_class:"Topic"}],commonData={company_categories,job_categories,job_locations,role_types,seniority_levels,proficiency_mapping,onboarding_modal_clicked,pipeline_stages,merit_based_skills,v1_onboarding_enabled,v0_onboarding_completed,initial_user_application_stage,is_discussion_hub_enabled,resume_issues,default_resume_details,resume_builder_skills,skill_data},capitalize=C=>!C||typeof C!="string"?C:C.charAt(0).toUpperCase()+C.slice(1).toLowerCase(),formatExperience=(C,$)=>{const F=C!=null?C:0,V=$!=null?$:0,K=[];return F>0&&K.push(`${F} ${F===1?"yr":"yrs"}`),K.push(`${V} ${V===1?"month":"months"}`),`${K.join(" ")} Experience`},transformCompanyCategories=C=>!C||!Array.isArray(C)?C:C.map($=>br(Hn({},$),{label:capitalize($.label||"").replace(/_/g," ")})),transformRoleTypes=C=>!C||!Array.isArray(C)?C:C.map($=>br(Hn({},$),{label:toCase("titleCase",$.label||"")})),transformMetaData=C=>{if(!C||typeof C!="object")return C;const $=toCamelCaseObject(C);return $.companyCategories&&($.companyCategories=transformCompanyCategories($.companyCategories)),$.roleTypes&&($.roleTypes=transformRoleTypes($.roleTypes)),$},rawMetaData=window.__CAREERS_HUB__||commonData,transformedMetaData=transformMetaData(rawMetaData),initialState$3={meta:transformedMetaData},metaDataSlice=toolkit.createSlice({name:"metaData",initialState:initialState$3,reducers:{setMetaData:(C,$)=>{C.meta=transformMetaData($.payload)}}});metaDataSlice.actions;const metaDataReducer=metaDataSlice.reducer,initialState$2={alerts:[],loading:!1,error:null},alertSlice=toolkit.createSlice({name:"alerts",initialState:initialState$2,reducers:{setAlerts:(C,$)=>{C.alerts=$.payload},addAlert:(C,$)=>{C.alerts.push($.payload)},setLoading:(C,$)=>{C.loading=$.payload},setError:(C,$)=>{C.error=$.payload}}}),{setAlerts,addAlert,setLoading,setError}=alertSlice.actions,alertReducer=alertSlice.reducer,initialState$1={savedJobs:{}},savedJobsSlice=toolkit.createSlice({name:"savedJobs",initialState:initialState$1,reducers:{setJobSavedStatus:(C,$)=>{const{jobId:F,status:V,lastUpdatedAt:K}=$.payload;V==="Saved"?C.savedJobs[F]={status:"Saved",lastUpdatedAt:K||new Date().toISOString()}:delete C.savedJobs[F]},initializeSavedJobs:(C,$)=>{($.payload||[]).forEach(V=>{V.applicationStatus==="Saved"&&(C.savedJobs[V.id]={status:"Saved",lastUpdatedAt:V.applicationLastUpdatedAt||new Date().toISOString()})})},clearSavedJobs:C=>{C.savedJobs={}}}}),{setJobSavedStatus,initializeSavedJobs,clearSavedJobs}=savedJobsSlice.actions,savedJobsReducer=savedJobsSlice.reducer,initialState={fitmentScore:{},activeResumeId:null,activeResumeName:null,activeJobProfileId:null,activeResumeChecklist:[],isChecklistOpen:!1},resumeFitmentSlice=toolkit.createSlice({name:"resumeFitment",initialState,reducers:{setFitmentScore:(C,$)=>{var ee,te,ne,re;const F=(ee=$.payload)==null?void 0:ee.job_profile_id,V=(te=$.payload)==null?void 0:te.user_resume_id,K=(ne=$.payload)==null?void 0:ne.score,J=(re=$.payload)==null?void 0:re.remarks;F&&V&&K&&(C.fitmentScore[F]=br(Hn({},C.fitmentScore[F]),{[V]:{score:K,remarks:J}}))},setActiveResume:(C,$)=>{var ee,te,ne,re,ae,oe,ie,se;const F=(ee=$.payload)==null?void 0:ee.jobProfileId,V=(te=$.payload)==null?void 0:te.resumeId,K=(ne=$.payload)==null?void 0:ne.blockerPoints,J=(re=$.payload)==null?void 0:re.resumeName;if(F&&V){C.activeResumeId=V,C.activeJobProfileId=F,C.activeResumeName=J;const ue=(oe=(ae=C.fitmentScore[F])==null?void 0:ae[V])==null?void 0:oe.remarks,de=(se=(ie=C.fitmentScore[F])==null?void 0:ie[V])==null?void 0:se.score;C.activeResumeChecklist=[...de<80&&ue?[ue]:[],...K]}},setChecklistOpen:(C,$)=>{var F,V,K;(F=$.payload)!=null&&F.syncWithBlockerPoints?C.isChecklistOpen=((V=C.activeResumeChecklist)==null?void 0:V.length)>0:C.isChecklistOpen=(K=$.payload)==null?void 0:K.isOpen}}}),{setFitmentScore,setActiveResume,setChecklistOpen}=resumeFitmentSlice.actions,resumeFitmentReducer=resumeFitmentSlice.reducer,rootReducer=combineReducers({[careerHubApi.reducerPath]:careerHubApi.reducer,layout:layoutReducer,filter:filterReducer,dashboard:dashboardReducer,filterForm:filterFormReducer,metaData:metaDataReducer,filterOptions:filterOptionsReducer,alerts:alertReducer,savedJobs:savedJobsReducer,resumeFitment:resumeFitmentReducer}),HelloWorld=()=>React.createElement("div",{style:{padding:"20px",textAlign:"center"}},React.createElement("h1",null,"Hello World - Career Hub"),React.createElement("p",null,"This is a dummy component.")),tagsSection="_tagsSection_gf6im_1",tag$1="_tag_gf6im_1",activeTag="_activeTag_gf6im_22",icon$1="_icon_gf6im_29",styles$I={tagsSection,tag:tag$1,activeTag,icon:icon$1};function TagsSection({analytics:C}){const{currentTab:$,updateTabAndJobId:F}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),V=$||TAG_TO_TAB_MAPPING.relevant,K=reactRedux.useSelector(ne=>{var re,ae;return((ae=(re=ne.scalantCareerHub)==null?void 0:re.dashboard)==null?void 0:ae.processCounts)||{}}),J=ne=>{var ae;C==null||C.click(`Tags Section - ${((ae=JOB_FILTER_TAGS[ne])==null?void 0:ae.label)||ne}`,PRODUCT_NAME);const re=TAG_TO_TAB_MAPPING[ne];re&&F(re)},ee=ne=>{const re=TAG_TO_TAB_MAPPING[ne];return V===re},te=ne=>{const re=COUNT_TO_TAB_MAPPING[ne];return K[re]||0};return React.createElement("div",{className:styles$I.tagsSection},Object.keys(JOB_FILTER_TAGS).map(ne=>React.createElement(Tag$1,{className:classNames(styles$I.tag,{[styles$I.activeTag]:ee(ne)}),key:ne,onClick:()=>J(ne)},React.createElement(JOB_FILTER_TAGS[ne].icon,{className:styles$I.icon}),JOB_FILTER_TAGS[ne].label," ",React.createElement("span",{className:styles$I.count},"(",te(ne),")"))))}const jobAlert="_jobAlert_kiep6_1",styles$H={jobAlert};function JobAlert({analytics:C}){const $=reactRedux.useDispatch(),F=()=>{C==null||C.click("Job Alert - Open Modal",PRODUCT_NAME),$(openJobAlertModal())};return React.createElement("div",{className:styles$H.jobAlert,onClick:F},React.createElement(AlertFilled$1,{className:styles$H.icon}),"Job Alerts")}const styles$G={};function Sorting(){const C=reactRedux.useDispatch(),$=reactRedux.useSelector(ee=>{var te,ne;return((ne=(te=ee.scalantCareerHub)==null?void 0:te.filter)==null?void 0:ne.sortings)||[]}),F=React.useMemo(()=>getCurrentSortingValue($),[$]),V=ee=>{const te=SORTING_OPTIONS[ee];te&&C(setSortings([te.mapping]))},K=Object.values(SORTING_OPTIONS).map(ee=>({value:ee.value,label:ee.value===F?`Sorted By: ${ee.label}`:ee.label})),J=ee=>{const te=SORTING_OPTIONS[ee.value];return te?te.label:ee.label};return React.createElement(Select$1,{className:styles$G.sorting,value:F,onChange:V,suffixIcon:React.createElement(DownOutlined$1,null),options:K,optionRender:J})}const styles$F={};function Filter({analytics:C}){const $=reactRedux.useDispatch(),F=()=>{C==null||C.click("Filter - Open Drawer",PRODUCT_NAME),$(openFilterModal())};return React.createElement(Button$2,{type:"primary",className:styles$F.filter,onClick:F},"Filters ",React.createElement(DownOutlined$1,null))}const search="_search_hhvxj_1",iconContainer="_iconContainer_hhvxj_7",input="_input_hhvxj_20",slideIn="_slideIn_hhvxj_1",styles$E={search,iconContainer,input,slideIn};function Search({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(ie=>{var se,ue,de;return((de=(ue=(se=ie.scalantCareerHub)==null?void 0:se.filter)==null?void 0:ue.filters)==null?void 0:de.keyword)||""}),[V,K]=React.useState(!1),[J,ee]=React.useState(F),te=React.useRef(null),ne=React.useRef(null);React.useEffect(()=>{ee(F)},[F]),React.useEffect(()=>{V&&te.current&&te.current.focus()},[V]);const re=()=>{C==null||C.click("Search - Icon Click",PRODUCT_NAME),K(!0)},ae=ie=>{const se=ie.target.value;ee(se),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(()=>{$(setKeyword(se))},300)},oe=()=>{J.trim()||K(!1)};return React.useEffect(()=>()=>{ne.current&&clearTimeout(ne.current)},[]),React.createElement("div",{className:styles$E.search},V||J?React.createElement(Input$1,{ref:te,className:styles$E.input,placeholder:"Search for job or Company Name",value:J,onChange:ae,onBlur:oe,suffix:React.createElement(SearchOutlined$1,null)}):React.createElement("div",{className:styles$E.iconContainer,onClick:re},React.createElement(SearchOutlined$1,null)))}const actions$1="_actions_nxp1u_1",styles$D={actions:actions$1};function Actions$1({analytics:C}){return React.createElement("div",{className:styles$D.actions},React.createElement(JobAlert,{analytics:C}),React.createElement(Sorting,null),React.createElement(Filter,{analytics:C}),React.createElement(Search,{analytics:C}))}Actions$1.propTypes={analytics:PropTypes.object};const jobsHeaderContainer="_jobsHeaderContainer_1un8f_1",styles$C={jobsHeaderContainer};function JobsHeader({analytics:C,className:$}){return React.createElement("div",{className:classNames($,styles$C.jobsHeaderContainer)},React.createElement(TagsSection,{analytics:C}),React.createElement(Actions$1,{analytics:C}))}JobsHeader.propTypes={analytics:PropTypes.object,className:PropTypes.string},JobsHeader.defaultProps={className:""};const parsePreferredLocations=C=>!C||typeof C!="string"?[]:C.toLowerCase()==="anywhere_in_india"?["Anywhere In India"]:C.split("/").map($=>$.trim()).filter($=>$.length>0).map($=>toTitleCase($)),parsePreferredJobRoles=C=>!C||typeof C!="string"?[]:C.split("/").map($=>$.trim()).filter($=>$.length>0),dashboardService=careerHubApi.injectEndpoints({endpoints:C=>({fetchProcessCounts:C.query({query:()=>({url:"/job-tracker/fetch-process-counts/",method:"POST"}),transformResponse:$=>$.process_counts||{},providesTags:["ProcessCounts"]}),updateJobStatus:C.mutation({query:$=>({url:"/academy/mentee/jobs-mapping/update-status",method:"POST",body:$}),transformResponse:$=>$})})}),{useUpdateJobStatusMutation}=dashboardService,profileName="_profileName_1vhkf_1",profileDetails="_profileDetails_1vhkf_5",profileDetailsItems="_profileDetailsItems_1vhkf_13",preferencesTitle="_preferencesTitle_1vhkf_18",preferencesDivider="_preferencesDivider_1vhkf_22",preferencesContent="_preferencesContent_1vhkf_27",preferenceLabel="_preferenceLabel_1vhkf_31",preferenceValue="_preferenceValue_1vhkf_37",preferenceTag="_preferenceTag_1vhkf_42",jobIntentContainer="_jobIntentContainer_1vhkf_51",preferencesContainer="_preferencesContainer_1vhkf_55",styles$B={profileName,profileDetails,profileDetailsItems,preferencesTitle,preferencesDivider,preferencesContent,preferenceLabel,preferenceValue,preferenceTag,jobIntentContainer,preferencesContainer},DISPLAY_LABEL_TO_STATUS={"Looking for a job":"active","Not looking for a job":"inactive","Need time to prepare":"need_time"},STATUS_TO_PLACEMENT_INTENT={active:"Interested",inactive:"Not Interested",need_time:"Need Time to Prepare"},PLACEMENT_INTENT_TO_DISPLAY_LABEL={Interested:"Looking for a job","Need Time to Prepare":"Need time to prepare","Not Interested":"Not looking for a job"},JOB_INTENT_OPTIONS=[{label:"Looking for a job",value:"Looking for a job"},{label:"Need time to prepare",value:"Need time to prepare"},{label:"Not looking for a job",value:"Not looking for a job"}];function ProfileDetails({analytics:C,className:$,onViewResume:F,onEditPreferences:V}){var se,ue,de,le,ve,me,he,pe;const K=reactRedux.useSelector(ce=>ce.scalantCareerHub.dashboard.userProfileData),[J,{isLoading:ee}]=useUpdateJobStatusMutation(),[te,ne]=React.useState((K==null?void 0:K.placementIntent)||null);React.useEffect(()=>{K!=null&&K.placementIntent&&ne(K.placementIntent)},[K==null?void 0:K.placementIntent]);const re=()=>{C==null||C.click("Profile Details - View Resume",PRODUCT_NAME),F==null||F()},ae=()=>{C==null||C.click("Profile Details - Edit Preferences",PRODUCT_NAME),V==null||V()},oe=ce=>sr(this,null,function*(){try{const fe=DISPLAY_LABEL_TO_STATUS[ce];fe&&(yield J({source:"careers_hub",status:fe}).unwrap(),ne(STATUS_TO_PLACEMENT_INTENT[fe]))}catch(fe){console.error("Failed to update job status:",fe)}}),ie=ce=>PLACEMENT_INTENT_TO_DISPLAY_LABEL[ce]||null;return React.createElement("div",{className:classNames(styles$B.profileDetails,$)},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(Avatar$1,{shape:"square",size:48,src:K==null?void 0:K.avatar}),React.createElement(Flex$1,{justify:"center",vertical:!0,gap:4},React.createElement(Typography$1.Title,{level:5,className:styles$B.profileName},K==null?void 0:K.name),React.createElement(Typography$1.Text,{type:"secondary"},toTitleCase((se=K==null?void 0:K.mentee)==null?void 0:se.careersHubProduct)))),React.createElement(Flex$1,{vertical:!0,gap:8,className:styles$B.profileDetailsItems},React.createElement(Flex$1,{align:"center",gap:10},React.createElement(UserOutlined$1,null),React.createElement(Typography$1.Text,null,K==null?void 0:K.jobTitle)),React.createElement(Flex$1,{align:"center",gap:10},React.createElement(StarOutlined$1,null),React.createElement(Typography$1.Text,null,formatExperience((ue=K==null?void 0:K.experienceYears)!=null?ue:K==null?void 0:K.experienceInYears,(de=K==null?void 0:K.experienceMonths)!=null?de:K==null?void 0:K.experienceInMonths))),React.createElement(Flex$1,{align:"center",gap:10},React.createElement(FileTextTwoTone$1,null),React.createElement(Typography$1.Link,{onClick:re},"View Resume")),React.createElement(Flex$1,{vertical:!0,className:styles$B.jobIntentContainer,gap:8},React.createElement(Typography$1.Text,{secondary:!0},"Select your intent in Career's Hub"),React.createElement(Select$1,{placeholder:"Select your intent",value:ie(te),onChange:oe,disabled:ee,loading:ee,style:{width:"100%"},options:JOB_INTENT_OPTIONS}))),React.createElement(Flex$1,{vertical:!0,className:styles$B.preferencesContainer},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Typography$1.Title,{level:5,className:styles$B.preferencesTitle},"Your Preferences"),React.createElement(EditTwoTone$1,{onClick:ae})),React.createElement(Divider$1,{className:styles$B.preferencesDivider}),React.createElement(Flex$1,{vertical:!0,gap:16,className:styles$B.preferencesContent},React.createElement(Flex$1,{vertical:!0,gap:.4},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Location"),React.createElement(Flex$1,{gap:.4,wrap:!0},parsePreferredLocations((le=K==null?void 0:K.userCompanyProfile)==null?void 0:le.preferredLocation).map((ce,fe)=>React.createElement(Tag$1,{key:fe,bordered:!1,className:styles$B.preferenceTag},ce)))),React.createElement(Flex$1,{vertical:!0,gap:.4},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Job roles"),React.createElement(Flex$1,{gap:.4,wrap:!0},parsePreferredJobRoles((ve=K==null?void 0:K.userCompanyProfile)==null?void 0:ve.preferredRole).map((ce,fe)=>React.createElement(Tag$1,{key:fe,className:styles$B.preferenceTag},ce)))),React.createElement(Flex$1,{align:"center"},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Expected CTC (LPA):"),React.createElement(Typography$1.Text,{className:styles$B.preferenceValue},(me=K==null?void 0:K.userCompanyProfile)==null?void 0:me.expectedCtc)),React.createElement(Flex$1,{align:"center"},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Notice period (In days):"),React.createElement(Typography$1.Text,{className:styles$B.preferenceValue},(he=K==null?void 0:K.userCompanyProfile)==null?void 0:he.noticePeriod)),React.createElement(Flex$1,{align:"center"},((pe=K==null?void 0:K.userCompanyProfile)==null?void 0:pe.buyoutNotice)&&React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"*Buyout available:")))))}ProfileDetails.propTypes={analytics:PropTypes.object,className:PropTypes.string},ProfileDetails.defaultProps={className:""};const jobPreviewApi=careerHubApi.injectEndpoints({endpoints:C=>({getJobPreview:C.query({query:$=>`/job-tracker/job_profile/${$}/`,providesTags:($,F,V)=>[{type:"JobPreview",id:V},{type:"JobPreview",id:"LIST"}],transformResponse:$=>{var ee,te,ne;const F=toCamelCaseObject($),V=((ee=F==null?void 0:F.data)==null?void 0:ee.attributes)||{},K=((ne=(te=F==null?void 0:F.included)==null?void 0:te.find(re=>re.type==="company"))==null?void 0:ne.attributes)||{},J=V.contestSkills||[];return{jobData:br(Hn({},V),{contestSkills:J,name:V.name||(K==null?void 0:K.name)||"Company"}),companyData:K,highlights:V.highlights,eligibilityCriteria:V.eligibilityCriteria}}})}),overrideExisting:!0}),{useGetJobPreviewQuery}=jobPreviewApi,JobPreviewContext=React.createContext(null),JobPreviewProvider=({analytics:C,country:$="IN",jobId:F,currentTab:V,openMockInterviewModal:K=(ne,re)=>{console.log("Method not implemented. We should get it from MIT"),console.log(ne,re)},openResume:J=()=>{console.log("Method not implemented. We should get it from MIT")},skip:ee=!1,children:te})=>{const{data:ne,isLoading:re,error:ae,refetch:oe}=useGetJobPreviewQuery(F,{skip:!F||ee}),[ie,se]=React.useState(),[ue,de]=React.useState(null),ve={analytics:C,activeApplicationId:ue,setActiveApplicationId:de,activeTab:ie,setActiveTab:me=>{se(me),C==null||C.click("Job Preview - Active Tab Changed","Jobs Page V2",{tab:me,jobId:F})},country:$,jobId:F,data:ne,isLoading:re,error:ae,refetch:oe,openMockInterviewModal:K,openResume:J,jobData:ne==null?void 0:ne.jobData,companyData:ne==null?void 0:ne.companyData,highlights:ne==null?void 0:ne.highlights,eligibilityCriteria:ne==null?void 0:ne.eligibilityCriteria,currentTab:V};return React.createElement(JobPreviewContext.Provider,{value:ve},te)},useJobPreview=()=>{const C=React.useContext(JobPreviewContext);if(!C)throw new Error("useJobPreview must be used within a JobPreviewProvider");return C},ApplicationFormContext=React.createContext();function ApplicationFormProvider({children:C,onUploadFile:$=()=>(console.log("Method not implemented. We should get it from MIT"),""),onEditResume:F=()=>(console.log("Method not implemented. We should get it from MIT"),""),onAddResume:V=()=>(console.log("Method not implemented. We should get it from MIT"),""),stepName:K,jobProfileId:J,applicationId:ee}){const[te,ne]=React.useState(null),[re,ae]=React.useState(K),[oe,ie]=React.useState(null);return React.useEffect(()=>{ae(K)},[K]),React.createElement(ApplicationFormContext.Provider,{value:{onUploadFile:$,formInstance:te,setFormInstance:ne,stepName:re,setStepName:ae,jobProfileId:J,applicationId:ee,selectedResume:oe,setSelectedResume:ie,onEditResume:F,onAddResume:V}},C)}const useApplicationFormContext=()=>{const C=React.useContext(ApplicationFormContext);if(!C)throw new Error("useApplicationForm must be used within a ApplicationFormProvider");return C},descriptionContainer$1="_descriptionContainer_sd7fu_1",container$9="_container_sd7fu_6",recruiterAvatar="_recruiterAvatar_sd7fu_10",recruiterCardContent="_recruiterCardContent_sd7fu_14",recruiterName="_recruiterName_sd7fu_18",recruiterEmail="_recruiterEmail_sd7fu_24",styles$A={descriptionContainer:descriptionContainer$1,container:container$9,recruiterAvatar,recruiterCardContent,recruiterName,recruiterEmail},RecruiterCard=({recruiter:C})=>{const{name:$,avatar:F,email:V}=C||{},{analytics:K}=useJobPreview(),J=()=>{K==null||K.click("Recruiter - Send Email",PRODUCT_NAME,{recruiterName:$,recruiterEmail:V})};return React.createElement(Card$1,{size:"small"},React.createElement(Space$1,{direction:"horizontal"},React.createElement(Avatar$1,{size:48,src:F,className:styles$A.recruiterAvatar}),React.createElement(Space$1,{direction:"vertical",className:styles$A.recruiterCardContent},React.createElement(Typography$1.Text,{className:styles$A.recruiterName},$),React.createElement(Typography$1.Link,{className:styles$A.recruiterEmail,href:`mailto:${V}`,onClick:J},React.createElement(MailTwoTone$1,null),"Send Email To Recruiter"))))},Recruiters=()=>{const{jobData:C}=useJobPreview(),{recruiters:$}=C||{};return React.createElement(Space$1,null,$.map((F,V)=>React.createElement(RecruiterCard,{key:V,recruiter:F})))},TimelineSteps=()=>{const{jobData:C}=useJobPreview(),{applicationTimeline:$}=C||{},{timeline:F}=$||{},V=F.map(J=>({title:J.stageName,description:J.stageComments})),K=F.findIndex(J=>J.stageStatus==="ongoing");return React.createElement(Steps$1,{current:K,items:V,direction:"vertical"})},Timeline=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Your Application Status"),React.createElement(TimelineSteps,null)),RecruiterDetails=()=>{const{jobData:C}=useJobPreview(),{recruiters:$}=C||{};return!$||$.length===0?null:React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Recruiter Details"),React.createElement(Recruiters,null))},ApplicationTimelineTab=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.container},React.createElement(Timeline,null),React.createElement(RecruiterDetails,null)),ICONS={bookmark:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/276/original/BookmarkSimple.svg?1765444708",exit:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/344/original/ExportOutlined.svg?1765460782",airplay:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/451/original/Vector.svg?1765523747",monitor:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/455/original/Vector_%281%29.svg?1765526679",likeBadge:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/171/516/original/Like-badge-_remix__1.svg?1766402587"},actionBanner="_actionBanner_13z26_1",actionBannerIcon="_actionBannerIcon_13z26_12",actionBannerContent="_actionBannerContent_13z26_17",actionBannerTitle="_actionBannerTitle_13z26_23",actionBannerDescription="_actionBannerDescription_13z26_29",actionBannerButton="_actionBannerButton_13z26_33",styles$z={actionBanner,actionBannerIcon,actionBannerContent,actionBannerTitle,actionBannerDescription,actionBannerButton},ActionBanner=({icon:C,title:$,description:F,buttonText:V,buttonIcon:K,className:J,onClick:ee,isLoading:te})=>React.createElement("div",{className:classNames(styles$z.actionBanner,J)},C,React.createElement("div",{className:styles$z.actionBannerContent},React.createElement("span",{className:styles$z.actionBannerTitle},$),React.createElement("span",{className:styles$z.actionBannerDescription},F)),React.createElement(Button$2,{icon:K,type:"primary",className:styles$z.actionBannerButton,onClick:ee,loading:te},V)),monitorBanner="_monitorBanner_gxbq6_1",monitorIcon="_monitorIcon_gxbq6_7",styles$y={monitorBanner,monitorIcon},INTERVIEW_QUESTIONS_URL="https://companion.scaler.com/interview-experiences",InterviewExperiencesBanner=()=>{var oe;const C=reactRedux.useSelector(ie=>ie.scalantCareerHub.dashboard.userProfileData),$=(oe=C==null?void 0:C.hasCompletedScreeningCall)!=null?oe:!1,{analytics:F,jobData:V,companyData:K,currentTab:J}=useJobPreview(),{title:ee,applicationStatus:te}=V||{},ne=te===APPLICATION_STATUS.WITHDRAWN,{name:re}=K||{},ae=React.useCallback(()=>{globalThis.open(`${INTERVIEW_QUESTIONS_URL}?company=${encodeURIComponent(re)}&role=${encodeURIComponent(ee)}`,"_blank"),F==null||F.click("Interview Experiences - Explore",PRODUCT_NAME)},[F,re,ee]);return!$||J!==TAG_TO_TAB_MAPPING.applied||ne?null:React.createElement(ActionBanner,{icon:React.createElement("img",{src:ICONS.monitor,className:styles$y.monitorIcon}),title:"We've got the resources you need for this role",description:"Explore Interview Experiences from Scaler learners who have attempted this before",buttonText:"Explore",buttonIcon:React.createElement(DoubleRightOutlined$1,null),className:styles$y.monitorBanner,onClick:ae})},jobDescriptionTab="_jobDescriptionTab_1g78n_1",contentContainer="_contentContainer_1g78n_5",descriptionTitle="_descriptionTitle_1g78n_10",descriptionText="_descriptionText_1g78n_19",stepText$1="_stepText_1g78n_19",descriptionLink="_descriptionLink_1g78n_33",list="_list_1g78n_37",steps="_steps_1g78n_41",stepTitle="_stepTitle_1g78n_48",descriptionContainer="_descriptionContainer_1g78n_59",container$8="_container_1g78n_64",indicatorContainer="_indicatorContainer_1g78n_69",indicatorLine="_indicatorLine_1g78n_74",indicatorDot="_indicatorDot_1g78n_82",extraIndicatorDot="_extraIndicatorDot_1g78n_82",styles$x={jobDescriptionTab,contentContainer,descriptionTitle,descriptionText,stepText:stepText$1,descriptionLink,list,steps,stepTitle,descriptionContainer,container:container$8,indicatorContainer,indicatorLine,indicatorDot,extraIndicatorDot},Company$1=()=>{const{companyData:C,analytics:$}=useJobPreview(),{name:F,employeeCount:V,companyVision:K,location:J,category:ee,companyWebsite:te}=C||{},ne=()=>{$==null||$.click("Company - Website Link",PRODUCT_NAME,{companyName:F})};return React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Link,{className:styles$x.descriptionTitle,href:te,target:"_blank",onClick:ne},"About ",F),K&&React.createElement(Typography$1.Paragraph,{className:styles$x.descriptionText},React.createElement("div",{dangerouslySetInnerHTML:{__html:K}})),J&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Office Location:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},J)),ee&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Company Category:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},toTitleCase(ee))),V&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"No. of Employees:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},V)))},collapsableContainer$1="_collapsableContainer_1s2ds_1",collapsed$1="_collapsed_1s2ds_5",viewMore$1="_viewMore_1s2ds_21",styles$w={collapsableContainer:collapsableContainer$1,collapsed:collapsed$1,viewMore:viewMore$1},CollapsableHTML=({analytics:C,html:$,contentClassName:F})=>{const[V,K]=React.useState(!1),J=()=>{C==null||C.click(`Collapsable HTML - ${V?"View Less":"View More"}`,PRODUCT_NAME),K(!V)};return React.createElement("div",{className:styles$w.collapsableContainer},React.createElement("div",{className:classNames(F,{[styles$w.collapsed]:!V}),dangerouslySetInnerHTML:{__html:$}}),React.createElement(Typography$1.Link,{className:styles$w.viewMore,onClick:J},V?"View Less":"View More"))},Description$1=()=>{const{jobData:C,analytics:$}=useJobPreview(),{jobDescText:F,jobDesc:V}=C||{},K=()=>{$==null||$.click("Job Description - Know More",PRODUCT_NAME)};return React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"About the Role"),F&&React.createElement(CollapsableHTML,{analytics:$,html:F,contentClassName:styles$x.descriptionText}),V&&React.createElement(Typography$1.Link,{className:styles$x.descriptionLink,href:V,target:"_blank",onClick:K},React.createElement(Space$1,null,React.createElement(LinkOutlined$1,null),"Know More")))},collapsableContainer="_collapsableContainer_1bjjt_1",collapsed="_collapsed_1bjjt_5",viewMore="_viewMore_1bjjt_21",styles$v={collapsableContainer,collapsed,viewMore},CollapsableContainer=({analytics:C,children:$,contentClassName:F})=>{const[V,K]=React.useState(!1),J=()=>{C==null||C.click(`Collapsable Container - ${V?"View Less":"View More"}`,PRODUCT_NAME),K(!V)};return React.createElement("div",{className:styles$v.collapsableContainer},React.createElement("div",{className:classNames(F,{[styles$v.collapsed]:!V})},$),React.createElement(Typography$1.Link,{className:styles$v.viewMore,onClick:J},V?"View Less":"View More"))},Benefits=()=>{const{jobData:C,country:$}=useJobPreview(),{benefits:F,visaSponsorship:V}=C||{},K=V==="yes";return!F&&!K||$!=="US"?null:React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Benefits"),React.createElement(CollapsableContainer,{contentClassName:styles$x.descriptionText},React.createElement("ul",{className:styles$x.list},F==null?void 0:F.map(J=>React.createElement("li",{key:J},J)),K&&React.createElement("li",null,"Visa sponsorship available"))))},STEPS=[{title:"In Progress",description:"Once you apply, our team checks if it’s a right match"},{title:"Resume Forwarded",description:"We send your resume to the company"},{title:"Feedback Stage",description:"The company reviews and shares feedback"},{title:"Interview Process",description:"If selected, your interview rounds begin"}],Indicator=()=>React.createElement(Flex$1,{vertical:!0,className:styles$x.indicatorContainer},React.createElement("div",{className:styles$x.indicatorLine}),React.createElement(Flex$1,{flex:1,gap:12},STEPS.map((C,$)=>React.createElement(Flex$1,{key:$,flex:1},React.createElement("div",{className:styles$x.indicatorDot}))),React.createElement("div",{className:styles$x.extraIndicatorDot}))),HiringSteps=()=>{const C=STEPS.map($=>({title:React.createElement("span",{className:styles$x.stepTitle},$.title),description:React.createElement("span",{className:styles$x.stepText},$.description)}));return React.createElement(Flex$1,{vertical:!0,gap:12},React.createElement(Indicator,null),React.createElement(Flex$1,{className:styles$x.steps,gap:12},C.map($=>React.createElement(Flex$1,{vertical:!0,flex:1},$.title,$.description))))},container$7="_container_all86_1",styles$u={container:container$7},PlacementProcessDisclaimerBanner=()=>React.createElement(Flex$1,{className:styles$u.container},React.createElement(InfoCircleTwoTone$1,{twoToneColor:"#913ECE"}),React.createElement(Typography$1.Text,null,"Our placement team has access to the same application status and updates that are visible to you")),BasicInfo$1=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Job Description"),React.createElement(Company$1,null),React.createElement(Description$1,null),React.createElement(Benefits,null)),PostApplicationProcess=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Post Application Process"),React.createElement(HiringSteps,null)),JobDescriptionTab=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.container},React.createElement(BasicInfo$1,null),React.createElement(PostApplicationProcess,null),React.createElement(PlacementProcessDisclaimerBanner,null),React.createElement(InterviewExperiencesBanner,null)),container$6="_container_tfeme_1",dot="_dot_tfeme_5",successDot="_successDot_tfeme_11",errorDot="_errorDot_tfeme_15",tableTitle="_tableTitle_tfeme_19",styles$t={container:container$6,dot,successDot,errorDot,tableTitle},STATUS_MAP$2={completed:"Completed",pending:"Pending",notRequired:"Not Required"},columns$2=[{title:"Skill Type",dataIndex:"skillType"},{title:"Status",dataIndex:"status"},{title:"Contests",dataIndex:"contests"},{title:"Mock Interview",dataIndex:"mockInterview"}],StatusColumnContent$2=({status:C})=>React.createElement(Tag$1,{color:C===STATUS_MAP$2.completed?"success":"warning"},C),ContestColumnContent=({contestDetails:C})=>{const{analytics:$}=useJobPreview();if(!C)return STATUS_MAP$2.notRequired;const{cleared:F,joinLink:V}=C,K=()=>{$==null||$.click("Certification - Attempt Contest",PRODUCT_NAME)};return F?React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,styles$t.successDot)}),React.createElement(Typography$1.Text,null,"Success")):React.createElement(Typography$1.Link,{href:V,onClick:K,underline:!0},"Attempt Contest")},MockInterviewColumnContent=({mockInterviewDetails:C,skillId:$,skillName:F})=>{const{openMockInterviewModal:V,analytics:K}=useJobPreview();if(!C)return STATUS_MAP$2.notRequired;const{cleared:J}=C,ee=()=>{K==null||K.click("Certification - Schedule Interview",PRODUCT_NAME),V($,F)};return J?React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,styles$t.successDot)}),React.createElement(Typography$1.Text,null,"Success")):React.createElement(Typography$1.Link,{onClick:ee,underline:!0},"Schedule Interview")},Certification=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.find(J=>J.label==="skills");if(!V)return null;const K=Object.entries(V.data).map(([J,ee])=>{const te=ee.contests,ne=te?ee.contests.cleared?STATUS_MAP$2.completed:STATUS_MAP$2.pending:STATUS_MAP$2.notRequired,re=ee.skills,ae=re?ee.skills.cleared?STATUS_MAP$2.completed:STATUS_MAP$2.pending:STATUS_MAP$2.notRequired,oe=[ne,ae].every(ie=>ie!==STATUS_MAP$2.pending)?STATUS_MAP$2.completed:STATUS_MAP$2.pending;return{skillType:J,status:React.createElement(StatusColumnContent$2,{status:oe}),contests:React.createElement(ContestColumnContent,{contestDetails:te}),mockInterview:React.createElement(MockInterviewColumnContent,{mockInterviewDetails:re,skillId:ee.skillId,skillName:ee.skillName})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Scaler certifications you need to apply"),columns:columns$2,dataSource:K,pagination:!1})},STATUS_MAP$1={added:"Added",missing:"Missing"},columns$1=[{title:"Stack Type",dataIndex:"stackType"},{title:"Experience (Yrs)",dataIndex:"experience"},{title:"Status",dataIndex:"status"},{title:"",dataIndex:"action"}],StatusColumnContent$1=({status:C})=>React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,{[styles$t.successDot]:C===STATUS_MAP$1.added,[styles$t.errorDot]:C===STATUS_MAP$1.missing})}),React.createElement(Typography$1.Text,null,C)),ActionColumnContent=({status:C})=>{const{openResume:$,analytics:F}=useJobPreview(),V=()=>{F==null||F.click("Resume Skills - Add Skill",PRODUCT_NAME),$()};return C===STATUS_MAP$1.added?null:React.createElement(Typography$1.Link,{onClick:V,underline:!0},"Add Skill")},ResumeSkills=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.find(J=>J.label==="tech_stacks");if(!(V!=null&&V.data))return null;const K=Object.entries(V.data).map(([J,ee])=>{var ne;const te=(ne=ee.data)!=null&&ne.cleared?STATUS_MAP$1.added:STATUS_MAP$1.missing;return{stackType:J,experience:`${Math.floor(ee.proficiencyPeriod/12)}+`,status:React.createElement(StatusColumnContent$1,{status:te}),action:React.createElement(ActionColumnContent,{status:te})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Skills and Toolsets in your Resume"),columns:columns$1,dataSource:K,pagination:!1})},getExperienceText=(C,$)=>{const F=`${Math.floor(C/12)}y`,V=C%12===0?"":` ${C%12}m`,K=`${F}${V}`;if(!$)return`${K}+ Experience`;const J=`${Math.floor($/12)}y`,ee=$%12===0?"":`${$%12}m`;return`${K} - ${J} ${ee} Experience`},getNoticePeriodText=C=>C===0?"Immediate":C==null?"NA":`${C} days`,ADDITIONAL_ELIGIBILITY_MAPPING={placed_mentee:()=>"CTC greater than 1.6x of current offer",diversity:()=>"Female Candidates Only",experience:({minExperience:C,maxExperience:$})=>getExperienceText(C,$),notice_period:({preferredNoticePeriod:C})=>`${getNoticePeriodText(C)} Notice Period`},STATUS_MAP={eligible:"Eligible",ineligible:"Ineligible"},columns=[{title:"Requirement",dataIndex:"requirement"},{title:"Details",dataIndex:"details"},{title:"Status",dataIndex:"status"}],StatusColumnContent=({status:C})=>C===STATUS_MAP.eligible?React.createElement(Tag$1,{color:"success"},"Eligible"):React.createElement(Tag$1,{color:"error"},"Ineligible"),OtherRequirements=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.filter(J=>J.label!=="skills"&&J.showText);if(!V)return null;const K=V.map(J=>{const ee=J.isEligible?STATUS_MAP.eligible:STATUS_MAP.ineligible;return{requirement:toTitleCase(J.label),details:ADDITIONAL_ELIGIBILITY_MAPPING[J.label](C),status:React.createElement(StatusColumnContent,{status:ee})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Skills and Toolsets in your Resume"),columns,dataSource:K,pagination:!1})},SkillsRequiredTab=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{};return $?React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$t.container},React.createElement(Typography$1.Title,{level:3},"Job Check-list"),React.createElement(Certification,null),React.createElement(ResumeSkills,null),React.createElement(OtherRequirements,null)):null},bodyContainer="_bodyContainer_1nalq_1",tabs="_tabs_1nalq_5",styles$s={bodyContainer,tabs},ExpandedJobViewBody=()=>{var te;const{activeTab:C,setActiveTab:$,jobData:F,currentTab:V}=useJobPreview(),{applicationTimeline:K}=F||{},ee=[((te=K==null?void 0:K.timeline)==null?void 0:te.length)>0&&V===TAG_TO_TAB_MAPPING.applied&&{key:JOB_BODY_TABS.APPLICATION_TIMELINE.key,label:JOB_BODY_TABS.APPLICATION_TIMELINE.label,children:React.createElement(ApplicationTimelineTab,null)},{key:JOB_BODY_TABS.ABOUT_ROLE.key,label:JOB_BODY_TABS.ABOUT_ROLE.label,children:React.createElement(JobDescriptionTab,null)},{key:JOB_BODY_TABS.REQUIREMENTS.key,label:JOB_BODY_TABS.REQUIREMENTS.label,children:React.createElement(SkillsRequiredTab,null)}].filter(Boolean);return React.createElement("div",{className:styles$s.bodyContainer},React.createElement(Tabs$1,{activeKey:C,className:styles$s.tabs,items:ee,onChange:$}))},useUpdateApplicationStatusService=careerHubApi.injectEndpoints({endpoints:C=>({updateApplicationStatus:C.mutation({query:$=>({url:"/job-tracker/update-application/",method:"PATCH",body:$}),invalidatesTags:($,F,{job_profile_id:V})=>[{type:"JobPreview",id:V}]})})}),{useUpdateApplicationStatusMutation}=useUpdateApplicationStatusService,appliedButton="_appliedButton_1f028_1",saveButton$1="_saveButton_1f028_9",savedButton$1="_savedButton_1f028_9",jobActions="_jobActions_1f028_30",withdrawalReasonForm="_withdrawalReasonForm_1f028_36",warningIcon="_warningIcon_1f028_41",withdrawalReasonRadioGroup="_withdrawalReasonRadioGroup_1f028_45",withdrawnText="_withdrawnText_1f028_52",styles$r={appliedButton,saveButton:saveButton$1,savedButton:savedButton$1,jobActions,withdrawalReasonForm,warningIcon,withdrawalReasonRadioGroup,withdrawnText},ModalContent=({withdrawalReason:C,setWithdrawalReason:$,withdrawalMessage:F,setWithdrawalMessage:V})=>{const K=ee=>{const te=ee.target.value;$(te),te!=="Other"&&V("")},J=ee=>{V(ee.target.value)};return React.createElement(React.Fragment,null,React.createElement(Typography$1.Text,null,"Please note that once withdrawn you will not be allowed to apply for this job again"),React.createElement(Form$1,{className:styles$r.withdrawalReasonForm},React.createElement(Form$1.Item,{layout:"vertical",label:"Select reason"},React.createElement(Radio$1.Group,{className:styles$r.withdrawalReasonRadioGroup,onChange:K,value:C},WITHDRAW_REASONS.map(ee=>React.createElement(Radio$1,{key:ee.value,value:ee.value},ee.label))),C==="Other"&&React.createElement(Form$1.Item,null,React.createElement(Input$1.TextArea,{value:F,onChange:J,placeholder:"Please specify your reason"})))))},Withdrawal=()=>{var ve;const{analytics:C,jobId:$,jobData:F,refetch:V,currentTab:K}=useJobPreview(),{applicationStatus:J}=F||{},[ee,te]=React.useState(!1),[ne,re]=React.useState((ve=WITHDRAW_REASONS[0])==null?void 0:ve.value),[ae,oe]=React.useState(""),[ie]=useUpdateApplicationStatusMutation(),{message:se}=App$1.useApp(),ue=()=>sr(this,null,function*(){var he,pe;const me=yield ie({job_profile_id:$,update_action:"withdraw",message:ae||ne});(he=me==null?void 0:me.data)!=null&&he.success?(se.success("Application withdrawn successfully"),te(!1),re((pe=WITHDRAW_REASONS[0])==null?void 0:pe.value),oe(""),V()):se.error("Failed to withdraw application"),C==null||C.click("Withdraw Application Ok",PRODUCT_NAME,{currentTab:K,jobId:$})}),de=()=>{var me;te(!1),re((me=WITHDRAW_REASONS[0])==null?void 0:me.value),oe("")},le=()=>{var me;re((me=WITHDRAW_REASONS[0])==null?void 0:me.value),oe(""),te(!0),C==null||C.click("Expanded View - Withdraw Application",PRODUCT_NAME,{currentTab:K,jobId:$})};return J===APPLICATION_STATUS.WITHDRAWN?React.createElement("div",{className:styles$r.withdrawnText},React.createElement(CheckCircleFilled$1,null),"Your Application has been Withdrawn"):K===TAG_TO_TAB_MAPPING.applied&&!NON_WITHDRAW_STATUSES.includes(J)?React.createElement(React.Fragment,null,React.createElement(Button$2,{icon:React.createElement("img",{src:ICONS.exit,alt:"exit"}),onClick:le,className:styles$r.withdrawButton,ghost:!0,type:"primary",size:"large"},"Withdraw Application"),React.createElement(Modal$1,{title:React.createElement(Space$1,null,React.createElement(WarningFilled$1,{className:styles$r.warningIcon}),React.createElement(Typography$1.Text,null,"Withdraw My Application")),open:ee,onOk:ue,onCancel:de},React.createElement(ModalContent,{withdrawalReason:ne,setWithdrawalReason:re,withdrawalMessage:ae,setWithdrawalMessage:oe}))):null},SaveButton$1=()=>{const{analytics:C,jobId:$,jobData:F,refetch:V,currentTab:K}=useJobPreview(),[J,{isLoading:ee}]=useUpdateApplicationStatusMutation(),{applicationStatus:te}=F||{},ne=te===APPLICATION_STATUS.SAVED,re=()=>sr(this,null,function*(){var oe;const ae=yield J({job_profile_id:$,update_action:"save"});(oe=ae==null?void 0:ae.data)!=null&&oe.success?(message$1.success("Application saved successfully"),V()):message$1.error("Failed to save application"),C==null||C.click("Expanded View - Save","Jobs Page V2",{currentTab:K,jobId:$})});return K===TAG_TO_TAB_MAPPING.applied?null:ne?React.createElement(Button$2,{icon:React.createElement("img",{src:ICONS.bookmark,alt:"bookmark"}),type:"text",size:"large",disabled:!0},"Saved"):React.createElement(Button$2,{icon:React.createElement(SaveTwoTone$1,null),type:"primary",ghost:!0,size:"large",onClick:re,loading:ee},"Save")},ApplyButton=()=>{const{jobData:C,eligibilityCriteria:$,setActiveApplicationId:F,jobId:V,currentTab:K,analytics:J}=useJobPreview(),{applicationStatus:ee}=C||{},{isEligible:te}=$||{},ne=ee===APPLICATION_STATUS.WITHDRAWN,re=()=>{F(V),J==null||J.click("Expanded View - Apply Now","Jobs Page V2",{currentTab:K,jobId:V})};return React.useEffect(()=>()=>{F(null)},[F]),ne?null:K===TAG_TO_TAB_MAPPING.applied?React.createElement(Button$2,{icon:React.createElement(CheckCircleFilled$1,null),className:styles$r.appliedButton,type:"text",size:"large"},"Applied"):React.createElement(Button$2,{icon:React.createElement(RiseOutlined$1,null),onClick:re,className:styles$r.applyButton,type:"primary",size:"large",disabled:!te},"Apply Now")},Actions=()=>React.createElement("div",{className:styles$r.jobActions},React.createElement(ApplyButton,null),React.createElement(SaveButton$1,null),React.createElement(Withdrawal,null)),missingLogo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAACqElEQVR4Xu2bMUpEQRBEXQwNFLyKuYE38KDewMDcqyx8A0NRlAWFDbqKGYuezzP9tdMz7/X0Lrt42Lbt84K/NgQOCGnj4mcjCOnlAyHNfCAEId0INNsP7yEIaUag2XYiN+T48jR87Nv7x6E1OuxBOQBCFEqnzGhTKKUQolBCyDml0e5kZP1h2gFGhz0ol5GRpVBiZDGyjD7xox3GRYc9KOQYWQolRhYjy+gTP9phXHTYg0KOkaVQYmQxsow+8aMdxkWHPSjkGFkKJUYWI8voEz/aYVx02INCbpmRpRzmvzOj3zgr+0OIQon3EINSMMoNCcJWSiFEoRTMICQIWymFEIVSMIOQIGylFEIUSsEMQoKwlVIIUSgFMwgJwlZKIUShFMwgJAhbKYUQhVIwg5AgbKUUQhRKwUwLITN+aZvBbBTGKucof6Ba5SCV9FXOgZDK5OTn1U1HyGTg1XIIORFiZFWtYj6vOqtaDiEVIfM5Qha76pVfbkhFyHzODeGGmC2jxavG4mOvxnFaCiGL3XRuyLTe1xbihnBDtE5xU1VnVevxsbciZD5HyMSrfnl1beI/j9/cPQytsb0+D73++8Uf72/Da1SNFXlTrzYxfMrQAjPGXsUCIYZMhBiwElGEJCgbNRBiwEpEEZKgbNRAiAErEUVIgrJRAyEGrEQUIQnKRg2EGLASUYQkKBs1EGLASkQRkqBs1ECIASsRRUiCslFjN0KMM+8+2uL3kN1TNg6IEANWIoqQBGWjBkIMWIkoQhKUjRoIMWAloghJUDZqIMSAlYgiJEHZqIEQA1YiipAEZaMGQgxYiShCEpSNGggxYCWiCElQNmogxICViA4LSWySGr8Eyn/YAVaWAEKyvMtqCCkRZQMIyfIuqyGkRJQNICTLu6yGkBJRNvAFGmsSbsnlaLoAAAAASUVORK5CYII=",CompanyLogo=({logo:C,company:$,companiesList:F,companyName:V,size:K=48})=>{const[J,ee]=React.useState(()=>{var ne;return C||($&&$[0]&&((ne=F[$[0]])!=null&&ne.logo)?F[$[0]].logo:missingLogo)}),te=()=>{ee(missingLogo)};return React.createElement(Avatar$1,{size:K,src:J,alt:V,onError:te,shape:"square"})};CompanyLogo.propTypes={logo:PropTypes.string,company:PropTypes.arrayOf(PropTypes.number),companiesList:PropTypes.object,companyName:PropTypes.string,size:PropTypes.number},CompanyLogo.defaultProps={logo:null,company:[],companiesList:{},companyName:""};const basicInfo="_basicInfo_2vzae_1",companyInfo="_companyInfo_2vzae_12",companyName$1="_companyName_2vzae_18",container$5="_container_2vzae_25",extraDetails="_extraDetails_2vzae_33",extraDetailsDivider="_extraDetailsDivider_2vzae_44",jobTitle$1="_jobTitle_2vzae_51",jobLocation="_jobLocation_2vzae_58",styles$q={basicInfo,companyInfo,companyName:companyName$1,container:container$5,extraDetails,extraDetailsDivider,jobTitle:jobTitle$1,jobLocation},CompanyInfo=()=>{const{companyData:C}=useJobPreview(),{logo:$,name:F}=C||{};return React.createElement("div",{className:styles$q.companyInfo},React.createElement(CompanyLogo,{logo:$,companyName:F,size:50}),React.createElement("div",{className:styles$q.companyName},F))},JobTitle=()=>{const{jobData:C}=useJobPreview(),{title:$}=C||{};return React.createElement(Typography$1.Text,{ellipsis:!0,className:styles$q.jobTitle},$)},JobLocation=()=>{const{jobData:C}=useJobPreview(),{preferredCities:$}=C||{},F=formatLocation($);return React.createElement("div",{className:styles$q.jobLocation},F)},BasicInfo=()=>React.createElement("div",{className:styles$q.basicInfo},React.createElement(CompanyInfo,null),React.createElement(JobTitle,null),React.createElement(JobLocation,null)),ExtraDetails=()=>{const{jobData:C}=useJobPreview(),{minCtc:$,maxCtc:F,openForDiscussionCtc:V,isInternship:K,stipend:J,preferredNoticePeriod:ee,minExperience:te,maxExperience:ne}=C||{},re=formatCtc({minCtc:$,maxCtc:F,openForDiscussionCtc:V,isInternship:K,stipend:J}),ae=formatExperience$1(te,ne),oe=formatNoticePeriod(ee);return React.createElement("div",{className:styles$q.extraDetails},[re,ae,oe].filter(Boolean).map((ie,se)=>React.createElement(React.Fragment,{key:se},React.createElement("div",{className:styles$q.detail},ie),React.createElement(Divider$1,{size:"large",type:"vertical",className:styles$q.extraDetailsDivider}))))},ExpandedJobViewHeader=()=>React.createElement("div",{className:styles$q.container},React.createElement(BasicInfo,null),React.createElement(ExtraDetails,null),React.createElement(Actions,null)),field="_field_15aju_1",checkboxAdjacentField="_checkboxAdjacentField_15aju_7",fieldGroup="_fieldGroup_15aju_11",checkboxFieldGroup="_checkboxFieldGroup_15aju_17",fieldGroupLabel="_fieldGroupLabel_15aju_21",styles$p={field,checkboxAdjacentField,fieldGroup,checkboxFieldGroup,fieldGroupLabel};function CTC({fieldName:C,fieldProps:$,label:F}){return React.createElement(Form$1.Item,{label:F,name:C,rules:[{required:!0,message:`${F} is required`}],layout:"vertical",className:styles$p.field,extra:"Enter amount in lakhs. For eg, if amount is 50 LPA, enter 50."},React.createElement(Input$1,Hn({},$)))}function Linkedin({fieldName:C,label:$,fieldProps:F}){return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please enter your LinkedIn profile URL",type:"url"}],layout:"vertical",className:styles$p.field},React.createElement(Input$1,Hn({},F)))}const selectOptionsService=careerHubApi.injectEndpoints({endpoints:C=>({getSelectOptions:C.query({query:({fieldType:$,query:F})=>({url:"/job-tracker/v1/custom-data",params:{field_type:$,query:F}}),transformResponse:($,F,V)=>{const K=($==null?void 0:$[V==null?void 0:V.fieldType])||[];return(K==null?void 0:K.map(J=>({text:J,value:J})))||[]}})})}),{useLazyGetSelectOptionsQuery}=selectOptionsService;function Company({fieldName:C,label:$}){const[F]=useLazyGetSelectOptionsQuery(),[V,K]=React.useState([]),J=ee=>sr(this,null,function*(){const te=yield F({fieldType:"companies",query:ee});K((te==null?void 0:te.data)||[])});return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select a company"}],layout:"vertical",className:styles$p.field},React.createElement(Select$1,{options:V,showSearch:!0,filterOption:!1,onSearch:J}))}function Top5Skills({fieldName:C,label:$}){const F=reactRedux.useSelector(J=>J.scalantCareerHub.dashboard.userProfileData),V=(F==null?void 0:F.experienceBasedSkills)||[],K=getSkillOptions(V);return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select upto 5 primary skills"}],className:styles$p.field},React.createElement(Select$1,{options:K,mode:"multiple",showSearch:!1})))}function GradYear({fieldName:C,label:$}){return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select graduation year"}],className:styles$p.field},React.createElement(Select$1,{showSearch:!0,options:[...Array(71)].map((F,V)=>{const K=new Date().getFullYear()-60+V;return{label:K,value:`${K}-01-01`}}).reverse()}))}function CurrentLocation({fieldName:C,fieldProps:$,label:F}){return React.createElement(Form$1.Item,{label:F,name:C,rules:[{required:!0,message:"Please select current location"}],className:styles$p.field},React.createElement(Select$1,Hn({},$)))}function NoticePeriod({label:C}){const $=Form$1.useWatch(NOTICE_PERIOD_FIELD_MAP.notice_period)==="-1";return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Space$1,{className:classNames(styles$p.fieldGroup,styles$p.checkboxFieldGroup)},React.createElement(Form$1.Item,{label:C,name:NOTICE_PERIOD_FIELD_MAP.notice_period,rules:[{required:!0,message:"Please select notice period"}],className:classNames(styles$p.field,styles$p.checkboxAdjacentField)},React.createElement(Select$1,{options:NOTICE_PERIOD_OPTIONS})),React.createElement(Form$1.Item,{name:NOTICE_PERIOD_FIELD_MAP.buyout_notice,className:styles$p.field,valuePropName:"checked"},React.createElement(Checkbox$1,null,"Negotiable / Buyout available"))),$&&React.createElement(Form$1.Item,{label:"Last Date of Job",name:NOTICE_PERIOD_FIELD_MAP.available_joining_date,rules:[{required:!0,message:"Please enter last date"}],className:styles$p.field},React.createElement(Input$1,{type:"date"})))}function PreferredLocation({fieldName:C,label:$,fieldProps:F}){const V=Form$1.useWatch(CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india);return React.createElement(Space$1,{className:classNames(styles$p.fieldGroup,styles$p.checkboxFieldGroup)},React.createElement(Form$1.Item,{label:$,name:C,className:classNames(styles$p.field,styles$p.checkboxAdjacentField)},React.createElement(Select$1,br(Hn({},F),{disabled:V}))),React.createElement(Form$1.Item,{name:CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india,valuePropName:"checked"},React.createElement(Checkbox$1,null,"Anywhere in India")))}function TotalYearsOfExperience(){return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Form$1.Item,{label:"Experience Years",name:EXPERIENCE_FIELD_MAP.years_of_experience,rules:[{required:!0,message:"Please select years of experience"}],className:styles$p.field},React.createElement(Select$1,{options:YEAR_OPTIONS,showSearch:!0})),React.createElement(Form$1.Item,{label:"Experience Months",name:EXPERIENCE_FIELD_MAP.months_of_experience,rules:[{required:!0,message:"Please select months of experience"}],className:styles$p.field},React.createElement(Select$1,{options:MONTH_OPTIONS,showSearch:!0})))}const NON_CUSTOM_FIELD_MAP={expected_ctc:"expected_ctc",current_ctc:"current_ctc",orgyear:"orgyear",linkedin:"linkedin",current_company:"current_company",current_location:"current_location",preferred_location:"preferred_location",notice_period:"notice_period",experience:"experience",skills:"skills"},CHECKBOX_FIELD_MAP={preferred_location_anywhere_in_india:"preferred_location_anywhere_in_india"},EXPERIENCE_FIELD_MAP={years_of_experience:"years_of_experience",months_of_experience:"months_of_experience"},NOTICE_PERIOD_FIELD_MAP={notice_period:"notice_period",serving_notice:"serving_notice",available_joining_date:"available_joining_date",buyout_notice:"buyout_notice"},LOCATION_FIELD_MAP={current_location:"current_location",preferred_location:"preferred_location"},NON_CUSTOM_FIELDS=Object.values(NON_CUSTOM_FIELD_MAP),NON_CUSTOM_FIELD_COMPONENT_MAPPING={[NON_CUSTOM_FIELD_MAP.expected_ctc]:{component:CTC,props:{fieldName:"expected_ctc",label:"Expected CTC",fieldProps:{type:"number",min:0}}},[NON_CUSTOM_FIELD_MAP.current_ctc]:{component:CTC,props:{fieldName:"current_ctc",label:"Current CTC",fieldProps:{type:"number",min:0}}},[NON_CUSTOM_FIELD_MAP.current_location]:{component:CurrentLocation,props:{fieldName:NON_CUSTOM_FIELD_MAP.current_location,label:"Current Locations",fieldProps:{options:((er=window==null?void 0:window[HYDRATION_KEY])==null?void 0:er.job_locations)||[],mode:"multiple"}}},[NON_CUSTOM_FIELD_MAP.preferred_location]:{component:PreferredLocation,props:{fieldName:NON_CUSTOM_FIELD_MAP.preferred_location,label:"Preferred Locations",fieldProps:{options:((tr=window==null?void 0:window[HYDRATION_KEY])==null?void 0:tr.job_locations)||[],mode:"multiple"}}},[NON_CUSTOM_FIELD_MAP.orgyear]:{component:GradYear,props:{fieldName:NON_CUSTOM_FIELD_MAP.orgyear,label:"Graduation Year"}},[NON_CUSTOM_FIELD_MAP.linkedin]:{component:Linkedin,props:{fieldName:NON_CUSTOM_FIELD_MAP.linkedin,label:"LinkedIn profile",fieldProps:{type:"url"}}},[NON_CUSTOM_FIELD_MAP.current_company]:{component:Company,props:{fieldName:NON_CUSTOM_FIELD_MAP.current_company,label:"Company"}},[NON_CUSTOM_FIELD_MAP.notice_period]:{component:NoticePeriod,props:{fieldName:NON_CUSTOM_FIELD_MAP.notice_period,label:"Notice Period"}},[NON_CUSTOM_FIELD_MAP.experience]:{component:TotalYearsOfExperience,props:{fieldName:NON_CUSTOM_FIELD_MAP.experience,label:"Total Years of Experience"}},[NON_CUSTOM_FIELD_MAP.skills]:{component:Top5Skills,props:{fieldName:NON_CUSTOM_FIELD_MAP.skills,label:"Select upto 5 primary skills that you want to share to recruiters"}}},YEAR_OPTIONS=new Array(50).fill(0).map((C,$)=>({label:`${$} Years`,value:`${$}`})),MONTH_OPTIONS=new Array(12).fill(0).map((C,$)=>({label:`${$} Months`,value:`${$}`})),NOTICE_PERIOD_OPTIONS=[{value:"-1",label:"Currently Serving"},{value:"0",label:"Immediately Available"},{value:"15",label:"15 Days"},{value:"30",label:"30 Days"},{value:"45",label:"45 Days"},{value:"60",label:"60 Days"},{value:"90",label:"90 Days"}],ANYWHERE_IN_INDIA="anywhere_in_india",getSkillOptions=C=>(C==null?void 0:C.map($=>{var K,J,ee,te;const F=((K=$.proficiency_period)==null?void 0:K.years)||((J=$.proficiencyPeriod)==null?void 0:J.years),V=((ee=$.proficiency_period)==null?void 0:ee.months)||((te=$.proficiencyPeriod)==null?void 0:te.months);return{label:`${$.name} (${F}Y ${V}M)`,value:`${$.skillId}`}}))||[],CUSTOM_FIELD_TYPE_MAP={text:"text",date_time:"date_time",upload:"upload",number:"number"},getInitialFormData=C=>{const $=Object.fromEntries(Object.entries(C).map(([J,ee])=>{switch(J){case NON_CUSTOM_FIELD_MAP.current_location:return[J,ee==null?void 0:ee.split("/")];case NON_CUSTOM_FIELD_MAP.preferred_location:return ee===ANYWHERE_IN_INDIA?[J,null]:[J,ee==null?void 0:ee.split("/")];case NON_CUSTOM_FIELD_MAP.skills:return[J,ee==null?void 0:ee.map(te=>te.skill_id)];default:return[J,ee]}})),F=C[NON_CUSTOM_FIELD_MAP.notice_period]||{},V=C[NON_CUSTOM_FIELD_MAP.experience]||{},K=C[NON_CUSTOM_FIELD_MAP.preferred_location];return Object.entries(F).forEach(([J,ee])=>{J===NOTICE_PERIOD_FIELD_MAP.buyout_notice?$[J]=ee==="true":$[J]=ee}),Object.entries(V).forEach(([J,ee])=>{$[J]=ee}),$[CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india]=K===ANYWHERE_IN_INDIA,$},getInitialCustomFormData=C=>C.reduce((F,V)=>br(Hn({},F),{[V.id]:V.response}),{}),createNoticePeriodFieldPayload=C=>br(Hn({},C),{[NOTICE_PERIOD_FIELD_MAP.serving_notice]:C[NOTICE_PERIOD_FIELD_MAP.notice_period]==="-1"}),createExperienceFieldPayload=C=>{let $=0;return $+=(Number(C[EXPERIENCE_FIELD_MAP.years_of_experience])||0)*12,$+=Number(C[EXPERIENCE_FIELD_MAP.months_of_experience])||0,$},createSkillsFieldPayload=(C,$)=>$.map(F=>br(Hn({},F),{is_top_5:C.includes(String(F.skillId))})),createCustomFieldsPayload=C=>{const $=Object.keys(NON_CUSTOM_FIELD_MAP)+Object.keys(CHECKBOX_FIELD_MAP)+Object.keys(EXPERIENCE_FIELD_MAP)+Object.keys(NOTICE_PERIOD_FIELD_MAP);return Object.entries(C).filter(([F])=>!$.includes(F)).map(([F,V])=>({id:F,response:V}))},createDefaultFieldsPayload=(C,$)=>{const F={};Object.entries(C).forEach(([J,ee])=>{NON_CUSTOM_FIELDS.includes(J)&&(LOCATION_FIELD_MAP[J]?F[J]=ee==null?void 0:ee.join("/"):F[J]=ee)});const V={},K={};return Object.entries(C).forEach(([J,ee])=>{NOTICE_PERIOD_FIELD_MAP[J]?V[J]=ee:EXPERIENCE_FIELD_MAP[J]?K[J]=ee:CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india===J&&ee&&(F[NON_CUSTOM_FIELD_MAP.preferred_location]=ANYWHERE_IN_INDIA)}),F[NON_CUSTOM_FIELD_MAP.notice_period]=createNoticePeriodFieldPayload(V),F[NON_CUSTOM_FIELD_MAP.experience]=createExperienceFieldPayload(K),F[NON_CUSTOM_FIELD_MAP.skills]=createSkillsFieldPayload(C[NON_CUSTOM_FIELD_MAP.skills],$),F},createApplicationFormPayload=(C,$)=>({default_fields:createDefaultFieldsPayload(C,$),custom_fields:createCustomFieldsPayload(C)}),form="_form_1ip4j_1",styles$o={form};function GenericField({formType:C,field:$}){return React.createElement(Form$1.Item,{label:$.attributes.title,name:$.id,rules:[{required:!0,message:`${$.attributes.title} is required`}],layout:"vertical",className:styles$p.field},React.createElement(Input$1,{type:C}))}function UploadField({field:C}){const{onUploadFile:$}=useApplicationFormContext(),[F,V]=React.useState(!1),K=Form$1.useFormInstance(),J=Form$1.useWatch(C.id)||{},ee=te=>sr(this,null,function*(){var re,ae;const ne=(ae=(re=te==null?void 0:te.target)==null?void 0:re.files)==null?void 0:ae[0];if(ne){V(!0),K.setFieldValue(C.id,{file_name:ne.name});try{if($){const oe=yield $(ne);K.setFieldValue(C.id,{file_name:ne.name,file_url:oe}),message$1.success("File uploaded successfully")}else throw new Error("Upload file function not provided")}catch(oe){message$1.error("Failed to upload file")}finally{V(!1)}}});return React.createElement(Form$1.Item,{label:C.attributes.title,name:C.id,rules:[{required:!0,message:`${C.attributes.title} is required`}],layout:"vertical",className:styles$p.field},React.createElement(Upload$1,{multiple:!1,accept:".pdf,.doc,.docx,.txt,.md",showUploadList:!1,beforeUpload:()=>!1,onChange:({file:te})=>{if(te){const ne={target:{files:[te.originFileObj||te]}};ee(ne)}},disabled:F},React.createElement(Button$2,{className:styles$p.field,loading:F,icon:!!J.file_name&&React.createElement(CheckCircleFilled$1,null)},!!J.file_name&&J.file_name,!J.file_name&&!F&&"Upload File")))}function CustomField({field:C}){switch(C.attributes.form_type){case CUSTOM_FIELD_TYPE_MAP.upload:return React.createElement(UploadField,{field:C});case CUSTOM_FIELD_TYPE_MAP.date_time:return React.createElement(GenericField,{formType:"date",field:C});default:return React.createElement(GenericField,{formType:C.attributes.form_type,field:C})}}function NonCustomField({field:C}){var K;if(!NON_CUSTOM_FIELD_COMPONENT_MAPPING[(K=C==null?void 0:C.attributes)==null?void 0:K.title])return null;const{title:$}=C.attributes,{component:F,props:V}=NON_CUSTOM_FIELD_COMPONENT_MAPPING[$];return React.createElement(F,Hn({},V))}function ApplicationForm(){const{applicationId:C,stepName:$,jobProfileId:F}=useApplicationFormContext(),{data:V,isLoading:K}=useApplicationForm({jobProfileId:F,applicationId:C,status:$}),[J]=Form$1.useForm(),{setFormInstance:ee}=useApplicationFormContext(),te=React.useMemo(()=>V==null?void 0:V.reduce((re,ae)=>(ae.attributes.custom||(re[ae.attributes.title]=ae),re),{}),[V]),ne=React.useMemo(()=>V==null?void 0:V.filter(re=>re.attributes.custom),[V]);return React.useEffect(()=>{if(!te||!ne)return;const re=Object.fromEntries(Object.entries(te).map(([oe,ie])=>[oe,ie.attributes.response])),ae=ne.map(oe=>({id:oe.id,response:oe.attributes.response}));J.setFieldsValue(Hn(Hn({},getInitialFormData(re)),getInitialCustomFormData(ae)))},[te,ne,J]),React.useEffect(()=>{ee(J)},[J,ee]),K||!te||!ne?React.createElement(Skeleton$1,{active:!0}):React.createElement(Form$1,{layout:"vertical",className:styles$o.form,form:J},NON_CUSTOM_FIELDS.map(re=>React.createElement(NonCustomField,{key:re,field:te[re]})),Object.entries(ne).map(([re,ae])=>React.createElement(CustomField,{key:re,field:ae})))}ApplicationForm.propTypes={jobProfileId:PropTypes.number.isRequired,applicationId:PropTypes.number,status:PropTypes.string};const applicationFormFooterContainer="_applicationFormFooterContainer_6f2h5_1",resumeChoiceSelectFooterContainer="_resumeChoiceSelectFooterContainer_6f2h5_6",styles$n={applicationFormFooterContainer,resumeChoiceSelectFooterContainer},ApplicationFormFooter=({onCancel:C})=>{const $=reactRedux.useSelector(se=>se.scalantCareerHub.dashboard.userProfileData),F=($==null?void 0:$.experienceBasedSkills)||[],{applicationId:V,formInstance:K,jobProfileId:J,stepName:ee,setStepName:te}=useApplicationFormContext(),{analytics:ne}=useJobPreview(),[re,{isLoading:ae}]=useUpdateApplicationMutation(),oe=()=>sr(this,null,function*(){var se;ne==null||ne.click("Application Form - Next",PRODUCT_NAME);try{const ue={job_profile_id:J,step_name:ee,form_data:createApplicationFormPayload(K.getFieldsValue(),F)},de=yield re({applicationId:V,payload:ue});(se=de==null?void 0:de.data)!=null&&se.success?te(APPLICATION_STATUS.RESUME_FITMENT_CHECK):message$1.error("Failed to update application")}catch(ue){message$1.error("Failed to update application")}}),ie=()=>{ne==null||ne.click("Application Form - Cancel",PRODUCT_NAME),C()};return React.createElement(Space$1,{className:styles$n.applicationFormFooterContainer},React.createElement(Button$2,{onClick:ie},"Cancel"),React.createElement(Button$2,{loading:ae,type:"primary",onClick:oe},"Next"))},ResumeChoiceSelectFooter=()=>{const{applicationId:C,selectedResume:$,jobProfileId:F,stepName:V,setStepName:K}=useApplicationFormContext(),{analytics:J}=useJobPreview(),[ee,{isLoading:te}]=useUpdateApplicationMutation(),ne=()=>{J==null||J.click("Resume Choice - Go Back",PRODUCT_NAME),K(APPLICATION_STATUS.APPLICATION_FORM)},re=()=>sr(this,null,function*(){var ae;J==null||J.click("Resume Choice - Proceed to Apply",PRODUCT_NAME);try{const ie=yield ee({applicationId:C,payload:{job_profile_id:F,step_name:V,resume_id:$}});(ae=ie==null?void 0:ie.data)!=null&&ae.success?K(APPLICATION_STATUS.SUCCESSFULLY_APPLIED):message$1.error("Failed to update application")}catch(oe){message$1.error("Failed to update application")}});return React.createElement(Space$1,{className:styles$n.resumeChoiceSelectFooterContainer},React.createElement(Space$1,null,React.createElement(BulbTwoTone$1,null),React.createElement(Typography$1.Text,{strong:!0},"Quick Tip: "),React.createElement(Typography$1.Text,null,"Complete the steps below to boost your chances")),React.createElement(Space$1,null,React.createElement(Button$2,{onClick:ne},"Go Back"),React.createElement(Button$2,{type:"primary",onClick:re,loading:te,disabled:!$},"Proceed to Apply")))};function Footer$1({onCancel:C}){const{stepName:$}=useApplicationFormContext();switch($){case APPLICATION_STATUS.APPLICATION_FORM:return React.createElement(ApplicationFormFooter,{onCancel:C});case APPLICATION_STATUS.RESUME_CHOICE_SELECT:return React.createElement(ResumeChoiceSelectFooter,null);default:return null}}const stepText="_stepText_14qm3_1",titleContainer$1="_titleContainer_14qm3_5",titleIcon="_titleIcon_14qm3_9",titleText="_titleText_14qm3_14",styles$m={stepText,titleContainer:titleContainer$1,titleIcon,titleText},{Text:Text$3}=Typography$1,STEP_MAP={[APPLICATION_STATUS.APPLICATION_FORM]:{currentStep:1,icon:InfoCircleFilled$1,title:"Required Details",totalSteps:2},[APPLICATION_STATUS.RESUME_FITMENT_CHECK]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2},[APPLICATION_STATUS.RESUME_CHOICE_SELECT]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2},[APPLICATION_STATUS.SUCCESSFULLY_APPLIED]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2}};function FormHeader({onClose:C}){const{stepName:$,jobProfileId:F}=useApplicationFormContext(),{analytics:V}=useJobPreview(),{updateTab:K}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),{refetch:J}=useGetJobPreviewQuery(F,{skip:!F});if(!STEP_MAP[$])return null;const{currentStep:ee,icon:te,title:ne,totalSteps:re}=STEP_MAP[$]||{},ae=()=>{V==null||V.click("Application Form - Close",PRODUCT_NAME),$===APPLICATION_STATUS.SUCCESSFULLY_APPLIED&&(K(TAG_TO_TAB_MAPPING.applied),J()),C==null||C()};return React.createElement(Flex$1,{justify:"space-between"},React.createElement(Space$1,{className:styles$m.container,direction:"vertical"},React.createElement(Text$3,{className:styles$m.stepText},"Step ",ee,"/",re),React.createElement(Space$1,{className:styles$m.titleContainer},React.createElement(te,{className:styles$m.titleIcon}),React.createElement(Text$3,{className:styles$m.titleText},ne))),React.createElement(Button$2,{icon:React.createElement(CloseOutlined$1,null),type:"text",onClick:ae}))}function commonjsRequire(C){throw new Error('Could not dynamically require "'+C+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function($,F){module.exports=F()})(commonjsGlobal,function(){return(()=>{var __webpack_modules__=[,(C,$,F)=>{function V(Le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(Pe){return typeof Pe}:V=function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},V(Le)}Object.defineProperty($,"__esModule",{value:!0}),$.StatTimer=$.RenderingCancelledException=$.PixelsPerInch=$.PageViewport=$.PDFDateString=$.LinkTarget=$.DOMStandardFontDataFactory=$.DOMSVGFactory=$.DOMCanvasFactory=$.DOMCMapReaderFactory=void 0,$.addLinkAttributes=Fe,$.deprecated=Xe,$.getFilenameFromUrl=Ae,$.getPdfFilenameFromUrl=Me,$.getXfaPageViewport=Ue,$.isDataScheme=Oe,$.isPdfFile=Te,$.isValidFetchUrl=ze,$.loadScript=Ve;var K=te(F(2)),J=F(4),ee=F(135);function te(Le){return Le&&Le.__esModule?Le:{default:Le}}function ne(Le,we){var Pe=typeof Symbol!="undefined"&&Le[Symbol.iterator]||Le["@@iterator"];if(!Pe){if(Array.isArray(Le)||(Pe=re(Le))||we&&Le&&typeof Le.length=="number"){Pe&&(Le=Pe);var ke=0,He=function(){};return{s:He,n:function(){return ke>=Le.length?{done:!0}:{done:!1,value:Le[ke++]}},e:function(it){throw it},f:He}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
434
|
+
You must add the middleware for RTK-Query to function correctly!`);Ae=!!Me}var je=!Ae&&De.current;return ae(function(){De.current=Ae}),ae(function(){je&&(Ne.current=void 0)},[je]),ae(function(){var ze,Ve=Ne.current;if(typeof process!="undefined"&&process.env.NODE_ENV==="removeMeOnCompilation"&&console.log(je),$e===skipToken){Ve==null||Ve.unsubscribe(),Ne.current=void 0;return}var Xe=(ze=Ne.current)==null?void 0:ze.subscriptionOptions;if(!Ve||Ve.arg!==$e){Ve==null||Ve.unsubscribe();var Ye=xe(Ce($e,{subscriptionOptions:Ie,forceRefetch:_e}));Ne.current=Ye}else Ie!==Xe&&Ve.updateSubscriptionOptions(Ie)},[xe,Ce,_e,$e,Ie,je]),React.useEffect(function(){return function(){var ze;(ze=Ne.current)==null||ze.unsubscribe(),Ne.current=void 0}},[]),React.useMemo(function(){return{refetch:function(){var ze;if(!Ne.current)throw new Error("Cannot refetch a query that has not been started yet.");return(ze=Ne.current)==null?void 0:ze.refetch()}}},[])},ve=function(he){var pe=he===void 0?{}:he,ce=pe.refetchOnReconnect,fe=pe.refetchOnFocus,ye=pe.pollingInterval,_e=ye===void 0?0:ye,ge=$.endpoints[de].initiate,be=K(),Se=React.useState(UNINITIALIZED_VALUE),Ee=Se[0],Ce=Se[1],xe=React.useRef(),$e=useShallowStableValue({refetchOnReconnect:ce,refetchOnFocus:fe,pollingInterval:_e});ae(function(){var Ne,Fe,Oe=(Ne=xe.current)==null?void 0:Ne.subscriptionOptions;$e!==Oe&&((Fe=xe.current)==null||Fe.updateSubscriptionOptions($e))},[$e]);var Ie=React.useRef($e);ae(function(){Ie.current=$e},[$e]);var De=React.useCallback(function(Ne,Fe){Fe===void 0&&(Fe=!1);var Oe;return V(function(){var Te;(Te=xe.current)==null||Te.unsubscribe(),xe.current=Oe=be(ge(Ne,{subscriptionOptions:Ie.current,forceRefetch:!Fe})),Ce(Ne)}),Oe},[be,ge]);return React.useEffect(function(){return function(){var Ne;(Ne=xe==null?void 0:xe.current)==null||Ne.unsubscribe()}},[]),React.useEffect(function(){Ee!==UNINITIALIZED_VALUE&&!xe.current&&De(Ee,!0)},[Ee,De]),React.useMemo(function(){return[De,Ee]},[De,Ee])},me=function(he,pe){var ce=pe===void 0?{}:pe,fe=ce.skip,ye=fe===void 0?!1:fe,_e=ce.selectFromResult,ge=$.endpoints[de].select,be=useStableQueryArgs(ye?skipToken:he,ne,re.endpointDefinitions[de],de),Se=React.useRef(),Ee=React.useMemo(function(){return toolkit.createSelector([ge(be),function(De,Ne){return Ne},function(De){return be}],oe)},[ge,be]),Ce=React.useMemo(function(){return _e?toolkit.createSelector([Ee],_e):Ee},[Ee,_e]),xe=J(function(De){return Ce(De,Se.current)},reactRedux.shallowEqual),$e=ee(),Ie=Ee($e.getState(),Se.current);return useIsomorphicLayoutEffect(function(){Se.current=Ie},[Ie]),xe};return{useQueryState:me,useQuerySubscription:le,useLazyQuerySubscription:ve,useLazyQuery:function(he){var pe=ve(he),ce=pe[0],fe=pe[1],ye=me(fe,__spreadProps(__spreadValues({},he),{skip:fe===UNINITIALIZED_VALUE})),_e=React.useMemo(function(){return{lastArg:fe}},[fe]);return React.useMemo(function(){return[ce,ye,_e]},[ce,ye,_e])},useQuery:function(he,pe){var ce=le(he,pe),fe=me(he,__spreadValues({selectFromResult:he===skipToken||pe!=null&&pe.skip?void 0:noPendingQueryStateSelector},pe)),ye=fe.data,_e=fe.status,ge=fe.isLoading,be=fe.isSuccess,Se=fe.isError,Ee=fe.error;return React.useDebugValue({data:ye,status:_e,isLoading:ge,isSuccess:be,isError:Se,error:Ee}),React.useMemo(function(){return __spreadValues(__spreadValues({},fe),ce)},[fe,ce])}}}function ue(de){return function(le){var ve=le===void 0?{}:le,me=ve.selectFromResult,he=me===void 0?defaultMutationStateSelector:me,pe=ve.fixedCacheKey,ce=$.endpoints[de],fe=ce.select,ye=ce.initiate,_e=K(),ge=React.useState(),be=ge[0],Se=ge[1];React.useEffect(function(){return function(){be!=null&&be.arg.fixedCacheKey||be==null||be.reset()}},[be]);var Ee=React.useCallback(function(Ve){var Xe=_e(ye(Ve,{fixedCacheKey:pe}));return Se(Xe),Xe},[_e,ye,pe]),Ce=(be||{}).requestId,xe=React.useMemo(function(){return toolkit.createSelector([fe({fixedCacheKey:pe,requestId:be==null?void 0:be.requestId})],he)},[fe,be,he,pe]),$e=J(xe,reactRedux.shallowEqual),Ie=pe==null?be==null?void 0:be.arg.originalArgs:void 0,De=React.useCallback(function(){V(function(){be&&Se(void 0),pe&&_e($.internalActions.removeMutationResult({requestId:Ce,fixedCacheKey:pe}))})},[_e,pe,be,Ce]),Ne=$e.endpointName,Fe=$e.data,Oe=$e.status,Te=$e.isLoading,Ae=$e.isSuccess,Me=$e.isError,je=$e.error;React.useDebugValue({endpointName:Ne,data:Fe,status:Oe,isLoading:Te,isSuccess:Ae,isError:Me,error:je});var ze=React.useMemo(function(){return __spreadProps(__spreadValues({},$e),{originalArgs:Ie,reset:De})},[$e,Ie,De]);return React.useMemo(function(){return[Ee,ze]},[Ee,ze])}}}var DefinitionType;(function(C){C.query="query",C.mutation="mutation"})(DefinitionType||(DefinitionType={}));function isQueryDefinition(C){return C.type===DefinitionType.query}function isMutationDefinition(C){return C.type===DefinitionType.mutation}function capitalize$1(C){return C.replace(C[0],C[0].toUpperCase())}function safeAssign(C){for(var $=[],F=1;F<arguments.length;F++)$[F-1]=arguments[F];Object.assign.apply(Object,__spreadArray$1([C],$))}var reactHooksModuleName=Symbol(),reactHooksModule=function(C){var $=C===void 0?{}:C,F=$.batch,V=F===void 0?reactRedux.batch:F,K=$.useDispatch,J=K===void 0?reactRedux.useDispatch:K,ee=$.useSelector,te=ee===void 0?reactRedux.useSelector:ee,ne=$.useStore,re=ne===void 0?reactRedux.useStore:ne,ae=$.unstable__sideEffectsInRender,oe=ae===void 0?!1:ae;return{name:reactHooksModuleName,init:function(ie,se,ue){var de=se.serializeQueryArgs,le=ie,ve=buildHooks({api:ie,moduleOptions:{batch:V,useDispatch:J,useSelector:te,useStore:re,unstable__sideEffectsInRender:oe},serializeQueryArgs:de,context:ue}),me=ve.buildQueryHooks,he=ve.buildMutationHook,pe=ve.usePrefetch;return safeAssign(le,{usePrefetch:pe}),safeAssign(ue,{batch:V}),{injectEndpoint:function(ce,fe){if(isQueryDefinition(fe)){var ye=me(ce),_e=ye.useQuery,ge=ye.useLazyQuery,be=ye.useLazyQuerySubscription,Se=ye.useQueryState,Ee=ye.useQuerySubscription;safeAssign(le.endpoints[ce],{useQuery:_e,useLazyQuery:ge,useLazyQuerySubscription:be,useQueryState:Se,useQuerySubscription:Ee}),ie["use"+capitalize$1(ce)+"Query"]=_e,ie["useLazy"+capitalize$1(ce)+"Query"]=ge}else if(isMutationDefinition(fe)){var Ce=he(ce);safeAssign(le.endpoints[ce],{useMutation:Ce}),ie["use"+capitalize$1(ce)+"Mutation"]=Ce}}}}}},createApi=buildCreateApi(coreModule(),reactHooksModule());let baseUrl="http://localhost:8000";const dynamicBaseQuery=(C,$,F)=>sr(this,null,function*(){return fetchBaseQuery({baseUrl,prepareHeaders:K=>{if(K.set("Content-Type","application/json"),typeof window!="undefined"){const J=document.querySelector('meta[name="csrf-token"]');J&&K.set("X-CSRF-Token",J.content)}return K}})(C,$,F)}),careerHubApi=createApi({reducerPath:"careerHubApi",baseQuery:dynamicBaseQuery,tagTypes:["CareerHub","Jobs","PipelineJobs","RelevantJobs","FilterOptions","JobPreview","JobAlerts"],endpoints:()=>({})}),setBaseUrl=C=>{C!==baseUrl&&(baseUrl=C)},BASE_URL="/api/v3/careers-hub/applications",createApplicationService=careerHubApi.injectEndpoints({endpoints:C=>({createApplication:C.mutation({query:({jobProfileId:$,utmMedium:F,utmSource:V,currentTab:K,utmId:J})=>({url:BASE_URL,method:"POST",body:{job_profile_id:$,medium:F!=null?F:"ch",origin:V!=null?V:"direct",tab_name:K,action_type:J!=null?J:"apply"}}),invalidatesTags:["Jobs","PipelineJobs","RelevantJobs"]}),getApplication:C.query({query:({applicationId:$,jobProfileId:F,status:V})=>({url:`${BASE_URL}/${$}`,params:{job_profile_id:F,step_name:V}})}),updateApplication:C.mutation({query:({applicationId:$,payload:F})=>({url:`${BASE_URL}/${$}`,method:"PATCH",body:F}),invalidatesTags:["Jobs","PipelineJobs","RelevantJobs"]})})}),{useCreateApplicationMutation,useGetApplicationQuery,useUpdateApplicationMutation}=createApplicationService,useCreateApplication=({jobProfileId:C,utmMedium:$,utmSource:F,currentTab:V,utmId:K})=>{const[J,ee]=React.useState(null),[te,ne]=React.useState(null),[re,{isLoading:ae,isError:oe,error:ie,isSuccess:se}]=useCreateApplicationMutation(),ue=React.useCallback(()=>sr(this,null,function*(){var le,ve,me,he;const de=yield re({jobProfileId:C,utmMedium:$,utmSource:F,currentTab:V,utmId:K});ee((ve=(le=de==null?void 0:de.data)==null?void 0:le.user_company)==null?void 0:ve.id),ne((he=(me=de==null?void 0:de.data)==null?void 0:me.user_company)==null?void 0:he.status)}),[re,C,$,F,V,K]);return React.useEffect(()=>{ue()},[ue]),{retry:ue,data:{status:te,applicationId:J},isLoading:ae,isError:oe,error:ie,isSuccess:se}},useApplicationForm=({jobProfileId:C,applicationId:$,status:F})=>{var re;const{data:V,isLoading:K,isError:J,error:ee,isSuccess:te,refetch:ne}=useGetApplicationQuery({applicationId:$,jobProfileId:C,status:F},{skip:!$||!F});return{retry:ne,data:(re=V==null?void 0:V.details)==null?void 0:re.data,isLoading:K,isError:J,error:ee,isSuccess:te}};function convertArraySingletonsToObject(C){return C.map($=>({label:$,value:$}))}const JOB_CARD_CONFIG={home:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},all:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},eligible:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},saved:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!1,isApplicationStatusAvailable:!1},applications:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!0,isArchivedStatusAvailable:!0,isApplicationStatusAvailable:!0},archived:{isExperienceCtcAvailable:!0,isNoticePeriodAvailable:!0,isAppliedDateAvailable:!1,isArchivedStatusAvailable:!0,isApplicationStatusAvailable:!1}},APPLICATION_STATUS$1={NOT_APPLIED:"Not Applied",SAVED:"Saved",APPLIED:"Applied",IN_PIPELINE:"In Pipeline",ARCHIVED:"Archived"},JOB_PROFILE_STATUS={ACTIVE:"active",PAUSED:"paused",INACTIVE:"inactive"},TABS={HOME:"home",ALL:"all",ELIGIBLE:"eligible",SAVED:"saved",APPLICATIONS:"applications",ARCHIVED:"archived"},WITHDRAW_REASONS=convertArraySingletonsToObject(["Got another offer","Company didn't match expectations","Need more prep time","Applied by mistake","Other"]),useJobCardState=({currentTab:C,isActive:$,jobData:F})=>{const V=React.useMemo(()=>JOB_CARD_CONFIG[C]||JOB_CARD_CONFIG.all,[C]),K=React.useMemo(()=>!0,[]),J=React.useMemo(()=>F.expiry?new Date(F.expiry)<new Date||F.jobProfileStatus!=="active":!1,[F.expiry,F.jobProfileStatus]);return{cardConfig:V,shouldShowBody:K,isExpired:J}},useJobFilters=()=>{const C=reactRedux.useSelector(F=>{var V;return((V=F.scalantCareerHub)==null?void 0:V.filter)||{}});return React.useMemo(()=>{const{filters:F,per_page:V,tab:K,page_number:J,sortings:ee,skip_expired_jobs:te}=C;return{per_page:V,tab:K,filters:F||{keyword:""},sortings:ee,page_number:J,skip_expired_jobs:te}},[C])},useInfiniteScroll=({hasMore:C=!0,isLoading:$=!1,isFetchingMore:F=!1,rootMargin:V="100px",threshold:K=.1}={})=>{const J=reactRedux.useDispatch(),ee=reactRedux.useSelector(oe=>{var ie,se;return((se=(ie=oe.scalantCareerHub)==null?void 0:ie.filter)==null?void 0:se.page_number)||1}),te=React.useRef(null),ne=React.useRef(null),re=React.useCallback(()=>{!$&&!F&&C&&J(setPageNumber(ee+1))},[J,ee,$,F,C]);return React.useEffect(()=>{const oe=te.current;if(ne.current&&(oe&&ne.current.unobserve(oe),ne.current=null),!oe||!C||$||F)return;const ie=new IntersectionObserver(se=>{const[ue]=se;ue.isIntersecting&&re()},{root:null,rootMargin:V,threshold:K});return ie.observe(oe),ne.current=ie,()=>{ne.current&&oe&&(ne.current.unobserve(oe),ne.current=null)}},[re,C,$,F,V,K]),{sentinelRef:React.useCallback(oe=>{if(te.current&&ne.current&&(ne.current.unobserve(te.current),ne.current=null),te.current=oe,oe&&C&&!$&&!F){const ie=new IntersectionObserver(se=>{const[ue]=se;ue.isIntersecting&&re()},{root:null,rootMargin:V,threshold:K});ie.observe(oe),ne.current=ie}},[re,C,$,F,V,K])}},APPLICATION_STATUS={APPLICATION_FORM:"application_form",RESUME_FITMENT_CHECK:"resume_fitment_check",RESUME_CHOICE_SELECT:"resume_choice_select",SAVED:"Saved",WITHDRAWN:"Application Withdrawn",SUCCESSFULLY_APPLIED:"successfully_applied"},SIDER_WIDTH={PROFILE_DETAILS:"25%",JOB_DETAILS:"60%"},JOB_FILTER_TAGS={relevant:{label:"Preferred Jobs",icon:UnlockOutlined$1},all:{label:"All Jobs",icon:RiseOutlined$1},saved:{label:"Saved",icon:DownloadOutlined$1},applied:{label:"Applied",icon:CheckCircleOutlined$1}},TAG_TO_TAB_MAPPING={relevant:"relevant",all:"all",saved:"saved",applied:"applications"},COUNT_TO_TAB_MAPPING={relevant:"relevant",all:"all",saved:"saved",applied:"applications"},SORTING_OPTIONS={eligibility:{label:"Eligibility",value:"eligibility",mapping:{property:"eligibility",direction:"DESC"}},popularity:{label:"Popularity",value:"popularity",mapping:{property:"popularity",direction:"DESC"}},leastApplied:{label:"Least Applied",value:"leastApplied",mapping:{property:"popularity",direction:"ASC"}},mostRecent:{label:"Most Recent",value:"mostRecent",mapping:{property:"date_posted_on",direction:"DESC"}}},JOB_BODY_TABS={ABOUT_ROLE:{key:"about-role",label:"About Role"},REQUIREMENTS:{key:"requirements",label:"Requirements"},APPLICATION_TIMELINE:{key:"application-timeline",label:"Application Timeline"}},ALERT_FREQUENCY={REALTIME:0,DAILY:1,ALTERNATE_DAY:2,WEEKLY:7},ALERT_FREQUENCY_LABELS={[ALERT_FREQUENCY.REALTIME]:"Realtime",[ALERT_FREQUENCY.DAILY]:"Daily",[ALERT_FREQUENCY.ALTERNATE_DAY]:"Every alternate day",[ALERT_FREQUENCY.WEEKLY]:"Weekly"},ALERT_NOTIFICATION_TYPE={EMAIL:"email",WHATSAPP:"whatsapp",BOTH:"both"},ALERT_NOTIFICATION_LABELS={[ALERT_NOTIFICATION_TYPE.EMAIL]:"On Email",[ALERT_NOTIFICATION_TYPE.WHATSAPP]:"On Whatsapp",[ALERT_NOTIFICATION_TYPE.BOTH]:"On Email & Whatsapp"},ALERT_STATUS={ACTIVE:"active",INACTIVE:"inactive"},DEFAULT_PROCESS_COUNTS={all:0,relevant:0,draft:0,applications:0,saved:0,archived:0},HYDRATION_KEY="__CAREERS_HUB__",getCurrentSortingValue=(C=[])=>{if(!C||C.length===0)return"eligibility";const $=C[0];for(const F of Object.values(SORTING_OPTIONS))if(F.mapping.property===$.property&&F.mapping.direction===$.direction)return F.value;return"eligibility"},accumulateJobs=(C=[],$=[])=>{if(!$||$.length===0)return C;const F=new Set(C.map(K=>K.id)),V=$.filter(K=>!F.has(K.id));return[...C,...V]},accumulateCompaniesMap=(C={},$={})=>Hn(Hn({},C),$),useAccumulatedJobs=(C,$=!1,F=!1,V=null)=>{const K=reactRedux.useSelector(le=>{var ve,me;return((me=(ve=le.scalantCareerHub)==null?void 0:ve.filter)==null?void 0:me.page_number)||1}),J=reactRedux.useSelector(le=>{var ve,me;return((me=(ve=le.scalantCareerHub)==null?void 0:ve.dashboard)==null?void 0:me.processCounts)||{}}),[ee,te]=React.useState([]),[ne,re]=React.useState({}),ae=React.useMemo(()=>(C==null?void 0:C.jobs)||(C==null?void 0:C.results)||[],[C==null?void 0:C.jobs,C==null?void 0:C.results]),oe=React.useMemo(()=>(C==null?void 0:C.companiesMap)||{},[C==null?void 0:C.companiesMap]),ie=React.useMemo(()=>V||null,[V]),se=React.useMemo(()=>typeof(C==null?void 0:C.totalEntries)=="number"?C.totalEntries:ie?J[ie]||0:null,[ie,J,C==null?void 0:C.totalEntries]);React.useEffect(()=>{K===1?(te(ae),re(oe)):ae.length>0&&(te(le=>accumulateJobs(le,ae)),re(le=>accumulateCompaniesMap(le,oe)))},[ae,oe,K]);const ue=React.useMemo(()=>se===null?ae.length>0:ee.length<se,[se,ee.length,ae.length]),de=$&&K>1;return{accumulatedJobs:ee,accumulatedCompaniesMap:ne,hasMore:ue,isFetchingMore:de,isLoading:(F||$)&&K===1}},filterService=careerHubApi.injectEndpoints({endpoints:C=>({getCompanies:C.query({query:$=>({url:"/job-tracker/filters/",params:{query_type:"companies",q:$}}),transformResponse:$=>($.data||[]).map(V=>({id:V.id,value:V.attributes.name})),providesTags:["FilterOptions"]}),getTitles:C.query({query:$=>({url:"/job-tracker/filters/",params:{query_type:"title",q:$}}),transformResponse:$=>{const F=($.data||[]).map(K=>({id:K.id,value:K.attributes.title||K.attributes.name}));let V={};return F.forEach(K=>{V[K.value]=K.value}),Object.keys(V).map(K=>({key:K,value:V[K]}))},providesTags:["FilterOptions"]}),getExperienceSkills:C.query({query:$=>({url:"/user/skills/all",params:{prefix_q:$}}),transformResponse:$=>($.all_skills||[]).map(V=>({skill_id:V.skill_id,key:V.key,skill_type:V.skill_type})).filter(V=>V.key&&V.skill_id&&V.skill_type).map(V=>({key:V.skill_id,value:V.key,type:V.skill_type})),providesTags:["FilterOptions"]})})}),{useGetCompaniesQuery,useGetTitlesQuery,useGetExperienceSkillsQuery}=filterService,convertToSelectOption=(C,$,F=$)=>!C||!Array.isArray(C)?[]:C.map(V=>({key:V[$],value:V[F]})),minCtcOptions=new Array(5).fill(1).map((C,$)=>({value:(C+$)*5,label:`>= ${(C+$)*5} Lakhs`})),minCtcUSOptions=[{value:20,label:">= 20K"},{value:30,label:">= 30K"},{value:50,label:">= 50K"},{value:75,label:">= 75K"},{value:100,label:">= 100K"}],mockInterviewSkillOptions=[{value:0,label:"Must to Have"},{value:1,label:"Good to Have"},{value:2,label:"Bar Raiser"},{value:3,label:"Must to Have (Eligibility)"}],datePostedOnOptions=[{value:1,label:"Last 24 hours"},{value:3,label:"Last 3 days"},{value:7,label:"Last 7 days"},{value:30,label:"Last 30 days"}],seniorityLevelOptions=[{value:202948,label:"Fresher"},{value:202949,label:"Entry - Mid"},{value:202950,label:"Mid - Senior"},{value:202951,label:"Senior"}],stipendOptions=[{value:1e4,label:">= 10K"},{value:2e4,label:">= 20K"},{value:3e4,label:">= 30K"},{value:4e4,label:">= 40K"},{value:5e4,label:">= 50K"},{value:6e4,label:">= 60K"}],internshipDurationOptions=[{value:3,label:">= 3 months"},{value:6,label:">= 6 months"},{value:9,label:">= 9 months"},{value:12,label:">= 12 months"}],jobTypeOptions=[{value:"Full time roles",key:"full_time"},{value:"Internship roles",key:"internship"}],MONTH_OPTIONS$1=new Array(3).fill(1).map((C,$)=>({value:((C+$+1)*30).toString(),label:`greater than ${C+$+1} Months`})),NOTICE_PERIOD_OPTIONS$1=[{value:"not filled",label:"Not Available"},{value:"0",label:"0 Days"},{value:"15",label:"greater than 15 Days"},{value:"30",label:"greater than 30 Days"},{value:"45",label:"greater than 45 Days"},...MONTH_OPTIONS$1],getMinCtcOptions=C=>C?minCtcUSOptions:minCtcOptions,getProficiencyOptions=C=>C?Object.entries(C).map(([$,F])=>({value:F,label:$})):mockInterviewSkillOptions,getMeritBasedSkillOptions=C=>!C||!Array.isArray(C)?[]:C.map($=>({value:$.id,label:$.title})),getExperienceSkillOptions=C=>!C||!Array.isArray(C)?[]:C.map($=>({value:$.subtopic_id,label:$.subtopic,type:$.eligible_class||"SubTopic"})),filterOptions={minCtcOptions,minCtcUSOptions,getMinCtcOptions,mockInterviewSkillOptions,datePostedOnOptions,seniorityLevelOptions,stipendOptions,internshipDurationOptions,jobTypeOptions,NOTICE_PERIOD_OPTIONS:NOTICE_PERIOD_OPTIONS$1,convertToSelectOption,getProficiencyOptions,getMeritBasedSkillOptions,getExperienceSkillOptions},initialState$7={companyOptions:[],titleOptions:[],experienceSkillOptions:[]},filterOptionsSlice=toolkit.createSlice({name:"filterOptions",initialState:initialState$7,reducers:{setCompanyOptions:(C,$)=>{C.companyOptions=convertToSelectOption($.payload,"id","value")},setTitleOptions:(C,$)=>{C.titleOptions=$.payload},setExperienceSkillOptions:(C,$)=>{C.experienceSkillOptions=$.payload},clearCompanyOptions:C=>{C.companyOptions=[]},clearTitleOptions:C=>{C.titleOptions=[]},clearExperienceSkillOptions:()=>{},clearAllOptions:C=>{C.companyOptions=[],C.titleOptions=[],C.experienceSkillOptions=[]}},extraReducers:C=>{C.addMatcher(filterService.endpoints.getCompanies.matchFulfilled,($,F)=>{$.companyOptions=convertToSelectOption(F.payload,"id","value")}),C.addMatcher(filterService.endpoints.getTitles.matchFulfilled,($,F)=>{$.titleOptions=F.payload}),C.addMatcher(filterService.endpoints.getExperienceSkills.matchFulfilled,($,F)=>{const V=F.payload||[],K=$.experienceSkillOptions||[],J=new Map(K.map(ee=>[ee.key,ee]));V.forEach(ee=>{J.set(ee.key,ee)}),$.experienceSkillOptions=Array.from(J.values())})}}),{setCompanyOptions,setTitleOptions,setExperienceSkillOptions,clearCompanyOptions,clearTitleOptions,clearExperienceSkillOptions,clearAllOptions}=filterOptionsSlice.actions,filterOptionsReducer=filterOptionsSlice.reducer,useDebounce=(C,$)=>{const F=React.useRef(null);return React.useCallback((...V)=>{F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{C(...V)},$)},[C,$])},useAsyncFilterOptions=()=>{const C=reactRedux.useDispatch(),[$,F]=React.useState(""),[V,K]=React.useState(""),[J,ee]=React.useState(""),{isLoading:te,isFetching:ne}=useGetCompaniesQuery($,{skip:!$||$.length<3}),{isLoading:re,isFetching:ae}=useGetTitlesQuery(V,{skip:!V||V.length<3}),{isLoading:oe,isFetching:ie}=useGetExperienceSkillsQuery(J,{skip:!J||J.length<2});React.useEffect(()=>{(!$||$.length<3)&&C(clearCompanyOptions())},[$,C]),React.useEffect(()=>{(!V||V.length<3)&&C(clearTitleOptions())},[V,C]),React.useEffect(()=>{(!J||J.length<2)&&C(clearExperienceSkillOptions())},[J,C]);const se=React.useCallback(pe=>{F(pe)},[]),ue=useDebounce(se,300),de=React.useCallback(pe=>{K(pe)},[]),le=useDebounce(de,300),ve=React.useCallback(pe=>{ee(pe)},[]),me=useDebounce(ve,300),he=React.useCallback((pe,ce)=>pe.map(fe=>{const ye=ce==null?void 0:ce.find(_e=>_e.key===fe);return{experience_skill_id:fe,skill_type:(ye==null?void 0:ye.type)||"SubTopic"}}),[]);return{handleCompanySearch:ue,handleTitleSearch:le,handleExperienceSkillSearch:me,handleExperienceSkillChange:he,loadingCompanies:te||ne,loadingTitles:re||ae,loadingExperienceSkills:oe||ie}},useFilterMetaOptions=()=>{const C=reactRedux.useSelector(se=>{var ue;return((ue=se.scalantCareerHub.metaData)==null?void 0:ue.meta)||{}}),$=React.useMemo(()=>filterOptions.jobTypeOptions,[]),F=React.useMemo(()=>convertToSelectOption(C.jobCategories||[],"value","label"),[C.jobCategories]),V=React.useMemo(()=>convertToSelectOption(C.seniorityLevels||[],"value","label"),[C.seniorityLevels]),K=React.useMemo(()=>convertToSelectOption(C.companyCategories||[],"value","label"),[C.companyCategories]),J=React.useMemo(()=>convertToSelectOption(C.jobLocations||[],"label"),[C.jobLocations]),ee=React.useMemo(()=>convertToSelectOption(C.meritBasedSkills||[],"id","title"),[C.meritBasedSkills]),te=React.useMemo(()=>filterOptions.getMinCtcOptions(!1),[]),ne=React.useMemo(()=>filterOptions.stipendOptions,[]),re=React.useMemo(()=>filterOptions.internshipDurationOptions,[]),ae=React.useMemo(()=>filterOptions.NOTICE_PERIOD_OPTIONS,[]),oe=React.useMemo(()=>filterOptions.datePostedOnOptions,[]),ie=React.useMemo(()=>filterOptions.mockInterviewSkillOptions,[]);return{jobTypes:$,functions:F,seniorityLevels:V,companyCategories:K,locations:J,mbeSkills:ee,ctcRanges:te,stipendRanges:ne,durationRanges:re,noticePeriods:ae,datePostedOptions:oe,skillRatings:ie}},initialState$6={selectedJobId:null},layoutSlice=toolkit.createSlice({name:"layout",initialState:initialState$6,reducers:{setSelectedJobId:(C,$)=>{C.selectedJobId=$.payload},clearSelectedJobId:C=>{C.selectedJobId=null}}}),{setSelectedJobId,clearSelectedJobId}=layoutSlice.actions,layoutReducer=layoutSlice.reducer,serializeFiltersToQueryParams=C=>{const $=new URLSearchParams;return!C||typeof C!="object"||Object.keys(C).forEach(F=>{const V=C[F];if(!(V==null||V===""))if(Array.isArray(V))V.length>0&&$.append(F,V.join(","));else if(typeof V=="object")try{$.append(F,JSON.stringify(V))}catch(K){}else $.append(F,String(V))}),$},deserializeQueryParamsToFilters=C=>{const $={};return(typeof C=="string"?new URLSearchParams(C):C).forEach((V,K)=>{try{const J=JSON.parse(V);if(typeof J=="object"){$[K]=J;return}}catch(J){}if(V.includes(","))$[K]=V.split(",").filter(J=>J.trim()!=="");else if(!isNaN(V)&&V!==""){const J=Number(V);isNaN(J)?$[K]=V:$[K]=J}else $[K]=V}),$},updateURLWithFilters=C=>{if(typeof window=="undefined")return;const $=serializeFiltersToQueryParams(C),F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getFiltersFromURL=()=>typeof window=="undefined"?{}:deserializeQueryParamsToFilters(window.location.search),updateURLWithJobId=C=>{if(typeof window=="undefined")return;const $=new URLSearchParams(window.location.search);C?$.set("job_ids",String(C)):$.delete("job_ids");const F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getJobIdFromURL=()=>typeof window=="undefined"?null:new URLSearchParams(window.location.search).get("job_ids")||null,updateURLWithTab=C=>{if(typeof window=="undefined")return;const $=new URLSearchParams(window.location.search);C?$.set("tab",String(C)):$.delete("tab");const F=$.toString()?`${window.location.pathname}?${$.toString()}`:window.location.pathname;window.history.replaceState({},"",F)},getTabFromURL=()=>typeof window=="undefined"?null:new URLSearchParams(window.location.search).get("tab")||null;function useJobQueryParams({syncToURL:C=!0,syncFromURL:$=!0}={}){const F=reactRedux.useDispatch(),V=reactRedux.useSelector(ae=>ae.scalantCareerHub.layout.selectedJobId),K=reactRedux.useSelector(ae=>{var oe,ie;return((ie=(oe=ae.scalantCareerHub)==null?void 0:oe.filter)==null?void 0:ie.tab)||TAG_TO_TAB_MAPPING.relevant}),J=React.useRef(!1),ee=React.useRef(!1);React.useEffect(()=>{if(!$||J.current)return;ee.current=!0;const ae=getTabFromURL(),oe=getJobIdFromURL();if(ae&&Object.values(TAG_TO_TAB_MAPPING).includes(ae)&&F(setTab(ae)),oe){const ie=Number(oe);isNaN(ie)||F(setSelectedJobId(ie))}J.current=!0,ee.current=!1},[F,$]),React.useEffect(()=>{!C||ee.current||!J.current||updateURLWithTab(K)},[K,C]),React.useEffect(()=>{!C||ee.current||!J.current||updateURLWithJobId(V||null)},[V,C]);const te=ae=>{F(ae?setSelectedJobId(ae):clearSelectedJobId()),C&&updateURLWithJobId(ae)},ne=ae=>{Object.values(TAG_TO_TAB_MAPPING).includes(ae)&&(F(setTab(ae)),C&&updateURLWithTab(ae))};return{currentTab:K,selectedJobId:V,updateJobId:te,updateTab:ne,updateTabAndJobId:(ae,oe)=>{ne(ae),te(oe)}}}const PRODUCT_NAME="Jobs Page V2",container$a="_container_lsttj_1",tag$2="_tag_lsttj_6",styles$K={container:container$a,tag:tag$2};function FilterTags({analytics:C}){const $=reactRedux.useDispatch(),{selectedJobId:F,updateJobId:V}=useJobQueryParams({syncFromURL:!1}),K=()=>{C==null||C.click("Filter Tags - Remove Job Filter",PRODUCT_NAME),V(null),$(updateFormFilters({job_ids:null}))};return F?React.createElement(Flex$1,{className:styles$K.container},React.createElement(Typography$1.Text,{className:styles$K.title},"Job Selected:"),React.createElement(Tag$1,{color:"blue",className:styles$K.tag,onClick:K},`ID#${F}`,React.createElement(CloseOutlined$1,{className:styles$K.closeIcon}))):React.createElement("div",{className:styles$K.container})}const content="_content_qwyxb_1",header$2="_header_qwyxb_10",sider="_sider_qwyxb_18",layout="_layout_qwyxb_22",styles$J={content,header:header$2,sider,layout},{Header,Sider,Content}=Layout$1;function JobsLayout({analytics:C,header:$,children:F,className:V,sider:K,siderWidth:J}){return React.createElement(Layout$1,{className:V},React.createElement(Header,{className:styles$J.header},$||"Header"),React.createElement(FilterTags,{analytics:C}),React.createElement(Layout$1,{className:styles$J.layout},React.createElement(Content,{className:styles$J.content},F),K&&React.createElement(Sider,{className:styles$J.sider,width:J||"25%"},K)))}JobsLayout.propTypes={analytics:PropTypes.object,children:PropTypes.node.isRequired,className:PropTypes.string,sider:PropTypes.node,siderWidth:PropTypes.oneOfType([PropTypes.string,PropTypes.number])},JobsLayout.defaultProps={className:"",sider:null,siderWidth:"25%"};const toCamelCase=C=>C&&C.replace(/_([a-z])/g,$=>$[1].toUpperCase()),toTitleCase=C=>!C||typeof C!="string"?C:C.toLowerCase().split(/[\s_]+/).map($=>$.charAt(0).toUpperCase()+$.slice(1)).join(" "),toCase=(C,$)=>{if(!$||typeof $!="string")return $;switch(C){case"camelCase":return toCamelCase($);case"titleCase":return toTitleCase($);default:return $}},toCamelCaseObject=C=>{if(C==null)return C;if(Array.isArray(C))return C.map(toCamelCaseObject);if(typeof C=="object"){const $={};return Object.keys(C).forEach(F=>{const V=toCamelCase(F);$[V]=toCamelCaseObject(C[F])}),$}return C},countPendingSteps=(C,$)=>{let F=0;return C!=null&&C.data&&Object.values(C.data).forEach(V=>{V.contests&&V.contests.cleared===!1&&(F+=1),V.skills&&V.skills.cleared===!1&&(F+=1)}),$!=null&&$.data&&Object.values($.data).forEach(V=>{V.data&&V.data.cleared===!1&&(F+=1)}),F},checkAllOtherRequirementsMet=(C,$)=>["experience","notice_period"].every(V=>{if(V===$)return!0;const K=C[V];return!K||K.isEligible}),ELIGIBILITY_TYPES={quick_apply:"quick_apply",eligible:"eligible",ineligible:"ineligible",steps_to_apply:"steps_to_apply",notice_period_mismatch:"notice_period_mismatch",expired:"expired"},NON_WITHDRAW_STATUSES=["Rejected","Offer Withdrawn","To Be Offered","Offer Accepted","Offer Declined","Joined","Offer Received"],determineJobTag=(C,$)=>{const{isRelevant:F,expiry:V,jobProfileStatus:K}=toCamelCaseObject(C),{isEligible:J,reasons:ee=[]}=toCamelCaseObject($)||{};if(V&&(new Date(V)<new Date||K!=="active"))return{tag:"expired",text:"Job Expired",icon:"ClockCircleOutlined",color:"#FF9C6E",antdColor:"volcano"};const ne=ee.reduce((ue,de)=>(ue[de.label]=de,ue),{}),re=ne.experience,ae=ne.notice_period,oe=ne.skills,ie=ne.tech_stacks;if(J&&F)return{tag:"quick_apply",text:"Quick Apply",icon:"CheckCircleOutlined",color:"#1A8452",antdColor:"green"};if(J)return{tag:"eligible",text:"Eligible",icon:"CheckCircleOutlined",color:"#1A8452",antdColor:"green"};if(re&&!re.isEligible)return{tag:"ineligible",text:"Ineligible",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"};if(ae&&!ae.isEligible&&checkAllOtherRequirementsMet(ne,"notice_period"))return{tag:"notice_period_mismatch",text:"Notice Period Mismatch",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"};const se=countPendingSteps(oe,ie);return se>0&&checkAllOtherRequirementsMet(ne,"skills")?{tag:"steps_to_apply",text:`${se} ${se===1?"step":"steps"} pending`,icon:"RocketOutlined",color:"#2F54EB",antdColor:"geekblue",count:se}:{tag:ELIGIBILITY_TYPES.ineligible,text:"Ineligible",icon:"CloseCircleOutlined",color:"#a42137",antdColor:"error"}},formatExperience$1=(C,$)=>{if(C===0&&$===0)return"Fresher";const F=Math.floor(C/12),V=Math.floor($/12);return F===V?`${F}y Experience`:V===0?"Fresher":F===0?`${V}y Experience`:`${F}y - ${V}y Experience`},formatCtc=({minCtc:C,maxCtc:$,openForDiscussionCtc:F,isInternship:V,stipend:K,userCountry:J="IN"})=>{if(V)return K?`₹${K}/month`:"Unpaid Internship";const ee=J==="US"?"$":"₹",te=J==="US"?"K":"L";return C===null||$===null||C===void 0||$===void 0?`${ee} (Flexible)`:F?`${ee}${C}${te}+ (Negotiable)`:C===$?`${ee}${C}${te} CTC`:`${ee}${C}${te} - ${ee}${$}${te} CTC`},formatNoticePeriod=C=>!C||C===0?"Immediate":`${C} days Notice Period`,formatDate=C=>{if(!C)return"";const $=new Date(C),F=String($.getDate()).padStart(2,"0"),V=String($.getMonth()+1).padStart(2,"0"),K=$.getFullYear();return`${F}/${V}/${K}`},formatLocation=C=>{if(!C)return null;const $=C.split(",").map(F=>F.trim()).filter(Boolean);return $.length===0?null:$.length===1?$[0]:`${$[0]} +${$.length-1} more`};function formatProdErrorMessage(C){return"Minified Redux error #"+C+"; visit https://redux.js.org/Errors?code="+C+" for the full message or use the non-minified dev environment for full errors. "}var randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(C){if(typeof C!="object"||C===null)return!1;for(var $=C;Object.getPrototypeOf($)!==null;)$=Object.getPrototypeOf($);return Object.getPrototypeOf(C)===$}function miniKindOf(C){if(C===void 0)return"undefined";if(C===null)return"null";var $=typeof C;switch($){case"boolean":case"string":case"number":case"symbol":case"function":return $}if(Array.isArray(C))return"array";if(isDate(C))return"date";if(isError(C))return"error";var F=ctorName(C);switch(F){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return F}return $.slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(C){return typeof C.constructor=="function"?C.constructor.name:null}function isError(C){return C instanceof Error||typeof C.message=="string"&&C.constructor&&typeof C.constructor.stackTraceLimit=="number"}function isDate(C){return C instanceof Date?!0:typeof C.toDateString=="function"&&typeof C.getDate=="function"&&typeof C.setDate=="function"}function kindOf(C){var $=typeof C;return process.env.NODE_ENV!=="production"&&($=miniKindOf(C)),$}function warning$1(C){typeof console!="undefined"&&typeof console.error=="function"&&console.error(C);try{throw new Error(C)}catch($){}}function getUnexpectedStateShapeWarningMessage(C,$,F,V){var K=Object.keys($),J=F&&F.type===ActionTypes.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(K.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject(C))return"The "+J+' has unexpected type of "'+kindOf(C)+'". Expected argument to be an object with the following '+('keys: "'+K.join('", "')+'"');var ee=Object.keys(C).filter(function(te){return!$.hasOwnProperty(te)&&!V[te]});if(ee.forEach(function(te){V[te]=!0}),!(F&&F.type===ActionTypes.REPLACE)&&ee.length>0)return"Unexpected "+(ee.length>1?"keys":"key")+" "+('"'+ee.join('", "')+'" found in '+J+". ")+"Expected to find one of the known reducer keys instead: "+('"'+K.join('", "')+'". Unexpected keys will be ignored.')}function assertReducerShape(C){Object.keys(C).forEach(function($){var F=C[$],V=F(void 0,{type:ActionTypes.INIT});if(typeof V=="undefined")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(12):'The slice reducer for key "'+$+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof F(void 0,{type:ActionTypes.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(13):'The slice reducer for key "'+$+'" returned undefined when probed with a random type. '+("Don't try to handle '"+ActionTypes.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function combineReducers(C){for(var $=Object.keys(C),F={},V=0;V<$.length;V++){var K=$[V];process.env.NODE_ENV!=="production"&&typeof C[K]=="undefined"&&warning$1('No reducer provided for key "'+K+'"'),typeof C[K]=="function"&&(F[K]=C[K])}var J=Object.keys(F),ee;process.env.NODE_ENV!=="production"&&(ee={});var te;try{assertReducerShape(F)}catch(ne){te=ne}return function(re,ae){if(re===void 0&&(re={}),te)throw te;if(process.env.NODE_ENV!=="production"){var oe=getUnexpectedStateShapeWarningMessage(re,F,ae,ee);oe&&warning$1(oe)}for(var ie=!1,se={},ue=0;ue<J.length;ue++){var de=J[ue],le=F[de],ve=re[de],me=le(ve,ae);if(typeof me=="undefined"){var he=ae&&ae.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(14):"When called with an action of type "+(he?'"'+String(he)+'"':"(unknown type)")+', the slice reducer for key "'+de+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}se[de]=me,ie=ie||me!==ve}return ie=ie||J.length!==Object.keys(re).length,ie?se:re}}const initialState$5={processCounts:DEFAULT_PROCESS_COUNTS,userProfileData:null,filterModalOpen:!1,jobAlertModalOpen:!1},dashboardSlice=toolkit.createSlice({name:"dashboard",initialState:initialState$5,reducers:{setProcessCounts:(C,$)=>{C.processCounts=$.payload},setUserProfileData:(C,$)=>{C.userProfileData=$.payload},openFilterModal:C=>{C.filterModalOpen=!0},closeFilterModal:C=>{C.filterModalOpen=!1},openJobAlertModal:C=>{C.jobAlertModalOpen=!0},closeJobAlertModal:C=>{C.jobAlertModalOpen=!1}}}),{setProcessCounts,setUserProfileData,openFilterModal,closeFilterModal,openJobAlertModal,closeJobAlertModal}=dashboardSlice.actions,dashboardReducer=dashboardSlice.reducer,initialState$4={role_type:void 0,company_ids:[],job_title:[],job_category:[],seniority_level:[],company_categories:[],location:[],min_ctc:void 0,min_stipend:void 0,min_duration:void 0,notice_period:void 0,date_posted_on:void 0,mbe_skill_ids:{},experience_skill_ids:[],min_experience:void 0,max_experience:void 0},filterFormSlice=toolkit.createSlice({name:"filterForm",initialState:initialState$4,reducers:{updateFormField:(C,$)=>{const{field:F,value:V}=$.payload;C[F]=V},resetForm:()=>initialState$4,setFormData:(C,$)=>Hn(Hn({},C),$.payload),addRatingFilterInput:C=>{(!C.mbe_skill_ids||typeof C.mbe_skill_ids!="object")&&(C.mbe_skill_ids={});const $=`mbe_skill_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;C.mbe_skill_ids[$]={subject:null,rating:null}},deleteRatingFilterInput:(C,$)=>{const{inputFieldKey:F}=$.payload;C.mbe_skill_ids&&C.mbe_skill_ids[F]&&delete C.mbe_skill_ids[F]},updateRatingFilterInput:(C,$)=>{const{inputFilterSubKey:F,value:V}=$.payload;(!C.mbe_skill_ids||typeof C.mbe_skill_ids!="object")&&(C.mbe_skill_ids={});const K=F.split("_").slice(-1)[0],J=F.replace(`_${K}`,"");C.mbe_skill_ids[J]||(C.mbe_skill_ids[J]={subject:null,rating:null}),K==="subject"?C.mbe_skill_ids[J].subject=V:K==="rating"&&(C.mbe_skill_ids[J].rating=V)}}}),{updateFormField,resetForm,setFormData,addRatingFilterInput,deleteRatingFilterInput,updateRatingFilterInput}=filterFormSlice.actions,filterFormReducer=filterFormSlice.reducer,company_categories=[{value:5,label:"large_enterprise"},{value:6,label:"large_startups"},{value:7,label:"early_startups"}],job_categories=[{value:56529,label:"Backend Engineer"},{value:56530,label:"FullStack Engineer"},{value:56531,label:"Frontend Engineer"},{value:56569,label:"Android Engineer"},{value:56570,label:"iOS Engineer"},{value:179985,label:"Testing Engineer"},{value:189726,label:"Data Scientist"},{value:189727,label:"Data Analyst"},{value:189728,label:"Business Analyst"},{value:202365,label:"Data Engineer"},{value:221192,label:"DevOps Engineer"}],job_locations=[{value:"Bangalore",label:"Bangalore"},{value:"Pune",label:"Pune"},{value:"Hyderabad",label:"Hyderabad"},{value:"Gurgaon",label:"Gurgaon"},{value:"Noida",label:"Noida"},{value:"Chennai",label:"Chennai"},{value:"Delhi",label:"Delhi"},{value:"Chandigarh",label:"Chandigarh"},{value:"Kolkata",label:"Kolkata"},{value:"Mumbai",label:"Mumbai"},{value:"Jaipur",label:"Jaipur"},{value:"Vadodara",label:"Vadodara"},{value:"Nagpur",label:"Nagpur"},{value:"Ahmedabad",label:"Ahmedabad"},{value:"Kochi",label:"Kochi"},{value:"Mysore",label:"Mysore"},{value:"Coimbatore",label:"Coimbatore"},{value:"Bangkok",label:"Bangkok"},{value:"Mauritius",label:"Mauritius"},{value:"Udaipur",label:"Udaipur"},{value:"Cochin",label:"Cochin"},{value:"Remote",label:"Remote"},{value:"Hubballi",label:"Hubballi"},{value:"Goa",label:"Goa"},{value:"Trivandrum",label:"Trivandrum"},{value:"Indore",label:"Indore"},{value:"London",label:"London"},{value:"Bhubaneswar",label:"Bhubaneswar"},{value:"Menlo Park",label:"Menlo Park"},{value:"Dehradun",label:"Dehradun"},{value:"Hosur",label:"Hosur"},{value:"Delaware",label:"Delaware"},{value:"Amsterdam",label:"Amsterdam"},{value:"California",label:"California"},{value:"Mohali",label:"Mohali"},{value:"New Jersey",label:"New Jersey"},{value:"Arizona",label:"Arizona"},{value:"North Carolina",label:"North Carolina"},{value:"Agra",label:"Agra"},{value:"Saudi Arabia",label:"Saudi Arabia"},{value:"Pondicherry",label:"Pondicherry"},{value:"Vizag",label:"Vizag"}],role_types=[{value:198018,label:"internship"},{value:198019,label:"full_time"}],seniority_levels=[{value:202948,label:"Fresher"},{value:202949,label:"Entry - Mid"},{value:202950,label:"Mid - Senior"},{value:202951,label:"Senior"}],proficiency_mapping={"Must to Have":0,"Good to Have":1,"Bar Raiser":2,"Must to Have (Eligibility)":3},onboarding_modal_clicked=!0,pipeline_stages=[{value:"draft",label:"Draft"},{value:"in_review",label:"In Review"},{value:"resume_sent",label:"Resume Sent"},{value:"resume_shortlisted",label:"Resume Shortlisted"},{value:"interviewing",label:"Interviewing"},{value:"to_be_offered",label:"To Be Offered"},{value:"rejected",label:"Rejected"},{value:"offer_received",label:"Offer Received"},{value:"offer_withdrawn",label:"Offer Withdrawn"},{value:"offer_accepted",label:"Offer Accepted"},{value:"offer_declined",label:"Offer Declined"},{value:"on_hold",label:"On Hold"},{value:"joined",label:"Joined"},{value:"saved",label:"Saved"},{value:"not_interested",label:"Not Interested"},{value:"application_withdrawn",label:"Application Withdrawn"},{value:"application_archived",label:"Application Archived"}],merit_based_skills=[{id:37223,title:"Databases and SQL",mentee_module_id:null},{id:37183,title:"Data Structures & Algorithms",mentee_module_id:null},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:3053255},{id:37188,title:"High Level Design",mentee_module_id:3053256},{id:37189,title:"Frontend (React)",mentee_module_id:3053258},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:3053258},{id:37216,title:"Django",mentee_module_id:3053258},{id:37244,title:"Angular",mentee_module_id:3053258},{id:37191,title:"Python Libraries",mentee_module_id:null},{id:37192,title:"SQL",mentee_module_id:null},{id:37193,title:"Data Analytics - Tools",mentee_module_id:null},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:null},{id:37197,title:"Computer Vision",mentee_module_id:7522793},{id:37198,title:"Natural Language Processing",mentee_module_id:7522794},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:null},{id:37201,title:"DA tools",mentee_module_id:null},{id:37202,title:"Intermediate DSA",mentee_module_id:null},{id:37245,title:"DevOps - Data Structures & Algorithms",mentee_module_id:null},{id:37245,title:"DevOps - Data Structures & Algorithms",mentee_module_id:null},{id:37183,title:"Data Structures & Algorithms",mentee_module_id:null},{id:37223,title:"Databases and SQL",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:7532826},{id:37186,title:"Javascript",mentee_module_id:7532826},{id:37187,title:"Low Level Design",mentee_module_id:7532828},{id:37189,title:"Frontend (React)",mentee_module_id:7532828},{id:37244,title:"Angular",mentee_module_id:7532828},{id:37188,title:"High Level Design",mentee_module_id:null},{id:37192,title:"SQL",mentee_module_id:null},{id:37191,title:"Python Libraries",mentee_module_id:null},{id:37194,title:"EDA Fundamentals",mentee_module_id:null},{id:37195,title:"Supervised Learning",mentee_module_id:null},{id:37196,title:"Unsupervised Learning",mentee_module_id:7522864},{id:37184,title:"Python",mentee_module_id:5696347},{id:37185,title:"Java",mentee_module_id:5696347},{id:37186,title:"Javascript",mentee_module_id:5696347},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:5910715},{id:37189,title:"Frontend (React)",mentee_module_id:null},{id:37244,title:"Angular",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37226,title:"Data Structures & Algorithms Advanced",mentee_module_id:7522524},{id:37190,title:"Backend (Java Spring/Springboot)",mentee_module_id:null},{id:37216,title:"Django",mentee_module_id:null},{id:37224,title:"MERN",mentee_module_id:null},{id:37184,title:"Python",mentee_module_id:null},{id:37185,title:"Java",mentee_module_id:null},{id:37186,title:"Javascript",mentee_module_id:null},{id:37187,title:"Low Level Design",mentee_module_id:null},{id:37188,title:"High Level Design",mentee_module_id:null},{id:37247,title:"Shell Scripting and CS Fundamentals",mentee_module_id:7522518},{id:37194,title:"EDA Fundamentals",mentee_module_id:null}],v1_onboarding_enabled=!0,v0_onboarding_completed=!0,initial_user_application_stage=4,is_discussion_hub_enabled=!1,resume_issues={total_issues:2},default_resume_details={id:17407,user_id:674153,name:"AswanthDefaultResume",default:!0,status:"active",meta:{social_profiles:{codechef:"",codeforces:"",geeksforgeeks:"",github:"",hackerearth:"",hackerrank:"",leetcode:"",portfolio:""},job_title:"Fullstack developer 1",interactions:{relevancy_alert_modal_displayed:!0}},modified_at:"2025-05-11T15:27:35.000Z",created_at:"2024-02-13T19:39:17.000Z",updated_at:"2025-05-11T15:27:35.000Z"},resume_builder_skills={language:[1167,1150,1148,1136,1128,1276,1270,1218,1217,1215,1213,1211,1210,1209],framework:[1206,1203,1200,1198,1197,1196,1195,1158,1157,1156,1145,1133],tools:[2431,2430,2435,1234,1231,1229,1228,1176,1175,2432,46262,58475]},skill_data=[{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1128,subtopic:"Javascript",eligible_topic_id:7591,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1133,subtopic:"Angular",eligible_topic_id:7580,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1136,subtopic:"CSS",eligible_topic_id:7586,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1145,subtopic:"Flutter",eligible_topic_id:8760,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1148,subtopic:"HTML",eligible_topic_id:7589,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1150,subtopic:"JavaScript",eligible_topic_id:7591,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1156,subtopic:"React",eligible_topic_id:7597,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1157,subtopic:"React Native",eligible_topic_id:8763,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1158,subtopic:"Redux",eligible_topic_id:8764,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:1167,subtopic:"TypeScript",eligible_topic_id:8768,eligible_class:"Topic"},{id:null,topic:"Mobile Development",topic_id:401,subtopic_id:1175,subtopic:"Android Development",eligible_topic_id:8753,eligible_class:"Topic"},{id:null,topic:"Mobile Development",topic_id:401,subtopic_id:1176,subtopic:"iOS Development",eligible_topic_id:8770,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1195,subtopic:".NET",eligible_topic_id:7579,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1196,subtopic:"Django",eligible_topic_id:7587,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1197,subtopic:"Express.js",eligible_topic_id:8758,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1198,subtopic:"Flask",eligible_topic_id:8759,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1200,subtopic:"Node.js",eligible_topic_id:7594,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1203,subtopic:"Ruby on Rails",eligible_topic_id:null,eligible_class:"Topic"},{id:null,topic:"Backend Development",topic_id:403,subtopic_id:1206,subtopic:"Spring Boot",eligible_topic_id:7600,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1209,subtopic:"C",eligible_topic_id:8755,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1210,subtopic:"Go",eligible_topic_id:8761,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1211,subtopic:"Java",eligible_topic_id:7590,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1213,subtopic:"Python",eligible_topic_id:7596,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1215,subtopic:"Ruby",eligible_topic_id:null,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1217,subtopic:"Scala",eligible_topic_id:8765,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1218,subtopic:"Swift",eligible_topic_id:8766,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1228,subtopic:"MongoDB",eligible_topic_id:8769,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1229,subtopic:"MySQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1231,subtopic:"PostgreSQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:1234,subtopic:"SQL Server",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1270,subtopic:"C#",eligible_topic_id:7584,eligible_class:"Topic"},{id:null,topic:"Programming",topic_id:404,subtopic_id:1276,subtopic:"C++",eligible_topic_id:7585,eligible_class:"Topic"},{id:null,topic:"Cloud Computing",topic_id:564,subtopic_id:2430,subtopic:"AWS",eligible_topic_id:7581,eligible_class:"Topic"},{id:null,topic:"CloudComputing",topic_id:564,subtopic_id:2431,subtopic:"Azure",eligible_topic_id:8754,eligible_class:"Topic"},{id:null,topic:"System Design",topic_id:563,subtopic_id:2432,subtopic:"Microservices",eligible_topic_id:7593,eligible_class:"Topic"},{id:null,topic:"DBMS",topic_id:406,subtopic_id:2435,subtopic:"SQL",eligible_topic_id:7601,eligible_class:"Topic"},{id:null,topic:"Machine Learning",topic_id:405,subtopic_id:46262,subtopic:"Tableau",eligible_topic_id:7604,eligible_class:"Topic"},{id:null,topic:"Frontend Development",topic_id:400,subtopic_id:58475,subtopic:"Power BI",eligible_topic_id:null,eligible_class:"Topic"}],commonData={company_categories,job_categories,job_locations,role_types,seniority_levels,proficiency_mapping,onboarding_modal_clicked,pipeline_stages,merit_based_skills,v1_onboarding_enabled,v0_onboarding_completed,initial_user_application_stage,is_discussion_hub_enabled,resume_issues,default_resume_details,resume_builder_skills,skill_data},capitalize=C=>!C||typeof C!="string"?C:C.charAt(0).toUpperCase()+C.slice(1).toLowerCase(),formatExperience=(C,$)=>{const F=C!=null?C:0,V=$!=null?$:0,K=[];return F>0&&K.push(`${F} ${F===1?"yr":"yrs"}`),K.push(`${V} ${V===1?"month":"months"}`),`${K.join(" ")} Experience`},transformCompanyCategories=C=>!C||!Array.isArray(C)?C:C.map($=>br(Hn({},$),{label:capitalize($.label||"").replace(/_/g," ")})),transformRoleTypes=C=>!C||!Array.isArray(C)?C:C.map($=>br(Hn({},$),{label:toCase("titleCase",$.label||"")})),transformMetaData=C=>{if(!C||typeof C!="object")return C;const $=toCamelCaseObject(C);return $.companyCategories&&($.companyCategories=transformCompanyCategories($.companyCategories)),$.roleTypes&&($.roleTypes=transformRoleTypes($.roleTypes)),$},rawMetaData=window.__CAREERS_HUB__||commonData,transformedMetaData=transformMetaData(rawMetaData),initialState$3={meta:transformedMetaData},metaDataSlice=toolkit.createSlice({name:"metaData",initialState:initialState$3,reducers:{setMetaData:(C,$)=>{C.meta=transformMetaData($.payload)}}});metaDataSlice.actions;const metaDataReducer=metaDataSlice.reducer,initialState$2={alerts:[],loading:!1,error:null},alertSlice=toolkit.createSlice({name:"alerts",initialState:initialState$2,reducers:{setAlerts:(C,$)=>{C.alerts=$.payload},addAlert:(C,$)=>{C.alerts.push($.payload)},setLoading:(C,$)=>{C.loading=$.payload},setError:(C,$)=>{C.error=$.payload}}}),{setAlerts,addAlert,setLoading,setError}=alertSlice.actions,alertReducer=alertSlice.reducer,initialState$1={savedJobs:{}},savedJobsSlice=toolkit.createSlice({name:"savedJobs",initialState:initialState$1,reducers:{setJobSavedStatus:(C,$)=>{const{jobId:F,status:V,lastUpdatedAt:K}=$.payload;V==="Saved"?C.savedJobs[F]={status:"Saved",lastUpdatedAt:K||new Date().toISOString()}:delete C.savedJobs[F]},initializeSavedJobs:(C,$)=>{($.payload||[]).forEach(V=>{V.applicationStatus==="Saved"&&(C.savedJobs[V.id]={status:"Saved",lastUpdatedAt:V.applicationLastUpdatedAt||new Date().toISOString()})})},clearSavedJobs:C=>{C.savedJobs={}}}}),{setJobSavedStatus,initializeSavedJobs,clearSavedJobs}=savedJobsSlice.actions,savedJobsReducer=savedJobsSlice.reducer,initialState={fitmentScore:{},activeResumeId:null,activeResumeName:null,activeJobProfileId:null,activeResumeChecklist:[],isChecklistOpen:!1},resumeFitmentSlice=toolkit.createSlice({name:"resumeFitment",initialState,reducers:{setFitmentScore:(C,$)=>{var ee,te,ne,re;const F=(ee=$.payload)==null?void 0:ee.job_profile_id,V=(te=$.payload)==null?void 0:te.user_resume_id,K=(ne=$.payload)==null?void 0:ne.score,J=(re=$.payload)==null?void 0:re.remarks;F&&V&&K&&(C.fitmentScore[F]=br(Hn({},C.fitmentScore[F]),{[V]:{score:K,remarks:J}}))},setActiveResume:(C,$)=>{var ee,te,ne,re,ae,oe,ie,se;const F=(ee=$.payload)==null?void 0:ee.jobProfileId,V=(te=$.payload)==null?void 0:te.resumeId,K=(ne=$.payload)==null?void 0:ne.blockerPoints,J=(re=$.payload)==null?void 0:re.resumeName;if(F&&V){C.activeResumeId=V,C.activeJobProfileId=F,C.activeResumeName=J;const ue=(oe=(ae=C.fitmentScore[F])==null?void 0:ae[V])==null?void 0:oe.remarks,de=(se=(ie=C.fitmentScore[F])==null?void 0:ie[V])==null?void 0:se.score;C.activeResumeChecklist=[...de<80&&ue?[ue]:[],...K]}},setChecklistOpen:(C,$)=>{var F,V,K;(F=$.payload)!=null&&F.syncWithBlockerPoints?C.isChecklistOpen=((V=C.activeResumeChecklist)==null?void 0:V.length)>0:C.isChecklistOpen=(K=$.payload)==null?void 0:K.isOpen}}}),{setFitmentScore,setActiveResume,setChecklistOpen}=resumeFitmentSlice.actions,resumeFitmentReducer=resumeFitmentSlice.reducer,rootReducer=combineReducers({[careerHubApi.reducerPath]:careerHubApi.reducer,layout:layoutReducer,filter:filterReducer,dashboard:dashboardReducer,filterForm:filterFormReducer,metaData:metaDataReducer,filterOptions:filterOptionsReducer,alerts:alertReducer,savedJobs:savedJobsReducer,resumeFitment:resumeFitmentReducer}),HelloWorld=()=>React.createElement("div",{style:{padding:"20px",textAlign:"center"}},React.createElement("h1",null,"Hello World - Career Hub"),React.createElement("p",null,"This is a dummy component.")),tagsSection="_tagsSection_gf6im_1",tag$1="_tag_gf6im_1",activeTag="_activeTag_gf6im_22",icon$1="_icon_gf6im_29",styles$I={tagsSection,tag:tag$1,activeTag,icon:icon$1};function TagsSection({analytics:C}){const{currentTab:$,updateTabAndJobId:F}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),V=$||TAG_TO_TAB_MAPPING.relevant,K=reactRedux.useSelector(ne=>{var re,ae;return((ae=(re=ne.scalantCareerHub)==null?void 0:re.dashboard)==null?void 0:ae.processCounts)||{}}),J=ne=>{var ae;C==null||C.click(`Tags Section - ${((ae=JOB_FILTER_TAGS[ne])==null?void 0:ae.label)||ne}`,PRODUCT_NAME);const re=TAG_TO_TAB_MAPPING[ne];re&&F(re)},ee=ne=>{const re=TAG_TO_TAB_MAPPING[ne];return V===re},te=ne=>{const re=COUNT_TO_TAB_MAPPING[ne];return K[re]||0};return React.createElement("div",{className:styles$I.tagsSection},Object.keys(JOB_FILTER_TAGS).map(ne=>React.createElement(Tag$1,{className:classNames(styles$I.tag,{[styles$I.activeTag]:ee(ne)}),key:ne,onClick:()=>J(ne)},React.createElement(JOB_FILTER_TAGS[ne].icon,{className:styles$I.icon}),JOB_FILTER_TAGS[ne].label," ",React.createElement("span",{className:styles$I.count},"(",te(ne),")"))))}const jobAlert="_jobAlert_kiep6_1",styles$H={jobAlert};function JobAlert({analytics:C}){const $=reactRedux.useDispatch(),F=()=>{C==null||C.click("Job Alert - Open Modal",PRODUCT_NAME),$(openJobAlertModal())};return React.createElement("div",{className:styles$H.jobAlert,onClick:F},React.createElement(AlertFilled$1,{className:styles$H.icon}),"Job Alerts")}const styles$G={};function Sorting(){const C=reactRedux.useDispatch(),$=reactRedux.useSelector(ee=>{var te,ne;return((ne=(te=ee.scalantCareerHub)==null?void 0:te.filter)==null?void 0:ne.sortings)||[]}),F=React.useMemo(()=>getCurrentSortingValue($),[$]),V=ee=>{const te=SORTING_OPTIONS[ee];te&&C(setSortings([te.mapping]))},K=Object.values(SORTING_OPTIONS).map(ee=>({value:ee.value,label:ee.value===F?`Sorted By: ${ee.label}`:ee.label})),J=ee=>{const te=SORTING_OPTIONS[ee.value];return te?te.label:ee.label};return React.createElement(Select$1,{className:styles$G.sorting,value:F,onChange:V,suffixIcon:React.createElement(DownOutlined$1,null),options:K,optionRender:J})}const styles$F={};function Filter({analytics:C}){const $=reactRedux.useDispatch(),F=()=>{C==null||C.click("Filter - Open Drawer",PRODUCT_NAME),$(openFilterModal())};return React.createElement(Button$2,{type:"primary",className:styles$F.filter,onClick:F},"Filters ",React.createElement(DownOutlined$1,null))}const search="_search_hhvxj_1",iconContainer="_iconContainer_hhvxj_7",input="_input_hhvxj_20",slideIn="_slideIn_hhvxj_1",styles$E={search,iconContainer,input,slideIn};function Search({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(ie=>{var se,ue,de;return((de=(ue=(se=ie.scalantCareerHub)==null?void 0:se.filter)==null?void 0:ue.filters)==null?void 0:de.keyword)||""}),[V,K]=React.useState(!1),[J,ee]=React.useState(F),te=React.useRef(null),ne=React.useRef(null);React.useEffect(()=>{ee(F)},[F]),React.useEffect(()=>{V&&te.current&&te.current.focus()},[V]);const re=()=>{C==null||C.click("Search - Icon Click",PRODUCT_NAME),K(!0)},ae=ie=>{const se=ie.target.value;ee(se),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(()=>{$(setKeyword(se))},300)},oe=()=>{J.trim()||K(!1)};return React.useEffect(()=>()=>{ne.current&&clearTimeout(ne.current)},[]),React.createElement("div",{className:styles$E.search},V||J?React.createElement(Input$1,{ref:te,className:styles$E.input,placeholder:"Search for job or Company Name",value:J,onChange:ae,onBlur:oe,suffix:React.createElement(SearchOutlined$1,null)}):React.createElement("div",{className:styles$E.iconContainer,onClick:re},React.createElement(SearchOutlined$1,null)))}const actions$1="_actions_nxp1u_1",styles$D={actions:actions$1};function Actions$1({analytics:C}){return React.createElement("div",{className:styles$D.actions},React.createElement(JobAlert,{analytics:C}),React.createElement(Sorting,null),React.createElement(Filter,{analytics:C}),React.createElement(Search,{analytics:C}))}Actions$1.propTypes={analytics:PropTypes.object};const jobsHeaderContainer="_jobsHeaderContainer_1un8f_1",styles$C={jobsHeaderContainer};function JobsHeader({analytics:C,className:$}){return React.createElement("div",{className:classNames($,styles$C.jobsHeaderContainer)},React.createElement(TagsSection,{analytics:C}),React.createElement(Actions$1,{analytics:C}))}JobsHeader.propTypes={analytics:PropTypes.object,className:PropTypes.string},JobsHeader.defaultProps={className:""};const parsePreferredLocations=C=>!C||typeof C!="string"?[]:C.toLowerCase()==="anywhere_in_india"?["Anywhere In India"]:C.split("/").map($=>$.trim()).filter($=>$.length>0).map($=>toTitleCase($)),parsePreferredJobRoles=C=>!C||typeof C!="string"?[]:C.split("/").map($=>$.trim()).filter($=>$.length>0),dashboardService=careerHubApi.injectEndpoints({endpoints:C=>({fetchProcessCounts:C.query({query:()=>({url:"/job-tracker/fetch-process-counts/",method:"POST"}),transformResponse:$=>$.process_counts||{},providesTags:["ProcessCounts"]}),updateJobStatus:C.mutation({query:$=>({url:"/academy/mentee/jobs-mapping/update-status",method:"POST",body:$}),transformResponse:$=>$})})}),{useUpdateJobStatusMutation}=dashboardService,profileName="_profileName_1vhkf_1",profileDetails="_profileDetails_1vhkf_5",profileDetailsItems="_profileDetailsItems_1vhkf_13",preferencesTitle="_preferencesTitle_1vhkf_18",preferencesDivider="_preferencesDivider_1vhkf_22",preferencesContent="_preferencesContent_1vhkf_27",preferenceLabel="_preferenceLabel_1vhkf_31",preferenceValue="_preferenceValue_1vhkf_37",preferenceTag="_preferenceTag_1vhkf_42",jobIntentContainer="_jobIntentContainer_1vhkf_51",preferencesContainer="_preferencesContainer_1vhkf_55",styles$B={profileName,profileDetails,profileDetailsItems,preferencesTitle,preferencesDivider,preferencesContent,preferenceLabel,preferenceValue,preferenceTag,jobIntentContainer,preferencesContainer},DISPLAY_LABEL_TO_STATUS={"Looking for a job":"active","Not looking for a job":"inactive","Need time to prepare":"need_time"},STATUS_TO_PLACEMENT_INTENT={active:"Interested",inactive:"Not Interested",need_time:"Need Time to Prepare"},PLACEMENT_INTENT_TO_DISPLAY_LABEL={Interested:"Looking for a job","Need Time to Prepare":"Need time to prepare","Not Interested":"Not looking for a job"},JOB_INTENT_OPTIONS=[{label:"Looking for a job",value:"Looking for a job"},{label:"Need time to prepare",value:"Need time to prepare"},{label:"Not looking for a job",value:"Not looking for a job"}];function ProfileDetails({analytics:C,className:$,onViewResume:F,onEditPreferences:V}){var se,ue,de,le,ve,me,he,pe;const K=reactRedux.useSelector(ce=>ce.scalantCareerHub.dashboard.userProfileData),[J,{isLoading:ee}]=useUpdateJobStatusMutation(),[te,ne]=React.useState((K==null?void 0:K.placementIntent)||null);React.useEffect(()=>{K!=null&&K.placementIntent&&ne(K.placementIntent)},[K==null?void 0:K.placementIntent]);const re=()=>{C==null||C.click("Profile Details - View Resume",PRODUCT_NAME),F==null||F()},ae=()=>{C==null||C.click("Profile Details - Edit Preferences",PRODUCT_NAME),V==null||V()},oe=ce=>sr(this,null,function*(){try{const fe=DISPLAY_LABEL_TO_STATUS[ce];fe&&(yield J({source:"careers_hub",status:fe}).unwrap(),ne(STATUS_TO_PLACEMENT_INTENT[fe]))}catch(fe){console.error("Failed to update job status:",fe)}}),ie=ce=>PLACEMENT_INTENT_TO_DISPLAY_LABEL[ce]||null;return React.createElement("div",{className:classNames(styles$B.profileDetails,$)},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(Avatar$1,{shape:"square",size:48,src:K==null?void 0:K.avatar}),React.createElement(Flex$1,{justify:"center",vertical:!0,gap:4},React.createElement(Typography$1.Title,{level:5,className:styles$B.profileName},K==null?void 0:K.name),React.createElement(Typography$1.Text,{type:"secondary"},toTitleCase((se=K==null?void 0:K.mentee)==null?void 0:se.careersHubProduct)))),React.createElement(Flex$1,{vertical:!0,gap:8,className:styles$B.profileDetailsItems},React.createElement(Flex$1,{align:"center",gap:10},React.createElement(UserOutlined$1,null),React.createElement(Typography$1.Text,null,K==null?void 0:K.jobTitle)),React.createElement(Flex$1,{align:"center",gap:10},React.createElement(StarOutlined$1,null),React.createElement(Typography$1.Text,null,formatExperience((ue=K==null?void 0:K.experienceYears)!=null?ue:K==null?void 0:K.experienceInYears,(de=K==null?void 0:K.experienceMonths)!=null?de:K==null?void 0:K.experienceInMonths))),React.createElement(Flex$1,{align:"center",gap:10},React.createElement(FileTextTwoTone$1,null),React.createElement(Typography$1.Link,{onClick:re},"View Resume")),React.createElement(Flex$1,{vertical:!0,className:styles$B.jobIntentContainer,gap:8},React.createElement(Typography$1.Text,{secondary:!0},"Select your intent in Career's Hub"),React.createElement(Select$1,{placeholder:"Select your intent",value:ie(te),onChange:oe,disabled:ee,loading:ee,style:{width:"100%"},options:JOB_INTENT_OPTIONS}))),React.createElement(Flex$1,{vertical:!0,className:styles$B.preferencesContainer},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Typography$1.Title,{level:5,className:styles$B.preferencesTitle},"Your Preferences"),React.createElement(EditTwoTone$1,{onClick:ae})),React.createElement(Divider$1,{className:styles$B.preferencesDivider}),React.createElement(Flex$1,{vertical:!0,gap:16,className:styles$B.preferencesContent},React.createElement(Flex$1,{vertical:!0,gap:.4},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Location"),React.createElement(Flex$1,{gap:.4,wrap:!0},parsePreferredLocations((le=K==null?void 0:K.userCompanyProfile)==null?void 0:le.preferredLocation).map((ce,fe)=>React.createElement(Tag$1,{key:fe,bordered:!1,className:styles$B.preferenceTag},ce)))),React.createElement(Flex$1,{vertical:!0,gap:.4},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Job roles"),React.createElement(Flex$1,{gap:.4,wrap:!0},parsePreferredJobRoles((ve=K==null?void 0:K.userCompanyProfile)==null?void 0:ve.preferredRole).map((ce,fe)=>React.createElement(Tag$1,{key:fe,className:styles$B.preferenceTag},ce)))),React.createElement(Flex$1,{align:"center"},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Expected CTC (LPA):"),React.createElement(Typography$1.Text,{className:styles$B.preferenceValue},(me=K==null?void 0:K.userCompanyProfile)==null?void 0:me.expectedCtc)),React.createElement(Flex$1,{align:"center"},React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"Notice period (In days):"),React.createElement(Typography$1.Text,{className:styles$B.preferenceValue},(he=K==null?void 0:K.userCompanyProfile)==null?void 0:he.noticePeriod)),React.createElement(Flex$1,{align:"center"},((pe=K==null?void 0:K.userCompanyProfile)==null?void 0:pe.buyoutNotice)&&React.createElement(Typography$1.Text,{className:styles$B.preferenceLabel},"*Buyout available:")))))}ProfileDetails.propTypes={analytics:PropTypes.object,className:PropTypes.string},ProfileDetails.defaultProps={className:""};const jobPreviewApi=careerHubApi.injectEndpoints({endpoints:C=>({getJobPreview:C.query({query:$=>`/job-tracker/job_profile/${$}/`,providesTags:($,F,V)=>[{type:"JobPreview",id:V},{type:"JobPreview",id:"LIST"}],transformResponse:$=>{var ee,te,ne;const F=toCamelCaseObject($),V=((ee=F==null?void 0:F.data)==null?void 0:ee.attributes)||{},K=((ne=(te=F==null?void 0:F.included)==null?void 0:te.find(re=>re.type==="company"))==null?void 0:ne.attributes)||{},J=V.contestSkills||[];return{jobData:br(Hn({},V),{contestSkills:J,name:V.name||(K==null?void 0:K.name)||"Company"}),companyData:K,highlights:V.highlights,eligibilityCriteria:V.eligibilityCriteria}}})}),overrideExisting:!0}),{useGetJobPreviewQuery}=jobPreviewApi,JobPreviewContext=React.createContext(null),JobPreviewProvider=({analytics:C,country:$="IN",jobId:F,currentTab:V,openMockInterviewModal:K=(re,ae)=>{console.log("Method not implemented. We should get it from MIT"),console.log(re,ae)},openResume:J=()=>{console.log("Method not implemented. We should get it from MIT")},skip:ee=!1,onCloseResumeBuilder:te,children:ne})=>{const{data:re,isLoading:ae,error:oe,refetch:ie}=useGetJobPreviewQuery(F,{skip:!F||ee}),[se,ue]=React.useState(),[de,le]=React.useState(null),me={analytics:C,activeApplicationId:de,setActiveApplicationId:le,activeTab:se,setActiveTab:he=>{ue(he),C==null||C.click("Job Preview - Active Tab Changed","Jobs Page V2",{tab:he,jobId:F})},country:$,jobId:F,data:re,isLoading:ae,error:oe,refetch:ie,openMockInterviewModal:K,openResume:J,jobData:re==null?void 0:re.jobData,companyData:re==null?void 0:re.companyData,highlights:re==null?void 0:re.highlights,eligibilityCriteria:re==null?void 0:re.eligibilityCriteria,currentTab:V,onCloseResumeBuilder:te};return React.createElement(JobPreviewContext.Provider,{value:me},ne)},useJobPreview=()=>{const C=React.useContext(JobPreviewContext);if(!C)throw new Error("useJobPreview must be used within a JobPreviewProvider");return C},ApplicationFormContext=React.createContext();function ApplicationFormProvider({children:C,onUploadFile:$=()=>(console.log("Method not implemented. We should get it from MIT"),""),onEditResume:F=()=>(console.log("Method not implemented. We should get it from MIT"),""),onAddResume:V=()=>(console.log("Method not implemented. We should get it from MIT"),""),stepName:K,jobProfileId:J,applicationId:ee}){const[te,ne]=React.useState(null),[re,ae]=React.useState(K),[oe,ie]=React.useState(null);return React.useEffect(()=>{ae(K)},[K]),React.createElement(ApplicationFormContext.Provider,{value:{onUploadFile:$,formInstance:te,setFormInstance:ne,stepName:re,setStepName:ae,jobProfileId:J,applicationId:ee,selectedResume:oe,setSelectedResume:ie,onEditResume:F,onAddResume:V}},C)}const useApplicationFormContext=()=>{const C=React.useContext(ApplicationFormContext);if(!C)throw new Error("useApplicationForm must be used within a ApplicationFormProvider");return C},descriptionContainer$1="_descriptionContainer_sd7fu_1",container$9="_container_sd7fu_6",recruiterAvatar="_recruiterAvatar_sd7fu_10",recruiterCardContent="_recruiterCardContent_sd7fu_14",recruiterName="_recruiterName_sd7fu_18",recruiterEmail="_recruiterEmail_sd7fu_24",styles$A={descriptionContainer:descriptionContainer$1,container:container$9,recruiterAvatar,recruiterCardContent,recruiterName,recruiterEmail},RecruiterCard=({recruiter:C})=>{const{name:$,avatar:F,email:V}=C||{},{analytics:K}=useJobPreview(),J=()=>{K==null||K.click("Recruiter - Send Email",PRODUCT_NAME,{recruiterName:$,recruiterEmail:V})};return React.createElement(Card$1,{size:"small"},React.createElement(Space$1,{direction:"horizontal"},React.createElement(Avatar$1,{size:48,src:F,className:styles$A.recruiterAvatar}),React.createElement(Space$1,{direction:"vertical",className:styles$A.recruiterCardContent},React.createElement(Typography$1.Text,{className:styles$A.recruiterName},$),React.createElement(Typography$1.Link,{className:styles$A.recruiterEmail,href:`mailto:${V}`,onClick:J},React.createElement(MailTwoTone$1,null),"Send Email To Recruiter"))))},Recruiters=()=>{const{jobData:C}=useJobPreview(),{recruiters:$}=C||{};return React.createElement(Space$1,null,$.map((F,V)=>React.createElement(RecruiterCard,{key:V,recruiter:F})))},TimelineSteps=()=>{const{jobData:C}=useJobPreview(),{applicationTimeline:$}=C||{},{timeline:F}=$||{},V=F.map(J=>({title:J.stageName,description:J.stageComments})),K=F.findIndex(J=>J.stageStatus==="ongoing");return React.createElement(Steps$1,{current:K,items:V,direction:"vertical"})},Timeline=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Your Application Status"),React.createElement(TimelineSteps,null)),RecruiterDetails=()=>{const{jobData:C}=useJobPreview(),{recruiters:$}=C||{};return!$||$.length===0?null:React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Recruiter Details"),React.createElement(Recruiters,null))},ApplicationTimelineTab=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$A.container},React.createElement(Timeline,null),React.createElement(RecruiterDetails,null)),ICONS={bookmark:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/276/original/BookmarkSimple.svg?1765444708",exit:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/344/original/ExportOutlined.svg?1765460782",airplay:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/451/original/Vector.svg?1765523747",monitor:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/170/455/original/Vector_%281%29.svg?1765526679",likeBadge:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/171/516/original/Like-badge-_remix__1.svg?1766402587"},actionBanner="_actionBanner_13z26_1",actionBannerIcon="_actionBannerIcon_13z26_12",actionBannerContent="_actionBannerContent_13z26_17",actionBannerTitle="_actionBannerTitle_13z26_23",actionBannerDescription="_actionBannerDescription_13z26_29",actionBannerButton="_actionBannerButton_13z26_33",styles$z={actionBanner,actionBannerIcon,actionBannerContent,actionBannerTitle,actionBannerDescription,actionBannerButton},ActionBanner=({icon:C,title:$,description:F,buttonText:V,buttonIcon:K,className:J,onClick:ee,isLoading:te})=>React.createElement("div",{className:classNames(styles$z.actionBanner,J)},C,React.createElement("div",{className:styles$z.actionBannerContent},React.createElement("span",{className:styles$z.actionBannerTitle},$),React.createElement("span",{className:styles$z.actionBannerDescription},F)),React.createElement(Button$2,{icon:K,type:"primary",className:styles$z.actionBannerButton,onClick:ee,loading:te},V)),monitorBanner="_monitorBanner_gxbq6_1",monitorIcon="_monitorIcon_gxbq6_7",styles$y={monitorBanner,monitorIcon},INTERVIEW_QUESTIONS_URL="https://companion.scaler.com/interview-experiences",InterviewExperiencesBanner=()=>{var oe;const C=reactRedux.useSelector(ie=>ie.scalantCareerHub.dashboard.userProfileData),$=(oe=C==null?void 0:C.hasCompletedScreeningCall)!=null?oe:!1,{analytics:F,jobData:V,companyData:K,currentTab:J}=useJobPreview(),{title:ee,applicationStatus:te}=V||{},ne=te===APPLICATION_STATUS.WITHDRAWN,{name:re}=K||{},ae=React.useCallback(()=>{globalThis.open(`${INTERVIEW_QUESTIONS_URL}?company=${encodeURIComponent(re)}&role=${encodeURIComponent(ee)}`,"_blank"),F==null||F.click("Interview Experiences - Explore",PRODUCT_NAME)},[F,re,ee]);return!$||J!==TAG_TO_TAB_MAPPING.applied||ne?null:React.createElement(ActionBanner,{icon:React.createElement("img",{src:ICONS.monitor,className:styles$y.monitorIcon}),title:"We've got the resources you need for this role",description:"Explore Interview Experiences from Scaler learners who have attempted this before",buttonText:"Explore",buttonIcon:React.createElement(DoubleRightOutlined$1,null),className:styles$y.monitorBanner,onClick:ae})},jobDescriptionTab="_jobDescriptionTab_1g78n_1",contentContainer="_contentContainer_1g78n_5",descriptionTitle="_descriptionTitle_1g78n_10",descriptionText="_descriptionText_1g78n_19",stepText$1="_stepText_1g78n_19",descriptionLink="_descriptionLink_1g78n_33",list="_list_1g78n_37",steps="_steps_1g78n_41",stepTitle="_stepTitle_1g78n_48",descriptionContainer="_descriptionContainer_1g78n_59",container$8="_container_1g78n_64",indicatorContainer="_indicatorContainer_1g78n_69",indicatorLine="_indicatorLine_1g78n_74",indicatorDot="_indicatorDot_1g78n_82",extraIndicatorDot="_extraIndicatorDot_1g78n_82",styles$x={jobDescriptionTab,contentContainer,descriptionTitle,descriptionText,stepText:stepText$1,descriptionLink,list,steps,stepTitle,descriptionContainer,container:container$8,indicatorContainer,indicatorLine,indicatorDot,extraIndicatorDot},Company$1=()=>{const{companyData:C,analytics:$}=useJobPreview(),{name:F,employeeCount:V,companyVision:K,location:J,category:ee,companyWebsite:te}=C||{},ne=()=>{$==null||$.click("Company - Website Link",PRODUCT_NAME,{companyName:F})};return React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Link,{className:styles$x.descriptionTitle,href:te,target:"_blank",onClick:ne},"About ",F),K&&React.createElement(Typography$1.Paragraph,{className:styles$x.descriptionText},React.createElement("div",{dangerouslySetInnerHTML:{__html:K}})),J&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Office Location:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},J)),ee&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Company Category:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},toTitleCase(ee))),V&&React.createElement(Space$1,null,React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"No. of Employees:"),React.createElement(Typography$1.Text,{className:styles$x.descriptionText},V)))},collapsableContainer$1="_collapsableContainer_1s2ds_1",collapsed$1="_collapsed_1s2ds_5",viewMore$1="_viewMore_1s2ds_21",styles$w={collapsableContainer:collapsableContainer$1,collapsed:collapsed$1,viewMore:viewMore$1},CollapsableHTML=({analytics:C,html:$,contentClassName:F})=>{const[V,K]=React.useState(!1),J=()=>{C==null||C.click(`Collapsable HTML - ${V?"View Less":"View More"}`,PRODUCT_NAME),K(!V)};return React.createElement("div",{className:styles$w.collapsableContainer},React.createElement("div",{className:classNames(F,{[styles$w.collapsed]:!V}),dangerouslySetInnerHTML:{__html:$}}),React.createElement(Typography$1.Link,{className:styles$w.viewMore,onClick:J},V?"View Less":"View More"))},Description$1=()=>{const{jobData:C,analytics:$}=useJobPreview(),{jobDescText:F,jobDesc:V}=C||{},K=()=>{$==null||$.click("Job Description - Know More",PRODUCT_NAME)};return React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"About the Role"),F&&React.createElement(CollapsableHTML,{analytics:$,html:F,contentClassName:styles$x.descriptionText}),V&&React.createElement(Typography$1.Link,{className:styles$x.descriptionLink,href:V,target:"_blank",onClick:K},React.createElement(Space$1,null,React.createElement(LinkOutlined$1,null),"Know More")))},collapsableContainer="_collapsableContainer_1bjjt_1",collapsed="_collapsed_1bjjt_5",viewMore="_viewMore_1bjjt_21",styles$v={collapsableContainer,collapsed,viewMore},CollapsableContainer=({analytics:C,children:$,contentClassName:F})=>{const[V,K]=React.useState(!1),J=()=>{C==null||C.click(`Collapsable Container - ${V?"View Less":"View More"}`,PRODUCT_NAME),K(!V)};return React.createElement("div",{className:styles$v.collapsableContainer},React.createElement("div",{className:classNames(F,{[styles$v.collapsed]:!V})},$),React.createElement(Typography$1.Link,{className:styles$v.viewMore,onClick:J},V?"View Less":"View More"))},Benefits=()=>{const{jobData:C,country:$}=useJobPreview(),{benefits:F,visaSponsorship:V}=C||{},K=V==="yes";return!F&&!K||$!=="US"?null:React.createElement(Space$1,{className:styles$x.contentContainer,direction:"vertical",size:"large"},React.createElement(Typography$1.Text,{className:styles$x.descriptionTitle},"Benefits"),React.createElement(CollapsableContainer,{contentClassName:styles$x.descriptionText},React.createElement("ul",{className:styles$x.list},F==null?void 0:F.map(J=>React.createElement("li",{key:J},J)),K&&React.createElement("li",null,"Visa sponsorship available"))))},STEPS=[{title:"In Progress",description:"Once you apply, our team checks if it’s a right match"},{title:"Resume Forwarded",description:"We send your resume to the company"},{title:"Feedback Stage",description:"The company reviews and shares feedback"},{title:"Interview Process",description:"If selected, your interview rounds begin"}],Indicator=()=>React.createElement(Flex$1,{vertical:!0,className:styles$x.indicatorContainer},React.createElement("div",{className:styles$x.indicatorLine}),React.createElement(Flex$1,{flex:1,gap:12},STEPS.map((C,$)=>React.createElement(Flex$1,{key:$,flex:1},React.createElement("div",{className:styles$x.indicatorDot}))),React.createElement("div",{className:styles$x.extraIndicatorDot}))),HiringSteps=()=>{const C=STEPS.map($=>({title:React.createElement("span",{className:styles$x.stepTitle},$.title),description:React.createElement("span",{className:styles$x.stepText},$.description)}));return React.createElement(Flex$1,{vertical:!0,gap:12},React.createElement(Indicator,null),React.createElement(Flex$1,{className:styles$x.steps,gap:12},C.map($=>React.createElement(Flex$1,{vertical:!0,flex:1},$.title,$.description))))},container$7="_container_all86_1",styles$u={container:container$7},PlacementProcessDisclaimerBanner=()=>React.createElement(Flex$1,{className:styles$u.container},React.createElement(InfoCircleTwoTone$1,{twoToneColor:"#913ECE"}),React.createElement(Typography$1.Text,null,"Our placement team has access to the same application status and updates that are visible to you")),BasicInfo$1=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Job Description"),React.createElement(Company$1,null),React.createElement(Description$1,null),React.createElement(Benefits,null)),PostApplicationProcess=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.descriptionContainer},React.createElement(Typography$1.Title,{level:3},"Post Application Process"),React.createElement(HiringSteps,null)),JobDescriptionTab=()=>React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$x.container},React.createElement(BasicInfo$1,null),React.createElement(PostApplicationProcess,null),React.createElement(PlacementProcessDisclaimerBanner,null),React.createElement(InterviewExperiencesBanner,null)),container$6="_container_tfeme_1",dot="_dot_tfeme_5",successDot="_successDot_tfeme_11",errorDot="_errorDot_tfeme_15",tableTitle="_tableTitle_tfeme_19",styles$t={container:container$6,dot,successDot,errorDot,tableTitle},STATUS_MAP$2={completed:"Completed",pending:"Pending",notRequired:"Not Required"},columns$2=[{title:"Skill Type",dataIndex:"skillType"},{title:"Status",dataIndex:"status"},{title:"Contests",dataIndex:"contests"},{title:"Mock Interview",dataIndex:"mockInterview"}],StatusColumnContent$2=({status:C})=>React.createElement(Tag$1,{color:C===STATUS_MAP$2.completed?"success":"warning"},C),ContestColumnContent=({contestDetails:C})=>{const{analytics:$}=useJobPreview();if(!C)return STATUS_MAP$2.notRequired;const{cleared:F,joinLink:V}=C,K=()=>{$==null||$.click("Certification - Attempt Contest",PRODUCT_NAME)};return F?React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,styles$t.successDot)}),React.createElement(Typography$1.Text,null,"Success")):React.createElement(Typography$1.Link,{href:V,onClick:K,underline:!0},"Attempt Contest")},MockInterviewColumnContent=({mockInterviewDetails:C,skillId:$,skillName:F})=>{const{openMockInterviewModal:V,analytics:K}=useJobPreview();if(!C)return STATUS_MAP$2.notRequired;const{cleared:J}=C,ee=()=>{K==null||K.click("Certification - Schedule Interview",PRODUCT_NAME),V($,F)};return J?React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,styles$t.successDot)}),React.createElement(Typography$1.Text,null,"Success")):React.createElement(Typography$1.Link,{onClick:ee,underline:!0},"Schedule Interview")},Certification=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.find(J=>J.label==="skills");if(!V)return null;const K=Object.entries(V.data).map(([J,ee])=>{const te=ee.contests,ne=te?ee.contests.cleared?STATUS_MAP$2.completed:STATUS_MAP$2.pending:STATUS_MAP$2.notRequired,re=ee.skills,ae=re?ee.skills.cleared?STATUS_MAP$2.completed:STATUS_MAP$2.pending:STATUS_MAP$2.notRequired,oe=[ne,ae].every(ie=>ie!==STATUS_MAP$2.pending)?STATUS_MAP$2.completed:STATUS_MAP$2.pending;return{skillType:J,status:React.createElement(StatusColumnContent$2,{status:oe}),contests:React.createElement(ContestColumnContent,{contestDetails:te}),mockInterview:React.createElement(MockInterviewColumnContent,{mockInterviewDetails:re,skillId:ee.skillId,skillName:ee.skillName})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Scaler certifications you need to apply"),columns:columns$2,dataSource:K,pagination:!1})},STATUS_MAP$1={added:"Added",missing:"Missing"},columns$1=[{title:"Stack Type",dataIndex:"stackType"},{title:"Experience (Yrs)",dataIndex:"experience"},{title:"Status",dataIndex:"status"},{title:"",dataIndex:"action"}],StatusColumnContent$1=({status:C})=>React.createElement(Space$1,null,React.createElement("div",{className:classNames(styles$t.dot,{[styles$t.successDot]:C===STATUS_MAP$1.added,[styles$t.errorDot]:C===STATUS_MAP$1.missing})}),React.createElement(Typography$1.Text,null,C)),ActionColumnContent=({status:C})=>{const{openResume:$,analytics:F}=useJobPreview(),V=()=>{F==null||F.click("Resume Skills - Add Skill",PRODUCT_NAME),$()};return C===STATUS_MAP$1.added?null:React.createElement(Typography$1.Link,{onClick:V,underline:!0},"Add Skill")},ResumeSkills=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.find(J=>J.label==="tech_stacks");if(!(V!=null&&V.data))return null;const K=Object.entries(V.data).map(([J,ee])=>{var ne;const te=(ne=ee.data)!=null&&ne.cleared?STATUS_MAP$1.added:STATUS_MAP$1.missing;return{stackType:J,experience:`${Math.floor(ee.proficiencyPeriod/12)}+`,status:React.createElement(StatusColumnContent$1,{status:te}),action:React.createElement(ActionColumnContent,{status:te})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Skills and Toolsets in your Resume"),columns:columns$1,dataSource:K,pagination:!1})},getExperienceText=(C,$)=>{const F=`${Math.floor(C/12)}y`,V=C%12===0?"":` ${C%12}m`,K=`${F}${V}`;if(!$)return`${K}+ Experience`;const J=`${Math.floor($/12)}y`,ee=$%12===0?"":`${$%12}m`;return`${K} - ${J} ${ee} Experience`},getNoticePeriodText=C=>C===0?"Immediate":C==null?"NA":`${C} days`,ADDITIONAL_ELIGIBILITY_MAPPING={placed_mentee:()=>"CTC greater than 1.6x of current offer",diversity:()=>"Female Candidates Only",experience:({minExperience:C,maxExperience:$})=>getExperienceText(C,$),notice_period:({preferredNoticePeriod:C})=>`${getNoticePeriodText(C)} Notice Period`},STATUS_MAP={eligible:"Eligible",ineligible:"Ineligible"},columns=[{title:"Requirement",dataIndex:"requirement"},{title:"Details",dataIndex:"details"},{title:"Status",dataIndex:"status"}],StatusColumnContent=({status:C})=>C===STATUS_MAP.eligible?React.createElement(Tag$1,{color:"success"},"Eligible"):React.createElement(Tag$1,{color:"error"},"Ineligible"),OtherRequirements=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{},{reasons:F}=$||{},V=F==null?void 0:F.filter(J=>J.label!=="skills"&&J.showText);if(!V)return null;const K=V.map(J=>{const ee=J.isEligible?STATUS_MAP.eligible:STATUS_MAP.ineligible;return{requirement:toTitleCase(J.label),details:ADDITIONAL_ELIGIBILITY_MAPPING[J.label](C),status:React.createElement(StatusColumnContent,{status:ee})}});return React.createElement(Table$1,{title:()=>React.createElement(Typography$1.Text,{className:styles$t.tableTitle,strong:!0},"Skills and Toolsets in your Resume"),columns,dataSource:K,pagination:!1})},SkillsRequiredTab=()=>{const{jobData:C}=useJobPreview(),{eligibilityCriteria:$}=C||{};return $?React.createElement(Space$1,{direction:"vertical",size:"large",className:styles$t.container},React.createElement(Typography$1.Title,{level:3},"Job Check-list"),React.createElement(Certification,null),React.createElement(ResumeSkills,null),React.createElement(OtherRequirements,null)):null},bodyContainer="_bodyContainer_1nalq_1",tabs="_tabs_1nalq_5",styles$s={bodyContainer,tabs},ExpandedJobViewBody=()=>{var te;const{activeTab:C,setActiveTab:$,jobData:F,currentTab:V}=useJobPreview(),{applicationTimeline:K}=F||{},ee=[((te=K==null?void 0:K.timeline)==null?void 0:te.length)>0&&V===TAG_TO_TAB_MAPPING.applied&&{key:JOB_BODY_TABS.APPLICATION_TIMELINE.key,label:JOB_BODY_TABS.APPLICATION_TIMELINE.label,children:React.createElement(ApplicationTimelineTab,null)},{key:JOB_BODY_TABS.ABOUT_ROLE.key,label:JOB_BODY_TABS.ABOUT_ROLE.label,children:React.createElement(JobDescriptionTab,null)},{key:JOB_BODY_TABS.REQUIREMENTS.key,label:JOB_BODY_TABS.REQUIREMENTS.label,children:React.createElement(SkillsRequiredTab,null)}].filter(Boolean);return React.createElement("div",{className:styles$s.bodyContainer},React.createElement(Tabs$1,{activeKey:C,className:styles$s.tabs,items:ee,onChange:$}))},useUpdateApplicationStatusService=careerHubApi.injectEndpoints({endpoints:C=>({updateApplicationStatus:C.mutation({query:$=>({url:"/job-tracker/update-application/",method:"PATCH",body:$}),invalidatesTags:($,F,{job_profile_id:V})=>[{type:"JobPreview",id:V}]})})}),{useUpdateApplicationStatusMutation}=useUpdateApplicationStatusService,appliedButton="_appliedButton_1f028_1",saveButton$1="_saveButton_1f028_9",savedButton$1="_savedButton_1f028_9",jobActions="_jobActions_1f028_30",withdrawalReasonForm="_withdrawalReasonForm_1f028_36",warningIcon="_warningIcon_1f028_41",withdrawalReasonRadioGroup="_withdrawalReasonRadioGroup_1f028_45",withdrawnText="_withdrawnText_1f028_52",styles$r={appliedButton,saveButton:saveButton$1,savedButton:savedButton$1,jobActions,withdrawalReasonForm,warningIcon,withdrawalReasonRadioGroup,withdrawnText},ModalContent=({withdrawalReason:C,setWithdrawalReason:$,withdrawalMessage:F,setWithdrawalMessage:V})=>{const K=ee=>{const te=ee.target.value;$(te),te!=="Other"&&V("")},J=ee=>{V(ee.target.value)};return React.createElement(React.Fragment,null,React.createElement(Typography$1.Text,null,"Please note that once withdrawn you will not be allowed to apply for this job again"),React.createElement(Form$1,{className:styles$r.withdrawalReasonForm},React.createElement(Form$1.Item,{layout:"vertical",label:"Select reason"},React.createElement(Radio$1.Group,{className:styles$r.withdrawalReasonRadioGroup,onChange:K,value:C},WITHDRAW_REASONS.map(ee=>React.createElement(Radio$1,{key:ee.value,value:ee.value},ee.label))),C==="Other"&&React.createElement(Form$1.Item,null,React.createElement(Input$1.TextArea,{value:F,onChange:J,placeholder:"Please specify your reason"})))))},Withdrawal=()=>{var ve;const{analytics:C,jobId:$,jobData:F,refetch:V,currentTab:K}=useJobPreview(),{applicationStatus:J}=F||{},[ee,te]=React.useState(!1),[ne,re]=React.useState((ve=WITHDRAW_REASONS[0])==null?void 0:ve.value),[ae,oe]=React.useState(""),[ie]=useUpdateApplicationStatusMutation(),{message:se}=App$1.useApp(),ue=()=>sr(this,null,function*(){var he,pe;const me=yield ie({job_profile_id:$,update_action:"withdraw",message:ae||ne});(he=me==null?void 0:me.data)!=null&&he.success?(se.success("Application withdrawn successfully"),te(!1),re((pe=WITHDRAW_REASONS[0])==null?void 0:pe.value),oe(""),V()):se.error("Failed to withdraw application"),C==null||C.click("Withdraw Application Ok",PRODUCT_NAME,{currentTab:K,jobId:$})}),de=()=>{var me;te(!1),re((me=WITHDRAW_REASONS[0])==null?void 0:me.value),oe("")},le=()=>{var me;re((me=WITHDRAW_REASONS[0])==null?void 0:me.value),oe(""),te(!0),C==null||C.click("Expanded View - Withdraw Application",PRODUCT_NAME,{currentTab:K,jobId:$})};return J===APPLICATION_STATUS.WITHDRAWN?React.createElement("div",{className:styles$r.withdrawnText},React.createElement(CheckCircleFilled$1,null),"Your Application has been Withdrawn"):K===TAG_TO_TAB_MAPPING.applied&&!NON_WITHDRAW_STATUSES.includes(J)?React.createElement(React.Fragment,null,React.createElement(Button$2,{icon:React.createElement("img",{src:ICONS.exit,alt:"exit"}),onClick:le,className:styles$r.withdrawButton,ghost:!0,type:"primary",size:"large"},"Withdraw Application"),React.createElement(Modal$1,{title:React.createElement(Space$1,null,React.createElement(WarningFilled$1,{className:styles$r.warningIcon}),React.createElement(Typography$1.Text,null,"Withdraw My Application")),open:ee,onOk:ue,onCancel:de},React.createElement(ModalContent,{withdrawalReason:ne,setWithdrawalReason:re,withdrawalMessage:ae,setWithdrawalMessage:oe}))):null},SaveButton$1=()=>{const{analytics:C,jobId:$,jobData:F,refetch:V,currentTab:K}=useJobPreview(),[J,{isLoading:ee}]=useUpdateApplicationStatusMutation(),{applicationStatus:te}=F||{},ne=te===APPLICATION_STATUS.SAVED,re=()=>sr(this,null,function*(){var oe;const ae=yield J({job_profile_id:$,update_action:"save"});(oe=ae==null?void 0:ae.data)!=null&&oe.success?(message$1.success("Application saved successfully"),V()):message$1.error("Failed to save application"),C==null||C.click("Expanded View - Save","Jobs Page V2",{currentTab:K,jobId:$})});return K===TAG_TO_TAB_MAPPING.applied?null:ne?React.createElement(Button$2,{icon:React.createElement("img",{src:ICONS.bookmark,alt:"bookmark"}),type:"text",size:"large",disabled:!0},"Saved"):React.createElement(Button$2,{icon:React.createElement(SaveTwoTone$1,null),type:"primary",ghost:!0,size:"large",onClick:re,loading:ee},"Save")},ApplyButton=()=>{const{jobData:C,eligibilityCriteria:$,setActiveApplicationId:F,jobId:V,currentTab:K,analytics:J}=useJobPreview(),{applicationStatus:ee}=C||{},{isEligible:te}=$||{},ne=ee===APPLICATION_STATUS.WITHDRAWN,re=()=>{F(V),J==null||J.click("Expanded View - Apply Now","Jobs Page V2",{currentTab:K,jobId:V})};return React.useEffect(()=>()=>{F(null)},[F]),ne?null:K===TAG_TO_TAB_MAPPING.applied?React.createElement(Button$2,{icon:React.createElement(CheckCircleFilled$1,null),className:styles$r.appliedButton,type:"text",size:"large"},"Applied"):React.createElement(Button$2,{icon:React.createElement(RiseOutlined$1,null),onClick:re,className:styles$r.applyButton,type:"primary",size:"large",disabled:!te},"Apply Now")},Actions=()=>React.createElement("div",{className:styles$r.jobActions},React.createElement(ApplyButton,null),React.createElement(SaveButton$1,null),React.createElement(Withdrawal,null)),missingLogo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAACqElEQVR4Xu2bMUpEQRBEXQwNFLyKuYE38KDewMDcqyx8A0NRlAWFDbqKGYuezzP9tdMz7/X0Lrt42Lbt84K/NgQOCGnj4mcjCOnlAyHNfCAEId0INNsP7yEIaUag2XYiN+T48jR87Nv7x6E1OuxBOQBCFEqnzGhTKKUQolBCyDml0e5kZP1h2gFGhz0ol5GRpVBiZDGyjD7xox3GRYc9KOQYWQolRhYjy+gTP9phXHTYg0KOkaVQYmQxsow+8aMdxkWHPSjkGFkKJUYWI8voEz/aYVx02INCbpmRpRzmvzOj3zgr+0OIQon3EINSMMoNCcJWSiFEoRTMICQIWymFEIVSMIOQIGylFEIUSsEMQoKwlVIIUSgFMwgJwlZKIUShFMwgJAhbKYUQhVIwg5AgbKUUQhRKwUwLITN+aZvBbBTGKucof6Ba5SCV9FXOgZDK5OTn1U1HyGTg1XIIORFiZFWtYj6vOqtaDiEVIfM5Qha76pVfbkhFyHzODeGGmC2jxavG4mOvxnFaCiGL3XRuyLTe1xbihnBDtE5xU1VnVevxsbciZD5HyMSrfnl1beI/j9/cPQytsb0+D73++8Uf72/Da1SNFXlTrzYxfMrQAjPGXsUCIYZMhBiwElGEJCgbNRBiwEpEEZKgbNRAiAErEUVIgrJRAyEGrEQUIQnKRg2EGLASUYQkKBs1EGLASkQRkqBs1ECIASsRRUiCslFjN0KMM+8+2uL3kN1TNg6IEANWIoqQBGWjBkIMWIkoQhKUjRoIMWAloghJUDZqIMSAlYgiJEHZqIEQA1YiipAEZaMGQgxYiShCEpSNGggxYCWiCElQNmogxICViA4LSWySGr8Eyn/YAVaWAEKyvMtqCCkRZQMIyfIuqyGkRJQNICTLu6yGkBJRNvAFGmsSbsnlaLoAAAAASUVORK5CYII=",CompanyLogo=({logo:C,company:$,companiesList:F,companyName:V,size:K=48})=>{const[J,ee]=React.useState(()=>{var ne;return C||($&&$[0]&&((ne=F[$[0]])!=null&&ne.logo)?F[$[0]].logo:missingLogo)}),te=()=>{ee(missingLogo)};return React.createElement(Avatar$1,{size:K,src:J,alt:V,onError:te,shape:"square"})};CompanyLogo.propTypes={logo:PropTypes.string,company:PropTypes.arrayOf(PropTypes.number),companiesList:PropTypes.object,companyName:PropTypes.string,size:PropTypes.number},CompanyLogo.defaultProps={logo:null,company:[],companiesList:{},companyName:""};const basicInfo="_basicInfo_2vzae_1",companyInfo="_companyInfo_2vzae_12",companyName$1="_companyName_2vzae_18",container$5="_container_2vzae_25",extraDetails="_extraDetails_2vzae_33",extraDetailsDivider="_extraDetailsDivider_2vzae_44",jobTitle$1="_jobTitle_2vzae_51",jobLocation="_jobLocation_2vzae_58",styles$q={basicInfo,companyInfo,companyName:companyName$1,container:container$5,extraDetails,extraDetailsDivider,jobTitle:jobTitle$1,jobLocation},CompanyInfo=()=>{const{companyData:C}=useJobPreview(),{logo:$,name:F}=C||{};return React.createElement("div",{className:styles$q.companyInfo},React.createElement(CompanyLogo,{logo:$,companyName:F,size:50}),React.createElement("div",{className:styles$q.companyName},F))},JobTitle=()=>{const{jobData:C}=useJobPreview(),{title:$}=C||{};return React.createElement(Typography$1.Text,{ellipsis:!0,className:styles$q.jobTitle},$)},JobLocation=()=>{const{jobData:C}=useJobPreview(),{preferredCities:$}=C||{},F=formatLocation($);return React.createElement("div",{className:styles$q.jobLocation},F)},BasicInfo=()=>React.createElement("div",{className:styles$q.basicInfo},React.createElement(CompanyInfo,null),React.createElement(JobTitle,null),React.createElement(JobLocation,null)),ExtraDetails=()=>{const{jobData:C}=useJobPreview(),{minCtc:$,maxCtc:F,openForDiscussionCtc:V,isInternship:K,stipend:J,preferredNoticePeriod:ee,minExperience:te,maxExperience:ne}=C||{},re=formatCtc({minCtc:$,maxCtc:F,openForDiscussionCtc:V,isInternship:K,stipend:J}),ae=formatExperience$1(te,ne),oe=formatNoticePeriod(ee);return React.createElement("div",{className:styles$q.extraDetails},[re,ae,oe].filter(Boolean).map((ie,se)=>React.createElement(React.Fragment,{key:se},React.createElement("div",{className:styles$q.detail},ie),React.createElement(Divider$1,{size:"large",type:"vertical",className:styles$q.extraDetailsDivider}))))},ExpandedJobViewHeader=()=>React.createElement("div",{className:styles$q.container},React.createElement(BasicInfo,null),React.createElement(ExtraDetails,null),React.createElement(Actions,null)),field="_field_15aju_1",checkboxAdjacentField="_checkboxAdjacentField_15aju_7",fieldGroup="_fieldGroup_15aju_11",checkboxFieldGroup="_checkboxFieldGroup_15aju_17",fieldGroupLabel="_fieldGroupLabel_15aju_21",styles$p={field,checkboxAdjacentField,fieldGroup,checkboxFieldGroup,fieldGroupLabel};function CTC({fieldName:C,fieldProps:$,label:F}){return React.createElement(Form$1.Item,{label:F,name:C,rules:[{required:!0,message:`${F} is required`}],layout:"vertical",className:styles$p.field,extra:"Enter amount in lakhs. For eg, if amount is 50 LPA, enter 50."},React.createElement(Input$1,Hn({},$)))}function Linkedin({fieldName:C,label:$,fieldProps:F}){return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please enter your LinkedIn profile URL",type:"url"}],layout:"vertical",className:styles$p.field},React.createElement(Input$1,Hn({},F)))}const selectOptionsService=careerHubApi.injectEndpoints({endpoints:C=>({getSelectOptions:C.query({query:({fieldType:$,query:F})=>({url:"/job-tracker/v1/custom-data",params:{field_type:$,query:F}}),transformResponse:($,F,V)=>{const K=($==null?void 0:$[V==null?void 0:V.fieldType])||[];return(K==null?void 0:K.map(J=>({text:J,value:J})))||[]}})})}),{useLazyGetSelectOptionsQuery}=selectOptionsService;function Company({fieldName:C,label:$}){const[F]=useLazyGetSelectOptionsQuery(),[V,K]=React.useState([]),J=ee=>sr(this,null,function*(){const te=yield F({fieldType:"companies",query:ee});K((te==null?void 0:te.data)||[])});return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select a company"}],layout:"vertical",className:styles$p.field},React.createElement(Select$1,{options:V,showSearch:!0,filterOption:!1,onSearch:J}))}function Top5Skills({fieldName:C,label:$}){const F=reactRedux.useSelector(J=>J.scalantCareerHub.dashboard.userProfileData),V=(F==null?void 0:F.experienceBasedSkills)||[],K=getSkillOptions(V);return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select upto 5 primary skills"}],className:styles$p.field},React.createElement(Select$1,{options:K,mode:"multiple",showSearch:!1})))}function GradYear({fieldName:C,label:$}){return React.createElement(Form$1.Item,{label:$,name:C,rules:[{required:!0,message:"Please select graduation year"}],className:styles$p.field},React.createElement(Select$1,{showSearch:!0,options:[...Array(71)].map((F,V)=>{const K=new Date().getFullYear()-60+V;return{label:K,value:`${K}-01-01`}}).reverse()}))}function CurrentLocation({fieldName:C,fieldProps:$,label:F}){return React.createElement(Form$1.Item,{label:F,name:C,rules:[{required:!0,message:"Please select current location"}],className:styles$p.field},React.createElement(Select$1,Hn({},$)))}function NoticePeriod({label:C}){const $=Form$1.useWatch(NOTICE_PERIOD_FIELD_MAP.notice_period)==="-1";return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Space$1,{className:classNames(styles$p.fieldGroup,styles$p.checkboxFieldGroup)},React.createElement(Form$1.Item,{label:C,name:NOTICE_PERIOD_FIELD_MAP.notice_period,rules:[{required:!0,message:"Please select notice period"}],className:classNames(styles$p.field,styles$p.checkboxAdjacentField)},React.createElement(Select$1,{options:NOTICE_PERIOD_OPTIONS})),React.createElement(Form$1.Item,{name:NOTICE_PERIOD_FIELD_MAP.buyout_notice,className:styles$p.field,valuePropName:"checked"},React.createElement(Checkbox$1,null,"Negotiable / Buyout available"))),$&&React.createElement(Form$1.Item,{label:"Last Date of Job",name:NOTICE_PERIOD_FIELD_MAP.available_joining_date,rules:[{required:!0,message:"Please enter last date"}],className:styles$p.field},React.createElement(Input$1,{type:"date"})))}function PreferredLocation({fieldName:C,label:$,fieldProps:F}){const V=Form$1.useWatch(CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india);return React.createElement(Space$1,{className:classNames(styles$p.fieldGroup,styles$p.checkboxFieldGroup)},React.createElement(Form$1.Item,{label:$,name:C,className:classNames(styles$p.field,styles$p.checkboxAdjacentField)},React.createElement(Select$1,br(Hn({},F),{disabled:V}))),React.createElement(Form$1.Item,{name:CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india,valuePropName:"checked"},React.createElement(Checkbox$1,null,"Anywhere in India")))}function TotalYearsOfExperience(){return React.createElement(Space$1,{className:styles$p.fieldGroup},React.createElement(Form$1.Item,{label:"Experience Years",name:EXPERIENCE_FIELD_MAP.years_of_experience,rules:[{required:!0,message:"Please select years of experience"}],className:styles$p.field},React.createElement(Select$1,{options:YEAR_OPTIONS,showSearch:!0})),React.createElement(Form$1.Item,{label:"Experience Months",name:EXPERIENCE_FIELD_MAP.months_of_experience,rules:[{required:!0,message:"Please select months of experience"}],className:styles$p.field},React.createElement(Select$1,{options:MONTH_OPTIONS,showSearch:!0})))}const NON_CUSTOM_FIELD_MAP={expected_ctc:"expected_ctc",current_ctc:"current_ctc",orgyear:"orgyear",linkedin:"linkedin",current_company:"current_company",current_location:"current_location",preferred_location:"preferred_location",notice_period:"notice_period",experience:"experience",skills:"skills"},CHECKBOX_FIELD_MAP={preferred_location_anywhere_in_india:"preferred_location_anywhere_in_india"},EXPERIENCE_FIELD_MAP={years_of_experience:"years_of_experience",months_of_experience:"months_of_experience"},NOTICE_PERIOD_FIELD_MAP={notice_period:"notice_period",serving_notice:"serving_notice",available_joining_date:"available_joining_date",buyout_notice:"buyout_notice"},LOCATION_FIELD_MAP={current_location:"current_location",preferred_location:"preferred_location"},NON_CUSTOM_FIELDS=Object.values(NON_CUSTOM_FIELD_MAP),NON_CUSTOM_FIELD_COMPONENT_MAPPING={[NON_CUSTOM_FIELD_MAP.expected_ctc]:{component:CTC,props:{fieldName:"expected_ctc",label:"Expected CTC",fieldProps:{type:"number",min:0}}},[NON_CUSTOM_FIELD_MAP.current_ctc]:{component:CTC,props:{fieldName:"current_ctc",label:"Current CTC",fieldProps:{type:"number",min:0}}},[NON_CUSTOM_FIELD_MAP.current_location]:{component:CurrentLocation,props:{fieldName:NON_CUSTOM_FIELD_MAP.current_location,label:"Current Locations",fieldProps:{options:((er=window==null?void 0:window[HYDRATION_KEY])==null?void 0:er.job_locations)||[],mode:"multiple"}}},[NON_CUSTOM_FIELD_MAP.preferred_location]:{component:PreferredLocation,props:{fieldName:NON_CUSTOM_FIELD_MAP.preferred_location,label:"Preferred Locations",fieldProps:{options:((tr=window==null?void 0:window[HYDRATION_KEY])==null?void 0:tr.job_locations)||[],mode:"multiple"}}},[NON_CUSTOM_FIELD_MAP.orgyear]:{component:GradYear,props:{fieldName:NON_CUSTOM_FIELD_MAP.orgyear,label:"Graduation Year"}},[NON_CUSTOM_FIELD_MAP.linkedin]:{component:Linkedin,props:{fieldName:NON_CUSTOM_FIELD_MAP.linkedin,label:"LinkedIn profile",fieldProps:{type:"url"}}},[NON_CUSTOM_FIELD_MAP.current_company]:{component:Company,props:{fieldName:NON_CUSTOM_FIELD_MAP.current_company,label:"Company"}},[NON_CUSTOM_FIELD_MAP.notice_period]:{component:NoticePeriod,props:{fieldName:NON_CUSTOM_FIELD_MAP.notice_period,label:"Notice Period"}},[NON_CUSTOM_FIELD_MAP.experience]:{component:TotalYearsOfExperience,props:{fieldName:NON_CUSTOM_FIELD_MAP.experience,label:"Total Years of Experience"}},[NON_CUSTOM_FIELD_MAP.skills]:{component:Top5Skills,props:{fieldName:NON_CUSTOM_FIELD_MAP.skills,label:"Select upto 5 primary skills that you want to share to recruiters"}}},YEAR_OPTIONS=new Array(50).fill(0).map((C,$)=>({label:`${$} Years`,value:`${$}`})),MONTH_OPTIONS=new Array(12).fill(0).map((C,$)=>({label:`${$} Months`,value:`${$}`})),NOTICE_PERIOD_OPTIONS=[{value:"-1",label:"Currently Serving"},{value:"0",label:"Immediately Available"},{value:"15",label:"15 Days"},{value:"30",label:"30 Days"},{value:"45",label:"45 Days"},{value:"60",label:"60 Days"},{value:"90",label:"90 Days"}],ANYWHERE_IN_INDIA="anywhere_in_india",getSkillOptions=C=>(C==null?void 0:C.map($=>{var K,J,ee,te;const F=((K=$.proficiency_period)==null?void 0:K.years)||((J=$.proficiencyPeriod)==null?void 0:J.years),V=((ee=$.proficiency_period)==null?void 0:ee.months)||((te=$.proficiencyPeriod)==null?void 0:te.months);return{label:`${$.name} (${F}Y ${V}M)`,value:`${$.skillId}`}}))||[],CUSTOM_FIELD_TYPE_MAP={text:"text",date_time:"date_time",upload:"upload",number:"number"},getInitialFormData=C=>{const $=Object.fromEntries(Object.entries(C).map(([J,ee])=>{switch(J){case NON_CUSTOM_FIELD_MAP.current_location:return[J,ee==null?void 0:ee.split("/")];case NON_CUSTOM_FIELD_MAP.preferred_location:return ee===ANYWHERE_IN_INDIA?[J,null]:[J,ee==null?void 0:ee.split("/")];case NON_CUSTOM_FIELD_MAP.skills:return[J,ee==null?void 0:ee.map(te=>te.skill_id)];default:return[J,ee]}})),F=C[NON_CUSTOM_FIELD_MAP.notice_period]||{},V=C[NON_CUSTOM_FIELD_MAP.experience]||{},K=C[NON_CUSTOM_FIELD_MAP.preferred_location];return Object.entries(F).forEach(([J,ee])=>{J===NOTICE_PERIOD_FIELD_MAP.buyout_notice?$[J]=ee==="true":$[J]=ee}),Object.entries(V).forEach(([J,ee])=>{$[J]=ee}),$[CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india]=K===ANYWHERE_IN_INDIA,$},getInitialCustomFormData=C=>C.reduce((F,V)=>br(Hn({},F),{[V.id]:V.response}),{}),createNoticePeriodFieldPayload=C=>br(Hn({},C),{[NOTICE_PERIOD_FIELD_MAP.serving_notice]:C[NOTICE_PERIOD_FIELD_MAP.notice_period]==="-1"}),createExperienceFieldPayload=C=>{let $=0;return $+=(Number(C[EXPERIENCE_FIELD_MAP.years_of_experience])||0)*12,$+=Number(C[EXPERIENCE_FIELD_MAP.months_of_experience])||0,$},createSkillsFieldPayload=(C,$)=>$.map(F=>br(Hn({},F),{is_top_5:C.includes(String(F.skillId))})),createCustomFieldsPayload=C=>{const $=Object.keys(NON_CUSTOM_FIELD_MAP)+Object.keys(CHECKBOX_FIELD_MAP)+Object.keys(EXPERIENCE_FIELD_MAP)+Object.keys(NOTICE_PERIOD_FIELD_MAP);return Object.entries(C).filter(([F])=>!$.includes(F)).map(([F,V])=>({id:F,response:V}))},createDefaultFieldsPayload=(C,$)=>{const F={};Object.entries(C).forEach(([J,ee])=>{NON_CUSTOM_FIELDS.includes(J)&&(LOCATION_FIELD_MAP[J]?F[J]=ee==null?void 0:ee.join("/"):F[J]=ee)});const V={},K={};return Object.entries(C).forEach(([J,ee])=>{NOTICE_PERIOD_FIELD_MAP[J]?V[J]=ee:EXPERIENCE_FIELD_MAP[J]?K[J]=ee:CHECKBOX_FIELD_MAP.preferred_location_anywhere_in_india===J&&ee&&(F[NON_CUSTOM_FIELD_MAP.preferred_location]=ANYWHERE_IN_INDIA)}),F[NON_CUSTOM_FIELD_MAP.notice_period]=createNoticePeriodFieldPayload(V),F[NON_CUSTOM_FIELD_MAP.experience]=createExperienceFieldPayload(K),F[NON_CUSTOM_FIELD_MAP.skills]=createSkillsFieldPayload(C[NON_CUSTOM_FIELD_MAP.skills],$),F},createApplicationFormPayload=(C,$)=>({default_fields:createDefaultFieldsPayload(C,$),custom_fields:createCustomFieldsPayload(C)}),form="_form_1ip4j_1",styles$o={form};function GenericField({formType:C,field:$}){return React.createElement(Form$1.Item,{label:$.attributes.title,name:$.id,rules:[{required:!0,message:`${$.attributes.title} is required`}],layout:"vertical",className:styles$p.field},React.createElement(Input$1,{type:C}))}function UploadField({field:C}){const{onUploadFile:$}=useApplicationFormContext(),[F,V]=React.useState(!1),K=Form$1.useFormInstance(),J=Form$1.useWatch(C.id)||{},ee=te=>sr(this,null,function*(){var re,ae;const ne=(ae=(re=te==null?void 0:te.target)==null?void 0:re.files)==null?void 0:ae[0];if(ne){V(!0),K.setFieldValue(C.id,{file_name:ne.name});try{if($){const oe=yield $(ne);K.setFieldValue(C.id,{file_name:ne.name,file_url:oe}),message$1.success("File uploaded successfully")}else throw new Error("Upload file function not provided")}catch(oe){message$1.error("Failed to upload file")}finally{V(!1)}}});return React.createElement(Form$1.Item,{label:C.attributes.title,name:C.id,rules:[{required:!0,message:`${C.attributes.title} is required`}],layout:"vertical",className:styles$p.field},React.createElement(Upload$1,{multiple:!1,accept:".pdf,.doc,.docx,.txt,.md",showUploadList:!1,beforeUpload:()=>!1,onChange:({file:te})=>{if(te){const ne={target:{files:[te.originFileObj||te]}};ee(ne)}},disabled:F},React.createElement(Button$2,{className:styles$p.field,loading:F,icon:!!J.file_name&&React.createElement(CheckCircleFilled$1,null)},!!J.file_name&&J.file_name,!J.file_name&&!F&&"Upload File")))}function CustomField({field:C}){switch(C.attributes.form_type){case CUSTOM_FIELD_TYPE_MAP.upload:return React.createElement(UploadField,{field:C});case CUSTOM_FIELD_TYPE_MAP.date_time:return React.createElement(GenericField,{formType:"date",field:C});default:return React.createElement(GenericField,{formType:C.attributes.form_type,field:C})}}function NonCustomField({field:C}){var K;if(!NON_CUSTOM_FIELD_COMPONENT_MAPPING[(K=C==null?void 0:C.attributes)==null?void 0:K.title])return null;const{title:$}=C.attributes,{component:F,props:V}=NON_CUSTOM_FIELD_COMPONENT_MAPPING[$];return React.createElement(F,Hn({},V))}function ApplicationForm(){const{applicationId:C,stepName:$,jobProfileId:F}=useApplicationFormContext(),{data:V,isLoading:K}=useApplicationForm({jobProfileId:F,applicationId:C,status:$}),[J]=Form$1.useForm(),{setFormInstance:ee}=useApplicationFormContext(),te=React.useMemo(()=>V==null?void 0:V.reduce((re,ae)=>(ae.attributes.custom||(re[ae.attributes.title]=ae),re),{}),[V]),ne=React.useMemo(()=>V==null?void 0:V.filter(re=>re.attributes.custom),[V]);return React.useEffect(()=>{if(!te||!ne)return;const re=Object.fromEntries(Object.entries(te).map(([oe,ie])=>[oe,ie.attributes.response])),ae=ne.map(oe=>({id:oe.id,response:oe.attributes.response}));J.setFieldsValue(Hn(Hn({},getInitialFormData(re)),getInitialCustomFormData(ae)))},[te,ne,J]),React.useEffect(()=>{ee(J)},[J,ee]),K||!te||!ne?React.createElement(Skeleton$1,{active:!0}):React.createElement(Form$1,{layout:"vertical",className:styles$o.form,form:J},NON_CUSTOM_FIELDS.map(re=>React.createElement(NonCustomField,{key:re,field:te[re]})),Object.entries(ne).map(([re,ae])=>React.createElement(CustomField,{key:re,field:ae})))}ApplicationForm.propTypes={jobProfileId:PropTypes.number.isRequired,applicationId:PropTypes.number,status:PropTypes.string};const applicationFormFooterContainer="_applicationFormFooterContainer_6f2h5_1",resumeChoiceSelectFooterContainer="_resumeChoiceSelectFooterContainer_6f2h5_6",styles$n={applicationFormFooterContainer,resumeChoiceSelectFooterContainer},ApplicationFormFooter=({onCancel:C})=>{const $=reactRedux.useSelector(se=>se.scalantCareerHub.dashboard.userProfileData),F=($==null?void 0:$.experienceBasedSkills)||[],{applicationId:V,formInstance:K,jobProfileId:J,stepName:ee,setStepName:te}=useApplicationFormContext(),{analytics:ne}=useJobPreview(),[re,{isLoading:ae}]=useUpdateApplicationMutation(),oe=()=>sr(this,null,function*(){var se;ne==null||ne.click("Application Form - Next",PRODUCT_NAME);try{const ue={job_profile_id:J,step_name:ee,form_data:createApplicationFormPayload(K.getFieldsValue(),F)},de=yield re({applicationId:V,payload:ue});(se=de==null?void 0:de.data)!=null&&se.success?te(APPLICATION_STATUS.RESUME_FITMENT_CHECK):message$1.error("Failed to update application")}catch(ue){message$1.error("Failed to update application")}}),ie=()=>{ne==null||ne.click("Application Form - Cancel",PRODUCT_NAME),C()};return React.createElement(Space$1,{className:styles$n.applicationFormFooterContainer},React.createElement(Button$2,{onClick:ie},"Cancel"),React.createElement(Button$2,{loading:ae,type:"primary",onClick:oe},"Next"))},ResumeChoiceSelectFooter=()=>{const{applicationId:C,selectedResume:$,jobProfileId:F,stepName:V,setStepName:K}=useApplicationFormContext(),{analytics:J}=useJobPreview(),[ee,{isLoading:te}]=useUpdateApplicationMutation(),ne=()=>{J==null||J.click("Resume Choice - Go Back",PRODUCT_NAME),K(APPLICATION_STATUS.APPLICATION_FORM)},re=()=>sr(this,null,function*(){var ae;J==null||J.click("Resume Choice - Proceed to Apply",PRODUCT_NAME);try{const ie=yield ee({applicationId:C,payload:{job_profile_id:F,step_name:V,resume_id:$}});(ae=ie==null?void 0:ie.data)!=null&&ae.success?K(APPLICATION_STATUS.SUCCESSFULLY_APPLIED):message$1.error("Failed to update application")}catch(oe){message$1.error("Failed to update application")}});return React.createElement(Space$1,{className:styles$n.resumeChoiceSelectFooterContainer},React.createElement(Space$1,null,React.createElement(BulbTwoTone$1,null),React.createElement(Typography$1.Text,{strong:!0},"Quick Tip: "),React.createElement(Typography$1.Text,null,"Complete the steps below to boost your chances")),React.createElement(Space$1,null,React.createElement(Button$2,{onClick:ne},"Go Back"),React.createElement(Button$2,{type:"primary",onClick:re,loading:te,disabled:!$},"Proceed to Apply")))};function Footer$1({onCancel:C}){const{stepName:$}=useApplicationFormContext();switch($){case APPLICATION_STATUS.APPLICATION_FORM:return React.createElement(ApplicationFormFooter,{onCancel:C});case APPLICATION_STATUS.RESUME_CHOICE_SELECT:return React.createElement(ResumeChoiceSelectFooter,null);default:return null}}const stepText="_stepText_14qm3_1",titleContainer$1="_titleContainer_14qm3_5",titleIcon="_titleIcon_14qm3_9",titleText="_titleText_14qm3_14",styles$m={stepText,titleContainer:titleContainer$1,titleIcon,titleText},{Text:Text$3}=Typography$1,STEP_MAP={[APPLICATION_STATUS.APPLICATION_FORM]:{currentStep:1,icon:InfoCircleFilled$1,title:"Required Details",totalSteps:2},[APPLICATION_STATUS.RESUME_FITMENT_CHECK]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2},[APPLICATION_STATUS.RESUME_CHOICE_SELECT]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2},[APPLICATION_STATUS.SUCCESSFULLY_APPLIED]:{currentStep:2,icon:FileTextTwoTone$1,title:"Select which Resume to share for this job application",totalSteps:2}};function FormHeader({onClose:C}){const{stepName:$,jobProfileId:F}=useApplicationFormContext(),{analytics:V}=useJobPreview(),{updateTab:K}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),{refetch:J}=useGetJobPreviewQuery(F,{skip:!F});if(!STEP_MAP[$])return null;const{currentStep:ee,icon:te,title:ne,totalSteps:re}=STEP_MAP[$]||{},ae=()=>{V==null||V.click("Application Form - Close",PRODUCT_NAME),$===APPLICATION_STATUS.SUCCESSFULLY_APPLIED&&(K(TAG_TO_TAB_MAPPING.applied),J()),C==null||C()};return React.createElement(Flex$1,{justify:"space-between"},React.createElement(Space$1,{className:styles$m.container,direction:"vertical"},React.createElement(Text$3,{className:styles$m.stepText},"Step ",ee,"/",re),React.createElement(Space$1,{className:styles$m.titleContainer},React.createElement(te,{className:styles$m.titleIcon}),React.createElement(Text$3,{className:styles$m.titleText},ne))),React.createElement(Button$2,{icon:React.createElement(CloseOutlined$1,null),type:"text",onClick:ae}))}function commonjsRequire(C){throw new Error('Could not dynamically require "'+C+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function($,F){module.exports=F()})(commonjsGlobal,function(){return(()=>{var __webpack_modules__=[,(C,$,F)=>{function V(Le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(Pe){return typeof Pe}:V=function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},V(Le)}Object.defineProperty($,"__esModule",{value:!0}),$.StatTimer=$.RenderingCancelledException=$.PixelsPerInch=$.PageViewport=$.PDFDateString=$.LinkTarget=$.DOMStandardFontDataFactory=$.DOMSVGFactory=$.DOMCanvasFactory=$.DOMCMapReaderFactory=void 0,$.addLinkAttributes=Fe,$.deprecated=Xe,$.getFilenameFromUrl=Ae,$.getPdfFilenameFromUrl=Me,$.getXfaPageViewport=Ue,$.isDataScheme=Oe,$.isPdfFile=Te,$.isValidFetchUrl=ze,$.loadScript=Ve;var K=te(F(2)),J=F(4),ee=F(135);function te(Le){return Le&&Le.__esModule?Le:{default:Le}}function ne(Le,we){var Pe=typeof Symbol!="undefined"&&Le[Symbol.iterator]||Le["@@iterator"];if(!Pe){if(Array.isArray(Le)||(Pe=re(Le))||we&&Le&&typeof Le.length=="number"){Pe&&(Le=Pe);var ke=0,He=function(){};return{s:He,n:function(){return ke>=Le.length?{done:!0}:{done:!1,value:Le[ke++]}},e:function(it){throw it},f:He}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
435
435
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var We=!0,Ke=!1,rt;return{s:function(){Pe=Pe.call(Le)},n:function(){var it=Pe.next();return We=it.done,it},e:function(it){Ke=!0,rt=it},f:function(){try{!We&&Pe.return!=null&&Pe.return()}finally{if(Ke)throw rt}}}}function re(Le,we){if(Le){if(typeof Le=="string")return ae(Le,we);var Pe=Object.prototype.toString.call(Le).slice(8,-1);if(Pe==="Object"&&Le.constructor&&(Pe=Le.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(Le);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return ae(Le,we)}}function ae(Le,we){(we==null||we>Le.length)&&(we=Le.length);for(var Pe=0,ke=new Array(we);Pe<we;Pe++)ke[Pe]=Le[Pe];return ke}function oe(Le,we,Pe,ke,He,We,Ke){try{var rt=Le[We](Ke),st=rt.value}catch(it){Pe(it);return}rt.done?we(st):Promise.resolve(st).then(ke,He)}function ie(Le){return function(){var we=this,Pe=arguments;return new Promise(function(ke,He){var We=Le.apply(we,Pe);function Ke(st){oe(We,ke,He,Ke,rt,"next",st)}function rt(st){oe(We,ke,He,Ke,rt,"throw",st)}Ke(void 0)})}}function se(Le,we){if(!(Le instanceof we))throw new TypeError("Cannot call a class as a function")}function ue(Le,we){for(var Pe=0;Pe<we.length;Pe++){var ke=we[Pe];ke.enumerable=ke.enumerable||!1,ke.configurable=!0,"value"in ke&&(ke.writable=!0),Object.defineProperty(Le,ke.key,ke)}}function de(Le,we,Pe){return we&&ue(Le.prototype,we),Pe&&ue(Le,Pe),Le}function le(Le,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function");Le.prototype=Object.create(we&&we.prototype,{constructor:{value:Le,writable:!0,configurable:!0}}),we&&ve(Le,we)}function ve(Le,we){return ve=Object.setPrototypeOf||function(ke,He){return ke.__proto__=He,ke},ve(Le,we)}function me(Le){var we=ce();return function(){var ke=fe(Le),He;if(we){var We=fe(this).constructor;He=Reflect.construct(ke,arguments,We)}else He=ke.apply(this,arguments);return he(this,He)}}function he(Le,we){if(we&&(V(we)==="object"||typeof we=="function"))return we;if(we!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pe(Le)}function pe(Le){if(Le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le}function ce(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Le){return!1}}function fe(Le){return fe=Object.setPrototypeOf?Object.getPrototypeOf:function(Pe){return Pe.__proto__||Object.getPrototypeOf(Pe)},fe(Le)}var ye="noopener noreferrer nofollow",_e="http://www.w3.org/2000/svg",ge={CSS:96,PDF:72,get PDF_TO_CSS_UNITS(){return(0,J.shadow)(this,"PDF_TO_CSS_UNITS",this.CSS/this.PDF)}};$.PixelsPerInch=ge;var be=function(Le){le(Pe,Le);var we=me(Pe);function Pe(){var ke,He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},We=He.ownerDocument,Ke=We===void 0?globalThis.document:We;return se(this,Pe),ke=we.call(this),ke._document=Ke,ke}return de(Pe,[{key:"_createCanvas",value:function(He,We){var Ke=this._document.createElement("canvas");return Ke.width=He,Ke.height=We,Ke}}]),Pe}(ee.BaseCanvasFactory);$.DOMCanvasFactory=be;function Se(Le){return Ee.apply(this,arguments)}function Ee(){return Ee=ie(K.default.mark(function Le(we){var Pe,ke,He=arguments;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(Pe=He.length>1&&He[1]!==void 0?He[1]:!1,!ze(we,document.baseURI)){Ke.next=21;break}return Ke.next=4,fetch(we);case 4:if(ke=Ke.sent,ke.ok){Ke.next=7;break}throw new Error(ke.statusText);case 7:if(!Pe){Ke.next=15;break}return Ke.t1=Uint8Array,Ke.next=11,ke.arrayBuffer();case 11:Ke.t2=Ke.sent,Ke.t0=new Ke.t1(Ke.t2),Ke.next=20;break;case 15:return Ke.t3=J.stringToBytes,Ke.next=18,ke.text();case 18:Ke.t4=Ke.sent,Ke.t0=(0,Ke.t3)(Ke.t4);case 20:return Ke.abrupt("return",Ke.t0);case 21:return Ke.abrupt("return",new Promise(function(rt,st){var it=new XMLHttpRequest;it.open("GET",we,!0),Pe&&(it.responseType="arraybuffer"),it.onreadystatechange=function(){if(it.readyState===XMLHttpRequest.DONE){if(it.status===200||it.status===0){var Je;if(Pe&&it.response?Je=new Uint8Array(it.response):!Pe&&it.responseText&&(Je=(0,J.stringToBytes)(it.responseText)),Je){rt(Je);return}}st(new Error(it.statusText))}},it.send(null)}));case 22:case"end":return Ke.stop()}},Le)})),Ee.apply(this,arguments)}var Ce=function(Le){le(Pe,Le);var we=me(Pe);function Pe(){return se(this,Pe),we.apply(this,arguments)}return de(Pe,[{key:"_fetchData",value:function(He,We){return Se(He,this.isCompressed).then(function(Ke){return{cMapData:Ke,compressionType:We}})}}]),Pe}(ee.BaseCMapReaderFactory);$.DOMCMapReaderFactory=Ce;var xe=function(Le){le(Pe,Le);var we=me(Pe);function Pe(){return se(this,Pe),we.apply(this,arguments)}return de(Pe,[{key:"_fetchData",value:function(He){return Se(He,!0)}}]),Pe}(ee.BaseStandardFontDataFactory);$.DOMStandardFontDataFactory=xe;var $e=function(Le){le(Pe,Le);var we=me(Pe);function Pe(){return se(this,Pe),we.apply(this,arguments)}return de(Pe,[{key:"_createSVG",value:function(He){return document.createElementNS(_e,He)}}]),Pe}(ee.BaseSVGFactory);$.DOMSVGFactory=$e;var Ie=function(){function Le(we){var Pe=we.viewBox,ke=we.scale,He=we.rotation,We=we.offsetX,Ke=We===void 0?0:We,rt=we.offsetY,st=rt===void 0?0:rt,it=we.dontFlip,Je=it===void 0?!1:it;se(this,Le),this.viewBox=Pe,this.scale=ke,this.rotation=He,this.offsetX=Ke,this.offsetY=st;var ct=(Pe[2]+Pe[0])/2,dt=(Pe[3]+Pe[1])/2,vt,ht,bt,Rt;switch(He%=360,He<0&&(He+=360),He){case 180:vt=-1,ht=0,bt=0,Rt=1;break;case 90:vt=0,ht=1,bt=1,Rt=0;break;case 270:vt=0,ht=-1,bt=-1,Rt=0;break;case 0:vt=1,ht=0,bt=0,Rt=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}Je&&(bt=-bt,Rt=-Rt);var Tt,lt,ut,Ge;vt===0?(Tt=Math.abs(dt-Pe[1])*ke+Ke,lt=Math.abs(ct-Pe[0])*ke+st,ut=Math.abs(Pe[3]-Pe[1])*ke,Ge=Math.abs(Pe[2]-Pe[0])*ke):(Tt=Math.abs(ct-Pe[0])*ke+Ke,lt=Math.abs(dt-Pe[1])*ke+st,ut=Math.abs(Pe[2]-Pe[0])*ke,Ge=Math.abs(Pe[3]-Pe[1])*ke),this.transform=[vt*ke,ht*ke,bt*ke,Rt*ke,Tt-vt*ke*ct-bt*ke*dt,lt-ht*ke*ct-Rt*ke*dt],this.width=ut,this.height=Ge}return de(Le,[{key:"clone",value:function(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ke=Pe.scale,He=ke===void 0?this.scale:ke,We=Pe.rotation,Ke=We===void 0?this.rotation:We,rt=Pe.offsetX,st=rt===void 0?this.offsetX:rt,it=Pe.offsetY,Je=it===void 0?this.offsetY:it,ct=Pe.dontFlip,dt=ct===void 0?!1:ct;return new Le({viewBox:this.viewBox.slice(),scale:He,rotation:Ke,offsetX:st,offsetY:Je,dontFlip:dt})}},{key:"convertToViewportPoint",value:function(Pe,ke){return J.Util.applyTransform([Pe,ke],this.transform)}},{key:"convertToViewportRectangle",value:function(Pe){var ke=J.Util.applyTransform([Pe[0],Pe[1]],this.transform),He=J.Util.applyTransform([Pe[2],Pe[3]],this.transform);return[ke[0],ke[1],He[0],He[1]]}},{key:"convertToPdfPoint",value:function(Pe,ke){return J.Util.applyInverseTransform([Pe,ke],this.transform)}}]),Le}();$.PageViewport=Ie;var De=function(Le){le(Pe,Le);var we=me(Pe);function Pe(ke,He){var We;return se(this,Pe),We=we.call(this,ke,"RenderingCancelledException"),We.type=He,We}return Pe}(J.BaseException);$.RenderingCancelledException=De;var Ne={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};$.LinkTarget=Ne;function Fe(Le){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=we.url,ke=we.target,He=we.rel,We=we.enabled,Ke=We===void 0?!0:We;(0,J.assert)(Pe&&typeof Pe=="string",'addLinkAttributes: A valid "url" parameter must provided.');var rt=(0,J.removeNullCharacters)(Pe);Ke?Le.href=Le.title=rt:(Le.href="",Le.title="Disabled: ".concat(rt),Le.onclick=function(){return!1});var st="";switch(ke){case Ne.NONE:break;case Ne.SELF:st="_self";break;case Ne.BLANK:st="_blank";break;case Ne.PARENT:st="_parent";break;case Ne.TOP:st="_top";break}Le.target=st,Le.rel=typeof He=="string"?He:ye}function Oe(Le){for(var we=Le.length,Pe=0;Pe<we&&Le[Pe].trim()==="";)Pe++;return Le.substring(Pe,Pe+5).toLowerCase()==="data:"}function Te(Le){return typeof Le=="string"&&/\.pdf$/i.test(Le)}function Ae(Le){var we=Le.indexOf("#"),Pe=Le.indexOf("?"),ke=Math.min(we>0?we:Le.length,Pe>0?Pe:Le.length);return Le.substring(Le.lastIndexOf("/",ke)+1,ke)}function Me(Le){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof Le!="string")return we;if(Oe(Le))return(0,J.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),we;var Pe=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ke=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,He=Pe.exec(Le),We=ke.exec(He[1])||ke.exec(He[2])||ke.exec(He[3]);if(We&&(We=We[0],We.includes("%")))try{We=ke.exec(decodeURIComponent(We))[0]}catch(Ke){}return We||we}var je=function(){function Le(){se(this,Le),this.started=Object.create(null),this.times=[]}return de(Le,[{key:"time",value:function(Pe){Pe in this.started&&(0,J.warn)("Timer is already running for ".concat(Pe)),this.started[Pe]=Date.now()}},{key:"timeEnd",value:function(Pe){Pe in this.started||(0,J.warn)("Timer has not been started for ".concat(Pe)),this.times.push({name:Pe,start:this.started[Pe],end:Date.now()}),delete this.started[Pe]}},{key:"toString",value:function(){var Pe=[],ke=0,He=ne(this.times),We;try{for(He.s();!(We=He.n()).done;){var Ke=We.value,rt=Ke.name;rt.length>ke&&(ke=rt.length)}}catch(dt){He.e(dt)}finally{He.f()}var st=ne(this.times),it;try{for(st.s();!(it=st.n()).done;){var Je=it.value,ct=Je.end-Je.start;Pe.push("".concat(Je.name.padEnd(ke)," ").concat(ct,`ms
|
|
436
436
|
`))}}catch(dt){st.e(dt)}finally{st.f()}return Pe.join("")}}]),Le}();$.StatTimer=je;function ze(Le,we){try{var Pe=we?new URL(Le,we):new URL(Le),ke=Pe.protocol;return ke==="http:"||ke==="https:"}catch(He){return!1}}function Ve(Le){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise(function(Pe,ke){var He=document.createElement("script");He.src=Le,He.onload=function(We){we&&He.remove(),Pe(We)},He.onerror=function(){ke(new Error("Cannot load script at: ".concat(He.src)))},(document.head||document.documentElement).appendChild(He)})}function Xe(Le){console.log("Deprecated API usage: "+Le)}var Ye,at=function(){function Le(){se(this,Le)}return de(Le,null,[{key:"toDateObject",value:function(Pe){if(!Pe||!(0,J.isString)(Pe))return null;Ye||(Ye=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var ke=Ye.exec(Pe);if(!ke)return null;var He=parseInt(ke[1],10),We=parseInt(ke[2],10);We=We>=1&&We<=12?We-1:0;var Ke=parseInt(ke[3],10);Ke=Ke>=1&&Ke<=31?Ke:1;var rt=parseInt(ke[4],10);rt=rt>=0&&rt<=23?rt:0;var st=parseInt(ke[5],10);st=st>=0&&st<=59?st:0;var it=parseInt(ke[6],10);it=it>=0&&it<=59?it:0;var Je=ke[7]||"Z",ct=parseInt(ke[8],10);ct=ct>=0&&ct<=23?ct:0;var dt=parseInt(ke[9],10)||0;return dt=dt>=0&&dt<=59?dt:0,Je==="-"?(rt+=ct,st+=dt):Je==="+"&&(rt-=ct,st-=dt),new Date(Date.UTC(He,We,Ke,rt,st,it))}}]),Le}();$.PDFDateString=at;function Ue(Le,we){var Pe=we.scale,ke=Pe===void 0?1:Pe,He=we.rotation,We=He===void 0?0:He,Ke=Le.attributes.style,rt=Ke.width,st=Ke.height,it=[0,0,parseInt(rt),parseInt(st)];return new Ie({viewBox:it,scale:ke,rotation:We})}},(C,$,F)=>{C.exports=F(3)},(C,$,F)=>{C=F.nmd(C);function V(J){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(te){return typeof te}:V=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},V(J)}var K=function(J){var ee=Object.prototype,te=ee.hasOwnProperty,ne,re=typeof Symbol=="function"?Symbol:{},ae=re.iterator||"@@iterator",oe=re.asyncIterator||"@@asyncIterator",ie=re.toStringTag||"@@toStringTag";function se(Te,Ae,Me){return Object.defineProperty(Te,Ae,{value:Me,enumerable:!0,configurable:!0,writable:!0}),Te[Ae]}try{se({},"")}catch(Te){se=function(Me,je,ze){return Me[je]=ze}}function ue(Te,Ae,Me,je){var ze=Ae&&Ae.prototype instanceof ce?Ae:ce,Ve=Object.create(ze.prototype),Xe=new Ne(je||[]);return Ve._invoke=xe(Te,Me,Xe),Ve}J.wrap=ue;function de(Te,Ae,Me){try{return{type:"normal",arg:Te.call(Ae,Me)}}catch(je){return{type:"throw",arg:je}}}var le="suspendedStart",ve="suspendedYield",me="executing",he="completed",pe={};function ce(){}function fe(){}function ye(){}var _e={};se(_e,ae,function(){return this});var ge=Object.getPrototypeOf,be=ge&&ge(ge(Fe([])));be&&be!==ee&&te.call(be,ae)&&(_e=be);var Se=ye.prototype=ce.prototype=Object.create(_e);fe.prototype=ye,se(Se,"constructor",ye),se(ye,"constructor",fe),fe.displayName=se(ye,ie,"GeneratorFunction");function Ee(Te){["next","throw","return"].forEach(function(Ae){se(Te,Ae,function(Me){return this._invoke(Ae,Me)})})}J.isGeneratorFunction=function(Te){var Ae=typeof Te=="function"&&Te.constructor;return Ae?Ae===fe||(Ae.displayName||Ae.name)==="GeneratorFunction":!1},J.mark=function(Te){return Object.setPrototypeOf?Object.setPrototypeOf(Te,ye):(Te.__proto__=ye,se(Te,ie,"GeneratorFunction")),Te.prototype=Object.create(Se),Te},J.awrap=function(Te){return{__await:Te}};function Ce(Te,Ae){function Me(Ve,Xe,Ye,at){var Ue=de(Te[Ve],Te,Xe);if(Ue.type==="throw")at(Ue.arg);else{var Le=Ue.arg,we=Le.value;return we&&V(we)==="object"&&te.call(we,"__await")?Ae.resolve(we.__await).then(function(Pe){Me("next",Pe,Ye,at)},function(Pe){Me("throw",Pe,Ye,at)}):Ae.resolve(we).then(function(Pe){Le.value=Pe,Ye(Le)},function(Pe){return Me("throw",Pe,Ye,at)})}}var je;function ze(Ve,Xe){function Ye(){return new Ae(function(at,Ue){Me(Ve,Xe,at,Ue)})}return je=je?je.then(Ye,Ye):Ye()}this._invoke=ze}Ee(Ce.prototype),se(Ce.prototype,oe,function(){return this}),J.AsyncIterator=Ce,J.async=function(Te,Ae,Me,je,ze){ze===void 0&&(ze=Promise);var Ve=new Ce(ue(Te,Ae,Me,je),ze);return J.isGeneratorFunction(Ae)?Ve:Ve.next().then(function(Xe){return Xe.done?Xe.value:Ve.next()})};function xe(Te,Ae,Me){var je=le;return function(Ve,Xe){if(je===me)throw new Error("Generator is already running");if(je===he){if(Ve==="throw")throw Xe;return Oe()}for(Me.method=Ve,Me.arg=Xe;;){var Ye=Me.delegate;if(Ye){var at=$e(Ye,Me);if(at){if(at===pe)continue;return at}}if(Me.method==="next")Me.sent=Me._sent=Me.arg;else if(Me.method==="throw"){if(je===le)throw je=he,Me.arg;Me.dispatchException(Me.arg)}else Me.method==="return"&&Me.abrupt("return",Me.arg);je=me;var Ue=de(Te,Ae,Me);if(Ue.type==="normal"){if(je=Me.done?he:ve,Ue.arg===pe)continue;return{value:Ue.arg,done:Me.done}}else Ue.type==="throw"&&(je=he,Me.method="throw",Me.arg=Ue.arg)}}}function $e(Te,Ae){var Me=Te.iterator[Ae.method];if(Me===ne){if(Ae.delegate=null,Ae.method==="throw"){if(Te.iterator.return&&(Ae.method="return",Ae.arg=ne,$e(Te,Ae),Ae.method==="throw"))return pe;Ae.method="throw",Ae.arg=new TypeError("The iterator does not provide a 'throw' method")}return pe}var je=de(Me,Te.iterator,Ae.arg);if(je.type==="throw")return Ae.method="throw",Ae.arg=je.arg,Ae.delegate=null,pe;var ze=je.arg;if(!ze)return Ae.method="throw",Ae.arg=new TypeError("iterator result is not an object"),Ae.delegate=null,pe;if(ze.done)Ae[Te.resultName]=ze.value,Ae.next=Te.nextLoc,Ae.method!=="return"&&(Ae.method="next",Ae.arg=ne);else return ze;return Ae.delegate=null,pe}Ee(Se),se(Se,ie,"Generator"),se(Se,ae,function(){return this}),se(Se,"toString",function(){return"[object Generator]"});function Ie(Te){var Ae={tryLoc:Te[0]};1 in Te&&(Ae.catchLoc=Te[1]),2 in Te&&(Ae.finallyLoc=Te[2],Ae.afterLoc=Te[3]),this.tryEntries.push(Ae)}function De(Te){var Ae=Te.completion||{};Ae.type="normal",delete Ae.arg,Te.completion=Ae}function Ne(Te){this.tryEntries=[{tryLoc:"root"}],Te.forEach(Ie,this),this.reset(!0)}J.keys=function(Te){var Ae=[];for(var Me in Te)Ae.push(Me);return Ae.reverse(),function je(){for(;Ae.length;){var ze=Ae.pop();if(ze in Te)return je.value=ze,je.done=!1,je}return je.done=!0,je}};function Fe(Te){if(Te){var Ae=Te[ae];if(Ae)return Ae.call(Te);if(typeof Te.next=="function")return Te;if(!isNaN(Te.length)){var Me=-1,je=function ze(){for(;++Me<Te.length;)if(te.call(Te,Me))return ze.value=Te[Me],ze.done=!1,ze;return ze.value=ne,ze.done=!0,ze};return je.next=je}}return{next:Oe}}J.values=Fe;function Oe(){return{value:ne,done:!0}}return Ne.prototype={constructor:Ne,reset:function(Ae){if(this.prev=0,this.next=0,this.sent=this._sent=ne,this.done=!1,this.delegate=null,this.method="next",this.arg=ne,this.tryEntries.forEach(De),!Ae)for(var Me in this)Me.charAt(0)==="t"&&te.call(this,Me)&&!isNaN(+Me.slice(1))&&(this[Me]=ne)},stop:function(){this.done=!0;var Ae=this.tryEntries[0],Me=Ae.completion;if(Me.type==="throw")throw Me.arg;return this.rval},dispatchException:function(Ae){if(this.done)throw Ae;var Me=this;function je(Ue,Le){return Xe.type="throw",Xe.arg=Ae,Me.next=Ue,Le&&(Me.method="next",Me.arg=ne),!!Le}for(var ze=this.tryEntries.length-1;ze>=0;--ze){var Ve=this.tryEntries[ze],Xe=Ve.completion;if(Ve.tryLoc==="root")return je("end");if(Ve.tryLoc<=this.prev){var Ye=te.call(Ve,"catchLoc"),at=te.call(Ve,"finallyLoc");if(Ye&&at){if(this.prev<Ve.catchLoc)return je(Ve.catchLoc,!0);if(this.prev<Ve.finallyLoc)return je(Ve.finallyLoc)}else if(Ye){if(this.prev<Ve.catchLoc)return je(Ve.catchLoc,!0)}else if(at){if(this.prev<Ve.finallyLoc)return je(Ve.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Ae,Me){for(var je=this.tryEntries.length-1;je>=0;--je){var ze=this.tryEntries[je];if(ze.tryLoc<=this.prev&&te.call(ze,"finallyLoc")&&this.prev<ze.finallyLoc){var Ve=ze;break}}Ve&&(Ae==="break"||Ae==="continue")&&Ve.tryLoc<=Me&&Me<=Ve.finallyLoc&&(Ve=null);var Xe=Ve?Ve.completion:{};return Xe.type=Ae,Xe.arg=Me,Ve?(this.method="next",this.next=Ve.finallyLoc,pe):this.complete(Xe)},complete:function(Ae,Me){if(Ae.type==="throw")throw Ae.arg;return Ae.type==="break"||Ae.type==="continue"?this.next=Ae.arg:Ae.type==="return"?(this.rval=this.arg=Ae.arg,this.method="return",this.next="end"):Ae.type==="normal"&&Me&&(this.next=Me),pe},finish:function(Ae){for(var Me=this.tryEntries.length-1;Me>=0;--Me){var je=this.tryEntries[Me];if(je.finallyLoc===Ae)return this.complete(je.completion,je.afterLoc),De(je),pe}},catch:function(Ae){for(var Me=this.tryEntries.length-1;Me>=0;--Me){var je=this.tryEntries[Me];if(je.tryLoc===Ae){var ze=je.completion;if(ze.type==="throw"){var Ve=ze.arg;De(je)}return Ve}}throw new Error("illegal catch attempt")},delegateYield:function(Ae,Me,je){return this.delegate={iterator:Fe(Ae),resultName:Me,nextLoc:je},this.method==="next"&&(this.arg=ne),pe}},J}(V(C)==="object"?C.exports:{});try{regeneratorRuntime=K}catch(J){(typeof globalThis=="undefined"?"undefined":V(globalThis))==="object"?globalThis.regeneratorRuntime=K:Function("r","regeneratorRuntime = r")(K)}},(C,$,F)=>{Object.defineProperty($,"__esModule",{value:!0}),$.VerbosityLevel=$.Util=$.UnknownErrorException=$.UnexpectedResponseException=$.UNSUPPORTED_FEATURES=$.TextRenderingMode=$.StreamType=$.RenderingIntentFlag=$.PermissionFlag=$.PasswordResponses=$.PasswordException=$.PageActionEventType=$.OPS=$.MissingPDFException=$.IsLittleEndianCached=$.IsEvalSupportedCached=$.InvalidPDFException=$.ImageKind=$.IDENTITY_MATRIX=$.FormatError=$.FontType=$.FONT_IDENTITY_MATRIX=$.DocumentActionEventType=$.CMapCompressionType=$.BaseException=$.AnnotationType=$.AnnotationStateModelType=$.AnnotationReviewState=$.AnnotationReplyType=$.AnnotationMode=$.AnnotationMarkedState=$.AnnotationFlag=$.AnnotationFieldFlag=$.AnnotationBorderStyleType=$.AnnotationActionEventType=$.AbortException=void 0,$.arrayByteLength=ft,$.arraysToBytes=yt,$.assert=it,$.bytesToString=qe,$.createObjectURL=gn,$.createPromiseCapability=sn,$.createValidAbsoluteUrl=dt,$.escapeString=Gt,$.getModificationDate=dn,$.getVerbosityLevel=We,$.info=Ke,$.isArrayBuffer=Wt,$.isArrayEqual=Jt,$.isAscii=zt,$.isBool=qt,$.isNum=ln,$.isSameOrigin=Je,$.isString=Cn,$.objectFromMap=Ft,$.objectSize=Mt,$.removeNullCharacters=tt,$.setVerbosityLevel=He,$.shadow=vt,$.string32=$t,$.stringToBytes=ot,$.stringToPDFString=Ht,$.stringToUTF16BEString=Dt,$.stringToUTF8String=Vt,$.unreachable=st,$.utf8StringToString=Kt,$.warn=rt,F(5);function V(mt,Ot){for(var pt=0;pt<Ot.length;pt++){var _t=Ot[pt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(mt,_t.key,_t)}}function K(mt,Ot,pt){return Ot&&V(mt.prototype,Ot),pt&&V(mt,pt),mt}function J(mt){return ne(mt)||te(mt)||ue(mt)||ee()}function ee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
437
437
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function te(mt){if(typeof Symbol!="undefined"&&mt[Symbol.iterator]!=null||mt["@@iterator"]!=null)return Array.from(mt)}function ne(mt){if(Array.isArray(mt))return de(mt)}function re(mt,Ot){return ie(mt)||oe(mt,Ot)||ue(mt,Ot)||ae()}function ae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -466,4 +466,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
466
466
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ve=!0,Xe=!1,Ye;return{s:function(){Me=Me.call(Te)},n:function(){var Ue=Me.next();return Ve=Ue.done,Ue},e:function(Ue){Xe=!0,Ye=Ue},f:function(){try{!Ve&&Me.return!=null&&Me.return()}finally{if(Xe)throw Ye}}}}function me(Te,Ae){if(Te){if(typeof Te=="string")return he(Te,Ae);var Me=Object.prototype.toString.call(Te).slice(8,-1);if(Me==="Object"&&Te.constructor&&(Me=Te.constructor.name),Me==="Map"||Me==="Set")return Array.from(Te);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return he(Te,Ae)}}function he(Te,Ae){(Ae==null||Ae>Te.length)&&(Ae=Te.length);for(var Me=0,je=new Array(Ae);Me<Ae;Me++)je[Me]=Te[Me];return je}function pe(Te,Ae){if(!(Te instanceof Ae))throw new TypeError("Cannot call a class as a function")}function ce(Te,Ae){for(var Me=0;Me<Ae.length;Me++){var je=Ae[Me];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(Te,je.key,je)}}function fe(Te,Ae,Me){return Ae&&ce(Te.prototype,Ae),Me&&ce(Te,Me),Te}var ye=require$$5,_e=require$$5,ge=require$$5,be=require$$5,Se=/^file:\/\/\/[a-zA-Z]:\//;function Ee(Te){var Ae=be.parse(Te);return Ae.protocol==="file:"||Ae.host?Ae:/^[a-z]:[/\\]/i.test(Te)?be.parse("file:///".concat(Te)):(Ae.host||(Ae.protocol="file:"),Ae)}var Ce=function(){function Te(Ae){pe(this,Te),this.source=Ae,this.url=Ee(Ae.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&Ae.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return fe(Te,[{key:"_progressiveDataLength",get:function(){var Me,je;return(Me=(je=this._fullRequestReader)===null||je===void 0?void 0:je._loaded)!==null&&Me!==void 0?Me:0}},{key:"getFullReader",value:function(){return(0,J.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Fe(this):new De(this),this._fullRequestReader}},{key:"getRangeReader",value:function(Me,je){if(je<=this._progressiveDataLength)return null;var ze=this.isFsUrl?new Oe(this,Me,je):new Ne(this,Me,je);return this._rangeRequestReaders.push(ze),ze}},{key:"cancelAllRequests",value:function(Me){this._fullRequestReader&&this._fullRequestReader.cancel(Me);var je=ve(this._rangeRequestReaders.slice(0)),ze;try{for(je.s();!(ze=je.n()).done;){var Ve=ze.value;Ve.cancel(Me)}}catch(Xe){je.e(Xe)}finally{je.f()}}}]),Te}();$.PDFNodeStream=Ce;var xe=function(){function Te(Ae){pe(this,Te),this._url=Ae.url,this._done=!1,this._storedError=null,this.onProgress=null;var Me=Ae.source;this._contentLength=Me.length,this._loaded=0,this._filename=null,this._disableRange=Me.disableRange||!1,this._rangeChunkSize=Me.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!Me.disableStream,this._isRangeSupported=!Me.disableRange,this._readableStream=null,this._readCapability=(0,J.createPromiseCapability)(),this._headersCapability=(0,J.createPromiseCapability)()}return fe(Te,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var Ae=le(K.default.mark(function je(){var ze,Ve;return K.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.next=2,this._readCapability.promise;case 2:if(!this._done){Ye.next=4;break}return Ye.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){Ye.next=6;break}throw this._storedError;case 6:if(ze=this._readableStream.read(),ze!==null){Ye.next=10;break}return this._readCapability=(0,J.createPromiseCapability)(),Ye.abrupt("return",this.read());case 10:return this._loaded+=ze.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),Ve=new Uint8Array(ze).buffer,Ye.abrupt("return",{value:Ve,done:!1});case 14:case"end":return Ye.stop()}},je,this)}));function Me(){return Ae.apply(this,arguments)}return Me}()},{key:"cancel",value:function(Me){if(!this._readableStream){this._error(Me);return}this._readableStream.destroy(Me)}},{key:"_error",value:function(Me){this._storedError=Me,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(Me){var je=this;this._readableStream=Me,Me.on("readable",function(){je._readCapability.resolve()}),Me.on("end",function(){Me.destroy(),je._done=!0,je._readCapability.resolve()}),Me.on("error",function(ze){je._error(ze)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new J.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),Te}(),$e=function(){function Te(Ae){pe(this,Te),this._url=Ae.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,J.createPromiseCapability)();var Me=Ae.source;this._isStreamingSupported=!Me.disableStream}return fe(Te,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var Ae=le(K.default.mark(function je(){var ze,Ve;return K.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.next=2,this._readCapability.promise;case 2:if(!this._done){Ye.next=4;break}return Ye.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){Ye.next=6;break}throw this._storedError;case 6:if(ze=this._readableStream.read(),ze!==null){Ye.next=10;break}return this._readCapability=(0,J.createPromiseCapability)(),Ye.abrupt("return",this.read());case 10:return this._loaded+=ze.length,this.onProgress&&this.onProgress({loaded:this._loaded}),Ve=new Uint8Array(ze).buffer,Ye.abrupt("return",{value:Ve,done:!1});case 14:case"end":return Ye.stop()}},je,this)}));function Me(){return Ae.apply(this,arguments)}return Me}()},{key:"cancel",value:function(Me){if(!this._readableStream){this._error(Me);return}this._readableStream.destroy(Me)}},{key:"_error",value:function(Me){this._storedError=Me,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(Me){var je=this;this._readableStream=Me,Me.on("readable",function(){je._readCapability.resolve()}),Me.on("end",function(){Me.destroy(),je._done=!0,je._readCapability.resolve()}),Me.on("error",function(ze){je._error(ze)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]),Te}();function Ie(Te,Ae){return{protocol:Te.protocol,auth:Te.auth,host:Te.hostname,port:Te.port,path:Te.path,method:"GET",headers:Ae}}var De=function(Te){ne(Me,Te);var Ae=ae(Me);function Me(je){var ze;pe(this,Me),ze=Ae.call(this,je);var Ve=function(Ye){if(Ye.statusCode===404){var at=new J.MissingPDFException('Missing PDF "'.concat(ze._url,'".'));ze._storedError=at,ze._headersCapability.reject(at);return}ze._headersCapability.resolve(),ze._setReadableStream(Ye);var Ue=function(He){return ze._readableStream.headers[He.toLowerCase()]},Le=(0,ee.validateRangeRequestCapabilities)({getResponseHeader:Ue,isHttp:je.isHttp,rangeChunkSize:ze._rangeChunkSize,disableRange:ze._disableRange}),we=Le.allowRangeRequests,Pe=Le.suggestedLength;ze._isRangeSupported=we,ze._contentLength=Pe||ze._contentLength,ze._filename=(0,ee.extractFilenameFromHeader)(Ue)};return ze._request=null,ze._url.protocol==="http:"?ze._request=_e.request(Ie(ze._url,je.httpHeaders),Ve):ze._request=ge.request(Ie(ze._url,je.httpHeaders),Ve),ze._request.on("error",function(Xe){ze._storedError=Xe,ze._headersCapability.reject(Xe)}),ze._request.end(),ze}return Me}(xe),Ne=function(Te){ne(Me,Te);var Ae=ae(Me);function Me(je,ze,Ve){var Xe;pe(this,Me),Xe=Ae.call(this,je),Xe._httpHeaders={};for(var Ye in je.httpHeaders){var at=je.httpHeaders[Ye];typeof at!="undefined"&&(Xe._httpHeaders[Ye]=at)}Xe._httpHeaders.Range="bytes=".concat(ze,"-").concat(Ve-1);var Ue=function(we){if(we.statusCode===404){var Pe=new J.MissingPDFException('Missing PDF "'.concat(Xe._url,'".'));Xe._storedError=Pe;return}Xe._setReadableStream(we)};return Xe._request=null,Xe._url.protocol==="http:"?Xe._request=_e.request(Ie(Xe._url,Xe._httpHeaders),Ue):Xe._request=ge.request(Ie(Xe._url,Xe._httpHeaders),Ue),Xe._request.on("error",function(Le){Xe._storedError=Le}),Xe._request.end(),Xe}return Me}($e),Fe=function(Te){ne(Me,Te);var Ae=ae(Me);function Me(je){var ze;pe(this,Me),ze=Ae.call(this,je);var Ve=decodeURIComponent(ze._url.path);return Se.test(ze._url.href)&&(Ve=Ve.replace(/^\//,"")),ye.lstat(Ve,function(Xe,Ye){if(Xe){Xe.code==="ENOENT"&&(Xe=new J.MissingPDFException('Missing PDF "'.concat(Ve,'".'))),ze._storedError=Xe,ze._headersCapability.reject(Xe);return}ze._contentLength=Ye.size,ze._setReadableStream(ye.createReadStream(Ve)),ze._headersCapability.resolve()}),ze}return Me}(xe),Oe=function(Te){ne(Me,Te);var Ae=ae(Me);function Me(je,ze,Ve){var Xe;pe(this,Me),Xe=Ae.call(this,je);var Ye=decodeURIComponent(Xe._url.path);return Se.test(Xe._url.href)&&(Ye=Ye.replace(/^\//,"")),Xe._setReadableStream(ye.createReadStream(Ye,{start:ze,end:Ve-1})),Xe}return Me}($e)},(C,$,F)=>{Object.defineProperty($,"__esModule",{value:!0}),$.createResponseStatusError=ne,$.extractFilenameFromHeader=te,$.validateRangeRequestCapabilities=ee,$.validateResponseStatus=re;var V=F(4),K=F(155),J=F(1);function ee(ae){var oe=ae.getResponseHeader,ie=ae.isHttp,se=ae.rangeChunkSize,ue=ae.disableRange;(0,V.assert)(se>0,"Range chunk size must be larger than zero");var de={allowRangeRequests:!1,suggestedLength:void 0},le=parseInt(oe("Content-Length"),10);if(!Number.isInteger(le)||(de.suggestedLength=le,le<=2*se)||ue||!ie||oe("Accept-Ranges")!=="bytes")return de;var ve=oe("Content-Encoding")||"identity";return ve!=="identity"||(de.allowRangeRequests=!0),de}function te(ae){var oe=ae("Content-Disposition");if(oe){var ie=(0,K.getFilenameFromContentDispositionHeader)(oe);if(ie.includes("%"))try{ie=decodeURIComponent(ie)}catch(se){}if((0,J.isPdfFile)(ie))return ie}return null}function ne(ae,oe){return ae===404||ae===0&&oe.startsWith("file:")?new V.MissingPDFException('Missing PDF "'+oe+'".'):new V.UnexpectedResponseException("Unexpected server response (".concat(ae,') while retrieving PDF "').concat(oe,'".'),ae)}function re(ae){return ae===200||ae===206}},(C,$,F)=>{Object.defineProperty($,"__esModule",{value:!0}),$.getFilenameFromContentDispositionHeader=ae;var V=F(4);function K(oe,ie){return re(oe)||ne(oe,ie)||ee(oe,ie)||J()}function J(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
467
467
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(oe,ie){if(oe){if(typeof oe=="string")return te(oe,ie);var se=Object.prototype.toString.call(oe).slice(8,-1);if(se==="Object"&&oe.constructor&&(se=oe.constructor.name),se==="Map"||se==="Set")return Array.from(oe);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return te(oe,ie)}}function te(oe,ie){(ie==null||ie>oe.length)&&(ie=oe.length);for(var se=0,ue=new Array(ie);se<ie;se++)ue[se]=oe[se];return ue}function ne(oe,ie){var se=oe==null?null:typeof Symbol!="undefined"&&oe[Symbol.iterator]||oe["@@iterator"];if(se!=null){var ue=[],de=!0,le=!1,ve,me;try{for(se=se.call(oe);!(de=(ve=se.next()).done)&&(ue.push(ve.value),!(ie&&ue.length===ie));de=!0);}catch(he){le=!0,me=he}finally{try{!de&&se.return!=null&&se.return()}finally{if(le)throw me}}return ue}}function re(oe){if(Array.isArray(oe))return oe}function ae(oe){var ie=!0,se=ve("filename\\*","i").exec(oe);if(se){se=se[1];var ue=ce(se);return ue=unescape(ue),ue=fe(ue),ue=ye(ue),he(ue)}if(se=pe(oe),se){var de=ye(se);return he(de)}if(se=ve("filename","i").exec(oe),se){se=se[1];var le=ce(se);return le=ye(le),he(le)}function ve(_e,ge){return new RegExp("(?:^|;)\\s*"+_e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',ge)}function me(_e,ge){if(_e){if(!/^[\x00-\xFF]+$/.test(ge))return ge;try{var be=new TextDecoder(_e,{fatal:!0}),Se=(0,V.stringToBytes)(ge);ge=be.decode(Se),ie=!1}catch(Ee){if(/^utf-?8$/i.test(_e))try{ge=decodeURIComponent(escape(ge)),ie=!1}catch(Ce){}}}return ge}function he(_e){return ie&&/[\x80-\xff]/.test(_e)&&(_e=me("utf-8",_e),ie&&(_e=me("iso-8859-1",_e))),_e}function pe(_e){for(var ge=[],be,Se=ve("filename\\*((?!0\\d)\\d+)(\\*?)","ig");(be=Se.exec(_e))!==null;){var Ee=be,Ce=K(Ee,4),xe=Ce[1],$e=Ce[2],Ie=Ce[3];if(xe=parseInt(xe,10),xe in ge){if(xe===0)break;continue}ge[xe]=[$e,Ie]}for(var De=[],Ne=0;Ne<ge.length&&Ne in ge;++Ne){var Fe=K(ge[Ne],2),Oe=Fe[0],Te=Fe[1];Te=ce(Te),Oe&&(Te=unescape(Te),Ne===0&&(Te=fe(Te))),De.push(Te)}return De.join("")}function ce(_e){if(_e.startsWith('"')){for(var ge=_e.slice(1).split('\\"'),be=0;be<ge.length;++be){var Se=ge[be].indexOf('"');Se!==-1&&(ge[be]=ge[be].slice(0,Se),ge.length=be+1),ge[be]=ge[be].replace(/\\(.)/g,"$1")}_e=ge.join('"')}return _e}function fe(_e){var ge=_e.indexOf("'");if(ge===-1)return _e;var be=_e.slice(0,ge),Se=_e.slice(ge+1),Ee=Se.replace(/^[^']*'/,"");return me(be,Ee)}function ye(_e){return!_e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(_e)?_e:_e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(ge,be,Se,Ee){if(Se==="q"||Se==="Q")return Ee=Ee.replace(/_/g," "),Ee=Ee.replace(/=([0-9a-fA-F]{2})/g,function(Ce,xe){return String.fromCharCode(parseInt(xe,16))}),me(be,Ee);try{Ee=atob(Ee)}catch(Ce){}return me(be,Ee)})}return""}},(C,$,F)=>{Object.defineProperty($,"__esModule",{value:!0}),$.PDFNetworkStream=void 0;var V=ee(F(2)),K=F(4),J=F(154);function ee(fe){return fe&&fe.__esModule?fe:{default:fe}}function te(fe,ye,_e,ge,be,Se,Ee){try{var Ce=fe[Se](Ee),xe=Ce.value}catch($e){_e($e);return}Ce.done?ye(xe):Promise.resolve(xe).then(ge,be)}function ne(fe){return function(){var ye=this,_e=arguments;return new Promise(function(ge,be){var Se=fe.apply(ye,_e);function Ee(xe){te(Se,ge,be,Ee,Ce,"next",xe)}function Ce(xe){te(Se,ge,be,Ee,Ce,"throw",xe)}Ee(void 0)})}}function re(fe,ye){var _e=typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(!_e){if(Array.isArray(fe)||(_e=ae(fe))||ye&&fe&&typeof fe.length=="number"){_e&&(fe=_e);var ge=0,be=function(){};return{s:be,n:function(){return ge>=fe.length?{done:!0}:{done:!1,value:fe[ge++]}},e:function($e){throw $e},f:be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
468
468
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Se=!0,Ee=!1,Ce;return{s:function(){_e=_e.call(fe)},n:function(){var $e=_e.next();return Se=$e.done,$e},e:function($e){Ee=!0,Ce=$e},f:function(){try{!Se&&_e.return!=null&&_e.return()}finally{if(Ee)throw Ce}}}}function ae(fe,ye){if(fe){if(typeof fe=="string")return oe(fe,ye);var _e=Object.prototype.toString.call(fe).slice(8,-1);if(_e==="Object"&&fe.constructor&&(_e=fe.constructor.name),_e==="Map"||_e==="Set")return Array.from(fe);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return oe(fe,ye)}}function oe(fe,ye){(ye==null||ye>fe.length)&&(ye=fe.length);for(var _e=0,ge=new Array(ye);_e<ye;_e++)ge[_e]=fe[_e];return ge}function ie(fe,ye){if(!(fe instanceof ye))throw new TypeError("Cannot call a class as a function")}function se(fe,ye){for(var _e=0;_e<ye.length;_e++){var ge=ye[_e];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(fe,ge.key,ge)}}function ue(fe,ye,_e){return ye&&se(fe.prototype,ye),_e&&se(fe,_e),fe}var de=200,le=206;function ve(fe){var ye=fe.response;if(typeof ye!="string")return ye;var _e=(0,K.stringToBytes)(ye);return _e.buffer}var me=function(){function fe(ye){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ie(this,fe),this.url=ye,this.isHttp=/^https?:/i.test(ye),this.httpHeaders=this.isHttp&&_e.httpHeaders||Object.create(null),this.withCredentials=_e.withCredentials||!1,this.getXhr=_e.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return ue(fe,[{key:"requestRange",value:function(_e,ge,be){var Se={begin:_e,end:ge};for(var Ee in be)Se[Ee]=be[Ee];return this.request(Se)}},{key:"requestFull",value:function(_e){return this.request(_e)}},{key:"request",value:function(_e){var ge=this.getXhr(),be=this.currXhrId++,Se=this.pendingRequests[be]={xhr:ge};ge.open("GET",this.url),ge.withCredentials=this.withCredentials;for(var Ee in this.httpHeaders){var Ce=this.httpHeaders[Ee];typeof Ce!="undefined"&&ge.setRequestHeader(Ee,Ce)}return this.isHttp&&"begin"in _e&&"end"in _e?(ge.setRequestHeader("Range","bytes=".concat(_e.begin,"-").concat(_e.end-1)),Se.expectedStatus=le):Se.expectedStatus=de,ge.responseType="arraybuffer",_e.onError&&(ge.onerror=function(xe){_e.onError(ge.status)}),ge.onreadystatechange=this.onStateChange.bind(this,be),ge.onprogress=this.onProgress.bind(this,be),Se.onHeadersReceived=_e.onHeadersReceived,Se.onDone=_e.onDone,Se.onError=_e.onError,Se.onProgress=_e.onProgress,ge.send(null),be}},{key:"onProgress",value:function(_e,ge){var be,Se=this.pendingRequests[_e];Se&&((be=Se.onProgress)===null||be===void 0||be.call(Se,ge))}},{key:"onStateChange",value:function(_e,ge){var be=this.pendingRequests[_e];if(be){var Se=be.xhr;if(Se.readyState>=2&&be.onHeadersReceived&&(be.onHeadersReceived(),delete be.onHeadersReceived),Se.readyState===4&&_e in this.pendingRequests){if(delete this.pendingRequests[_e],Se.status===0&&this.isHttp){var Ee;(Ee=be.onError)===null||Ee===void 0||Ee.call(be,Se.status);return}var Ce=Se.status||de,xe=Ce===de&&be.expectedStatus===le;if(!xe&&Ce!==be.expectedStatus){var $e;($e=be.onError)===null||$e===void 0||$e.call(be,Se.status);return}var Ie=ve(Se);if(Ce===le){var De=Se.getResponseHeader("Content-Range"),Ne=/bytes (\d+)-(\d+)\/(\d+)/.exec(De);be.onDone({begin:parseInt(Ne[1],10),chunk:Ie})}else if(Ie)be.onDone({begin:0,chunk:Ie});else{var Fe;(Fe=be.onError)===null||Fe===void 0||Fe.call(be,Se.status)}}}}},{key:"getRequestXhr",value:function(_e){return this.pendingRequests[_e].xhr}},{key:"isPendingRequest",value:function(_e){return _e in this.pendingRequests}},{key:"abortRequest",value:function(_e){var ge=this.pendingRequests[_e].xhr;delete this.pendingRequests[_e],ge.abort()}}]),fe}(),he=function(){function fe(ye){ie(this,fe),this._source=ye,this._manager=new me(ye.url,{httpHeaders:ye.httpHeaders,withCredentials:ye.withCredentials}),this._rangeChunkSize=ye.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return ue(fe,[{key:"_onRangeRequestReaderClosed",value:function(_e){var ge=this._rangeRequestReaders.indexOf(_e);ge>=0&&this._rangeRequestReaders.splice(ge,1)}},{key:"getFullReader",value:function(){return(0,K.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new pe(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(_e,ge){var be=new ce(this._manager,_e,ge);return be.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(be),be}},{key:"cancelAllRequests",value:function(_e){var ge;(ge=this._fullRequestReader)===null||ge===void 0||ge.cancel(_e);var be=re(this._rangeRequestReaders.slice(0)),Se;try{for(be.s();!(Se=be.n()).done;){var Ee=Se.value;Ee.cancel(_e)}}catch(Ce){be.e(Ce)}finally{be.f()}}}]),fe}();$.PDFNetworkStream=he;var pe=function(){function fe(ye,_e){ie(this,fe),this._manager=ye;var ge={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=_e.url,this._fullRequestId=ye.requestFull(ge),this._headersReceivedCapability=(0,K.createPromiseCapability)(),this._disableRange=_e.disableRange||!1,this._contentLength=_e.length,this._rangeChunkSize=_e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}return ue(fe,[{key:"_onHeadersReceived",value:function(){var _e=this._fullRequestId,ge=this._manager.getRequestXhr(_e),be=function($e){return ge.getResponseHeader($e)},Se=(0,J.validateRangeRequestCapabilities)({getResponseHeader:be,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),Ee=Se.allowRangeRequests,Ce=Se.suggestedLength;Ee&&(this._isRangeSupported=!0),this._contentLength=Ce||this._contentLength,this._filename=(0,J.extractFilenameFromHeader)(be),this._isRangeSupported&&this._manager.abortRequest(_e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(_e){if(_e)if(this._requests.length>0){var ge=this._requests.shift();ge.resolve({value:_e.chunk,done:!1})}else this._cachedChunks.push(_e.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){var be=re(this._requests),Se;try{for(be.s();!(Se=be.n()).done;){var Ee=Se.value;Ee.resolve({value:void 0,done:!0})}}catch(Ce){be.e(Ce)}finally{be.f()}this._requests.length=0}}},{key:"_onError",value:function(_e){this._storedError=(0,J.createResponseStatusError)(_e,this._url),this._headersReceivedCapability.reject(this._storedError);var ge=re(this._requests),be;try{for(ge.s();!(be=ge.n()).done;){var Se=be.value;Se.reject(this._storedError)}}catch(Ee){ge.e(Ee)}finally{ge.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(_e){var ge;(ge=this.onProgress)===null||ge===void 0||ge.call(this,{loaded:_e.loaded,total:_e.lengthComputable?_e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:function(){var ye=ne(V.default.mark(function ge(){var be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!this._storedError){Ce.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){Ce.next=5;break}return be=this._cachedChunks.shift(),Ce.abrupt("return",{value:be,done:!1});case 5:if(!this._done){Ce.next=7;break}return Ce.abrupt("return",{value:void 0,done:!0});case 7:return Se=(0,K.createPromiseCapability)(),this._requests.push(Se),Ce.abrupt("return",Se.promise);case 10:case"end":return Ce.stop()}},ge,this)}));function _e(){return ye.apply(this,arguments)}return _e}()},{key:"cancel",value:function(_e){this._done=!0,this._headersReceivedCapability.reject(_e);var ge=re(this._requests),be;try{for(ge.s();!(be=ge.n()).done;){var Se=be.value;Se.resolve({value:void 0,done:!0})}}catch(Ee){ge.e(Ee)}finally{ge.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),fe}(),ce=function(){function fe(ye,_e,ge){ie(this,fe),this._manager=ye;var be={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=ye.url,this._requestId=ye.requestRange(_e,ge,be),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return ue(fe,[{key:"_close",value:function(){var _e;(_e=this.onClosed)===null||_e===void 0||_e.call(this,this)}},{key:"_onDone",value:function(_e){var ge=_e.chunk;if(this._requests.length>0){var be=this._requests.shift();be.resolve({value:ge,done:!1})}else this._queuedChunk=ge;this._done=!0;var Se=re(this._requests),Ee;try{for(Se.s();!(Ee=Se.n()).done;){var Ce=Ee.value;Ce.resolve({value:void 0,done:!0})}}catch(xe){Se.e(xe)}finally{Se.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(_e){this._storedError=(0,J.createResponseStatusError)(_e,this._url);var ge=re(this._requests),be;try{for(ge.s();!(be=ge.n()).done;){var Se=be.value;Se.reject(this._storedError)}}catch(Ee){ge.e(Ee)}finally{ge.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(_e){if(!this.isStreamingSupported){var ge;(ge=this.onProgress)===null||ge===void 0||ge.call(this,{loaded:_e.loaded})}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var ye=ne(V.default.mark(function ge(){var be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!this._storedError){Ce.next=2;break}throw this._storedError;case 2:if(this._queuedChunk===null){Ce.next=6;break}return be=this._queuedChunk,this._queuedChunk=null,Ce.abrupt("return",{value:be,done:!1});case 6:if(!this._done){Ce.next=8;break}return Ce.abrupt("return",{value:void 0,done:!0});case 8:return Se=(0,K.createPromiseCapability)(),this._requests.push(Se),Ce.abrupt("return",Se.promise);case 11:case"end":return Ce.stop()}},ge,this)}));function _e(){return ye.apply(this,arguments)}return _e}()},{key:"cancel",value:function(_e){this._done=!0;var ge=re(this._requests),be;try{for(ge.s();!(be=ge.n()).done;){var Se=be.value;Se.resolve({value:void 0,done:!0})}}catch(Ee){ge.e(Ee)}finally{ge.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),fe}()},(C,$,F)=>{Object.defineProperty($,"__esModule",{value:!0}),$.PDFFetchStream=void 0;var V=ee(F(2)),K=F(4),J=F(154);function ee(pe){return pe&&pe.__esModule?pe:{default:pe}}function te(pe,ce,fe,ye,_e,ge,be){try{var Se=pe[ge](be),Ee=Se.value}catch(Ce){fe(Ce);return}Se.done?ce(Ee):Promise.resolve(Ee).then(ye,_e)}function ne(pe){return function(){var ce=this,fe=arguments;return new Promise(function(ye,_e){var ge=pe.apply(ce,fe);function be(Ee){te(ge,ye,_e,be,Se,"next",Ee)}function Se(Ee){te(ge,ye,_e,be,Se,"throw",Ee)}be(void 0)})}}function re(pe,ce){var fe=typeof Symbol!="undefined"&&pe[Symbol.iterator]||pe["@@iterator"];if(!fe){if(Array.isArray(pe)||(fe=ae(pe))||ce&&pe&&typeof pe.length=="number"){fe&&(pe=fe);var ye=0,_e=function(){};return{s:_e,n:function(){return ye>=pe.length?{done:!0}:{done:!1,value:pe[ye++]}},e:function(Ce){throw Ce},f:_e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
469
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge=!0,be=!1,Se;return{s:function(){fe=fe.call(pe)},n:function(){var Ce=fe.next();return ge=Ce.done,Ce},e:function(Ce){be=!0,Se=Ce},f:function(){try{!ge&&fe.return!=null&&fe.return()}finally{if(be)throw Se}}}}function ae(pe,ce){if(pe){if(typeof pe=="string")return oe(pe,ce);var fe=Object.prototype.toString.call(pe).slice(8,-1);if(fe==="Object"&&pe.constructor&&(fe=pe.constructor.name),fe==="Map"||fe==="Set")return Array.from(pe);if(fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe))return oe(pe,ce)}}function oe(pe,ce){(ce==null||ce>pe.length)&&(ce=pe.length);for(var fe=0,ye=new Array(ce);fe<ce;fe++)ye[fe]=pe[fe];return ye}function ie(pe,ce){if(!(pe instanceof ce))throw new TypeError("Cannot call a class as a function")}function se(pe,ce){for(var fe=0;fe<ce.length;fe++){var ye=ce[fe];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(pe,ye.key,ye)}}function ue(pe,ce,fe){return ce&&se(pe.prototype,ce),fe&&se(pe,fe),pe}function de(pe,ce,fe){return{method:"GET",headers:pe,signal:fe==null?void 0:fe.signal,mode:"cors",credentials:ce?"include":"same-origin",redirect:"follow"}}function le(pe){var ce=new Headers;for(var fe in pe){var ye=pe[fe];typeof ye!="undefined"&&ce.append(fe,ye)}return ce}var ve=function(){function pe(ce){ie(this,pe),this.source=ce,this.isHttp=/^https?:/i.test(ce.url),this.httpHeaders=this.isHttp&&ce.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return ue(pe,[{key:"_progressiveDataLength",get:function(){var fe,ye;return(fe=(ye=this._fullRequestReader)===null||ye===void 0?void 0:ye._loaded)!==null&&fe!==void 0?fe:0}},{key:"getFullReader",value:function(){return(0,K.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new me(this),this._fullRequestReader}},{key:"getRangeReader",value:function(fe,ye){if(ye<=this._progressiveDataLength)return null;var _e=new he(this,fe,ye);return this._rangeRequestReaders.push(_e),_e}},{key:"cancelAllRequests",value:function(fe){this._fullRequestReader&&this._fullRequestReader.cancel(fe);var ye=re(this._rangeRequestReaders.slice(0)),_e;try{for(ye.s();!(_e=ye.n()).done;){var ge=_e.value;ge.cancel(fe)}}catch(be){ye.e(be)}finally{ye.f()}}}]),pe}();$.PDFFetchStream=ve;var me=function(){function pe(ce){var fe=this;ie(this,pe),this._stream=ce,this._reader=null,this._loaded=0,this._filename=null;var ye=ce.source;this._withCredentials=ye.withCredentials||!1,this._contentLength=ye.length,this._headersCapability=(0,K.createPromiseCapability)(),this._disableRange=ye.disableRange||!1,this._rangeChunkSize=ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._isStreamingSupported=!ye.disableStream,this._isRangeSupported=!ye.disableRange,this._headers=le(this._stream.httpHeaders);var _e=ye.url;fetch(_e,de(this._headers,this._withCredentials,this._abortController)).then(function(ge){if(!(0,J.validateResponseStatus)(ge.status))throw(0,J.createResponseStatusError)(ge.status,_e);fe._reader=ge.body.getReader(),fe._headersCapability.resolve();var be=function($e){return ge.headers.get($e)},Se=(0,J.validateRangeRequestCapabilities)({getResponseHeader:be,isHttp:fe._stream.isHttp,rangeChunkSize:fe._rangeChunkSize,disableRange:fe._disableRange}),Ee=Se.allowRangeRequests,Ce=Se.suggestedLength;fe._isRangeSupported=Ee,fe._contentLength=Ce||fe._contentLength,fe._filename=(0,J.extractFilenameFromHeader)(be),!fe._isStreamingSupported&&fe._isRangeSupported&&fe.cancel(new K.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return ue(pe,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var ce=ne(V.default.mark(function ye(){var _e,ge,be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._headersCapability.promise;case 2:return Ce.next=4,this._reader.read();case 4:if(_e=Ce.sent,ge=_e.value,be=_e.done,!be){Ce.next=9;break}return Ce.abrupt("return",{value:ge,done:be});case 9:return this._loaded+=ge.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),Se=new Uint8Array(ge).buffer,Ce.abrupt("return",{value:Se,done:!1});case 13:case"end":return Ce.stop()}},ye,this)}));function fe(){return ce.apply(this,arguments)}return fe}()},{key:"cancel",value:function(fe){this._reader&&this._reader.cancel(fe),this._abortController&&this._abortController.abort()}}]),pe}(),he=function(){function pe(ce,fe,ye){var _e=this;ie(this,pe),this._stream=ce,this._reader=null,this._loaded=0;var ge=ce.source;this._withCredentials=ge.withCredentials||!1,this._readCapability=(0,K.createPromiseCapability)(),this._isStreamingSupported=!ge.disableStream,typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._headers=le(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(fe,"-").concat(ye-1));var be=ge.url;fetch(be,de(this._headers,this._withCredentials,this._abortController)).then(function(Se){if(!(0,J.validateResponseStatus)(Se.status))throw(0,J.createResponseStatusError)(Se.status,be);_e._readCapability.resolve(),_e._reader=Se.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}return ue(pe,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var ce=ne(V.default.mark(function ye(){var _e,ge,be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._readCapability.promise;case 2:return Ce.next=4,this._reader.read();case 4:if(_e=Ce.sent,ge=_e.value,be=_e.done,!be){Ce.next=9;break}return Ce.abrupt("return",{value:ge,done:be});case 9:return this._loaded+=ge.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),Se=new Uint8Array(ge).buffer,Ce.abrupt("return",{value:Se,done:!1});case 13:case"end":return Ce.stop()}},ye,this)}));function fe(){return ce.apply(this,arguments)}return fe}()},{key:"cancel",value:function(fe){this._reader&&this._reader.cancel(fe),this._abortController&&this._abortController.abort()}}]),pe}()}],__webpack_module_cache__={};function __w_pdfjs_require__(C){var $=__webpack_module_cache__[C];if($!==void 0)return $.exports;var F=__webpack_module_cache__[C]={id:C,loaded:!1,exports:{}};return __webpack_modules__[C].call(F.exports,F,F.exports,__w_pdfjs_require__),F.loaded=!0,F.exports}__w_pdfjs_require__.nmd=C=>(C.paths=[],C.children||(C.children=[]),C);var __webpack_exports__={};return(()=>{var C=__webpack_exports__;Object.defineProperty(C,"__esModule",{value:!0}),Object.defineProperty(C,"AnnotationLayer",{enumerable:!0,get:function(){return K.AnnotationLayer}}),Object.defineProperty(C,"AnnotationMode",{enumerable:!0,get:function(){return F.AnnotationMode}}),Object.defineProperty(C,"CMapCompressionType",{enumerable:!0,get:function(){return F.CMapCompressionType}}),Object.defineProperty(C,"GlobalWorkerOptions",{enumerable:!0,get:function(){return J.GlobalWorkerOptions}}),Object.defineProperty(C,"InvalidPDFException",{enumerable:!0,get:function(){return F.InvalidPDFException}}),Object.defineProperty(C,"LinkTarget",{enumerable:!0,get:function(){return $.LinkTarget}}),Object.defineProperty(C,"LoopbackPort",{enumerable:!0,get:function(){return V.LoopbackPort}}),Object.defineProperty(C,"MissingPDFException",{enumerable:!0,get:function(){return F.MissingPDFException}}),Object.defineProperty(C,"OPS",{enumerable:!0,get:function(){return F.OPS}}),Object.defineProperty(C,"PDFDataRangeTransport",{enumerable:!0,get:function(){return V.PDFDataRangeTransport}}),Object.defineProperty(C,"PDFDateString",{enumerable:!0,get:function(){return $.PDFDateString}}),Object.defineProperty(C,"PDFWorker",{enumerable:!0,get:function(){return V.PDFWorker}}),Object.defineProperty(C,"PasswordResponses",{enumerable:!0,get:function(){return F.PasswordResponses}}),Object.defineProperty(C,"PermissionFlag",{enumerable:!0,get:function(){return F.PermissionFlag}}),Object.defineProperty(C,"PixelsPerInch",{enumerable:!0,get:function(){return $.PixelsPerInch}}),Object.defineProperty(C,"RenderingCancelledException",{enumerable:!0,get:function(){return $.RenderingCancelledException}}),Object.defineProperty(C,"SVGGraphics",{enumerable:!0,get:function(){return ne.SVGGraphics}}),Object.defineProperty(C,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return F.UNSUPPORTED_FEATURES}}),Object.defineProperty(C,"UnexpectedResponseException",{enumerable:!0,get:function(){return F.UnexpectedResponseException}}),Object.defineProperty(C,"Util",{enumerable:!0,get:function(){return F.Util}}),Object.defineProperty(C,"VerbosityLevel",{enumerable:!0,get:function(){return F.VerbosityLevel}}),Object.defineProperty(C,"XfaLayer",{enumerable:!0,get:function(){return re.XfaLayer}}),Object.defineProperty(C,"addLinkAttributes",{enumerable:!0,get:function(){return $.addLinkAttributes}}),Object.defineProperty(C,"build",{enumerable:!0,get:function(){return V.build}}),Object.defineProperty(C,"createObjectURL",{enumerable:!0,get:function(){return F.createObjectURL}}),Object.defineProperty(C,"createPromiseCapability",{enumerable:!0,get:function(){return F.createPromiseCapability}}),Object.defineProperty(C,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return F.createValidAbsoluteUrl}}),Object.defineProperty(C,"getDocument",{enumerable:!0,get:function(){return V.getDocument}}),Object.defineProperty(C,"getFilenameFromUrl",{enumerable:!0,get:function(){return $.getFilenameFromUrl}}),Object.defineProperty(C,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return $.getPdfFilenameFromUrl}}),Object.defineProperty(C,"getXfaPageViewport",{enumerable:!0,get:function(){return $.getXfaPageViewport}}),Object.defineProperty(C,"isPdfFile",{enumerable:!0,get:function(){return $.isPdfFile}}),Object.defineProperty(C,"loadScript",{enumerable:!0,get:function(){return $.loadScript}}),Object.defineProperty(C,"removeNullCharacters",{enumerable:!0,get:function(){return F.removeNullCharacters}}),Object.defineProperty(C,"renderTextLayer",{enumerable:!0,get:function(){return te.renderTextLayer}}),Object.defineProperty(C,"shadow",{enumerable:!0,get:function(){return F.shadow}}),Object.defineProperty(C,"version",{enumerable:!0,get:function(){return V.version}});var $=__w_pdfjs_require__(1),F=__w_pdfjs_require__(4),V=__w_pdfjs_require__(136),K=__w_pdfjs_require__(148),J=__w_pdfjs_require__(142),ee=__w_pdfjs_require__(6),te=__w_pdfjs_require__(151),ne=__w_pdfjs_require__(152),re=__w_pdfjs_require__(150);if(ee.isNodeJS){var ae=__w_pdfjs_require__(153),oe=ae.PDFNodeStream;(0,V.setPDFNetworkStreamFactory)(function(le){return new oe(le)})}else{var ie=__w_pdfjs_require__(156),se=ie.PDFNetworkStream,ue=__w_pdfjs_require__(157),de=ue.PDFFetchStream;(0,V.setPDFNetworkStreamFactory)(function(le){return(0,$.isValidFetchUrl)(le.url)?new de(le):new se(le)})}})(),__webpack_exports__})()})})(pdf);var pdfExports=pdf.exports,__spreadArray=globalThis&&globalThis.__spreadArray||function(C,$,F){if(F||arguments.length===2)for(var V=0,K=$.length,J;V<K;V++)(J||!(V in $))&&(J||(J=Array.prototype.slice.call($,0,V)),J[V]=$[V]);return C.concat(J||Array.prototype.slice.call($))},clipboardEvents=["onCopy","onCut","onPaste"],compositionEvents=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],focusEvents=["onFocus","onBlur"],formEvents=["onInput","onInvalid","onReset","onSubmit"],imageEvents=["onLoad","onError"],keyboardEvents=["onKeyDown","onKeyPress","onKeyUp"],mediaEvents=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],mouseEvents=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],dragEvents=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],selectionEvents=["onSelect"],touchEvents=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],pointerEvents=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],uiEvents=["onScroll"],wheelEvents=["onWheel"],animationEvents=["onAnimationStart","onAnimationEnd","onAnimationIteration"],transitionEvents=["onTransitionEnd"],otherEvents=["onToggle"],changeEvents=["onChange"],allEvents=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(C,$){var F={};return allEvents.forEach(function(V){var K=C[V];K&&($?F[V]=function(J){return K(J,$(V))}:F[V]=K)}),F}function makeCancellablePromise(C){var $=!1,F=new Promise(function(V,K){C.then(function(J){return!$&&V(J)}).catch(function(J){return!$&&K(J)})});return{promise:F,cancel:function(){$=!0}}}function mergeClassNames(){return Array.prototype.slice.call(arguments).reduce(function(C,$){return C.concat($)},[]).filter(function(C){return typeof C=="string"}).join(" ")}var isProduction$1=process.env.NODE_ENV==="production",prefix="Invariant failed";function invariant(C,$){if(!C){if(isProduction$1)throw new Error(prefix);var F=typeof $=="function"?$():$,V=F?"".concat(prefix,": ").concat(F):prefix;throw new Error(V)}}var isProduction=process.env.NODE_ENV==="production";function warning(C,$){if(!isProduction){if(C)return;var F="Warning: "+$;typeof console!="undefined"&&console.warn(F);try{throw Error(F)}catch(V){}}}const DocumentContext=React.createContext(null);function Message(C){var $=C.children,F=C.type;return React.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(F)},$)}Message.propTypes={children:PropTypes.node,type:PropTypes.oneOf(["error","loading","no-data"]).isRequired};var DEFAULT_LINK_REL="noopener noreferrer nofollow",LinkService=function(){function C(){_classCallCheck(this,C),this.externalLinkTarget=null,this.externalLinkRel=null}return _createClass(C,[{key:"setDocument",value:function(F){this.pdfDocument=F}},{key:"setViewer",value:function(F){this.pdfViewer=F}},{key:"setExternalLinkRel",value:function(F){this.externalLinkRel=F}},{key:"setExternalLinkTarget",value:function(F){this.externalLinkTarget=F}},{key:"setHistory",value:function(){}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(F){this.pdfViewer.currentPageNumber=F}},{key:"rotation",get:function(){return 0},set:function(F){}},{key:"goToDestination",value:function(F){var V=this;new Promise(function(K){typeof F=="string"?V.pdfDocument.getDestination(F).then(K):Array.isArray(F)?K(F):F.then(K)}).then(function(K){invariant(Array.isArray(K),'"'.concat(K,'" is not a valid destination array.'));var J=K[0];new Promise(function(ee){J instanceof Object?V.pdfDocument.getPageIndex(J).then(function(te){ee(te)}).catch(function(){invariant(!1,'"'.concat(J,'" is not a valid page reference.'))}):typeof J=="number"?ee(J):invariant(!1,'"'.concat(J,'" is not a valid destination reference.'))}).then(function(ee){var te=ee+1;invariant(te>=1&&te<=V.pagesCount,'"'.concat(te,'" is not a valid page number.')),V.pdfViewer.scrollPageIntoView({dest:F,pageIndex:ee,pageNumber:te})})})}},{key:"navigateTo",value:function(F){this.goToDestination(F)}},{key:"goToPage",value:function(){}},{key:"addLinkAttributes",value:function(F,V,K){F.href=V,F.rel=this.externalLinkRel||DEFAULT_LINK_REL,F.target=K?"_blank":this.externalLinkTarget||""}},{key:"getDestinationHash",value:function(){return"#"}},{key:"getAnchorUrl",value:function(){return"#"}},{key:"setHash",value:function(){}},{key:"executeNamedAction",value:function(){}},{key:"cachePageRef",value:function(){}},{key:"isPageVisible",value:function(){return!0}},{key:"isPageCached",value:function(){return!0}}]),C}(),PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},isBrowser=typeof window!="undefined",isLocalFileSystem=isBrowser&&window.location.protocol==="file:";function isDefined(C){return typeof C!="undefined"}function isProvided(C){return isDefined(C)&&C!==null}function isString(C){return typeof C=="string"}function isArrayBuffer(C){return C instanceof ArrayBuffer}function isBlob(C){return invariant(isBrowser,"isBlob can only be used in a browser environment"),C instanceof Blob}function isFile$1(C){return invariant(isBrowser,"isFile can only be used in a browser environment"),C instanceof File}function isDataURI(C){return isString(C)&&/^data:/.test(C)}function dataURItoByteString(C){invariant(isDataURI(C),"Invalid data URI.");var $=C.split(","),F=_slicedToArray($,2),V=F[0],K=F[1],J=V.split(";");return J.indexOf("base64")!==-1?atob(K):unescape(K)}function getPixelRatio(){return isBrowser&&window.devicePixelRatio||1}var allowFileAccessFromFilesTip="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function displayCORSWarning(){warning(!isLocalFileSystem,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(allowFileAccessFromFilesTip))}function displayWorkerWarning(){warning(!isLocalFileSystem,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(allowFileAccessFromFilesTip))}function cancelRunningTask(C){C&&C.cancel&&C.cancel()}function makePageCallback(C,$){return Object.defineProperty(C,"width",{get:function(){return this.view[2]*$},configurable:!0}),Object.defineProperty(C,"height",{get:function(){return this.view[3]*$},configurable:!0}),Object.defineProperty(C,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(C,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),C}function isCancelException(C){return C.name==="RenderingCancelledException"}function loadFromFile(C){return new Promise(function($,F){var V=new FileReader;return V.onload=function(){return $(new Uint8Array(V.result))},V.onerror=function(K){switch(K.target.error.code){case K.target.error.NOT_FOUND_ERR:return F(new Error("Error while reading a file: File not found."));case K.target.error.NOT_READABLE_ERR:return F(new Error("Error while reading a file: File not readable."));case K.target.error.SECURITY_ERR:return F(new Error("Error while reading a file: Security error."));case K.target.error.ABORT_ERR:return F(new Error("Error while reading a file: Aborted."));default:return F(new Error("Error while reading a file."))}},V.readAsArrayBuffer(C),null})}var eventProps=function(){var C={};return[].concat(_toConsumableArray(mouseEvents),_toConsumableArray(touchEvents),_toConsumableArray(keyboardEvents)).forEach(function($){C[$]=PropTypes.func}),C}(),fileTypes=[PropTypes.string,PropTypes.instanceOf(ArrayBuffer),PropTypes.shape({data:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),httpHeaders:PropTypes.object,range:PropTypes.object,url:PropTypes.string,withCredentials:PropTypes.bool})];typeof File!="undefined"&&fileTypes.push(PropTypes.instanceOf(File)),typeof Blob!="undefined"&&fileTypes.push(PropTypes.instanceOf(Blob));var isClassName=PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),isFile=PropTypes.oneOfType(fileTypes),isLinkService=PropTypes.instanceOf(LinkService);PropTypes.oneOf(["_self","_blank","_parent","_top"]);var isPage=PropTypes.shape({_transport:PropTypes.shape({fontLoader:PropTypes.object.isRequired}).isRequired,commonObjs:PropTypes.shape({_objs:PropTypes.object.isRequired}).isRequired,getAnnotations:PropTypes.func.isRequired,getTextContent:PropTypes.func.isRequired,getViewport:PropTypes.func.isRequired,render:PropTypes.func.isRequired}),isPageIndex=function C($,F,V){var K=$[F],J=$.pageNumber,ee=$.pdf;if(!isDefined(ee))return null;if(isDefined(K)){if(typeof K!="number")return new Error("`".concat(F,"` of type `").concat(_typeof(K),"` supplied to `").concat(V,"`, expected `number`."));if(K<0)return new Error("Expected `".concat(F,"` to be greater or equal to 0."));var te=ee.numPages;if(K+1>te)return new Error("Expected `".concat(F,"` to be less or equal to ").concat(te-1,"."))}else if(!isDefined(J))return new Error("`".concat(F,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(V,"`."));return null},isPageNumber=function C($,F,V){var K=$[F],J=$.pageIndex,ee=$.pdf;if(!isDefined(ee))return null;if(isDefined(K)){if(typeof K!="number")return new Error("`".concat(F,"` of type `").concat(_typeof(K),"` supplied to `").concat(V,"`, expected `number`."));if(K<1)return new Error("Expected `".concat(F,"` to be greater or equal to 1."));var te=ee.numPages;if(K>te)return new Error("Expected `".concat(F,"` to be less or equal to ").concat(te,"."))}else if(!isDefined(J))return new Error("`".concat(F,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(V,"`."));return null},isPdf=PropTypes.oneOfType([PropTypes.shape({getDestination:PropTypes.func.isRequired,getOutline:PropTypes.func.isRequired,getPage:PropTypes.func.isRequired,numPages:PropTypes.number.isRequired}),PropTypes.bool]),isRef=PropTypes.oneOfType([PropTypes.func,PropTypes.shape({current:PropTypes.any})]),isRenderMode=PropTypes.oneOf(["canvas","none","svg"]),isRotate=PropTypes.oneOf([0,90,180,270]),_excluded=["url"];function ownKeys$2(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread$2(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys$2(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys$2(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}function _createSuper$6(C){var $=_isNativeReflectConstruct$6();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$6(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var PDFDataRangeTransport=pdfExports.PDFDataRangeTransport,Document$1=function(C){_inherits(F,C);var $=_createSuper$6(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{pdf:null}),_defineProperty(_assertThisInitialized(V),"viewer",{scrollPageIntoView:function(ne){var re=ne.dest,ae=ne.pageIndex,oe=ne.pageNumber,ie=V.props.onItemClick;if(ie){ie({dest:re,pageIndex:ae,pageNumber:oe});return}var se=V.pages[ae];if(se){se.scrollIntoView();return}warning(!1,"An internal link leading to page ".concat(oe," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}),_defineProperty(_assertThisInitialized(V),"linkService",new LinkService),_defineProperty(_assertThisInitialized(V),"loadDocument",function(){cancelRunningTask(V.runningTask),V.loadingTask&&V.loadingTask.destroy();var te=makeCancellablePromise(V.findDocumentSource());V.runningTask=te,te.promise.then(function(ne){if(V.onSourceSuccess(),!!ne){V.setState(function(ue){return ue.pdf?{pdf:null}:null});var re=V.props,ae=re.options,oe=re.onLoadProgress,ie=re.onPassword;V.loadingTask=pdfExports.getDocument(_objectSpread$2(_objectSpread$2({},ne),ae)),V.loadingTask.onPassword=ie,oe&&(V.loadingTask.onProgress=oe);var se=makeCancellablePromise(V.loadingTask.promise);V.runningTask=se,se.promise.then(function(ue){V.setState(function(de){return de.pdf&&de.pdf.fingerprint===ue.fingerprint?null:{pdf:ue}},V.onLoadSuccess)}).catch(function(ue){V.onLoadError(ue)})}}).catch(function(ne){V.onSourceError(ne)})}),_defineProperty(_assertThisInitialized(V),"setupLinkService",function(){var te=V.props,ne=te.externalLinkRel,re=te.externalLinkTarget;V.linkService.setViewer(V.viewer),V.linkService.setExternalLinkRel(ne),V.linkService.setExternalLinkTarget(re)}),_defineProperty(_assertThisInitialized(V),"onSourceSuccess",function(){var te=V.props.onSourceSuccess;te&&te()}),_defineProperty(_assertThisInitialized(V),"onSourceError",function(te){warning(te);var ne=V.props.onSourceError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onLoadSuccess,ne=V.state.pdf;te&&te(ne),V.pages=new Array(ne.numPages),V.linkService.setDocument(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({pdf:!1}),warning(te);var ne=V.props.onLoadError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"findDocumentSource",function(){return new Promise(function(te){var ne=V.props.file;if(ne||te(null),typeof ne=="string"){if(isDataURI(ne)){var re=dataURItoByteString(ne);te({data:re})}displayCORSWarning(),te({url:ne})}if(ne instanceof PDFDataRangeTransport&&te({range:ne}),isArrayBuffer(ne)&&te({data:ne}),isBrowser&&(isBlob(ne)||isFile$1(ne))){loadFromFile(ne).then(function(se){te({data:se})});return}if(invariant(_typeof(ne)==="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),invariant(ne.url||ne.data||ne.range,"Invalid parameter object: need either .data, .range or .url"),typeof ne.url=="string"){if(isDataURI(ne.url)){var ae=ne.url,oe=_objectWithoutProperties(ne,_excluded),ie=dataURItoByteString(ae);te(_objectSpread$2({data:ie},oe))}displayCORSWarning()}te(ne)})}),_defineProperty(_assertThisInitialized(V),"registerPage",function(te,ne){V.pages[te]=ne}),_defineProperty(_assertThisInitialized(V),"unregisterPage",function(te){delete V.pages[te]}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(K){var J=this.props.file;J!==K.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask),this.loadingTask&&this.loadingTask.destroy()}},{key:"childContext",get:function(){var K=this.linkService,J=this.registerPage,ee=this.unregisterPage,te=this.props,ne=te.imageResourcesPath,re=te.renderMode,ae=te.rotate,oe=this.state.pdf;return{imageResourcesPath:ne,linkService:K,pdf:oe,registerPage:J,renderMode:re,rotate:ae,unregisterPage:ee}}},{key:"eventProps",get:function(){var K=this;return makeEventProps(this.props,function(){return K.state.pdf})}},{key:"renderChildren",value:function(){var K=this.props.children;return React.createElement(DocumentContext.Provider,{value:this.childContext},K)}},{key:"renderContent",value:function(){var K=this.props.file,J=this.state.pdf;if(!K){var ee=this.props.noData;return React.createElement(Message,{type:"no-data"},typeof ee=="function"?ee():ee)}if(J===null){var te=this.props.loading;return React.createElement(Message,{type:"loading"},typeof te=="function"?te():te)}if(J===!1){var ne=this.props.error;return React.createElement(Message,{type:"error"},typeof ne=="function"?ne():ne)}return this.renderChildren()}},{key:"render",value:function(){var K=this.props,J=K.className,ee=K.inputRef;return React.createElement("div",_extends({className:mergeClassNames("react-pdf__Document",J),ref:ee},this.eventProps),this.renderContent())}}]),F}(React.PureComponent);Document$1.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF…",noData:"No PDF file specified.",onPassword:function C($,F){switch(F){case PasswordResponses.NEED_PASSWORD:{var V=prompt("Enter the password to open this PDF file.");$(V);break}case PasswordResponses.INCORRECT_PASSWORD:{var K=prompt("Invalid password. Please try again.");$(K);break}}}};var isFunctionOrNode$1=PropTypes.oneOfType([PropTypes.func,PropTypes.node]);Document$1.propTypes=_objectSpread$2(_objectSpread$2({},eventProps),{},{children:PropTypes.node,className:isClassName,error:isFunctionOrNode$1,externalLinkRel:PropTypes.string,externalLinkTarget:PropTypes.string,file:isFile,imageResourcesPath:PropTypes.string,inputRef:isRef,loading:isFunctionOrNode$1,noData:isFunctionOrNode$1,onItemClick:PropTypes.func,onLoadError:PropTypes.func,onLoadProgress:PropTypes.func,onLoadSuccess:PropTypes.func,onPassword:PropTypes.func,onSourceError:PropTypes.func,onSourceSuccess:PropTypes.func,rotate:PropTypes.number});var isDestination=PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.any)]);PropTypes.shape({dest:isDestination,items:PropTypes.arrayOf(PropTypes.shape({dest:isDestination,title:PropTypes.string})),title:PropTypes.string}).isRequired,PropTypes.func,isPdf.isRequired;function ownKeys$1(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread$1(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys$1(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys$1(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}_objectSpread$1({className:isClassName,inputRef:isRef,onItemClick:PropTypes.func,onLoadError:PropTypes.func,onLoadSuccess:PropTypes.func,pdf:isPdf},eventProps);function mergeRefs(){for(var C=[],$=0;$<arguments.length;$++)C[$]=arguments[$];var F=C.filter(Boolean);if(F.length<=1){var V=F[0];return V||null}return function(J){F.forEach(function(ee){typeof ee=="function"?ee(J):ee&&(ee.current=J)})}}const PageContext=React.createContext(null);function _createSuper$5(C){var $=_isNativeReflectConstruct$5();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$5(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var ANNOTATION_MODE=pdfExports.AnnotationMode,PageCanvasInternal=function(C){_inherits(F,C);var $=_createSuper$5(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"canvasElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){V.renderer=null;var te=V.props,ne=te.onRenderSuccess,re=te.page,ae=te.scale;ne&&ne(makePageCallback(re,ae))}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){if(!isCancelException(te)){warning(te);var ne=V.props.onRenderError;ne&&ne(te)}}),_defineProperty(_assertThisInitialized(V),"drawPageOnCanvas",function(){var te=V.canvasElement.current;if(!te)return null;var ne=_assertThisInitialized(V),re=ne.renderViewport,ae=ne.viewport,oe=V.props,ie=oe.canvasBackground,se=oe.page,ue=oe.renderForms;te.width=re.width,te.height=re.height,te.style.width="".concat(Math.floor(ae.width),"px"),te.style.height="".concat(Math.floor(ae.height),"px");var de={annotationMode:ue?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,get canvasContext(){return te.getContext("2d")},viewport:re};return ie&&(de.background=ie),V.cancelRenderingTask(),V.renderer=se.render(de),V.renderer.promise.then(V.onRenderSuccess).catch(V.onRenderError)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(K){var J=this.props,ee=J.canvasBackground,te=J.page,ne=J.renderForms;(ee!==K.canvasBackground||ne!==K.renderForms)&&(te.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask();var K=this.canvasElement.current;K&&(K.width=0,K.height=0)}},{key:"cancelRenderingTask",value:function(){this.renderer&&(this.renderer.cancel(),this.renderer=null)}},{key:"renderViewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale,ne=getPixelRatio();return J.getViewport({scale:te*ne,rotation:ee})}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"render",value:function(){var K=this.props.canvasRef;return React.createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:mergeRefs(K,this.canvasElement),style:{display:"block",userSelect:"none"}})}}]),F}(React.PureComponent);PageCanvasInternal.propTypes={canvasBackground:PropTypes.string,canvasRef:isRef,onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,page:isPage.isRequired,renderForms:PropTypes.bool,rotate:isRotate,scale:PropTypes.number.isRequired};function PageCanvas(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(PageCanvasInternal,_extends({},$,C))})}function _createSuper$4(C){var $=_isNativeReflectConstruct$4();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var PageSVGInternal=function(C){_inherits(F,C);var $=_createSuper$4(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{svg:null}),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){V.renderer=null;var te=V.props,ne=te.onRenderSuccess,re=te.page,ae=te.scale;ne&&ne(makePageCallback(re,ae))}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){if(!isCancelException(te)){warning(te);var ne=V.props.onRenderError;ne&&ne(te)}}),_defineProperty(_assertThisInitialized(V),"renderSVG",function(){var te=V.props.page;return V.renderer=te.getOperatorList(),V.renderer.then(function(ne){var re=new pdfExports.SVGGraphics(te.commonObjs,te.objs);V.renderer=re.getSVG(ne,V.viewport).then(function(ae){V.setState({svg:ae},V.onRenderSuccess)}).catch(V.onRenderError)}).catch(V.onRenderError)}),_defineProperty(_assertThisInitialized(V),"drawPageOnContainer",function(te){var ne=V.state.svg;if(!(!te||!ne)){te.firstElementChild||te.appendChild(ne);var re=V.viewport,ae=re.width,oe=re.height;ne.setAttribute("width",ae),ne.setAttribute("height",oe)}}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"render",value:function(){var K=this,J=this.viewport,ee=J.width,te=J.height;return React.createElement("div",{className:"react-pdf__Page__svg",ref:function(re){return K.drawPageOnContainer(re)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:ee,height:te,userSelect:"none"}})}}]),F}(React.PureComponent);PageSVGInternal.propTypes={onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number.isRequired};function PageSVG(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(PageSVGInternal,_extends({},$,C))})}function _createSuper$3(C){var $=_isNativeReflectConstruct$3();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var TextLayerItemInternal=function(C){_inherits(F,C);var $=_createSuper$3(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"itemElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"getElementWidth",function(te){var ne=_assertThisInitialized(V),re=ne.sideways;return te.getBoundingClientRect()[re?"height":"width"]}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"unrotatedViewport",get:function(){var K=this.props,J=K.page,ee=K.scale;return J.getViewport({scale:ee})}},{key:"rotate",get:function(){var K=this.props,J=K.page,ee=K.rotate;return ee-J.rotate}},{key:"sideways",get:function(){var K=this.rotate;return K%180!==0}},{key:"defaultSideways",get:function(){var K=this.unrotatedViewport.rotation;return K%180!==0}},{key:"fontSize",get:function(){var K=this.props.transform,J=this.defaultSideways,ee=_slicedToArray(K,2),te=ee[0],ne=ee[1];return J?ne:te}},{key:"top",get:function(){var K=this.props.transform,J=this.unrotatedViewport,ee=this.defaultSideways,te=_slicedToArray(K,6),ne=te[2],re=te[3],ae=te[4],oe=te[5],ie=_slicedToArray(J.viewBox,4),se=ie[1],ue=ie[3];return ee?ae+ne+se:ue-(oe+re)}},{key:"left",get:function(){var K=this.props.transform,J=this.unrotatedViewport,ee=this.defaultSideways,te=_slicedToArray(K,6),ne=te[4],re=te[5],ae=_slicedToArray(J.viewBox,1),oe=ae[0];return ee?re-oe:ne-oe}},{key:"getFontData",value:function(K){var J=this.props.page;return new Promise(function(ee){J.commonObjs.get(K,ee)})}},{key:"alignTextItem",value:function(){var K=this,J=this.itemElement.current;if(J){J.style.transform="";var ee=this.props,te=ee.fontName,ne=ee.scale,re=ee.width;J.style.fontFamily="".concat(te,", sans-serif"),this.getFontData(te).then(function(ae){var oe=ae?ae.fallbackName:"sans-serif";J.style.fontFamily="".concat(te,", ").concat(oe);var ie=re*ne,se=K.getElementWidth(J),ue="scaleX(".concat(ie/se,")"),de=ae?ae.ascent:0;de&&(ue+=" translateY(".concat((1-de)*100,"%)")),J.style.transform=ue,J.style.WebkitTransform=ue})}}},{key:"render",value:function(){var K=this.fontSize,J=this.top,ee=this.left,te=this.props,ne=te.customTextRenderer,re=te.scale,ae=te.str;return React.createElement("span",{ref:this.itemElement,style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(K*re,"px"),position:"absolute",top:"".concat(J*re,"px"),left:"".concat(ee*re,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},ne?ne(this.props):ae)}}]),F}(React.PureComponent);TextLayerItemInternal.propTypes={customTextRenderer:PropTypes.func,fontName:PropTypes.string.isRequired,itemIndex:PropTypes.number.isRequired,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number,str:PropTypes.string.isRequired,transform:PropTypes.arrayOf(PropTypes.number).isRequired,width:PropTypes.number.isRequired};function TextLayerItem(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(TextLayerItemInternal,_extends({},$,C))})}function _createSuper$2(C){var $=_isNativeReflectConstruct$2();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$2(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var TextLayerInternal=function(C){_inherits(F,C);var $=_createSuper$2(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{textItems:null}),_defineProperty(_assertThisInitialized(V),"loadTextItems",function(){var te=V.props.page,ne=makeCancellablePromise(te.getTextContent());V.runningTask=ne,ne.promise.then(function(re){var ae=re.items;V.setState({textItems:ae},V.onLoadSuccess)}).catch(function(re){V.onLoadError(re)})}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onGetTextSuccess,ne=V.state.textItems;te&&te(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({textItems:!1}),warning(te);var ne=V.props.onGetTextError;ne&&ne(te)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.page;invariant(K,"Attempted to load page text content, but no page was specified."),this.loadTextItems()}},{key:"componentDidUpdate",value:function(K){var J=this.props.page;K.page&&J!==K.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask)}},{key:"unrotatedViewport",get:function(){var K=this.props,J=K.page,ee=K.scale;return J.getViewport({scale:ee})}},{key:"rotate",get:function(){var K=this.props,J=K.page,ee=K.rotate;return ee-J.rotate}},{key:"renderTextItems",value:function(){var K=this.state.textItems;return K?K.map(function(J,ee){return React.createElement(TextLayerItem,_extends({key:ee,itemIndex:ee},J))}):null}},{key:"render",value:function(){var K=this.unrotatedViewport,J=this.rotate;return React.createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(K.width,"px"),height:"".concat(K.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(J,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(J,"deg)"),pointerEvents:"none"}},this.renderTextItems())}}]),F}(React.PureComponent);TextLayerInternal.propTypes={onGetTextError:PropTypes.func,onGetTextSuccess:PropTypes.func,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number};function TextLayer(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(TextLayerInternal,_extends({},$,C))})}function _createSuper$1(C){var $=_isNativeReflectConstruct$1();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$1(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var AnnotationLayerInternal=function(C){_inherits(F,C);var $=_createSuper$1(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{annotations:null}),_defineProperty(_assertThisInitialized(V),"layerElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"loadAnnotations",function(){var te=V.props.page,ne=makeCancellablePromise(te.getAnnotations());V.runningTask=ne,ne.promise.then(function(re){V.setState({annotations:re},V.onLoadSuccess)}).catch(function(re){V.onLoadError(re)})}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onGetAnnotationsSuccess,ne=V.state.annotations;te&&te(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({annotations:!1}),warning(te);var ne=V.props.onGetAnnotationsError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){var te=V.props.onRenderAnnotationLayerSuccess;te&&te()}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){warning(te);var ne=V.props.onRenderAnnotationLayerError;ne&&ne(te)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.page;invariant(K,"Attempted to load page annotations, but no page was specified."),this.loadAnnotations()}},{key:"componentDidUpdate",value:function(K){var J=this.props,ee=J.page,te=J.renderForms;(K.page&&ee!==K.page||te!==K.renderForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask)}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"renderAnnotationLayer",value:function(){var K=this.state.annotations;if(K){var J=this.props,ee=J.imageResourcesPath,te=J.linkService,ne=J.page,re=J.renderForms,ae=this.viewport.clone({dontFlip:!0}),oe={annotations:K,div:this.layerElement.current,imageResourcesPath:ee,linkService:te,page:ne,renderForms:re,viewport:ae};this.layerElement.current.innerHTML="";try{pdfExports.AnnotationLayer.render(oe),this.onRenderSuccess()}catch(ie){this.onRenderError(ie)}}}},{key:"render",value:function(){return React.createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:this.layerElement},this.renderAnnotationLayer())}}]),F}(React.PureComponent);AnnotationLayerInternal.propTypes={imageResourcesPath:PropTypes.string,linkService:isLinkService.isRequired,onGetAnnotationsError:PropTypes.func,onGetAnnotationsSuccess:PropTypes.func,onRenderAnnotationLayerError:PropTypes.func,onRenderAnnotationLayerSuccess:PropTypes.func,page:isPage,renderForms:PropTypes.bool,rotate:isRotate,scale:PropTypes.number};var AnnotationLayer=function C($){return React.createElement(DocumentContext.Consumer,null,function(F){return React.createElement(PageContext.Consumer,null,function(V){return React.createElement(AnnotationLayerInternal,_extends({},F,V,$))})})};function ownKeys(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}function _createSuper(C){var $=_isNativeReflectConstruct();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var defaultScale=1,PageInternal=function(C){_inherits(F,C);var $=_createSuper(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{page:null}),_defineProperty(_assertThisInitialized(V),"pageElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props,ne=te.onLoadSuccess,re=te.registerPage,ae=V.state.page;ne&&ne(makePageCallback(ae,V.scale)),re&&re(V.pageIndex,V.pageElement.current)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({page:!1}),warning(te);var ne=V.props.onLoadError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"loadPage",function(){var te=V.props.pdf,ne=V.getPageNumber();if(ne){V.setState(function(ae){return ae.page?{page:null}:null});var re=makeCancellablePromise(te.getPage(ne));V.runningTask=re,re.promise.then(function(ae){V.setState({page:ae},V.onLoadSuccess)}).catch(function(ae){V.onLoadError(ae)})}}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.pdf;invariant(K,"Attempted to load a page, but no document was specified."),this.loadPage()}},{key:"componentDidUpdate",value:function(K){var J=this.props.pdf;if(K.pdf&&J!==K.pdf||this.getPageNumber()!==this.getPageNumber(K)){var ee=this.props.unregisterPage;ee&&ee(this.getPageIndex(K)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var K=this.props.unregisterPage;K&&K(this.pageIndex),cancelRunningTask(this.runningTask)}},{key:"childContext",get:function(){var K=this.state.page;if(!K)return{};var J=this.props,ee=J.canvasBackground,te=J.customTextRenderer,ne=J.onGetAnnotationsError,re=J.onGetAnnotationsSuccess,ae=J.onGetTextError,oe=J.onGetTextSuccess,ie=J.onRenderAnnotationLayerError,se=J.onRenderAnnotationLayerSuccess,ue=J.onRenderError,de=J.onRenderSuccess,le=J.renderForms,ve=J.renderInteractiveForms;return{canvasBackground:ee,customTextRenderer:te,onGetAnnotationsError:ne,onGetAnnotationsSuccess:re,onGetTextError:ae,onGetTextSuccess:oe,onRenderAnnotationLayerError:ie,onRenderAnnotationLayerSuccess:se,onRenderError:ue,onRenderSuccess:de,page:K,renderForms:le!=null?le:ve,rotate:this.rotate,scale:this.scale}}},{key:"getPageIndex",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return isProvided(K.pageNumber)?K.pageNumber-1:isProvided(K.pageIndex)?K.pageIndex:null}},{key:"getPageNumber",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return isProvided(K.pageNumber)?K.pageNumber:isProvided(K.pageIndex)?K.pageIndex+1:null}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var K=this.props.rotate;if(isProvided(K))return K;var J=this.state.page;return J?J.rotate:null}},{key:"scale",get:function(){var K=this.state.page;if(!K)return null;var J=this.props,ee=J.scale,te=J.width,ne=J.height,re=this.rotate,ae=1,oe=ee===null?defaultScale:ee;if(te||ne){var ie=K.getViewport({scale:1,rotation:re});ae=te?te/ie.width:ne/ie.height}return oe*ae}},{key:"eventProps",get:function(){var K=this;return makeEventProps(this.props,function(){var J=K.state.page;return J&&makePageCallback(J,K.scale)})}},{key:"pageKey",get:function(){var K=this.state.page;return"".concat(K.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var K=this.state.page;return"".concat(K.pageIndex,"/").concat(this.rotate)}},{key:"renderMainLayer",value:function(){var K=this.props,J=K.canvasRef,ee=K.renderMode;switch(ee){case"none":return null;case"svg":return React.createElement(PageSVG,{key:"".concat(this.pageKeyNoScale,"_svg")});case"canvas":default:return React.createElement(PageCanvas,{key:"".concat(this.pageKey,"_canvas"),canvasRef:J})}}},{key:"renderTextLayer",value:function(){var K=this.props.renderTextLayer;return K?React.createElement(TextLayer,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var K=this.props.renderAnnotationLayer;return K?React.createElement(AnnotationLayer,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var K=this.props.children;return React.createElement(PageContext.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),K)}},{key:"renderContent",value:function(){var K=this.pageNumber,J=this.props.pdf,ee=this.state.page;if(!K){var te=this.props.noData;return React.createElement(Message,{type:"no-data"},typeof te=="function"?te():te)}if(J===null||ee===null){var ne=this.props.loading;return React.createElement(Message,{type:"loading"},typeof ne=="function"?ne():ne)}if(J===!1||ee===!1){var re=this.props.error;return React.createElement(Message,{type:"error"},typeof re=="function"?re():re)}return this.renderChildren()}},{key:"render",value:function(){var K=this.pageNumber,J=this.props,ee=J.className,te=J.inputRef;return React.createElement("div",_extends({className:mergeClassNames("react-pdf__Page",ee),"data-page-number":K,ref:mergeRefs(te,this.pageElement),style:{position:"relative"}},this.eventProps),this.renderContent())}}]),F}(React.PureComponent);PageInternal.defaultProps={error:"Failed to load the page.",loading:"Loading page…",noData:"No page specified.",renderAnnotationLayer:!0,renderForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:defaultScale};var isFunctionOrNode=PropTypes.oneOfType([PropTypes.func,PropTypes.node]);PageInternal.propTypes=_objectSpread(_objectSpread({},eventProps),{},{canvasBackground:PropTypes.string,children:PropTypes.node,className:isClassName,customTextRenderer:PropTypes.func,error:isFunctionOrNode,height:PropTypes.number,imageResourcesPath:PropTypes.string,inputRef:isRef,loading:isFunctionOrNode,noData:isFunctionOrNode,onGetTextError:PropTypes.func,onGetTextSuccess:PropTypes.func,onLoadError:PropTypes.func,onLoadSuccess:PropTypes.func,onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,pageIndex:isPageIndex,pageNumber:isPageNumber,pdf:isPdf,registerPage:PropTypes.func,renderAnnotationLayer:PropTypes.bool,renderForms:PropTypes.bool,renderInteractiveForms:PropTypes.bool,renderMode:isRenderMode,renderTextLayer:PropTypes.bool,rotate:isRotate,scale:PropTypes.number,unregisterPage:PropTypes.func,width:PropTypes.number});function Page(C,$){return React.createElement(DocumentContext.Consumer,null,function(F){return React.createElement(PageInternal,_extends({ref:$},F,C))})}const Page$1=React.forwardRef(Page);displayWorkerWarning(),pdfExports.GlobalWorkerOptions.workerSrc="pdf.worker.js";const toDDMMYY=C=>{const $=new Date(C),F=String($.getMonth()+1).padStart(2,"0"),V=String($.getDate()).padStart(2,"0"),K=$.getFullYear().toString().slice(2);return[V,F,K].join("/")},resumeService=careerHubApi.injectEndpoints({endpoints:C=>({getResumesEligibility:C.query({query:({jobProfileId:$})=>({url:"/api/v3/user-resumes/eligibility",params:{job_profile_id:$}})}),getResumeLink:C.query({query:({resumeId:$})=>({url:`/api/v3/user-resumes/${$}/download`,method:"GET"})})})}),{useGetResumesEligibilityQuery,useGetResumeLinkQuery}=resumeService,container$4="_container_20j4d_1",resumeChoiceOptionLabel="_resumeChoiceOptionLabel_20j4d_5",resumeChoiceOptionLabelChecked="_resumeChoiceOptionLabelChecked_20j4d_16",resumeChoiceOptionLabelContent="_resumeChoiceOptionLabelContent_20j4d_23",resumeChoiceOptionLabelName="_resumeChoiceOptionLabelName_20j4d_27",resumeChoiceOptionLabelModifiedAt="_resumeChoiceOptionLabelModifiedAt_20j4d_33",resumeChoiceOptionLabelCard="_resumeChoiceOptionLabelCard_20j4d_38",resumeChoiceOptionLabelCardHeader="_resumeChoiceOptionLabelCardHeader_20j4d_42",resumeChoiceOptionLabelEditButton="_resumeChoiceOptionLabelEditButton_20j4d_46",resumeChoiceOptionLabelImprovementsList="_resumeChoiceOptionLabelImprovementsList_20j4d_50",resumePreviewContainer="_resumePreviewContainer_20j4d_55",fitmentScoreTitle="_fitmentScoreTitle_20j4d_65",styles$l={container:container$4,resumeChoiceOptionLabel,resumeChoiceOptionLabelChecked,resumeChoiceOptionLabelContent,resumeChoiceOptionLabelName,resumeChoiceOptionLabelModifiedAt,resumeChoiceOptionLabelCard,resumeChoiceOptionLabelCardHeader,resumeChoiceOptionLabelEditButton,resumeChoiceOptionLabelImprovementsList,resumePreviewContainer,fitmentScoreTitle};function FitmentScore({score:C}){let $={"0%":"#FC2119","60%":"#FF9C40"},F="#FFD5C0";return Number(C)>=60&&($={"0%":"#FC8019","80%":"#FFD284"},F="#FC910033"),Number(C)>=80&&($={"0%":"#03522D","100%":"#22C477"},F="#1A845233"),React.createElement(Flex$1,{vertical:!0,gap:4,className:styles$l.fitmentScore},React.createElement(Typography$1.Text,{className:styles$l.fitmentScoreTitle},"Your Resume Fit Score:"),React.createElement(Progress$1,{size:["default",12],percent:C,className:styles$l.fitmentScoreProgress,strokeColor:$,trailColor:F}))}const RESUME_BLOCKER_POINTS={bullets:"Bullet points should be used in project and work experience description for improved readability. Please use text editor's bullet point functionality for better indentation & formatting.",skills:"At-least 5 skills should be included in your resume.",contentSize:"Your resume should be fully completed and not left incomplete or partially done.",experience:"At-least one project/experience with a sufficiently detailed description should be present in your resume.",projects:"At-least one project/experience with a sufficiently detailed description should be present in your resume.",garbage_collection:"All the details of the resume should be accurate."};function getBlockerPointsList(C){const{blocker_and_garbage_details:$,tech_stack_check:F}=C||{},{blockers:V,garbage_collection:K}=$||{},{user_work_experiences:J,user_educations:ee}=K||{},te=[];return Object.keys(V||{}).forEach(ne=>{if(!V[ne])return;const re=RESUME_BLOCKER_POINTS[ne];re&&te.push(re)}),(F==null?void 0:F.is_eligible)===!1&&(F!=null&&F.details)&&F.details.forEach(ne=>{te.push(`Missing skill to be added: ${ne.skill} (${ne.proficiency_period}yr exp)`)}),(J==null?void 0:J.length)>0&&J.forEach(ne=>{te.push(`Inaccurate work experience: ${ne.company} - ${ne.job_title}`)}),(ee==null?void 0:ee.length)>0&&ee.forEach(ne=>{te.push(`Inaccurate education: ${ne.university} - ${ne.degree} (${ne.branch})`)}),te}function BlockerPoints({value:C}){const $=reactRedux.useDispatch(),[F,V]=React.useState(!0),{onEditResume:K,jobProfileId:J}=useApplicationFormContext(),{analytics:ee}=useJobPreview(),{resume_details:te,is_blocker:ne}=C||{},{id:re,name:ae}=te||{},oe=getBlockerPointsList(C),ie=oe.length,se=()=>{ee==null||ee.click("Blocker Points - Collapse",PRODUCT_NAME),V(!F)},ue=()=>{ee==null||ee.click("Blocker Points - Edit Resume",PRODUCT_NAME),K(re),$(setActiveResume({jobProfileId:J,resumeId:re,blockerPoints:oe,resumeName:ae})),$(setChecklistOpen({syncWithBlockerPoints:!0}))};return React.createElement(Card$1,{size:"small",rootClassName:styles$l.resumeChoiceOptionLabelCard},React.createElement(Flex$1,{gap:8,className:styles$l.resumeChoiceOptionLabelCardHeader},ne&&React.createElement(ExclamationCircleTwoTone$1,{twoToneColor:"#FAAD14"}),!ne&&React.createElement(CheckCircleTwoTone$1,{twoToneColor:"#52c41a"}),React.createElement(Typography$1.Text,null,ne?`Improvements to be made (${ie})`:"No improvements to be made"),React.createElement(Button$2,{type:"link",className:styles$l.resumeChoiceOptionLabelEditButton,onClick:ue},"Edit"),ne&&React.createElement(Button$2,{type:"text",className:styles$l.resumeChoiceOptionLabelCollapseButton,onClick:se},F?React.createElement(DownOutlined$1,null):React.createElement(UpOutlined$1,null))),!F&&React.createElement("ul",{className:styles$l.resumeChoiceOptionLabelImprovementsList},oe.map((de,le)=>React.createElement("li",{key:le},de))))}pdfExports.GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfExports.version}/pdf.worker.min.js`;const MAX_RETRY_COUNT=6;function ResumeChoiceOptionLabel({value:C}){var se,ue;const{selectedResume:$,setSelectedResume:F,jobProfileId:V}=useApplicationFormContext(),K=reactRedux.useSelector(de=>{var le;return(le=de.scalantCareerHub.resumeFitment)==null?void 0:le.fitmentScore}),{resume_details:J,is_blocker:ee}=C||{},{id:te,name:ne,modified_at:re}=J||{},ae=$===te&&!ee,oe=(ue=(se=K==null?void 0:K[V])==null?void 0:se[te])==null?void 0:ue.score,ie=()=>{F(te)};return React.createElement(Radio$1,{onChange:ie,checked:ae,className:classNames(styles$l.resumeChoiceOptionLabel,{[styles$l.resumeChoiceOptionLabelChecked]:ae}),disabled:ee},React.createElement(Flex$1,{vertical:!0,gap:12,className:styles$l.resumeChoiceOptionLabelContent},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{vertical:!0,gap:4},React.createElement(Typography$1.Text,{className:styles$l.resumeChoiceOptionLabelName},ne),React.createElement(Typography$1.Text,{className:styles$l.resumeChoiceOptionLabelModifiedAt},"Last Modified: ",toDDMMYY(re))),React.createElement(FitmentScore,{score:oe})),React.createElement(BlockerPoints,{value:C})))}function ResumePreview(){const[C,$]=React.useState(0),{selectedResume:F}=useApplicationFormContext(),{data:V,isFetching:K}=useGetResumeLinkQuery({resumeId:F},{skip:!F}),J=ee=>{C<MAX_RETRY_COUNT?setTimeout(()=>{$(C+1)},1e3):console.error("Error while loading pdf! ",ee.message)};return!(V!=null&&V.link)||K?React.createElement(Skeleton$1,{active:!0}):React.createElement(Document$1,{className:styles$l.resumePreview,file:V==null?void 0:V.link,loading:React.createElement(Skeleton$1,{active:!0}),onLoadError:J,error:React.createElement(Skeleton$1,{active:!0}),key:C},React.createElement(Page$1,{pageNumber:1}))}function ResumeChoiceSelect(){const{setSelectedResume:C}=useApplicationFormContext(),{jobProfileId:$}=useApplicationFormContext(),{data:F,isLoading:V}=useGetResumesEligibilityQuery({jobProfileId:$});return React.useEffect(()=>{var J,ee;if(!F)return;const K=(ee=(J=Object.values(F).find(te=>{var ne;return((ne=te==null?void 0:te.resume_details)==null?void 0:ne.default)&&!(te!=null&&te.is_blocker)}))==null?void 0:J.resume_details)==null?void 0:ee.id;C(K)},[F,C]),V||!F?React.createElement(Skeleton$1,{active:!0}):React.createElement(Flex$1,{className:styles$l.container},React.createElement(Flex$1,{flex:1,vertical:!0,gap:16},Object.entries(F).map(([K,J])=>React.createElement(ResumeChoiceOptionLabel,{key:K,value:J}))),React.createElement(Flex$1,{className:styles$l.resumePreviewContainer,flex:1},React.createElement(ResumePreview,null)))}const fitmentService=careerHubApi.injectEndpoints({endpoints:C=>({getFitment:C.query({query:({jobProfileId:$})=>({url:"/api/v3/user-resumes/job-fitment-evaluation",params:{job_profile_id:$},method:"POST"})})})}),{useGetFitmentQuery}=fitmentService,container$3="_container_12d5d_1",icon="_icon_12d5d_6",title$1="_title_12d5d_11",description$1="_description_12d5d_17",styles$k={container:container$3,icon,title:title$1,description:description$1},EVALUATION_COMPLETION_TIMEOUT=3e4;function ResumeFitmentCheck(){const{jobProfileId:C,setStepName:$}=useApplicationFormContext(),{isError:F}=useGetFitmentQuery({jobProfileId:C}),{data:V}=useGetResumesEligibilityQuery({jobProfileId:C}),{fitmentScore:K}=reactRedux.useSelector(J=>J.scalantCareerHub.resumeFitment)||{};return React.useEffect(()=>{const J=Object.keys(V||{});J.length>0&&Object.keys((K==null?void 0:K[C])||{}).length===J.length&&$(APPLICATION_STATUS.RESUME_CHOICE_SELECT)},[K,C,V,$]),React.useEffect(()=>{const J=setTimeout(()=>{$(APPLICATION_STATUS.RESUME_CHOICE_SELECT)},EVALUATION_COMPLETION_TIMEOUT);return()=>clearTimeout(J)},[$]),React.useEffect(()=>{F&&(message$1.error("Failed to evaluate job fitment"),$(APPLICATION_STATUS.RESUME_CHOICE_SELECT))},[F,$]),React.createElement(Flex$1,{vertical:!0,gap:8,className:styles$k.container,justify:"center",align:"center"},React.createElement(FileTextTwoTone$1,{size:72,className:styles$k.icon}),React.createElement(Typography$1.Text,{className:styles$k.title,strong:!0},"Analysing the Right Resume for you to Apply!"),React.createElement(Typography$1.Text,{className:styles$k.description},"Receive instant insights and a fitment score to know which resume works best. Fix key gaps and boost your chances of getting noticed by top companies"))}const container$2="_container_fpxq0_1",footer="_footer_fpxq0_8",footerText="_footerText_fpxq0_12",styles$j={container:container$2,footer,footerText},NOTIFICATION_KEY="resume-fitment-checklist",Description=()=>{const{activeResumeChecklist:C}=reactRedux.useSelector($=>$.scalantCareerHub.resumeFitment)||{};return React.createElement(Flex$1,{vertical:!0,gap:8},C.map(($,F)=>React.createElement(Checkbox$1,null,React.createElement(Typography$1.Text,{key:F},$))))},Footer=({closeNotification:C})=>React.createElement(Flex$1,{justify:"space-between",className:styles$j.footer},React.createElement(Flex$1,{gap:4,align:"center"},React.createElement(CheckCircleFilled$1,{style:{color:"#20A164"}}),React.createElement(Typography$1.Text,{className:styles$j.footerText},"When your resume is ready")),React.createElement(Button$2,{type:"primary",onClick:C},"Proceed to Apply"));function ResumeFitmentChecklist(){const C=reactRedux.useDispatch(),[$,F]=notification$1.useNotification(),{activeResumeChecklist:V,activeResumeName:K,isChecklistOpen:J}=reactRedux.useSelector(oe=>oe.scalantCareerHub.resumeFitment)||{},{setActiveApplicationId:ee,jobId:te,analytics:ne}=useJobPreview(),re=React.useCallback(()=>{$.destroy(NOTIFICATION_KEY),ee(te),C(setChecklistOpen({isOpen:!1})),ne==null||ne.click("Resume Fitment Checklist - Close",PRODUCT_NAME)},[ne,C,te,ee,$]),ae=React.useCallback(()=>{!K||!(V!=null&&V.length)||($.warning({key:NOTIFICATION_KEY,message:K,placement:"bottomRight",description:React.createElement(Description,null),onClose:re,closeIcon:null,duration:null,btn:React.createElement(Footer,{closeNotification:re}),className:styles$j.container}),ne==null||ne.click("Resume Fitment Checklist - Open",PRODUCT_NAME))},[V,K,$,re,ne]);return React.useEffect(()=>{J?ae():re()},[J,ae,re]),F}const screeningCallService=careerHubApi.injectEndpoints({endpoints:C=>({issueScreeningCall:C.mutation({query:()=>({url:"/api/v3/careers-hub/screening-call/",method:"POST"})})})}),{useIssueScreeningCallMutation}=screeningCallService,screeningCallBanner="_screeningCallBanner_1ltmt_1",screeningCallIcon="_screeningCallIcon_1ltmt_7",screeningCallButtonIcon="_screeningCallButtonIcon_1ltmt_12",styles$i={screeningCallBanner,screeningCallIcon,screeningCallButtonIcon},ScreeningCallBanner=({forceShow:C=!1})=>{var oe;const $=reactRedux.useSelector(ie=>ie.scalantCareerHub.dashboard.userProfileData),F=(oe=$==null?void 0:$.hasCompletedScreeningCall)!=null?oe:!1,{analytics:V,jobData:K,currentTab:J}=useJobPreview(),{applicationStatus:ee}=K||{},te=ee===APPLICATION_STATUS.WITHDRAWN,[ne,{isLoading:re}]=useIssueScreeningCallMutation(),ae=React.useCallback(()=>sr(this,null,function*(){var se;const ie=yield ne();(se=ie==null?void 0:ie.data)!=null&&se.url?globalThis.open(ie.data.url,"_blank"):message$1.error("Failed to initiate screening call. Please try again."),V==null||V.click("Screening Call - Take Call",PRODUCT_NAME)}),[V,ne]);return F||!C&&(J!==TAG_TO_TAB_MAPPING.applied||te)?null:React.createElement(ActionBanner,{icon:React.createElement("img",{src:ICONS.airplay,className:styles$i.screeningCallIcon}),title:"Complete your 5-minute Screening Call now",description:"Verify your details with a quick screening call and become a priority applicant for us",buttonText:"Take Call",buttonIcon:React.createElement(PhoneOutlined$1,{className:styles$i.screeningCallButtonIcon}),className:styles$i.screeningCallBanner,onClick:ae,isLoading:re})},container$1="_container_16lhm_1",likeBadge="_likeBadge_16lhm_12",description="_description_16lhm_18",styles$h={container:container$1,likeBadge,description},SuccessScreen=()=>React.createElement(Flex$1,{vertical:!0,className:styles$h.container},React.createElement("img",{src:ICONS.likeBadge,alt:"like-badge",className:styles$h.likeBadge}),React.createElement(Typography$1.Title,{level:3},"Application Submitted successfully!"),React.createElement(Typography$1.Text,{className:styles$h.description},"Your job application has now been received by the team, you can track your status within the job details itself"),React.createElement(ScreeningCallBanner,{forceShow:!0}));function FormStep(){const{stepName:C}=useApplicationFormContext();switch(C){case APPLICATION_STATUS.APPLICATION_FORM:return React.createElement(ApplicationForm,null);case APPLICATION_STATUS.RESUME_FITMENT_CHECK:return React.createElement(ResumeFitmentCheck,null);case APPLICATION_STATUS.RESUME_CHOICE_SELECT:return React.createElement(ResumeChoiceSelect,null);case APPLICATION_STATUS.SUCCESSFULLY_APPLIED:return React.createElement(SuccessScreen,null);default:return null}}function FormContainer({onClose:C,currentTab:$,jobProfileId:F,utmId:V,utmMedium:K,utmSource:J,onUploadFile:ee,onEditResume:te,onAddResume:ne}){const[re,ae]=React.useState(!1),{data:oe,isLoading:ie}=useCreateApplication({jobProfileId:F,utmMedium:K,utmSource:J,currentTab:$,utmId:V}),{applicationId:se,status:ue}=oe||{},de=()=>{C(),ae(!1)};return React.useEffect(()=>{ae(!!F)},[F]),React.createElement(ApplicationFormProvider,{onUploadFile:ee,stepName:ue,jobProfileId:F,applicationId:se,onEditResume:te,onAddResume:ne},React.createElement(Drawer$1,{closable:!1,loading:ie,open:re,placement:"bottom",height:600,title:React.createElement(FormHeader,{onClose:de}),footer:React.createElement(Footer$1,{onCancel:de})},React.createElement(FormStep,null)),React.createElement(ResumeFitmentChecklist,null))}FormContainer.propTypes={currentTab:PropTypes.string.isRequired,jobProfileId:PropTypes.number.isRequired,utmId:PropTypes.string,utmMedium:PropTypes.string,utmSource:PropTypes.string};const JobApplicationForm=({currentTab:C,onUploadFile:$,onEditResume:F,onAddResume:V})=>{const{activeApplicationId:K,setActiveApplicationId:J}=useJobPreview(),ee=()=>{J(null)};return K?React.createElement(FormContainer,{onUploadFile:$,jobProfileId:K,onClose:ee,currentTab:C,onEditResume:F,onAddResume:V}):null},container="_container_kgogb_1",actionAlert="_actionAlert_kgogb_14",ineligible="_ineligible_kgogb_24",stepsToApply="_stepsToApply_kgogb_29",actionAlertIcon="_actionAlertIcon_kgogb_35",actionAlertTitle="_actionAlertTitle_kgogb_46",eligible="_eligible_kgogb_52",title="_title_kgogb_57",highlightsList="_highlightsList_kgogb_64",keywordsList="_keywordsList_kgogb_72",keyword="_keyword_kgogb_72",exceptions="_exceptions_kgogb_101",exceptionsIconContainer="_exceptionsIconContainer_kgogb_107",exceptionsIcon="_exceptionsIcon_kgogb_107",exceptionsTitle="_exceptionsTitle_kgogb_116",exception="_exception_kgogb_101",exceptionItem="_exceptionItem_kgogb_124",exceptionsList="_exceptionsList_kgogb_131",styles$g={container,actionAlert,ineligible,stepsToApply,actionAlertIcon,actionAlertTitle,eligible,title,highlightsList,keywordsList,keyword,exceptions,exceptionsIconContainer,exceptionsIcon,exceptionsTitle,exception,exceptionItem,exceptionsList},ActionAlert=({eligibilityStatus:C,metric:$,onScrollToEnd:F})=>{const{analytics:V,setActiveTab:K}=useJobPreview(),J=()=>{K(JOB_BODY_TABS.REQUIREMENTS.key),F(),V==null||V.click("Job Highlights - Complete Tasks",PRODUCT_NAME)};return C===ELIGIBILITY_TYPES.ineligible?React.createElement("div",{className:classNames(styles$g.actionAlert,styles$g.ineligible)},React.createElement(ExclamationCircleOutlined$1,null),React.createElement("span",{className:styles$g.actionAlertTitle},"Unfortunately! Your profile does not have the relevant years of experience for this role")):C===ELIGIBILITY_TYPES.steps_to_apply?React.createElement(ActionBanner,{icon:React.createElement(ClockCircleTwoTone$1,{className:styles$g.actionAlertIcon}),title:`Eligible to apply in ${$} more steps!`,description:"Complete these three test to become eligible to apply!",buttonText:"Complete Tasks",buttonIcon:React.createElement(EditOutlined$1,null),className:styles$g.stepsToApply,onClick:J}):null},HighlightsList=({highlights:C})=>React.createElement(React.Fragment,null,React.createElement("div",{className:styles$g.title},"Top Reasons to Apply"),React.createElement("ul",{className:styles$g.highlightsList},C==null?void 0:C.map($=>React.createElement("li",{key:$,className:styles$g.highlight},React.createElement("span",{className:styles$g.highlightText},$))))),Keywords=({keywords:C,eligibilityStatus:$})=>React.createElement("div",{className:styles$g.keywordsList},C==null?void 0:C.map((F,V)=>React.createElement("div",{key:V,className:classNames(styles$g.keyword,styles$g[toCamelCase($)])},F))),Exceptions=({exceptionalJob:C})=>{if(!C)return null;const $=["Considering your current profile and preferences, you seem to be a right fit","Which means that you get to apply to this job irrespective of the requirements mentioned below","So in case this matches what you are looking for, please apply"];return React.createElement("div",{className:styles$g.exceptions},React.createElement("div",{className:styles$g.exceptionsIconContainer},React.createElement(StarTwoTone$1,{size:20,twoToneColor:"#FAAD14",className:styles$g.exceptionsIcon})),React.createElement("div",null,React.createElement("div",{className:styles$g.exceptionsTitle},"We've made an exception for you!"),React.createElement("ul",{className:styles$g.exceptionsList},$.map((F,V)=>React.createElement("li",{className:[styles$g.exception],key:V},F)))))},JobHighlights=()=>{const{jobData:C,highlights:$,eligibilityCriteria:F,currentTab:V}=useJobPreview(),K=React.useRef(null),{highlights:J,keywords:ee}=$||(C==null?void 0:C.highlights)||{},{tag:te,count:ne}=determineJobTag(C,F||{}),re=()=>{if(K.current&&typeof window!="undefined"){const oe=K.current.getBoundingClientRect(),ie=oe.top+window.pageYOffset,se=oe.height,ue=window.innerHeight,de=ie+se-ue/2;window.scrollTo({top:de,behavior:"smooth"})}};return V===TAG_TO_TAB_MAPPING.applied||!(J!=null&&J.length)?null:React.createElement("div",{ref:K,className:classNames(styles$g.container,styles$g[te])},React.createElement(ActionAlert,{eligibilityStatus:te,metric:ne,onScrollToEnd:re}),React.createElement(HighlightsList,{highlights:J}),React.createElement(Keywords,{keywords:ee,eligibilityStatus:te}),React.createElement(Exceptions,{exceptionalJob:C==null?void 0:C.exceptionalJob}))},expandedJobView="_expandedJobView_1lt4c_2",loadingCard="_loadingCard_1lt4c_18",styles$f={expandedJobView,loadingCard},ExpandedJobViewContent=()=>React.createElement("div",{className:styles$f.expandedJobView},React.createElement(ExpandedJobViewHeader,null),React.createElement(JobHighlights,null),React.createElement(ScreeningCallBanner,null),React.createElement(InterviewExperiencesBanner,null),React.createElement(ExpandedJobViewBody,null)),ExpandedJobView=({analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,isActive:J,currentTab:ee,onUploadFile:te,onEditResume:ne,onAddResume:re})=>{var ue;const{data:ae,isLoading:oe,isFetching:ie,error:se}=useGetJobPreviewQuery(K,{skip:!K||!J});return!J||!K?null:oe||ie?React.createElement(Card$1,{className:`${styles$f.expandedJobView} ${styles$f.loadingCard}`},React.createElement(Spin$1,{size:"large"})):se?React.createElement(Card$1,{className:styles$f.expandedJobView},React.createElement(Alert$1,{type:"error",message:"Failed to load job details",description:((ue=se==null?void 0:se.data)==null?void 0:ue.message)||(se==null?void 0:se.message)||"Please try again later",showIcon:!0})):ae?React.createElement(App$1,null,React.createElement(JobPreviewProvider,{analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,skip:!J,currentTab:ee},React.createElement(ExpandedJobViewContent,null),React.createElement(JobApplicationForm,{currentTab:ee,onUploadFile:te,onEditResume:ne,onAddResume:re}))):null},jobDetails="_jobDetails_1gavc_1",styles$e={jobDetails};function JobDetails({analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,className:J,onUploadFile:ee,currentTab:te,onEditResume:ne,onAddResume:re}){return React.useEffect(()=>{K&&(C==null||C.view("Job Details - Render",PRODUCT_NAME,{jobId:K,currentTab:te}))},[C,te,K]),K?React.createElement("div",{className:classNames(styles$e.jobDetails,J)},React.createElement(ExpandedJobView,{analytics:C,onUploadFile:ee,country:$,openMockInterviewModal:F,openResume:V,jobId:K,isActive:!!K,currentTab:te,onEditResume:ne,onAddResume:re})):null}JobDetails.propTypes={country:PropTypes.string,openMockInterviewModal:PropTypes.func,openResume:PropTypes.func,jobId:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),className:PropTypes.string},JobDetails.defaultProps={jobId:null,className:""};const transformJobsData=C=>{if(!C||!(C!=null&&C.data)||!Array.isArray(C==null?void 0:C.data))return[];const $={};return C!=null&&C.included&&Array.isArray(C==null?void 0:C.included)&&(C==null||C.included.forEach(F=>{F.type==="company"&&F.attributes&&($[F.id]=F.attributes)})),C==null?void 0:C.data.map(F=>{if(F.type!=="job_profile"||!F.attributes)return null;const V=F.attributes,K=F.relationships||{};let J=null;if(K.company&&K.company.data){const te=K.company.data.id;J=$[te]||null}return{id:parseInt(F.id,10),title:V.title||"",name:V.title||"",slug:V.slug||"",jobDesc:V.job_desc||"",jobDescText:V.job_desc_text||"",minExperience:V.min_experience?parseFloat(V.min_experience):null,maxExperience:V.max_experience?parseFloat(V.max_experience):null,minCtc:V.min_ctc?parseFloat(V.min_ctc):null,maxCtc:V.max_ctc?parseFloat(V.max_ctc):null,validTill:V.valid_till||null,createdAt:V.created_at||null,jobType:V.job_type||null,preferredCities:V.preferred_cities||"",preferredNoticePeriod:V.preferred_notice_period||null,meritBasedSkills:V.merit_based_skills||[],contestSkills:V.contest_skills||[],applicationStatus:V.application_status||null,expiry:V.expiry||null,applicationId:V.application_id||null,userCompanyStatus:V.user_company_status||null,applicationLastUpdatedAt:V.application_last_upated_at||null,jobSource:V.job_source||null,jobProfileId:V.job_profile_id||null,jobProfileStatus:V.job_profile_status||"active",datePostedOn:V.date_posted_on||null,openForDiscussionCtc:V.open_for_discussion_ctc||!1,appliedOn:V.applied_on||null,seniorityLevel:V.seniority_level||null,roleType:V.role_type||"full_time",duration:V.duration||null,stipend:V.stipend||null,eligibilityCriteria:V.eligibility_criteria||{is_eligible:!1,reasons:[]},exceptionalJob:V.exceptional_job||!1,isRelevant:V.is_relevant||!1,isInternship:V.role_type==="internship",company:J?[parseInt(K.company.data.id,10)]:[],logo:(J==null?void 0:J.logo)||null,companyName:(J==null?void 0:J.name)||null,companySlug:(J==null?void 0:J.slug)||null,companyLocation:(J==null?void 0:J.location)||null,companyWebsite:(J==null?void 0:J.company_website)||null,companyVision:(J==null?void 0:J.company_vision)||null,companyTagline:(J==null?void 0:J.tagline)||null,companyCategory:(J==null?void 0:J.category)||null,companyEmployeeCount:(J==null?void 0:J.employee_count)||null}}).filter(Boolean)},createCompaniesMap=C=>{const $={};return C!=null&&C.included&&Array.isArray(C.included)&&C.included.forEach(F=>{F.type==="company"&&F.attributes&&($[F.id]=Hn({id:F.id},F.attributes))}),$},normalizeJobsResponse=(C={})=>{var J,ee,te,ne;const $=C.jobs_data||C,F=transformJobsData($),V=createCompaniesMap($),K=(ne=(te=(J=C.total_entries)!=null?J:$.total_entries)!=null?te:(ee=$==null?void 0:$.meta)==null?void 0:ee.total_entries)!=null?ne:null;return{jobs:F,companiesMap:V,results:F,totalEntries:K}},jobsService=careerHubApi.injectEndpoints({endpoints:C=>({fetchAllJobs:C.query({query:($={})=>({url:"/job-tracker/fetch-all-jobs/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["Jobs"]}),fetchPipelineJobs:C.query({query:($={})=>({url:"/job-tracker/fetch-pipeline-jobs/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["PipelineJobs"]}),fetchRelevantJobs:C.query({query:($={})=>({url:"/job-tracker/relevancy/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["RelevantJobs"]})})}),{useFetchAllJobsQuery,useFetchPipelineJobsQuery,useFetchRelevantJobsQuery}=jobsService,header$1="_header_t7ugs_1",jobTitle="_jobTitle_t7ugs_6",titleContainer="_titleContainer_t7ugs_14",titleContainerExpanded="_titleContainerExpanded_t7ugs_19",titleContainerCollapsed="_titleContainerCollapsed_t7ugs_23",companyName="_companyName_t7ugs_27",actions="_actions_t7ugs_32",styles$d={header:header$1,jobTitle,titleContainer,titleContainerExpanded,titleContainerCollapsed,companyName,actions},{Title:Title$1,Text:Text$2}=Typography$1,JobTitleAndCompany=({title:C,companyName:$,isExpanded:F})=>React.createElement(Space$1,{direction:"vertical",size:4,className:classNames(styles$d.titleContainer,{[styles$d.titleContainerExpanded]:F,[styles$d.titleContainerCollapsed]:!F})},React.createElement(Title$1,{level:5,className:styles$d.jobTitle,ellipsis:{rows:1}},C),React.createElement(Text$2,{ellipsis:!0,className:styles$d.companyName},$));JobTitleAndCompany.propTypes={title:PropTypes.string.isRequired,companyName:PropTypes.string.isRequired,isExpanded:PropTypes.bool},JobTitleAndCompany.defaultProps={isExpanded:!1};const tag="_tag_5fhgn_1",styles$c={tag},ICON_MAP={CheckCircleOutlined:CheckCircleOutlined$1,CloseCircleOutlined:CloseCircleOutlined$1,ClockCircleOutlined:ClockCircleOutlined$1,RocketOutlined:RocketOutlined$1},EligibilityTag=({jobData:C,currentTab:$})=>{const F=determineJobTag(C,C.eligibilityCriteria);if(!F)return null;const V=ICON_MAP[F.icon];return React.createElement(Tag$1,{icon:V&&React.createElement(V,null),color:F.antdColor,className:styles$c.tag,style:F.tag==="expired"?{color:F.color,borderColor:F.color}:{}},F.text)};EligibilityTag.propTypes={jobData:PropTypes.shape({isRelevant:PropTypes.bool,expiry:PropTypes.string,jobProfileStatus:PropTypes.string,eligibilityCriteria:PropTypes.shape({isEligible:PropTypes.bool,reasons:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string,isEligible:PropTypes.bool,data:PropTypes.object}))})}).isRequired,currentTab:PropTypes.string},EligibilityTag.defaultProps={currentTab:"all"};const JobCardActions=({jobData:C,currentTab:$})=>React.createElement("div",{className:styles$d.actions},React.createElement(EligibilityTag,{jobData:C,currentTab:$}));JobCardActions.propTypes={jobData:PropTypes.object.isRequired,currentTab:PropTypes.string},JobCardActions.defaultProps={currentTab:"all"};const JobCardHeader=({jobData:C,companiesList:$,currentTab:F,isExpanded:V})=>{var J;const K=C.companyName||C.company&&C.company[0]&&((J=$[C.company[0]])==null?void 0:J.name)||"";return React.createElement(Row$1,{gutter:[12,8],className:styles$d.header},React.createElement(Col$1,{flex:"auto"},React.createElement(Row$1,{gutter:12,align:"top",wrap:!1},React.createElement(Col$1,null,React.createElement(CompanyLogo,{logo:C.logo,company:C.company,companiesList:$,companyName:K})),React.createElement(Col$1,{flex:"auto"},React.createElement(JobTitleAndCompany,{title:C.title,companyName:K,isExpanded:V})))),React.createElement(Flex$1,null,React.createElement(JobCardActions,{jobData:C,currentTab:F})))};JobCardHeader.propTypes={jobData:PropTypes.object.isRequired,companiesList:PropTypes.object,currentTab:PropTypes.string,isExpanded:PropTypes.bool},JobCardHeader.defaultProps={companiesList:{},currentTab:"all",isExpanded:!1};const saveButton="_saveButton_1g9sw_1",savedButton="_savedButton_1g9sw_12",styles$b={saveButton,savedButton},SaveButton=({analytics:C,jobProfileId:$,applicationStatus:F,applicationLastUpdatedAt:V,onSave:K,disabled:J=!1})=>{const[ee,te]=React.useState(!1),ne=reactRedux.useSelector(ie=>{var se,ue,de;return(de=(ue=(se=ie.scalantCareerHub)==null?void 0:se.savedJobs)==null?void 0:ue.savedJobs)==null?void 0:de[$]}),re=ne?ne.status==="Saved":F==="Saved",ae=(ne==null?void 0:ne.lastUpdatedAt)||V,oe=ie=>sr(this,null,function*(){if(ie.stopPropagation(),!re){C==null||C.click("Job Card - Save",PRODUCT_NAME),te(!0);try{yield K($,"save")}catch(se){}finally{te(!1)}}});return re&&ae?React.createElement(Button$2,{type:"text",icon:React.createElement(SaveTwoTone$1,{twoToneColor:"#8c8c8c"}),onClick:oe,disabled:!0,className:styles$b.savedButton,style:{color:"#8c8c8c"},size:"small"},"Saved on ",formatDate(ae)):React.createElement(Button$2,{type:"text",icon:React.createElement(SaveOutlined$1,{twoToneColor:"#006AFF"}),onClick:oe,disabled:J||ee,loading:ee,className:styles$b.saveButton,size:"small"},re?"Saved":"Save")};SaveButton.propTypes={analytics:PropTypes.object,jobProfileId:PropTypes.number.isRequired,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string,onSave:PropTypes.func.isRequired,disabled:PropTypes.bool},SaveButton.defaultProps={applicationStatus:"Not Applied",applicationLastUpdatedAt:null,disabled:!1};const body="_body_10o1d_1",detailsRowContainer="_detailsRowContainer_10o1d_7",detailsRow="_detailsRow_10o1d_7",detailText="_detailText_10o1d_23",saveButtonWrapper="_saveButtonWrapper_10o1d_29",styles$a={body,detailsRowContainer,detailsRow,detailText,saveButtonWrapper},{Text:Text$1}=Typography$1,DetailItem=({text:C})=>C?React.createElement(Text$1,{className:styles$a.detailText},C):null;DetailItem.propTypes={text:PropTypes.string};const JobDetailsRow=({analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J})=>{const{preferredCities:ee,minExperience:te,maxExperience:ne,minCtc:re,maxCtc:ae,openForDiscussionCtc:oe,isInternship:ie,stipend:se,preferredNoticePeriod:ue}=$,de=formatLocation(ee),le=J===null&&F.isExperienceCtcAvailable?formatExperience$1(te,ne):null,ve=F.isExperienceCtcAvailable?formatCtc({minCtc:re,maxCtc:ae,openForDiscussionCtc:oe,isInternship:ie,stipend:se,userCountry:V}):null,me=J===null&&F.isNoticePeriodAvailable?formatNoticePeriod(ue):null,he=[de&&{text:de},le&&{text:le},ve&&{text:ve},me&&{text:me}].filter(Boolean);return React.createElement("div",{className:styles$a.detailsRowContainer},he.length>0&&React.createElement(Space$1,{split:React.createElement(Divider$1,{type:"vertical"}),className:styles$a.detailsRow},he.map((pe,ce)=>React.createElement(DetailItem,{key:ce,text:pe.text}))),React.createElement("div",{className:styles$a.saveButtonWrapper},React.createElement(SaveButton,{analytics:C,jobProfileId:$.id,applicationStatus:$.applicationStatus,applicationLastUpdatedAt:$.applicationLastUpdatedAt,onSave:K})))};JobDetailsRow.propTypes={analytics:PropTypes.object,jobData:PropTypes.shape({id:PropTypes.number.isRequired,preferredCities:PropTypes.string,minExperience:PropTypes.number,maxExperience:PropTypes.number,minCtc:PropTypes.number,maxCtc:PropTypes.number,openForDiscussionCtc:PropTypes.bool,isInternship:PropTypes.bool,stipend:PropTypes.string,preferredNoticePeriod:PropTypes.number,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string}).isRequired,cardConfig:PropTypes.shape({isExperienceCtcAvailable:PropTypes.bool,isNoticePeriodAvailable:PropTypes.bool}).isRequired,userCountry:PropTypes.oneOf(["IN","US"]),onSave:PropTypes.func.isRequired,selectedJobId:PropTypes.number},JobDetailsRow.defaultProps={userCountry:"IN",selectedJobId:null};const JobCardBody=({analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J})=>React.createElement("div",{className:styles$a.body},React.createElement(JobDetailsRow,{analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J}));JobCardBody.propTypes={analytics:PropTypes.object,jobData:PropTypes.object.isRequired,cardConfig:PropTypes.object.isRequired,userCountry:PropTypes.oneOf(["IN","US"]),onSave:PropTypes.func.isRequired,selectedJobId:PropTypes.number},JobCardBody.defaultProps={userCountry:"IN",selectedJobId:null};const jobCard="_jobCard_1u5oy_1",expired="_expired_1u5oy_12",active="_active_1u5oy_15",archived="_archived_1u5oy_29",cardContent="_cardContent_1u5oy_38",styles$9={jobCard,expired,active,archived,cardContent},JobCard=({analytics:C,jobData:$,isActive:F,currentTab:V,onClick:K,onSave:J,companiesList:ee,userCountry:te,className:ne,selectedJobId:re})=>{const{cardConfig:ae,shouldShowBody:oe}=useJobCardState({currentTab:V,isActive:F,jobData:$}),ie=()=>{C==null||C.click("Job Card - Click",PRODUCT_NAME),K&&K($.id)};return React.createElement(Card$1,{className:classNames(styles$9.jobCard,{[styles$9.active]:F,[styles$9.archived]:$.applicationStatus==="Archived"},ne),onClick:ie},React.createElement("div",{className:styles$9.cardContent},React.createElement(JobCardHeader,{jobData:$,companiesList:ee,currentTab:V,isExpanded:!re}),oe&&React.createElement(JobCardBody,{analytics:C,jobData:$,cardConfig:ae,userCountry:te,onSave:J,selectedJobId:re})))};JobCard.propTypes={analytics:PropTypes.object,jobData:PropTypes.shape({id:PropTypes.number.isRequired,title:PropTypes.string.isRequired,name:PropTypes.string.isRequired,company:PropTypes.arrayOf(PropTypes.number),logo:PropTypes.string,preferredCities:PropTypes.string,expiry:PropTypes.string,jobProfileStatus:PropTypes.string,isRelevant:PropTypes.bool,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string,minExperience:PropTypes.number,maxExperience:PropTypes.number,minCtc:PropTypes.number,maxCtc:PropTypes.number,preferredNoticePeriod:PropTypes.number,openForDiscussionCtc:PropTypes.bool,isInternship:PropTypes.bool,stipend:PropTypes.string,eligibilityCriteria:PropTypes.shape({isEligible:PropTypes.bool,reasons:PropTypes.arrayOf(PropTypes.object)})}).isRequired,isActive:PropTypes.bool,currentTab:PropTypes.string,onClick:PropTypes.func,onSave:PropTypes.func.isRequired,companiesList:PropTypes.object,userCountry:PropTypes.oneOf(["IN","US"]),className:PropTypes.string,selectedJobId:PropTypes.number},JobCard.defaultProps={isActive:!1,currentTab:"all",onClick:null,companiesList:{},userCountry:"IN",className:""};const heading="_heading_bj7g7_1",spinner="_spinner_bj7g7_8",alert="_alert_bj7g7_14",header="_header_bj7g7_18",sentinel="_sentinel_bj7g7_23",loadingMore="_loadingMore_bj7g7_30",jobsList="_jobsList_bj7g7_39",noJobsContainer="_noJobsContainer_bj7g7_45",noJobsImage="_noJobsImage_bj7g7_55",noJobsHeading="_noJobsHeading_bj7g7_59",styles$8={heading,spinner,alert,header,sentinel,loadingMore,jobsList,noJobsContainer,noJobsImage,noJobsHeading},{Title,Text}=Typography$1,TAB_HEADINGS={[TAG_TO_TAB_MAPPING.relevant]:"Preferred Jobs",[TAG_TO_TAB_MAPPING.all]:"All Jobs",[TAG_TO_TAB_MAPPING.saved]:"Saved Jobs",[TAG_TO_TAB_MAPPING.applied]:"Applied Jobs"};function JobsList({analytics:C,className:$,currentTab:F,jobs:V=[],companiesMap:K={},isLoading:J=!1,error:ee=null,isFetchingMore:te=!1,hasMore:ne=!0}){var fe;const re=reactRedux.useDispatch(),ae=reactRedux.useSelector(ye=>{var _e,ge;return((ge=(_e=ye.scalantCareerHub)==null?void 0:_e.dashboard)==null?void 0:ge.processCounts)||{}}),oe=ne!==void 0?ne:!0,[ie]=useUpdateApplicationStatusMutation(),{selectedJobId:se,updateJobId:ue,updateTab:de}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),{sentinelRef:le}=useInfiniteScroll({hasMore:oe,isLoading:J,isFetchingMore:te});React.useEffect(()=>{V&&V.length>0&&re(initializeSavedJobs(V))},[V,re]),React.useEffect(()=>{if(V&&V.length>0){const _e=new URLSearchParams(window.location.search).get("job_ids");if(_e){const ge=Number(_e),be=V.find(Se=>Se.id===ge||Se.jobProfileId===ge||String(Se.id)===_e||String(Se.jobProfileId)===_e);be&&se!==be.id&&ue(be.id)}}},[V,se,ue]);const ve=ye=>{C==null||C.click("Jobs List - Job Card Click",PRODUCT_NAME),se===ye?(ue(null),re(updateFormFilters({job_ids:null}))):ue(ye)},me=(ye,_e)=>sr(this,null,function*(){if(_e!=="save")return;const be=yield ie({job_profile_id:ye,update_action:"save"}).unwrap();return re(setJobSavedStatus({jobId:ye,status:"Saved",lastUpdatedAt:(be==null?void 0:be.applicationLastUpdatedAt)||new Date().toISOString()})),be}),he=()=>{C==null||C.click("Jobs List - Go to All Jobs",PRODUCT_NAME),de(TAG_TO_TAB_MAPPING.all)},pe=TAB_HEADINGS[F]||TAB_HEADINGS[TAG_TO_TAB_MAPPING.all],ce=()=>ae[F]||0;return J?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement(Spin$1,{size:"large",className:styles$8.spinner})):ee?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.header},React.createElement(Alert$1,{message:"Error loading jobs",description:((fe=ee==null?void 0:ee.data)==null?void 0:fe.message)||(ee==null?void 0:ee.message)||"Failed to fetch jobs. Please try again later.",type:"error",showIcon:!0,className:styles$8.alert}))):!V||V.length===0?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.noJobsContainer},React.createElement("img",{src:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/171/464/original/3cd470a8085619f7775acfa9e3f15053ee5eb687.png?1766383387",alt:"No Jobs Found",className:styles$8.noJobsImage}),React.createElement(Title,{level:3,className:styles$8.noJobsHeading},"No Suitable Roles Available at the Moment"),React.createElement(Text,{className:styles$8.noJobsText},"Your current preferences do not match any active opportunities, Please visit the All Jobs section to explore existing job opportunities."),React.createElement(Button$2,{type:"primary",onClick:he},"Go to All Jobs ",React.createElement(RightOutlined$1,null)))):React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.jobsList},V.map(ye=>React.createElement(JobCard,{key:ye.id,jobData:ye,isActive:se===ye.id,currentTab:F,analytics:C,onClick:ve,onSave:me,companiesList:K,userCountry:"IN",selectedJobId:se})),oe&&React.createElement("div",{ref:le,className:styles$8.sentinel},te&&React.createElement("div",{className:styles$8.loadingMore},React.createElement(Spin$1,{size:"small"}),React.createElement("span",null,"Loading more jobs...")))))}JobsList.propTypes={analytics:PropTypes.object,className:PropTypes.string,currentTab:PropTypes.string,jobs:PropTypes.arrayOf(PropTypes.object),companiesMap:PropTypes.object,isLoading:PropTypes.bool,error:PropTypes.object,isFetchingMore:PropTypes.bool,hasMore:PropTypes.bool},JobsList.defaultProps={className:"",currentTab:TAG_TO_TAB_MAPPING.relevant,jobs:[],companiesMap:{},isLoading:!1,error:null,isFetchingMore:!1,hasMore:!0};const relevantJobsPage="_relevantJobsPage_19xbf_1",styles$7={relevantJobsPage};function RelevantJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchRelevantJobsQuery($),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.relevant);return React.createElement("div",{className:styles$7.relevantJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.relevant,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const allJobsPage="_allJobsPage_10f3p_1",styles$6={allJobsPage};function AllJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchAllJobsQuery($),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.all);return React.createElement("div",{className:styles$6.allJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.all,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const savedJobsPage="_savedJobsPage_km19z_1",styles$5={savedJobsPage};function SavedJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchPipelineJobsQuery(Hn({type:TAG_TO_TAB_MAPPING.saved},$)),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.saved);return React.createElement("div",{className:styles$5.savedJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.saved,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const appliedJobsPage="_appliedJobsPage_lw2yt_1",styles$4={appliedJobsPage};function AppliedJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchPipelineJobsQuery(Hn({type:TAG_TO_TAB_MAPPING.applied},$)),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.applied);return React.createElement("div",{className:styles$4.appliedJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.applied,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const ExpertMbeRating=({fieldName:C,subjectOptions:$,ratingOptions:F})=>{const V=reactRedux.useDispatch(),J=reactRedux.useSelector(de=>de.scalantCareerHub.filterForm)[C],ee=React.useMemo(()=>J||{},[J]),te=React.useMemo(()=>typeof ee=="object"&&!Array.isArray(ee)?ee:{},[ee]);React.useEffect(()=>{(!ee||Object.keys(te).length===0)&&V(addRatingFilterInput())},[ee,te,V]);const ne=React.useMemo(()=>Object.values(te).map(de=>{var le;return((le=de==null?void 0:de.subject)==null?void 0:le.key)||(de==null?void 0:de.subject)}).filter(Boolean),[te]),re=React.useMemo(()=>$.filter(de=>!ne.includes(de.key)),[$,ne]),ae=React.useCallback(()=>{V(addRatingFilterInput())},[V]),oe=React.useCallback(de=>{V(deleteRatingFilterInput({inputFieldKey:de}))},[V]),ie=React.useCallback((de,le)=>{const ve=$.find(me=>me.key===le);V(updateRatingFilterInput({inputFilterSubKey:`${de}_subject`,value:ve||le}))},[$,V]),se=React.useCallback((de,le)=>{V(updateRatingFilterInput({inputFilterSubKey:`${de}_rating`,value:le}))},[V]),ue=Object.keys(te);return React.createElement(Space$1,{direction:"vertical",style:{width:"100%"},size:"middle"},ue.map(de=>{var pe;const le=te[de],ve=((pe=le==null?void 0:le.subject)==null?void 0:pe.key)||(le==null?void 0:le.subject),me=le==null?void 0:le.rating,he=[...$.filter(ce=>ce.key===ve),...re];return React.createElement(Row$1,{key:de,gutter:16,align:"middle"},React.createElement(Col$1,{span:10},React.createElement(Select$1,{placeholder:"Select skill",value:ve,onChange:ce=>ie(de,ce),showSearch:!0,filterOption:(ce,fe)=>{var ye;return((ye=fe==null?void 0:fe.label)!=null?ye:"").toLowerCase().includes(ce.toLowerCase())},options:he.map(ce=>({label:ce.value,value:ce.key}))})),React.createElement(Col$1,{span:10},React.createElement(Select$1,{placeholder:"Select rating",value:me,onChange:ce=>se(de,ce),options:F.map(ce=>({label:ce.label,value:ce.value}))})),React.createElement(Col$1,{span:4},React.createElement(Space$1,null,React.createElement(Button$2,{type:"text",icon:React.createElement(PlusOutlined$1,null),onClick:ae,style:{color:"#1890ff"}}),ue.length>1&&React.createElement(Button$2,{type:"text",icon:React.createElement(DeleteOutlined$1,null),onClick:()=>oe(de),danger:!0}))))}))};ExpertMbeRating.propTypes={fieldName:PropTypes.string.isRequired,subjectOptions:PropTypes.arrayOf(PropTypes.shape({key:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),value:PropTypes.string})).isRequired,ratingOptions:PropTypes.arrayOf(PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),label:PropTypes.string})).isRequired};const drawerContent="_drawerContent_fqkgw_1",filterForm="_filterForm_fqkgw_5",drawerHeaderSubtitle$1="_drawerHeaderSubtitle_fqkgw_9",filterIcon$1="_filterIcon_fqkgw_14",buttonContainer="_buttonContainer_fqkgw_18",drawer="_drawer_fqkgw_1",styles$3={drawerContent,filterForm,drawerHeaderSubtitle:drawerHeaderSubtitle$1,filterIcon:filterIcon$1,buttonContainer,drawer},{Option:Option$1}=Select$1;function FilterForm(){var Se,Ee,Ce,xe;const C=reactRedux.useDispatch(),$=reactRedux.useSelector($e=>$e.scalantCareerHub.filterForm),F=reactRedux.useSelector($e=>$e.scalantCareerHub.filterOptions||{}),[V]=Form$1.useForm();React.useEffect(()=>{V.setFieldsValue($)},[V,$]);const{handleCompanySearch:K,handleTitleSearch:J,handleExperienceSkillSearch:ee,handleExperienceSkillChange:te,loadingCompanies:ne,loadingTitles:re,loadingExperienceSkills:ae}=useAsyncFilterOptions(),{jobTypes:oe,functions:ie,seniorityLevels:se,companyCategories:ue,locations:de,mbeSkills:le,ctcRanges:ve,stipendRanges:me,durationRanges:he,noticePeriods:pe,datePostedOptions:ce,skillRatings:fe}=useFilterMetaOptions(),ye=($e,Ie)=>{C(updateFormField({field:$e,value:Ie}))},_e=$.role_type,ge=_e==="full_time",be=_e==="internship";return React.createElement(Form$1,{layout:"vertical",className:styles$3.filterForm,form:V,initialValues:$},React.createElement(Form$1.Item,{label:"Job Types",name:"role_type"},React.createElement(Select$1,{placeholder:"Select job profile",value:$.role_type,onChange:$e=>ye("role_type",$e)},oe.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Company Name",name:"company_ids"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search company",filterOption:!1,onSearch:K,loading:ne,value:$.company_ids,onChange:$e=>ye("company_ids",$e),notFoundContent:ne?"Loading...":"Type at least 3 characters to search"},(Se=F.companyOptions)==null?void 0:Se.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Title",name:"job_title"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search job title",filterOption:!1,onSearch:J,loading:re,value:$.job_title,onChange:$e=>ye("job_title",$e),notFoundContent:re?"Loading...":"Type at least 3 characters to search"},(Ee=F.titleOptions)==null?void 0:Ee.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.value},$e.value)))),React.createElement(Form$1.Item,{label:"Function",name:"job_category"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select function",value:$.job_category,onChange:$e=>ye("job_category",$e)},ie.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Role seniority level",name:"seniority_level"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select level",value:$.seniority_level,onChange:$e=>ye("seniority_level",$e)},se.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Company category",name:"company_categories"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select category",value:$.company_categories,onChange:$e=>ye("company_categories",$e)},ue.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))))),React.createElement(Form$1.Item,{label:"Location",name:"location"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select location",value:$.location,onChange:$e=>ye("location",$e)},de.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.value},$e.value)))),!be&&React.createElement(Form$1.Item,{label:"Minimum CTC (in Lakhs)?",name:"min_ctc"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_ctc,onChange:$e=>ye("min_ctc",$e)},ve.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))),!ge&&React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Stipend (INR per month)",name:"min_stipend"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_stipend,onChange:$e=>ye("min_stipend",$e)},me.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Internship duration (in months)",name:"min_duration"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_duration,onChange:$e=>ye("min_duration",$e)},he.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))))),React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Notice period requirement",name:"notice_period"},React.createElement(Select$1,{placeholder:"Choose period",value:$.notice_period,onChange:$e=>ye("notice_period",$e)},pe.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Job posted date",name:"date_posted_on"},React.createElement(Select$1,{placeholder:"Pick date",value:$.date_posted_on,onChange:$e=>ye("date_posted_on",$e)},ce.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))))),React.createElement(Form$1.Item,{label:"Expert Mock Interview Skills Required"},React.createElement(ExpertMbeRating,{fieldName:"mbe_skill_ids",subjectOptions:le,ratingOptions:fe})),React.createElement(Form$1.Item,{label:"Experienced based skills",name:"experience_skill_ids"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search skills",filterOption:!1,onSearch:ee,loading:ae,value:((Ce=$.experience_skill_ids)==null?void 0:Ce.map($e=>typeof $e=="object"?$e.experience_skill_id:$e))||[],onChange:$e=>{const Ie=te($e,F.experienceSkillOptions);ye("experience_skill_ids",Ie)},notFoundContent:ae?"Loading...":"Type at least 2 characters to search"},(xe=F.experienceSkillOptions)==null?void 0:xe.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Experience (Years)? *"},React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"min_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Minimum",type:"number",value:$.min_experience,onChange:$e=>ye("min_experience",$e.target.value)}))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"max_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Maximum",type:"number",value:$.max_experience,onChange:$e=>ye("max_experience",$e.target.value)}))))))}function FilterDrawerTitle({onClose:C}){return React.createElement(Flex$1,{vertical:!0},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{align:"center",gap:5},React.createElement(FilterOutlined$1,{className:styles$3.filterIcon}),"Filters"),React.createElement(CloseOutlined$1,{onClick:C})),React.createElement("div",{className:styles$3.drawerHeaderSubtitle},"Choose the kind of jobs you'd like to see displayed on this page"))}function FilterDrawer({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(te=>te.scalantCareerHub.dashboard.filterModalOpen),V=reactRedux.useSelector(te=>te.scalantCareerHub.filterForm),K=()=>{C==null||C.click("Filter Drawer - Close",PRODUCT_NAME),$(closeFilterModal())},J=()=>{var re,ae,oe,ie,se,ue,de;C==null||C.click("Filter Drawer - Apply",PRODUCT_NAME);let te;V.mbe_skill_ids&&typeof V.mbe_skill_ids=="object"&&!Array.isArray(V.mbe_skill_ids)&&Object.keys(V.mbe_skill_ids).length>0&&(te=Object.values(V.mbe_skill_ids).filter(le=>!le||le.rating===void 0||le.rating===null?!1:le.subject?typeof le.subject=="object"?le.subject.key!==void 0&&le.subject.key!==null:le.subject!==void 0&&le.subject!==null:!1).map(le=>{var me;let ve;return typeof le.subject=="object"&&((me=le.subject)==null?void 0:me.key)!==void 0?ve=le.subject.key:ve=le.subject,{mbe_skill_id:ve,rating:le.rating}}),te.length===0&&(te=void 0));const ne={role_type:V.role_type||void 0,company_ids:(re=V.company_ids)!=null&&re.length?V.company_ids:void 0,job_title:(ae=V.job_title)!=null&&ae.length?V.job_title:void 0,job_category:(oe=V.job_category)!=null&&oe.length?V.job_category:void 0,seniority_level:(ie=V.seniority_level)!=null&&ie.length?V.seniority_level:void 0,location:(se=V.location)!=null&&se.length?V.location:void 0,min_ctc:V.min_ctc||void 0,min_stipend:V.min_stipend||void 0,min_duration:V.min_duration||void 0,notice_period:V.notice_period||void 0,date_posted_on:V.date_posted_on||void 0,mbe_skill_ids:te,experience_skill_ids:(ue=V.experience_skill_ids)!=null&&ue.length?V.experience_skill_ids:void 0,min_experience:V.min_experience||void 0,max_experience:V.max_experience||void 0,company_categories:(de=V.company_categories)!=null&&de.length?V.company_categories:void 0};Object.keys(ne).forEach(le=>{ne[le]===void 0&&delete ne[le]}),$(updateFiltersFromForm(ne)),updateURLWithFilters(ne),K()},ee=()=>{C==null||C.click("Filter Drawer - Reset",PRODUCT_NAME),$(resetForm()),$(clearAllOptions()),$(updateFiltersFromForm({})),updateURLWithFilters({})};return React.createElement(Drawer$1,{title:React.createElement(FilterDrawerTitle,{onClose:K}),placement:"right",onClose:K,open:F,closable:!1,width:550,className:styles$3.drawer},React.createElement("div",{className:styles$3.drawerContent},React.createElement(FilterForm,null),React.createElement("div",{className:styles$3.buttonContainer},React.createElement(Button$2,{className:styles$3.resetButton,onClick:ee},"Reset Filters"),React.createElement(Button$2,{type:"primary",className:styles$3.applyButton,onClick:J},"Apply"))))}const alertService=careerHubApi.injectEndpoints({endpoints:C=>({fetchAlerts:C.query({query:()=>({url:"/job-tracker/v1/alerts/list",method:"GET"}),transformResponse:$=>$.data||[],providesTags:["JobAlerts"]}),createAlert:C.mutation({query:$=>({url:"/job-tracker/v1/alerts/",method:"POST",body:$}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),updateAlertStatus:C.mutation({query:$=>({url:"/job-tracker/v1/alerts/update-status",method:"PATCH",body:$}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),deleteAlert:C.mutation({query:$=>({url:`/job-tracker/v1/alerts/${$}`,method:"DELETE"}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),updateAlert:C.mutation({query:({id:$,payload:F})=>({url:`/job-tracker/v1/alerts/${$}`,method:"PUT",body:F}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]})})}),{useFetchAlertsQuery,useCreateAlertMutation,useUpdateAlertStatusMutation,useDeleteAlertMutation,useUpdateAlertMutation}=alertService,modalTitle="_modalTitle_gu1gu_1",modalTitleHeader="_modalTitleHeader_gu1gu_6",modalTitleContent="_modalTitleContent_gu1gu_12",modalCloseIcon="_modalCloseIcon_gu1gu_18",modalDescription="_modalDescription_gu1gu_22",modalFooter="_modalFooter_gu1gu_28",createAlertContent="_createAlertContent_gu1gu_34",formField="_formField_gu1gu_52",formLabel="_formLabel_gu1gu_57",requiredAsterisk="_requiredAsterisk_gu1gu_63",formInput="_formInput_gu1gu_67",experienceInputs="_experienceInputs_gu1gu_71",modal="_modal_gu1gu_1",radioGroup="_radioGroup_gu1gu_88",drawerHeaderSubtitle="_drawerHeaderSubtitle_gu1gu_94",filterIcon="_filterIcon_gu1gu_99",styles$2={modalTitle,modalTitleHeader,modalTitleContent,modalCloseIcon,modalDescription,modalFooter,createAlertContent,formField,formLabel,requiredAsterisk,formInput,experienceInputs,modal,radioGroup,drawerHeaderSubtitle,filterIcon},{Option}=Select$1;function JobAlertForm({form:C,initialValues:$,onSubmit:F,isSubmitting:V}){const{functions:K,locations:J,ctcRanges:ee}=useFilterMetaOptions(),[te,ne]=React.useState("realtime");React.useEffect(()=>{var oe,ie;if($&&C){const ue={[ALERT_FREQUENCY.REALTIME]:"realtime",[ALERT_FREQUENCY.DAILY]:"daily",[ALERT_FREQUENCY.ALTERNATE_DAY]:"alternate",[ALERT_FREQUENCY.WEEKLY]:"weekly"}[$.frequency]||"realtime",de={name:$.name,job_functions:$.job_functions||[],min_ctc:$.min_ctc,locations:$.locations||[],min_experience:((oe=$.min_experience)==null?void 0:oe.toString())||"",max_experience:((ie=$.max_experience)==null?void 0:ie.toString())||"",frequency:ue,notification_type:$.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL};C.setFieldsValue(de),ne(ue)}},[$,C]);const re=()=>sr(this,null,function*(){try{const oe=yield C.validateFields(),ie={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},se=oe.frequency==="realtime",ue={alert:{name:oe.name,job_functions:oe.job_functions||[],min_ctc:oe.min_ctc,locations:oe.locations||[],min_experience:oe.min_experience?parseInt(oe.min_experience,10):0,max_experience:oe.max_experience?parseInt(oe.max_experience,10):null,frequency:ie[oe.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:se&&oe.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL}};F&&(yield F(ue))}catch(oe){console.error("Error submitting form:",oe)}});React.useEffect(()=>{C&&F&&(C.submit=re)},[C,F]);const ae=Form$1.useWatch("frequency",C)||"realtime";return React.useEffect(()=>{ne(ae)},[ae]),React.createElement(Form$1,{form:C,layout:"vertical",className:styles$2.createAlertContent,initialValues:{frequency:"realtime"}},React.createElement(Form$1.Item,{label:"Alert Name",name:"name",rules:[{required:!0,message:"Please enter alert name"}]},React.createElement(Input$1,{placeholder:"Give your job alert a name"})),React.createElement(Form$1.Item,{label:"Job Function",name:"job_functions"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select job function",className:styles$2.formInput},K.map(oe=>React.createElement(Option,{key:oe.key,value:oe.key},oe.value)))),React.createElement(Form$1.Item,{label:"Minimum CTC (in Lakhs)?",name:"min_ctc"},React.createElement(Select$1,{placeholder:"Select range",className:styles$2.formInput},ee.map(oe=>React.createElement(Option,{key:oe.value,value:oe.value},oe.label)))),React.createElement(Form$1.Item,{label:"Locations?",name:"locations"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select locations",className:styles$2.formInput},J.map(oe=>React.createElement(Option,{key:oe.key,value:oe.value},oe.value)))),React.createElement(Form$1.Item,{label:"Experience (Years)?"},React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"min_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Minimum",type:"number"}))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"max_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Maximum",type:"number"}))))),React.createElement(Form$1.Item,{label:"Alert Frequency",name:"frequency"},React.createElement(Radio$1.Group,{className:styles$2.radioGroup,onChange:oe=>{ne(oe.target.value),oe.target.value!=="realtime"&&C.setFieldsValue({notification_type:ALERT_NOTIFICATION_TYPE.EMAIL})}},React.createElement(Radio$1,{value:"realtime"},"Realtime"),React.createElement(Radio$1,{value:"daily"},"Daily"),React.createElement(Radio$1,{value:"alternate"},"Every alternate day"),React.createElement(Radio$1,{value:"weekly"},"Weekly"))),te==="realtime"&&React.createElement(Form$1.Item,{label:"Alert mode",name:"notification_type"},React.createElement(Radio$1.Group,{className:styles$2.radioGroup},React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.EMAIL},"Email"),React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.WHATSAPP},"Whatsapp"),React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.BOTH},"Both"))))}const alertCard="_alertCard_1k2nv_1",alertHeader="_alertHeader_1k2nv_14",alertIcon="_alertIcon_1k2nv_20",inactiveIcon="_inactiveIcon_1k2nv_25",alertActions="_alertActions_1k2nv_29",editFormCard="_editFormCard_1k2nv_35",styles$1={alertCard,alertHeader,alertIcon,inactiveIcon,alertActions,editFormCard};function ExistingAlerts({analytics:C}){const $=reactRedux.useDispatch(),{data:F=[],isLoading:V,error:K}=useFetchAlertsQuery(),[J]=useUpdateAlertStatusMutation(),[ee]=useDeleteAlertMutation(),[te,{isLoading:ne}]=useUpdateAlertMutation(),[re,ae]=React.useState(null),[oe]=Form$1.useForm();React.useEffect(()=>{F&&$(setAlerts(F))},[F,$]);const ie=pe=>ALERT_FREQUENCY_LABELS[pe]||ALERT_FREQUENCY_LABELS[ALERT_FREQUENCY.REALTIME],se=pe=>ALERT_NOTIFICATION_LABELS[pe]||ALERT_NOTIFICATION_LABELS[ALERT_NOTIFICATION_TYPE.EMAIL],ue=pe=>pe===ALERT_STATUS.ACTIVE,de=(pe,ce)=>sr(this,null,function*(){try{const fe=ce===ALERT_STATUS.ACTIVE?ALERT_STATUS.INACTIVE:ALERT_STATUS.ACTIVE;yield J({id:pe,status:fe}).unwrap(),message$1.success(`Alert ${fe===ALERT_STATUS.ACTIVE?"activated":"deactivated"} successfully`)}catch(fe){message$1.error("Failed to update alert status"),console.error("Error updating alert status:",fe)}}),le=pe=>{C==null||C.click("Existing Alerts - Edit",PRODUCT_NAME),ae(pe)},ve=()=>{C==null||C.click("Existing Alerts - Cancel Edit",PRODUCT_NAME),ae(null),oe.resetFields()},me=pe=>sr(this,null,function*(){try{C==null||C.click("Existing Alerts - Update Alert",PRODUCT_NAME),yield te({id:re,payload:pe}).unwrap(),message$1.success("Alert updated successfully"),ae(null),oe.resetFields()}catch(ce){throw message$1.error("Failed to update alert"),console.error("Error updating alert:",ce),ce}}),he=pe=>sr(this,null,function*(){try{C==null||C.click("Existing Alerts - Delete",PRODUCT_NAME),yield ee(pe).unwrap(),message$1.success("Alert deleted successfully")}catch(ce){message$1.error("Failed to delete alert"),console.error("Error deleting alert:",ce)}});return V?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.loadingText},"Loading alerts...")):K?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.errorText},"Error loading alerts")):!F||F.length===0?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.emptyText},"No alerts found")):React.createElement("div",{className:styles$1.existingAlertContent},F.map(pe=>{const ce=pe.attributes||pe,fe=pe.id||ce.id,ye=ue(ce.status),_e=ie(ce.frequency),ge=se(ce.notification_type),be=re===fe;return React.createElement("div",{key:fe,className:styles$1.alertCard},React.createElement(Flex$1,{align:"center",className:styles$1.alertHeader},React.createElement(AlertFilled$1,{className:classNames(styles$1.alertIcon,{[styles$1.inactiveIcon]:!ye})}),React.createElement("div",null,ce.name)),React.createElement("div",{className:styles$1.alertSettings},React.createElement(Flex$1,{align:"center",gap:16,wrap:!0},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(Switch$1,{checked:ye,onChange:()=>de(fe,ce.status),size:"small",disabled:be}),React.createElement("span",null,"Active")),React.createElement(Flex$1,{align:"center",gap:8},React.createElement(ClockCircleOutlined$1,null),React.createElement("span",null,_e)),React.createElement(Flex$1,{align:"center",gap:8},React.createElement(AlertFilled$1,null),React.createElement("span",null,ge)))),!be&&React.createElement("div",{className:styles$1.alertActions},React.createElement(Button$2,{type:"text",danger:!0,icon:React.createElement(DeleteOutlined$1,null),onClick:()=>he(fe),className:styles$1.deleteButton},"Delete"),React.createElement(Button$2,{type:"primary",icon:React.createElement(EditOutlined$1,null),onClick:()=>le(fe),className:styles$1.editButton},"Edit")),be&&React.createElement("div",{className:styles$1.editFormCard},React.createElement(JobAlertForm,{form:oe,initialValues:ce,onSubmit:me,isSubmitting:ne}),React.createElement(Flex$1,{gap:8,justify:"flex-end",style:{marginTop:"1.6rem"}},React.createElement(Button$2,{onClick:ve,disabled:ne},"Cancel"),React.createElement(Button$2,{type:"primary",onClick:()=>sr(this,null,function*(){try{const Se=yield oe.validateFields(),Ee={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},Ce=Se.frequency==="realtime",xe={alert:{name:Se.name,job_functions:Se.job_functions||[],min_ctc:Se.min_ctc,locations:Se.locations||[],min_experience:Se.min_experience?parseInt(Se.min_experience,10):0,max_experience:Se.max_experience?parseInt(Se.max_experience,10):null,frequency:Ee[Se.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:Ce&&Se.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL}};yield me(xe)}catch(Se){}}),loading:ne},"Update Alert"))))}))}function JobAlertModal({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(de=>de.scalantCareerHub.dashboard.jobAlertModalOpen),[V,K]=React.useState("create"),[J]=Form$1.useForm(),[ee,{isLoading:te}]=useCreateAlertMutation();React.useEffect(()=>{F||(J.resetFields(),K("create"))},[F,J]);const ne=()=>{C==null||C.click("Job Alert Modal - Close",PRODUCT_NAME),$(closeJobAlertModal())},re=()=>{C==null||C.click("Job Alert Modal - Cancel",PRODUCT_NAME),ne()},ae=()=>sr(this,null,function*(){try{const de=yield J.validateFields(),le={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},ve=de.frequency==="realtime",me={alert:{name:de.name,job_functions:de.job_functions||[],min_ctc:de.min_ctc,locations:de.locations||[],min_experience:de.min_experience?parseInt(de.min_experience,10):0,max_experience:de.max_experience?parseInt(de.max_experience,10):null,frequency:le[de.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:ve&&de.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL},resume_alert:!1},he=yield ee(me).unwrap();he.success&&he.alert&&(C==null||C.click("Job Alert Modal - Create Alert",PRODUCT_NAME),J.resetFields(),K("existing"),message$1.success("Alert created successfully"))}catch(de){message$1.error("Failed to create alert"),console.error("Error creating alert:",de)}}),oe=de=>sr(this,null,function*(){const le=br(Hn({},de),{resume_alert:!1});return yield ee(le).unwrap()}),ie=React.createElement(Flex$1,{vertical:!0},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(BellOutlined$1,{className:styles$2.filterIcon}),"Curate your Job Alert"),React.createElement(CloseOutlined$1,{onClick:ne})),React.createElement("div",{className:styles$2.drawerHeaderSubtitle},"By creating a job alert, you will be notified when a job posting matches your preferred criteria")),se=React.createElement("div",{className:styles$2.modalFooter},React.createElement(Button$2,{onClick:re},"Cancel"),React.createElement(Button$2,{type:"primary",onClick:ae,loading:te},"Create Alert")),ue=React.createElement(JobAlertForm,{form:J,onSubmit:oe,isSubmitting:te});return React.createElement(Modal$1,{title:ie,open:F,onCancel:ne,footer:se,width:600,closable:!1,className:styles$2.modal},React.createElement(Tabs$1,{activeKey:V,onChange:de=>{C==null||C.click(`Job Alert Modal - Tab ${de}`,PRODUCT_NAME),K(de)},items:[{key:"create",label:"Create alert",children:ue},{key:"existing",label:"Existing alerts",children:React.createElement(ExistingAlerts,{analytics:C})}]}))}const jobsPageContent="_jobsPageContent_pk7y3_1",styles={jobsPageContent};function JobsPage({analytics:C,country:$,openMockInterviewModal:F,openResume:V,processCounts:K=DEFAULT_PROCESS_COUNTS,userProfileData:J,onUploadFile:ee,onViewResume:te,onEditPreferences:ne,onEditResume:re,onAddResume:ae}){const oe=reactRedux.useDispatch(),ie=reactRedux.useSelector(he=>{var pe,ce;return((ce=(pe=he.scalantCareerHub)==null?void 0:pe.filter)==null?void 0:ce.tab)||TAG_TO_TAB_MAPPING.relevant}),se=React.useRef(!1),{selectedJobId:ue}=useJobQueryParams({syncToURL:!0,syncFromURL:!0});React.useLayoutEffect(()=>{if(!se.current){const he=getFiltersFromURL(),pe=Hn({},he),fe=new URLSearchParams(window.location.search).get("job_ids");fe&&(pe.job_ids=[fe]),Object.keys(pe).length>0&&oe(updateFiltersFromForm(pe)),se.current=!0}},[oe]),React.useEffect(()=>{oe(setProcessCounts(K))},[K,oe]),React.useEffect(()=>{J&&oe(setUserProfileData(J))},[J,oe]);const de=React.createElement(JobsHeader,{analytics:C}),le=ue?React.createElement(JobDetails,{analytics:C,currentTab:ie,onUploadFile:ee,country:$,openMockInterviewModal:F,openResume:V,jobId:ue,onEditResume:re,onAddResume:ae}):React.createElement(ProfileDetails,{analytics:C,onViewResume:te,onEditPreferences:ne}),ve=ue?SIDER_WIDTH.JOB_DETAILS:SIDER_WIDTH.PROFILE_DETAILS;React.useEffect(()=>{C&&C.view("Jobs Page - Tab Rendered",PRODUCT_NAME,{currentTab:ie})},[C,ie]);const me=()=>{switch(ie){case TAG_TO_TAB_MAPPING.relevant:return React.createElement(RelevantJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.saved:return React.createElement(SavedJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.applied:return React.createElement(AppliedJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.all:default:return React.createElement(AllJobsPage,{analytics:C})}};return React.createElement(React.Fragment,null,React.createElement(JobsLayout,{analytics:C,header:de,sider:le,siderWidth:ve,className:styles.jobsPage},me()),React.createElement(FilterDrawer,{analytics:C}),React.createElement(JobAlertModal,{analytics:C}))}JobsPage.propTypes={processCounts:PropTypes.shape({all:PropTypes.number,relevant:PropTypes.number,draft:PropTypes.number,applications:PropTypes.number,saved:PropTypes.number,archived:PropTypes.number}),userProfileData:PropTypes.object},exports.APPLICATION_STATUS=APPLICATION_STATUS$1,exports.JOB_CARD_CONFIG=JOB_CARD_CONFIG,exports.JOB_PROFILE_STATUS=JOB_PROFILE_STATUS,exports.JobsLayout=JobsLayout,exports.JobsPage=JobsPage,exports.TABS=TABS,exports.careerHubApi=careerHubApi,exports.checkAllOtherRequirementsMet=checkAllOtherRequirementsMet,exports.countPendingSteps=countPendingSteps,exports.default=HelloWorld,exports.determineJobTag=determineJobTag,exports.formatCtc=formatCtc,exports.formatDate=formatDate,exports.formatExperience=formatExperience$1,exports.formatLocation=formatLocation,exports.formatNoticePeriod=formatNoticePeriod,exports.setBaseUrl=setBaseUrl,exports.setChecklistOpen=setChecklistOpen,exports.setFitmentScore=setFitmentScore,exports.store=rootReducer,exports.useApplicationForm=useApplicationForm,exports.useCreateApplication=useCreateApplication,exports.useJobCardState=useJobCardState,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
469
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge=!0,be=!1,Se;return{s:function(){fe=fe.call(pe)},n:function(){var Ce=fe.next();return ge=Ce.done,Ce},e:function(Ce){be=!0,Se=Ce},f:function(){try{!ge&&fe.return!=null&&fe.return()}finally{if(be)throw Se}}}}function ae(pe,ce){if(pe){if(typeof pe=="string")return oe(pe,ce);var fe=Object.prototype.toString.call(pe).slice(8,-1);if(fe==="Object"&&pe.constructor&&(fe=pe.constructor.name),fe==="Map"||fe==="Set")return Array.from(pe);if(fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe))return oe(pe,ce)}}function oe(pe,ce){(ce==null||ce>pe.length)&&(ce=pe.length);for(var fe=0,ye=new Array(ce);fe<ce;fe++)ye[fe]=pe[fe];return ye}function ie(pe,ce){if(!(pe instanceof ce))throw new TypeError("Cannot call a class as a function")}function se(pe,ce){for(var fe=0;fe<ce.length;fe++){var ye=ce[fe];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(pe,ye.key,ye)}}function ue(pe,ce,fe){return ce&&se(pe.prototype,ce),fe&&se(pe,fe),pe}function de(pe,ce,fe){return{method:"GET",headers:pe,signal:fe==null?void 0:fe.signal,mode:"cors",credentials:ce?"include":"same-origin",redirect:"follow"}}function le(pe){var ce=new Headers;for(var fe in pe){var ye=pe[fe];typeof ye!="undefined"&&ce.append(fe,ye)}return ce}var ve=function(){function pe(ce){ie(this,pe),this.source=ce,this.isHttp=/^https?:/i.test(ce.url),this.httpHeaders=this.isHttp&&ce.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return ue(pe,[{key:"_progressiveDataLength",get:function(){var fe,ye;return(fe=(ye=this._fullRequestReader)===null||ye===void 0?void 0:ye._loaded)!==null&&fe!==void 0?fe:0}},{key:"getFullReader",value:function(){return(0,K.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new me(this),this._fullRequestReader}},{key:"getRangeReader",value:function(fe,ye){if(ye<=this._progressiveDataLength)return null;var _e=new he(this,fe,ye);return this._rangeRequestReaders.push(_e),_e}},{key:"cancelAllRequests",value:function(fe){this._fullRequestReader&&this._fullRequestReader.cancel(fe);var ye=re(this._rangeRequestReaders.slice(0)),_e;try{for(ye.s();!(_e=ye.n()).done;){var ge=_e.value;ge.cancel(fe)}}catch(be){ye.e(be)}finally{ye.f()}}}]),pe}();$.PDFFetchStream=ve;var me=function(){function pe(ce){var fe=this;ie(this,pe),this._stream=ce,this._reader=null,this._loaded=0,this._filename=null;var ye=ce.source;this._withCredentials=ye.withCredentials||!1,this._contentLength=ye.length,this._headersCapability=(0,K.createPromiseCapability)(),this._disableRange=ye.disableRange||!1,this._rangeChunkSize=ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._isStreamingSupported=!ye.disableStream,this._isRangeSupported=!ye.disableRange,this._headers=le(this._stream.httpHeaders);var _e=ye.url;fetch(_e,de(this._headers,this._withCredentials,this._abortController)).then(function(ge){if(!(0,J.validateResponseStatus)(ge.status))throw(0,J.createResponseStatusError)(ge.status,_e);fe._reader=ge.body.getReader(),fe._headersCapability.resolve();var be=function($e){return ge.headers.get($e)},Se=(0,J.validateRangeRequestCapabilities)({getResponseHeader:be,isHttp:fe._stream.isHttp,rangeChunkSize:fe._rangeChunkSize,disableRange:fe._disableRange}),Ee=Se.allowRangeRequests,Ce=Se.suggestedLength;fe._isRangeSupported=Ee,fe._contentLength=Ce||fe._contentLength,fe._filename=(0,J.extractFilenameFromHeader)(be),!fe._isStreamingSupported&&fe._isRangeSupported&&fe.cancel(new K.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return ue(pe,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var ce=ne(V.default.mark(function ye(){var _e,ge,be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._headersCapability.promise;case 2:return Ce.next=4,this._reader.read();case 4:if(_e=Ce.sent,ge=_e.value,be=_e.done,!be){Ce.next=9;break}return Ce.abrupt("return",{value:ge,done:be});case 9:return this._loaded+=ge.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),Se=new Uint8Array(ge).buffer,Ce.abrupt("return",{value:Se,done:!1});case 13:case"end":return Ce.stop()}},ye,this)}));function fe(){return ce.apply(this,arguments)}return fe}()},{key:"cancel",value:function(fe){this._reader&&this._reader.cancel(fe),this._abortController&&this._abortController.abort()}}]),pe}(),he=function(){function pe(ce,fe,ye){var _e=this;ie(this,pe),this._stream=ce,this._reader=null,this._loaded=0;var ge=ce.source;this._withCredentials=ge.withCredentials||!1,this._readCapability=(0,K.createPromiseCapability)(),this._isStreamingSupported=!ge.disableStream,typeof AbortController!="undefined"&&(this._abortController=new AbortController),this._headers=le(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(fe,"-").concat(ye-1));var be=ge.url;fetch(be,de(this._headers,this._withCredentials,this._abortController)).then(function(Se){if(!(0,J.validateResponseStatus)(Se.status))throw(0,J.createResponseStatusError)(Se.status,be);_e._readCapability.resolve(),_e._reader=Se.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}return ue(pe,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var ce=ne(V.default.mark(function ye(){var _e,ge,be,Se;return V.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._readCapability.promise;case 2:return Ce.next=4,this._reader.read();case 4:if(_e=Ce.sent,ge=_e.value,be=_e.done,!be){Ce.next=9;break}return Ce.abrupt("return",{value:ge,done:be});case 9:return this._loaded+=ge.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),Se=new Uint8Array(ge).buffer,Ce.abrupt("return",{value:Se,done:!1});case 13:case"end":return Ce.stop()}},ye,this)}));function fe(){return ce.apply(this,arguments)}return fe}()},{key:"cancel",value:function(fe){this._reader&&this._reader.cancel(fe),this._abortController&&this._abortController.abort()}}]),pe}()}],__webpack_module_cache__={};function __w_pdfjs_require__(C){var $=__webpack_module_cache__[C];if($!==void 0)return $.exports;var F=__webpack_module_cache__[C]={id:C,loaded:!1,exports:{}};return __webpack_modules__[C].call(F.exports,F,F.exports,__w_pdfjs_require__),F.loaded=!0,F.exports}__w_pdfjs_require__.nmd=C=>(C.paths=[],C.children||(C.children=[]),C);var __webpack_exports__={};return(()=>{var C=__webpack_exports__;Object.defineProperty(C,"__esModule",{value:!0}),Object.defineProperty(C,"AnnotationLayer",{enumerable:!0,get:function(){return K.AnnotationLayer}}),Object.defineProperty(C,"AnnotationMode",{enumerable:!0,get:function(){return F.AnnotationMode}}),Object.defineProperty(C,"CMapCompressionType",{enumerable:!0,get:function(){return F.CMapCompressionType}}),Object.defineProperty(C,"GlobalWorkerOptions",{enumerable:!0,get:function(){return J.GlobalWorkerOptions}}),Object.defineProperty(C,"InvalidPDFException",{enumerable:!0,get:function(){return F.InvalidPDFException}}),Object.defineProperty(C,"LinkTarget",{enumerable:!0,get:function(){return $.LinkTarget}}),Object.defineProperty(C,"LoopbackPort",{enumerable:!0,get:function(){return V.LoopbackPort}}),Object.defineProperty(C,"MissingPDFException",{enumerable:!0,get:function(){return F.MissingPDFException}}),Object.defineProperty(C,"OPS",{enumerable:!0,get:function(){return F.OPS}}),Object.defineProperty(C,"PDFDataRangeTransport",{enumerable:!0,get:function(){return V.PDFDataRangeTransport}}),Object.defineProperty(C,"PDFDateString",{enumerable:!0,get:function(){return $.PDFDateString}}),Object.defineProperty(C,"PDFWorker",{enumerable:!0,get:function(){return V.PDFWorker}}),Object.defineProperty(C,"PasswordResponses",{enumerable:!0,get:function(){return F.PasswordResponses}}),Object.defineProperty(C,"PermissionFlag",{enumerable:!0,get:function(){return F.PermissionFlag}}),Object.defineProperty(C,"PixelsPerInch",{enumerable:!0,get:function(){return $.PixelsPerInch}}),Object.defineProperty(C,"RenderingCancelledException",{enumerable:!0,get:function(){return $.RenderingCancelledException}}),Object.defineProperty(C,"SVGGraphics",{enumerable:!0,get:function(){return ne.SVGGraphics}}),Object.defineProperty(C,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return F.UNSUPPORTED_FEATURES}}),Object.defineProperty(C,"UnexpectedResponseException",{enumerable:!0,get:function(){return F.UnexpectedResponseException}}),Object.defineProperty(C,"Util",{enumerable:!0,get:function(){return F.Util}}),Object.defineProperty(C,"VerbosityLevel",{enumerable:!0,get:function(){return F.VerbosityLevel}}),Object.defineProperty(C,"XfaLayer",{enumerable:!0,get:function(){return re.XfaLayer}}),Object.defineProperty(C,"addLinkAttributes",{enumerable:!0,get:function(){return $.addLinkAttributes}}),Object.defineProperty(C,"build",{enumerable:!0,get:function(){return V.build}}),Object.defineProperty(C,"createObjectURL",{enumerable:!0,get:function(){return F.createObjectURL}}),Object.defineProperty(C,"createPromiseCapability",{enumerable:!0,get:function(){return F.createPromiseCapability}}),Object.defineProperty(C,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return F.createValidAbsoluteUrl}}),Object.defineProperty(C,"getDocument",{enumerable:!0,get:function(){return V.getDocument}}),Object.defineProperty(C,"getFilenameFromUrl",{enumerable:!0,get:function(){return $.getFilenameFromUrl}}),Object.defineProperty(C,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return $.getPdfFilenameFromUrl}}),Object.defineProperty(C,"getXfaPageViewport",{enumerable:!0,get:function(){return $.getXfaPageViewport}}),Object.defineProperty(C,"isPdfFile",{enumerable:!0,get:function(){return $.isPdfFile}}),Object.defineProperty(C,"loadScript",{enumerable:!0,get:function(){return $.loadScript}}),Object.defineProperty(C,"removeNullCharacters",{enumerable:!0,get:function(){return F.removeNullCharacters}}),Object.defineProperty(C,"renderTextLayer",{enumerable:!0,get:function(){return te.renderTextLayer}}),Object.defineProperty(C,"shadow",{enumerable:!0,get:function(){return F.shadow}}),Object.defineProperty(C,"version",{enumerable:!0,get:function(){return V.version}});var $=__w_pdfjs_require__(1),F=__w_pdfjs_require__(4),V=__w_pdfjs_require__(136),K=__w_pdfjs_require__(148),J=__w_pdfjs_require__(142),ee=__w_pdfjs_require__(6),te=__w_pdfjs_require__(151),ne=__w_pdfjs_require__(152),re=__w_pdfjs_require__(150);if(ee.isNodeJS){var ae=__w_pdfjs_require__(153),oe=ae.PDFNodeStream;(0,V.setPDFNetworkStreamFactory)(function(le){return new oe(le)})}else{var ie=__w_pdfjs_require__(156),se=ie.PDFNetworkStream,ue=__w_pdfjs_require__(157),de=ue.PDFFetchStream;(0,V.setPDFNetworkStreamFactory)(function(le){return(0,$.isValidFetchUrl)(le.url)?new de(le):new se(le)})}})(),__webpack_exports__})()})})(pdf);var pdfExports=pdf.exports,__spreadArray=globalThis&&globalThis.__spreadArray||function(C,$,F){if(F||arguments.length===2)for(var V=0,K=$.length,J;V<K;V++)(J||!(V in $))&&(J||(J=Array.prototype.slice.call($,0,V)),J[V]=$[V]);return C.concat(J||Array.prototype.slice.call($))},clipboardEvents=["onCopy","onCut","onPaste"],compositionEvents=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],focusEvents=["onFocus","onBlur"],formEvents=["onInput","onInvalid","onReset","onSubmit"],imageEvents=["onLoad","onError"],keyboardEvents=["onKeyDown","onKeyPress","onKeyUp"],mediaEvents=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],mouseEvents=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],dragEvents=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],selectionEvents=["onSelect"],touchEvents=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],pointerEvents=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],uiEvents=["onScroll"],wheelEvents=["onWheel"],animationEvents=["onAnimationStart","onAnimationEnd","onAnimationIteration"],transitionEvents=["onTransitionEnd"],otherEvents=["onToggle"],changeEvents=["onChange"],allEvents=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(C,$){var F={};return allEvents.forEach(function(V){var K=C[V];K&&($?F[V]=function(J){return K(J,$(V))}:F[V]=K)}),F}function makeCancellablePromise(C){var $=!1,F=new Promise(function(V,K){C.then(function(J){return!$&&V(J)}).catch(function(J){return!$&&K(J)})});return{promise:F,cancel:function(){$=!0}}}function mergeClassNames(){return Array.prototype.slice.call(arguments).reduce(function(C,$){return C.concat($)},[]).filter(function(C){return typeof C=="string"}).join(" ")}var isProduction$1=process.env.NODE_ENV==="production",prefix="Invariant failed";function invariant(C,$){if(!C){if(isProduction$1)throw new Error(prefix);var F=typeof $=="function"?$():$,V=F?"".concat(prefix,": ").concat(F):prefix;throw new Error(V)}}var isProduction=process.env.NODE_ENV==="production";function warning(C,$){if(!isProduction){if(C)return;var F="Warning: "+$;typeof console!="undefined"&&console.warn(F);try{throw Error(F)}catch(V){}}}const DocumentContext=React.createContext(null);function Message(C){var $=C.children,F=C.type;return React.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(F)},$)}Message.propTypes={children:PropTypes.node,type:PropTypes.oneOf(["error","loading","no-data"]).isRequired};var DEFAULT_LINK_REL="noopener noreferrer nofollow",LinkService=function(){function C(){_classCallCheck(this,C),this.externalLinkTarget=null,this.externalLinkRel=null}return _createClass(C,[{key:"setDocument",value:function(F){this.pdfDocument=F}},{key:"setViewer",value:function(F){this.pdfViewer=F}},{key:"setExternalLinkRel",value:function(F){this.externalLinkRel=F}},{key:"setExternalLinkTarget",value:function(F){this.externalLinkTarget=F}},{key:"setHistory",value:function(){}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(F){this.pdfViewer.currentPageNumber=F}},{key:"rotation",get:function(){return 0},set:function(F){}},{key:"goToDestination",value:function(F){var V=this;new Promise(function(K){typeof F=="string"?V.pdfDocument.getDestination(F).then(K):Array.isArray(F)?K(F):F.then(K)}).then(function(K){invariant(Array.isArray(K),'"'.concat(K,'" is not a valid destination array.'));var J=K[0];new Promise(function(ee){J instanceof Object?V.pdfDocument.getPageIndex(J).then(function(te){ee(te)}).catch(function(){invariant(!1,'"'.concat(J,'" is not a valid page reference.'))}):typeof J=="number"?ee(J):invariant(!1,'"'.concat(J,'" is not a valid destination reference.'))}).then(function(ee){var te=ee+1;invariant(te>=1&&te<=V.pagesCount,'"'.concat(te,'" is not a valid page number.')),V.pdfViewer.scrollPageIntoView({dest:F,pageIndex:ee,pageNumber:te})})})}},{key:"navigateTo",value:function(F){this.goToDestination(F)}},{key:"goToPage",value:function(){}},{key:"addLinkAttributes",value:function(F,V,K){F.href=V,F.rel=this.externalLinkRel||DEFAULT_LINK_REL,F.target=K?"_blank":this.externalLinkTarget||""}},{key:"getDestinationHash",value:function(){return"#"}},{key:"getAnchorUrl",value:function(){return"#"}},{key:"setHash",value:function(){}},{key:"executeNamedAction",value:function(){}},{key:"cachePageRef",value:function(){}},{key:"isPageVisible",value:function(){return!0}},{key:"isPageCached",value:function(){return!0}}]),C}(),PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},isBrowser=typeof window!="undefined",isLocalFileSystem=isBrowser&&window.location.protocol==="file:";function isDefined(C){return typeof C!="undefined"}function isProvided(C){return isDefined(C)&&C!==null}function isString(C){return typeof C=="string"}function isArrayBuffer(C){return C instanceof ArrayBuffer}function isBlob(C){return invariant(isBrowser,"isBlob can only be used in a browser environment"),C instanceof Blob}function isFile$1(C){return invariant(isBrowser,"isFile can only be used in a browser environment"),C instanceof File}function isDataURI(C){return isString(C)&&/^data:/.test(C)}function dataURItoByteString(C){invariant(isDataURI(C),"Invalid data URI.");var $=C.split(","),F=_slicedToArray($,2),V=F[0],K=F[1],J=V.split(";");return J.indexOf("base64")!==-1?atob(K):unescape(K)}function getPixelRatio(){return isBrowser&&window.devicePixelRatio||1}var allowFileAccessFromFilesTip="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function displayCORSWarning(){warning(!isLocalFileSystem,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(allowFileAccessFromFilesTip))}function displayWorkerWarning(){warning(!isLocalFileSystem,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(allowFileAccessFromFilesTip))}function cancelRunningTask(C){C&&C.cancel&&C.cancel()}function makePageCallback(C,$){return Object.defineProperty(C,"width",{get:function(){return this.view[2]*$},configurable:!0}),Object.defineProperty(C,"height",{get:function(){return this.view[3]*$},configurable:!0}),Object.defineProperty(C,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(C,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),C}function isCancelException(C){return C.name==="RenderingCancelledException"}function loadFromFile(C){return new Promise(function($,F){var V=new FileReader;return V.onload=function(){return $(new Uint8Array(V.result))},V.onerror=function(K){switch(K.target.error.code){case K.target.error.NOT_FOUND_ERR:return F(new Error("Error while reading a file: File not found."));case K.target.error.NOT_READABLE_ERR:return F(new Error("Error while reading a file: File not readable."));case K.target.error.SECURITY_ERR:return F(new Error("Error while reading a file: Security error."));case K.target.error.ABORT_ERR:return F(new Error("Error while reading a file: Aborted."));default:return F(new Error("Error while reading a file."))}},V.readAsArrayBuffer(C),null})}var eventProps=function(){var C={};return[].concat(_toConsumableArray(mouseEvents),_toConsumableArray(touchEvents),_toConsumableArray(keyboardEvents)).forEach(function($){C[$]=PropTypes.func}),C}(),fileTypes=[PropTypes.string,PropTypes.instanceOf(ArrayBuffer),PropTypes.shape({data:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),httpHeaders:PropTypes.object,range:PropTypes.object,url:PropTypes.string,withCredentials:PropTypes.bool})];typeof File!="undefined"&&fileTypes.push(PropTypes.instanceOf(File)),typeof Blob!="undefined"&&fileTypes.push(PropTypes.instanceOf(Blob));var isClassName=PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),isFile=PropTypes.oneOfType(fileTypes),isLinkService=PropTypes.instanceOf(LinkService);PropTypes.oneOf(["_self","_blank","_parent","_top"]);var isPage=PropTypes.shape({_transport:PropTypes.shape({fontLoader:PropTypes.object.isRequired}).isRequired,commonObjs:PropTypes.shape({_objs:PropTypes.object.isRequired}).isRequired,getAnnotations:PropTypes.func.isRequired,getTextContent:PropTypes.func.isRequired,getViewport:PropTypes.func.isRequired,render:PropTypes.func.isRequired}),isPageIndex=function C($,F,V){var K=$[F],J=$.pageNumber,ee=$.pdf;if(!isDefined(ee))return null;if(isDefined(K)){if(typeof K!="number")return new Error("`".concat(F,"` of type `").concat(_typeof(K),"` supplied to `").concat(V,"`, expected `number`."));if(K<0)return new Error("Expected `".concat(F,"` to be greater or equal to 0."));var te=ee.numPages;if(K+1>te)return new Error("Expected `".concat(F,"` to be less or equal to ").concat(te-1,"."))}else if(!isDefined(J))return new Error("`".concat(F,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(V,"`."));return null},isPageNumber=function C($,F,V){var K=$[F],J=$.pageIndex,ee=$.pdf;if(!isDefined(ee))return null;if(isDefined(K)){if(typeof K!="number")return new Error("`".concat(F,"` of type `").concat(_typeof(K),"` supplied to `").concat(V,"`, expected `number`."));if(K<1)return new Error("Expected `".concat(F,"` to be greater or equal to 1."));var te=ee.numPages;if(K>te)return new Error("Expected `".concat(F,"` to be less or equal to ").concat(te,"."))}else if(!isDefined(J))return new Error("`".concat(F,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(V,"`."));return null},isPdf=PropTypes.oneOfType([PropTypes.shape({getDestination:PropTypes.func.isRequired,getOutline:PropTypes.func.isRequired,getPage:PropTypes.func.isRequired,numPages:PropTypes.number.isRequired}),PropTypes.bool]),isRef=PropTypes.oneOfType([PropTypes.func,PropTypes.shape({current:PropTypes.any})]),isRenderMode=PropTypes.oneOf(["canvas","none","svg"]),isRotate=PropTypes.oneOf([0,90,180,270]),_excluded=["url"];function ownKeys$2(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread$2(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys$2(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys$2(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}function _createSuper$6(C){var $=_isNativeReflectConstruct$6();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$6(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var PDFDataRangeTransport=pdfExports.PDFDataRangeTransport,Document$1=function(C){_inherits(F,C);var $=_createSuper$6(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{pdf:null}),_defineProperty(_assertThisInitialized(V),"viewer",{scrollPageIntoView:function(ne){var re=ne.dest,ae=ne.pageIndex,oe=ne.pageNumber,ie=V.props.onItemClick;if(ie){ie({dest:re,pageIndex:ae,pageNumber:oe});return}var se=V.pages[ae];if(se){se.scrollIntoView();return}warning(!1,"An internal link leading to page ".concat(oe," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}),_defineProperty(_assertThisInitialized(V),"linkService",new LinkService),_defineProperty(_assertThisInitialized(V),"loadDocument",function(){cancelRunningTask(V.runningTask),V.loadingTask&&V.loadingTask.destroy();var te=makeCancellablePromise(V.findDocumentSource());V.runningTask=te,te.promise.then(function(ne){if(V.onSourceSuccess(),!!ne){V.setState(function(ue){return ue.pdf?{pdf:null}:null});var re=V.props,ae=re.options,oe=re.onLoadProgress,ie=re.onPassword;V.loadingTask=pdfExports.getDocument(_objectSpread$2(_objectSpread$2({},ne),ae)),V.loadingTask.onPassword=ie,oe&&(V.loadingTask.onProgress=oe);var se=makeCancellablePromise(V.loadingTask.promise);V.runningTask=se,se.promise.then(function(ue){V.setState(function(de){return de.pdf&&de.pdf.fingerprint===ue.fingerprint?null:{pdf:ue}},V.onLoadSuccess)}).catch(function(ue){V.onLoadError(ue)})}}).catch(function(ne){V.onSourceError(ne)})}),_defineProperty(_assertThisInitialized(V),"setupLinkService",function(){var te=V.props,ne=te.externalLinkRel,re=te.externalLinkTarget;V.linkService.setViewer(V.viewer),V.linkService.setExternalLinkRel(ne),V.linkService.setExternalLinkTarget(re)}),_defineProperty(_assertThisInitialized(V),"onSourceSuccess",function(){var te=V.props.onSourceSuccess;te&&te()}),_defineProperty(_assertThisInitialized(V),"onSourceError",function(te){warning(te);var ne=V.props.onSourceError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onLoadSuccess,ne=V.state.pdf;te&&te(ne),V.pages=new Array(ne.numPages),V.linkService.setDocument(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({pdf:!1}),warning(te);var ne=V.props.onLoadError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"findDocumentSource",function(){return new Promise(function(te){var ne=V.props.file;if(ne||te(null),typeof ne=="string"){if(isDataURI(ne)){var re=dataURItoByteString(ne);te({data:re})}displayCORSWarning(),te({url:ne})}if(ne instanceof PDFDataRangeTransport&&te({range:ne}),isArrayBuffer(ne)&&te({data:ne}),isBrowser&&(isBlob(ne)||isFile$1(ne))){loadFromFile(ne).then(function(se){te({data:se})});return}if(invariant(_typeof(ne)==="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),invariant(ne.url||ne.data||ne.range,"Invalid parameter object: need either .data, .range or .url"),typeof ne.url=="string"){if(isDataURI(ne.url)){var ae=ne.url,oe=_objectWithoutProperties(ne,_excluded),ie=dataURItoByteString(ae);te(_objectSpread$2({data:ie},oe))}displayCORSWarning()}te(ne)})}),_defineProperty(_assertThisInitialized(V),"registerPage",function(te,ne){V.pages[te]=ne}),_defineProperty(_assertThisInitialized(V),"unregisterPage",function(te){delete V.pages[te]}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(K){var J=this.props.file;J!==K.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask),this.loadingTask&&this.loadingTask.destroy()}},{key:"childContext",get:function(){var K=this.linkService,J=this.registerPage,ee=this.unregisterPage,te=this.props,ne=te.imageResourcesPath,re=te.renderMode,ae=te.rotate,oe=this.state.pdf;return{imageResourcesPath:ne,linkService:K,pdf:oe,registerPage:J,renderMode:re,rotate:ae,unregisterPage:ee}}},{key:"eventProps",get:function(){var K=this;return makeEventProps(this.props,function(){return K.state.pdf})}},{key:"renderChildren",value:function(){var K=this.props.children;return React.createElement(DocumentContext.Provider,{value:this.childContext},K)}},{key:"renderContent",value:function(){var K=this.props.file,J=this.state.pdf;if(!K){var ee=this.props.noData;return React.createElement(Message,{type:"no-data"},typeof ee=="function"?ee():ee)}if(J===null){var te=this.props.loading;return React.createElement(Message,{type:"loading"},typeof te=="function"?te():te)}if(J===!1){var ne=this.props.error;return React.createElement(Message,{type:"error"},typeof ne=="function"?ne():ne)}return this.renderChildren()}},{key:"render",value:function(){var K=this.props,J=K.className,ee=K.inputRef;return React.createElement("div",_extends({className:mergeClassNames("react-pdf__Document",J),ref:ee},this.eventProps),this.renderContent())}}]),F}(React.PureComponent);Document$1.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF…",noData:"No PDF file specified.",onPassword:function C($,F){switch(F){case PasswordResponses.NEED_PASSWORD:{var V=prompt("Enter the password to open this PDF file.");$(V);break}case PasswordResponses.INCORRECT_PASSWORD:{var K=prompt("Invalid password. Please try again.");$(K);break}}}};var isFunctionOrNode$1=PropTypes.oneOfType([PropTypes.func,PropTypes.node]);Document$1.propTypes=_objectSpread$2(_objectSpread$2({},eventProps),{},{children:PropTypes.node,className:isClassName,error:isFunctionOrNode$1,externalLinkRel:PropTypes.string,externalLinkTarget:PropTypes.string,file:isFile,imageResourcesPath:PropTypes.string,inputRef:isRef,loading:isFunctionOrNode$1,noData:isFunctionOrNode$1,onItemClick:PropTypes.func,onLoadError:PropTypes.func,onLoadProgress:PropTypes.func,onLoadSuccess:PropTypes.func,onPassword:PropTypes.func,onSourceError:PropTypes.func,onSourceSuccess:PropTypes.func,rotate:PropTypes.number});var isDestination=PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.any)]);PropTypes.shape({dest:isDestination,items:PropTypes.arrayOf(PropTypes.shape({dest:isDestination,title:PropTypes.string})),title:PropTypes.string}).isRequired,PropTypes.func,isPdf.isRequired;function ownKeys$1(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread$1(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys$1(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys$1(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}_objectSpread$1({className:isClassName,inputRef:isRef,onItemClick:PropTypes.func,onLoadError:PropTypes.func,onLoadSuccess:PropTypes.func,pdf:isPdf},eventProps);function mergeRefs(){for(var C=[],$=0;$<arguments.length;$++)C[$]=arguments[$];var F=C.filter(Boolean);if(F.length<=1){var V=F[0];return V||null}return function(J){F.forEach(function(ee){typeof ee=="function"?ee(J):ee&&(ee.current=J)})}}const PageContext=React.createContext(null);function _createSuper$5(C){var $=_isNativeReflectConstruct$5();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$5(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var ANNOTATION_MODE=pdfExports.AnnotationMode,PageCanvasInternal=function(C){_inherits(F,C);var $=_createSuper$5(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"canvasElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){V.renderer=null;var te=V.props,ne=te.onRenderSuccess,re=te.page,ae=te.scale;ne&&ne(makePageCallback(re,ae))}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){if(!isCancelException(te)){warning(te);var ne=V.props.onRenderError;ne&&ne(te)}}),_defineProperty(_assertThisInitialized(V),"drawPageOnCanvas",function(){var te=V.canvasElement.current;if(!te)return null;var ne=_assertThisInitialized(V),re=ne.renderViewport,ae=ne.viewport,oe=V.props,ie=oe.canvasBackground,se=oe.page,ue=oe.renderForms;te.width=re.width,te.height=re.height,te.style.width="".concat(Math.floor(ae.width),"px"),te.style.height="".concat(Math.floor(ae.height),"px");var de={annotationMode:ue?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,get canvasContext(){return te.getContext("2d")},viewport:re};return ie&&(de.background=ie),V.cancelRenderingTask(),V.renderer=se.render(de),V.renderer.promise.then(V.onRenderSuccess).catch(V.onRenderError)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(K){var J=this.props,ee=J.canvasBackground,te=J.page,ne=J.renderForms;(ee!==K.canvasBackground||ne!==K.renderForms)&&(te.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask();var K=this.canvasElement.current;K&&(K.width=0,K.height=0)}},{key:"cancelRenderingTask",value:function(){this.renderer&&(this.renderer.cancel(),this.renderer=null)}},{key:"renderViewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale,ne=getPixelRatio();return J.getViewport({scale:te*ne,rotation:ee})}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"render",value:function(){var K=this.props.canvasRef;return React.createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:mergeRefs(K,this.canvasElement),style:{display:"block",userSelect:"none"}})}}]),F}(React.PureComponent);PageCanvasInternal.propTypes={canvasBackground:PropTypes.string,canvasRef:isRef,onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,page:isPage.isRequired,renderForms:PropTypes.bool,rotate:isRotate,scale:PropTypes.number.isRequired};function PageCanvas(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(PageCanvasInternal,_extends({},$,C))})}function _createSuper$4(C){var $=_isNativeReflectConstruct$4();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var PageSVGInternal=function(C){_inherits(F,C);var $=_createSuper$4(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{svg:null}),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){V.renderer=null;var te=V.props,ne=te.onRenderSuccess,re=te.page,ae=te.scale;ne&&ne(makePageCallback(re,ae))}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){if(!isCancelException(te)){warning(te);var ne=V.props.onRenderError;ne&&ne(te)}}),_defineProperty(_assertThisInitialized(V),"renderSVG",function(){var te=V.props.page;return V.renderer=te.getOperatorList(),V.renderer.then(function(ne){var re=new pdfExports.SVGGraphics(te.commonObjs,te.objs);V.renderer=re.getSVG(ne,V.viewport).then(function(ae){V.setState({svg:ae},V.onRenderSuccess)}).catch(V.onRenderError)}).catch(V.onRenderError)}),_defineProperty(_assertThisInitialized(V),"drawPageOnContainer",function(te){var ne=V.state.svg;if(!(!te||!ne)){te.firstElementChild||te.appendChild(ne);var re=V.viewport,ae=re.width,oe=re.height;ne.setAttribute("width",ae),ne.setAttribute("height",oe)}}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"render",value:function(){var K=this,J=this.viewport,ee=J.width,te=J.height;return React.createElement("div",{className:"react-pdf__Page__svg",ref:function(re){return K.drawPageOnContainer(re)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:ee,height:te,userSelect:"none"}})}}]),F}(React.PureComponent);PageSVGInternal.propTypes={onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number.isRequired};function PageSVG(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(PageSVGInternal,_extends({},$,C))})}function _createSuper$3(C){var $=_isNativeReflectConstruct$3();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var TextLayerItemInternal=function(C){_inherits(F,C);var $=_createSuper$3(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"itemElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"getElementWidth",function(te){var ne=_assertThisInitialized(V),re=ne.sideways;return te.getBoundingClientRect()[re?"height":"width"]}),V}return _createClass(F,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"unrotatedViewport",get:function(){var K=this.props,J=K.page,ee=K.scale;return J.getViewport({scale:ee})}},{key:"rotate",get:function(){var K=this.props,J=K.page,ee=K.rotate;return ee-J.rotate}},{key:"sideways",get:function(){var K=this.rotate;return K%180!==0}},{key:"defaultSideways",get:function(){var K=this.unrotatedViewport.rotation;return K%180!==0}},{key:"fontSize",get:function(){var K=this.props.transform,J=this.defaultSideways,ee=_slicedToArray(K,2),te=ee[0],ne=ee[1];return J?ne:te}},{key:"top",get:function(){var K=this.props.transform,J=this.unrotatedViewport,ee=this.defaultSideways,te=_slicedToArray(K,6),ne=te[2],re=te[3],ae=te[4],oe=te[5],ie=_slicedToArray(J.viewBox,4),se=ie[1],ue=ie[3];return ee?ae+ne+se:ue-(oe+re)}},{key:"left",get:function(){var K=this.props.transform,J=this.unrotatedViewport,ee=this.defaultSideways,te=_slicedToArray(K,6),ne=te[4],re=te[5],ae=_slicedToArray(J.viewBox,1),oe=ae[0];return ee?re-oe:ne-oe}},{key:"getFontData",value:function(K){var J=this.props.page;return new Promise(function(ee){J.commonObjs.get(K,ee)})}},{key:"alignTextItem",value:function(){var K=this,J=this.itemElement.current;if(J){J.style.transform="";var ee=this.props,te=ee.fontName,ne=ee.scale,re=ee.width;J.style.fontFamily="".concat(te,", sans-serif"),this.getFontData(te).then(function(ae){var oe=ae?ae.fallbackName:"sans-serif";J.style.fontFamily="".concat(te,", ").concat(oe);var ie=re*ne,se=K.getElementWidth(J),ue="scaleX(".concat(ie/se,")"),de=ae?ae.ascent:0;de&&(ue+=" translateY(".concat((1-de)*100,"%)")),J.style.transform=ue,J.style.WebkitTransform=ue})}}},{key:"render",value:function(){var K=this.fontSize,J=this.top,ee=this.left,te=this.props,ne=te.customTextRenderer,re=te.scale,ae=te.str;return React.createElement("span",{ref:this.itemElement,style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(K*re,"px"),position:"absolute",top:"".concat(J*re,"px"),left:"".concat(ee*re,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},ne?ne(this.props):ae)}}]),F}(React.PureComponent);TextLayerItemInternal.propTypes={customTextRenderer:PropTypes.func,fontName:PropTypes.string.isRequired,itemIndex:PropTypes.number.isRequired,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number,str:PropTypes.string.isRequired,transform:PropTypes.arrayOf(PropTypes.number).isRequired,width:PropTypes.number.isRequired};function TextLayerItem(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(TextLayerItemInternal,_extends({},$,C))})}function _createSuper$2(C){var $=_isNativeReflectConstruct$2();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$2(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var TextLayerInternal=function(C){_inherits(F,C);var $=_createSuper$2(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{textItems:null}),_defineProperty(_assertThisInitialized(V),"loadTextItems",function(){var te=V.props.page,ne=makeCancellablePromise(te.getTextContent());V.runningTask=ne,ne.promise.then(function(re){var ae=re.items;V.setState({textItems:ae},V.onLoadSuccess)}).catch(function(re){V.onLoadError(re)})}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onGetTextSuccess,ne=V.state.textItems;te&&te(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({textItems:!1}),warning(te);var ne=V.props.onGetTextError;ne&&ne(te)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.page;invariant(K,"Attempted to load page text content, but no page was specified."),this.loadTextItems()}},{key:"componentDidUpdate",value:function(K){var J=this.props.page;K.page&&J!==K.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask)}},{key:"unrotatedViewport",get:function(){var K=this.props,J=K.page,ee=K.scale;return J.getViewport({scale:ee})}},{key:"rotate",get:function(){var K=this.props,J=K.page,ee=K.rotate;return ee-J.rotate}},{key:"renderTextItems",value:function(){var K=this.state.textItems;return K?K.map(function(J,ee){return React.createElement(TextLayerItem,_extends({key:ee,itemIndex:ee},J))}):null}},{key:"render",value:function(){var K=this.unrotatedViewport,J=this.rotate;return React.createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(K.width,"px"),height:"".concat(K.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(J,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(J,"deg)"),pointerEvents:"none"}},this.renderTextItems())}}]),F}(React.PureComponent);TextLayerInternal.propTypes={onGetTextError:PropTypes.func,onGetTextSuccess:PropTypes.func,page:isPage.isRequired,rotate:isRotate,scale:PropTypes.number};function TextLayer(C){return React.createElement(PageContext.Consumer,null,function($){return React.createElement(TextLayerInternal,_extends({},$,C))})}function _createSuper$1(C){var $=_isNativeReflectConstruct$1();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct$1(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var AnnotationLayerInternal=function(C){_inherits(F,C);var $=_createSuper$1(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{annotations:null}),_defineProperty(_assertThisInitialized(V),"layerElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"loadAnnotations",function(){var te=V.props.page,ne=makeCancellablePromise(te.getAnnotations());V.runningTask=ne,ne.promise.then(function(re){V.setState({annotations:re},V.onLoadSuccess)}).catch(function(re){V.onLoadError(re)})}),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props.onGetAnnotationsSuccess,ne=V.state.annotations;te&&te(ne)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({annotations:!1}),warning(te);var ne=V.props.onGetAnnotationsError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"onRenderSuccess",function(){var te=V.props.onRenderAnnotationLayerSuccess;te&&te()}),_defineProperty(_assertThisInitialized(V),"onRenderError",function(te){warning(te);var ne=V.props.onRenderAnnotationLayerError;ne&&ne(te)}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.page;invariant(K,"Attempted to load page annotations, but no page was specified."),this.loadAnnotations()}},{key:"componentDidUpdate",value:function(K){var J=this.props,ee=J.page,te=J.renderForms;(K.page&&ee!==K.page||te!==K.renderForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){cancelRunningTask(this.runningTask)}},{key:"viewport",get:function(){var K=this.props,J=K.page,ee=K.rotate,te=K.scale;return J.getViewport({scale:te,rotation:ee})}},{key:"renderAnnotationLayer",value:function(){var K=this.state.annotations;if(K){var J=this.props,ee=J.imageResourcesPath,te=J.linkService,ne=J.page,re=J.renderForms,ae=this.viewport.clone({dontFlip:!0}),oe={annotations:K,div:this.layerElement.current,imageResourcesPath:ee,linkService:te,page:ne,renderForms:re,viewport:ae};this.layerElement.current.innerHTML="";try{pdfExports.AnnotationLayer.render(oe),this.onRenderSuccess()}catch(ie){this.onRenderError(ie)}}}},{key:"render",value:function(){return React.createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:this.layerElement},this.renderAnnotationLayer())}}]),F}(React.PureComponent);AnnotationLayerInternal.propTypes={imageResourcesPath:PropTypes.string,linkService:isLinkService.isRequired,onGetAnnotationsError:PropTypes.func,onGetAnnotationsSuccess:PropTypes.func,onRenderAnnotationLayerError:PropTypes.func,onRenderAnnotationLayerSuccess:PropTypes.func,page:isPage,renderForms:PropTypes.bool,rotate:isRotate,scale:PropTypes.number};var AnnotationLayer=function C($){return React.createElement(DocumentContext.Consumer,null,function(F){return React.createElement(PageContext.Consumer,null,function(V){return React.createElement(AnnotationLayerInternal,_extends({},F,V,$))})})};function ownKeys(C,$){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(C);$&&(V=V.filter(function(K){return Object.getOwnPropertyDescriptor(C,K).enumerable})),F.push.apply(F,V)}return F}function _objectSpread(C){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?ownKeys(Object(F),!0).forEach(function(V){_defineProperty(C,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):ownKeys(Object(F)).forEach(function(V){Object.defineProperty(C,V,Object.getOwnPropertyDescriptor(F,V))})}return C}function _createSuper(C){var $=_isNativeReflectConstruct();return function(){var V=_getPrototypeOf(C),K;if($){var J=_getPrototypeOf(this).constructor;K=Reflect.construct(V,arguments,J)}else K=V.apply(this,arguments);return _possibleConstructorReturn(this,K)}}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(C){return!1}}var defaultScale=1,PageInternal=function(C){_inherits(F,C);var $=_createSuper(F);function F(){var V;_classCallCheck(this,F);for(var K=arguments.length,J=new Array(K),ee=0;ee<K;ee++)J[ee]=arguments[ee];return V=$.call.apply($,[this].concat(J)),_defineProperty(_assertThisInitialized(V),"state",{page:null}),_defineProperty(_assertThisInitialized(V),"pageElement",React.createRef()),_defineProperty(_assertThisInitialized(V),"onLoadSuccess",function(){var te=V.props,ne=te.onLoadSuccess,re=te.registerPage,ae=V.state.page;ne&&ne(makePageCallback(ae,V.scale)),re&&re(V.pageIndex,V.pageElement.current)}),_defineProperty(_assertThisInitialized(V),"onLoadError",function(te){V.setState({page:!1}),warning(te);var ne=V.props.onLoadError;ne&&ne(te)}),_defineProperty(_assertThisInitialized(V),"loadPage",function(){var te=V.props.pdf,ne=V.getPageNumber();if(ne){V.setState(function(ae){return ae.page?{page:null}:null});var re=makeCancellablePromise(te.getPage(ne));V.runningTask=re,re.promise.then(function(ae){V.setState({page:ae},V.onLoadSuccess)}).catch(function(ae){V.onLoadError(ae)})}}),V}return _createClass(F,[{key:"componentDidMount",value:function(){var K=this.props.pdf;invariant(K,"Attempted to load a page, but no document was specified."),this.loadPage()}},{key:"componentDidUpdate",value:function(K){var J=this.props.pdf;if(K.pdf&&J!==K.pdf||this.getPageNumber()!==this.getPageNumber(K)){var ee=this.props.unregisterPage;ee&&ee(this.getPageIndex(K)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var K=this.props.unregisterPage;K&&K(this.pageIndex),cancelRunningTask(this.runningTask)}},{key:"childContext",get:function(){var K=this.state.page;if(!K)return{};var J=this.props,ee=J.canvasBackground,te=J.customTextRenderer,ne=J.onGetAnnotationsError,re=J.onGetAnnotationsSuccess,ae=J.onGetTextError,oe=J.onGetTextSuccess,ie=J.onRenderAnnotationLayerError,se=J.onRenderAnnotationLayerSuccess,ue=J.onRenderError,de=J.onRenderSuccess,le=J.renderForms,ve=J.renderInteractiveForms;return{canvasBackground:ee,customTextRenderer:te,onGetAnnotationsError:ne,onGetAnnotationsSuccess:re,onGetTextError:ae,onGetTextSuccess:oe,onRenderAnnotationLayerError:ie,onRenderAnnotationLayerSuccess:se,onRenderError:ue,onRenderSuccess:de,page:K,renderForms:le!=null?le:ve,rotate:this.rotate,scale:this.scale}}},{key:"getPageIndex",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return isProvided(K.pageNumber)?K.pageNumber-1:isProvided(K.pageIndex)?K.pageIndex:null}},{key:"getPageNumber",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return isProvided(K.pageNumber)?K.pageNumber:isProvided(K.pageIndex)?K.pageIndex+1:null}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var K=this.props.rotate;if(isProvided(K))return K;var J=this.state.page;return J?J.rotate:null}},{key:"scale",get:function(){var K=this.state.page;if(!K)return null;var J=this.props,ee=J.scale,te=J.width,ne=J.height,re=this.rotate,ae=1,oe=ee===null?defaultScale:ee;if(te||ne){var ie=K.getViewport({scale:1,rotation:re});ae=te?te/ie.width:ne/ie.height}return oe*ae}},{key:"eventProps",get:function(){var K=this;return makeEventProps(this.props,function(){var J=K.state.page;return J&&makePageCallback(J,K.scale)})}},{key:"pageKey",get:function(){var K=this.state.page;return"".concat(K.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var K=this.state.page;return"".concat(K.pageIndex,"/").concat(this.rotate)}},{key:"renderMainLayer",value:function(){var K=this.props,J=K.canvasRef,ee=K.renderMode;switch(ee){case"none":return null;case"svg":return React.createElement(PageSVG,{key:"".concat(this.pageKeyNoScale,"_svg")});case"canvas":default:return React.createElement(PageCanvas,{key:"".concat(this.pageKey,"_canvas"),canvasRef:J})}}},{key:"renderTextLayer",value:function(){var K=this.props.renderTextLayer;return K?React.createElement(TextLayer,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var K=this.props.renderAnnotationLayer;return K?React.createElement(AnnotationLayer,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var K=this.props.children;return React.createElement(PageContext.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),K)}},{key:"renderContent",value:function(){var K=this.pageNumber,J=this.props.pdf,ee=this.state.page;if(!K){var te=this.props.noData;return React.createElement(Message,{type:"no-data"},typeof te=="function"?te():te)}if(J===null||ee===null){var ne=this.props.loading;return React.createElement(Message,{type:"loading"},typeof ne=="function"?ne():ne)}if(J===!1||ee===!1){var re=this.props.error;return React.createElement(Message,{type:"error"},typeof re=="function"?re():re)}return this.renderChildren()}},{key:"render",value:function(){var K=this.pageNumber,J=this.props,ee=J.className,te=J.inputRef;return React.createElement("div",_extends({className:mergeClassNames("react-pdf__Page",ee),"data-page-number":K,ref:mergeRefs(te,this.pageElement),style:{position:"relative"}},this.eventProps),this.renderContent())}}]),F}(React.PureComponent);PageInternal.defaultProps={error:"Failed to load the page.",loading:"Loading page…",noData:"No page specified.",renderAnnotationLayer:!0,renderForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:defaultScale};var isFunctionOrNode=PropTypes.oneOfType([PropTypes.func,PropTypes.node]);PageInternal.propTypes=_objectSpread(_objectSpread({},eventProps),{},{canvasBackground:PropTypes.string,children:PropTypes.node,className:isClassName,customTextRenderer:PropTypes.func,error:isFunctionOrNode,height:PropTypes.number,imageResourcesPath:PropTypes.string,inputRef:isRef,loading:isFunctionOrNode,noData:isFunctionOrNode,onGetTextError:PropTypes.func,onGetTextSuccess:PropTypes.func,onLoadError:PropTypes.func,onLoadSuccess:PropTypes.func,onRenderError:PropTypes.func,onRenderSuccess:PropTypes.func,pageIndex:isPageIndex,pageNumber:isPageNumber,pdf:isPdf,registerPage:PropTypes.func,renderAnnotationLayer:PropTypes.bool,renderForms:PropTypes.bool,renderInteractiveForms:PropTypes.bool,renderMode:isRenderMode,renderTextLayer:PropTypes.bool,rotate:isRotate,scale:PropTypes.number,unregisterPage:PropTypes.func,width:PropTypes.number});function Page(C,$){return React.createElement(DocumentContext.Consumer,null,function(F){return React.createElement(PageInternal,_extends({ref:$},F,C))})}const Page$1=React.forwardRef(Page);displayWorkerWarning(),pdfExports.GlobalWorkerOptions.workerSrc="pdf.worker.js";const toDDMMYY=C=>{const $=new Date(C),F=String($.getMonth()+1).padStart(2,"0"),V=String($.getDate()).padStart(2,"0"),K=$.getFullYear().toString().slice(2);return[V,F,K].join("/")},fitmentService=careerHubApi.injectEndpoints({endpoints:C=>({getFitment:C.query({query:({jobProfileId:$})=>({url:"/api/v3/user-resumes/job-fitment-evaluation",params:{job_profile_id:$},method:"POST"})})})}),{useGetFitmentQuery}=fitmentService,resumeService=careerHubApi.injectEndpoints({endpoints:C=>({getResumesEligibility:C.query({query:({jobProfileId:$})=>({url:"/api/v3/user-resumes/eligibility",params:{job_profile_id:$}})}),getResumeLink:C.query({query:({resumeId:$})=>({url:`/api/v3/user-resumes/${$}/download`,method:"GET"})})})}),{useGetResumesEligibilityQuery,useGetResumeLinkQuery}=resumeService;function isNullOrUndefined(C){return C==null}const container$4="_container_20j4d_1",resumeChoiceOptionLabel="_resumeChoiceOptionLabel_20j4d_5",resumeChoiceOptionLabelChecked="_resumeChoiceOptionLabelChecked_20j4d_16",resumeChoiceOptionLabelContent="_resumeChoiceOptionLabelContent_20j4d_23",resumeChoiceOptionLabelName="_resumeChoiceOptionLabelName_20j4d_27",resumeChoiceOptionLabelModifiedAt="_resumeChoiceOptionLabelModifiedAt_20j4d_33",resumeChoiceOptionLabelCard="_resumeChoiceOptionLabelCard_20j4d_38",resumeChoiceOptionLabelCardHeader="_resumeChoiceOptionLabelCardHeader_20j4d_42",resumeChoiceOptionLabelEditButton="_resumeChoiceOptionLabelEditButton_20j4d_46",resumeChoiceOptionLabelImprovementsList="_resumeChoiceOptionLabelImprovementsList_20j4d_50",resumePreviewContainer="_resumePreviewContainer_20j4d_55",fitmentScoreTitle="_fitmentScoreTitle_20j4d_65",styles$l={container:container$4,resumeChoiceOptionLabel,resumeChoiceOptionLabelChecked,resumeChoiceOptionLabelContent,resumeChoiceOptionLabelName,resumeChoiceOptionLabelModifiedAt,resumeChoiceOptionLabelCard,resumeChoiceOptionLabelCardHeader,resumeChoiceOptionLabelEditButton,resumeChoiceOptionLabelImprovementsList,resumePreviewContainer,fitmentScoreTitle};function FitmentScore({score:C}){let $={"0%":"#FC2119","60%":"#FF9C40"},F="#FFD5C0";return Number(C)>=60&&($={"0%":"#FC8019","80%":"#FFD284"},F="#FC910033"),Number(C)>=80&&($={"0%":"#03522D","100%":"#22C477"},F="#1A845233"),isNullOrUndefined(C)?null:React.createElement(Flex$1,{vertical:!0,gap:4,className:styles$l.fitmentScore},React.createElement(Typography$1.Text,{className:styles$l.fitmentScoreTitle},"Your Resume Fit Score:"),React.createElement(Progress$1,{size:["default",12],percent:C,className:styles$l.fitmentScoreProgress,strokeColor:$,trailColor:F}))}const RESUME_BLOCKER_POINTS={bullets:"Bullet points should be used in project and work experience description for improved readability. Please use text editor's bullet point functionality for better indentation & formatting.",skills:"At-least 5 skills should be included in your resume.",contentSize:"Your resume should be fully completed and not left incomplete or partially done.",experience:"At-least one project/experience with a sufficiently detailed description should be present in your resume.",projects:"At-least one project/experience with a sufficiently detailed description should be present in your resume.",garbage_collection:"All the details of the resume should be accurate."};function getBlockerPointsList(C){const{blocker_and_garbage_details:$,tech_stack_check:F}=C||{},{blockers:V,garbage_collection:K}=$||{},{user_work_experiences:J,user_educations:ee}=K||{},te=[];return Object.keys(V||{}).forEach(ne=>{if(!V[ne])return;const re=RESUME_BLOCKER_POINTS[ne];re&&te.push(re)}),(F==null?void 0:F.is_eligible)===!1&&(F!=null&&F.details)&&F.details.forEach(ne=>{te.push(`Missing skill to be added: ${ne.skill} (${ne.proficiency_period}yr exp)`)}),(J==null?void 0:J.length)>0&&J.forEach(ne=>{te.push(`Inaccurate work experience: ${ne.company} - ${ne.job_title}`)}),(ee==null?void 0:ee.length)>0&&ee.forEach(ne=>{te.push(`Inaccurate education: ${ne.university} - ${ne.degree} (${ne.branch})`)}),te}function BlockerPoints({value:C}){const $=reactRedux.useDispatch(),[F,V]=React.useState(!0),{onEditResume:K,jobProfileId:J}=useApplicationFormContext(),{analytics:ee}=useJobPreview(),{resume_details:te,is_blocker:ne}=C||{},{id:re,name:ae}=te||{},oe=getBlockerPointsList(C),ie=oe.length,se=()=>{ee==null||ee.click("Blocker Points - Collapse",PRODUCT_NAME),V(!F)},ue=()=>{ee==null||ee.click("Blocker Points - Edit Resume",PRODUCT_NAME),K(re),$(setActiveResume({jobProfileId:J,resumeId:re,blockerPoints:oe,resumeName:ae})),$(setChecklistOpen({syncWithBlockerPoints:!0}))};return React.createElement(Card$1,{size:"small",rootClassName:styles$l.resumeChoiceOptionLabelCard},React.createElement(Flex$1,{gap:8,className:styles$l.resumeChoiceOptionLabelCardHeader},ne&&React.createElement(ExclamationCircleTwoTone$1,{twoToneColor:"#FAAD14"}),!ne&&React.createElement(CheckCircleTwoTone$1,{twoToneColor:"#52c41a"}),React.createElement(Typography$1.Text,null,ne?`Improvements to be made (${ie})`:"No improvements to be made"),React.createElement(Button$2,{type:"link",className:styles$l.resumeChoiceOptionLabelEditButton,onClick:ue},"Edit"),ne&&React.createElement(Button$2,{type:"text",className:styles$l.resumeChoiceOptionLabelCollapseButton,onClick:se},F?React.createElement(DownOutlined$1,null):React.createElement(UpOutlined$1,null))),!F&&React.createElement("ul",{className:styles$l.resumeChoiceOptionLabelImprovementsList},oe.map((de,le)=>React.createElement("li",{key:le},de))))}pdfExports.GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfExports.version}/pdf.worker.min.js`;const MAX_RETRY_COUNT=6;function ResumeChoiceOptionLabel({value:C}){var se,ue;const{selectedResume:$,setSelectedResume:F,jobProfileId:V}=useApplicationFormContext(),K=reactRedux.useSelector(de=>{var le;return(le=de.scalantCareerHub.resumeFitment)==null?void 0:le.fitmentScore}),{resume_details:J,is_blocker:ee}=C||{},{id:te,name:ne,modified_at:re}=J||{},ae=$===te&&!ee,oe=(ue=(se=K==null?void 0:K[V])==null?void 0:se[te])==null?void 0:ue.score,ie=()=>{F(te)};return React.createElement(Radio$1,{onChange:ie,checked:ae,className:classNames(styles$l.resumeChoiceOptionLabel,{[styles$l.resumeChoiceOptionLabelChecked]:ae}),disabled:ee},React.createElement(Flex$1,{vertical:!0,gap:12,className:styles$l.resumeChoiceOptionLabelContent},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{vertical:!0,gap:4},React.createElement(Typography$1.Text,{className:styles$l.resumeChoiceOptionLabelName},ne),React.createElement(Typography$1.Text,{className:styles$l.resumeChoiceOptionLabelModifiedAt},"Last Modified: ",toDDMMYY(re))),React.createElement(FitmentScore,{score:oe})),React.createElement(BlockerPoints,{value:C})))}function ResumePreview(){const[C,$]=React.useState(0),{selectedResume:F}=useApplicationFormContext(),{data:V,isFetching:K}=useGetResumeLinkQuery({resumeId:F},{skip:!F}),J=ee=>{C<MAX_RETRY_COUNT?setTimeout(()=>{$(C+1)},1e3):console.error("Error while loading pdf! ",ee.message)};return!(V!=null&&V.link)||K?React.createElement(Skeleton$1,{active:!0}):React.createElement(Document$1,{className:styles$l.resumePreview,file:V==null?void 0:V.link,loading:React.createElement(Skeleton$1,{active:!0}),onLoadError:J,error:React.createElement(Skeleton$1,{active:!0}),key:C},React.createElement(Page$1,{pageNumber:1}))}function ResumeChoiceSelect(){const{setSelectedResume:C}=useApplicationFormContext(),{jobProfileId:$}=useApplicationFormContext(),{data:F,isLoading:V}=useGetResumesEligibilityQuery({jobProfileId:$});return useGetFitmentQuery({jobProfileId:$},{skip:!$}),React.useEffect(()=>{var J,ee;if(!F)return;const K=(ee=(J=Object.values(F).find(te=>{var ne;return((ne=te==null?void 0:te.resume_details)==null?void 0:ne.default)&&!(te!=null&&te.is_blocker)}))==null?void 0:J.resume_details)==null?void 0:ee.id;C(K)},[F,C]),V||!F?React.createElement(Skeleton$1,{active:!0}):React.createElement(Flex$1,{className:styles$l.container},React.createElement(Flex$1,{flex:1,vertical:!0,gap:16},Object.entries(F).map(([K,J])=>React.createElement(ResumeChoiceOptionLabel,{key:K,value:J}))),React.createElement(Flex$1,{className:styles$l.resumePreviewContainer,flex:1},React.createElement(ResumePreview,null)))}const container$3="_container_12d5d_1",icon="_icon_12d5d_6",title$1="_title_12d5d_11",description$1="_description_12d5d_17",styles$k={container:container$3,icon,title:title$1,description:description$1},EVALUATION_COMPLETION_TIMEOUT=3e4;function ResumeFitmentCheck(){const{jobProfileId:C,setStepName:$}=useApplicationFormContext(),{isError:F}=useGetFitmentQuery({jobProfileId:C}),{data:V}=useGetResumesEligibilityQuery({jobProfileId:C}),{fitmentScore:K}=reactRedux.useSelector(J=>J.scalantCareerHub.resumeFitment)||{};return React.useEffect(()=>{const J=Object.keys(V||{});J.length>0&&Object.keys((K==null?void 0:K[C])||{}).length===J.length&&$(APPLICATION_STATUS.RESUME_CHOICE_SELECT)},[K,C,V,$]),React.useEffect(()=>{const J=setTimeout(()=>{$(APPLICATION_STATUS.RESUME_CHOICE_SELECT)},EVALUATION_COMPLETION_TIMEOUT);return()=>clearTimeout(J)},[$]),React.useEffect(()=>{F&&(message$1.error("Failed to evaluate job fitment"),$(APPLICATION_STATUS.RESUME_CHOICE_SELECT))},[F,$]),React.createElement(Flex$1,{vertical:!0,gap:8,className:styles$k.container,justify:"center",align:"center"},React.createElement(FileTextTwoTone$1,{size:72,className:styles$k.icon}),React.createElement(Typography$1.Text,{className:styles$k.title,strong:!0},"Analysing the Right Resume for you to Apply!"),React.createElement(Typography$1.Text,{className:styles$k.description},"Receive instant insights and a fitment score to know which resume works best. Fix key gaps and boost your chances of getting noticed by top companies"))}const container$2="_container_12cd3_1",footer="_footer_12cd3_8",text="_text_12cd3_12",heading$1="_heading_12cd3_16",styles$j={container:container$2,footer,text,heading:heading$1},NOTIFICATION_KEY="resume-fitment-checklist",MAX_CHECKLIST_ITEMS=5,Description=()=>{const{activeResumeChecklist:C}=reactRedux.useSelector($=>$.scalantCareerHub.resumeFitment)||{};return React.createElement(Flex$1,{vertical:!0,gap:8},React.createElement(Typography$1.Text,{className:styles$j.text},"Please update the remaining sections as per the feedback to boost hiring chances"),React.createElement(Typography$1.Text,{strong:!0,className:styles$j.heading},"Improvements to be made"),C.slice(0,MAX_CHECKLIST_ITEMS).map(($,F)=>React.createElement(Checkbox$1,null,React.createElement(Typography$1.Text,{className:styles$j.text,key:F},$))))},Footer=({closeNotification:C})=>React.createElement(Flex$1,{justify:"space-between",className:styles$j.footer},React.createElement(Flex$1,{gap:4,align:"center"},React.createElement(CheckCircleFilled$1,{style:{color:"#20A164"}}),React.createElement(Typography$1.Text,{className:styles$j.text},"When your resume is ready")),React.createElement(Button$2,{type:"primary",onClick:C},"Proceed to Apply"));function ResumeFitmentChecklist(){const C=reactRedux.useDispatch(),[$,F]=notification$1.useNotification(),{activeResumeChecklist:V,activeResumeName:K,isChecklistOpen:J}=reactRedux.useSelector(se=>se.scalantCareerHub.resumeFitment)||{},{setActiveApplicationId:ee,jobId:te,analytics:ne,onCloseResumeBuilder:re}=useJobPreview(),ae=React.useCallback(()=>{$.destroy(NOTIFICATION_KEY),ee(te),C(setChecklistOpen({isOpen:!1})),ne==null||ne.click("Resume Fitment Checklist - Close",PRODUCT_NAME)},[ne,C,te,ee,$]),oe=React.useCallback(()=>{ae(),re(),ne==null||ne.click("Resume Fitment Checklist - Proceed to Apply",PRODUCT_NAME)},[ne,ae,re]),ie=React.useCallback(()=>{!K||!(V!=null&&V.length)||($.warning({key:NOTIFICATION_KEY,message:K,placement:"bottomRight",description:React.createElement(Description,null),onClose:ae,closeIcon:null,duration:null,btn:React.createElement(Footer,{closeNotification:oe}),className:styles$j.container}),ne==null||ne.click("Resume Fitment Checklist - Open",PRODUCT_NAME))},[K,V,$,ae,oe,ne]);return React.useEffect(()=>{J?ie():ae()},[J,ie,ae]),F}const screeningCallService=careerHubApi.injectEndpoints({endpoints:C=>({issueScreeningCall:C.mutation({query:()=>({url:"/api/v3/careers-hub/screening-call/",method:"POST"})})})}),{useIssueScreeningCallMutation}=screeningCallService,screeningCallBanner="_screeningCallBanner_1ltmt_1",screeningCallIcon="_screeningCallIcon_1ltmt_7",screeningCallButtonIcon="_screeningCallButtonIcon_1ltmt_12",styles$i={screeningCallBanner,screeningCallIcon,screeningCallButtonIcon},ScreeningCallBanner=({forceShow:C=!1})=>{var oe;const $=reactRedux.useSelector(ie=>ie.scalantCareerHub.dashboard.userProfileData),F=(oe=$==null?void 0:$.hasCompletedScreeningCall)!=null?oe:!1,{analytics:V,jobData:K,currentTab:J}=useJobPreview(),{applicationStatus:ee}=K||{},te=ee===APPLICATION_STATUS.WITHDRAWN,[ne,{isLoading:re}]=useIssueScreeningCallMutation(),ae=React.useCallback(()=>sr(this,null,function*(){var se;const ie=yield ne();(se=ie==null?void 0:ie.data)!=null&&se.url?globalThis.open(ie.data.url,"_blank"):message$1.error("Failed to initiate screening call. Please try again."),V==null||V.click("Screening Call - Take Call",PRODUCT_NAME)}),[V,ne]);return F||!C&&(J!==TAG_TO_TAB_MAPPING.applied||te)?null:React.createElement(ActionBanner,{icon:React.createElement("img",{src:ICONS.airplay,className:styles$i.screeningCallIcon}),title:"Complete your 5-minute Screening Call now",description:"Verify your details with a quick screening call and become a priority applicant for us",buttonText:"Take Call",buttonIcon:React.createElement(PhoneOutlined$1,{className:styles$i.screeningCallButtonIcon}),className:styles$i.screeningCallBanner,onClick:ae,isLoading:re})},container$1="_container_16lhm_1",likeBadge="_likeBadge_16lhm_12",description="_description_16lhm_18",styles$h={container:container$1,likeBadge,description},SuccessScreen=()=>React.createElement(Flex$1,{vertical:!0,className:styles$h.container},React.createElement("img",{src:ICONS.likeBadge,alt:"like-badge",className:styles$h.likeBadge}),React.createElement(Typography$1.Title,{level:3},"Application Submitted successfully!"),React.createElement(Typography$1.Text,{className:styles$h.description},"Your job application has now been received by the team, you can track your status within the job details itself"),React.createElement(ScreeningCallBanner,{forceShow:!0}));function FormStep(){const{stepName:C}=useApplicationFormContext();switch(C){case APPLICATION_STATUS.APPLICATION_FORM:return React.createElement(ApplicationForm,null);case APPLICATION_STATUS.RESUME_FITMENT_CHECK:return React.createElement(ResumeFitmentCheck,null);case APPLICATION_STATUS.RESUME_CHOICE_SELECT:return React.createElement(ResumeChoiceSelect,null);case APPLICATION_STATUS.SUCCESSFULLY_APPLIED:return React.createElement(SuccessScreen,null);default:return null}}function FormContainer({onClose:C,currentTab:$,jobProfileId:F,utmId:V,utmMedium:K,utmSource:J,onUploadFile:ee,onEditResume:te,onAddResume:ne}){const[re,ae]=React.useState(!1),{data:oe,isLoading:ie}=useCreateApplication({jobProfileId:F,utmMedium:K,utmSource:J,currentTab:$,utmId:V}),{applicationId:se,status:ue}=oe||{},de=()=>{C(),ae(!1)};return React.useEffect(()=>{ae(!!F)},[F]),React.createElement(ApplicationFormProvider,{onUploadFile:ee,stepName:ue,jobProfileId:F,applicationId:se,onEditResume:te,onAddResume:ne},React.createElement(Drawer$1,{closable:!1,loading:ie,open:re,placement:"bottom",height:600,title:React.createElement(FormHeader,{onClose:de}),footer:React.createElement(Footer$1,{onCancel:de})},React.createElement(FormStep,null)),React.createElement(ResumeFitmentChecklist,null))}FormContainer.propTypes={currentTab:PropTypes.string.isRequired,jobProfileId:PropTypes.number.isRequired,utmId:PropTypes.string,utmMedium:PropTypes.string,utmSource:PropTypes.string};const JobApplicationForm=({currentTab:C,onUploadFile:$,onEditResume:F,onAddResume:V})=>{const{activeApplicationId:K,setActiveApplicationId:J}=useJobPreview(),ee=()=>{J(null)};return K?React.createElement(FormContainer,{onUploadFile:$,jobProfileId:K,onClose:ee,currentTab:C,onEditResume:F,onAddResume:V}):null},container="_container_kgogb_1",actionAlert="_actionAlert_kgogb_14",ineligible="_ineligible_kgogb_24",stepsToApply="_stepsToApply_kgogb_29",actionAlertIcon="_actionAlertIcon_kgogb_35",actionAlertTitle="_actionAlertTitle_kgogb_46",eligible="_eligible_kgogb_52",title="_title_kgogb_57",highlightsList="_highlightsList_kgogb_64",keywordsList="_keywordsList_kgogb_72",keyword="_keyword_kgogb_72",exceptions="_exceptions_kgogb_101",exceptionsIconContainer="_exceptionsIconContainer_kgogb_107",exceptionsIcon="_exceptionsIcon_kgogb_107",exceptionsTitle="_exceptionsTitle_kgogb_116",exception="_exception_kgogb_101",exceptionItem="_exceptionItem_kgogb_124",exceptionsList="_exceptionsList_kgogb_131",styles$g={container,actionAlert,ineligible,stepsToApply,actionAlertIcon,actionAlertTitle,eligible,title,highlightsList,keywordsList,keyword,exceptions,exceptionsIconContainer,exceptionsIcon,exceptionsTitle,exception,exceptionItem,exceptionsList},ActionAlert=({eligibilityStatus:C,metric:$,onScrollToEnd:F})=>{const{analytics:V,setActiveTab:K}=useJobPreview(),J=()=>{K(JOB_BODY_TABS.REQUIREMENTS.key),F(),V==null||V.click("Job Highlights - Complete Tasks",PRODUCT_NAME)};return C===ELIGIBILITY_TYPES.ineligible?React.createElement("div",{className:classNames(styles$g.actionAlert,styles$g.ineligible)},React.createElement(ExclamationCircleOutlined$1,null),React.createElement("span",{className:styles$g.actionAlertTitle},"Unfortunately! Your profile does not have the relevant years of experience for this role")):C===ELIGIBILITY_TYPES.steps_to_apply?React.createElement(ActionBanner,{icon:React.createElement(ClockCircleTwoTone$1,{className:styles$g.actionAlertIcon}),title:`Eligible to apply in ${$} more steps!`,description:"Complete these three test to become eligible to apply!",buttonText:"Complete Tasks",buttonIcon:React.createElement(EditOutlined$1,null),className:styles$g.stepsToApply,onClick:J}):null},HighlightsList=({highlights:C})=>React.createElement(React.Fragment,null,React.createElement("div",{className:styles$g.title},"Top Reasons to Apply"),React.createElement("ul",{className:styles$g.highlightsList},C==null?void 0:C.map($=>React.createElement("li",{key:$,className:styles$g.highlight},React.createElement("span",{className:styles$g.highlightText},$))))),Keywords=({keywords:C,eligibilityStatus:$})=>React.createElement("div",{className:styles$g.keywordsList},C==null?void 0:C.map((F,V)=>React.createElement("div",{key:V,className:classNames(styles$g.keyword,styles$g[toCamelCase($)])},F))),Exceptions=({exceptionalJob:C})=>{if(!C)return null;const $=["Considering your current profile and preferences, you seem to be a right fit","Which means that you get to apply to this job irrespective of the requirements mentioned below","So in case this matches what you are looking for, please apply"];return React.createElement("div",{className:styles$g.exceptions},React.createElement("div",{className:styles$g.exceptionsIconContainer},React.createElement(StarTwoTone$1,{size:20,twoToneColor:"#FAAD14",className:styles$g.exceptionsIcon})),React.createElement("div",null,React.createElement("div",{className:styles$g.exceptionsTitle},"We've made an exception for you!"),React.createElement("ul",{className:styles$g.exceptionsList},$.map((F,V)=>React.createElement("li",{className:[styles$g.exception],key:V},F)))))},JobHighlights=()=>{const{jobData:C,highlights:$,eligibilityCriteria:F,currentTab:V}=useJobPreview(),K=React.useRef(null),{highlights:J,keywords:ee}=$||(C==null?void 0:C.highlights)||{},{tag:te,count:ne}=determineJobTag(C,F||{}),re=()=>{if(K.current&&typeof window!="undefined"){const oe=K.current.getBoundingClientRect(),ie=oe.top+window.pageYOffset,se=oe.height,ue=window.innerHeight,de=ie+se-ue/2;window.scrollTo({top:de,behavior:"smooth"})}};return V===TAG_TO_TAB_MAPPING.applied||!(J!=null&&J.length)?null:React.createElement("div",{ref:K,className:classNames(styles$g.container,styles$g[te])},React.createElement(ActionAlert,{eligibilityStatus:te,metric:ne,onScrollToEnd:re}),React.createElement(HighlightsList,{highlights:J}),React.createElement(Keywords,{keywords:ee,eligibilityStatus:te}),React.createElement(Exceptions,{exceptionalJob:C==null?void 0:C.exceptionalJob}))},expandedJobView="_expandedJobView_1lt4c_2",loadingCard="_loadingCard_1lt4c_18",styles$f={expandedJobView,loadingCard},ExpandedJobViewContent=()=>React.createElement("div",{className:styles$f.expandedJobView},React.createElement(ExpandedJobViewHeader,null),React.createElement(JobHighlights,null),React.createElement(ScreeningCallBanner,null),React.createElement(InterviewExperiencesBanner,null),React.createElement(ExpandedJobViewBody,null)),ExpandedJobView=({analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,isActive:J,currentTab:ee,onUploadFile:te,onEditResume:ne,onAddResume:re,onCloseResumeBuilder:ae})=>{var de;const{data:oe,isLoading:ie,isFetching:se,error:ue}=useGetJobPreviewQuery(K,{skip:!K||!J});return!J||!K?null:ie||se?React.createElement(Card$1,{className:`${styles$f.expandedJobView} ${styles$f.loadingCard}`},React.createElement(Spin$1,{size:"large"})):ue?React.createElement(Card$1,{className:styles$f.expandedJobView},React.createElement(Alert$1,{type:"error",message:"Failed to load job details",description:((de=ue==null?void 0:ue.data)==null?void 0:de.message)||(ue==null?void 0:ue.message)||"Please try again later",showIcon:!0})):oe?React.createElement(App$1,null,React.createElement(JobPreviewProvider,{analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,skip:!J,currentTab:ee,onCloseResumeBuilder:ae},React.createElement(ExpandedJobViewContent,null),React.createElement(JobApplicationForm,{currentTab:ee,onUploadFile:te,onEditResume:ne,onAddResume:re}))):null},jobDetails="_jobDetails_1gavc_1",styles$e={jobDetails};function JobDetails({analytics:C,country:$,openMockInterviewModal:F,openResume:V,jobId:K,className:J,onUploadFile:ee,currentTab:te,onEditResume:ne,onAddResume:re,onCloseResumeBuilder:ae}){return React.useEffect(()=>{K&&(C==null||C.view("Job Details - Render",PRODUCT_NAME,{jobId:K,currentTab:te}))},[C,te,K]),K?React.createElement("div",{className:classNames(styles$e.jobDetails,J)},React.createElement(ExpandedJobView,{analytics:C,onUploadFile:ee,country:$,openMockInterviewModal:F,openResume:V,jobId:K,isActive:!!K,currentTab:te,onEditResume:ne,onAddResume:re,onCloseResumeBuilder:ae})):null}JobDetails.propTypes={country:PropTypes.string,openMockInterviewModal:PropTypes.func,openResume:PropTypes.func,jobId:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),className:PropTypes.string},JobDetails.defaultProps={jobId:null,className:""};const transformJobsData=C=>{if(!C||!(C!=null&&C.data)||!Array.isArray(C==null?void 0:C.data))return[];const $={};return C!=null&&C.included&&Array.isArray(C==null?void 0:C.included)&&(C==null||C.included.forEach(F=>{F.type==="company"&&F.attributes&&($[F.id]=F.attributes)})),C==null?void 0:C.data.map(F=>{if(F.type!=="job_profile"||!F.attributes)return null;const V=F.attributes,K=F.relationships||{};let J=null;if(K.company&&K.company.data){const te=K.company.data.id;J=$[te]||null}return{id:parseInt(F.id,10),title:V.title||"",name:V.title||"",slug:V.slug||"",jobDesc:V.job_desc||"",jobDescText:V.job_desc_text||"",minExperience:V.min_experience?parseFloat(V.min_experience):null,maxExperience:V.max_experience?parseFloat(V.max_experience):null,minCtc:V.min_ctc?parseFloat(V.min_ctc):null,maxCtc:V.max_ctc?parseFloat(V.max_ctc):null,validTill:V.valid_till||null,createdAt:V.created_at||null,jobType:V.job_type||null,preferredCities:V.preferred_cities||"",preferredNoticePeriod:V.preferred_notice_period||null,meritBasedSkills:V.merit_based_skills||[],contestSkills:V.contest_skills||[],applicationStatus:V.application_status||null,expiry:V.expiry||null,applicationId:V.application_id||null,userCompanyStatus:V.user_company_status||null,applicationLastUpdatedAt:V.application_last_upated_at||null,jobSource:V.job_source||null,jobProfileId:V.job_profile_id||null,jobProfileStatus:V.job_profile_status||"active",datePostedOn:V.date_posted_on||null,openForDiscussionCtc:V.open_for_discussion_ctc||!1,appliedOn:V.applied_on||null,seniorityLevel:V.seniority_level||null,roleType:V.role_type||"full_time",duration:V.duration||null,stipend:V.stipend||null,eligibilityCriteria:V.eligibility_criteria||{is_eligible:!1,reasons:[]},exceptionalJob:V.exceptional_job||!1,isRelevant:V.is_relevant||!1,isInternship:V.role_type==="internship",company:J?[parseInt(K.company.data.id,10)]:[],logo:(J==null?void 0:J.logo)||null,companyName:(J==null?void 0:J.name)||null,companySlug:(J==null?void 0:J.slug)||null,companyLocation:(J==null?void 0:J.location)||null,companyWebsite:(J==null?void 0:J.company_website)||null,companyVision:(J==null?void 0:J.company_vision)||null,companyTagline:(J==null?void 0:J.tagline)||null,companyCategory:(J==null?void 0:J.category)||null,companyEmployeeCount:(J==null?void 0:J.employee_count)||null}}).filter(Boolean)},createCompaniesMap=C=>{const $={};return C!=null&&C.included&&Array.isArray(C.included)&&C.included.forEach(F=>{F.type==="company"&&F.attributes&&($[F.id]=Hn({id:F.id},F.attributes))}),$},normalizeJobsResponse=(C={})=>{var J,ee,te,ne;const $=C.jobs_data||C,F=transformJobsData($),V=createCompaniesMap($),K=(ne=(te=(J=C.total_entries)!=null?J:$.total_entries)!=null?te:(ee=$==null?void 0:$.meta)==null?void 0:ee.total_entries)!=null?ne:null;return{jobs:F,companiesMap:V,results:F,totalEntries:K}},jobsService=careerHubApi.injectEndpoints({endpoints:C=>({fetchAllJobs:C.query({query:($={})=>({url:"/job-tracker/fetch-all-jobs/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["Jobs"]}),fetchPipelineJobs:C.query({query:($={})=>({url:"/job-tracker/fetch-pipeline-jobs/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["PipelineJobs"]}),fetchRelevantJobs:C.query({query:($={})=>({url:"/job-tracker/relevancy/",method:"POST",body:$}),transformResponse:normalizeJobsResponse,providesTags:["RelevantJobs"]})})}),{useFetchAllJobsQuery,useFetchPipelineJobsQuery,useFetchRelevantJobsQuery}=jobsService,header$1="_header_t7ugs_1",jobTitle="_jobTitle_t7ugs_6",titleContainer="_titleContainer_t7ugs_14",titleContainerExpanded="_titleContainerExpanded_t7ugs_19",titleContainerCollapsed="_titleContainerCollapsed_t7ugs_23",companyName="_companyName_t7ugs_27",actions="_actions_t7ugs_32",styles$d={header:header$1,jobTitle,titleContainer,titleContainerExpanded,titleContainerCollapsed,companyName,actions},{Title:Title$1,Text:Text$2}=Typography$1,JobTitleAndCompany=({title:C,companyName:$,isExpanded:F})=>React.createElement(Space$1,{direction:"vertical",size:4,className:classNames(styles$d.titleContainer,{[styles$d.titleContainerExpanded]:F,[styles$d.titleContainerCollapsed]:!F})},React.createElement(Title$1,{level:5,className:styles$d.jobTitle,ellipsis:{rows:1}},C),React.createElement(Text$2,{ellipsis:!0,className:styles$d.companyName},$));JobTitleAndCompany.propTypes={title:PropTypes.string.isRequired,companyName:PropTypes.string.isRequired,isExpanded:PropTypes.bool},JobTitleAndCompany.defaultProps={isExpanded:!1};const tag="_tag_5fhgn_1",styles$c={tag},ICON_MAP={CheckCircleOutlined:CheckCircleOutlined$1,CloseCircleOutlined:CloseCircleOutlined$1,ClockCircleOutlined:ClockCircleOutlined$1,RocketOutlined:RocketOutlined$1},EligibilityTag=({jobData:C,currentTab:$})=>{const F=determineJobTag(C,C.eligibilityCriteria);if(!F)return null;const V=ICON_MAP[F.icon];return React.createElement(Tag$1,{icon:V&&React.createElement(V,null),color:F.antdColor,className:styles$c.tag,style:F.tag==="expired"?{color:F.color,borderColor:F.color}:{}},F.text)};EligibilityTag.propTypes={jobData:PropTypes.shape({isRelevant:PropTypes.bool,expiry:PropTypes.string,jobProfileStatus:PropTypes.string,eligibilityCriteria:PropTypes.shape({isEligible:PropTypes.bool,reasons:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string,isEligible:PropTypes.bool,data:PropTypes.object}))})}).isRequired,currentTab:PropTypes.string},EligibilityTag.defaultProps={currentTab:"all"};const JobCardActions=({jobData:C,currentTab:$})=>React.createElement("div",{className:styles$d.actions},React.createElement(EligibilityTag,{jobData:C,currentTab:$}));JobCardActions.propTypes={jobData:PropTypes.object.isRequired,currentTab:PropTypes.string},JobCardActions.defaultProps={currentTab:"all"};const JobCardHeader=({jobData:C,companiesList:$,currentTab:F,isExpanded:V})=>{var J;const K=C.companyName||C.company&&C.company[0]&&((J=$[C.company[0]])==null?void 0:J.name)||"";return React.createElement(Row$1,{gutter:[12,8],className:styles$d.header},React.createElement(Col$1,{flex:"auto"},React.createElement(Row$1,{gutter:12,align:"top",wrap:!1},React.createElement(Col$1,null,React.createElement(CompanyLogo,{logo:C.logo,company:C.company,companiesList:$,companyName:K})),React.createElement(Col$1,{flex:"auto"},React.createElement(JobTitleAndCompany,{title:C.title,companyName:K,isExpanded:V})))),React.createElement(Flex$1,null,React.createElement(JobCardActions,{jobData:C,currentTab:F})))};JobCardHeader.propTypes={jobData:PropTypes.object.isRequired,companiesList:PropTypes.object,currentTab:PropTypes.string,isExpanded:PropTypes.bool},JobCardHeader.defaultProps={companiesList:{},currentTab:"all",isExpanded:!1};const saveButton="_saveButton_1g9sw_1",savedButton="_savedButton_1g9sw_12",styles$b={saveButton,savedButton},SaveButton=({analytics:C,jobProfileId:$,applicationStatus:F,applicationLastUpdatedAt:V,onSave:K,disabled:J=!1})=>{const[ee,te]=React.useState(!1),ne=reactRedux.useSelector(ie=>{var se,ue,de;return(de=(ue=(se=ie.scalantCareerHub)==null?void 0:se.savedJobs)==null?void 0:ue.savedJobs)==null?void 0:de[$]}),re=ne?ne.status==="Saved":F==="Saved",ae=(ne==null?void 0:ne.lastUpdatedAt)||V,oe=ie=>sr(this,null,function*(){if(ie.stopPropagation(),!re){C==null||C.click("Job Card - Save",PRODUCT_NAME),te(!0);try{yield K($,"save")}catch(se){}finally{te(!1)}}});return re&&ae?React.createElement(Button$2,{type:"text",icon:React.createElement(SaveTwoTone$1,{twoToneColor:"#8c8c8c"}),onClick:oe,disabled:!0,className:styles$b.savedButton,style:{color:"#8c8c8c"},size:"small"},"Saved on ",formatDate(ae)):React.createElement(Button$2,{type:"text",icon:React.createElement(SaveOutlined$1,{twoToneColor:"#006AFF"}),onClick:oe,disabled:J||ee,loading:ee,className:styles$b.saveButton,size:"small"},re?"Saved":"Save")};SaveButton.propTypes={analytics:PropTypes.object,jobProfileId:PropTypes.number.isRequired,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string,onSave:PropTypes.func.isRequired,disabled:PropTypes.bool},SaveButton.defaultProps={applicationStatus:"Not Applied",applicationLastUpdatedAt:null,disabled:!1};const body="_body_10o1d_1",detailsRowContainer="_detailsRowContainer_10o1d_7",detailsRow="_detailsRow_10o1d_7",detailText="_detailText_10o1d_23",saveButtonWrapper="_saveButtonWrapper_10o1d_29",styles$a={body,detailsRowContainer,detailsRow,detailText,saveButtonWrapper},{Text:Text$1}=Typography$1,DetailItem=({text:C})=>C?React.createElement(Text$1,{className:styles$a.detailText},C):null;DetailItem.propTypes={text:PropTypes.string};const JobDetailsRow=({analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J})=>{const{preferredCities:ee,minExperience:te,maxExperience:ne,minCtc:re,maxCtc:ae,openForDiscussionCtc:oe,isInternship:ie,stipend:se,preferredNoticePeriod:ue}=$,de=formatLocation(ee),le=J===null&&F.isExperienceCtcAvailable?formatExperience$1(te,ne):null,ve=F.isExperienceCtcAvailable?formatCtc({minCtc:re,maxCtc:ae,openForDiscussionCtc:oe,isInternship:ie,stipend:se,userCountry:V}):null,me=J===null&&F.isNoticePeriodAvailable?formatNoticePeriod(ue):null,he=[de&&{text:de},le&&{text:le},ve&&{text:ve},me&&{text:me}].filter(Boolean);return React.createElement("div",{className:styles$a.detailsRowContainer},he.length>0&&React.createElement(Space$1,{split:React.createElement(Divider$1,{type:"vertical"}),className:styles$a.detailsRow},he.map((pe,ce)=>React.createElement(DetailItem,{key:ce,text:pe.text}))),React.createElement("div",{className:styles$a.saveButtonWrapper},React.createElement(SaveButton,{analytics:C,jobProfileId:$.id,applicationStatus:$.applicationStatus,applicationLastUpdatedAt:$.applicationLastUpdatedAt,onSave:K})))};JobDetailsRow.propTypes={analytics:PropTypes.object,jobData:PropTypes.shape({id:PropTypes.number.isRequired,preferredCities:PropTypes.string,minExperience:PropTypes.number,maxExperience:PropTypes.number,minCtc:PropTypes.number,maxCtc:PropTypes.number,openForDiscussionCtc:PropTypes.bool,isInternship:PropTypes.bool,stipend:PropTypes.string,preferredNoticePeriod:PropTypes.number,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string}).isRequired,cardConfig:PropTypes.shape({isExperienceCtcAvailable:PropTypes.bool,isNoticePeriodAvailable:PropTypes.bool}).isRequired,userCountry:PropTypes.oneOf(["IN","US"]),onSave:PropTypes.func.isRequired,selectedJobId:PropTypes.number},JobDetailsRow.defaultProps={userCountry:"IN",selectedJobId:null};const JobCardBody=({analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J})=>React.createElement("div",{className:styles$a.body},React.createElement(JobDetailsRow,{analytics:C,jobData:$,cardConfig:F,userCountry:V,onSave:K,selectedJobId:J}));JobCardBody.propTypes={analytics:PropTypes.object,jobData:PropTypes.object.isRequired,cardConfig:PropTypes.object.isRequired,userCountry:PropTypes.oneOf(["IN","US"]),onSave:PropTypes.func.isRequired,selectedJobId:PropTypes.number},JobCardBody.defaultProps={userCountry:"IN",selectedJobId:null};const jobCard="_jobCard_1u5oy_1",expired="_expired_1u5oy_12",active="_active_1u5oy_15",archived="_archived_1u5oy_29",cardContent="_cardContent_1u5oy_38",styles$9={jobCard,expired,active,archived,cardContent},JobCard=({analytics:C,jobData:$,isActive:F,currentTab:V,onClick:K,onSave:J,companiesList:ee,userCountry:te,className:ne,selectedJobId:re})=>{const{cardConfig:ae,shouldShowBody:oe}=useJobCardState({currentTab:V,isActive:F,jobData:$}),ie=()=>{C==null||C.click("Job Card - Click",PRODUCT_NAME),K&&K($.id)};return React.createElement(Card$1,{className:classNames(styles$9.jobCard,{[styles$9.active]:F,[styles$9.archived]:$.applicationStatus==="Archived"},ne),onClick:ie},React.createElement("div",{className:styles$9.cardContent},React.createElement(JobCardHeader,{jobData:$,companiesList:ee,currentTab:V,isExpanded:!re}),oe&&React.createElement(JobCardBody,{analytics:C,jobData:$,cardConfig:ae,userCountry:te,onSave:J,selectedJobId:re})))};JobCard.propTypes={analytics:PropTypes.object,jobData:PropTypes.shape({id:PropTypes.number.isRequired,title:PropTypes.string.isRequired,name:PropTypes.string.isRequired,company:PropTypes.arrayOf(PropTypes.number),logo:PropTypes.string,preferredCities:PropTypes.string,expiry:PropTypes.string,jobProfileStatus:PropTypes.string,isRelevant:PropTypes.bool,applicationStatus:PropTypes.string,applicationLastUpdatedAt:PropTypes.string,minExperience:PropTypes.number,maxExperience:PropTypes.number,minCtc:PropTypes.number,maxCtc:PropTypes.number,preferredNoticePeriod:PropTypes.number,openForDiscussionCtc:PropTypes.bool,isInternship:PropTypes.bool,stipend:PropTypes.string,eligibilityCriteria:PropTypes.shape({isEligible:PropTypes.bool,reasons:PropTypes.arrayOf(PropTypes.object)})}).isRequired,isActive:PropTypes.bool,currentTab:PropTypes.string,onClick:PropTypes.func,onSave:PropTypes.func.isRequired,companiesList:PropTypes.object,userCountry:PropTypes.oneOf(["IN","US"]),className:PropTypes.string,selectedJobId:PropTypes.number},JobCard.defaultProps={isActive:!1,currentTab:"all",onClick:null,companiesList:{},userCountry:"IN",className:""};const heading="_heading_bj7g7_1",spinner="_spinner_bj7g7_8",alert="_alert_bj7g7_14",header="_header_bj7g7_18",sentinel="_sentinel_bj7g7_23",loadingMore="_loadingMore_bj7g7_30",jobsList="_jobsList_bj7g7_39",noJobsContainer="_noJobsContainer_bj7g7_45",noJobsImage="_noJobsImage_bj7g7_55",noJobsHeading="_noJobsHeading_bj7g7_59",styles$8={heading,spinner,alert,header,sentinel,loadingMore,jobsList,noJobsContainer,noJobsImage,noJobsHeading},{Title,Text}=Typography$1,TAB_HEADINGS={[TAG_TO_TAB_MAPPING.relevant]:"Preferred Jobs",[TAG_TO_TAB_MAPPING.all]:"All Jobs",[TAG_TO_TAB_MAPPING.saved]:"Saved Jobs",[TAG_TO_TAB_MAPPING.applied]:"Applied Jobs"};function JobsList({analytics:C,className:$,currentTab:F,jobs:V=[],companiesMap:K={},isLoading:J=!1,error:ee=null,isFetchingMore:te=!1,hasMore:ne=!0}){var fe;const re=reactRedux.useDispatch(),ae=reactRedux.useSelector(ye=>{var _e,ge;return((ge=(_e=ye.scalantCareerHub)==null?void 0:_e.dashboard)==null?void 0:ge.processCounts)||{}}),oe=ne!==void 0?ne:!0,[ie]=useUpdateApplicationStatusMutation(),{selectedJobId:se,updateJobId:ue,updateTab:de}=useJobQueryParams({syncToURL:!0,syncFromURL:!1}),{sentinelRef:le}=useInfiniteScroll({hasMore:oe,isLoading:J,isFetchingMore:te});React.useEffect(()=>{V&&V.length>0&&re(initializeSavedJobs(V))},[V,re]),React.useEffect(()=>{if(V&&V.length>0){const _e=new URLSearchParams(window.location.search).get("job_ids");if(_e){const ge=Number(_e),be=V.find(Se=>Se.id===ge||Se.jobProfileId===ge||String(Se.id)===_e||String(Se.jobProfileId)===_e);be&&se!==be.id&&ue(be.id)}}},[V,se,ue]);const ve=ye=>{C==null||C.click("Jobs List - Job Card Click",PRODUCT_NAME),se===ye?(ue(null),re(updateFormFilters({job_ids:null}))):ue(ye)},me=(ye,_e)=>sr(this,null,function*(){if(_e!=="save")return;const be=yield ie({job_profile_id:ye,update_action:"save"}).unwrap();return re(setJobSavedStatus({jobId:ye,status:"Saved",lastUpdatedAt:(be==null?void 0:be.applicationLastUpdatedAt)||new Date().toISOString()})),be}),he=()=>{C==null||C.click("Jobs List - Go to All Jobs",PRODUCT_NAME),de(TAG_TO_TAB_MAPPING.all)},pe=TAB_HEADINGS[F]||TAB_HEADINGS[TAG_TO_TAB_MAPPING.all],ce=()=>ae[F]||0;return J?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement(Spin$1,{size:"large",className:styles$8.spinner})):ee?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.header},React.createElement(Alert$1,{message:"Error loading jobs",description:((fe=ee==null?void 0:ee.data)==null?void 0:fe.message)||(ee==null?void 0:ee.message)||"Failed to fetch jobs. Please try again later.",type:"error",showIcon:!0,className:styles$8.alert}))):!V||V.length===0?React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.noJobsContainer},React.createElement("img",{src:"https://d2beiqkhq929f0.cloudfront.net/public_assets/assets/000/171/464/original/3cd470a8085619f7775acfa9e3f15053ee5eb687.png?1766383387",alt:"No Jobs Found",className:styles$8.noJobsImage}),React.createElement(Title,{level:3,className:styles$8.noJobsHeading},"No Suitable Roles Available at the Moment"),React.createElement(Text,{className:styles$8.noJobsText},"Your current preferences do not match any active opportunities, Please visit the All Jobs section to explore existing job opportunities."),React.createElement(Button$2,{type:"primary",onClick:he},"Go to All Jobs ",React.createElement(RightOutlined$1,null)))):React.createElement("div",{className:$},React.createElement(Space$1,{direction:"vertical",className:styles$8.header},React.createElement(Title,{level:4,className:styles$8.heading},pe," ",React.createElement(Tag$1,{color:"green"},ce()," Found")),React.createElement(Text,null,"Based on your profile, preferences, and activity like applies, searches, and saves")),React.createElement("div",{className:styles$8.jobsList},V.map(ye=>React.createElement(JobCard,{key:ye.id,jobData:ye,isActive:se===ye.id,currentTab:F,analytics:C,onClick:ve,onSave:me,companiesList:K,userCountry:"IN",selectedJobId:se})),oe&&React.createElement("div",{ref:le,className:styles$8.sentinel},te&&React.createElement("div",{className:styles$8.loadingMore},React.createElement(Spin$1,{size:"small"}),React.createElement("span",null,"Loading more jobs...")))))}JobsList.propTypes={analytics:PropTypes.object,className:PropTypes.string,currentTab:PropTypes.string,jobs:PropTypes.arrayOf(PropTypes.object),companiesMap:PropTypes.object,isLoading:PropTypes.bool,error:PropTypes.object,isFetchingMore:PropTypes.bool,hasMore:PropTypes.bool},JobsList.defaultProps={className:"",currentTab:TAG_TO_TAB_MAPPING.relevant,jobs:[],companiesMap:{},isLoading:!1,error:null,isFetchingMore:!1,hasMore:!0};const relevantJobsPage="_relevantJobsPage_19xbf_1",styles$7={relevantJobsPage};function RelevantJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchRelevantJobsQuery($),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.relevant);return React.createElement("div",{className:styles$7.relevantJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.relevant,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const allJobsPage="_allJobsPage_10f3p_1",styles$6={allJobsPage};function AllJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchAllJobsQuery($),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.all);return React.createElement("div",{className:styles$6.allJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.all,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const savedJobsPage="_savedJobsPage_km19z_1",styles$5={savedJobsPage};function SavedJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchPipelineJobsQuery(Hn({type:TAG_TO_TAB_MAPPING.saved},$)),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.saved);return React.createElement("div",{className:styles$5.savedJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.saved,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const appliedJobsPage="_appliedJobsPage_lw2yt_1",styles$4={appliedJobsPage};function AppliedJobsPage({analytics:C}){const $=useJobFilters(),{data:F,isLoading:V,error:K,isFetching:J}=useFetchPipelineJobsQuery(Hn({type:TAG_TO_TAB_MAPPING.applied},$)),{accumulatedJobs:ee,accumulatedCompaniesMap:te,hasMore:ne,isFetchingMore:re,isLoading:ae}=useAccumulatedJobs(F,J,V,TAG_TO_TAB_MAPPING.applied);return React.createElement("div",{className:styles$4.appliedJobsPage},React.createElement(JobsList,{analytics:C,currentTab:TAG_TO_TAB_MAPPING.applied,jobs:ee,companiesMap:te,isLoading:ae,error:K,isFetchingMore:re,hasMore:ne}))}const ExpertMbeRating=({fieldName:C,subjectOptions:$,ratingOptions:F})=>{const V=reactRedux.useDispatch(),J=reactRedux.useSelector(de=>de.scalantCareerHub.filterForm)[C],ee=React.useMemo(()=>J||{},[J]),te=React.useMemo(()=>typeof ee=="object"&&!Array.isArray(ee)?ee:{},[ee]);React.useEffect(()=>{(!ee||Object.keys(te).length===0)&&V(addRatingFilterInput())},[ee,te,V]);const ne=React.useMemo(()=>Object.values(te).map(de=>{var le;return((le=de==null?void 0:de.subject)==null?void 0:le.key)||(de==null?void 0:de.subject)}).filter(Boolean),[te]),re=React.useMemo(()=>$.filter(de=>!ne.includes(de.key)),[$,ne]),ae=React.useCallback(()=>{V(addRatingFilterInput())},[V]),oe=React.useCallback(de=>{V(deleteRatingFilterInput({inputFieldKey:de}))},[V]),ie=React.useCallback((de,le)=>{const ve=$.find(me=>me.key===le);V(updateRatingFilterInput({inputFilterSubKey:`${de}_subject`,value:ve||le}))},[$,V]),se=React.useCallback((de,le)=>{V(updateRatingFilterInput({inputFilterSubKey:`${de}_rating`,value:le}))},[V]),ue=Object.keys(te);return React.createElement(Space$1,{direction:"vertical",style:{width:"100%"},size:"middle"},ue.map(de=>{var pe;const le=te[de],ve=((pe=le==null?void 0:le.subject)==null?void 0:pe.key)||(le==null?void 0:le.subject),me=le==null?void 0:le.rating,he=[...$.filter(ce=>ce.key===ve),...re];return React.createElement(Row$1,{key:de,gutter:16,align:"middle"},React.createElement(Col$1,{span:10},React.createElement(Select$1,{placeholder:"Select skill",value:ve,onChange:ce=>ie(de,ce),showSearch:!0,filterOption:(ce,fe)=>{var ye;return((ye=fe==null?void 0:fe.label)!=null?ye:"").toLowerCase().includes(ce.toLowerCase())},options:he.map(ce=>({label:ce.value,value:ce.key}))})),React.createElement(Col$1,{span:10},React.createElement(Select$1,{placeholder:"Select rating",value:me,onChange:ce=>se(de,ce),options:F.map(ce=>({label:ce.label,value:ce.value}))})),React.createElement(Col$1,{span:4},React.createElement(Space$1,null,React.createElement(Button$2,{type:"text",icon:React.createElement(PlusOutlined$1,null),onClick:ae,style:{color:"#1890ff"}}),ue.length>1&&React.createElement(Button$2,{type:"text",icon:React.createElement(DeleteOutlined$1,null),onClick:()=>oe(de),danger:!0}))))}))};ExpertMbeRating.propTypes={fieldName:PropTypes.string.isRequired,subjectOptions:PropTypes.arrayOf(PropTypes.shape({key:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),value:PropTypes.string})).isRequired,ratingOptions:PropTypes.arrayOf(PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),label:PropTypes.string})).isRequired};const drawerContent="_drawerContent_fqkgw_1",filterForm="_filterForm_fqkgw_5",drawerHeaderSubtitle$1="_drawerHeaderSubtitle_fqkgw_9",filterIcon$1="_filterIcon_fqkgw_14",buttonContainer="_buttonContainer_fqkgw_18",drawer="_drawer_fqkgw_1",styles$3={drawerContent,filterForm,drawerHeaderSubtitle:drawerHeaderSubtitle$1,filterIcon:filterIcon$1,buttonContainer,drawer},{Option:Option$1}=Select$1;function FilterForm(){var Se,Ee,Ce,xe;const C=reactRedux.useDispatch(),$=reactRedux.useSelector($e=>$e.scalantCareerHub.filterForm),F=reactRedux.useSelector($e=>$e.scalantCareerHub.filterOptions||{}),[V]=Form$1.useForm();React.useEffect(()=>{V.setFieldsValue($)},[V,$]);const{handleCompanySearch:K,handleTitleSearch:J,handleExperienceSkillSearch:ee,handleExperienceSkillChange:te,loadingCompanies:ne,loadingTitles:re,loadingExperienceSkills:ae}=useAsyncFilterOptions(),{jobTypes:oe,functions:ie,seniorityLevels:se,companyCategories:ue,locations:de,mbeSkills:le,ctcRanges:ve,stipendRanges:me,durationRanges:he,noticePeriods:pe,datePostedOptions:ce,skillRatings:fe}=useFilterMetaOptions(),ye=($e,Ie)=>{C(updateFormField({field:$e,value:Ie}))},_e=$.role_type,ge=_e==="full_time",be=_e==="internship";return React.createElement(Form$1,{layout:"vertical",className:styles$3.filterForm,form:V,initialValues:$},React.createElement(Form$1.Item,{label:"Job Types",name:"role_type"},React.createElement(Select$1,{placeholder:"Select job profile",value:$.role_type,onChange:$e=>ye("role_type",$e)},oe.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Company Name",name:"company_ids"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search company",filterOption:!1,onSearch:K,loading:ne,value:$.company_ids,onChange:$e=>ye("company_ids",$e),notFoundContent:ne?"Loading...":"Type at least 3 characters to search"},(Se=F.companyOptions)==null?void 0:Se.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Title",name:"job_title"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search job title",filterOption:!1,onSearch:J,loading:re,value:$.job_title,onChange:$e=>ye("job_title",$e),notFoundContent:re?"Loading...":"Type at least 3 characters to search"},(Ee=F.titleOptions)==null?void 0:Ee.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.value},$e.value)))),React.createElement(Form$1.Item,{label:"Function",name:"job_category"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select function",value:$.job_category,onChange:$e=>ye("job_category",$e)},ie.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Role seniority level",name:"seniority_level"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select level",value:$.seniority_level,onChange:$e=>ye("seniority_level",$e)},se.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Company category",name:"company_categories"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select category",value:$.company_categories,onChange:$e=>ye("company_categories",$e)},ue.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))))),React.createElement(Form$1.Item,{label:"Location",name:"location"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select location",value:$.location,onChange:$e=>ye("location",$e)},de.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.value},$e.value)))),!be&&React.createElement(Form$1.Item,{label:"Minimum CTC (in Lakhs)?",name:"min_ctc"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_ctc,onChange:$e=>ye("min_ctc",$e)},ve.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))),!ge&&React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Stipend (INR per month)",name:"min_stipend"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_stipend,onChange:$e=>ye("min_stipend",$e)},me.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Internship duration (in months)",name:"min_duration"},React.createElement(Select$1,{placeholder:"Select range",value:$.min_duration,onChange:$e=>ye("min_duration",$e)},he.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))))),React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Notice period requirement",name:"notice_period"},React.createElement(Select$1,{placeholder:"Choose period",value:$.notice_period,onChange:$e=>ye("notice_period",$e)},pe.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label))))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{label:"Job posted date",name:"date_posted_on"},React.createElement(Select$1,{placeholder:"Pick date",value:$.date_posted_on,onChange:$e=>ye("date_posted_on",$e)},ce.map($e=>React.createElement(Option$1,{key:$e.value,value:$e.value},$e.label)))))),React.createElement(Form$1.Item,{label:"Expert Mock Interview Skills Required"},React.createElement(ExpertMbeRating,{fieldName:"mbe_skill_ids",subjectOptions:le,ratingOptions:fe})),React.createElement(Form$1.Item,{label:"Experienced based skills",name:"experience_skill_ids"},React.createElement(Select$1,{mode:"multiple",showSearch:!0,placeholder:"Search skills",filterOption:!1,onSearch:ee,loading:ae,value:((Ce=$.experience_skill_ids)==null?void 0:Ce.map($e=>typeof $e=="object"?$e.experience_skill_id:$e))||[],onChange:$e=>{const Ie=te($e,F.experienceSkillOptions);ye("experience_skill_ids",Ie)},notFoundContent:ae?"Loading...":"Type at least 2 characters to search"},(xe=F.experienceSkillOptions)==null?void 0:xe.map($e=>React.createElement(Option$1,{key:$e.key,value:$e.key},$e.value)))),React.createElement(Form$1.Item,{label:"Experience (Years)? *"},React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"min_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Minimum",type:"number",value:$.min_experience,onChange:$e=>ye("min_experience",$e.target.value)}))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"max_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Maximum",type:"number",value:$.max_experience,onChange:$e=>ye("max_experience",$e.target.value)}))))))}function FilterDrawerTitle({onClose:C}){return React.createElement(Flex$1,{vertical:!0},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{align:"center",gap:5},React.createElement(FilterOutlined$1,{className:styles$3.filterIcon}),"Filters"),React.createElement(CloseOutlined$1,{onClick:C})),React.createElement("div",{className:styles$3.drawerHeaderSubtitle},"Choose the kind of jobs you'd like to see displayed on this page"))}function FilterDrawer({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(te=>te.scalantCareerHub.dashboard.filterModalOpen),V=reactRedux.useSelector(te=>te.scalantCareerHub.filterForm),K=()=>{C==null||C.click("Filter Drawer - Close",PRODUCT_NAME),$(closeFilterModal())},J=()=>{var re,ae,oe,ie,se,ue,de;C==null||C.click("Filter Drawer - Apply",PRODUCT_NAME);let te;V.mbe_skill_ids&&typeof V.mbe_skill_ids=="object"&&!Array.isArray(V.mbe_skill_ids)&&Object.keys(V.mbe_skill_ids).length>0&&(te=Object.values(V.mbe_skill_ids).filter(le=>!le||le.rating===void 0||le.rating===null?!1:le.subject?typeof le.subject=="object"?le.subject.key!==void 0&&le.subject.key!==null:le.subject!==void 0&&le.subject!==null:!1).map(le=>{var me;let ve;return typeof le.subject=="object"&&((me=le.subject)==null?void 0:me.key)!==void 0?ve=le.subject.key:ve=le.subject,{mbe_skill_id:ve,rating:le.rating}}),te.length===0&&(te=void 0));const ne={role_type:V.role_type||void 0,company_ids:(re=V.company_ids)!=null&&re.length?V.company_ids:void 0,job_title:(ae=V.job_title)!=null&&ae.length?V.job_title:void 0,job_category:(oe=V.job_category)!=null&&oe.length?V.job_category:void 0,seniority_level:(ie=V.seniority_level)!=null&&ie.length?V.seniority_level:void 0,location:(se=V.location)!=null&&se.length?V.location:void 0,min_ctc:V.min_ctc||void 0,min_stipend:V.min_stipend||void 0,min_duration:V.min_duration||void 0,notice_period:V.notice_period||void 0,date_posted_on:V.date_posted_on||void 0,mbe_skill_ids:te,experience_skill_ids:(ue=V.experience_skill_ids)!=null&&ue.length?V.experience_skill_ids:void 0,min_experience:V.min_experience||void 0,max_experience:V.max_experience||void 0,company_categories:(de=V.company_categories)!=null&&de.length?V.company_categories:void 0};Object.keys(ne).forEach(le=>{ne[le]===void 0&&delete ne[le]}),$(updateFiltersFromForm(ne)),updateURLWithFilters(ne),K()},ee=()=>{C==null||C.click("Filter Drawer - Reset",PRODUCT_NAME),$(resetForm()),$(clearAllOptions()),$(updateFiltersFromForm({})),updateURLWithFilters({})};return React.createElement(Drawer$1,{title:React.createElement(FilterDrawerTitle,{onClose:K}),placement:"right",onClose:K,open:F,closable:!1,width:550,className:styles$3.drawer},React.createElement("div",{className:styles$3.drawerContent},React.createElement(FilterForm,null),React.createElement("div",{className:styles$3.buttonContainer},React.createElement(Button$2,{className:styles$3.resetButton,onClick:ee},"Reset Filters"),React.createElement(Button$2,{type:"primary",className:styles$3.applyButton,onClick:J},"Apply"))))}const alertService=careerHubApi.injectEndpoints({endpoints:C=>({fetchAlerts:C.query({query:()=>({url:"/job-tracker/v1/alerts/list",method:"GET"}),transformResponse:$=>$.data||[],providesTags:["JobAlerts"]}),createAlert:C.mutation({query:$=>({url:"/job-tracker/v1/alerts/",method:"POST",body:$}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),updateAlertStatus:C.mutation({query:$=>({url:"/job-tracker/v1/alerts/update-status",method:"PATCH",body:$}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),deleteAlert:C.mutation({query:$=>({url:`/job-tracker/v1/alerts/${$}`,method:"DELETE"}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]}),updateAlert:C.mutation({query:({id:$,payload:F})=>({url:`/job-tracker/v1/alerts/${$}`,method:"PUT",body:F}),transformResponse:$=>$,invalidatesTags:["JobAlerts"]})})}),{useFetchAlertsQuery,useCreateAlertMutation,useUpdateAlertStatusMutation,useDeleteAlertMutation,useUpdateAlertMutation}=alertService,modalTitle="_modalTitle_gu1gu_1",modalTitleHeader="_modalTitleHeader_gu1gu_6",modalTitleContent="_modalTitleContent_gu1gu_12",modalCloseIcon="_modalCloseIcon_gu1gu_18",modalDescription="_modalDescription_gu1gu_22",modalFooter="_modalFooter_gu1gu_28",createAlertContent="_createAlertContent_gu1gu_34",formField="_formField_gu1gu_52",formLabel="_formLabel_gu1gu_57",requiredAsterisk="_requiredAsterisk_gu1gu_63",formInput="_formInput_gu1gu_67",experienceInputs="_experienceInputs_gu1gu_71",modal="_modal_gu1gu_1",radioGroup="_radioGroup_gu1gu_88",drawerHeaderSubtitle="_drawerHeaderSubtitle_gu1gu_94",filterIcon="_filterIcon_gu1gu_99",styles$2={modalTitle,modalTitleHeader,modalTitleContent,modalCloseIcon,modalDescription,modalFooter,createAlertContent,formField,formLabel,requiredAsterisk,formInput,experienceInputs,modal,radioGroup,drawerHeaderSubtitle,filterIcon},{Option}=Select$1;function JobAlertForm({form:C,initialValues:$,onSubmit:F,isSubmitting:V}){const{functions:K,locations:J,ctcRanges:ee}=useFilterMetaOptions(),[te,ne]=React.useState("realtime");React.useEffect(()=>{var oe,ie;if($&&C){const ue={[ALERT_FREQUENCY.REALTIME]:"realtime",[ALERT_FREQUENCY.DAILY]:"daily",[ALERT_FREQUENCY.ALTERNATE_DAY]:"alternate",[ALERT_FREQUENCY.WEEKLY]:"weekly"}[$.frequency]||"realtime",de={name:$.name,job_functions:$.job_functions||[],min_ctc:$.min_ctc,locations:$.locations||[],min_experience:((oe=$.min_experience)==null?void 0:oe.toString())||"",max_experience:((ie=$.max_experience)==null?void 0:ie.toString())||"",frequency:ue,notification_type:$.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL};C.setFieldsValue(de),ne(ue)}},[$,C]);const re=()=>sr(this,null,function*(){try{const oe=yield C.validateFields(),ie={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},se=oe.frequency==="realtime",ue={alert:{name:oe.name,job_functions:oe.job_functions||[],min_ctc:oe.min_ctc,locations:oe.locations||[],min_experience:oe.min_experience?parseInt(oe.min_experience,10):0,max_experience:oe.max_experience?parseInt(oe.max_experience,10):null,frequency:ie[oe.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:se&&oe.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL}};F&&(yield F(ue))}catch(oe){console.error("Error submitting form:",oe)}});React.useEffect(()=>{C&&F&&(C.submit=re)},[C,F]);const ae=Form$1.useWatch("frequency",C)||"realtime";return React.useEffect(()=>{ne(ae)},[ae]),React.createElement(Form$1,{form:C,layout:"vertical",className:styles$2.createAlertContent,initialValues:{frequency:"realtime"}},React.createElement(Form$1.Item,{label:"Alert Name",name:"name",rules:[{required:!0,message:"Please enter alert name"}]},React.createElement(Input$1,{placeholder:"Give your job alert a name"})),React.createElement(Form$1.Item,{label:"Job Function",name:"job_functions"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select job function",className:styles$2.formInput},K.map(oe=>React.createElement(Option,{key:oe.key,value:oe.key},oe.value)))),React.createElement(Form$1.Item,{label:"Minimum CTC (in Lakhs)?",name:"min_ctc"},React.createElement(Select$1,{placeholder:"Select range",className:styles$2.formInput},ee.map(oe=>React.createElement(Option,{key:oe.value,value:oe.value},oe.label)))),React.createElement(Form$1.Item,{label:"Locations?",name:"locations"},React.createElement(Select$1,{mode:"multiple",placeholder:"Select locations",className:styles$2.formInput},J.map(oe=>React.createElement(Option,{key:oe.key,value:oe.value},oe.value)))),React.createElement(Form$1.Item,{label:"Experience (Years)?"},React.createElement(Row$1,{gutter:16},React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"min_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Minimum",type:"number"}))),React.createElement(Col$1,{span:12},React.createElement(Form$1.Item,{name:"max_experience",noStyle:!0},React.createElement(Input$1,{placeholder:"Maximum",type:"number"}))))),React.createElement(Form$1.Item,{label:"Alert Frequency",name:"frequency"},React.createElement(Radio$1.Group,{className:styles$2.radioGroup,onChange:oe=>{ne(oe.target.value),oe.target.value!=="realtime"&&C.setFieldsValue({notification_type:ALERT_NOTIFICATION_TYPE.EMAIL})}},React.createElement(Radio$1,{value:"realtime"},"Realtime"),React.createElement(Radio$1,{value:"daily"},"Daily"),React.createElement(Radio$1,{value:"alternate"},"Every alternate day"),React.createElement(Radio$1,{value:"weekly"},"Weekly"))),te==="realtime"&&React.createElement(Form$1.Item,{label:"Alert mode",name:"notification_type"},React.createElement(Radio$1.Group,{className:styles$2.radioGroup},React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.EMAIL},"Email"),React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.WHATSAPP},"Whatsapp"),React.createElement(Radio$1,{value:ALERT_NOTIFICATION_TYPE.BOTH},"Both"))))}const alertCard="_alertCard_1k2nv_1",alertHeader="_alertHeader_1k2nv_14",alertIcon="_alertIcon_1k2nv_20",inactiveIcon="_inactiveIcon_1k2nv_25",alertActions="_alertActions_1k2nv_29",editFormCard="_editFormCard_1k2nv_35",styles$1={alertCard,alertHeader,alertIcon,inactiveIcon,alertActions,editFormCard};function ExistingAlerts({analytics:C}){const $=reactRedux.useDispatch(),{data:F=[],isLoading:V,error:K}=useFetchAlertsQuery(),[J]=useUpdateAlertStatusMutation(),[ee]=useDeleteAlertMutation(),[te,{isLoading:ne}]=useUpdateAlertMutation(),[re,ae]=React.useState(null),[oe]=Form$1.useForm();React.useEffect(()=>{F&&$(setAlerts(F))},[F,$]);const ie=pe=>ALERT_FREQUENCY_LABELS[pe]||ALERT_FREQUENCY_LABELS[ALERT_FREQUENCY.REALTIME],se=pe=>ALERT_NOTIFICATION_LABELS[pe]||ALERT_NOTIFICATION_LABELS[ALERT_NOTIFICATION_TYPE.EMAIL],ue=pe=>pe===ALERT_STATUS.ACTIVE,de=(pe,ce)=>sr(this,null,function*(){try{const fe=ce===ALERT_STATUS.ACTIVE?ALERT_STATUS.INACTIVE:ALERT_STATUS.ACTIVE;yield J({id:pe,status:fe}).unwrap(),message$1.success(`Alert ${fe===ALERT_STATUS.ACTIVE?"activated":"deactivated"} successfully`)}catch(fe){message$1.error("Failed to update alert status"),console.error("Error updating alert status:",fe)}}),le=pe=>{C==null||C.click("Existing Alerts - Edit",PRODUCT_NAME),ae(pe)},ve=()=>{C==null||C.click("Existing Alerts - Cancel Edit",PRODUCT_NAME),ae(null),oe.resetFields()},me=pe=>sr(this,null,function*(){try{C==null||C.click("Existing Alerts - Update Alert",PRODUCT_NAME),yield te({id:re,payload:pe}).unwrap(),message$1.success("Alert updated successfully"),ae(null),oe.resetFields()}catch(ce){throw message$1.error("Failed to update alert"),console.error("Error updating alert:",ce),ce}}),he=pe=>sr(this,null,function*(){try{C==null||C.click("Existing Alerts - Delete",PRODUCT_NAME),yield ee(pe).unwrap(),message$1.success("Alert deleted successfully")}catch(ce){message$1.error("Failed to delete alert"),console.error("Error deleting alert:",ce)}});return V?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.loadingText},"Loading alerts...")):K?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.errorText},"Error loading alerts")):!F||F.length===0?React.createElement("div",{className:styles$1.existingAlertContent},React.createElement("div",{className:styles$1.emptyText},"No alerts found")):React.createElement("div",{className:styles$1.existingAlertContent},F.map(pe=>{const ce=pe.attributes||pe,fe=pe.id||ce.id,ye=ue(ce.status),_e=ie(ce.frequency),ge=se(ce.notification_type),be=re===fe;return React.createElement("div",{key:fe,className:styles$1.alertCard},React.createElement(Flex$1,{align:"center",className:styles$1.alertHeader},React.createElement(AlertFilled$1,{className:classNames(styles$1.alertIcon,{[styles$1.inactiveIcon]:!ye})}),React.createElement("div",null,ce.name)),React.createElement("div",{className:styles$1.alertSettings},React.createElement(Flex$1,{align:"center",gap:16,wrap:!0},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(Switch$1,{checked:ye,onChange:()=>de(fe,ce.status),size:"small",disabled:be}),React.createElement("span",null,"Active")),React.createElement(Flex$1,{align:"center",gap:8},React.createElement(ClockCircleOutlined$1,null),React.createElement("span",null,_e)),React.createElement(Flex$1,{align:"center",gap:8},React.createElement(AlertFilled$1,null),React.createElement("span",null,ge)))),!be&&React.createElement("div",{className:styles$1.alertActions},React.createElement(Button$2,{type:"text",danger:!0,icon:React.createElement(DeleteOutlined$1,null),onClick:()=>he(fe),className:styles$1.deleteButton},"Delete"),React.createElement(Button$2,{type:"primary",icon:React.createElement(EditOutlined$1,null),onClick:()=>le(fe),className:styles$1.editButton},"Edit")),be&&React.createElement("div",{className:styles$1.editFormCard},React.createElement(JobAlertForm,{form:oe,initialValues:ce,onSubmit:me,isSubmitting:ne}),React.createElement(Flex$1,{gap:8,justify:"flex-end",style:{marginTop:"1.6rem"}},React.createElement(Button$2,{onClick:ve,disabled:ne},"Cancel"),React.createElement(Button$2,{type:"primary",onClick:()=>sr(this,null,function*(){try{const Se=yield oe.validateFields(),Ee={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},Ce=Se.frequency==="realtime",xe={alert:{name:Se.name,job_functions:Se.job_functions||[],min_ctc:Se.min_ctc,locations:Se.locations||[],min_experience:Se.min_experience?parseInt(Se.min_experience,10):0,max_experience:Se.max_experience?parseInt(Se.max_experience,10):null,frequency:Ee[Se.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:Ce&&Se.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL}};yield me(xe)}catch(Se){}}),loading:ne},"Update Alert"))))}))}function JobAlertModal({analytics:C}){const $=reactRedux.useDispatch(),F=reactRedux.useSelector(de=>de.scalantCareerHub.dashboard.jobAlertModalOpen),[V,K]=React.useState("create"),[J]=Form$1.useForm(),[ee,{isLoading:te}]=useCreateAlertMutation();React.useEffect(()=>{F||(J.resetFields(),K("create"))},[F,J]);const ne=()=>{C==null||C.click("Job Alert Modal - Close",PRODUCT_NAME),$(closeJobAlertModal())},re=()=>{C==null||C.click("Job Alert Modal - Cancel",PRODUCT_NAME),ne()},ae=()=>sr(this,null,function*(){try{const de=yield J.validateFields(),le={realtime:ALERT_FREQUENCY.REALTIME,daily:ALERT_FREQUENCY.DAILY,alternate:ALERT_FREQUENCY.ALTERNATE_DAY,weekly:ALERT_FREQUENCY.WEEKLY},ve=de.frequency==="realtime",me={alert:{name:de.name,job_functions:de.job_functions||[],min_ctc:de.min_ctc,locations:de.locations||[],min_experience:de.min_experience?parseInt(de.min_experience,10):0,max_experience:de.max_experience?parseInt(de.max_experience,10):null,frequency:le[de.frequency]||ALERT_FREQUENCY.REALTIME,notification_type:ve&&de.notification_type||ALERT_NOTIFICATION_TYPE.EMAIL},resume_alert:!1},he=yield ee(me).unwrap();he.success&&he.alert&&(C==null||C.click("Job Alert Modal - Create Alert",PRODUCT_NAME),J.resetFields(),K("existing"),message$1.success("Alert created successfully"))}catch(de){message$1.error("Failed to create alert"),console.error("Error creating alert:",de)}}),oe=de=>sr(this,null,function*(){const le=br(Hn({},de),{resume_alert:!1});return yield ee(le).unwrap()}),ie=React.createElement(Flex$1,{vertical:!0},React.createElement(Flex$1,{justify:"space-between"},React.createElement(Flex$1,{align:"center",gap:8},React.createElement(BellOutlined$1,{className:styles$2.filterIcon}),"Curate your Job Alert"),React.createElement(CloseOutlined$1,{onClick:ne})),React.createElement("div",{className:styles$2.drawerHeaderSubtitle},"By creating a job alert, you will be notified when a job posting matches your preferred criteria")),se=React.createElement("div",{className:styles$2.modalFooter},React.createElement(Button$2,{onClick:re},"Cancel"),React.createElement(Button$2,{type:"primary",onClick:ae,loading:te},"Create Alert")),ue=React.createElement(JobAlertForm,{form:J,onSubmit:oe,isSubmitting:te});return React.createElement(Modal$1,{title:ie,open:F,onCancel:ne,footer:se,width:600,closable:!1,className:styles$2.modal},React.createElement(Tabs$1,{activeKey:V,onChange:de=>{C==null||C.click(`Job Alert Modal - Tab ${de}`,PRODUCT_NAME),K(de)},items:[{key:"create",label:"Create alert",children:ue},{key:"existing",label:"Existing alerts",children:React.createElement(ExistingAlerts,{analytics:C})}]}))}const jobsPageContent="_jobsPageContent_pk7y3_1",styles={jobsPageContent};function JobsPage({analytics:C,country:$,openMockInterviewModal:F,openResume:V,processCounts:K=DEFAULT_PROCESS_COUNTS,userProfileData:J,onUploadFile:ee,onViewResume:te,onEditPreferences:ne,onEditResume:re,onAddResume:ae,onCloseResumeBuilder:oe}){const ie=reactRedux.useDispatch(),se=reactRedux.useSelector(pe=>{var ce,fe;return((fe=(ce=pe.scalantCareerHub)==null?void 0:ce.filter)==null?void 0:fe.tab)||TAG_TO_TAB_MAPPING.relevant}),ue=React.useRef(!1),{selectedJobId:de}=useJobQueryParams({syncToURL:!0,syncFromURL:!0});React.useLayoutEffect(()=>{if(!ue.current){const pe=getFiltersFromURL(),ce=Hn({},pe),ye=new URLSearchParams(window.location.search).get("job_ids");ye&&(ce.job_ids=[ye]),Object.keys(ce).length>0&&ie(updateFiltersFromForm(ce)),ue.current=!0}},[ie]),React.useEffect(()=>{ie(setProcessCounts(K))},[K,ie]),React.useEffect(()=>{J&&ie(setUserProfileData(J))},[J,ie]);const le=React.createElement(JobsHeader,{analytics:C}),ve=de?React.createElement(JobDetails,{analytics:C,currentTab:se,onUploadFile:ee,country:$,openMockInterviewModal:F,openResume:V,jobId:de,onEditResume:re,onAddResume:ae,onCloseResumeBuilder:oe}):React.createElement(ProfileDetails,{analytics:C,onViewResume:te,onEditPreferences:ne}),me=de?SIDER_WIDTH.JOB_DETAILS:SIDER_WIDTH.PROFILE_DETAILS;React.useEffect(()=>{C&&C.view("Jobs Page - Tab Rendered",PRODUCT_NAME,{currentTab:se})},[C,se]);const he=()=>{switch(se){case TAG_TO_TAB_MAPPING.relevant:return React.createElement(RelevantJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.saved:return React.createElement(SavedJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.applied:return React.createElement(AppliedJobsPage,{analytics:C});case TAG_TO_TAB_MAPPING.all:default:return React.createElement(AllJobsPage,{analytics:C})}};return React.createElement(React.Fragment,null,React.createElement(JobsLayout,{analytics:C,header:le,sider:ve,siderWidth:me,className:styles.jobsPage},he()),React.createElement(FilterDrawer,{analytics:C}),React.createElement(JobAlertModal,{analytics:C}))}JobsPage.propTypes={processCounts:PropTypes.shape({all:PropTypes.number,relevant:PropTypes.number,draft:PropTypes.number,applications:PropTypes.number,saved:PropTypes.number,archived:PropTypes.number}),userProfileData:PropTypes.object},exports.APPLICATION_STATUS=APPLICATION_STATUS$1,exports.JOB_CARD_CONFIG=JOB_CARD_CONFIG,exports.JOB_PROFILE_STATUS=JOB_PROFILE_STATUS,exports.JobsLayout=JobsLayout,exports.JobsPage=JobsPage,exports.TABS=TABS,exports.careerHubApi=careerHubApi,exports.checkAllOtherRequirementsMet=checkAllOtherRequirementsMet,exports.countPendingSteps=countPendingSteps,exports.default=HelloWorld,exports.determineJobTag=determineJobTag,exports.formatCtc=formatCtc,exports.formatDate=formatDate,exports.formatExperience=formatExperience$1,exports.formatLocation=formatLocation,exports.formatNoticePeriod=formatNoticePeriod,exports.setBaseUrl=setBaseUrl,exports.setChecklistOpen=setChecklistOpen,exports.setFitmentScore=setFitmentScore,exports.store=rootReducer,exports.useApplicationForm=useApplicationForm,exports.useCreateApplication=useCreateApplication,exports.useJobCardState=useJobCardState,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|