2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
import{k as F,E as xe,d as D,P as T,r as w,ad as Ze,i as Ae,h as Ce,cf as ae,n as Fe,H as le,b as f,cz as Qe,_ as en,aZ as nn,l as i,g as tn,cj as De,c6 as Le,b_ as Me,av as We,c1 as on,y as ie,cm as je,f as an,x as rn,D as ln,p as re,F as cn,cF as sn,cG as un,cH as fn,cI as ze,bt as we,I as dn,cJ as vn,cK as mn}from"./index-dc16a447.js";import{c as Cn,d as gn,K as Ne,e as yn,a as bn}from"./colors-3781f3bd.js";import{o as Ve}from"./vnode-38db88ef.js";import{p as hn}from"./pickAttrs-783961e6.js";import{w as Te,i as ge}from"./raf-ec71f8db.js";import{_ as pn}from"./objectDestructuringEmpty-24e23e90.js";import{_ as kn,a as xn,B as ve,c as He}from"./index-35519014.js";import{z as wn}from"./styleChecker-7756749a.js";var se;function ye(a){if(typeof document>"u")return 0;if(a||se===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var o=document.createElement("div"),t=o.style;t.position="absolute",t.top="0",t.left="0",t.pointerEvents="none",t.visibility="hidden",t.width="200px",t.height="150px",t.overflow="hidden",o.appendChild(e),document.body.appendChild(o);var n=e.offsetWidth;o.style.overflow="scroll";var l=e.offsetWidth;n===l&&(l=o.clientWidth),document.body.removeChild(o),se=n-l}return se}function Pe(a){var e=a.match(/^(.*)px$/),o=Number(e==null?void 0:e[1]);return Number.isNaN(o)?ye():o}function tt(a){if(typeof document>"u"||!a||!(a instanceof Element))return{width:0,height:0};var e=getComputedStyle(a,"::-webkit-scrollbar"),o=e.width,t=e.height;return{width:Pe(o),height:Pe(t)}}function q(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=e.element,t=o===void 0?document.body:o,n={},l=Object.keys(a);return l.forEach(function(s){n[s]=t.style[s]}),l.forEach(function(s){t.style[s]=a[s]}),n}function Nn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ue={};const Se=function(a){if(!(!Nn()&&!a)){var e="ant-scrolling-effect",o=new RegExp("".concat(e),"g"),t=document.body.className;if(a){if(!o.test(t))return;q(ue),ue={},document.body.className=t.replace(o,"").trim();return}var n=ye();if(n&&(ue=q({position:"relative",width:"calc(100% - ".concat(n,"px)")}),!o.test(t))){var l="".concat(t," ").concat(e);document.body.className=l.trim()}}};var O=[],Ke="ant-scrolling-effect",fe=new RegExp("".concat(Ke),"g"),Tn=0,de=new Map,Pn=kn(function a(e){var o=this;xn(this,a),F(this,"getContainer",function(){var t;return(t=o.options)===null||t===void 0?void 0:t.container}),F(this,"reLock",function(t){var n=O.find(function(l){var s=l.target;return s===o.lockTarget});n&&o.unLock(),o.options=t,n&&(n.options=t,o.lock())}),F(this,"lock",function(){var t;if(!O.some(function(m){var y=m.target;return y===o.lockTarget})){if(O.some(function(m){var y,C=m.options;return(C==null?void 0:C.container)===((y=o.options)===null||y===void 0?void 0:y.container)})){O=[].concat(xe(O),[{target:o.lockTarget,options:o.options}]);return}var n=0,l=((t=o.options)===null||t===void 0?void 0:t.container)||document.body;(l===document.body&&window.innerWidth-document.documentElement.clientWidth>0||l.scrollHeight>l.clientHeight)&&(n=ye());var s=l.className;if(O.filter(function(m){var y,C=m.options;return(C==null?void 0:C.container)===((y=o.options)===null||y===void 0?void 0:y.container)}).length===0&&de.set(l,q({width:n!==0?"calc(100% - ".concat(n,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:l})),!fe.test(s)){var h="".concat(s," ").concat(Ke);l.className=h.trim()}O=[].concat(xe(O),[{target:o.lockTarget,options:o.options}])}}),F(this,"unLock",function(){var t,n=O.find(function(h){var m=h.target;return m===o.lockTarget});if(O=O.filter(function(h){var m=h.target;return m!==o.lockTarget}),!(!n||O.some(function(h){var m,y=h.options;return(y==null?void 0:y.container)===((m=n.options)===null||m===void 0?void 0:m.container)}))){var l=((t=o.options)===null||t===void 0?void 0:t.container)||document.body,s=l.className;fe.test(s)&&(q(de.get(l),{element:l}),de.delete(l),l.className=l.className.replace(fe,"").trim
|