(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8501,e=>{"use strict";var a=e.i(43476),s=e.i(71645),t=e.i(58579),o=e.i(51264),n=e.i(88558),i=e.i(62536);e.s(["default",0,function(){let e=(0,o.useUiLang)(),[r,l]=(0,s.useState)(!0),[h,u]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{l(window.navigator.onLine),u((0,n.isNative)()?(0,i.getOfflineBibleBundles)().length>0:!!window.navigator.serviceWorker?.controller)};return e(),window.addEventListener("online",e),window.addEventListener("offline",e),window.addEventListener(i.OFFLINE_BUNDLES_CHANGED_EVENT,e),window.navigator.serviceWorker?.addEventListener("controllerchange",e),window.navigator.serviceWorker?.ready.then(e).catch(()=>{}),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e),window.removeEventListener(i.OFFLINE_BUNDLES_CHANGED_EVENT,e),window.navigator.serviceWorker?.removeEventListener("controllerchange",e)}},[]);let c=(0,t.getUiText)(e),m=r?h?c.offlineStatusReady:c.offlineStatusOnline:c.offlineStatusOffline;return(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("open-offline-manager")),className:`inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs font-medium transition hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-gray-900 ${r?h?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-800 dark:bg-emerald-950/50 dark:text-emerald-300":"border-slate-200 bg-slate-50 text-slate-700 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200":"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-800 dark:bg-amber-950/50 dark:text-amber-300"}`,children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-current opacity-80"}),(0,a.jsx)("span",{children:m}),(0,a.jsx)("span",{className:"text-current/70",children:"·"}),(0,a.jsx)("span",{children:c.offlineManage})]})})}])},12491,e=>{"use strict";var a=e.i(43476),s=e.i(22016),t=e.i(7670),o=e.i(78744),n=e.i(52456);e.s(["default",0,function({tabs:e,className:i}){let{t:r,withQuery:l,pathname:h}=(0,o.useNavLink)();return(0,a.jsx)("nav",{className:(0,t.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 o=h.endsWith(".html")?h.slice(0,-5):h,i=o===e.matchPath||o.startsWith(`${e.matchPath}/`);return(0,a.jsx)(s.default,{href:l(e.path),prefetch:!1,"aria-current":i?"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",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)(n.default,{children:r[e.key]})},e.path)})})})}])},60502,e=>{"use strict";e.i(47167);var a=e.i(71645),s=e.i(63398),t=e.i(22677),o=e.i(87922);let n=()=>new Date().toISOString();e.s(["useReadingStorage",0,()=>{let{user:e,sessionReady:i}=(0,s.useAuth)(),r=e?.email||"",[l,h]=(0,a.useState)({email:"",data:null});l.email!==r&&h({email:r,data:null});let u=l.email===r?l.data:null,c=(0,a.useRef)(0),m=(0,a.useRef)(Promise.resolve());(0,a.useEffect)(()=>{c.current+=1},[r]);let I=(0,a.useCallback)(()=>{if(!r||!i)return Promise.resolve();let e=++c.current;return(0,o.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadReading?userEmail=${encodeURIComponent(r)}`,{method:"GET",headers:{Authorization:`Bearer ${(0,t.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(a=>{c.current===e&&h({email:r,data:a})}).catch(a=>{console.error("Failed to load reading progress:",a),c.current===e&&h({email:r,data:null})})},[r,i]),d=(0,a.useCallback)(async(e,a)=>{if(!r)return;h({email:r,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,t.getSessionToken)()}`},body:JSON.stringify({userEmail:r,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)}};m.current=m.current.then(s,s),await m.current},[r]),f=(0,a.useCallback)((e,a)=>{if(!u)return void I();let s=n();d({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,d,I]),p=(0,a.useCallback)(e=>{if(!u)return void I();if(0===e.length)return;let a=n(),s={...u.readChapters||{}};for(let{book:t,chapter:o}of e)s[t]={...s[t]||{},[o]:s[t]?.[o]??a};let t=e[e.length-1];d({startedDate:u.startedDate||a,readDays:u.readDays??0,completedRounds:u.completedRounds??0,readChapters:s,lastRead:u.lastRead??{book:t.book,chapter:t.chapter,date:a},bookmarkedVerses:u.bookmarkedVerses})},[u,d,I]),J=(0,a.useCallback)((e,a,s)=>{if(!u)return void I();let t=u.bookmarkedVerses??[],o=t.findIndex(t=>t.book===e&&t.chapter===a&&t.verse===s),i=o>=0?t.filter((e,a)=>a!==o):[...t,{book:e,chapter:a,verse:s,bookmarkedAt:n()}];d({...u,bookmarkedVerses:i})},[u,d,I]),b=(0,a.useCallback)((e,a,s,t)=>{let o;if(!u)return void I();let i=u.bookmarkedVerses??[],r=i.findIndex(t=>t.book===e&&t.chapter===a&&t.verse===s);o=null===t?i.filter((e,a)=>a!==r):r>=0?i.map((e,a)=>a===r?{...e,color:t}:e):[...i,{book:e,chapter:a,verse:s,bookmarkedAt:n(),color:t}],d({...u,bookmarkedVerses:o})},[u,d,I]),g=(0,a.useCallback)(async()=>{if(!r)return;let e={startedDate:n(),readDays:0,completedRounds:(u?.completedRounds??0)+1,readChapters:{},lastRead:null,bookmarkedVerses:u?.bookmarkedVerses};await d(e,{replace:!0})},[r,u,d]);return(0,a.useEffect)(()=>{I()},[I]),{data:u,load:I,save:d,markChapterRead:f,markChaptersRead:p,toggleBookmark:J,setVerseHighlight:b,reset:g}}])},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":"Илчлэлт"}}])},15132,e=>{"use strict";var a=e.i(47167),s=e.i(87451),t=e.i(88558),o=e.i(31582);e.s(["getReadCacheUrls",0,function(e){let{lang:a,version:t,book:n,chapter:i,prevChapter:r,nextChapter:l}=e,h=`lang=${encodeURIComponent(a)}&version=${encodeURIComponent(t)}`,u=[(0,o.bibleIndexUrl)(),(0,o.bibleChapterCountsUrl)(),(0,o.bibleBookUrl)(a,t,n),(0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${i}&${h}`)];return r&&u.push((0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${r}&${h}`)),l&&u.push((0,s.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${l}&${h}`)),u},"getReadingIndexCacheUrls",0,function(e,a,t){let n=`lang=${encodeURIComponent(e)}&version=${encodeURIComponent(a)}`;return[(0,o.bibleIndexUrl)(),(0,o.bibleChapterCountsUrl)(),(0,s.withStaticHtmlPath)(`${t}?${n}`)]},"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 o=[...new Set(e.filter(Boolean))];0!==o.length&&navigator.serviceWorker.ready.then(e=>{let a=navigator.serviceWorker.controller??e.active;a?.postMessage({type:"CACHE_URLS",urls:o})}).catch(()=>{})}])},71192,e=>{"use strict";var a=e.i(83656);function s(e){let[s,t,o]=e.split("-").map(Number),n=new Date(s,t-1,o,12);return n.setDate(n.getDate()-1),(0,a.toLocalDateString)(n)}e.s(["checkNewStreakMilestone",0,function(e,a,s){for(let t of s)if(e=t)return t;return null},"computeStreakFromDates",0,function(e){if(0===e.length)return 0;let t=(0,a.toLocalDateString)(),o=s(t),n=e[e.length-1];if(n!==t&&n!==o)return 0;let i=0,r=n;for(let a=e.length-1;a>=0;a--)if(e[a]===r)i++,r=s(r);else if(e[a]{"use strict";var a=e.i(66382);let s=["sm","base","lg","xl"],t="bible-font-size";function o(e){return e&&s.includes(e)?e:"base"}e.s(["useFontSize",0,function(){let[e,n]=(0,a.useStoredValue)(t,o,"base"),i=e=>{localStorage.setItem(t,e),n(e)};return{size:e,increase:()=>i(s[Math.min(s.indexOf(e)+1,s.length-1)]),decrease:()=>i(s[Math.max(s.indexOf(e)-1,0)]),className:`text-${e}`,atMin:e===s[0],atMax:e===s[s.length-1]}}])},66382,e=>{"use strict";var a=e.i(71645),s=e.i(61056);e.s(["useStoredValue",0,function(e,t,o){let n=(0,s.useHydrated)(),[i,r]=(0,a.useState)(null),l=o;if(i&&i.key===e)l=i.value;else if(n)try{l=t(localStorage.getItem(e))}catch{l=o}return[l,(0,a.useCallback)(a=>r({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),o=e.i(52388),n=e.i(22677),i=e.i(87922);function r(e){return`verse_notes_cache_${e}`}function l(e,a,s=!1){try{let t=Date.now();if(!s){let a=localStorage.getItem(r(e));if(a){let e=JSON.parse(a);"number"==typeof e.cachedAt&&(t=e.cachedAt)}}localStorage.setItem(r(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(r(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]),[I,d]=(0,s.useOwnedState)(c,null),[f,p]=(0,s.useOwnedState)(c,!0),[J,b]=(0,s.useOwnedState)(c,!1),g=I??m??h,k=!!c&&!(I??m)&&f,E=(0,a.useRef)(g);(0,a.useEffect)(()=>{E.current=g},[g]);let v=(0,a.useRef)(0);(0,a.useEffect)(()=>{v.current+=1},[c]);let C=(0,a.useCallback)(()=>{if(!c)return Promise.resolve();let e=++v.current;return m||!u?Promise.resolve():(0,i.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadVerseNotes?userEmail=${encodeURIComponent(c)}`,{headers:{Authorization:`Bearer ${(0,n.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(a=>{v.current===e&&(d(new Map(a.map(e=>[e.ref,e]))),b(!1),l(c,a,!0))}).catch(a=>{console.error("Failed to load verse notes:",a),v.current===e&&b(!0)}).finally(()=>{v.current===e&&p(!1)})},[c,u,m,d,b,p]),S=(0,a.useCallback)(async(e,a,s,t)=>{if(!c)return;let i=(0,o.makeNoteRef)(e,a,s),r=E.current.get(i),h=new Map(E.current);if(t.trim()?h.set(i,{ref:i,note:t.trim(),updatedAt:new Date().toISOString()}):h.delete(i),d(h),l(c,Array.from(h.values())),"u"{C()},[C]),{notes:g,loading:k,loadError:J,saveNote:S,reload:C}}])},62401,e=>{e.v(a=>Promise.all(["static/chunks/0cxe4bpxdyrk7.js"].map(a=>e.l(a))).then(()=>a(71178)))}]);