PageSourceSearch

https://www.symplectic.co.uk/wp-content/plugins/ui-kit-navigation//dist/js/scroll-lock.js?ver=2.1.5

js symplectic.co.uk collected 2026-10-02 03:24:17 UTC 12,927 bytes, 1 lines download raw bytes

vendor: 7,793 bytes, line 1
1var e={885:function(e){var t;t=function(){return function(e){var t={};function l(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,l),o.l=!0,o.exports}return l.m=e,l.c=t,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)l.d(r,o,function(t){return e[t]}.bind(null,o));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=0)}([function(e,t,l){l.r(t);var r=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var l=0;l<e.length&&!0!==t(e[l],l,e.length);l++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,function(e){return t.push(e)}),t},u=function(e,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if((!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;return-1!==i(l.querySelectorAll(t)).indexOf(e)},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,l=e.scrollHeight;return t+e.offsetHeight>=l}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,l=e.scrollWidth;return t+e.offsetWidth>=l}};function h(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}l.d(t,"disablePageScroll",function(){return S}),l.d(t,"enablePageScroll",function(){return y}),l.d(t,"getScrollState",function(){return k}),l.d(t,"clearQueueScrollLocks",function(){return w}),l.d(t,"getTargetScrollBarWidth",function(){return A}),l.d(t,"getCurrentTargetScrollBarWidth",function(){return G}),l.d(t,"getPageScrollBarWidth",function(){return T}),l.d(t,"getCurrentPageScrollBarWidth",function(){return x}),l.d(t,"addScrollableTarget",function(){return W}),l.d(t,"removeScrollableTarget",function(){return F}),l.d(t,"addScrollableSelector",function(){return P}),l.d(t,"removeScrollableSelector",function(){return L}),l.d(t,"addLockableTarget",function(){return O}),l.d(t,"addLockableSelector",function(){return Y}),l.d(t,"setFillGapMethod",function(){return E}),l.d(t,"addFillGapTarget",function(){return j}),l.d(t,"removeFillGapTarget",function(){return q}),l.d(t,"addFillGapSelector",function(){return M}),l.d(t,"removeFillGapSelector",function(){return N}),l.d(t,"refillGaps",function(){return B});var v=["padding","margin","width","max-width","none"],m={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:v[0],startTouchY:0,startTouchX:0},S=function(e){m.queue<=0&&(m.scroll=!1,C(),Q()),W(e),m.queue++},y=function(e){m.queue>0&&m.queue--,m.queue<=0&&(m.scroll=!0,K(),D()),F(e)},k=function(){return m.scroll},w=function(){m.queue=0},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var l=e.style.overflowY;t?k()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var r=G(e);return e.style.overflowY=l,r}return 0},G=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var l=e.style.borderLeftWidth,r=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=l,e.style.borderRightWidth=r,n}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return A(document.body,e)},x=function(){return G(document.body)},W=function(e){e&&r(e).map(function(e){n(e,function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))})})},F=function(e){e&&r(e).map(function(e){n(e,function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))})})},P=function(e){e&&r(e).map(function(e){m.scrollableSelectors.push(e)})},L=function(e){e&&r(e).map(function(e){m.scrollableSelectors=m.scrollableSelectors.filter(function(t){return t!==e})})},O=function(e){e&&(r(e).map(function(e){n(e,function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))})}),k()||C())},Y=function(e){e&&(r(e).map(function(e){m.lockableSelectors.push(e)}),k()||C(),M(e))},E=function(e){if(e)if(-1!==v.indexOf(e))m.fillGapMethod=e,B();else{var t=v.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},j=function(e){e&&r(e).map(function(e){n(e,function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),m.scroll||I(e)):c('"'.concat(e,'" is not a Element.'))})})},q=function(e){e&&r(e).map(function(e){n(e,function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),m.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))})})},M=function(e){e&&r(e).map(function(e){-1===m.fillGapSelectors.indexOf(e)&&(m.fillGapSelectors.push(e),m.scroll||H(e))})},N=function(e){e&&r(e).map(function(e){m.fillGapSelectors=m.fillGapSelectors.filter(function(t){return t!==e}),m.scroll||z(e)})},B=function(){m.scroll||Q()},C=function(){var e=a(m.lockableSelectors);R(e)},K=function(){var e=a(m.lockableSelectors);U(e)},R=function(e){var t=document.querySelectorAll(e);n(t,function(e){_(e)})},U=function(e){var t=document.querySelectorAll(e);n(t,function(e){X(e)})},_=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},X=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},Q=function(){m.fillGapSelectors.map(function(e){H(e)})},D=function(){m.fillGapSelectors.map(function(e){z(e)})},H=function(e){var t=document.querySelectorAll(e),l=-1!==m.lockableSelectors.indexOf(e);n(t,function(e){I(e,l)})},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var l;if(""===e.getAttribute("data-scroll-lock-lockable")||t)l=A(e,!0);else{var r=u(e,a(m.lockableSelectors));l=A(r,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&J(e);var n=window.getComputedStyle(e);
1if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",m.fillGapMethod),"margin"===m.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+l,"px")}else if("width"===m.fillGapMethod)e.style.width="calc(100% - ".concat(l,"px)");else if("max-width"===m.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(l,"px)");else if("padding"===m.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+l,"px")}}},z=function(e){var t=document.querySelectorAll(e);n(t,function(e){J(e)})},J=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!==typeof window&&window.addEventListener("resize",function(e){B()}),"undefined"!==typeof document&&(document.addEventListener("touchstart",function(e){m.scroll||(m.startTouchY=e.touches[0].clientY,m.startTouchX=e.touches[0].clientX)}),document.addEventListener("touchmove",function(e){if(!m.scroll){var t=m.startTouchY,l=m.startTouchX,r=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(m.scrollableSelectors),c={up:t<r,down:t>r,left:l<o,right:l>o},i={up:t+3<r,down:t-3>r,left:l+3<o,right:l-3>o};!function t(l){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l){var o=u(l,n,!1);if(function(e){return d(e,'input[type="range"]')}(l))return!1;if(r||function(e){return d(e,'textarea, [contenteditable="true"]')}(l)&&u(l,n)||d(l,n)){var a=!1;g(l)&&b(l)?(c.up&&f(l)||c.down&&p(l))&&(a=!0):f(l)&&p(l)?(c.left&&g(l)||c.right&&b(l))&&(a=!0):(i.up&&f(l)||i.down&&p(l)||i.left&&g(l)||i.right&&b(l))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}},{passive:!1}),document.addEventListener("touchend",function(e){m.scroll||(m.startTouchY=0,m.startTouchX=0)}));var V={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),S(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),y(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),k()?S():y(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),k()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),x()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),M(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),j(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),w()}},Z=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{},r=Object.keys(l);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(l).filter(function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),r.forEach(function(t){h(e,t,l[t])})}return e}({disablePageScroll:S,enablePageScroll:y,getScrollState:k,clearQueueScrollLocks:w,getTargetScrollBarWidth:A,getCurrentTargetScrollBarWidth:G,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:x,addScrollableSelector:P,removeScrollableSelector:L,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:Y,addLockableTarget:O,addFillGapSelector:M,removeFillGapSelector:N,addFillGapTarget:j,removeFillGapTarget:q,setFillGapMethod:E,refillGaps:B,_state:m},V);t.default=Z}]).default},e.exports=t()}},t={};function l(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,l),n.exports}l.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};l.d(r,{I:()=>o.enablePageScroll,l:()=>o.disablePageScroll});var o=l(885);const n=r.l,c=r.I;export{n as disablePageScroll,c as enablePageScroll};

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.