PageSourceSearch

https://bacctrack-7ha7hyw7.manus.space/assets/SmartLimitPage-CV2TvGTn.js

js bacctrack-7ha7hyw7.manus.space collected 2026-10-03 05:02:52 UTC 33,433 bytes, 1 lines download raw bytes

1import{a as Y,r as n,j as t,d as f,M as Z,T as tt,H as B,J as et,W as O,N as at,I as st,A as it,b as u}from"./index-C3Qps0S4.js";import{B as p}from"./button-xdpkFraK.js";import{I as N}from"./input-Dj8udylZ.js";import{c as w,a as _,s as lt,r as rt,n as ct,b as nt,i as v,e as y,d as dt,f as mt,g as ot,h as C,H as $,j as xt}from"./riskControl-CfbaOeSM.js";import{s as K}from"./statisticsCenter-Cj0991tE.js";import{S as H}from"./save-DgLGcrQc.js";import{P as A}from"./pause-CBO5Qi-s.js";import{P as gt}from"./play-NZNEVHTw.js";import{T as pt}from"./trending-up-Dq4_iocl.js";import{C as ht}from"./circle-check-DmGdFs0e.js";import{G as bt}from"./gauge-C7AQYjdr.js";import"./index-Jol-UBUv.js";import"./dialog-BY1FISUw.js";import"./index-BKUanX19.js";import"./index-Dr02_Kwf.js";import"./probabilityHub-CiUkqtm8.js";const U=[{key:"dailyBudget",label:"งบรายวัน",help:"จำนวนเงินสูงสุดที่คุณตั้งใจใช้ต่อวัน",suffix:"บาท",min:0,max:1e7},{key:"sessionBudget",label:"งบต่อรอบ",help:"จำนวนเงินสูงสุดสำหรับการใช้งานหนึ่งรอบ",suffix:"บาท",min:0,max:1e7},{key:"lossLimit",label:"Loss Limit",help:"ยอดขาดทุนที่ต้องการให้เตือนทันที",suffix:"บาท",min:0,max:1e7},{key:"sessionMinutes",label:"เวลาต่อรอบ",help:"เวลารวมก่อนแสดงการแจ้งเตือนหยุดรอบ",suffix:"นาที",min:1,max:1440},{key:"breakMinutes",label:"เตือนให้พักทุก",help:"ช่วงเวลาระหว่าง Break Reminder",suffix:"นาที",min:1,max:1440}];function St(h){const s=Math.max(0,Math.floor(h)),d=Math.floor(s/3600),i=Math.floor(s%3600/60),l=s%60;return`${String(d).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`}function Tt(){const{user:h}=Y(),[s,d]=n.useState(()=>w()),[i,l]=n.useState(()=>_()),[o,S]=n.useState(Date.now()),[I,J]=n.useState(null),[M,G]=n.useState(null),x=h?lt(h.id):null,g=h?rt(h.id):null;n.useEffect(()=>{if(x)try{const e=localStorage.getItem(x);d(ct(e?JSON.parse(e):null))}catch{d(w())}finally{J(x)}},[x]),n.useEffect(()=>{if(g)try{const e=localStorage.getItem(g);l(nt(e?JSON.parse(e):null))}catch{l(_())}finally{G(g)}},[g]),n.useEffect(()=>{if(!(!x||I!==x))try{localStorage.setItem(x,JSON.stringify(s))}catch{}},[I,s,x]),n.useEffect(()=>{if(!(!g||M!==g))try{localStorage.setItem(g,JSON.stringify(i))}catch{}},[i,M,g]),n.useEffect(()=>{if(!s.activity.startedAt&&!v(i))return;const e=window.setInterval(()=>S(Date.now()),1e3);return()=>window.clearInterval(e)},[i.cooldownUntil,s.activity.startedAt]);const j=y(s.activity,o),D=n.useMemo(()=>dt(s,o),[s,o]),k=D.filter(e=>e.kind!=="ok"),c=n.useMemo(()=>mt(s,i,o),[o,i,s]),R=n.useMemo(()=>ot(s,i,o),[o,i,s]),P=v(i,o)||c.cooldownRequired,L=i.planLocked&&!!(s.activity.startedAt||j>0),V=(e,a)=>{if(L)return;const r=U.find(b=>b.key===e),m=Number.isFinite(a)?Math.min(r.max,Math.max(r.min,a)):r.min;d(b=>({...b,settings:{...b.settings,[e]:m}}))},W=(e,a)=>{const r=Number.isFinite(a)?Math.min(1e7,Math.max(0,a)):0;d(m=>({...m,activity:{...m.activity,[e]:r}}))},F=()=>{d(e=>e.activity.startedAt?{...e,activity:{...e.activity,elapsedSeconds:y(e.activity),startedAt:null}}:{...e,activity:{...e.activity,startedAt:Date.now(),lastBreakAt:e.activity.elapsedSeconds===0?Date.now():e.activity.lastBreakAt}}),S(Date.now())},z=()=>{d(e=>({...e,activity:{...e.activity,lastBreakAt:Date.now()}})),l(e=>({...e,breaksTaken:e.breaksTaken+1})),u.success("บันทึกการพักแล้ว",{description:"ตัวจับเวลารอบยังคงทำงานตามเดิม"})},q=()=>{d(e=>({...e,activity:w().activity})),l(e=>({...e,planLocked:!1,cooldownUntil:null,currentStake:0,rounds:0,breaksTaken:0,skippedBreaks:0,gameSwitches:0,emotionChecks:0,warnings:0,limitViolations:0,stakes:[],results:[]})),S(Date.now()),u.info("เริ่มบันทึกรอบใหม่แล้ว",{description:"ค่าขีดจำกัดที่ตั้งไว้ยังคงเดิม"})},Q=()=>{l(e=>({...e,planLocked:!0})),u.success("บันทึกและล็อกขีดจำกัดแล้ว",{description:"เมื่อเริ่มรอบ ระบบจะไม่ให้เพิ่มขีดจำกัดจนกว่าจะจบรอบ"})},X=e=>{P||l(a=>({...a,rounds:a.rounds+1,stakes:[...a.stakes,a.currentStake].slice(-20),results:[...a.results,e].slice(-20)}))},T=(e=10)=>{const a=Date.now()+e*6e4;l(r=>({...r,cooldownUntil:a,warnings:r.warnings+1})),d(r=>({...r,activity:{...r.activity,elapsedSeconds:y(r.activity),startedAt:null}})),S(Date.now()),u.warning(`เริ่ม Cool-down ${e} นาที`,{description:"ระบบพักตัวจับเวลาและซ่อนการบันทึกรอบชั่วคราว"})},E=()=>{const e=Date.now(),a=s.activity.startedAt?s.activity.startedAt-s.activity.elapsedSeconds*1e3:e-j*1e3,r={id:`session-${e}`,gameId:i.gameId,startedAt:a,endedAt:e,budget:s.settings.sessionBudget,netResult:-s.activity.sessionLoss,rounds:i.rounds,breaksTaken:i.breaksTaken,warnings:i.warnings+k.length,disciplineScore:R,riskLevel:c.level};l(m=>({...m,sessions:[r,...m.sessions].slice(0,30),planLocked:!1,cooldownUntil:null,currentStake:0,rounds:0,breaksTaken:0,skippedBreaks:0,gameSwitches:0,emotionChecks:0,warnings:0,limitViolations:0,stakes:[],results:[],emotion:"normal",impaired:!1})),d(m=>({...m,activity:w().activity})),S(e),u.success("จบ Session และบันทึก Review แล้ว",{description:"ขีดจำกัดเดิมยังคงอยู่สำหรับการวางแผนครั้งถัดไป"})};return t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:157",className:"mx-auto w-full max-w-5xl px-3 pb-28 pt-4 sm:px-5 md:pb-10",children:[t.jsx("header",{"data-loc":"client/src/pages/SmartLimitPage.tsx:158",className:"overflow-hidden rounded-3xl border border-amber-400/20 bg-[radial-gradient(circle_at_88%_10%,rgba(217,164,65,0.14),transparent_22rem),linear-gradient(145deg,#141620,#0a0c13)] p-5 shadow-[0_24px_70px_rgba(0,0,0,0.28)] sm:p-7",children:t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:159",className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:160",children:[t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:161",className:"inline-flex items-center gap-2 text-[10px] font-black tracking-[0.14em] text-amber-300",children:[t.jsx(f,{"data-loc":"client/src/pages/SmartLimitPage.tsx:161",className:"h-4 w-4"})," SMART LIMIT"]}),t.jsx("h1",{"data-loc":"client/src/pages/SmartLimitPage.tsx:162",className:"mt-3 text-2xl font-black tracking-tight text-white sm:text-4xl",children:"กำหนดขอบเขตก่อนเริ่ม"}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:163",className:"mt-3 max-w-2xl text-xs leading-6 text-slate-400 sm:text-sm",children:"เครื่องมือนี้ช่วยเตือนตามค่าที่คุณกรอกเอง ข้อมูลเก็บในอุปกรณ์นี้และแยกตามบัญชี ไม่เชื่อมเว็บภายนอก ไม่เปลี่ยนยอด Point และไม่รับประกันว่าการใช้งานจะปราศจากความเสี่ยง"})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:165",className:"hidden h-14 w-14 place-items-center rounded-2xl border border-amber-300/20 bg-amber-300/10 text-amber-300 sm:grid",children:t.jsx(Z,{"data-loc":"client/src/pages/SmartLimitPage.tsx:165",className:"h-7 w-7"})})]})}),(k.length>0||c.factors.length>0)&&t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:170","aria-live":"polite","aria-label":"การแจ้งเตือน Smart Limit",className:"mt-4 grid gap-2",children:[k.map(e=>t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:171",className:`flex items-start gap-3 rounded-2xl border p-4 ${e.kind==="reached"?"border-red-400/30 bg-red-500/10 text-red-100":"border-amber-400/30 bg-amber-400/10 text-amber-100"}`,children:[t.jsx(tt,{"data-loc":"client/src/pages/SmartLimitPage.tsx:171",className:"mt-0.5 h-5 w-5 shrink-0"}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:171",children:[t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:171",className:"text-sm",children:e.label}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:171",className:"mt-1 text-xs leading-5 opacity-80",children:e.detail})]})]},e.label)),c.factors.map(e=>t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:172",className:`flex items-start gap-3 rounded-2xl border p-4 ${c.level==="critical"||c.level==="high"?"border-red-400/30 bg-red-500/10 text-red-100":"border-amber-400/30 bg-amber-400/10 text-amber-100"}`,children:[t.jsx(B,{"data-loc":"client/src/pages/SmartLimitPage.tsx:172",className:"mt-0.5 h-5 w-5 shrink-0"}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:172",children:[t.jsxs("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:172",className:"text-sm",children:[e.label," · +",e.points]}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:172",className:"mt-1 text-xs leading-5 opacity-80",children:e.detail})]})]},e.id))]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:176",className:"mt-5 grid gap-5 lg:grid-cols-[1.05fr_.95fr]",children:[t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:177","aria-labelledby":"limit-settings-title",className:"rounded-3xl border border-white/[0.07] bg-[#11131d] p-4 sm:p-6",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:178",className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:178",children:[t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:178",className:"text-[9px] font-black tracking-[0.13em] text-amber-300",children:"PRE-COMMITMENT"}),t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:178",id:"limit-settings-title",className:"mt-1 text-lg font-extrabold text-white",children:"ขีดจำกัดของฉัน"})]}),t.jsx(H,{"data-loc":"client/src/pages/SmartLimitPage.tsx:178",className:"h-5 w-5 text-slate-600"})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:179",className:"mt-5 grid gap-4 sm:grid-cols-2",children:U.map(e=>t.jsxs("label",{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",className:e.key==="breakMinutes"?"sm:col-span-2":"",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",className:"text-xs font-bold text-slate-200",children:e.label}),t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",className:"mt-1 block text-[9px] leading-4 text-slate-500",children:e.help}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",className:"relative mt-2",children:[t.jsx(N,{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",disabled:L,type:"number",inputMode:"decimal",min:e.min,max:e.max,value:s.settings[e.key],onChange:a=>V(e.key,a.target.valueAsNumber),className:"h-12 rounded-xl border-white/10 bg-[#090b12] pr-14 text-white disabled:cursor-not-allowed disabled:opacity-50"}),t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:180",className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-[10px] font-bold text-slate-500",children:e.suffix})]})]},e.key))}),t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:182",type:"button",disabled:L,onClick:Q,className:"mt-5 h-12 w-full rounded-xl bg-amber-400 font-black text-[#090a0f] hover:bg-amber-300 disabled:opacity-60",children:[t.jsx(H,{"data-loc":"client/src/pages/SmartLimitPage.tsx:182",className:"h-4 w-4"}),L?"ล็อกขีดจำกัดระหว่าง Session":"บันทึกและล็อกแผน"]}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:183",className:"mt-3 text-center text-[9px] leading-4 text-slate-600",children:"ระบบจะไม่เพิ่มขีดจำกัดใด ๆ ให้คุณโดยอัตโนมัติ"})]}),t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:186","aria-labelledby":"session-tracker-title",className:"rounded-3xl border border-white/[0.07] bg-[#0d0f18] p-4 sm:p-6",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:187",className:"flex items-center justify-between",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:187",children:[t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:187",className:"text-[9px] font-black tracking-[0.13em] text-blue-300",children:"SESSION TRACKER"}),t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:187",id:"session-tracker-title",className:"mt-1 text-lg font-extrabold text-white",children:"รอบปัจจุบัน"})]}),t.jsx(et,{"data-loc":"client/src/pages/SmartLimitPage.tsx:187",className:"h-5 w-5 text-blue-300"})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",className:"mt-5 rounded-2xl border border-blue-400/15 bg-blue-400/[0.05] p-5 text-center",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",className:"text-[9px] font-bold tracking-[0.1em] text-slate-500",children:"SESSION TIME"}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",className:"mt-2 font-mono text-4xl font-black tracking-tight text-white",children:St(j)}),t.jsxs("button",{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",type:"button",onClick:F,className:"mt-4 inline-flex min-h-11 items-center gap-2 rounded-xl border border-blue-300/20 bg-blue-400/10 px-5 text-xs font-extrabold text-blue-200 active:scale-[.97]",children:[s.activity.startedAt?t.jsx(A,{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",className:"h-4 w-4"}):t.jsx(gt,{"data-loc":"client/src/pages/SmartLimitPage.tsx:188",className:"h-4 w-4"}),s.activity.startedAt?"พักตัวจับเวลา":j>0?"ทำต่อ":"เริ่มรอบ"]})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:189",className:"mt-4 grid gap-3",children:[["dailySpent","ยอดที่ใช้วันนี้",O],["sessionS
1pent","ยอดที่ใช้ในรอบ",O],["sessionLoss","ยอดขาดทุนรอบนี้",pt]].map(([e,a,r])=>{const m=r;return t.jsxs("label",{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"grid grid-cols-[34px_1fr_120px] items-center gap-2 rounded-xl border border-white/[0.06] bg-white/[0.025] p-2",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"grid h-8 w-8 place-items-center rounded-lg bg-white/[0.04] text-slate-500",children:t.jsx(m,{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"h-4 w-4"})}),t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"text-[10px] font-bold text-slate-300",children:String(a)}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"relative",children:[t.jsx(N,{"data-loc":"client/src/pages/SmartLimitPage.tsx:190","aria-label":String(a),type:"number",inputMode:"decimal",min:0,max:1e7,value:s.activity[e],onChange:b=>W(e,b.target.valueAsNumber),className:"h-9 rounded-lg border-white/10 bg-[#070810] pr-9 text-right text-xs text-white"}),t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:190",className:"pointer-events-none absolute inset-y-0 right-2 flex items-center text-[8px] text-slate-600",children:"฿"})]})]},String(e))})}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:192",className:"mt-4 grid grid-cols-2 gap-2",children:[t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:192",type:"button",variant:"outline",onClick:z,className:"h-11 rounded-xl border-white/10 bg-transparent text-xs text-slate-300",children:[t.jsx(ht,{"data-loc":"client/src/pages/SmartLimitPage.tsx:192",className:"h-4 w-4"}),"บันทึกว่าพักแล้ว"]}),t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:192",type:"button",variant:"outline",onClick:q,className:"h-11 rounded-xl border-white/10 bg-transparent text-xs text-slate-300",children:[t.jsx(at,{"data-loc":"client/src/pages/SmartLimitPage.tsx:192",className:"h-4 w-4"}),"เริ่มรอบใหม่"]})]})]})]}),t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:196",className:"mt-5 rounded-3xl border border-white/[0.07] bg-[#0d0f18] p-4 sm:p-6","aria-labelledby":"limit-status-title",children:[t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:197",id:"limit-status-title",className:"text-lg font-extrabold text-white",children:"สถานะขีดจำกัด"}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:D.slice(0,4).map(e=>t.jsxs("article",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"rounded-2xl border border-white/[0.06] bg-[#090b12] p-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"flex items-center justify-between",children:[t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"text-xs text-slate-200",children:e.label}),t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:`h-2 w-2 rounded-full ${e.kind==="reached"?"bg-red-400":e.kind==="warning"?"bg-amber-300":"bg-emerald-400"}`})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"mt-3 h-1.5 overflow-hidden rounded-full bg-white/[0.06]",children:t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:`h-full rounded-full ${e.kind==="reached"?"bg-red-400":e.kind==="warning"?"bg-amber-300":"bg-emerald-400"}`,style:{width:`${Math.min(100,e.ratio*100)}%`}})}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:198",className:"mt-3 text-[9px] leading-4 text-slate-500",children:e.detail})]},e.label))})]}),t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:201",className:"mt-5 rounded-3xl border border-white/[0.07] bg-[#0d0f18] p-4 sm:p-6","aria-labelledby":"behavior-monitor-title",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",children:[t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",className:"text-[9px] font-black tracking-[0.13em] text-cyan-300",children:"AI BEHAVIOR MONITOR"}),t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",id:"behavior-monitor-title",className:"mt-1 text-lg font-extrabold text-white",children:"ตรวจพฤติกรรม ไม่ทำนายผลเกม"}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",className:"mt-2 text-[10px] leading-5 text-slate-500",children:"ข้อมูลส่วนนี้เà¸
1à¹‡à¸šà¹ƒà¸™à¸­à¸¸à¸›à¸à¸£à¸“์และแยกตามบัญชีเดียวกับ Smart Limit"})]}),t.jsx(st,{"data-loc":"client/src/pages/SmartLimitPage.tsx:202",className:"h-6 w-6 text-cyan-300"})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:203",className:"mt-4 grid gap-3 lg:grid-cols-[.9fr_1.1fr]",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:204",className:"grid gap-3 rounded-2xl border border-white/[0.06] bg-[#090b12] p-3",children:[t.jsxs("label",{"data-loc":"client/src/pages/SmartLimitPage.tsx:205",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:205",className:"text-[10px] font-bold text-slate-300",children:"เกมปัจจุบัน"}),t.jsx("select",{"data-loc":"client/src/pages/SmartLimitPage.tsx:205",value:i.gameId,onChange:e=>l(a=>({...a,gameId:e.target.value,gameSwitches:a.gameId===e.target.value?a.gameSwitches:a.gameSwitches+1})),className:"mt-2 h-11 w-full rounded-xl border border-white/10 bg-[#070810] px-3 text-xs text-white",children:K.map(e=>t.jsxs("option",{"data-loc":"client/src/pages/SmartLimitPage.tsx:205",value:e.id,children:[e.thaiName," · ",C[e.id].unit]},e.id))})]}),t.jsxs("label",{"data-loc":"client/src/pages/SmartLimitPage.tsx:206",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:206",className:"text-[10px] font-bold text-slate-300",children:C[i.gameId].stake}),t.jsx(N,{"data-loc":"client/src/pages/SmartLimitPage.tsx:206","aria-label":C[i.gameId].stake,type:"number",min:0,value:i.currentStake,onChange:e=>l(a=>({...a,currentStake:Math.max(0,e.target.valueAsNumber||0)})),className:"mt-2 h-11 rounded-xl border-white/10 bg-[#070810] text-white"})]}),t.jsxs("label",{"data-loc":"client/src/pages/SmartLimitPage.tsx:207",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:207",className:"text-[10px] font-bold text-slate-300",children:"เงินต่อรอบสูงสุดตามแผน"}),t.jsx(N,{"data-loc":"client/src/pages/SmartLimitPage.tsx:207","aria-label":"เงินต่อรอบสูงสุดตามแผน",type:"number",min:0,disabled:L,value:i.maxStake,onChange:e=>l(a=>({...a,maxStake:Math.max(0,e.target.valueAsNumber||0)})),className:"mt-2 h-11 rounded-xl border-white/10 bg-[#070810] text-white disabled:opacity-50"})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:208",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:208",className:"text-[10px] font-bold text-slate-300",children:"บันทึกผลเพื่อดูรูปแบบเดิมพัน"}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:208",className:"mt-2 grid grid-cols-3 gap-2",children:["win","loss","push"].map(e=>t.jsx("button",{"data-loc":"client/src/pages/SmartLimitPage.tsx:208",disabled:P,type:"button",onClick:()=>X(e),className:"min-h-11 rounded-xl border border-white/10 bg-white/[0.03] text-[10px] font-black text-slate-300 disabled:opacity-40",children:e==="win"?"ชนะ":e==="loss"?"เสีย":"เสมอ"},e))})]}),t.jsx("button",{"data-loc":"client/src/pages/SmartLimitPage.tsx:209",type:"button",onClick:()=>l(e=>({...e,skippedBreaks:e.skippedBreaks+1})),className:"min-h-11 rounded-xl border border-amber-300/20 bg-amber-300/[0.06] text-[10px] font-bold text-amber-200",children:"บันทึกว่าข้ามช่วงพัก"})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:211",className:"rounded-2xl border border-white/[0.06] bg-[#090b12] p-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"grid grid-cols-[88px_1fr] items-center gap-4",children:[t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:`grid h-20 w-20 place-items-center rounded-full border-8 ${c.level==="critical"?"border-red-500/70":c.level==="high"?"border-orange-400/70":c.level==="moderate"?"border-amber-300/70":"border-emerald-400/70"}`,children:t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"text-center",children:[t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"block text-xl text-white",children:c.score}),t.jsx("small",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"text-[7px] text-slate-600",children:"RISK"})]})}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"text-[9px] font-black text-amber-300",children:c.level.toUpperCase()}),t.jsxs("h3",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"mt-1 text-sm font-extrabold text-white",children:["Discipline ",R,"/100"]}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:212",className:"mt-1 text-[9px] leading-4 text-slate-500",children:"คะแนนวัดการทำตามแผน ไม่ให้รางวัลà¸
1ˆà¸²à¸à¸à¸³à¹„รหรือผลชนะ"})]})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:213",className:"mt-4 grid gap-2",children:c.factors.length?c.factors.map(e=>t.jsxs("article",{"data-loc":"client/src/pages/SmartLimitPage.tsx:213",className:"rounded-xl border border-white/[0.06] bg-white/[0.025] p-3",children:[t.jsxs("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:213",className:"text-[10px] text-amber-200",children:["+",e.points," · ",e.label]}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:213",className:"mt-1 text-[9px] leading-4 text-slate-500",children:e.detail})]},e.id)):t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:213",className:"rounded-xl border border-emerald-400/15 bg-emerald-400/[0.05] p-3 text-[10px] leading-5 text-emerald-100",children:"ยังไม่พบปัจจัยเตือนจากข้อมูลที่บันทึก แต่ควรตรวจ Limit และอารมณ์ต่อเนื่อง"})})]})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",className:"mt-4 rounded-2xl border border-white/[0.06] bg-[#090b12] p-3",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",className:"flex items-center gap-2",children:[t.jsx($,{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",className:"h-4 w-4 text-pink-300"}),t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",className:"text-xs text-white",children:"เช็กอารมณ์ระหว่าง Session"})]}),t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",role:"group","aria-label":"อารมณ์ระหว่าง Session",className:"mt-3 grid grid-cols-3 gap-2 sm:grid-cols-5",children:xt.map(e=>t.jsxs("button",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",type:"button","aria-pressed":i.emotion===e.id,onClick:()=>l(a=>({...a,emotion:e.id,emotionChecks:a.emotionChecks+1})),className:"min-h-12 rounded-xl border border-white/10 bg-white/[0.025] text-[9px] font-bold text-slate-400 aria-pressed:border-amber-300/50 aria-pressed:bg-amber-300/10 aria-pressed:text-amber-100",children:[t.jsx("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:216",className:"block text-base",children:e.icon}),e.label]},e.id))})]})]}),(P||v(i,o))&&t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219","aria-live":"assertive",className:"mt-5 rounded-3xl border border-red-400/30 bg-red-500/10 p-5 text-red-50","aria-labelledby":"cooldown-title",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"flex items-start gap-3",children:[t.jsx(B,{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"mt-1 h-6 w-6 shrink-0"}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",children:[t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"text-[9px] font-black tracking-[0.13em] text-red-300",children:"COOL-DOWN MODE"}),t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",id:"cooldown-title",className:"mt-1 text-xl font-black",children:"ควรหยุดและพักก่อนตัดสินใจต่อ"}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"mt-2 text-xs leading-6 text-red-100/70",children:"ระบบซ่อนปุ่มบันทึกรอบและไม่แสดงคำแนะนำเกม คุณยังดูเฉพาะเวลา แผน และเหตุผลความเสี่ยงได้"})]})]}),t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"mt-4 grid grid-cols-2 gap-2",children:[t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",type:"button",onClick:()=>T(10),className:"h-12 rounded-xl bg-red-500 font-black text-white",children:[t.jsx(A,{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"h-4 w-4"}),"พัก 10 นาที"]}),t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",type:"button",variant:"outline",onClick:E,className:"h-12 rounded-xl border-red-300/20 bg-transparent font-black text-red-100",children:[t.jsx(f,{"data-loc":"client/src/pages/SmartLimitPage.tsx:219",className:"h-4 w-4"}),"จบ Session"]})]})]}),!P&&t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",className:"mt-5 grid gap-3 sm:grid-cols-3",children:[t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",type:"button",variant:"outline",onClick:()=>T(10),className:"h-12 rounded-xl border-white/10 bg-transparent text-xs text-slate-300",children:[t.jsx(A,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",className:"h-4 w-4"}),"พัก 10 นาที"]}),t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",type:"button",variant:"outline",onClick:()=>l(e=>({...e,emotionChecks:e.emotionChecks+1})),className:"h-12 rounded-xl border-white/10 bg-transparent text-xs text-slate-300",children:[t.jsx($,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",className:"h-4 w-4"}),"ทบทวนอารมณ์"]}),t.jsxs(p,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",type:"button",onClick:E,className:"h-12 rounded-xl bg-amber-400 text-xs font-black text-[#090a0f]",children:[t.jsx(f,{"data-loc":"client/src/pages/SmartLimitPage.tsx:221",className:"h-4 w-4"}),"จบ Session และ Review"]})]}),t.jsxs("section",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mt-5 rounded-3xl border border-white/[0.07] bg-[#0d0f18] p-4 sm:p-6","aria-labelledby":"session-review-title",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"flex items-center justify-between",children:[t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",children:[t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] font-black tracking-[0.13em] text-violet-300",children:"SESSION REVIEW"}),t.jsx("h2",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",id:"session-review-title",className:"mt-1 text-lg font-extrabold text-white",children:"เรียนรู้จากการทำตามแผน"})]}),t.jsx(it,{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"h-5 w-5 text-violet-300"})]}),i.sessions.length?t.jsx("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mt-4 grid gap-2",children:i.sessions.slice(0,5).map(e=>t.jsxs("article",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"grid grid-cols-2 gap-2 rounded-2xl border border-white/[0.06] bg-[#090b12] p-3 sm:grid-cols-5",children:[t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] text-slate-500",children:["เกม",t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"block text-xs text-white",children:K.find(a=>a.id===e.gameId)?.thaiName})]}),t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] text-slate-500",children:["ผลสุทธิ",t.jsxs("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"block text-xs text-white",children:[e.netResult.toLocaleStr
1ing("th-TH")," ฿"]})]}),t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] text-slate-500",children:["รอบ",t.jsx("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"block text-xs text-white",children:e.rounds})]}),t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] text-slate-500",children:["พัก/เตือน",t.jsxs("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"block text-xs text-white",children:[e.breaksTaken,"/",e.warnings]})]}),t.jsxs("span",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"text-[9px] text-slate-500",children:["Discipline",t.jsxs("strong",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"block text-xs text-amber-200",children:[e.disciplineScore,"/100"]})]})]},e.id))}):t.jsxs("div",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mt-4 rounded-2xl border border-dashed border-white/10 p-5 text-center",children:[t.jsx(bt,{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mx-auto h-6 w-6 text-slate-700"}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mt-2 text-xs text-slate-500",children:"เมื่อจบ Session สรุปงบ เวลา การพัก คำเตือน และ Discipline จะปรากฏที่นี่"})]}),t.jsx("p",{"data-loc":"client/src/pages/SmartLimitPage.tsx:223",className:"mt-3 text-[9px] leading-4 text-slate-600",children:"คะแนนสูงหมายถึงทำตามแผนได้ดี ไม่ได้หมายถึงผลกำไรหรือความแม่นยำของสูตร"})]})]})}export{Tt 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.