PageSourceSearch

https://www.mytpu.org/wp-content/themes/tpu/dist/common.js?ver=e36a5a428c354fabb277

js mytpu.org collected 2026-10-02 03:35:46 UTC 10,021 bytes, 2 lines download raw bytes

1(()=>{var e={416(){var e;(e=jQuery).fn.accordion=function(){var t=e(this),n=t.children("dt"),r=function(e,t,n){var r=e.find("button");n||e.hasClass("inactive")&&!t.is(":visible")?(t.slideDown(),e.addClass("active").removeClass("inactive"),r.attr("aria-expanded","true"),!n&&history.pushState&&history.pushState(null,null,"#"+e.attr("id"))):e.hasClass("active")&&t.is(":visible")&&(t.slideUp(),e.removeClass("active").addClass("inactive"),r.attr("aria-expanded","false"))};n.find("button").on("click",function(t){t.preventDefault();var n=e(this).closest("dt"),a=n.next();r(n,a,!1)});var a=function(){var n=window.location.hash,a=n.replace("#","");if(n){var i=t.children("dt#"+a),o=i.next();if(0===i.length&&(o=t.children("dd#"+a)).length>0&&(i=o.prev("dt")),i.length>0){o=i.next(),r(i,o,!0);var s=i.offset().top-50;e("html, body").animate({scrollTop:s},500)}}};a(),e(window).on("hashchange",function(){a()})}},904(){jQuery.fn.tabs=function(){var e=document.querySelectorAll(".tabs__tab-button"),t=Array.prototype.slice.call(e),n=function(e,t){var n=t.closest(".tabs__navigation").querySelectorAll(".tabs__tab-button"),r=t.closest(".tabs").querySelectorAll('[id^="tab-panel"]');t.focus(),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1");var a=Array.prototype.indexOf.call(n,t);r[Array.prototype.indexOf.call(n,e)].hidden=!0,r[a].hidden=!1};t.forEach(function(e,t){e.addEventListener("click",function(t){t.preventDefault();var r=e.closest(".tabs__navigation").querySelector('[aria-selected="true"]');t.currentTarget!==r&&(console.log("switching tab from",r,"to",t.currentTarget),n(r,t.currentTarget))}),e.addEventListener("keydown",function(t){var r=e.closest(".tabs__navigation").querySelectorAll(".tabs__tab-button"),a=e.closest(".tabs").querySelectorAll('[id^="tab-panel"]'),i=Array.prototype.indexOf.call(r,t.currentTarget),o=37===t.which?i-1:39===t.which?i+1:40===t.which?"down":null;null!==o&&(t.preventDefault(),"down"===o?a[i].focus():r[o]&&n(t.currentTarget,r[o]))})})}},819(){!function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("div");a.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',r.appendChild(a.childNodes[1])}return t&&e.extend(n,t),this.each(function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&t.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var a=e(this).find(t.join(","));(a=(a=a.not("object object")).not(r)).each(function(){var t=e(this);if(!(t.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length)){t.css("height")||t.css("width")||!isNaN(t.attr("height"))&&!isNaN(t.attr("width"))||(t.attr("height",9),t.attr("width",16));var n=("object"===this.tagName.toLowerCase()||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height())/(isNaN(parseInt(t.attr("width"),10))?t.width():parseInt(t.attr("width"),10));if(!t.attr("name")){var a="fitvid"+e.fn.fitVids._count;t.attr("name",a),e.fn.fitVids._count++}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*n+"%"),t.removeAttr("height").removeAttr("width")}})})},e.fn.fitVids._count=0}(window.jQuery||window.Zepto)}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(819);const e=jQuery;var t=n.n(e);function r(e,t){var n=Object.assign({},{desktopEms:"81.25em",wrapperSelector:".site-wrapper",menuOpenWrapperClass:"menu-open",menuButtonSelector:".menu-btn",navType:"offCanvas",dropdownSelector:"",closeOnOutsideClick:!1},t),r=window.matchMedia("only screen and (min-width: ".concat(n.desktopEms,")")),a=document.querySelector(n.wrapperSelector),i=document.querySelector(n.menuButtonSelector),o=n.dropdownSelector?document.querySelector(n.dropdownSelector):e,s=null;function c(e){e.style.height=e.scrollHeight+"px",e.style.overflow="hidden",
1window.setTimeout(function(){e.style.height="0"},1),window.setTimeout(function(){e.setAttribute("data-visible",!1),e.style.height="",e.style.overflow=""},350)}function l(){e.setAttribute("data-visible",!1)}var d={dropdown:c,offCanvas:l}[n.navType]||l;function u(){d(o),a.classList.remove(n.menuOpenWrapperClass),i.setAttribute("aria-expanded",!1)}function p(e){e.style.display="block";var t=e.scrollHeight+"px";e.style.display="",e.setAttribute("data-visible",!0),e.style.height=t,e.style.overflow="hidden",window.setTimeout(function(){e.style.height="",e.style.overflow=""},350)}function v(){e.setAttribute("data-visible",!0)}var f={dropdown:p,offCanvas:v}[n.navType]||v;function h(e){e.stopPropagation(),e.preventDefault();var t=e.currentTarget,n=t.parentElement.nextElementSibling;t.parentElement.parentElement;"false"==n.getAttribute("data-visible")?(p(n),t.setAttribute("aria-expanded",!0)):(c(n),t.setAttribute("aria-expanded",!1))}function m(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e.querySelectorAll('[data-visible="true"]').forEach(function(e){e.setAttribute("data-visible",!1);var t=e.previousElementSibling.querySelector(".nav-expander");t&&t.setAttribute("aria-expanded",!1)}),document.removeEventListener("keydown",b),document.removeEventListener("click",w),t&&s&&(s.focus(),s=null)}function b(e){"Escape"===e.key&&m(!0)}function w(t){e.contains(t.target)||m()}function y(e){if("Enter"===e.key||" "===e.key){e.stopPropagation(),e.preventDefault();var t=e.currentTarget,n=t.parentElement.nextElementSibling;"false"==n.getAttribute("data-visible")?(m(),s=t,document.addEventListener("keydown",b),document.addEventListener("click",w),n.setAttribute("data-visible",!0),t.setAttribute("aria-expanded",!0)):(n.setAttribute("data-visible",!1),t.setAttribute("aria-expanded",!1),document.removeEventListener("keydown",b),document.removeEventListener("click",w))}}function g(){r.matches?m():e.querySelectorAll("li.current-menu-ancestor, li.current-menu-item").forEach(function(e){var t=e.querySelector(".nav-expander"),n=t?t.parentElement.nextElementSibling:null;t&&n&&"false"===n.getAttribute("data-visible")&&(p(n),t.setAttribute("aria-expanded",!0))})}i&&i.addEventListener("click",function(t){t.stopPropagation(),t.preventDefault(),"true"==i.getAttribute("aria-expanded")?u():(f(o),a.classList.add(n.menuOpenWrapperClass),i.setAttribute("aria-expanded",!0),n.closeOnOutsideClick&&a.addEventListener("click",function(t){e.contains(t.target)||u()}),a.addEventListener("keydown",function(e){"Escape"===e.key&&(u(),i.focus())}))}),window.addEventListener("resize",g),g();var E=e.querySelectorAll(".nav-expander");function S(e){e.matches?E.forEach(function(e){e.addEventListener("keydown",y),e.removeEventListener("click",h)}):E.forEach(function(e){e.removeEventListener("keydown",y),e.addEventListener("click",h)})}return S(r),r.addEventListener("change",S),this}n(416),n(904);!function(e){!function(){var e=document.getElementById("global-alert-container");if(e){var n=new URLSearchParams({action:"get_page_alerts",post:e.dataset.post});fetch("".concat(site_data.WP_AJAX,"?").concat(n)).then(function(e){return e.json()}).then(function(n){if(!n.success)throw new Error("Unable to get page alerts data");(n.markup.global_alert||n.markup.in_page_alert)&&(n.markup.global_alert&&(e.innerHTML=n.markup.global_alert),t()(".alert-bar").delay(250).slideDown(),t()(".alert-bar__close").on("click",function(e){e.preventDefault(),t()(this).closest(".alert-bar").find(".container").addClass("fade"),t()(this).closest(".alert-bar").delay(250).slideUp(),document.cookie=t()(this).data("alert-cookie")}))}).catch(function(e){return console.log(e)})}}();var n=document.querySelector("nav.main-nav");n&&r(n,{desktopEms:"72em",wrapperSelector:".main-nav",navType:"offCanvas",closeOnOutsideClick:!0});var a=document.querySelector("nav.side-nav");a&&r(a,{desktopEms:"64em",wrapperSelector:".side-nav",menuButtonSelector:".side-nav-trigger",dropdownSelector:".side-nav-wrapper",navType:"dropdown",closeOnOutsideClick:!0});var i=document.querySelector(".side-resources");i&&r(i,{desktopEms:"64em",wrapperSelector:".side-resources",menuButtonSelector:".side-resources-trigger",dropdownSelector:".side-resources-wrapper",navType:"dropdown",closeOnOutsideClick:!0}),e(".rtecontent, .video").fitVids(),e("dl.accordion").accordion(),e(".tabs").tabs();var o=document.querySelector(".open-search"),s=document.getElementById("search-popup"),c=s.querySelector(".close-search");o.addEventListener("click",function(){s.showModal(),document.body.classList.add("no-scroll"),document.querySelector(".site-wrapper").setAttribute("inert","")}),c.addEventListener("click",function(){s.close()}),s.addEventListener("close",function(){document.body.classList.remove("no-scroll"),document.querySelector(".site-wrapper").removeAttribute("inert"),o.focus()}),document.querySelectorAll(".js-open-dialog").forEach(function(e){var t=e.nextElementSibling,n=t.querySelector(".js-close-dialog");e.addEventListener("click",function(){t.showModal()}),n.addEventListener("click",function(){t.close()})});var l=180*e(".gauge__main").data("val")/100;e(".gauge__pointer").css("transform","rotate("+l+"deg)")}(jQuery)})()})();
2//# sourceMappingURL=common.js.map

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.