1import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{i as t,r as n}from"./framework-CXnKph_e.js";import{a as r,c as i,i as a,l as o,n as s,o as c,r as l,t as u}from"./model-CrwhHIwz.js";import{a as d,i as f,r as p,s as m,t as h}from"./store-BK34OcUT.js";import{t as g}from"./link-DqxxXOrt.js";var _=e(t(),1),v=[{id:`foundation-01`,title:`Beginning with Jesus`,questions:[62,65,69],next:`Choose one question to revisit.`},{id:`foundation-02`,title:`Faith and questions`,questions:[107,108,31],next:`Save a question you want to understand.`},{id:`foundation-03`,title:`God and creation`,questions:[2,13,33],next:`Open the surrounding source page if you would like more context.`},{id:`foundation-04`,title:`The human person`,questions:[3,5,6],next:`Choose a passage to read again.`},{id:`foundation-05`,title:`The Trinity`,questions:[23,27],next:`Use Ask to find related questions.`},{id:`foundation-06`,title:`Grace`,questions:[103,105,106],next:`Keep any unfamiliar term as a question.`},{id:`foundation-07`,title:`The sacraments`,questions:[136,137,152],next:`Prepare questions about your own preparation for a parish conversation.`},{id:`foundation-08`,title:`The Eucharist and Mass`,questions:[238,239,263,266],next:`Prepare a question to bring when you visit a parish.`},{id:`foundation-09`,title:`Learning about prayer`,questions:[303,304,307,308],next:`Open Pray to choose a prayer resource.`},{id:`foundation-10`,title:`Penance: source teachings`,questions:[187,188,190],next:`For personal sacramental circumstances, use Find help.`},{id:`foundation-11`,title:`Charity and mercy`,questions:[109,222,223],next:`Select a passage to return to during the week.`},{id:`foundation-12`,title:`Christian moral life`,questions:[311,312,379],next:`Choose your next topic in the formation library.`}],y=[{id:`first-visit`,title:`My first parish visit`,questions:[`Whom should I ask for when I arrive?`,`Can someone explain what to expect during Mass?`,`Can I meet the initiation team before attending a group?`]},{id:`family`,title:`Family concerns or privacy`,questions:[`Could I speak privately before joining a group?`,`How can we arrange contact without unwanted messages?`,`Could we discuss questions my family has?`]},{id:`hurt`,title:`I have been hurt or feel overwhelmed`,questions:[`Can I choose whom I speak with?`,`Is there another parish or diocesan contact I can approach?`,`Can I take more time before deciding?`]},{id:`access`,title:`Language, disability or access`,questions:[`Which languages are available?`,`What access, captioning or reading support is available?`,`Is there a suitable alternative if I cannot attend this meeting?`]},{id:`schedule`,title:`Work, caregiving or travel`,questions:[`Are there alternative meeting times?`,`How can I continue when I travel or care for someone?`,`Whom should I contact if I need to pause?`]},{id:`documents`,title:`Baptism, documents or marriage questions`,questions:[`Which records should I request?`,`Can I discuss uncertain baptismal history privately?`,`Who can advise on my personal circumstances?`]},{id:`remote`,title:`No reply or no nearby parish`,questions:[`Is there a diocesan or eparchial contact for initiation?`,`Could you suggest another appropriate parish contact?`,`What preparation options exist where I live?`]},{id:`after`,title:`After initiation`,questions:[`How can I continue formation here?`,`Who can help me become involved in parish life?`,`Can I arrange an occasional conversation about my questions?`]},{id:`young`,title:`A young person or family member`,questions:[`Who coordinates preparation for my age group?`,`What family involvement and safeguarding arrangements apply?`,`Which resources are suitable for us to read together?`]}],b=n();function x(e,t,n=`text/plain`){let r=URL.createObjectURL(new Blob([e],{type:n})),i=document.createElement(`a`);i.href=r,i.download=t,i.click(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}function S(){let{data:e,ready:t,remember:n,error:S}=m(),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(``),[k,A]=(0,_.useState)(``);(0,_.useEffect)(()=>{let e=l(new URLSearchParams(window.location.search).get(`path`));if(e){try{d({...p(),context:e})}catch{w(`This choice could not be saved.`)}window.history.replaceState(null,``,`/journey`+window.location.hash)}},[]);let j=e||c(),M=i(j);function N(e){try{d(e),w(`Applied`+(n?` on this device.`:` for this visit.`))}catch{w(`Your change could not be saved.`)}}function P(e){N({...j,parish:{...j.parish,...e}})}return t?(0,b.jsxs)(`div`,{lang:`en`,className:`journey-workspace`,children:[(0,b.jsxs)(`header`,{className:`app-heading`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`p`,{className:`eyebrow`,children:`At your pace`}),(0,b.jsx)(`h1`,{children:`My journey`})]}),(0,b.jsx)(g,{className:`text-link`,href:`/settings`,children:`Language and region`})]}),(0,b.jsx)(`p`,{children:`Your choices guide the resources shown here. They do not establish sacramental status or readiness.`}),(0,b.jsxs)(`section`,{className:`journey-next`,children:[(0,b.jsxs)(`label`,{className:`block`,htmlFor:`journey-context`,children:[`Where are you starting?`,(0,b.jsx)(`select`,{id:`journey-context`,className:`field mt-2`,value:j.context,onChange:e=>N({...j,context:e.target.value}),children:a.map(e=>(0,b.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,b.jsx)(`h2`,{className:`mt-5`,children:M.label}),(0,b.jsx)(`p`,{children:M.reason}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(g,{className:`button-dark`,href:M.href,children:`Take this step`}),(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>N({...j,paused:!j.paused}),children:j.paused?`Resume my journey`:`Pause suggestions`})]})]}),(0,b.jsxs)(`nav`,{className:`help-links`,"aria-label":`My journey sections`,children:[(0,b.jsx)(`a`,{href:`#questions`,children:`My question`}),(0,b.jsx)(`a`,{href:`#learning`,children:`My learning`}),(0,b.jsx)(`a`,{href:`#parish`,children:`Parish preparation`}),(0,b.jsx)(g,{href:`/plan-of-life`,children:`My prayer plan`}),(0,b.jsx)(`a`,{href:`#privacy`,children:`Save and privacy`})]}),(0,b.jsx)(`p`,{role:`status`,className:`small-note`,children:S||C}),S?(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>{window.confirm(`Load the saved journey? Export the current copy first if you want to keep it.`)&&f()},children:`Load saved journey`}):null,(0,b.jsxs)(`div`,{className:`journey-columns`,children:[(0,b.jsxs)(`section`,{id:`questions`,className:`journey-panel`,children:[(0,b.jsx)(`h2`,{children:`The question on my mind`}),(0,b.jsxs)(`label`,{htmlFor:`saved-question`,children:[`Keep a question for this visit`,(0,b.jsx)(`input`,{id:`saved-question`,className:`field`,maxLength:160,value:j.question,onChange:e=>N({...j,question:e.target.value,questionState:`open`})})]}),(0,b.jsx)(`p`,{className:`small-note`,children:`Private to this visit unless you choose Remember below. Avoid details you would not want stored on a shared device.`}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(g,{className:`button-dark`,href:j.question?`/ask#q=`+encodeURIComponent(j.question):`/ask`,children:`Look for an answer`}),j.question?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>N({...j,questionState:j.questionState===`resolved`?`revisit`:`resolved`}),children:j.questionState===`resolved`?`Revisit this question`:`Mark resolved for me`}),(0,b.jsx)(`button`,{className:`text-link`,onClick:()=>N({...j,question:``,questionState:`open`}),children:`Remove question`})]}):null]}),(0,b.jsxs)(`p`,{className:`small-note`,children:[`Status: `,j.questionState,`. This is your own reading record.`]})]}),(0,b.jsxs)(`section`,{className:`journey-panel`,children:[(0,b.jsx)(`h2`,{children:`A small prayer practice`}),(0,b.jsx)(`p`,{children:`Choose a manageable rhythm and open its supporting resources as you need them.`}),(0,b.jsxs)(`div`,{className:`help-links`,children:[(0,b.jsx)(g,{href:`/plan-of-life`,children:`Choose or adjust my plan`}),(0,b.jsx)(g,{href:`/pray`,children:`Open prayer resources`})]}),(0,b.jsx)(`p`,{className:`small-note`,children:`Your existing prayer plan stays unchanged when you change this journey.`})]})]}),(0,b.jsxs)(`section`,{id:`learning`,className:`journey-panel`,children:[(0,b.jsx)(`h2`,{children:`Foundation readings`}),(0,b.jsx)(`p`,{children:`Read short passages here, keep questions, and continue at your own pace. This introductory source sequence does not replace your parish's formation.`}),(0,b.jsx)(`ol`,{className:`journey-lessons`,children:v.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(g,{href:`/journey/learn/`+e.id,children:[(0,b.jsxs)(`span`,{className:`small-note`,children:[t+1,`. `,j.completed.includes(e.id)?`Read · revisit`:`Ready to read`]}),(0,b.jsx)(`strong`,{children:e.title})]})},e.id))}),(0,b.jsxs)(`p`,{className:`small-note`,children:[`These readings use the approved historical English catechism already hosted here. `,(0,b.jsx)(g,{className:`text-link`,href:`/formation`,children:`More subjects and official source editions`}),`.`]})]}),(0,b.jsxs)(`section`,{id:`parish`,className:`journey-panel`,children:[(0,b.jsx)(`h2`,{children:`My parish conversation`}),(0,b.jsx)(`p`,{children:`Prepare and keep track here. You make contact directly; this app does not send your information or arrange a meeting.`}),(0,b.jsx)(g,{href:`/parishes`,className:`text-link`,children:`Find official parish, diocesan and eparchial contacts`}),(0,b.jsxs)(`div`,{className:`journey-fields`,children:[(0,b.jsxs)(`label`,{children:[`Parish or contact name`,(0,b.jsx)(`input`,{className:`field`,maxLength:120,value:j.parish.name,onChange:e=>P({name:e.target.value})})]}),(0,b.jsxs)(`label`,{children:[`Contact stage`,(0,b.jsx)(`select`,{className:`field`,value:j.parish.status,onChange:e=>P({status:e.target.value}),children:s.map(e=>(0,b.jsx)(`option`,{value:e,children:e.replaceAll(`-`,` `)},e))})]}),(0,b.jsxs)(`label`,{children:[`Meeting date, if arranged`,(0,b.jsx)(`input`,{type:`date`,className:`field`,value:j.parish.meeting,onChange:e=>P({meeting:e.target.value})})]}),(0,b.jsxs)(`label`,{children:[`My follow-up date`,(0,b.jsx)(`input`,{type:`date`,className:`field`,value:j.parish.followUp,onChange:e=>P({followUp:e.target.value})})]}),(0,b.jsxs)(`label`,{children:[`Document preparation`,(0,b.jsx)(`select`,{className:`field`,value:j.parish.documents,onChange:e=>P({documents:e.target.value}),children:r.map(e=>(0,b.jsx)(`option`,{value:e,children:e.replaceAll(`-`,` `)},e))})]})]}),(0,b.jsx)(`p`,{className:`small-note`,children:`Dates are your local calendar dates. No reminder is sent. No certificates are uploaded.`}),(0,b.jsxs)(`details`,{children:[(0,b.jsx)(`summary`,{children:`Add an official contact website`}),(0,b.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`url`);try{d({...j,parish:{...j.parish,url:t}}),w(`Contact website saved.`)}catch{w(`Use a complete HTTPS website address.`)}},children:[(0,b.jsxs)(`label`,{children:[`Website`,(0,b.jsx)(`input`,{name:`url`,type:`url`,className:`field`,defaultValue:j.parish.url,maxLength:500})]}),(0,b.jsx)(`button`,{className:`button-light`,type:`submit`,children:`Save website`})]}),j.parish.url?(0,b.jsx)(`a`,{href:j.parish.url,rel:`noreferrer`,className:`text-link`,children:`Open selected website`}):null]}),(0,b.jsx)(`h3`,{className:`mt-5`,children:`Questions to prepare`}),(0,b.jsx)(`p`,{children:`Select a situation to add practical questions. Edit or remove any before exporting.`}),(0,b.jsx)(`div`,{className:`journey-situations`,children:y.map(e=>(0,b.jsxs)(`details`,{children:[(0,b.jsx)(`summary`,{children:e.title}),(0,b.jsx)(`ul`,{children:e.questions.map(e=>(0,b.jsx)(`li`,{children:e},e))}),(0,b.jsx)(`button`,{className:`text-link`,onClick:()=>
1P({questions:[j.parish.questions,...e.questions].filter(Boolean).join(` 2`).slice(0,1500)}),children:`Add these questions`}),e.id===`hurt`?(0,b.jsx)(g,{className:`text-link block`,href:`/find-help`,children:`Find another appropriate contact or urgent help`}):null]},e.id))}),(0,b.jsxs)(`label`,{htmlFor:`parish-questions`,children:[`My selected questions`,(0,b.jsx)(`textarea`,{id:`parish-questions`,className:`field`,rows:5,maxLength:1500,value:j.parish.questions,onChange:e=>P({questions:e.target.value})})]}),(0,b.jsxs)(`label`,{className:`journey-check`,children:[(0,b.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>E(e.target.checked)}),`Include my selected questions in the meeting packet`]}),(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>x(u(j,T),`parish-conversation.txt`),children:`Download meeting packet`}),(0,b.jsx)(`p`,{className:`small-note`,children:`The packet excludes your private saved question and milestones. Share it yourself only if you wish.`})]}),(0,b.jsxs)(`details`,{className:`journey-panel`,children:[(0,b.jsx)(`summary`,{children:`Personal milestone record`}),(0,b.jsx)(`p`,{children:`Optional notes of events you report. This is not a parish register, verification or assessment.`}),(0,b.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),!(!D.trim()||!k)&&(N({...j,milestones:[...j.milestones,{id:crypto.randomUUID(),label:D.trim(),date:k,reportedBy:`user`}]}),O(``))},children:[(0,b.jsxs)(`label`,{children:[`Event label`,(0,b.jsx)(`input`,{required:!0,maxLength:120,className:`field`,value:D,onChange:e=>O(e.target.value)})]}),(0,b.jsxs)(`label`,{children:[`Date`,(0,b.jsx)(`input`,{required:!0,type:`date`,className:`field`,value:k,onChange:e=>A(e.target.value)})]}),(0,b.jsx)(`button`,{disabled:j.milestones.length>=30,className:`button-light`,children:`Add personal record`})]}),(0,b.jsx)(`ul`,{children:j.milestones.map(e=>(0,b.jsxs)(`li`,{children:[e.date,` · `,e.label,` · reported by you `,(0,b.jsx)(`button`,{className:`text-link`,onClick:()=>N({...j,milestones:j.milestones.filter(t=>t.id!==e.id)}),children:`Remove record`})]},e.id))})]}),(0,b.jsxs)(`section`,{id:`privacy`,className:`journey-panel`,children:[(0,b.jsx)(`h2`,{children:`Save and privacy`}),(0,b.jsxs)(`p`,{children:[n?`This journey is saved in this browser. It is not encrypted here.`:`This journey lasts for this page session. Reloading clears it unless you choose to remember it.`,` Someone with access to this device may be able to read saved data. Journey records are not included in the existing prayer-plan sync.`]}),(0,b.jsxs)(`label`,{className:`journey-check`,children:[(0,b.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>{try{d(j,e.target.checked)}catch{w(`Could not change storage preference.`)}}}),`Remember this journey, including my questions, on this device`]}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>x(JSON.stringify(j,null,2),`catechumens-journey.json`,`application/json`),children:`Export private journey`}),(0,b.jsx)(`button`,{className:`button-light`,onClick:()=>{window.confirm(`Clear this journey from this device and this visit? Prayer plans and saved resources are kept.`)&&h()},children:`Clear this journey`})]}),(0,b.jsxs)(`label`,{className:`block mt-4`,children:[`Import a journey export`,(0,b.jsx)(`input`,{className:`field`,type:`file`,accept:`application/json,.json`,onChange:async e=>{let t=e.target.files?.[0];if(t){try{if(t.size>2e4)throw Error();let e=o(await t.text());window.confirm(`Replace this journey with the imported copy?`)&&(d(e,!1),w(`Imported for this visit. Choose Remember to keep it.`))}catch{w(`Could not import this journey. The current copy is unchanged.`)}e.target.value=``}}})]}),(0,b.jsx)(g,{href:`/privacy`,className:`text-link`,children:`Privacy and other device records`})]})]}):(0,b.jsx)(`p`,{role:`status`,children:`Opening your journeyâ¦`})}export{S as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.