PageSourceSearch

https://andylifemap.com/assets/vendors/pvs-navigation.min.js?v=1ae294f7f4

js andylifemap.com collected 2026-10-04 08:03:21 UTC 10,239 bytes, 61 lines download raw bytes

1(function(v){typeof define=="function"&&define.amd?define(v):v()})(function(){"use strict";const v=new Map;function M(r,e,t){return v.set(`${r}:${e}`,t)}function w(r,e){return v.get(`${r}:${e}`)}function q(r){return r.replace(/#.*/,"")}function P(r){const e=q(r);return w("ajax",e)}async function x(r,e=!0,t={}){const o=q(r);if(e){const c=w("ajax",o);if(c)return c}const n=await fetch(o,t);if(!n.ok)throw n.status;const i=await n.text();return M("ajax",o,i),i}let p=!1;const $=new ResizeObserver(()=>{p?.style&&(p.style.overflow="clip",requestAnimationFrame(()=>{p?.style&&(p.style.overflow="")}))});function R(r,e){let t=document.querySelector(".pvs-navigation-view-transition-styles");if(!t){const o="linear-gradient(180deg, transparent 0, transparent 2px, #000 2.1px)",n=`linear-gradient(270deg, transparent calc(-100% + calc(200% * var(--pvs-navigation-view-transition-offset))), #000 calc(200% * var(--pvs-navigation-view-transition-offset))), ${o}`,i=`linear-gradient(270deg, #000 calc(-100% + calc(200% * var(--pvs-navigation-view-transition-offset))), transparent calc(200% * var(--pvs-navigation-view-transition-offset))), ${o}`;t=document.createElement("style"),t.classList.add("pvs-navigation-view-transition-styles"),t.textContent=`
2@media (prefers-reduced-motion) {
3	::view-transition-group(*),
4	::view-transition-old(*),
5	::view-transition-new(*) {
6		animation: none !important;
7	}
8}
9
10/* Disable root animation */
11::view-transition-image-pair(root) {
12	isolation: auto;
13}
14::view-transition-old(root),
15::view-transition-new(root) {
16	animation: none;
17	mix-blend-mode: normal;
18	backface-visibility: hidden;
19	display: block;
20}
21
22@property --pvs-navigation-view-transition-offset {
23	syntax: '<number>';
24	initial-value: 0;
25	inherits: false;
26}
27
28@keyframes pvs-navigation-view-transition {
29	0% {
30		--pvs-navigation-view-transition-offset: 0;
31	}
32	100% {
33		--pvs-navigation-view-transition-offset: 1;
34	}
35}
36
37${e} {
38	view-transition-name: content;
39}
40
41::view-transition-old(content),
42::view-transition-new(content) {
43	animation-name: pvs-navigation-view-transition;
44	animation-duration: ${r}s;
45	animation-delay: 0s;
46	animation-timing-function: cubic-bezier(0.35, 0, 0.4, 1);
47	animation-fill-mode: both;
48
49	mask-composite: source-in;
50	-webkit-mask-composite: source-in;
51}
52
53::view-transition-old(content) {
54	mask-image: ${n};
55	-webkit-mask-image: ${n};
56}
57
58::view-transition-new(content) {
59	mask-image: ${i};
60	-webkit-mask-image: ${i};
61}`,document.head.appendChild(t)}return t}function H(r,e){const t=e.indexOf("#"),o=t!==-1?e.substring(t+1):"";if(o){const n=document.getElementById(o);n&&n.scrollIntoView({behavior:"smooth"})}else r!==!1&&window.scroll({top:r,behavior:"smooth"})}async function D(r,e,t,o,n){if(!(r&&document.startViewTransition)){n(),H(t,o);return}const i=R(r,e);p=document.querySelector(e),await document.startViewTransition(()=>{n(),H(t,o),p&&$.observe(p)}).finished,p&&($.unobserve(p),p=!1),i.remove()}function j(r){return new DOMParser().parseFromString(r,"text/html")}function y(r){const e=document.createElement("script");Array.from(r.attributes).forEach(t=>e.setAttribute(t.name,t.value)),r.innerHTML&&(e.innerHTML=r.innerHTML),r.replaceWith(e)}let E;function U(){return E||(E=new MutationObserver(r=>{r.forEach(e=>{if(e.type==="childList"&&e.addedNodes.length)for(let t=e.addedNodes.length-1;t>=0;t--){const o=e.addedNodes[t];if(o.nodeType===Node.ELEMENT_NODE&&o.nodeName==="SPAN"&&o.parentElement===document.body&&o.attributes.length===0&&/^\d+(?:\s+\S+)*$/.test(o.textContent.trim())){o.remove();break}}})}),E.observe(document.body,{childList:!0,subtree:!1}),E)}function z(){const r=document.head.getElementsByTagName("style");for(const e of r)if(e.textContent.trim().startsWith(".gh-portal-account-header{display:flex;flex-direction:column;align-items:center;margin:0 0 32px")){e.remove();break}}function K(r){const e=r.querySelectorAll("script");if(e&&e.forEach(t=>{y(t)}),r.querySelector("[data-ghost-search]")){document.querySelectorAll("#sodo-search-root").forEach(o=>o.remove());const t=document.querySelector('script[src*="sodo-search"]');t&&y(t)}if(r.querySelector(".kg-video-card, .kg-audio-card, .kg-toggle-card, .kg-gallery-image")){const t=document.querySelector('script[src*="cards"]');t&&y(t)}if(r.querySelector('[data-lexical-signup-form], [data-members-form], [data-portal], [href*="#/portal"]')){const t=document.querySelector('script[src*="ghost/portal"]');t&&(document.querySelectorAll("#ghost-portal-root").forEach(o=>o.remove()),z(),y(t))}if(r.querySelector("[data-ghost-comment-count]")){const t=document.querySelector('script[src*="comment-counts"]');t&&(U(),y(t))}}class V{constructor(){this.selectors={scripts:'script:not([type="application/ld+json"])',jsonLD:'script[type="application/ld+json"]',styles:'link[rel="stylesheet"]',inlineStyles:"style",meta:"meta"}}normalizeUrl(e){if(!e)return e;const t=new URL(e,"https://pvs.url.placeholder");return t.searchParams.delete("v"),t.toString().replace("https://pvs.url.placeholder","")}compareElements(e,t){const o=e?.src,n=t?.src;if(o&&n)return this.normalizeUrl(o)===this.normalizeUrl(n);const i=e?.href,c=t?.href;if(i&&c)return this.normalizeUrl(i)===this.normalizeUrl(c);const d=e?.innerHTML?.trim(),f=t?.innerHTML?.trim();return d&&f&&d===f}async getOriginalSource(e){return j(w("ajax",e)||document.documentElement.outerHTML)}
61isOriginalResource(e,t,o){const n=t.querySelectorAll(o);return Array.from(n).some(i=>this.compareElements(i,e))}getElements(e,t,o="head"){return Array.from(e[o].querySelectorAll(t))}async addElement(e,t,o="head"){const n=document.createElement(e.tagName);return Array.from(e.attributes).forEach(i=>{n.setAttribute(i.name,i.value)}),t==="script"&&e.src?(e.async&&(n.async=!0),e.defer&&(n.defer=!0),new Promise((i,c)=>{n.onload=i,n.onerror=c,n.src=e.src,document[o].appendChild(n)})):(e.innerHTML&&(n.innerHTML=e.innerHTML),document[o].appendChild(n),Promise.resolve())}async handleMetaTags(e,t,o){const n={NAME:"name",PROPERTY:"property",HTTP_EQUIV:"http-equiv"},i=a=>{for(const l of Object.values(n)){const m=a.getAttribute(l);if(m)return`${l}:${m}`}return null},c=a=>{const l=new Map;return a.forEach(m=>{const h=i(m);h&&l.set(h,m)}),l},d=this.getElements(e,this.selectors.meta),f=this.getElements(t,this.selectors.meta),u=c(d),s=c(f);d.forEach(a=>{const l=i(a);l&&!s.has(l)&&this.isOriginalResource(a,o,this.selectors.meta)&&a.remove()}),s.forEach((a,l)=>{const m=u.get(l);if(m){const h=a.getAttribute("content");h!==m.getAttribute("content")&&m.setAttribute("content",h)}else{const h=document.createElement("meta");Array.from(a.attributes).forEach(g=>{h.setAttribute(g.name,g.value)}),e.head.appendChild(h)}})}async handleJsonLD(e,t){const o=this.getElements(e,this.selectors.jsonLD),n=this.getElements(t,this.selectors.jsonLD);o.forEach(i=>i.remove());for(const i of n)await this.addElement(i,"script")}async handleStyles(e,t,o,n="head"){const i=this.getElements(e,this.selectors.styles,n),c=this.getElements(t,this.selectors.styles,n);i.forEach(u=>{const s=c.some(l=>this.compareElements(u,l)),a=this.isOriginalResource(u,o,this.selectors.styles);!s&&a&&u.remove()});for(const u of c)i.some(s=>this.compareElements(u,s))||await this.addElement(u,"style",n);const d=this.getElements(e,this.selectors.inlineStyles,n),f=this.getElements(t,this.selectors.inlineStyles,n);d.forEach(u=>{const s=f.some(l=>this.compareElements(u,l)),a=this.isOriginalResource(u,o,this.selectors.inlineStyles);!s&&a&&u.remove()});for(const u of f)d.some(s=>this.compareElements(u,s))||await this.addElement(u,"inlineStyle",n)}async handleScripts(e,t,o="head"){const n=this.getElements(e,this.selectors.scripts,o),i=this.getElements(t,this.selectors.scripts,o);for(const c of i)n.some(d=>this.compareElements(c,d))||await this.addElement(c,"script",o)}async updateResources(e,t,o){try{const n=await this.getOriginalSource(o),i=["head","body"],c=[this.handleMetaTags(e,t,n),this.handleJsonLD(e,t),...i.flatMap(d=>[this.handleStyles(e,t,n,d),this.handleScripts(e,t,d)])];return await Promise.all(c),!0}catch(n){return console.error("Error updating resources:",n),!1}}}const S=window.pvs,{on:k,trigger:b}=window.ivent;function C(){return location.href}function F(r){M("page-scroll",r,document.documentElement.scrollTop||document.body.scrollTop)}function I(r){return w("page-scroll",r)||0}const _={linksSelector:'a:not(.no-ajax, [target="_blank"], [href^="#"], [href^="mailto"], [href^="javascript:"], [download], [href*="#/portal"])',popstateSkipHref:["#/portal"],contentSelector:"main.content",transitionDuration:.6};let T=!1,A=!1;const B=(r=!0)=>{T=r},J=(r={})=>{const e={..._,...r},{linksSelector:t,popstateSkipHref:o,contentSelector:n,transitionDuration:i}=e;let c=!1,d=C();function f(s,a,l=0){const m=j(a),h=m.title,g=m.querySelector(n),W=m.body.getAttribute("class");if(!g){window.location=s;return}const Q=new V,Y=d;d=s;const L=document.querySelector(n);typeof history<"u"&&c&&history.pushState({page:s},h,s);const N={href:s,page:m};b(document,"pvs.navigation.content-render",{data:N}),document.title=h,D(i,n,l,s,async()=>{document.body.setAttribute("class",W),L.innerHTML=g.innerHTML,L.setAttribute("class",g.getAttribute("class")),document.body.style.overflow="",document.querySelectorAll(".nav-link").forEach(O=>{O.classList.toggle("nav-link-current",O.href===s)}),await Q.updateResources(document,m,Y),K(L),b(document,"pvs.navigation.content-rendered",{data:N})})}function u(s,a=0){b(document,"pvs.navigation.loading"),F(d);const l=!P(s);l&&window.pvs?.pageLoader?.start(),x(s,!0,{redirect:"manual"}).then(m=>{f(s,m,a),l&&window.pvs?.pageLoader?.finish(),b(document,"pvs.navigation.loaded")}).catch(()=>{window.location=s})}k(document,"ready",()=>{x(d,!0).then(()=>{A=!0})}),k(document,"click",t,s=>{if(T||!A)return;const a=s.delegateTarget,{href:l}=a;s.which>1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||window.location.protocol!==a.protocol||window.location.hostname!==a.hostname||window.location.protocol!=="file:"&&(s.defaultPrevented||a.closest(".swiper-touching")||d.split("#")[0]!==l.split("#")[0]&&(s.preventDefault(),c=!0,u(l)))}),k(window,"popstate",()=>{if(T||!A)return;const s=C();d.split("#")[0]!==s.split("#")[0]&&(o.some(a=>s.includes(a))||(c=!1,u(s,I(s))))})};S&&(S.disableNavigation=B,S.initNavigation=J)});

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.