1import{b as _,r as a,j as e}from"./index-CyVfIjc_.js";const j="oklch(0.66 0.22 25)",f="#c9a882",x="#f5e6c8",G="oklch(0.14 0.012 264)",he="oklch(0.32 0.03 155 / 0.20)",V="blur(38px) saturate(190%)",xe="1px solid oklch(0.82 0.08 155 / 0.32)",pe="inset 0 1px 0 oklch(0.95 0.02 155 / 0.18), 0 30px 80px -30px oklch(0 0 0 / 0.5), 0 8px 24px -8px oklch(0 0 0 / 0.6)";function E({trialNumber:t,trialLabel:i,trialChinese:s,children:o}){return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-start px-4 py-12 relative overflow-hidden",style:{background:G},children:[e.jsx("div",{className:"absolute inset-0 -z-10 pointer-events-none",style:{background:`radial-gradient(ellipse at 50% 20%, oklch(0.66 0.22 25 / 0.10) 0%, transparent 60%), 2 radial-gradient(ellipse at 80% 90%, oklch(0.78 0.14 80 / 0.06) 0%, transparent 50%)`}}),[-360,-180,180,360].map((n,c)=>e.jsx("div",{className:"absolute top-0 bottom-0 w-px pointer-events-none",style:{left:`calc(50% + ${n}px)`,background:"linear-gradient(180deg, transparent, oklch(0.66 0.22 25 / 0.06), transparent)"}},c)),e.jsxs("div",{className:"w-full max-w-3xl mb-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"font-zh text-lg font-black flex items-center justify-center rounded-lg",style:{width:"40px",height:"40px",background:j,color:x,boxShadow:"0 0 20px oklch(0.66 0.22 25 / 0.5)"},children:t}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs tracking-[0.25em] uppercase font-semibold",style:{color:f},children:["Trial ",t," of 5 · ",s]}),e.jsx("h2",{className:"font-display text-xl font-bold",style:{color:x},children:i})]})]}),e.jsx("div",{className:"h-px w-full mt-4",style:{background:"oklch(0.28 0.014 264)"},children:e.jsx("div",{className:"h-full transition-all duration-700",style:{width:`${t/5*100}%`,background:"linear-gradient(90deg, oklch(0.66 0.22 25), oklch(0.78 0.14 80))"}})})]}),o]})}function A({children:t,className:i=""}){return e.jsx("div",{className:`relative overflow-hidden rounded-2xl p-6 md:p-8 ${i}`,style:{background:he,backdropFilter:V,WebkitBackdropFilter:V,border:xe,boxShadow:pe},children:e.jsx("div",{className:"relative",children:t})})}function z({onClick:t,disabled:i=!1,children:s,className:o=""}){return e.jsx("button",{onClick:t,disabled:i,className:`inline-flex items-center justify-center gap-2 rounded-xl px-8 py-3.5 text-sm font-bold tracking-wide transition-all duration-200 hover:scale-105 active:scale-95 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:scale-100 ${o}`,style:{background:i?"oklch(0.28 0.014 264)":j,color:x,boxShadow:i?"none":"0 0 24px oklch(0.66 0.22 25 / 0.4)",border:"1px solid oklch(0.78 0.14 80 / 0.25)"},children:s})}const I={å°ç·:{pinyin:"shà oye",meaning:"young master of the house; son of the boss",ytl:5},ä½ å¥½:{pinyin:"nÇhÇo",meaning:"hello; hi",ytl:1},å:{pinyin:"ma",meaning:"(question particle for yes/no questions)",ytl:1},å¾:{pinyin:"hÄn",meaning:"very; quite; awfully",ytl:1},好:{pinyin:"hÇo",meaning:"good; well; fine; all right",ytl:1},æ:{pinyin:"LÇ",meaning:"surname Li; plum",ytl:2},è:{pinyin:"lÇo",meaning:"old; aged; prefix for a person's surname",ytl:1},头:{pinyin:"tóu",meaning:"head; top; end; (a measure word for cattle)",ytl:2},ä½ :{pinyin:"nÇ",meaning:"you (informal)",ytl:1},å¢:{pinyin:"ne",meaning:"(sentence-final particle linking to prior context)",ytl:2},æ:{pinyin:"wÇ",meaning:"I; me; my",ytl:1},ä¹:{pinyin:"yÄ",meaning:"also; too; as well",ytl:1},è¿è¾¹:{pinyin:"zhèbiÄn",meaning:"this side; here; over here",ytl:3},请:{pinyin:"qÇng",meaning:"please (do sth); to invite; to request",ytl:1},谢谢:{pinyin:"xièxie",meaning:"to thank; thanks; thank you",ytl:1},ç·:{pinyin:"yé",meaning:"paternal grandfather; old man; lord (respectful)",ytl:3},å:{pinyin:"zÇ",meaning:"son; child; (diminutive suffix)",ytl:2},å®:{pinyin:"tÄ",meaning:"it (for non-human things)",ytl:1},å¼å§:{pinyin:"kÄishÇ",meaning:"to begin; to start; beginning",ytl:2},äº:{pinyin:"le",meaning:"(particle indicating completed action or change)",ytl:1}},C={1:"#b6b6c2",2:"#6bd089",3:"#6aa8ff",4:"#c084fc",5:"#f5c451",6:"#f59e3a",7:"#d94a3a"},H=[{id:"t1",hanzi:"å°ç·",top:4.85,left:29.25,width:6.5,height:2.25}
2,{id:"t2",hanzi:"ä½ å¥½",top:4.85,left:37,width:5.5,height:2.25},{id:"t3",hanzi:"å",top:4.85,left:42.5,width:3,height:2.25},{id:"t4",hanzi:"å¾",top:7.75,left:17.25,width:2.75,height:2.25},{id:"t5",hanzi:"好",top:7.75,left:20,width:2.75,height:2.25},{id:"t6",hanzi:"æ",top:7.75,left:25,width:2.75,height:2.25},{id:"t7",hanzi:"è",top:7.75,left:27.5,width:2.75,height:2.25},{id:"t8",hanzi:"头",top:7.75,left:30.75,width:2.75,height:2.25},{id:"t9",hanzi:"ä½ ",top:10.5,left:17.25,width:2.75,height:2.25},{id:"t10",hanzi:"å¢",top:10.5,left:20,width:2.75,height:2.25},{id:"t11",hanzi:"æ",top:4.5,left:76.5,width:2.5,height:2.25},{id:"t12",hanzi:"ä¹",top:4.5,left:79,width:2.5,height:2.25},{id:"t13",hanzi:"å¾",top:4.5,left:82,width:2.5,height:2.25},{id:"t14",hanzi:"好",top:4.5,left:84,width:2.5,height:2.25},{id:"t15",hanzi:"å°ç·",top:4.5,left:89.75,width:5,height:2.25},{id:"t16",hanzi:"è¿è¾¹",top:9,left:66.25,width:7,height:2.25},{id:"t17",hanzi:"请",top:9,left:73.5,width:2.9,height:2.25},{id:"t18",hanzi:"å°ç·",top:9,left:80.5,width:6,height:2.25},{id:"t19",hanzi:"谢谢",top:33,left:16,width:8,height:2.25},{id:"t20",hanzi:"æ",top:33,left:24.5,width:2.75,height:2.5},{id:"t21",hanzi:"è",top:33,left:28.7,width:2.75,height:2.25},{id:"t22",hanzi:"ç·",top:33,left:32.5,width:2.75,height:2.25},{id:"t23",hanzi:"å",top:33,left:36.5,width:2.75,height:2.25},{id:"t24",hanzi:"å®",top:36,left:58,width:10,height:10},{id:"t25",hanzi:"å¼å§",top:36,left:67.5,width:16,height:10},{id:"t26",hanzi:"äº",top:36,left:84,width:10,height:10}],J=Array.from(new Map(H.map(t=>[t.hanzi,{hanzi:t.hanzi,...I[t.hanzi]}])).values()).filter(t=>I[t.hanzi]);function ue(t){return[...t].sort(()=>Math.random()-.5).slice(0,Math.min(8,t.length))}function me(t,i){return[...i.filter(o=>o.hanzi!==t.hanzi).sort(()=>Math.random()-.5).slice(0,3).map(o=>o.meaning),t.meaning].sort(()=>Math.random()-.5)}const fe={å°ç·ä½ 好å:{pinyin:"Shà oye nÇ hÇo ma?",meaning:"Young master, how are you?"},å¾å¥½æè头:{pinyin:"HÄn hÇo, LÇ lÇotóu.",meaning:"Very well, Old Li."},ä½ å¢:{pinyin:"NÇ ne?",meaning:"And you? / What about you?"},å¾å¥½æèå¤´ä½ å¢:{pinyin:"HÄn hÇo, LÇ lÇotóu, nÇ ne?",meaning:"Very well, Old Li, and you?"},æä¹å¾å¥½:{pinyin:"WÇ yÄ hÄn hÇo.",meaning:"I am also doing well."},æä¹å¾å¥½å°ç·:{pinyin:"WÇ yÄ hÄn hÇo, shà oye.",meaning:"I am also well, young master."},è¿è¾¹è¯·:{pinyin:"ZhèbiÄn qÇng.",meaning:"This way, please."},è¿è¾¹è¯·å°ç·:{pinyin:"ZhèbiÄn qÇng, shà oye.",meaning:"This way please, young master."},谢谢æèç·å:{pinyin:"Xièxie LÇ lÇoyézi.",meaning:"Thank you, Elder Li."},æè头:{pinyin:"LÇ lÇotóu",meaning:"Old Li (informal, affectionate)"},å®å¼å§äº:{pinyin:"TÄ kÄishÇ le.",meaning:"It has begun."}},X=new Set(["å°ç·","ä½ å¥½","å","å¾","好","æ","è","头","ä½ ","å¢","æ","ä¹","è¿è¾¹","请","谢谢","ç·","å","å®","å¼å§","äº"]);let F=null;function ge(){F&&(F.pause(),F.currentTime=0,F=null)}function Z(t){return new Promise((i,s)=>{const o=new Audio(`/audio/${encodeURIComponent(t)}.mp3`);F=o,o.onended=()=>{F=null,i()},o.onerror=()=>{F=null,s()},o.play().catch(s)})}async function U(t){if(ge(),X.has(t))try{await Z(t);return}catch{}const i=X,s=[];let o=0;for(;o<t.length;){const n=t.slice(o,o+2),c=t.slice(o,o+1);n.length===2&&i.has(n)?(s.push(n),o+=2):(i.has(c)&&s.push(c),o+=1)}if(s.length>0){for(const n of s)try{await Z(n)}catch{}return}}const ee={flex:1,appearance:"none",cursor:"not-allowed",fontSize:12,fontWeight:600,padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",color:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",gap:4};function ye({data:t,savedWords:i,onSave:s,onRemove:o,onDismiss:n}){const c=a.useRef(null),[p,g]=a.useState({x:t.x,y:t.y});a.useEffect(()=>{if(!c.current)return;const{offsetWidth:d,offsetHeight:u}=c.current;let m=t.x,y=t.y+10;m+d>window.innerWidth-8&&(m=window.innerWidth-d-8),y+u>window.innerHeight-8&&(y=t.y-u-10),g({x:Math.max(8,m),y:Math.max(8,y)})},[t.x,t.y]);const w={position:"fixed",zIndex:99999,left:p.x,top:p.y,minWidth:240,maxWidth:340,background:"#16161d",color:"#f4efe6",border:"1px solid rgba(255,255,255,0.08)",borderRadius:10,padding:"12px 14px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:13,lineHeight:1.4,boxShadow:"0 14px 40px rgba(0,0,0,0.5)",pointerEvents:"auto"};
2if(t.type==="word"){const d=t.tokens[0],u=I[d.hanzi];if(!u)return null;const m=C[u.ytl],y=i.has(d.hanzi);return e.jsxs("div",{ref:c,onMouseDown:R=>R.stopPropagation(),style:w,children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("div",{style:{fontSize:22,fontWeight:700,color:m,letterSpacing:"0.02em"},children:d.hanzi}),e.jsx("button",{onClick:()=>U(d.hanzi),style:{appearance:"none",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",color:"#f4efe6",borderRadius:"50%",width:28,height:28,fontSize:14,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},title:"Play pronunciation",children:"ð"})]}),e.jsx("div",{style:{color:"#d94a3a",fontWeight:600,fontSize:13,marginTop:2},children:u.pinyin}),e.jsx("div",{style:{marginTop:6,color:"#cfcfd6",fontSize:13},children:u.meaning}),e.jsxs("div",{style:{display:"flex",gap:6,marginTop:10},children:[e.jsx("button",{onClick:()=>y?o(d.hanzi):s(d.hanzi),style:{flex:1,appearance:"none",cursor:"pointer",fontSize:12,fontWeight:600,padding:"6px 8px",borderRadius:6,background:y?"rgba(217,74,58,0.2)":"#d94a3a",border:"1px solid #d94a3a",color:"white"},children:y?"Saved â":"Save"}),e.jsxs("button",{disabled:!0,style:ee,title:"Available in the full extension",children:["ð ",e.jsx("span",{children:"Mark known"})]})]}),e.jsxs("div",{style:{marginTop:8,fontSize:11,color:"#8a8a96",display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{style:{display:"inline-block",padding:"1px 7px",borderRadius:999,fontSize:10,fontWeight:700,letterSpacing:"0.04em",border:`1px solid ${m}`,background:`color-mix(in srgb, ${m} 14%, transparent)`,color:m},children:["YTL ~",u.ytl]}),e.jsx("span",{children:"yohling demo"})]})]})}const k=t.tokens.map(d=>d.hanzi).join(""),b=fe[k];return e.jsxs("div",{ref:c,onMouseDown:d=>d.stopPropagation(),style:{...w,maxWidth:360},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("div",{style:{fontSize:20,fontWeight:700,letterSpacing:"0.02em",display:"flex",flexWrap:"wrap"},children:t.tokens.map((d,u)=>e.jsx("span",{style:{color:C[I[d.hanzi]?.ytl??1]},children:d.hanzi},u))}),e.jsx("button",{onClick:()=>U(k),style:{appearance:"none",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",color:"#f4efe6",borderRadius:"50%",width:28,height:28,fontSize:14,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"ð"})]}),e.jsx("div",{style:{margin:"6px 0 8px",paddingBottom:8,borderBottom:"1px solid rgba(255,255,255,0.1)"},children:b?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{color:"#d94a3a",fontWeight:600,fontSize:12,marginBottom:2},children:b.pinyin}),e.jsx("div",{style:{color:"#e8d5b0",fontSize:13},children:b.meaning})]}):e.jsxs("div",{style:{fontSize:12,color:"#6a6070",fontStyle:"italic",display:"flex",alignItems:"center",gap:5},children:[e.jsx("span",{children:"ð"}),e.jsx("span",{children:"Translation unavailable for this combination â full AI translation in the extension."})]})}),e.jsx("div",{style:{color:"#cfcfd6",maxHeight:140,overflowY:"auto"},children:t.tokens.map((d,u)=>{const m=I[d.hanzi];return m?e.jsxs("div",{style:{display:"flex",gap:6,padding:"3px 0",borderTop:u>0?"1px dashed rgba(255,255,255,0.06)":"none"},children:[e.jsx("b",{style:{color:C[m.ytl],minWidth:"1.8em",fontSize:14},children:d.hanzi}),e.jsx("em",{style:{color:"#d94a3a",fontStyle:"normal",minWidth:"4.5em",fontSize:12},children:m.pinyin}),e.jsx("span",{style:{color:"#cfcfd6",fontSize:12},children:m.meaning.split(";")[0]})]},u):null})}),e.jsxs("div",{style:{display:"flex",gap:6,marginTop:10},children:[e.jsxs("button",{disabled:!0,style:ee,title:"Available in the full extension",children:["ð ",e.jsx("span",{children:"Save sentence"})]}),e.jsx("button",{onClick:n,style:{flex:1,appearance:"none",cursor:"pointer",fontSize:12,fontWeight:600,padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.12)",color:"#f4efe6"},children:"Dismiss"})]}),e.jsxs("div",{style:{marginTop:8,fontSize:11,color:"#8a8a96",display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{children:[t.tokens.length," tokens"]}),e.jsx("span",{children:"yohling demo"})]})]})}function be({msg:t}){return e.jsx("div",{style:{position:"fixed",bottom:80,right:20,zIndex:99998,background:"#1a1a22",color:"#f4efe6",border:"1px solid rgba(217,74,58,0.4)",borderRadius:8,padding:"10px 14px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:13,boxShadow:"0 10px 28px rgba(0,0,0,0.4)",animation:"yohling-toast-in 0.2s ease",pointerEvents:"none"},children:t})}function je({onComplete:t,onFail:i}
2){const[s,o]=a.useState("demo"),[n,c]=a.useState(!1),[p,g]=a.useState(new Set),w=new Set,[k,b]=a.useState(null),[d,u]=a.useState(null),[m,y]=a.useState(new Set),[R,D]=a.useState(!1),O=a.useRef(null),[v]=a.useState(()=>ue(J)),[S,te]=a.useState(0),[ne,le]=a.useState([]),[M,K]=a.useState(null),[B,se]=a.useState(0);a.useEffect(()=>{s==="quiz"&&v[S]&&(le(me(v[S],J)),K(null))},[s,S,v]);const $=a.useCallback(r=>{u(r),setTimeout(()=>u(null),2200)},[]);a.useEffect(()=>{const r=l=>{const h=l.target;!h.closest("[data-yohling-tooltip]")&&!h.closest("[data-yohling-token]")&&b(null)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[]);const oe=(r,l)=>{n&&(l.stopPropagation(),b({type:"word",tokens:[r],x:l.clientX,y:l.clientY}))},ie=(r,l)=>{n&&(l.preventDefault(),D(!0),y(new Set([r.id])),b(null))},ae=r=>{!n||!R||y(l=>new Set([...l,r.id]))},re=r=>{if(R){if(D(!1),m.size>1){const l=H.filter(h=>m.has(h.id));b({type:"sentence",tokens:l,x:r.clientX,y:r.clientY})}y(new Set)}},ce=a.useCallback(r=>{g(l=>new Set([...l,r])),$(`Saved ã${r}ã`)},[$]),Q=a.useCallback(r=>{g(l=>{const h=new Set(l);return h.delete(r),h}),$(`Removed ã${r}ã`)},[$]),de=r=>{if(M)return;K(r),r===v[S].meaning&&se(h=>h+1),setTimeout(()=>{S+1>=v.length?o("done"):te(h=>h+1)},900)};if(s==="demo"){const r=[...p].filter(l=>!l.startsWith("__sentence__")).map(l=>({hanzi:l,info:I[l]})).filter(l=>!!l.info);return e.jsxs(E,{trialNumber:1,trialLabel:"Trial of Aptitude",trialChinese:"æè½ä¹è¯",children:[e.jsx("style",{children:` 3 @keyframes yohling-toast-in { from { transform: translateY(8px); opacity:0 } to { transform: translateY(0); opacity:1 } } 4 `}),e.jsxs("div",{className:"w-full max-w-lg space-y-3",children:[e.jsx("p",{className:"text-sm text-center",style:{color:"#7a7080"},children:n?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:"#6bd089"},children:"â Extension active"})," â click a word to look it up. Drag across words to analyse a sentence."]}):e.jsxs(e.Fragment,{children:["Click the ",e.jsx("strong",{style:{color:"#d94a3a"},children:"宥 Yohling"})," button to activate, then explore the page."]})}),e.jsxs("div",{ref:O,className:"relative w-full rounded-xl overflow-hidden select-none",style:{border:"2px solid #000",boxShadow:"0 0 40px rgba(0,0,0,0.8)"},onMouseUp:re,onMouseLeave:()=>{R&&(D(!1),y(new Set))},children:[e.jsx("img",{src:"/manhua-trial.png",alt:"Yohling Sect manhua page",className:"w-full block",draggable:!1}),n&&H.map(l=>{const h=I[l.hanzi];if(!h)return null;const T=C[h.ytl],L=m.has(l.id),Y=p.has(l.hanzi);return e.jsx("div",{"data-yohling-token":"1",onMouseDown:W=>ie(l,W),onMouseEnter:()=>ae(l),onClick:W=>oe(l,W),style:{position:"absolute",top:`${l.top}%`,left:`${l.left}%`,width:`${l.width}%`,height:`${l.height}%`,cursor:"help",background:L?`color-mix(in srgb, ${T} 42%, transparent)`:Y?`color-mix(in srgb, ${T} 22%, transparent)`:`color-mix(in srgb, ${T} 14%, transparent)`,borderBottom:`1.5px dashed color-mix(in srgb, ${T} 65%, transparent)`,borderTop:Y?`1px solid color-mix(in srgb, ${T} 50%, transparent)`:"none",borderRadius:2,transition:"background 0.12s ease",boxSizing:"border-box",boxShadow:L?`0 0 0 1px ${T}`:"none"},title:l.hanzi},l.id)})]}),r.length>0&&e.jsxs("div",{style:{background:"#16161d",border:"1px solid rgba(255,255,255,0.08)",borderRadius:12,padding:"10px 14px"},children:[e.jsx("p",{style:{color:"#8a8a96",fontSize:11,marginBottom:8,textTransform:"uppercase",letterSpacing:"0.12em"},children:"Saved words"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:r.map(({hanzi:l,info:h})=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"5px 8px",borderRadius:8,background:"rgba(255,255,255,0.03)",border:`1px solid ${C[h.ytl]}22`},children:[e.jsx("span",{style:{fontSize:17,fontWeight:700,color:C[h.ytl],minWidth:"2em"},children:l}),e.jsx("button",{onClick:()=>U(l),style:{appearance:"none",background:"none",border:"none",color:"#5a5060",cursor:"pointer",fontSize:13,padding:0,flexShrink:0},title:"Play",children:"ð"}),e.jsx("span",{style:{fontSize:11,color:"#d94a3a",minWidth:"4em"},children:h.pinyin}),e.jsx("span",{style:{fontSize:11,color:"#8a8a96",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.meaning.split(";")[0]}),e.jsx("button",{onClick:()=>Q(l),style:{appearance:"none",background:"none",border:"none",color:"#4a3a3a",cursor:"pointer",fontSize:12,padding:"0 2px",flexShrink:0},title:"Remove",children:"â"})]},l))})]}),r.length===0&&e.jsx("p",{className:"text-sm text-center rounded-lg py-2.5 px-4",style:{color:"#e0c896",background:"oklch(0.66 0.22 25 / 0.08)",border:"1px solid oklch(0.66 0.22 25 / 0.2)"},children:"⦠You must save at least one word before you can proceed to the test."}),e.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:8,paddingTop:4},children:[e.jsxs("button",{onClick:()=>{c(l=>!l),b(null)},style:{appearance:"none",cursor:"pointer",background:n?"#d94a3a":"#1a1a22",color:n?"white":"#f4efe6",borderRadius:999,padding:"10px 18px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:13,fontWeight:700,boxShadow:n?"0 0 24px rgba(217,74,58,0.5)":"0 10px 28px rgba(0,0,0,0.45)",display:"flex",alignItems:"center",gap:8,border:n?"1px solid #d94a3a":"1px solid rgba(255,255,255,0.08)",transition:"all 0.2s ease"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:n?"#4ade80":"#ffd56b",display:"inline-block",transition:"background 0.2s"}}),e.jsx("span",{className:"font-zh",style:{fontSize:15},children:"宥"}),n?"Yohling ON":"Yohling OFF"]}),e.jsx(z,{onClick:()=>o("quiz"),disabled:r.length===0,children:"Take the word test â"})]}),!n&&r.length===0&&e.jsx("p",{className:"text-xs text-center",style:{color:"#4a4050"},children:"Click the 宥 button above to activate the extension, then click any coloured word on the page to save it."})]}),k&&e.jsx("div",{"data-yohling-tooltip":"1",children:e.jsx(ye,{data:k,savedWords:p,knownWords:w,onSave:ce,onRemove:Q,onDismiss:()=>b(null)})}),d&&e.jsx(be,{msg:d})]})}if(s==="quiz"){const r=v[S],l=I[r.hanzi];
4return l?e.jsx(E,{trialNumber:1,trialLabel:"Trial of Aptitude â Word Test",trialChinese:"æè½ä¹è¯",children:e.jsxs("div",{className:"w-full max-w-xl space-y-6",children:[e.jsxs("div",{className:"flex justify-between text-xs",style:{color:"#5a5060"},children:[e.jsxs("span",{children:["Question ",S+1," of ",v.length]}),e.jsxs("span",{style:{color:f},children:[B," correct so far"]})]}),e.jsxs(A,{children:[e.jsx("p",{className:"text-sm mb-2",style:{color:f},children:"What does this word mean?"}),e.jsx("p",{className:"font-zh text-5xl font-bold text-center py-6",style:{color:C[l.ytl],textShadow:`0 0 30px ${C[l.ytl]}66`},children:r.hanzi}),e.jsxs("p",{className:"text-center text-sm",style:{color:"#5a5060"},children:["YTL ",l.ytl," · ",l.pinyin]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:ne.map(h=>{const T=h===l.meaning;let L="oklch(0.22 0.014 264 / 0.8)",Y="oklch(0.28 0.014 264)",W=x;return M&&(T?(L="oklch(0.35 0.12 150 / 0.4)",Y="oklch(0.72 0.14 150)",W="oklch(0.85 0.14 150)"):h===M&&(L="oklch(0.35 0.18 25 / 0.3)",Y=j,W="oklch(0.75 0.15 25)")),e.jsx("button",{onClick:()=>de(h),disabled:!!M,className:"rounded-xl p-4 text-sm text-left transition-all duration-150 font-medium",style:{background:L,border:`1px solid ${Y}`,color:W},children:h},h)})})]})}):null}const P=B>=Math.ceil(v.length*.5);return e.jsx(E,{trialNumber:1,trialLabel:"Trial of Aptitude â Result",trialChinese:"æè½ä¹è¯",children:e.jsx("div",{className:"w-full max-w-xl",children:e.jsxs(A,{className:"text-center",children:[e.jsx("div",{className:"text-5xl font-zh font-black mb-4",style:{color:P?"oklch(0.72 0.14 150)":j},children:P?"éè¿":"æªéè¿"}),e.jsx("p",{className:"text-lg font-bold mb-2",style:{color:x},children:P?"You have passed the first trial.":"The first trial has not been passed."}),e.jsxs("p",{className:"text-sm mb-6",style:{color:f},children:["Score: ",B," / ",v.length]}),P?e.jsx(z,{onClick:t,children:"Proceed to Trial 2 â"}):e.jsx(z,{onClick:i,children:"Return to the Gate"})]})})})}const N=30,q=15;function we({onComplete:t,onFail:i}){const[s,o]=a.useState(0),[n,c]=a.useState(!1),[p,g]=a.useState("waiting"),w=a.useRef(null);a.useEffect(()=>{if(n)return w.current=setInterval(()=>{o(v=>{const S=v+1;return S>N+q?(clearInterval(w.current),g("failed")):S>=N&&p==="waiting"&&g("window"),S})},1e3),()=>clearInterval(w.current)},[n]);const k=a.useRef(p);k.current=p,a.useEffect(()=>{s>=N&&k.current==="waiting"&&g("window"),s>N+q&&k.current==="window"&&g("failed")},[s]);const b=a.useCallback(()=>{p==="window"?(clearInterval(w.current),g("passed")):p==="waiting"&&n&&(clearInterval(w.current),g("failed"))},[p,n]),d=Math.max(0,N-s),u=Math.max(0,N+q-s),m=Math.min(1,s/N),y=Math.floor(d/60).toString().padStart(2,"0"),R=(d%60).toString().padStart(2,"0"),D=Math.floor(u/60).toString().padStart(2,"0"),O=(u%60).toString().padStart(2,"0");return e.jsx(E,{trialNumber:2,trialLabel:"Trial of Patience",trialChinese:"èå¿ä¹è¯",children:e.jsx("div",{className:"w-full max-w-xl space-y-6",children:e.jsxs(A,{className:"text-center",children:[p==="waiting"&&!n&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"font-zh text-3xl font-bold mb-2",style:{color:x},children:"èå¿çå¾
"}),e.jsxs("p",{className:"text-sm mb-6",style:{color:f},children:["A 30 second timer will begin. Click the button ",e.jsx("strong",{style:{color:x},children:"only when"})," the timer reaches zero â you'll have 15 seconds to do so. Click too early, and you return to the gate."]}),e.jsx(z,{onClick:()=>c(!0),children:"Begin the Wait"})]}),n&&p==="waiting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase mb-4",style:{color:f},children:"Time Remaining"}),e.jsxs("div",{className:"relative mx-auto mb-6",style:{width:"160px",height:"160px"},children:[e.jsxs("svg",{viewBox:"0 0 160 160",className:"absolute inset-0 w-full h-full",style:{transform:"rotate(-90deg)"},children:[e.jsx("circle",{cx:"80",cy:"80",r:"70",fill:"none",stroke:"oklch(0.24 0.014 264)",strokeWidth:"8"}),e.jsx("circle",{cx:"80",cy:"80",r:"70",fill:"none",stroke:j,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*70}`,strokeDashoffset:`${2*Math.PI*70*(1-m)}`,style:{transition:"stroke-dashoffset 1s linear"}})]}),e.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:e.jsxs("span",{className:"font-display text-4xl font-bold",style:{color:x},children:[y,":",R]})})]}),e.jsxs("p",{className:"text-sm mb-6",style:{color:"#5a5060"},children:["Do not click yet. Wait for the timer to reach ",e.jsx("span",{style:{color:f},children:"00:00"}),"."]}),e.jsx("button",{onClick:b,className:"w-full py-4 rounded-xl font-bold text-base tracking-wide transition-all duration-200 opacity-30 hover:opacity-50",style:{background:"oklch(0.28 0.014 264)",color:"#5a5060",border:"1px solid oklch(0.32 0.014 264)",cursor:"grab"},children:"Proceed now"})]}),p==="window"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"font-zh text-3xl font-bold mb-2 animate-pulse",style:{color:"oklch(0.72 0.14 150)"},children:"ç°å¨ï¼"}),e.jsxs("p",{className:"text-sm mb-4",style:{color:f},children:["The moment has arrived. Click now â you have ",e.jsxs("strong",{style:{color:x},children:[D,":",O]})," remaining."]}),e.jsx("button",{onClick:b,className:"w-full py-5 rounded-xl font-bold text-lg tracking-wide transition-all duration-150 hover:scale-105 active:scale-95 animate-pulse",style:{background:"oklch(0.72 0.14 150)",color:x,boxSh
4adow:"0 0 40px oklch(0.72 0.14 150 / 0.5)",border:"1px solid oklch(0.85 0.14 150 / 0.4)"},children:"YES â I am here."})]}),p==="passed"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-zh text-5xl font-black mb-4",style:{color:"oklch(0.72 0.14 150)"},children:"éè¿"}),e.jsx("p",{className:"text-lg font-bold mb-2",style:{color:x},children:"Your patience is worthy of the Sect."}),e.jsx("p",{className:"text-sm mb-6",style:{color:f},children:"You clicked at the right moment."}),e.jsx(z,{onClick:t,children:"Proceed to Trial 3 â"})]}),p==="failed"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-zh text-5xl font-black mb-4",style:{color:j},children:"失败"}),e.jsx("p",{className:"text-lg font-bold mb-2",style:{color:x},children:s<N?"Your impatience has betrayed you.":"The window has passed."}),e.jsx("p",{className:"text-sm mb-6",style:{color:f},children:s<N?"You clicked too early. The Sect demands patience.":"You hesitated for too long. The gate has closed."}),e.jsx(z,{onClick:i,children:"Return to the Gate"})]})]})})})}function ke({onComplete:t}){const[i,s]=a.useState(!1),o=a.useRef(null);return a.useEffect(()=>{const n=new IntersectionObserver(([c])=>{c.isIntersecting&&s(!0)},{threshold:.8});return o.current&&n.observe(o.current),()=>n.disconnect()},[]),e.jsx(E,{trialNumber:3,trialLabel:"The Founder's Scroll",trialChinese:"å®ä¸»ä¼ è®°",children:e.jsxs("div",{className:"w-full max-w-2xl space-y-6",children:[e.jsx("p",{className:"text-sm text-center",style:{color:"#5a5060"},children:"Read the account of the Sect's founder. Scroll to the end, then proceed."}),e.jsxs(A,{children:[e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("p",{className:"font-zh text-3xl font-bold",style:{color:x},children:"宥çµå®åå§äººä¼ è®°"}),e.jsx("p",{className:"text-sm mt-1 italic",style:{color:f},children:"The Life of the Yohling Sect's Founder"}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1",style:{background:"linear-gradient(90deg, transparent, oklch(0.66 0.22 25 / 0.4))"}}),e.jsx("span",{className:"font-zh",style:{color:j},children:"â"}),e.jsx("div",{className:"h-px flex-1",style:{background:"linear-gradient(90deg, oklch(0.66 0.22 25 / 0.4), transparent)"}})]})]}),e.jsxs("div",{className:"space-y-5 text-sm leading-relaxed",style:{color:"#a89070"},children:[e.jsx("p",{children:"In the age before the great divide between worlds â when the veil between realms was thin as morning mist over a mountain lake â there lived a scholar. He lived accustomed to the ways of the world, one which was selfish in its ways"}),e.jsx("p",{children:"At the prime of his youth, he came across one who defied the notions of his world. That person brought forth a different fruit and path, than one already present in the world. This became the very foundation which inspired the sect, the Yohling sect."}),e.jsx("p",{children:"He spent all his time creating and perfecting the manual for his sect, inspired by the man he once saw."}),e.jsxs("p",{children:["When his studies and practice reached a breakthrough, he got a name for the school he would build. ",e.jsx("span",{style:{color:x,fontFamily:"var(--font-zh)"},children:"宥çµå®"}),' â "The Sect of Forgiving Spirits." The 宥 (yòu) spoke to grace and forgiveness, the patience required to learn without shame. The çµ (lÃng) spoke to the living, spiritual quality of learning. The å® (zÅng) marked it as a lineage, a path with roots and succession.']}),e.jsx("p",{children:"He travelled for three more years, teaching in villages and cities alike, before settling on a mountain whose name he never publicly revealed. There he founded the Sect â not as a temple of monks, but as an open school, one that would receive any willing mind regardless of background. His only requirement for entry was simple:"}),e.jsx("blockquote",{className:"border-l-2 pl-4 italic my-4 text-base",style:{borderColor:j,color:x},children:'"Show me that you are willing to be a beginner. Show me patience, curiosity, and the readiness to meet a new world halfway. These are the only credentials the path requires."'}),e.jsx("p",{children:"The Sect endured. Its teachers carried his methods forward, refining them generation by generation, until the art of Yohling cultivation had spread across the known world â and, in time, will quietly into ours."}),e.jsx("p",{children:"The Yohling app you now use is the prime link of the sect â transformed for the age of digital ink that now flows freely across the world's screens. The principle has not changed: immerse yourself honestly, meet each experience with curiosity, and the learning will meet you in return."}),e.jsx("div",{ref:o,className:"pt-4 text-center",children:e.jsx("span",{className:"font-zh text-lg",style:{color:j},children:"â å® â"})})]})]}),e.jsx("div",{className:"flex justify-center",children:e.jsx(z,{onClick:t,disabled:!i,children:i?"I have read the Scroll â Proceed to Trial 4 â":"Read to the end to continueâ¦"})})]})})}function ve({onComplete:t}
4){return e.jsx(E,{trialNumber:4,trialLabel:"The Question of Intent",trialChinese:"æå¿ä¹é®",children:e.jsx("div",{className:"w-full max-w-xl",children:e.jsxs(A,{className:"text-center",children:[e.jsx("p",{className:"font-zh text-3xl font-bold mb-2",style:{color:x},children:"æå¿ä¹é®"}),e.jsx("p",{className:"text-sm mb-8 italic",style:{color:f},children:"The fourth trial asks nothing difficult. Only the truth."}),e.jsxs("div",{className:"rounded-xl p-6 mb-8 text-left",style:{background:"oklch(0.66 0.22 25 / 0.08)",border:"1px solid oklch(0.66 0.22 25 / 0.2)"},children:[e.jsx("p",{className:"text-lg font-semibold leading-relaxed",style:{color:x},children:"After mastering the language that is set before you"}),e.jsx("p",{className:"text-xl font-bold mt-3",style:{color:"#f5e6c8"},children:"Would you be interested in learning a new language?"})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("button",{onClick:t,className:"w-full py-4 rounded-xl font-bold text-base tracking-wide transition-all duration-200 hover:scale-105 active:scale-95",style:{background:j,color:x,boxShadow:"0 0 24px oklch(0.66 0.22 25 / 0.4)",border:"1px solid oklch(0.78 0.14 80 / 0.25)"},children:[e.jsx("span",{className:"font-zh mr-2",children:"æ¯"})," Yes â I am ready to learn"]}),e.jsx("p",{className:"text-xs",style:{color:"#3a3040"},children:"(There is only one answer the path accepts.)"})]})]})})})}function Se({onComplete:t}){const[i,s]=a.useState(null),o=n=>{s(n),setTimeout(t,1400)};return e.jsx(E,{trialNumber:5,trialLabel:"The Veil Question",trialChinese:"å¹é®",children:e.jsx("div",{className:"w-full max-w-xl",children:e.jsxs(A,{className:"text-center",children:[e.jsx("p",{className:"font-zh text-3xl font-bold mb-2",style:{color:x},children:"å¹é®"}),e.jsx("p",{className:"text-sm mb-8 italic",style:{color:f},children:"The final trial. Answer honestly."}),e.jsx("div",{className:"rounded-xl p-6 mb-8 text-left",style:{background:"oklch(0.20 0.014 264 / 0.8)",border:"1px solid oklch(0.28 0.014 264)"},children:e.jsxs("p",{className:"text-base leading-relaxed",style:{color:"#a89070"},children:["If the"," ",e.jsx("span",{className:"rounded px-1 select-none cursor-default",style:{filter:"blur(4px)",background:"oklch(0.66 0.22 25 / 0.15)",color:x,userSelect:"none"},children:"ââââââââââ"}
4)," ","world combines with earth would you be willing to join the Yohling group?"]})}),i?e.jsxs("div",{className:"py-4",children:[e.jsx("div",{className:"font-zh text-4xl font-black animate-pulse",style:{color:"oklch(0.72 0.14 150)"},children:"éè¿"}),e.jsx("p",{className:"mt-2 text-sm",style:{color:f},children:i==="yes"?"Your conviction is noted. The Sect welcomes all who step forward.":"Your honesty is noted. The Sect respects those who speak their truth."})]}):e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsxs("button",{onClick:()=>o("yes"),className:"flex-1 py-4 rounded-xl font-bold text-base tracking-wide transition-all duration-200 hover:scale-105 active:scale-95",style:{background:j,color:x,boxShadow:"0 0 24px oklch(0.66 0.22 25 / 0.4)",border:"1px solid oklch(0.78 0.14 80 / 0.25)"},children:[e.jsx("span",{className:"font-zh mr-2",children:"æ¯"})," Yes"]}),e.jsxs("button",{onClick:()=>o("no"),className:"flex-1 py-4 rounded-xl font-bold text-base tracking-wide transition-all duration-200 hover:scale-105 active:scale-95",style:{background:"oklch(0.22 0.014 264 / 0.9)",color:"#c9a882",border:"1px solid oklch(0.32 0.018 264)"},children:[e.jsx("span",{className:"font-zh mr-2",children:"å¦"})," No"]})]})]})})})}function Ne(){const t=_();return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center px-6 py-24 relative overflow-hidden",style:{background:G},children:[e.jsx("div",{className:"absolute inset-0 -z-10",style:{background:`radial-gradient(ellipse at 50% 40%, oklch(0.66 0.22 25 / 0.18) 0%, transparent 65%), 5 radial-gradient(ellipse at 50% 40%, oklch(0.78 0.14 80 / 0.10) 0%, transparent 50%)`}}),e.jsxs("div",{className:"max-w-2xl w-full mx-auto text-center",children:[e.jsx("div",{className:"mx-auto mb-8 flex items-center justify-center rounded-xl overflow-hidden",style:{width:"96px",height:"96px",boxShadow:"0 0 80px oklch(0.66 0.22 25 / 0.8), 0 0 160px oklch(0.66 0.22 25 / 0.3)",border:"2px solid oklch(0.78 0.14 80 / 0.4)",transform:"rotate(-3deg)"},children:e.jsx("img",{src:"/yohling-logo.png",alt:"Yohling",className:"w-full h-full object-cover"})}),e.jsx("p",{className:"font-zh text-sm tracking-[0.3em] uppercase mb-3",style:{color:f},children:"宥çµå® · All Trials Complete"}),e.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold mb-4",style:{color:x,textShadow:"0 0 60px oklch(0.66 0.22 25 / 0.5)"},children:"You Are Worthy."}),e.jsx("p",{className:"font-zh text-2xl mb-2",style:{color:j},children:"å ¥å®"}),e.jsx("p",{className:"text-base mb-10",style:{color:"#a89070"},children:"The five trials of the Yohling Sect have been completed. The gate is open. Your path begins now."}),e.jsx("div",{className:"flex justify-center",children:e.jsx(z,{onClick:()=>t({to:"/signup"}),children:"Create your account â"})})]})]})}function ze({onDone:t}){return a.useEffect(()=>{const i=setTimeout(t,3e3);return()=>clearTimeout(i)},[t]),e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-black/95 backdrop-blur-sm",children:[e.jsx("p",{className:"font-zh text-3xl md:text-5xl text-center px-8 leading-relaxed",style:{color:"oklch(0.72 0.20 25)",textShadow:"0 0 60px oklch(0.66 0.22 25 / 0.8)"},children:"æ¤å®ä¸éå¼±å¿ä¹å¾"}),e.jsx("p",{className:"mt-4 text-base md:text-lg text-center px-8 italic",style:{color:f,fontFamily:"var(--font-zh)"},children:"The Sect needs no weak-willed disciples."}),e.jsx("p",{className:"mt-6 text-xs animate-pulse",style:{color:"#3a3040"},children:"Returning to the gateâ¦"})]})}function Te({onBegin:t}){const i=_(),s=[{n:"ä¸",en:"Trial of Aptitude",zh:"æè½ä¹è¯",color:"oklch(0.72 0.14 150)"},{n:"äº",en:"Trial of Patience",zh:"èå¿ä¹è¯",color:"oklch(0.70 0.14 240)"},{n:"ä¸",en:"The Founder's Scroll",zh:"å®ä¸»ä¼ è®°",color:"oklch(0.68 0.16 305)"},{n:"å",en:"The Question of Intent",zh:"æå¿ä¹é®",color:"oklch(0.80 0.14 85)"},{n:"äº",en:"The Veil Question",zh:"å¹é®",color:"oklch(0.66 0.22 25)"}],o="oklch(0.80 0.09 155)";return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-start px-4 py-16 relative overflow-hidden",style:{background:G},children:[e.jsx("div",{className:"absolute inset-0 -z-10",style:{background:"radial-gradient(ellipse at 50% 20%, oklch(0.66 0.22 25 / 0.10) 0%, transparent 60%)"}}),[-360,-180,180,360].map((n,c)=>e.jsx("div",{className:"absolute top-0 bottom-0 w-px pointer-events-none",style:{left:`calc(50% + ${n}px)`,background:"linear-gradient(180deg, transparent, oklch(0.66 0.22 25 / 0.05), transparent)"}},c)),e.jsxs("div",{className:"w-full max-w-2xl",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("div",{className:"mx-auto mb-6 flex items-center justify-center rounded-xl font-zh font-black text-4xl",style:{width:"72px",height:"72px",background:j,color:x,boxSh
5adow:"0 0 50px oklch(0.66 0.22 25 / 0.6)",border:"2px solid oklch(0.78 0.14 80 / 0.3)",transform:"rotate(-3deg)"},children:"試"}),e.jsx("p",{className:"font-zh text-xs tracking-[0.3em] uppercase mb-2",style:{color:f},children:"宥çµå®èéª Â· The Five Trials"}),e.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold",style:{color:x},children:"The Gate Demands Proof"}),e.jsx("p",{className:"mt-3 text-sm",style:{color:"#7a7080"},children:"Five trials stand between you and the Sect. Complete all five in order. Fail any of the first two, and you return to the beginning."})]}),e.jsx("div",{className:"relative overflow-hidden rounded-3xl p-6 md:p-8 mb-10",style:{background:"oklch(0.32 0.03 155 / 0.20)",backdropFilter:"blur(38px) saturate(190%)",WebkitBackdropFilter:"blur(38px) saturate(190%)",border:"1px solid oklch(0.82 0.08 155 / 0.32)",boxShadow:"inset 0 1px 0 oklch(0.95 0.02 155 / 0.18), 0 30px 80px -30px oklch(0 0 0 / 0.6)"},children:e.jsx("div",{className:"flex flex-col items-stretch",children:s.map((n,c)=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-4 roun
5ded-2xl px-5 py-4",style:{background:`color-mix(in srgb, ${n.color} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${n.color} 45%, transparent)`},children:[e.jsx("div",{className:"flex-shrink-0 font-zh font-black text-2xl flex items-center justify-center rounded-xl",style:{width:"52px",height:"52px",background:n.color,color:"oklch(0.16 0.01 264)",boxShadow:`0 0 24px color-mix(in srgb, ${n.color} 55%, transparent)`},children:n.n}),e.jsxs("div",{children:[e.jsx("p",{className:"font-display font-bold text-base md:text-lg",style:{color:x},children:n.en}),e.jsx("p",{className:"font-zh text-xs mt-0.5",style:{color:n.color},children:n.zh})]})]}),c<s.length-1&&e.jsxs("div",{className:"flex flex-col items-center py-1.5","aria-hidden":"true",children:[e.jsx("div",{style:{width:2,height:14,background:`color-mix(in srgb, ${o} 60%, transparent)`}}),e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M8 2L8 13M8 13L3 8M8 13L13 8",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]},c))})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(z,{onClick:t,children:"Enter the Gate â"}),e.jsx("button",{onClick:()=>i({to:"/"}),className:"inline-flex items-center justify-center gap-2 rounded-xl px-6 py-3 text-sm transition-all hover:scale-105",style:{color:"#5a5060",border:"1px solid oklch(0.24 0.014 264)",background:"transparent"},children:"â Return home"})]}),e.jsx("p",{className:"mt-4 text-center text-xs",style:{color:f},children:"Take the test to get the app at $10/month."})]})]})}const Ce="yohling:skip_trial";function Ie({onClose:t}){const i=_(),s=a.useRef(null),o=c=>{c.target===s.current&&t()},n=()=>{try{sessionStorage.setItem(Ce,"1")}catch{}t(),i({to:"/signup",search:{redirect:"/pricing"}})};return e.jsx("div",{ref:s,onClick:o,className:"fixed inset-0 z-[200] flex items-center justify-center",style:{background:"rgba(0,0,0,0.65)",backdropFilter:"blur(2px)"},children:e.jsxs("div",{className:"relative rounded-2xl overflow-hidden",style:{maxWidth:380,width:"90vw",boxShadow:"0 30px 80px rgba(0,0,0,0.8)",border:"1.5px solid oklch(0.66 0.22 25 / 0.4)"},onClick:c=>c.stopPropagation(),children:[e.jsx("button",{onClick:t,className:"absolute top-3 right-3 z-10 flex items-center justify-center rounded-full transition-all hover:scale-110",style:{width:28,height:28,background:"rgba(0,0,0,0.55)",border:"1px solid rgba(255,255,255,0.15)",color:"#f5e6c8",fontSize:14},"aria-label":"Close",children:"â"}),e.jsx("img",{src:"/junior-wang.png",alt:"Junior Wang has a proposal",className:"w-full block",draggable:!1,style:{maxHeight:"60vh",objectFit:"cover",objectPosition:"top"}}),e.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",style:{background:"oklch(0.16 0.012 264)"},children:[e.jsxs("p",{className:"text-sm text-center",style:{color:"#a89070"},children:["Skip the trials entirely. Jump straight into the Sect.",e.jsx("br",{}),e.jsx("span",{style:{color:"#6a6070",fontSize:11},children:"$21 first month · $10/month after · same access as everyone else"})]}),e.jsx("button",{onClick:n,className:"w-full inline-flex items-center justify-center rounded-xl py-3 text-sm font-bold tracking-wide transition-all hover:scale-105 active:scale-95",style:{background:"#4ade80",color:"#0a1a0a",boxShadow:"0 0 20px rgba(74,222,128,0.4)",fontFamily:"-apple-system, sans-serif"},children:"PAY $21 â For Instant Access"}),e.jsx("button",{onClick:t,className:"text-xs text-center transition-colors",style:{color:"#3a3040"},children:"No thanks, I'll take the trials"})]})]})})}function We(){const t=_(),[i,s]=a.useState("gate"),[o,n]=a.useState(!1),[c,p]=a.useState(!0),g=()=>{n(!0)},w=()=>{n(!1),window.scrollTo({top:0,behavior:"smooth"}),t({to:"/"})},k=i!=="complete";return e.jsxs(e.Fragment,{children:[o&&e.jsx(ze,{onDone:w}),c&&e.jsx(Ie,{onClose:()=>p(!1)}),k&&e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 6 @keyframes wang-pulse { 7 0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(74,222,128,0.35), 0 4px 16px rgba(0,0,0,0.4); } 8 50% { transform: scale(1.06); box-shadow: 0 0 32px rgba(74,222,128,0.6), 0 4px 20px rgba(0,0,0,0.45); } 9 } 10 `}),e.jsxs("button",{onClick:()=>p(!0),className:"fixed bottom-5 right-5 z-[100] flex items-center gap-2 rounded-full text-xs font-bold transition-transform hover:scale-110 active:scale-95",style:{background:"#4ade80",color:"#0a1a0a",padding:"8px 14px",border:"1px solid rgba(74,222,128,0.6)",animation:"wang-pulse 2.4s ease-in-out infinite"},title:"Junior Wang has a proposalâ¦",children:[e.jsx("span",{className:"rounded-full overflow-hidden flex-shrink-0",style:{width:22,height:22,border:"1px solid rgba(0,0,0,0.2)"},children:e.jsx("img",{src:"/junior-wang.png",alt:"",className:"w-full h-full object-cover object-top",draggable:!1})}),"Too hard?"]})]}),i==="gate"&&e.jsx(Te,{onBegin:()=>s("t1")}),i==="t1"&&e.jsx(je,{onComplete:()=>s("t2"),onFail:g}),i==="t2"&&e.jsx(we,{onComplete:()=>s("t3"),onFail:g}),i==="t3"&&e.jsx(ke,{onComplete:()=>s("t4")}),i==="t4"&&e.jsx(ve,{onComplete:()=>s("t5")}),i==="t5"&&e.jsx(Se,{onComplete:()=>s("complete")}
10),i==="complete"&&e.jsx(Ne,{})]})}export{We as component};
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.