PageSourceSearch

https://baibaoshu.net/assets/FirstBookZen-DRlb5aMg.js

js baibaoshu.net collected 2026-09-25 03:38:40 UTC 6,059 bytes, 1 lines download raw bytes

1import{ah as e,a3 as s}from"./vendor-misc-DBewy47e.js";import{gP as t,ck as r,ev as a,j as i,ek as o,ew as n,aq as l,J as d,eh as c,e6 as x,gg as m,i as p}from"./index-BgmH_Ksq.js";import{r as h}from"./readingCheckins-CsRHPWXP.js";import{trackLiteEvent as u}from"./liteAnalytics-Tp3MCfhh.js";import{C as j}from"./ChapterQuizSheet-De1wlWSQ.js";import{B as b}from"./BibleChapterReaderSheet-DAZ_R-sS.js";import{e as g,L as f,t as w}from"./vendor-icons-j3vl9R2U.js";import"./vendor-supabase-DCTo4nxi.js";import"./chinese-language-CLYDn-o3.js";import"./vendor-i18n-DMY_791a.js";import"./inlineMarkdown-DStxsrWI.js";import"./textToSpeech-CsfTiRRl.js";import"./googleTTS-DFYuf3qt.js";import"./ContentRating-ThB0p36g.js";import"./contentRatings-D7TI0xDW.js";import"./chapterQuiz-CdJ89e90.js";import"./chapterQuizCore-BDm58LAE.js";import"./useVerseMemorize-BmGFNtPz.js";import"./AnnotationNoteSheet-DpVnGlHp.js";import"./traditional-chinese-2pkNGbDt.js";import"./copyWithToast-hiZE9Y0Q.js";import"./annotationCard-BtM6mNIE.js";import"./clipboard-CvMPH2Rq.js";import"./fillTemplate-D-zmJcmb.js";import"./VersesMissingNotice-WBOfiegy.js";import"./markdownParser-C7-Biv6t.js";import"./ChapterQuizEntry-BrhzRK89.js";const N=({user:N,onBack:v})=>{const E=t(),[k,y]=e.useState(()=>r()),[B,C]=e.useState(()=>{const e="undefined"==typeof window?void 0:a(window.location.pathname,window.location.search).firstBookDay,s=Number(e);return Number.isInteger(s)&&s>=1&&s<=i?s:o()??i}),[F,D]=e.useState(!1),[S,$]=e.useState(!1),M=e.useMemo(()=>new Set(k),[k]),A=p[B-1],z=M.has(B),T=e.useMemo(()=>n(`约翰福音 1-${i}章`),[]),I=e.useMemo(()=>new Set(k.map(e=>l(d,e))),[k]);e.useEffect(()=>(window.dispatchEvent(new CustomEvent("ai-chat:page-resource",{detail:{resource:`${E("陪你读第一卷")} · ${E("约翰福音")} ${E("第")} ${B} ${E("章")}`,key:`firstBook:john:${B}`}})),()=>{window.dispatchEvent(new CustomEvent("ai-chat:page-resource",{detail:null}))}),[B,E]);const Q=e.useCallback(e=>{C(e),c("firstBook",{firstBookDay:String(e)},{replace:!0})},[]),R=e.useCallback((e,s)=>{s?x(e):m(e),y(r()),s&&(u("first_book_day_read","/firstBook",{eventData:{day:e}}),h(null==N?void 0:N.id,"chapter").catch(()=>{}))},[null==N?void 0:N.id]);return s.jsxs("div",{className:"min-h-screen bg-[#F5F1E8] pb-24",children:[s.jsx("header",{className:"sticky top-0 z-20 bg-[#F5F1E8]/95 backdrop-blur border-b border-[#E6E2D6]",children:s.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:v,"aria-label":E("返回"),className:"w-9 h-9 -ml-1.5 rounded-full flex items-center justify-center text-[#6B6557] hover:bg-[#EDE8DC] transition-colors",children:s.jsx(g,{className:"w-5 h-5"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:"text-[17px] font-semibold text-[#2D2A22] leading-tight",children:E("陪你读第一卷")}),s.jsx("p",{className:"text-[13px] text-[#6B6557]",children:E("约翰福音 · 三周 · 每天一章")})]})]})}),s.jsxs("main",{className:"max-w-2xl mx-auto px-4 pt-4 flex flex-col gap-3",children:[s.jsxs("section",{className:"rounded-2xl bg-[#FFFCF5] border border-[#E6E2D6] px-4 py-4 shadow-sm flex flex-col gap-3",children:[s.jsxs("div",{className:"text-[13px] text-[#64748B]",children:[E("第")," ",B," ",E("天 · 共")," ",i," ",E("天")]}),s.jsx("h2",{className:"text-[17px] font-medium text-[#2D2A22] leading-relaxed",children:E(`拿起你的圣经,翻到约翰福音第 ${B} 章。`)}),s.jsx("p",{className:"text-[14px] text-[#4A4842] leading-[1.85]",children:E(A.intro)}),s.jsx("button",{onClick:()=>R(B,!z),className:"w-full rounded-xl px-4 py-3 text-[15px] font-medium transition-colors border "+(z?"bg-[#F0EDE3] border-[#E6E2D6] text-[#6B6557]":"bg-white border-[#E6E2D6] text-[#2D2A22] hover:border-[#B85138]/60"),children:z?s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx(f,{className:"w-4 h-4"}),E(`已标记第 ${B} 章 · 点一下可取消`)]}):E(`在圣经上读完了 · 标记第 ${B} 章`)}),s.jsx("button",{onClick:()=>D(!0),className:"w-full rounded-xl border border-[#E6E2D6] bg-white px-4 py-2.5 text-[14px] text-[#2D2A22] hover:border-[#B85138]/60 transition-colors",children:E("做 5 道小题,把
1这一章记牢")}),s.jsxs("p",{className:"text-[13px] text-[#64748B] leading-relaxed",children:[E("若手边没有圣经,也可以"),s.jsx("button",{onClick:()=>$(!0),className:"underline underline-offset-2 hover:text-[#B85138] transition-colors mx-0.5",children:E("在站内读这一章")}),E("。")]})]}),s.jsxs("section",{className:"rounded-2xl bg-[#FFFCF5] border border-[#E6E2D6] px-4 py-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-2.5",children:[s.jsx("span",{className:"text-[13px] text-[#64748B]",children:E("这三周")}),s.jsxs("span",{className:"text-[13px] text-[#6B6557] tabular-nums",children:[E("读过")," ",k.length," / ",i," ",E("章")]})]}),s.jsx("div",{className:"grid grid-cols-7 gap-1.5",children:p.map(e=>{const t=M.has(e.day),r=e.day===B;return s.jsx("button",{onClick:()=>Q(e.day),"aria-label":E(`第 ${e.day} 章`),"aria-current":r?"true":void 0,className:`aspect-square rounded-lg text-[13px] tabular-nums flex items-center justify-center transition-colors border ${t?"bg-[#B85138] border-[#B85138] text-white":"bg-white border-[#E6E2D6] text-[#6B6557] hover:border-[#B85138]/50"} ${r?"ring-2 ring-[#B85138]/35 ring-offset-1 ring-offset-[#FFFCF5]":""}`,children:e.day},e.day)})})]}),s.jsxs("p",{className:"px-1 text-[13px] text-[#6B6557] leading-relaxed flex items-start gap-1.5",children:[s.jsx(w,{className:"w-3.5 h-3.5 mt-0.5 flex-none"}),s.jsx("span",{children:E("隔了几天没读也不要紧,回来接着往下走就是了——上面的格子只记你读过哪几章。")})]})]}),s.jsx(j,{open:F,onClose:()=>D(!1),book:d,chapter:B,userId:(null==N?void 0:N.id)??null,initialMode:"lite"}),T&&s.jsx(b,{open:S,onClose:()=>$(!1),plan:T,initialChapterIndex:B-1,readSet:I,onToggleRead:(e,s,t)=>R(s,t),userId:(null==N?void 0:N.id)??null})]})};export{N as FirstBookZen};

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.