UNPKG

ant-design-x-vue

Version:

Craft AI-driven interfaces effortlessly

2 lines (1 loc) 2.25 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=/margin|padding|width|height|max|min|offset/,c={left:!0,top:!0},r={cssFloat:1,styleFloat:1,float:1};function u(e){return e.nodeType===1?e.ownerDocument.defaultView.getComputedStyle(e,null):{}}function d(e,t,o){if(t=t.toLowerCase(),o==="auto"){if(t==="height")return e.offsetHeight;if(t==="width")return e.offsetWidth}return t in c||(c[t]=i.test(t)),c[t]?parseFloat(o)||0:o}function f(e,t){const o=arguments.length,n=u(e);return t=r[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,o===1?n:d(e,t,n[t]||e.style[t])}function s(e,t,o){const n=arguments.length;if(t=r[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,n===3)return typeof o=="number"&&i.test(t)&&(o=`${o}px`),e.style[t]=o,o;for(const l in t)t.hasOwnProperty(l)&&s(e,l,t[l]);return u(e)}function g(e){return e===document.body?document.documentElement.clientWidth:e.offsetWidth}function h(e){return e===document.body?window.innerHeight||document.documentElement.clientHeight:e.offsetHeight}function m(){const e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:e,height:t}}function y(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function p(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(e){const t=e.getBoundingClientRect(),o=document.documentElement;return{left:t.left+(window.scrollX||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:t.top+(window.scrollY||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}function w(e){return Array.prototype.slice.apply(e).map(o=>`${o}: ${e.getPropertyValue(o)};`).join("")}function b(e){return Object.keys(e).reduce((t,o)=>{const n=e[o];return typeof n>"u"||n===null||(t+=`${o}: ${e[o]};`),t},"")}exports.get=f;exports.getClientSize=y;exports.getDocSize=m;exports.getOffset=a;exports.getOuterHeight=h;exports.getOuterWidth=g;exports.getScroll=p;exports.set=s;exports.styleObjectToString=b;exports.styleToString=w;