(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[364],{2658:(e,a,s)=>{Promise.resolve().then(s.bind(s,5941))},5941:(e,a,s)=>{"use strict";s.d(a,{WorkspaceClient:()=>F});var t=s(5155),l=s(2115);let r=[{slash:"supply_demand",name:"supply_demand",badge:"default",active:!0},{slash:"ict_concepts",name:"ict_concepts",badge:"default"},{slash:"fibonacci",name:"fibonacci",badge:"default"},{slash:"wyckoff_phases",name:"wyckoff_phases",badge:"$5/mo",paid:!0},{slash:"smc_liquidity",name:"smc_liquidity",badge:"$9/mo",paid:!0},{slash:"session_killz",name:"session_killz",badge:"default"}],n=[{title:"EURUSD H1 — supply zones above 1.0860",time:"12:42",tool:"supply_demand",active:!0},{title:"GBPJPY: distribution or accumulation?",time:"Yesterday",tool:"wyckoff_phases"},{title:"ES futures FVG — Tuesday open",time:"Apr 28",tool:"ict_concepts"},{title:"Asian session range — XAUUSD",time:"Apr 27",tool:"session_killz"},{title:"Fib confluence at 1.27 ext",time:"Apr 25",tool:"fibonacci"}],i=[{role:"user",author:"You",time:"12:38",body:"Looking at EURUSD H1. I see price has been ranging. Can you mark the most recent supply zone above current price and highlight any unfilled FVG below? I want to know where to short from."},{role:"ai",author:"Coach",tool:"supply_demand",time:"12:38",provider:"codex-cli",latency:"1.2s",body:'

Two supply zones stand out on the H1, and one of them is the cleaner short. The higher zone, drawn between 1.0884 and 1.0871, is the origin of the impulse leg that broke down on April 28th — strong reaction, low time spent inside, no return. That is where institutional sell orders likely remain.

Below current price, the unfilled fair-value gap from the same impulse sits at 1.0832 – 1.0826. It has not been mitigated. If price rallies into the upper supply and the gap is your downside target, the reward-to-risk runs roughly 1 : 2.6 on a stop above 1.0892.

I have drawn both zones, the FVG, and a Fibonacci retracement from the swing high to the most recent low. Watch for a reaction at the 0.618 / 0.705 confluence — that is where the cleanest entry has historically lived on this pair.

',callout:[{k:"Entry",v:"1.0884",tone:"dn"},{k:"Stop",v:"1.0892",tone:""},{k:"Target",v:"1.0832",tone:"up"},{k:"R : R",v:"1 : 2.6",tone:"brass"}],actions:[{label:"Drew",val:"Supply zone \xd7 1",color:"var(--red)"},{label:"Drew",val:"Demand zone \xd7 1",color:"var(--green)"},{label:"Drew",val:"FVG box \xd7 1",color:"var(--accent)"},{label:"Drew",val:"Fibonacci \xd7 6",color:"var(--ink-3)"},{label:"Drew",val:"Trendline \xd7 1",color:"var(--ink-3)"}]}],c=function(){let e;let a=(e=42,()=>{let a=Math.imul((e=e+0x6d2b79f5|0)^e>>>15,1|e);return(((a=a+Math.imul(a^a>>>7,61|a)^a)^a>>>14)>>>0)/0x100000000}),s=[],t=1.0855;for(let e=0;e<22;e++){let l=t,r=l+(8e-4*Math.sin(.7*e)+(a()-.5)*6e-4),n=Math.max(l,r)+6e-4*a()+2e-4,i=Math.min(l,r)-6e-4*a()-2e-4;s.push({o:l,h:n,l:i,c:r}),t=r}for(let e=0;e<6;e++){let e=t,l=e+.0014+8e-4*a(),r=l+4e-4*a(),n=e-3e-4*a();s.push({o:e,h:r,l:n,c:l}),t=l}for(let e=0;e<8;e++){let e=t,l=e-.0018-.001*a(),r=e+3e-4*a(),n=l-6e-4*a();s.push({o:e,h:r,l:n,c:l}),t=l}for(let e=0;e<16;e++){let e=t,l=e+(a()-.5)*.0012,r=Math.max(e,l)+5e-4*a(),n=Math.min(e,l)-5e-4*a();s.push({o:e,h:r,l:n,c:l}),t=l}for(let e=0;e<20;e++){let e=t,l=e+(6e-4+(a()-.4)*8e-4),r=Math.max(e,l)+5e-4*a(),n=Math.min(e,l)-5e-4*a();s.push({o:e,h:r,l:n,c:l}),t=l}for(let e=0;e<8;e++){let e=t,l=e+(4e-4+(a()-.3)*7e-4),r=Math.max(e,l)+6e-4*a(),n=Math.min(e,l)-4e-4*a();s.push({o:e,h:r,l:n,c:l}),t=l}return s}(),o={supply:{startIdx:22,endIdx:79,top:1.0884,bottom:1.0871,label:"SUPPLY \xb7 H1"},demand:{startIdx:36,endIdx:79,top:1.0772,bottom:1.0758,label:"DEMAND"},fvg:{startIdx:30,endIdx:79,top:1.0832,bottom:1.0826,label:"FVG \xb7 UNFILLED"},fib:{startIdx:28,endIdx:79,high:1.0884,low:1.0758,levels:[{v:0,label:"0.0"},{v:.382,label:"0.382"},{v:.5,label:"0.500"},{v:.618,label:"0.618"},{v:.705,label:"0.705"},{v:1,label:"1.0"}]},trendline:{p1:{idx:27,price:1.0884},p2:{idx:78,price:1.086},label:"RESISTANCE"},entry:{idx:75,price:1.084,label:"LONG ENTRY \xb7 1.0840",direction:"long"}},d=c.map((e,a)=>1e3*(e.h-e.l)*(.6+.3*Math.sin(.4*a)+(Math.cos(.7*a)+1)*.15)),h={role:"ai",author:"Coach",tool:"wyckoff_phases",time:"12:43",provider:"anthropic-fallback",latency:"1.8s",body:'

Re-distribution is the working hypothesis, but it is not yet confirmed. Look at the structure: a sharp markdown after the supply rejection, sideways action through 16 hours, and now a creep back up on declining range. That is the classic cause-building phase — Phase B in Wyckoff terms.

What you want to see before committing to the short is an Upthrust After Distribution (UTAD) — a false break above the supply that gets sold immediately. The current touch is too clean and too slow to be that. Patience.

',actions:[{label:"Drew",val:"Phase A label",color:"var(--accent)"},{label:"Drew",val:"Phase B label",color:"var(--accent)"},{label:"Drew",val:"Phase C anticipated",color:"var(--bordeaux)"}]};var m=s(492),x=s(360),p=s(9009),u=s(3543);function j(e){let{activeTool:a,onToolChange:s,activeChat:i,onChatChange:c}=e,[o,d]=(0,l.useState)(""),h=o.trim().toLowerCase(),j=(0,l.useMemo)(()=>h?r.filter(e=>e.name.toLowerCase().includes(h)):r,[h]),v=(0,l.useMemo)(()=>h?n.filter(e=>e.title.toLowerCase().includes(h)||e.tool.toLowerCase().includes(h)):n,[h]);return(0,t.jsxs)("aside",{className:"sidebar col","aria-label":"Workspace navigation",children:[(0,t.jsxs)("div",{className:"brand",children:[(0,t.jsx)("div",{className:"brand-mark","aria-hidden":"true",children:"AI"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"brand-name",children:"AI Trading Coach"}),(0,t.jsx)("div",{className:"brand-sub",children:"aitrading.coach"})]}),(0,t.jsx)("span",{className:"brand-spacer"}),(0,t.jsx)("span",{className:"brand-version",children:"v1.4"})]}),(0,t.jsxs)("div",{className:"sb-search",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:"sb-search-input",children:"Search chats and tools"}),(0,t.jsxs)("div",{className:"sb-search-wrap",children:[(0,t.jsx)(m.A,{className:"sb-search-icon",size:13,"aria-hidden":"true"}),(0,t.jsx)("input",{id:"sb-search-input",type:"search",className:"sb-search-input",placeholder:"Search chats, tools…",value:o,onChange:e=>d(e.target.value),autoComplete:"off"})]})]}),(0,t.jsxs)("div",{className:"sb-section",children:[(0,t.jsxs)("div",{className:"sb-label",children:["My Tools",(0,t.jsx)("button",{type:"button",className:"add","aria-label":"New tool",children:(0,t.jsx)(x.A,{size:13,"aria-hidden":"true"})})]}),(0,t.jsxs)("div",{className:"sb-tools",role:"list",children:[j.map(e=>(0,t.jsxs)("button",{type:"button",role:"listitem",className:"tool-row ".concat(a===e.slash?"active":""),onClick:()=>s(e.slash),"aria-current":a===e.slash?"true":void 0,children:[(0,t.jsx)("span",{className:"tool-slash","aria-hidden":"true",children:"/"}),(0,t.jsx)("span",{className:"tool-name",children:e.name}),(0,t.jsx)("span",{className:"tool-badge ".concat(e.paid?"paid":""),children:e.paid?e.badge:""})]},e.slash)),0===j.length&&(0,t.jsxs)("div",{className:"sb-empty",children:['No tools match "',o,'"']})]})]}),(0,t.jsxs)("div",{className:"sb-section",children:[(0,t.jsxs)("div",{className:"sb-label",children:["Recent",(0,t.jsx)("button",{type:"button",className:"add","aria-label":"More chat options",children:(0,t.jsx)(p.A,{size:13,"aria-hidden":"true"})})]}),(0,t.jsxs)("div",{className:"sb-chats",role:"list",children:[v.map((e,a)=>(0,t.jsxs)("button",{type:"button",role:"listitem",className:"chat-row ".concat(i===a?"active":""),onClick:()=>c(a),"aria-current":i===a?"true":void 0,children:[(0,t.jsx)("div",{className:"chat-row-title",children:e.title}),(0,t.jsxs)("div",{className:"chat-row-meta",children:[(0,t.jsxs)("span",{children:["/",e.tool]}),(0,t.jsx)("span",{className:"dot","aria-hidden":"true"}),(0,t.jsx)("span",{children:e.time})]})]},e.title)),0===v.length&&(0,t.jsxs)("div",{className:"sb-empty",children:['No chats match "',o,'"']})]})]}),(0,t.jsx)("div",{className:"sb-spacer"}),(0,t.jsxs)("div",{className:"market-promo",role:"link",tabIndex:0,children:[(0,t.jsx)("div",{className:"market-promo-eyebrow",children:"Marketplace"}),(0,t.jsxs)("div",{className:"market-promo-title",children:["Browse ",(0,t.jsx)("em",{children:"coach"}),(0,t.jsx)("br",{}),"strategies"]}),(0,t.jsxs)("div",{className:"market-promo-meta",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"240+"})," tools"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"62"})," coaches"]})]})]}),(0,t.jsxs)("div",{className:"ea-status",children:[(0,t.jsx)("span",{className:"ea-dot","aria-hidden":"true"}),(0,t.jsx)("span",{children:"MT5 EA \xb7 authenticated"}),(0,t.jsx)("span",{className:"ea-meta",children:"14ms"})]}),(0,t.jsxs)("div",{className:"user-card",children:[(0,t.jsx)("div",{className:"avatar","aria-hidden":"true",children:"M"}),(0,t.jsxs)("div",{className:"user-info",children:[(0,t.jsx)("div",{className:"user-name",children:"marcus@atelier.fx"}),(0,t.jsxs)("div",{className:"user-tier",children:[(0,t.jsx)("span",{className:"pill",children:"PRO"}),"11 days left"]})]}),(0,t.jsx)("button",{type:"button",className:"icon-btn","aria-label":"Account settings",children:(0,t.jsx)(u.A,{size:14,"aria-hidden":"true"})})]})]})}var v=s(6939),y=s(9138),b=s(7708),g=s(6071),N=s(4234),f=s(1759);function k(e){let{provider:a,latency:s,variant:l}=e,r=a.split("-")[0];return"minimal"===l?(0,t.jsxs)("span",{className:"provider",children:[(0,t.jsx)("span",{style:{opacity:.5},children:"via"}),(0,t.jsx)("span",{style:{color:"var(--ink-2)"},children:a})]}):"verbose"===l?(0,t.jsxs)("span",{className:"provider",children:[(0,t.jsx)("span",{children:"provider"}),(0,t.jsxs)("span",{className:"provider-tag ".concat(r),children:[(0,t.jsx)("span",{className:"pdot"}),a]}),(0,t.jsx)("span",{className:"latency",children:s})]}):(0,t.jsx)("span",{className:"provider",children:(0,t.jsxs)("span",{className:"provider-tag ".concat(r),children:[(0,t.jsx)("span",{className:"pdot"}),a]})})}let w={ALLOWED_TAGS:["p","strong","em","span","br","ul","ol","li","code","pre"],ALLOWED_ATTR:["class"]};function S(e){let{m:a,providerVariant:s}=e,r=(0,l.useMemo)(()=>"ai"===a.role?f.Ay.sanitize(a.body,w):"",[a.role,a.body]);return"user"===a.role?(0,t.jsxs)("div",{className:"msg msg-user",children:[(0,t.jsxs)("div",{className:"msg-meta",children:[(0,t.jsxs)("span",{className:"msg-meta-author",children:[(0,t.jsx)("span",{className:"who",children:"You"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)("span",{children:a.time})]}),(0,t.jsx)("span",{className:"msg-meta-rule"})]}),(0,t.jsx)("div",{className:"msg-body",children:a.body})]}):(0,t.jsxs)("div",{className:"msg msg-ai",children:[(0,t.jsxs)("div",{className:"msg-meta",children:[(0,t.jsxs)("span",{className:"msg-meta-author",children:[(0,t.jsx)("span",{className:"who",children:"Coach"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsxs)("span",{children:["/",a.tool]}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)("span",{children:a.time})]}),(0,t.jsx)("span",{className:"msg-meta-rule"}),(0,t.jsx)(k,{provider:a.provider,latency:a.latency||"1.2s",variant:s})]}),(0,t.jsx)("div",{className:"msg-body",dangerouslySetInnerHTML:{__html:r}}),a.callout&&(0,t.jsx)("div",{className:"callout",children:a.callout.map((e,a)=>(0,t.jsxs)("div",{className:"callout-cell",children:[(0,t.jsx)("div",{className:"k",children:e.k}),(0,t.jsx)("div",{className:"v ".concat(e.tone||""),children:e.v})]},a))}),a.actions&&(0,t.jsxs)("div",{className:"actions",children:[(0,t.jsx)("span",{className:"actions-label",children:"Drew on chart →"}),a.actions.map((e,a)=>(0,t.jsxs)("span",{className:"chip",children:[(0,t.jsx)("span",{className:"chip-dot",style:{background:e.color}}),(0,t.jsx)("span",{className:"chip-val",children:e.val})]},a))]})]})}function C(e){let{messages:a,sending:s,onSend:r,providerVariant:n}=e,[i,c]=(0,l.useState)(""),o=(0,l.useRef)(null),d=(0,l.useRef)(null),h=(0,l.useRef)(!0);(0,l.useEffect)(()=>{let e=d.current;e&&h.current&&(e.scrollTop=e.scrollHeight)},[a,s]);let m=()=>{var e;i.trim()&&!s&&(r(i.trim()),c(""),h.current=!0,null===(e=o.current)||void 0===e||e.focus())};return(0,t.jsxs)("main",{className:"conv col","aria-label":"Conversation",children:[(0,t.jsxs)("div",{className:"conv-header",children:[(0,t.jsxs)("div",{className:"conv-crumbs",children:[(0,t.jsx)("span",{children:"Workspace"}),(0,t.jsx)("span",{className:"sep","aria-hidden":"true",children:"/"}),(0,t.jsx)("span",{className:"tool",children:"supply_demand"})]}),(0,t.jsxs)("div",{className:"conv-header-main",children:[(0,t.jsxs)("h1",{className:"conv-header-title",children:["EUR/USD H1 — supply zones ",(0,t.jsx)("em",{children:"above"})," 1.0860"]}),(0,t.jsxs)("div",{className:"conv-header-meta",children:[(0,t.jsx)("span",{children:"4 messages"}),(0,t.jsx)("span",{className:"dot","aria-hidden":"true"}),(0,t.jsx)("span",{children:"started 12:38"}),(0,t.jsx)("span",{className:"dot","aria-hidden":"true"}),(0,t.jsx)("span",{children:"3 drawings"})]})]}),(0,t.jsxs)("div",{className:"conv-header-actions",children:[(0,t.jsx)("button",{type:"button",className:"icon-btn","aria-label":"Back-test this analysis",children:(0,t.jsx)(v.A,{size:14,"aria-hidden":"true"})}),(0,t.jsx)("button",{type:"button",className:"icon-btn","aria-label":"Share conversation",children:(0,t.jsx)(y.A,{size:14,"aria-hidden":"true"})}),(0,t.jsx)("button",{type:"button",className:"icon-btn","aria-label":"Bookmark conversation",children:(0,t.jsx)(b.A,{size:14,"aria-hidden":"true"})}),(0,t.jsx)("span",{className:"conv-header-divider","aria-hidden":"true"}),(0,t.jsx)("button",{type:"button",className:"icon-btn","aria-label":"More options",children:(0,t.jsx)(p.A,{size:14,"aria-hidden":"true"})})]})]}),(0,t.jsxs)("div",{className:"messages",ref:d,onScroll:()=>{let e=d.current;if(!e)return;let a=e.scrollHeight-e.scrollTop-e.clientHeight;h.current=a<=80},children:[a.map((e,a)=>(0,t.jsx)(S,{m:e,providerVariant:n},"".concat(e.role,"-").concat(e.time,"-").concat(a))),s&&(0,t.jsxs)("div",{className:"msg msg-ai","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"msg-meta",children:[(0,t.jsxs)("span",{className:"msg-meta-author",children:[(0,t.jsx)("span",{className:"who",children:"Coach"}),(0,t.jsx)("span",{className:"sep","aria-hidden":"true",children:"\xb7"}),(0,t.jsx)("span",{children:"analyzing chart"})]}),(0,t.jsx)("span",{className:"msg-meta-rule","aria-hidden":"true"})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsxs)("div",{className:"typing","aria-hidden":"true",children:[(0,t.jsx)("span",{}),(0,t.jsx)("span",{}),(0,t.jsx)("span",{})]}),(0,t.jsx)("span",{className:"typing-label",children:"Reading 80 H1 bars \xb7 running /wyckoff_phases"})]})]})]}),(0,t.jsxs)("div",{className:"composer-wrap",children:[(0,t.jsxs)("div",{className:"composer",children:[(0,t.jsx)("label",{className:"sr-only",htmlFor:"composer-input",children:"Type your message"}),(0,t.jsx)("textarea",{id:"composer-input",ref:o,className:"composer-input",placeholder:"Ask the Coach to mark, draw, or analyze…",value:i,rows:1,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),m())}}),(0,t.jsxs)("div",{className:"composer-toolbar",children:[(0,t.jsxs)("span",{className:"composer-pill tool",children:["/supply_demand ",(0,t.jsx)("span",{className:"x","aria-hidden":"true",children:"\xd7"})]}),(0,t.jsx)("span",{className:"composer-pill",children:"EUR/USD \xb7 H1"}),(0,t.jsx)("span",{className:"composer-pill",children:"+ Attach chart"}),(0,t.jsx)("span",{className:"composer-spacer"}),(0,t.jsx)("button",{type:"button",className:"voice-btn","aria-label":"Voice input",children:(0,t.jsx)(g.A,{size:11,"aria-hidden":"true"})}),(0,t.jsxs)("button",{type:"button",className:"send-btn",disabled:!i.trim()||s,onClick:m,"aria-label":"Send message",children:[(0,t.jsx)(N.A,{size:11,"aria-hidden":"true"})," Send ",(0,t.jsx)("span",{className:"kbd",children:"↵"})]})]})]}),(0,t.jsxs)("div",{className:"composer-hint",children:[(0,t.jsx)("span",{className:"kbd-h",children:"↵"})," send \xb7 ",(0,t.jsx)("span",{className:"kbd-h",children:"⇧↵"})," newline \xb7"," ",(0,t.jsx)("span",{className:"kbd-h",children:"/"})," tools \xb7 ",(0,t.jsx)("span",{className:"kbd-h",children:"space"})," dictate"]})]})]})}function M(e){let{visible:a}=e,s=(0,l.useRef)(null),[r,n]=(0,l.useState)({w:800,h:500}),[i,h]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!s.current)return;let e=new ResizeObserver(e=>{let a=e[0].contentRect;n({w:a.width,h:a.height})});return e.observe(s.current),()=>e.disconnect()},[]),!a)return null;let m=r.w,x=r.h,p=Math.max(100,m-8-68),u=Math.max(100,x-18-26-36-4),j=18+u+4,v=c.flatMap(e=>[e.h,e.l]),y=Math.min(...v)-8e-4,b=Math.max(...v)+8e-4,g=b-y,N=e=>8+(e+.5)*(p/c.length),f=e=>18+(1-(e-y)/g)*u,k=Math.max(2,p/c.length*.65),w=[],S=.005*Math.ceil(y/.005);for(let e=S;e<=b;e+=.005)w.push(e);let C=[];for(let e=0;e{let l=N(e)-k/2,r=N(a)+k/2,n=f(s);return{x:l,y:n,w:r-l,h:f(t)-n}},W=_(D.startIdx,D.endIdx,D.top,D.bottom),E=_(I.startIdx,I.endIdx,I.top,I.bottom),R=_(z.startIdx,z.endIdx,z.top,z.bottom);return(0,t.jsxs)("div",{className:"chart-col col",children:[(0,t.jsxs)("div",{className:"chart-header",children:[(0,t.jsx)("span",{className:"chart-symbol",children:"EUR/USD"}),(0,t.jsx)("span",{className:"chart-tf",children:"H1"}),(0,t.jsx)("span",{className:"chart-price",children:M.toFixed(5)}),(0,t.jsx)("span",{className:"chart-change",children:"▲ +0.00214 \xb7 +0.197%"}),(0,t.jsxs)("span",{className:"chart-spread",children:["Spread ",(0,t.jsx)("strong",{children:"0.4"})]}),(0,t.jsx)("span",{className:"chart-spacer"}),(0,t.jsxs)("div",{className:"chart-toolbar",role:"toolbar",children:[(0,t.jsx)("button",{className:"chart-tool active",title:"Crosshair",children:"+"}),(0,t.jsx)("button",{className:"chart-tool",title:"Rectangle",children:"▭"}),(0,t.jsx)("button",{className:"chart-tool",title:"Trendline",children:"⟋"}),(0,t.jsx)("button",{className:"chart-tool",title:"Fibonacci",children:"\uD835\uDC53"}),(0,t.jsx)("button",{className:"chart-tool",title:"Indicators",children:"≣"}),(0,t.jsx)("button",{className:"chart-tool",title:"Settings",children:"⚙"})]})]}),(0,t.jsxs)("div",{className:"chart-body",ref:s,onMouseMove:e=>{if(!s.current)return;let a=s.current.getBoundingClientRect(),t=e.clientX-a.left,l=e.clientY-a.top;if(t<8||t>m-68||l<18||l>18+u){h(null);return}let r=Math.round((t-8)/(p/c.length)-.5);h({x:t,y:l,idx:Math.max(0,Math.min(c.length-1,r)),price:y+(1-(l-18)/u)*g})},onMouseLeave:()=>h(null),children:[(0,t.jsxs)("svg",{className:"chart-svg",viewBox:"0 0 ".concat(m," ").concat(x),preserveAspectRatio:"none",children:[(0,t.jsxs)("defs",{children:[(0,t.jsx)("pattern",{id:"fvgPattern",patternUnits:"userSpaceOnUse",width:"6",height:"6",patternTransform:"rotate(45)",children:(0,t.jsx)("line",{x1:"0",y1:"0",x2:"0",y2:"6",stroke:"var(--accent)",strokeWidth:"1",strokeOpacity:"0.3"})}),(0,t.jsxs)("linearGradient",{id:"supGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"var(--red)",stopOpacity:"0.18"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"var(--red)",stopOpacity:"0.06"})]}),(0,t.jsxs)("linearGradient",{id:"demGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"var(--green)",stopOpacity:"0.06"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"var(--green)",stopOpacity:"0.18"})]})]}),w.map((e,a)=>(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:8,x2:m-68,y1:f(e),y2:f(e),stroke:"var(--line)",strokeOpacity:"0.5",strokeDasharray:"1 4",strokeWidth:"1"}),(0,t.jsx)("text",{x:m-68+8,y:f(e)+3,fill:"var(--ink-4)",fontFamily:"var(--font-mono)",fontSize:"9.5",letterSpacing:"0.02em",children:e.toFixed(5)})]},"g-".concat(a))),[24,48,72].map(e=>(0,t.jsx)("line",{x1:N(e),x2:N(e),y1:18,y2:18+u,stroke:"var(--line)",strokeOpacity:"0.45",strokeDasharray:"1 6",strokeWidth:"1"},"d-".concat(e))),C.map((e,a)=>(0,t.jsx)("text",{x:N(e.idx),y:x-9,fill:"var(--ink-4)",fontFamily:"var(--font-mono)",fontSize:"9",textAnchor:"middle",letterSpacing:"0.04em",children:e.label},"t-".concat(a))),(0,t.jsx)("text",{x:N(11),y:14,fill:"var(--ink-5)",fontFamily:"var(--font-mono)",fontSize:"8.5",textAnchor:"middle",letterSpacing:"0.16em",children:"APR 28"}),(0,t.jsx)("text",{x:N(35),y:14,fill:"var(--ink-5)",fontFamily:"var(--font-mono)",fontSize:"8.5",textAnchor:"middle",letterSpacing:"0.16em",children:"APR 29"}),(0,t.jsx)("text",{x:N(59),y:14,fill:"var(--ink-5)",fontFamily:"var(--font-mono)",fontSize:"8.5",textAnchor:"middle",letterSpacing:"0.16em",children:"APR 30"}),(0,t.jsxs)("g",{className:"draw-anim draw-anim-delay-1",children:[(0,t.jsx)("rect",{x:W.x,y:W.y,width:W.w,height:W.h,fill:"url(#supGrad)"}),(0,t.jsx)("line",{x1:W.x,x2:W.x+W.w,y1:W.y,y2:W.y,stroke:"var(--red-2)",strokeOpacity:"0.85",strokeWidth:"1",strokeDasharray:"3 2"}),(0,t.jsx)("line",{x1:W.x,x2:W.x+W.w,y1:W.y+W.h,y2:W.y+W.h,stroke:"var(--red-2)",strokeOpacity:"0.6",strokeWidth:"1",strokeDasharray:"3 2"}),(0,t.jsx)("line",{x1:N(D.startIdx),x2:N(D.startIdx),y1:W.y-14,y2:W.y,stroke:"var(--red-2)",strokeOpacity:"0.6",strokeWidth:"1",strokeDasharray:"2 2"})]}),(0,t.jsxs)("g",{className:"draw-anim draw-anim-delay-2",children:[(0,t.jsx)("rect",{x:E.x,y:E.y,width:E.w,height:E.h,fill:"url(#demGrad)"}),(0,t.jsx)("line",{x1:E.x,x2:E.x+E.w,y1:E.y,y2:E.y,stroke:"var(--green-2)",strokeOpacity:"0.6",strokeWidth:"1",strokeDasharray:"3 2"}),(0,t.jsx)("line",{x1:E.x,x2:E.x+E.w,y1:E.y+E.h,y2:E.y+E.h,stroke:"var(--green-2)",strokeOpacity:"0.85",strokeWidth:"1",strokeDasharray:"3 2"})]}),(0,t.jsxs)("g",{className:"draw-anim draw-anim-delay-2",children:[(0,t.jsx)("rect",{x:R.x,y:R.y,width:R.w,height:R.h,fill:"url(#fvgPattern)"}),(0,t.jsx)("rect",{x:R.x,y:R.y,width:R.w,height:R.h,fill:"none",stroke:"var(--accent)",strokeOpacity:"0.7",strokeWidth:"1",strokeDasharray:"4 3"})]}),(0,t.jsx)("g",{className:"draw-anim draw-anim-delay-3",children:O.levels.map((e,a)=>{let s=f(O.high-(O.high-O.low)*e.v),l=N(O.startIdx),r=N(O.endIdx)+k/2,n=.618===e.v||.705===e.v,i=0===e.v||1===e.v;return(0,t.jsx)("g",{children:(0,t.jsx)("line",{x1:l,x2:r,y1:s,y2:s,stroke:n?"var(--accent)":i?"var(--ink-3)":"var(--ink-4)",strokeOpacity:n?.7:i?.4:.3,strokeWidth:"1",strokeDasharray:n?"0":i?"0":"2 3"})},"f-".concat(a))})}),(0,t.jsxs)("g",{className:"draw-anim draw-anim-delay-3",children:[(0,t.jsx)("line",{x1:N(F.p1.idx),y1:f(F.p1.price),x2:N(F.p2.idx),y2:f(F.p2.price),stroke:"var(--bordeaux-2)",strokeWidth:"1.5",strokeOpacity:"0.85",strokeDasharray:"6 3"}),(0,t.jsx)("circle",{cx:N(F.p1.idx),cy:f(F.p1.price),r:"3.5",fill:"var(--bordeaux-2)",stroke:"var(--bg-inset)",strokeWidth:"1"}),(0,t.jsx)("circle",{cx:N(F.p2.idx),cy:f(F.p2.price),r:"3.5",fill:"var(--bordeaux-2)",stroke:"var(--bg-inset)",strokeWidth:"1"})]}),c.map((e,a)=>{let s=e.c>=e.o,l=N(a),r=f(e.o),n=f(e.c),i=f(e.h),c=f(e.l),o=Math.min(r,n),d=Math.max(1,Math.abs(n-r)),h=s?"var(--green-2)":"var(--red-2)";return(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:l,x2:l,y1:i,y2:c,stroke:h,strokeWidth:"1",strokeOpacity:"0.95"}),(0,t.jsx)("rect",{x:l-k/2,y:o,width:k,height:d,fill:h,fillOpacity:"0.95"})]},"c-".concat(a))}),(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:8,x2:m-68,y1:j,y2:j,stroke:"var(--line)",strokeOpacity:"0.6",strokeWidth:"1"}),c.map((e,a)=>{let s=e.c>=e.o,l=d[a]/A*32;return(0,t.jsx)("rect",{x:N(a)-k/2,y:j+36-l,width:k,height:l,fill:s?"var(--green)":"var(--red)",fillOpacity:"0.5"},"v-".concat(a))}),(0,t.jsx)("text",{x:12,y:j+11,fill:"var(--ink-5)",fontFamily:"var(--font-mono)",fontSize:"8.5",letterSpacing:"0.18em",children:"VOL"})]}),(0,t.jsx)("line",{x1:8,x2:m-68,y1:f(M),y2:f(M),stroke:"var(--accent)",strokeWidth:"1",strokeOpacity:"0.7",strokeDasharray:"2 2"}),(0,t.jsx)("rect",{x:m-68+2,y:f(M)-9,width:62,height:18,fill:"var(--accent)",rx:"2"}),(0,t.jsx)("text",{x:m-68+8,y:f(M)+3.5,fill:"var(--bg)",fontFamily:"var(--font-mono)",fontSize:"10.5",fontWeight:"700",letterSpacing:"-0.01em",children:M.toFixed(5)}),(0,t.jsxs)("g",{className:"draw-anim draw-anim-delay-4",children:[(0,t.jsx)("line",{x1:N(T.idx)-22,x2:N(T.idx)+2,y1:f(T.price)+18,y2:f(T.price)+3,stroke:"var(--accent)",strokeWidth:"1.5"}),(0,t.jsx)("polygon",{points:"".concat(N(T.idx)-2,",").concat(f(T.price)+9," ").concat(N(T.idx)+4,",").concat(f(T.price)+0," ").concat(N(T.idx)+5,",").concat(f(T.price)+7),fill:"var(--accent)"})]}),i&&(0,t.jsxs)("g",{pointerEvents:"none",children:[(0,t.jsx)("line",{x1:i.x,x2:i.x,y1:18,y2:18+u,stroke:"var(--ink-3)",strokeOpacity:"0.4",strokeWidth:"1",strokeDasharray:"2 3"}),(0,t.jsx)("line",{x1:8,x2:m-68,y1:i.y,y2:i.y,stroke:"var(--ink-3)",strokeOpacity:"0.4",strokeWidth:"1",strokeDasharray:"2 3"}),(0,t.jsx)("rect",{x:m-68+2,y:i.y-9,width:62,height:18,fill:"var(--bg-3)",stroke:"var(--line-2)",rx:"2"}),(0,t.jsx)("text",{x:m-68+8,y:i.y+3.5,fill:"var(--ink)",fontFamily:"var(--font-mono)",fontSize:"10",fontWeight:"500",children:i.price.toFixed(5)})]})]}),(0,t.jsxs)("div",{className:"chart-legend",children:[(0,t.jsx)("div",{className:"chart-legend-title",children:"AI Annotations"}),(0,t.jsxs)("div",{className:"legend-row",children:[(0,t.jsx)("div",{className:"legend-swatch supply"})," Supply"]}),(0,t.jsxs)("div",{className:"legend-row",children:[(0,t.jsx)("div",{className:"legend-swatch demand"})," Demand"]}),(0,t.jsxs)("div",{className:"legend-row",children:[(0,t.jsx)("div",{className:"legend-swatch fvg"})," FVG"]}),(0,t.jsxs)("div",{className:"legend-row",children:[(0,t.jsx)("div",{className:"legend-swatch fib"})," Fib 0.618 / 0.705"]}),(0,t.jsxs)("div",{className:"legend-row",children:[(0,t.jsx)("div",{className:"legend-swatch entry"})," Entry"]})]}),(0,t.jsxs)("div",{className:"draw-label supply draw-anim draw-anim-delay-1",style:{left:W.x+8,top:W.y-11},children:[D.label," \xb7 1.0884–1.0871"]}),(0,t.jsx)("div",{className:"draw-label demand draw-anim draw-anim-delay-2",style:{left:E.x+8,top:E.y+E.h-11},children:I.label}),(0,t.jsx)("div",{className:"draw-label fvg draw-anim draw-anim-delay-2",style:{left:R.x+R.w-130,top:R.y-11},children:z.label}),O.levels.filter(e=>.618===e.v||.705===e.v||0===e.v||1===e.v).map(e=>{let a=O.high-(O.high-O.low)*e.v;return(0,t.jsx)("div",{className:"draw-label fib draw-anim draw-anim-delay-3",style:{left:N(O.startIdx)-6,top:f(a)-7,transform:"translateX(-100%)"},children:e.label},"fl-".concat(e.v))}),(0,t.jsxs)("div",{className:"draw-label entry draw-anim draw-anim-delay-4",style:{left:N(T.idx)-130,top:f(T.price)+22},children:["↑ ",T.label]}),(0,t.jsx)("div",{className:"chart-watermark",children:(0,t.jsx)("span",{className:"sig",children:"drawn by /supply_demand"})})]}),(0,t.jsxs)("div",{className:"chart-statusbar",children:[(0,t.jsx)("span",{className:"live",children:"LIVE"}),(0,t.jsxs)("span",{className:"stat",children:["Tick ",(0,t.jsx)("strong",{children:"12:43:08"})]}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)("span",{className:"stat",children:"FXPro–Real04"}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsxs)("span",{className:"stat",children:["Acct ",(0,t.jsx)("strong",{children:"★★★★3829"})]}),(0,t.jsx)("span",{className:"sep",style:{marginLeft:"auto"},children:"\xb7"}),(0,t.jsxs)("span",{className:"stat",children:[c.length," bars \xb7 80h"]}),(0,t.jsx)("span",{className:"sep",children:"\xb7"}),(0,t.jsx)("span",{className:"stat",children:"EA v1.4.2"})]})]})}function A(e){let{value:a,options:s,onChange:l}=e,r=Math.max(0,s.findIndex(e=>e.value===a)),n=s.length;return(0,t.jsxs)("div",{className:"twk-seg",role:"radiogroup",children:[(0,t.jsx)("div",{className:"twk-seg-thumb",style:{left:"calc(2px + ".concat(r," * (100% - 4px) / ").concat(n,")"),width:"calc((100% - 4px) / ".concat(n,")")}}),s.map(e=>(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":e.value===a,onClick:()=>l(e.value),children:e.label},e.value))]})}function D(e){let{checked:a,onChange:s}=e;return(0,t.jsx)("button",{type:"button",className:"twk-toggle","data-on":a?"1":"0",role:"switch","aria-checked":a,onClick:()=>s(!a),children:(0,t.jsx)("i",{})})}function I(e){let{title:a,children:s}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"twk-sect",children:a}),(0,t.jsx)("div",{className:"twk-row",children:s})]})}function z(e){let{tweaks:a,setTweak:s}=e,[r,n]=(0,l.useState)(!1);return r?(0,t.jsxs)("div",{className:"twk-panel",children:[(0,t.jsxs)("div",{className:"twk-hd",children:[(0,t.jsx)("b",{children:"Tweaks"}),(0,t.jsx)("button",{className:"twk-x","aria-label":"Close tweaks",onClick:()=>n(!1),children:"✕"})]}),(0,t.jsxs)("div",{className:"twk-body",children:[(0,t.jsx)(I,{title:"Theme",children:(0,t.jsx)(A,{value:a.theme,options:[{label:"Midnight",value:"midnight"},{label:"Carbon",value:"carbon"},{label:"Forest",value:"forest"}],onChange:e=>s("theme",e)})}),(0,t.jsx)(I,{title:"Font pairing",children:(0,t.jsx)(A,{value:a.fontPair,options:[{label:"Fraunces",value:"fraunces"},{label:"Instrument",value:"instrument"},{label:"DM Serif",value:"dmserif"}],onChange:e=>s("fontPair",e)})}),(0,t.jsx)(I,{title:"Density",children:(0,t.jsx)(A,{value:a.density,options:[{label:"Comfortable",value:"comfortable"},{label:"Compact",value:"compact"}],onChange:e=>s("density",e)})}),(0,t.jsx)(I,{title:"Message style",children:(0,t.jsx)(A,{value:a.messageStyle,options:[{label:"Editorial",value:"editorial"},{label:"Bubble",value:"bubble"},{label:"Terminal",value:"terminal"}],onChange:e=>s("messageStyle",e)})}),(0,t.jsx)(I,{title:"Chart panel",children:(0,t.jsxs)("div",{className:"twk-row twk-row-h",children:[(0,t.jsx)("div",{className:"twk-lbl",children:(0,t.jsx)("span",{children:"Show MT5 chart"})}),(0,t.jsx)(D,{checked:a.chartVisible,onChange:e=>s("chartVisible",e)})]})}),(0,t.jsx)(I,{title:"Provider badge",children:(0,t.jsx)(A,{value:a.providerBadge,options:[{label:"Default",value:"default"},{label:"Minimal",value:"minimal"},{label:"Verbose",value:"verbose"}],onChange:e=>s("providerBadge",e)})})]})]}):(0,t.jsx)("button",{className:"twk-fab",title:"Open tweaks panel","aria-label":"Open tweaks panel",onClick:()=>n(!0),children:"◐"})}let O={theme:"midnight",fontPair:"fraunces",density:"comfortable",messageStyle:"editorial",chartVisible:!0,providerBadge:"default"};function F(){let[e,a]=(0,l.useState)(O),[s,r]=(0,l.useState)("supply_demand"),[n,c]=(0,l.useState)(0),[o,d]=(0,l.useState)(i),[m,x]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let a=document.documentElement;a.dataset.theme=e.theme,a.dataset.density=e.density,a.dataset.fontpair=e.fontPair,a.dataset.msgstyle=e.messageStyle,a.dataset.chart=e.chartVisible?"on":"off"},[e]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"app","data-screen-label":"Main Chat Workspace",children:[(0,t.jsx)(j,{activeTool:s,onToolChange:r,activeChat:n,onChatChange:c}),(0,t.jsx)(C,{messages:o,sending:m,onSend:e=>{d(a=>[...a,{role:"user",author:"You",time:"12:43",body:e}]),x(!0),window.setTimeout(()=>{d(e=>[...e,h]),x(!1)},1400)},providerVariant:e.providerBadge}),(0,t.jsx)(M,{visible:e.chartVisible})]}),(0,t.jsx)(z,{tweaks:e,setTweak:(e,s)=>{a(a=>({...a,[e]:s}))}})]})}}},e=>{var a=a=>e(e.s=a);e.O(0,[594,441,517,358],()=>a(2658)),_N_E=e.O()}]);