mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-21 15:20:35 +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.
|
|
*/
|
|
|
|
"use strict";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])))}Object.defineProperties(exports,{o:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=(t,e)=>{const{u:n,_:o,g: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)},T=(t,e,n)=>{if(s(n))return t?t.getAttribute(e):null;t&&t.setAttribute(e,n)},R=(t,e,n,o)=>{if(n){const r=T(t,e)||"",i=new Set(r.split(" "));i[o?"add":"delete"](n),T(t,e,x(i).join(" ").trim())}},M=(t,e)=>{t&&t.removeAttribute(e)},H=(t,e)=>P("scrollLeft",0,t,e),I=(t,e)=>P("scrollTop",0,t,e),z=Element.prototype,D=(t,e)=>{const n=[],o=e?v(e)?e:null:document;return o?m(n,o.querySelectorAll(t)):n},A=(t,e)=>!!v(t)&&(z.matches||z.msMatchesSelector).call(t,e),j=t=>t?x(t.childNodes):[],k=t=>t?t.parentElement:null,B=(t,e)=>{if(v(t)){const n=z.closest;if(n)return n.call(t,e);do{if(A(t,e))return t;t=k(t)}while(t)}return null},N=(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)}},_=(t,e)=>{N(t,null,e)},F=(t,e)=>{N(k(t),t&&t.nextSibling,e)},q=e=>{if(w(e))t(x(e),(t=>q(t)));else if(e){const t=k(e);t&&t.removeChild(e)}},V=t=>{const e=document.createElement("div");return t&&T(e,"class",t),e},W=e=>{const n=V();return n.innerHTML=e.trim(),t(j(n),(t=>q(t)))},X=t=>t.charAt(0).toUpperCase()+t.slice(1),Y=["-webkit-","-moz-","-o-","-ms-"],K=["WebKit","Moz","O","MS","webkit","moz","o","ms"],Z={},J={},G=e=>{let n=J[e];if(S(J,e))return n;const o=X(e),r=V().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=Z[e]||window[e];return S(Z,e)||(t(K,(t=>(n=n||window[t+X(e)],!n))),Z[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{v:s,p:l,m: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.S=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(z){}},$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,Tt=t=>{const n=parseFloat(e(t,"height"))||0,o=parseFloat(e(t,"width"))||0;return{w:o-St(o),h:n-St(n)}},Rt=t=>t.getBoundingClientRect();let Mt;const Ht=t=>t.split(" "),It=(e,n,o,r)=>{t(Ht(n),(t=>{e.removeEventListener(t,o,r)}))},zt=(e,n,o,r)=>{var i;const l=(()=>{if(s(Mt)){Mt=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){Mt=!0}}))}catch(e){}}return Mt})(),c=null!=(i=l&&r&&r.$)?i:l,a=r&&r.C||!1,d=r&&r.O||!1,u=[],h=l?{passive:c,capture:a}:a;return t(Ht(n),(t=>{const n=d?r=>{e.removeEventListener(t,n,a),o&&o(r)}:o;m(u,It.bind(null,e,t,n,a)),e.addEventListener(t,n,h)})),O.bind(0,u)},Dt=t=>t.stopPropagation(),At=t=>t.preventDefault(),jt={x:0,y:0},kt=t=>{const e=t?Rt(t):0;return e?{x:e.left+window.pageYOffset,y:e.top+window.pageXOffset}:jt},Bt=(e,n)=>{t(p(n)?n:[n],e)},Nt=e=>{const n=new Map,o=(t,e)=>{if(t){const o=n.get(t);Bt((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),Bt((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()}))}]},_t=t=>JSON.stringify(t,((t,e)=>{if(h(e))throw new Error;return e})),Ft={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"]}},qt=(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]={},qt(r,i));else if(S(n,t)&&i!==r){let e=!0;if(p(r)||p(i))try{_t(r)===_t(i)&&(e=!1)}catch(Z){}e&&(o[t]=i)}})),o},Vt="os-environment",Wt=`${Vt}-flexbox-glue`,Xt=`${Wt}-max`,Yt="data-overlayscrollbars",Kt=`${Yt}-overflow-x`,Zt=`${Yt}-overflow-y`,Jt="overflowVisible",Gt="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,Te="__osOptionsValidationPlugin",Re=3333333,Me="scroll",He="__osSizeObserverPlugin",Ie=(()=>({[He]:{T:(t,n,o)=>{const r=W(`<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>`);_(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=()=>{H(l,Re),I(l,Re),H(s,Re),I(s,Re)},f=t=>{a=0,h&&(d=u,n(!0===t))},w=t=>{u=Ct(i),h=!t||!ut(u,d),t?(Dt(t),h&&!a&&(nt(a),a=ot(f))):f(!1===t),p()},g=m([],[zt(l,Me,w),zt(s,Me,w)]);return e(c,{width:Re,height:Re}),ot(p),[o?w.bind(0,!1):p,g]}}}))();let ze=0;const{round:De,abs:Ae}=Math,je="__osScrollbarsHidingPlugin",ke=(()=>({[je]:{A:t=>{const{I:e,L:n,H:o}=t,r=!(o||e||!n.x&&!n.y)&&document.createElement("style");return r&&(T(r,"id",`${ee}-${ze}`),ze++),r},M:(n,o,r,i,s,l,c)=>[(t,o,l,c)=>{if(n){const{P:n}=s(),{D:a,R: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(`#${T(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(),{R: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]}],k:()=>{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=Ae(s.w),c=Ae(s.h),a={w:Ae(De(i.w/(t.w/100))),h:Ae(De(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=Ae(t),o=Ae(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.B,t),e&&r()}t=i,e=d}}}}))();let Be;const Ne=(t,e,n,o)=>{_(t,e);const r=Et(e),i=Ct(e),s=Tt(n);return o&&q(e),{x:i.h-r.h+s.h,y:i.w-r.w+s.w}},_e=(t,n)=>{const o="hidden";e(t,{overflowX:o,overflowY:o,direction:"rtl"}),H(t,0);const r=kt(t),i=kt(n);H(t,-999);const s=kt(n);return{i:r.x===i.x,n:i.x!==s.x}},Fe=(t,e)=>{const n=at(t,Wt),o=Rt(t),r=Rt(e),i=ft(r,o,!0),s=at(t,Xt),l=Rt(t),c=Rt(e),a=ft(c,l,!0);return n(),s(),i&&a},qe=()=>(Be||(Be=(()=>{const{body:t}=document,o=W(`<div class="${Vt}"><div></div></div>`)[0],r=o.firstChild,[i,,s]=Nt(),[l,c]=n({u:Ne(t,o,r),_:ht},Ne.bind(0,t,o,r,!0)),[a]=c(),d=(t=>{let n=!1;const o=at(t,oe);try{n="none"===e(t,G("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({},Ft),f={B:a,L:u,I:d,H:"-1"===e(o,"zIndex"),V:_e(o,r),j:Fe(o,r),Y:t=>i("_",t),q:C.bind(0,{},h),F(t){C(h,t)},G:C.bind(0,{},p),N(t){C(p,t)},X:C({},h),U:C({},p)};if(M(o,"style"),q(o),!(d||u.x&&u.y)){let t;window.addEventListener("resize",(()=>{const e=Pe()[je];t=t||e&&e.k(),t&&t(f,l,s.bind(0,"_"))}))}return f})()),Be),Ve=(t,e)=>h(t)?t.apply(0,e):t,We=(t,e,n,o)=>{const r=s(o)?n:o;return Ve(r,t)||e()},Xe=(t,e,n,o)=>{const r=s(o)?n:o,i=Ve(r,t);return!!i&&(b(i)?i:e())},Ye=new WeakMap,Ke=t=>Ye.get(t),Ze=(t,e)=>t?e.split(".").reduce(((t,e)=>t&&S(t,e)?t[e]:void 0),t):void 0,Je=(t,e,n)=>o=>[Ze(t,o),n||void 0!==Ze(e,o)],Ge=t=>{let e=t;return[()=>e,t=>{e=C({},e,t)}]},Ue="tabindex",Qe=V.bind(0,""),tn=t=>{_(k(t),j(t)),q(t)},en=t=>{const e=qe(),{q:n,I:o}=e,r=Pe()[je],i=r&&r.A,{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,$=A(x,"textarea"),S=x.ownerDocument,C=x===S.body,E=S.defaultView,P=We.bind(0,[x]),H=Xe.bind(0,[x]),I=P(Qe,c,g),z=I===x,D=z&&C,B=S.activeElement,V=!z&&E.top===E&&B===x,W={J:x,K:$?P(Qe,l,f):x,Z:I,tt:!z&&H(Qe,a,w),nt:!z&&H(Qe,d,v),ot:!z&&!o&&i&&i(e),st:D?S.documentElement:I,et:D?S:I,ct:E,rt:S,lt:$,W:C,it:u,ut:z,dt:(t,e)=>z?((t,e,n)=>{const o=T(t,Yt)||"";return new Set(o.split(" ")).has(n)})(I,0,e):((t,e)=>lt(t,e,((t,e)=>t.contains(e))))(I,t),ft:(t,e,n)=>z?R(I,Yt,e,n):(n?at:ct)(I,t)},X=L(W).reduce(((t,e)=>{const n=W[e];return m(t,!(!n||k(n))&&n)}),[]),Y=t=>t?y(X,t)>-1:null,{J:K,K:Z,tt:J,Z:G,nt:U,ot:Q}=W,tt=[],et=$&&Y(Z);let nt=$?K:j([U,G,J,Z,K].find((t=>!1===Y(t))));const ot=U||G;return[W,()=>{const t=((t,e)=>(T(t,Yt,e),M.bind(0,t,Yt)))(Z,z?"viewport":"host"),e=at(J,Qt),n=at(G,!z&&te),r=at(U,ne),i=C?at(k(x),oe):wt;if(et&&(F(K,Z),m(tt,(()=>{F(Z,K),q(Z)}))),_(ot,nt),_(Z,J),_(J||Z,!z&&G),_(G,U),m(tt,(()=>{i(),t(),M(G,Kt),M(G,Zt),Y(U)&&tn(U),Y(G)&&tn(G),Y(J)&&tn(J),e(),n(),r()})),o&&!z&&m(tt,ct.bind(0,G,oe)),Q&&(((t,e)=>{N(k(t),t,e)})(G,Q),m(tt,q.bind(0,Q))),V){const t=T(G,Ue);T(G,Ue,"-1"),G.focus();const e=zt(S,"pointerdown keydown",(()=>{t?T(G,Ue,t):M(G,Ue),e()}))}else B&&B.focus&&B.focus();nt=0},O.bind(0,tt)]},nn=(t,n)=>{const{nt:o}=t,[r]=n;return t=>{const{j:n}=qe(),{_t:i}=r(),{ht:s}=t,l=(o||!n)&&s;return l&&e(o,{height:i?"":"100%"}),{gt:l,vt:l}}},on=(t,o)=>{const[r,i]=o,{K:s,tt:l,Z:c,ut:a}=t,[d,u]=n({_:pt,u:Ot()},Ot.bind(0,s,"padding",""));return(t,n,o)=>{let[s,h]=u(o);const{I:p,j:f}=qe(),{wt:w}=r(),{gt:g,vt:b,bt: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({tt:s,yt:!t,P:l?a:C({},r,a)})}return{St:x}}},{max:rn}=Math,sn=rn.bind(0,0),ln="visible",cn="hidden",an=42,dn={_:ut,u:{w:0,h:0}},un={_:ht,u:{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,{K:s,tt:l,Z:c,ot:a,ut:d,ft:u,W:h,ct:p}=t,{B:f,j:w,I:g,L:b}=qe(),v=Pe()[je],y=!d&&!g&&(b.x||b.y),m=h&&d,[x,$]=n(dn,Tt.bind(0,c)),[O,S]=n(dn,Pt.bind(0,c)),[L,C]=n(dn),[E,P]=n(dn),[M]=n(un),H=(t,n)=>{if(e(c,{height:""}),n){const{yt:n,tt:o}=r(),{xt:i,D:l}=t,a=Tt(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})}},I=(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{$t:{x:i,y:d},xt:{x:s,y:u},D:{x:l,y:h},R:{x:a,y:p}}},z=(t,e,n,o)=>{const{D:i,R: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))},[D,A]=v?v.M(y,w,c,a,r,I,z):[()=>y,()=>[wt]];return(t,n,o)=>{const{gt:a,Ct:h,vt:f,St:v,ht:y,bt:j}=t,{_t:k,wt:B}=r(),[N,_]=n("showNativeOverlaidScrollbars"),[F,q]=n("overflow"),V=N&&b.x&&b.y,W=!d&&!w&&(a||f||h||_||y),X=pn(F.x),Y=pn(F.y),K=X||Y;let Z,J=$(o),G=S(o),U=C(o),Q=P(o);if(_&&g&&u(oe,Gt,!V),W&&(Z=I(V),H(Z,k)),a||v||f||j||_){K&&u(re,Jt,!1);const[t,e]=A(V,B,Z),[n,r]=J=x(o),[i,s]=G=O(o),l=Et(c);let a=i,d=l;t(),(s||r||_)&&e&&!V&&D(e,i,n,B)&&(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]=G,[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||j||lt||it||et||ot||q||_||W){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,I(t,o)})(V,ct,F,t),o=D(n,rt,st,B);d||z(n,B,o,t),W&&H(n,k),d?(T(s,Kt,t.overflowX),T(s,Zt,t.overflowY)):e(c,t)}R(s,Yt,Jt,at),hn(l,re,at),!d&&hn(c,re,K);const[dt,ut]=M(I(V).$t);return i({$t:dt,Ot:{x:tt.w,y:tt.h},Tt:{x:nt.w,y:nt.h},Et:ct}),{At:ut,zt:et,It: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{Lt:r=!1,Ht:i=!1}=o||{},s=Pe()[He],{V:l}=qe(),c=W(`<div class="${ie}"><div class="${le}"></div></div>`)[0],a=c.firstChild,d=$t.bind(0,t),[h]=n({u:void 0,g:!0,_:(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);H(c,e?l.n?-gn:l.i?0:gn:gn),I(c,gn)}i||e({gt:!o,Mt:o?t:void 0,Ht:!!s})},g=[];let b=!!i&&w;return[()=>{O(g),q(c)},()=>{if(et){const t=new et(w);t.observe(a),m(g,(()=>{t.disconnect()}))}else if(s){const[t,e]=s.T(a,w,i);b=t,m(g,e)}if(r){const[t]=n({u:!d()},d);m(g,zt(c,"scroll",(e=>{const n=t(),[o,r]=n;r&&(ct(a,"ltr rtl"),at(a,o?"rtl":"ltr"),w(n)),Dt(e)})))}b&&(at(c,se),m(g,zt(c,"animationstart",b,{O:!!et}))),_(t,c)}]},yn=(t,e)=>{let o;const r=V(ue),i=[],[s]=n({u:!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),q(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()}_(t,r)},()=>{if(o)return c(o.takeRecords(),!0)}]},mn=(e,n,o,r)=>{let i=!1;const{Pt:s,Dt:l,Rt:c,kt:a,Bt:u,Vt:h}=r||{},p=bt((()=>{i&&o(!0)}),{v:33,p: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):D(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=zt(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)?T(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&&A(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,D(t,n)),A(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.S();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,{K:u,Z:f,nt:w,lt:g,ut:b,dt:x,ft:$}=e,{j:O}=qe(),[S]=n({_:ut,u:{w:0,h:0}},(()=>{const t=x(re,Jt),e=x(ee,""),n=e&&H(f),o=e&&I(f);$(re,Jt),$(ee,""),$("",Ut,!0);const r=Pt(w),i=Pt(f),s=Tt(f);return $(re,Jt,t),$(ee,"",e),$("",Ut),H(f,n),I(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,{v:()=>i,p:()=>s,m(t,e){const[n]=t,[o]=e;return[L(n).concat(L(o)).reduce(((t,e)=>(t[e]=n[e]||o[e],t)),{})]}}),R=e=>{t(e||On,(t=>{if(y(On,t)>-1){const e=T(u,t);d(e)?T(f,t,e):M(f,t)}}))},z=(t,e)=>{const[n,o]=t,i={ht:o};return c({_t:n}),!e&&r(i),i},D=({gt:t,Mt:e,Ht:n})=>{const o=!t||n?r:P;let i=!1;if(e){const[t,n]=e;i=n,c({wt:t})}o({gt:t,bt:i})},A=(t,e)=>{const[,n]=S(),o={vt:n};return n&&!e&&(t?r:P)(o),o},j=(t,e,n)=>{const o={Ct:e};return e?!n&&P(o):b||R(t),o},[k,N,_]=w||!O?yn(u,z):[wt,wt,wt],[F,q]=b?[wt,wt]:vn(u,D,{Ht:!0,Lt:!0}),[V,W]=mn(u,!1,j,{Dt:Ln,Pt:Ln.concat(On)}),X=b&&et&&new et(D.bind(0,{gt:!0}));return X&&X.observe(u),R(),[()=>{k(),F(),l&&l[0](),X&&X.disconnect(),V()},()=>{q(),N()},()=>{const t={},e=W(),n=_(),o=l&&l[1]();return e&&C(t,j.apply(0,m(e,!0))),n&&C(t,z.apply(0,m(n,!0))),o&&C(t,A.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,A,{Dt:E.concat(n||[]),Pt:E.concat(n||[]),Rt:r,kt:xn,Vt:(t,e)=>{const{target:n,attributeName:o}=t;return!(e||!o||b)&&((t,e,n)=>{const o=t&&B(t,e),r=t&&((t,e)=>{const n=e?v(e)?e:null:document;return n?n.querySelector(t):null})(n,o),i=B(r,e)===o;return!(!o||!r)&&(o===t||r===t||i&&B(B(t,n),e)!==o)})(n,xn,$n)||!!B(n,`.${he}`)||!!g(t)}})),u)if(P.S(),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={tt:{t:0,r:0,b:0,l:0},yt:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},Ot:En,Tt:En,$t:{x:"hidden",y:"hidden"},Et:{x:!1,y:!1},_t:!1,wt:!1},{round:Tn,max:Rn,sign:Mn}=Math,Hn=()=>performance.now(),In=(t,e,n,o)=>{let r=0;const i=Hn(),s=()=>{const l=Hn(),c=l-i>=n,a=1-(Rn(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)},zn=(t,e)=>zt(t,"mousedown",zt.bind(0,e,"click",Dt,{O:!0,C:!0}),{C:!0}),Dn=(t,e,n,o,r,i)=>{const{V:s}=qe(),{Ft:l,Gt:c,Nt: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{Tt: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 zt(c,"pointerdown",(n=>{const r=B(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}=Rt(t),{w:o,h:r}=Ct(t);return{x:Tn(e)/o||1,y:Tn(n)/r||1}})(o)[p]),s=n[p],a=Rt(l),h=Rt(c),g=a[u],b=f(a,h)+g/2,v=s-h[p],y=r?0:v-b,x=[zt(e,"selectstart",(t=>At(t)),{$:!1}),zt(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=In(o,o+g*Mn(y),133,((o,r)=>{i(o);const s=f(Rt(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()))}zt(c,"pointerup",(t=>{O(x),c.releasePointerCapture(t.pointerId)}),{O:!0}),c.setPointerCapture(n.pointerId)}}))},{min:An,max:jn,abs:kn,round:Bn}=Math,Nn=(t,e,n,o)=>{if(o){const t=n?"x":"y",{Tt:e,Ot:r}=o,i=r[t],s=e[t];return jn(0,An(1,i/(i+s)))}const r=n?"w":"h",i=Ct(t)[r],s=Ct(e)[r];return jn(0,An(1,i/s))},_n=(n,o,r)=>{const{q:i}=qe(),{scrollbars:s}=i(),{slot:l}=s,{rt:c,J:a,K:d,Z:h,it:p,st: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.Nt,n)}))},y=(n,o)=>{t(n,(t=>{const[n,r]=o(t);e(n,r)}))},x=(t,e,n)=>{y(t,(t=>{const{Ft:o,Gt:r}=t;return[o,{[n?"width":"height"]:`${(100*Nn(o,r,n,e)).toFixed(3)}%`}]}))},S=(t,e,n)=>{const o=n?"X":"Y";y(t,(t=>{const{Ft:r,Gt:i,Nt:s}=t,l=((t,e,n,o,r,i)=>{const{V:s}=qe(),l=i?"x":"y",c=i?"Left":"Top",{Tt:a}=o,d=Bn(a[l]),u=kn(n[`scroll${c}`]),h=i&&r,p=s.i?u:d-u,f=An(1,(h?p:u)/d),w=Nn(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)},T=t=>{const e=t?fe:we,n=t?C:E,o=$(n)?me:"",i=V(`${he} ${e} ${o}`),s=V(ge),l=V(be),a={Nt:i,Gt:s,Ft:l};return _(i,s),_(s,l),m(n,a),m(L,[q.bind(0,i),r(a,P,c,d,f,t)]),a},R=T.bind(0,!0),M=T.bind(0,!1);return R(),M(),[{Xt:t=>{x(C,t,!0),x(E,t)},Ut:t=>{S(C,t,!0),S(E,t)},Wt:P,Jt:{Kt:C,Zt:R,Qt:y.bind(0,C)},tn:{Kt:E,Zt:M,Qt:y.bind(0,E)}},()=>{_(b,C[0].Nt),_(b,E[0].Nt),rt((()=>{P(me)}),300)},O.bind(0,L)]},Fn=(e,n,o)=>{const{G:r,Y:i}=qe(),c=Pe(),a=b(e),d=a?e:e.target,u=Ke(d);if(n&&!u){let u=!1;const p=c[Te],f=t=>{const e=t||{},n=p&&p.T;return n?n(e,!0):e},w=C({},r(),f(n)),[g,b,v]=Nt(o),[y,m,x]=((e,n)=>{const o=Je(n,{}),r=Ge(Pn),[i,s,l]=Nt(),[c]=r,[a,d,u]=en(e),h=((e,n)=>{const{J:o,Z:r,ft:i,ut:s}=e,{I:l,L:c,j:a}=qe(),d=!l&&(c.x||c.y),u=[nn(e,n),on(e,n),fn(e,n)];return(e,n,l)=>{const c=wn(C({gt:!1,St:!1,bt:!1,ht:!1,zt:!1,It:!1,At:!1,Ct:!1,vt:!1},n),{},l),h=d||!a,p=h&&H(r),f=h&&I(r);i("",Ut,!0);let w=c;return t(u,(t=>{w=wn(w,t(w,e,!!l)||{},l)})),H(r,p),I(r,f),i("",Ut),s||(H(o,0),I(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.jt=t=>{i("u",t)},v.Yt=()=>{const{J:t,Z:e}=a,n=H(t),o=I(t);w(),d(),H(e,n),I(e,o)},v.qt=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=Ge({}),[d]=a,[u,h]=gt(),[p,f]=gt(),[w,g]=gt(100),[b,v]=gt(100),[y,m]=gt((()=>c)),[x,$,S]=_n(t,n.qt,((t,e)=>(n,o,r,i,s,l)=>{const{Nt:c}=n,[a,d]=gt(333),u=!!s.scrollBy;let h=!0;return O.bind(0,[zt(c,"pointerenter",(()=>{o(xe,!0)})),zt(c,"pointerleave pointercancel",(()=>{o(xe)})),zt(c,"wheel",(t=>{const{deltaX:e,deltaY:n,deltaMode:r}=t;u&&h&&0===r&&k(c)===i&&s.scrollBy({left:e,top:n,behavior:"smooth"}),h=!1,o(Se,!0),a((()=>{h=!0,o(Se)})),At(t)}),{$:!1,C:!0}),zn(c,r),Dn(t,r,n,s,e,l),d])})(e,n)),{K:L,Z:C,st:E,et:P,ut:T,W:R}=n.qt,{Jt:M,tn:z,Wt:D,Xt:A,Ut:j}=x,{Qt:B}=M,{Qt:N}=z,_=t=>{const{Nt:e}=t,n=T&&!R&&k(e)===C&&e;return[n,{transform:n?`translate(${H(E)}px, ${I(E)}px)`:""}]},F=(t,e)=>{if(m(),t)D(Oe);else{const t=()=>D(Oe,!0);c>0&&!e?y(t):t()}},q=()=>{s=r,s&&F(!0)},V=[g,m,v,f,h,S,zt(L,"pointerover",q,{O:!0}),zt(L,"pointerenter",q),zt(L,"pointerleave",(()=>{s=!1,r&&F(!1)})),zt(L,"pointermove",(()=>{o&&u((()=>{g(),F(!0),b((()=>{o&&F(!1)}))}))})),zt(P,"scroll",(()=>{p((()=>{j(n()),i&&F(!0),w((()=>{i&&!s&&F(!1)}))})),T&&B(_),T&&N(_)}))],W=d.bind(0);return W.qt=x,W.Yt=$,[(t,s,a)=>{const{zt:d,It:u,At:h,bt:p}=a,f=Je(e,t,s),w=n(),{Tt:g,$t:b,wt: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,T]=f("scrollbars.clickScroll"),M=d||u||p||s,H=h||$||s,I=(t,e)=>{const n="visible"===x||"auto"===x&&"scroll"===t;return D(ve,n,e),n};if(c=L,m&&(D(l),D(y,!0),l=y),S&&(o="move"===O,r="leave"===O,i="never"!==O,F(!i,!0)),E&&D(Ce,C),T&&D(Le,P),H){const t=I(b.x,!0),e=I(b.y,!1);D(ye,!(t&&e))}M&&(A(w),j(w),D($e,!g.x,!0),D($e,!g.y,!1),D(pe,v&&!R))},W,O.bind(0,V)]})(e,w,m),T=(t,e)=>{y(t,!!e)},R=i(T.bind(0,{},!0)),M=t=>{(t=>{Ye.delete(t)})(d),R(),P(),x(),u=!0,v("destroyed",[z,!!t]),b()},z={options(t){if(t){const e=qt(w,f(t));E(e)||(C(w,e),T(e))}return C({},w)},on:g,off:(t,e)=>{t&&e&&b(t,e)},state(){const{Ot:t,Tt:e,$t:n,Et:o,tt:r,yt:i,wt:s}=m();return C({},{overflowEdge:t,overflowAmount:e,overflowStyle:n,hasOverflow:o,padding:r,paddingAbsolute:i,directionRTL:s,destroyed:u})},elements(){const{J:t,K:e,tt:n,Z:o,nt:r,st:i,et:s}=m.qt,{Jt:l,tn:c}=S.qt,a=t=>{const{Ft:e,Gt:n,Nt:o}=t;return{scrollbar:o,track:n,handle:e}},d=t=>{const{Kt:e,Zt: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=>(T({},t),z),destroy:M.bind(0)};return m.jt(((t,e,n)=>{$(e,n,t)})),t(L(c),(t=>{const e=c[t];h(e)&&e(Fn,z)})),((t,e)=>{const{nativeScrollbarsOverlaid:n,body:o}=t||{},{W:r}=e,{q:i,L:c,I:a}=qe(),{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.qt)?(M(!0),z):(m.Yt(),S.Yt(),((t,e)=>{Ye.set(t,e)})(d,z),v("initialized",[z]),m.jt(((t,e,n)=>{const{gt:o,bt:r,ht:i,zt:s,It:l,At:c,vt:a,Ct:d}=t;v("updated",[z,{updateHints:{sizeChanged:o,directionChanged:r,heightIntrinsicChanged:i,overflowEdgeChanged:s,overflowAmountChanged:l,overflowStyleChanged:c,contentMutation:a,hostMutation:d},changedOptions:e,force:n}])})),z.update(!0))}return u};Fn.plugin=e=>{t(p(e)?e:[e],(t=>{const e=L(t)[0];Ee[e]=t[e]}))},Fn.valid=t=>{const e=t&&t.elements,n=h(e)&&e();return g(n)&&!!Ke(n.target)},Fn.env=()=>{const{B:t,L:e,I:n,V:o,j:r,H:i,X:s,U:l,q:c,F:a,G:d,N:u}=qe();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})},exports.OverlayScrollbars=Fn,exports.scrollbarsHidingPlugin=ke,exports.sizeObserverPlugin=Ie; |