You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
roundcubemail/skins/elastic/bootstrap/popper.min.js

2 lines
19 KiB
JavaScript

var _Mathfloor=Math.floor,_Mathmin=Math.min,_Mathround=Math.round,_Mathmax=Math.max;const nativeHints=['native code','[object MutationObserverConstructor]'];var isNative=(e)=>nativeHints.some((t)=>-1<(e||'').toString().indexOf(t));const isBrowser='undefined'!=typeof window,longerTimeoutBrowsers=['Edge','Trident','Firefox'];let timeoutDuration=0;for(let e=0;e<longerTimeoutBrowsers.length;e+=1)if(isBrowser&&0<=navigator.userAgent.indexOf(longerTimeoutBrowsers[e])){timeoutDuration=1;break}function microtaskDebounce(e){let t=!1,o=0;const r=document.createElement('span'),p=new MutationObserver(()=>{e(),t=!1});return p.observe(r,{attributes:!0}),()=>{t||(t=!0,r.setAttribute('x-index',o),++o)}}function taskDebounce(e){let t=!1;return()=>{t||(t=!0,setTimeout(()=>{t=!1,e()},timeoutDuration))}}const supportsNativeMutationObserver=isBrowser&&isNative(window.MutationObserver);var debounce=supportsNativeMutationObserver?microtaskDebounce:taskDebounce;function isNumeric(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function setStyles(e,t){Object.keys(t).forEach((o)=>{let r='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&isNumeric(t[o])&&(r='px'),e.style[o]=t[o]+r})}function isFunction(e){return e&&'[object Function]'==={}.toString.call(e)}function getStyleComputedProperty(e,t){if(1!==e.nodeType)return[];const 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;const{overflow:t,overflowX:o,overflowY:r}=getStyleComputedProperty(e);return /(auto|scroll)/.test(t+r+o)?e:getScrollParent(getParentNode(e))}function isOffsetContainer(e){const{nodeName:t}=e;return'BODY'!==t&&('HTML'===t||e.firstElementChild.offsetParent===e)}function getRoot(e){return null===e.parentNode?e:getRoot(e.parentNode)}function getOffsetParent(e){const t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?t:window.document.documentElement}function findCommonOffsetParent(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;const o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=o?e:t,p=o?t:e,s=document.createRange();s.setStart(r,0),s.setEnd(p,0);const{commonAncestorContainer:d}=s;if(e!==d&&t!==d||r.contains(p))return isOffsetContainer(d)?d:getOffsetParent(d);const f=getRoot(e);return f.host?findCommonOffsetParent(f.host,t):findCommonOffsetParent(e,getRoot(t).host)}function getScroll(e,t='top'){const o='top'===t?'scrollTop':'scrollLeft',r=e.nodeName;if('BODY'===r||'HTML'===r){const p=window.document.documentElement,s=window.document.scrollingElement||p;return s[o]}return e[o]}function includeScroll(e,t,o=!1){const r=getScroll(t,'top'),p=getScroll(t,'left'),s=o?-1:1;return e.top+=r*s,e.bottom+=r*s,e.left+=p*s,e.right+=p*s,e}function getBordersSize(e,t){const o='x'===t?'Left':'Top',r='Left'==o?'Right':'Bottom';return+e[`border${o}Width`].split('px')[0]+ +e[`border${r}Width`].split('px')[0]}let isIE10;var isIE10$1=function(){return void 0==isIE10&&(isIE10=-1!==navigator.appVersion.indexOf('MSIE 10')),isIE10};function getSize(e,t,o,r){return _Mathmax(t[`offset${e}`],o[`client${e}`],o[`offset${e}`],isIE10$1()?o[`offset${e}`]+r[`margin${'Height'===e?'Top':'Left'}`]+r[`margin${'Height'===e?'Bottom':'Right'}`]:0)}function getWindowSizes(){const 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 _extends=Object.assign||function(e){for(var o,t=1;t<arguments.length;t++)for(var r in o=arguments[t],o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e};function getClientRect(e){return _extends({},e,{right:e.left+e.width,bottom:e.top+e.height})}function getBoundingClientRect(e){let t={};if(isIE10$1())try{t=e.getBoundingClientRect();const l=getScroll(e,'top'),m=getScroll(e,'left');t.top+=l,t.left+=m,t.bottom+=l,t.right+=m}catch(l){}else t=e.getBoundingClientRect();const o={left:t.left,to