PageSourceSearch

https://vancouverweekly.com/wp-content/plugins/newspack-plugin/dist/newspack-ui.js?ver=6.42.2

js vancouverweekly.com collected 2026-10-02 12:16:15 UTC 8,493 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e,t={4931:(e,t,n)=>{const o=e=>{"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())};o(function(){[...document.querySelectorAll(".newspack-ui__segmented-control")].forEach(e=>function(e){const t=e.querySelector(".newspack-ui__segmented-control__content");let n=[];t&&(n=[...t.children]);const o=e.querySelector(".newspack-ui__segmented-control__tabs"),r=e.querySelector(".newspack-ui__segmented-control > select");if(!o&&!r&&n.length)return void n[0].classList.add("selected");const c=o?[...o.children]:[r],a=o=>{if(0===n.length)return;t._removedContents&&(t._removedContents.forEach(({content:e,nextSibling:n})=>{n?t.insertBefore(e,n):t.appendChild(e)}),delete t._removedContents);const r=n[o],c=[];n.forEach((e,t)=>{t!==o&&(c.push({content:e,nextSibling:e.nextSibling}),e.remove())}),c.length>0&&(t._removedContents=c),r.classList.add("selected");const a=r.querySelectorAll('input[type="radio"]'),s=[...a].find(e=>e.checked);a.length&&!s&&a[0].click(),e.dispatchEvent(new CustomEvent("content-selected",{detail:r}))},s=o&&"tablist"===o.getAttribute("role"),i=e=>{s&&c.forEach((t,n)=>{const o=n===e;t.setAttribute("aria-selected",o?"true":"false"),t.setAttribute("tabindex",o?"0":"-1")})};c.forEach((e,t)=>{if(0!==n.length){if("SELECT"===e.tagName)return e.classList.add("selected"),a(parseInt(e.value)),void e.addEventListener("change",function(e){a(parseInt(e.target.value))});e.classList.contains("selected")&&(a(t),i(t)),e.addEventListener("click",function(){c.forEach(e=>e.classList.remove("selected")),this.classList.add("selected"),a(t),i(t)}),s&&e.addEventListener("keydown",function(e){const n=c.length-1;let o=-1;"ArrowRight"===e.key?o=t===n?0:t+1:"ArrowLeft"===e.key?o=0===t?n:t-1:"Home"===e.key?o=0:"End"===e.key&&(o=n),o<0||(e.preventDefault(),c[o].focus(),c[o].click())})}})}(e))});var r=n(1622);function c(e,t){window.newspackRAS.push(n=>{"open"===t?(e._overlayId&&n.overlays.remove(e._overlayId),e._overlayId=n.overlays.add()):"closed"===t&&e._overlayId&&(n.overlays.remove(e._overlayId),e._overlayId=null)})}function a(e,t=!0){e.classList.add("active"),"false"!==e.dataset.autohide&&setTimeout(()=>{s(e,t)},8e3)}function s(e,t=!0){e.classList.remove("active"),t&&setTimeout(()=>{e.remove()},250),e.dataset.noticeId&&wp.ajax.send("newspack_ui_notice_dismissed",{data:{id:e.dataset.noticeId,nonce:e.dataset.nonce}})}window.newspackRAS=window.newspackRAS||[],(0,r.Qc)(function(){[...document.querySelectorAll(".newspack-ui__modal-container")].forEach(e=>{const t=e.querySelector(".newspack-ui__modal__content"),n=[...e.querySelectorAll(".newspack-ui__modal__close")];!function(e){"open"===e.dataset.state&&c(e,"open"),new MutationObserver(t=>{t.forEach(t=>{if("attributes"===t.type&&"data-state"===t.attributeName){const t=e.dataset.state;c(e,t),"closed"===t&&e.dispatchEvent(new CustomEvent("closeModal"))}})}).observe(e,{attributes:!0,attributeFilter:["data-state"]})}(e),n.forEach(t=>{t.addEventListener("click",t=>{t.preventDefault(),e.setAttribute("data-state","closed")})}),[...e.querySelectorAll("[data-fetch]")].forEach(n=>{n.addEventListener("click",o=>{const r=JSON.parse(n.getAttribute("data-fetch"));if(r.url&&r.nonce){const n=t.querySelector(".newspack-ui__notice--error");n&&n.parentElement.removeChild(n),o.preventDefault(),o.target.setAttribute("disabled",!0),fetch(r.url,{method:r.method,body:JSON.stringify(r.body||{}),headers:{"X-WP-Nonce":r.nonce}}).then(e=>{const t=e.json();if(!e.ok||t.error)throw new Error(t.message||t.error||"An error occurred. Please try again.");return t}).then(()=>{if(r.next){const t=document.getElementById(`newspack-my-account__${r.next}`);t&&(e.setAttribute("data-state","closed"),t.setAttribute("data-state","open"))}}).catch(e=>{const n=document.createElement("div");n.textContent=e||"An error occurred.",n.classList.add("newspack-ui__notice","newspack-ui__notice--error"),t.insertBefore(n,t.firstChild)}).finally(()=>{o.target.removeAttribute("disabled"),o.target.classList.remove("newspack-ui--loading"),o.target.closest("form, div").classList.remove("newsp
1ack-ui--loading")})}})})})}),o(function(){[...document.querySelectorAll(".newspack-ui__snackbar__item")].forEach(e=>{"true"===e.dataset.activeOnLoad&&a(e),[...e.querySelectorAll("a, button")].forEach(t=>{t.addEventListener("click",()=>{s(e)})})})});const i={openNotice:a,closeNotice:s,createNotice:function(e,t="success"){let n=document.querySelector(".newspack-ui__snackbar--top-right");if(!n){let e=document.querySelector(".newspack-ui");e||(e=document.createElement("div"),e.classList.add("newspack-ui"),document.body.appendChild(e)),n=document.createElement("div"),n.classList.add("newspack-ui__snackbar","newspack-ui__snackbar--top-right"),e.appendChild(n)}const o=document.createElement("div");o.classList.add("newspack-ui__snackbar__item",`newspack-ui__snackbar__item--${t}`),o.setAttribute("data-autohide","true");const r=document.createElement("div");r.classList.add("newspack-ui__snackbar__content"),r.textContent=e,o.appendChild(r),n.appendChild(o),a(o,!0)}};(0,r.Qc)(function(){[...document.querySelectorAll(".newspack-ui__dropdown")].forEach(e=>{const t=e.querySelector(".newspack-ui__dropdown__toggle"),n=e.querySelector(".newspack-ui__dropdown__content");t&&n&&t.addEventListener("click",t=>{e.classList.toggle("active");const o=n.getBoundingClientRect();o.right+o.width>window.innerWidth?(n.style.left="auto",n.style.right="0"):(n.style.removeProperty("left"),n.style.removeProperty("right"),0===n.style.length&&n.removeAttribute("style")),o.bottom+o.height>window.innerHeight?(n.style.top="auto",n.style.bottom=`${t.currentTarget.clientHeight+8}px`):(n.style.removeProperty("top"),n.style.removeProperty("bottom"),0===n.style.length&&n.removeAttribute("style"))}),document.addEventListener("keydown",t=>{"Escape"===t.key&&e.classList.remove("active")}),document.addEventListener("click",t=>{!e.contains(t.target)&&e.classList.contains("active")&&e.classList.remove("active")})})}),(0,r.Qc)(function(){[...document.querySelectorAll(".newspack-ui__accordion")].forEach(e=>{const t=[...e.querySelectorAll('li > input[type="radio"]')],n=()=>{t.forEach(e=>{const t=e.closest("li");e.checked?t.classList.add("active"):t.classList.remove("active")})};t.forEach(e=>{e.addEventListener("change",n)}),e.classList.contains("newspack-ui__accordion--open")&&t[0].click()})}),window.newspackUI=window.newspackUI||{},window.newspackUI.notices=i}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var c=n[e]={id:e,loaded:!1,exports:{}};return t[e](c,c.exports,o),c.loaded=!0,c.exports}o.m=t,e=[],o.O=(t,n,r,c)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,r,c]=e[l],s=!0,i=0;i<n.length;i++)(!1&c||a>=c)&&Object.keys(o.O).every(e=>o.O[e](n[i]))?n.splice(i--,1):(s=!1,c<a&&(a=c));if(s){e.splice(l--,1);var d=r();void 0!==d&&(t=d)}}return t}c=c||0;for(var l=e.length;l>0&&e[l-1][2]>c;l--)e[l]=e[l-1];e[l]=[n,r,c]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=5376,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={5376:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,c,[a,s,i]=n,d=0;if(a.some(t=>0!==e[t])){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(i)var l=i(o)}for(t&&t(n);d<a.length;d++)c=a[d],o.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return o.O(l)},n=globalThis.webpackChunknewspack=globalThis.webpackChunknewspack||[];
1n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[4223],()=>o(4931));r=o.O(r)})();

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.