(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12491,e=>{"use strict";var a=e.i(43476),s=e.i(22016),o=e.i(7670),t=e.i(78744),r=e.i(52456);e.s(["default",0,function({tabs:e,className:i}){let{t:n,withQuery:l,pathname:h}=(0,t.useNavLink)();return(0,a.jsx)("nav",{className:(0,o.default)("w-full px-0 sm:px-2 md:px-6",i),children:(0,a.jsx)("div",{className:"flex w-full gap-0.5 rounded-full border border-slate-200 bg-slate-100 p-1 dark:border-slate-700 dark:bg-slate-800/60 sm:inline-flex sm:w-auto sm:gap-1",children:e.map(e=>{let t=h.endsWith(".html")?h.slice(0,-5):h,i=t===e.matchPath||t.startsWith(`${e.matchPath}/`);return(0,a.jsx)(s.default,{href:l(e.path),prefetch:!1,"aria-current":i?"page":void 0,className:(0,o.default)("min-w-0 flex-1 rounded-full px-2 py-1.5 text-center text-sm font-medium transition sm:flex-none sm:px-4",i?"bg-white text-slate-900 shadow-sm dark:bg-slate-900 dark:text-white":"text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-200"),children:(0,a.jsx)(r.default,{children:n[e.key]})},e.path)})})})}])},5647,e=>{"use strict";var a=e.i(43476),s=e.i(71645),o=e.i(22016),t=e.i(63398),r=e.i(60502),i=e.i(86939),n=e.i(34223),l=e.i(58579),h=e.i(87451),u=e.i(86734),m=e.i(52388),c=e.i(52456),d=e.i(51264),I=e.i(61056);let b=n.default.default.map(e=>e.book),k=b.indexOf("Matthew"),p=new Set(b.slice(0,k)),g=new Set(b.slice(k)),J={yellow:"#fde047",green:"#4ade80",pink:"#f472b6",blue:"#60a5fa"};e.s(["default",0,function(){let{user:e,status:n,signIn:k}=(0,t.useAuth)(),f=(0,I.useHydrated)(),{data:x,toggleBookmark:y}=(0,r.useReadingStorage)(),{notes:C}=(0,u.useVerseNotes)(),P=(0,d.useUiLang)(),[T,v]=(0,s.useState)("all"),[E,N]=(0,s.useState)("all"),S=(0,l.getUiText)(P),w=(0,l.getUiLocale)(P),R=(x?.bookmarkedVerses??[]).filter(e=>"ot"===T?p.has(e.book):"nt"!==T||g.has(e.book)).filter(e=>"all"===E||("none"===E?!e.color:e.color===E)),M=function(e){let a=new Map;for(let s of[...e].sort((e,a)=>{let s=b.indexOf(e.book)-b.indexOf(a.book);return 0!==s?s:e.chapter!==a.chapter?e.chapter-a.chapter:e.verse-a.verse})){let e=s.book;a.has(e)||a.set(e,[]),a.get(e).push(s)}return a}(R),H=i.bookNameMap[P]??i.bookNameMap.en??{};return f&&"loading"!==n?e?null===x?(0,a.jsx)("div",{className:"min-h-screen px-0 sm:px-2 md:px-6 py-6 bg-white dark:bg-gray-900 dark:text-white",children:(0,a.jsx)("p",{children:S.loading})}):(0,a.jsxs)("div",{className:"min-h-screen px-0 sm:px-2 md:px-6 py-6 bg-white text-black dark:bg-gray-900 dark:text-white",children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold mb-4",children:["★ ",S.headerBookmarks]}),(0,a.jsx)("div",{className:"flex gap-2 mb-3",children:["all","ot","nt"].map(e=>(0,a.jsx)("button",{onClick:()=>v(e),className:`min-w-0 flex-1 sm:flex-none px-3 py-1 text-sm rounded-full border transition-colors ${T===e?"bg-blue-600 text-white border-blue-600":"border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 hover:border-blue-400"}`,children:(0,a.jsx)(c.default,{children:"all"===e?S.filterAll:"ot"===e?S.oldTestament:S.newTestament})},e))}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-6 flex-wrap",children:[(0,a.jsx)("button",{onClick:()=>N("all"),className:`px-3 py-1 text-sm rounded-full border transition-colors ${"all"===E?"bg-gray-700 text-white border-gray-700 dark:bg-gray-200 dark:text-gray-900 dark:border-gray-200":"border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 hover:border-gray-500"}`,children:S.bookmarkColorAll}),(0,a.jsx)("button",{onClick:()=>N("none"),"aria-label":S.bookmarkColorNone,className:`px-3 py-1 text-sm rounded-full border transition-colors ${"none"===E?"bg-gray-700 text-white border-gray-700 dark:bg-gray-200 dark:text-gray-900 dark:border-gray-200":"border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 hover:border-gray-500"}`,children:"★"}),Object.keys(J).map(e=>(0,a.jsx)("button",{onClick:()=>N(e),"aria-label":e,className:`w-6 h-6 rounded-full border-2 transition-all ${E===e?"border-gray-700 dark:border-gray-200 scale-110":"border-transparent hover:border-gray-400"}`,style:{backgroundColor:J[e]}},e))]}),0===R.length?(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:S.bookmarkEmpty}):(0,a.jsx)("div",{className:"space-y-6",children:Array.from(M.entries()).map(([e,s])=>(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-2 border-b pb-1 dark:border-gray-700",children:H[e]??e}),(0,a.jsx)("ul",{className:"space-y-2",children:s.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-3",children:[e.color?(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:J[e.color]},"aria-hidden":"true"}):(0,a.jsx)("span",{className:"w-2.5 shrink-0","aria-hidden":"true"}),(0,a.jsxs)(o.default,{href:(0,h.withStaticHtmlPath)(`/read?book=${encodeURIComponent(e.book)}&chapter=${e.chapter}&lang=${P}&verse=${e.verse}`),prefetch:!1,className:"flex-1 text-blue-600 dark:text-blue-400 hover:underline",children:[H[e.book]??e.book," ",e.chapter,":",e.verse]}),C.has((0,m.makeNoteRef)(e.book,e.chapter,e.verse))&&(0,a.jsx)("span",{className:"text-xs text-amber-500 dark:text-amber-400 shrink-0",title:S.bookmarkHasNote,"aria-label":S.bookmarkHasNote,children:"✏"}),(0,a.jsx)("span",{className:"text-xs text-gray-400 shrink-0",children:new Date(e.bookmarkedAt).toLocaleDateString(w)}),(0,a.jsx)("button",{onClick:()=>y(e.book,e.chapter,e.verse),className:"text-yellow-500 hover:text-gray-400 shrink-0 cursor-pointer","aria-label":"북마크 해제",children:"★"})]},`${e.book}-${e.chapter}-${e.verse}`))})]},e))})]}):(0,a.jsxs)("div",{className:"min-h-screen px-0 sm:px-2 md:px-6 py-6 bg-white dark:bg-gray-900 dark:text-white",children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold mb-4",children:["★ ",S.headerBookmarks]}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:S.bookmarkLoginRequired}),(0,a.jsx)("button",{onClick:()=>k(),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:S.login})]}):(0,a.jsx)("div",{className:"min-h-screen px-0 sm:px-2 md:px-6 py-6 bg-white dark:bg-gray-900 dark:text-white",children:(0,a.jsx)("p",{children:S.loading})})}])},60502,e=>{"use strict";e.i(47167);var a=e.i(71645),s=e.i(63398),o=e.i(22677),t=e.i(87922);let r=()=>new Date().toISOString();e.s(["useReadingStorage",0,()=>{let{user:e,sessionReady:i}=(0,s.useAuth)(),n=e?.email||"",[l,h]=(0,a.useState)({email:"",data:null});l.email!==n&&h({email:n,data:null});let u=l.email===n?l.data:null,m=(0,a.useRef)(0),c=(0,a.useRef)(Promise.resolve());(0,a.useEffect)(()=>{m.current+=1},[n]);let d=(0,a.useCallback)(()=>{if(!n||!i)return Promise.resolve();let e=++m.current;return(0,t.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadReading?userEmail=${encodeURIComponent(n)}`,{method:"GET",headers:{Authorization:`Bearer ${(0,o.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(a=>{m.current===e&&h({email:n,data:a})}).catch(a=>{console.error("Failed to load reading progress:",a),m.current===e&&h({email:n,data:null})})},[n,i]),I=(0,a.useCallback)(async(e,a)=>{if(!n)return;h({email:n,data:e});let s=async()=>{try{let s=await fetch("https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/saveReading",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${(0,o.getSessionToken)()}`},body:JSON.stringify({userEmail:n,data:e,replace:a?.replace===!0})});s.ok||console.error(`Failed to save reading progress: HTTP ${s.status}`)}catch(e){console.error("Failed to save reading progress:",e)}};c.current=c.current.then(s,s),await c.current},[n]),b=(0,a.useCallback)((e,a)=>{if(!u)return void d();let s=r();I({startedDate:u.startedDate||s,readDays:u.readDays??0,completedRounds:u.completedRounds??0,readChapters:{...u.readChapters||{},[e]:{...u.readChapters?.[e]||{},[a]:s}},lastRead:{book:e,chapter:a,date:s},bookmarkedVerses:u.bookmarkedVerses})},[u,I,d]),k=(0,a.useCallback)(e=>{if(!u)return void d();if(0===e.length)return;let a=r(),s={...u.readChapters||{}};for(let{book:o,chapter:t}of e)s[o]={...s[o]||{},[t]:s[o]?.[t]??a};let o=e[e.length-1];I({startedDate:u.startedDate||a,readDays:u.readDays??0,completedRounds:u.completedRounds??0,readChapters:s,lastRead:u.lastRead??{book:o.book,chapter:o.chapter,date:a},bookmarkedVerses:u.bookmarkedVerses})},[u,I,d]),p=(0,a.useCallback)((e,a,s)=>{if(!u)return void d();let o=u.bookmarkedVerses??[],t=o.findIndex(o=>o.book===e&&o.chapter===a&&o.verse===s),i=t>=0?o.filter((e,a)=>a!==t):[...o,{book:e,chapter:a,verse:s,bookmarkedAt:r()}];I({...u,bookmarkedVerses:i})},[u,I,d]),g=(0,a.useCallback)((e,a,s,o)=>{let t;if(!u)return void d();let i=u.bookmarkedVerses??[],n=i.findIndex(o=>o.book===e&&o.chapter===a&&o.verse===s);t=null===o?i.filter((e,a)=>a!==n):n>=0?i.map((e,a)=>a===n?{...e,color:o}:e):[...i,{book:e,chapter:a,verse:s,bookmarkedAt:r(),color:o}],I({...u,bookmarkedVerses:t})},[u,I,d]),J=(0,a.useCallback)(async()=>{if(!n)return;let e={startedDate:r(),readDays:0,completedRounds:(u?.completedRounds??0)+1,readChapters:{},lastRead:null,bookmarkedVerses:u?.bookmarkedVerses};await I(e,{replace:!0})},[n,u,I]);return(0,a.useEffect)(()=>{d()},[d]),{data:u,load:d,save:I,markChapterRead:b,markChaptersRead:k,toggleBookmark:p,setVerseHighlight:g,reset:J}}])},86939,e=>{"use strict";e.s(["bookNameMap",0,{ko:{Genesis:"창세기",Exodus:"출애굽기",Leviticus:"레위기",Numbers:"민수기",Deuteronomy:"신명기",Joshua:"여호수아",Judges:"사사기",Ruth:"룻기","I Samuel":"사무엘상","II Samuel":"사무엘하","I Kings":"열왕기상","II Kings":"열왕기하","I Chronicles":"역대상","II Chronicles":"역대하",Ezra:"에스라",Nehemiah:"느헤미야",Esther:"에스더",Job:"욥기",Psalms:"시편",Proverbs:"잠언",Ecclesiastes:"전도서","Song of Solomon":"아가",Isaiah:"이사야",Jeremiah:"예레미야",Lamentations:"예레미야 애가",Ezekiel:"에스겔",Daniel:"다니엘",Hosea:"호세아",Joel:"요엘",Amos:"아모스",Obadiah:"오바댜",Jonah:"요나",Micah:"미가",Nahum:"나훔",Habakkuk:"하박국",Zephaniah:"스바냐",Haggai:"학개",Zechariah:"스가랴",Malachi:"말라기",Matthew:"마태복음",Mark:"마가복음",Luke:"누가복음",John:"요한복음",Acts:"사도행전",Romans:"로마서","I Corinthians":"고린도전서","II Corinthians":"고린도후서",Galatians:"갈라디아서",Ephesians:"에베소서",Philippians:"빌립보서",Colossians:"골로새서","I Thessalonians":"데살로니가전서","II Thessalonians":"데살로니가후서","I Timothy":"디모데전서","II Timothy":"디모데후서",Titus:"디도서",Philemon:"빌레몬서",Hebrews:"히브리서",James:"야고보서","I Peter":"베드로전서","II Peter":"베드로후서","I John":"요한일서","II John":"요한이서","III John":"요한삼서",Jude:"유다서","Revelation of John":"요한계시록"},en:{Genesis:"Genesis",Exodus:"Exodus",Leviticus:"Leviticus",Numbers:"Numbers",Deuteronomy:"Deuteronomy",Joshua:"Joshua",Judges:"Judges",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Kings","II Kings":"2 Kings","I Chronicles":"1 Chronicles","II Chronicles":"2 Chronicles",Ezra:"Ezra",Nehemiah:"Nehemiah",Esther:"Esther",Job:"Job",Psalms:"Psalms",Proverbs:"Proverbs",Ecclesiastes:"Ecclesiastes","Song of Solomon":"Song of Solomon",Isaiah:"Isaiah",Jeremiah:"Jeremiah",Lamentations:"Lamentations",Ezekiel:"Ezekiel",Daniel:"Daniel",Hosea:"Hosea",Joel:"Joel",Amos:"Amos",Obadiah:"Obadiah",Jonah:"Jonah",Micah:"Micah",Nahum:"Nahum",Habakkuk:"Habakkuk",Zephaniah:"Zephaniah",Haggai:"Haggai",Zechariah:"Zechariah",Malachi:"Malachi",Matthew:"Matthew",Mark:"Mark",Luke:"Luke",John:"John",Acts:"Acts",Romans:"Romans","I Corinthians":"1 Corinthians","II Corinthians":"2 Corinthians",Galatians:"Galatians",Ephesians:"Ephesians",Philippians:"Philippians",Colossians:"Colossians","I Thessalonians":"1 Thessalonians","II Thessalonians":"2 Thessalonians","I Timothy":"1 Timothy","II Timothy":"2 Timothy",Titus:"Titus",Philemon:"Philemon",Hebrews:"Hebrews",James:"James","I Peter":"1 Peter","II Peter":"2 Peter","I John":"1 John","II John":"2 John","III John":"3 John",Jude:"Jude","Revelation of John":"Revelation"},fr:{Genesis:"Genese",Exodus:"Exode",Leviticus:"Levitique",Numbers:"Nombres",Deuteronomy:"Deuteronome",Joshua:"Josue",Judges:"Juges",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Rois","II Kings":"2 Rois","I Chronicles":"1 Chroniques","II Chronicles":"2 Chroniques",Ezra:"Esdras",Nehemiah:"Nehemie",Esther:"Esther",Job:"Job",Psalms:"Psaumes",Proverbs:"Proverbes",Ecclesiastes:"Ecclesiaste","Song of Solomon":"Cantique des cantiques",Isaiah:"Esaie",Jeremiah:"Jeremie",Lamentations:"Lamentations",Ezekiel:"Ezechiel",Daniel:"Daniel",Hosea:"Osee",Joel:"Joel",Amos:"Amos",Obadiah:"Abdias",Jonah:"Jonas",Micah:"Michee",Nahum:"Nahum",Habakkuk:"Habacuc",Zephaniah:"Sophonie",Haggai:"Aggee",Zechariah:"Zacharie",Malachi:"Malachie",Matthew:"Matthieu",Mark:"Marc",Luke:"Luc",John:"Jean",Acts:"Actes",Romans:"Romains","I Corinthians":"1 Corinthiens","II Corinthians":"2 Corinthiens",Galatians:"Galates",Ephesians:"Ephesiens",Philippians:"Philippiens",Colossians:"Colossiens","I Thessalonians":"1 Thessaloniciens","II Thessalonians":"2 Thessaloniciens","I Timothy":"1 Timothee","II Timothy":"2 Timothee",Titus:"Tite",Philemon:"Philemon",Hebrews:"Hebreux",James:"Jacques","I Peter":"1 Pierre","II Peter":"2 Pierre","I John":"1 Jean","II John":"2 Jean","III John":"3 Jean",Jude:"Jude","Revelation of John":"Apocalypse"},de:{Genesis:"1 Mose",Exodus:"2 Mose",Leviticus:"3 Mose",Numbers:"4 Mose",Deuteronomy:"5 Mose",Joshua:"Josua",Judges:"Richter",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Konige","II Kings":"2 Konige","I Chronicles":"1 Chronik","II Chronicles":"2 Chronik",Ezra:"Esra",Nehemiah:"Nehemia",Esther:"Ester",Job:"Hiob",Psalms:"Psalmen",Proverbs:"Spruche",Ecclesiastes:"Prediger","Song of Solomon":"Hohelied",Isaiah:"Jesaja",Jeremiah:"Jeremia",Lamentations:"Klagelieder",Ezekiel:"Hesekiel",Daniel:"Daniel",Hosea:"Hosea",Joel:"Joel",Amos:"Amos",Obadiah:"Obadja",Jonah:"Jona",Micah:"Micha",Nahum:"Nahum",Habakkuk:"Habakuk",Zephaniah:"Zefanja",Haggai:"Haggai",Zechariah:"Sacharja",Malachi:"Maleachi",Matthew:"Matthaus",Mark:"Markus",Luke:"Lukas",John:"Johannes",Acts:"Apostelgeschichte",Romans:"Romer","I Corinthians":"1 Korinther","II Corinthians":"2 Korinther",Galatians:"Galater",Ephesians:"Epheser",Philippians:"Philipper",Colossians:"Kolosser","I Thessalonians":"1 Thessalonicher","II Thessalonians":"2 Thessalonicher","I Timothy":"1 Timotheus","II Timothy":"2 Timotheus",Titus:"Titus",Philemon:"Philemon",Hebrews:"Hebraer",James:"Jakobus","I Peter":"1 Petrus","II Peter":"2 Petrus","I John":"1 Johannes","II John":"2 Johannes","III John":"3 Johannes",Jude:"Judas","Revelation of John":"Offenbarung"},es:{Genesis:"Genesis",Exodus:"Exodo",Leviticus:"Levitico",Numbers:"Numeros",Deuteronomy:"Deuteronomio",Joshua:"Josue",Judges:"Jueces",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Reyes","II Kings":"2 Reyes","I Chronicles":"1 Cronicas","II Chronicles":"2 Cronicas",Ezra:"Esdras",Nehemiah:"Nehemias",Esther:"Ester",Job:"Job",Psalms:"Salmos",Proverbs:"Proverbios",Ecclesiastes:"Eclesiastes","Song of Solomon":"Cantares",Isaiah:"Isaias",Jeremiah:"Jeremias",Lamentations:"Lamentaciones",Ezekiel:"Ezequiel",Daniel:"Daniel",Hosea:"Oseas",Joel:"Joel",Amos:"Amos",Obadiah:"Abdias",Jonah:"Jonas",Micah:"Miqueas",Nahum:"Nahum",Habakkuk:"Habacuc",Zephaniah:"Sofonias",Haggai:"Hageo",Zechariah:"Zacarias",Malachi:"Malaquias",Matthew:"Mateo",Mark:"Marcos",Luke:"Lucas",John:"Juan",Acts:"Hechos",Romans:"Romanos","I Corinthians":"1 Corintios","II Corinthians":"2 Corintios",Galatians:"Galatas",Ephesians:"Efesios",Philippians:"Filipenses",Colossians:"Colosenses","I Thessalonians":"1 Tesalonicenses","II Thessalonians":"2 Tesalonicenses","I Timothy":"1 Timoteo","II Timothy":"2 Timoteo",Titus:"Tito",Philemon:"Filemon",Hebrews:"Hebreos",James:"Santiago","I Peter":"1 Pedro","II Peter":"2 Pedro","I John":"1 Juan","II John":"2 Juan","III John":"3 Juan",Jude:"Judas","Revelation of John":"Apocalipsis"},pt:{Genesis:"Genesis",Exodus:"Exodo",Leviticus:"Levitico",Numbers:"Numeros",Deuteronomy:"Deuteronomio",Joshua:"Josue",Judges:"Juizes",Ruth:"Rute","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Reis","II Kings":"2 Reis","I Chronicles":"1 Cronicas","II Chronicles":"2 Cronicas",Ezra:"Esdras",Nehemiah:"Neemias",Esther:"Ester",Job:"Jo",Psalms:"Salmos",Proverbs:"Proverbios",Ecclesiastes:"Eclesiastes","Song of Solomon":"Cantares",Isaiah:"Isaias",Jeremiah:"Jeremias",Lamentations:"Lamentacoes",Ezekiel:"Ezequiel",Daniel:"Daniel",Hosea:"Oseias",Joel:"Joel",Amos:"Amos",Obadiah:"Obadias",Jonah:"Jonas",Micah:"Miqueias",Nahum:"Naum",Habakkuk:"Habacuque",Zephaniah:"Sofonias",Haggai:"Ageu",Zechariah:"Zacarias",Malachi:"Malaquias",Matthew:"Mateus",Mark:"Marcos",Luke:"Lucas",John:"Joao",Acts:"Atos",Romans:"Romanos","I Corinthians":"1 Corintios","II Corinthians":"2 Corintios",Galatians:"Galatas",Ephesians:"Efesios",Philippians:"Filipenses",Colossians:"Colossenses","I Thessalonians":"1 Tessalonicenses","II Thessalonians":"2 Tessalonicenses","I Timothy":"1 Timoteo","II Timothy":"2 Timoteo",Titus:"Tito",Philemon:"Filemom",Hebrews:"Hebreus",James:"Tiago","I Peter":"1 Pedro","II Peter":"2 Pedro","I John":"1 Joao","II John":"2 Joao","III John":"3 Joao",Jude:"Judas","Revelation of John":"Apocalipse"},ja:{Genesis:"創世記",Exodus:"出エジプト記",Leviticus:"レビ記",Numbers:"民数記",Deuteronomy:"申命記",Joshua:"ヨシュア記",Judges:"士師記",Ruth:"ルツ記","I Samuel":"サムエル記 上","II Samuel":"サムエル記 下","I Kings":"列王記 上","II Kings":"列王記 下","I Chronicles":"歴代誌 上","II Chronicles":"歴代誌 下",Ezra:"エズラ記",Nehemiah:"ネヘミヤ記",Esther:"エステル記",Job:"ヨブ記",Psalms:"詩篇",Proverbs:"箴言",Ecclesiastes:"コヘレトの言葉","Song of Solomon":"雅歌",Isaiah:"イザヤ書",Jeremiah:"エレミヤ書",Lamentations:"哀歌",Ezekiel:"エゼキエル書",Daniel:"ダニエル書",Hosea:"ホセア書",Joel:"ヨエル書",Amos:"アモス書",Obadiah:"オバデヤ書",Jonah:"ヨナ書",Micah:"ミカ書",Nahum:"ナホム書",Habakkuk:"ハバクク書",Zephaniah:"ゼファニヤ書",Haggai:"ハガイ書",Zechariah:"ゼカリヤ書",Malachi:"マラキ書",Matthew:"マタイによる福音書",Mark:"マルコによる福音書",Luke:"ルカによる福音書",John:"ヨハネによる福音書",Acts:"使徒言行録",Romans:"ローマの信徒への手紙","I Corinthians":"コリントの信徒への手紙 一","II Corinthians":"コリントの信徒への手紙 二",Galatians:"ガラテヤの信徒への手紙",Ephesians:"エフェソの信徒への手紙",Philippians:"フィリピの信徒への手紙",Colossians:"コロサイの信徒への手紙","I Thessalonians":"テサロニケの信徒への手紙 一","II Thessalonians":"テサロニケの信徒への手紙 二","I Timothy":"テモテへの手紙 一","II Timothy":"テモテへの手紙 二",Titus:"テトスへの手紙",Philemon:"フィレモンへの手紙",Hebrews:"ヘブライ人への手紙",James:"ヤコブの手紙","I Peter":"ペトロの手紙 一","II Peter":"ペトロの手紙 二","I John":"ヨハネの手紙 一","II John":"ヨハネの手紙 二","III John":"ヨハネの手紙 三",Jude:"ユダの手紙","Revelation of John":"ヨハネの黙示録"},mn:{Genesis:"Эхлэл",Exodus:"Гарлын ном",Leviticus:"Левийн ном",Numbers:"Тоо бүртгэл",Deuteronomy:"Дэд хууль",Joshua:"Иошуа",Judges:"Шүүгчид",Ruth:"Рут","I Samuel":"I Самуел","II Samuel":"II Самуел","I Kings":"I Хаад","II Kings":"II Хаад","I Chronicles":"I Түүхийн ном","II Chronicles":"II Түүхийн ном",Ezra:"Ездра",Nehemiah:"Неемиа",Esther:"Эстер",Job:"Иов",Psalms:"Дуулал",Proverbs:"Сургаалт үгс",Ecclesiastes:"Номлогч","Song of Solomon":"Дуунуудын дуу",Isaiah:"Исаиа",Jeremiah:"Иеремиа",Lamentations:"Гашуудал",Ezekiel:"Иезекиел",Daniel:"Даниел",Hosea:"Хосеа",Joel:"Иоел",Amos:"Амос",Obadiah:"Обадиа",Jonah:"Иона",Micah:"Мика",Nahum:"Наум",Habakkuk:"Хабаккук",Zephaniah:"Зефани",Haggai:"Хаггай",Zechariah:"Захариа",Malachi:"Малаки",Matthew:"Матай",Mark:"Марк",Luke:"Лук",John:"Иохан",Acts:"Үйлс",Romans:"Ромчуудад","I Corinthians":"I Коринтчуудад","II Corinthians":"II Коринтчуудад",Galatians:"Галатчуудад",Ephesians:"Ефесчүүдэд",Philippians:"Филиппчүүдэд",Colossians:"Колоссчуудад","I Thessalonians":"I Тессалоникчуудад","II Thessalonians":"II Тессалоникчуудад","I Timothy":"I Тимотэд","II Timothy":"II Тимотэд",Titus:"Титд",Philemon:"Филемонд",Hebrews:"Еврейчүүдэд",James:"Иаков","I Peter":"I Петр","II Peter":"II Петр","I John":"I Иохан","II John":"II Иохан","III John":"III Иохан",Jude:"Иуда","Revelation of John":"Илчлэлт"}}])},52388,e=>{"use strict";e.s(["isChapterNote",0,function(e){return e.endsWith("#0")},"makeChapterNoteRef",0,function(e,a){return`${e}#${a}#0`},"makeNoteRef",0,function(e,a,s){return`${e}#${a}#${s}`},"parseNoteRef",0,function(e){let a=e.split("#");return{book:a[0],chapter:parseInt(a[1],10),verse:parseInt(a[2],10)}}])},86734,e=>{"use strict";e.i(47167);var a=e.i(71645),s=e.i(77237),o=e.i(63398),t=e.i(52388),r=e.i(22677),i=e.i(87922);function n(e){return`verse_notes_cache_${e}`}function l(e,a,s=!1){try{let o=Date.now();if(!s){let a=localStorage.getItem(n(e));if(a){let e=JSON.parse(a);"number"==typeof e.cachedAt&&(o=e.cachedAt)}}localStorage.setItem(n(e),JSON.stringify({data:a,cachedAt:o}))}catch{}}let h=new Map;e.s(["useVerseNotes",0,function(){let{user:e,sessionReady:u}=(0,o.useAuth)(),m=e?.email||"",c=(0,a.useMemo)(()=>{let e=m?function(e){try{let a=localStorage.getItem(n(e));if(!a)return null;let{data:s,cachedAt:o}=JSON.parse(a);if(Date.now()-o>36e5)return null;return s}catch{return null}}(m):null;return e?new Map(e.map(e=>[e.ref,e])):null},[m]),[d,I]=(0,s.useOwnedState)(m,null),[b,k]=(0,s.useOwnedState)(m,!0),[p,g]=(0,s.useOwnedState)(m,!1),J=d??c??h,f=!!m&&!(d??c)&&b,x=(0,a.useRef)(J);(0,a.useEffect)(()=>{x.current=J},[J]);let y=(0,a.useRef)(0);(0,a.useEffect)(()=>{y.current+=1},[m]);let C=(0,a.useCallback)(()=>{if(!m)return Promise.resolve();let e=++y.current;return c||!u?Promise.resolve():(0,i.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadVerseNotes?userEmail=${encodeURIComponent(m)}`,{headers:{Authorization:`Bearer ${(0,r.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(a=>{y.current===e&&(I(new Map(a.map(e=>[e.ref,e]))),g(!1),l(m,a,!0))}).catch(a=>{console.error("Failed to load verse notes:",a),y.current===e&&g(!0)}).finally(()=>{y.current===e&&k(!1)})},[m,u,c,I,g,k]),P=(0,a.useCallback)(async(e,a,s,o)=>{if(!m)return;let i=(0,t.makeNoteRef)(e,a,s),n=x.current.get(i),h=new Map(x.current);if(o.trim()?h.set(i,{ref:i,note:o.trim(),updatedAt:new Date().toISOString()}):h.delete(i),I(h),l(m,Array.from(h.values())),"u"{C()},[C]),{notes:J,loading:f,loadError:p,saveNote:P,reload:C}}])}]);