6 lines
22 KiB
JavaScript
6 lines
22 KiB
JavaScript
|
/*
|
||
|
Copyright (C) Federico Zivolo 2017
|
||
|
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||
|
*/for(var nativeHints=['native code','[object MutationObserverConstructor]'],isNative=function(e){return nativeHints.some(function(t){return-1<(e||'').toString().indexOf(t)})},isBrowser='undefined'!=typeof window,longerTimeoutBrowsers=['Edge','Trident','Firefox'],timeoutDuration=0,i=0;i<longerTimeoutBrowsers.length;i+=1)if(isBrowser&&0<=navigator.userAgent.indexOf(longerTimeoutBrowsers[i])){timeoutDuration=1;break}function microtaskDebounce(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}function taskDebounce(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},timeoutDuration))}}var supportsNativeMutationObserver=isBrowser&&isNative(window.MutationObserver),debounce=supportsNativeMutationObserver?microtaskDebounce:taskDebounce;function isFunction(e){return e&&'[object Function]'==={}.toString.call(e)}function getStyleComputedProperty(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function getParentNode(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function getScrollParent(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var t=getStyleComputedProperty(e),o=t.overflow,i=t.overflowX,n=t.overflowY;return /(auto|scroll)/.test(o+n+i)?e:getScrollParent(getParentNode(e))}function getOffsetParent(e){var t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?-1!==['TD','TABLE'].indexOf(t.nodeName)&&'static'===getStyleComputedProperty(t,'position')?getOffsetParent(t):t:window.document.documentElement}function isOffsetContainer(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||getOffsetParent(e.firstElementChild)===e)}function getRoot(e){return null===e.parentNode?e:getRoot(e.parentNode)}function findCommonOffsetParent(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(n,0);var p=r.commonAncestorContainer;if(e!==p&&t!==p||i.contains(n))return isOffsetContainer(p)?p:getOffsetParent(p);var s=getRoot(e);return s.host?findCommonOffsetParent(s.host,t):findCommonOffsetParent(e,getRoot(t).host)}function getScroll(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function includeScroll(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=getScroll(t,'top'),n=getScroll(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function getBordersSize(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}var isIE10,isIE10$1=function(){return void 0==isIE10&&(isIE10=-1!==navigator.appVersion.indexOf('MSIE 10')),isIE10};function getSize(e,t,o,i){return Math.max(t['offset'+e],o['client'+e],o['offset'+e],isIE10$1()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function getWindowSizes(){var e=window.document.body,t=window.document.documentElement,o=isIE10$1()&&window.getComputedStyle(t);return{height:getSize('Height',e,t,o),width:getSize('Width',e,t,o)}}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},createClass=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),defineProperty=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},_extends=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOw
|
||
|
//# sourceMappingURL=popper.min.js.map
|