IW4M-Admin/WebfrontCore/wwwroot/lib/popper.js/dist/popper.min.js

6 lines
18 KiB
JavaScript
Raw Normal View History

2018-02-21 20:29:23 -05:00
/*
Copyright (C) Federico Zivolo 2017
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/const e='undefined'!=typeof window&&'undefined'!=typeof document,t=['Edge','Trident','Firefox'];let o=0;for(let n=0;n<t.length;n+=1)if(e&&0<=navigator.userAgent.indexOf(t[n])){o=1;break}function n(e){let t=!1;return()=>{t||(t=!0,window.Promise.resolve().then(()=>{t=!1,e()}))}}function i(e){let t=!1;return()=>{t||(t=!0,setTimeout(()=>{t=!1,e()},o))}}const r=e&&window.Promise;var p=r?n:i;function d(e){return e&&'[object Function]'==={}.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];const o=getComputedStyle(e,null);return t?o[t]:o}function a(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function f(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}const{overflow:t,overflowX:o,overflowY:n}=s(e);return /(auto|scroll)/.test(t+n+o)?e:f(a(e))}function l(e){const t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?-1!==['TD','TABLE'].indexOf(t.nodeName)&&'static'===s(t,'position')?l(t):t:e?e.ownerDocument.documentElement:document.documentElement}function m(e){const{nodeName:t}=e;return'BODY'!==t&&('HTML'===t||l(e.firstElementChild)===e)}function h(e){return null===e.parentNode?e:h(e.parentNode)}function c(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;const o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);const{commonAncestorContainer:p}=r;if(e!==p&&t!==p||n.contains(i))return m(p)?p:l(p);const d=h(e);return d.host?c(d.host,t):c(e,h(t).host)}function u(e,t='top'){const o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){const t=e.ownerDocument.documentElement,n=e.ownerDocument.scrollingElement||t;return n[o]}return e[o]}function g(e,t,o=!1){const n=u(t,'top'),i=u(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function b(e,t){const o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e[`border${o}Width`],10)+parseFloat(e[`border${n}Width`],10)}let w;var y=function(){return void 0==w&&(w=-1!==navigator.appVersion.indexOf('MSIE 10')),w};function E(e,t,o,n){return Math.max(t[`offset${e}`],t[`scroll${e}`],o[`client${e}`],o[`offset${e}`],o[`scroll${e}`],y()?o[`offset${e}`]+n[`margin${'Height'===e?'Top':'Left'}`]+n[`margin${'Height'===e?'Bottom':'Right'}`]:0)}function v(){const e=document.body,t=document.documentElement,o=y()&&getComputedStyle(t);return{height:E('Height',e,t,o),width:E('Width',e,t,o)}}var O=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function x(e){return O({},e,{right:e.left+e.width,bottom:e.top+e.height})}function L(e){let t={};if(y())try{t=e.getBoundingClientRect();const o=u(e,'top'),n=u(e,'left');t.top+=o,t.left+=n,t.bottom+=o,t.right+=n}catch(e){}else t=e.getBoundingClientRect();const o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},n='HTML'===e.nodeName?v():{},i=n.width||e.clientWidth||o.right-o.left,r=n.height||e.clientHeight||o.bottom-o.top;let p=e.offsetWidth-i,d=e.offsetHeight-r;if(p||d){const t=s(e);p-=b(t,'x'),d-=b(t,'y'),o.width-=p,o.height-=d}return x(o)}function S(e,t){const o=y(),n='HTML'===t.nodeName,i=L(e),r=L(t),p=f(e),d=s(t),a=parseFloat(d.borderTopWidth,10),l=parseFloat(d.borderLeftWidth,10);let m=x({top:i.top-r.top-a,left:i.left-r.left-l,width:i.width,height:i.height});if(m.marginTop=0,m.marginLeft=0,!o&&n){const e=parseFloat(d.marginTop,10),t=parseFloat(d.marginLeft,10);m.top-=a-e,m.bottom-=a-e,m.left-=l-t,m.right-=l-t,m.marginTop=e,m.marginLeft=t}return(o?t.contains(p):t===p&&'BODY'!==p.nodeName)&&(m=g(m,t)),m}function T(e){var t=Math.max;const o=e.ownerDocument.documentElement,n=S(e,o),i=t(o.clientWidth,window.innerWidth||0),r=t(o.clientHeight,window.innerHeight||0),p=u(o),d=u(o,'left'),s={top:p-n.top+n.marginTop,left:d-n.left+n.marginLeft,width:i,height:r};return x(s)}function D(e){const t=e.nodeName;return'BODY'===t||'HTML'===t?!1:!('fixed'!==s(e,'position'))||D(a
//# sourceMappingURL=popper.min.js.map