1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68009],{68009:(e,a,s)=>{s.d(a,{A:()=>b});var t=s(95155),r=s(12115),n=s(67909),d=s(47650),c=s(17077);function l(e){let{open:a,onClose:s,selectedFeeds:n,chartFeeds:l,onUpdateFeeds:o,onUpdateCharts:i,onUpdatePreferences:x,disabled:v=!1}=e,[f,h]=(0,r.useState)("Crypto"),[b,u]=(0,r.useState)(""),m=(0,r.useMemo)(()=>c.jP.filter(e=>e.category===f).filter(e=>!b||e.token.toLowerCase().includes(b.toLowerCase())||e.oraclePair.toLowerCase().includes(b.toLowerCase())),[f,b]),p=e=>{if(!v){if(x)return void x(e);e.tickerFeeds&&o(e.tickerFeeds),e.chartFeeds&&i(e.chartFeeds)}},[g,k]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{k(!0)},[]),a&&g)?(0,d.createPortal)((0,t.jsx)("div",{"data-sx":"sx-0ac0c2ef1c",className:"fixed inset-0 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",zIndex:1e4},children:(0,t.jsxs)("div",{"data-sx":"sx-158ecc79c7",className:"w-full max-w-[640px] mx-4 rounded-xl overflow-hidden animate-slide-down",style:{background:"var(--surface)",border:"1px solid var(--border)",maxHeight:"80vh",display:"flex",flexDirection:"column"},children:[(0,t.jsxs)("div",{"data-sx":"sx-d5ad1aed42",className:"px-5 py-4 flex items-center justify-between",style:{borderBottom:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{"data-sx":"sx-4c1a4bf296",children:[(0,t.jsx)("div",{"data-sx":"sx-c4591c2649",className:"text-[length:var(--vms-fs-15)] font-bold",style:{color:"var(--t0)"},children:"Customize Data Feed"}),(0,t.jsxs)("div",{"data-sx":"sx-c5fbc8d01f",className:"text-[length:var(--vms-fs-11)] mt-0.5",style:{color:"var(--t3)"},children:[n.length," feeds selected \xb7 ",l.length,"/",4," charts pinned"]})]}),(0,t.jsx)("button",{"data-sx":"sx-413cf62f5a",onClick:s,className:"px-3 py-1.5 rounded text-[length:var(--vms-fs-12)] font-semibold hover:brightness-110",style:{background:"var(--accent)",color:"#fff",border:"none"},children:"Done"})]}),(0,t.jsxs)("div",{"data-sx":"sx-baedded91c",className:"px-5 pt-3 pb-2 flex flex-wrap items-center gap-2",style:{borderBottom:"1px solid var(--border)"},children:[c.go.map(e=>(0,t.jsx)("button",{"data-sx":"sx-c50aefc16f",onClick:()=>{h(e),u("")},className:"px-3 py-1 rounded text-[length:var(--vms-fs-11)] font-medium transition-all",style:{background:f===e?"var(--accent)":"transparent",color:f===e?"#fff":"var(--t3)",border:"1px solid "+(f===e?"var(--accent)":"var(--border)")},children:e},e)),(0,t.jsx)("div",{"data-sx":"sx-4eb9a63523",className:"flex-1"}),(0,t.jsx)("input",{"data-sx":"sx-353407bf47",type:"text",placeholder:"Search...",value:b,onChange:e=>u(e.target.value),className:"px-2.5 py-1 rounded text-[length:var(--vms-fs-11)] mono outline-none",style:{background:"var(--bg)",color:"var(--t0)",border:"1px solid var(--border)",width:140}})]}),(0,t.jsx)("div",{"data-sx":"sx-2484e1700b",className:"flex-1 overflow-y-auto px-5 py-2",style:{maxHeight:"50vh"},children:0===m.length?(0,t.jsx)("div",{"data-sx":"sx-ebbdd90c7a",className:"py-8 text-center text-[length:var(--vms-fs-12)]",style:{color:"var(--t3)"},children:"No feeds match your search"}):(0,t.jsx)("div",{"data-sx":"sx-6d9fd8f7bf",className:"grid grid-cols-1 sm:grid-cols-2 gap-1.5",children:m.map(e=>{let a=n.includes(e.token),s=l.includes(e.token);return(0,t.jsxs)("div",{"data-sx":"sx-4608c50cb3",className:"flex items-center gap-2 px-3 py-2 rounded transition-all",style:{background:a?"rgba(37,99,235,0.06)":"transparent",border:"1px solid "+(s?"var(--accent)":a?"rgba(37,99,235,0.2)":"var(--border)")},children:[(0,t.jsx)("button",{"data-sx":"sx-08b743679f","aria-label":"Toggle feed ".concat(e.token),disabled:v,onClick:()=>{var a;return a=e.token,void(n.includes(a)?p({tickerFeeds:n.filter(e=>e!==a),...l.includes(a)?{chartFeeds:l.filter(e=>e!==a)}:{}}):p({tickerFeeds:[...n,a]}))},className:"w-4 h-4 rounded-sm flex items-center justify-center shrink-0 transition-all",style:{background:a?"var(--accent)":"transparent",border:"1.5px solid "+(a?"var(--accent)":"var(--t3)")},children:a&&(0,t.jsx)("span",{"data-sx":"sx-debf2db705",className:"text-[length:var(--vms-fs-9)] text-white font-bold",children:"â"})}),(0,t.jsxs)("div",{"data-sx":"sx-d0fc801411",className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{"data-sx":"sx-0d9bbc70af",className:"text-[length:var(--vms-fs-12)] font-semibold",style:{color:a?"var(--t0)":"var(--t2)"},children:e.token}),(0,t.jsx)("span",{"data-sx":"sx-da515c03b3",className:"mono text-[length:var(--vms-fs-9)] ml-2",style:{color:"var(--t3)"},children:e.oraclePair})]}),(0,t.jsx)("button",{"data-sx":"sx-fc76c1999c","aria-label":"Toggle chart ".concat(e.token),onClick:()=>{var a;return a=e.token,void(l.includes(a)?p({chartFeeds:l.filter(e=>e!==a)}):l.length<4&&p({chartFeeds:[...l,a],...!n.includes(a)?{tickerFeeds:[...n,a]}:{}}))},className:"px-1.5 py-0.5 rounded text-[length:var(--vms-fs-8)] mono uppercase font-bold transition-all shrink-0",style:{background:s?"var(--accent)":"transparent",color:s?"#fff":"var(--t3)",border:"1px solid "+(s?"var(--accent)":"var(--border)"),opacity:!s&&l.length>=4?.3:1},disabled:v||!s&&l.length>=4,title:!s&&l.length>=4?"Up to ".concat(4," feeds can be charted, so remove one first."):void 0,children:s?"Charted":"Chart"})]},e.token)})})}),(0,t.jsxs)("div",{"data-sx":"sx-e4cca56d7e",className:"px-5 py-3 flex items-center justify-between",style:{borderTop:"1px solid var(--border)",background:"var(--surface-2)"},children:[(0,t.jsx)("span",{"data-sx":"sx-bf03f85c57",className:"text-[length:var(--vms-fs-10)]",style:{color:"var(--t3)"},children:"Powered by Supra DORA Oracle"}),(0,t.jsx)("div",{"data-sx":"sx-e569c15e72",className:"flex items-center gap-2",children:(0,t.jsx)("button",{"data-sx":"sx-e45aaf9b00",disabled:v,onClick:()=>p({tickerFeeds:["ETH","SUPRA","AAVE","LINK","USDC","USDT"],chartFeeds:[]}),className:"text-[length:var(--vms-fs-10)] hover:underline",style:{color:"var(--t3)",background:"none",border:"none",cursor:"pointer"},children:"Reset defaults"})})]})]})}),document.body):null}var o=s(59627),i=s(310),x=s(49537),v=s(67347);function f(){return(0,t.jsx)("div",{"data-sx":"sx-700099d655",className:"mb-4",children:(0,t.jsx)("div",{"data-sx":"sx-93e9dfc219",className:"grid grid-cols-4 gap-3",children:Array.from({length:4}).map((e,a)=>(0,t.jsxs)("div",{"data-sx":"sx-cd021aa77a",className:"animate-pulse vms-glassable",style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:v.qA.card,padding:"10px 12px",display:"flex",flexDirection:"column",gap:8},children:[(0,t.jsxs)("div",{"data-sx":"sx-69c14a500a",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("div",{"data-sx":"sx-b4faa002f1",style:{width:56,height:11,borderRadius:v.qA.control,background:"var(--surface-2)"}}),(0,t.jsx)("div",{"data-sx":"sx-6967d69f73",style:{width:70,height:16,borderRadius:v.qA.control,background:"var(--surface-2)"}})]}),(0,t.jsx)("div",{"data-sx":"sx-74d108f507",style:{width:92,height:22,borderRadius:v.qA.control,background:"var(--surface-2)"}}),(0,t.jsx)("div",{"data-sx":"sx-ee5547973f",style:{height:130,borderRadius:v.qA.card,background:"var(--surface-2)"}})]},a))})})}let h=(0,n.default)(()=>
1Promise.all([s.e(59546),s.e(44414),s.e(66372)]).then(s.bind(s,66372)),{loadableGenerated:{webpack:()=>[66372]},ssr:!1,loading:()=>(0,t.jsx)(f,{})});function b(){let{editMode:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[a,s]=(0,r.useState)({}),n=(0,o.U)(),{selectedFeeds:d,chartFeeds:c}=n,[v,b]=(0,r.useState)(!1),u=!n.loading;(0,r.useEffect)(()=>b(!1),[n.owner]);let m=(0,r.useRef)({}),{prices:p}=(0,x.w5)(d,{websocketOnly:!0}),g=(0,r.useMemo)(()=>{let e={};for(let a of d){let s=p.get(a);s&&(e[a]={price:s.price,change:s.change24h})}return e},[p,d]),k=(0,r.useCallback)(e=>{n.save({tickerFeeds:e})},[n.save]),y=(0,r.useCallback)(e=>{n.save({chartFeeds:e})},[n.save]);return(0,r.useEffect)(()=>{let e={};for(let[a,s]of Object.entries(g)){let t=m.current[a];void 0!==t&&t!==s.price&&(e[a]=s.price>t?"up":"down"),m.current[a]=s.price}Object.keys(e).length>0&&(s(e),setTimeout(()=>s({}),1200))},[g]),(0,t.jsxs)("div",{"data-sx":"sx-f20efbcaba",children:[(0,t.jsx)(i.A,{preferences:n}),(0,t.jsxs)("div",{"data-sx":"sx-1c4c92bf48",className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("div",{"data-sx":"sx-2fb16cb0fe",className:"flex-1 relative overflow-hidden",style:{maskImage:"linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%)"},children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n @keyframes ticker-scroll {\n 0% { transform: translateX(0); }\n 100% { transform: translateX(-50%); }\n }\n .ticker-track { display: flex; gap: 12px; width: max-content; animation: ticker-scroll 40s linear infinite; align-items: center; }\n .ticker-track:hover { animation-play-state: paused; }\n "}}),(0,t.jsx)("div",{"data-sx":"sx-4cb0024759",className:"ticker-track",style:{paddingRight:12},children:[...d,...d].map((e,s)=>{let r=g[e],n=a[e],d=c.includes(e);return(0,t.jsxs)("button",{"data-sx":"sx-4079aadf3f",onClick:()=>{c.includes(e)?y(c.filter(a=>a!==e)):c.length<50&&y([...c,e])},className:"flex items-center gap-2 px-3 py-1 shrink-0 transition-all duration-300 hover:brightness-110",style:{background:"up"===n?"rgba(0,200,83,0.08)":"down"===n?"rgba(255,23,68,0.08)":"var(--surface-2)",borderRight:"1px solid ".concat("up"===n?"rgba(0,200,83,0.2)":"down"===n?"rgba(255,23,68,0.2)":"var(--border)"),cursor:"pointer",height:28},children:[(0,t.jsx)("span",{"data-sx":"sx-b51c0882bc",className:"mono text-[length:var(--vms-fs-10)] font-bold",style:{color:"var(--t1)",letterSpacing:"0.5px"},children:e}),r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{"data-sx":"sx-3cdc00ed1e",className:"mono text-[length:var(--vms-fs-12)] font-semibold tabular-nums",style:{color:"up"===n?"var(--positive)":"down"===n?"var(--negative)":"var(--t0)"},children:["$",r.price>=1?r.price.toLocaleString(void 0,{maximumFractionDigits:2}):r.price.toFixed(6)]}),(0,t.jsxs)("span",{"data-sx":"sx-2926f41c23",className:"mono text-[length:var(--vms-fs-10)]",style:{color:r.change>=0?"var(--positive)":"var(--negative)"},children:[r.change>=0?"+":"",r.change.toFixed(2),"%"]})]}):(0,t.jsx)("span",{"data-sx":"sx-ec2940cd8b",className:"mono text-[length:var(--vms-fs-10)]",style:{color:"var(--t3)"},children:"--"}),d&&(0,t.jsx)("span",{"data-sx":"sx-e1bfdc470e",className:"w-1 h-1",style:{background:"var(--accent)"}})]},"".concat(e,"-").concat(s))})})]}),(0,t.jsxs)("div",{"data-sx":"sx-51423181cf",className:"flex items-center gap-2 shrink-0",children:[c.length>0&&(0,t.jsx)("button",{"data-sx":"sx-2412489345",disabled:!n.canEdit,onClick:()=>y([]),className:"text-[length:var(--vms-fs-9)] mono hover:underline",style:{color:"var(--t3)",background:"none",border:"none",cursor:"pointer",whiteSpace:"nowrap"},children:"Clear charts"}),(0,t.jsx)("button",{"data-sx":"sx-59ba45d021",disabled:!n.canEdit,onClick:()=>b(!0),className:"text-[length:var(--vms-fs-10)] hover:underline",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer",whiteSpace:"nowrap"},children:"Customize"})]})]}),u?(0,t.jsx)(h,{activeCharts:c,onRemoveChart:e=>{y(c.filter(a=>a!==e))},maxCharts:50,onAddChart:e?()=>b(!0):void 0,showAddSlot:e}):(0,t.jsx)(f,{}),(0,t.jsx)(l,{open:v,onClose:()=>b(!1),selectedFeeds:d,chartFeeds:c,onUpdateFeeds:k,onUpdateCharts:y,onUpdatePreferences:n.save,disabled:!n.canEdit})]})}}}]);
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.