(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),t=e.i(7670),r=e.i(78744),o=e.i(52456);e.s(["default",0,function({tabs:e,className:n}){let{t:i,withQuery:l,pathname:h}=(0,r.useNavLink)();return(0,a.jsx)("nav",{className:(0,t.default)("w-full px-0 sm:px-2 md:px-6",n),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 r=h.endsWith(".html")?h.slice(0,-5):h,n=r===e.matchPath||r.startsWith(`${e.matchPath}/`);return(0,a.jsx)(s.default,{href:l(e.path),prefetch:!1,"aria-current":n?"page":void 0,className:(0,t.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",n?"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)(o.default,{children:i[e.key]})},e.path)})})})}])},22956,e=>{"use strict";e.i(47167);var a=e.i(43476),s=e.i(71645),t=e.i(86939),r=e.i(18566),o=e.i(58579),n=e.i(51264),i=e.i(700),l=e.i(87451),h=e.i(31582),u=e.i(63398),c=e.i(15132),m=e.i(34223),d=e.i(86734),I=e.i(12491),b=e.i(54567),g=e.i(52388),p=e.i(66382);let x=m.default.default.map(e=>e.book),k=x.indexOf("Matthew"),J=new Set(x.slice(0,k)),f=new Set(x.slice(k)),v="search-history",y=[];function N(e){try{let a=JSON.parse(e||"[]");return Array.isArray(a)?a:y}catch{return y}}function C(){try{return JSON.parse(localStorage.getItem(v)||"[]")}catch{return[]}}e.s(["default",0,function(){let e,m,{isAdmin:x,status:k}=(0,u.useAuth)(),{notes:S,saveNote:w}=(0,d.useVerseNotes)(),[P,E]=(0,s.useState)({}),T=(0,n.useUiLang)(),[R,M]=(0,s.useState)("ko"),[j,H]=(0,s.useState)(T);T!==j&&(H(T),M(T));let[A,L]=(0,s.useState)(""),[$,O]=(0,s.useState)(""),[U,D]=(0,s.useState)([]),[z,K]=(0,s.useState)(0),[G,Z]=(0,s.useState)(0),[q,B]=(0,s.useState)(!1),[F,W]=(0,s.useState)("all"),[_,V]=(0,s.useState)(!1),[X,Q]=(0,s.useState)(!1),[Y,ee]=(0,p.useStoredValue)(v,N,y),[ea,es]=(0,s.useState)(!1),et=(0,s.useRef)(null),er=(0,s.useRef)(0),eo=(0,s.useRef)(""),[en,ei]=(0,s.useState)(null),[el,eh]=(0,s.useState)(""),[eu,ec]=(0,s.useState)(!1),[em,ed]=(0,s.useState)(null),eI=(0,r.useRouter)(),eb=(0,o.getUiText)(R);async function eg(e,a,s){ec(!0),await w(e,a,s,el),ec(!1),ed((0,g.makeNoteRef)(e,a,s)),setTimeout(()=>ed(null),2e3)}function ep(e,a,s){let t=++er.current,r=`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/search?q=${encodeURIComponent(e)}&lang=${R}&version=${A}&offset=${a}&limit=50`;s&&B(!0),fetch(r).then(e=>e.json()).then(e=>{if(t!==er.current)return;let{results:r,total:o}=e;D(e=>s?[...e,...r]:r),K(o),Z(a+r.length)}).catch(()=>{t===er.current&&(s||(D([]),Q(!0)))}).finally(()=>{t===er.current&&s&&B(!1)})}function ex(e=$){let a,s=e.trim();if(!s){D([]),K(0),Z(0),V(!1),Q(!1);return}es(!1),W("all"),V(!0),Q(!1),B(!1),eo.current=s,a=C().filter(e=>e!==s),localStorage.setItem(v,JSON.stringify([s,...a].slice(0,8))),ee(C()),ep(s,0,!1)}return(0,s.useEffect)(()=>{fetch((0,h.bibleIndexUrl)()).then(e=>e.json()).then(e=>{let a=(0,i.filterBibleIndex)(e,x);E(a);let s=navigator.language.split("-")[0],t=window.localStorage.getItem("ui-lang")||"",r=Object.keys(a);if(0===r.length)return;let n=(0,o.chooseInitialLang)(r,{storedLang:t,browserLang:s,fallback:"en"});M(n),(0,o.setUiLang)(n),L(a[n][0].version)})},[x]),(0,s.useEffect)(()=>{R&&A&&(0,c.warmPwaUrls)((0,c.getReadingIndexCacheUrls)(R,A,"/search"))},[R,A]),(0,s.useEffect)(()=>{function e(e){et.current&&!et.current.contains(e.target)&&es(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.default,{tabs:b.searchTabs,className:"pt-3"}),(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:["📖 ",eb.searchTitle]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"mr-2",children:[eb.language,":"]}),(0,a.jsx)("select",{value:R,onChange:e=>{let a=e.target.value;(0,o.setUiLang)(a),M(a),L(P[a]?.[0]?.version||""),D([]),K(0),Z(0),V(!1),Q(!1)},className:"h-9 px-2 py-1 bg-white text-black dark:bg-gray-800 dark:text-white border rounded",children:Object.keys(P).map(e=>(0,a.jsx)("option",{value:e,children:e.toUpperCase()},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"mr-2",children:[eb.version,":"]}),(0,a.jsx)("select",{value:A,onChange:e=>{L(e.target.value),D([]),K(0),Z(0),V(!1),Q(!1)},className:"h-9 px-2 py-1 bg-white text-black dark:bg-gray-800 dark:text-white border rounded",children:P[R]?.map(e=>(0,a.jsx)("option",{value:e.version,children:e.label},e.version))})]})]}),(0,a.jsxs)("div",{className:"relative mb-4",ref:et,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:eb.searchPlaceholder,value:$,onChange:e=>{O(e.target.value),es(""===e.target.value&&Y.length>0)},onFocus:()=>{""===$&&Y.length>0&&es(!0)},onKeyDown:e=>{"Enter"===e.key&&ex(),"Escape"===e.key&&es(!1)},className:"flex-grow px-3 py-2 border rounded dark:bg-gray-800 dark:text-white"}),(0,a.jsx)("button",{onClick:()=>ex(),className:"px-4 py-2 bg-blue-600 text-white dark:bg-blue-500 dark:hover:bg-blue-400 rounded",children:eb.searchButton})]}),ea&&Y.length>0&&(0,a.jsx)("ul",{className:"absolute z-10 left-0 right-0 mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded shadow-lg overflow-hidden",children:Y.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700",children:[(0,a.jsxs)("button",{className:"flex-1 text-left text-sm text-gray-700 dark:text-gray-200 truncate",onClick:()=>{O(e),ex(e)},children:["🕐 ",e]}),(0,a.jsx)("button",{onClick:()=>{let a;ee(a=Y.filter(a=>a!==e)),localStorage.setItem(v,JSON.stringify(a))},className:"ml-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 text-xs shrink-0","aria-label":eb.offlineDelete,children:"✕"})]},e))})]}),X&&(0,a.jsxs)("div",{className:"mt-6 rounded-xl border border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20 px-4 py-4",children:[(0,a.jsx)("p",{className:"text-red-700 dark:text-red-400 font-medium",children:eb.searchError}),(0,a.jsx)("button",{onClick:()=>ex(),className:"mt-2 text-sm text-red-600 dark:text-red-400 underline hover:no-underline",children:eb.searchRetry})]}),!X&&_&&0===U.length&&(0,a.jsxs)("div",{className:"mt-6 rounded-xl border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800 px-4 py-6 text-center",children:[(0,a.jsx)("p",{className:"text-slate-700 dark:text-slate-300 font-medium",children:eb.searchNoResult}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-500 dark:text-slate-400",children:eb.searchNoResultHint})]}),U.length>0&&(0,a.jsx)("div",{className:"mt-4 space-y-3",children:(e=U.filter(e=>"ot"===F?J.has(e.book):"nt"!==F||f.has(e.book)),m=(e,s)=>(0,a.jsx)("button",{onClick:()=>W(e),className:`px-3 py-1 text-sm rounded border transition-colors ${F===e?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:s},e),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsxs)("h2",{className:"text-xl font-bold",children:[eb.searchResult," (",e.length,eb.resultUnit,")"]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[m("all",eb.filterAll),m("ot",eb.oldTestament),m("nt",eb.newTestament)]})]}),e.map((e,s)=>{let r=(0,g.makeNoteRef)(e.book,e.chapter,e.verse),o=S.has(r),n=en===r;return(0,a.jsxs)("div",{className:"border-b pb-3",children:[(0,a.jsxs)("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-1",children:[t.bookNameMap[R]?.[e.book]||e.book," ",e.chapter,":",e.verse]}),(0,a.jsx)("div",{className:"mb-2",children:e.text}),(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,a.jsxs)("button",{onClick:()=>{var a,s,t;return a=e.book,s=e.chapter,t=e.verse,void eI.push((0,l.withStaticHtmlPath)(`/read?book=${encodeURIComponent(a)}&chapter=${s}&lang=${R}&version=${A}&verse=${t}&from=search`))},className:"px-3 py-1 text-xs rounded bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-400",children:[eb.headerRead," →"]}),(0,a.jsxs)("button",{onClick:()=>eI.push((0,l.withStaticHtmlPath)(`/writing/chapter?book=${encodeURIComponent(e.book)}&chapter=${e.chapter}&lang=${R}&version=${A}`)),className:"px-3 py-1 text-xs rounded border border-gray-400 text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700",children:[eb.headerWriting," →"]}),"authenticated"===k&&(0,a.jsxs)("button",{onClick:()=>{var a,s,t;let r;return n?ei(null):(a=e.book,s=e.chapter,t=e.verse,void(ei(r=(0,g.makeNoteRef)(a,s,t)),eh(S.get(r)?.note??""),ed(null)))},className:`px-3 py-1 text-xs rounded border transition-colors ${o?"border-amber-400 text-amber-700 dark:text-amber-300 dark:border-amber-600 bg-amber-50 dark:bg-amber-900/20":"border-gray-400 text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}`,children:["📝 ",o?eb.bookmarkHasNote:eb.searchNoteAdd]})]}),n&&(0,a.jsxs)("div",{className:"mt-2 rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-900/20 p-3",children:[(0,a.jsx)("textarea",{value:el,onChange:e=>eh(e.target.value),placeholder:eb.notePlaceholder,rows:3,className:"w-full text-sm rounded border border-amber-300 dark:border-amber-700 bg-white dark:bg-gray-800 dark:text-white px-2 py-1.5 resize-none focus:outline-none focus:ring-1 focus:ring-amber-400"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,a.jsx)("button",{onClick:()=>eg(e.book,e.chapter,e.verse),disabled:eu,className:"px-3 py-1 text-xs rounded bg-amber-500 text-white hover:bg-amber-600 disabled:opacity-50",children:em===r?eb.noteSaved:eb.noteSave}),(0,a.jsx)("button",{onClick:()=>ei(null),className:"px-3 py-1 text-xs rounded border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:eb.cancel})]})]})]},s)}),U.length{"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":"Илчлэлт"}}])},15132,e=>{"use strict";var a=e.i(47167),s=e.i(87451),t=e.i(88558),r=e.i(31582);e.s(["getReadCacheUrls",0,function(e){let{lang:a,version:t,book:o,chapter:n,prevChapter:i,nextChapter:l}=e,h=`lang=${encodeURIComponent(a)}&version=${encodeURIComponent(t)}`,u=[(0,r.bibleIndexUrl)(),(0,r.bibleChapterCountsUrl)(),(0,r.bibleBookUrl)(a,t,o),(0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(o)}&chapter=${n}&${h}`)];return i&&u.push((0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(o)}&chapter=${i}&${h}`)),l&&u.push((0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(o)}&chapter=${l}&${h}`)),u},"getReadingIndexCacheUrls",0,function(e,a,t){let o=`lang=${encodeURIComponent(e)}&version=${encodeURIComponent(a)}`;return[(0,r.bibleIndexUrl)(),(0,r.bibleChapterCountsUrl)(),(0,s.withStaticHtmlPath)(`${t}?${o}`)]},"warmPwaUrls",0,function(e){if((0,t.isNative)())return;let s="true"===a.default.env.NEXT_PUBLIC_ENABLE_PWA_LOCALHOST;if(!("serviceWorker"in navigator)||("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)&&!s)return;let r=[...new Set(e.filter(Boolean))];0!==r.length&&navigator.serviceWorker.ready.then(e=>{let a=navigator.serviceWorker.controller??e.active;a?.postMessage({type:"CACHE_URLS",urls:r})}).catch(()=>{})}])},66382,e=>{"use strict";var a=e.i(71645),s=e.i(61056);e.s(["useStoredValue",0,function(e,t,r){let o=(0,s.useHydrated)(),[n,i]=(0,a.useState)(null),l=r;if(n&&n.key===e)l=n.value;else if(o)try{l=t(localStorage.getItem(e))}catch{l=r}return[l,(0,a.useCallback)(a=>i({key:e,value:a}),[e])]}])},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),t=e.i(63398),r=e.i(52388),o=e.i(22677),n=e.i(87922);function i(e){return`verse_notes_cache_${e}`}function l(e,a,s=!1){try{let t=Date.now();if(!s){let a=localStorage.getItem(i(e));if(a){let e=JSON.parse(a);"number"==typeof e.cachedAt&&(t=e.cachedAt)}}localStorage.setItem(i(e),JSON.stringify({data:a,cachedAt:t}))}catch{}}let h=new Map;e.s(["useVerseNotes",0,function(){let{user:e,sessionReady:u}=(0,t.useAuth)(),c=e?.email||"",m=(0,a.useMemo)(()=>{let e=c?function(e){try{let a=localStorage.getItem(i(e));if(!a)return null;let{data:s,cachedAt:t}=JSON.parse(a);if(Date.now()-t>36e5)return null;return s}catch{return null}}(c):null;return e?new Map(e.map(e=>[e.ref,e])):null},[c]),[d,I]=(0,s.useOwnedState)(c,null),[b,g]=(0,s.useOwnedState)(c,!0),[p,x]=(0,s.useOwnedState)(c,!1),k=d??m??h,J=!!c&&!(d??m)&&b,f=(0,a.useRef)(k);(0,a.useEffect)(()=>{f.current=k},[k]);let v=(0,a.useRef)(0);(0,a.useEffect)(()=>{v.current+=1},[c]);let y=(0,a.useCallback)(()=>{if(!c)return Promise.resolve();let e=++v.current;return m||!u?Promise.resolve():(0,n.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadVerseNotes?userEmail=${encodeURIComponent(c)}`,{headers:{Authorization:`Bearer ${(0,o.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(a=>{v.current===e&&(I(new Map(a.map(e=>[e.ref,e]))),x(!1),l(c,a,!0))}).catch(a=>{console.error("Failed to load verse notes:",a),v.current===e&&x(!0)}).finally(()=>{v.current===e&&g(!1)})},[c,u,m,I,x,g]),N=(0,a.useCallback)(async(e,a,s,t)=>{if(!c)return;let n=(0,r.makeNoteRef)(e,a,s),i=f.current.get(n),h=new Map(f.current);if(t.trim()?h.set(n,{ref:n,note:t.trim(),updatedAt:new Date().toISOString()}):h.delete(n),I(h),l(c,Array.from(h.values())),"u"{y()},[y]),{notes:k,loading:J,loadError:p,saveNote:N,reload:y}}])}]);