1import{c as oe,e as Ae,a as Me,r as f,g as _e,j as e,i as E,f as B,P as K,q as $e,b as Ee,u as V,l as Y,m as w,S as Be,B as z,A as Z,X as We,G as Le,d as Oe,N as Fe,F as Ke}from"./index-CSckGxAF.js";import{C as I,c as A,a as Ve,b as He}from"./card-DT41wAkG.js";import{D as J,d as ee,a as te,p as de,C as Ye}from"./protocolData-DtEAtEP8.js";import{u as Ze,C as fe,T as he,f as q}from"./index-r9sHX6o0.js";import{u as Je,c as xe}from"./index-B2Ba7r_U.js";import{g as U,D as qe,a as Ue,b as Ge,c as Xe,d as Qe}from"./exerciseReport-DEbZUv8y.js";import{D as G}from"./index-D6OHWTfw.js";import{A as F}from"./index-D26kCyhW.js";import{A as H}from"./arrow-left-Dj86Aw6Q.js";import{Z as et,I as me}from"./zap-BCUzXNeG.js";import{T as tt}from"./triangle-alert-B0qSR0rW.js";import"./chevron-down-C2CTslOe.js";import"./cloud-DQLeJJ-A.js";import"./brain-C6Khhoiq.js";import"./index-CKmUPXwB.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const at=oe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const pe=oe("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const st=oe("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);var ge=["PageUp","PageDown"],ye=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],be={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},W="Slider",[ae,nt,ot]=Ae(W),[we,Gt]=Me(W,[ot]),[it,X]=we(W),je=f.forwardRef((o,a)=>{const{name:s,min:t=0,max:i=100,step:c=1,orientation:n="horizontal",disabled:r=!1,minStepsBetweenThumbs:d=0,defaultValue:p=[t],value:g,onValueChange:m=()=>{},onValueCommit:x=()=>{},inverted:y=!1,form:b,...l}=o,u=f.useRef(new Set),h=f.useRef(0),k=n==="horizontal"?rt:lt,[j=[],D]=_e({prop:g,defaultProp:p,onChange:C=>{var _;(_=[...u.current][h.current])==null||_.focus(),m(C)}}),v=f.useRef(j);function S(C){const T=ut(j,C);L(C,T)}function M(C){L(C,h.current)}function Ie(){const C=v.current[h.current];j[h.current]!==C&&x(j)}function L(C,T,{commit:_}={commit:!1}){const le=gt(c),Q=yt(Math.round((C-t)/c)*c+t,le),O=xe(Q,[t,i]);D(($=[])=>{const R=mt($,O,T);if(xt(R,d*c)){h.current=R.indexOf(O);const ce=String(R)!==String($);return ce&&_&&x(R),ce?R:$}else return $})}return e.jsx(it,{scope:o.__scopeSlider,name:s,disabled:r,min:t,max:i,valueIndexToChangeRef:h,thumbs:u.current,values:j,orientation:n,form:b,children:e.jsx(ae.Provider,{scope:o.__scopeSlider,children:e.jsx(ae.Slot,{scope:o.__scopeSlider,children:e.jsx(k,{"aria-disabled":r,"data-disabled":r?"":void 0,...l,ref:a,onPointerDown:E(l.onPointerDown,()=>{r||(v.current=j)}),min:t,max:i,inverted:y,onSlideStart:r?void 0:S,onSlideMove:r?void 0:M,onSlideEnd:r?void 0:Ie,onHomeKeyDown:()=>!r&&L(t,0,{commit:!0}),onEndKeyDown:()=>!r&&L(i,j.length-1,{commit:!0}),onStepKeyDown:({event:C,direction:T})=>
16{if(!r){const Q=ge.includes(C.key)||C.shiftKey&&ye.includes(C.key)?10:1,O=h.current,$=j[O],R=c*Q*T;L($+R,O,{commit:!0})}}})})})})});je.displayName=W;var[ve,ke]=we(W,{startEdge:"left",endEdge:"right",size:"width",direction:1}),rt=f.forwardRef((o,a)=>{const{min:s,max:t,dir:i,inverted:c,onSlideStart:n,onSlideMove:r,onSlideEnd:d,onStepKeyDown:p,...g}=o,[m,x]=f.useState(null),y=B(a,k=>x(k)),b=f.useRef(void 0),l=Ze(i),u=l==="ltr",h=u&&!c||!u&&c;function N(k){const j=b.current||m.getBoundingClientRect(),D=[0,j.width],S=ie(D,h?[s,t]:[t,s]);return b.current=j,S(k-j.left)}return e.jsx(ve,{scope:o.__scopeSlider,startEdge:h?"left":"right",endEdge:h?"right":"left",direction:h?1:-1,size:"width",children:e.jsx(Ne,{dir:l,"data-orientation":"horizontal",...g,ref:y,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:k=>{const j=N(k.clientX);n==null||n(j)},onSlideMove:k=>{const j=N(k.clientX);r==null||r(j)},onSlideEnd:()=>{b.current=void 0,d==null||d()},onStepKeyDown:k=>{const D=be[h?"from-left":"from-right"].includes(k.key);p==null||p({event:k,direction:D?-1:1})}})})}),lt=f.forwardRef((o,a)=>{const{min:s,max:t,inverted:i,onSlideStart:c,onSlideMove:n,onSlideEnd:r,onStepKeyDown:d,...p}=o,g=f.useRef(null),m=B(a,g),x=f.useRef(void 0),y=!i;function b(l){const u=x.current||g.current.getBoundingClientRect(),h=[0,u.height],k=ie(h,y?[t,s]:[s,t]);return x.current=u,k(l-u.top)}return e.jsx(ve,{scope:o.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:e.jsx(Ne,{"data-orientation":"vertical",...p,ref:m,style:{...p.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:l=>{const u=b(l.clientY);c==null||c(u)},onSlideMove:l=>{const u=b(l.clientY);n==null||n(u)},onSlideEnd:()=>{x.current=void 0,r==null||r()},onStepKeyDown:l=>{const h=be[y?"from-bottom":"from-top"].includes(l.key);d==null||d({event:l,direction:h?-1:1})}})})}),Ne=f.forwardRef((o,a)=>{const{__scopeSlider:s,onSlideStart:t,onSlideMove:i,onSlideEnd:c,onHomeKeyDown:n,onEndKeyDown:r,onStepKeyDown:d,...p}=o,g=X(W,s);return e.jsx(K.span,{...p,ref:a,onKeyDown:E(o.onKeyDown,m=>{m.key==="Home"?(n(m),m.preventDefault()):m.key==="End"?(r(m),m.preventDefault()):ge.concat(ye).includes(m.key)&&(d(m),m.preventDefault())}),onPointerDown:E(o.onPointerDown,m=>{const x=m.target;x.setPointerCapture(m.pointerId),m.preventDefault(),g.thumbs.has(x)?x.focus():t(m)}),onPointerMove:E(o.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:E(o.onPointerUp,m=>{const x=m.target;x.hasPointerCapture(m.pointerId)&&(x.releasePointerCapture(m.pointerId),c(m))})})}),ze="SliderTrack",Se=f.forwardRef((o,a)=>{const{__scopeSlider:s,...t}=o,i=X(ze,s);return e.jsx(K.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...t,ref:a})});Se.displayName=ze;var se="SliderRange",Ce=f.forwardRef((o,a)=>{const{__scopeSlider:s,...t}=o,i=X(se,s),c=ke(se,s),n=f.useRef(null),r=B(a,n),d=i.values.length,p=i.values.map(x=>Te(x,i.min,i.max)),g=d>1?Math.min(...p):0,m=100-Math.max(...p);return e.jsx(K.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...t,ref:r,style:{...o.style,[c.startEdge]:g+"%",[c.endEdge]:m+"%"}})});Ce.displayName=se;var ne="SliderThumb",Pe=f.forwardRef((o,a)=>{const s=nt(o.__scopeSlider),[t,i]=f.useState(null),c=B(a,r=>i(r)),n=f.useMemo(()=>t?s().findIndex(r=>r.ref.current===t):-1,[s,t]);return e.jsx(ct,{...o,ref:c,index:n})}),ct=f.forwardRef((o,a)=>{const{__scopeSlider:s,index:t,name:i,...c}=o,n=X(ne,s),r=ke(ne,s),[d,p]=f.useState(null),g=B(a,N=>p(N)),m=d?n.form||!!d.closest("form"):!0,x=$e(d),y=n.values[t],b=y===void 0?0:Te(y,n.min,n.max),l=pt(t,n.values.length),u=x==null?void 0:x[r.size],h=u?ft(u,b,r.direction):0;return f.useEffect(()=>{if(d)return n.thumbs.add(d),()=>{n.thumbs.delete(d)}},[d,n.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[r.startEdge]:`calc(${b}% + ${h}px)`},children:[e.jsx(ae.ItemSlot,{scope:o.__scopeSlider,children:e.jsx(K.span,{role:"slider","aria-label":o["aria-label"]||l,"aria-valuemin":n.min,"aria-valuenow":y,"aria-valuemax":n.max,"aria-orientation":n.orientation,"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,tabIndex:n.disabled?void 0:0,...c,ref:g,style:y===void 0?{display:"none"}:o.style,onFocus:E(o.onFocus,()=>{n.valueIndexToChangeRef.current=t})})}),m&&e.jsx(De,{name:i??(n.name?n.name+(n.values.length>1?"[]":""):void 0),form:n.form,value:y},t)]})});Pe.displayName=ne;var dt="RadioBubbleInput",De=f.forwardRef(({__scopeSlider:o,value:a,...s},t)=>{const i=f.useRef(null),c=B(i,t),n=Je(a);return f.useEffect(()=>{const r=i.current;if(!r)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(n!==a&&g){const m=new Event("input",{bubbles:!0});g.call(r,a),r.dispatchEvent(m)}},[n,a]),e.jsx(K.input,{style:{display:"none"},...s,ref:c,defaultValue:a})});De.displayName=dt;function mt(o=[],a,s){const t=[...o];return t[s]=a,t.sort((i,c)=>i-c)}function Te(o,a,s){const c=100/(s-a)*(o-a);return xe(c,[0,100])}function pt(o,a){return a>2?`Value ${o+1} of ${a}
16`:a===2?["Minimum","Maximum"][o]:void 0}function ut(o,a){if(o.length===1)return 0;const s=o.map(i=>Math.abs(i-a)),t=Math.min(...s);return s.indexOf(t)}function ft(o,a,s){const t=o/2,c=ie([0,50],[0,t]);return(t-c(a)*s)*s}function ht(o){return o.slice(0,-1).map((a,s)=>o[s+1]-a)}function xt(o,a){if(a>0){const s=ht(o);return Math.min(...s)>=a}return!0}function ie(o,a){return s=>{if(o[0]===o[1]||a[0]===a[1])return a[0];const t=(a[1]-a[0])/(o[1]-o[0]);return a[0]+t*(s-o[0])}}function gt(o){return(String(o).split(".")[1]||"").length}function yt(o,a){const s=Math.pow(10,a);return Math.round(o*s)/s}var Re=je,bt=Se,wt=Ce,jt=Pe;const re=f.forwardRef(({className:o,...a},s)=>e.jsxs(Re,{ref:s,className:Ee("relative flex w-full touch-none select-none items-center",o),...a,children:[e.jsx(bt,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:e.jsx(wt,{className:"absolute h-full bg-primary"})}),e.jsx(jt,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));re.displayName=Re.displayName;const vt={"fvf.title":{en:"Fact vs. Feeling",pl:"Fakt kontra odczucie"},"fvf.step1.title":{en:"The situation",pl:"Sytuacja"},"fvf.step1.desc":{en:"Describe the specific situation that triggered the imposter feelings.",pl:"Opisz konkretnÄ
sytuacjÄ, która uruchomiÅa odczucie âoszustaâ."},"fvf.step1.placeholder":{en:"e.g. I was asked to present at the board meetingâ¦",pl:"np. Poproszono mnie o prezentacjÄ na spotkaniu zarzÄ
duâ¦"},"fvf.step2.title":{en:"Automatic thought",pl:"Pierwsza myÅl"},"fvf.step2.desc":{en:"What was the first thought that came to mind?",pl:"Co przyszÅo Ci do gÅowy jako pierwsze?"},"fvf.step2.placeholder":{en:"e.g. They'll realize I don't belong hereâ¦",pl:"np. ZorientujÄ
siÄ, że tu nie pasujÄâ¦"},"fvf.step3.title":{en:"Emotion intensity",pl:"SiÅa emocji"},"fvf.step3.desc":{en:"How intense was it? (1 = mild, 10 = overwhelming)",pl:"Jak silna byÅa ta emocja? (1 = Åagodna, 10 = przytÅaczajÄ
ca)"},"fvf.step4.title":{en:"Evidence FOR the thought",pl:"Dowody ZA tÄ
myÅlÄ
"},"fvf.step4.desc":{en:"What facts support this thought? Stay objective.",pl:"Jakie fakty potwierdzajÄ
tÄ myÅl? Zachowaj obiektywizm."},"fvf.step4.placeholder":{en:"e.g. I haven't done this kind of presentation beforeâ¦",pl:"np. Nie robiÅam/em wczeÅniej tego typu prezentacjiâ¦"},"fvf.step5.title":{en:"Evidence AGAINST the thought",pl:"Dowody PRZECIW tej myÅli"},"fvf.step5.desc":{en:"What facts contradict this thought? What would a colleague say?",pl:"Jakie fakty jej przeczÄ
? Co powiedziaÅaby/by koleżanka lub kolega?"},"fvf.step5.placeholder":{en:"e.g. I was specifically chosen for this roleâ¦",pl:"np. Wybrali mnie konkretnie do tej roliâ¦"},"fvf.step6.title":{en:"Balanced reframe",pl:"Zrównoważone ujÄcie"},"fvf.step6.desc":{en:"Write a more balanced, fact-based thought.",pl:"Napisz bardziej zrównoważonÄ
myÅl, opartÄ
na faktach."},"fvf.step6.placeholder":{en:"e.g. While I'm new to board presentations, my expertise is why I was selectedâ¦",pl:"np. To dla mnie nowy format, ale wybrali mnie wÅaÅnie za moje kompetencjeâ¦"},"fvf.next":{en:"Next",pl:"Dalej"},"fvf.back":{en:"Back",pl:"Wstecz"},"fvf.complete":{en:"Finish protocol",pl:"ZakoÅcz protokóÅ"},"fvf.comparison":{en:"Your cognitive reframe",pl:"Twoje przeformuÅowanie"},"fvf.story":{en:"The story (feeling)",pl:"Historia (odczucie)"},"fvf.facts":{en:"The facts (evidence)",pl:"Fakty (dowody)"},"fvf.done.title":{en:"Protocol complete",pl:"ProtokóŠukoÅczony"},"fvf.done.desc":{en:"You separated fact from feeling. That's the foundation of cognitive resilience.",pl:"OddzieliÅaÅ/eÅ fakty od odczuÄ. To fundament odpornoÅci poznawczej."},"fvf.done.cta":{en:"Back to library",pl:"WrÃ³Ä do biblioteki"},"fvf.step":{en:"Step",pl:"Krok"},"fvf.of":{en:"of",pl:"z"},"fvf.export":{en:"Download PDF report",pl:"Pobierz raport PDF"}},kt={en:{cloud:["Completion status and timestamp","Protocol type"],session:["Your situation description","Automatic thoughts and reframe","Evidence lists","Emotion intensity rating"]},pl:{cloud:["Status ukoÅczenia i data","Typ protokoÅu"],session:["Opis sytuacji","Pierwsza myÅl i przeformuÅowanie","Listy dowodów","Ocena siÅy emocji"]}},Nt=({onComplete:o})=>{const{lang:a}=V(),{toast:s}=Y(),t=u=>{var h;return((h=vt[u])==null?void 0:h[a])??u},[i,c]=f.useState(0),[n,r]=f.useState({situation:"",thought:"",intensity:5,evidenceFor:"",evidenceAgainst:"",reframe:""}),[d,p]=f.useState("form"),g=[{key:"situation",field:"situation"},{key:"thought",field:"thought"},{key:"intensity",field:"intensity"},{key:"evidenceFor",field:"evidenceFor"},{key:"evidenceAgainst",field:"evidenceAgainst"},{key:"reframe",field:"reframe"}],m=()=>{const u=g[i];return u.field==="intensity"?!0:n[u.field].trim().length>0},x=()=>{i<g.length-1?c(i+1):p("comparison")},y=()=>{const u=JSON.parse(localStorage.getItem("lumina-protocol-entries")||"[]");u.unshift({protocol_id:"fact-vs-feeling",entry_data:n,created_at:new Date().toISOString()}),localStorage.setItem("lumina-protocol-entries",JSON.stringify(u)),q(),s({title:t("fvf.done.title")}),p("done")},b=()=>
16{U({exerciseTitle:t("fvf.title"),exerciseId:"fact-vs-feeling",lang:a,meta:{[a==="pl"?"SiÅa emocji":"Emotion intensity"]:`${n.intensity}/10`},sections:[{heading:t("fvf.step1.title"),body:n.situation},{heading:t("fvf.step2.title"),body:n.thought},{heading:t("fvf.step4.title"),body:n.evidenceFor},{heading:t("fvf.step5.title"),body:n.evidenceAgainst},{heading:t("fvf.step6.title"),body:n.reframe}]})};if(d==="done")return e.jsxs(w.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center text-center py-12",children:[e.jsx(w.div,{initial:{scale:0},animate:{scale:[0,1.3,1]},transition:{duration:.6},className:"p-4 rounded-2xl bg-primary/10 mb-6",children:e.jsx(Be,{className:"h-10 w-10 text-accent"})}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-bold gradient-text mb-3",children:t("fvf.done.title")}),e.jsx("p",{className:"text-muted-foreground max-w-md mb-6",children:t("fvf.done.desc")}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs(z,{onClick:b,variant:"outline",className:"gap-2 border-accent/40 text-accent hover:bg-accent/10 hover:text-accent",children:[e.jsx(G,{className:"h-4 w-4"}),t("fvf.export")]}),e.jsx(z,{onClick:o,className:"gradient-primary text-primary-foreground font-semibold glow-primary",children:t("fvf.done.cta")})]})]});if(d==="comparison")return e.jsxs(w.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-3xl mx-auto",children:[e.jsx("h2",{className:"font-heading text-2xl font-bold gradient-text text-center mb-8",children:t("fvf.comparison")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-8",children:[e.jsx(I,{className:"glass-card border-accent/30",children:e.jsxs(A,{className:"pt-6",children:[e.jsx("p",{className:"text-xs font-semibold text-accent uppercase tracking-wider mb-3",children:t("fvf.story")}),e.jsxs("p",{className:"text-sm text-foreground/80 mb-3 italic",children:['"',n.thought,'"']}),e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-2 flex-1 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:"h-full bg-accent rounded-full",style:{width:`${n.intensity*10}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-accent",children:[n.intensity,"/10"]})]}),e.jsx("p",{className:"text-xs text-foreground/60",children:n.evidenceFor})]})}),e.jsx(I,{className:"glass-card border-primary/30",children:e.jsxs(A,{className:"pt-6",children:[e.jsx("p",{className:"text-xs font-semibold text-primary uppercase tracking-wider mb-3",children:t("fvf.facts")}),e.jsxs("p",{className:"text-sm text-foreground/80 mb-3",children:['"',n.reframe,'"']}),e.jsx("p",{className:"text-xs text-foreground/60",children:n.evidenceAgainst})]})})]}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(z,{onClick:y,size:"lg",className:"gradient-primary text-primary-foreground font-semibold gap-2 glow-primary",children:[e.jsx(fe,{className:"h-4 w-4"}),t("fvf.complete")]})})]});const l=i+1;return e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsx(J,{items:kt[a],className:"mb-5"}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-6",children:[e.jsx("span",{className:"font-heading font-bold text-foreground",children:t("fvf.title")}),e.jsxs("span",{children:[t("fvf.step")," ",l," ",t("fvf.of")," 6"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted mb-8 overflow-hidden",children:e.jsx(w.div,{className:"h-full bg-primary rounded-full",initial:!1,animate:{width:`${l/6*100}%`},transition:{duration:.3}})}),e.jsx(F,{mode:"wait",children:e.jsxs(w.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.25},children:[e.jsx("h3",{className:"font-heading text-xl sm:text-2xl font-bold text-foreground mb-2",children:t(`fvf.step${l}.title`)}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:t(`fvf.step${l}.desc`)}),i===2?e.jsxs("div",{className:"space-y-4",children:[e.jsx(re,{value:[n.intensity],onValueChange:([u])=>r({...n,intensity:u}),min:1,max:10,step:1,className:"w-full"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:a==="en"?"Mild":"Åagodna"}),e.jsx("span",{className:"font-heading font-bold text-2xl text-primary",children:n.intensity}),e.jsx("span",{children:a==="en"?"Overwhelming":"PrzytÅaczajÄ
ca"})]})]}):e.jsx(he,{value:n[g[i].field],onChange:u=>r({...n,[g[i].field]:u.target.value}),placeholder:t(`fvf.step${l}.placeholder`),className:"min-h-[140px] bg-background/50 border-border/60 resize-none focus:border-primary/40"})]},i)}),e.jsxs("div",{className:"flex justify-between mt-8",children:[e.jsxs(z,{variant:"ghost",onClick:()=>c(i-1),disabled:i===0,className:"gap-2 text-muted-foreground",children:[e.jsx(H,{className:"h-4 w-4"}),t("fvf.back")]}),e.jsxs(z,{onClick:x,disabled:!m(),className:"gap-2 gradient-primary text-primary-foreground font-semibold glow-primary",children:[i===g.length-1?t("fvf.complete"):t("fvf.next"),e.jsx(Z,{className:"h-4 w-4"})]})]})]})}
16,zt={en:["Share the win with a friend","Take a 15-min guilt-free break","Write it in your Growth Log","Treat yourself to something small","Say 'I earned this' out loud"],pl:["Podziel siÄ sukcesem z kimÅ bliskim","Zrób sobie 15 minut przerwy bez wyrzutów","Wpisz to do dziennika rozwoju","Zrób sobie drobnÄ
przyjemnoÅÄ","Powiedz na gÅos: zasÅużyÅam/em na to"]},St={"sa.title":{en:"Success Review",pl:"PrzeglÄ
d sukcesu"},"sa.step1.title":{en:"Pick a recent win",pl:"Wybierz Åwieży sukces"},"sa.step1.desc":{en:"Think of a professional achievement from the last 30 days â big or small.",pl:"PomyÅl o zawodowym osiÄ
gniÄciu z ostatnich 30 dni â wiÄkszym lub mniejszym."},"sa.step1.placeholder":{en:"e.g. Successfully led a cross-functional team meetingâ¦",pl:"np. PoprowadziÅam/em spotkanie zespoÅu miÄdzyfunkcyjnegoâ¦"},"sa.step2.title":{en:"List the skills you used",pl:"Wypisz, czego użyÅaÅ/eÅ"},"sa.step2.desc":{en:"What competencies, knowledge, or soft skills made this possible?",pl:"Jakie kompetencje, wiedza lub umiejÄtnoÅci miÄkkie to umożliwiÅy?"},"sa.step2.placeholder":{en:"e.g. Strategic thinking, stakeholder communication, time managementâ¦",pl:"np. MyÅlenie strategiczne, komunikacja z interesariuszami, zarzÄ
dzanie czasemâ¦"},"sa.step3.title":{en:"Spot the self-doubt thoughts",pl:"WychwyÄ myÅli wÄ
tpliwoÅci"},"sa.step3.desc":{en:"What imposter thoughts tried to minimize this win?",pl:"Jakie myÅli âoszustaâ próbowaÅy umniejszyÄ to osiÄ
gniÄcie?"},"sa.step3.placeholder":{en:"e.g. Anyone could have done that, I just got lucky with the timingâ¦",pl:"np. Każdy by tak potrafiÅ, miaÅam/em po prostu szczÄÅcie z terminemâ¦"},"sa.step4.title":{en:"Write a fairer interpretation",pl:"Napisz uczciwszÄ
interpretacjÄ"},"sa.step4.desc":{en:"Rewrite the story. What would your mentor or best colleague say?",pl:"Przepisz tÄ historiÄ. Co powiedziaÅaby/by Twoja mentorka lub najlepszy wspóÅpracownik?"},"sa.step4.placeholder":{en:"e.g. I was chosen because of my track record. My preparation and expertise drove the outcomeâ¦",pl:"np. Wybrali mnie za moje dotychczasowe wyniki. To moje przygotowanie i wiedza daÅy efektâ¦"},"sa.step5.title":{en:"Choose how to celebrate",pl:"Wybierz, jak to uczciÄ"},"sa.step5.desc":{en:"You earned this. Pick one small way to honor your success today.",pl:"ZasÅużyÅaÅ/eÅ na to. Wybierz jeden maÅy sposób, by to dziÅ uczciÄ."},"sa.next":{en:"Next",pl:"Dalej"},"sa.back":{en:"Back",pl:"Wstecz"},"sa.complete":{en:"Finish review",pl:"ZakoÅcz przeglÄ
d"},"sa.done.title":{en:"Review complete",pl:"PrzeglÄ
d gotowy"},"sa.done.desc":{en:"You just owned your success step by step. This is attribution retraining in action â the neural pathway between effort and outcome.",pl:"Krok po kroku uznaÅaÅ/eÅ swój sukces. To trening reatrybucji w praktyce â budowanie poÅÄ
czenia miÄdzy wysiÅkiem a efektem."},"sa.done.cta":{en:"Back to library",pl:"WrÃ³Ä do biblioteki"},"sa.step":{en:"Step",pl:"Krok"},"sa.of":{en:"of",pl:"z"},"sa.export":{en:"Download PDF report",pl:"Pobierz raport PDF"}},Ct={en:{cloud:["Completion status and timestamp","Protocol type"],session:["The success you described","Skills used","Self-doubt thoughts","Fairer interpretation","Chosen celebration"]},pl:{cloud:["Status ukoÅczenia i data","Typ protokoÅu"],session:["Opisany sukces","Wykorzystane kompetencje","MyÅli wÄ
tpliwoÅci","Uczciwsza interpretacja","Wybrana celebracja"]}},Pt=({onComplete:o})=>{const{lang:a}=V(),{toast:s}=Y(),t=l=>{var u;return((u=St[l])==null?void 0:u[a])??l},[i,c]=f.useState(0),[n,r]=f.useState({success:"",skills:"",doubts:"",reinterpretation:"",celebration:""}),[d,p]=f.useState("form"),g=["success","skills","doubts","reinterpretation","celebration"],m=()=>i===4?n.celebration.length>0:n[g[i]].trim().length>0,x=()=>{if(i<4)c(i+1);else{const l=JSON.parse(localStorage.getItem("lumina-protocol-entries")||"[]");l.unshift({protocol_id:"success-audit",entry_data:n,created_at:new Date().toISOString()}),localStorage.setItem("lumina-protocol-entries",JSON.stringify(l)),q(),s({title:t("sa.done.title")}),p("done")}},y=()=>
16{U({exerciseTitle:t("sa.title"),exerciseId:"success-audit",lang:a,sections:[{heading:t("sa.step1.title"),body:n.success},{heading:t("sa.step2.title"),body:n.skills},{heading:t("sa.step3.title"),body:n.doubts},{heading:t("sa.step4.title"),body:n.reinterpretation},{heading:t("sa.step5.title"),body:n.celebration}]})};if(d==="done")return e.jsxs(w.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center text-center py-12",children:[e.jsx(w.div,{initial:{scale:0},animate:{scale:[0,1.3,1]},transition:{duration:.6},className:"p-4 rounded-2xl bg-accent/10 mb-6",children:e.jsx(st,{className:"h-10 w-10 text-accent"})}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-bold gradient-text mb-3",children:t("sa.done.title")}),e.jsx("p",{className:"text-muted-foreground max-w-md mb-4",children:t("sa.done.desc")}),e.jsxs("div",{className:"glass rounded-xl p-4 mb-6 border-accent/20",children:[e.jsx("p",{className:"text-xs font-semibold text-accent uppercase tracking-wider mb-1",children:a==="en"?"Your celebration":"Twoja celebracja"}),e.jsxs("p",{className:"text-sm text-foreground/90 flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-accent"}),n.celebration]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs(z,{onClick:y,variant:"outline",className:"gap-2 border-accent/40 text-accent hover:bg-accent/10 hover:text-accent",children:[e.jsx(G,{className:"h-4 w-4"}),t("sa.export")]}),e.jsx(z,{onClick:o,className:"gradient-primary text-primary-foreground font-semibold glow-primary",children:t("sa.done.cta")})]})]});const b=i+1;return e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsx(J,{items:Ct[a],className:"mb-5"}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-6",children:[e.jsx("span",{className:"font-heading font-bold text-foreground",children:t("sa.title")}),e.jsxs("span",{children:[t("sa.step")," ",b," ",t("sa.of")," 5"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted mb-8 overflow-hidden",children:e.jsx(w.div,{className:"h-full bg-accent rounded-full",initial:!1,animate:{width:`${b/5*100}%`},transition:{duration:.3}})}),e.jsx(F,{mode:"wait",children:e.jsxs(w.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.25},children:[e.jsx("h3",{className:"font-heading text-xl sm:text-2xl font-bold text-foreground mb-2",children:t(`sa.step${b}.title`)}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:t(`sa.step${b}.desc`)}),i===4?e.jsx("div",{className:"space-y-3",children:zt[a].map(l=>e.jsx(w.button,{whileHover:{scale:1.01},whileTap:{scale:.99},onClick:()=>r({...n,celebration:l}),className:`w-full text-left p-4 rounded-xl border transition-all duration-200 ${n.celebration===l?"border-accent bg-accent/10 shadow-md shadow-accent/10":"border-border bg-card hover:border-accent/40 hover:bg-accent/5"}`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pe,{className:`h-5 w-5 shrink-0 ${n.celebration===l?"text-accent":"text-muted-foreground"}`}),e.jsx("span",{className:`font-medium ${n.celebration===l?"text-foreground":"text-foreground/80"}`,children:l})]})},l))}):e.jsx(he,{value:n[g[i]],onChange:l=>r({...n,[g[i]]:l.target.value}),placeholder:t(`sa.step${b}.placeholder`),className:"min-h-[140px] bg-background/50 border-border/60 resize-none focus:border-primary/40"})]},i)}),e.jsxs("div",{className:"flex justify-between mt-8",children:[e.jsxs(z,{variant:"ghost",onClick:()=>c(i-1),disabled:i===0,className:"gap-2 text-muted-foreground",children:[e.jsx(H,{className:"h-4 w-4"}),t("sa.back")]}),e.jsxs(z,{onClick:x,disabled:!m(),className:"gap-2 gradient-primary text-primary-foreground font-semibold glow-primary",children:[t(i===4?"sa.complete":"sa.next"),e.jsx(Z,{className:"h-4 w-4"})]})]})]})},Dt={"ds.title":{en:"Spot the Distortion",pl:"WychwyÄ znieksztaÅcenie"},"ds.instruction":{en:"Label the cognitive distortion in this thought:",pl:"Nazwij znieksztaÅcenie poznawcze w tej myÅli:"},"ds.correct":{en:"Correct!",pl:"Trafione!"},"ds.incorrect":{en:"Not quite â try again.",pl:"Nie do koÅca â spróbuj jeszcze raz."},"ds.reframe":{en:"Growth reframe",pl:"Zdrowsze ujÄcie"},"ds.next":{en:"Next card",pl:"NastÄpna karta"}
16,"ds.card":{en:"Card",pl:"Karta"},"ds.of":{en:"of",pl:"z"},"ds.done.title":{en:"Training complete",pl:"Trening ukoÅczony"},"ds.done.desc":{en:"You sharpened your cognitive defusion skills. The more you practice spotting distortions, the faster you'll catch them in real life.",pl:"WyostrzyÅaÅ/eÅ umiejÄtnoÅÄ defuzji poznawczej. Im czÄÅciej Äwiczysz wychwytywanie znieksztaÅceÅ, tym szybciej Åapiesz je w realnym życiu."},"ds.done.score":{en:"Accuracy",pl:"TrafnoÅÄ"},"ds.done.cta":{en:"Back to library",pl:"WrÃ³Ä do biblioteki"},"ds.export":{en:"Download PDF report",pl:"Pobierz raport PDF"}},Tt={en:{cloud:["Completion status, timestamp and accuracy score"],session:["Which cards you saw","Number of attempts per card"]},pl:{cloud:["Status ukoÅczenia, data i wynik trafnoÅci"],session:["Karty, które zobaczyÅaÅ/eÅ","Liczba prób na każdÄ
kartÄ"]}},Rt=({onComplete:o})=>{const{lang:a}=V();Y();const s=v=>{var S;return((S=Dt[v])==null?void 0:S[a])??v},[t,i]=f.useState(0),[c,n]=f.useState(null),[r,d]=f.useState(!1),[p,g]=f.useState(0),[m,x]=f.useState("game"),[y,b]=f.useState(!1),l=te[t],u=c===(l==null?void 0:l.correctDistortion),h=te.length,N=Object.keys(ee),k=v=>{r||(n(v),v===l.correctDistortion?(d(!0),g(S=>S+1)):(b(!0),setTimeout(()=>b(!1),500)))},j=()=>
16{if(t<h-1)i(t+1),n(null),d(!1);else{const v=JSON.parse(localStorage.getItem("lumina-protocol-entries")||"[]");v.unshift({protocol_id:"distortion-spotting",entry_data:{correct:p,total:h,accuracy:Math.round(p/h*100)},created_at:new Date().toISOString()}),localStorage.setItem("lumina-protocol-entries",JSON.stringify(v)),q(),x("done")}},D=()=>{const v=Math.round(p/h*100);U({exerciseTitle:s("ds.title"),exerciseId:"distortion-spotting",lang:a,meta:{[a==="pl"?"TrafnoÅÄ":"Accuracy"]:`${v}%`,[a==="pl"?"Trafione":"Correct"]:`${p}/${h}`},sections:te.map((S,M)=>({heading:`${a==="pl"?"Karta":"Card"} ${M+1}: ${ee[S.correctDistortion][a]}`,body:`"${S.thought[a]}" 17 18Reframe: ${S.reframe[a]}`}))})};if(m==="done"){const v=Math.round(p/h*100);return e.jsxs(w.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center text-center py-12",children:[e.jsx(w.div,{initial:{scale:0},animate:{scale:[0,1.3,1]},transition:{duration:.6},className:"p-4 rounded-2xl bg-accent/10 mb-6",children:e.jsx(et,{className:"h-10 w-10 text-accent"})}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-bold gradient-text mb-3",children:s("ds.done.title")}),e.jsxs("div",{className:"glass rounded-xl p-4 mb-4 border-primary/20",children:[e.jsx("p",{className:"text-xs font-semibold text-primary uppercase tracking-wider mb-1",children:s("ds.done.score")}),e.jsxs("p",{className:"font-heading text-3xl font-bold text-primary",children:[v,"%"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[p,"/",h]})]}),e.jsx("p",{className:"text-muted-foreground max-w-md mb-6",children:s("ds.done.desc")}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs(z,{onClick:D,variant:"outline",className:"gap-2 border-accent/40 text-accent hover:bg-accent/10 hover:text-accent",children:[e.jsx(G,{className:"h-4 w-4"}),s("ds.export")]}),e.jsx(z,{onClick:o,className:"gradient-primary text-primary-foreground font-semibold glow-primary",children:s("ds.done.cta")})]})]})}return e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsx(J,{items:Tt[a],className:"mb-5"}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-6",children:[e.jsx("span",{className:"font-heading font-bold text-foreground",children:s("ds.title")}),e.jsxs("span",{children:[s("ds.card")," ",t+1," ",s("ds.of")," ",h]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted mb-8 overflow-hidden",children:e.jsx(w.div,{className:"h-full bg-accent rounded-full",initial:!1,animate:{width:`${(t+1)/h*100}
18%`},transition:{duration:.3}})}),e.jsx(F,{mode:"wait",children:e.jsxs(w.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.25},children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:s("ds.instruction")}),e.jsx(w.div,{animate:y?{x:[0,-8,8,-8,8,0]}:{},transition:{duration:.4},children:e.jsx(I,{className:"glass-card border-accent/30 mb-6",children:e.jsx(A,{className:"pt-6",children:e.jsxs("p",{className:"text-lg font-medium text-foreground leading-relaxed italic",children:['"',l.thought[a],'"']})})})}),e.jsx("div",{className:"grid grid-cols-2 gap-3 mb-6",children:N.map(v=>{const S=c===v,M=r&&v===l.correctDistortion;return e.jsx(w.button,{whileHover:r?{}:{scale:1.02},whileTap:r?{}:{scale:.98},onClick:()=>k(v),disabled:r,className:`p-3 rounded-xl border text-sm font-medium transition-all duration-200 ${M?"border-green-500 bg-green-500/10 text-green-400":S&&!u?"border-red-500/50 bg-red-500/5 text-red-400":"border-border bg-card hover:border-primary/40 hover:bg-primary/5 text-foreground/80"}`,children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[M&&e.jsx(fe,{className:"h-4 w-4"}),S&&!u&&r&&e.jsx(We,{className:"h-4 w-4"}),ee[v][a]]})},v)})}),e.jsx(F,{children:r&&e.jsxs(w.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:[e.jsx(I,{className:"glass-card border-primary/30 mb-6",children:e.jsxs(A,{className:"pt-6",children:[e.jsx("p",{className:"text-xs font-semibold text-primary uppercase tracking-wider mb-2",children:s("ds.reframe")}),e.jsx("p",{className:"text-sm text-foreground/90 leading-relaxed",children:l.reframe[a]})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(z,{onClick:j,className:"gap-2 gradient-primary text-primary-foreground font-semibold glow-primary",children:[t<h-1?s("ds.next"):s("ds.done.cta"),e.jsx(Z,{className:"h-4 w-4"})]})})]})})]},t)})]})},P=[{id:"psych-safety",question:{en:"Is there clear psychological safety in your team?",pl:"Czy w Twoim zespole jest wyraźne poczucie bezpieczeÅstwa psychologicznego?"},lowLabel:{en:"Not at all",pl:"Wcale"},highLabel:{en:"Absolutely",pl:"Zdecydowanie"}},{id:"expectations",question:{en:"Are expectations transparent, or are they 'moving targets'?",pl:"Czy oczekiwania sÄ
przejrzyste, czy sÄ
'ruchomymi celami'?"},lowLabel:{en:"Constantly shifting",pl:"CiÄ
gle siÄ zmieniajÄ
"},highLabel:{en:"Crystal clear",pl:"CaÅkowicie jasne"}},{id:"representation",question:{en:"Do you see people like you in leadership positions?",pl:"Czy widzisz osoby podobne do Ciebie na stanowiskach kierowniczych?"},lowLabel:{en:"Never",pl:"Nigdy"},highLabel:{en:"Regularly",pl:"Regularnie"}},{id:"workload",question:{en:"Is the workload sustainable, or designed for burnout?",pl:"Czy obciÄ
żenie pracÄ
jest zrównoważone, czy prowadzi do wypalenia?"},lowLabel:{en:"Burnout culture",pl:"Kultura wypalenia"},highLabel:{en:"Sustainable",pl:"Zrównoważone"}},{id:"feedback",question:{en:"Do you receive constructive feedback, or only criticism?",pl:"Czy otrzymujesz konstruktywny feedback, czy tylko krytykÄ?"},lowLabel:{en:"Only criticism",pl:"Tylko krytyka"},highLabel:{en:"Balanced feedback",pl:"Zrównoważony feedback"}}],It={"ea.title":{en:"Environment Check",pl:"PrzeglÄ
d otoczenia"},"ea.subtitle":{en:"Is it you â or is it the room?",pl:"To Ty â czy może to otoczenie?"},"ea.instruction":{en:"Rate each part of your current work environment honestly.",pl:"OceÅ szczerze każdy element swojego obecnego Årodowiska pracy."},"ea.question":{en:"Question",pl:"Pytanie"},"ea.of":{en:"of",pl:"z"},"ea.next":{en:"Next",pl:"Dalej"},"ea.complete":{en:"See report",pl:"Pokaż raport"},"ea.report.title":{en:"Systemic report",pl:"Raport systemowy"},"ea.report.healthy":{en:"Your environment score",pl:"Wynik Twojego Årodowiska"},"ea.report.toxic.title":{en:"Environmental alert",pl:"SygnaÅ ostrzegawczy"},"ea.report.toxic.desc":{en:"Your feelings are a rational response to an irrational environment. Imposter syndrome is often a systemic response, not an individual deficit. Focus on boundaries, not just confidence.",pl:"Twoje odczucia to racjonalna reakcja na nieracjonalne otoczenie. Syndrom oszusta to czÄsto odpowied
18ź na system, nie indywidualny brak. Skup siÄ na granicach, nie tylko na pewnoÅci siebie."},"ea.report.mixed.title":{en:"Mixed environment",pl:"Mieszane Årodowisko"},"ea.report.mixed.desc":{en:"Your environment has some strong areas and some concerning patterns. Look at which factors specifically amplify your self-doubt â targeted change can shift the balance.",pl:"Masz kilka mocnych stron i kilka niepokojÄ cych wzorców. Zobacz, które konkretnie czynniki wzmacniajÄ wÄ tpliwoÅci â celowa zmiana może przechyliÄ szalÄ."},"ea.report.healthy.title":{en:"Supportive environment",pl:"WspierajÄ ce otoczenie"},"ea.report.healthy.desc":{en:"Your workplace looks supportive. Your imposter feelings are more likely driven by internal patterns than systemic issues. The protocol library has tools to work with that directly.",pl:"Twoje miejsce pracy wyglÄ da na wspierajÄ ce. Odczucia oszusta najpewniej napÄdzajÄ wewnÄtrzne wzorce, nie system. Biblioteka protokoÅów ma narzÄdzia, by siÄ tym zajÄ Ä wprost."},"ea.report.done":{en:"Back to library",pl:"WrÃ³Ä do biblioteki"},"ea.report.area":{en:"By area",pl:"Po obszarach"},"ea.export":{en:"Download PDF report",pl:"Pobierz raport PDF"}},At={en:{cloud:["Completion status, timestamp and overall environment score"],session:["Your individual ratings (1-10) per area","Your area-level breakdown"]},pl:{cloud:["Status ukoÅczenia, data i ogólny wynik Årodowiska"],session:["Twoje oceny (1-10) w każdym obszarze","Rozbicie wyniku po obszarach"]}},ue={"psych-safety":{en:"Psychological safety",pl:"BezpieczeÅstwo psychologiczne"},expectations:{en:"Clarity of expectations",pl:"JasnoÅÄ oczekiwaÅ"},representation:{en:"Representation",pl:"Reprezentacja"},workload:{en:"Workload balance",pl:"Równowaga obciÄ Å¼enia"},feedback:{en:"Feedback quality",pl:"JakoÅÄ feedbacku"}},Mt=({onComplete:o})=>{const{lang:a}=V();Y();const s=x=>{var y;return((y=It[x])==null?void 0:y[a])??x},[t,i]=f.useState(0),[c,n]=f.useState({}),[r,d]=f.useState("form"),p=P[t],g=c[p==null?void 0:p.id]??5,m=()=>{const x={...c,[p.id]:g};if(n(x),t<P.length-1)i(t+1);else{const y=JSON.parse(localStorage.getItem("lumina-protocol-entries")||"[]");y.unshift({protocol_id:"environment-audit",entry_data:x,created_at:new Date().toISOString()}),localStorage.setItem("lumina-protocol-entries",JSON.stringify(y)),d("report")}};if(r==="report"){const x=Object.values(c).reduce((N,k)=>N+k,0),y=P.length*10,b=Math.round(x/y*100);let l,u,h;return b<40?(l="toxic",u=tt,h="text-red-400"):b<70?(l="mixed",u=Le,h="text-accent"):(l="healthy",u=at,h="text-green-400"),q(),e.jsxs(w.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(w.div,{initial:{scale:0},animate:{scale:[0,1.3,1]},transition:{duration:.6},className:"inline-flex p-4 rounded-2xl bg-primary/10 mb-4",children:e.jsx(u,{className:`h-10 w-10 ${h}`})}),e.jsx("h2",{className:"font-heading text-2xl sm:text-3xl font-bold gradient-text mb-2",children:s("ea.report.title")}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 text-primary font-heading font-bold",children:[s("ea.report.healthy"),": ",b,"%"]})]}),e.jsx(I,{className:`glass-card mb-6 ${l==="toxic"?"border-red-500/30":l==="mixed"?"border-accent/30":"border-green-500/30"}`,children:e.jsxs(A,{className:"pt-6",children:[e.jsx("h3",{className:`font-heading text-lg font-bold mb-2 ${h}`,children:s(`ea.report.${l}.title`)}),e.jsx("p",{className:"text-foreground/80 leading-relaxed",children:s(`ea.report.${l}.desc`)})]})}),e.jsx(I,{className:"glass-card border-primary/10 mb-8",children:e.jsxs(A,{className:"pt-6",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-4",children:s("ea.report.area")}),e.jsx("div",{className:"space-y-3",children:P.map(N=>{const k=c[N.id]??5,j=k*10;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[e.jsx("span",{className:"text-foreground/70",children:ue[N.id][a]}),e.jsxs("span",{className:`font-bold ${j<40?"text-red-400":j<70?"text-accent":"text-green-400"}`,children:[k,"/10"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx(w.div,{initial:{width:0},animate:{width:`${j}%`},transition:{duration:.5,delay:.1},className:`h-full rounded-full ${j<40?"bg-red-400":j<70?"bg-accent":"bg-green-400"}`})})]},N.id)})})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsxs(z,{onClick:()=>U({exerciseTitle:s("ea.title"),exerciseId:"environment-audit",lang:a,meta:{[a==="pl"?"Wynik Årodowiska":"Environment score"]:`${b}%`,Tier:s(`ea.report.${l}.title`)},sections:P.map(N=>({heading:ue[N.id][a],body:`${N.question[a]} 19 20${a==="pl"?"Ocena":"Rating"}: ${c[N.id]??5}/10`}))}),variant:"outline",className:"gap-2 border-accent/40 text-accent hover:bg-accent/10 hover:text-accent",children:[e.jsx(G,{className:"h-4 w-4"}),s("ea.export")]}),e.jsx(z,{onClick:o,className:"gradient-primary text-primary-foreground font-semibold glow-primary",children:s("ea.report.done")})]})]})}return e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsx(J,{items:At[a],className:"mb-5"}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-6",children:[e.jsx("span",{className:"font-heading font-bold text-foreground",children:s("ea.title")}),e.jsxs("span",{children:[s("ea.question")," ",t+1," ",s("ea.of")," ",P.length]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted mb-8 overflow-hidden",children:e.jsx(w.div,{className:"h-full bg-primary rounded-full",initial:!1,animate:{width:`${(t+1)/P.length*100}%`},transition:{duration:.3}})}),e.jsxs(w.div,{initial:{opacity:0,x:40}
20,animate:{opacity:1,x:0},transition:{duration:.25},children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:s("ea.instruction")}),e.jsx("h3",{className:"font-heading text-xl sm:text-2xl font-bold text-foreground mb-8",children:p.question[a]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(re,{value:[g],onValueChange:([x])=>n({...c,[p.id]:x}),min:1,max:10,step:1,className:"w-full"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:p.lowLabel[a]}),e.jsx("span",{className:"font-heading font-bold text-2xl text-primary",children:g}),e.jsx("span",{children:p.highLabel[a]})]})]})]},t),e.jsx("div",{className:"flex justify-end mt-8",children:e.jsxs(z,{onClick:m,className:"gap-2 gradient-primary text-primary-foreground font-semibold glow-primary",children:[t===P.length-1?s("ea.complete"):s("ea.next"),e.jsx(Z,{className:"h-4 w-4"})]})})]})},_t={"proto.title":{en:"Protocol Library",pl:"Biblioteka protokoÅów"},"proto.subtitle":{en:"Structured exercises for high-performing professionals.",pl:"UporzÄ
dkowane Äwiczenia dla osób, które naprawdÄ chcÄ
siÄ rozwijaÄ."},"proto.back":{en:"Back to the Lab",pl:"WrÃ³Ä do Lab"},"proto.start":{en:"Start protocol",pl:"Zacznij protokóÅ"},"proto.research":{en:"The science behind it",pl:"Co mówi nauka"},"proto.time":{en:"Estimated time",pl:"Szacowany czas"}},Xt=()=>{const{lang:o}=V(),a=Oe(),s=d=>{var p;return((p=_t[d])==null?void 0:p[o])??d},[t,i]=f.useState(null),[c,n]=f.useState(null),r=de.find(d=>d.id===c);return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(Fe,{}),e.jsxs("div",{className:"container mx-auto px-4 pt-24 pb-16",children:[e.jsxs(w.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-10",children:[e.jsxs(z,{variant:"ghost",onClick:()=>a("/dashboard"),className:"gap-2 text-muted-foreground mb-4",children:[e.jsx(H,{className:"h-4 w-4"}),s("proto.back")]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-xl bg-primary/10",children:e.jsx(Ke,{className:"h-6 w-6 text-primary"})}),e.jsx("h1",{className:"font-heading text-3xl sm:text-4xl font-bold gradient-text",children:s("proto.title")})]}),e.jsx("p",{className:"text-muted-foreground",children:s("proto.subtitle")})]}),e.jsx(F,{mode:"wait",children:t?e.jsxs(w.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},children:[e.jsxs(z,{variant:"ghost",onClick:()=>i(null),className:"gap-2 text-muted-foreground mb-6",children:[e.jsx(H,{className:"h-4 w-4"}),s("proto.title")]}),t==="fact-vs-feeling"&&e.jsx(Nt,{onComplete:()=>i(null)}),t==="success-audit"&&e.jsx(Pt,{onComplete:()=>i(null)}),t==="distortion-spotting"&&e.jsx(Rt,{onComplete:()=>i(null)}),t==="environment-audit"&&e.jsx(Mt,{onComplete:()=>i(null)})]},t):e.jsx(w.div,{initial:{opacity:0}
20,animate:{opacity:1},exit:{opacity:0},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:de.map((d,p)=>{const g=d.icon;return e.jsx(w.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:p*.1},children:e.jsxs(I,{className:"glass-card border-primary/20 h-full flex flex-col hover:border-primary/40 transition-colors group",children:[e.jsxs(Ve,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"p-2 rounded-xl bg-primary/10 group-hover:bg-primary/20 transition-colors",children:e.jsx(g,{className:"h-5 w-5 text-primary"})}),e.jsx("button",{onClick:()=>n(d.id),className:"p-1.5 rounded-lg hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:s("proto.research"),children:e.jsx(me,{className:"h-4 w-4"})})]}),e.jsx(He,{className:"text-lg",children:d.title[o]})]}),e.jsxs(A,{className:"flex flex-col flex-1",children:[e.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed mb-4 flex-1",children:d.description[o]}),e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold bg-accent/10 text-accent border border-accent/20",children:d.badge[o]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Ye,{className:"h-3 w-3"}),d.time]})]}),e.jsx(z,{onClick:()=>i(d.id),className:"w-full gradient-primary text-primary-foreground font-semibold glow-primary",children:s("proto.start")})]})]})},d.id)})},"grid")}),e.jsx(qe,{open:!!c,onOpenChange:()=>n(null),children:e.jsx(Ue,{className:"glass-card border-primary/20",children:e.jsxs(Ge,{children:[e.jsxs(Xe,{className:"flex items-center gap-2",children:[e.jsx(me,{className:"h-5 w-5 text-primary"}),s("proto.research")]}),e.jsx(Qe,{className:"text-foreground/80 leading-relaxed pt-2",children:r==null?void 0:r.researchNote[o]})]})})})]})]})};export{Xt as default};
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.