mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
26 lines
26 KiB
JavaScript
26 lines
26 KiB
JavaScript
(window["RCDLjsonFunction"]=window["RCDLjsonFunction"]||[]).push([[53],{838:function(e,t,r){"use strict";(function(e){
|
|
/**!
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
* @version 1.14.6
|
|
* @license
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
var r=typeof window!=="undefined"&&typeof document!=="undefined";var n=["Edge","Trident","Firefox"];var o=0;for(var i=0;i<n.length;i+=1){if(r&&navigator.userAgent.indexOf(n[i])>=0){o=1;break}}function microtaskDebounce(e){var t=false;return function(){if(t){return}t=true;window.Promise.resolve().then((function(){t=false;e()}))}}function taskDebounce(e){var t=false;return function(){if(!t){t=true;setTimeout((function(){t=false;e()}),o)}}}var a=r&&window.Promise;var f=a?microtaskDebounce:taskDebounce;function isFunction(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function getStyleComputedProperty(e,t){if(e.nodeType!==1){return[]}var r=e.ownerDocument.defaultView;var n=r.getComputedStyle(e,null);return t?n[t]:n}function getParentNode(e){if(e.nodeName==="HTML"){return e}return e.parentNode||e.host}function getScrollParent(e){if(!e){return document.body}switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=getStyleComputedProperty(e),r=t.overflow,n=t.overflowX,o=t.overflowY;if(/(auto|scroll|overlay)/.test(r+o+n)){return e}return getScrollParent(getParentNode(e))}var s=r&&!!(window.MSInputMethodContext&&document.documentMode);var l=r&&/MSIE 10/.test(navigator.userAgent);function isIE(e){if(e===11){return s}if(e===10){return l}return s||l}function getOffsetParent(e){if(!e){return document.documentElement}var t=isIE(10)?document.body:null;var r=e.offsetParent||null;while(r===t&&e.nextElementSibling){r=(e=e.nextElementSibling).offsetParent}var n=r&&r.nodeName;if(!n||n==="BODY"||n==="HTML"){return e?e.ownerDocument.documentElement:document.documentElement}if(["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&getStyleComputedProperty(r,"position")==="static"){return getOffsetParent(r)}return r}function isOffsetContainer(e){var t=e.nodeName;if(t==="BODY"){return false}return t==="HTML"||getOffsetParent(e.firstElementChild)===e}function getRoot(e){if(e.parentNode!==null){return getRoot(e.parentNode)}return e}function findCommonOffsetParent(e,t){if(!e||!e.nodeType||!t||!t.nodeType){return document.documentElement}var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING;var n=r?e:t;var o=r?t:e;var i=document.createRange();i.setStart(n,0);i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||n.contains(o)){if(isOffsetContainer(a)){return a}return getOffsetParent(a)}var f=getRoot(e);if(f.host){return findCommonOffsetParent(f.host,t)}else{return findCommonOffsetParent(e,getRoot(t).host)}}function getScroll(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"top";var r=t==="top"?"scrollTop":"scrollLeft";var n=e.nodeName;if(n==="BODY"||n==="HTML"){var o=e.ownerDocument.documentElement;var i=e.ownerDocument.scrollingElement||o;return i[r]}return e[r]}function includeScroll(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var n=getScroll(t,"top");var o=getScroll(t,"left");var i=r?-1:1;e.top+=n*i;e.bottom+=n*i;e.left+=o*i;e.right+=o*i;return e}function getBordersSize(e,t){var r=t==="x"?"Left":"Top";var n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"],10)+parseFloat(e["border"+n+"Width"],10)}function getSize(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],isIE(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(e){var t=e.body;var r=e.documentElement;var n=isIE(10)&&getComputedStyle(r);return{height:getSize("Height",t,r,n),width:getSize("Width",t,r,n)}}var classCallCheck=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var p=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,r){if(t)defineProperties(e.prototype,t);if(r)defineProperties(e,r);return e}}();var defineProperty=function(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e};var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};function getClientRect(e){return u({},e,{right:e.left+e.width,bottom:e.top+e.height})}function getBoundingClientRect(e){var t={};try{if(isIE(10)){t=e.getBoundingClientRect();var r=getScroll(e,"top");var n=getScroll(e,"left");t.top+=r;t.left+=n;t.bottom+=r;t.right+=n}else{t=e.getBoundingClientRect()}}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top};var i=e.nodeName==="HTML"?getWindowSizes(e.ownerDocument):{};var a=i.width||e.clientWidth||o.right-o.left;var f=i.height||e.clientHeight||o.bottom-o.top;var s=e.offsetWidth-a;var l=e.offsetHeight-f;if(s||l){var p=getStyleComputedProperty(e);s-=getBordersSize(p,"x");l-=getBordersSize(p,"y");o.width-=s;o.height-=l}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var n=isIE(10);var o=t.nodeName==="HTML";var i=getBoundingClientRect(e);var a=getBoundingClientRect(t);var f=getScrollParent(e);var s=getStyleComputedProperty(t);var l=parseFloat(s.borderTopWidth,10);var p=parseFloat(s.borderLeftWidth,10);if(r&&o){a.top=Math.max(a.top,0);a.left=Math.max(a.left,0)}var u=getClientRect({top:i.top-a.top-l,left:i.left-a.left-p,width:i.width,height:i.height});u.marginTop=0;u.marginLeft=0;if(!n&&o){var d=parseFloat(s.marginTop,10);var c=parseFloat(s.marginLeft,10);u.top-=l-d;u.bottom-=l-d;u.left-=p-c;u.right-=p-c;u.marginTop=d;u.marginLeft=c}if(n&&!r?t.contains(f):t===f&&f.nodeName!=="BODY"){u=includeScroll(u,t)}return u}function getViewportOffsetRectRelativeToArtbitraryNode(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var r=e.ownerDocument.documentElement;var n=getOffsetRectRelativeToArbitraryNode(e,r);var o=Math.max(r.clientWidth,window.innerWidth||0);var i=Math.max(r.clientHeight,window.innerHeight||0);var a=!t?getScroll(r):0;var f=!t?getScroll(r,"left"):0;var s={top:a-n.top+n.marginTop,left:f-n.left+n.marginLeft,width:o,height:i};return getClientRect(s)}function isFixed(e){var t=e.nodeName;if(t==="BODY"||t==="HTML"){return false}if(getStyleComputedProperty(e,"position")==="fixed"){return true}return isFixed(getParentNode(e))}function getFixedPositionOffsetParent(e){if(!e||!e.parentElement||isIE()){return document.documentElement}var t=e.parentElement;while(t&&getStyleComputedProperty(t,"transform")==="none"){t=t.parentElement}return t||document.documentElement}function getBoundaries(e,t,r,n){var o=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var i={top:0,left:0};var a=o?getFixedPositionOffsetParent(e):findCommonOffsetParent(e,t);if(n==="viewport"){i=getViewportOffsetRectRelativeToArtbitraryNode(a,o)}else{var f=void 0;if(n==="scrollParent"){f=getScrollParent(getParentNode(t));if(f.nodeName==="BODY"){f=e.ownerDocument.documentElement}}else if(n==="window"){f=e.ownerDocument.documentElement}else{f=n}var s=getOffsetRectRelativeToArbitraryNode(f,a,o);if(f.nodeName==="HTML"&&!isFixed(a)){var l=getWindowSizes(e.ownerDocument),p=l.height,u=l.width;i.top+=s.top-s.marginTop;i.bottom=p+s.top;i.left+=s.left-s.marginLeft;i.right=u+s.left}else{i=s}}r=r||0;var d=typeof r==="number";i.left+=d?r:r.left||0;i.top+=d?r:r.top||0;i.right-=d?r:r.right||0;i.bottom-=d?r:r.bottom||0;return i}function getArea(e){var t=e.width,r=e.height;return t*r}function computeAutoPlacement(e,t,r,n,o){var i=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;if(e.indexOf("auto")===-1){return e}var a=getBoundaries(r,n,i,o);var f={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}};var s=Object.keys(f).map((function(e){return u({key:e},f[e],{area:getArea(f[e])})})).sort((function(e,t){return t.area-e.area}));var l=s.filter((function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight}));var p=l.length>0?l[0].key:s[0].key;var d=e.split("-")[1];return p+(d?"-"+d:"")}function getReferenceOffsets(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var o=n?getFixedPositionOffsetParent(t):findCommonOffsetParent(t,r);return getOffsetRectRelativeToArbitraryNode(r,o,n)}function getOuterSizes(e){var t=e.ownerDocument.defaultView;var r=t.getComputedStyle(e);var n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0);var o=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0);var i={width:e.offsetWidth+o,height:e.offsetHeight+n};return i}function getOppositePlacement(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function getPopperOffsets(e,t,r){r=r.split("-")[0];var n=getOuterSizes(e);var o={width:n.width,height:n.height};var i=["right","left"].indexOf(r)!==-1;var a=i?"top":"left";var f=i?"left":"top";var s=i?"height":"width";var l=!i?"height":"width";o[a]=t[a]+t[s]/2-n[s]/2;if(r===f){o[f]=t[f]-n[l]}else{o[f]=t[getOppositePlacement(f)]}return o}function find(e,t){if(Array.prototype.find){return e.find(t)}return e.filter(t)[0]}function findIndex(e,t,r){if(Array.prototype.findIndex){return e.findIndex((function(e){return e[t]===r}))}var n=find(e,(function(e){return e[t]===r}));return e.indexOf(n)}function runModifiers(e,t,r){var n=r===undefined?e:e.slice(0,findIndex(e,"name",r));n.forEach((function(e){if(e["function"]){console.warn("`modifier.function` is deprecated, use `modifier.fn`!")}var r=e["function"]||e.fn;if(e.enabled&&isFunction(r)){t.offsets.popper=getClientRect(t.offsets.popper);t.offsets.reference=getClientRect(t.offsets.reference);t=r(t,e)}}));return t}function update(){if(this.state.isDestroyed){return}var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}};e.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed);e.placement=computeAutoPlacement(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=getPopperOffsets(this.popper,e.offsets.reference,e.placement);e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";e=runModifiers(this.modifiers,e);if(!this.state.isCreated){this.state.isCreated=true;this.options.onCreate(e)}else{this.options.onUpdate(e)}}function isModifierEnabled(e,t){return e.some((function(e){var r=e.name,n=e.enabled;return n&&r===t}))}function getSupportedPropertyName(e){var t=[false,"ms","Webkit","Moz","O"];var r=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0;n<t.length;n++){var o=t[n];var i=o?""+o+r:e;if(typeof document.body.style[i]!=="undefined"){return i}}return null}function destroy(){this.state.isDestroyed=true;if(isModifierEnabled(this.modifiers,"applyStyle")){this.popper.removeAttribute("x-placement");this.popper.style.position="";this.popper.style.top="";this.popper.style.left="";this.popper.style.right="";this.popper.style.bottom="";this.popper.style.willChange="";this.popper.style[getSupportedPropertyName("transform")]=""}this.disableEventListeners();if(this.options.removeOnDestroy){this.popper.parentNode.removeChild(this.popper)}return this}function getWindow(e){var t=e.ownerDocument;return t?t.defaultView:window}function attachToScrollParents(e,t,r,n){var o=e.nodeName==="BODY";var i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,r,{passive:true});if(!o){attachToScrollParents(getScrollParent(i.parentNode),t,r,n)}n.push(i)}function setupEventListeners(e,t,r,n){r.updateBound=n;getWindow(e).addEventListener("resize",r.updateBound,{passive:true});var o=getScrollParent(e);attachToScrollParents(o,"scroll",r.updateBound,r.scrollParents);r.scrollElement=o;r.eventsEnabled=true;return r}function enableEventListeners(){if(!this.state.eventsEnabled){this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate)}}function removeEventListeners(e,t){getWindow(e).removeEventListener("resize",t.updateBound);t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)}));t.updateBound=null;t.scrollParents=[];t.scrollElement=null;t.eventsEnabled=false;return t}function disableEventListeners(){if(this.state.eventsEnabled){cancelAnimationFrame(this.scheduleUpdate);this.state=removeEventListeners(this.reference,this.state)}}function isNumeric(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function setStyles(e,t){Object.keys(t).forEach((function(r){var n="";if(["width","height","top","right","bottom","left"].indexOf(r)!==-1&&isNumeric(t[r])){n="px"}e.style[r]=t[r]+n}))}function setAttributes(e,t){Object.keys(t).forEach((function(r){var n=t[r];if(n!==false){e.setAttribute(r,t[r])}else{e.removeAttribute(r)}}))}function applyStyle(e){setStyles(e.instance.popper,e.styles);setAttributes(e.instance.popper,e.attributes);if(e.arrowElement&&Object.keys(e.arrowStyles).length){setStyles(e.arrowElement,e.arrowStyles)}return e}function applyStyleOnLoad(e,t,r,n,o){var i=getReferenceOffsets(o,t,e,r.positionFixed);var a=computeAutoPlacement(r.placement,i,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);t.setAttribute("x-placement",a);setStyles(t,{position:r.positionFixed?"fixed":"absolute"});return r}function getRoundedOffsets(e,t){var r=e.offsets,n=r.popper,o=r.reference;var i=["left","right"].indexOf(e.placement)!==-1;var a=e.placement.indexOf("-")!==-1;var f=o.width%2===n.width%2;var s=o.width%2===1&&n.width%2===1;var l=function noRound(e){return e};var p=!t?l:i||a||f?Math.round:Math.floor;var u=!t?l:Math.round;return{left:p(s&&!a&&t?n.left-1:n.left),top:u(n.top),bottom:u(n.bottom),right:p(n.right)}}var d=r&&/Firefox/i.test(navigator.userAgent);function computeStyle(e,t){var r=t.x,n=t.y;var o=e.offsets.popper;var i=find(e.instance.modifiers,(function(e){return e.name==="applyStyle"})).gpuAcceleration;if(i!==undefined){console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!")}var a=i!==undefined?i:t.gpuAcceleration;var f=getOffsetParent(e.instance.popper);var s=getBoundingClientRect(f);var l={position:o.position};var p=getRoundedOffsets(e,window.devicePixelRatio<2||!d);var c=r==="bottom"?"top":"bottom";var h=n==="right"?"left":"right";var v=getSupportedPropertyName("transform");var m=void 0,g=void 0;if(c==="bottom"){if(f.nodeName==="HTML"){g=-f.clientHeight+p.bottom}else{g=-s.height+p.bottom}}else{g=p.top}if(h==="right"){if(f.nodeName==="HTML"){m=-f.clientWidth+p.right}else{m=-s.width+p.right}}else{m=p.left}if(a&&v){l[v]="translate3d("+m+"px, "+g+"px, 0)";l[c]=0;l[h]=0;l.willChange="transform"}else{var b=c==="bottom"?-1:1;var w=h==="right"?-1:1;l[c]=g*b;l[h]=m*w;l.willChange=c+", "+h}var y={"x-placement":e.placement};e.attributes=u({},y,e.attributes);e.styles=u({},l,e.styles);e.arrowStyles=u({},e.offsets.arrow,e.arrowStyles);return e}function isModifierRequired(e,t,r){var n=find(e,(function(e){var r=e.name;return r===t}));var o=!!n&&e.some((function(e){return e.name===r&&e.enabled&&e.order<n.order}));if(!o){var i="`"+t+"`";var a="`"+r+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function arrow(e,t){var r;if(!isModifierRequired(e.instance.modifiers,"arrow","keepTogether")){return e}var n=t.element;if(typeof n==="string"){n=e.instance.popper.querySelector(n);if(!n){return e}}else{if(!e.instance.popper.contains(n)){console.warn("WARNING: `arrow.element` must be child of its popper element!");return e}}var o=e.placement.split("-")[0];var i=e.offsets,a=i.popper,f=i.reference;var s=["left","right"].indexOf(o)!==-1;var l=s?"height":"width";var p=s?"Top":"Left";var u=p.toLowerCase();var d=s?"left":"top";var c=s?"bottom":"right";var h=getOuterSizes(n)[l];if(f[c]-h<a[u]){e.offsets.popper[u]-=a[u]-(f[c]-h)}if(f[u]+h>a[c]){e.offsets.popper[u]+=f[u]+h-a[c]}e.offsets.popper=getClientRect(e.offsets.popper);var v=f[u]+f[l]/2-h/2;var m=getStyleComputedProperty(e.instance.popper);var g=parseFloat(m["margin"+p],10);var b=parseFloat(m["border"+p+"Width"],10);var w=v-e.offsets.popper[u]-g-b;w=Math.max(Math.min(a[l]-h,w),0);e.arrowElement=n;e.offsets.arrow=(r={},defineProperty(r,u,Math.round(w)),defineProperty(r,d,""),r);return e}function getOppositeVariation(e){if(e==="end"){return"start"}else if(e==="start"){return"end"}return e}var c=["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"];var h=c.slice(3);function clockwise(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var r=h.indexOf(e);var n=h.slice(r+1).concat(h.slice(0,r));return t?n.reverse():n}var v={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(e,t){if(isModifierEnabled(e.instance.modifiers,"inner")){return e}if(e.flipped&&e.placement===e.originalPlacement){return e}var r=getBoundaries(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed);var n=e.placement.split("-")[0];var o=getOppositePlacement(n);var i=e.placement.split("-")[1]||"";var a=[];switch(t.behavior){case v.FLIP:a=[n,o];break;case v.CLOCKWISE:a=clockwise(n);break;case v.COUNTERCLOCKWISE:a=clockwise(n,true);break;default:a=t.behavior}a.forEach((function(f,s){if(n!==f||a.length===s+1){return e}n=e.placement.split("-")[0];o=getOppositePlacement(n);var l=e.offsets.popper;var p=e.offsets.reference;var d=Math.floor;var c=n==="left"&&d(l.right)>d(p.left)||n==="right"&&d(l.left)<d(p.right)||n==="top"&&d(l.bottom)>d(p.top)||n==="bottom"&&d(l.top)<d(p.bottom);var h=d(l.left)<d(r.left);var v=d(l.right)>d(r.right);var m=d(l.top)<d(r.top);var g=d(l.bottom)>d(r.bottom);var b=n==="left"&&h||n==="right"&&v||n==="top"&&m||n==="bottom"&&g;var w=["top","bottom"].indexOf(n)!==-1;var y=!!t.flipVariations&&(w&&i==="start"&&h||w&&i==="end"&&v||!w&&i==="start"&&m||!w&&i==="end"&&g);if(c||b||y){e.flipped=true;if(c||b){n=a[s+1]}if(y){i=getOppositeVariation(i)}e.placement=n+(i?"-"+i:"");e.offsets.popper=u({},e.offsets.popper,getPopperOffsets(e.instance.popper,e.offsets.reference,e.placement));e=runModifiers(e.instance.modifiers,e,"flip")}}));return e}function keepTogether(e){var t=e.offsets,r=t.popper,n=t.reference;var o=e.placement.split("-")[0];var i=Math.floor;var a=["top","bottom"].indexOf(o)!==-1;var f=a?"right":"bottom";var s=a?"left":"top";var l=a?"width":"height";if(r[f]<i(n[s])){e.offsets.popper[s]=i(n[s])-r[l]}if(r[s]>i(n[f])){e.offsets.popper[s]=i(n[f])}return e}function toValue(e,t,r,n){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);var i=+o[1];var a=o[2];if(!i){return e}if(a.indexOf("%")===0){var f=void 0;switch(a){case"%p":f=r;break;case"%":case"%r":default:f=n}var s=getClientRect(f);return s[t]/100*i}else if(a==="vh"||a==="vw"){var l=void 0;if(a==="vh"){l=Math.max(document.documentElement.clientHeight,window.innerHeight||0)}else{l=Math.max(document.documentElement.clientWidth,window.innerWidth||0)}return l/100*i}else{return i}}function parseOffset(e,t,r,n){var o=[0,0];var i=["right","left"].indexOf(n)!==-1;var a=e.split(/(\+|\-)/).map((function(e){return e.trim()}));var f=a.indexOf(find(a,(function(e){return e.search(/,|\s/)!==-1})));if(a[f]&&a[f].indexOf(",")===-1){console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.")}var s=/\s*,\s*|\s+/;var l=f!==-1?[a.slice(0,f).concat([a[f].split(s)[0]]),[a[f].split(s)[1]].concat(a.slice(f+1))]:[a];l=l.map((function(e,n){var o=(n===1?!i:i)?"height":"width";var a=false;return e.reduce((function(e,t){if(e[e.length-1]===""&&["+","-"].indexOf(t)!==-1){e[e.length-1]=t;a=true;return e}else if(a){e[e.length-1]+=t;a=false;return e}else{return e.concat(t)}}),[]).map((function(e){return toValue(e,o,t,r)}))}));l.forEach((function(e,t){e.forEach((function(r,n){if(isNumeric(r)){o[t]+=r*(e[n-1]==="-"?-1:1)}}))}));return o}function offset(e,t){var r=t.offset;var n=e.placement,o=e.offsets,i=o.popper,a=o.reference;var f=n.split("-")[0];var s=void 0;if(isNumeric(+r)){s=[+r,0]}else{s=parseOffset(r,i,a,f)}if(f==="left"){i.top+=s[0];i.left-=s[1]}else if(f==="right"){i.top+=s[0];i.left+=s[1]}else if(f==="top"){i.left+=s[0];i.top-=s[1]}else if(f==="bottom"){i.left+=s[0];i.top+=s[1]}e.popper=i;return e}function preventOverflow(e,t){var r=t.boundariesElement||getOffsetParent(e.instance.popper);if(e.instance.reference===r){r=getOffsetParent(r)}var n=getSupportedPropertyName("transform");var o=e.instance.popper.style;var i=o.top,a=o.left,f=o[n];o.top="";o.left="";o[n]="";var s=getBoundaries(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);o.top=i;o.left=a;o[n]=f;t.boundaries=s;var l=t.priority;var p=e.offsets.popper;var d={primary:function primary(e){var r=p[e];if(p[e]<s[e]&&!t.escapeWithReference){r=Math.max(p[e],s[e])}return defineProperty({},e,r)},secondary:function secondary(e){var r=e==="right"?"left":"top";var n=p[r];if(p[e]>s[e]&&!t.escapeWithReference){n=Math.min(p[r],s[e]-(e==="right"?p.width:p.height))}return defineProperty({},r,n)}};l.forEach((function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";p=u({},p,d[t](e))}));e.offsets.popper=p;return e}function shift(e){var t=e.placement;var r=t.split("-")[0];var n=t.split("-")[1];if(n){var o=e.offsets,i=o.reference,a=o.popper;var f=["bottom","top"].indexOf(r)!==-1;var s=f?"left":"top";var l=f?"width":"height";var p={start:defineProperty({},s,i[s]),end:defineProperty({},s,i[s]+i[l]-a[l])};e.offsets.popper=u({},a,p[n])}return e}function hide(e){if(!isModifierRequired(e.instance.modifiers,"hide","preventOverflow")){return e}var t=e.offsets.reference;var r=find(e.instance.modifiers,(function(e){return e.name==="preventOverflow"})).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===true){return e}e.hide=true;e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===false){return e}e.hide=false;e.attributes["x-out-of-boundaries"]=false}return e}function inner(e){var t=e.placement;var r=t.split("-")[0];var n=e.offsets,o=n.popper,i=n.reference;var a=["left","right"].indexOf(r)!==-1;var f=["top","left"].indexOf(r)===-1;o[a?"left":"top"]=i[r]-(f?o[a?"width":"height"]:0);e.placement=getOppositePlacement(t);e.offsets.popper=getClientRect(o);return e}var m={shift:{order:100,enabled:true,fn:shift},offset:{order:200,enabled:true,fn:offset,offset:0},preventOverflow:{order:300,enabled:true,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:true,fn:keepTogether},arrow:{order:500,enabled:true,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:true,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:false,fn:inner},hide:{order:800,enabled:true,fn:hide},computeStyle:{order:850,enabled:true,fn:computeStyle,gpuAcceleration:true,x:"bottom",y:"right"},applyStyle:{order:900,enabled:true,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:undefined}};var g={placement:"bottom",positionFixed:false,eventsEnabled:true,removeOnDestroy:false,onCreate:function onCreate(){},onUpdate:function onUpdate(){},modifiers:m};var b=function(){function Popper(e,t){var r=this;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};classCallCheck(this,Popper);this.scheduleUpdate=function(){return requestAnimationFrame(r.update)};this.update=f(this.update.bind(this));this.options=u({},Popper.Defaults,n);this.state={isDestroyed:false,isCreated:false,scrollParents:[]};this.reference=e&&e.jquery?e[0]:e;this.popper=t&&t.jquery?t[0]:t;this.options.modifiers={};Object.keys(u({},Popper.Defaults.modifiers,n.modifiers)).forEach((function(e){r.options.modifiers[e]=u({},Popper.Defaults.modifiers[e]||{},n.modifiers?n.modifiers[e]:{})}));this.modifiers=Object.keys(this.options.modifiers).map((function(e){return u({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order}));this.modifiers.forEach((function(e){if(e.enabled&&isFunction(e.onLoad)){e.onLoad(r.reference,r.popper,r.options,e,r.state)}}));this.update();var o=this.options.eventsEnabled;if(o){this.enableEventListeners()}this.state.eventsEnabled=o}p(Popper,[{key:"update",value:function update$$1(){return update.call(this)}},{key:"destroy",value:function destroy$$1(){return destroy.call(this)}},{key:"enableEventListeners",value:function enableEventListeners$$1(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function disableEventListeners$$1(){return disableEventListeners.call(this)}}]);return Popper}();b.Utils=(typeof window!=="undefined"?window:e).PopperUtils;b.placements=c;b.Defaults=g;t["a"]=b}).call(this,r(100))}}]); |