@frollo/frollo-web-ui 5.0.5 → 6.0.0

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