PageSourceSearch

https://mstblockchain.com/static/js/34191.6b2f9513.chunk.js

js mstblockchain.com collected 2026-10-05 08:00:32 UTC 10,744 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkmstblockchain=self.webpackChunkmstblockchain||[]).push([[34191],{34191:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(65043),n=s(43119),o=s(23546),i=s(9341),a=s(76930),l=s(70579);const d=4;function c(){const{t:e}=(0,a.Bd)("homepage"),[t,s]=(0,r.useState)([]),[o,c]=(0,r.useState)([]),[m,h]=(0,r.useState)(0),p=t=>{if(!t)return e("Just_Now","Just now");const s=Math.floor((Date.now()-new Date(t))/1e3);return s<5?e("Just_Now","Just now"):s<60?`${s}s ${e("Ago","ago")}`:s<3600?`${Math.floor(s/60)}m ${e("Ago","ago")}`:`${Math.floor(s/3600)}h ${e("Ago","ago")}`};return(0,r.useEffect)((()=>{const e=async()=>{try{const[e,t]=await Promise.all([fetch("https://mstscan.com/api/v2/main-page/blocks"),fetch("https://mstscan.com/api/v2/main-page/transactions")]),r=await e.json(),n=await t.json(),o=((null===r||void 0===r?void 0:r.items)||r||[]).slice(0,d).map((e=>{var t,s;return{uid:e.hash,id:e.height,value:`${(Number((null===e||void 0===e?void 0:e.transaction_fees)||0)/1e18).toFixed(4)} MST`,txCount:null!==(t=null!==(s=e.transactions_count)&&void 0!==s?s:e.transaction_count)&&void 0!==t?t:0}}));for(;o.length<d;)o.push({uid:`empty-b-${o.length}`,id:"--",value:"--",txCount:0});const i=((null===n||void 0===n?void 0:n.items)||n||[]).slice(0,d).map((e=>{var t,s;const r=(null===e||void 0===e||null===(t=e.from)||void 0===t?void 0:t.hash)||"0x000000",n=(null===e||void 0===e||null===(s=e.to)||void 0===s?void 0:s.hash)||"0x000000";return{uid:e.hash,address:`${r.slice(0,6)}...${n.slice(-4)}`,value:`${(Number(e.value||0)/1e18).toFixed(4)} MST`,timestamp:e.timestamp}}));for(;i.length<d;)i.push({uid:`empty-t-${i.length}`,address:"--",value:"--",timestamp:null});s(o),c(i)}catch(e){console.error("API error:",e)}};e();const t=setInterval(e,3e3),r=setInterval((()=>{h((e=>e+1))}),1e3);return()=>{clearInterval(t),clearInterval(r)}}),[]),(0,l.jsxs)("section",{className:"relative bg-white text-gray-900 py-14 sm:py-18 md:py-24 px-4 sm:px-6 overflow-hidden font-sans",children:[(0,l.jsx)(n.P.div,{animate:{rotate:[360,0]},transition:{duration:60,repeat:1/0,ease:"linear"},className:"absolute top-[10%] left-[20%] w-[60%] h-[60%] border-[0.5px] border-red-300 rounded-full hidden lg:flex items-center justify-center pointer-events-none z-0",children:(0,l.jsx)("div",{className:"absolute w-[4px] h-[4px] bg-red-600 rounded-full bottom-[18%] right-[8%] shadow-[0_0_6px_#ff2d2d]"})}),(0,l.jsxs)(n.P.div,{animate:{y:[-15,15,-15],x:[-10,10,-10],rotate:[0,90,0]},transition:{duration:8,repeat:1/0,ease:"linear"},className:"absolute -top-5 -left-10 w-24 h-24 border border-red-500 rounded-full flex items-center justify-center opacity-60 z-0",children:[(0,l.jsx)("div",{className:"w-16 h-16 border border-red-500 rounded-full"}),(0,l.jsx)("div",{className:"absolute w-1.5 h-1.5 bg-accent rounded-full shadow-[0_0_10px_#ff2d2d] top-0"})]}),(0,l.jsx)("div",{className:"absolute inset-0 w-full h-full z-0 pointer-events-none rounded-2xl overflow-hidden",children:(0,l.jsx)(i.KQ,{dotSize:2,gap:15,baseColor:"#000000cd",activeColor:"#ff2727",proximity:180,shockRadius:50,shockStrength:5,resistance:750,returnDuration:1.5})}),(0,l.jsxs)("div",{className:"relative z-10 max-w-6xl mx-auto",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center text-center mb-10 sm:mb-12 md:mb-16",children:[(0,l.jsxs)("h2",{className:"bungee-regular text-3xl sm:text-4xl md:text-6xl bg-white leading-tight text-black font-extrabold uppercase",children:[e("Explorer_Title","MST")," ",(0,l.jsx)("span",{className:"text-transparent bg-clip-text bg-red-600",children:e("Explorer_Subtitle","EXPLORER")})]}),(0,l.jsx)("p",{className:"text-gray-600 max-w-md bg-white text-base sm:text-lg",children:e("Explorer_Desc","Real-time visualization of the MST mainnet ledger and transaction flow.")})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 md:gap-8",children:[(0,l.jsx)(u,{title:e("Latest_Blocks","Latest Blocks"),items:t,type:"block",formatTime:p,t:e}),(0,l.jsx)(u,{title:e("Latest_Transactions","Latest Transactions"),items:o,type:"tx",formatTime:p,t:e})]}),(0,l.jsx)("div",{className:"mt-10 sm:mt-12 md:mt-16 flex justify-center",children:(0,l.jsx)("a",{href:"https://mstscan.com/",target:"_blank",rel:"noopener noreferrer",className:"group relative px-8 sm:px-10 py-3 sm:py-4 text-sm font-bold bg-black text-white rounded-xl transition-all duration-300 hover:bg-red-500 border border-black/20 hover:border-red-600 text-center",children:e("View_All_Activity","VIEW ALL ACTIVITY")})}),(0,l.jsxs)(n.P.div,{animate:{y:[-15,15,-15],x:[-10,10,-10],rotate:[0,90,0]},transition:{duration:8,repeat:1/0,ease:"linear"},className:"absolute -top-5 -left-10 w-24 h-24 border border-red-500 rounded-full flex items-center justify-center opacity-60 z-0",children:[(0,l.jsx)("div",{className:"w-16 h-16 border border-red-500 rounded-full"}),(0,l.jsx)("div",{className:"absolute w-1.5 h-1.5 bg-accent rounded-full shadow-[0_0_10px_#ff2d2d] top-0"})]})]})]})}function u(e){let{title:t,items:s,type:r,formatTime:i,t:a}=e;return(0,l.jsx)("div",{className:"relative group",children:(0,l.jsxs)("div",{className:"relative bg-white/80 backdrop-blur-xl border border-black/50 border-[1px] rounded-xl sm:rounded-2xl p-4 sm:p-6 h-full z-10",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5 sm:mb-8",children:[(0,l.jsx)("h3",{className:"text-sm font-bold tracking-widest text-gray-500 uppercase",children:t}),(0,l.jsx)("div",{className:"p-2 bg-gray-100 rounded-lg",children:"block"===r?(0,l.jsx)(m,{}):(0,l.jsx)(h,{})})]}),(0,l.jsx)("div",{className:"space-y-4",children:(0,l.jsx)(o.N,{mode:"popLayout",children:s.map((e=>{const t="--"===e.id||"--"===e.address;return(0,l.jsxs)(n.P.div,{layout:!0,initial:{opacity:0,x:-20}
1,animate:{opacity:t?.4:1,x:0},exit:{opacity:0,scale:.95},transition:{type:"spring",stiffness:400,damping:30},className:`flex items-center justify-between p-3 sm:p-4 rounded-xl bg-gray-50 border border-black/20 border-[1px] ${t?"pointer-events-none":"hover:border-red-500/30 hover:bg-gray-100"} transition-colors`,children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[(0,l.jsx)("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-lg flex items-center justify-center flex-shrink-0 "+("block"===r?"bg-red-100 text-red-500":"bg-blue-100 text-blue-500"),children:(0,l.jsx)("span",{className:"text-xs font-bold",children:"block"===r?"BK":"TX"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-mono text-xs sm:text-sm font-medium truncate max-w-[120px] sm:max-w-none",children:"block"===r?`#${e.id}`:e.address}),(0,l.jsx)("p",{className:"text-[10px] text-gray-400 uppercase tracking-wider",children:"block"===r?`${e.txCount} ${a("Transactions_Count","Transactions")}`:a("Confirmed","Confirmed")})]})]}),(0,l.jsxs)("div",{className:"text-right",children:[(0,l.jsx)("p",{className:"text-sm font-bold text-red-500",children:e.value}),(0,l.jsx)("p",{className:"text-[10px] text-gray-500",children:e.timestamp?i(e.timestamp):"Just now"})]})]},e.uid)}))})})]})})}const m=()=>(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),h=()=>(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})},23546:(e,t,s)=>{s.d(t,{N:()=>v});var r=s(70579),n=s(65043),o=s(2190),i=s(34930),a=s(9674),l=s(91051);class d extends n.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c(e){let{children:t,isPresent:s}=e;const o=(0,n.useId)(),i=(0,n.useRef)(null),a=(0,n.useRef)({width:0,height:0,top:0,left:0}),{nonce:c}=(0,n.useContext)(l.Q);return(0,n.useInsertionEffect)((()=>{const{width:e,height:t,top:r,left:n}=a.current;if(s||!i.current||!e||!t)return;i.current.dataset.motionPopId=o;const l=document.createElement("style");return c&&(l.nonce=c),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n          [data-motion-pop-id="${o}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${t}px !important;\n            top: ${r}px !important;\n            left: ${n}px !important;\n          }\n        `),()=>{document.head.removeChild(l)}}),[s]),(0,r.jsx)(d,{isPresent:s,childRef:i,sizeRef:a,children:n.cloneElement(t,{ref:i})})}const u=e=>{let{children:t,initial:s,isPresent:o,onExitComplete:l,custom:d,presenceAffectsLayout:u,mode:h}=e;const p=(0,i.M)(m),x=(0,n.useId)(),f=(0,n.useCallback)((e=>{p.set(e,!0);for(const t of p.values())if(!t)return;l&&l()}),[p,l]),v=(0,n.useMemo)((()=>({id:x,initial:s,isPresent:o,custom:d,onExitComplete:f,register:e=>(p.set(e,!1),()=>p.delete(e))})),u?[Math.random(),f]:[o,f]);return(0,n.useMemo)((()=>{p.forEach(((e,t)=>p.set(t,!1)))}),[o]),n.useEffect((()=>{!o&&!p.size&&l&&l()}),[o]),"popLayout"===h&&(t=(0,r.jsx)(c,{isPresent:o,children:t})),(0,r.jsx)(a.t.Provider,{value:v,children:t})};function m(){return new Map}var h=s(28917);const p=e=>e.key||"";function x(e){const t=[];return n.Children.forEach(e,(e=>{(0,n.isValidElement)(e)&&t.push(e)})),t}var f=s(40293);const v=e=>{let{children:t,custom:s,initial:a=!0,onExitComplete:l,presenceAffectsLayout:d=!0,mode:c="sync",propagate:m=!1}=e;const[v,b]=(0,h.xQ)(m),g=(0,n.useMemo)((()=>x(t)),[t]),j=m&&!v?[]:g.map(p),w=(0,n.useRef)(!0),y=(0,n.useRef)(g),N=(0,i.M)((()=>
1new Map)),[k,C]=(0,n.useState)(g),[_,$]=(0,n.useState)(g);(0,f.E)((()=>{w.current=!1,y.current=g;for(let e=0;e<_.length;e++){const t=p(_[e]);j.includes(t)?N.delete(t):!0!==N.get(t)&&N.set(t,!1)}}),[_,j.length,j.join("-")]);const E=[];if(g!==k){let e=[...g];for(let t=0;t<_.length;t++){const s=_[t],r=p(s);j.includes(r)||(e.splice(t,0,s),E.push(s))}return"wait"===c&&E.length&&(e=E),$(x(e)),void C(g)}const{forceRender:L}=(0,n.useContext)(o.L);return(0,r.jsx)(r.Fragment,{children:_.map((e=>{const t=p(e),n=!(m&&!v)&&(g===_||j.includes(t));return(0,r.jsx)(u,{isPresent:n,initial:!(w.current&&!a)&&void 0,custom:n?void 0:s,presenceAffectsLayout:d,mode:c,onExitComplete:n?void 0:()=>{if(!N.has(t))return;N.set(t,!0);let e=!0;N.forEach((t=>{t||(e=!1)})),e&&(null===L||void 0===L||L(),$(y.current),m&&(null===b||void 0===b||b()),l&&l())},children:e},t)}))})}}}]);
2//# sourceMappingURL=34191.6b2f9513.chunk.js.map

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.