1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9017],{16564:(e,n,t)=>{"use strict";t.d(n,{A:()=>m});var r=t(37876),a=t(43123),l=t(57175),s=t(16636),o=t(14232),i=t(31658),d=t(18376),c=t(12265),u=t(45267),p=t(12473),h=t(51389);let m=(0,l.B)(e=>{let{title:n,contentAfter:t,withTextAd:l,className:m,isLoading:v=!1,afterTitle:x,beforeTitle:g,secondRow:f}=e,w=(0,p.j)(),_=(0,i.A)(),[b,j]=o.useState(!1),k=o.useRef(null),y=o.useRef(null),C=o.useCallback(()=>{if(!k.current||!y.current)return;let e=k.current.getBoundingClientRect(),n=y.current.getBoundingClientRect();2*e.height<=n.height?j(!0):j(!1)},[]);o.useEffect(()=>{v||C()},[v,C]),o.useEffect(()=>{let e=(0,s.s)(C,1e3);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[C]);let A=o.useCallback(e=>{e.open?w.onOpen():w.onClose()},[w]);return(0,r.jsxs)(a.s,{className:m,flexDir:"column",rowGap:3,mb:6,children:[(0,r.jsxs)(a.s,{flexDir:"row",flexWrap:"wrap",rowGap:3,columnGap:3,alignItems:"center",children:[(0,r.jsxs)(a.s,{h:{base:"auto",lg:v?10:"auto"},maxW:"100%",alignItems:"center",children:[g,(0,r.jsx)(c.EA,{loading:v,overflow:"hidden",children:(0,r.jsx)(u.m,{content:n,open:w.open,onOpenChange:A,contentProps:{maxW:{base:"calc(100vw - 32px)",lg:"500px"}},closeOnScroll:!!_,disabled:!b,children:(0,r.jsx)(d.D,{ref:k,level:"1",whiteSpace:"normal",wordBreak:"break-all",style:{WebkitLineClamp:1,WebkitBoxOrient:"vertical",display:"-webkit-box"},overflow:"hidden",textOverflow:"ellipsis",onMouseEnter:w.onOpen,onMouseLeave:w.onClose,onClick:_?w.onToggle:void 0,children:(0,r.jsx)("span",{ref:y,children:n})})})}),x]}),t,l&&(0,r.jsx)(h.A,{order:{base:-1,lg:100},mb:{base:6,lg:0},ml:"auto",w:{base:"100%",lg:"auto"}})]}),f&&(0,r.jsx)(c.EA,{loading:v,alignItems:"center",minH:10,overflow:"hidden",display:"flex",_empty:{display:"none"},children:f})]})})},40124:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/visualize/sol2uml",function(){return t(45900)}])},45900:(e,n,t)=>{"use strict";t.r(n),t.d(n,{__N_SSP:()=>f,default:()=>w});var r=t(37876),a=t(14232),l=t(9771),s=t(43123),o=t(89099),i=t(57037),d=t(16564),c=t(57175),u=t(47152),p=t(26375),h=t(17979),m=t(45267),v=t(16937);let x=a.memo(e=>{var n,t;let{addressHash:l}=e,s=(0,u.A)("general:contract",{pathParams:{hash:l},queryOptions:{enabled:!!l,refetchOnMount:!1}}),o=(0,u.A)("visualize:solidity_contract",{fetchParams:{method:"POST",body:{sources:function(e){var n;if(!e)return{};let t=null===(n=e.additional_sources)||void 0===n?void 0:n.reduce((e,n)=>(e[n.file_path]=n.source_code,e),{});return{[e.file_path||"index.sol"]:e.source_code||"",...t}}(s.data)}},queryOptions:{queryKey:["solidity_contract",l],enabled:!!s.data,refetchOnMount:!1}}),i="data:image/svg+xml;base64,".concat(null===(n=o.data)||void 0===n?void 0:n.svg),d=a.useCallback(()=>{let e=new Image;e.src=i;let n=window.open(i);null==n||n.document.write(e.outerHTML)},[i]);return((0,p.A)(l),(0,h.A)(s),(0,h.A)(o),s.isPending||o.isPending)?(0,r.jsx)(v.A,{}):(null===(t=o.data)||void 0===t?void 0:t.svg)&&s.data?(0,r.jsx)(m.m,{content:"Click on image to zoom",positioning:{placement:"top"},children:(0,r.jsx)(c.B.img,{src:i,alt:"Contract ".concat(s.data.name," UML diagram"),onClick:d,cursor:"pointer",filter:{_light:"invert(0)",_dark:"invert(1)"}})}):(0,r.jsx)("span",{children:"No data for visualization"})}),g=()=>{var e;let n=(null===(e=(0,o.useRouter)().query.address)||void 0===e?void 0:e.toString())||"";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{title:"Solidity UML diagram"}),(0,r.jsxs)(s.s,{mb:10,flexWrap:"wrap",columnGap:3,children:[(0,r.jsx)("span",{children:"For contract"}),(0,r.jsx)(i.Ay,{address:{hash:n,is_contract:!0}})]}),(0,r.jsx)(x,{addressHash:n})]})};var f=!0;let w=()=>(0,r.jsx)(l.A,{pathname:"/visualize/sol2uml",children:(0,r.jsx)(g,{})})},77328:(e,n,t)=>{e.exports=t(89836)}},e=>{var n=n=>e(e.s=n);e.O(0,[9771,636,6593,8792],()=>n(40124)),_N_E=e.O()}]); 2//# sourceMappingURL=sol2uml-1a4338f2d2bd5c70.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.