@mintlify/components 1.0.3 → 1.0.5

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 (118) hide show
  1. package/dist/components/callout/callout.js +4 -4
  2. package/dist/components/icon/icon.d.ts.map +1 -1
  3. package/dist/components/icon/icon.js +14 -14
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/index.d.ts.map +1 -1
  6. package/dist/components/search/button.d.ts +12 -0
  7. package/dist/components/search/button.d.ts.map +1 -0
  8. package/dist/components/search/button.js +55 -0
  9. package/dist/components/search/index.d.ts +7 -0
  10. package/dist/components/search/index.d.ts.map +1 -0
  11. package/dist/components/search/provider.d.ts +19 -0
  12. package/dist/components/search/provider.d.ts.map +1 -0
  13. package/dist/components/search/provider.js +32 -0
  14. package/dist/components/search/search.d.ts +39 -0
  15. package/dist/components/search/search.d.ts.map +1 -0
  16. package/dist/components/search/search.js +263 -0
  17. package/dist/index.js +55 -48
  18. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  19. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +165 -164
  20. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +21 -20
  21. package/dist/node_modules/.pnpm/@floating-ui_react@0.26.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.js +367 -0
  22. package/dist/node_modules/.pnpm/@floating-ui_react@0.26.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +13 -0
  23. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/combobox/combobox.js +397 -0
  24. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/description/description.js +43 -0
  25. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/dialog/dialog.js +100 -0
  26. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js +129 -0
  27. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  28. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/label/label.js +59 -0
  29. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/mouse.js +4 -0
  30. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/portal/portal.js +71 -0
  31. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/components/transition/transition.js +135 -0
  32. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +14 -0
  33. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +48 -0
  34. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +36 -0
  35. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +8 -0
  36. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +12 -0
  37. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  38. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-by-comparator.js +16 -0
  39. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-controllable.js +9 -0
  40. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  41. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  42. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-document-event.js +15 -0
  43. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-element-size.js +20 -0
  44. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-escape.js +12 -0
  45. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-event-listener.js +15 -0
  46. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  47. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-flags.js +8 -0
  48. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +41 -0
  49. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js +11 -0
  50. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js +24 -0
  51. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-is-touch-device.js +16 -0
  52. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  53. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  54. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js +27 -0
  55. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js +14 -0
  56. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-outside-click.js +39 -0
  57. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-owner.js +8 -0
  58. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-refocusable-input.js +22 -0
  59. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  60. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-root-containers.js +38 -0
  61. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +12 -0
  62. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +16 -0
  63. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-store.js +7 -0
  64. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +20 -0
  65. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tab-direction.js +13 -0
  66. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js +16 -0
  67. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-transition.js +69 -0
  68. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +18 -0
  69. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-watch.js +15 -0
  70. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/hooks/use-window-event.js +15 -0
  71. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/close-provider.js +9 -0
  72. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  73. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/floating.js +149 -0
  74. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  75. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/frozen.js +13 -0
  76. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  77. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  78. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/open-closed.js +19 -0
  79. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/internal/portal-force-root.js +12 -0
  80. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/active-element-history.js +14 -0
  81. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/bugs.js +18 -0
  82. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/calculate-active-index.js +40 -0
  83. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  84. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/default-map.js +12 -0
  85. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  86. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/document-ready.js +9 -0
  87. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  88. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/focus-management.js +84 -0
  89. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/form.js +14 -0
  90. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  91. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  92. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/owner.js +7 -0
  93. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/platform.js +14 -0
  94. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/render.js +118 -0
  95. package/dist/node_modules/.pnpm/@headlessui_react@2.2.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@headlessui/react/dist/utils/store.js +14 -0
  96. package/dist/node_modules/.pnpm/@react-aria_focus@3.21.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  97. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocus.js +30 -0
  98. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocusVisible.js +97 -0
  99. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useFocusWithin.js +57 -0
  100. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  101. package/dist/node_modules/.pnpm/@react-aria_interactions@3.27.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/interactions/dist/utils.js +66 -0
  102. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/DOMFunctions.js +27 -0
  103. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  104. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  105. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  106. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  107. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/platform.js +47 -0
  108. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  109. package/dist/node_modules/.pnpm/@react-aria_utils@3.33.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  110. package/dist/node_modules/.pnpm/@react-stately_flags@3.1.2/node_modules/@react-stately/flags/dist/import.js +7 -0
  111. package/dist/node_modules/.pnpm/@tanstack_react-virtual@3.13.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  112. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/index.js +533 -0
  113. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  114. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js +13 -0
  115. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search-x.js +16 -0
  116. package/dist/node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js +14 -0
  117. package/dist/styles.css +1 -1
  118. package/package.json +2 -1
@@ -0,0 +1,47 @@
1
+ function a(t) {
2
+ var n;
3
+ if (typeof window > "u" || window.navigator == null) return !1;
4
+ let o = (n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands;
5
+ return Array.isArray(o) && o.some((s) => t.test(s.brand)) || t.test(window.navigator.userAgent);
6
+ }
7
+ function r(t) {
8
+ var n;
9
+ return typeof window < "u" && window.navigator != null ? t.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
10
+ }
11
+ function e(t) {
12
+ if (process.env.NODE_ENV === "test") return t;
13
+ let n = null;
14
+ return () => (n == null && (n = t()), n);
15
+ }
16
+ const i = e(function() {
17
+ return r(/^Mac/i);
18
+ }), c = e(function() {
19
+ return r(/^iPhone/i);
20
+ }), u = e(function() {
21
+ return r(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
22
+ i() && navigator.maxTouchPoints > 1;
23
+ }), d = e(function() {
24
+ return c() || u();
25
+ });
26
+ e(function() {
27
+ return i() || d();
28
+ });
29
+ const f = e(function() {
30
+ return a(/AppleWebKit/i) && !$();
31
+ }), $ = e(function() {
32
+ return a(/Chrome/i);
33
+ }), l = e(function() {
34
+ return a(/Android/i);
35
+ }), w = e(function() {
36
+ return a(/Firefox/i);
37
+ });
38
+ export {
39
+ l as isAndroid,
40
+ $ as isChrome,
41
+ w as isFirefox,
42
+ d as isIOS,
43
+ u as isIPad,
44
+ c as isIPhone,
45
+ i as isMac,
46
+ f as isWebKit
47
+ };
@@ -0,0 +1,34 @@
1
+ import { useRef as c, useCallback as f, useEffect as b } from "react";
2
+ function L() {
3
+ let o = c(/* @__PURE__ */ new Map()), u = f((e, l, r, t) => {
4
+ let n = t != null && t.once ? (...d) => {
5
+ o.current.delete(r), r(...d);
6
+ } : r;
7
+ o.current.set(r, {
8
+ type: l,
9
+ eventTarget: e,
10
+ fn: n,
11
+ options: t
12
+ }), e.addEventListener(l, n, t);
13
+ }, []), a = f((e, l, r, t) => {
14
+ var n;
15
+ let d = ((n = o.current.get(r)) === null || n === void 0 ? void 0 : n.fn) || r;
16
+ e.removeEventListener(l, d, t), o.current.delete(r);
17
+ }, []), s = f(() => {
18
+ o.current.forEach((e, l) => {
19
+ a(e.eventTarget, e.type, l, e.options);
20
+ });
21
+ }, [
22
+ a
23
+ ]);
24
+ return b(() => s, [
25
+ s
26
+ ]), {
27
+ addGlobalListener: u,
28
+ removeGlobalListener: a,
29
+ removeAllGlobalListeners: s
30
+ };
31
+ }
32
+ export {
33
+ L as useGlobalListeners
34
+ };
@@ -0,0 +1,6 @@
1
+ import e from "react";
2
+ const f = typeof document < "u" ? e.useLayoutEffect : () => {
3
+ };
4
+ export {
5
+ f as useLayoutEffect
6
+ };
@@ -0,0 +1,7 @@
1
+ let e = !1;
2
+ function f() {
3
+ return e;
4
+ }
5
+ export {
6
+ f as shadowDOM
7
+ };
@@ -0,0 +1,38 @@
1
+ import * as t from "react";
2
+ import { flushSync as f } from "react-dom";
3
+ import { Virtualizer as i, elementScroll as m, observeElementOffset as d, observeElementRect as p } from "../../../../../../@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/index.js";
4
+ import { defaultKeyExtractor as g, defaultRangeExtractor as z, measureElement as O } from "../../../../../../@tanstack_virtual-core@3.13.18/node_modules/@tanstack/virtual-core/dist/esm/index.js";
5
+ const l = typeof document < "u" ? t.useLayoutEffect : t.useEffect;
6
+ function E({
7
+ useFlushSync: r = !0,
8
+ ...n
9
+ }) {
10
+ const o = t.useReducer(() => ({}), {})[1], u = {
11
+ ...n,
12
+ onChange: (c, s) => {
13
+ var a;
14
+ r && s ? f(o) : o(), (a = n.onChange) == null || a.call(n, c, s);
15
+ }
16
+ }, [e] = t.useState(
17
+ () => new i(u)
18
+ );
19
+ return e.setOptions(u), l(() => e._didMount(), []), l(() => e._willUpdate()), e;
20
+ }
21
+ function x(r) {
22
+ return E({
23
+ observeElementRect: p,
24
+ observeElementOffset: d,
25
+ scrollToFn: m,
26
+ ...r
27
+ });
28
+ }
29
+ export {
30
+ i as Virtualizer,
31
+ g as defaultKeyExtractor,
32
+ z as defaultRangeExtractor,
33
+ m as elementScroll,
34
+ O as measureElement,
35
+ d as observeElementOffset,
36
+ p as observeElementRect,
37
+ x as useVirtualizer
38
+ };
@@ -0,0 +1,533 @@
1
+ import { memo as p, notUndefined as O, approxEqual as I, debounce as A } from "./utils.js";
2
+ const y = (r) => {
3
+ const { offsetWidth: h, offsetHeight: e } = r;
4
+ return { width: h, height: e };
5
+ }, F = (r) => r, R = (r) => {
6
+ const h = Math.max(r.startIndex - r.overscan, 0), e = Math.min(r.endIndex + r.overscan, r.count - 1), s = [];
7
+ for (let t = h; t <= e; t++)
8
+ s.push(t);
9
+ return s;
10
+ }, D = (r, h) => {
11
+ const e = r.scrollElement;
12
+ if (!e)
13
+ return;
14
+ const s = r.targetWindow;
15
+ if (!s)
16
+ return;
17
+ const t = (i) => {
18
+ const { width: o, height: a } = i;
19
+ h({ width: Math.round(o), height: Math.round(a) });
20
+ };
21
+ if (t(y(e)), !s.ResizeObserver)
22
+ return () => {
23
+ };
24
+ const n = new s.ResizeObserver((i) => {
25
+ const o = () => {
26
+ const a = i[0];
27
+ if (a != null && a.borderBoxSize) {
28
+ const u = a.borderBoxSize[0];
29
+ if (u) {
30
+ t({ width: u.inlineSize, height: u.blockSize });
31
+ return;
32
+ }
33
+ }
34
+ t(y(e));
35
+ };
36
+ r.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
37
+ });
38
+ return n.observe(e, { box: "border-box" }), () => {
39
+ n.unobserve(e);
40
+ };
41
+ }, M = {
42
+ passive: !0
43
+ }, w = typeof window > "u" ? !0 : "onscrollend" in window, k = (r, h) => {
44
+ const e = r.scrollElement;
45
+ if (!e)
46
+ return;
47
+ const s = r.targetWindow;
48
+ if (!s)
49
+ return;
50
+ let t = 0;
51
+ const n = r.options.useScrollendEvent && w ? () => {
52
+ } : A(
53
+ s,
54
+ () => {
55
+ h(t, !1);
56
+ },
57
+ r.options.isScrollingResetDelay
58
+ ), i = (c) => () => {
59
+ const { horizontal: m, isRtl: l } = r.options;
60
+ t = m ? e.scrollLeft * (l && -1 || 1) : e.scrollTop, n(), h(t, c);
61
+ }, o = i(!0), a = i(!1);
62
+ e.addEventListener("scroll", o, M);
63
+ const u = r.options.useScrollendEvent && w;
64
+ return u && e.addEventListener("scrollend", a, M), () => {
65
+ e.removeEventListener("scroll", o), u && e.removeEventListener("scrollend", a);
66
+ };
67
+ }, _ = (r, h, e) => {
68
+ if (h != null && h.borderBoxSize) {
69
+ const s = h.borderBoxSize[0];
70
+ if (s)
71
+ return Math.round(
72
+ s[e.options.horizontal ? "inlineSize" : "blockSize"]
73
+ );
74
+ }
75
+ return r[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
76
+ }, T = (r, {
77
+ adjustments: h = 0,
78
+ behavior: e
79
+ }, s) => {
80
+ var t, n;
81
+ const i = r + h;
82
+ (n = (t = s.scrollElement) == null ? void 0 : t.scrollTo) == null || n.call(t, {
83
+ [s.options.horizontal ? "left" : "top"]: i,
84
+ behavior: e
85
+ });
86
+ };
87
+ class L {
88
+ constructor(h) {
89
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.currentScrollToIndex = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
90
+ let e = null;
91
+ const s = () => e || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : e = new this.targetWindow.ResizeObserver((t) => {
92
+ t.forEach((n) => {
93
+ const i = () => {
94
+ this._measureElement(n.target, n);
95
+ };
96
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(i) : i();
97
+ });
98
+ }));
99
+ return {
100
+ disconnect: () => {
101
+ var t;
102
+ (t = s()) == null || t.disconnect(), e = null;
103
+ },
104
+ observe: (t) => {
105
+ var n;
106
+ return (n = s()) == null ? void 0 : n.observe(t, { box: "border-box" });
107
+ },
108
+ unobserve: (t) => {
109
+ var n;
110
+ return (n = s()) == null ? void 0 : n.unobserve(t);
111
+ }
112
+ };
113
+ })(), this.range = null, this.setOptions = (e) => {
114
+ Object.entries(e).forEach(([s, t]) => {
115
+ typeof t > "u" && delete e[s];
116
+ }), this.options = {
117
+ debug: !1,
118
+ initialOffset: 0,
119
+ overscan: 1,
120
+ paddingStart: 0,
121
+ paddingEnd: 0,
122
+ scrollPaddingStart: 0,
123
+ scrollPaddingEnd: 0,
124
+ horizontal: !1,
125
+ getItemKey: F,
126
+ rangeExtractor: R,
127
+ onChange: () => {
128
+ },
129
+ measureElement: _,
130
+ initialRect: { width: 0, height: 0 },
131
+ scrollMargin: 0,
132
+ gap: 0,
133
+ indexAttribute: "data-index",
134
+ initialMeasurementsCache: [],
135
+ lanes: 1,
136
+ isScrollingResetDelay: 150,
137
+ enabled: !0,
138
+ isRtl: !1,
139
+ useScrollendEvent: !1,
140
+ useAnimationFrameWithResizeObserver: !1,
141
+ ...e
142
+ };
143
+ }, this.notify = (e) => {
144
+ var s, t;
145
+ (t = (s = this.options).onChange) == null || t.call(s, this, e);
146
+ }, this.maybeNotify = p(
147
+ () => (this.calculateRange(), [
148
+ this.isScrolling,
149
+ this.range ? this.range.startIndex : null,
150
+ this.range ? this.range.endIndex : null
151
+ ]),
152
+ (e) => {
153
+ this.notify(e);
154
+ },
155
+ {
156
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
157
+ debug: () => this.options.debug,
158
+ initialDeps: [
159
+ this.isScrolling,
160
+ this.range ? this.range.startIndex : null,
161
+ this.range ? this.range.endIndex : null
162
+ ]
163
+ }
164
+ ), this.cleanup = () => {
165
+ this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
166
+ }, this._didMount = () => () => {
167
+ this.cleanup();
168
+ }, this._willUpdate = () => {
169
+ var e;
170
+ const s = this.options.enabled ? this.options.getScrollElement() : null;
171
+ if (this.scrollElement !== s) {
172
+ if (this.cleanup(), !s) {
173
+ this.maybeNotify();
174
+ return;
175
+ }
176
+ this.scrollElement = s, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((e = this.scrollElement) == null ? void 0 : e.window) ?? null, this.elementsCache.forEach((t) => {
177
+ this.observer.observe(t);
178
+ }), this.unsubs.push(
179
+ this.options.observeElementRect(this, (t) => {
180
+ this.scrollRect = t, this.maybeNotify();
181
+ })
182
+ ), this.unsubs.push(
183
+ this.options.observeElementOffset(this, (t, n) => {
184
+ this.scrollAdjustments = 0, this.scrollDirection = n ? this.getScrollOffset() < t ? "forward" : "backward" : null, this.scrollOffset = t, this.isScrolling = n, this.maybeNotify();
185
+ })
186
+ ), this._scrollToOffset(this.getScrollOffset(), {
187
+ adjustments: void 0,
188
+ behavior: void 0
189
+ });
190
+ }
191
+ }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (e, s) => {
192
+ const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
193
+ for (let i = s - 1; i >= 0; i--) {
194
+ const o = e[i];
195
+ if (t.has(o.lane))
196
+ continue;
197
+ const a = n.get(
198
+ o.lane
199
+ );
200
+ if (a == null || o.end > a.end ? n.set(o.lane, o) : o.end < a.end && t.set(o.lane, !0), t.size === this.options.lanes)
201
+ break;
202
+ }
203
+ return n.size === this.options.lanes ? Array.from(n.values()).sort((i, o) => i.end === o.end ? i.index - o.index : i.end - o.end)[0] : void 0;
204
+ }, this.getMeasurementOptions = p(
205
+ () => [
206
+ this.options.count,
207
+ this.options.paddingStart,
208
+ this.options.scrollMargin,
209
+ this.options.getItemKey,
210
+ this.options.enabled,
211
+ this.options.lanes
212
+ ],
213
+ (e, s, t, n, i, o) => (this.prevLanes !== void 0 && this.prevLanes !== o && (this.lanesChangedFlag = !0), this.prevLanes = o, this.pendingMeasuredCacheIndexes = [], {
214
+ count: e,
215
+ paddingStart: s,
216
+ scrollMargin: t,
217
+ getItemKey: n,
218
+ enabled: i,
219
+ lanes: o
220
+ }),
221
+ {
222
+ key: !1
223
+ }
224
+ ), this.getMeasurements = p(
225
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
226
+ ({ count: e, paddingStart: s, scrollMargin: t, getItemKey: n, enabled: i, lanes: o }, a) => {
227
+ if (!i)
228
+ return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
229
+ if (this.laneAssignments.size > e)
230
+ for (const l of this.laneAssignments.keys())
231
+ l >= e && this.laneAssignments.delete(l);
232
+ this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((l) => {
233
+ this.itemSizeCache.set(l.key, l.size);
234
+ }));
235
+ const u = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
236
+ this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1);
237
+ const c = this.measurementsCache.slice(0, u), m = new Array(o).fill(
238
+ void 0
239
+ );
240
+ for (let l = 0; l < u; l++) {
241
+ const f = c[l];
242
+ f && (m[f.lane] = l);
243
+ }
244
+ for (let l = u; l < e; l++) {
245
+ const f = n(l), v = this.laneAssignments.get(l);
246
+ let d, b;
247
+ if (v !== void 0 && this.options.lanes > 1) {
248
+ d = v;
249
+ const g = m[d], x = g !== void 0 ? c[g] : void 0;
250
+ b = x ? x.end + this.options.gap : s + t;
251
+ } else {
252
+ const g = this.options.lanes === 1 ? c[l - 1] : this.getFurthestMeasurement(c, l);
253
+ b = g ? g.end + this.options.gap : s + t, d = g ? g.lane : l % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(l, d);
254
+ }
255
+ const E = a.get(f), S = typeof E == "number" ? E : this.options.estimateSize(l), C = b + S;
256
+ c[l] = {
257
+ index: l,
258
+ start: b,
259
+ size: S,
260
+ end: C,
261
+ key: f,
262
+ lane: d
263
+ }, m[d] = l;
264
+ }
265
+ return this.measurementsCache = c, c;
266
+ },
267
+ {
268
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
269
+ debug: () => this.options.debug
270
+ }
271
+ ), this.calculateRange = p(
272
+ () => [
273
+ this.getMeasurements(),
274
+ this.getSize(),
275
+ this.getScrollOffset(),
276
+ this.options.lanes
277
+ ],
278
+ (e, s, t, n) => this.range = e.length > 0 && s > 0 ? W({
279
+ measurements: e,
280
+ outerSize: s,
281
+ scrollOffset: t,
282
+ lanes: n
283
+ }) : null,
284
+ {
285
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
286
+ debug: () => this.options.debug
287
+ }
288
+ ), this.getVirtualIndexes = p(
289
+ () => {
290
+ let e = null, s = null;
291
+ const t = this.calculateRange();
292
+ return t && (e = t.startIndex, s = t.endIndex), this.maybeNotify.updateDeps([this.isScrolling, e, s]), [
293
+ this.options.rangeExtractor,
294
+ this.options.overscan,
295
+ this.options.count,
296
+ e,
297
+ s
298
+ ];
299
+ },
300
+ (e, s, t, n, i) => n === null || i === null ? [] : e({
301
+ startIndex: n,
302
+ endIndex: i,
303
+ overscan: s,
304
+ count: t
305
+ }),
306
+ {
307
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
308
+ debug: () => this.options.debug
309
+ }
310
+ ), this.indexFromElement = (e) => {
311
+ const s = this.options.indexAttribute, t = e.getAttribute(s);
312
+ return t ? parseInt(t, 10) : (console.warn(
313
+ `Missing attribute name '${s}={index}' on measured element.`
314
+ ), -1);
315
+ }, this._measureElement = (e, s) => {
316
+ const t = this.indexFromElement(e), n = this.measurementsCache[t];
317
+ if (!n)
318
+ return;
319
+ const i = n.key, o = this.elementsCache.get(i);
320
+ o !== e && (o && this.observer.unobserve(o), this.observer.observe(e), this.elementsCache.set(i, e)), e.isConnected && this.resizeItem(t, this.options.measureElement(e, s, this));
321
+ }, this.resizeItem = (e, s) => {
322
+ const t = this.measurementsCache[e];
323
+ if (!t)
324
+ return;
325
+ const n = this.itemSizeCache.get(t.key) ?? t.size, i = s - n;
326
+ i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(t, i, this) : t.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
327
+ adjustments: this.scrollAdjustments += i,
328
+ behavior: void 0
329
+ })), this.pendingMeasuredCacheIndexes.push(t.index), this.itemSizeCache = new Map(this.itemSizeCache.set(t.key, s)), this.notify(!1));
330
+ }, this.measureElement = (e) => {
331
+ if (!e) {
332
+ this.elementsCache.forEach((s, t) => {
333
+ s.isConnected || (this.observer.unobserve(s), this.elementsCache.delete(t));
334
+ });
335
+ return;
336
+ }
337
+ this._measureElement(e, void 0);
338
+ }, this.getVirtualItems = p(
339
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
340
+ (e, s) => {
341
+ const t = [];
342
+ for (let n = 0, i = e.length; n < i; n++) {
343
+ const o = e[n], a = s[o];
344
+ t.push(a);
345
+ }
346
+ return t;
347
+ },
348
+ {
349
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
350
+ debug: () => this.options.debug
351
+ }
352
+ ), this.getVirtualItemForOffset = (e) => {
353
+ const s = this.getMeasurements();
354
+ if (s.length !== 0)
355
+ return O(
356
+ s[z(
357
+ 0,
358
+ s.length - 1,
359
+ (t) => O(s[t]).start,
360
+ e
361
+ )]
362
+ );
363
+ }, this.getMaxScrollOffset = () => {
364
+ if (!this.scrollElement) return 0;
365
+ if ("scrollHeight" in this.scrollElement)
366
+ return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
367
+ {
368
+ const e = this.scrollElement.document.documentElement;
369
+ return this.options.horizontal ? e.scrollWidth - this.scrollElement.innerWidth : e.scrollHeight - this.scrollElement.innerHeight;
370
+ }
371
+ }, this.getOffsetForAlignment = (e, s, t = 0) => {
372
+ if (!this.scrollElement) return 0;
373
+ const n = this.getSize(), i = this.getScrollOffset();
374
+ s === "auto" && (s = e >= i + n ? "end" : "start"), s === "center" ? e += (t - n) / 2 : s === "end" && (e -= n);
375
+ const o = this.getMaxScrollOffset();
376
+ return Math.max(Math.min(o, e), 0);
377
+ }, this.getOffsetForIndex = (e, s = "auto") => {
378
+ e = Math.max(0, Math.min(e, this.options.count - 1));
379
+ const t = this.measurementsCache[e];
380
+ if (!t)
381
+ return;
382
+ const n = this.getSize(), i = this.getScrollOffset();
383
+ if (s === "auto")
384
+ if (t.end >= i + n - this.options.scrollPaddingEnd)
385
+ s = "end";
386
+ else if (t.start <= i + this.options.scrollPaddingStart)
387
+ s = "start";
388
+ else
389
+ return [i, s];
390
+ if (s === "end" && e === this.options.count - 1)
391
+ return [this.getMaxScrollOffset(), s];
392
+ const o = s === "end" ? t.end + this.options.scrollPaddingEnd : t.start - this.options.scrollPaddingStart;
393
+ return [
394
+ this.getOffsetForAlignment(o, s, t.size),
395
+ s
396
+ ];
397
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (e, { align: s = "start", behavior: t } = {}) => {
398
+ t === "smooth" && this.isDynamicMode() && console.warn(
399
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
400
+ ), this._scrollToOffset(this.getOffsetForAlignment(e, s), {
401
+ adjustments: void 0,
402
+ behavior: t
403
+ });
404
+ }, this.scrollToIndex = (e, { align: s = "auto", behavior: t } = {}) => {
405
+ t === "smooth" && this.isDynamicMode() && console.warn(
406
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
407
+ ), e = Math.max(0, Math.min(e, this.options.count - 1)), this.currentScrollToIndex = e;
408
+ let n = 0;
409
+ const i = 10, o = (u) => {
410
+ if (!this.targetWindow) return;
411
+ const c = this.getOffsetForIndex(e, u);
412
+ if (!c) {
413
+ console.warn("Failed to get offset for index:", e);
414
+ return;
415
+ }
416
+ const [m, l] = c;
417
+ this._scrollToOffset(m, { adjustments: void 0, behavior: t }), this.targetWindow.requestAnimationFrame(() => {
418
+ const f = () => {
419
+ if (this.currentScrollToIndex !== e) return;
420
+ const v = this.getScrollOffset(), d = this.getOffsetForIndex(e, l);
421
+ if (!d) {
422
+ console.warn("Failed to get offset for index:", e);
423
+ return;
424
+ }
425
+ I(d[0], v) || a(l);
426
+ };
427
+ this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(f) : f();
428
+ });
429
+ }, a = (u) => {
430
+ this.targetWindow && this.currentScrollToIndex === e && (n++, n < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", n, i), this.targetWindow.requestAnimationFrame(() => o(u))) : console.warn(
431
+ `Failed to scroll to index ${e} after ${i} attempts.`
432
+ ));
433
+ };
434
+ o(s);
435
+ }, this.scrollBy = (e, { behavior: s } = {}) => {
436
+ s === "smooth" && this.isDynamicMode() && console.warn(
437
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
438
+ ), this._scrollToOffset(this.getScrollOffset() + e, {
439
+ adjustments: void 0,
440
+ behavior: s
441
+ });
442
+ }, this.getTotalSize = () => {
443
+ var e;
444
+ const s = this.getMeasurements();
445
+ let t;
446
+ if (s.length === 0)
447
+ t = this.options.paddingStart;
448
+ else if (this.options.lanes === 1)
449
+ t = ((e = s[s.length - 1]) == null ? void 0 : e.end) ?? 0;
450
+ else {
451
+ const n = Array(this.options.lanes).fill(null);
452
+ let i = s.length - 1;
453
+ for (; i >= 0 && n.some((o) => o === null); ) {
454
+ const o = s[i];
455
+ n[o.lane] === null && (n[o.lane] = o.end), i--;
456
+ }
457
+ t = Math.max(...n.filter((o) => o !== null));
458
+ }
459
+ return Math.max(
460
+ t - this.options.scrollMargin + this.options.paddingEnd,
461
+ 0
462
+ );
463
+ }, this._scrollToOffset = (e, {
464
+ adjustments: s,
465
+ behavior: t
466
+ }) => {
467
+ this.options.scrollToFn(e, { behavior: t, adjustments: s }, this);
468
+ }, this.measure = () => {
469
+ this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.notify(!1);
470
+ }, this.setOptions(h);
471
+ }
472
+ }
473
+ const z = (r, h, e, s) => {
474
+ for (; r <= h; ) {
475
+ const t = (r + h) / 2 | 0, n = e(t);
476
+ if (n < s)
477
+ r = t + 1;
478
+ else if (n > s)
479
+ h = t - 1;
480
+ else
481
+ return t;
482
+ }
483
+ return r > 0 ? r - 1 : 0;
484
+ };
485
+ function W({
486
+ measurements: r,
487
+ outerSize: h,
488
+ scrollOffset: e,
489
+ lanes: s
490
+ }) {
491
+ const t = r.length - 1, n = (a) => r[a].start;
492
+ if (r.length <= s)
493
+ return {
494
+ startIndex: 0,
495
+ endIndex: t
496
+ };
497
+ let i = z(
498
+ 0,
499
+ t,
500
+ n,
501
+ e
502
+ ), o = i;
503
+ if (s === 1)
504
+ for (; o < t && r[o].end < e + h; )
505
+ o++;
506
+ else if (s > 1) {
507
+ const a = Array(s).fill(0);
508
+ for (; o < t && a.some((c) => c < e + h); ) {
509
+ const c = r[o];
510
+ a[c.lane] = c.end, o++;
511
+ }
512
+ const u = Array(s).fill(e + h);
513
+ for (; i >= 0 && u.some((c) => c >= e); ) {
514
+ const c = r[i];
515
+ u[c.lane] = c.start, i--;
516
+ }
517
+ i = Math.max(0, i - i % s), o = Math.min(t, o + (s - 1 - o % s));
518
+ }
519
+ return { startIndex: i, endIndex: o };
520
+ }
521
+ export {
522
+ L as Virtualizer,
523
+ I as approxEqual,
524
+ A as debounce,
525
+ F as defaultKeyExtractor,
526
+ R as defaultRangeExtractor,
527
+ T as elementScroll,
528
+ _ as measureElement,
529
+ p as memo,
530
+ O as notUndefined,
531
+ k as observeElementOffset,
532
+ D as observeElementRect
533
+ };