@paperless/core 2.22.0-alpha.27 → 2.22.0-alpha.29

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 (213) hide show
  1. package/dist/build/index.esm.js +1 -1
  2. package/dist/{paperless/p-84c43a3d.entry.js → build/p-1c17ee9b.entry.js} +1 -1
  3. package/dist/build/p-25961586.entry.js +1 -0
  4. package/dist/{paperless/p-9f51b9dc.entry.js → build/p-260a97c9.entry.js} +1 -1
  5. package/dist/build/{p-44da0b12.entry.js → p-2a37b400.entry.js} +1 -1
  6. package/dist/build/{p-fff6fa7a.entry.js → p-31399606.entry.js} +1 -1
  7. package/dist/build/{p-fa519af0.js → p-5f422b65.js} +1 -1
  8. package/dist/build/p-60923e39.entry.js +1 -0
  9. package/dist/{paperless/p-d24f045f.entry.js → build/p-6aa93bf9.entry.js} +1 -1
  10. package/dist/build/{p-e51c1cd6.entry.js → p-70974f53.entry.js} +1 -1
  11. package/dist/build/p-75ba802e.entry.js +3 -0
  12. package/dist/build/{p-b781e8db.entry.js → p-8c1bf7ea.entry.js} +1 -1
  13. package/dist/{paperless/p-7d018d4d.entry.js → build/p-9e06356b.entry.js} +1 -1
  14. package/dist/build/p-B_lDCj8j.js +1 -0
  15. package/dist/build/p-CeBIrPPx.js +1 -0
  16. package/dist/build/{p-78b15121.entry.js → p-a6369294.entry.js} +1 -1
  17. package/dist/build/p-a9c0aab3.entry.js +1 -0
  18. package/dist/build/p-b85ee4b7.entry.js +1 -0
  19. package/dist/build/{p-76f83633.entry.js → p-ba7ccf80.entry.js} +1 -1
  20. package/dist/build/{p-524eb1cb.entry.js → p-c16870f5.entry.js} +1 -1
  21. package/dist/build/{p-17e598ac.entry.js → p-cf436a7d.entry.js} +1 -1
  22. package/dist/build/{p-0d6f3aa3.entry.js → p-cfbd02e6.entry.js} +1 -1
  23. package/dist/build/{p-cbeb58ba.entry.js → p-e907c9d3.entry.js} +1 -1
  24. package/dist/build/{p-d9b3ace4.entry.js → p-ee7858e4.entry.js} +1 -1
  25. package/dist/build/{p-23cc6b6b.entry.js → p-f1c6f25b.entry.js} +1 -1
  26. package/dist/{paperless/p-5abcc8d2.entry.js → build/p-f5be155f.entry.js} +1 -1
  27. package/dist/build/p-xs4N_Y-0.js +1 -0
  28. package/dist/build/paperless.esm.js +1 -1
  29. package/dist/cjs/{cn-BGmLaIp8.js → cn-Cd68UVBT.js} +30 -274
  30. package/dist/cjs/{floating-ui.dom-33QlkSyu.js → floating-ui.dom-DEq7yeQK.js} +91 -50
  31. package/dist/cjs/index.cjs.js +1 -1
  32. package/dist/cjs/locale-BIZDGOk_.js +75117 -0
  33. package/dist/cjs/p-accordion.cjs.entry.js +1 -1
  34. package/dist/cjs/p-attachment.cjs.entry.js +1 -1
  35. package/dist/cjs/p-badge_3.cjs.entry.js +1 -1
  36. package/dist/cjs/p-button_3.cjs.entry.js +6 -6
  37. package/dist/cjs/p-calendar.cjs.entry.js +75 -302
  38. package/dist/cjs/p-card-container.cjs.entry.js +1 -1
  39. package/dist/cjs/p-checkbox_3.cjs.entry.js +2 -2
  40. package/dist/cjs/p-content-slider.cjs.entry.js +1 -1
  41. package/dist/cjs/p-cropper.cjs.entry.js +88 -32
  42. package/dist/cjs/p-datepicker.cjs.entry.js +41 -2891
  43. package/dist/cjs/p-divider.cjs.entry.js +1 -1
  44. package/dist/cjs/p-dropdown-menu-item_2.cjs.entry.js +1 -1
  45. package/dist/cjs/p-empty-state_8.cjs.entry.js +12 -18
  46. package/dist/cjs/p-field_3.cjs.entry.js +1 -1
  47. package/dist/cjs/p-illustration.cjs.entry.js +1 -1
  48. package/dist/cjs/p-label.cjs.entry.js +1 -1
  49. package/dist/cjs/p-listing.cjs.entry.js +1 -1
  50. package/dist/cjs/p-navigation-item.cjs.entry.js +1 -1
  51. package/dist/cjs/p-pagination_3.cjs.entry.js +2 -2
  52. package/dist/cjs/p-select.cjs.entry.js +1 -1
  53. package/dist/cjs/p-table.cjs.entry.js +1 -1
  54. package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
  55. package/dist/collection/components/atoms/loader/loader.component.js +1 -1
  56. package/dist/collection/components/molecules/button/button.component.js +8 -7
  57. package/dist/collection/components/molecules/calendar/calendar.component.js +1 -2
  58. package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
  59. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/{p-BtuWYjfq.js → p--JDhF4GL.js} +1 -1
  62. package/dist/components/{p-DW-MndqD.js → p-0y7dmBHx.js} +1 -1
  63. package/dist/components/{p-DxmwiGc9.js → p-B4tCVctO.js} +1 -1
  64. package/dist/components/{p-LfH4pSix.js → p-BA1QFuzs.js} +1 -1
  65. package/dist/components/{p-Bno5n2sV.js → p-BBmuctek.js} +1 -1
  66. package/dist/components/p-BE2DRulM.js +1 -0
  67. package/dist/components/{p-Dbt4VuQm.js → p-BPP8ZYwN.js} +1 -1
  68. package/dist/components/{p-BeiMfpUZ.js → p-BV-h5ALt.js} +1 -1
  69. package/dist/components/{p-C_dax2wr.js → p-BX8yg_1a.js} +1 -1
  70. package/dist/components/{p-CjI4hMLv.js → p-BaXKEl7X.js} +1 -1
  71. package/dist/components/{p-BfJQbKrn.js → p-CCvROjOe.js} +1 -1
  72. package/dist/components/p-CHydrUrt.js +1 -0
  73. package/dist/components/{p-Bi6PK1YV.js → p-CccN0jY7.js} +1 -1
  74. package/dist/components/p-CeBIrPPx.js +1 -0
  75. package/dist/components/{p-BMb-TnTI.js → p-Coxruux_.js} +1 -1
  76. package/dist/components/{p-B9n8mzrj.js → p-DAuzJ_qL.js} +1 -1
  77. package/dist/components/{p-BAIZ48ms.js → p-DZjr9R4d.js} +1 -1
  78. package/dist/components/{p-BBNOzE00.js → p-Djf2rBRX.js} +1 -1
  79. package/dist/components/p-Dl4hxOHI.js +1 -0
  80. package/dist/components/{p-BIQLsxW1.js → p-DuYGcgJi.js} +1 -1
  81. package/dist/components/{p-CFu8cH3m.js → p-DxNTB_Qq.js} +1 -1
  82. package/dist/components/{p-CgOKCXab.js → p-JhZXmipA.js} +1 -1
  83. package/dist/components/{p-ChfXIxTQ.js → p-KuL1SNit.js} +1 -1
  84. package/dist/components/p-accordion.js +1 -1
  85. package/dist/components/p-attachment.js +1 -1
  86. package/dist/components/p-button.js +1 -1
  87. package/dist/components/p-calendar.js +1 -1
  88. package/dist/components/p-card-container.js +1 -1
  89. package/dist/components/p-card-header.js +1 -1
  90. package/dist/components/p-content-slider.js +1 -1
  91. package/dist/components/p-cropper.js +2 -2
  92. package/dist/components/p-datepicker.js +1 -1
  93. package/dist/components/p-divider.js +1 -1
  94. package/dist/components/p-drawer-header.js +1 -1
  95. package/dist/components/p-drawer.js +1 -1
  96. package/dist/components/p-dropdown-menu-item.js +1 -1
  97. package/dist/components/p-dropdown.js +1 -1
  98. package/dist/components/p-empty-state.js +1 -1
  99. package/dist/components/p-field-container.js +1 -1
  100. package/dist/components/p-field.js +1 -1
  101. package/dist/components/p-floating-menu-container.js +1 -1
  102. package/dist/components/p-helper.js +1 -1
  103. package/dist/components/p-illustration.js +1 -1
  104. package/dist/components/p-label.js +1 -1
  105. package/dist/components/p-listing.js +1 -1
  106. package/dist/components/p-modal-footer.js +1 -1
  107. package/dist/components/p-modal-header.js +1 -1
  108. package/dist/components/p-modal.js +1 -1
  109. package/dist/components/p-navbar.js +1 -1
  110. package/dist/components/p-navigation-item.js +1 -1
  111. package/dist/components/p-pagination-pages.js +1 -1
  112. package/dist/components/p-pagination-size.js +1 -1
  113. package/dist/components/p-pagination.js +1 -1
  114. package/dist/components/{p-PFAC3Kay.js → p-prb4IQlb.js} +1 -1
  115. package/dist/components/p-profile.js +1 -1
  116. package/dist/components/p-segment-item.js +1 -1
  117. package/dist/components/p-select.js +1 -1
  118. package/dist/components/{p-CCOwunss.js → p-swqKzLDH.js} +1 -1
  119. package/dist/components/p-tab-container.js +1 -1
  120. package/dist/components/p-table-cell.js +1 -1
  121. package/dist/components/p-table-footer.js +1 -1
  122. package/dist/components/p-table-header.js +1 -1
  123. package/dist/components/p-table-row-actions-container.js +1 -1
  124. package/dist/components/p-table-row.js +1 -1
  125. package/dist/components/p-table.js +1 -1
  126. package/dist/components/p-tooltip.js +1 -1
  127. package/dist/components/p-xs4N_Y-0.js +1 -0
  128. package/dist/esm/{cn-BniKgfyU.js → cn-CsNqHcjL.js} +30 -274
  129. package/dist/esm/{floating-ui.dom-DGLCmOXW.js → floating-ui.dom-CeBIrPPx.js} +91 -50
  130. package/dist/esm/index.js +1 -1
  131. package/dist/esm/locale-B_lDCj8j.js +75114 -0
  132. package/dist/esm/p-accordion.entry.js +1 -1
  133. package/dist/esm/p-attachment.entry.js +1 -1
  134. package/dist/esm/p-badge_3.entry.js +1 -1
  135. package/dist/esm/p-button_3.entry.js +6 -6
  136. package/dist/esm/p-calendar.entry.js +63 -290
  137. package/dist/esm/p-card-container.entry.js +1 -1
  138. package/dist/esm/p-checkbox_3.entry.js +2 -2
  139. package/dist/esm/p-content-slider.entry.js +1 -1
  140. package/dist/esm/p-cropper.entry.js +88 -32
  141. package/dist/esm/p-datepicker.entry.js +37 -2887
  142. package/dist/esm/p-divider.entry.js +1 -1
  143. package/dist/esm/p-dropdown-menu-item_2.entry.js +1 -1
  144. package/dist/esm/p-empty-state_8.entry.js +12 -18
  145. package/dist/esm/p-field_3.entry.js +1 -1
  146. package/dist/esm/p-illustration.entry.js +1 -1
  147. package/dist/esm/p-label.entry.js +1 -1
  148. package/dist/esm/p-listing.entry.js +1 -1
  149. package/dist/esm/p-navigation-item.entry.js +1 -1
  150. package/dist/esm/p-pagination_3.entry.js +2 -2
  151. package/dist/esm/p-select.entry.js +1 -1
  152. package/dist/esm/p-table.entry.js +1 -1
  153. package/dist/esm/p-tooltip.entry.js +1 -1
  154. package/dist/index.html +1 -1
  155. package/dist/paperless/index.esm.js +1 -1
  156. package/dist/{build/p-84c43a3d.entry.js → paperless/p-1c17ee9b.entry.js} +1 -1
  157. package/dist/paperless/p-25961586.entry.js +1 -0
  158. package/dist/{build/p-9f51b9dc.entry.js → paperless/p-260a97c9.entry.js} +1 -1
  159. package/dist/paperless/{p-44da0b12.entry.js → p-2a37b400.entry.js} +1 -1
  160. package/dist/paperless/{p-fff6fa7a.entry.js → p-31399606.entry.js} +1 -1
  161. package/dist/paperless/p-60923e39.entry.js +1 -0
  162. package/dist/{build/p-d24f045f.entry.js → paperless/p-6aa93bf9.entry.js} +1 -1
  163. package/dist/paperless/{p-e51c1cd6.entry.js → p-70974f53.entry.js} +1 -1
  164. package/dist/paperless/p-75ba802e.entry.js +3 -0
  165. package/dist/paperless/{p-b781e8db.entry.js → p-8c1bf7ea.entry.js} +1 -1
  166. package/dist/{build/p-7d018d4d.entry.js → paperless/p-9e06356b.entry.js} +1 -1
  167. package/dist/paperless/p-B_lDCj8j.js +1 -0
  168. package/dist/paperless/p-CeBIrPPx.js +1 -0
  169. package/dist/paperless/{p-78b15121.entry.js → p-a6369294.entry.js} +1 -1
  170. package/dist/paperless/p-a9c0aab3.entry.js +1 -0
  171. package/dist/paperless/p-b85ee4b7.entry.js +1 -0
  172. package/dist/paperless/{p-76f83633.entry.js → p-ba7ccf80.entry.js} +1 -1
  173. package/dist/paperless/{p-524eb1cb.entry.js → p-c16870f5.entry.js} +1 -1
  174. package/dist/paperless/{p-17e598ac.entry.js → p-cf436a7d.entry.js} +1 -1
  175. package/dist/paperless/{p-0d6f3aa3.entry.js → p-cfbd02e6.entry.js} +1 -1
  176. package/dist/paperless/{p-cbeb58ba.entry.js → p-e907c9d3.entry.js} +1 -1
  177. package/dist/paperless/{p-d9b3ace4.entry.js → p-ee7858e4.entry.js} +1 -1
  178. package/dist/paperless/{p-23cc6b6b.entry.js → p-f1c6f25b.entry.js} +1 -1
  179. package/dist/{build/p-5abcc8d2.entry.js → paperless/p-f5be155f.entry.js} +1 -1
  180. package/dist/paperless/p-xs4N_Y-0.js +1 -0
  181. package/dist/paperless/paperless.esm.js +1 -1
  182. package/dist/sw.js +1 -1
  183. package/dist/sw.js.map +1 -1
  184. package/dist/types/components/molecules/button/button.component.d.ts +1 -1
  185. package/dist/types/components.d.ts +3 -1
  186. package/dist/workbox-d13932f0.js +1 -1
  187. package/dist/workbox-d13932f0.js.map +1 -1
  188. package/hydrate/index.js +75313 -6268
  189. package/hydrate/index.mjs +75313 -6268
  190. package/package.json +10 -11
  191. package/dist/build/p-1f7ab568.entry.js +0 -1
  192. package/dist/build/p-20077155.entry.js +0 -1
  193. package/dist/build/p-3452b2f5.entry.js +0 -3
  194. package/dist/build/p-CT54OXR2.js +0 -1
  195. package/dist/build/p-DGLCmOXW.js +0 -1
  196. package/dist/build/p-KEbntKvf.js +0 -1
  197. package/dist/build/p-b090e928.entry.js +0 -1
  198. package/dist/build/p-bafe9297.entry.js +0 -1
  199. package/dist/cjs/index-DG6V15XP.js +0 -2871
  200. package/dist/components/p-CPpl-J0y.js +0 -1
  201. package/dist/components/p-CT54OXR2.js +0 -1
  202. package/dist/components/p-D4bALv5t.js +0 -1
  203. package/dist/components/p-DGLCmOXW.js +0 -1
  204. package/dist/components/p-DeSgaQxj.js +0 -1
  205. package/dist/esm/index-KEbntKvf.js +0 -2839
  206. package/dist/paperless/p-1f7ab568.entry.js +0 -1
  207. package/dist/paperless/p-20077155.entry.js +0 -1
  208. package/dist/paperless/p-3452b2f5.entry.js +0 -3
  209. package/dist/paperless/p-CT54OXR2.js +0 -1
  210. package/dist/paperless/p-DGLCmOXW.js +0 -1
  211. package/dist/paperless/p-KEbntKvf.js +0 -1
  212. package/dist/paperless/p-b090e928.entry.js +0 -1
  213. package/dist/paperless/p-bafe9297.entry.js +0 -1
@@ -41,8 +41,9 @@ function getOppositeAxis(axis) {
41
41
  function getAxisLength(axis) {
42
42
  return axis === 'y' ? 'height' : 'width';
43
43
  }
44
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
44
45
  function getSideAxis(placement) {
45
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
46
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
46
47
  }
47
48
  function getAlignmentAxis(placement) {
48
49
  return getOppositeAxis(getSideAxis(placement));
@@ -67,19 +68,19 @@ function getExpandedPlacements(placement) {
67
68
  function getOppositeAlignmentPlacement(placement) {
68
69
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
69
70
  }
71
+ const lrPlacement = ['left', 'right'];
72
+ const rlPlacement = ['right', 'left'];
73
+ const tbPlacement = ['top', 'bottom'];
74
+ const btPlacement = ['bottom', 'top'];
70
75
  function getSideList(side, isStart, rtl) {
71
- const lr = ['left', 'right'];
72
- const rl = ['right', 'left'];
73
- const tb = ['top', 'bottom'];
74
- const bt = ['bottom', 'top'];
75
76
  switch (side) {
76
77
  case 'top':
77
78
  case 'bottom':
78
- if (rtl) return isStart ? rl : lr;
79
- return isStart ? lr : rl;
79
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
80
+ return isStart ? lrPlacement : rlPlacement;
80
81
  case 'left':
81
82
  case 'right':
82
- return isStart ? tb : bt;
83
+ return isStart ? tbPlacement : btPlacement;
83
84
  default:
84
85
  return [];
85
86
  }
@@ -417,16 +418,22 @@ const flip$1 = function (options) {
417
418
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
418
419
  const nextPlacement = placements[nextIndex];
419
420
  if (nextPlacement) {
420
- // Try next placement and re-run the lifecycle.
421
- return {
422
- data: {
423
- index: nextIndex,
424
- overflows: overflowsData
425
- },
426
- reset: {
427
- placement: nextPlacement
428
- }
429
- };
421
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
422
+ if (!ignoreCrossAxisOverflow ||
423
+ // We leave the current main axis only if every placement on that axis
424
+ // overflows the main axis.
425
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
426
+ // Try next placement and re-run the lifecycle.
427
+ return {
428
+ data: {
429
+ index: nextIndex,
430
+ overflows: overflowsData
431
+ },
432
+ reset: {
433
+ placement: nextPlacement
434
+ }
435
+ };
436
+ }
430
437
  }
431
438
 
432
439
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -472,6 +479,8 @@ const flip$1 = function (options) {
472
479
  };
473
480
  };
474
481
 
482
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
483
+
475
484
  // For type backwards-compatibility, the `OffsetOptions` type was also
476
485
  // Derivable.
477
486
 
@@ -485,7 +494,7 @@ async function convertValueToCoords(state, options) {
485
494
  const side = getSide(placement);
486
495
  const alignment = getAlignment(placement);
487
496
  const isVertical = getSideAxis(placement) === 'y';
488
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
497
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
489
498
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
490
499
  const rawValue = evaluate(options, state);
491
500
 
@@ -678,34 +687,40 @@ function isShadowRoot(value) {
678
687
  }
679
688
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
680
689
  }
690
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
681
691
  function isOverflowElement(element) {
682
692
  const {
683
693
  overflow,
684
694
  overflowX,
685
695
  overflowY,
686
696
  display
687
- } = getComputedStyle(element);
688
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
697
+ } = getComputedStyle$1(element);
698
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
689
699
  }
700
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
690
701
  function isTableElement(element) {
691
- return ['table', 'td', 'th'].includes(getNodeName(element));
702
+ return tableElements.has(getNodeName(element));
692
703
  }
704
+ const topLayerSelectors = [':popover-open', ':modal'];
693
705
  function isTopLayer(element) {
694
- return [':popover-open', ':modal'].some(selector => {
706
+ return topLayerSelectors.some(selector => {
695
707
  try {
696
708
  return element.matches(selector);
697
- } catch (e) {
709
+ } catch (_e) {
698
710
  return false;
699
711
  }
700
712
  });
701
713
  }
714
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
715
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
716
+ const containValues = ['paint', 'layout', 'strict', 'content'];
702
717
  function isContainingBlock(elementOrCss) {
703
718
  const webkit = isWebKit();
704
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
719
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
705
720
 
706
721
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
707
722
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
708
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
723
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
709
724
  }
710
725
  function getContainingBlock(element) {
711
726
  let currentNode = getParentNode(element);
@@ -723,10 +738,11 @@ function isWebKit() {
723
738
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
724
739
  return CSS.supports('-webkit-backdrop-filter', 'none');
725
740
  }
741
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
726
742
  function isLastTraversableNode(node) {
727
- return ['html', 'body', '#document'].includes(getNodeName(node));
743
+ return lastTraversableNodeNames.has(getNodeName(node));
728
744
  }
729
- function getComputedStyle(element) {
745
+ function getComputedStyle$1(element) {
730
746
  return getWindow(element).getComputedStyle(element);
731
747
  }
732
748
  function getNodeScroll(element) {
@@ -788,7 +804,7 @@ function getFrameElement(win) {
788
804
  }
789
805
 
790
806
  function getCssDimensions(element) {
791
- const css = getComputedStyle(element);
807
+ const css = getComputedStyle$1(element);
792
808
  // In testing environments, the `width` and `height` properties are empty
793
809
  // strings for SVG elements, returning NaN. Fallback to `0` in this case.
794
810
  let width = parseFloat(css.width) || 0;
@@ -893,7 +909,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
893
909
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
894
910
  const iframeScale = getScale(currentIFrame);
895
911
  const iframeRect = currentIFrame.getBoundingClientRect();
896
- const css = getComputedStyle(currentIFrame);
912
+ const css = getComputedStyle$1(currentIFrame);
897
913
  const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
898
914
  const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
899
915
  x *= iframeScale.x;
@@ -924,14 +940,9 @@ function getWindowScrollBarX(element, rect) {
924
940
  return rect.left + leftScroll;
925
941
  }
926
942
 
927
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
928
- if (ignoreScrollbarX === void 0) {
929
- ignoreScrollbarX = false;
930
- }
943
+ function getHTMLOffset(documentElement, scroll) {
931
944
  const htmlRect = documentElement.getBoundingClientRect();
932
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
933
- // RTL <body> scrollbar.
934
- getWindowScrollBarX(documentElement, htmlRect));
945
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
935
946
  const y = htmlRect.top + scroll.scrollTop;
936
947
  return {
937
948
  x,
@@ -970,7 +981,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
970
981
  offsets.y = offsetRect.y + offsetParent.clientTop;
971
982
  }
972
983
  }
973
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
984
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
974
985
  return {
975
986
  width: rect.width * scale.x,
976
987
  height: rect.height * scale.y,
@@ -993,7 +1004,7 @@ function getDocumentRect(element) {
993
1004
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
994
1005
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
995
1006
  const y = -scroll.scrollTop;
996
- if (getComputedStyle(body).direction === 'rtl') {
1007
+ if (getComputedStyle$1(body).direction === 'rtl') {
997
1008
  x += max(html.clientWidth, body.clientWidth) - width;
998
1009
  }
999
1010
  return {
@@ -1004,6 +1015,10 @@ function getDocumentRect(element) {
1004
1015
  };
1005
1016
  }
1006
1017
 
1018
+ // Safety check: ensure the scrollbar space is reasonable in case this
1019
+ // calculation is affected by unusual styles.
1020
+ // Most scrollbars leave 15-18px of space.
1021
+ const SCROLLBAR_MAX = 25;
1007
1022
  function getViewportRect(element, strategy) {
1008
1023
  const win = getWindow(element);
1009
1024
  const html = getDocumentElement(element);
@@ -1021,6 +1036,24 @@ function getViewportRect(element, strategy) {
1021
1036
  y = visualViewport.offsetTop;
1022
1037
  }
1023
1038
  }
1039
+ const windowScrollbarX = getWindowScrollBarX(html);
1040
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1041
+ // visual width of the <html> but this is not considered in the size
1042
+ // of `html.clientWidth`.
1043
+ if (windowScrollbarX <= 0) {
1044
+ const doc = html.ownerDocument;
1045
+ const body = doc.body;
1046
+ const bodyStyles = getComputedStyle(body);
1047
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1048
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1049
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1050
+ width -= clippingStableScrollbarWidth;
1051
+ }
1052
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1053
+ // If the <body> scrollbar is on the left, the width needs to be extended
1054
+ // by the scrollbar amount so there isn't extra space on the right.
1055
+ width += windowScrollbarX;
1056
+ }
1024
1057
  return {
1025
1058
  width,
1026
1059
  height,
@@ -1029,6 +1062,7 @@ function getViewportRect(element, strategy) {
1029
1062
  };
1030
1063
  }
1031
1064
 
1065
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
1032
1066
  // Returns the inner client rect, subtracting scrollbars if present.
1033
1067
  function getInnerBoundingClientRect(element, strategy) {
1034
1068
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -1070,7 +1104,7 @@ function hasFixedPositionAncestor(element, stopNode) {
1070
1104
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1071
1105
  return false;
1072
1106
  }
1073
- return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1107
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1074
1108
  }
1075
1109
 
1076
1110
  // A "clipping ancestor" is an `overflow` element with the characteristic of
@@ -1083,17 +1117,17 @@ function getClippingElementAncestors(element, cache) {
1083
1117
  }
1084
1118
  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1085
1119
  let currentContainingBlockComputedStyle = null;
1086
- const elementIsFixed = getComputedStyle(element).position === 'fixed';
1120
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1087
1121
  let currentNode = elementIsFixed ? getParentNode(element) : element;
1088
1122
 
1089
1123
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1090
1124
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1091
- const computedStyle = getComputedStyle(currentNode);
1125
+ const computedStyle = getComputedStyle$1(currentNode);
1092
1126
  const currentNodeIsContaining = isContainingBlock(currentNode);
1093
1127
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1094
1128
  currentContainingBlockComputedStyle = null;
1095
1129
  }
1096
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1130
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1097
1131
  if (shouldDropCurrentNode) {
1098
1132
  // Drop non-containing blocks.
1099
1133
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -1156,6 +1190,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1156
1190
  scrollTop: 0
1157
1191
  };
1158
1192
  const offsets = createCoords(0);
1193
+
1194
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1195
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1196
+ function setLeftRTLScrollbarOffset() {
1197
+ offsets.x = getWindowScrollBarX(documentElement);
1198
+ }
1159
1199
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1160
1200
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1161
1201
  scroll = getNodeScroll(offsetParent);
@@ -1165,11 +1205,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1165
1205
  offsets.x = offsetRect.x + offsetParent.clientLeft;
1166
1206
  offsets.y = offsetRect.y + offsetParent.clientTop;
1167
1207
  } else if (documentElement) {
1168
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1169
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1170
- offsets.x = getWindowScrollBarX(documentElement);
1208
+ setLeftRTLScrollbarOffset();
1171
1209
  }
1172
1210
  }
1211
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1212
+ setLeftRTLScrollbarOffset();
1213
+ }
1173
1214
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1174
1215
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1175
1216
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -1182,11 +1223,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1182
1223
  }
1183
1224
 
1184
1225
  function isStaticPositioned(element) {
1185
- return getComputedStyle(element).position === 'static';
1226
+ return getComputedStyle$1(element).position === 'static';
1186
1227
  }
1187
1228
 
1188
1229
  function getTrueOffsetParent(element, polyfill) {
1189
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1230
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1190
1231
  return null;
1191
1232
  }
1192
1233
  if (polyfill) {
@@ -1247,7 +1288,7 @@ const getElementRects = async function (data) {
1247
1288
  };
1248
1289
 
1249
1290
  function isRTL(element) {
1250
- return getComputedStyle(element).direction === 'rtl';
1291
+ return getComputedStyle$1(element).direction === 'rtl';
1251
1292
  }
1252
1293
 
1253
1294
  const platform = {
@@ -1346,7 +1387,7 @@ function observeMove(element, onMove) {
1346
1387
  // Handle <iframe>s
1347
1388
  root: root.ownerDocument
1348
1389
  });
1349
- } catch (e) {
1390
+ } catch (_e) {
1350
1391
  io = new IntersectionObserver(handleObserve, options);
1351
1392
  }
1352
1393
  io.observe(element);
@@ -8,7 +8,7 @@ var localization = require('./localization-CTvpcGDo.js');
8
8
  var tableHelpers = require('./table-helpers-D7cRsAPO.js');
9
9
  var objectGetByPath = require('./object-get-by-path-CxU4WbZu.js');
10
10
  var isMobileBrowser = require('./is-mobile-browser-CscfWENw.js');
11
- var cn = require('./cn-BGmLaIp8.js');
11
+ var cn = require('./cn-Cd68UVBT.js');
12
12
  var constants = require('./constants-BuWBrjuU.js');
13
13
  require('./index-CcocepA-.js');
14
14
  require('./index-mudu9vpz.js');