1import{HttpClient,JsonContent,FormUrlEncodedContent}from"./core/http.js";import{Uri}from"./core/uri.js";window.mkCustomEvent=(t,e)=>new CustomEvent(t,e),window.mkEvent=(t,e)=>new Event(t,e);const imprt=function(){const map={},fallback=t=>{if(t in map)return map[t];const e=`${Math.round(1e4*Math.random())}-${Date.now()}`;return map[t]=new Promise(o=>{window[e]=o;const n=`import * as m from "${t}"; window["${e}"](m);`,i=document.createElement("script");i.type="module",i.async=!0,i.text=n;const a=document.querySelector("head");a&&a.appendChild(i)})};let dynamicLoad=!0;return url=>{if(!dynamicLoad)return fallback(url);try{return eval(`import("${url}")`)}catch(t){return dynamicLoad=!1,fallback(url)}}}();window.dopeImprt=imprt;const stripTrailingSlashes=t=>{if(!t)return t;let e=t;for(;e&&"/"===e[e.length-1];)e=e.substring(0,e.length-1);return e},stripLeadingSlashes=t=>{if(!t)return t;let e=t;for(;e&&"/"===e[0];)e=e.substring(1);return e},injectTimestamp=(t,e)=>{const o=stripLeadingSlashes(stripTrailingSlashes(e)),n=stripLeadingSlashes(t);return n.startsWith("assets/")?`/assets/${o}/${n.substring(7)}`:`/${o}/${n}`},initDopePage=()=>{customElements.define("dope-page",class extends HTMLElement{async connectedCallback(){this.setAttribute("loading","");try{let t=this.getAttribute("module");if(t){window.dopePrefix&&(t=injectTimestamp(t,window.dopePrefix));const e=await imprt(t);await e.default.setUp(this)}}finally{this.removeAttribute("loading")}}})},deps=[];window.customElements||deps.push(new Promise(t=>{const e=(window.dopePrefix?"/"+window.dopePrefix:"")+"/assets/es5/webcomponents-ce.js",o=document.createElement("script");o.async=!0,o.onload=()=>t(),o.src=e,document.head.appendChild(o)})),deps.length?Promise.all(deps).then(initDopePage):initDopePage();const page=document.querySelector(".page"),delay=t=>new Promise(e=>setTimeout(e,t));let lastPath=window.location.pathname;const defaultTitle=document.querySelector('meta[name="default-title"]').content,gemius=function(t,e){const o=document.querySelector('meta[name="gemius-identifier"]'),n=o&&o.content,i=window.pp_gemius_cmd,a=window.pp_gemius_hit;if(n)return{setRef:e=>{"function"==typeof i&&i.call(t,"referrer_override",e)},hit:()=>{"function"==typeof a&&a(n)}};const s=()=>{};return{setRef:s,hit:s}}(window);gemius.hit();const toAbsoluteUrl=t=>{if(t.startsWith("http:")||t.startsWith("https:"))return t;let e=window.location.origin;if("/"===t)return e;for(;"/"===e[e.length-1];)e=e.substring(0,e.length-1);return t.startsWith("/")||(t=`/${t}`),e+t},initPage=async(t,e)=>{if(!t)return;if(lastPath===t.path&&!t.data)return;let o;const n=document.documentElement;page.style.opacity="0",n.setAttribute("loading","");const i=Date.now();if(window.getComputedStyle(page).opacity,t.data){let e,n;"json"===t.data.type?(e=new JsonContent(t.data.data),n="application/json"):(e=new FormUrlEncodedContent(t.data),n="application/x-www-form-urlencoded"),o=await(new HttpClient).send({uri:new Uri(t.path),method:"POST",headers:{"Content-Type":n,"X-Suppress-Layout":"true"},credentials:"same-origin",content:e})}else o=await(new HttpClient).send({uri:new Uri(t.path),method:"GET",headers:{"X-Suppress-Layout":"true"},credentials:"same-origin"});if(o.ok){const a={path:lastPath,scrollTop:window.pageYOffset},s=await o.content.text();if(page.children.length){const t=page.querySelector("dope-page");t&&t.__dopeHandler&&await t.__dopeHandler.cleanUp()}const r=lastPath?toAbsoluteUrl(lastPath):null;return lastPath=t.path,void await new Promise(async(l,c)=>{try{const c=decodeURIComponent(o.headers.get("X-Title")||""),d=c&&" "!==c?`${c} | ${defaultTitle}`:defaultTitle;await delay(Math.max(0,300-(Date.now()-i))),document.title=d,page.innerHTML=s,window.focus(),document.activeElement&&document.activeElement.blur(),e?r&&gemius.setRef(r):(gemius.setRef(window.location.href),history.replaceState(a,document.title,a.path),history.pushState(t,d,t.path)),gemius.hit(),window.dispatchEvent(window.mkCustomEvent("page-change",{bubbles:!1,cancelable:!1,composed:!1,detail:t})),page.style.removeProperty("opacity"),window.getComputedStyle(page).opacity;const p=document.scrollingElement||document.body;if(t.scrollTop)p.scrollTop=t.scrollTop;else{const e=t.path.indexOf("#");if(-1===e)p.scrollTop=0;else{const o=t.path.substring(e+1),n=document.getElementById(o);if(n){const t=document.querySelector('[property="nav-scrolled-diff"]'),e=document.body.getBoundingClientRect();let o=n.getBoundingClientRect().top-e.top;if(t){const e=parseInt(t.content,10);o=isNaN(e)?o:o-e}p.scrollTo({behavior:"smooth",top:o,left:0})}}}n.removeAttribute("loading");const u=document.querySelector("[autofocus]");u&&u.focus(),l()}catch(t){c(t)}})}if(page.style.removeProperty("opacity"),window.getComputedStyle(page).opacity,302!==o.status&&301!==o.status){if(401!==o.status)throw new Error(o.statusText);window.location.href=window.NShop.login}else window.location.href=o.headers.get("Location")||"/"};window.addEventListener("popstate",t=>{initPage(t.state,!0)},!1),window.addEventListener("dope-goto",t=>{const e=t.detail;initPage("string"==typeof e?{path:e}:e)},!1);const rUnsharp=/#.*$/;document.body.addEventListener("click",t=>{const e=t.target instanceof Element&&t.target.closest("a");!t.ctrlKey&&!t.metaKey&&e instanceof HTMLAnchorElement&&e.origin===window.location.origin&&!e.closest("*[suppress-goto]")&&e.href.replace(rUnsharp,"")!==window.location.href.replace(rUnsharp,"")&&(t.preventDefault(),initPage({path:e.href}))},!0),function(){const t=history.state;t&&t.path?(t.scrollTop&&(document.scrollingElement||document.body).scrollTo(0,t.scrollTop),document.body.focus()):history.replaceState({path:window.location.href,scrollTop:0},document.title||"",window.location.href),window.addEventListener("beforeunload",()=>{const t={path:lastPath,scrollTop:window.pageYOffset};history.replaceState(t,document.title,window.location.href)},!1),"scrollRestoration"in history&&(history.scrollRestoration="manual")}();
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.