-1?"":"https://adisciple.org";function slug(t){return SL[(t||"").trim().toLowerCase()];}[].slice.call(d.querySelectorAll(".study")).forEach(function(c){var h=c.querySelector("h3"),u=h&&slug(h.textContent);if(!u)return;var a=d.createElement("a");a.className="card-link";a.href=BASE+u;while(h.firstChild)a.appendChild(h.firstChild);h.appendChild(a);var ar=c.querySelector(".arrow");if(ar){var l=d.createElement("span");l.className="open-lbl";l.textContent="Open the study";ar.parentNode.insertBefore(l,ar);}});[].slice.call(d.querySelectorAll(".lib")).forEach(function(c){var h=c.querySelector("h3"),u=h&&slug(h.textContent);if(!u)return;u=BASE+u;var a=d.createElement("a");a.href=u;while(h.firstChild)a.appendChild(h.firstChild);h.appendChild(a);[].slice.call(c.querySelectorAll(".lib-sessions li")).forEach(function(li,i){var x=d.createElement("a");x.href=u+"#session-"+(i+1);while(li.firstChild)x.appendChild(li.firstChild);li.appendChild(x);});[].slice.call(c.querySelectorAll(".lib-sessions small")).forEach(function(m){m.textContent=m.textContent.replace(/^2 2:/,"2 Timothy 2:");});var b=d.createElement("a");b.className="btn ghost lib-open";b.href=u;b.textContent="Open the study →";var f=c.querySelector(".lib-foot");if(f)f.parentNode.insertBefore(b,f.nextSibling);else c.appendChild(b);});var img=d.querySelector("#closet img.door"),RM=window.matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches,box=null;if(img){box=d.createElement("div");box.className=img.className+" door-seq";img.parentNode.insertBefore(box,img);img.className="";img.src=FIN;img.alt=ALT;img.removeAttribute("loading");box.appendChild(img);if(!RM){var c=d.createElement("canvas");c.width=720;c.height=900;c.setAttribute("aria-hidden","true");box.appendChild(c);}}var R=document.createElement("div");R.id="ad-root";[].slice.call(d.body.childNodes).forEach(function(n){R.appendChild(document.importNode(n,true));});var st=document.createElement("style");st.textContent=CSS;R.appendChild(st);document.body.insertBefore(R,document.body.firstChild);[].slice.call(R.querySelectorAll("script")).forEach(function(o){var n=document.createElement("script");[].slice.call(o.attributes).forEach(function(a){n.setAttribute(a.name,a.value);});n.async=false;n.textContent=o.textContent.replace("'#view-'+h+' h1'","'#view-'+h+' .vt'").replace("document.title='adisciple | '+views[h]","document.title=views[h]+' | adisciple'");o.replaceWith(n);});box=R.querySelector(".door-seq");if(!box||RM)return;var cv=box.querySelector("canvas"),cx=cv.getContext("2d"),urls=SEQ.split("|"),FW=720,FH=900,COLS=4,PER=16,N=46,sh=[],ld=0,cur=-1,tgt=0,shown=-1,raf=0;function prog(){var r=box.getBoundingClientRect(),vh=window.innerHeight||document.documentElement.clientHeight,a=vh*0.92,b=vh*0.12-r.height*0.35,t=(a-r.top)/(a-b);return t<0?0:t>1?1:t;}function put(n,al){var s=sh[Math.floor(n/PER)];if(!s)return;var m=n%PER;cx.globalAlpha=al;cx.drawImage(s,(m%COLS)*FW,Math.floor(m/COLS)*FH,FW,FH,0,0,FW,FH);}function draw(f){var i=Math.floor(f),k=f-i,j=Math.min(N-1,i+1);put(i,1);if(k>0.01&&j!==i)put(j,k);cx.globalAlpha=1;}function tick(){raf=0;tgt=prog()*(N-1);if(cur<0)cur=tgt;cur+=(tgt-cur)*0.18;if(Math.abs(tgt-cur)<0.01)cur=tgt;if(Math.abs(cur-shown)>0.004){draw(cur);shown=cur;}if(cur!==tgt)raf=requestAnimationFrame(tick);}function kick(){if(ld===urls.length&&!raf)raf=requestAnimationFrame(tick);}function start(){urls.forEach(function(u,n){var im=new Image();im.decoding="async";im.onload=function(){sh[n]=im;ld++;if(ld===urls.length){cur=-1;draw(prog()*(N-1));box.classList.add("ready");kick();}};im.src=u;});addEventListener("scroll",kick,{passive:true});addEventListener("resize",kick);}if("IntersectionObserver" in window){var io=new IntersectionObserver(function(es){if(es[0].isIntersecting){io.disconnect();start();}},{rootMargin:"1200px 0px"});io.observe(box);}else start();})();