You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
11 KiB

/*
Copyright (C) Federico Zivolo 2020
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?b(exports):'function'==typeof define&&define.amd?define(['exports'],b):b(a.PopperUtils={})})(this,function(a){'use strict';function b(a,b){if(1!==a.nodeType)return[];var c=a.ownerDocument.defaultView,d=c.getComputedStyle(a,null);return b?d[b]:d}function c(a){return'HTML'===a.nodeName?a:a.parentNode||a.host}function d(a){if(!a)return document.body;switch(a.nodeName){case'HTML':case'BODY':return a.ownerDocument.body;case'#document':return a.body;}var e=b(a),f=e.overflow,g=e.overflowX,h=e.overflowY;return /(auto|scroll|overlay)/.test(f+h+g)?a:d(c(a))}function e(a){return a&&a.referenceNode?a.referenceNode:a}function f(a){return 11===a?T:10===a?U:T||U}function g(a){if(!a)return document.documentElement;for(var c=f(10)?document.body:null,d=a.offsetParent||null;d===c&&a.nextElementSibling;)d=(a=a.nextElementSibling).offsetParent;var e=d&&d.nodeName;return e&&'BODY'!==e&&'HTML'!==e?-1!==['TH','TD','TABLE'].indexOf(d.nodeName)&&'static'===b(d,'position')?g(d):d:a?a.ownerDocument.documentElement:document.documentElement}function h(a){var b=a.nodeName;return'BODY'!==b&&('HTML'===b||g(a.firstElementChild)===a)}function i(a){return null===a.parentNode?a:i(a.parentNode)}function j(a,b){if(!a||!a.nodeType||!b||!b.nodeType)return document.documentElement;var c=a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING,d=c?a:b,e=c?b:a,f=document.createRange();f.setStart(d,0),f.setEnd(e,0);var k=f.commonAncestorContainer;if(a!==k&&b!==k||d.contains(e))return h(k)?k:g(k);var l=i(a);return l.host?j(l.host,b):j(a,i(b).host)}function k(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:'top',c='top'===b?'scrollTop':'scrollLeft',d=a.nodeName;if('BODY'===d||'HTML'===d){var e=a.ownerDocument.documentElement,f=a.ownerDocument.scrollingElement||e;return f[c]}return a[c]}function l(a,b){var c=2<arguments.length&&void 0!==arguments[2]&&arguments[2],d=k(b,'top'),e=k(b,'left'),f=c?-1:1;return a.top+=d*f,a.bottom+=d*f,a.left+=e*f,a.right+=e*f,a}function m(a,b){var c='x'===b?'Left':'Top',d='Left'==c?'Right':'Bottom';return parseFloat(a['border'+c+'Width'])+parseFloat(a['border'+d+'Width'])}function n(a,b,c,d){return R(b['offset'+a],b['scroll'+a],c['client'+a],c['offset'+a],c['scroll'+a],f(10)?parseInt(c['offset'+a])+parseInt(d['margin'+('Height'===a?'Top':'Left')])+parseInt(d['margin'+('Height'===a?'Bottom':'Right')]):0)}function o(a){var b=a.body,c=a.documentElement,d=f(10)&&getComputedStyle(c);return{height:n('Height',b,c,d),width:n('Width',b,c,d)}}function p(a){return V({},a,{right:a.left+a.width,bottom:a.top+a.height})}function q(a){var c={};try{if(f(10)){c=a.getBoundingClientRect();var d=k(a,'top'),e=k(a,'left');c.top+=d,c.left+=e,c.bottom+=d,c.right+=e}else c=a.getBoundingClientRect()}catch(a){}var g={left:c.left,top:c.top,width:c.right-c.left,height:c.bottom-c.top},h='HTML'===a.nodeName?o(a.ownerDocument):{},i=h.width||a.clientWidth||g.width,j=h.height||a.clientHeight||g.height,l=a.offsetWidth-i,n=a.offsetHeight-j;if(l||n){var q=b(a);l-=m(q,'x'),n-=m(q,'y'),g.width-=l,g.height-=n}return p(g)}function r(a,c){var e=2<arguments.length&&void 0!==arguments[2]&&arguments[2],g=f(10),h='HTML'===c.nodeName,i=q(a),j=q(c),k=d(a),m=b(c),n=parseFloat(m.borderTopWidth),o=parseFloat(m.borderLeftWidth);e&&h&&(j.top=R(j.top,0),j.left=R(j.left,0));var r=p({top:i.top-j.top-n,left:i.left-j.left-o,width:i.width,height:i.height});if(r.marginTop=0,r.marginLeft=0,!g&&h){var s=parseFloat(m.marginTop),t=parseFloat(m.marginLeft);r.top-=n-s,r.bottom-=n-s,r.left-=o-t,r.right-=o-t,r.marginTop=s,r.marginLeft=t}return(g&&!e?c.contains(k):c===k&&'BODY'!==k.nodeName)&&(r=l(r,c)),r}function s(a){var b=1<arguments.length&&arguments[1]!==void 0&&arguments[1],c=a.ownerDocument.documentElement,d=r(a,c),e=R(c.clientWidth,window.innerWidth||0),f=R(c.clientHeight,window.innerHeight||0),g=b?0:k(c),h=b?0:k(c,'left'),i={top:g-d.top+d.marginTop,left:h-d.left+d.marginLeft,width:e,height:f};return p(i)}function t(a){var d=a.nodeName;if('BODY'===d||'HTML'===d)return!1;if('fixed'===b(a,'position'))return!0;v
//# sourceMappingURL=popper-utils.min.js.map