ABPCMS.Web/Scripts/popper.min.js

(完整代码) 18KB

/*
 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 i(e){let t=!1;return()=>{t||(t=!0,window.Promise.resolve().then(()=>{t=!1,e()}))}}function n(e){let t=!1;return()=>{t||(t=!0,setTimeout(()=>{t=!1,e()},o))}}const r=e&&window.Promise;var p=r?i:n;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 f(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function a(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:i}=s(e);return /(auto|scroll)/.test(t+i+o)?e:a(f(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,i=o?e:t,n=o?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(n,0);const{commonAncestorContainer:p}=r;if(e!==p&&t!==p||i.contains(n))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',i=e.nodeName;if('BODY'===i||'HTML'===i){const t=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||t;return i[o]}return e[o]}function g(e,t,o=!1){const i=u(t,'top'),n=u(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 b(e,t){const o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return parseFloat(e[`border${o}Width`],10)+parseFloat(e[`border${i}Width`],10)}let w;var y=function(){return void 0==w&&(w=-1!==navigator.appVersion.indexOf('MSIE 10')),w};function E(e,t,o,i){return Math.max(t[`offset${e}`],t[`scroll${e}`],o[`client${e}`],o[`offset${e}`],o[`scroll${e}`],y()?o[`offset${e}`]+i[`margin${'Height'===e?'Top':'Left'}`]+i[`margin${'Height'===e?'Bottom':'Right'}`]:0)}function x(){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 v=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function O(e){return v({},e,{right:e.left+e.width,bottom:e.top+e.height})}function L(e){let t={};try{if(y()){t=e.getBoundingClientRect();const o=u(e,'top'),i=u(e,'left');t.top+=o,t.left+=i,t.bottom+=o,t.right+=i}else t=e.getBoundingClientRect()}catch(t){}const o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i='HTML'===e.nodeName?x():{},n=i.width||e.clientWidth||o.right-o.left,r=i.height||e.clientHeight||o.bottom-o.top;let p=e.offsetWidth-n,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 O(o)}function S(e,t){const o=y(),i='HTML'===t.nodeName,n=L(e),r=L(t),p=a(e),d=s(t),f=parseFloat(d.borderTopWidth,10),l=parseFloat(d.borderLeftWidth,10);let m=O({top:n.top-r.top-f,left:n.left-r.left-l,width:n.width,height:n.height});if(m.marginTop=0,m.marginLeft=0,!o&&i){const e=parseFloat(d.marginTop,10),t=parseFloat(d.marginLeft,10);m.top-=f-e,m.bottom-=f-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,i=S(e,o),n=t(o.clientWidth,window.innerWidth||0),r=t(o.clientHeight,window.innerHeight||0),p=u(o),d=u(o,'left'),s={top:p-i.top+i.marginTop,left:d-i.left+i.marginLeft,width:n,height:r};return O(s)}function D(e){const t=e.nodeName;return'BODY'===t||'HTML'===t?!1:!('fixed'!==s(e,'position'))||D(f(e))}function N(e,t,o,i,n=null){let r={top:0,left:0};const p=n||c(e,t);if('viewport'===i)r=T(p);else{let o;'scrollParent'===i?(o=a(f(t)),'BODY'===o.nodeName&&(o=e.ownerDocument.documentElement)):'window'===i?o=e.ownerDocument.documentElement:o=i;const n=S(o,p);if('HTML'===o.nodeName&&!D(p)){const{height:e,width:t}=x();r.top+=n.top-n.marginTop,r.bottom=e+n.top,r.left+=n.left-n.marginLeft,r.right=t+n.left}else r=n}return r.left+=o,r.top+=o,r.right-=o,r.bottom-=o,r}function C({width:e,height:t}){return e*t}function B(e,t,o,i,n,r=0){if(-1===e.indexOf('auto'))return e;const p=N(o,i,r,n,null),d={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},s=Object.keys(d).map((e)=>v({key:e},d[e],{area:C(d[e])})).sort((e,t)=>t.area-e.area),f=s.filter(({width:e,height:t})=>e>=o.clientWidth&&t>=o.clientHeight),a=0<f.length?f[0].key:s[0].key,l=e.split('-')[1];return a+(l?`-${l}`:'')}function W(e,t,o,i){const n=i||c(t,o);return S(o,n)}function P(e){const t=getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function H(e){const t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,(e)=>t[e])}function k(e,t,o){o=o.split('-')[0];const i=P(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',d=r?'left':'top',s=r?'height':'width',f=r?'width':'height';return n[p]=t[p]+t[s]/2-i[s]/2,n[d]=o===d?t[d]-i[f]:t[H(d)],n}function A(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,o){if(Array.prototype.findIndex)return e.findIndex((e)=>e[t]===o);const i=A(e,(e)=>e[t]===o);return e.indexOf(i)}function I(e,t,o){const i=void 0===o?e:e.slice(0,F(e,'name',o));return i.forEach((e)=>{e['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');const o=e['function']||e.fn;e.enabled&&d(o)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=o(t,e))}),t}function M(){if(this.state.isDestroyed)return;let e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=W(this.state,this.popper,this.reference,this.options.positionFixed?window.document.documentElement:void 0),e.placement=B(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=k(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=I(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}function R(e,t){return e.some(({name:e,enabled:o})=>o&&e===t)}function U(e){const t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1);for(let n=0;n<t.length-1;n++){const i=t[n],r=i?`${i}${o}`:e;if('undefined'!=typeof document.body.style[r])return r}return null}function Y(){return this.state.isDestroyed=!0,R(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[U('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function K(e){const t=e.ownerDocument;return t?t.defaultView:window}function j(e,t,o,i){const n='BODY'===e.nodeName,r=n?e.ownerDocument.defaultView:e;r.addEventListener(t,o,{passive:!0}),n||j(a(r.parentNode),t,o,i),i.push(r)}function V(e,t,o,i){o.updateBound=i,K(e).addEventListener('resize',o.updateBound,{passive:!0});const n=a(e);return j(n,'scroll',o.updateBound,o.scrollParents),o.scrollElement=n,o.eventsEnabled=!0,o}function z(){this.state.eventsEnabled||(this.state=V(this.reference,this.options,this.state,this.scheduleUpdate))}function G(e,t){return K(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach((e)=>{e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function q(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=G(this.reference,this.state))}function _(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function X(e,t){Object.keys(t).forEach((o)=>{let i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&_(t[o])&&(i='px'),e.style[o]=t[o]+i})}function J(e,t){Object.keys(t).forEach(function(o){const i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function Z(e){return X(e.instance.popper,e.styles),J(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&X(e.arrowElement,e.arrowStyles),e}function $(e,t,o,i,n){const r=W(n,t,e,o.positionFixed?window.document.documentElement:void 0),p=B(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),X(t,{position:o.positionFixed?'fixed':'absolute'}),o}function Q(e,t){var o=Math.floor;const{x:i,y:n}=t,{popper:r}=e.offsets,p=A(e.instance.modifiers,(e)=>'applyStyle'===e.name).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');const d=void 0===p?t.gpuAcceleration:p,s=l(e.instance.popper),f=L(s),a={position:r.position},m={left:o(r.left),top:o(r.top),bottom:o(r.bottom),right:o(r.right)},h='bottom'===i?'top':'bottom',c='right'===n?'left':'right',u=U('transform');let g,b;if(b='bottom'==h?-f.height+m.bottom:m.top,g='right'==c?-f.width+m.right:m.left,d&&u)a[u]=`translate3d(${g}px, ${b}px, 0)`,a[h]=0,a[c]=0,a.willChange='transform';else{const e='bottom'==h?-1:1,t='right'==c?-1:1;a[h]=b*e,a[c]=g*t,a.willChange=`${h}, ${c}`}const w={"x-placement":e.placement};return e.attributes=v({},w,e.attributes),e.styles=v({},a,e.styles),e.arrowStyles=v({},e.offsets.arrow,e.arrowStyles),e}function ee(e,t,o){const i=A(e,({name:e})=>e===t),n=!!i&&e.some((e)=>e.name===o&&e.enabled&&e.order<i.order);if(!n){const e=`\`${t}\``,i=`\`${o}\``;console.warn(`${i} modifier is required by ${e} modifier in order to work, be sure to include it before ${e}!`)}return n}function te(e,t){if(!ee(e.instance.modifiers,'arrow','keepTogether'))return e;let o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;const i=e.placement.split('-')[0],{popper:n,reference:r}=e.offsets,p=-1!==['left','right'].indexOf(i),d=p?'height':'width',f=p?'Top':'Left',a=f.toLowerCase(),l=p?'left':'top',m=p?'bottom':'right',h=P(o)[d];r[m]-h<n[a]&&(e.offsets.popper[a]-=n[a]-(r[m]-h)),r[a]+h>n[m]&&(e.offsets.popper[a]+=r[a]+h-n[m]),e.offsets.popper=O(e.offsets.popper);const c=r[a]+r[d]/2-h/2,u=s(e.instance.popper),g=parseFloat(u[`margin${f}`],10),b=parseFloat(u[`border${f}Width`],10);let w=c-e.offsets.popper[a]-g-b;return w=Math.max(Math.min(n[d]-h,w),0),e.arrowElement=o,e.offsets.arrow={[a]:Math.round(w),[l]:''},e}function oe(e){if('end'===e)return'start';return'start'===e?'end':e}var ie=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'];const ne=ie.slice(3);function re(e,t=!1){const o=ne.indexOf(e),i=ne.slice(o+1).concat(ne.slice(0,o));return t?i.reverse():i}const pe={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'};function de(e,t){if(R(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;const o=N(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,t.positionFixed?window.document.documentElement:void 0);let i=e.placement.split('-')[0],n=H(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case pe.FLIP:p=[i,n];break;case pe.CLOCKWISE:p=re(i);break;case pe.COUNTERCLOCKWISE:p=re(i,!0);break;default:p=t.behavior;}return p.forEach((d,s)=>{if(i!==d||p.length===s+1)return e;i=e.placement.split('-')[0],n=H(i);const f=e.offsets.popper,a=e.offsets.reference,l=Math.floor,m='left'===i&&l(f.right)>l(a.left)||'right'===i&&l(f.left)<l(a.right)||'top'===i&&l(f.bottom)>l(a.top)||'bottom'===i&&l(f.top)<l(a.bottom),h=l(f.left)<l(o.left),c=l(f.right)>l(o.right),u=l(f.top)<l(o.top),g=l(f.bottom)>l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&u||'bottom'===i&&g,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&u||!w&&'end'===r&&g);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[s+1]),y&&(r=oe(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=v({},e.offsets.popper,k(e.instance.popper,e.offsets.reference,e.placement)),e=I(e.instance.modifiers,e,'flip'))}),e}function se(e){const{popper:t,reference:o}=e.offsets,i=e.placement.split('-')[0],n=Math.floor,r=-1!==['top','bottom'].indexOf(i),p=r?'right':'bottom',d=r?'left':'top',s=r?'width':'height';return t[p]<n(o[d])&&(e.offsets.popper[d]=n(o[d])-t[s]),t[d]>n(o[p])&&(e.offsets.popper[d]=n(o[p])),e}function fe(e,t,o,i){var n=Math.max;const r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),p=+r[1],d=r[2];if(!p)return e;if(0===d.indexOf('%')){let e;switch(d){case'%p':e=o;break;case'%':case'%r':default:e=i;}const n=O(e);return n[t]/100*p}if('vh'===d||'vw'===d){let e;return e='vh'===d?n(document.documentElement.clientHeight,window.innerHeight||0):n(document.documentElement.clientWidth,window.innerWidth||0),e/100*p}return p}function ae(e,t,o,i){const n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map((e)=>e.trim()),d=p.indexOf(A(p,(e)=>-1!==e.search(/,|\s/)));p[d]&&-1===p[d].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');const s=/\s*,\s*|\s+/;let f=-1===d?[p]:[p.slice(0,d).concat([p[d].split(s)[0]]),[p[d].split(s)[1]].concat(p.slice(d+1))];return f=f.map((e,i)=>{const n=(1===i?!r:r)?'height':'width';let p=!1;return e.reduce((e,t)=>''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t),[]).map((e)=>fe(e,n,t,o))}),f.forEach((e,t)=>{e.forEach((o,i)=>{_(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}function le(e,{offset:t}){const{placement:o,offsets:{popper:i,reference:n}}=e,r=o.split('-')[0];let p;return p=_(+t)?[+t,0]:ae(t,i,n,r),'left'===r?(i.top+=p[0],i.left-=p[1]):'right'===r?(i.top+=p[0],i.left+=p[1]):'top'===r?(i.left+=p[0],i.top-=p[1]):'bottom'===r&&(i.left+=p[0],i.top+=p[1]),e.popper=i,e}function me(e,t){const o=e.positionFixed?window.document.documentElement:void 0;let i=t.boundariesElement||o||l(e.instance.popper);e.instance.reference===i&&(i=l(i));const n=N(e.instance.popper,e.instance.reference,t.padding,i,o);t.boundaries=n;const r=t.priority;let p=e.offsets.popper;const d={primary(e){let o=p[e];return p[e]<n[e]&&!t.escapeWithReference&&(o=Math.max(p[e],n[e])),{[e]:o}},secondary(e){const o='right'===e?'left':'top';let i=p[o];return p[e]>n[e]&&!t.escapeWithReference&&(i=Math.min(p[o],n[e]-('right'===e?p.width:p.height))),{[o]:i}}};return r.forEach((e)=>{const t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=v({},p,d[t](e))}),e.offsets.popper=p,e}function he(e){const t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){const{reference:t,popper:n}=e.offsets,r=-1!==['bottom','top'].indexOf(o),p=r?'left':'top',d=r?'width':'height',s={start:{[p]:t[p]},end:{[p]:t[p]+t[d]-n[d]}};e.offsets.popper=v({},n,s[i])}return e}function ce(e){if(!ee(e.instance.modifiers,'hide','preventOverflow'))return e;const t=e.offsets.reference,o=A(e.instance.modifiers,(e)=>'preventOverflow'===e.name).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}function ue(e){const t=e.placement,o=t.split('-')[0],{popper:i,reference:n}=e.offsets,r=-1!==['left','right'].indexOf(o),p=-1===['top','left'].indexOf(o);return i[r?'left':'top']=n[o]-(p?i[r?'width':'height']:0),e.placement=H(t),e.offsets.popper=O(i),e}var ge={shift:{order:100,enabled:!0,fn:he},offset:{order:200,enabled:!0,fn:le,offset:0},preventOverflow:{order:300,enabled:!0,fn:me,priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:se},arrow:{order:500,enabled:!0,fn:te,element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:de,behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:ue},hide:{order:800,enabled:!0,fn:ce},computeStyle:{order:850,enabled:!0,fn:Q,gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:Z,onLoad:$,gpuAcceleration:void 0}},be={placement:'bottom',positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:()=>{},onUpdate:()=>{},modifiers:ge};class we{constructor(e,t,o={}){this.scheduleUpdate=()=>requestAnimationFrame(this.update),this.update=p(this.update.bind(this)),this.options=v({},we.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(v({},we.Defaults.modifiers,o.modifiers)).forEach((e)=>{this.options.modifiers[e]=v({},we.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map((e)=>v({name:e},this.options.modifiers[e])).sort((e,t)=>e.order-t.order),this.modifiers.forEach((e)=>{e.enabled&&d(e.onLoad)&&e.onLoad(this.reference,this.popper,this.options,e,this.state)}),this.update();const i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}update(){return M.call(this)}destroy(){return Y.call(this)}enableEventListeners(){return z.call(this)}disableEventListeners(){return q.call(this)}}we.Utils=('undefined'==typeof window?global:window).PopperUtils,we.placements=ie,we.Defaults=be;export default we;
//# sourceMappingURL=popper.min.js.map

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。