1"use strict";(self.webpackChunkmayabot_frontend=self.webpackChunkmayabot_frontend||[]).push([[9914],{1958:(s,e,c)=>{c.d(e,{$:()=>o});const t=new Set(["USDT","USDC","BUSD","DAI","TUSD","USDP","FDUSD","USDD","GUSD","FRAX"]),o=s=>t.has(s.toUpperCase())},2465:(s,e,c)=>{c.d(e,{o:()=>a});var t=c(2555),o=c(9950),n=c(3869);const a=()=>{const[s,e]=(0,o.useState)({}),[c,a]=(0,o.useState)(new Map),[i,l]=(0,o.useState)(0),[r,m]=(0,o.useState)(!1),p=(0,o.useRef)({}),g=(0,o.useRef)(new Map),h=(0,o.useRef)(Date.now());(0,o.useEffect)(()=>{(async()=>{try{console.log("[usePrices] Fetching initial prices from API");const s="https://api.bitox.org/api",c=await fetch("".concat(s,"/market/coins"));if(c.ok){const s=await c.json();if(s.success&&s.data&&Array.isArray(s.data)){const c={},t=new Map;s.data.forEach(s=>{if(s.symbol&&s.current_price){const e=s.symbol.toUpperCase(),o=parseFloat(s.current_price);if(c[e]=o,t.set(e,{symbol:e,price:o,change_percent:parseFloat(s.price_change_percent_24h||s.price_change_percent||s.price_change_24h_percent||0),volume_24h:parseFloat(s.volume_24h||0),high_24h:parseFloat(s.high_24h||0),low_24h:parseFloat(s.low_24h||0)}),e.endsWith("USDT")){const s=e.replace("USDT","");c[s]=o,t.set(s,t.get(e))}}}),p.current=c,g.current=t,e(c),a(t),l(Date.now()),h.current=Date.now(),console.log("[usePrices] Initial prices loaded:",Object.keys(c).length,"coins")}}}catch(s){console.error("[usePrices] Error fetching initial prices:",s)}})()},[]),(0,o.useEffect)(()=>{const s=n.A.channel("prices");console.log("[usePrices] Subscribing to prices channel");const c=s=>{if(console.log("[usePrices] Received price update:",s),h.current=Date.now(),s.prices&&Array.isArray(s.prices)){const c=(0,t.A)({},p.current),o=new Map(g.current);s.prices.forEach(s=>{if(s.symbol&&void 0!==s.price){const e=s.symbol.toUpperCase();if(c[e]=parseFloat(String(s.price)),o.set(e,(0,t.A)((0,t.A)({},s),{},{symbol:e})),e.endsWith("USDT")){const n=e.replace("USDT","");c[n]=parseFloat(String(s.price)),o.set(n,(0,t.A)((0,t.A)({},s),{},{symbol:n}))}}}),p.current=c,g.current=o,e(c),a(o)}else if(s.symbol&&void 0!==s.price){const c=s.symbol.toUpperCase();if(p.current=(0,t.A)((0,t.A)({},p.current),{},{[c]:parseFloat(String(s.price))}),g.current=new Map(g.current),g.current.set(c,(0,t.A)((0,t.A)({},s),{},{symbol:c})),c.endsWith("USDT")){const e=c.replace("USDT","");p.current[e]=parseFloat(String(s.price)),g.current.set(e,(0,t.A)((0,t.A)({},s),{},{symbol:e}))}e((0,t.A)({},p.current)),a(new Map(g.current))}const c=s.timestamp||Date.now();l(c),m(!0),h.current=c};s.listen(".price.updated",c),s.listen("price.updated",c),s.listen("PriceUpdated",c),s.listen(".PriceUpdated",c),s.listenToAll((s,e)=>{console.log("[usePrices] Received event on prices channel:",s,e)});const o=()=>m(!0),i=()=>m(!1);n.A.connector.pusher.connection.bind("connected",o),n.A.connector.pusher.connection.bind("disconnected",i);const r=setInterval(async()=>{const s=Date.now()-h.current;if(s>5e3)try{console.log("[usePrices] Polling prices (no WebSocket update for",Math.round(s/1e3),"seconds)");const c="https://api.bitox.org/api",t=await fetch("".concat(c,"/market/coins"));if(t.ok){const s=await t.json();if(s.success&&s.data&&Array.isArray(s.data)){const c={},t=new Map;s.data.forEach(s=>{if(s.symbol&&s.current_price){const e=s.symbol.toUpperCase(),o=parseFloat(s.current_price);if(c[e]=o,t.set(e,{symbol:e,price:o,change_percent:parseFloat(s.price_change_percent_24h||s.price_change_percent||s.price_change_24h_percent||0),volume_24h:parseFloat(s.volume_24h||0),high_24h:parseFloat(s.high_24h||0),low_24h:parseFloat(s.low_24h||0)}),e.endsWith("USDT")){const s=e.replace("USDT","");c[s]=o,t.set(s,t.get(e))}}}),p.current=c,g.current=t,e(c),a(t);const o=Date.now();l(o),h.current=o,console.log("[usePrices] Polled prices updated:",Object.keys(c).length,"coins")}}}catch(c){console.error("[usePrices] Polling error:",c)}},3e3);return()=>{clearInterval(r),s.stopListening(".price.updated",c),s.stopListening("price.updated",c),s.stopListening("PriceUpdated",c),s.stopListening(".PriceUpdated",c),s.stopListeningToAll(),n.A.leaveChannel("prices"),n.A.connector.pusher.connection.unbind("connected",o),n.A.connector.pusher.connection.unbind("disconnected",i)}},[]);const d=(0,o.useCallback)(e=>{const c=s[e]||p.current[e]||0;return c>0&&"BTC"===e&&console.log("[usePrices] getPrice called for",e,"=",c),c},[s]),u=(0,o.useCallback)(s=>
1c.get(s)||g.current.get(s),[c]);return{prices:s,priceInfos:c,getPrice:d,getPriceInfo:u,lastUpdate:i,isConnected:r}}},2832:(s,e,c)=>{c.d(e,{Zp:()=>a,Mx:()=>r,tU:()=>i});c(9950);var t=c(4414);const o={default:"glass-card",elevated:"glass-card-elevated",interactive:"glass-card-interactive"},n={none:"",sm:"p-3",md:"p-5",lg:"p-6"},a=s=>{let{variant:e="default",className:c="",padding:a="md",children:i,onClick:l}=s;return(0,t.jsx)("div",{className:"".concat(o[e]," ").concat(n[a]," ").concat(c),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:i})},i=s=>{let{tabs:e,activeTab:c,onChange:o,variant:n="pill",size:a="md",className:i=""}=s;return"underline"===n?(0,t.jsx)("div",{className:"flex border-b border-white/[0.06] ".concat(i),children:e.map(s=>(0,t.jsxs)("button",{onClick:()=>o(s.key),className:"\n tab-underline\n ".concat("sm"===a?"px-3 py-2 text-xs":"px-4 py-3 text-sm","\n ").concat(c===s.key?"active":"","\n "),children:[s.label,void 0!==s.count&&(0,t.jsxs)("span",{className:"ml-1.5 text-xs opacity-60",children:["(",s.count,")"]})]},s.key))}):(0,t.jsx)("div",{className:"tabs-modern ".concat(i),children:e.map(s=>(0,t.jsxs)("button",{onClick:()=>o(s.key),className:"\n tab-modern\n ".concat("sm"===a?"px-3 py-1.5 text-xs":"","\n ").concat(c===s.key?"active":"","\n "),children:[s.label,void 0!==s.count&&(0,t.jsx)("span",{className:"ml-1.5 text-xs opacity-60",children:s.count})]},s.key))})};var l=c(6468);const r=s=>{let{children:e,activeTab:c="",title:o,subtitle:n,noPadding:a=!1,className:i=""}=s;return(0,t.jsxs)("div",{className:"min-h-screen bg-bitox-bg text-white",children:[(0,t.jsx)(l.A,{activeTab:c}),(0,t.jsxs)("main",{className:"pt-20 ".concat(a?"":"px-4 lg:px-8 py-6"," ").concat(i),children:[(o||n)&&(0,t.jsxs)("div",{className:"mb-6",children:[o&&(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:o}),n&&(0,t.jsx)("p",{className:"text-sm text-bitox-text-secondary mt-1",children:n})]}),e]})]})}},4698:(s,e,c)=>{c.d(e,{Ay:()=>l});var t=c(9950),o=c(4414);const n={BTC:"https://assets.coingecko.com/coins/images/1/small/bitcoin.png",ETH:"https://assets.coingecko.com/coins/images/279/small/ethereum.png",USDT:"https://assets.coingecko.com/coins/images/325/small/Tether.png",USDC:"https://assets.coingecko.com/coins/images/6319/small/usdc.png",BNB:"https://assets.coingecko.com/coins/images/825/small/bnb-icon2_2x.png",SOL:"https://assets.coingecko.com/coins/images/4128/small/solana.png",XRP:"https://assets.coingecko.com/coins/images/44/small/xrp-symbol-white-128.png",ADA:"https://assets.coingecko.com/coins/images/975/small/cardano.png",DOGE:"https://assets.coingecko.com/coins/images/5/small/dogecoin.png",TRX:"https://assets.coingecko.com/coins/images/1094/small/tron-logo.png",LTC:"https://assets.coingecko.com/coins/images/2/small/litecoin.png",AVAX:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",DOT:"https://assets.coingecko.com/coins/images/12171/small/polkadot.png",MATIC:"https://assets.coingecko.com/coins/images/4713/small/polygon.png",LINK:"https://assets.coingecko.com/coins/images/877/small/chainlink-new-logo.png",UNI:"https://assets.coingecko.com/coins/images/12504/small/uni.png",ATOM:"https://assets.coingecko.com/coins/images/1481/small/cosmos_hub.png",XLM:"https://assets.coingecko.com/coins/images/100/small/Stellar_symbol_black_RGB.png",ALGO:"https://assets.coingecko.com/coins/images/4380/small/download.png",VET:"https://assets.coingecko.com/coins/images/1167/small/VET_Token_Icon.png",FIL:"https://assets.coingecko.com/coins/images/12817/small/filecoin.png",SHIB:"https://assets.coingecko.com/coins/images/11939/small/shiba.png",APT:"https://assets.coingecko.com/coins/images/26455/small/aptos_round.png",ARB:"https://assets.coingecko.com/coins/images/16547/small/photo_2023-03-29_21.47.00.jpeg",OP:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",SUI:"https://assets.coingecko.com/coins/images/26375/small/sui_asset.jpeg",PEPE:"https://assets.coingecko.com/coins/images/29850/small/pepe-token.jpeg",INJ:"https://assets.coingecko.com/coins/images/12882/small/Secondary_Symbol.png",TIA:"https://assets.coingecko.com/coins/images/31967/small/tia.jpg",WLD:"https://assets.coingecko.com/coins/images/31069/small/worldcoin.jpeg",RNDR:"https://assets.coingecko.com/coins/images/11636/small/rndr.png",FET:"https://assets.coingecko.com/coins/images/5681/small/Fetch.jpg",NEAR:"https://assets.coingecko.com/coins/images/10365/small/near.jpg",ICP:"https://assets.coingecko.com/coins/images/14495/small/Internet_Computer_logo.png",HBAR:"https://assets.coingecko.com/coins/images/3688/small/hbar.png",STX:"https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png",IMX:"https://assets.coingecko.com/coins/images/17233/small/immutableX-symbol-BLK-RGB.png",MKR:"https://assets.coingecko.com/coins/images/1364/small/Mark_Maker.png",GRT:"https://assets.coingecko.com/coins/images/13397/small/Graph_Token.png",AAVE:"https://assets.coingecko.com/coins/images/12645/small/AAVE.png",SAND:"https://assets.coingecko.com/coins/images/12129/small/sandbox_logo.jpg",MANA:"https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png",AXS:"https://assets.coingecko.com/coins/images/13029/small/axie_infinity_logo.png",THETA:"https://assets.coingecko.com/coins/images/2538/small/theta-token-logo.png",EOS:"https://assets.coingecko.com/coins/images/738/small/eos-eos-logo.png",XTZ:"https://assets.coingecko.com/coins/images/976/small/Tezos-logo.png",FLOW:"https://assets.coingecko.com/coins/images/13446/small/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.png",KAVA:"https://assets.coingecko.com/coins/images/9761/small/kava.png",EGLD:"https://assets.coingecko.com/coins/images/12335/small/egld-token-logo.png",NEO:"https://assets.coingecko.com/coins/images/480/small/NEO_512_512.png",IOTA:"https://assets.coingecko.com/coins/images/692/small/IOTA_Swirl.png",XMR:"https://assets.coingecko.com/coins/images/69/small/monero_logo.png",ETC:"https://assets.coingecko.com/coins/images/453/small/ethereum-classic-logo.png",BCH:"https://assets.coingecko.com/coins/images/780/small/bitcoin-cash-circle.png",FTM:"https://assets.coingecko.com/coins/images/4001/small/Fantom_round.png",CRO:"https://assets.coingecko.com/coins/images/7310/small/cro_token_logo.png",QNT:"https://assets.coingecko.com/coins/images/3370/small/5ZOu7brX_400x400.jpg",CHZ:"https://assets.coingecko.com/coins/images/8834/small/CHZ_Token_updated.png",LDO:"https://assets.coingecko.com/coins/images/13573/small/Lido_DAO.png",RUNE:"https://assets.coingecko.com/coins/images/6595/small/Rune200x200.png",ZEC:"https://assets.coingecko.com/coins/images/486/small/circle-zcash-color.png",DASH:"https://assets.coingecko.com/coins/images/19/small/dash-logo.png"},a={BTC:"\u20bf",ETH:"\u039e",XRP:"\u2715",BNB:"\u25c6",SOL:"\u25ce",ADA:"\u20b3",DOGE:"\xd0",TRX:"\u25ec",LTC:"\u0141",AVAX:"\ud83d\udd3a",DOT:"\u25cf",MATIC:"\u2b21",LINK:"\u2b22",UNI:"\ud83e\udd84",ATOM:"\u269b",XLM:"\u2726",ALGO:"\u25b3",VET:"V",FIL:"\u2a0e",SHIB:"\ud83d\udc15",APT:"A",ARB:"\ud83d\udd37",OP:"\ud83d\udd34",SUI:"\ud83d\udca7",PEPE:"\ud83d\udc38",INJ:"\u26a1",TIA:"\ud83c\udf19",WLD:"\ud83c\udf0d",RNDR:"\ud83c\udfa8",FET:"\ud83e\udd16",USDT:"\ud83d\udcb5",USDC:"\ud83d\udcb2"},i={sm:{container:"w-6 h-6",text:"text-sm",img:24},md:{container:"w-10 h-10",text:"text-xl",img:40},lg:{container:"w-12 h-12",text:"text-2xl",img:48},xl:{container:"w-16 h-16",text:"text-3xl",img:64}},l=s=>{let{symbol:e="UNKNOWN",logoUrl:c,size:l="md",className:r=""}=s;const[m,p]=(0,t.useState)(!1),g=i[l],h=e||"UNKNOWN",d=a[h.toUpperCase()]||h.charAt(0),u=((s,e)=>{if(!s)return null;const c=s.toUpperCase();return n[c]?n[c]:e||null})(h,c);return u&&!m?(0,o.jsx)("img",{src:u,alt:"".concat(e," logo"),width:g.img,height:g.img,className:"object-contain ".concat(r),style:{maxWidth:"".concat(g.img,"px"),maxHeight:"".concat(g.img,"px"),background:"transparent",backgroundColor:"transparent"},onError:()=>p(!0),loading:"lazy"}):(0,o.jsx)("div",{className:"".concat(g.container," bg-gradient-to-br from-blue-500 to-purple-500 rounded-full flex items-center justify-center ").concat(r),children:(0,o.jsx)("span",{className:"".concat(g.text," text-white font-bold"),children:d})})}}}]);
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.