PageSourceSearch

https://sentinel-365-c9d4f.web.app/assets/MuralPage-Chp5F_cl.js

js sentinel-365-c9d4f.web.app collected 2026-10-03 12:37:32 UTC 7,361 bytes, 1 lines download raw bytes

1import{j as e,u as A,i as V,r as m}from"./react-vendor-pafHdoJx.js";import{E as F,b as $,d as W}from"./index-Db0fDLGN.js";import{bO as G,bP as U,X,L as _,as as J}from"./ui-vendor-DLXJn6s3.js";import"./map-vendor-Dr8zbd0c.js";import"./firebase-vendor-D3UzkAhn.js";const o={void:"#070B14",hair:"#1A2436",hairHi:"#263349",ink:"#E8EEF7",ink2:"#8A9BB3",ink3:"#56698A",accent:"#2E7BF6",ok:"#2FBF71",warn:"#F5A524",crit:"#F4453C"},S='ui-monospace, "SF Mono", Menlo, Consolas, monospace',K=12e4;function k(t){return t==="ok"?o.ok:t==="warn"?o.warn:t==="crit"?o.crit:o.accent}const Q={fontFamily:S,fontSize:10,letterSpacing:".2em",textTransform:"uppercase",color:o.ink3,margin:0};function at(){return e.jsx(F,{children:e.jsx(Y,{})})}function Y(){const t=A(),{data:i,loading:s,error:r,refetch:d}=$(()=>W.mural(),[]);L(d);const c=(i==null?void 0:i.paineis)||[];return e.jsxs("div",{style:{background:o.void,color:o.ink,minHeight:"100%"},children:[e.jsx(I,{titulo:"Mural da operação",legenda:"Cada painel abre em tela cheia — uma URL por monitor",loading:s,onAtualizar:d,acoes:e.jsxs(P,{onClick:()=>t("/ponte"),children:[e.jsx(G,{size:13})," Radar de prazos"]})}),r&&e.jsxs(N,{children:["Não consegui carregar o mural. ",String(r)]}),e.jsxs("div",{style:{display:"grid",gap:1,background:o.hair,gridTemplateColumns:"repeat(auto-fit, minmax(420px, 1fr))"},children:[c.map(a=>e.jsxs("div",{style:{background:o.void,padding:"18px 20px 20px",position:"relative"},children:[e.jsx("button",{onClick:()=>t(`/ponte/painel/${a.id}`),title:"Projetar em tela cheia","aria-label":`Projetar ${a.titulo} em tela cheia`,style:{position:"absolute",top:14,right:14,cursor:"pointer",background:"transparent",border:`1px solid ${o.hairHi}`,color:o.ink3,borderRadius:3,padding:6,lineHeight:0},children:e.jsx(U,{size:13})}),e.jsx(D,{painel:a})]},a.id)),!s&&c.length===0&&!r&&e.jsx("div",{style:{background:o.void,padding:22,color:o.ink3,fontSize:13},children:"Nenhum painel disponível."})]})]})}function lt(){return e.jsx(F,{children:e.jsx(Z,{})})}function Z(){const{painelId:t=""}=V(),i=A(),{data:s,loading:r,error:d,refetch:c}=$(()=>W.muralPainel(t),[t]);L(c);const a=s==null?void 0:s.painel;return e.jsxs("div",{style:{background:o.void,color:o.ink,minHeight:"100%",display:"flex",flexDirection:"column"},children:[e.jsx(I,{titulo:(a==null?void 0:a.titulo)||"Painel",legenda:"Modo projeção — atualiza sozinho a cada 2 min",loading:r,onAtualizar:c,acoes:e.jsxs(P,{onClick:()=>i("/ponte/mural"),children:[e.jsx(X,{size:13})," Voltar ao mural"]})}),d&&e.jsxs(N,{children:["Não consegui carregar o painel. ",String(d)]}),e.jsx("div",{style:{flex:1,padding:"26px 30px 30px",minHeight:0},children:a&&e.jsx(D,{painel:a,grande:!0})})]})}function L(t){const i=m.useRef(t);i.current=t,m.useEffect(()=>{const s=setInterval(()=>i.current(),K);return()=>clearInterval(s)},[])}function I({titulo:t,legenda:i,loading:s,onAtualizar:r,acoes:d}){return e.jsxs("header",{style:{display:"flex",alignItems:"center",gap:18,flexWrap:"wrap",padding:"14px 22px",borderBottom:`1px solid ${o.hair}`},children:[e.jsx("span",{style:{fontSize:15,fontWeight:650},children:t}),e.jsx("span",{style:{fontSize:12,color:o.ink3,borderLeft:`1px solid ${o.hairHi}`,paddingLeft:14},children:i}),e.jsx("span",{style:{flex:1}}),s&&e.jsx(_,{size:15,className:"animate-spin",style:{color:o.ink3}}),d,e.jsxs(P,{onClick:r,children:[e.jsx(J,{size:13})," Atualizar"]})]})}function P({children:t,onClick:i}){return e.jsx("button",{onClick:i,style:{font:"inherit",fontSize:12,cursor:"pointer",borderRadius:3,background:"transparent",color:o.ink2,border:`1px solid ${o.hairHi}`,padding:"7px 12px",display:"inline-flex",alignItems:"center",gap:7},children:t})}function N({children:t}){return e.jsx("div",{style:{padding:"16px 22px",fontSize:13,color:o.ink2,lineHeight:1.55},children:t})}function D({painel:t,grande:i}){var s;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[e.jsx("p",{style:Q,children:t.titulo}),e.jsx("p",{style:{fontSize:i?14:12,color:o.ink3,margin:"6px 0 0"},children:t.subtitulo}),t.destaque&&e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:14,margin:"14px 0 4px",flexWrap:"wrap"},children:[e.jsx("b",{style:{fontFamily:S,fontSize:i?84:44,fontWeight:700,letterSpacing:"-.03em",lineHeight:.95,color:k(t.destaque.cor),fontVariantNumeric:"tabular-nums"},children:t.destaque.valor}),e.jsx("span",{style:{fontSize:i?15:12.5,color:o.ink3},children:t.destaque.rotulo})]}),t.vazio&&e.jsx("p",{style:{fontSize:i?15:12.5,color:o.ink2,lineHeight:1.55,margin:"12px 0 0",maxWidth:"60ch"},children:t.vazio}),t.tipo==="serie"&&t.serie&&t.serie.length>1&&e.jsx(tt,{pontos:t.serie,escala:t.escala,cor:k((s=t.destaque)==null?void 0:s.cor),grande:i}),t.tipo==="barras"&&t.barras&&t.barras.length>0&&e.jsx(et,{itens:t.barras,grande:i})]})}function tt({pontos:t,escala:i,cor:s,grande:r}){const d=m.useRef(null),c=r?460:190;return m.useEffect(()=>{const a=d.current;if(!a)return;const n=a.getContext("2d");if(!n)return;const M=()=>{const g=a.clientWidth;if(!g)return;const j=2;a.width=g*j,a.height=c*j,n.setTransform(j,0,0,j,0,0);const q=r?64:46,O=22,x=12,y=g-q,v=c-O-x,H=t.map(l=>l.v),b=i?i.min:Math.min(...H)*.96,T=i?i.max:Math.max(...H)*1.04,f=t[0].t,z=t[t.length-1].t||f+1,p=l=>(l-f)/(z-f||1)*y,h=l=>x+(1-(l-b)/(T-b||1))*v;n.clearRect(0,0,g,c),n.font=`${r?13:11}px ${S}`;for(let l=0;l<=4;l++){const u=b+(T-b)/4*l;n.beginPath(),n.moveTo(0,h(u)),n.lineTo(y,h(u)),n.strokeStyle="#131C2B",n.lineWidth=1,n.stroke(),n.fillStyle=o.ink3,n.textAlign="left",n.fillText(i!=null&&i.sufixo?Math.round(u)+i.sufixo:u.toFixed(u<10?2:0),y+9,h(u)+4)}const w=()=>{n.beginPath(),t.forEach((l,u)=>u?n.lineTo(p(l.t),h(l.v)):n.moveTo(p(l.t),h(l.v)))};w(),n.lineTo(p(z),x+v),n.lineTo(p(f),x+v),n.closePath();
1const C=n.createLinearGradient(0,x,0,x+v);C.addColorStop(0,`${s}2E`),C.addColorStop(1,`${s}00`),n.fillStyle=C,n.fill(),w(),n.strokeStyle=s,n.lineWidth=r?2.6:2,n.stroke();const B=t[t.length-1];n.beginPath(),n.arc(p(B.t),h(B.v),r?6:4.4,0,Math.PI*2),n.fillStyle=o.ink,n.fill();const E=l=>new Date(l).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit"});n.fillStyle=o.ink3,n.textAlign="left",n.fillText(E(f),0,c-6),n.textAlign="right",n.fillText(E(z),y,c-6)};M();const R=new ResizeObserver(M);return R.observe(a),()=>R.disconnect()},[t,i,s,r,c]),e.jsx("div",{style:{marginTop:12,flex:r?1:void 0,minHeight:0},children:e.jsx("canvas",{ref:d,style:{width:"100%",height:c,display:"block"}})})}function et({itens:t,grande:i}){const s=m.useMemo(()=>Math.max(1,...t.map(r=>r.valor)),[t]);return e.jsx("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:i?20:12},children:t.map(r=>e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12,marginBottom:6},children:[e.jsxs("span",{style:{fontSize:i?17:13},children:[r.rotulo,r.sub&&e.jsx("span",{style:{color:o.ink3,fontSize:i?13:11,marginLeft:8},children:r.sub})]}),e.jsx("b",{style:{fontFamily:S,fontSize:i?26:15,fontWeight:600,color:k(r.cor),fontVariantNumeric:"tabular-nums"},children:r.valor})]}),e.jsx("div",{style:{height:i?10:6,background:"#131C2B"},children:e.jsx("div",{style:{height:"100%",background:k(r.cor),width:`${Math.round(r.valor/s*100)}%`,transition:"width .4s ease"}})})]},r.rotulo))})}export{lt as PainelProjecaoPage,at as default};

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.