vendor: 4,651 bytes, lines 1-151
1/** 2 * @popperjs/core v2.11.2 - MIT License 3 */ 4 5(function (global, factory) { 6 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 7 typeof define === 'function' && define.amd ? define(['exports'], factory) : 8 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.wpbc_Popper = {})); 9}(this, (function (exports) { 'use strict'; 10 11 function getWindow(node) { 12 if (node == null) { 13 return window; 14 } 15 16 if (node.toString() !== '[object Window]') { 17 var ownerDocument = node.ownerDocument; 18 return ownerDocument ? ownerDocument.defaultView || window : window; 19 } 20 21 return node; 22 } 23 24 function isElement(node) { 25 var OwnElement = getWindow(node).Element; 26 return node instanceof OwnElement || node instanceof Element; 27 } 28 29 function isHTMLElement(node) { 30 var OwnElement = getWindow(node).HTMLElement; 31 return node instanceof OwnElement || node instanceof HTMLElement; 32 } 33 34 function isShadowRoot(node) { 35 // IE 11 has no ShadowRoot 36 if (typeof ShadowRoot === 'undefined') { 37 return false; 38 } 39 40 var OwnElement = getWindow(node).ShadowRoot; 41 return node instanceof OwnElement || node instanceof ShadowRoot; 42 } 43 44 var max = Math.max; 45 var min = Math.min; 46 var round = Math.round; 47 48 function getBoundingClientRect(element, includeScale) { 49 if (includeScale === void 0) { 50 includeScale = false; 51 } 52 53 var rect = element.getBoundingClientRect(); 54 var scaleX = 1; 55 var scaleY = 1; 56 57 if (isHTMLElement(element) && includeScale) { 58 var offsetHeight = element.offsetHeight; 59 var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale 60 // Fallback to 1 in case both values are `0` 61 62 if (offsetWidth > 0) { 63 scaleX = round(rect.width) / offsetWidth || 1; 64 } 65 66 if (offsetHeight > 0) { 67 scaleY = round(rect.height) / offsetHeight || 1; 68 } 69 } 70 71 return { 72 width: rect.width / scaleX, 73 height: rect.height / scaleY, 74 top: rect.top / scaleY, 75 right: rect.right / scaleX, 76 bottom: rect.bottom / scaleY, 77 left: rect.left / scaleX, 78 x: rect.left / scaleX, 79 y: rect.top / scaleY 80 }; 81 } 82 83 function getWindowScroll(node) { 84 var win = getWindow(node); 85 var scrollLeft = win.pageXOffset; 86 var scrollTop = win.pageYOffset; 87 return { 88 scrollLeft: scrollLeft, 89 scrollTop: scrollTop 90 }; 91 } 92 93 function getHTMLElementScroll(element) { 94 return { 95 scrollLeft: element.scrollLeft, 96 scrollTop: element.scrollTop 97 }; 98 } 99 100 function getNodeScroll(node) { 101 if (node === getWindow(node) || !isHTMLElement(node)) { 102 return getWindowScroll(node); 103 } else { 104 return getHTMLElementScroll(node); 105 } 106 } 107 108 function getNodeName(element) { 109 return element ? (element.nodeName || '').toLowerCase() : null; 110 } 111 112 function getDocumentElement(element) { 113 // $FlowFixMe[incompatible-return]: assume body is always available 114 return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] 115 element.document) || window.document).documentElement; 116 } 117 118 function getWindowScrollBarX(element) { 119 // If <html> has a CSS width greater than the viewport, then this will be 120 // incorrect for RTL. 121 // Popper 1 is broken in this case and never had a bug report so let's assume 122 // it's not an issue. I don't think anyone ever specifies width on <html> 123 // anyway. 124 // Browsers where the left scrollbar doesn't cause an issue report `0` for 125 // this (e.g. Edge 2019, IE11, Safari) 126 return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; 127 } 128 129 function getComputedStyle(element) { 130 return getWindow(element).getComputedStyle(element); 131 } 132 133 function isScrollParent(element) { 134 // Firefox wants us to check `-x` and `-y` variations as well 135 var _getComputedStyle = getComputedStyle(element), 136 overflow = _getComputedStyle.overflow, 137 overflowX = _getComputedStyle.overflowX, 138 overflowY = _getComputedStyle.overflowY; 139 140 return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); 141 } 142 143 function isElementScaled(element) { 144 var rect = element.getBoundingClientRect(); 145 var scaleX = round(rect.width) / element.offsetWidth || 1; 146 var scaleY = round(rect.height) / element.offsetHeight || 1; 147 return scaleX !== 1 || scaleY !== 1; 148 } // Returns the composite rect of an element relative to its offsetParent. 149 // Composite means it takes into account transforms as well as layout. 150 151
vendor: 7,706 bytes, lines 152-368
152 function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { 153 if (isFixed === void 0) { 154 isFixed = false; 155 } 156 157 var isOffsetParentAnElement = isHTMLElement(offsetParent); 158 var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); 159 var documentElement = getDocumentElement(offsetParent); 160 var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); 161 var scroll = { 162 scrollLeft: 0, 163 scrollTop: 0 164 }; 165 var offsets = { 166 x: 0, 167 y: 0 168 }; 169 170 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { 171 if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 172 isScrollParent(documentElement)) { 173 scroll = getNodeScroll(offsetParent); 174 } 175 176 if (isHTMLElement(offsetParent)) { 177 offsets = getBoundingClientRect(offsetParent, true); 178 offsets.x += offsetParent.clientLeft; 179 offsets.y += offsetParent.clientTop; 180 } else if (documentElement) { 181 offsets.x = getWindowScrollBarX(documentElement); 182 } 183 } 184 185 return { 186 x: rect.left + scroll.scrollLeft - offsets.x, 187 y: rect.top + scroll.scrollTop - offsets.y, 188 width: rect.width, 189 height: rect.height 190 }; 191 } 192 193 // means it doesn't take into account transforms. 194 195 function getLayoutRect(element) { 196 var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. 197 // Fixes https://github.com/popperjs/popper-core/issues/1223 198 199 var width = element.offsetWidth; 200 var height = element.offsetHeight; 201 202 if (Math.abs(clientRect.width - width) <= 1) { 203 width = clientRect.width; 204 } 205 206 if (Math.abs(clientRect.height - height) <= 1) { 207 height = clientRect.height; 208 } 209 210 return { 211 x: element.offsetLeft, 212 y: element.offsetTop, 213 width: width, 214 height: height 215 }; 216 } 217 218 function getParentNode(element) { 219 if (getNodeName(element) === 'html') { 220 return element; 221 } 222 223 return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle 224 // $FlowFixMe[incompatible-return] 225 // $FlowFixMe[prop-missing] 226 element.assignedSlot || // step into the shadow DOM of the parent of a slotted node 227 element.parentNode || ( // DOM Element detected 228 isShadowRoot(element) ? element.host : null) || // ShadowRoot detected 229 // $FlowFixMe[incompatible-call]: HTMLElement is a Node 230 getDocumentElement(element) // fallback 231 232 ); 233 } 234 235 function getScrollParent(node) { 236 if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { 237 // $FlowFixMe[incompatible-return]: assume body is always available 238 return node.ownerDocument.body; 239 } 240 241 if (isHTMLElement(node) && isScrollParent(node)) { 242 return node; 243 } 244 245 return getScrollParent(getParentNode(node)); 246 } 247 248 /* 249 given a DOM element, return the list of all scroll parents, up the list of ancesors 250 until we get to the top window object. This list is what we attach scroll listeners 251 to, because if any of these parent elements scroll, we'll need to re-calculate the 252 reference element's position. 253 */ 254 255 function listScrollParents(element, list) { 256 var _element$ownerDocumen; 257 258 if (list === void 0) { 259 list = []; 260 } 261 262 var scrollParent = getScrollParent(element); 263 var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); 264 var win = getWindow(scrollParent); 265 var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; 266 var updatedList = list.concat(target); 267 return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here 268 updatedList.concat(listScrollParents(getParentNode(target))); 269 } 270 271 function isTableElement(element) { 272 return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; 273 } 274 275 function getTrueOffsetParent(element) { 276 if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 277 getComputedStyle(element).position === 'fixed') { 278 return null; 279 } 280 281 return element.offsetParent; 282 } // `.offsetParent` reports `null` for fixed elements, while absolute elements 283 // return the containing block 284 285 286 function getContainingBlock(element) { 287 var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; 288 var isIE = navigator.userAgent.indexOf('Trident') !== -1; 289 290 if (isIE && isHTMLElement(element)) { 291 // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport 292 var elementCss = getComputedStyle(element); 293 294 if (elementCss.position === 'fixed') { 295 return null; 296 } 297 } 298 299 var currentNode = getParentNode(element); 300 301 while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { 302 var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that 303 // create a containing block. 304 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 305 306 if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { 307 return currentNode; 308 } else { 309 currentNode = currentNode.parentNode; 310 } 311 } 312 313 return null; 314 } // Gets the closest ancestor positioned element. Handles some edge cases, 315 // such as table ancestors and cross browser bugs. 316 317 318 function getOffsetParent(element) { 319 var window = getWindow(element); 320 var offsetParent = getTrueOffsetParent(element); 321 322 while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { 323 offsetParent = getTrueOffsetParent(offsetParent); 324 } 325 326 if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { 327 return window; 328 } 329 330 return offsetParent || getContainingBlock(element) || window; 331 } 332 333 var top = 'top'; 334 var bottom = 'bottom'; 335 var right = 'right'; 336 var left = 'left'; 337 var auto = 'auto'; 338 var basePlacements = [top, bottom, right, left]; 339 var start = 'start'; 340 var end = 'end'; 341 var clippingParents = 'clippingParents'; 342 var viewport = 'viewport'; 343 var popper = 'popper'; 344 var reference = 'reference'; 345 var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { 346 return acc.concat([placement + "-" + start, placement + "-" + end]); 347 }, []); 348 var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { 349 return acc.concat([placement, placement + "-" + start, placement + "-" + end]); 350 }, []); // modifiers that need to read the DOM 351 352 var beforeRead = 'beforeRead'; 353 var read = 'read'; 354 var afterRead = 'afterRead'; // pure-logic modifiers 355 356 var beforeMain = 'beforeMain'; 357 var main = 'main'; 358 var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) 359 360 var beforeWrite = 'beforeWrite'; 361 var write = 'write'; 362 var afterWrite = 'afterWrite'; 363 var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; 364 365 function order(modifiers) { 366 var map = new Map(); 367 var visited = new Set(); 368 var result = [];
vendor: 6,465 bytes, lines 369-557
369 modifiers.forEach(function (modifier) { 370 map.set(modifier.name, modifier); 371 }); // On visiting object, check for its dependencies and visit them recursively 372 373 function sort(modifier) { 374 visited.add(modifier.name); 375 var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); 376 requires.forEach(function (dep) { 377 if (!visited.has(dep)) { 378 var depModifier = map.get(dep); 379 380 if (depModifier) { 381 sort(depModifier); 382 } 383 } 384 }); 385 result.push(modifier); 386 } 387 388 modifiers.forEach(function (modifier) { 389 if (!visited.has(modifier.name)) { 390 // check for visited object 391 sort(modifier); 392 } 393 }); 394 return result; 395 } 396 397 function orderModifiers(modifiers) { 398 // order based on dependencies 399 var orderedModifiers = order(modifiers); // order based on phase 400 401 return modifierPhases.reduce(function (acc, phase) { 402 return acc.concat(orderedModifiers.filter(function (modifier) { 403 return modifier.phase === phase; 404 })); 405 }, []); 406 } 407 408 function debounce(fn) { 409 var pending; 410 return function () { 411 if (!pending) { 412 pending = new Promise(function (resolve) { 413 Promise.resolve().then(function () { 414 pending = undefined; 415 resolve(fn()); 416 }); 417 }); 418 } 419 420 return pending; 421 }; 422 } 423 424 function format(str) { 425 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 426 args[_key - 1] = arguments[_key]; 427 } 428 429 return [].concat(args).reduce(function (p, c) { 430 return p.replace(/%s/, c); 431 }, str); 432 } 433 434 var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; 435 var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; 436 var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options']; 437 function validateModifiers(modifiers) { 438 modifiers.forEach(function (modifier) { 439 [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)` 440 .filter(function (value, index, self) { 441 return self.indexOf(value) === index; 442 }).forEach(function (key) { 443 switch (key) { 444 case 'name': 445 if (typeof modifier.name !== 'string') { 446 console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\"")); 447 } 448 449 break; 450 451 case 'enabled': 452 if (typeof modifier.enabled !== 'boolean') { 453 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\"")); 454 } 455 456 break; 457 458 case 'phase': 459 if (modifierPhases.indexOf(modifier.phase) < 0) { 460 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\"")); 461 } 462 463 break; 464 465 case 'fn': 466 if (typeof modifier.fn !== 'function') { 467 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\"")); 468 } 469 470 break; 471 472 case 'effect': 473 if (modifier.effect != null && typeof modifier.effect !== 'function') { 474 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\"")); 475 } 476 477 break; 478 479 case 'requires': 480 if (modifier.requires != null && !Array.isArray(modifier.requires)) { 481 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\"")); 482 } 483 484 break; 485 486 case 'requiresIfExists': 487 if (!Array.isArray(modifier.requiresIfExists)) { 488 console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\"")); 489 } 490 491 break; 492 493 case 'options': 494 case 'data': 495 break; 496 497 default: 498 console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) { 499 return "\"" + s + "\""; 500 }).join(', ') + "; but \"" + key + "\" was provided."); 501 } 502 503 modifier.requires && modifier.requires.forEach(function (requirement) { 504 if (modifiers.find(function (mod) { 505 return mod.name === requirement; 506 }) == null) { 507 console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); 508 } 509 }); 510 }); 511 }); 512 } 513 514 function uniqueBy(arr, fn) { 515 var identifiers = new Set(); 516 return arr.filter(function (item) { 517 var identifier = fn(item); 518 519 if (!identifiers.has(identifier)) { 520 identifiers.add(identifier); 521 return true; 522 } 523 }); 524 } 525 526 function getBasePlacement(placement) { 527 return placement.split('-')[0]; 528 } 529 530 function mergeByName(modifiers) { 531 var merged = modifiers.reduce(function (merged, current) { 532 var existing = merged[current.name]; 533 merged[current.name] = existing ? Object.assign({}, existing, current, { 534 options: Object.assign({}, existing.options, current.options), 535 data: Object.assign({}, existing.data, current.data) 536 }) : current; 537 return merged; 538 }, {}); // IE11 does not support Object.values 539 540 return Object.keys(merged).map(function (key) { 541 return merged[key]; 542 }); 543 } 544 545 function getViewportRect(element) { 546 var win = getWindow(element); 547 var html = getDocumentElement(element); 548 var visualViewport = win.visualViewport; 549 var width = html.clientWidth; 550 var height = html.clientHeight; 551 var x = 0; 552 var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper 553 // can be obscured underneath it. 554 // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even 555 // if it isn't open, so if this isn't available, the popper will be detected 556 // to overflow the bottom of the screen too early. 557
vendor: 4,314 bytes, lines 558-676
558 if (visualViewport) { 559 width = visualViewport.width; 560 height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently) 561 // In Chrome, it returns a value very close to 0 (+/-) but contains rounding 562 // errors due to floating point numbers, so we need to check precision. 563 // Safari returns a number <= 0, usually < -1 when pinch-zoomed 564 // Feature detection fails in mobile emulation mode in Chrome. 565 // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < 566 // 0.001 567 // Fallback here: "Not Safari" userAgent 568 569 if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { 570 x = visualViewport.offsetLeft; 571 y = visualViewport.offsetTop; 572 } 573 } 574 575 return { 576 width: width, 577 height: height, 578 x: x + getWindowScrollBarX(element), 579 y: y 580 }; 581 } 582 583 // of the `<html>` and `<body>` rect bounds if horizontally scrollable 584 585 function getDocumentRect(element) { 586 var _element$ownerDocumen; 587 588 var html = getDocumentElement(element); 589 var winScroll = getWindowScroll(element); 590 var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; 591 var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); 592 var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); 593 var x = -winScroll.scrollLeft + getWindowScrollBarX(element); 594 var y = -winScroll.scrollTop; 595 596 if (getComputedStyle(body || html).direction === 'rtl') { 597 x += max(html.clientWidth, body ? body.clientWidth : 0) - width; 598 } 599 600 return { 601 width: width, 602 height: height, 603 x: x, 604 y: y 605 }; 606 } 607 608 function contains(parent, child) { 609 var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method 610 611 if (parent.contains(child)) { 612 return true; 613 } // then fallback to custom implementation with Shadow DOM support 614 else if (rootNode && isShadowRoot(rootNode)) { 615 var next = child; 616 617 do { 618 if (next && parent.isSameNode(next)) { 619 return true; 620 } // $FlowFixMe[prop-missing]: need a better way to handle this... 621 622 623 next = next.parentNode || next.host; 624 } while (next); 625 } // Give up, the result is false 626 627 628 return false; 629 } 630 631 function rectToClientRect(rect) { 632 return Object.assign({}, rect, { 633 left: rect.x, 634 top: rect.y, 635 right: rect.x + rect.width, 636 bottom: rect.y + rect.height 637 }); 638 } 639 640 function getInnerBoundingClientRect(element) { 641 var rect = getBoundingClientRect(element); 642 rect.top = rect.top + element.clientTop; 643 rect.left = rect.left + element.clientLeft; 644 rect.bottom = rect.top + element.clientHeight; 645 rect.right = rect.left + element.clientWidth; 646 rect.width = element.clientWidth; 647 rect.height = element.clientHeight; 648 rect.x = rect.left; 649 rect.y = rect.top; 650 return rect; 651 } 652 653 function getClientRectFromMixedType(element, clippingParent) { 654 return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); 655 } // A "clipping parent" is an overflowable container with the characteristic of 656 // clipping (or hiding) overflowing elements with a position different from 657 // `initial` 658 659 660 function getClippingParents(element) { 661 var clippingParents = listScrollParents(getParentNode(element)); 662 var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; 663 var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; 664 665 if (!isElement(clipperElement)) { 666 return []; 667 } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 668 669 670 return clippingParents.filter(function (clippingParent) { 671 return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; 672 }); 673 } // Gets the maximum area that the element is visible in due to any number of 674 // clipping parents 675 676
vendor: 4,117 bytes, lines 677-806
677 function getClippingRect(element, boundary, rootBoundary) { 678 var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); 679 var clippingParents = [].concat(mainClippingParents, [rootBoundary]); 680 var firstClippingParent = clippingParents[0]; 681 var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { 682 var rect = getClientRectFromMixedType(element, clippingParent); 683 accRect.top = max(rect.top, accRect.top); 684 accRect.right = min(rect.right, accRect.right); 685 accRect.bottom = min(rect.bottom, accRect.bottom); 686 accRect.left = max(rect.left, accRect.left); 687 return accRect; 688 }, getClientRectFromMixedType(element, firstClippingParent)); 689 clippingRect.width = clippingRect.right - clippingRect.left; 690 clippingRect.height = clippingRect.bottom - clippingRect.top; 691 clippingRect.x = clippingRect.left; 692 clippingRect.y = clippingRect.top; 693 return clippingRect; 694 } 695 696 function getVariation(placement) { 697 return placement.split('-')[1]; 698 } 699 700 function getMainAxisFromPlacement(placement) { 701 return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; 702 } 703 704 function computeOffsets(_ref) { 705 var reference = _ref.reference, 706 element = _ref.element, 707 placement = _ref.placement; 708 var basePlacement = placement ? getBasePlacement(placement) : null; 709 var variation = placement ? getVariation(placement) : null; 710 var commonX = reference.x + reference.width / 2 - element.width / 2; 711 var commonY = reference.y + reference.height / 2 - element.height / 2; 712 var offsets; 713 714 switch (basePlacement) { 715 case top: 716 offsets = { 717 x: commonX, 718 y: reference.y - element.height 719 }; 720 break; 721 722 case bottom: 723 offsets = { 724 x: commonX, 725 y: reference.y + reference.height 726 }; 727 break; 728 729 case right: 730 offsets = { 731 x: reference.x + reference.width, 732 y: commonY 733 }; 734 break; 735 736 case left: 737 offsets = { 738 x: reference.x - element.width, 739 y: commonY 740 }; 741 break; 742 743 default: 744 offsets = { 745 x: reference.x, 746 y: reference.y 747 }; 748 } 749 750 var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; 751 752 if (mainAxis != null) { 753 var len = mainAxis === 'y' ? 'height' : 'width'; 754 755 switch (variation) { 756 case start: 757 offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); 758 break; 759 760 case end: 761 offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); 762 break; 763 } 764 } 765 766 return offsets; 767 } 768 769 function getFreshSideObject() { 770 return { 771 top: 0, 772 right: 0, 773 bottom: 0, 774 left: 0 775 }; 776 } 777 778 function mergePaddingObject(paddingObject) { 779 return Object.assign({}, getFreshSideObject(), paddingObject); 780 } 781 782 function expandToHashMap(value, keys) { 783 return keys.reduce(function (hashMap, key) { 784 hashMap[key] = value; 785 return hashMap; 786 }, {}); 787 } 788 789 function detectOverflow(state, options) { 790 if (options === void 0) { 791 options = {}; 792 } 793 794 var _options = options, 795 _options$placement = _options.placement, 796 placement = _options$placement === void 0 ? state.placement : _options$placement, 797 _options$boundary = _options.boundary, 798 boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, 799 _options$rootBoundary = _options.rootBoundary, 800 rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, 801 _options$elementConte = _options.elementContext, 802 elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, 803 _options$altBoundary = _options.altBoundary, 804 altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, 805 _options$padding = _options.padding, 806 padding = _options$padding === void 0 ? 0 : _options$padding;
vendor: 8,726 bytes, lines 807-1000
807 var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); 808 var altContext = elementContext === popper ? reference : popper; 809 var popperRect = state.rects.popper; 810 var element = state.elements[altBoundary ? altContext : elementContext]; 811 var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); 812 var referenceClientRect = getBoundingClientRect(state.elements.reference); 813 var popperOffsets = computeOffsets({ 814 reference: referenceClientRect, 815 element: popperRect, 816 strategy: 'absolute', 817 placement: placement 818 }); 819 var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); 820 var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect 821 // 0 or negative = within the clipping rect 822 823 var overflowOffsets = { 824 top: clippingClientRect.top - elementClientRect.top + paddingObject.top, 825 bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, 826 left: clippingClientRect.left - elementClientRect.left + paddingObject.left, 827 right: elementClientRect.right - clippingClientRect.right + paddingObject.right 828 }; 829 var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element 830 831 if (elementContext === popper && offsetData) { 832 var offset = offsetData[placement]; 833 Object.keys(overflowOffsets).forEach(function (key) { 834 var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; 835 var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; 836 overflowOffsets[key] += offset[axis] * multiply; 837 }); 838 } 839 840 return overflowOffsets; 841 } 842 843 var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; 844 var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; 845 var DEFAULT_OPTIONS = { 846 placement: 'bottom', 847 modifiers: [], 848 strategy: 'absolute' 849 }; 850 851 function areValidElements() { 852 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 853 args[_key] = arguments[_key]; 854 } 855 856 return !args.some(function (element) { 857 return !(element && typeof element.getBoundingClientRect === 'function'); 858 }); 859 } 860 861 function popperGenerator(generatorOptions) { 862 if (generatorOptions === void 0) { 863 generatorOptions = {}; 864 } 865 866 var _generatorOptions = generatorOptions, 867 _generatorOptions$def = _generatorOptions.defaultModifiers, 868 defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, 869 _generatorOptions$def2 = _generatorOptions.defaultOptions, 870 defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; 871 return function createPopper(reference, popper, options) { 872 if (options === void 0) { 873 options = defaultOptions; 874 } 875 876 var state = { 877 placement: 'bottom', 878 orderedModifiers: [], 879 options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), 880 modifiersData: {}, 881 elements: { 882 reference: reference, 883 popper: popper 884 }, 885 attributes: {}, 886 styles: {} 887 }; 888 var effectCleanupFns = []; 889 var isDestroyed = false; 890 var instance = { 891 state: state, 892 setOptions: function setOptions(setOptionsAction) { 893 var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; 894 cleanupModifierEffects(); 895 state.options = Object.assign({}, defaultOptions, state.options, options); 896 state.scrollParents = { 897 reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], 898 popper: listScrollParents(popper) 899 }; // Orders the modifiers based on their dependencies and `phase` 900 // properties 901 902 var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers 903 904 state.orderedModifiers = orderedModifiers.filter(function (m) { 905 return m.enabled; 906 }); // Validate the provided modifiers so that the consumer will get warned 907 // if one of the modifiers is invalid for any reason 908 909 { 910 var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) { 911 var name = _ref.name; 912 return name; 913 }); 914 validateModifiers(modifiers); 915 916 if (getBasePlacement(state.options.placement) === auto) { 917 var flipModifier = state.orderedModifiers.find(function (_ref2) { 918 var name = _ref2.name; 919 return name === 'flip'; 920 }); 921 922 if (!flipModifier) { 923 console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' ')); 924 } 925 } 926 927 var _getComputedStyle = getComputedStyle(popper), 928 marginTop = _getComputedStyle.marginTop, 929 marginRight = _getComputedStyle.marginRight, 930 marginBottom = _getComputedStyle.marginBottom, 931 marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can 932 // cause bugs with positioning, so we'll warn the consumer 933 934 935 if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) { 936 return parseFloat(margin); 937 })) { 938 console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' ')); 939 } 940 } 941 942 runModifierEffects(); 943 return instance.update(); 944 }, 945 // Sync update â it will always be executed, even if not necessary. This 946 // is useful for low frequency updates where sync behavior simplifies the 947 // logic. 948 // For high frequency updates (e.g. `resize` and `scroll` events), always 949 // prefer the async Popper#update method 950 forceUpdate: function forceUpdate() { 951 if (isDestroyed) { 952 return; 953 } 954 955 var _state$elements = state.elements, 956 reference = _state$elements.reference, 957 popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements 958 // anymore 959 960 if (!areValidElements(reference, popper)) { 961 { 962 console.error(INVALID_ELEMENT_ERROR); 963 } 964 965 return; 966 } // Store the reference and popper rects to be read by modifiers 967 968 969 state.rects = { 970 reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), 971 popper: getLayoutRect(popper) 972 }; // Modifiers have the ability to reset the current update cycle. The 973 // most common use case for this is the `flip` modifier changing the 974 // placement, which then needs to re-run all the modifiers, because the 975 // logic was previously ran for the previous placement and is therefore 976 // stale/incorrect 977 978 state.reset = false; 979 state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier 980 // is filled with the initial data specified by the modifier. This means 981 // it doesn't persist and is fresh on each update. 982 // To ensure persistent data, use `${name}#persistent` 983 984 state.orderedModifiers.forEach(function (modifier) { 985 return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); 986 }); 987 var __debug_loops__ = 0; 988 989 for (var index = 0; index < state.orderedModifiers.length; index++) { 990 { 991 __debug_loops__ += 1; 992 993 if (__debug_loops__ > 100) { 994 console.error(INFINITE_LOOP_ERROR); 995 break; 996 } 997 } 998 999 if (state.reset === true) { 1000 state.reset = false;
vendor: 6,200 bytes, lines 1001-1214
1001 index = -1; 1002 continue; 1003 } 1004 1005 var _state$orderedModifie = state.orderedModifiers[index], 1006 fn = _state$orderedModifie.fn, 1007 _state$orderedModifie2 = _state$orderedModifie.options, 1008 _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, 1009 name = _state$orderedModifie.name; 1010 1011 if (typeof fn === 'function') { 1012 state = fn({ 1013 state: state, 1014 options: _options, 1015 name: name, 1016 instance: instance 1017 }) || state; 1018 } 1019 } 1020 }, 1021 // Async and optimistically optimized update â it will not be executed if 1022 // not necessary (debounced to run at most once-per-tick) 1023 update: debounce(function () { 1024 return new Promise(function (resolve) { 1025 instance.forceUpdate(); 1026 resolve(state); 1027 }); 1028 }), 1029 destroy: function destroy() { 1030 cleanupModifierEffects(); 1031 isDestroyed = true; 1032 } 1033 }; 1034 1035 if (!areValidElements(reference, popper)) { 1036 { 1037 console.error(INVALID_ELEMENT_ERROR); 1038 } 1039 1040 return instance; 1041 } 1042 1043 instance.setOptions(options).then(function (state) { 1044 if (!isDestroyed && options.onFirstUpdate) { 1045 options.onFirstUpdate(state); 1046 } 1047 }); // Modifiers have the ability to execute arbitrary code before the first 1048 // update cycle runs. They will be executed in the same order as the update 1049 // cycle. This is useful when a modifier adds some persistent data that 1050 // other modifiers need to use, but the modifier is run after the dependent 1051 // one. 1052 1053 function runModifierEffects() { 1054 state.orderedModifiers.forEach(function (_ref3) { 1055 var name = _ref3.name, 1056 _ref3$options = _ref3.options, 1057 options = _ref3$options === void 0 ? {} : _ref3$options, 1058 effect = _ref3.effect; 1059 1060 if (typeof effect === 'function') { 1061 var cleanupFn = effect({ 1062 state: state, 1063 name: name, 1064 instance: instance, 1065 options: options 1066 }); 1067 1068 var noopFn = function noopFn() {}; 1069 1070 effectCleanupFns.push(cleanupFn || noopFn); 1071 } 1072 }); 1073 } 1074 1075 function cleanupModifierEffects() { 1076 effectCleanupFns.forEach(function (fn) { 1077 return fn(); 1078 }); 1079 effectCleanupFns = []; 1080 } 1081 1082 return instance; 1083 }; 1084 } 1085 1086 var passive = { 1087 passive: true 1088 }; 1089 1090 function effect$2(_ref) { 1091 var state = _ref.state, 1092 instance = _ref.instance, 1093 options = _ref.options; 1094 var _options$scroll = options.scroll, 1095 scroll = _options$scroll === void 0 ? true : _options$scroll, 1096 _options$resize = options.resize, 1097 resize = _options$resize === void 0 ? true : _options$resize; 1098 var window = getWindow(state.elements.popper); 1099 var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); 1100 1101 if (scroll) { 1102 scrollParents.forEach(function (scrollParent) { 1103 scrollParent.addEventListener('scroll', instance.update, passive); 1104 }); 1105 } 1106 1107 if (resize) { 1108 window.addEventListener('resize', instance.update, passive); 1109 } 1110 1111 return function () { 1112 if (scroll) { 1113 scrollParents.forEach(function (scrollParent) { 1114 scrollParent.removeEventListener('scroll', instance.update, passive); 1115 }); 1116 } 1117 1118 if (resize) { 1119 window.removeEventListener('resize', instance.update, passive); 1120 } 1121 }; 1122 } // eslint-disable-next-line import/no-unused-modules 1123 1124 1125 var eventListeners = { 1126 name: 'eventListeners', 1127 enabled: true, 1128 phase: 'write', 1129 fn: function fn() {}, 1130 effect: effect$2, 1131 data: {} 1132 }; 1133 1134 function popperOffsets(_ref) { 1135 var state = _ref.state, 1136 name = _ref.name; 1137 // Offsets are the actual position the popper needs to have to be 1138 // properly positioned near its reference element 1139 // This is the most basic placement, and will be adjusted by 1140 // the modifiers in the next step 1141 state.modifiersData[name] = computeOffsets({ 1142 reference: state.rects.reference, 1143 element: state.rects.popper, 1144 strategy: 'absolute', 1145 placement: state.placement 1146 }); 1147 } // eslint-disable-next-line import/no-unused-modules 1148 1149 1150 var popperOffsets$1 = { 1151 name: 'popperOffsets', 1152 enabled: true, 1153 phase: 'read', 1154 fn: popperOffsets, 1155 data: {} 1156 }; 1157 1158 var unsetSides = { 1159 top: 'auto', 1160 right: 'auto', 1161 bottom: 'auto', 1162 left: 'auto' 1163 }; // Round the offsets to the nearest suitable subpixel based on the DPR. 1164 // Zooming can change the DPR, but it seems to report a value that will 1165 // cleanly divide the values into the appropriate subpixels. 1166 1167 function roundOffsetsByDPR(_ref) { 1168 var x = _ref.x, 1169 y = _ref.y; 1170 var win = window; 1171 var dpr = win.devicePixelRatio || 1; 1172 return { 1173 x: round(x * dpr) / dpr || 0, 1174 y: round(y * dpr) / dpr || 0 1175 }; 1176 } 1177 1178 function mapToStyles(_ref2) { 1179 var _Object$assign2; 1180 1181 var popper = _ref2.popper, 1182 popperRect = _ref2.popperRect, 1183 placement = _ref2.placement, 1184 variation = _ref2.variation, 1185 offsets = _ref2.offsets, 1186 position = _ref2.position, 1187 gpuAcceleration = _ref2.gpuAcceleration, 1188 adaptive = _ref2.adaptive, 1189 roundOffsets = _ref2.roundOffsets, 1190 isFixed = _ref2.isFixed; 1191 var _offsets$x = offsets.x, 1192 x = _offsets$x === void 0 ? 0 : _offsets$x, 1193 _offsets$y = offsets.y, 1194 y = _offsets$y === void 0 ? 0 : _offsets$y; 1195 1196 var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ 1197 x: x, 1198 y: y 1199 }) : { 1200 x: x, 1201 y: y 1202 }; 1203 1204 x = _ref3.x; 1205 y = _ref3.y; 1206 var hasX = offsets.hasOwnProperty('x'); 1207 var hasY = offsets.hasOwnProperty('y'); 1208 var sideX = left; 1209 var sideY = top; 1210 var win = window; 1211 1212 if (adaptive) { 1213 var offsetParent = getOffsetParent(popper); 1214 var heightProp = 'clientHeight';
vendor: 4,833 bytes, lines 1215-1334
1215 var widthProp = 'clientWidth'; 1216 1217 if (offsetParent === getWindow(popper)) { 1218 offsetParent = getDocumentElement(popper); 1219 1220 if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { 1221 heightProp = 'scrollHeight'; 1222 widthProp = 'scrollWidth'; 1223 } 1224 } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it 1225 1226 1227 offsetParent = offsetParent; 1228 1229 if (placement === top || (placement === left || placement === right) && variation === end) { 1230 sideY = bottom; 1231 var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] 1232 offsetParent[heightProp]; 1233 y -= offsetY - popperRect.height; 1234 y *= gpuAcceleration ? 1 : -1; 1235 } 1236 1237 if (placement === left || (placement === top || placement === bottom) && variation === end) { 1238 sideX = right; 1239 var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] 1240 offsetParent[widthProp]; 1241 x -= offsetX - popperRect.width; 1242 x *= gpuAcceleration ? 1 : -1; 1243 } 1244 } 1245 1246 var commonStyles = Object.assign({ 1247 position: position 1248 }, adaptive && unsetSides); 1249 1250 var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ 1251 x: x, 1252 y: y 1253 }) : { 1254 x: x, 1255 y: y 1256 }; 1257 1258 x = _ref4.x; 1259 y = _ref4.y; 1260 1261 if (gpuAcceleration) { 1262 var _Object$assign; 1263 1264 return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); 1265 } 1266 1267 return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); 1268 } 1269 1270 function computeStyles(_ref5) { 1271 var state = _ref5.state, 1272 options = _ref5.options; 1273 var _options$gpuAccelerat = options.gpuAcceleration, 1274 gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, 1275 _options$adaptive = options.adaptive, 1276 adaptive = _options$adaptive === void 0 ? true : _options$adaptive, 1277 _options$roundOffsets = options.roundOffsets, 1278 roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; 1279 1280 { 1281 var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ''; 1282 1283 if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) { 1284 return transitionProperty.indexOf(property) >= 0; 1285 })) { 1286 console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' ')); 1287 } 1288 } 1289 1290 var commonStyles = { 1291 placement: getBasePlacement(state.placement), 1292 variation: getVariation(state.placement), 1293 popper: state.elements.popper, 1294 popperRect: state.rects.popper, 1295 gpuAcceleration: gpuAcceleration, 1296 isFixed: state.options.strategy === 'fixed' 1297 }; 1298 1299 if (state.modifiersData.popperOffsets != null) { 1300 state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { 1301 offsets: state.modifiersData.popperOffsets, 1302 position: state.options.strategy, 1303 adaptive: adaptive, 1304 roundOffsets: roundOffsets 1305 }))); 1306 } 1307 1308 if (state.modifiersData.arrow != null) { 1309 state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { 1310 offsets: state.modifiersData.arrow, 1311 position: 'absolute', 1312 adaptive: false, 1313 roundOffsets: roundOffsets 1314 }))); 1315 } 1316 1317 state.attributes.popper = Object.assign({}, state.attributes.popper, { 1318 'data-popper-placement': state.placement 1319 }); 1320 } // eslint-disable-next-line import/no-unused-modules 1321 1322 1323 var computeStyles$1 = { 1324 name: 'computeStyles', 1325 enabled: true, 1326 phase: 'beforeWrite', 1327 fn: computeStyles, 1328 data: {} 1329 }; 1330 1331 // and applies them to the HTMLElements such as popper and arrow 1332 1333 function applyStyles(_ref) { 1334 var state = _ref.state;
vendor: 5,639 bytes, lines 1335-1514
1335 Object.keys(state.elements).forEach(function (name) { 1336 var style = state.styles[name] || {}; 1337 var attributes = state.attributes[name] || {}; 1338 var element = state.elements[name]; // arrow is optional + virtual elements 1339 1340 if (!isHTMLElement(element) || !getNodeName(element)) { 1341 return; 1342 } // Flow doesn't support to extend this property, but it's the most 1343 // effective way to apply styles to an HTMLElement 1344 // $FlowFixMe[cannot-write] 1345 1346 1347 Object.assign(element.style, style); 1348 Object.keys(attributes).forEach(function (name) { 1349 var value = attributes[name]; 1350 1351 if (value === false) { 1352 element.removeAttribute(name); 1353 } else { 1354 element.setAttribute(name, value === true ? '' : value); 1355 } 1356 }); 1357 }); 1358 } 1359 1360 function effect$1(_ref2) { 1361 var state = _ref2.state; 1362 var initialStyles = { 1363 popper: { 1364 position: state.options.strategy, 1365 left: '0', 1366 top: '0', 1367 margin: '0' 1368 }, 1369 arrow: { 1370 position: 'absolute' 1371 }, 1372 reference: {} 1373 }; 1374 Object.assign(state.elements.popper.style, initialStyles.popper); 1375 state.styles = initialStyles; 1376 1377 if (state.elements.arrow) { 1378 Object.assign(state.elements.arrow.style, initialStyles.arrow); 1379 } 1380 1381 return function () { 1382 Object.keys(state.elements).forEach(function (name) { 1383 var element = state.elements[name]; 1384 var attributes = state.attributes[name] || {}; 1385 var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them 1386 1387 var style = styleProperties.reduce(function (style, property) { 1388 style[property] = ''; 1389 return style; 1390 }, {}); // arrow is optional + virtual elements 1391 1392 if (!isHTMLElement(element) || !getNodeName(element)) { 1393 return; 1394 } 1395 1396 Object.assign(element.style, style); 1397 Object.keys(attributes).forEach(function (attribute) { 1398 element.removeAttribute(attribute); 1399 }); 1400 }); 1401 }; 1402 } // eslint-disable-next-line import/no-unused-modules 1403 1404 1405 var applyStyles$1 = { 1406 name: 'applyStyles', 1407 enabled: true, 1408 phase: 'write', 1409 fn: applyStyles, 1410 effect: effect$1, 1411 requires: ['computeStyles'] 1412 }; 1413 1414 function distanceAndSkiddingToXY(placement, rects, offset) { 1415 var basePlacement = getBasePlacement(placement); 1416 var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; 1417 1418 var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { 1419 placement: placement 1420 })) : offset, 1421 skidding = _ref[0], 1422 distance = _ref[1]; 1423 1424 skidding = skidding || 0; 1425 distance = (distance || 0) * invertDistance; 1426 return [left, right].indexOf(basePlacement) >= 0 ? { 1427 x: distance, 1428 y: skidding 1429 } : { 1430 x: skidding, 1431 y: distance 1432 }; 1433 } 1434 1435 function offset(_ref2) { 1436 var state = _ref2.state, 1437 options = _ref2.options, 1438 name = _ref2.name; 1439 var _options$offset = options.offset, 1440 offset = _options$offset === void 0 ? [0, 0] : _options$offset; 1441 var data = placements.reduce(function (acc, placement) { 1442 acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); 1443 return acc; 1444 }, {}); 1445 var _data$state$placement = data[state.placement], 1446 x = _data$state$placement.x, 1447 y = _data$state$placement.y; 1448 1449 if (state.modifiersData.popperOffsets != null) { 1450 state.modifiersData.popperOffsets.x += x; 1451 state.modifiersData.popperOffsets.y += y; 1452 } 1453 1454 state.modifiersData[name] = data; 1455 } // eslint-disable-next-line import/no-unused-modules 1456 1457 1458 var offset$1 = { 1459 name: 'offset', 1460 enabled: true, 1461 phase: 'main', 1462 requires: ['popperOffsets'], 1463 fn: offset 1464 }; 1465 1466 var hash$1 = { 1467 left: 'right', 1468 right: 'left', 1469 bottom: 'top', 1470 top: 'bottom' 1471 }; 1472 function getOppositePlacement(placement) { 1473 return placement.replace(/left|right|bottom|top/g, function (matched) { 1474 return hash$1[matched]; 1475 }); 1476 } 1477 1478 var hash = { 1479 start: 'end', 1480 end: 'start' 1481 }; 1482 function getOppositeVariationPlacement(placement) { 1483 return placement.replace(/start|end/g, function (matched) { 1484 return hash[matched]; 1485 }); 1486 } 1487 1488 function computeAutoPlacement(state, options) { 1489 if (options === void 0) { 1490 options = {}; 1491 } 1492 1493 var _options = options, 1494 placement = _options.placement, 1495 boundary = _options.boundary, 1496 rootBoundary = _options.rootBoundary, 1497 padding = _options.padding, 1498 flipVariations = _options.flipVariations, 1499 _options$allowedAutoP = _options.allowedAutoPlacements, 1500 allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; 1501 var variation = getVariation(placement); 1502 var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { 1503 return getVariation(placement) === variation; 1504 }) : basePlacements; 1505 var allowedPlacements = placements$1.filter(function (placement) { 1506 return allowedAutoPlacements.indexOf(placement) >= 0; 1507 }); 1508 1509 if (allowedPlacements.length === 0) { 1510 allowedPlacements = placements$1; 1511 1512 { 1513 console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' ')); 1514 }
vendor: 14,143 bytes, lines 1514-1878
1514 1515 } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... 1516 1517 1518 var overflows = allowedPlacements.reduce(function (acc, placement) { 1519 acc[placement] = detectOverflow(state, { 1520 placement: placement, 1521 boundary: boundary, 1522 rootBoundary: rootBoundary, 1523 padding: padding 1524 })[getBasePlacement(placement)]; 1525 return acc; 1526 }, {}); 1527 return Object.keys(overflows).sort(function (a, b) { 1528 return overflows[a] - overflows[b]; 1529 }); 1530 } 1531 1532 function getExpandedFallbackPlacements(placement) { 1533 if (getBasePlacement(placement) === auto) { 1534 return []; 1535 } 1536 1537 var oppositePlacement = getOppositePlacement(placement); 1538 return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; 1539 } 1540 1541 function flip(_ref) { 1542 var state = _ref.state, 1543 options = _ref.options, 1544 name = _ref.name; 1545 1546 if (state.modifiersData[name]._skip) { 1547 return; 1548 } 1549 1550 var _options$mainAxis = options.mainAxis, 1551 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, 1552 _options$altAxis = options.altAxis, 1553 checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, 1554 specifiedFallbackPlacements = options.fallbackPlacements, 1555 padding = options.padding, 1556 boundary = options.boundary, 1557 rootBoundary = options.rootBoundary, 1558 altBoundary = options.altBoundary, 1559 _options$flipVariatio = options.flipVariations, 1560 flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, 1561 allowedAutoPlacements = options.allowedAutoPlacements; 1562 var preferredPlacement = state.options.placement; 1563 var basePlacement = getBasePlacement(preferredPlacement); 1564 var isBasePlacement = basePlacement === preferredPlacement; 1565 var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); 1566 var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { 1567 return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { 1568 placement: placement, 1569 boundary: boundary, 1570 rootBoundary: rootBoundary, 1571 padding: padding, 1572 flipVariations: flipVariations, 1573 allowedAutoPlacements: allowedAutoPlacements 1574 }) : placement); 1575 }, []); 1576 var referenceRect = state.rects.reference; 1577 var popperRect = state.rects.popper; 1578 var checksMap = new Map(); 1579 var makeFallbackChecks = true; 1580 var firstFittingPlacement = placements[0]; 1581 1582 for (var i = 0; i < placements.length; i++) { 1583 var placement = placements[i]; 1584 1585 var _basePlacement = getBasePlacement(placement); 1586 1587 var isStartVariation = getVariation(placement) === start; 1588 var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; 1589 var len = isVertical ? 'width' : 'height'; 1590 var overflow = detectOverflow(state, { 1591 placement: placement, 1592 boundary: boundary, 1593 rootBoundary: rootBoundary, 1594 altBoundary: altBoundary, 1595 padding: padding 1596 }); 1597 var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; 1598 1599 if (referenceRect[len] > popperRect[len]) { 1600 mainVariationSide = getOppositePlacement(mainVariationSide); 1601 } 1602 1603 var altVariationSide = getOppositePlacement(mainVariationSide); 1604 var checks = []; 1605 1606 if (checkMainAxis) { 1607 checks.push(overflow[_basePlacement] <= 0); 1608 } 1609 1610 if (checkAltAxis) { 1611 checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); 1612 } 1613 1614 if (checks.every(function (check) { 1615 return check; 1616 })) { 1617 firstFittingPlacement = placement; 1618 makeFallbackChecks = false; 1619 break; 1620 } 1621 1622 checksMap.set(placement, checks); 1623 } 1624 1625 if (makeFallbackChecks) { 1626 // `2` may be desired in some cases â research later 1627 var numberOfChecks = flipVariations ? 3 : 1; 1628 1629 var _loop = function _loop(_i) { 1630 var fittingPlacement = placements.find(function (placement) { 1631 var checks = checksMap.get(placement); 1632 1633 if (checks) { 1634 return checks.slice(0, _i).every(function (check) { 1635 return check; 1636 }); 1637 } 1638 }); 1639 1640 if (fittingPlacement) { 1641 firstFittingPlacement = fittingPlacement; 1642 return "break"; 1643 } 1644 }; 1645 1646 for (var _i = numberOfChecks; _i > 0; _i--) { 1647 var _ret = _loop(_i); 1648 1649 if (_ret === "break") break; 1650 } 1651 } 1652 1653 if (state.placement !== firstFittingPlacement) { 1654 state.modifiersData[name]._skip = true; 1655 state.placement = firstFittingPlacement; 1656 state.reset = true; 1657 } 1658 } // eslint-disable-next-line import/no-unused-modules 1659 1660 1661 var flip$1 = { 1662 name: 'flip', 1663 enabled: true, 1664 phase: 'main', 1665 fn: flip, 1666 requiresIfExists: ['offset'], 1667 data: { 1668 _skip: false 1669 } 1670 }; 1671 1672 function getAltAxis(axis) { 1673 return axis === 'x' ? 'y' : 'x'; 1674 } 1675 1676 function within(min$1, value, max$1) { 1677 return max(min$1, min(value, max$1)); 1678 } 1679 function withinMaxClamp(min, value, max) { 1680 var v = within(min, value, max); 1681 return v > max ? max : v; 1682 } 1683 1684 function preventOverflow(_ref) { 1685 var state = _ref.state, 1686 options = _ref.options, 1687 name = _ref.name; 1688 var _options$mainAxis = options.mainAxis, 1689 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, 1690 _options$altAxis = options.altAxis, 1691 checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, 1692 boundary = options.boundary, 1693 rootBoundary = options.rootBoundary, 1694 altBoundary = options.altBoundary, 1695 padding = options.padding, 1696 _options$tether = options.tether, 1697 tether = _options$tether === void 0 ? true : _options$tether, 1698 _options$tetherOffset = options.tetherOffset, 1699 tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; 1700 var overflow = detectOverflow(state, { 1701 boundary: boundary, 1702 rootBoundary: rootBoundary, 1703 padding: padding, 1704 altBoundary: altBoundary 1705 }); 1706 var basePlacement = getBasePlacement(state.placement); 1707 var variation = getVariation(state.placement); 1708 var isBasePlacement = !variation; 1709 var mainAxis = getMainAxisFromPlacement(basePlacement); 1710 var altAxis = getAltAxis(mainAxis); 1711 var popperOffsets = state.modifiersData.popperOffsets; 1712 var referenceRect = state.rects.reference; 1713 var popperRect = state.rects.popper; 1714 var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { 1715 placement: state.placement 1716 })) : tetherOffset; 1717 var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { 1718 mainAxis: tetherOffsetValue, 1719 altAxis: tetherOffsetValue 1720 } : Object.assign({ 1721 mainAxis: 0, 1722 altAxis: 0 1723 }, tetherOffsetValue); 1724 var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; 1725 var data = { 1726 x: 0, 1727 y: 0 1728 }; 1729 1730 if (!popperOffsets) { 1731 return; 1732 } 1733 1734 if (checkMainAxis) { 1735 var _offsetModifierState$; 1736 1737 var mainSide = mainAxis === 'y' ? top : left; 1738 var altSide = mainAxis === 'y' ? bottom : right; 1739 var len = mainAxis === 'y' ? 'height' : 'width'; 1740 var offset = popperOffsets[mainAxis]; 1741 var min$1 = offset + overflow[mainSide]; 1742 var max$1 = offset - overflow[altSide]; 1743 var additive = tether ? -popperRect[len] / 2 : 0; 1744 var minLen = variation === start ? referenceRect[len] : popperRect[len]; 1745 var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go 1746 // outside the reference bounds 1747 1748 var arrowElement = state.elements.arrow; 1749 var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { 1750 width: 0, 1751 height: 0 1752 }; 1753 var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); 1754 var arrowPaddingMin = arrowPaddingObject[mainSide]; 1755 var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want 1756 // to include its full size in the calculation. If the reference is small 1757 // and near the edge of a boundary, the popper can overflow even if the 1758 // reference is not overflowing as well (e.g. virtual elements with no 1759 // width or height) 1760 1761 var arrowLen = within(0, referenceRect[len], arrowRect[len]); 1762 var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; 1763 var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; 1764 var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); 1765 var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; 1766 var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; 1767 var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; 1768 var tetherMax = offset + maxOffset - offsetModifierValue; 1769 var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1); 1770 popperOffsets[mainAxis] = preventedOffset; 1771 data[mainAxis] = preventedOffset - offset; 1772 } 1773 1774 if (checkAltAxis) { 1775 var _offsetModifierState$2; 1776 1777 var _mainSide = mainAxis === 'x' ? top : left; 1778 1779 var _altSide = mainAxis === 'x' ? bottom : right; 1780 1781 var _offset = popperOffsets[altAxis]; 1782 1783 var _len = altAxis === 'y' ? 'height' : 'width'; 1784 1785 var _min = _offset + overflow[_mainSide]; 1786 1787 var _max = _offset - overflow[_altSide]; 1788 1789 var isOriginSide = [top, left].indexOf(basePlacement) !== -1; 1790 1791 var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; 1792 1793 var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; 1794 1795 var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; 1796 1797 var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); 1798 1799 popperOffsets[altAxis] = _preventedOffset; 1800 data[altAxis] = _preventedOffset - _offset; 1801 } 1802 1803 state.modifiersData[name] = data; 1804 } // eslint-disable-next-line import/no-unused-modules 1805 1806 1807 var preventOverflow$1 = { 1808 name: 'preventOverflow', 1809 enabled: true, 1810 phase: 'main', 1811 fn: preventOverflow, 1812 requiresIfExists: ['offset'] 1813 }; 1814 1815 var toPaddingObject = function toPaddingObject(padding, state) { 1816 padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { 1817 placement: state.placement 1818 })) : padding; 1819 return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); 1820 }; 1821 1822 function arrow(_ref) { 1823 var _state$modifiersData$; 1824 1825 var state = _ref.state, 1826 name = _ref.name, 1827 options = _ref.options; 1828 var arrowElement = state.elements.arrow; 1829 var popperOffsets = state.modifiersData.popperOffsets; 1830 var basePlacement = getBasePlacement(state.placement); 1831 var axis = getMainAxisFromPlacement(basePlacement); 1832 var isVertical = [left, right].indexOf(basePlacement) >= 0; 1833 var len = isVertical ? 'height' : 'width'; 1834 1835 if (!arrowElement || !popperOffsets) { 1836 return; 1837 } 1838 1839 var paddingObject = toPaddingObject(options.padding, state); 1840 var arrowRect = getLayoutRect(arrowElement); 1841 var minProp = axis === 'y' ? top : left; 1842 var maxProp = axis === 'y' ? bottom : right; 1843 var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; 1844 var startDiff = popperOffsets[axis] - state.rects.reference[axis]; 1845 var arrowOffsetParent = getOffsetParent(arrowElement); 1846 var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; 1847 var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is 1848 // outside of the popper bounds 1849 1850 var min = paddingObject[minProp]; 1851 var max = clientSize - arrowRect[len] - paddingObject[maxProp]; 1852 var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; 1853 var offset = within(min, center, max); // Prevents breaking syntax highlighting... 1854 1855 var axisProp = axis; 1856 state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); 1857 } 1858 1859 function effect(_ref2) { 1860 var state = _ref2.state, 1861 options = _ref2.options; 1862 var _options$element = options.element, 1863 arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; 1864 1865 if (arrowElement == null) { 1866 return; 1867 } // CSS selector 1868 1869 1870 if (typeof arrowElement === 'string') { 1871 arrowElement = state.elements.popper.querySelector(arrowElement); 1872 1873 if (!arrowElement) { 1874 return; 1875 } 1876 } 1877 1878
vendor: 3,895 bytes, lines 1878-1993
1878{ 1879 if (!isHTMLElement(arrowElement)) { 1880 console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' ')); 1881 } 1882 } 1883 1884 if (!contains(state.elements.popper, arrowElement)) { 1885 { 1886 console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' ')); 1887 } 1888 1889 return; 1890 } 1891 1892 state.elements.arrow = arrowElement; 1893 } // eslint-disable-next-line import/no-unused-modules 1894 1895 1896 var arrow$1 = { 1897 name: 'arrow', 1898 enabled: true, 1899 phase: 'main', 1900 fn: arrow, 1901 effect: effect, 1902 requires: ['popperOffsets'], 1903 requiresIfExists: ['preventOverflow'] 1904 }; 1905 1906 function getSideOffsets(overflow, rect, preventedOffsets) { 1907 if (preventedOffsets === void 0) { 1908 preventedOffsets = { 1909 x: 0, 1910 y: 0 1911 }; 1912 } 1913 1914 return { 1915 top: overflow.top - rect.height - preventedOffsets.y, 1916 right: overflow.right - rect.width + preventedOffsets.x, 1917 bottom: overflow.bottom - rect.height + preventedOffsets.y, 1918 left: overflow.left - rect.width - preventedOffsets.x 1919 }; 1920 } 1921 1922 function isAnySideFullyClipped(overflow) { 1923 return [top, right, bottom, left].some(function (side) { 1924 return overflow[side] >= 0; 1925 }); 1926 } 1927 1928 function hide(_ref) { 1929 var state = _ref.state, 1930 name = _ref.name; 1931 var referenceRect = state.rects.reference; 1932 var popperRect = state.rects.popper; 1933 var preventedOffsets = state.modifiersData.preventOverflow; 1934 var referenceOverflow = detectOverflow(state, { 1935 elementContext: 'reference' 1936 }); 1937 var popperAltOverflow = detectOverflow(state, { 1938 altBoundary: true 1939 }); 1940 var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); 1941 var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); 1942 var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); 1943 var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); 1944 state.modifiersData[name] = { 1945 referenceClippingOffsets: referenceClippingOffsets, 1946 popperEscapeOffsets: popperEscapeOffsets, 1947 isReferenceHidden: isReferenceHidden, 1948 hasPopperEscaped: hasPopperEscaped 1949 }; 1950 state.attributes.popper = Object.assign({}, state.attributes.popper, { 1951 'data-popper-reference-hidden': isReferenceHidden, 1952 'data-popper-escaped': hasPopperEscaped 1953 }); 1954 } // eslint-disable-next-line import/no-unused-modules 1955 1956 1957 var hide$1 = { 1958 name: 'hide', 1959 enabled: true, 1960 phase: 'main', 1961 requiresIfExists: ['preventOverflow'], 1962 fn: hide 1963 }; 1964 1965 var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; 1966 var createPopper$1 = /*#__PURE__*/popperGenerator({ 1967 defaultModifiers: defaultModifiers$1 1968 }); // eslint-disable-next-line import/no-unused-modules 1969 1970 var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; 1971 var createPopper = /*#__PURE__*/popperGenerator({ 1972 defaultModifiers: defaultModifiers 1973 }); // eslint-disable-next-line import/no-unused-modules 1974 1975 exports.applyStyles = applyStyles$1; 1976 exports.arrow = arrow$1; 1977 exports.computeStyles = computeStyles$1; 1978 exports.createPopper = createPopper; 1979 exports.createPopperLite = createPopper$1; 1980 exports.defaultModifiers = defaultModifiers; 1981 exports.detectOverflow = detectOverflow; 1982 exports.eventListeners = eventListeners; 1983 exports.flip = flip$1; 1984 exports.hide = hide$1; 1985 exports.offset = offset$1; 1986 exports.popperGenerator = popperGenerator; 1987 exports.popperOffsets = popperOffsets$1; 1988 exports.preventOverflow = preventOverflow$1; 1989 1990 Object.defineProperty(exports, '__esModule', { value: true }); 1991 1992}))); 1993//# sourceMappingURL=popper.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.