const DS=window.GuiaDiabeteDesignSystem_9d1af3; const { Button, IconButton, Icon, Input } = DS; // resolves ShareBar at render time, so a not-yet-recompiled bundle degrades to nothing instead of crashing function Share(props){ const C=DS.ShareBar; return C?:null; } function useBreak(q){ const [on,setOn]=React.useState(()=>window.matchMedia(q).matches); React.useEffect(()=>{const m=window.matchMedia(q),h=e=>setOn(e.matches);m.addEventListener('change',h);setOn(m.matches);return()=>m.removeEventListener('change',h)},[q]); return on; } const SITE_FALLBACK='https://www.alemdoacucar.blog.br/'; // Builds the link to share from wherever this page is actually running. // file:// and blob: URLs cannot be opened by anyone else, so those fall back to the example domain. function shareUrl(path){ try{ const p=location.protocol; if(p==='http:'||p==='https:'){ if(window.__PATH_MODE) return location.origin+'/'+(path?path.replace(/\/+$/,'')+'/':''); const base=location.origin+location.pathname+location.search; return base+(path?'#/'+path:''); } }catch(e){} return SITE_FALLBACK+(path||''); } const useMobile=()=>useBreak('(max-width:1060px)'); const useNarrow=()=>useBreak('(max-width:600px)'); const SHELL_NAV=[["tipos","Tipos de diabete"],["socorros","Primeiros socorros"],["escola","Na escola"],["criancas","Para crianças"],["receitas","Receitas"],["projeto","O projeto"]]; function Header({route,go}){ const [open,setOpen]=React.useState(false); const [menu,setMenu]=React.useState(false); const mobile=useMobile(),narrow=useNarrow(); React.useEffect(()=>{setMenu(false);setOpen(false)},[route]); return
{e.preventDefault();go('home')}} style={{fontFamily:'var(--font-ui)',fontSize:mobile?19:22,fontWeight:'var(--fw-semibold)',letterSpacing:'-0.02em',color:'var(--teal-700)',textDecoration:'none',flex:'0 0 auto',marginRight:'auto'}}>Além do Açúcar {!mobile&&}
{open&&!mobile&&
{e.preventDefault();go('busca',null,e.target.q.value)}} style={{width:230}}>
} mobile?go('busca'):setOpen(!open)}/> {narrow ? go('socorros')} style={{background:'var(--coral-500)',border:'1px solid var(--coral-500)'}}/> : } {mobile&&setMenu(!menu)}/>}
{mobile&&menu&&}
; } const SHELL_FOOTER=[['Conteúdo',[['tipos','Tipos de diabete'],['socorros','Primeiros socorros'],['escola','Na escola'],['criancas','Para crianças'],['receitas','Receitas']]], ['Sobre',[['projeto','O projeto'],['sobre','Quem revisa'],['sobre','Como escrevemos'],['sobre','Contato'],['ext:https://www.instagram.com/alemdoacucar15','Instagram'],['ext:https://lacos-vida-leve.base44.app','Laços Vida Leve']]], ['Emergência',[['socorros','Hipoglicemia'],['socorros','Hiperglicemia'],['socorros','Cetoacidose'],['socorros','Ligar 192']]]]; function Footer({go}){ return ; } function ensurePrintStyles(){ if(document.getElementById('__print_styles')) return; const st=document.createElement('style');st.id='__print_styles'; st.textContent='@media print{header,footer,nav,[data-no-print]{display:none !important}main{padding:0 !important}body{background:#fff !important}a[href]:after{content:""}*{box-shadow:none !important}}'; document.head.appendChild(st); } function printPage(){ensurePrintStyles();window.print()} function Page({children,route,go}){ React.useEffect(ensurePrintStyles,[]); return
{children}
; } function Container({children,width='var(--width-wide)',style}){ return
{children}
; } function Breadcrumb({items=[],go}){ return ; } Object.assign(window,{Header,Footer,Page,Container,Breadcrumb,Share,useMobile,useNarrow,useBreak,shareUrl,printPage});