PageSourceSearch

https://permis-b.be/blu/assets/RiskSimulator-DAqtMDwL.js

js permis-b.be collected 2026-10-02 00:45:14 UTC 23,379 bytes, 2 lines download raw bytes

1import{x as fe,r as t,z as Y,d as V,M as P,aE as Z,aH as K,j as e,aS as pe,B as v,t as W,aT as De,i as R,P as Ie,aA as oe,o as le,G as Te,w as Le,y as Ve,E as Ae,N as Ee,a4 as ze}from"./index-B8WUz3MM.js";import{f as ce,q as Be,e as Ue,p as qe}from"./videoUrlHelper-CP6_3MC7.js";import{u as Q,C as $e}from"./ClickStore-Ce1A2TzG.js";import{M as J}from"./mouse-pointer-click-Di6xdEEq.js";import{C as ee}from"./circle-x-BGSgSgGI.js";import{S as de}from"./shield-alert-B-VDwF7q.js";import{A as Me,a as Pe,b as Qe,c as Fe,d as _e,e as Ge,f as Oe,g as He}from"./alert-dialog-WsVSryOH.js";import{V as Xe,R as Ye}from"./RiskZoneOverlay-BwP79bSv.js";import{R as me}from"./rotate-ccw-C6E6W0J7.js";import{C as M}from"./circle-check-big-CCdHgr3e.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"654d2042a217b073cdddc4feaa64530f7fe9fd97"};var m=new r.Error().stack;m&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[m]="4f3622fe-bc5c-40ae-862c-40464ca60e69",r._sentryDebugIdIdentifier="sentry-dbid-4f3622fe-bc5c-40ae-862c-40464ca60e69")}catch{}})();const ue=5,xe=3;function Ze(r){const m=fe(),o=t.useRef(null),[i,n]=t.useState("loading"),[s,f]=t.useState([]),[l,a]=t.useState(0),[y,j]=t.useState(0),[b,h]=t.useState(ue),[c,x]=t.useState(0),[u,F]=t.useState(new Set),[se,_]=t.useState(0),[he,A]=t.useState([]),[G,re]=t.useState(!1),O=t.useRef(new Set),[ge,te]=t.useState([]),[ke,H]=t.useState(0),S=t.useRef(b);S.current=b;const E=t.useRef(u);E.current=u;const z=t.useRef(se);z.current=se;const D=t.useRef(y);D.current=y;const B=t.useRef(!1),X=t.useRef(!1);t.useEffect(()=>{let d=!1;async function p(){try{const g=await Be.listRiskQuestions();if(d)return;const N=g.filter(w=>w.serieId===r),k=[];for(const w of N){const I=Ue(w);if(!I)continue;const T=qe(w.answerInfo)??{schemaVersion:"3.3",risks:[],occurrences:[]};k.push({question:w,clickData:T,videoUrl:I})}if(k.length===0){n("error");return}f(k),n("intro")}catch{d||n("error")}}return p(),()=>{d=!0}},[r]),t.useEffect(()=>{const d=O.current;return()=>{d.forEach(p=>clearTimeout(p))}},[]);const C=s[l]??null,ye=s.length,be=s.reduce((d,p)=>d+p.clickData.risks.length,0),je=y>=xe,U=t.useCallback(()=>{if(!C||B.current)return;B.current=!0;const d=E.current,p=z.current,g=C.clickData.risks;te(N=>[...N,{questionId:C.question.id,questionTitle:C.question.title,detectedRiskNames:g.filter(k=>d.has(k.id)).map(k=>k.name),missedRiskNames:g.filter(k=>!d.has(k.id)).map(k=>k.name),totalRisks:g.length,clicksUsed:p}])},[C]),q=t.useCallback(()=>{if(X.current)return;X.current=!0;const d=s.reduce((g,N)=>g+N.clickData.risks.length,0),p=D.current;Y.trackRiskSeriesComplete(r,p,d,p>=xe),n("correction")},[s,r]),ae=t.useCallback(d=>{A(g=>[...g,d]),re(!0);const p=setTimeout(()=>{A(g=>g.filter(N=>N.id!==d.id)),re(!1),O.current.delete(p)},600);O.current.add(p)},[]),Ne=t.useCallback(()=>{Y.trackRiskSeriesStart(r),n("ready"),a(0),j(0),D.current=0,h(ue),x(0),F(new Set),_(0),A([]),te([]),H(0),B.current=!1,X.current=!1},[r]),ve=t.useCallback(()=>{n("playing")},[]),Ce=t.useCallback(d=>{H(d)},[]),we=t.useCallback(()=>{U();const d=l+1;d>=s.length||S.current<=0?q():(a(d),F(new Set),_(0),A([]),H(0),B.current=!1,n("ready"))},[l,s.length,U,q]),ie=t.useRef(G);ie.current=G;const Re=t.useCallback(d=>{var ne;if(!C||S.current<=0||ie.current)return;const p={x:d.normalizedX,y:d.normalizedY},g=E.current,{occurrences:N}=C.clickData,k=ce(N,p,d.timestampSec,L=>!g.has(L));if(!k&&ce(N,p,d.timestampSec,$=>g.has($)))return;const w=c+1,I=z.current+1,T=S.current-1;if(x(w),_(I),h(T),z.current=I,S.current=T,ae({id:`click-${Date.now()}-${Math.random()}`,normalizedX:d.normalizedX,normalizedY:d.normalizedY,clickNumber:w}),k){const L=D.current+1,$=new Set([...g,k]);F($),E.current=$,j(L),D.current=L}T<=0&&((ne=o.current)==null||ne.pause(),U(),q())},[C,c,ae,U,q]),Se=t.useCallback(()=>{i!=="correction"&&Y.trackRiskSeriesQuit(r,l,s.length),m("/risks")},[m,i,r,l,s.length]);return{phase:i,videoIndex:l,totalVideos:ye,clicksRemaining:b,score:y,currentVideo:C,videoRef:o,clickFeedbacks:he,isClickLocked:G,currentTime:ke,handleVideoClick:Re,handleTimeUpdate:Ce,handleVideoEnded:we,videoResults:ge,totalRisks:be,hasPassed:je,totalClicksUsed:c,handleStart:Ne,handleGo:ve,handleQuit:Se,serieId:r}}
1function Ke({serieId:r,totalVideos:m,onStart:o}){const{t:i}=V(),n=P(),s=Q(),f=n&&!s,l=n&&s,a=[{icon:Z,color:"text-secondary",label:i("risks.simulatorIntro.targetLabel"),desc:i("risks.simulatorIntro.targetDesc")},{icon:J,color:"text-secondary",label:i("risks.simulatorIntro.clicksLabel"),desc:i("risks.simulatorIntro.clicksDesc")},{icon:ee,color:"text-destructive",label:i("risks.simulatorIntro.endLabel"),desc:i("risks.simulatorIntro.endDesc")},{icon:K,color:"text-warning",label:i("risks.simulatorIntro.thresholdLabel"),desc:i("risks.simulatorIntro.thresholdDesc")}],y=m===1?i("risks.simulatorIntro.subtitleOne",{serieId:r,count:m}):i("risks.simulatorIntro.subtitleOther",{serieId:r,count:m});return e.jsxs("div",{className:"min-h-screen bg-primary flex items-center justify-center p-4 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(ellipse 70% 40% at 50% 0%, hsl(var(--secondary) / 0.15), transparent)"}}),e.jsxs("div",{className:`w-full relative z-10 ${l?"max-w-3xl":"max-w-md"}`,children:[e.jsxs("div",{className:`text-center risk-fade-up ${l?"mb-3":"mb-8"}`,children:[!l&&e.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-2xl bg-primary-foreground/[0.12] border border-primary-foreground/20 mb-4",children:e.jsx(de,{className:"h-10 w-10 text-primary-foreground"})}),e.jsxs("h1",{className:`font-semibold text-primary-foreground tracking-tight ${l?"text-lg":"text-2xl"}`,children:[l&&e.jsx(de,{className:"h-5 w-5 text-primary-foreground inline-block mr-2 -mt-0.5"}),i("risks.simulatorIntro.title")]}),e.jsx("p",{className:"text-primary-foreground/65 text-sm mt-1",children:y})]}),e.jsxs("div",{className:`rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 risk-fade-up risk-fade-up-d1 ${l?"p-3 space-y-2":"p-6 space-y-4"}`,children:[e.jsx("h2",{className:"text-[11px] font-semibold text-primary-foreground/60 uppercase tracking-[0.15em]",children:i("risks.simulatorIntro.tag")}),e.jsx("div",{className:l?"grid grid-cols-4 gap-x-4 gap-y-1.5":"space-y-3",children:a.map(({icon:j,color:b,label:h,desc:c},x)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(j,{className:`h-3.5 w-3.5 ${b} shrink-0 mt-0.5`}),e.jsxs("p",{className:`text-primary-foreground/75 ${l?"text-xs leading-snug":"text-sm leading-relaxed"}`,children:[e.jsx("span",{className:"font-medium text-primary-foreground",children:h})," ",c]})]},x))})]}),f&&e.jsxs("div",{className:"mt-3 rounded-xl border border-secondary/30 bg-secondary/[0.12] px-4 py-3 risk-fade-up risk-fade-up-d2 flex items-center gap-3",children:[e.jsx(pe,{className:"h-6 w-6 text-secondary shrink-0 risk-rotate-hint"}),e.jsxs("p",{className:"text-xs text-primary-foreground/75 leading-relaxed",children:[e.jsx("span",{className:"font-semibold text-secondary",children:i("risks.simulatorIntro.rotationLabel")})," ",i("risks.simulatorIntro.rotationDescTest")]})]}),e.jsx("div",{className:`risk-fade-up risk-fade-up-d3 ${l?"mt-4 flex justify-center":"mt-8"}`,children:e.jsxs(v,{variant:"secondary",size:l?"default":"lg",className:`font-semibold shadow-lg shadow-secondary/25 ${l?"text-sm h-11 px-12":"w-full text-base h-14"}`,onClick:o,disabled:f,children:[i(f?"risks.simulatorIntro.rotateBtn":"risks.simulatorIntro.startBtn"),!f&&e.jsx(W,{className:"ml-2 h-5 w-5"})]})})]})]})}function We({videoIndex:r,totalVideos:m,onGo:o,onQuit:i}){const{t:n}=V(),[s,f]=t.useState(!1),l=P(),a=Q(),y=l&&a;return e.jsxs("div",{className:"min-h-screen bg-primary flex flex-col items-center justify-center p-4 relative overflow-hidden",children:[e.jsxs(v,{variant:"ghost",size:"sm",className:"absolute top-4 right-4 z-20 text-primary-foreground/50 hover:text-primary-foreground/80 hover:bg-primary-foreground/[0.08]",onClick:()=>f(!0),children:[e.jsx(De,{className:"mr-1.5 h-3.5 w-3.5"}),n("risks.simulatorReady.quitBtn")]}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(circle 40% at 50% 40%, hsl(var(--secondary) / 0.12), transparent)"}}
1),e.jsx("div",{className:`relative z-10 w-full ${y?"max-w-lg":"max-w-sm"}`,children:e.jsxs("div",{className:"rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 p-6 text-center risk-fade-up",children:[e.jsx("p",{className:"text-[11px] text-primary-foreground/75 uppercase tracking-[0.2em] font-medium mb-5",children:n("risks.simulatorReady.label")}),e.jsx("div",{className:"mb-6 risk-fade-up risk-fade-up-d1",children:e.jsxs("div",{className:"inline-flex items-center justify-center w-28 h-28 rounded-full border-2 border-primary-foreground/20 relative",children:[e.jsx("div",{className:"absolute inset-[-4px] rounded-full border-2 border-secondary/30 risk-pulse-ring"}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-5xl font-bold text-primary-foreground leading-none",children:r+1}),e.jsx("div",{className:"text-xs text-primary-foreground/75 mt-1 font-medium",children:n("risks.simulatorReady.videoCounter",{total:m})})]})]})}),e.jsx("div",{className:"flex items-center justify-center gap-2 mb-6 risk-fade-up risk-fade-up-d2",children:Array.from({length:m}).map((j,b)=>{let h="w-1.5 bg-primary-foreground/20";return b<r?h="w-6 bg-secondary":b===r&&(h="w-6 bg-primary-foreground"),e.jsx("div",{className:R("h-1.5 rounded-full transition-all duration-300",h)},b)})}),e.jsx("p",{className:`text-xs text-primary-foreground/85 leading-relaxed mb-6 mx-auto risk-fade-up risk-fade-up-d3 ${y?"":"max-w-xs"}`,children:n("risks.simulatorReady.instruction")}),e.jsx("div",{className:"risk-fade-up risk-fade-up-d4 flex flex-col items-center",children:e.jsxs(v,{variant:"secondary",size:"lg",className:"text-base h-14 px-10 font-semibold shadow-lg shadow-secondary/25",onClick:o,children:[e.jsx(Ie,{className:"mr-2 h-5 w-5"}),n("risks.simulatorReady.launchBtn")]})})]})}),e.jsx(Me,{open:s,onOpenChange:f,children:e.jsxs(Pe,{children:[e.jsxs(Qe,{children:[e.jsx(Fe,{children:n("risks.simulatorReady.quitDialogTitle")}),e.jsx(_e,{children:n("risks.simulatorReady.quitDialogDescription")})]}),e.jsxs(Ge,{children:[e.jsx(Oe,{children:n("risks.simulatorReady.continueBtn")}),e.jsx(He,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:n("risks.simulatorReady.quitAction")})]})]})})]})}function Je({videoEntry:r,videoRef:m,clickFeedbacks:o,totalClicksUsed:i,isClickLocked:n,onVideoClick:s,onTimeUpdate:f,onVideoEnded:l,currentTime:a}){const{t:y}=V(),j=P(),b=Q(),h=j&&!b,c=t.useRef(!1);return t.useEffect(()=>{const x=m.current;!x||!j||(h?x.paused||(c.current=!0,x.pause()):c.current&&(c.current=!1,x.play().catch(()=>{})))},[h,j,m]),e.jsxs("div",{className:"h-[100dvh] w-full bg-black flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"h-full w-full flex items-center justify-center",style:{maxWidth:"calc(100dvh * 16 / 9)"},children:e.jsx(Xe,{ref:m,videoUrl:r.videoUrl,mode:"playback",onVideoClick:s,onTimeUpdate:f,onVideoEnd:l,autoPlay:!0,showControls:!1,className:"border-0 shadow-none rounded-none",hideCursor:n,children:e.jsx(Ye,{risks:r.clickData.risks,occurrences:r.clickData.occurrences,currentTime:a,videoElement:m.current,mode:"exam",examClicks:o})})}),e.jsx($e,{totalClicks:5,clicksUsed:i}),h&&e.jsxs("div",{className:"absolute inset-0 z-30 bg-black/80 backdrop-blur-sm flex flex-col items-center justify-center p-6",children:[e.jsx(pe,{className:"h-12 w-12 text-secondary mb-4 risk-rotate-hint"}),e.jsx("p",{className:"text-primary-foreground font-semibold text-lg text-center",children:y("risks.simulatorPlayer.rotationLabel")}),e.jsx("p",{className:"text-primary-foreground/65 text-sm text-center mt-2",children:y("risks.simulatorPlayer.rotationDesc")})]})]})}function es({score:r,totalRisks:m,hasPassed:o,videoResults:i,totalClicksUsed:n,onRestart:s,onQuit:f,onNextSeries:l}){const{t:a}=V(),y=P(),j=Q(),b=y&&j,h=n-r;return e.jsxs("div",{className:"min-h-screen bg-primary p-4 flex flex-col items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:o?"radial-gradient(ellipse 60% 35% at 50% 15%, hsl(var(--success) / 0.12), transparent)":"radial-gradient(ellipse 60% 35% at 50% 15%, hsl(var(--destructive) / 0.10), transparent)"}}),e.jsx("div",{className:`w-full relative z-10 ${b?"max-w-4xl":"max-w-md"}`,children:b?e.jsxs("div",{className:"flex gap-5 items-start",children:[e.jsxs("div",{className:"w-[280px] shrink-0 flex flex-col",children:[e.jsxs("div",{className:R("rounded-xl border p-4 text-center risk-score-in",o?"bg-success/10 border-success/30":"bg-destructive/10 border-destructive/30"),children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[e.jsx(K,{className:R("h-5 w-5",o?"text-success":"text-destructive")}
1),e.jsx("span",{className:R("text-sm font-semibold",o?"text-success":"text-destructive"),children:a(o?"risks.simulatorCorrection.passed":"risks.simulatorCorrection.failed")})]}),e.jsxs("div",{className:"text-4xl font-bold text-primary-foreground leading-none",children:[r,e.jsxs("span",{className:"text-lg text-primary-foreground/75",children:["/",m]})]}),e.jsx("p",{className:"text-[11px] text-primary-foreground/75 mt-2 leading-relaxed",children:a(o?"risks.simulatorCorrection.passedTextShort":"risks.simulatorCorrection.failedTextShort")})]}),e.jsx("div",{className:"grid grid-cols-2 gap-1.5 mt-3 risk-fade-up risk-fade-up-d2",children:[{icon:J,value:String(n),label:a("risks.simulatorCorrection.statClicksShort")},{icon:Z,value:String(h),label:a("risks.simulatorCorrection.statMissedShort")}].map(({icon:c,value:x,label:u})=>e.jsxs("div",{className:"rounded-lg bg-primary-foreground/[0.12] border border-primary-foreground/20 p-2 text-center",children:[e.jsx(c,{className:"h-3 w-3 text-primary-foreground/75 mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-primary-foreground",children:x}),e.jsx("div",{className:"text-[9px] text-primary-foreground/75 font-medium",children:u})]},u))}),e.jsxs("div",{className:"flex gap-2 mt-3 risk-fade-up risk-fade-up-d4",children:[e.jsxs(v,{variant:"ghost",size:"sm",className:"flex-1 border border-primary-foreground/20 text-primary-foreground/85 hover:bg-primary-foreground/[0.12] hover:text-primary-foreground",onClick:f,children:[e.jsx(oe,{className:"mr-1.5 h-3.5 w-3.5"}),a("risks.simulatorCorrection.backBtn")]}),o&&l?e.jsxs(v,{variant:"secondary",size:"sm",className:"flex-1 font-semibold shadow-lg shadow-secondary/25",onClick:l,children:[a("risks.simulatorCorrection.nextSeriesBtn"),e.jsx(W,{className:"ml-1.5 h-3.5 w-3.5"})]}):e.jsxs(v,{variant:"secondary",size:"sm",className:"flex-1 font-semibold shadow-lg shadow-secondary/25",onClick:s,children:[e.jsx(me,{className:"mr-1.5 h-3.5 w-3.5"}),a("risks.simulatorCorrection.restartBtn")]})]})]}),e.jsxs("div",{className:"flex-1 min-w-0 rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 p-3 risk-fade-up risk-fade-up-d3 overflow-y-auto max-h-[calc(100dvh-3rem)]",children:[e.jsx("h3",{className:"text-[11px] font-semibold text-primary-foreground/75 uppercase tracking-[0.15em] mb-3",children:a("risks.simulatorCorrection.detailTitle")}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map((c,x)=>e.jsxs("div",{className:"rounded-lg bg-primary-foreground/[0.06] p-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-xs font-medium text-primary-foreground",children:a("risks.simulatorCorrection.videoLabel",{n:x+1})}),e.jsxs(le,{variant:"outline",className:"text-[10px] px-1.5 py-0 border-primary-foreground/20 text-primary-foreground/75",children:[c.detectedRiskNames.length,"/",c.totalRisks]})]}),e.jsx("div",{className:"space-y-0.5",children:c.totalRisks===0?e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[e.jsx(M,{className:"h-3 w-3 text-primary-foreground/50 shrink-0"}),e.jsx("span",{className:"text-primary-foreground/65 truncate",children:a("risks.simulatorCorrection.noRiskInVideo")})]}):e.jsxs(e.Fragment,{children:[c.detectedRiskNames.map(u=>e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[e.jsx(M,{className:"h-3 w-3 text-success shrink-0"}),e.jsx("span",{className:"text-primary-foreground/85 truncate",children:u})]},u)),c.missedRiskNames.map(u=>e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[e.jsx(ee,{className:"h-3 w-3 text-destructive/70 shrink-0"}),e.jsx("span",{className:"text-primary-foreground/65 truncate",children:u})]},u))]})})]},c.questionId))})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:R("rounded-xl border p-6 text-center mb-5 risk-score-in",o?"bg-success/10 border-success/30":"bg-destructive/10 border-destructive/30"),children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[e.jsx(K,{className:R("h-7 w-7",o?"text-success":"text-destructive")}
1),e.jsx("span",{className:R("text-lg font-semibold",o?"text-success":"text-destructive"),children:a(o?"risks.simulatorCorrection.passed":"risks.simulatorCorrection.failed")})]}),e.jsxs("div",{className:"text-6xl font-bold text-primary-foreground leading-none",children:[r,e.jsxs("span",{className:"text-2xl text-primary-foreground/75",children:["/",m]})]}),e.jsx("p",{className:"text-sm text-primary-foreground/85 mt-2",children:a("risks.simulatorCorrection.risksIdentified")}),e.jsx("p",{className:"text-xs text-primary-foreground/75 mt-3 max-w-xs mx-auto leading-relaxed",children:a(o?"risks.simulatorCorrection.passedTextLong":"risks.simulatorCorrection.failedTextLong")})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2 mb-5 risk-fade-up risk-fade-up-d2",children:[{icon:J,value:String(n),label:a("risks.simulatorCorrection.statClicksLong")},{icon:Z,value:String(h),label:a("risks.simulatorCorrection.statMissedLong")}].map(({icon:c,value:x,label:u})=>e.jsxs("div",{className:"rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 p-3 text-center",children:[e.jsx(c,{className:"h-3.5 w-3.5 text-primary-foreground/75 mx-auto mb-1"}),e.jsx("div",{className:"text-lg font-bold text-primary-foreground",children:x}),e.jsx("div",{className:"text-[10px] text-primary-foreground/75 font-medium",children:u})]},u))}),e.jsxs("div",{className:"rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 p-4 space-y-4 risk-fade-up risk-fade-up-d3",children:[e.jsx("h3",{className:"text-[11px] font-semibold text-primary-foreground/75 uppercase tracking-[0.15em]",children:a("risks.simulatorCorrection.detailTitle")}),i.map((c,x)=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-primary-foreground",children:a("risks.simulatorCorrection.videoLabel",{n:x+1})}),e.jsxs(le,{variant:"outline",className:"text-xs border-primary-foreground/20 text-primary-foreground/75",children:[c.detectedRiskNames.length,"/",c.totalRisks]})]}),e.jsx("div",{className:"space-y-1 pl-1",children:c.totalRisks===0?e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(M,{className:"h-3.5 w-3.5 text-primary-foreground/50 shrink-0"}),e.jsx("span",{className:"text-primary-foreground/65",children:a("risks.simulatorCorrection.noRiskInVideo")})]}):e.jsxs(e.Fragment,{children:[c.detectedRiskNames.map(u=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(M,{className:"h-3.5 w-3.5 text-success shrink-0"}),e.jsx("span",{className:"text-primary-foreground/85",children:u})]},u)),c.missedRiskNames.map(u=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(ee,{className:"h-3.5 w-3.5 text-destructive/70 shrink-0"}),e.jsx("span",{className:"text-primary-foreground/65",children:u})]},u))]})}),x<i.length-1&&e.jsx("div",{className:"border-t border-primary-foreground/20 mt-3"})]},c.questionId))]}),e.jsxs("div",{className:"flex gap-3 mt-6 risk-fade-up risk-fade-up-d4",children:[e.jsxs(v,{variant:"ghost",className:"flex-1 border border-primary-foreground/20 text-primary-foreground/85 hover:bg-primary-foreground/[0.12] hover:text-primary-foreground",onClick:f,children:[e.jsx(oe,{className:"mr-2 h-4 w-4"}),a("risks.simulatorCorrection.backBtn")]}),o&&l?e.jsxs(v,{variant:"secondary",className:"flex-1 font-semibold shadow-lg shadow-secondary/25",onClick:l,children:[a("risks.simulatorCorrection.nextSeriesBtn"),e.jsx(W,{className:"ml-2 h-4 w-4"})]}):e.jsxs(v,{variant:"secondary",className:"flex-1 font-semibold shadow-lg shadow-secondary/25",onClick:s,children:[e.jsx(me,{className:"mr-2 h-4 w-4"}),a("risks.simulatorCorrection.restartBtn")]})]})]})})]})}function ms(){const{t:r}=V(),[m]=Te(),o=fe(),{isPremium:i}=Le(),n=parseInt(m.get("series")||"1",10),s=Ze(n),f=Ve({initialPremiumZoneOpen:!i,onPremiumZoneClose:()=>o("/risks"),onPaymentClose:()=>o("/risks")});return i?s.phase==="loading"?e.jsxs("div",{className:"min-h-screen bg-primary flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-background risk-overlay-fade"}),e.jsxs("div",{className:"text-center space-y-4 relative z-10",children:[e.jsx(Ee,{className:"h-10 w-10 text-secondary animate-spin mx-auto"}
1),e.jsx("p",{className:"text-primary-foreground/65 text-sm",children:r("risks.pageStates.simulatorLoading")})]})]}):s.phase==="error"?e.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center p-4",children:e.jsxs("div",{className:"rounded-xl bg-primary-foreground/[0.12] border border-primary-foreground/20 p-6 text-center space-y-4 max-w-md",children:[e.jsx(ze,{className:"h-10 w-10 text-destructive mx-auto"}),e.jsx("h2",{className:"text-lg font-semibold text-primary-foreground",children:r("risks.pageStates.simulatorErrorTitle")}),e.jsx("p",{className:"text-primary-foreground/75 text-sm",children:r("risks.pageStates.simulatorErrorDesc")}),e.jsx(v,{variant:"ghost",className:"border border-primary-foreground/20 text-primary-foreground/75 hover:bg-primary-foreground/[0.12] hover:text-primary-foreground",onClick:s.handleQuit,children:r("risks.pageStates.simulatorBackBtn")})]})}):s.phase==="intro"?e.jsx(Ke,{serieId:s.serieId,totalVideos:s.totalVideos,onStart:s.handleStart}):s.phase==="ready"?e.jsx(We,{videoIndex:s.videoIndex,totalVideos:s.totalVideos,onGo:s.handleGo,onQuit:s.handleQuit}):s.phase==="playing"&&s.currentVideo?e.jsx(Je,{videoEntry:s.currentVideo,videoRef:s.videoRef,clickFeedbacks:s.clickFeedbacks,totalClicksUsed:s.totalClicksUsed,isClickLocked:s.isClickLocked,onVideoClick:s.handleVideoClick,onTimeUpdate:s.handleTimeUpdate,onVideoEnded:s.handleVideoEnded,currentTime:s.currentTime}):s.phase==="correction"?e.jsx(es,{score:s.score,totalRisks:s.totalRisks,hasPassed:s.hasPassed,videoResults:s.videoResults,totalClicksUsed:s.totalClicksUsed,onRestart:s.handleStart,onQuit:s.handleQuit,onNextSeries:n<3?()=>o(`/risk-simulator?series=${n+1}`):void 0}):null:e.jsx(Ae,{gate:f})}export{ms as default};
2//# sourceMappingURL=RiskSimulator-DAqtMDwL.js.map

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