@popperjs/core
Advanced tools
Comparing version 2.2.1 to 2.2.2
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -152,8 +152,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -160,0 +163,0 @@ |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -152,8 +152,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -899,4 +902,3 @@ | ||
if (process.env.NODE_ENV !== "production") { | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -977,3 +979,3 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -980,0 +982,0 @@ top: '0', |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -152,8 +152,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -909,4 +912,3 @@ | ||
if (process.env.NODE_ENV !== "production") { | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -987,3 +989,3 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -990,0 +992,0 @@ top: '0', |
import getNodeName from "./getNodeName.js"; | ||
import getDocumentElement from "./getDocumentElement.js"; | ||
export default function getParentNode(element) { | ||
@@ -7,8 +8,11 @@ if (getNodeName(element) === 'html') { | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} |
@@ -36,3 +36,3 @@ import getNodeName from "../dom-utils/getNodeName.js"; | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -39,0 +39,0 @@ top: '0', |
@@ -93,4 +93,3 @@ import { top, left, right, bottom } from "../enums.js"; | ||
if (false) { | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -97,0 +96,0 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -154,8 +154,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -162,0 +165,0 @@ |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function o(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)?t.defaultView:window:t}function n(t){return{scrollLeft:(t=o(t)).pageXOffset,scrollTop:t.pageYOffset}}function r(t){return t instanceof o(t).Element||t instanceof Element}function i(t){return t instanceof o(t).HTMLElement||t instanceof HTMLElement}function f(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return(r(t)?t.ownerDocument:t.document).documentElement}function c(t){return e(a(t)).left+n(t).scrollLeft}function s(t,r,s){void 0===s&&(s=!1),t=e(t);var u={scrollLeft:0,scrollTop:0},d={x:0,y:0};return s||("body"!==f(r)&&(u=r!==o(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:n(r)),i(r)?((d=e(r)).x+=r.clientLeft,d.y+=r.clientTop):(r=a(r))&&(d.x=c(r))),{x:t.left+u.scrollLeft-d.x,y:t.top+u.scrollTop-d.y,width:t.width,height:t.height}}function u(t){return"html"===f(t)?t:t.parentNode||t.host||document.ownerDocument||document.documentElement}function d(t){return o(t).getComputedStyle(t)}function l(t,e){void 0===e&&(e=[]);var n=function t(e){if(0<=["html","body","#document"].indexOf(f(e)))return e.ownerDocument.body;if(i(e)){var o=d(e);if(/auto|scroll|overlay|hidden/.test(o.overflow+o.overflowY+o.overflowX))return e}return t(u(e))}(t);return n=(t="body"===f(n))?o(n):n,e=e.concat(n),t?e:e.concat(l(u(n)))}function p(t){return i(t)&&"fixed"!==d(t).position?t.offsetParent:null}function h(t){var e=o(t);for(t=p(t);t&&0<=["table","td","th"].indexOf(f(t));)t=p(t);return t&&"body"===f(t)&&"static"===d(t).position?e:t||e}function m(t){var e=new Map,o=new Set,n=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||function t(r){o.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(n){o.has(n)||(n=e.get(n))&&t(n)})),n.push(r)}(t)})),n}function g(t){var e;return function(){return e||(e=new Promise((function(o){Promise.resolve().then((function(){e=void 0,o(t())}))}))),e}}function b(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function v(t){void 0===t&&(t={});var e=t.defaultModifiers,o=void 0===e?[]:e,n=void 0===(t=t.defaultOptions)?E:t;return function(t,e,i){function f(){c.forEach((function(t){return t()})),c=[]}void 0===i&&(i=n);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},E,{},n),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,d={state:a,setOptions:function(i){return f(),a.options=Object.assign({},n,{},a.options,{},i),a.scrollParents={reference:r(t)?l(t):t.contextElement?l(t.contextElement):[],popper:l(e)},i=function(t){var e=m(t);return M.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}(function(t){var e=t.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,{},e,{options:Object.assign({},o.options,{},e.options),data:Object.assign({},o.data,{},e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(o,a.options.modifiers))),a.orderedModifiers=i.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,o=t.options;o=void 0===o?{}:o,"function"==typeof(t=t.effect)&&(e=t({state:a,name:e,instance:d,options:o}),c.push(e||function(){}))})),d.update()},forceUpdate:function(){if(!u){var t=a.elements,e=t.reference;if(b(e,t=t.popper))for(a.rects={reference:s(e,h(t),"fixed"===a.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<a.orderedModifiers.length;e++)if(!0===a.reset)a.reset=!1,e=-1;else{var o=a.orderedModifiers[e];t=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof t&&(a=t({state:a,options:n,name:o,instance:d})||a)}}},update:g((function(){return new Promise((function(t){d.forceUpdate(),t(a)}))})),destroy:function(){f(),u=!0}};return b(t,e)?(d.setOptions(i).then((function(t){!u&&i.onFirstUpdate&&i.onFirstUpdate(t)})),d):d}}function y(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x(t,r){if("viewport"===r)t=y({width:(t=o(t)).innerWidth,height:t.innerHeight,x:0,y:0});else if(i(r))t=e(r);else{var f=a(t);t=o(f),r=n(f),(f=s(a(f),t)).height=Math.max(f.height,t.innerHeight),f.width=Math.max(f.width,t.innerWidth),f.x=-r.scrollLeft,f.y=-r.scrollTop,t=y(f)}return t}function w(t,e,n){return e="clippingParents"===e?function(t){var e=l(t),o=0<=["absolute","fixed"].indexOf(d(t).position)&&i(t)?h(t):t;return r(o)?e.filter((function(t){var e;if(e=r(t))t:if(e=!(!o.getRootNode||!o.getRootNode().host),t.contains(o))e=!0;else{if(e){e=o;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e})):[]}(t):[].concat(e),(n=(n=[].concat(e,[n])).reduce((function(e,n){var r=x(t,n),s=o(n=i(n)?n:a(t)),u=i(n)?d(n):{};parseFloat(u.borderTopWidth);var l=parseFloat(u.borderRightWidth)||0,p=parseFloat(u.borderBottomWidth)||0,h=parseFloat(u.borderLeftWidth)||0;u="html"===f(n);var m=c(n),g=n.clientWidth+l,b=n.clientHeight+p;return u&&50<s.innerHeight-n.clientHeight&&(b=s.innerHeight-p),p=u?0:n.clientTop,l=n.clientLeft>h?l:u?s.innerWidth-g-m:n.offsetWidth-g,s=u?s.innerHeight-b:n.offsetHeight-b,n=u?m:n.clientLeft,e.top=Math.max(r.top+p,e.top),e.right=Math.min(r.right-l,e.right),e.bottom=Math.min(r.bottom-s,e.bottom),e.left=Math.max(r.left+n,e.left),e}),x(t,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var O=["top","bottom","right","left"],M="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),E={placement:"bottom",modifiers:[],strategy:"absolute"},L=v();t.createPopper=L,t.detectOverflow=function(t,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?t.placement:o;var i=n.boundary,f=void 0===i?"clippingParents":i,c=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var s=n.altBoundary,u=void 0!==s&&s;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},{},"number"!=typeof n?n:function(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}(n,O));var d=t.elements.reference;s=t.rects.popper,f=w(r(u=t.elements[u?"popper"===i?"reference":"popper":i])?u:u.contextElement||a(t.elements.popper),f,c),u=function(t){var e=t.reference,o=t.element,n=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var r=e.x+e.width/2-o.width/2,i=e.y+e.height/2-o.height/2;switch(n){case"top":r={x:r,y:e.y-o.height};break;case"bottom":r={x:r,y:e.y+e.height};break;case"right":r={x:e.x+e.width,y:i};break;case"left":r={x:e.x-o.width,y:i};break;default:r={x:e.x,y:e.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(i="y"===n?"height":"width",t){case"start":r[n]=Math.floor(r[n])-Math.floor(e[i]/2-o[i]/2);break;case"end":r[n]=Math.floor(r[n])+Math.ceil(e[i]/2-o[i]/2)}return r}({reference:c=e(d),element:s,strategy:"absolute",placement:o}),s=y(Object.assign({},s,{},u)),c="popper"===i?s:c;var l={top:f.top-c.top+n.top,bottom:c.bottom-f.bottom+n.bottom,left:f.left-c.left+n.left,right:c.right-f.right+n.right};if(t=t.modifiersData.offset,"popper"===i&&t){var p=t[o];Object.keys(l).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,o=0<=["top","bottom"].indexOf(t)?"y":"x";l[t]+=p[o]*e}))}return l},t.popperGenerator=v,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function o(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)?t.defaultView:window:t}function n(t){return{scrollLeft:(t=o(t)).pageXOffset,scrollTop:t.pageYOffset}}function r(t){return t instanceof o(t).Element||t instanceof Element}function i(t){return t instanceof o(t).HTMLElement||t instanceof HTMLElement}function f(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return(r(t)?t.ownerDocument:t.document).documentElement}function c(t){return e(a(t)).left+n(t).scrollLeft}function s(t,r,s){void 0===s&&(s=!1),t=e(t);var u={scrollLeft:0,scrollTop:0},d={x:0,y:0};return s||("body"!==f(r)&&(u=r!==o(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:n(r)),i(r)?((d=e(r)).x+=r.clientLeft,d.y+=r.clientTop):(r=a(r))&&(d.x=c(r))),{x:t.left+u.scrollLeft-d.x,y:t.top+u.scrollTop-d.y,width:t.width,height:t.height}}function u(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||t.host||a(t)}function d(t){return o(t).getComputedStyle(t)}function l(t,e){void 0===e&&(e=[]);var n=function t(e){if(0<=["html","body","#document"].indexOf(f(e)))return e.ownerDocument.body;if(i(e)){var o=d(e);if(/auto|scroll|overlay|hidden/.test(o.overflow+o.overflowY+o.overflowX))return e}return t(u(e))}(t);return n=(t="body"===f(n))?o(n):n,e=e.concat(n),t?e:e.concat(l(u(n)))}function p(t){return i(t)&&"fixed"!==d(t).position?t.offsetParent:null}function h(t){var e=o(t);for(t=p(t);t&&0<=["table","td","th"].indexOf(f(t));)t=p(t);return t&&"body"===f(t)&&"static"===d(t).position?e:t||e}function m(t){var e=new Map,o=new Set,n=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||function t(r){o.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(n){o.has(n)||(n=e.get(n))&&t(n)})),n.push(r)}(t)})),n}function g(t){var e;return function(){return e||(e=new Promise((function(o){Promise.resolve().then((function(){e=void 0,o(t())}))}))),e}}function b(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function v(t){void 0===t&&(t={});var e=t.defaultModifiers,o=void 0===e?[]:e,n=void 0===(t=t.defaultOptions)?E:t;return function(t,e,i){function f(){c.forEach((function(t){return t()})),c=[]}void 0===i&&(i=n);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},E,{},n),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,d={state:a,setOptions:function(i){return f(),a.options=Object.assign({},n,{},a.options,{},i),a.scrollParents={reference:r(t)?l(t):t.contextElement?l(t.contextElement):[],popper:l(e)},i=function(t){var e=m(t);return M.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}(function(t){var e=t.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,{},e,{options:Object.assign({},o.options,{},e.options),data:Object.assign({},o.data,{},e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(o,a.options.modifiers))),a.orderedModifiers=i.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,o=t.options;o=void 0===o?{}:o,"function"==typeof(t=t.effect)&&(e=t({state:a,name:e,instance:d,options:o}),c.push(e||function(){}))})),d.update()},forceUpdate:function(){if(!u){var t=a.elements,e=t.reference;if(b(e,t=t.popper))for(a.rects={reference:s(e,h(t),"fixed"===a.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<a.orderedModifiers.length;e++)if(!0===a.reset)a.reset=!1,e=-1;else{var o=a.orderedModifiers[e];t=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof t&&(a=t({state:a,options:n,name:o,instance:d})||a)}}},update:g((function(){return new Promise((function(t){d.forceUpdate(),t(a)}))})),destroy:function(){f(),u=!0}};return b(t,e)?(d.setOptions(i).then((function(t){!u&&i.onFirstUpdate&&i.onFirstUpdate(t)})),d):d}}function y(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x(t,r){if("viewport"===r)t=y({width:(t=o(t)).innerWidth,height:t.innerHeight,x:0,y:0});else if(i(r))t=e(r);else{var f=a(t);t=o(f),r=n(f),(f=s(a(f),t)).height=Math.max(f.height,t.innerHeight),f.width=Math.max(f.width,t.innerWidth),f.x=-r.scrollLeft,f.y=-r.scrollTop,t=y(f)}return t}function w(t,e,n){return e="clippingParents"===e?function(t){var e=l(t),o=0<=["absolute","fixed"].indexOf(d(t).position)&&i(t)?h(t):t;return r(o)?e.filter((function(t){var e;if(e=r(t))t:if(e=!(!o.getRootNode||!o.getRootNode().host),t.contains(o))e=!0;else{if(e){e=o;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e})):[]}(t):[].concat(e),(n=(n=[].concat(e,[n])).reduce((function(e,n){var r=x(t,n),s=o(n=i(n)?n:a(t)),u=i(n)?d(n):{};parseFloat(u.borderTopWidth);var l=parseFloat(u.borderRightWidth)||0,p=parseFloat(u.borderBottomWidth)||0,h=parseFloat(u.borderLeftWidth)||0;u="html"===f(n);var m=c(n),g=n.clientWidth+l,b=n.clientHeight+p;return u&&50<s.innerHeight-n.clientHeight&&(b=s.innerHeight-p),p=u?0:n.clientTop,l=n.clientLeft>h?l:u?s.innerWidth-g-m:n.offsetWidth-g,s=u?s.innerHeight-b:n.offsetHeight-b,n=u?m:n.clientLeft,e.top=Math.max(r.top+p,e.top),e.right=Math.min(r.right-l,e.right),e.bottom=Math.min(r.bottom-s,e.bottom),e.left=Math.max(r.left+n,e.left),e}),x(t,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var O=["top","bottom","right","left"],M="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),E={placement:"bottom",modifiers:[],strategy:"absolute"},L=v();t.createPopper=L,t.detectOverflow=function(t,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?t.placement:o;var i=n.boundary,f=void 0===i?"clippingParents":i,c=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var s=n.altBoundary,u=void 0!==s&&s;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},{},"number"!=typeof n?n:function(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}(n,O));var d=t.elements.reference;s=t.rects.popper,f=w(r(u=t.elements[u?"popper"===i?"reference":"popper":i])?u:u.contextElement||a(t.elements.popper),f,c),u=function(t){var e=t.reference,o=t.element,n=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var r=e.x+e.width/2-o.width/2,i=e.y+e.height/2-o.height/2;switch(n){case"top":r={x:r,y:e.y-o.height};break;case"bottom":r={x:r,y:e.y+e.height};break;case"right":r={x:e.x+e.width,y:i};break;case"left":r={x:e.x-o.width,y:i};break;default:r={x:e.x,y:e.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(i="y"===n?"height":"width",t){case"start":r[n]=Math.floor(r[n])-Math.floor(e[i]/2-o[i]/2);break;case"end":r[n]=Math.floor(r[n])+Math.ceil(e[i]/2-o[i]/2)}return r}({reference:c=e(d),element:s,strategy:"absolute",placement:o}),s=y(Object.assign({},s,{},u)),c="popper"===i?s:c;var l={top:f.top-c.top+n.top,bottom:c.bottom-f.bottom+n.bottom,left:f.left-c.left+n.left,right:c.right-f.right+n.right};if(t=t.modifiersData.offset,"popper"===i&&t){var p=t[o];Object.keys(l).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,o=0<=["top","bottom"].indexOf(t)?"y":"x";l[t]+=p[o]*e}))}return l},t.popperGenerator=v,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-base.min.js.map |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -154,8 +154,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -901,4 +904,3 @@ | ||
{ | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -979,3 +981,3 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -982,0 +984,0 @@ top: '0', |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(r(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+o(e).scrollLeft}function c(e,r,c){void 0===c&&(c=!1),e=t(e);var p={scrollLeft:0,scrollTop:0},l={x:0,y:0};return c||("body"!==a(r)&&(p=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((l=t(r)).x+=r.clientLeft,l.y+=r.clientTop):(r=s(r))&&(l.x=f(r))),{x:e.left+p.scrollLeft-l.x,y:e.top+p.scrollTop-l.y,width:e.width,height:e.height}}function p(e){return"html"===a(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function l(e){return n(e).getComputedStyle(e)}function u(e,t){void 0===t&&(t=[]);var o=function e(t){if(0<=["html","body","#document"].indexOf(a(t)))return t.ownerDocument.body;if(i(t)){var n=l(t);if(/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX))return t}return e(p(t))}(e);return o=(e="body"===a(o))?n(o):o,t=t.concat(o),e?t:t.concat(u(p(o)))}function d(e){return i(e)&&"fixed"!==l(e).position?e.offsetParent:null}function h(e){var t=n(e);for(e=d(e);e&&0<=["table","td","th"].indexOf(a(e));)e=d(e);return e&&"body"===a(e)&&"static"===l(e).position?t:e||t}function m(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=t.get(o))&&e(o)})),o.push(r)}(e)})),o}function b(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function g(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function v(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?L:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=o);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},L,{},o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,l={state:s,setOptions:function(i){return a(),s.options=Object.assign({},o,{},s.options,{},i),s.scrollParents={reference:r(e)?u(e):e.contextElement?u(e.contextElement):[],popper:u(t)},i=function(e){var t=m(e);return M.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,{},t,{options:Object.assign({},n.options,{},t.options),data:Object.assign({},n.data,{},t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:l,options:n}),f.push(t||function(){}))})),l.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(g(t,e=e.popper))for(s.rects={reference:c(t,h(e),"fixed"===s.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:l})||s)}}},update:b((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return g(e,t)?(l.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l):l}}function y(e){var t=e.reference,n=e.element,o=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(i="y"===o?"height":"width",e){case"start":r[o]=Math.floor(r[o])-Math.floor(t[i]/2-n[i]/2);break;case"end":r[o]=Math.floor(r[o])+Math.ceil(t[i]/2-n[i]/2)}return r}function w(e){var t,o=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive,l=window.devicePixelRatio||1;e=Math.round(a.x*l)/l||0,l=Math.round(a.y*l)/l||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",b="top",g=window;if(p){var v=h(o);v===n(o)&&(v=s(o)),"top"===i&&(b="bottom",l-=v.clientHeight-r.height,l*=c?1:-1),"left"===i&&(m="right",e-=v.clientWidth-r.width,e*=c?1:-1)}return o=Object.assign({position:f},p&&W),c?Object.assign({},o,((d={})[b]=a?"0":"",d[m]=u?"0":"",d.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign({},o,((t={})[b]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function x(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O(e,r){if("viewport"===r)e=x({width:(e=n(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(r))e=t(r);else{var a=s(e);e=n(a),r=o(a),(a=c(s(a),e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-r.scrollLeft,a.y=-r.scrollTop,e=x(a)}return e}function j(e,t,o){return t="clippingParents"===t?function(e){var t=u(e),n=0<=["absolute","fixed"].indexOf(l(e).position)&&i(e)?h(e):e;return r(n)?t.filter((function(e){var t;if(t=r(e))e:if(t=!(!n.getRootNode||!n.getRootNode().host),e.contains(n))t=!0;else{if(t){t=n;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t})):[]}(e):[].concat(t),(o=(o=[].concat(t,[o])).reduce((function(t,o){var r=O(e,o),c=n(o=i(o)?o:s(e)),p=i(o)?l(o):{};parseFloat(p.borderTopWidth);var u=parseFloat(p.borderRightWidth)||0,d=parseFloat(p.borderBottomWidth)||0,h=parseFloat(p.borderLeftWidth)||0;p="html"===a(o);var m=f(o),b=o.clientWidth+u,g=o.clientHeight+d;return p&&50<c.innerHeight-o.clientHeight&&(g=c.innerHeight-d),d=p?0:o.clientTop,u=o.clientLeft>h?u:p?c.innerWidth-b-m:o.offsetWidth-b,c=p?c.innerHeight-g:o.offsetHeight-g,o=p?m:o.clientLeft,t.top=Math.max(r.top+d,t.top),t.right=Math.min(r.right-u,t.right),t.bottom=Math.min(r.bottom-c,t.bottom),t.left=Math.max(r.left+o,t.left),t}),O(e,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var E=["top","bottom","right","left"],M="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),L={placement:"bottom",modifiers:[],strategy:"absolute"},P={passive:!0},W={top:"auto",right:"auto",bottom:"auto",left:"auto"},k=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,P)})),a&&s.addEventListener("resize",o.update,P),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,P)})),a&&s.removeEventListener("resize",o.update,P)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},w(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},w(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];i(r)&&a(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:"absolute",left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&a(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],H=v({defaultModifiers:k});e.createPopper=H,e.defaultModifiers=k,e.detectOverflow=function(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var c=o.altBoundary,p=void 0!==c&&c;o=void 0===(o=o.padding)?0:o,o=Object.assign({},{top:0,right:0,bottom:0,left:0},{},"number"!=typeof o?o:function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}(o,E));var l=e.elements.reference;c=e.rects.popper,a=j(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=y({reference:f=t(l),element:c,strategy:"absolute",placement:n}),c=x(Object.assign({},c,{},p)),f="popper"===i?c:f;var u={top:a.top-f.top+o.top,bottom:f.bottom-a.bottom+o.bottom,left:a.left-f.left+o.left,right:f.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u},e.popperGenerator=v,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function o(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function n(e){return{scrollLeft:(e=o(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof o(e).Element||e instanceof Element}function i(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(r(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+n(e).scrollLeft}function c(e,r,c){void 0===c&&(c=!1),e=t(e);var p={scrollLeft:0,scrollTop:0},l={x:0,y:0};return c||("body"!==a(r)&&(p=r!==o(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:n(r)),i(r)?((l=t(r)).x+=r.clientLeft,l.y+=r.clientTop):(r=s(r))&&(l.x=f(r))),{x:e.left+p.scrollLeft-l.x,y:e.top+p.scrollTop-l.y,width:e.width,height:e.height}}function p(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function l(e){return o(e).getComputedStyle(e)}function u(e,t){void 0===t&&(t=[]);var n=function e(t){if(0<=["html","body","#document"].indexOf(a(t)))return t.ownerDocument.body;if(i(t)){var o=l(t);if(/auto|scroll|overlay|hidden/.test(o.overflow+o.overflowY+o.overflowX))return t}return e(p(t))}(e);return n=(e="body"===a(n))?o(n):n,t=t.concat(n),e?t:t.concat(u(p(n)))}function d(e){return i(e)&&"fixed"!==l(e).position?e.offsetParent:null}function h(e){var t=o(e);for(e=d(e);e&&0<=["table","td","th"].indexOf(a(e));)e=d(e);return e&&"body"===a(e)&&"static"===l(e).position?t:e||t}function m(e){var t=new Map,o=new Set,n=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||function e(r){o.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(n){o.has(n)||(n=t.get(n))&&e(n)})),n.push(r)}(e)})),n}function b(e){var t;return function(){return t||(t=new Promise((function(o){Promise.resolve().then((function(){t=void 0,o(e())}))}))),t}}function g(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function v(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?L:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},L,{},n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,l={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,{},s.options,{},i),s.scrollParents={reference:r(e)?u(e):e.contextElement?u(e.contextElement):[],popper:u(t)},i=function(e){var t=m(e);return E.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}(function(e){var t=e.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,{},t,{options:Object.assign({},o.options,{},t.options),data:Object.assign({},o.data,{},t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,o=e.options;o=void 0===o?{}:o,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:l,options:o}),f.push(t||function(){}))})),l.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(g(t,e=e.popper))for(s.rects={reference:c(t,h(e),"fixed"===s.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var o=s.orderedModifiers[t];e=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof e&&(s=e({state:s,options:n,name:o,instance:l})||s)}}},update:b((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return g(e,t)?(l.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l):l}}function y(e){var t=e.reference,o=e.element,n=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2;switch(n){case"top":r={x:r,y:t.y-o.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-o.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(i="y"===n?"height":"width",e){case"start":r[n]=Math.floor(r[n])-Math.floor(t[i]/2-o[i]/2);break;case"end":r[n]=Math.floor(r[n])+Math.ceil(t[i]/2-o[i]/2)}return r}function w(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive,l=window.devicePixelRatio||1;e=Math.round(a.x*l)/l||0,l=Math.round(a.y*l)/l||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",b="top",g=window;if(p){var v=h(n);v===o(n)&&(v=s(n)),"top"===i&&(b="bottom",l-=v.clientHeight-r.height,l*=c?1:-1),"left"===i&&(m="right",e-=v.clientWidth-r.width,e*=c?1:-1)}return n=Object.assign({position:f},p&&W),c?Object.assign({},n,((d={})[b]=a?"0":"",d[m]=u?"0":"",d.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign({},n,((t={})[b]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function x(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O(e,r){if("viewport"===r)e=x({width:(e=o(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(r))e=t(r);else{var a=s(e);e=o(a),r=n(a),(a=c(s(a),e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-r.scrollLeft,a.y=-r.scrollTop,e=x(a)}return e}function j(e,t,n){return t="clippingParents"===t?function(e){var t=u(e),o=0<=["absolute","fixed"].indexOf(l(e).position)&&i(e)?h(e):e;return r(o)?t.filter((function(e){var t;if(t=r(e))e:if(t=!(!o.getRootNode||!o.getRootNode().host),e.contains(o))t=!0;else{if(t){t=o;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){var r=O(e,n),c=o(n=i(n)?n:s(e)),p=i(n)?l(n):{};parseFloat(p.borderTopWidth);var u=parseFloat(p.borderRightWidth)||0,d=parseFloat(p.borderBottomWidth)||0,h=parseFloat(p.borderLeftWidth)||0;p="html"===a(n);var m=f(n),b=n.clientWidth+u,g=n.clientHeight+d;return p&&50<c.innerHeight-n.clientHeight&&(g=c.innerHeight-d),d=p?0:n.clientTop,u=n.clientLeft>h?u:p?c.innerWidth-b-m:n.offsetWidth-b,c=p?c.innerHeight-g:n.offsetHeight-g,n=p?m:n.clientLeft,t.top=Math.max(r.top+d,t.top),t.right=Math.min(r.right-u,t.right),t.bottom=Math.min(r.bottom-c,t.bottom),t.left=Math.max(r.left+n,t.left),t}),O(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var M=["top","bottom","right","left"],E="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),L={placement:"bottom",modifiers:[],strategy:"absolute"},P={passive:!0},W={top:"auto",right:"auto",bottom:"auto",left:"auto"},k=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=o(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,P)})),a&&s.addEventListener("resize",n.update,P),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,P)})),a&&s.removeEventListener("resize",n.update,P)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options;e=void 0===(e=o.gpuAcceleration)||e,o=void 0===(o=o.adaptive)||o,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},w(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},w(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];i(r)&&a(r)&&(Object.assign(r.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{}),i(n)&&a(n)&&(Object.assign(n.style,e),Object.keys(r).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}],H=v({defaultModifiers:k});e.createPopper=H,e.defaultModifiers=k,e.detectOverflow=function(e,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?e.placement:o;var i=n.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var c=n.altBoundary,p=void 0!==c&&c;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},{},"number"!=typeof n?n:function(e,t){return t.reduce((function(t,o){return t[o]=e,t}),{})}(n,M));var l=e.elements.reference;c=e.rects.popper,a=j(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=y({reference:f=t(l),element:c,strategy:"absolute",placement:o}),c=x(Object.assign({},c,{},p)),f="popper"===i?c:f;var u={top:a.top-f.top+n.top,bottom:f.bottom-a.bottom+n.bottom,left:a.left-f.left+n.left,right:f.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[o];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,o=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[o]*t}))}return u},e.popperGenerator=v,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-lite.min.js.map |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
@@ -154,8 +154,11 @@ | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} | ||
@@ -911,4 +914,3 @@ | ||
{ | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -989,3 +991,3 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -992,0 +994,0 @@ top: '0', |
/** | ||
* @popperjs/core v2.2.1 - MIT License | ||
* @popperjs/core v2.2.2 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(o(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+r(e).scrollLeft}function p(e,o,p){void 0===p&&(p=!1),e=t(e);var c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return p||("body"!==a(o)&&(c=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((u=t(o)).x+=o.clientLeft,u.y+=o.clientTop):(o=s(o))&&(u.x=f(o))),{x:e.left+c.scrollLeft-u.x,y:e.top+c.scrollTop-u.y,width:e.width,height:e.height}}function c(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function u(e){return"html"===a(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function d(e){return n(e).getComputedStyle(e)}function l(e,t){void 0===t&&(t=[]);var r=function e(t){if(0<=["html","body","#document"].indexOf(a(t)))return t.ownerDocument.body;if(i(t)){var n=d(t);if(/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX))return t}return e(u(t))}(e);return r=(e="body"===a(r))?n(r):r,t=t.concat(r),e?t:t.concat(l(u(r)))}function m(e){return i(e)&&"fixed"!==d(e).position?e.offsetParent:null}function h(e){var t=n(e);for(e=m(e);e&&0<=["table","td","th"].indexOf(a(e));)e=m(e);return e&&"body"===a(e)&&"static"===d(e).position?t:e||t}function v(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function g(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function b(e){return e.split("-")[0]}function y(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function x(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?F:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},F,{},r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],u=!1,d={state:s,setOptions:function(i){return a(),s.options=Object.assign({},r,{},s.options,{},i),s.scrollParents={reference:o(e)?l(e):e.contextElement?l(e.contextElement):[],popper:l(t)},i=function(e){var t=v(e);return C.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,{},t,{options:Object.assign({},n.options,{},t.options),data:Object.assign({},n.data,{},t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:d,options:n}),f.push(t||function(){}))})),d.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference;if(y(t,e=e.popper))for(s.rects={reference:p(t,h(e),"fixed"===s.options.strategy),popper:c(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:d})||s)}}},update:g((function(){return new Promise((function(e){d.forceUpdate(),e(s)}))})),destroy:function(){a(),u=!0}};return y(e,t)?(d.setOptions(i).then((function(e){!u&&i.onFirstUpdate&&i.onFirstUpdate(e)})),d):d}}function w(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function O(e){var t=e.reference,n=e.element,r=(e=e.placement)?b(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?w(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]=Math.floor(o[r])-Math.floor(t[i]/2-n[i]/2);break;case"end":o[r]=Math.floor(o[r])+Math.ceil(t[i]/2-n[i]/2)}return o}function M(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,p=e.gpuAcceleration,c=e.adaptive,u=window.devicePixelRatio||1;e=Math.round(a.x*u)/u||0,u=Math.round(a.y*u)/u||0;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var l,m="left",v="top",g=window;if(c){var b=h(r);b===n(r)&&(b=s(r)),"top"===i&&(v="bottom",u-=b.clientHeight-o.height,u*=p?1:-1),"left"===i&&(m="right",e-=b.clientWidth-o.width,e*=p?1:-1)}return r=Object.assign({position:f},c&&I),p?Object.assign({},r,((l={})[v]=a?"0":"",l[m]=d?"0":"",l.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",l)):Object.assign({},r,((t={})[v]=a?u+"px":"",t[m]=d?e+"px":"",t.transform="",t))}function j(e){return e.replace(/left|right|bottom|top/g,(function(e){return _[e]}))}function E(e){return e.replace(/start|end/g,(function(e){return U[e]}))}function D(e,t){var n=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(n)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function L(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function k(e,o){if("viewport"===o)e=L({width:(e=n(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(o))e=t(o);else{var a=s(e);e=n(a),o=r(a),(a=p(s(a),e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-o.scrollLeft,a.y=-o.scrollTop,e=L(a)}return e}function P(e,t,r){return t="clippingParents"===t?function(e){var t=l(e),n=0<=["absolute","fixed"].indexOf(d(e).position)&&i(e)?h(e):e;return o(n)?t.filter((function(e){return o(e)&&D(e,n)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,r){var o=k(e,r),p=n(r=i(r)?r:s(e)),c=i(r)?d(r):{};parseFloat(c.borderTopWidth);var u=parseFloat(c.borderRightWidth)||0,l=parseFloat(c.borderBottomWidth)||0,m=parseFloat(c.borderLeftWidth)||0;c="html"===a(r);var h=f(r),v=r.clientWidth+u,g=r.clientHeight+l;return c&&50<p.innerHeight-r.clientHeight&&(g=p.innerHeight-l),l=c?0:r.clientTop,u=r.clientLeft>m?u:c?p.innerWidth-v-h:r.offsetWidth-v,p=c?p.innerHeight-g:r.offsetHeight-g,r=c?h:r.clientLeft,t.top=Math.max(o.top+l,t.top),t.right=Math.min(o.right-u,t.right),t.bottom=Math.min(o.bottom-p,t.bottom),t.left=Math.max(o.left+r,t.left),t}),k(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function B(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},e)}function W(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function H(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var p=r.altBoundary,c=void 0!==p&&p;r=B("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:W(r,q));var u=e.elements.reference;p=e.rects.popper,a=P(o(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||s(e.elements.popper),a,f),c=O({reference:f=t(u),element:p,strategy:"absolute",placement:n}),p=L(Object.assign({},p,{},c)),f="popper"===i?p:f;var d={top:a.top-f.top+r.top,bottom:f.bottom-a.bottom+r.bottom,left:a.left-f.left+r.left,right:f.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var l=e[n];Object.keys(d).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";d[e]+=l[n]*t}))}return d}function T(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function R(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],A=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),S=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),C="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),F={placement:"bottom",modifiers:[],strategy:"absolute"},N={passive:!0},I={top:"auto",right:"auto",bottom:"auto",left:"auto"},_={left:"right",right:"left",bottom:"top",top:"bottom"},U={start:"end",end:"start"},V=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,N)})),a&&s.addEventListener("resize",r.update,N),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,N)})),a&&s.removeEventListener("resize",r.update,N)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=O({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:b(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},M(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},M(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:"absolute",left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&a(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=S.reduce((function(e,n){var o=t.rects,i=b(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign({},o,{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.y;t.modifiersData.popperOffsets.x+=o.x,t.modifiersData.popperOffsets.y+=i,t.modifiersData[n]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.fallbackPlacements,o=n.padding,i=n.boundary,a=n.rootBoundary,s=n.altBoundary,f=void 0===(n=n.flipVariations)||n,p=b(n=t.options.placement);r=r||(p!==n&&f?function(e){if("auto"===b(e))return[];var t=j(e);return[E(e),t,E(t)]}(n):[j(n)]);var c=[n].concat(r).reduce((function(e,n){return e.concat("auto"===b(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.placement.split("-")[1],s=(a?i?A:A.filter((function(e){return e.split("-")[1]===a})):q).reduce((function(t,i){return t[i]=H(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[b(i)],t}),{});return Object.keys(s).sort((function(e,t){return s[e]-s[t]}))}(t,{placement:n,boundary:i,rootBoundary:a,padding:o,flipVariations:f}):n)}),[]);r=t.rects.reference,n=t.rects.popper;var u=new Map;p=!0;for(var d=c[0],l=0;l<c.length;l++){var m=c[l],h=b(m),v="start"===m.split("-")[1],g=0<=["top","bottom"].indexOf(h),y=g?"width":"height",x=H(t,{placement:m,boundary:i,rootBoundary:a,altBoundary:s,padding:o});if(v=g?v?"right":"left":v?"bottom":"top",r[y]>n[y]&&(v=j(v)),y=j(v),(h=[0>=x[h],0>=x[v],0>=x[y]]).every((function(e){return e}))){d=m,p=!1;break}u.set(m,h)}if(p)for(s=function(e){var t=c.find((function(t){if(t=u.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return d=t,"break"},r=f?3:1;0<r&&"break"!==s(r);r--);t.placement!==d&&(t.modifiersData[e]._skip=!0,t.placement=d,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r;r=void 0!==(r=n.altAxis)&&r;var i=n.tether;i=void 0===i||i;var a=n.tetherOffset,s=void 0===a?0:a;n=H(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),a=b(t.placement);var f=t.placement.split("-")[1],p=!f,u=w(a);a="x"===u?"y":"x";var d=t.modifiersData.popperOffsets,l=t.rects.reference,m=t.rects.popper,v="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},o){var g="y"===u?"top":"left",y="y"===u?"bottom":"right",x="y"===u?"height":"width";o=d[u];var O=d[u]+n[g],M=d[u]-n[y],j=i?-m[x]/2:0,E="start"===f?l[x]:m[x];f="start"===f?-m[x]:-l[x],m=t.elements.arrow,m=i&&m?c(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};g=D[g],y=D[y],m=Math.max(0,Math.min(l[x],m[x])),E=p?l[x]/2-j-m-g-v:E-m-g-v,p=p?-l[x]/2+j+m+y+v:f+m+y+v,v=t.elements.arrow&&h(t.elements.arrow),l=t.modifiersData.offset?t.modifiersData.offset[t.placement][u]:0,v=d[u]+E-l-(v?"y"===u?v.clientTop||0:v.clientLeft||0:0),p=d[u]+p-l,i=Math.max(i?Math.min(O,v):O,Math.min(o,i?Math.max(M,p):M)),d[u]=i,s[u]=i-o}r&&(r=d[a],i=Math.max(r+n["x"===u?"top":"left"],Math.min(r,r-n["x"===u?"bottom":"right"])),t.modifiersData.popperOffsets[a]=i,s[a]=i-r),t.modifiersData[e]=s},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=b(n.placement),a=w(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r){var s=n.modifiersData[e+"#persistent"].padding;r=c(r);var f="y"===a?"top":"left",p="y"===a?"bottom":"right",u=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a];var d=n.elements.arrow&&h(n.elements.arrow);u=(d=d?"y"===a?d.clientHeight||0:d.clientWidth||0:0)/2-r[i]/2+(u/2-o/2),i=Math.max(s[f],Math.min(u,d-r[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-u,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&D(t.elements.popper,r)&&(t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:B("number"!=typeof n?n:W(n,q))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=H(t,{elementContext:"reference"}),a=H(t,{altBoundary:!0});n=T(i,n),r=T(a,r,o),o=R(n),a=R(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],z=x({defaultModifiers:V});e.createPopper=z,e.defaultModifiers=V,e.detectOverflow=H,e.popperGenerator=x,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function n(e){return{scrollLeft:(e=r(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof r(e).Element||e instanceof Element}function i(e){return e instanceof r(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(o(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+n(e).scrollLeft}function p(e,o,p){void 0===p&&(p=!1),e=t(e);var c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return p||("body"!==a(o)&&(c=o!==r(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:n(o)),i(o)?((u=t(o)).x+=o.clientLeft,u.y+=o.clientTop):(o=s(o))&&(u.x=f(o))),{x:e.left+c.scrollLeft-u.x,y:e.top+c.scrollTop-u.y,width:e.width,height:e.height}}function c(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function u(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function d(e){return r(e).getComputedStyle(e)}function l(e,t){void 0===t&&(t=[]);var n=function e(t){if(0<=["html","body","#document"].indexOf(a(t)))return t.ownerDocument.body;if(i(t)){var r=d(t);if(/auto|scroll|overlay|hidden/.test(r.overflow+r.overflowY+r.overflowX))return t}return e(u(t))}(e);return n=(e="body"===a(n))?r(n):n,t=t.concat(n),e?t:t.concat(l(u(n)))}function m(e){return i(e)&&"fixed"!==d(e).position?e.offsetParent:null}function h(e){var t=r(e);for(e=m(e);e&&0<=["table","td","th"].indexOf(a(e));)e=m(e);return e&&"body"===a(e)&&"static"===d(e).position?t:e||t}function v(e){var t=new Map,r=new Set,n=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||function e(o){r.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(n){r.has(n)||(n=t.get(n))&&e(n)})),n.push(o)}(e)})),n}function g(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}function b(e){return e.split("-")[0]}function y(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function x(e){void 0===e&&(e={});var t=e.defaultModifiers,r=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?F:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},F,{},n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],u=!1,d={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,{},s.options,{},i),s.scrollParents={reference:o(e)?l(e):e.contextElement?l(e.contextElement):[],popper:l(t)},i=function(e){var t=v(e);return C.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}(function(e){var t=e.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,{},t,{options:Object.assign({},r.options,{},t.options),data:Object.assign({},r.data,{},t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options;r=void 0===r?{}:r,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:d,options:r}),f.push(t||function(){}))})),d.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference;if(y(t,e=e.popper))for(s.rects={reference:p(t,h(e),"fixed"===s.options.strategy),popper:c(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var r=s.orderedModifiers[t];e=r.fn;var n=r.options;n=void 0===n?{}:n,r=r.name,"function"==typeof e&&(s=e({state:s,options:n,name:r,instance:d})||s)}}},update:g((function(){return new Promise((function(e){d.forceUpdate(),e(s)}))})),destroy:function(){a(),u=!0}};return y(e,t)?(d.setOptions(i).then((function(e){!u&&i.onFirstUpdate&&i.onFirstUpdate(e)})),d):d}}function w(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function O(e){var t=e.reference,r=e.element,n=(e=e.placement)?b(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-r.width/2,i=t.y+t.height/2-r.height/2;switch(n){case"top":o={x:o,y:t.y-r.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-r.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(n=n?w(n):null))switch(i="y"===n?"height":"width",e){case"start":o[n]=Math.floor(o[n])-Math.floor(t[i]/2-r[i]/2);break;case"end":o[n]=Math.floor(o[n])+Math.ceil(t[i]/2-r[i]/2)}return o}function M(e){var t,n=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,p=e.gpuAcceleration,c=e.adaptive,u=window.devicePixelRatio||1;e=Math.round(a.x*u)/u||0,u=Math.round(a.y*u)/u||0;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var l,m="left",v="top",g=window;if(c){var b=h(n);b===r(n)&&(b=s(n)),"top"===i&&(v="bottom",u-=b.clientHeight-o.height,u*=p?1:-1),"left"===i&&(m="right",e-=b.clientWidth-o.width,e*=p?1:-1)}return n=Object.assign({position:f},c&&I),p?Object.assign({},n,((l={})[v]=a?"0":"",l[m]=d?"0":"",l.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",l)):Object.assign({},n,((t={})[v]=a?u+"px":"",t[m]=d?e+"px":"",t.transform="",t))}function j(e){return e.replace(/left|right|bottom|top/g,(function(e){return _[e]}))}function E(e){return e.replace(/start|end/g,(function(e){return U[e]}))}function D(e,t){var r=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(r)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function L(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function k(e,o){if("viewport"===o)e=L({width:(e=r(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(o))e=t(o);else{var a=s(e);e=r(a),o=n(a),(a=p(s(a),e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-o.scrollLeft,a.y=-o.scrollTop,e=L(a)}return e}function P(e,t,n){return t="clippingParents"===t?function(e){var t=l(e),r=0<=["absolute","fixed"].indexOf(d(e).position)&&i(e)?h(e):e;return o(r)?t.filter((function(e){return o(e)&&D(e,r)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){var o=k(e,n),p=r(n=i(n)?n:s(e)),c=i(n)?d(n):{};parseFloat(c.borderTopWidth);var u=parseFloat(c.borderRightWidth)||0,l=parseFloat(c.borderBottomWidth)||0,m=parseFloat(c.borderLeftWidth)||0;c="html"===a(n);var h=f(n),v=n.clientWidth+u,g=n.clientHeight+l;return c&&50<p.innerHeight-n.clientHeight&&(g=p.innerHeight-l),l=c?0:n.clientTop,u=n.clientLeft>m?u:c?p.innerWidth-v-h:n.offsetWidth-v,p=c?p.innerHeight-g:n.offsetHeight-g,n=c?h:n.clientLeft,t.top=Math.max(o.top+l,t.top),t.right=Math.min(o.right-u,t.right),t.bottom=Math.min(o.bottom-p,t.bottom),t.left=Math.max(o.left+n,t.left),t}),k(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function B(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},e)}function W(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function H(e,r){void 0===r&&(r={});var n=r;r=void 0===(r=n.placement)?e.placement:r;var i=n.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var p=n.altBoundary,c=void 0!==p&&p;n=B("number"!=typeof(n=void 0===(n=n.padding)?0:n)?n:W(n,q));var u=e.elements.reference;p=e.rects.popper,a=P(o(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||s(e.elements.popper),a,f),c=O({reference:f=t(u),element:p,strategy:"absolute",placement:r}),p=L(Object.assign({},p,{},c)),f="popper"===i?p:f;var d={top:a.top-f.top+n.top,bottom:f.bottom-a.bottom+n.bottom,left:a.left-f.left+n.left,right:f.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var l=e[r];Object.keys(d).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,r=0<=["top","bottom"].indexOf(e)?"y":"x";d[e]+=l[r]*t}))}return d}function T(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function R(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],A=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),S=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),C="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),F={placement:"bottom",modifiers:[],strategy:"absolute"},N={passive:!0},I={top:"auto",right:"auto",bottom:"auto",left:"auto"},_={left:"right",right:"left",bottom:"top",top:"bottom"},U={start:"end",end:"start"},V=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=r(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,N)})),a&&s.addEventListener("resize",n.update,N),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,N)})),a&&s.removeEventListener("resize",n.update,N)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=O({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options;e=void 0===(e=r.gpuAcceleration)||e,r=void 0===(r=r.adaptive)||r,e={placement:b(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},M(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},M(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{}),i(n)&&a(n)&&(Object.assign(n.style,e),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.name,n=void 0===(e=e.options.offset)?[0,0]:e,o=(e=S.reduce((function(e,r){var o=t.rects,i=b(r),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof n?n(Object.assign({},o,{placement:r})):n;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[r]=i,e}),{}))[t.placement],i=o.y;t.modifiersData.popperOffsets.x+=o.x,t.modifiersData.popperOffsets.y+=i,t.modifiersData[r]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;if(e=e.name,!t.modifiersData[e]._skip){var n=r.fallbackPlacements,o=r.padding,i=r.boundary,a=r.rootBoundary,s=r.altBoundary,f=void 0===(r=r.flipVariations)||r,p=b(r=t.options.placement);n=n||(p!==r&&f?function(e){if("auto"===b(e))return[];var t=j(e);return[E(e),t,E(t)]}(r):[j(r)]);var c=[r].concat(n).reduce((function(e,r){return e.concat("auto"===b(r)?function(e,t){void 0===t&&(t={});var r=t.boundary,n=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.placement.split("-")[1],s=(a?i?A:A.filter((function(e){return e.split("-")[1]===a})):q).reduce((function(t,i){return t[i]=H(e,{placement:i,boundary:r,rootBoundary:n,padding:o})[b(i)],t}),{});return Object.keys(s).sort((function(e,t){return s[e]-s[t]}))}(t,{placement:r,boundary:i,rootBoundary:a,padding:o,flipVariations:f}):r)}),[]);n=t.rects.reference,r=t.rects.popper;var u=new Map;p=!0;for(var d=c[0],l=0;l<c.length;l++){var m=c[l],h=b(m),v="start"===m.split("-")[1],g=0<=["top","bottom"].indexOf(h),y=g?"width":"height",x=H(t,{placement:m,boundary:i,rootBoundary:a,altBoundary:s,padding:o});if(v=g?v?"right":"left":v?"bottom":"top",n[y]>r[y]&&(v=j(v)),y=j(v),(h=[0>=x[h],0>=x[v],0>=x[y]]).every((function(e){return e}))){d=m,p=!1;break}u.set(m,h)}if(p)for(s=function(e){var t=c.find((function(t){if(t=u.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return d=t,"break"},n=f?3:1;0<n&&"break"!==s(n);n--);t.placement!==d&&(t.modifiersData[e]._skip=!0,t.placement=d,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;e=e.name;var n=r.mainAxis,o=void 0===n||n;n=void 0!==(n=r.altAxis)&&n;var i=r.tether;i=void 0===i||i;var a=r.tetherOffset,s=void 0===a?0:a;r=H(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding,altBoundary:r.altBoundary}),a=b(t.placement);var f=t.placement.split("-")[1],p=!f,u=w(a);a="x"===u?"y":"x";var d=t.modifiersData.popperOffsets,l=t.rects.reference,m=t.rects.popper,v="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},o){var g="y"===u?"top":"left",y="y"===u?"bottom":"right",x="y"===u?"height":"width";o=d[u];var O=d[u]+r[g],M=d[u]-r[y],j=i?-m[x]/2:0,E="start"===f?l[x]:m[x];f="start"===f?-m[x]:-l[x],m=t.elements.arrow,m=i&&m?c(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};g=D[g],y=D[y],m=Math.max(0,Math.min(l[x],m[x])),E=p?l[x]/2-j-m-g-v:E-m-g-v,p=p?-l[x]/2+j+m+y+v:f+m+y+v,v=t.elements.arrow&&h(t.elements.arrow),l=t.modifiersData.offset?t.modifiersData.offset[t.placement][u]:0,v=d[u]+E-l-(v?"y"===u?v.clientTop||0:v.clientLeft||0:0),p=d[u]+p-l,i=Math.max(i?Math.min(O,v):O,Math.min(o,i?Math.max(M,p):M)),d[u]=i,s[u]=i-o}n&&(n=d[a],i=Math.max(n+r["x"===u?"top":"left"],Math.min(n,n-r["x"===u?"bottom":"right"])),t.modifiersData.popperOffsets[a]=i,s[a]=i-n),t.modifiersData[e]=s},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state;e=e.name;var n=r.elements.arrow,o=r.modifiersData.popperOffsets,i=b(r.placement),a=w(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",n){var s=r.modifiersData[e+"#persistent"].padding;n=c(n);var f="y"===a?"top":"left",p="y"===a?"bottom":"right",u=r.rects.reference[i]+r.rects.reference[a]-o[a]-r.rects.popper[i];o=o[a]-r.rects.reference[a];var d=r.elements.arrow&&h(r.elements.arrow);u=(d=d?"y"===a?d.clientHeight||0:d.clientWidth||0:0)/2-n[i]/2+(u/2-o/2),i=Math.max(s[f],Math.min(u,d-n[i]-s[p])),r.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-u,t)}},effect:function(e){var t=e.state,r=e.options;e=e.name;var n=r.element;n=void 0===n?"[data-popper-arrow]":n,r=void 0===(r=r.padding)?0:r,("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&D(t.elements.popper,n)&&(t.elements.arrow=n,t.modifiersData[e+"#persistent"]={padding:B("number"!=typeof r?r:W(r,q))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var r=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,i=H(t,{elementContext:"reference"}),a=H(t,{altBoundary:!0});r=T(i,r),n=T(a,n,o),o=R(r),a=R(n),t.modifiersData[e]={referenceClippingOffsets:r,popperEscapeOffsets:n,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],z=x({defaultModifiers:V});e.createPopper=z,e.defaultModifiers=V,e.detectOverflow=H,e.popperGenerator=x,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper.min.js.map |
import getNodeName from "./getNodeName.js"; | ||
import getDocumentElement from "./getDocumentElement.js"; | ||
export default function getParentNode(element) { | ||
@@ -7,8 +8,11 @@ if (getNodeName(element) === 'html') { | ||
return element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
; | ||
return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} |
@@ -36,3 +36,3 @@ import getNodeName from "../dom-utils/getNodeName.js"; | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -39,0 +39,0 @@ top: '0', |
@@ -93,4 +93,3 @@ import { top, left, right, bottom } from "../enums.js"; | ||
if (process.env.NODE_ENV !== "production") { | ||
var _getComputedStyle = getComputedStyle(state.elements.popper), | ||
transitionProperty = _getComputedStyle.transitionProperty; | ||
var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -97,0 +96,0 @@ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { |
{ | ||
"name": "@popperjs/core", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Tooltip and Popover Positioning Engine", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/popper.js", |
// @flow | ||
import getNodeName from './getNodeName'; | ||
import getDocumentElement from './getDocumentElement'; | ||
@@ -10,8 +11,10 @@ export default function getParentNode(element: Node | ShadowRoot): Node { | ||
return ( | ||
// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle | ||
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node | ||
element.parentNode || // DOM Element detected | ||
// $FlowFixMe: need a better way to handle this... | ||
element.host || // ShadowRoot detected | ||
document.ownerDocument || // Fallback to ownerDocument if available | ||
document.documentElement // Or to documentElement if everything else fails | ||
// $FlowFixMe: HTMLElement is a Node | ||
getDocumentElement(element) // fallback | ||
); | ||
} |
@@ -40,3 +40,3 @@ // @flow | ||
popper: { | ||
position: 'absolute', | ||
position: state.options.strategy, | ||
left: '0', | ||
@@ -43,0 +43,0 @@ top: '0', |
@@ -123,3 +123,4 @@ // @flow | ||
if (__DEV__) { | ||
const { transitionProperty } = getComputedStyle(state.elements.popper); | ||
const transitionProperty = | ||
getComputedStyle(state.elements.popper).transitionProperty || ''; | ||
@@ -126,0 +127,0 @@ if ( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1461066
13338