PageSourceSearch

https://theresearchpro.com/wp-content/plugins/bricksextras/components/assets/js/offcanvas.min.js

js theresearchpro.com collected 2026-10-04 02:38:33 UTC 7,035 bytes, 1 lines download raw bytes

1function xOffCanvas(e,t){if(window.xProOffCanvas.Instances[e.dataset.xId]==e)return;let a=e.querySelector(".x-offcanvas_inner"),r=e.id,n,o;null!=t.isLooping?(n=e.closest(".brxe-"+t.isLooping))||null==t.isLoopingComponent||(n=e.closest(".brxe-"+t.isLoopingComponent)):n="true"===t.componentScope&&t.parentComponent?e.closest(".brxe-"+t.parentComponent):document,a.querySelectorAll("img[loading=lazy]").forEach(e=>{e.setAttribute("loading","auto")}),setTimeout(()=>{a.classList.add("x-offcanvas_ready")},"300"),"false"!=t.autoAriaControl&&""!==t.clickTrigger&&n.querySelectorAll(t.clickTrigger).forEach(e=>{e.setAttribute("aria-controls",a.id),e.setAttribute("aria-expanded","false")}),"false"!=t.escClose&&document.addEventListener("keydown",function(e){("Escape"===e.key||"Esc"===e.key)&&xCloseOffCanvas(r,o)}),"true"==t.preventScroll&&(e.addEventListener("x_offcanvas:open",()=>{document.documentElement.classList.add("x-offcanvas_prevent-scroll_"+e.id),"undefined"!=typeof lenis&&lenis.stop()}),e.addEventListener("x_offcanvas:close",()=>{document.documentElement.classList.remove("x-offcanvas_prevent-scroll_"+e.id),"undefined"!=typeof lenis&&lenis.start()})),"false"!=t.backdropClose&&e.querySelector(".x-offcanvas_backdrop")&&e.querySelector(".x-offcanvas_backdrop").addEventListener("click",()=>{xCloseOffCanvas(r,o)}),""!==t.clickTrigger&&n.querySelectorAll(t.clickTrigger).forEach(a=>{setTimeout(()=>{a.addEventListener("click",()=>{var s;a.classList.contains("brxe-xlottie")&&("true"===a.getAttribute("aria-expanded")?a.setAttribute("aria-expanded","false"):a.setAttribute("aria-expanded","true")),s=o,"true"==e.querySelector(".x-offcanvas_inner").getAttribute("aria-hidden")?xOpenOffCanvas(r):xCloseOffCanvas(r,s),"true"===t.syncBurgers&&n.querySelectorAll(t.clickTrigger).forEach(e=>{e!==a&&("true"!=a.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded","false"),e.querySelector(".x-hamburger-box")&&e.querySelector(".x-hamburger-box").classList.remove("is-active")):(e.setAttribute("aria-expanded","true"),e.querySelector(".x-hamburger-box")&&e.querySelector(".x-hamburger-box").classList.add("is-active")))}),setTimeout(()=>{"false"!==a.getAttribute("aria-expanded")&&(o=a)},50)})},50)}),"true"!==t.disableHashlink&&a.querySelectorAll("a[href*=\\#]").forEach(e=>{!(t.hashlinkExcludeSelector&&e.closest(t.hashlinkExcludeSelector))&&(e.parentElement.classList.contains("menu-item-has-children")||e.addEventListener("click",e=>{xCloseOffCanvas(r,o)}))}),e.addEventListener("x_offcanvas:open",()=>{""!==t.clickTrigger&&n.querySelectorAll(t.clickTrigger).forEach(e=>{e&&e.hasAttribute("aria-expanded")&&"false"===e.getAttribute("aria-expanded")&&e.setAttribute("aria-expanded","true")})}),e.addEventListener("x_offcanvas:close",()=>{""!==t.clickTrigger&&n.querySelectorAll(t.clickTrigger).forEach(e=>{e&&e.hasAttribute("aria-expanded")&&"true"===e.getAttribute("aria-expanded")&&e.setAttribute("aria-expanded","false")})}),window.xProOffCanvas.Instances[e.dataset.xId]=e}function xCloseOffCanvas(e,t=null){!document.getElementById(e).querySelector(".x-offcanvas_inner").hasAttribute("inert")&&(document.getElementById(e).querySelector(".x-offcanvas_inner").setAttribute("inert",""),document.getElementById(e).querySelector(".x-offcanvas_inner").setAttribute("aria-hidden","true"),document.getElementById(e).dispatchEvent(new Event("x_offcanvas:close")),xOffCanvasCloseBurger(e),xOffCanvasCloseOther(e),xOffCanvasConfig(e).clickTrigger&&document.querySelectorAll(xOffCanvasConfig(e).clickTrigger).forEach(e=>{e.classList.contains("brxe-xlottie")&&"true"===e.getAttribute("aria-expanded")&&e.click()}),document.getElementById(e).querySelectorAll("iframe:not(media-provider iframe)").forEach(e=>{e.src=e.src}),document.getElementById(e).querySelectorAll("media-player").forEach(e=>{e.pause()}),document.getElementById(e).querySelectorAll("video:not(media-provider video)").forEach(e=>{e.pause()}),document.getElementById(e).querySelectorAll("form").forEach(e=>{e.reset()}),null!=t&&xOffCanvasConfig(e).returnFocus&&t.focus())}function xOpenOffCanvas(e){document.getElementById(e).querySelector(".x-offcanvas_inner").removeAttribute("inert"),document.getElementById(e).querySelector(".x-offcanvas_inner").setAttribute("aria-hidden","false"),xOffCanvasMoveFocus(e),document.getElementById(e).dispatchEvent(new Event("x_offcanvas:open"))}function xToggleOffCanvas(e){document.getElementById(e).querySelector(".x-offcanvas_inner").hasAttribute("inert")?xOpenOffCanvas(e):xCloseOffCanvas(e)}function xOffCanvasCloseBurger(e){xOffCanvasConfig(e).clickTrigger&&document.querySelectorAll(xOffCanvasConfig(e).clickTrigger).forEach(e
1=>{e.classList.contains("brxe-xburgertrigger")&&setTimeout(()=>{e.setAttribute("aria-expanded","false"),e.querySelector(".x-hamburger-box")&&e.querySelector(".x-hamburger-box").classList.remove("is-active")},5)})}function xOffCanvasCloseOther(e){null!=xOffCanvasConfig(e).secondClose&&document.querySelector(xOffCanvasConfig(e).secondClose)&&(document.querySelector(xOffCanvasConfig(e).secondClose).querySelector(".x-offcanvas_inner").setAttribute("inert",""),document.querySelector(xOffCanvasConfig(e).secondClose).querySelector(".x-offcanvas_inner").setAttribute("aria-hidden","true"))}function xOffCanvasMoveFocus(e){setTimeout(function(){null==xOffCanvasConfig(e).focus?document.getElementById(e).querySelector(".x-offcanvas_inner").focus():document.getElementById(e).querySelector(".x-offcanvas_inner").querySelector(xOffCanvasConfig(e).focus).focus()},0)}function xOffCanvasConfig(e,t={}){let a=document.getElementById(e),r=a.getAttribute("data-x-offcanvas"),n=r?JSON.parse(r):{};return n}document.addEventListener("DOMContentLoaded",function(e){if(!bricksIsFrontend||document.querySelector("body > .brx-body.iframe"))return;let t=function(e){let t=e.querySelectorAll(".x-offcanvas");t.forEach(e=>{""===e.id&&e.setAttribute("id","x-offcanvas_"+e.getAttribute("data-x-id")),xOffCanvas(e,xOffCanvasConfig(e.id)),e.addEventListener("x_offcanvas:open",()=>{if("false"!=xOffCanvasConfig(e.id).trapFocus){let t=e.querySelectorAll("a[href], button, input, textarea, select, details, [tabindex]");t.length?(t[t.length-1].addEventListener("keydown",e=>{e.shiftKey||"Tab"!==e.key||(e.preventDefault(),t[0].focus())}),t[0].addEventListener("keydown",e=>{e.shiftKey&&"Tab"===e.key&&(e.preventDefault(),t[t.length-1].focus())})):e.querySelector(".x-offcanvas_inner").addEventListener("keydown",t=>{"Tab"===t.key&&xOffCanvasConfig(e.id).returnFocus&&e.querySelector(".x-offcanvas_backdrop")&&(t.preventDefault(),e.querySelector(".x-offcanvas_backdrop").click())})}})})};t(document),xExtrasRegisterAJAXHandler("doExtrasOffCanvas",!0),window.doExtrasOffCanvas=t,window.xOpenOffCanvas=xOpenOffCanvas,window.xCloseOffCanvas=xCloseOffCanvas,window.xToggleOffCanvas=xToggleOffCanvas,"undefined"!=typeof bricksextras&&(bricksextras.offcanvas={close(e){let t=e?.target||!1;t&&xCloseOffCanvas(t.id)},open(e){let t=e?.target||!1;t&&xOpenOffCanvas(t.id)},toggle(e){let t=e?.target||!1;t&&xToggleOffCanvas(t.id)}})});

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.