1import{e as T,f as m,h as _,w as k,g as P,aI as A,q as B,$ as x,al as p}from"./OLfd6UNE.js";const F={name:"SfOverlay",props:{transition:{type:String,default:"sf-fade"},visible:{type:Boolean,default:!1}},emits:["click"]};function E(t,e,o,i,n,s){return m(),_(x,{name:o.transition},{default:k(()=>[o.visible?(m(),P("div",A({key:0,ref:"overlay",class:["sf-overlay"]},t.$attrs,{onClick:e[0]||(e[0]=S=>t.$emit("click",S))}),null,16)):B("",!0)]),_:1},8,["name"])}const V=Object.assign(T(F,[["render",E]]),{__name:"SfOverlay"});function H(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}else return Array.from(t)}var v=!1;if(typeof window<"u"){var g={get passive(){v=!0}};window.addEventListener("testPassive",null,g),window.removeEventListener("testPassive",null,g)}var u=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),a=[],f=!1,y=-1,d=void 0,r=void 0,l=void 0,h=function(e){return a.some(function(o){return!!(o.options.allowTouchMove&&o.options.allowTouchMove(e))})},c=function(e){var o=e||window.event;return h(o.target)||o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)},L=function(e){if(l===void 0){var o=!1,i=window.innerWidth-document.documentElement.clientWidth;if(o&&i>0){var n=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);l=document.body.style.paddingRight,document.body.style.paddingRight=n+i+"px"}}d===void 0&&(d=document.body.style.overflow,document.body.style.overflow="hidden")},D=function(){l!==void 0&&(document.body.style.paddingRight=l,l=void 0),d!==void 0&&(document.body.style.overflow=d,d=void 0)},I=function(){return window.requestAnimationFrame(function(){if(r===void 0){r={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,o=e.scrollY,i=e.scrollX,n=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-o,document.body.style.left=-i,setTimeout(function(){return window.requestAnimationFrame(function(){var s=n-window.innerHeight;s&&o>=n&&(document.body.style.top=-(o+s))})},300)}})},O=function(){if(r!==void 0){var e=-parseInt(document.body.style.top,10),o=-parseInt(document.body.style.left,10);document.body.style.position=r.position,document.body.style.top=r.top,document.body.style.left=r.left,window.scrollTo(o,e),r=void 0}},M=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},$=function(e,o){var i=e.targetTouches[0].clientY-y;return h(e.target)?!1:o&&o.scrollTop===0&&i>0||M(o)&&i<0?c(e):(e.stopPropagation(),!0)},W=function(e,o){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!a.some(function(n){return n.targetElement===e})){var i={targetElement:e,options:{}};a=[].concat(H(a),[i]),u?I():L(),u&&(e.ontouchstart=function(n){n.targetTouches.length===1&&(y=n.targetTouches[0].clientY)},e.ontouchmove=function(n){n.targetTouches.length===1&&$(n,e)},f||(document.addEventListener("touchmove",c,v?{passive:!1}:void 0),f=!0))}},j=function(){u&&(a.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),f&&(document.removeEventListener("touchmove",c,v?{passive:!1}:void 0),f=!1),y=-1),u?O():D(),a=[]};const q=["a[href]","button:not([disabled])","button:not([hidden])","[tabindex]:not([disabled])","input:not([disabled])","select","textarea"],R=t=>t.offsetParent===null,w=t=>Array.from(t.querySelectorAll(q)).filter(e=>!R(e))||[],b=(t,e)=>Array.from(e).includes(t.target),C=(t,e)=>{if(!e.length||t.key!=="Tab")return;if(b(t,e)||(t.preventDefault(),e[0].focus()),e.length===1){t.preventDefault();return}const o=e.length-1,i=t.target===e[o],n=t.target===e[0],s=t.shiftKey===!1;s&&i?(t.preventDefault(),e[0].focus()):!s&&n&&(t.preventDefault(),e[o].focus())},K={bind(t){p(()=>{t._focusableChildrenElements=w(t)}),t._keyHandler=function(e){e.key==="Tab"&&(b(e,t._focusableChildrenElements)||(t._lastFocusedElement=e.target)),C(e,t._focusableChildrenElements)},document.addEventListener("keydown",t._keyHandler)},componentUpdated(t){p(()=>{t._focusableChildrenElements=w(t)})},unbind(t){t._lastFocusedElement&&t._lastFocusedElement.focus(),document.removeEventListener("keydown",t._keyHandler)}};export{V as _,j as c,W as d,K as f}; 2//# sourceMappingURL=DtesV7vg.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.