mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-22 23:00:36 +03:00
11 lines
28 KiB
JavaScript
11 lines
28 KiB
JavaScript
/*!
|
|
* OverlayScrollbars
|
|
* Version: 2.0.0-beta.0
|
|
*
|
|
* Copyright (c) Rene Haas | KingSora.
|
|
* https://github.com/KingSora
|
|
*
|
|
* Released under the MIT license.
|
|
*/
|
|
|
|
function t(e,n){if(w(e))for(let t=0;t<e.length&&!1!==n(e[t],t,e);t++);else e&&t(Object.keys(e),(t=>n(e[t],t,e)));return e}function e(e,n){const o=d(n);if(p(n)||o){let t=o?"":{};if(e){const r=window.getComputedStyle(e,null);t=o?mt(e,r,n):n.reduce(((t,n)=>(t[n]=mt(e,r,n),t)),t)}return t}e&&t(L(n),(t=>xt(e,t,n[t])))}const n=(t,e)=>{const{o:n,u:o,_:r}=t;let i,s=n;const l=(t,e)=>{const n=s,l=t,c=e||(o?!o(n,l):n!==l);return(c||r)&&(s=l,i=n),[s,c,i]};return[e?t=>l(e(s,i),t):l,t=>[s,!!t,i]]},o=Node.ELEMENT_NODE,{toString:r,hasOwnProperty:i}=Object.prototype,s=t=>void 0===t,l=t=>null===t,c=t=>s(t)||l(t)?`${t}`:r.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),a=t=>"number"==typeof t,d=t=>"string"==typeof t,u=t=>"boolean"==typeof t,h=t=>"function"==typeof t,p=t=>Array.isArray(t),f=t=>"object"==typeof t&&!p(t)&&!l(t),w=t=>{const e=!!t&&t.length,n=a(e)&&e>-1&&e%1==0;return!(!(p(t)||!h(t)&&n)||e>0&&f(t)&&!(e-1 in t))},g=t=>{if(!t||!f(t)||"object"!==c(t))return!1;let e;const n="constructor",o=t[n],r=o&&o.prototype,l=i.call(t,n),a=r&&i.call(r,"isPrototypeOf");if(o&&!l&&!a)return!1;for(e in t);return s(e)||i.call(t,e)},b=t=>{const e=HTMLElement;return!!t&&(e?t instanceof e:t.nodeType===o)},v=t=>{const e=Element;return!!t&&(e?t instanceof e:t.nodeType===o)},y=(t,e,n)=>t.indexOf(e,n),m=(t,e,n)=>(n||d(e)||!w(e)?t.push(e):Array.prototype.push.apply(t,e),t),x=e=>{const n=Array.from,o=[];return n&&e?n(e):(e instanceof Set?e.forEach((t=>{m(o,t)})):t(e,(t=>{m(o,t)})),o)},$=t=>!!t&&0===t.length,O=(e,n,o)=>{t(e,(t=>t&&t.apply(void 0,n||[]))),!o&&(e.length=0)},S=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),L=t=>t?Object.keys(t):[],C=(e,n,o,r,i,s,c)=>{const a=[n,o,r,i,s,c];return"object"==typeof e&&!l(e)||h(e)||(e={}),t(a,(n=>{t(L(n),(t=>{const o=n[t];if(e===o)return!0;const r=p(o);if(o&&(g(o)||r)){const n=e[t];let i=n;r&&!p(n)?i=[]:r||g(n)||(i={}),e[t]=C(i,o)}else e[t]=o}))})),e},E=t=>{for(const e in t)return!1;return!0},P=(t,e,n,o)=>{if(s(o))return n?n[t]:e;n&&(d(o)||a(o))&&(n[t]=o)},A=(t,e,n)=>{if(s(n))return t?t.getAttribute(e):null;t&&t.setAttribute(e,n)},M=(t,e,n,o)=>{if(n){const r=A(t,e)||"",i=new Set(r.split(" "));i[o?"add":"delete"](n),A(t,e,x(i).join(" ").trim())}},R=(t,e)=>{t&&t.removeAttribute(e)},z=(t,e)=>P("scrollLeft",0,t,e),B=(t,e)=>P("scrollTop",0,t,e),D=Element.prototype,T=(t,e)=>{const n=[],o=e?v(e)?e:null:document;return o?m(n,o.querySelectorAll(t)):n},j=(t,e)=>!!v(t)&&(D.matches||D.msMatchesSelector).call(t,e),k=t=>t?x(t.childNodes):[],H=t=>t?t.parentElement:null,I=(t,e)=>{if(v(t)){const n=D.closest;if(n)return n.call(t,e);do{if(j(t,e))return t;t=H(t)}while(t)}return null},V=(e,n,o)=>{if(o&&e){let r,i=n;w(o)?(r=document.createDocumentFragment(),t(o,(t=>{t===i&&(i=t.previousSibling),r.appendChild(t)}))):r=o,n&&(i?i!==n&&(i=i.nextSibling):i=e.firstChild),e.insertBefore(r,i||null)}},F=(t,e)=>{V(t,null,e)},W=(t,e)=>{V(H(t),t&&t.nextSibling,e)},_=e=>{if(w(e))t(x(e),(t=>_(t)));else if(e){const t=H(e);t&&t.removeChild(e)}},K=t=>{const e=document.createElement("div");return t&&A(e,"class",t),e},N=e=>{const n=K();return n.innerHTML=e.trim(),t(k(n),(t=>_(t)))},X=t=>t.charAt(0).toUpperCase()+t.slice(1),Y=["-webkit-","-moz-","-o-","-ms-"],Z=["WebKit","Moz","O","MS","webkit","moz","o","ms"],G={},J={},q=e=>{let n=J[e];if(S(J,e))return n;const o=X(e),r=K().style;return t(Y,(t=>{const i=t.replace(/-/g,""),s=[e,t+e,i+o,X(i)+o];return!(n=s.find((t=>void 0!==r[t])))})),J[e]=n||""},U=e=>{let n=G[e]||window[e];return S(G,e)||(t(Z,(t=>(n=n||window[t+X(e)],!n))),G[e]=n),n},Q=U("MutationObserver"),tt=U("IntersectionObserver"),et=U("ResizeObserver"),nt=U("cancelAnimationFrame"),ot=U("requestAnimationFrame"),rt=window.setTimeout,it=window.clearTimeout,st=/[^\x20\t\r\n\f]+/g,lt=(t,e,n)=>{const o=t&&t.classList;let r,i=0,s=!1;if(o&&e&&d(e)){const t=e.match(st)||[];for(s=t.length>0;r=t[i++];)s=!!n(o,r)&&s}return s},ct=(t,e)=>{lt(t,e,((t,e)=>t.remove(e)))},at=(t,e)=>(lt(t,e,((t,e)=>t.add(e))),ct.bind(0,t,e)),dt=(e,n,o,r)=>{if(e&&n){let i=!0;return t(o,(t=>{(r?r(e[t]):e[t])!==(r?r(n[t]):n[t])&&(i=!1)})),i}return!1},ut=(t,e)=>dt(t,e,["w","h"]),ht=(t,e)=>dt(t,e,["x","y"]),pt=(t,e)=>dt(t,e,["t","r","b","l"]),ft=(t,e,n)=>dt(t,e,["width","height"],n&&(t=>Math.round(t))),wt=()=>{},gt=t=>{let e;const n=t?rt:ot,o=t?it:nt;return[r=>{o(e),e=n(r,h(t)?t():t)},()=>o(e)]},bt=(t,e)=>{let n,o,r,i=wt;const{g:s,v:l,p:c}=e||{},d=function(e){i(),it(n),n=o=void 0,i=wt,t.apply(this,e)},u=t=>c&&o?c(o,t):t,p=()=>{i!==wt&&d(u(r)||r)},f=function(){const t=x(arguments),e=h(s)?s():s,c=a(e)&&e>=0;if(c){const s=h(l)?l():l,c=a(s)&&s>=0,f=e>0?rt:ot,w=e>0?it:nt,g=u(t)||t,b=d.bind(0,g);i();const v=f(b,e);i=()=>w(v),c&&!n&&(n=rt(p,s)),o=r=g}else d(t)};return f.m=p,f},vt={opacity:1,zindex:1},yt=(t,e)=>{const n=e?parseFloat(t):parseInt(t,10);return n==n?n:0},mt=(t,e,n)=>null!=e?e[n]||e.getPropertyValue(n):t.style[n],xt=(t,e,n)=>{try{const{style:o}=t;s(o[e])?o.setProperty(e,n):o[e]=((t,e)=>!vt[t.toLowerCase()]&&a(e)?`${e}px`:e)(e,n)}catch(D){}},$t=t=>"rtl"===e(t,"direction"),Ot=(t,n,o)=>{const r=n?`${n}-`:"",i=o?`-${o}`:"",s=`${r}top${i}`,l=`${r}right${i}`,c=`${r}bottom${i}`,a=`${r}left${i}`,d=e(t,[s,l,c,a]);return{t:yt(d[s]),r:yt(d[l]),b:yt(d[c]),l:yt(d[a])}},{round:St}=Math,Lt={w:0,h:0},Ct=t=>t?{w:t.offsetWidth,h:t.offsetHeight}:Lt,Et=t=>t?{w:t.clientWidth,h:t.clientHeight}:Lt,Pt=t=>t?{w:t.scrollWidth,h:t.scrollHeight}:Lt,At=t=>{const n=parseFloat(e(t,"height"))||0,o=parseFloat(e(t,"width"))||0;return{w:o-St(o),h:n-St(n)}},Mt=t=>t.getBoundingClientRect();let Rt;const zt=t=>t.split(" "),Bt=(e,n,o,r)=>{t(zt(n),(t=>{e.removeEventListener(t,o,r)}))},Dt=(e,n,o,r)=>{var i;const l=(()=>{if(s(Rt)){Rt=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){Rt=!0}}))}catch(e){}}return Rt})(),c=null!=(i=l&&r&&r.S)?i:l,a=r&&r.$||!1,d=r&&r.C||!1,u=[],h=l?{passive:c,capture:a}:a;return t(zt(n),(t=>{const n=d?r=>{e.removeEventListener(t,n,a),o&&o(r)}:o;m(u,Bt.bind(null,e,t,n,a)),e.addEventListener(t,n,h)})),O.bind(0,u)},Tt=t=>t.stopPropagation(),jt=t=>t.preventDefault(),kt={x:0,y:0},Ht=t=>{const e=t?Mt(t):0;return e?{x:e.left+window.pageYOffset,y:e.top+window.pageXOffset}:kt},It=(e,n)=>{t(p(n)?n:[n],e)},Vt=e=>{const n=new Map,o=(t,e)=>{if(t){const o=n.get(t);It((t=>{o&&o[t?"delete":"clear"](t)}),e)}else n.forEach((t=>{t.clear()})),n.clear()},r=(t,e)=>{const r=n.get(t)||new Set;return n.set(t,r),It((t=>{t&&r.add(t)}),e),o.bind(0,t,e)};return t(L(e),(t=>{r(t,e[t])})),[r,o,(e,o)=>{const r=n.get(e);t(x(r),(t=>{o&&!$(o)?t.apply(0,o):t()}))}]},Ft=t=>JSON.stringify(t,((t,e)=>{if(h(e))throw new Error;return e})),Wt={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},_t=(e,n)=>{const o={};return t(L(n).concat(L(e)),(t=>{const r=e[t],i=n[t];if(f(r)&&f(i))C(o[t]={},_t(r,i));else if(S(n,t)&&i!==r){let e=!0;if(p(r)||p(i))try{Ft(r)===Ft(i)&&(e=!1)}catch(G){}e&&(o[t]=i)}})),o},Kt="os-environment",Nt=`${Kt}-flexbox-glue`,Xt=`${Nt}-max`,Yt="data-overlayscrollbars",Zt=`${Yt}-overflow-x`,Gt=`${Yt}-overflow-y`,Jt="overflowVisible",qt="scrollbarHidden",Ut="updating",Qt="os-padding",te="os-viewport",ee=`${te}-arrange`,ne="os-content",oe=`${te}-scrollbar-hidden`,re=`os-overflow-visible`,ie="os-size-observer",se=`${ie}-appear`,le=`${ie}-listener`,ce=`${le}-scroll`,ae=`${le}-item`,de=`${ae}-final`,ue="os-trinsic-observer",he="os-scrollbar",pe=`${he}-rtl`,fe=`${he}-horizontal`,we=`${he}-vertical`,ge=`${he}-track`,be=`${he}-handle`,ve=`${he}-visible`,ye=`${he}-cornerless`,me=`${he}-transitionless`,xe=`${he}-interaction`,$e=`${he}-unusable`,Oe=`${he}-auto-hidden`,Se=`${he}-wheel`,Le=`${ge}-interactive`,Ce=`${be}-interactive`,Ee={},Pe=()=>Ee,Ae="__osOptionsValidationPlugin",Me=3333333,Re="scroll",ze="__osSizeObserverPlugin",Be=(()=>({[ze]:{O:(t,n,o)=>{const r=N(`<div class="${ae}" dir="ltr"><div class="${ae}"><div class="${de}"></div></div><div class="${ae}"><div class="${de}" style="width: 200%; height: 200%"></div></div></div>`);F(t,r),at(t,ce);const i=r[0],s=i.lastChild,l=i.firstChild,c=null==l?void 0:l.firstChild;let a,d=Ct(i),u=d,h=!1;const p=()=>{z(l,Me),B(l,Me),z(s,Me),B(s,Me)},f=t=>{a=0,h&&(d=u,n(!0===t))},w=t=>{u=Ct(i),h=!t||!ut(u,d),t?(Tt(t),h&&!a&&(nt(a),a=ot(f))):f(!1===t),p()},g=m([],[Dt(l,Re,w),Dt(s,Re,w)]);return e(c,{width:Me,height:Me}),ot(p),[o?w.bind(0,!1):p,g]}}}))();let De=0;const{round:Te,abs:je}=Math,ke="__osScrollbarsHidingPlugin",He=(()=>({[ke]:{T:t=>{const{A:e,I:n,L:o}=t,r=!(o||e||!n.x&&!n.y)&&document.createElement("style");return r&&(A(r,"id",`${ee}-${De}`),De++),r},H:(n,o,r,i,s,l,c)=>[(t,o,l,c)=>{if(n){const{P:n}=s(),{D:a,M:d}=t,{x:u,y:h}=d,{x:p,y:f}=a,w=n[c?"paddingRight":"paddingLeft"],g=n.paddingTop,b=o.w+l.w,v=o.h+l.h,y={w:f&&h?`${f+b-w}px`:"",h:p&&u?`${p+v-g}px`:""};if(i){const{sheet:t}=i;if(t){const{cssRules:e}=t;if(e){e.length||t.insertRule(`#${A(i,"id")} + .${ee}::before {}`,0);const n=e[0].style;n.width=y.w,n.height=y.h}}}else e(r,{"--os-vaw":y.w,"--os-vah":y.h})}return n},(i,a,d)=>{if(n){const u=d||l(i),{P:h}=s(),{M:p}=u,{x:f,y:w}=p,g={},b=e=>t(e.split(" "),(t=>{g[t]=h[t]}));f&&b("marginBottom paddingTop paddingBottom"),w&&b("marginLeft marginRight paddingLeft paddingRight");const v=e(r,L(g));return ct(r,ee),o||(g.height=""),e(r,g),[()=>{c(u,a,n,v),e(r,v),at(r,ee)},u]}return[wt]}],R:()=>{let t={w:0,h:0},e=0;return(n,o,r)=>{const i={w:window.innerWidth,h:window.innerHeight},s={w:i.w-t.w,h:i.h-t.h};if(0===s.w&&0===s.h)return;const l=je(s.w),c=je(s.h),a={w:je(Te(i.w/(t.w/100))),h:je(Te(i.h/(t.h/100)))},d=(()=>{const t=window.screen.deviceXDPI||0,e=window.screen.logicalXDPI||1;return window.devicePixelRatio||t/e})(),u=l>2&&c>2,h=!((t,e)=>{const n=je(t),o=je(e);return!(n===o||n+1===o||n-1===o)})(a.w,a.h);if(u&&h&&d!==e&&d>0){const[t,e]=o();C(n.k,t),e&&r()}t=i,e=d}}}}))();let Ie;const Ve=(t,e,n,o)=>{F(t,e);const r=Et(e),i=Ct(e),s=At(n);return o&&_(e),{x:i.h-r.h+s.h,y:i.w-r.w+s.w}},Fe=(t,n)=>{const o="hidden";e(t,{overflowX:o,overflowY:o,direction:"rtl"}),z(t,0);const r=Ht(t),i=Ht(n);z(t,-999);const s=Ht(n);return{i:r.x===i.x,n:i.x!==s.x}},We=(t,e)=>{const n=at(t,Nt),o=Mt(t),r=Mt(e),i=ft(r,o,!0),s=at(t,Xt),l=Mt(t),c=Mt(e),a=ft(c,l,!0);return n(),s(),i&&a},_e=()=>(Ie||(Ie=(()=>{const{body:t}=document,o=N(`<div class="${Kt}"><div></div></div>`)[0],r=o.firstChild,[i,,s]=Vt(),[l,c]=n({o:Ve(t,o,r),u:ht},Ve.bind(0,t,o,r,!0)),[a]=c(),d=(t=>{let n=!1;const o=at(t,oe);try{n="none"===e(t,q("scrollbar-width"))||"none"===window.getComputedStyle(t,"::-webkit-scrollbar").getPropertyValue("display")}catch(r){}return o(),n})(o),u={x:0===a.x,y:0===a.y},h={elements:{host:null,padding:!d,viewport:t=>d&&t===t.ownerDocument.body&&t,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=C({},Wt),f={k:a,I:u,A:d,L:"-1"===e(o,"zIndex"),B:Fe(o,r),V:We(o,r),Y:t=>i("_",t),j:C.bind(0,{},h),q(t){C(h,t)},F:C.bind(0,{},p),G(t){C(p,t)},N:C({},h),X:C({},p)};if(R(o,"style"),_(o),!(d||u.x&&u.y)){let t;window.addEventListener("resize",(()=>{const e=Pe()[ke];t=t||e&&e.R(),t&&t(f,l,s.bind(0,"_"))}))}return f})()),Ie),Ke=(t,e)=>h(t)?t.apply(0,e):t,Ne=(t,e,n,o)=>{const r=s(o)?n:o;return Ke(r,t)||e()},Xe=(t,e,n,o)=>{const r=s(o)?n:o,i=Ke(r,t);return!!i&&(b(i)?i:e())},Ye=new WeakMap,Ze=t=>Ye.get(t),Ge=(t,e)=>t?e.split(".").reduce(((t,e)=>t&&S(t,e)?t[e]:void 0),t):void 0,Je=(t,e,n)=>o=>[Ge(t,o),n||void 0!==Ge(e,o)],qe=t=>{let e=t;return[()=>e,t=>{e=C({},e,t)}]},Ue="tabindex",Qe=K.bind(0,""),tn=t=>{F(H(t),k(t)),_(t)},en=t=>{const e=_e(),{j:n,A:o}=e,r=Pe()[ke],i=r&&r.T,{elements:s}=n(),{host:l,viewport:c,padding:a,content:d}=s,u=b(t),h=u?{}:t,{elements:p}=h,{host:f,padding:w,viewport:g,content:v}=p||{},x=u?t:h.target,$=j(x,"textarea"),S=x.ownerDocument,C=x===S.body,E=S.defaultView,P=Ne.bind(0,[x]),z=Xe.bind(0,[x]),B=P(Qe,c,g),D=B===x,T=D&&C,I=S.activeElement,K=!D&&E.top===E&&I===x,N={W:x,J:$?P(Qe,l,f):x,K:B,Z:!D&&z(Qe,a,w),tt:!D&&z(Qe,d,v),nt:!D&&!o&&i&&i(e),ot:T?S.documentElement:B,st:T?S:B,et:E,ct:S,rt:$,U:C,lt:u,it:D,ut:(t,e)=>D?((t,e,n)=>{const o=A(t,Yt)||"";return new Set(o.split(" ")).has(n)})(B,0,e):((t,e)=>lt(t,e,((t,e)=>t.contains(e))))(B,t),dt:(t,e,n)=>D?M(B,Yt,e,n):(n?at:ct)(B,t)},X=L(N).reduce(((t,e)=>{const n=N[e];return m(t,!(!n||H(n))&&n)}),[]),Y=t=>t?y(X,t)>-1:null,{W:Z,J:G,Z:J,K:q,tt:U,nt:Q}=N,tt=[],et=$&&Y(G);let nt=$?Z:k([U,q,J,G,Z].find((t=>!1===Y(t))));const ot=U||q;return[N,()=>{const t=((t,e)=>(A(t,Yt,e),R.bind(0,t,Yt)))(G,D?"viewport":"host"),e=at(J,Qt),n=at(q,!D&&te),r=at(U,ne),i=C?at(H(x),oe):wt;if(et&&(W(Z,G),m(tt,(()=>{W(G,Z),_(G)}))),F(ot,nt),F(G,J),F(J||G,!D&&q),F(q,U),m(tt,(()=>{i(),t(),R(q,Zt),R(q,Gt),Y(U)&&tn(U),Y(q)&&tn(q),Y(J)&&tn(J),e(),n(),r()})),o&&!D&&m(tt,ct.bind(0,q,oe)),Q&&(((t,e)=>{V(H(t),t,e)})(q,Q),m(tt,_.bind(0,Q))),K){const t=A(q,Ue);A(q,Ue,"-1"),q.focus();const e=Dt(S,"pointerdown keydown",(()=>{t?A(q,Ue,t):R(q,Ue),e()}))}else I&&I.focus&&I.focus();nt=0},O.bind(0,tt)]},nn=(t,n)=>{const{tt:o}=t,[r]=n;return t=>{const{V:n}=_e(),{ft:i}=r(),{_t:s}=t,l=(o||!n)&&s;return l&&e(o,{height:i?"":"100%"}),{ht:l,gt:l}}},on=(t,o)=>{const[r,i]=o,{J:s,Z:l,K:c,it:a}=t,[d,u]=n({u:pt,o:Ot()},Ot.bind(0,s,"padding",""));return(t,n,o)=>{let[s,h]=u(o);const{A:p,V:f}=_e(),{vt:w}=r(),{ht:g,gt:b,wt:v}=t,[y,m]=n("paddingAbsolute");(g||h||!f&&b)&&([s,h]=d(o));const x=!a&&(m||v||h);if(x){const t=!y||!l&&!p,n=s.r+s.l,o=s.t+s.b,r={marginRight:t&&!w?-n:0,marginBottom:t?-o:0,marginLeft:t&&w?-n:0,top:t?-s.t:0,right:t?w?-s.r:"auto":0,left:t?w?"auto":-s.l:0,width:t?`calc(100% + ${n}px)`:""},a={paddingTop:t?s.t:0,paddingRight:t?s.r:0,paddingBottom:t?s.b:0,paddingLeft:t?s.l:0};e(l||c,r),e(c,a),i({Z:s,bt:!t,P:l?a:C({},r,a)})}return{yt:x}}},{max:rn}=Math,sn=rn.bind(0,0),ln="visible",cn="hidden",an=42,dn={u:ut,o:{w:0,h:0}},un={u:ht,o:{x:cn,y:cn}},hn=(t,e,n)=>n?at(t,e):ct(t,e),pn=t=>0===t.indexOf(ln),fn=(t,o)=>{const[r,i]=o,{J:s,Z:l,K:c,nt:a,it:d,dt:u,U:h,et:p}=t,{k:f,V:w,A:g,I:b}=_e(),v=Pe()[ke],y=!d&&!g&&(b.x||b.y),m=h&&d,[x,$]=n(dn,At.bind(0,c)),[O,S]=n(dn,Pt.bind(0,c)),[L,C]=n(dn),[E,P]=n(dn),[R]=n(un),z=(t,n)=>{if(e(c,{height:""}),n){const{bt:n,Z:o}=r(),{St:i,D:l}=t,a=At(s),d=Et(s),u="content-box"===e(c,"boxSizing"),h=n||u?o.b+o.t:0,p=!(b.x&&u);e(c,{height:d.h+a.h+(i.x&&p?l.x:0)-h})}},B=(t,n)=>{const o=g||t?0:an,r=(t,r,i)=>{const s=e(c,t),l="scroll"===(n?n[t]:s);return[s,l,l&&!g?r?o:i:0,r&&!!o]},[i,s,l,a]=r("overflowX",b.x,f.x),[d,u,h,p]=r("overflowY",b.y,f.y);return{xt:{x:i,y:d},St:{x:s,y:u},D:{x:l,y:h},M:{x:a,y:p}}},D=(t,e,n,o)=>{const{D:i,M:s}=t,{x:l,y:c}=s,{x:a,y:d}=i,{P:u}=r(),h=e?"marginLeft":"marginRight",p=e?"paddingLeft":"paddingRight",f=u[h],w=u.marginBottom,g=u[p],b=u.paddingBottom;o.width=`calc(100% + ${d+-1*f}px)`,o[h]=-d+f,o.marginBottom=-a+w,n&&(o[p]=g+(c?d:0),o.paddingBottom=b+(l?a:0))},[T,j]=v?v.H(y,w,c,a,r,B,D):[()=>y,()=>[wt]];return(t,n,o)=>{const{ht:a,$t:h,gt:f,yt:v,_t:y,wt:k}=t,{ft:H,vt:I}=r(),[V,F]=n("showNativeOverlaidScrollbars"),[W,_]=n("overflow"),K=V&&b.x&&b.y,N=!d&&!w&&(a||f||h||F||y),X=pn(W.x),Y=pn(W.y),Z=X||Y;let G,J=$(o),q=S(o),U=C(o),Q=P(o);if(F&&g&&u(oe,qt,!K),N&&(G=B(K),z(G,H)),a||v||f||k||F){Z&&u(re,Jt,!1);const[t,e]=j(K,I,G),[n,r]=J=x(o),[i,s]=q=O(o),l=Et(c);let a=i,d=l;t(),(s||r||F)&&e&&!K&&T(e,i,n,I)&&(d=Et(c),a=Pt(c));const h={w:sn(rn(i.w,a.w)+n.w),h:sn(rn(i.h,a.h)+n.h)},f={w:sn(m?p.innerWidth:d.w+sn(l.w-i.w)+n.w),h:sn(m?p.innerHeight:d.h+sn(l.h-i.h)+n.h)};Q=E(f),U=L(((t,e)=>{const n=window.devicePixelRatio%1!=0?1:0,o={w:sn(t.w-e.w),h:sn(t.h-e.h)};return{w:o.w>n?o.w:0,h:o.h>n?o.h:0}})(h,f),o)}const[tt,et]=Q,[nt,ot]=U,[rt,it]=q,[st,lt]=J,ct={x:nt.w>0,y:nt.h>0},at=X&&Y&&(ct.x||ct.y)||X&&ct.x&&!ct.y||Y&&ct.y&&!ct.x;if(v||k||lt||it||et||ot||_||F||N){const t={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},n=((t,e,n,o)=>{const r=(t,e)=>{const n=pn(t),o=e&&n&&t.replace(`${ln}-`,"")||"";return[e&&!n?t:"",pn(o)?"hidden":o]},[i,s]=r(n.x,e.x),[l,c]=r(n.y,e.y);return o.overflowX=s&&l?s:i,o.overflowY=c&&i?c:l,B(t,o)})(K,ct,W,t),o=T(n,rt,st,I);d||D(n,I,o,t),N&&z(n,H),d?(A(s,Zt,t.overflowX),A(s,Gt,t.overflowY)):e(c,t)}M(s,Yt,Jt,at),hn(l,re,at),!d&&hn(c,re,Z);const[dt,ut]=R(B(K).xt);return i({xt:dt,Ct:{x:tt.w,y:tt.h},Ot:{x:nt.w,y:nt.h},Tt:ct}),{Et:ut,At:et,zt:ot}}},wn=(e,n,o)=>{const r={},i=n||{};return t(L(e).concat(L(i)),(t=>{const n=e[t],s=i[t];r[t]=!!(o||n||s)})),r},gn=3333333,bn=t=>t&&(t.height||t.width),vn=(t,e,o)=>{const{It:r=!1,Lt:i=!1}=o||{},s=Pe()[ze],{B:l}=_e(),c=N(`<div class="${ie}"><div class="${le}"></div></div>`)[0],a=c.firstChild,d=$t.bind(0,t),[h]=n({o:void 0,_:!0,u:(t,e)=>!(!t||!bn(t)&&bn(e))}),w=t=>{const n=p(t)&&t.length>0&&f(t[0]),o=!n&&u(t[0]);let i=!1,s=!1,a=!0;if(n){const[e,,n]=h(t.pop().contentRect),o=bn(e),r=bn(n);i=!n||!o,s=!r&&o,a=!i}else o?[,a]=t:s=!0===t;if(r&&a){const e=o?t[0]:$t(c);z(c,e?l.n?-gn:l.i?0:gn:gn),B(c,gn)}i||e({ht:!o,Ht:o?t:void 0,Lt:!!s})},g=[];let b=!!i&&w;return[()=>{O(g),_(c)},()=>{if(et){const t=new et(w);t.observe(a),m(g,(()=>{t.disconnect()}))}else if(s){const[t,e]=s.O(a,w,i);b=t,m(g,e)}if(r){const[t]=n({o:!d()},d);m(g,Dt(c,"scroll",(e=>{const n=t(),[o,r]=n;r&&(ct(a,"ltr rtl"),at(a,o?"rtl":"ltr"),w(n)),Tt(e)})))}b&&(at(c,se),m(g,Dt(c,"animationstart",b,{C:!!et}))),F(t,c)}]},yn=(t,e)=>{let o;const r=K(ue),i=[],[s]=n({o:!1}),l=(t,n)=>{if(t){const o=s((t=>0===t.h||t.isIntersecting||t.intersectionRatio>0)(t)),[,r]=o;if(r)return!n&&e(o),[o]}},c=(t,e)=>{if(t&&t.length>0)return l(t.pop(),e)};return[()=>{O(i),_(r)},()=>{if(tt)o=new tt((t=>c(t)),{root:t}),o.observe(r),m(i,(()=>{o.disconnect()}));else{const t=()=>{const t=Ct(r);l(t)},[e,n]=vn(r,t);m(i,e),n(),t()}F(t,r)},()=>{if(o)return c(o.takeRecords(),!0)}]},mn=(e,n,o,r)=>{let i=!1;const{Pt:s,Dt:l,Mt:c,Rt:a,kt:u,Bt:h}=r||{},p=bt((()=>{i&&o(!0)}),{g:33,v:99}),[f,w]=((e,n,o)=>{let r,i=!1;const s=s=>{if(o){const l=o.reduce(((t,n)=>{if(n){const o=n[0],r=n[1],i=r&&o&&(s?s(o):T(o,e));i&&i.length&&r&&d(r)&&m(t,[i,r.trim()],!0)}return t}),[]);t(l,(e=>t(e[0],(t=>{const o=e[1],s=r.get(t);if(s){const t=s[0],e=s[1];t===o&&e()}const l=Dt(t,o,(e=>{i?(l(),r.delete(t)):n(e)}));r.set(t,[o,l])}))))}};return o&&(r=new WeakMap,s()),[()=>{i=!0},s]})(e,p,c),g=l||[],b=(s||[]).concat(g),v=(i,s)=>{const l=u||wt,c=h||wt,p=[],f=[];let b=!1,v=!1,x=!1;return t(i,(t=>{const{attributeName:o,target:i,type:s,oldValue:u,addedNodes:h}=t,w="attributes"===s,$="childList"===s,O=e===i,S=w&&d(o)?A(i,o):0,L=0!==S&&u!==S,C=y(g,o)>-1&&L;if(n&&!O){const n=!w,s=w&&C,d=s&&a&&j(i,a),p=(d?!l(i,o,u,S):n||s)&&!c(t,!!d,e,r);m(f,h),v=v||p,x=x||$}!n&&O&&L&&!l(i,o,u,S)&&(m(p,o),b=b||C)})),x&&!$(f)&&w((t=>f.reduce(((e,n)=>(m(e,T(t,n)),j(n,t)?m(e,n):e)),[]))),n?(!s&&v&&o(!1),[!1]):!$(p)||b?(!s&&o(p,b),[p,b]):void 0},x=new Q((t=>v(t)));return x.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:b,subtree:n,childList:n,characterData:n}),i=!0,[()=>{i&&(f(),x.disconnect(),i=!1)},()=>{if(i){p.m();const t=x.takeRecords();return!$(t)&&v(t,!0)}}]},xn=`[${Yt}]`,$n=`.${te}`,On=["tabindex"],Sn=["wrap","cols","rows"],Ln=["id","class","style","open"],Cn=(e,o,r)=>{let i,s,l;const[,c]=o,{J:u,K:f,tt:w,rt:g,it:b,ut:x,dt:$}=e,{V:O}=_e(),[S]=n({u:ut,o:{w:0,h:0}},(()=>{const t=x(re,Jt),e=x(ee,""),n=e&&z(f),o=e&&B(f);$(re,Jt),$(ee,""),$("",Ut,!0);const r=Pt(w),i=Pt(f),s=At(f);return $(re,Jt,t),$(ee,"",e),$("",Ut),z(f,n),B(f,o),{w:i.w+r.w+s.w,h:i.h+r.h+s.h}})),E=g?Sn:Ln.concat(Sn),P=bt(r,{g:()=>i,v:()=>s,p(t,e){const[n]=t,[o]=e;return[L(n).concat(L(o)).reduce(((t,e)=>(t[e]=n[e]||o[e],t)),{})]}}),M=e=>{t(e||On,(t=>{if(y(On,t)>-1){const e=A(u,t);d(e)?A(f,t,e):R(f,t)}}))},D=(t,e)=>{const[n,o]=t,i={_t:o};return c({ft:n}),!e&&r(i),i},T=({ht:t,Ht:e,Lt:n})=>{const o=!t||n?r:P;let i=!1;if(e){const[t,n]=e;i=n,c({vt:t})}o({ht:t,wt:i})},j=(t,e)=>{const[,n]=S(),o={gt:n};return n&&!e&&(t?r:P)(o),o},k=(t,e,n)=>{const o={$t:e};return e?!n&&P(o):b||M(t),o},[H,V,F]=w||!O?yn(u,D):[wt,wt,wt],[W,_]=b?[wt,wt]:vn(u,T,{Lt:!0,It:!0}),[K,N]=mn(u,!1,k,{Dt:Ln,Pt:Ln.concat(On)}),X=b&&et&&new et(T.bind(0,{ht:!0}));return X&&X.observe(u),M(),[()=>{H(),W(),l&&l[0](),X&&X.disconnect(),K()},()=>{_(),V()},()=>{const t={},e=N(),n=F(),o=l&&l[1]();return e&&C(t,k.apply(0,m(e,!0))),n&&C(t,D.apply(0,m(n,!0))),o&&C(t,j.apply(0,m(o,!0))),t},t=>{const[e]=t("update.ignoreMutation"),[n,o]=t("update.attributes"),[r,c]=t("update.elementEvents"),[d,u]=t("update.debounce"),g=t=>h(e)&&e(t);if((c||o)&&(l&&(l[1](),l[0]()),l=mn(w||f,!0,j,{Dt:E.concat(n||[]),Pt:E.concat(n||[]),Mt:r,Rt:xn,Bt:(t,e)=>{const{target:n,attributeName:o}=t;return!(e||!o||b)&&((t,e,n)=>{const o=t&&I(t,e),r=t&&((t,e)=>{const n=e?v(e)?e:null:document;return n?n.querySelector(t):null})(n,o),i=I(r,e)===o;return!(!o||!r)&&(o===t||r===t||i&&I(I(t,n),e)!==o)})(n,xn,$n)||!!I(n,`.${he}`)||!!g(t)}})),u)if(P.m(),p(d)){const t=d[0],e=d[1];i=a(t)&&t,s=a(e)&&e}else a(d)?(i=d,s=!1):(i=!1,s=!1)}]},En={x:0,y:0},Pn={Z:{t:0,r:0,b:0,l:0},bt:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},Ct:En,Ot:En,xt:{x:"hidden",y:"hidden"},Tt:{x:!1,y:!1},ft:!1,vt:!1},{round:An,max:Mn,sign:Rn}=Math,zn=()=>performance.now(),Bn=(t,e,n,o)=>{let r=0;const i=zn(),s=()=>{const l=zn(),c=l-i>=n,a=1-(Mn(0,i+n-l)/n||0),d=c||1===a;o((e-t)*a+t,d),r=d?0:ot(s)};return s(),()=>nt(r)},Dn=(t,e)=>Dt(t,"mousedown",Dt.bind(0,e,"click",Tt,{C:!0,$:!0}),{$:!0}),Tn=(t,e,n,o,r,i)=>{const{B:s}=_e(),{qt:l,Ft:c,Gt:a}=n,d=`scroll${i?"Left":"Top"}`,u=i?"width":"height",h=i?"w":"h",p=i?"x":"y",f=(t,e)=>t[p]-e[p],w=(t,e)=>n=>{const{Ot:u}=r(),f=Ct(c)[h]-Ct(l)[h],w=e*n/f*u[p],g=$t(a)&&i?s.n||s.i?1:-1:1;o[d]=t+w*g};return Dt(c,"pointerdown",(n=>{const r=I(n.target,`.${be}`)===l;if(((t,e,n)=>{const o=e.scrollbars,{button:r,isPrimary:i,pointerType:s}=t,{pointers:l}=o;return 0===r&&i&&o[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)})(n,t,r)){const t=!r&&n.shiftKey,i=w(o[d]||0,1/(t=>{const{width:e,height:n}=Mt(t),{w:o,h:r}=Ct(t);return{x:An(e)/o||1,y:An(n)/r||1}})(o)[p]),s=n[p],a=Mt(l),h=Mt(c),g=a[u],b=f(a,h)+g/2,v=s-h[p],y=r?0:v-b,x=[Dt(e,"selectstart",(t=>jt(t)),{S:!1}),Dt(c,"pointermove",(e=>{const n=e[p]-s;(r||t)&&i(y+n)}))];if(t)i(y);else if(!r){let t=0,e=wt;const n=o=>{e=Bn(o,o+g*Rn(y),133,((o,r)=>{i(o);const s=f(Mt(l),h);if(r&&!(v>=s&&v<=s+g)){if(t)n(o);else{const t=setTimeout((()=>{n(o)}),222);e=()=>{clearTimeout(t)}}t++}}))};n(0),m(x,(()=>e()))}Dt(c,"pointerup",(t=>{O(x),c.releasePointerCapture(t.pointerId)}),{C:!0}),c.setPointerCapture(n.pointerId)}}))},{min:jn,max:kn,abs:Hn,round:In}=Math,Vn=(t,e,n,o)=>{if(o){const t=n?"x":"y",{Ot:e,Ct:r}=o,i=r[t],s=e[t];return kn(0,jn(1,i/(i+s)))}const r=n?"w":"h",i=Ct(t)[r],s=Ct(e)[r];return kn(0,jn(1,i/s))},Fn=(n,o,r)=>{const{j:i}=_e(),{scrollbars:s}=i(),{slot:l}=s,{ct:c,W:a,J:d,K:h,lt:p,ot:f}=o,{scrollbars:w}=p?{}:n,{slot:g}=w||{},b=Xe([a,d,h],(()=>d),l,g),v=(e,n,o)=>{const r=o?at:ct;t(e,(t=>{r(t.Gt,n)}))},y=(n,o)=>{t(n,(t=>{const[n,r]=o(t);e(n,r)}))},x=(t,e,n)=>{y(t,(t=>{const{qt:o,Ft:r}=t;return[o,{[n?"width":"height"]:`${(100*Vn(o,r,n,e)).toFixed(3)}%`}]}))},S=(t,e,n)=>{const o=n?"X":"Y";y(t,(t=>{const{qt:r,Ft:i,Gt:s}=t,l=((t,e,n,o,r,i)=>{const{B:s}=_e(),l=i?"x":"y",c=i?"Left":"Top",{Ot:a}=o,d=In(a[l]),u=Hn(n[`scroll${c}`]),h=i&&r,p=s.i?u:d-u,f=jn(1,(h?p:u)/d),w=Vn(t,e,i);return 1/w*(1-w)*f})(r,i,f,e,$t(s),n);return[r,{transform:l==l?`translate${o}(${(100*l).toFixed(3)}%)`:""}]}))},L=[],C=[],E=[],P=(t,e,n)=>{const o=u(n),r=!o||!n;(!o||n)&&v(C,t,e),r&&v(E,t,e)},A=t=>{const e=t?fe:we,n=t?C:E,o=$(n)?me:"",i=K(`${he} ${e} ${o}`),s=K(ge),l=K(be),a={Gt:i,Ft:s,qt:l};return F(i,s),F(s,l),m(n,a),m(L,[_.bind(0,i),r(a,P,c,d,f,t)]),a},M=A.bind(0,!0),R=A.bind(0,!1);return M(),R(),[{Nt:t=>{x(C,t,!0),x(E,t)},Xt:t=>{S(C,t,!0),S(E,t)},Ut:P,Wt:{Jt:C,Kt:M,Zt:y.bind(0,C)},Qt:{Jt:E,Kt:R,Zt:y.bind(0,E)}},()=>{F(b,C[0].Gt),F(b,E[0].Gt),rt((()=>{P(me)}),300)},O.bind(0,L)]},Wn=(e,n,o)=>{const{F:r,Y:i}=_e(),c=Pe(),a=b(e),d=a?e:e.target,u=Ze(d);if(n&&!u){let u=!1;const p=c[Ae],f=t=>{const e=t||{},n=p&&p.O;return n?n(e,!0):e},w=C({},r(),f(n)),[g,b,v]=Vt(o),[y,m,x]=((e,n)=>{const o=Je(n,{}),r=qe(Pn),[i,s,l]=Vt(),[c]=r,[a,d,u]=en(e),h=((e,n)=>{const{W:o,K:r,dt:i,it:s}=e,{A:l,I:c,V:a}=_e(),d=!l&&(c.x||c.y),u=[nn(e,n),on(e,n),fn(e,n)];return(e,n,l)=>{const c=wn(C({ht:!1,yt:!1,wt:!1,_t:!1,At:!1,zt:!1,Et:!1,$t:!1,gt:!1},n),{},l),h=d||!a,p=h&&z(r),f=h&&B(r);i("",Ut,!0);let w=c;return t(u,(t=>{w=wn(w,t(w,e,!!l)||{},l)})),z(r,p),B(r,f),i("",Ut),s||(z(o,0),B(o,0)),w}})(a,r),p=(t,e,n)=>{const o=L(t).some((e=>t[e]));(o||!E(e)||n)&&l("u",[t,e,n])},[f,w,g,b]=Cn(a,r,(t=>{p(h(o,t),{},!1)})),v=c.bind(0);return v.Vt=t=>{i("u",t)},v.Yt=()=>{const{W:t,K:e}=a,n=z(t),o=B(t);w(),d(),z(e,n),B(e,o)},v.jt=a,[(t,e)=>{const o=Je(n,t,e);b(o),p(h(o,g(),e),t,!!e)},v,()=>{s(),f(),u()}]})(e,w),[$,S,P]=((t,e,n)=>{let o,r,i,s,l,c=0;const a=qe({}),[d]=a,[u,h]=gt(),[p,f]=gt(),[w,g]=gt(100),[b,v]=gt(100),[y,m]=gt((()=>c)),[x,$,S]=Fn(t,n.jt,((t,e)=>(n,o,r,i,s,l)=>{const{Gt:c}=n,[a,d]=gt(333),u=!!s.scrollBy;let h=!0;return O.bind(0,[Dt(c,"pointerenter",(()=>{o(xe,!0)})),Dt(c,"pointerleave pointercancel",(()=>{o(xe)})),Dt(c,"wheel",(t=>{const{deltaX:e,deltaY:n,deltaMode:r}=t;u&&h&&0===r&&H(c)===i&&s.scrollBy({left:e,top:n,behavior:"smooth"}),h=!1,o(Se,!0),a((()=>{h=!0,o(Se)})),jt(t)}),{S:!1,$:!0}),Dn(c,r),Tn(t,r,n,s,e,l),d])})(e,n)),{J:L,K:C,ot:E,st:P,it:A,U:M}=n.jt,{Wt:R,Qt:D,Ut:T,Nt:j,Xt:k}=x,{Zt:I}=R,{Zt:V}=D,F=t=>{const{Gt:e}=t,n=A&&!M&&H(e)===C&&e;return[n,{transform:n?`translate(${z(E)}px, ${B(E)}px)`:""}]},W=(t,e)=>{if(m(),t)T(Oe);else{const t=()=>T(Oe,!0);c>0&&!e?y(t):t()}},_=()=>{s=r,s&&W(!0)},K=[g,m,v,f,h,S,Dt(L,"pointerover",_,{C:!0}),Dt(L,"pointerenter",_),Dt(L,"pointerleave",(()=>{s=!1,r&&W(!1)})),Dt(L,"pointermove",(()=>{o&&u((()=>{g(),W(!0),b((()=>{o&&W(!1)}))}))})),Dt(P,"scroll",(()=>{p((()=>{k(n()),i&&W(!0),w((()=>{i&&!s&&W(!1)}))})),A&&I(F),A&&V(F)}))],N=d.bind(0);return N.jt=x,N.Yt=$,[(t,s,a)=>{const{At:d,zt:u,Et:h,wt:p}=a,f=Je(e,t,s),w=n(),{Ot:g,xt:b,vt:v}=w,[y,m]=f("scrollbars.theme"),[x,$]=f("scrollbars.visibility"),[O,S]=f("scrollbars.autoHide"),[L]=f("scrollbars.autoHideDelay"),[C,E]=f("scrollbars.dragScroll"),[P,A]=f("scrollbars.clickScroll"),R=d||u||p||s,z=h||$||s,B=(t,e)=>{const n="visible"===x||"auto"===x&&"scroll"===t;return T(ve,n,e),n};if(c=L,m&&(T(l),T(y,!0),l=y),S&&(o="move"===O,r="leave"===O,i="never"!==O,W(!i,!0)),E&&T(Ce,C),A&&T(Le,P),z){const t=B(b.x,!0),e=B(b.y,!1);T(ye,!(t&&e))}R&&(j(w),k(w),T($e,!g.x,!0),T($e,!g.y,!1),T(pe,v&&!M))},N,O.bind(0,K)]})(e,w,m),A=(t,e)=>{y(t,!!e)},M=i(A.bind(0,{},!0)),R=t=>{(t=>{Ye.delete(t)})(d),M(),P(),x(),u=!0,v("destroyed",[D,!!t]),b()},D={options(t){if(t){const e=_t(w,f(t));E(e)||(C(w,e),A(e))}return C({},w)},on:g,off:(t,e)=>{t&&e&&b(t,e)},state(){const{Ct:t,Ot:e,xt:n,Tt:o,Z:r,bt:i,vt:s}=m();return C({},{overflowEdge:t,overflowAmount:e,overflowStyle:n,hasOverflow:o,padding:r,paddingAbsolute:i,directionRTL:s,destroyed:u})},elements(){const{W:t,J:e,Z:n,K:o,tt:r,ot:i,st:s}=m.jt,{Wt:l,Qt:c}=S.jt,a=t=>{const{qt:e,Ft:n,Gt:o}=t;return{scrollbar:o,track:n,handle:e}},d=t=>{const{Jt:e,Kt:n}=t,o=a(e[0]);return C({},o,{clone:()=>{const t=a(n());return $({},!0,{}),t}})};return C({},{target:t,host:e,padding:n||o,viewport:o,content:r||o,scrollOffsetElement:i,scrollEventElement:s,scrollbarHorizontal:d(l),scrollbarVertical:d(c)})},update:t=>(A({},t),D),destroy:R.bind(0)};return m.Vt(((t,e,n)=>{$(e,n,t)})),t(L(c),(t=>{const e=c[t];h(e)&&e(Wn,D)})),((t,e)=>{const{nativeScrollbarsOverlaid:n,body:o}=t||{},{U:r}=e,{j:i,I:c,A:a}=_e(),{nativeScrollbarsOverlaid:d,body:u}=i().cancel,h=null!=n?n:d,p=s(o)?u:o,f=(c.x||c.y)&&h,w=r&&(l(p)?!a:p);return!!f||!!w})(!a&&e.cancel,m.jt)?(R(!0),D):(m.Yt(),S.Yt(),((t,e)=>{Ye.set(t,e)})(d,D),v("initialized",[D]),m.Vt(((t,e,n)=>{const{ht:o,wt:r,_t:i,At:s,zt:l,Et:c,gt:a,$t:d}=t;v("updated",[D,{updateHints:{sizeChanged:o,directionChanged:r,heightIntrinsicChanged:i,overflowEdgeChanged:s,overflowAmountChanged:l,overflowStyleChanged:c,contentMutation:a,hostMutation:d},changedOptions:e,force:n}])})),D.update(!0))}return u};Wn.plugin=e=>{t(p(e)?e:[e],(t=>{const e=L(t)[0];Ee[e]=t[e]}))},Wn.valid=t=>{const e=t&&t.elements,n=h(e)&&e();return g(n)&&!!Ze(n.target)},Wn.env=()=>{const{k:t,I:e,A:n,B:o,V:r,L:i,N:s,X:l,j:c,q:a,F:d,G:u}=_e();return C({},{scrollbarsSize:t,scrollbarsOverlaid:e,scrollbarsHiding:n,rtlScrollBehavior:o,flexboxGlue:r,cssCustomProperties:i,staticDefaultInitialization:s,staticDefaultOptions:l,getDefaultInitialization:c,setDefaultInitialization:a,getDefaultOptions:d,setDefaultOptions:u})};export{Wn as OverlayScrollbars,He as scrollbarsHidingPlugin,Be as sizeObserverPlugin}; |