O Chamado
  • Missão
  • O Quadro
  • Missionários
  • Templo
  • Fotos
  • Histórias
  • Reencontros
  • Os Woodward
  • Jornais
  • Sobre

Missão Brasil Porto Alegre NorteBrazil Porto Alegre North Mission

O Chamado

Presidente Arlan e Síster Sally Woodward · 1997–2000President Arlan and Sister Sally Woodward · 1997–2000

Escritório da missão
Marau
Santa Rosa
Tramandaí
Cruz Alta
Santo Ângelo
Capão da Canoa
Vacaria

Fotos extraídas do passeio em vídeo preparado pelo Élder George.Photos taken from video tour prepared by Elder George.

30ANOSYEARS

Julho de 1997 · Julho de 2027July 1997 · July 2027

Quase trinta anos depois da chegada dos Woodward em Porto Alegre, ainda nos lembramos dos lugares onde servimos, das pessoas que conhecemos e dos companheiros que serviram ao nosso lado. O Chamado é um lugar para reviver essas lembranças, compartilhá-las e guardá-las para os próximos anos.Almost thirty years after the Woodwards arrived in Porto Alegre, we still remember the places we served, the people we met, and the companions who served beside us. O Chamado is a place to revisit those memories, share them, and keep them for the years ahead.

Encontre sua jornada missionáriaFind your missionary journey
MissãoMission
Eleva o coração e regozija-te, pois é chegada a hora de tua missão. Lift up your heart and rejoice, for the hour of your mission is come.
Doutrina e Convênios 31:3Doctrine and Covenants 31:3

A Missão Brasil Porto Alegre Norte cobria a metade norte do Rio Grande do Sul, o estado mais ao sul do Brasil: da zona norte de Porto Alegre e sua região metropolitana até a Serra Gaúcha, o Planalto e o Litoral Norte, e, até julho de 1998, o Noroeste e as Missões, perto da fronteira com a Argentina.

🏙️ Porto Alegre e região metropolitana

A capital gaúcha e as cidades ao seu redor: Canoas, Esteio, Gravataí, Cachoeirinha, Alvorada e Guaíba. Bairros movimentados, ônibus lotados e muitas zonas da missão.

👞 Vales do Sinos, Caí e Taquari

Novo Hamburgo, São Leopoldo, Sapiranga, Taquara, Montenegro e Lajeado. São Leopoldo foi o berço da imigração alemã no Brasil, em 1824, e o Vale dos Sinos é conhecido pela indústria de calçados.

🍇 Serra Gaúcha

Caxias do Sul, Bento Gonçalves, Farroupilha, Gramado e Canela. Terra da imigração italiana a partir de 1875, dos parreirais e do vinho, com invernos frios e, às vezes, neve.

🌾 Planalto e Campos de Cima da Serra

Passo Fundo, Erechim, Carazinho, Marau e Vacaria. Lavouras de soja, trigo e milho, os pomares de maçã de Vacaria e algumas das madrugadas mais frias do estado.

🌊 Litoral Norte

Osório, Tramandaí e Capão da Canoa. Praias, lagoas e vento constante: cheias de veranistas no verão e quase vazias no inverno.

⛪ Noroeste e Missões até julho de 1998

Santo Ângelo, Ijuí, Cruz Alta e Santa Rosa, perto das ruínas jesuítico-guaranis de São Miguel das Missões, Patrimônio Mundial da UNESCO.

O clima

Subtropical, com as quatro estações bem marcadas. Os verões são quentes e úmidos: em Porto Alegre o termômetro passa fácil dos 35 °C. Os invernos são frios e chuvosos, com geada no interior, neve de vez em quando nas partes altas da Serra e o minuano soprando do sudoeste. Muito missionário norte-americano chegou esperando o calor do Brasil e conheceu o frio gaúcho.

O povo

O gaúcho é hospitaleiro e orgulhoso das suas tradições: o chimarrão passado de mão em mão, o churrasco de domingo, os Centros de Tradições Gaúchas, onde se mantêm vivas as danças, a música e a pilcha, e o 20 de Setembro, que lembra a Revolução Farroupilha. A população mistura descendentes de portugueses e açorianos, alemães, italianos, poloneses, africanos e indígenas. No interior ainda se ouve em casa o alemão ou o dialeto vêneto trazido pelos imigrantes italianos, e todo missionário logo aprendia a dizer “bah, tchê!”.

The Brazil Porto Alegre North Mission covered the northern half of Rio Grande do Sul, Brazil's southernmost state: from the north side of Porto Alegre and its metro area up through the Serra Gaúcha highlands, the Planalto and the northern coast, and, until July 1998, the Northwest and the Missões region near the Argentine border.

🏙️ Porto Alegre and its metro area

The state capital and the cities around it: Canoas, Esteio, Gravataí, Cachoeirinha, Alvorada and Guaíba. Busy neighborhoods, packed buses and many of the mission's zones.

👞 Sinos, Caí and Taquari valleys

Novo Hamburgo, São Leopoldo, Sapiranga, Taquara, Montenegro and Lajeado. São Leopoldo was the cradle of German immigration to Brazil in 1824, and the Sinos valley is known for its shoe industry.

🍇 Serra Gaúcha

Caxias do Sul, Bento Gonçalves, Farroupilha, Gramado and Canela. Settled by Italian immigrants from 1875 on: vineyards, wine, cold winters and the occasional snowfall.

🌾 Planalto and Campos de Cima da Serra

Passo Fundo, Erechim, Carazinho, Marau and Vacaria. Soy, wheat and corn fields, Vacaria's apple orchards and some of the coldest mornings in the state.

🌊 Northern coast

Osório, Tramandaí and Capão da Canoa. Beaches, lagoons and constant wind: crowded with vacationers in summer, nearly empty in winter.

⛪ Northwest and Missões until July 1998

Santo Ângelo, Ijuí, Cruz Alta and Santa Rosa, near the Jesuit-Guarani ruins of São Miguel das Missões, a UNESCO World Heritage Site.

The climate

Subtropical, with four distinct seasons. Summers are hot and humid; Porto Alegre easily tops 35 °C (95 °F). Winters are cold and rainy, with frost inland, occasional snow in the high Serra and the minuano wind blowing in from the southwest. Many North American missionaries arrived expecting tropical Brazil and met the gaúcho winter instead.

The people

Gaúchos are warm, hospitable and proud of their traditions: chimarrão passed from hand to hand, Sunday churrasco, the Centros de Tradições Gaúchas (gaúcho tradition centers), clubs where people keep the folk dances, music and dress alive, and the 20th of September, which remembers the Farroupilha Revolution. The population blends Portuguese and Azorean, German, Italian, Polish, African and Indigenous roots. In the interior you can still hear German, or the Venetian dialect brought by the Italian immigrants, spoken at home, and every missionary soon learned to say “bah, tchê!”.

Um passeio de 8 minutos pela missãoAn 8-minute tour of the mission

Veja várias áreas da Missão Porto Alegre Norte nas imagens que o Élder George gravou quando voltou para visitar a missão.See several areas of the Porto Alegre North Mission in footage Elder George filmed on a return visit.

Assistir ao passeio · começa em 00:01:58Watch the tour · starts at 00:01:58
O QuadroThe Board
{
  const go = k => definir(viewof quadroKey, k);
  return htl.html`<div class="nav-mes">
    <button class="nav-mes-btn" aria-label=${T("Mês anterior", "Previous month")} disabled=${snapIdx === 0} onclick=${() => go(snaps[snapIdx - 1].key)}><i class="bi bi-chevron-left"></i></button>
    <span class="snap-label">${fmtMesAno(snapAtual)}</span>
    <button class="nav-mes-btn" aria-label=${T("Próximo mês", "Next month")} disabled=${snapIdx === snaps.length - 1} onclick=${() => go(snaps[snapIdx + 1].key)}><i class="bi bi-chevron-right"></i></button>
  </div>`;
}
É por meio de coisas pequenas e simples que as grandes são realizadas. By small and simple things are great things brought to pass.
Alma 37:6Alma 37:6

O Quadro do PresidenteThe President’s Board

No escritório da missão, O Quadro do Presidente reunia todas as zonas, áreas e missionários num só lugar. Cada ficha representava uma pessoa e seu lugar na missão: em que área servia, com qual companheiro e em qual zona. A cada mês, o quadro mudava para acompanhar as transferências, as novas duplas e a chegada e a despedida de missionários. Era um retrato da missão naquele momento.In the mission office, the President’s Board brought together all the zones, areas, and missionaries in one place. Each card represented a person and their place in the mission: where they served, who their companion was, and which zone they belonged to. Every month, the board changed to reflect transfers, new companionships, and missionaries arriving or returning home. It was a snapshot of the mission at that moment.

Aqui, você pode acompanhar essas mudanças mês a mês. Escolha um mês e toque no nome de uma área ou de um missionário para ver mais detalhes. Viu algum erro? Escreva para info@ochamado.org.Here, you can follow those changes month by month. Pick a month and tap an area or missionary name to see more details. Spot a mistake? Email info@ochamado.org.

O Quadro do Presidente no escritório da missão, com as fichas dos missionários
O Quadro do Presidente no escritório da missãoThe President’s Board in the mission office
quadro = FileAttachment("data/quadro.json").json()
snaps = quadro.snapshots
pessoas = new Map(quadro.missionarios.map(p => [p.id, p]))
viewof idioma = {
  const el = htl.html`<span hidden></span>`;
  el.value = document.documentElement.dataset.lang === "en" ? "en" : "pt";
  window.addEventListener("ochamado:idioma", () => {
    el.value = document.documentElement.dataset.lang === "en" ? "en" : "pt";
    el.dispatchEvent(new Event("input"));
  });
  return el;
}
T = (pt, en) => idioma === "en" ? en : pt
MES = idioma === "en"
  ? ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
  : ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"]
MES_NOME = idioma === "en"
  ? ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
  : ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]
fmtYM = k => { if (!k) return "—"; const [y, m] = k.split("-"); return idioma === "en" ? `${MES[+m - 1]} ${y}` : `${MES[+m - 1]}/${y}`; }
fmtMesAno = s => idioma === "en" ? `${MES_NOME[s.mes - 1]} ${s.ano}` : `${MES_NOME[s.mes - 1].toLowerCase()} de ${s.ano}`
nacionalidade = n => idioma === "en" ? ({ "brasileiro": "Brazilian", "norte americano": "North American" }[n] ?? n) : n
nomeCompleto = l => l.replace(/^E\s+/, "Élder ").replace(/^S\s+/, "Síster ")
// Letters (A, B, C) and role tags (LD, LZ, Casal) mark companionships within one área; numbers are separate wards.
semLetra = n => n == null ? n : n.replace(/(\s+(LD|LZ|Casal|[A-D]))+$/i, "").trim()
norm = s => String(s ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/-/g, " ").replace(/\s+/g, " ").trim()
aparicoes = {
  const m = new Map();
  for (const s of snaps) for (const z of s.zonas) for (const a of z.areas) for (const p of a.dupla) {
    const k = p.id ?? "?" + p.n;
    if (!m.has(k)) m.set(k, []);
    // area = the área name without the board's #1/#2 or A/B/LD… (those only tell companionships in the same área apart).
    m.get(k).push({ key: s.key, zona: z.nome, especial: z.especial, areaNome: a.nome, area: semLetra(a.nome) ?? z.nome, companheiros: a.dupla.filter(x => x !== p) });
  }
  return m;
}
function estado(v) { const el = htl.html`<span hidden></span>`; el.value = v; return el; }
function definir(el, v) { el.value = v; el.dispatchEvent(new Event("input", { bubbles: true })); }
viewof quadroKey = estado("1997-11")
// Every month of the Woodwards' mission (July 1997 – June 2000); months without a President’s Board are shown greyed out.
MESES_MISSAO = { const l = []; for (let n = 1997 * 12 + 6; n <= 2000 * 12 + 5; n++) l.push(`${Math.floor(n / 12)}-${String(n % 12 + 1).padStart(2, "0")}`); return l; }
temQuadro = new Set(snaps.map(s => s.key))
DIVISAO = "1998-07"
snapIdx = snaps.findIndex(s => s.key === quadroKey)
snapAtual = snaps[snapIdx]
{
  const first = snaps[0], last = snaps[snaps.length - 1];
  const max = Math.max(...snaps.map(s => s.stats.zonas));
  const W = 640, H = 56, gap = 3, bw = W / MESES_MISSAO.length;
  const porChave = new Map(snaps.map(s => [s.key, s]));
  const tile = (num, lbl, base) => htl.html`<div class="stat-tile"><div class="num">${num}</div><div class="lbl">${lbl}</div></div>`;
  return htl.html`<div>
    <p class="growth-headline"><strong>${first.stats.zonas}</strong> ${T("zonas em", "zones in")} ${fmtYM(first.key)} → <strong>${last.stats.zonas}</strong> ${T("zonas em", "zones in")} ${fmtYM(last.key)}</p>
    <div class="stat-tiles">
      ${tile(snapAtual.stats.zonas, T("Zonas", "Zones"))}
      ${tile(snapAtual.stats.areas, T("Áreas", "Areas"))}
      ${tile(snapAtual.stats.missionarios, T("Missionários", "Missionaries"))}
    </div>
    ${htl.svg`<svg class="growth-bars" viewBox="0 0 ${W} ${H}" preserveAspectRatio="none" role="img" aria-label=${T("Zonas por mês", "Zones per month")}>
      ${MESES_MISSAO.map((k, i) => {
        const s = porChave.get(k);
        if (!s) return htl.svg`<rect class="sem-dados" x=${i * bw + gap / 2} y=${H - 4} width=${bw - gap} height="4" rx="2"><title>${fmtYM(k)}: ${T("sem Quadro do Presidente", "no President’s Board")}</title></rect>`;
        const h = Math.max(4, (s.stats.zonas / max) * H);
        return htl.svg`<rect class=${s.key === quadroKey ? "active" : ""} x=${i * bw + gap / 2} y=${H - h} width=${bw - gap} height=${h} rx="2"
          onclick=${() => definir(viewof quadroKey, s.key)}><title>${fmtYM(s.key)}: ${s.stats.zonas} ${T("zonas", "zones")}</title></rect>`;
      })}
      ${(() => {
        const i = MESES_MISSAO.indexOf(DIVISAO);
        return i < 0 ? "" : htl.svg`<line class="marco-divisao" x1=${i * bw} x2=${i * bw} y1="0" y2=${H}><title>${T("Julho de 1998: divisão da missão", "July 1998: the mission is divided")}</title></line>`;
      })()}
    </svg>`}
    <p class="growth-nota"><span class="marco"></span> ${T("Julho de 1998: a missão foi dividida para formar a Missão Brasil Santa Maria.", "July 1998: the mission was divided to create the Brazil Santa Maria Mission.")}</p>
  </div>`;
}
{
  const anos = [...new Set(MESES_MISSAO.map(k => +k.slice(0, 4)))];
  const doAno = MESES_MISSAO.filter(k => +k.slice(0, 4) === snapAtual.ano);
  const go = k => definir(viewof quadroKey, k);
  const pill = (label, active, onclick) => htl.html`<button class=${active ? "pill active" : "pill"} onclick=${onclick}>${label}</button>`;
  const semQuadro = k => htl.html`<button class="pill sem-dados" disabled title=${T("Sem Quadro do Presidente para este mês", "No President’s Board for this month")}>${MES[+k.slice(5) - 1]}</button>`;
  const algumVazio = doAno.some(k => !temQuadro.has(k));
  return htl.html`<div class="filter-panel">
    <div class="pill-group">${anos.map(a => {
      const primeiro = snaps.find(s => s.ano === a);
      return primeiro ? pill(a, a === snapAtual.ano, () => go(primeiro.key)) : htl.html`<button class="pill sem-dados" disabled>${a}</button>`;
    })}</div>
    <div class="pill-group">${doAno.map(k => temQuadro.has(k) ? pill(MES[+k.slice(5) - 1], k === quadroKey, () => go(k)) : semQuadro(k))}</div>
    ${algumVazio ? htl.html`<p class="nota-sem-dados">${T("Meses em cinza: não temos o Quadro do Presidente desse mês.", "Greyed-out months: we don't have that month's President’s Board.")}</p>` : ""}
  </div>
  ${quadroKey === DIVISAO
    ? htl.html`<p class="aviso-divisao"><i class="bi bi-signpost-split"></i><span>${idioma === "en"
      ? htl.html`This month the mission was divided to create the <strong>Brazil Santa Maria Mission</strong>. The Ijuí and Santo Ângelo zones went to the new mission.`
      : htl.html`Neste mês a missão foi dividida para formar a <strong>Missão Brasil Santa Maria</strong>. As zonas de Ijuí e Santo Ângelo passaram para a nova missão.`}</span></p>`
    : ""}`;
}
chaveArea = (nome, zona) => {
  const k = norm(semLetra(nome));
  return /^rio branco/.test(k) ? k + (["Moinhos de Vento", "Porto Alegre"].includes(zona) ? "|poa" : "|serra") : k;
}

historicoArea = {
  const m = new Map();
  snaps.forEach((s, i) => {
    for (const z of s.zonas) {
      if (z.especial) continue;
      for (const a of z.areas) {
        if (!a.nome) continue;
        const k = chaveArea(a.nome, z.nome);
        if (!m.has(k)) m.set(k, { nome: semLetra(a.nome), zonas: [], duplas: new Map(), ini: i, fim: i });
        const h = m.get(k);
        h.fim = i;
        if (!h.zonas.includes(z.nome)) h.zonas.push(z.nome);
        const dk = a.dupla.map(p => p.id ?? "?" + p.n).sort().join("+");
        if (!h.duplas.has(dk)) h.duplas.set(dk, { dupla: a.dupla, idx: [] });
        const d = h.duplas.get(dk);
        if (d.idx.at(-1) !== i) d.idx.push(i);
      }
    }
  });
  return m;
}

dlgArea = {
  const d = htl.html`<dialog class="dialogo-area" aria-labelledby="dlg-area-titulo"></dialog>`;
  d.addEventListener("click", e => { if (e.target === d) d.close(); });
  return d;
}

chavePessoa = p => p.id ?? "?" + p.n

// The area and missionary dialogs link to each other, so their functions share one cell
// (separate OJS cells may not reference each other in a cycle).
dialogos = {
  // The same dialog shows an area or a missionary; links inside it swap its content.
  function mostrarDialogo(conteudo) {
    dlgArea.replaceChildren(conteudo);
    if (!dlgArea.open) dlgArea.showModal();
    dlgArea.scrollTop = 0;
  }

  function topoDialogo(titulo, meta) {
    return htl.html`<div class="dlg-topo">
      <div><h3 id="dlg-area-titulo">${titulo}</h3>${meta}</div>
      <button class="dlg-fechar" aria-label=${T("Fechar", "Close")} onclick=${() => dlgArea.close()}><i class="bi bi-x-lg"></i></button>
    </div>`;
  }


  // A missionary's name (or a ditto mark for a repeat) that opens their dialog.
  function botaoPessoa(p, rep = false) {
    const nome = nomeCompleto(p.n);
    // A repeat is a plain mark (not clickable); the full name shows on hover.
    if (rep) return htl.html`<span class="ditto" title=${nome}>${dittoConteudo(nome)}</span>`;
    return htl.html`<button class=${"link-caixa" + (p.id ? "" : " sem-registro")} onclick=${() => abrirPessoa(p)}>${nome}</button>`;
  }

  // One table row per companionship run; each missionary has a column, and someone who also
  // appears in the row above keeps that column and is shown as a ditto mark.
  function linhaHistoricoArea(periodoTxt, cols, atual) {
    const tds = cols.map(c => c ? htl.html`<td>${botaoPessoa(c.p, c.rep)}</td>` : htl.html`<td></td>`);
    return htl.html`<tr class=${atual ? "atual" : ""}><td class="periodo">${periodoTxt}</td>${tds}</tr>`;
  }

  // A missionary's boards: zone, area and companions, with ditto marks for repeats.
  function tabelaPessoa(ap) {
    // Every month from the first to the last board they're on; consecutive empty months share one grey row.
    const porMes = new Map(ap.map(a => [a.key, a]));
    const linhas = [];
    for (let k = ap[0].key; k <= ap.at(-1).key; k = mesDepois(k)) {
      const a = porMes.get(k);
      if (a) { linhas.push({ a }); continue; }
      const tipo = temQuadro.has(k) ? "ausente" : "semQuadro", ult = linhas.at(-1);
      if (ult && ult.tipo === tipo) ult.fim = k; else linhas.push({ tipo, ini: k, fim: k });
    }
    return htl.html`<div class="table-scroll"><table class="historico-table">
      <thead><tr><th>${T("Quadro", "Board")}</th><th>${T("Zona", "Zone")}</th><th>${T("Área", "Area")}</th><th>${T("Companheiros", "Companions")}</th></tr></thead>
      <tbody>${linhas.map((l, i) => {
        if (!l.a) return htl.html`<tr class="sem-dados"><td class="periodo">${l.ini === l.fim ? fmtYM(l.ini) : `${fmtYM(l.ini)} – ${fmtYM(l.fim)}`}</td>
          <td colspan="3">${l.tipo === "semQuadro" ? T("Sem Quadro do Presidente", "No President’s Board") : T("Não aparece no quadro", "Not on the board")}</td></tr>`;
        const a = l.a, ant = linhas[i - 1]?.a;
        const repZona = ant && ant.zona === a.zona;
        const repArea = ant && ant.area === a.area;
        const compAnt = new Set(ant ? ant.companheiros.map(chavePessoa) : []);
        const ditto = (txt, rep) => rep ? htl.html`<span class="ditto" title=${txt}>${dittoConteudo(txt)}</span>` : txt;
        return htl.html`<tr class=${a.key === snapAtual.key ? "atual" : ""}><td class="periodo">${fmtYM(a.key)}</td><td>${ditto(a.zona, repZona)}</td>
          <td>${a.areaNome && !a.especial && !repArea
            ? htl.html`<button class="link-caixa" title=${T("Ver todas as duplas desta área", "See every companionship in this area")}
                onclick=${() => abrirArea({ nome: a.areaNome }, { nome: a.zona })}>${a.area}</button>`
            : ditto(a.area, repArea)}</td>
          <td class="companheiros">${a.companheiros.map(c => botaoPessoa(c, compAnt.has(chavePessoa(c))))}</td></tr>`;
      })}</tbody>
    </table></div>`;
  }

  function abrirPessoa(p) {
    const x = p.id ? pessoas.get(p.id) : null;
    const ap = aparicoes.get(chavePessoa(p)) ?? [];
    const nQuadros = `${T("em", "on")} ${ap.length} ${ap.length === 1 ? T("quadro", "board") : T("quadros", "boards")}`;
    const provavel = p.c === "inferido" || p.c === "tolerancia";
    const meta = x
      ? htl.html`<div class="meta">${x.nacionalidade ? `${nacionalidade(x.nacionalidade)} · ` : ""}<strong>${T("Chegada", "Arrived")}</strong> ${fmtYM(x.chegada)} · <strong>${T("Saída", "Left")}</strong> ${fmtYM(x.saida)} · ${nQuadros}${provavel ? htl.html` · <span class="provavel">${T("identificação provável", "probable match")}</span>` : ""}</div>`
      : htl.html`<div class="meta">${T("Sem registro de chegada/saída", "No arrival/departure record")} · ${nQuadros}</div>`;
    mostrarDialogo(htl.html`${topoDialogo(x ? `${x.titulo} ${x.plaqueta}` : nomeCompleto(p.n), meta)}
      <div class="dlg-corpo">
        <div class="dlg-acoes">
          ${p.id ? botaoFotosTag("missionary", p.id, x ? `${x.titulo} ${x.plaqueta}` : nomeCompleto(p.n), true) : ""}
          ${x ? botaoFotosEnviadas(x) : ""}
          ${p.id ? botaoHistoriasTag("missionary", p.id, x ? `${x.titulo} ${x.plaqueta}` : nomeCompleto(p.n)) : ""}
          ${ap.length ? htl.html`<button type="button" class="pill dlg-acao" onclick=${() => verJornada(chavePessoa(p))}><i class="bi bi-signpost-2" aria-hidden="true"></i><span>${T("Ver a jornada no mapa", "See the journey on the map")}</span></button>` : ""}
        </div>
        ${ap.length ? tabelaPessoa(ap) : htl.html`<p class="busca-hint">${T("Não aparece nos Quadros do Presidente.", "Not on any President’s Board.")}</p>`}
        ${x ? "" : htl.html`<p class="dlg-nota">${T("Ainda não conseguimos ligar este nome a ninguém da lista de missionários. Se você sabe quem é, escreva para info@ochamado.org.",
          "We couldn't match this name to anyone on the missionary list yet. If you know who it is, email info@ochamado.org.")}</p>`}
        <p class="dlg-nota">${T("A chegada é o mês em que o missionário chegou ao campo missionário. ↓ = igual à linha de cima. A linha destacada é o mês escolhido no quadro.",
          "Arrival is the month the missionary arrived in the mission field. ↓ = same as the row above. The highlighted row is the month selected on the board.")}</p>
      </div>`);
  }

  // Closes the window and plays this missionary's journey on the journey map.
  function verJornada(chave) {
    dlgArea.close();
    definir(viewof jornadaModo, { tipo: "pessoa", chave, auto: true });
    document.getElementById("mapa-jornada")?.scrollIntoView({ behavior: "smooth", block: "center" });
  }

  function abrirArea(a, z) {
    const h = historicoArea.get(chaveArea(a.nome, z.nome));
    if (!h) return;
    const linhas = [];
    for (const { dupla, idx } of h.duplas.values()) {
      let ini = idx[0], ant = idx[0];
      for (const i of [...idx.slice(1), null]) {
        if (i === ant + 1) { ant = i; continue; }
        linhas.push({ ini, fim: ant, dupla });
        ini = ant = i;
      }
    }
    linhas.sort((x, y) => x.ini - y.ini || x.fim - y.fim);
    const nPessoas = new Set(linhas.flatMap(r => r.dupla.map(p => p.id ?? "?" + p.n))).size;
    const periodo = r => r.ini === r.fim ? fmtYM(snaps[r.ini].key) : `${fmtYM(snaps[r.ini].key)} – ${fmtYM(snaps[r.fim].key)}`;
    const zonas = h.zonas.join(", ");
    const chave = p => p.id ?? "?" + p.n;
    const nCol = Math.max(2, ...linhas.map(r => r.dupla.length));
    let colsAnt = [];
    const linhasCols = linhas.map(r => {
      const cols = Array(nCol).fill(null), resto = [];
      for (const p of r.dupla) {
        const j = colsAnt.findIndex(q => q && chave(q) === chave(p));
        if (j >= 0 && !cols[j]) cols[j] = { p, rep: true }; else resto.push(p);
      }
      for (const p of resto) cols[cols.findIndex(c => !c)] = { p, rep: false };
      colsAnt = cols.map(c => c && c.p);
      return { r, cols };
    });
    const meta = htl.html`<div class="meta">${T(h.zonas.length > 1 ? "Zonas" : "Zona", h.zonas.length > 1 ? "Zones" : "Zone")}: ${zonas} · ${nPessoas} ${T("missionários", "missionaries")}</div>`;
    mostrarDialogo(htl.html`${topoDialogo(h.nome, meta)}
      <div class="dlg-corpo">
        <div class="dlg-acoes">${botaoFotosTag("area", chaveArea(a.nome, z.nome), h.nome, true)}${botaoHistoriasTag("area", chaveArea(a.nome, z.nome), h.nome)}</div>
        <table class="historico-table historico-area">
          <thead><tr><th>${T("Quando", "When")}</th><th colspan=${nCol}>${T("Dupla", "Companionship")}</th></tr></thead>
          <tbody>${linhasCols.map(({ r, cols }) => linhaHistoricoArea(periodo(r), cols, snapIdx >= r.ini && snapIdx <= r.fim))}</tbody>
        </table>
        <p class="dlg-nota">${T("↓ = mesmo missionário da linha de cima. Meses seguidos com a mesma dupla aparecem numa linha só. A linha destacada é o mês escolhido no quadro.",
          "↓ = same missionary as the row above. Consecutive months with the same companionship are shown as one row. The highlighted row is the month selected on the board.")}</p>
      </div>`);
  }

  return { abrirArea, abrirPessoa };
}

abrirArea = dialogos.abrirArea

abrirPessoa = dialogos.abrirPessoa

// Lets the photo viewer open a missionary (see pessoaDaFoto).
ligarPessoaDaFoto = { pessoaDaFoto.abrir = abrirPessoa; }

// Lets the site's search button (script in _quarto.yml) open a missionary or an area. Someone coming from
// another page, or searching before the page was ready, has a pending choice to open now.
ligarBuscaDoSite = {
  window.ochamadoAbrir = d => d.tipo === "area" ? abrirArea({ nome: d.nome }, { nome: d.zona }) : abrirPessoa({ id: d.id || null, n: d.n });
  const pendente = window.ochamadoPendente;
  window.ochamadoPendente = null;
  if (pendente) window.ochamadoAbrir(pendente);
}

// Repeat mark: a down arrow, set in a little from the left edge of the text above.
function dittoConteudo(txt) {
  return htl.html`<span class="ditto-marca" aria-hidden="true"><i class="bi bi-arrow-down"></i></span>`;
}

function linhaArea(a, z, cont) {
  const chips = a.dupla.map(p => htl.html`<button class=${p.id ? "chip" : "chip sem-registro"} onclick=${() => abrirPessoa(p)}>${nomeCompleto(p.n)}</button>`);
  return htl.html`<div class=${cont ? "area-row cont" : "area-row"}>
    ${a.nome ? htl.html`<div class="area-name">${z.especial ? a.nome : htl.html`<button class="area-link link-caixa" title=${T("Ver todas as duplas desta área", "See every companionship in this area")} onclick=${() => abrirArea(a, z)}>${a.nome}<i class="bi bi-clock-history"></i></button>`}${!z.especial ? botaoFotosTag("area", chaveArea(a.nome, z.nome), a.nome, false, snapAtual.key) : ""}${a.total > 1 ? htl.html`<span class="dupla-tag">#${a.n}</span>` : ""}</div>` : ""}
    <div class="nomes">${chips}</div>
  </div>`;
}
// Select one zone at a time, or show all zones.
{
  const zonas = snapAtual.zonas.filter(z => !z.especial).map(z => z.nome);
  const ocultas = new Set(zonasOcultas);
  const selecionar = nome => definir(viewof zonasOcultas, TODAS_ZONAS.filter(z => z !== nome));
  return htl.html`<div class="filtro-zonas">
    <span class="filtro-rotulo">${T("Zonas", "Zones")}</span>
    <button class="filtro-tudo" aria-pressed=${zonasOcultas.length === 0} onclick=${() => definir(viewof zonasOcultas, [])}>${T("Todas", "All")}</button>
    ${zonas.map(n => htl.html`<button class=${ocultas.has(n) ? "filtro-zona off" : "filtro-zona"} aria-pressed=${!ocultas.has(n)} onclick=${() => selecionar(n)}>
      <span class="cor" style=${`background:${corZona(n)}`}></span>${n}</button>`)}
  </div>`;
}
ZONA_POS = ({
  "Porto Alegre": [-30.035, -51.225], "Moinhos de Vento": [-30.012, -51.190], "Guaíba": [-30.114, -51.325],
  "Canoas": [-29.917, -51.183], "Canoas-Esteio": [-29.852, -51.179], "Gravataí": [-29.944, -50.992],
  "São Leopoldo": [-29.760, -51.147], "Novo Hamburgo": [-29.678, -51.131], "Taquara": [-29.650, -50.781],
  "Montenegro": [-29.689, -51.461], "Caxias do Sul": [-29.168, -51.179], "Bento Gonçalves": [-29.171, -51.519],
  "Vacaria": [-28.512, -50.934], "Passo Fundo": [-28.262, -52.408], "Vergueiro": [-28.230, -52.440],
  "Erechim": [-27.634, -52.274], "Osório": [-29.887, -50.270], "Capão da Canoa": [-29.745, -50.010],
  "Ijuí": [-28.388, -53.914], "Santo Ângelo": [-28.299, -54.263]
})

// A fixed color per zone (same in every month). Neighboring zones get clearly different hues.
ZONA_COR = ({
  "Porto Alegre": "#1f6fb4", "Moinhos de Vento": "#8e44ad", "Guaíba": "#17a2b8", "Canoas": "#d62728",
  "Canoas-Esteio": "#e377c2", "Gravataí": "#ff7f0e", "São Leopoldo": "#2ca02c", "Novo Hamburgo": "#8c564b",
  "Taquara": "#a9a619", "Montenegro": "#006d77", "Caxias do Sul": "#b5179e", "Bento Gonçalves": "#e9a23b",
  "Vacaria": "#264653", "Passo Fundo": "#3a86ff", "Vergueiro": "#6a3fd0", "Erechim": "#2a9d8f",
  "Osório": "#ef476f", "Capão da Canoa": "#06a77d", "Ijuí": "#e76f51", "Santo Ângelo": "#9c6644",
  "Assistentes": "#1b5e46", "Staff": "#5c6370", "Élderes Viajantes": "#b8862a"
})
// Assistants, Staff and Traveling Elders worked from the mission office, Av. Princesa Isabel 342, Porto Alegre.
ESCRITORIO = [-30.0505, -51.2115]
TODAS_ZONAS = [...new Set(snaps.flatMap(s => s.zonas.filter(z => !z.especial).map(z => z.nome)))]
// The office groups (Assistants, Staff, Traveling Elders) show only while every zone is on;
// once specific zones are picked, only those zones show.
mostrarEspeciais = snapAtual.zonas.filter(z => !z.especial).every(z => !zonasOcultas.includes(z.nome))
corZona = z => ZONA_COR[z] ?? "#555"

// Zones hidden on the areas map (kept when the month changes).
viewof zonasOcultas = estado([])

// Zone cards left open on phones (kept when the month changes).
zonasAbertas = new Set()

// Where each área was (data/areas-coords.json, built by scripts/geocode-areas.mjs and hand-checked).
// Áreas are grouped without their A/B letters, numbers and LD/LZ/Casal tags.
areasCoords = FileAttachment("data/areas-coords.json").json()
baseArea = nome => nome.replace(/(\s+(LD|LZ|Casal|[A-D]|\d+))+$/i, "").trim()
areaCoord = {
  const m = new Map(areasCoords.areas.map(e => [`${e.area}|${e.zona}`, e]));
  return (nome, zona) => m.get(`${baseArea(nome)}|${zona}`);
}

ZONA_METRO = ["Porto Alegre", "Moinhos de Vento", "Guaíba", "Canoas", "Canoas-Esteio", "Gravataí", "São Leopoldo", "Novo Hamburgo"]

rsContorno = FileAttachment("data/rs.geojson").json()

viewof mapa = {
  const el = htl.html`<div id="mapa" class="mapa-missao" role="region" aria-label="Mapa das zonas da missão / Map of the mission's zones"></div>`;
  const m = L.map(el, { scrollWheelZoom: false, zoomSnap: 0.25 }).setView([-29.0, -52.0], 7);
  L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    maxZoom: 14
  }).addTo(m);
  L.geoJSON(rsContorno, { style: { color: "#1b5e46", weight: 1.5, fill: false, dashArray: "4 4" }, interactive: false }).addTo(m);
  el.leaflet = m;
  el.camada = L.layerGroup().addTo(m);
  const metro = L.latLngBounds(ZONA_METRO.map(z => ZONA_POS[z])).pad(0.25);
  el.grandePoa = L.marker([-30.12, -51.40], {
    icon: L.divIcon({ className: "rotulo-grande-poa", html: "Grande Porto Alegre <i class='bi bi-zoom-in'></i>", iconSize: null }),
    keyboard: true
  }).on("click", () => m.flyToBounds(metro, { duration: 0.8 })).addTo(m);
  // "Whole mission" button: shown whenever the map is zoomed in past the full view
  // (after "Greater Porto Alegre", a filter's auto zoom, or zooming by hand).
  const inteira = L.latLngBounds(Object.values(ZONA_POS)).pad(0.08);
  const Voltar = L.Control.extend({
    onAdd() {
      const b = L.DomUtil.create("button", "btn-missao-inteira");
      b.type = "button";
      L.DomEvent.disableClickPropagation(b);
      L.DomEvent.on(b, "click", () => m.flyToBounds(inteira, { duration: 0.8 }));
      el.botaoVoltar = b;
      return b;
    }
  });
  new Voltar({ position: "topright" }).addTo(m);
  const zoomClasse = () => {
    el.classList.toggle("zoom-perto", m.getZoom() >= 9);
    // Shown whenever the view is not the whole mission: zoomed in by any means, or dragged aside.
    const foraDaVista = !m.getBounds().pad(0.05).contains(inteira.pad(-0.08));
    el.classList.toggle("zoom-dentro", el.clientWidth > 0 && (m.getZoom() > m.getBoundsZoom(inteira) + 0.1 || foraDaVista));
  };
  m.on("zoomend moveend", zoomClasse);
  zoomClasse();
  // The element is detached while this cell runs, so fit the view once it has a real size.
  let enquadrado = false;
  new ResizeObserver(() => {
    m.invalidateSize();
    if (!enquadrado && el.clientWidth > 0) {
      m.fitBounds(inteira);
      enquadrado = true;
    }
    zoomClasse();
  }).observe(el);
  return el;
}
{
  const el = viewof mapa, camada = el.camada;
  camada.clearLayers();
  el.grandePoa.setIcon(L.divIcon({ className: "rotulo-grande-poa", html: `${T("Grande Porto Alegre", "Greater Porto Alegre")} <i class='bi bi-zoom-in'></i>`, iconSize: null }));
  el.botaoVoltar.innerHTML = `<i class="bi bi-zoom-out"></i> ${T("Ver a missão inteira", "See the whole mission")}`;
  // Zones: a small ring with the zone's name; tapping it scrolls to the zone's card.
  const ocultas = new Set(zonasOcultas);
  for (const z of snapAtual.zonas) {
    const pos = ZONA_POS[z.nome];
    if (!pos || ocultas.has(z.nome)) continue;
    const marcador = L.circleMarker(pos, { radius: 5, color: corZona(z.nome), weight: 2.5, fillColor: "#fff", fillOpacity: 1 });
    const metro = ZONA_METRO.includes(z.nome);
    marcador.bindTooltip(`${z.nome} <span>${z.areas.length}</span>`, {
      permanent: true, interactive: true, direction: z.nome === "Vergueiro" ? "left" : "right", offset: [z.nome === "Vergueiro" ? -6 : 6, 0],
      className: metro ? "rotulo-zona rotulo-metro" : "rotulo-zona"
    });
    marcador.on("click", () => {
      const card = [...document.querySelectorAll(".zone-card")].find(c => c.dataset.zona === z.nome);
      if (!card) return;
      if (card.tagName === "DETAILS") card.open = true;
      card.scrollIntoView({ behavior: "smooth", block: "center" });
      card.classList.remove("destaque"); void card.offsetWidth; card.classList.add("destaque");
    });
    camada.addLayer(marcador);
  }
  // Office groups (Assistants, Staff, Traveling Elders): one dot each around the mission office.
  const grupos = mostrarEspeciais ? snapAtual.zonas.filter(z => z.especial) : [];
  if (grupos.length) {
    const escritorio = L.circleMarker(ESCRITORIO, { radius: 4, color: "#1b5e46", weight: 2, fillColor: "#fff", fillOpacity: 1 });
    escritorio.bindTooltip(T("Escritório da missão", "Mission office"), { permanent: true, direction: "left", offset: [-8, 0], className: "rotulo-zona rotulo-metro" });
    camada.addLayer(escritorio);
    grupos.forEach((z, i) => {
      const ang = Math.PI / 2 + (2 * Math.PI * i) / grupos.length, d = 0.004;
      const ponto = L.circleMarker([ESCRITORIO[0] + d * Math.sin(ang), ESCRITORIO[1] + d * Math.cos(ang) * 1.15], {
        radius: 6, color: "#fff", weight: 1.5, fillColor: corZona(z.nome), fillOpacity: 0.92
      });
      const nomes = z.areas.map(a => a.dupla.map(p => nomeCompleto(p.n)).join(" · ")).join("<br>");
      ponto.bindTooltip(`<strong>${z.nome}</strong> <span class="mapa-dica-zona">${T("Escritório da missão", "Mission office")}</span><br>${nomes}`,
        { direction: "top", offset: [0, -6], className: "dica-area" });
      ponto.on("click", () => {
        const card = [...document.querySelectorAll(".zone-card")].find(c => c.dataset.zona === z.nome);
        if (!card) return;
        if (card.tagName === "DETAILS") card.open = true;
        card.scrollIntoView({ behavior: "smooth", block: "center" });
        card.classList.remove("destaque"); void card.offsetWidth; card.classList.add("destaque");
      });
      camada.addLayer(ponto);
    });
  }
  // Areas: one dot per área (its #1/#2 companionships together). Áreas that share a point,
  // such as wards placed at their city's center, are fanned out slightly so each can be tapped.
  const porArea = new Map();
  for (const z of snapAtual.zonas) {
    if (z.especial || ocultas.has(z.nome)) continue;
    for (const a of z.areas) {
      if (!a.nome) continue;
      const c = areaCoord(a.nome, z.nome);
      if (!c) continue;
      const k = `${baseArea(a.nome)}|${z.nome}`;
      if (!porArea.has(k)) porArea.set(k, { a, z, c, duplas: [] });
      porArea.get(k).duplas.push(a);
    }
  }
  const porPonto = new Map();
  for (const v of porArea.values()) {
    const k = `${v.c.lat},${v.c.lon}`;
    if (!porPonto.has(k)) porPonto.set(k, []);
    porPonto.get(k).push(v);
  }
  for (const grupo of porPonto.values()) {
    grupo.forEach((v, i) => {
      const ang = (2 * Math.PI * i) / grupo.length, d = grupo.length > 1 ? 0.006 : 0;
      const ponto = L.circleMarker([v.c.lat + d * Math.sin(ang), v.c.lon + d * Math.cos(ang) * 1.15], {
        radius: 6, color: "#fff", weight: 1.5, fillColor: corZona(v.z.nome), fillOpacity: 0.92
      });
      const nomes = v.duplas.map(a => a.dupla.map(p => nomeCompleto(p.n)).join(" · ")).join("<br>");
      ponto.bindTooltip(`<strong>${baseArea(v.a.nome)}</strong> <span class="mapa-dica-zona">${v.z.nome}</span><br>${nomes}${v.c.fonte === "aproximado" ? `<br><em>${T("posição aproximada", "approximate location")}</em>` : ""}`,
        { direction: "top", offset: [0, -6], className: "dica-area" });
      ponto.on("click", () => abrirArea(v.a, v.z));
      camada.addLayer(ponto);
    });
  }
  // Zoom to what is selected: when the zone filter changes (or the month changes while filtered),
  // fit the visible points; going back to all zones returns to the whole mission.
  const chaveFiltro = [...zonasOcultas].sort().join("|");
  const mudou = el.ultimoFiltro !== undefined && (el.ultimoFiltro !== chaveFiltro || (chaveFiltro && el.ultimoMes !== snapAtual.key));
  if (mudou) {
    const pts = camada.getLayers().map(l => l.getLatLng());
    if (!chaveFiltro) el.leaflet.flyToBounds(L.latLngBounds(Object.values(ZONA_POS)).pad(0.08), { duration: 0.8 });
    else if (pts.length) el.leaflet.flyToBounds(L.latLngBounds(pts).pad(0.3), { maxZoom: 11, duration: 0.8 });
  }
  el.ultimoFiltro = chaveFiltro;
  el.ultimoMes = snapAtual.key;
  return htl.html`<p class="mapa-legenda"><span class="ponto ponto-area"></span> ${T(
    `Áreas em ${fmtMesAno(snapAtual)}; toque numa área para ver todas as duplas que passaram por ela.`,
    `Areas in ${fmtMesAno(snapAtual)}; tap an area to see every companionship that served there.`)}
    <span class="ponto ponto-zona"></span> ${T("Zonas: toque no nome de uma zona para ir até as duplas dela, logo abaixo do mapa.", "Zones: tap a zone's name to jump to its companionships, just below the map.")}</p>`;
}
{
  // Zones turned off in the map filter are hidden here too; the office groups follow mostrarEspeciais.
  const ocultas = new Set(zonasOcultas);
  const zonas = [...snapAtual.zonas].filter(z => z.especial ? mostrarEspeciais : !ocultas.has(z.nome)).sort((a, b) => a.especial - b.especial);
  const nOcultas = snapAtual.zonas.filter(z => !z.especial && ocultas.has(z.nome)).length;
  // On phones and tablets (under 900px) each zone is a collapsible card, closed at first, so the board isn't ten screens long.
  const celular = width < 900;
  const cartao = z => {
    const comps = z.areas.length;
    const contagem = `${comps} ${comps === 1 ? T("dupla", "companionship") : T("duplas", "companionships")}`;
    if (celular) {
      const d = htl.html`<details class=${z.especial ? "zone-card especial colapsavel" : "zone-card colapsavel"} data-zona=${z.nome} open=${zonasAbertas.has(z.nome)}>
        <summary><h3>${z.nome}</h3>${botaoFotosTag("zone", norm(z.nome), z.nome, false, snapAtual.key)}<span class="count">${contagem}</span><i class="bi bi-chevron-down seta-zona"></i></summary>
        ${z.areas.map((a, i) => linhaArea(a, z, i > 0 && a.n > 1 && z.areas[i - 1].nome === a.nome))}
      </details>`;
      d.addEventListener("toggle", () => { d.open ? zonasAbertas.add(z.nome) : zonasAbertas.delete(z.nome); });
      return d;
    }
    return htl.html`<article class=${z.especial ? "zone-card especial" : "zone-card"} data-zona=${z.nome}>
      <header><h3>${z.nome}</h3>${botaoFotosTag("zone", norm(z.nome), z.nome, false, snapAtual.key)}<span class="count">${contagem}</span></header>
      ${z.areas.map((a, i) => linhaArea(a, z, i > 0 && a.n > 1 && z.areas[i - 1].nome === a.nome))}
    </article>`;
  };
  // Each zone is placed once in the shortest column, so opening a name only pushes cards down
  // within that column (CSS multi-column layouts rebalance and make cards jump between columns).
  const n = width >= 900 ? 3 : width >= 600 ? 2 : 1;
  const colunas = Array.from({ length: n }, () => ({ altura: 0, zonas: [] }));
  for (const z of zonas) {
    const c = colunas.reduce((min, col) => col.altura < min.altura ? col : min);
    c.zonas.push(z);
    c.altura += z.areas.length + 2;
  }
  const aviso = nOcultas ? htl.html`<p class="aviso-filtro">${T(`${nOcultas} ${nOcultas === 1 ? "zona escondida" : "zonas escondidas"} pelo filtro do mapa.`, `${nOcultas} ${nOcultas === 1 ? "zone" : "zones"} hidden by the map filter.`)}
    <button class="filtro-tudo" onclick=${() => definir(viewof zonasOcultas, [])}>${T("Mostrar todas", "Show all")}</button></p>` : "";
  const grade = htl.html`<div class="board-grid">${colunas.map(c => htl.html`<div class="board-col">${c.zonas.map(cartao)}</div>`)}</div>`;
  const todas = abrir => () => grade.querySelectorAll("details.zone-card").forEach(d => { d.open = abrir; });
  const controles = celular ? htl.html`<div class="quadro-abrir">
    <button class="filtro-tudo" onclick=${todas(true)}>${T("Abrir todas", "Open all")}</button>
    <button class="filtro-tudo" onclick=${todas(false)}>${T("Fechar todas", "Close all")}</button>
  </div>` : "";
  return htl.html`<div>${aviso}${controles}${grade}</div>`;
}

Élder Widerberg Toque num nome para ver a chegada, a saída e todos os quadros do missionário.Tap a name to see when that missionary arrived and left, and every board they were on.

Sapucaia Toque no nome de uma área para ver todas as duplas que passaram por ela.Tap an area name to see every companionship that served there.

Síster Sena Borda tracejada: ainda não conseguimos ligar este nome a ninguém da lista de missionários. Pode estar faltando na lista, ou há dois missionários com o mesmo nome no mesmo período. Se você sabe quem é, escreva para info@ochamado.org.Dashed border: we couldn't match this name to anyone on the missionary list yet. They may be missing from the list, or two missionaries shared the name at the same time. If you know who it is, email info@ochamado.org.

Procure uma áreaFind an area

Digite o nome de uma área, cidade ou zona para ver todas as duplas que trabalharam ali.Type an area, city or zone to see every companionship that served there.

viewof buscaArea = htl.html`<input type="search" id="busca-area" class="form-control busca" placeholder="Área ou zona (ex.: Sapucaia)" data-placeholder-pt="Área ou zona (ex.: Sapucaia)" data-placeholder-en="Area or zone (e.g. Sapucaia)" autocomplete="off">`
{
  const q = norm(buscaArea);
  if (q.length < 2) return htl.html`<p class="busca-hint">${T("Digite pelo menos duas letras.", "Type at least two letters.")}</p>`;
  const achadas = [...historicoArea.values()]
    .filter(h => norm(h.nome).includes(q) || h.zonas.some(z => norm(z).includes(q)))
    .sort((a, b) => (norm(b.nome).startsWith(q) - norm(a.nome).startsWith(q)) || a.nome.localeCompare(b.nome, "pt"));
  if (!achadas.length) return htl.html`<p class="busca-hint">${T("Nenhuma área encontrada para", "No area found for")} “${buscaArea}”.</p>`;
  const periodo = h => h.ini === h.fim ? fmtYM(snaps[h.ini].key) : `${fmtYM(snaps[h.ini].key)} – ${fmtYM(snaps[h.fim].key)}`;
  const nPessoas = h => new Set([...h.duplas.values()].flatMap(d => d.dupla.map(p => p.id ?? "?" + p.n))).size;
  return htl.html`<div class="area-resultados">${achadas.map(h => htl.html`<button class="area-resultado" onclick=${() => abrirArea({ nome: h.nome }, { nome: h.zonas[0] })}>
      <span class="nome">${h.nome}<i class="bi bi-clock-history"></i></span>
      <span class="meta">${h.zonas.join(", ")}</span>
      <span class="meta">${periodo(h)} · ${nPessoas(h)} ${T("missionários", "missionaries")}</span>
    </button>`)}</div>`;
}
MissionáriosMissionaries
Lembrai-vos de que o valor das almas é grande à vista de Deus. Remember the worth of souls is great in the sight of God.
Doutrina e Convênios 18:10Doctrine and Covenants 18:10

Os missionários em númerosThe missionaries by the numbers

Ao todo, 515 missionários, élderes e sísteres, serviram com os Woodward. Brasileiros e norte-americanos vieram quase meio a meio.In all, 515 missionaries, elders and sisters, served with the Woodwards. Brazilians and North Americans came in nearly equal numbers.

{
  const conta = f => missionaries.filter(f).length;
  const media = l => l.reduce((s, x) => s + x, 0) / l.length;
  const fmtNum = x => x.toLocaleString(idioma === "en" ? "en-US" : "pt-BR", { maximumFractionDigits: 1 });
  const ym = k => { const [y, m] = k.split("-").map(Number); return y * 12 + m - 1; };
  const idx = new Map(snaps.map((s, i) => [s.key, i]));
  // Companions: only missionaries whose whole mission falls within the boards, so partial missions don't pull the average down.
  const completos = quadro.missionarios.filter(p => p.chegada && p.saida && aparicoes.has(p.id)
    && ym(p.chegada) >= ym(snaps[0].key) && ym(p.saida) <= ym(snaps.at(-1).key));
  const contagensComp = completos.map(p => new Set(aparicoes.get(p.id).filter(a => !a.especial).flatMap(a => a.companheiros.map(chavePessoa))).size).sort((a, b) => a - b);
  const mediaComp = media(contagensComp);
  const meioComp = Math.floor(contagensComp.length / 2);
  const medianaComp = contagensComp.length % 2
    ? contagensComp[meioComp]
    : (contagensComp[meioComp - 1] + contagensComp[meioComp]) / 2;
  // Time in one area: runs of consecutive boards in the same area; runs touching the first or last board are cut off, so skipped.
  const estadias = [];
  for (const [k, l] of aparicoes) {
    if (k.startsWith("?")) continue;
    let cur = null;
    for (const a of l) {
      const i = idx.get(a.key), ak = a.especial || !a.areaNome ? null : chaveArea(a.areaNome, a.zona);
      if (cur && ak && cur.ak === ak && i === cur.ult + 1) { cur.ult = i; continue; }
      if (cur) estadias.push(cur);
      cur = ak ? { ak, pri: i, ult: i } : null;
    }
    if (cur) estadias.push(cur);
  }
  const mesesEstadias = estadias.filter(e => e.pri > 0 && e.ult < snaps.length - 1).map(e => ym(snaps[e.ult].key) - ym(snaps[e.pri].key) + 1);
  const mediaArea = media(mesesEstadias);
  const pctSeisMeses = Math.round(100 * mesesEstadias.filter(n => n >= 6).length / mesesEstadias.length);
  const cid = cidadesNatal.cidades;
  const areasContadas = [...historicoArea.values()].map(h => ({ nome: h.nome,
    n: new Set([...h.duplas.values()].flatMap(d => d.dupla.map(chavePessoa))).size }));
  const maxArea = Math.max(0, ...areasContadas.map(a => a.n));
  const areasTop = areasContadas.filter(a => a.n === maxArea).map(a => a.nome).sort((a, b) => a.localeCompare(b, "pt"));
  // All 36 full months, including months with no recorded arrivals or departures.
  const movimento = Array.from({ length: 36 }, (_, i) => {
    const ano = 1997 + Math.floor((i + 6) / 12), mes = (i + 6) % 12 + 1;
    const chegadas = conta(m => m.ChegadaAno === ano && m["ChegadaMês"] === mes);
    const saidas = conta(m => m["SaídaAno"] === ano && m["SaídaMês"] === mes);
    return { ano, mes, chegadas, saidas, total: chegadas + saidas };
  });
  const maxMovimento = Math.max(...movimento.map(m => m.total));
  const minMovimento = Math.min(...movimento.map(m => m.total));
  const detalheMovimento = total => movimento.filter(m => m.total === total).map(m => htl.html`<div>${fmtMesAno(m)}<br>${m.chegadas} ${T(m.chegadas === 1 ? "chegada" : "chegadas", m.chegadas === 1 ? "arrival" : "arrivals")} + ${m.saidas} ${T(m.saidas === 1 ? "saída" : "saídas", m.saidas === 1 ? "departure" : "departures")}</div>`);
  const estados = p => new Set(cid.filter(c => c.pais === p).map(c => c.estado));
  const topBR = cid.filter(c => c.pais === "BR").sort((a, b) => b.n - a.n)[0];
  const topUS = cid.filter(c => c.pais === "US").sort((a, b) => b.n - a.n)[0];
  const sobrenomeTop = nacionalidade => {
    const grupos = new Map();
    for (const m of missionaries.filter(m => m.Nacionalidade === nacionalidade)) {
      const nome = m.Plaqueta.trim().replace(/^(?:[A-Z]\.?\s+)+/, "").replace(/^(?:(?:da|de|do|das|dos)\s+)+/i, "");
      const k = norm(nome);
      if (!grupos.has(k)) grupos.set(k, { nome, n: 0 });
      grupos.get(k).n++;
    }
    const max = Math.max(...[...grupos.values()].map(g => g.n));
    const nomes = [...grupos.values()].filter(g => g.n === max).map(g => g.nome).sort().join(" / ");
    return htl.html`<span>${T("Sobrenome mais comum", "Most common surname")}<br><strong>${nomes}</strong><br>${T(`${max} por sobrenome`, `${max} per surname`)}</span>`;
  };
  const detalheEstados = pais => {
    const nomes = { SP: "São Paulo", BA: "Bahia", RJ: "Rio de Janeiro", UT: "Utah", ID: "Idaho", CA: T("Califórnia", "California") };
    const totais = new Map();
    for (const c of cid.filter(c => c.pais === pais)) totais.set(c.estado, (totais.get(c.estado) ?? 0) + c.n);
    return [...totais].sort((a, b) => b[1] - a[1]).slice(0, 3).map(([uf, n]) => htl.html`<span class="stat-detail-line">${nomes[uf] ?? uf} · ${n}</span>`);
  };
  const tile = (num, lbl, detalhe = null) => {
    if (detalhe === null) return htl.html`<div class="stat-tile"><div class="num">${num}</div><div class="lbl">${lbl}</div></div>`;
    const frente = htl.html`<span class="stat-face stat-front"><span class="num">${num}</span><span class="lbl">${lbl}</span></span>`;
    const verso = htl.html`<span class="stat-face stat-back" aria-hidden="true"><span class="stat-detail">${detalhe}</span></span>`;
    const botao = htl.html`<button type="button" class="stat-tile stat-flip" aria-pressed="false" title=${T("Toque para virar", "Click to flip")}><span class="stat-flip-inner">${frente}${verso}</span><i class="bi bi-arrow-repeat stat-flip-hint" aria-hidden="true"></i></button>`;
    botao.addEventListener("click", () => {
      const virado = botao.classList.toggle("is-flipped");
      botao.setAttribute("aria-pressed", String(virado));
      frente.setAttribute("aria-hidden", String(virado));
      verso.setAttribute("aria-hidden", String(!virado));
    });
    return botao;
  };
  return htl.html`<div class="stat-tiles numeros">
      ${tile(conta(m => m["Título"] === "Élder"), T("élderes", "elders"), htl.html`<span>${conta(m => m["Título"] === "Élder" && m.Nacionalidade === "norte americano")} ${T("norte-americanos", "North Americans")}<br>${conta(m => m["Título"] === "Élder" && m.Nacionalidade === "brasileiro")} ${T("brasileiros", "Brazilians")}</span>`)}
      ${tile(conta(m => m["Título"] === "Síster"), T("sísteres", "sisters"), htl.html`<span>${conta(m => m["Título"] === "Síster" && m.Nacionalidade === "norte americano")} ${T("norte-americanas", "North Americans")}<br>${conta(m => m["Título"] === "Síster" && m.Nacionalidade === "brasileiro")} ${T("brasileiras", "Brazilians")}</span>`)}
      ${tile(conta(m => m.Nacionalidade === "brasileiro"), T("brasileiros", "Brazilians"), sobrenomeTop("brasileiro"))}
      ${tile(conta(m => m.Nacionalidade === "norte americano"), T("norte-americanos", "North Americans"), sobrenomeTop("norte americano"))}
      ${tile(fmtNum(mediaArea), T("meses, em média, numa mesma área", "months: average stay in one area"), htl.html`<span><strong>${pctSeisMeses}%</strong><br>${T("das estadias registradas duraram seis meses ou mais", "of recorded stays lasted six months or more")}</span>`)}
      ${tile(Math.round(mediaComp), T("companheiros, em média, por missão", "companions: average per mission"), htl.html`<span>${T("Metade dos missionários teve pelo menos", "Half of missionaries had at least")} <strong>${fmtNum(medianaComp)}</strong> ${T("companheiros registrados", "recorded companions")}</span>`)}
      ${tile(cid.length, T("cidades de origem", "hometowns"), htl.html`<span>${T("Maiores grupos", "Largest groups")}<br>${topBR.cidade} · ${topBR.n}<br>${topUS.cidade} · ${topUS.n}</span>`)}
      ${tile(estados("BR").size, T("estados brasileiros", "Brazilian states"), detalheEstados("BR"))}
      ${tile(estados("US").size, T("estados americanos", "U.S. states"), detalheEstados("US"))}
      ${tile(maxArea, T("missionários na área mais frequentada", "missionaries in the most-served area"), areasTop.join(" / "))}
      ${tile(maxMovimento, T("mais chegadas e saídas no mês", "most arrivals and departures in a month"), detalheMovimento(maxMovimento))}
      ${tile(minMovimento, T("menos chegadas e saídas no mês", "fewest arrivals and departures in a month"), detalheMovimento(minMovimento))}
    </div>
    <p class="numeros-nota">${T(
      "Toque nos cartões para ver os detalhes. A área mais frequentada conta pessoas distintas nos quadros disponíveis; há meses sem quadro e nomes ainda não identificados.",
      "Click the cards for details. The most-served area counts distinct people in the available boards; some months are missing and some names remain unidentified.")}</p>`;
}

De onde vieramWhere they came from

Cada círculo é uma cidade de origem, de onde missionários mandaram os papéis da missão; quanto maior o círculo, mais missionários saíram de lá.Each circle is a hometown, the city where missionaries submitted their mission papers; the bigger the circle, the more missionaries came from there.

cidadesNatal = FileAttachment("data/cidades.json").json()

{
  const el = htl.html`<div class="mapa-cidades" role="region" aria-label=${T("Mapa das cidades de origem dos missionários", "Map of the missionaries' hometowns")}></div>`;
  const m = L.map(el, { scrollWheelZoom: false, zoomSnap: 0.25, worldCopyJump: true }).setView([5, -70], 2);
  L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    maxZoom: 12
  }).addTo(m);
  const cor = { BR: "#1d7a43", US: "#c0392b" };
  const cidades = [...cidadesNatal.cidades].sort((a, b) => b.n - a.n); // big circles first, small ones on top
  for (const c of cidades) {
    L.circleMarker([c.lat, c.lon], {
      radius: 4 + Math.sqrt(c.n) * 3, color: "#fff", weight: 1,
      fillColor: cor[c.pais], fillOpacity: 0.75
    }).bindTooltip(`<strong>${c.cidade}</strong>, ${c.estado}<br>${c.n} ${c.n === 1 ? T("missionário", "missionary") : T("missionários", "missionaries")}`)
      .addTo(m);
  }
  // Zoom targets; Hawaii and Alaska would stretch the US view, so leave them out of it.
  const limites = f => L.latLngBounds(cidades.filter(f).map(c => [c.lat, c.lon])).pad(0.08);
  const vistas = {
    tudo: limites(() => true),
    br: limites(c => c.pais === "BR"),
    us: limites(c => c.pais === "US" && c.estado !== "HI" && c.estado !== "AK"),
    ut: limites(c => c.estado === "UT"),
    sp: limites(c => c.pais === "BR" && c.estado === "SP")
  };
  const somaUF = (p, uf) => cidades.filter(c => c.pais === p && c.estado === uf).reduce((s, c) => s + c.n, 0);
  let enquadrado = false;
  new ResizeObserver(() => {
    m.invalidateSize();
    if (!enquadrado && el.clientWidth > 0) { m.fitBounds(vistas.tudo); enquadrado = true; }
  }).observe(el);
  const soma = p => cidades.filter(c => c.pais === p).reduce((s, c) => s + c.n, 0);
  const botao = (k, txt) => htl.html`<button class="pill" onclick=${e => {
    e.currentTarget.parentElement.querySelectorAll(".pill").forEach(b => b.classList.toggle("active", b === e.currentTarget));
    m.flyToBounds(vistas[k], { duration: 0.8 });
  }}>${txt}</button>`;
  const botoes = htl.html`<div class="pill-group mapa-cidades-botoes">
    ${botao("tudo", T("Tudo", "All"))}${botao("br", `Brasil · ${soma("BR")}`)}${botao("sp", `São Paulo · ${somaUF("BR", "SP")}`)}${botao("us", `${T("EUA", "USA")} · ${soma("US")}`)}${botao("ut", `Utah · ${somaUF("US", "UT")}`)}
  </div>`;
  botoes.firstElementChild.classList.add("active");
  return htl.html`<div>${botoes}${el}</div>`;
}

Chegadas e saídasArrivals and departures

A missão mudava todo mês: uns chegavam do CTM, outros voltavam para casa. Escolha o ano e o mês para ver quem chegou e quem partiu. A chegada é o mês em que o missionário chegou ao campo missionário, não a entrada no CTM.The mission changed every month, as new missionaries arrived from the MTC and others went home. Pick a year and month to see who arrived and who left. Arrival is the month the missionary arrived in the mission field, not when they entered the MTC.

missionaries = FileAttachment("data/missionarios.json").json()
viewof anoSel = estado(1997)
viewof mesSel = estado(7)
mesesDe = a => a === 1997 ? [7, 8, 9, 10, 11, 12] : a === 2000 ? [1, 2, 3, 4, 5, 6, 7] : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
{
  const pill = (label, active, onclick) => htl.html`<button class=${active ? "pill active" : "pill"} onclick=${onclick}>${label}</button>`;
  // Months with an arrival:AAAA-MM or departure:AAAA-MM photo in data/fotos.csv get a small camera icon.
  const comFoto = new Set(["arrival", "departure"].flatMap(t => Object.keys(catalogoFotos.porTag?.[t] ?? {})));
  // Previous / next month across years (July 1997 – July 2000).
  const todos = [1997, 1998, 1999, 2000].flatMap(a => mesesDe(a).map(m => [a, m]));
  const i = todos.findIndex(([a, m]) => a === anoSel && m === mesSel);
  const ir = j => { const [a, m] = todos[j]; definir(viewof mesSel, m); definir(viewof anoSel, a); };
  return htl.html`<div class="filter-panel">
    <div class="pill-group"><span class="filter-label">${T("Ano", "Year")}</span>${[1997, 1998, 1999, 2000].map(a => pill(a, a === anoSel, () => {
      if (!mesesDe(a).includes(mesSel)) definir(viewof mesSel, mesesDe(a)[0]);
      definir(viewof anoSel, a);
    }))}</div>
    <div class="pill-group"><span class="filter-label">${T("Mês", "Month")}</span>${mesesDe(anoSel).map(m => pill(comFoto.has(`${anoSel}-${String(m).padStart(2, "0")}`)
      ? htl.html`${MES[m - 1]} <i class="bi bi-camera-fill pill-foto" title=${T("Tem foto deste mês", "Has a photo from this month")}></i>`
      : MES[m - 1], m === mesSel, () => definir(viewof mesSel, m)))}</div>
    <div class="nav-mes nav-mes-chegadas">
      <button class="nav-mes-btn" aria-label=${T("Mês anterior", "Previous month")} disabled=${i <= 0} onclick=${() => ir(i - 1)}><i class="bi bi-chevron-left"></i></button>
      <span class="snap-label">${fmtMesAno({ ano: anoSel, mes: mesSel })}</span>
      <button class="nav-mes-btn" aria-label=${T("Próximo mês", "Next month")} disabled=${i >= todos.length - 1} onclick=${() => ir(i + 1)}><i class="bi bi-chevron-right"></i></button>
    </div>
  </div>`;
}
{
  const ch = missionaries.filter(m => m.ChegadaAno === anoSel && m["ChegadaMês"] === mesSel);
  const sa = missionaries.filter(m => m["SaídaAno"] === anoSel && m["SaídaMês"] === mesSel);
  const byName = (a, b) => a.Plaqueta.localeCompare(b.Plaqueta, "pt");
  // Same person in quadro.json, so the tapped one is listed first when several share the name.
  const idDe = m => {
    const ch = m.ChegadaAno ? `${m.ChegadaAno}-${String(m["ChegadaMês"]).padStart(2, "0")}` : null;
    return quadro.missionarios.find(p => p.titulo === m["Título"] && p.plaqueta === m.Plaqueta && p.chegada === ch)?.id ?? null;
  };
  // Arrival / departure photos for the month, shown in their panel above the names.
  const fotoPainel = f => htl.html`<div class="despedida-foto">
      <img src=${f.src} alt=${T(f.pt, f.en)} loading="lazy">
      <p class="despedida-legenda">${T(f.pt, f.en)}<span class="credito">${T(f.credito[0], f.credito[1])}</span></p>
    </div>`;
  const panel = (arr, cls, icon, title, vazio, fotos = []) => htl.html`<div class=${"missionary-panel " + cls}>
    <h4><i class=${"bi " + icon}></i> ${title}<span class="count-badge">${arr.length}</span></h4>
    ${fotos.map(fotoPainel)}
    ${arr.length
      ? htl.html`<ul class="missionary-list">${[...arr].sort(byName).map(m => htl.html`<li><button class="link-caixa" title=${T("Ver histórico deste missionário", "See this missionary's history")}
          onclick=${() => abrirPessoa({ id: idDe(m), n: `${m["Título"][0]} ${m.Plaqueta}` })}>${m["Título"]} ${m.Plaqueta}</button><span class="tag">${nacionalidade(m.Nacionalidade)}</span></li>`)}</ul>`
      : htl.html`<p class="missionary-empty">${vazio}</p>`}
  </div>`;
  // Photos tagged arrival:AAAA-MM go in the Arrivals panel, departure:AAAA-MM in the Departures panel.
  const chaveSel = `${anoSel}-${String(mesSel).padStart(2, "0")}`;
  return htl.html`<div>
    <div class="missionary-board">
      ${panel(ch, "panel-chegadas", "bi-airplane-fill", T("Chegadas", "Arrivals"), T("Nenhuma chegada neste mês.", "No arrivals this month."), fotosDaTag("arrival", chaveSel))}
      ${panel(sa, "panel-saidas", "bi-house-heart-fill", T("Saídas", "Departures"), T("Nenhuma saída neste mês.", "No departures this month."), fotosDaTag("departure", chaveSel))}
    </div>
  </div>`;
}
Pois irei adiante de vós. For I will go before your face.
Doutrina e Convênios 84:88Doctrine and Covenants 84:88

Siga a jornada de um missionárioFollow a missionary’s journey

Digite um sobrenome e escolha Detalhes, para abrir a janela do missionário, ou Jornada, para ver o percurso no mapa: o nome sai do escritório da missão em Porto Alegre, passa pelas áreas dos Quadros do Presidente e volta a Porto Alegre no fim da missão. Abaixo do mapa ficam o itinerário e todos os quadros e companheiros.Type a last name and choose Details, to open the missionary’s window, or Journey, to see the route on the map: the name leaves the mission office in Porto Alegre, moves through the areas on the President’s Boards and returns to Porto Alegre at the end of the mission. Below the map are the itinerary and every board and companion.

viewof jornadaModo = estado({ tipo: "nenhum", auto: false })
seguirPessoa = chave => {
  definir(viewof jornadaModo, { tipo: "pessoa", chave, auto: true });
  setTimeout(() => document.getElementById("mapa-jornada")?.scrollIntoView({ behavior: "smooth", block: "center" }), 50);
}
chaveMes = (a, m) => `${a}-${String(m).padStart(2, "0")}`
mesAntes = k => { let [y, m] = k.split("-").map(Number); if (--m === 0) { m = 12; y--; } return chaveMes(y, m); }
mesDepois = k => { let [y, m] = k.split("-").map(Number); if (++m === 13) { m = 1; y++; } return chaveMes(y, m); }

jornadaLista = {
  if (jornadaModo.tipo === "pessoa") {
    const x = pessoas.get(jornadaModo.chave) ?? null;
    return [{ chave: jornadaModo.chave, x, nome: x ? `${x.titulo} ${x.plaqueta}` : nomeCompleto(jornadaModo.chave.slice(1)) }];
  }
  return [];
}

// A missionary's stops, month by month: the mission office at arrival, every área on the boards,
// and the office again at departure. Someone who drops off the boards before leaving (for example,
// the zones that went to the Santa Maria mission in July 1998) fades out instead of returning.
trajetoJornada = (chave, x) => {
  const ap = aparicoes.get(chave) ?? [];
  if (!ap.length) return null;
  const pri = ap[0].key, ult = ap.at(-1).key, ultSnap = snaps.at(-1).key;
  // Keys are "YYYY-MM|n" so an arrival (0), a board (1) and a departure (2) can share a month.
  // Missionaries who arrived before the first board (October 1997) have no known first areas:
  // they start at their first área on the boards instead of at the office.
  const parcial = !x?.chegada || x.chegada < snaps[0].key;
  const ev = parcial ? [] : [{ key: `${x.chegada <= pri ? x.chegada : mesAntes(pri)}|0`, pos: ESCRITORIO, tipo: "chegada" }];
  for (const a of ap) {
    const c = a.especial || !a.areaNome ? null : areaCoord(a.areaNome, a.zona);
    const pos = c ? [c.lat, c.lon] : a.especial ? ESCRITORIO : (ZONA_POS[a.zona] ?? ev.at(-1)?.pos ?? ESCRITORIO);
    ev.push({ key: `${a.key}|1`, pos, tipo: "area", area: a.especial ? a.zona : a.area, zona: a.zona, aprox: c?.fonte === "aproximado",
      fotoArea: !a.especial && a.areaNome ? chaveArea(a.areaNome, a.zona) : null,
      companheiros: a.companheiros.map(p => nomeCompleto(p.n)) });
  }
  const sumiu = snaps.find(s => s.key > ult && (!x?.saida || s.key < x.saida));
  if (sumiu) {
    const santaMaria = ["Ijuí", "Santo Ângelo"].includes(ap.at(-1).zona) && ult < DIVISAO;
    ev.push({ key: `${sumiu.key}|1`, pos: ev.at(-1).pos, tipo: "fim", santaMaria });
  } else if (x?.saida && x.saida <= mesDepois(ultSnap)) {
    ev.push({ key: `${x.saida >= ult ? x.saida : mesDepois(ult)}|2`, pos: ESCRITORIO, tipo: "saida" });
  } else if (ult === ultSnap) {
    // Still serving when the Woodwards left (July 2000): the boards end, so they stay at their last área.
    ev.push({ key: `${mesDepois(ultSnap)}|1`, pos: ev.at(-1).pos, tipo: "continua", ate: x?.saida ?? null });
  }
  ev.parcial = parcial;
  return ev;
}
viewof busca = htl.html`<input type="search" id="busca" class="form-control busca" placeholder="Sobrenome (ex.: Widerberg)" data-placeholder-pt="Sobrenome (ex.: Widerberg)" data-placeholder-en="Last name (e.g. Widerberg)" autocomplete="off">`
// Search result: a card with two choices, the journey on the map (if they're on any board) and their window.
function cartaoPessoa({ p, label, ap }) {
  const chave = p ? p.id : "?" + label;
  const nQuadros = `${ap.length} ${ap.length === 1 ? T("quadro", "board") : T("quadros", "boards")}`;
  const ativo = jornadaModo.tipo === "pessoa" && jornadaModo.chave === chave;
  const nome = p ? `${p.titulo} ${p.plaqueta}` : nomeCompleto(label);
  return htl.html`<div class=${"area-resultado pessoa-resultado" + (ativo ? " ativo" : "")} role="group" aria-label=${nome}>
    <span class="nome">${nome}</span>
    <span class="meta">${p
      ? `${nacionalidade(p.nacionalidade ?? "")} · ${fmtYM(p.chegada)} – ${fmtYM(p.saida)}`
      : T("Sem registro de chegada/saída", "No arrival/departure record")}</span>
    <span class="meta">${nQuadros}</span>
    <span class="pessoa-escolhas">
      ${ap.length ? htl.html`<button type="button" class="pill" aria-label=${`${T("Jornada", "Journey")}: ${nome}`} onclick=${() => seguirPessoa(chave)}><i class="bi bi-signpost-2" aria-hidden="true"></i> ${T("Jornada", "Journey")}</button>` : ""}
      <button type="button" class="pill" aria-label=${`${T("Detalhes", "Details")}: ${nome}`} onclick=${() => abrirPessoa(p ? { id: p.id } : { id: null, n: label })}><i class="bi bi-person-lines-fill" aria-hidden="true"></i> ${T("Detalhes", "Details")}</button>
    </span>
  </div>`;
}
{
  const q = norm(busca);
  if (q.length < 2) return htl.html`<p class="busca-hint jornada-centro">${T("Digite pelo menos duas letras.", "Type at least two letters.")}</p>`;
  const pessoasEnc = quadro.missionarios
    .filter(p => norm(p.plaqueta).includes(q) || norm(`${p.titulo} ${p.plaqueta}`).includes(q) || norm(`${p.titulo[0]} ${p.plaqueta}`).includes(q))
    .map(p => ({ p, ap: aparicoes.get(p.id) ?? [] }));
  const semRegistro = [...aparicoes.keys()]
    .filter(k => k.startsWith("?") && norm(k.slice(1)).includes(q))
    .map(k => ({ label: k.slice(1), ap: aparicoes.get(k) }));
  const todos = [...pessoasEnc, ...semRegistro];
  if (!todos.length) return htl.html`<p class="busca-hint jornada-centro">${T("Ninguém encontrado para", "No one found for")} “${busca}”.</p>`;
  return htl.html`<div class="jornada-resultados">
    ${todos.length > 30 ? htl.html`<p class="busca-hint jornada-centro">${todos.length} ${T("resultados; mostrando 30. Refine a busca.", "results; showing 30. Try a longer name.")}</p>` : ""}
    <div class="area-resultados">${todos.slice(0, 30).map(cartaoPessoa)}</div>
  </div>`;
}
{
  if (jornadaModo.tipo !== "pessoa") return htl.html`<div></div>`;
  const v = jornadaLista[0];
  return htl.html`<div class="jornada-pessoa-topo">
    <h3>${v.nome}</h3>
    <p class="meta">${v.x ? `${nacionalidade(v.x.nacionalidade ?? "")} · ${T("Chegada", "Arrived")} ${fmtYM(v.x.chegada)} · ${T("Saída", "Left")} ${fmtYM(v.x.saida)}` : T("Sem registro de chegada/saída", "No arrival/departure record")}</p>
    ${botaoAutoZoom()}
  </div>`;
}
function botaoAutoZoom() {
  const mapa = viewof mapaJornada;
  const b = htl.html`<button class="pill jornada-zoom-toggle"></button>`;
  const atualizar = () => {
    const ligado = mapa.seguir ?? true;
    b.setAttribute("aria-pressed", ligado);
    b.replaceChildren(htl.html`<i class=${ligado ? "bi bi-zoom-out" : "bi bi-zoom-in"}></i> ${ligado ? T("Desligar o zoom automático", "Turn off auto zoom") : T("Ligar o zoom automático", "Turn on auto zoom")}`);
  };
  b.onclick = () => { mapa.seguir = !(mapa.seguir ?? true); mapa.dispatchEvent(new Event("autozoom")); atualizar(); };
  atualizar();
  return b;
}
viewof mapaJornada = {
  const el = htl.html`<div id="mapa-jornada" class="mapa-jornada" role="region" aria-label="Mapa da jornada dos missionários / Map of the missionaries' journey"></div>`;
  const m = L.map(el, { scrollWheelZoom: false, zoomSnap: 0.25 }).setView([-29.5, -51.6], 7);
  // The camera moves while the journey plays: keep more tiles around the view and don't swap tiles mid-zoom.
  const opcoesFundo = { maxZoom: 14, keepBuffer: 6, updateWhenZooming: false };
  L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { ...opcoesFundo, attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>' }).addTo(m);
  L.geoJSON(rsContorno, { style: { color: "#1b5e46", weight: 1.5, fill: false, dashArray: "4 4" }, interactive: false }).addTo(m);
  el.leaflet = m;
  el.camada = L.layerGroup().addTo(m);
  // Fit with room in pixels for what is drawn beside the points: the moving name tag extends ~180px to the
  // right (two lines with the companion), and the play control sits in the top-right corner.
  el.margens = () => {
    const estreito = el.clientWidth < 600;
    return { paddingTopLeft: [30, estreito ? 100 : 85], paddingBottomRight: [estreito ? 150 : 216, 40], maxZoom: 11 };
  };
  // The element is detached while this cell runs; fit the view once it has a real size.
  new ResizeObserver(() => {
    m.invalidateSize();
    if (el.limites && !el.enquadrado && el.clientWidth > 0) { m.fitBounds(el.limites, el.margens()); el.enquadrado = true; }
  }).observe(el);
  return el;
}
{
  const el = viewof mapaJornada, m = el.leaflet, camada = el.camada;
  camada.clearLayers();
  if (el.controle) el.controle.remove();
  const autoplay = jornadaModo.auto && el.ultimoModo !== jornadaModo;
  el.ultimoModo = jornadaModo;
  const VERDE = "#1b5e46";
  // One color per missionary, in a fixed order (the largest group has 19 people).
  const CORES = ["#1f6fb4", "#d62728", "#2a9d3c", "#8e44ad", "#e07b00", "#00838f", "#c2185b", "#6d4c41", "#3949ab", "#7c8c00",
    "#ef476f", "#00695c", "#b5179e", "#5d6d7e", "#f4a300", "#0277bd", "#9c27b0", "#558b2f", "#bf360c", "#283593"];
  const reduzir = matchMedia("(prefers-reduced-motion: reduce)").matches;
  // The movement is the point of this map and only starts when someone taps a button, so the names always
  // glide; with "reduce motion" on (Windows "Animation effects" off) each month just holds a little longer.
  const PAUSA = reduzir ? 1.4 : 1.1, MOVE = 1.5, PASSO = PAUSA + MOVE;

  L.circleMarker(ESCRITORIO, { radius: 5, color: VERDE, weight: 2.5, fillColor: "#fff", fillOpacity: 1, interactive: false })
    .addTo(camada);

  const viagens = jornadaLista.map(v => ({ ...v, ev: trajetoJornada(v.chave, v.x) })).filter(v => v.ev);
  const enquadrar = pts => {
    el.limites = L.latLngBounds(pts);
    el.enquadrado = false;
    if (el.clientWidth > 0) { m.fitBounds(el.limites, el.margens()); el.enquadrado = true; }
  };
  if (jornadaModo.tipo === "nenhum") {
    enquadrar(Object.values(ZONA_POS));
    const convite = htl.html`<div class="jornada-convite"><i class="bi bi-search"></i> ${T("Procure um missionário acima para ver sua jornada no mapa.", "Look up a missionary above to see their journey on the map.")}</div>`;
    L.DomEvent.disableClickPropagation(convite);
    el.controle = new (L.Control.extend({ onAdd: () => convite }))({ position: "topright" }).addTo(m);
    return htl.html`<div class="jornada-baixo"></div>`;
  }
  if (!viagens.length) {
    enquadrar(Object.values(ZONA_POS));
    return htl.html`<p class="busca-hint">${T("Ninguém desta turma aparece nos Quadros do Presidente, que começam em outubro de 1997.",
      "No one in this group is on the President’s Boards, which start in October 1997.")}</p>`;
  }
  enquadrar([ESCRITORIO, ...viagens.flatMap(v => v.ev.map(e => e.pos))]);

  // Steps: every month in which someone in the group moves.
  const passosEv = [...new Set(viagens.flatMap(v => v.ev.map(e => e.key)))].sort();
  // Months with no President’s Board (and the gap between arrival and the first board) are steps too,
  // the name keeps its last known área, companion and count (slightly faded), noted as "no board this month".
  const mesesEv = new Set(passosEv.map(k => k.slice(0, 7)));
  const passos = [...passosEv];
  for (let k = passosEv[0].slice(0, 7); k < passosEv.at(-1).slice(0, 7); k = mesDepois(k)) if (!mesesEv.has(k)) passos.push(`${k}|1`);
  passos.sort();
  const semInfo = passos.map(k => !mesesEv.has(k.slice(0, 7)));
  const n = passos.length;
  const chavePos = p => `${p[0]},${p[1]}`;

  // Group photos use the recorded arrival or departure month, even when playback shifts the stop.
  const fotosEscritorio = new Map();
  for (const v of viagens) for (const e of v.ev) {
    if (e.tipo !== "chegada" && e.tipo !== "saida") continue;
    const chegada = e.tipo === "chegada";
    const tipo = chegada ? "arrival" : "departure";
    const mes = chegada ? v.x?.chegada : v.x?.saida;
    if (!mes) continue;
    const id = `${tipo}:${mes}`;
    const existente = fotosEscritorio.get(id);
    if (existente) {
      if (e.key < existente.key) existente.key = e.key;
      continue;
    }
    const fotos = fotosDaTag(tipo, mes);
    if (fotos.length) fotosEscritorio.set(id, { key: e.key, fotos });
  }
  const gruposFotos = [...fotosEscritorio.values()].sort((a, b) => a.key.localeCompare(b.key));
  const tituloFotos = T("Chegadas e saídas", "Arrivals and departures");
  const rotuloFotos = T("Ver fotos de chegadas e saídas", "View arrival and departure photos");
  let fotosVisiveis = [];
  const botaoEscritorio = htl.html`<button type="button" class="photo-tag-button" title=${rotuloFotos} aria-label=${rotuloFotos} onclick=${() => abrirGaleriaFotos(fotosVisiveis, tituloFotos)}><i class="bi bi-camera-fill" aria-hidden="true"></i></button>`;
  L.DomEvent.disableClickPropagation(botaoEscritorio);
  const botoesEscritorio = htl.html`<div class="jornada-pino-fotos jornada-fotos-escritorio">${botaoEscritorio}</div>`;
  const marcadorFotos = fotosEscritorio.size ? L.marker(ESCRITORIO, {
    icon: L.divIcon({ className: "jornada-pino-marcador", html: botoesEscritorio, iconSize: null }),
    keyboard: false,
    zIndexOffset: 1100
  }) : null;
  let passoFotos = null;

  viagens.forEach((v, q) => { v.cor = CORES[q % CORES.length]; });
  for (const v of viagens) {
    // Where the person is at each step: j = index of their latest stop; vis = on the map.
    v.est = passos.map(k => {
      let j = -1;
      v.ev.forEach((e, q) => { if (e.key <= k) j = q; });
      if (j < 0) return { vis: false, j, pos: v.ev[0].pos };
      const e = v.ev[j];
      const foi = e.tipo === "fim" || (e.tipo === "saida" && e.key < k);
      return { vis: !foi, j, pos: e.pos };
    });
    v.trilha = L.polyline([], { color: v.cor, weight: 2.5, opacity: 0.7, interactive: false }).addTo(camada);
    // Pins: a numbered dot at each área, in the order served (1 = first área). Back-to-back boards in the same
    // área are one stop; going back to an earlier área adds its new number to that dot ("2, 5").
    const vistos = new Map();
    let nArea = 0, ant = null;
    v.ev.forEach((e, q) => {
      if (e.tipo !== "area") { ant = null; return; }
      if (ant && ant.area === e.area && ant.zona === e.zona) return;
      ant = e; nArea++;
      const c = chavePos(e.pos);
      if (!vistos.has(c)) {
        const rotulo = document.createElement("span");
        rotulo.className = "jornada-pino";
        rotulo.style.setProperty("--c", v.cor);
        const numero = document.createElement("span");
        const fotos = htl.html`<span class="jornada-pino-fotos"></span>`;
        rotulo.append(numero, fotos);
        vistos.set(c, { q, paradas: [], rotulo, numero, fotos, fotosAreas: new Map(), nomes: [], pino: L.marker(e.pos, {
          icon: L.divIcon({ className: "jornada-pino-marcador", html: rotulo, iconSize: null }), zIndexOffset: -1000, keyboard: false }) });
      }
      const p = vistos.get(c);
      p.paradas.push({ n: nArea, q });
      // Different areas can share a coordinate; reveal each photo button only on its own first visit.
      if (e.fotoArea && !p.fotosAreas.has(e.fotoArea)) {
        const botao = botaoFotosTag("area", e.fotoArea, e.area);
        if (botao) {
          botao.hidden = true;
          L.DomEvent.disableClickPropagation(botao);
          p.fotos.append(botao);
          p.fotosAreas.set(e.fotoArea, { q, botao });
        }
      }
      if (!p.nomes.includes(e.area)) p.nomes.push(e.area);
      p.pino.bindTooltip(`<strong>${p.nomes.join(" / ")}</strong> <span class="mapa-dica-zona">${e.zona}</span>${e.aprox ? `<br><em>${T("posição aproximada", "approximate location")}</em>` : ""}`, { direction: "top", offset: [0, -10], className: "dica-area" });
    });
    v.pinos = [...vistos.values()];
    v.conta = htl.html`<span class="jornada-conta"></span>`;
    v.comp = htl.html`<span class="jornada-comp" hidden></span>`;
    v.areaEl = htl.html`<span class="jornada-pill-area" hidden></span>`;
    v.pill = htl.html`<div class="jornada-pill" style=${`--c:${v.cor}`} title=${v.nome}><span class="jornada-pill-texto"><span>${v.nome}</span>${v.linhaArea = htl.html`<span class="jornada-pill-linha">${v.areaEl}${v.conta}</span>`}${v.comp}</span></div>`;
    v.marcador = L.marker(v.ev[0].pos, { icon: L.divIcon({ className: "jornada-marcador", html: v.pill, iconSize: null }), keyboard: false })
      .on("click", () => abrirPessoa(v.x ? { id: v.x.id } : { id: null, n: v.chave.slice(1) }))
      .addTo(camada);
    v.ultJ = null; v.ultDy = null;
  }

  // At each step, people sharing a point are stacked; more than four collapse into one count pill.
  const grupos = passos.map((k, i) => {
    const porPonto = new Map();
    for (const v of viagens) if (v.est[i].vis) {
      const c = chavePos(v.est[i].pos);
      if (!porPonto.has(c)) porPonto.set(c, []);
      porPonto.get(c).push(v);
    }
    const juntos = [];
    for (const g of porPonto.values()) {
      if (g.length > 4) { juntos.push({ pos: g[0].est[i].pos, nomes: g.map(v => v.nome) }); g.forEach(v => { v.est[i].junto = true; v.est[i].dy = 0; }); }
      else g.forEach((v, q) => { v.est[i].dy = q * 22 - (g.length - 1) * 11; });
    }
    return juntos;
  });
  const camadaGrupos = L.layerGroup().addTo(camada);
  let grupoMostrado = null;
  const mostrarGrupos = i => {
    if (grupoMostrado === i) return;
    grupoMostrado = i;
    camadaGrupos.clearLayers();
    if (i === null) return;
    for (const g of grupos[i]) L.marker(g.pos, {
      icon: L.divIcon({ className: "jornada-marcador", html: `<div class="jornada-pill jornada-grupo">${g.nomes.length} ${T("missionários", "missionaries")}</div>`, iconSize: null })
    }).bindTooltip(g.nomes.join("<br>"), { direction: "top", offset: [0, -10] }).addTo(camadaGrupos);
  };

  let foco = null;
  const aplicarFoco = () => {
    for (const v of viagens) {
      const f = v === foco, apagado = foco && !f;
      v.trilha.setStyle({ weight: f ? 4 : 2.5, opacity: apagado ? 0.12 : f ? 0.95 : 0.7 });
      if (f) v.trilha.bringToFront();
      v.pill.classList.toggle("foco", f && viagens.length > 1);
      v.pill.classList.toggle("apagado", !!apagado);
      v.marcador.setZIndexOffset(f ? 1000 : 0);
      v.pinos.forEach(p => { p.rotulo.style.opacity = apagado ? 0.25 : 1; });
    }
    legenda.querySelectorAll("button").forEach((b, q) => b.classList.toggle("active", viagens[q] === foco));
  };

  const ease = u => u < 0.5 ? 2 * u * u : 1 - (-2 * u + 2) ** 2 / 2;
  const lerp = (a, b, u) => [a[0] + (b[0] - a[0]) * u, a[1] + (b[1] - a[1]) * u];
  const rotuloMes = htl.html`<span class="jornada-mes"></span>`;
  const rotuloMarco = htl.html`<span class="jornada-marco" hidden></span>`;
  const slider = htl.html`<input type="range" class="jornada-slider" min="0" max=${n - 1} step="1" value="0" aria-label=${T("Mês", "Month")}>`;
  const v0 = viagens[0];
  const notaParcial = viagens.length === 1 && v0.ev.parcial ? htl.html`<p class="jornada-parcial">${v0.x?.chegada
    ? T(`Chegou em ${fmtYM(v0.x.chegada)}; os Quadros do Presidente só começam em ${fmtYM(snaps[0].key)}, então as primeiras áreas não aparecem.`, `Arrived ${fmtYM(v0.x.chegada)}; the President’s Boards only start in ${fmtYM(snaps[0].key)}, so the first areas are missing.`)
    : T(`Sem data de chegada; a jornada começa no primeiro quadro em que aparece.`, `No arrival date; the journey starts on the first board they appear on.`)}</p>` : "";
  // One missionary: a single line under the map with where they are now, updated as the journey plays.
  const descreverParada = e => e.tipo === "chegada" ? T("Chegada: escritório da missão, Porto Alegre", "Arrival: mission office, Porto Alegre")
    : e.tipo === "saida" ? T("Saída: de volta a Porto Alegre", "Departure: back to Porto Alegre")
    : e.tipo === "continua" ? (e.ate
      ? T(`Os Woodward partem; continuou na missão até ${fmtYM(e.ate)} com o próximo presidente.`, `The Woodwards leave; stayed in the mission until ${fmtYM(e.ate)} under the next president.`)
      : T("Os Woodward partem; continuou na missão com o próximo presidente.", "The Woodwards leave; stayed in the mission under the next president."))
    : e.tipo === "fim" ? (e.santaMaria ? T("Passou para a Missão Brasil Santa Maria", "Moved to the Brazil Santa Maria Mission") : T("Não aparece mais nos quadros", "No longer on the boards"))
    : htl.html`<strong>${e.area}</strong> <span class="zona">${e.zona}</span>`;
  const itinerario = viagens.length === 1 ? htl.html`<p class="jornada-agora" aria-live="polite"></p>` : null;
  // Months in the current área (1, 2, 3…), counting from the first board of this stay; months between boards count.
  const mesNum = k => { const [y, m] = k.split("-").map(Number); return y * 12 + m; };
  const mesesNaArea = (v, j, mes) => {
    const e = v.ev[j];
    let ini = j;
    while (ini > 0 && v.ev[ini - 1].tipo === "area" && v.ev[ini - 1].area === e.area && v.ev[ini - 1].zona === e.zona) ini--;
    return Math.max(1, mesNum(mes) - mesNum(v.ev[ini].key.slice(0, 7)) + 1);
  };
  // Partial histories (on the mission before the first board): the first área run is their first *known* área.
  const primeiraConhecida = (v, j) => {
    if (!v.ev.parcial || j < 0 || v.ev[j].tipo !== "area") return false;
    for (let q = 1; q <= j; q++) if (v.ev[q].area !== v.ev[0].area || v.ev[q].zona !== v.ev[0].zona) return false;
    return true;
  };
  const motivoParcial = x => !x?.chegada
    ? T("sem data de chegada", "no arrival date")
    : x.chegada < "1997-07"
      ? T("já estava na missão quando os Woodward chegaram (julho de 1997)", "already on the mission when the Woodwards arrived (July 1997)")
      : T(`chegou em ${fmtYM(x.chegada)}, antes dos primeiros quadros`, `arrived ${fmtYM(x.chegada)}, before the first boards`);
  let paradaMostrada = null;
  const mostrarParada = (j, mes, vazio) => {
    const chave = j + "|" + mes;
    if (!itinerario || chave === paradaMostrada) return;
    paradaMostrada = chave;
    itinerario.replaceChildren(...(j < 0 ? [] : [htl.html`<span class="periodo">${fmtYM(mes)}</span>`, htl.html`<span>${descreverParada(viagens[0].ev[j])}${viagens[0].ev[j].tipo === "area" ? htl.html`<span class="jornada-meses"> · ${(() => { const n = mesesNaArea(viagens[0], j, mes); return T(`${n}º mês na área`, `month ${n} in this area`); })()}</span>` : ""}${primeiraConhecida(viagens[0], j) ? htl.html`<span class="jornada-inicio-nota"> — ${T("primeira área conhecida", "first known area")}; ${motivoParcial(viagens[0].x)}</span>` : ""}${vazio ? htl.html`<span class="jornada-sem-info"> — ${T("sem quadro neste mês", "no board this month")}</span>` : ""}</span>`]));
  };

  // Counter beside each name: how many months the missionary has been in the current área (1, 2, 3…),
  // starting over at each transfer. Months between boards count, since they stayed put.
  let mesContado = null;
  const contar = (k, atual) => {
    for (const v of viagens) {
      let txt = "";
      const j = v.est[atual].j, e = j >= 0 ? v.ev[j] : null;
      v.pill.classList.toggle("sem-info", semInfo[atual]);
      if (e?.tipo === "continua") {
        // Stayed on after the Woodwards left: just the name (the line under the map says until when).
        txt = "";
      } else if (e?.tipo === "area") {
        txt = T(`mês ${mesesNaArea(v, j, k)}`, `mo. ${mesesNaArea(v, j, k)}`);
      }
      v.conta.textContent = txt;
      v.conta.hidden = !txt;
      // Companions in this área, on a second line of the moving name.
      const comp = e?.tipo === "area" && e.companheiros.length ? T(`com ${e.companheiros.join(" e ")}`, `with ${e.companheiros.join(" and ")}`) : "";
      v.comp.textContent = comp;
      v.comp.hidden = !comp;
      // Where they are, on its own line: the área, or arrival/departure.
      let ondeTxt = "";
      if (e) {
        if (e.tipo === "area") ondeTxt = e.area;
        else if (e.tipo === "chegada") ondeTxt = T("Chegada", "Arrival");
        else if (e.tipo === "saida") ondeTxt = T("Saída", "Departure");
      }
      v.areaEl.textContent = ondeTxt;
      v.areaEl.hidden = !ondeTxt;
      v.linhaArea.hidden = !ondeTxt && !txt;
    }
  };

  function desenhar(f) {
    const i = Math.min(Math.floor(f), n - 1), u = f - i, b = Math.min(i + 1, n - 1);
    if (marcadorFotos && i !== passoFotos) {
      passoFotos = i;
      const fotos = gruposFotos.filter(g => g.key <= passos[i]).flatMap(g => g.fotos);
      fotosVisiveis = [...new Map(fotos.map(f => [f.src, f])).values()];
      const mostrar = fotosVisiveis.length > 0;
      if (mostrar && !camada.hasLayer(marcadorFotos)) camada.addLayer(marcadorFotos);
      if (!mostrar && camada.hasLayer(marcadorFotos)) camada.removeLayer(marcadorFotos);
    }
    const repouso = u === 0;
    // Update the name tag text first, so the left/right choice below measures its new width.
    const atual = repouso || u < 0.5 ? i : b;
    if (atual !== mesContado) { mesContado = atual; contar(passos[atual].slice(0, 7), atual); }
    for (const v of viagens) {
      const A = v.est[i], B = v.est[b];
      let pos, op;
      if (repouso) { pos = A.pos; op = A.vis && !A.junto ? 1 : 0; }
      else if (A.vis && B.vis) { pos = lerp(A.pos, B.pos, ease(u)); op = 1; }
      else { pos = A.vis ? A.pos : B.pos; op = A.vis ? 1 - u : B.vis ? u : 0; }
      v.marcador.setLatLng(pos);
      // Near the right edge (mostly on phones), put the name tag on the left of the point instead.
      const px = m.latLngToContainerPoint(pos).x, w = v.pill.offsetWidth, larg = el.clientWidth;
      const esquerda = px + w + 16 > larg - 8 && px - w - 16 > larg - px - w - 16;
      if (esquerda !== v.esquerda) { v.pill.classList.toggle("esquerda", esquerda); v.esquerda = esquerda; }
      v.marcador.setOpacity(op);
      const icone = v.marcador.getElement();
      if (icone) icone.style.pointerEvents = op < 0.1 ? "none" : "";
      const dy = (repouso ? A.dy : B.dy) ?? 0;
      if (dy !== v.ultDy) { v.pill.style.setProperty("--dy", `${dy}px`); v.ultDy = dy; }
      const pts = A.j >= 0 ? v.ev.slice(0, A.j + 1).filter(e => e.tipo !== "fim").map(e => e.pos) : [];
      if (!repouso && A.vis && B.vis && B.j > A.j && v.ev[B.j].tipo !== "fim") pts.push(pos);
      v.trilha.setLatLngs(pts);
      if (A.j !== v.ultJ) {
        v.pinos.forEach(p => {
          const feitas = p.paradas.filter(r => r.q <= A.j);
          if ((feitas.length > 0) !== camada.hasLayer(p.pino)) feitas.length ? camada.addLayer(p.pino) : camada.removeLayer(p.pino);
          p.numero.textContent = feitas.map(r => r.n).join(", ");
          p.fotosAreas.forEach(({ q, botao }) => { botao.hidden = q > A.j; });
        });
        v.ultJ = A.j;
      }
    }
    mostrarGrupos(repouso ? i : null);
    rotuloMes.textContent = fmtYM(passos[atual].slice(0, 7));
    const mesAtual = passos[atual].slice(0, 7);
    rotuloMarco.textContent = mesAtual === "2000-07" ? T("os Woodward partem", "the Woodwards leave") : mesAtual === "1997-07" ? T("os Woodward chegam", "the Woodwards arrive") : "";
    rotuloMarco.hidden = !rotuloMarco.textContent;
    slider.value = atual;
    mostrarParada(viagens[0].est[atual].j, passos[atual].slice(0, 7), semInfo[atual]);
  }

  // Clock: each step holds, then moves to the next.
  const total = (n - 1) * PASSO;
  let t = 0, tocando = false, antes = null, raf = null, timer = null;
  const fDe = t => {
    if (t >= total) return n - 1;
    const i = Math.floor(t / PASSO), w = MOVE ? (t - i * PASSO - PAUSA) / MOVE : (t - i * PASSO >= PAUSA ? 1 : 0);
    return w <= 0 ? i : w >= 1 ? i + 1 : i + w;
  };
  const botaoPlay = htl.html`<button class="jornada-play" aria-label=${T("Tocar", "Play")}><i class="bi bi-play-fill"></i></button>`;
  const marcarBotao = () => {
    botaoPlay.innerHTML = tocando ? '<i class="bi bi-pause-fill"></i>' : t >= total ? '<i class="bi bi-arrow-counterclockwise"></i>' : '<i class="bi bi-play-fill"></i>';
    botaoPlay.setAttribute("aria-label", tocando ? T("Pausar", "Pause") : t >= total ? T("Recomeçar", "Restart") : T("Tocar", "Play"));
  };
  let seguir = el.seguir ?? true, passoCamera = null;
  const enquadrarPasso = (i, animar) => {
    const v = viagens[0];
    const a = v.est[i], b = v.est[Math.min(i + 1, n - 1)];
    const lim = L.latLngBounds([a.pos, b.pos]);
    // Whole zoom levels only (sharp, reusable tiles), and move as little as possible: stay put if both places
    // already fit, slide at the same zoom if they fit there, and only zoom when the level has to change.
    const alvo = m._getBoundsCenterZoom(lim, { ...el.margens(), maxZoom: 10 });
    const z = Math.max(6, Math.min(10, Math.floor(alvo.zoom)));
    const zAtual = Math.round(m.getZoom());
    if (!animar) { m.setView(alvo.center, z, { animate: false }); return; }
    // The camera moves during the hold, before the name moves: moving both at once lets the trail and the
    // dots drift apart while Leaflet animates the zoom.
    const dur = Math.max(0.5, PAUSA - 0.15);
    const vista = m.getBounds().pad(-0.18);
    if (z === zAtual && vista.contains(lim)) return;
    if (z === zAtual || (z === zAtual + 1 && vista.contains(lim))) m.panTo(alvo.center, { animate: true, duration: dur, easeLinearity: 0.2 });
    else m.flyTo(alvo.center, z, { duration: dur });
  };
  const camera = t => {
    if (!seguir) return;
    if (t >= total) {
      if (passoCamera !== "fim") { passoCamera = "fim"; m.flyToBounds(el.limites, { ...el.margens(), duration: 1.2 }); }
      return;
    }
    const i = Math.floor(t / PASSO);
    if (i !== passoCamera) { passoCamera = i; enquadrarPasso(i, true); }
  };
  const quadroAnim = ts => {
    if (!tocando) return;
    if (antes !== null) t += (ts - antes) / 1000;
    antes = ts;
    desenhar(fDe(t));
    camera(t);
    if (t >= total) { tocando = false; marcarBotao(); return; }
    raf = requestAnimationFrame(quadroAnim);
  };
  const tocar = () => { if (t >= total) t = 0; passoCamera = null; tocando = true; antes = null; marcarBotao(); raf = requestAnimationFrame(quadroAnim); };
  const pausar = () => { tocando = false; cancelAnimationFrame(raf); marcarBotao(); };
  botaoPlay.onclick = () => tocando ? pausar() : tocar();
  slider.oninput = () => {
    // Reframe the map first, so the name tag picks its side (left/right) for the new view.
    pausar(); t = +slider.value * PASSO;
    if (seguir) { passoCamera = +slider.value; enquadrarPasso(+slider.value, false); }
    desenhar(+slider.value); marcarBotao();
  };
  // The "Turn auto zoom on/off" button above the map sets el.seguir and fires "autozoom" on the map.
  const aoMudarZoom = () => {
    seguir = el.seguir ?? true;
    if (seguir) { passoCamera = Math.min(Math.floor(t / PASSO), n - 1); enquadrarPasso(passoCamera, true); }
    else m.flyToBounds(el.limites, { ...el.margens(), duration: 0.8 });
  };
  el.addEventListener("autozoom", aoMudarZoom);
  invalidation.then(() => el.removeEventListener("autozoom", aoMudarZoom));
  // After every camera move, redraw the trail, dots and name so they line up again.
  const realinhar = () => desenhar(fDe(t));
  m.on("zoomend moveend", realinhar);
  invalidation.then(() => m.off("zoomend moveend", realinhar));
  // When this cell re-runs for the same people (for example, a language switch), carry on from the same moment.
  const assinatura = jornadaModo.tipo + "|" + viagens.map(v => v.chave).join(",");
  const salvo = el.salvo?.assinatura === assinatura && el.salvo.modo === jornadaModo ? el.salvo : null;
  invalidation.then(() => { el.salvo = { assinatura, modo: jornadaModo, t, tocando: tocando || timer !== null }; tocando = false; cancelAnimationFrame(raf); clearTimeout(timer); });

  const caixa = htl.html`<div class="jornada-controle">${botaoPlay}<div class="jornada-rotulos">${rotuloMes}${rotuloMarco}</div></div>`;
  L.DomEvent.disableClickPropagation(caixa);
  el.controle = new (L.Control.extend({ onAdd: () => caixa }))({ position: "topright" }).addTo(m);

  const legenda = htl.html`<div class="jornada-legenda">${viagens.length > 1 ? viagens.map(v => htl.html`<button class="chip jornada-chip" style=${`--c:${v.cor}`} title=${T("Seguir só este missionário", "Follow just this missionary")} onmouseenter=${() => { foco = v; aplicarFoco(); }} onmouseleave=${() => { foco = null; aplicarFoco(); }} onclick=${() => seguirPessoa(v.chave)}>${v.nome}${v.ev.parcial ? htl.html` <span class="parcial">${T(`desde ${fmtYM(snaps[0].key)}`, `from ${fmtYM(snaps[0].key)}`)}</span>` : ""}${v.ev.at(-1).tipo === "continua" ? htl.html` <span class="parcial">${v.ev.at(-1).ate ? T(`até ${fmtYM(v.ev.at(-1).ate)}`, `until ${fmtYM(v.ev.at(-1).ate)}`) : T("continuou", "stayed on")}</span>` : ""}</button>`) : ""}</div>`;
  aplicarFoco();
  if (salvo) t = salvo.t;
  desenhar(fDe(t));
  marcarBotao();
  if (salvo?.tocando) tocar();
  else if (autoplay) timer = setTimeout(() => { timer = null; tocar(); }, 700);

  return htl.html`<div class="jornada-baixo">
    <div class="jornada-linha">${slider}</div>
    ${viagens.length > 1 ? htl.html`<p class="jornada-dica">${T(`Cada missionário tem uma cor. Toque num nome abaixo para seguir só essa jornada; toque no nome no mapa para abrir a janela do missionário. “Desde ${fmtYM(snaps[0].key)}”: chegou antes dos primeiros quadros, então a jornada começa na primeira área conhecida. “Até …”: continuou na missão depois que os Woodward partiram, em julho de 2000; os quadros acabam em junho de 2000, então fica parado na última área conhecida.`,
      `Each missionary has a color. Tap a name below to follow just that journey; tap a name on the map to open the missionary's window. “From ${fmtYM(snaps[0].key)}”: arrived before the first boards, so the journey starts at the first known area. “Until …”: stayed in the mission after the Woodwards left in July 2000; the boards end in June 2000, so they stay at their last known area.`)}</p>` : ""}
    ${legenda}${notaParcial}${itinerario ?? ""}
    <p class="dlg-nota">${T("Os Quadros do Presidente vão de outubro de 1997 a junho de 2000 e faltam alguns meses; entre um quadro e outro, o missionário fica parado no mapa. Algumas áreas têm posição aproximada.",
      "The President’s Boards run from October 1997 to June 2000 and a few months are missing; between boards, the missionary stays put on the map. Some areas have an approximate location.")}</p>
    ${viagens.length === 1 ? htl.html`<div class="jornada-fim">
      <button class="pill" onclick=${() => abrirPessoa(v0.x ? { id: v0.x.id } : { id: null, n: v0.chave.slice(1) })}><i class="bi bi-person-lines-fill"></i> ${T(
        `Ver todas as áreas e companheiros ${/^Síster/.test(v0.nome) ? "da" : "do"} ${v0.nome}`,
        `See all ${v0.nome}'s areas and companions`)}</button>
    </div>` : ""}
  </div>`;
}

Quer incluir uma foto no seu mapa da jornada missionária? Envie a foto para info@ochamado.org e informe seu nome como aparecia na plaqueta (com Élder ou Síster), a área e o mês e ano aproximados em que a foto foi tirada. Want a photo added to your missionary journey map? Email it to info@ochamado.org and include your name as it appeared on your missionary name tag (with Elder or Sister), the area, and the approximate month and year the photo was taken.

TemploTemple
Irmãos, não prosseguiremos em tão grande causa? Brethren, shall we not go on in so great a cause?
Doutrina e Convênios 128:22Doctrine and Covenants 128:22

A abertura de terra do Templo de Porto AlegreThe Porto Alegre Temple groundbreaking

Templo de Porto Alegre Brasil FotoPhoto: Ricardo630, Wikimedia Commons, CC BY 3.0
Obra do Templo de Porto Alegre, com andaimes e blocos, e a cidade ao fundo
A obra no alto do morro, com a cidade ao fundoThe construction site on the hill, with the city beyond
O Élder Hereth diante do tapume e das placas da obra do Templo de Porto Alegre
O Élder Hereth diante do tapume e das placas da obraElder Hereth in front of the construction fence and signs
Templo de Porto Alegre Brasil pronto, num dia de céu azul
O templo prontoThe finished temple
Templo de Porto Alegre Brasil iluminado à noite
O templo iluminado à noiteThe temple lit up at night

Fotos: cortesia do Élder HerethPhotos courtesy of Elder Hereth

No dia 2 de maio de 1998, durante a missão dos Woodward, mais de 3.500 pessoas se reuniram numa encosta com vista para Porto Alegre para a cerimônia de abertura de terra do primeiro templo do Rio Grande do Sul.

On May 2, 1998, during the Woodwards' mission, more than 3,500 people gathered on a hillside overlooking Porto Alegre to break ground for the first temple in Rio Grande do Sul.

  1. out 1997Oct 1997O Presidente Gordon B. Hinckley anuncia um templo em Porto Alegre na conferência geral de outubro de 1997.President Gordon B. Hinckley announces a temple in Porto Alegre at the October 1997 general conference.
  2. 2 mai 1998May 2, 1998O Presidente James E. Faust, da Primeira Presidência, preside a cerimônia de abertura de terra, com o Élder Joseph B. Wirthlin, do Quórum dos Doze, e o Élder W. Craig Zwick, presidente da Área Brasil.President James E. Faust of the First Presidency presides at the groundbreaking, with Elder Joseph B. Wirthlin of the Quorum of the Twelve and Elder W. Craig Zwick, president of the Brazil Area.
  3. dez 2000Dec 2000Visitação pública, com cerca de 25 mil visitantes.Public open house, with about 25,000 visitors.
  4. 17 dez 2000Dec 17, 2000O Presidente Hinckley dedica o templo, o 102º da Igreja e o terceiro do Brasil, no bairro Vila Jardim, com vista para a cidade e o Guaíba.President Hinckley dedicates the temple, the Church's 102nd and Brazil's third, in the Vila Jardim neighborhood overlooking the city and the Guaíba.

Esteve na abertura de terra? Fotos e lembranças desse dia são bem-vindas emWere you at the groundbreaking? Photos and memories of that day are welcome at info@ochamado.org, para que possam ser incluídas aqui., so they can be added here.

FonteSource: Church News, 9 de maio de 1998May 9, 1998.

Abertura de terra do Templo de Porto AlegrePorto Alegre Temple groundbreaking

Veja um trecho de 30 segundos da cerimônia com o Presidente James E. Faust no vídeo do reencontro preparado pelo Élder George.Watch a 30-second clip of the ceremony featuring President James E. Faust in Elder George’s reunion video.

Assistir ao curto clipe com o Presidente Faust a partir de 00:01:27Watch the short clip with President Faust starting at 00:01:27
FotosPhotos
Dou graças ao meu Deus todas as vezes que me lembro de vós. I thank my God upon every remembrance of you.
Filipenses 1:3Philippians 1:3

Fotos da missãoMission photos

Publicamos fotos compartilhadas por ex-missionários e amigos da missão. Nas legendas, identificamos apenas missionários já listados no site; outros nomes, só com permissão. Para enviar fotos ou pedir a remoção de uma foto ou do seu nome, escreva para info@ochamado.org.We publish photos shared by former missionaries and friends of the mission. Captions name only missionaries already listed on the site; other names require permission. To send photos or request removal of a photo or your name, email info@ochamado.org.

catalogoFotos = FileAttachment("data/fotos.json").json()
fotosPorSrc = new Map(catalogoFotos.fotos.map(f => [f.src, f]))
fotosDaTag = (tipo, id) => (catalogoFotos.porTag?.[tipo]?.[id] ?? []).map(src => fotosPorSrc.get(src)).filter(Boolean)
dialogoFotosTag = {
  const d = htl.html`<dialog class="photo-tag-dialog" aria-labelledby="photo-tag-title"></dialog>`;
  document.body.appendChild(d);
  d.addEventListener("click", e => { if (e.target === d) { const r = d.getBoundingClientRect(); if (e.clientX < r.left || e.clientX > r.right || e.clientY < r.top || e.clientY > r.bottom) d.close(); } });
  invalidation.then(() => { d.close(); d.remove(); });
  return d;
}
// How the photo viewer opens a missionary's window. A plain holder, filled in next to abrirPessoa: the window
// has photo buttons that open the viewer, and OJS cells may not reference each other in a cycle.
pessoaDaFoto = ({ abrir: null })
// "In this photo: …", the missionaries tagged in a photo, in the order of the sheet's tags. Each name opens their window.
nestaFoto = (f, fechar) => {
  const l = (f.tags ?? []).filter(t => t.type === "missionary").map(t => pessoas.get(t.id)).filter(Boolean);
  if (!l.length) return "";
  return htl.html`<span class="photo-people"><span class="photo-people-rotulo">${T("Nesta foto:", "In this photo:")}</span> ${l.flatMap((x, i) => [i ? " " : "",
    htl.html`<span class="photo-person-item"><button type="button" class="photo-person" onclick=${() => { fechar(); pessoaDaFoto.abrir?.({ id: x.id, n: `${x.titulo[0]} ${x.plaqueta}` }); }}>${x.titulo} ${x.plaqueta}</button>${i < l.length - 1 ? "," : ""}</span>`])}</span>`;
}
abrirGaleriaFotos = (fotos, nome, inicio = 0, titulo = null) => {
  if (!fotos.length) return;
  const d = dialogoFotosTag;
  let atual = 0;
  const imagem = htl.html`<img class="photo-viewer-image" alt="">`;
  const legenda = htl.html`<figcaption></figcaption>`;
  const contador = htl.html`<span class="fotos-contador" role="status" aria-live="polite"></span>`;
  const mostrar = indice => {
    atual = (indice + fotos.length) % fotos.length;
    const f = fotos[atual];
    imagem.src = f.src;
    imagem.alt = T(f.pt, f.en) || T(`Foto ${atual + 1}`, `Photo ${atual + 1}`);
    legenda.replaceChildren(T(f.pt, f.en),
      f.mes ? htl.html`<span class="photo-tag-date">${fmtYM(f.mes)}</span>` : "",
      nestaFoto(f, () => d.close()),
      htl.html`<span class="credito">${f.link ? htl.html`<a href=${f.link} target="_blank" rel="noopener">${T(f.credito[0], f.credito[1])}</a>` : T(f.credito[0], f.credito[1])}</span>`,
      // A photo tagged story:<id> links to that story.
      ...(f.tags ?? []).filter(t => t.type === "story").map(t => historiasDados.historias.find(h => h.id === t.id)).filter(Boolean).map(h =>
        htl.html`<button type="button" class="photo-story-link" onclick=${() => abrirHistorias([h.id])}><i class="bi bi-book" aria-hidden="true"></i> ${T("Ler a história", "Read the story")}: ${textoHistoria(h).titulo}</button>`));
    legenda.scrollTop = 0;
    contador.textContent = `${atual + 1} ${T("de", "of")} ${fotos.length}`;
  };
  const anterior = htl.html`<button type="button" class="photo-viewer-arrow" aria-label=${T("Foto anterior", "Previous photo")} disabled=${fotos.length < 2} onclick=${() => mostrar(atual - 1)}><i class="bi bi-chevron-left" aria-hidden="true"></i></button>`;
  const proxima = htl.html`<button type="button" class="photo-viewer-arrow" aria-label=${T("Próxima foto", "Next photo")} disabled=${fotos.length < 2} onclick=${() => mostrar(atual + 1)}><i class="bi bi-chevron-right" aria-hidden="true"></i></button>`;
  d.replaceChildren(htl.html`<div class="photo-tag-heading"><h2 id="photo-tag-title">${titulo ?? `${T("Fotos", "Photos")}: ${nome}`}</h2><button type="button" class="photo-tag-close" aria-label=${T("Fechar fotos", "Close photos")} onclick=${() => d.close()}><i class="bi bi-x-lg" aria-hidden="true"></i></button></div>`,
    htl.html`<div class="photo-tag-gallery"><figure>${imagem}<div class="photo-viewer-controls">${anterior}${contador}${proxima}</div>${legenda}</figure></div>`);
  d.onkeydown = e => {
    if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
    if (e.key === "ArrowLeft") { e.preventDefault(); mostrar(atual - 1); }
    if (e.key === "ArrowRight") { e.preventDefault(); mostrar(atual + 1); }
  };
  mostrar(inicio);
  if (!d.open) d.showModal();
  d.scrollTop = 0;
}
botaoFotosTag = (tipo, id, nome, texto = false, mes = null) => {
  const fotos = fotosDaTag(tipo, id).filter(f => !mes || f.mes === mes); // on the board (mes): only photos dated that month
  const n = fotos.length;
  if (!n) return "";
  const label = T(`Ver ${n} foto(s): ${nome}`, `View ${n} photo(s): ${nome}`);
  const classe = texto ? "pill dlg-acao" : "photo-tag-button";
  const icone = texto ? "bi bi-camera" : "bi bi-camera-fill";
  return htl.html`<button type="button" class=${classe} title=${label} aria-label=${label} onclick=${e => { e.preventDefault(); e.stopPropagation(); abrirGaleriaFotos(fotos, nome); }}><i class=${icone} aria-hidden="true"></i>${texto ? htl.html`<span>${T("Fotos", "Photos")} (${n})</span>` : ""}</button>`;
}
// A missionary's name as in the photo credits ("Élder Hereth" / "Elder Hereth"), and the title of the photos they sent in.
nomeCredito = x => T(`${x.titulo} ${x.plaqueta}`, `${x.titulo === "Síster" ? "Sister" : x.titulo === "Élder" ? "Elder" : x.titulo} ${x.plaqueta}`)
tituloFotosEnviadas = x => T(`Fotos enviadas ${x.titulo === "Síster" ? "pela" : "pelo"} ${nomeCredito(x)}`, `Photos submitted by ${nomeCredito(x)}`)
// "Photos submitted (n)" button for a missionary's window: the photos they sent in, whoever appears in them.
botaoFotosEnviadas = x => {
  const fotos = fotosDaTag("sender", x.id), n = fotos.length;
  if (!n) return "";
  const nome = `${x.titulo} ${x.plaqueta}`;
  const titulo = tituloFotosEnviadas(x);
  return htl.html`<button type="button" class="pill dlg-acao" title=${titulo} aria-label=${`${titulo} (${n})`} onclick=${() => abrirGaleriaFotos(fotos, nome, 0, titulo)}><i class="bi bi-images" aria-hidden="true"></i><span>${T("Fotos enviadas", "Photos submitted")} (${n})</span></button>`;
}
ordemFotos = {
  const l = [...catalogoFotos.fotos];
  // Seed the gallery order once per page load using the current time.
  let seed = Date.now() >>> 0;
  const random = () => {
    seed = (Math.imul(1664525, seed) + 1013904223) >>> 0;
    return seed / 4294967296;
  };
  const embaralhar = a => { for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } return a; };
  embaralhar(l);
  // Most photos come from one sender. So the others aren't lost among them, every page of six has up to two
  // photos from other people, from different senders when possible, until those run out.
  const porRemetente = new Map();
  for (const f of l) {
    const r = f.tags.find(t => t.type === "sender")?.id ?? "";
    if (!porRemetente.has(r)) porRemetente.set(r, []);
    porRemetente.get(r).push(f);
  }
  const [principal, ...demais] = [...porRemetente.values()].sort((a, b) => b.length - a.length);
  const outros = [];
  while (demais.some(a => a.length)) outros.push(...embaralhar(demais.filter(a => a.length)).map(a => a.pop()));
  const ordem = [];
  while (principal?.length || outros.length) {
    const deOutros = outros.splice(0, Math.max(2, 6 - principal.length));
    ordem.push(...embaralhar([...deOutros, ...principal.splice(0, 6 - deOutros.length)]));
  }
  // filtro = the missionary chosen in "Courtesy of" ("" = everyone).
  return { fotos: ordem, atual: 0, filtro: "" };
}
// Browse six photos at a time, everyone's or one sender's; preserve the page and the choice when switching languages.
{
  const tamanho = 6;
  const remetentes = Object.entries(catalogoFotos.porTag?.sender ?? {}).map(([id, srcs]) => ({ x: pessoas.get(id), n: srcs.length })).filter(r => r.x)
    .sort((a, b) => a.x.plaqueta.localeCompare(b.x.plaqueta, "pt") || (a.x.chegada ?? "").localeCompare(b.x.chegada ?? ""));
  // Two senders with the same name are told apart by their dates.
  const repetido = r => remetentes.filter(o => nomeCredito(o.x) === nomeCredito(r.x)).length > 1;
  const seletor = htl.html`<select class="form-select fotos-filtro-select" id="fotos-filtro">
    <option value="">${T("Todas as fotos", "All photos")} (${ordemFotos.fotos.length})</option>
    ${remetentes.map(r => htl.html`<option value=${r.x.id}>${nomeCredito(r.x)}${repetido(r) ? `, ${fmtYM(r.x.chegada)} – ${fmtYM(r.x.saida)}` : ""} (${r.n})</option>`)}
  </select>`;
  seletor.value = ordemFotos.filtro;
  const escolhido = () => pessoas.get(ordemFotos.filtro);
  const visiveis = () => ordemFotos.filtro ? ordemFotos.fotos.filter(f => f.tags.some(t => t.type === "sender" && t.id === ordemFotos.filtro)) : ordemFotos.fotos;
  let fotos = visiveis(), n = fotos.length;
  const grade = htl.html`<div class="fotos-grade"></div>`;
  const contador = htl.html`<span class="fotos-contador" role="status" aria-live="polite"></span>`;
  const anterior = htl.html`<button type="button" class="fotos-pagina" aria-label=${T("Fotos anteriores", "Previous photos")} title=${T("Fotos anteriores", "Previous photos")}><i class="bi bi-chevron-left" aria-hidden="true"></i></button>`;
  const proxima = htl.html`<button type="button" class="fotos-pagina" aria-label=${T("Próximas fotos", "Next photos")} title=${T("Próximas fotos", "Next photos")}><i class="bi bi-chevron-right" aria-hidden="true"></i></button>`;
  const mostrar = inicio => {
    const ultima = Math.max(0, Math.floor((n - 1) / tamanho) * tamanho);
    ordemFotos.atual = Math.max(0, Math.min(ultima, inicio));
    const lote = fotos.slice(ordemFotos.atual, ordemFotos.atual + tamanho);
    grade.replaceChildren(...lote.map((f, i) => {
      const titulo = T(f.pt, f.en) || T(`Foto ${ordemFotos.atual + i + 1}`, `Photo ${ordemFotos.atual + i + 1}`);
      return htl.html`<button type="button" class="fotos-miniatura" aria-label=${T("Ampliar: ", "Enlarge: ") + titulo} onclick=${() => abrirGaleriaFotos(fotos, T("Missão", "Mission"), ordemFotos.atual + i, escolhido() ? tituloFotosEnviadas(escolhido()) : null)}>
        <img src=${f.src} alt=${titulo} loading="lazy" decoding="async">
      </button>`;
    }));
    contador.textContent = n ? `${ordemFotos.atual + 1}–${Math.min(ordemFotos.atual + tamanho, n)} ${T("de", "of")} ${n}` : T("Nenhuma foto", "No photos");
    anterior.disabled = ordemFotos.atual === 0;
    proxima.disabled = ordemFotos.atual + tamanho >= n;
  };
  seletor.onchange = () => { ordemFotos.filtro = seletor.value; fotos = visiveis(); n = fotos.length; mostrar(0); };
  anterior.onclick = () => mostrar(ordemFotos.atual - tamanho);
  proxima.onclick = () => mostrar(ordemFotos.atual + tamanho);
  mostrar(ordemFotos.atual);
  return htl.html`<div class="fotos-show"><div class="fotos-filtro"><label for="fotos-filtro">${T("Cortesia de", "Courtesy of")}</label>${seletor}</div>${grade}<div class="fotos-controles">${anterior}${contador}${proxima}</div></div>`;
}
HistóriasStories
Portanto, recorro às coisas fracas do mundo, aos que são indoutos e desprezados, para que debulhem as nações pelo poder do meu Espírito; I call upon the weak things of the world, those who are unlearned and despised, to thresh the nations by the power of my Spirit.
Doutrina e Convênios 35:13Doctrine and Covenants 35:13

Histórias da missãoMission stories

O Senhor muitas vezes confiou a pessoas comuns a extraordinária responsabilidade de proclamar Seu evangelho. Como ensinou Paulo, “Deus escolheu as coisas fracas deste mundo para confundir as fortes” (1 Coríntios 1:27).

Ao atendermos ao chamado do Salvador — “Ide por todo o mundo, pregai o evangelho a toda criatura” (Marcos 16:15) —, fomos testemunhas do poder da fé, da atuação do Espírito e da influência transformadora do evangelho de Jesus Cristo.

Pelo caminho, também houve ônibus perdidos, expressões mal compreendidas e momentos que até hoje nos fazem rir.

Estas são as nossas histórias.

The Lord has often entrusted ordinary people with the extraordinary responsibility of proclaiming His gospel. As Paul taught, “God hath chosen the weak things of the world to confound the things which are mighty” (1 Corinthians 1:27).

In answering the Savior’s call to “go ye into all the world, and preach the gospel to every creature” (Mark 16:15), we were witnesses to the power of faith, the workings of the Spirit, and the transforming influence of the gospel of Jesus Christ.

Along the way, there were also missed buses, misunderstood expressions, and moments that still make us laugh.

These are our stories.

historiasDados = FileAttachment("data/historias.json").json()
historiasDaTag = (tipo, id) => historiasDados.historias.filter(h => h.tags.some(t => t.type === tipo && t.id === id))
// The story in the reader's language, falling back to the other one.
textoHistoria = h => (idioma === "en" ? h.en ?? h.pt : h.pt ?? h.en)
// "Send a story" email, already set up with what to send (used above and below the list).
emailHistoria = "mailto:info@ochamado.org?subject=" + encodeURIComponent(T("História da missão", "Mission story")) + "&body=" + encodeURIComponent(T(
  "Título:\nSeu nome na missão (ex.: Élder Silva):\nAno:\nÁrea ou cidade:\n\nHistória:\n\n\n\nAutorizo a publicação desta história no site O Chamado: sim\n",
  "Title:\nYour name in the mission (e.g. Elder Silva):\nYear:\nArea or city:\n\nStory:\n\n\n\nI allow this story to be published on the O Chamado site: yes\n"))
// Which story the reader shows and whether the list is narrowed to some stories ({ ids, nome }).
// Kept outside the list cell so switching languages keeps the place.
estadoHistorias = ({ sel: null, filtro: null, lendo: false, desenhar: null })
// Closes any open window, shows the given stories in the Stories section (the list narrowed to them
// when there are several) and scrolls there.
abrirHistorias = (ids, nome = null) => {
  document.querySelectorAll("dialog[open]").forEach(d => d.close());
  estadoHistorias.filtro = ids.length > 1 ? { ids, nome } : null;
  estadoHistorias.sel = ids[0] ?? null;
  estadoHistorias.lendo = ids.length === 1;
  estadoHistorias.desenhar?.();
  document.getElementById("historias-navegador")?.scrollIntoView({ behavior: "smooth", block: "start" });
}
// "Stories (n)" button for an area or missionary window; empty when there are none.
botaoHistoriasTag = (tipo, id, nome) => {
  const l = historiasDaTag(tipo, id);
  if (!l.length) return "";
  const label = T(`Ler ${l.length === 1 ? "a história" : `as ${l.length} histórias`}: ${nome}`, `Read ${l.length === 1 ? "the story" : `the ${l.length} stories`}: ${nome}`);
  return htl.html`<button type="button" class="pill dlg-acao" title=${label} aria-label=${label} onclick=${e => { e.preventDefault(); e.stopPropagation(); abrirHistorias(l.map(h => h.id), nome); }}><i class="bi bi-book" aria-hidden="true"></i><span>${T("Histórias", "Stories")} (${l.length})</span></button>`;
}
// A scrollable list of stories grouped by year, oldest first, next to a reader that shows the
// selected one with its photos and a note on its source. On phones there is no scrolling box: the page
// shows either the full list or one full story (est.lendo), under a pinned bar with "All stories" and,
// once the story's own title has scrolled away, that title.
{
  const todas = historiasDados.historias;
  if (!todas.length) return htl.html`<p class="historias-vazio">${T("Ainda não há histórias publicadas. Que tal mandar a primeira?", "No stories yet. Why not send the first one?")}</p>`;
  const est = estadoHistorias;
  const corpo = (h, t) => htl.html`<div class="historia-texto" lang=${t === h.en ? "en" : "pt-BR"}>${t.paragrafos.map(p => { const el = htl.html`<p></p>`; el.innerHTML = p; return el; })}</div>`;
  const quando = h => h.mes ? fmtMesAno({ ano: +h.mes.slice(0, 4), mes: +h.mes.slice(5, 7) }) : h.ano;
  // Authors are stored by mission name in Portuguese ("Élder Hereth"); English drops the accent.
  const autor = h => T(h.autor, h.autor.replace(/^Élder\b/, "Elder").replace(/^Síster\b/, "Sister"));
  const meta = (h, t) => [autor(h), t.area || h.area, quando(h)].filter(Boolean).join(" · ");
  const outraLingua = h => (idioma === "en" && !h.en) ? " (in Portuguese)" : (idioma === "pt" && !h.pt) ? " (em inglês)" : "";
  const fotos = (h, t) => {
    const lista = fotosDaTag("story", h.id);
    if (!lista.length) return "";
    return htl.html`<div class="historia-fotos">${lista.map((f, i) => {
      const titulo = T(f.pt, f.en) || T(`Foto ${i + 1}`, `Photo ${i + 1}`);
      return htl.html`<button type="button" class="fotos-miniatura" aria-label=${T("Ampliar: ", "Enlarge: ") + titulo} onclick=${() => abrirGaleriaFotos(lista, t.titulo, i)}>
        <img src=${f.src} alt=${titulo} loading="lazy" decoding="async">
      </button>`;
    })}</div>`;
  };
  const filtro = htl.html`<div class="historias-filtro" role="status"></div>`;
  const lista = htl.html`<nav class="historias-indice" aria-label=${T("Lista de histórias", "List of stories")}></nav>`;
  const leitor = htl.html`<article class="historia-leitor" tabindex="-1"></article>`;
  const estreito = () => matchMedia("(max-width: 767.98px)").matches;
  const raiz = htl.html`<div class="historias-navegador" id="historias-navegador">${filtro}<div class="historias-grade">${lista}${leitor}</div></div>`;
  // Phones: back from a story to the list, with the story just read in view and briefly highlighted.
  // Swap and scroll in the same step, without the page's smooth scrolling, so the list simply appears
  // instead of the page visibly travelling back up.
  const voltar = () => {
    est.lendo = false; desenhar();
    const item = lista.querySelector('[aria-current="true"]');
    (item ?? raiz).scrollIntoView({ block: "center", behavior: "instant" });
    if (item) { item.classList.add("historia-item-voltou"); setTimeout(() => item.classList.remove("historia-item-voltou"), 1600); }
  };
  // Phones: the pinned bar. It shows the title once the story's own title is out of view.
  const barraTitulo = htl.html`<span class="historia-barra-titulo" aria-hidden="true"></span>`;
  const barra = htl.html`<div class="historia-barra"><button type="button" class="historia-voltar" onclick=${voltar}><i class="bi bi-arrow-left" aria-hidden="true"></i> ${T("Todas as histórias", "All stories")}</button>${barraTitulo}</div>`;
  const observador = new IntersectionObserver(([e]) => barra.classList.toggle("com-titulo", !e.isIntersecting && e.boundingClientRect.top < 0));
  invalidation.then(() => observador.disconnect());

  const desenhar = () => {
    const visiveis = est.filtro ? todas.filter(h => est.filtro.ids.includes(h.id)) : todas;
    if (!visiveis.some(h => h.id === est.sel)) est.sel = visiveis[0].id;
    const atual = todas.find(h => h.id === est.sel);

    filtro.replaceChildren(...(est.filtro ? [
      htl.html`<span>${T(`${visiveis.length} histórias`, `${visiveis.length} stories`)}${est.filtro.nome ? `: ${est.filtro.nome}` : ""}</span>`,
      htl.html`<button type="button" class="pill" onclick=${() => { est.filtro = null; desenhar(); }}>${T("Ver todas", "See all")} (${todas.length})</button>`,
    ] : [htl.html`<span>${todas.length} ${T(todas.length === 1 ? "história" : "histórias", todas.length === 1 ? "story" : "stories")}</span>`]));

    // Group by year; the list keeps the build's order (oldest first).
    const grupos = [];
    for (const h of visiveis) {
      const ano = h.ano || T("Sem data", "Undated");
      if (grupos.at(-1)?.ano !== ano) grupos.push({ ano, l: [] });
      grupos.at(-1).l.push(h);
    }
    lista.replaceChildren(...grupos.map(g => htl.html`<div class="historias-ano">
      <h3>${g.ano}</h3>
      <ul>${g.l.map(h => {
        const t = textoHistoria(h);
        return htl.html`<li><button type="button" class="historia-item" aria-current=${h.id === est.sel ? "true" : null}
            onclick=${() => { est.sel = h.id; est.lendo = true; desenhar(); if (estreito()) raiz.scrollIntoView({ block: "start", behavior: "instant" }); }}>
          <span class="historia-item-titulo">${t.titulo}</span>
          <span class="historia-item-meta">${[autor(h), t.area || h.area, h.mes ? fmtYM(h.mes) : ""].filter(Boolean).join(" · ")}</span>
        </button></li>`;
      })}</ul>
    </div>`));

    const t = textoHistoria(atual);
    // A different story starts at its top; redrawing the same one (e.g. a language switch) keeps the place.
    const mesmaHistoria = leitor.dataset.id === atual.id;
    leitor.dataset.id = atual.id;
    if (!mesmaHistoria) leitor.scrollTop = 0;
    const cabecalho = htl.html`<header><h3 class="historia-titulo">${t.titulo}</h3><p class="historia-meta">${meta(atual, t)}${outraLingua(atual)}</p></header>`;
    barraTitulo.textContent = t.titulo;
    barra.classList.remove("com-titulo");
    observador.disconnect(); observador.observe(cabecalho);
    leitor.replaceChildren(
      barra,
      cabecalho,
      fotos(atual, t),
      corpo(atual, t),
      atual.diario ? htl.html`<p class="historia-fonte"><i class="bi bi-journal-text" aria-hidden="true"></i> ${T("Adaptado do diário de missão do autor.", "Adapted from the author’s mission journal.")}</p>` : "");
    raiz.classList.toggle("lendo", Boolean(est.lendo));

    // Keep the selected title in view inside the list without moving the page.
    requestAnimationFrame(() => {
      const item = lista.querySelector('[aria-current="true"]');
      if (!item) return;
      const top = item.offsetTop, bottom = top + item.offsetHeight; // the list is position: relative
      if (top < lista.scrollTop) lista.scrollTop = top - 32;
      else if (bottom > lista.scrollTop + lista.clientHeight) lista.scrollTop = bottom - lista.clientHeight + 8;
    });
  };
  est.desenhar = desenhar;
  invalidation.then(() => { if (est.desenhar === desenhar) est.desenhar = null; });
  desenhar();
  return raiz;
}
// Below the stories: President Woodward's request for the April 2016 reunion (in our words, from the reunion's
// planning notes), and a link to answer it.
{
  // Combine the request, its context, and submission guidance in one invitation.
  return htl.html`<div class="pedido-woodward" id="pedido-woodward">
    <p class="pedido-rotulo">${T("O pedido do Presidente Woodward", "President Woodward’s request")}</p>
    <p class="pedido-chamada">${T("Escreva uma, duas ou mais páginas sobre algo da sua missão.", "Write one, two, or more pages about something from your mission.")}</p>
    <p class="pedido-contexto">${T("No ", "At the ")}<a href="#reencontros">${T("reencontro de abril de 2016", "April 2016 reunion")}</a>${T(
      ", o Presidente Woodward convidou Matthew Grow para falar sobre a importância das nossas histórias. Matthew serviu conosco na missão e hoje é diretor-gerente do Departamento de História da Igreja. O Presidente Woodward também pediu que cada missionário escrevesse algo da sua missão, para ser reunido e compartilhado entre nós. Este site continua esse pedido.",
      ", President Woodward invited Matthew Grow to speak about the importance of our histories. Matthew served with us in the mission and is now managing director of the Church History Department. President Woodward also asked each missionary to write something from their mission, to be gathered and shared with one another. This site carries that request forward.")}</p>
    <p class="pedido-contexto">${T("Escreva do jeito que lembrar, em português ou em inglês. Fotos da mesma época também são bem-vindas.", "Write it the way you remember it, in Portuguese or English. Photos from the same time are welcome too.")}</p>
    <a class="pedido-enviar" href=${emailHistoria}><i class="bi bi-envelope" aria-hidden="true"></i> ${T("Mandar uma história", "Send a story")}</a>
  </div>`;
}
ReencontrosReunions
Alma se regozijou muito por haver encontrado seus irmãos. Alma did rejoice exceedingly to see his brethren.
Alma 17:2Alma 17:2

Outubro de 2027: 30 anosOctober 2027: 30 years

Vamos planejar um reencontro dos missionários para outubro de 2027 na região de Salt Lake City, em Utah, 30 anos depois do início da missão dos Woodward em Porto Alegre. A data e o local exatos serão publicados aqui quando forem definidos. Também esperamos oferecer uma forma de participar on-line para quem não puder estar presente.We’ll be planning a missionary reunion for October 2027 in the greater Salt Lake City area, 30 years after the Woodwards began their mission in Porto Alegre. The exact date and place will be posted here once they’re set. We also hope to offer a way to take part online for those who can’t be there in person.

Quem tem interesse em participar pode avisar por e-mail para entrar na lista. Um “talvez” também ajuda.Anyone interested in attending can email to be added to the list. A “maybe” helps too.

Tenho interesse I’m interested

Abril de 2016April 2016

Este vídeo de 100 minutos do reencontro nos leva de volta aos lugares e às pessoas da missão, com um breve registro da abertura de terra do Templo de Porto Alegre, presidida pelo Presidente James E. Faust, e um passeio por várias áreas da missão. As apresentações dos missionários presentes no reencontro dão lugar a imagens dos tempos de missão no Brasil.This 100-minute reunion video revisits the places and people of the mission, from a brief glimpse of the Porto Alegre Temple groundbreaking, where President James E. Faust presided, to a tour of several mission areas. Introductions of the missionaries gathered for the reunion lead into footage of their mission days in Brazil.

Matthew Grow, diretor-gerente do Departamento de História da Igreja, relembra a história da Igreja no Brasil, seguido pelas mensagens da Síster Woodward e do Presidente Woodward. O hino da missão e as Noites Gaúchas completam esse reencontro de rostos, vozes e lembranças.Matthew Grow, managing director of the Church History Department, reflects on Church history in Brazil, followed by messages from Sister Woodward and President Woodward. The mission hymn and Noites Gaúchas round out this reunion of familiar faces, voices, and memories.

Reencontro dos missionáriosMissionary reunionAbril de 2016April 2016 Assistir no YouTubeWatch on YouTube

Vídeo: cortesia do Élder GeorgeVideo courtesy of Elder George

Outubro de 2014October 2014

Reencontro da Missão Porto Alegre Norte em Lehi, Utah, em 3 de outubro de 2014. Depois da apresentação dos missionários presentes, a Síster e o Presidente Woodward contaram o que viveram desde a missão, do CTM de São Paulo às lições de uma vida inteira. O vídeo termina com o hino da missão e imagens da Missão Porto Alegre Norte.Brazil Porto Alegre North Mission reunion in Lehi, Utah, on October 3, 2014. After the returned missionaries introduce themselves, Sister and President Woodward share what life had brought since the mission, from the São Paulo MTC to lessons from a lifetime. The video closes with the mission hymn and footage of the Porto Alegre North Mission.

“Estou muito feliz que isto está sendo filmado porque … os filhos dos [membros] que vocês batizaram procurarão vocês. Será tão maravilhoso quando eles encontrarem com vocês.”“I’m so glad that this is being filmed because … the children of the [members] that you baptized are going to come looking for you. It will be so wonderful when they will be able to find you.”
— Síster Sally Woodward, neste reencontroSister Sally Woodward, at this reunion · Ler a mensagem completaRead her full message
Reencontro dos missionáriosMissionary reunionOutubro de 2014 · Lehi, UtahOctober 2014 · Lehi, Utah Assistir no YouTubeWatch on YouTube

Ler as mensagens da Síster e do Presidente WoodwardRead Sister and President Woodward’s messages No vídeo:In the video: Síster WoodwardSister Woodward 18:03 · Presidente WoodwardPresident Woodward 34:03

Os WoodwardWoodwards
Sally e Arlan Woodward FotoPhoto: Church News, 2007

Arlan & Sally Woodward

Presidiram a Missão Brasil Porto Alegre Norte de julho de 1997 a julho de 2000. Em 2007 voltaram ao Brasil para presidir o Centro de Treinamento Missionário.Presided over the Brazil Porto Alegre North Mission, July 1997 – July 2000. In 2007 they returned to Brazil to preside over the Missionary Training Center.

Suas palavras no reencontro de 2014Their words at the 2014 reunion

Síster WoodwardSister Woodward

“Quanto menos vocês têm, mais liberdade vocês têm.”“The less stuff you have, the more freedom you have.” “Todo mundo, tirem os sapatos, vamos fazer uma inspeção de pés.”“Everybody take off your shoes, we’re going to have a foot inspection.” “Vocês vão amar as reuniões de missão até mais quando ficarem mais velhos.”“You’re going to love your mission reunions even more as you get older.” “Não apenas sei como se parece, sei como se sente. Isso é o nosso Salvador.”“I don’t just know what it looks like, I know what it feels like. That’s our Savior.”

Também na mensagem dela: uma entrevista inesperada com o Élder Packer, um telefonema do Presidente Faust, seis anos ao lado da neta, o CTM de São Paulo e uma doença dela mesma.Also in her message: a surprise interview with Elder Packer, a call from President Faust, six years at their granddaughter’s side, the São Paulo MTC, and an illness of her own.

Ler a mensagem delaRead her message

Presidente WoodwardPresident Woodward

“Élder, sabe o que é isso?” “Sei, é mofo, Presidente.” … “Amo mofo, Presidente.”“Elder, do you know what that is?” “Yeah, that’s mold, President.” … “I love mold, President.” “Não há, não há noite mais azul, azul, do que as noites do Rio Grande do Sul.”“There is no night, no night as blue, as blue, as the nights of Rio Grande do Sul.” “Agora, há uma capela maravilhosa em Joaçaba. Então plantei muitas sementes.”“There’s a wonderful chapel in Joaçaba now. So I planted lots of seeds.” “Você aprende que como missionário, você se levanta e começa a trabalhar.”“You learn that as a missionary … you get up and get going.”

Também na mensagem dele: a vida no CTM de São Paulo, a volta a Bagé, sua própria missão de 1960, em cidades onde a obra foi encerrada, e três escrituras para tempos difíceis.Also in his message: life at the São Paulo MTC, going back to Bagé, his own 1960 mission in cities where the work was closed, and three scriptures for hard times.

Ler a mensagem deleRead his message

E em abril de 2001And in April 2001

Síster WoodwardSister Woodward

“Mantenham a vida materialmente simples. Se vocês me citarem agora, depois da missão, citem essa frase.”“Keep your lives materially simple. If you quote me now, post-mission, quote that phrase.” “Vocês são meus para sempre. Isto é um pedacinho do céu para mim.”“You’re mine forever. This is just a little bit of heaven for me.” Ler a mensagem delaRead her message

Presidente WoodwardPresident Woodward

“Fiquem longe das dívidas, estudem e leiam as escrituras todos os dias.”“Stay out of debt, go to school, and read the scriptures every day.” “De cada um de vocês eu tenho uma lembrança querida. Cada um.”“Every one of you I have a fond memory of. Every one.” Ler a mensagem deleRead his message
JornaisNewsletters

Os boletins da missãoThe mission newsletters

Edições de O Chamado publicadas durante a missão dos Woodward.Issues of O Chamado published during the Woodwards’ mission. The newsletters are in Portuguese.

jornais = FileAttachment("data/jornais.json").json()
// A combined issue (mesFim) is filed under every month it covers.
jornalPorMes = new Map(jornais.flatMap(j => Array.from({ length: (j.mesFim ?? j.mes) - j.mes + 1 },
  (_, i) => [`${j.ano}-${String(j.mes + i).padStart(2, "0")}`, j])))
jornalUrl = j => "o-chamado-newsletters/" + encodeURIComponent(j.arquivo)
{
  // One tile per month of the Woodwards' mission (Jul 1997 – Jun 2000); months with no PDF yet are grey and open an email.
  const meses = [];
  for (let n = 1997 * 12 + 6; n <= 2000 * 12 + 5; n++) meses.push({ ano: Math.floor(n / 12), mes: n % 12 + 1 });
  const tile = ({ ano, mes }) => {
    const key = `${ano}-${String(mes).padStart(2, "0")}`, j = jornalPorMes.get(key);
    if (j && mes > j.mes) return null; // later month of a combined issue: its tile is already drawn
    if (j && j.mesFim) return htl.html`<a class="jornal-card" target="_blank" rel="noopener" href=${jornalUrl(j)}
        style=${`grid-column: span ${j.mesFim - j.mes + 1}`}>
        <i class="bi bi-file-earmark-pdf"></i><span><strong>${MES_NOME[j.mes - 1]} – ${MES_NOME[j.mesFim - 1]}</strong><small>${ano}</small></span></a>`;
    if (j) return htl.html`<a class="jornal-card" target="_blank" rel="noopener" href=${jornalUrl(j)}>
        <i class="bi bi-file-earmark-pdf"></i><span><strong>${MES_NOME[mes - 1]}</strong><small>${ano}</small></span></a>`;
    const assunto = T(`Tenho O Chamado de ${MES_NOME[mes - 1].toLowerCase()} de ${ano}`, `I have O Chamado for ${MES_NOME[mes - 1]} ${ano}`);
    return htl.html`<a class="jornal-card faltando" href=${`mailto:info@ochamado.org?subject=${encodeURIComponent(assunto)}`}
        title=${T("Edição faltando: se você tem, toque para nos escrever", "Missing issue: if you have it, tap to email us")}>
        <i class="bi bi-file-earmark"></i><span><strong>${MES_NOME[mes - 1]}</strong><small>${T("faltando", "missing")}</small></span></a>`;
  };
  return htl.html`<div>${[...new Set(meses.map(m => m.ano))].map(y => htl.html`
    <h3 class="jornal-year">${y}</h3>
    <div class="jornal-grid">${meses.filter(m => m.ano === y).map(tile)}</div>`)}</div>`;
}
Tem uma edição que falta aqui?Have an issue that's missing here?

Os meses em cinza ainda não têm jornal. Se você guardou algum desses números de O Chamado, toque no mês ou escreva paraThe grey months don't have a newsletter yet. If you kept one of those issues of O Chamado, tap the month or email info@ochamado.org.

Sobre e contatoAbout

Sobre este siteAbout this site

Nossa históriaOur shared history

As primeiras versões deste site ajudavam os ex-missionários a se reencontrar, antes que as redes sociais assumissem esse papel. Hoje, com os registros históricos compartilhados pelos Woodward, o site preserva a história que vivemos juntos na missão: onde servimos, quando estivemos lá e com quem servimos.Early versions of this website helped returned missionaries reconnect before social media took on that role. Today, using historical records shared by the Woodwards, the site preserves our shared mission history: where we served, when we were there, and with whom we served.

Quem cuida do siteBehind the site

Em preparação para o 30º aniversário da chegada dos Woodward, em julho de 2027, o Élder Hereth, que serviu com eles, renovou este site com a ajuda de IA. Seu sobrinho, que serviu na Missão Portugal Porto, ajudou digitando os registros do Quadro do Presidente a partir dos jornais da missão.In preparation for the 30th anniversary of the Woodwards’ arrival in July 2027, Elder Hereth, who served with them, updated this site with the help of AI. His nephew, who served in the Portugal Porto Mission, helped by typing in the President’s Board records from the mission newsletters.

Com gratidãoWith gratitude

Agradecemos ao Presidente Arlan Woodward e à Síster Sally Woodward, em memória, que guardaram e compartilharam os registros da missão e, anos atrás, deixaram recursos para preservá-los e manter as versões anteriores, a atual e as futuras deste site.With thanks to President Arlan Woodward and, in loving memory, Sister Sally Woodward, who kept and shared the mission's records and, years ago, set aside funds to preserve them and keep previous, current, and future versions of this site going.

Um agradecimento especial ao Élder George, que gravou e editou os vídeos dos dois reencontros da missão e, junto com sua esposa, os transcreveu e traduziu na íntegra. Ele também filmou o passeio pelas áreas da missão e, com maestria, o transformou num vídeo incrível.Special thanks to Elder George, who recorded and edited the videos of both mission reunions and, together with his wife, transcribed and translated them in full. He also shot the footage for the tour of the mission’s areas and masterfully put it together in an amazing video.

info@ochamado.org
Mata de araucárias numa encosta da Serra Gaúcha, em Canela FotoPhoto: Cesar Vieira, CC BY-SA 4.0
 

O Chamado da Missão Brasil Porto Alegre Norte · 1997–2000