PageSourceSearch

https://www.franova.fr/_next/static/chunks/7921.f465a9306aef2351.js

js franova.fr collected 2026-10-01 14:30:10 UTC 7,515 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f32f-11bd-7830-b9d3-1763d2a46823")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7921],{17921:(t,e,s)=>{s.r(e),s.d(e,{default:()=>d});var r=s(71620),a=s(91547),i=s(14408),o=s(93384),l=s(64256),n=s(98878),m=s(44443);let c={totalExamsCompleted:0,averageScore:0,bestScore:0,totalTimeSpent:0,examHistory:[],trialAttemptsUsed:0,trialAttemptsRemaining:o.i7},d=(0,r.v)()((0,a.D)((t,e)=>({userId:null,isInitialized:!1,stats:null,examHistory:[],currentExamResults:null,isLoading:!1,isLoadingHistory:!1,error:null,isOffline:!1,initialize:async s=>{if(e().userId===s&&e().isInitialized)return void n.vF.debug("[V2ExamProgressStore] Already initialized for user ".concat(s));if(e().userId===s&&e().isLoading)return void n.vF.debug("[V2ExamProgressStore] Already initializing for user ".concat(s,", skipping duplicate call"));t(t=>{t.userId=s,t.isInitialized=!1,t.isLoading=!0,t.error=null});try{n.vF.info("[V2ExamProgressStore] Initializing for user ".concat(s));let[e,r]=await Promise.all([l.A.getV2ExamAccess(),l.A.getV2ExamHistory(1,100)]),a=e.accessStatus,i=r.exams,o=i.filter(t=>"completed"===t.status||"timed_out"===t.status),m=o.length,c=0,d=0,u=0,g=0;o.forEach(t=>{null!==t.score&&(c+=t.score,g++,t.score>d&&(d=t.score)),u+=60*(t.timeSpentMinutes||0)});let p=g>0?c/g:0,x={totalExamsCompleted:m,averageScore:p,bestScore:d,totalTimeSpent:u,examHistory:i,trialAttemptsUsed:a.trialAttemptsUsed,trialAttemptsRemaining:a.trialAttemptsRemaining};t(t=>{t.stats=x,t.examHistory=i,t.isLoading=!1,t.isInitialized=!0}),n.vF.info("[V2ExamProgressStore] Initialized successfully",{totalExams:x.totalExamsCompleted,trialAttemptsUsed:x.trialAttemptsUsed})}catch(e){n.vF.error("[V2ExamProgressStore] Failed to initialize:",e),t(t=>{t.isInitialized=!1,t.error=(0,m.KM)(e instanceof Error?e:Error(String(e)),"exam"),t.isLoading=!1,t.stats={...c}})}},fetchExamHistory:async()=>{if(!e().isInitialized||!e().userId)throw Error("Store not initialized");e().userId,t(t=>{t.isLoadingHistory=!0,t.error=null});try{let e=await l.A.getV2ExamHistory(1,100);t(t=>{if(t.examHistory=e.exams,t.stats){let s=e.exams.filter(t=>"completed"===t.status||"timed_out"===t.status);t.stats.totalExamsCompleted=s.length,t.stats.examHistory=e.exams;let r=0,a=0,i=0,o=0;s.forEach(t=>{null!==t.score&&(r+=t.score,t.score>a&&(a=t.score),i++),o+=60*(t.timeSpentMinutes||0)}),t.stats.averageScore=i>0?r/i:0,t.stats.bestScore=a,t.stats.totalTimeSpent=o}t.isLoadingHistory=!1}),n.vF.info("[V2ExamProgressStore] Exam history fetched",{totalExams:e.pagination.totalCount})}catch(e){throw n.vF.error("[V2ExamProgressStore] Failed to fetch exam history:",e),t(t=>{t.error=(0,m.KM)(e instanceof Error?e:Error(String(e)),"exam"),t.isLoadingHistory=!1}),e}},fetchExamResults:async s=>{if(!e().isInitialized||!e().userId)throw Error("Store not initialized");try{let e=await l.A.getV2ExamResults(s);return t(t=>{t.currentExamResults=e.examResults}),n.vF.info("[V2ExamProgressStore] Exam results fetched",{examId:s}),e.examResults}catch(t){throw n.vF.error("[V2ExamProgressStore] Failed to fetch exam results:",t),t}},saveExamResults:async t=>{if(!e().isInitialized||!e().userId)return void n.vF.warn("[V2ExamProgressStore] Cannot save results: store not initialized");try{e().updateStats(t),n.vF.info("[V2ExamProgressStore] Exam results processed locally",{examId:t.examId,score:t.scorePercentage})}catch(t){throw n.vF.error("[V2ExamProgressStore] Failed to process exam results locally:",t),t}},updateStats:e=>{t(t=>{t.stats||(t.stats={...c});let s=t.stats,r={examId:e.examId,startedAt:e.startedAt,completedAt:e.completedAt||Date.now(),abandonedAt:("abandoned"===e.status||"timed_out"===e.status)&&e.completedAt?e.completedAt:null,score:"abandoned"===e.status?null:e.scorePercentage,questionScore:"abandoned"===e.status?null:void 0!==e.questionScore?e.questionScore:e.scorePercentage,passed:"abandoned"!==e.status&&(void 0!==e.passed?e.passed:e.scorePercentage>=i.d9),totalQuestions:e.totalQuestions,correctAnswers:e.correctAnswers,timeSpentMinutes:null!==e.durationTakenSeconds?Math.round(e.durationTakenSeconds/60):0,status:e.status,examType:"premium"};t.examHistory.unshift(r),s.examHistory.unshift(r);let a=t.examHistory.filter(t=>"completed"===t.status||"timed_out"===t.status);s.totalExamsCompleted=a.length,s.totalTimeSpent+=Math.round(e.durationTakenSeconds||0);let o=a.filter(t=>null!==t.score).map(t=>t.score);o.length>0?(s.averageScore=o.reduce((t,e)=>t+e,0)/o.length,s.bestScore=Math.max(...o)):(s.averageScore=0,s.bestScore=0),t.currentExamResults=e})},refreshData:async()=>
1{if(!e().isInitialized||!e().userId)throw Error("Store not initialized");let s=e().userId;t(t=>{t.isLoading=!0,t.error=null});try{n.vF.info("[V2ExamProgressStore] Refreshing all data for user ".concat(s));let[e,r]=await Promise.all([l.A.getV2ExamAccess(),l.A.getV2ExamHistory(1,100)]),a=e.accessStatus,i=r.exams,o=i.filter(t=>"completed"===t.status||"timed_out"===t.status),m=o.length,c=0,d=0,u=0,g=0;o.forEach(t=>{null!==t.score&&(c+=t.score,g++,t.score>d&&(d=t.score)),u+=60*(t.timeSpentMinutes||0)});let p=g>0?c/g:0,x={totalExamsCompleted:m,averageScore:p,bestScore:d,totalTimeSpent:u,examHistory:i,trialAttemptsUsed:a.trialAttemptsUsed,trialAttemptsRemaining:a.trialAttemptsRemaining};t(t=>{t.stats=x,t.examHistory=i,t.isLoading=!1}),n.vF.info("[V2ExamProgressStore] Data refreshed successfully",{totalExams:x.totalExamsCompleted,totalHistoryItems:i.length,finishedExams:o.length,trialAttemptsUsed:x.trialAttemptsUsed})}catch(e){throw n.vF.error("[V2ExamProgressStore] Failed to refresh data:",e),t(t=>{t.error=(0,m.KM)(e instanceof Error?e:Error(String(e)),"exam"),t.isLoading=!1}),e}},getAccessStatus:()=>{if(!e().isInitialized||!e().userId)return{canAccess:!1,accessLevel:"none",trialAttemptsUsed:0,trialAttemptsRemaining:0,isPremium:!1,trialActive:!1,requiresPremium:!0,blockingReason:"Store not initialized"};let t=e().stats;return t?t.trialAttemptsRemaining>0?{canAccess:!0,accessLevel:"trial",trialAttemptsUsed:t.trialAttemptsUsed,trialAttemptsRemaining:t.trialAttemptsRemaining,isPremium:!1,trialActive:!1,requiresPremium:!1}:(t.trialAttemptsUsed||0)>=o.i7?{canAccess:!1,accessLevel:"none",trialAttemptsUsed:t.trialAttemptsUsed||0,trialAttemptsRemaining:Math.max(0,o.i7-(t.trialAttemptsUsed||0)),isPremium:!1,trialActive:!1,requiresPremium:!0,blockingReason:"No exam attempts remaining"}:(t.trialAttemptsUsed||0)<o.i7?{canAccess:!0,accessLevel:"trial",trialAttemptsUsed:t.trialAttemptsUsed||0,trialAttemptsRemaining:Math.max(0,o.i7-(t.trialAttemptsUsed||0)),isPremium:!1,trialActive:!1,requiresPremium:!1}:{canAccess:!1,accessLevel:"none",trialAttemptsUsed:t.trialAttemptsUsed||0,trialAttemptsRemaining:0,isPremium:!1,trialActive:!1,requiresPremium:!0,blockingReason:"Unknown access state"}:{canAccess:!1,accessLevel:"none",trialAttemptsUsed:0,trialAttemptsRemaining:0,isPremium:!1,trialActive:!1,requiresPremium:!0,blockingReason:"Exam progress not loaded"}},clearCurrentResults:()=>{t(t=>{t.currentExamResults=null})},resetStore:()=>{t(t=>{t.userId=null,t.isInitialized=!1,t.stats=null,t.examHistory=[],t.currentExamResults=null,t.isLoading=!1,t.isLoadingHistory=!1,t.error=null})},setIsOffline:e=>{t(t=>{t.isOffline=e})}})))}}]);
2//# chunkId=01a0f32f-11bd-7830-b9d3-1763d2a46823

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.