@shopify/shop-minis-react 0.1.3 → 0.1.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 (96) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index4.js +2 -2
  3. package/dist/_virtual/index5.js +2 -2
  4. package/dist/_virtual/index6.js +2 -3
  5. package/dist/_virtual/index6.js.map +1 -1
  6. package/dist/_virtual/index7.js +3 -2
  7. package/dist/_virtual/index7.js.map +1 -1
  8. package/dist/_virtual/index9.js +2 -2
  9. package/dist/components/atoms/list.js +44 -47
  10. package/dist/components/atoms/list.js.map +1 -1
  11. package/dist/components/atoms/tracking-pixel.js +1 -1
  12. package/dist/components/commerce/search.js +73 -77
  13. package/dist/components/commerce/search.js.map +1 -1
  14. package/dist/components/ui/accordion.js +1 -1
  15. package/dist/components/ui/alert-dialog.js +1 -1
  16. package/dist/components/ui/avatar.js +1 -1
  17. package/dist/components/ui/checkbox.js +1 -1
  18. package/dist/components/ui/dialog.js +1 -1
  19. package/dist/components/ui/label.js +1 -1
  20. package/dist/components/ui/progress.js +1 -1
  21. package/dist/components/ui/radio-group.js +1 -1
  22. package/dist/components/ui/scroll-area.js +1 -1
  23. package/dist/components/ui/select.js +1 -1
  24. package/dist/components/ui/separator.js +1 -1
  25. package/dist/components/ui/sheet.js +1 -1
  26. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_krqvbhitcyb3vl2jzw3fp35uhu → @radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_c181f188656cfa5f16c2710ccd54e5dd}/node_modules/@radix-ui/react-accordion/dist/index.js +3 -3
  27. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_krqvbhitcyb3vl2jzw3fp35uhu → @radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_c181f188656cfa5f16c2710ccd54e5dd}/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -1
  28. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey → @radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_285ea9ce18742a8c4e84cbcde06e0b25}/node_modules/@radix-ui/react-alert-dialog/dist/index.js +1 -1
  29. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey → @radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_285ea9ce18742a8c4e84cbcde06e0b25}/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -1
  30. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__tqbcahbocnte57ax4r75bgnpei → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_37a4d12c56f285a88c8895f81bd600a0}/node_modules/@radix-ui/react-arrow/dist/index.js +1 -1
  31. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__tqbcahbocnte57ax4r75bgnpei → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_37a4d12c56f285a88c8895f81bd600a0}/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
  32. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._hkz57sehyui4ndfh3rsqwxftli → @radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_06170eb4026a170071caea5f0c82612e}/node_modules/@radix-ui/react-avatar/dist/index.js +1 -1
  33. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._hkz57sehyui4ndfh3rsqwxftli → @radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_06170eb4026a170071caea5f0c82612e}/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
  34. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_wopssf2yyhcdxk6apqq3fxlekq → @radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_76c2d9960806d267f7566af463150dec}/node_modules/@radix-ui/react-checkbox/dist/index.js +2 -2
  35. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_wopssf2yyhcdxk6apqq3fxlekq → @radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_76c2d9960806d267f7566af463150dec}/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
  36. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_4e7bghgww3y6lafncm5x7ie54a → @radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types__4a84ef457ec365b76d5b35ae363501b4}/node_modules/@radix-ui/react-collapsible/dist/index.js +2 -2
  37. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_4e7bghgww3y6lafncm5x7ie54a → @radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types__4a84ef457ec365b76d5b35ae363501b4}/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -1
  38. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_5kif5qsljjcymh5vn5h26ovoye → @radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_773c2f41d00caf3f92b3d7605949da61}/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
  39. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa → @radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_00050fb27f6e4250402df169ba62a563}/node_modules/@radix-ui/react-dialog/dist/index.js +5 -5
  40. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa → @radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_00050fb27f6e4250402df169ba62a563}/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -1
  41. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4 → @radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@_4b09e0704ece360f13e36cbb3765ea47}/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
  42. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4 → @radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@_4b09e0704ece360f13e36cbb3765ea47}/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
  43. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b37fcafba5387ffb2fedae9e4476c837}/node_modules/@radix-ui/react-focus-scope/dist/index.js +1 -1
  44. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b37fcafba5387ffb2fedae9e4476c837}/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
  45. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__a5hm3akpfjy2hepxrptadu7t6e → @radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_85b8c95b65bf0dd4cc21629f4084a5b6}/node_modules/@radix-ui/react-label/dist/index.js +1 -1
  46. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__a5hm3akpfjy2hepxrptadu7t6e → @radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_85b8c95b65bf0dd4cc21629f4084a5b6}/node_modules/@radix-ui/react-label/dist/index.js.map +1 -1
  47. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_2sktqq4blwmd3t7e5jqffehtuu → @radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_7f041a511b7212d213e8dcc35ea98be2}/node_modules/@radix-ui/react-popper/dist/index.js +2 -2
  48. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_2sktqq4blwmd3t7e5jqffehtuu → @radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_7f041a511b7212d213e8dcc35ea98be2}/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
  49. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe → @radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_dbd1c487dbf0f36d89874abfade43936}/node_modules/@radix-ui/react-portal/dist/index.js +1 -1
  50. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe → @radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_dbd1c487dbf0f36d89874abfade43936}/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
  51. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu → @radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_14564cac32122309a7cc56096494b6e8}/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
  52. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_ec571b14c8dc7e1c1fa1383d9a1e10bd}/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  53. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_psrnvm437duefd2y5sh3bqj3sm → @radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_fa1ba230d1dfc5fe2a0cedd9ff78309e}/node_modules/@radix-ui/react-progress/dist/index.js +1 -1
  54. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_psrnvm437duefd2y5sh3bqj3sm → @radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_fa1ba230d1dfc5fe2a0cedd9ff78309e}/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -1
  55. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_b6vd3n6tkje342bk7jtbsrqyfe → @radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_4bdbb04c93e325d7f20e33cc8e004c83}/node_modules/@radix-ui/react-radio-group/dist/index.js +3 -3
  56. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_b6vd3n6tkje342bk7jtbsrqyfe → @radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_4bdbb04c93e325d7f20e33cc8e004c83}/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
  57. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_g7ajeb2xgflky4nc3ccraxd5vi → @radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_2d3f19e691372edf0bc25a87278ce401}/node_modules/@radix-ui/react-roving-focus/dist/index.js +2 -2
  58. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_g7ajeb2xgflky4nc3ccraxd5vi → @radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_2d3f19e691372edf0bc25a87278ce401}/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
  59. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_na6tcikkwmgt5sgxl6ezf7zaf4 → @radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b5d13464c21f88022505288dd3198025}/node_modules/@radix-ui/react-scroll-area/dist/index.js +2 -2
  60. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_na6tcikkwmgt5sgxl6ezf7zaf4 → @radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b5d13464c21f88022505288dd3198025}/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -1
  61. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_pvbs4vbfxc35gflcf62ix5b3oy → @radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_8c539485311b2ef067a182d5db805374}/node_modules/@radix-ui/react-select/dist/index.js +7 -7
  62. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_pvbs4vbfxc35gflcf62ix5b3oy → @radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_8c539485311b2ef067a182d5db805374}/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
  63. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._v5c7fe2eicmnfbsit6liht3cja → @radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_c3003570fa0d6f9943d03ab6b06417ce}/node_modules/@radix-ui/react-separator/dist/index.js +1 -1
  64. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._v5c7fe2eicmnfbsit6liht3cja → @radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_c3003570fa0d6f9943d03ab6b06417ce}/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -1
  65. package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  66. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_3rnyx4jgemf4vn7spx7uohk4ne → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@typ_4a5a40fef19214ea28d77d9af27dab61}/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
  67. package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_3rnyx4jgemf4vn7spx7uohk4ne → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@typ_4a5a40fef19214ea28d77d9af27dab61}/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -1
  68. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
  69. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +1 -1
  70. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
  71. package/dist/shop-minis-react/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +1 -1
  72. package/dist/shop-minis-react/node_modules/.pnpm/react-intersection-observer@9.13.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-intersection-observer/dist/index.js.map +1 -0
  73. package/dist/shop-minis-react/node_modules/.pnpm/react-virtuoso@4.14.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-virtuoso/dist/index.js +3132 -0
  74. package/dist/shop-minis-react/node_modules/.pnpm/react-virtuoso@4.14.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-virtuoso/dist/index.js.map +1 -0
  75. package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
  76. package/dist/shop-minis-react/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/vaul/dist/index.js +1 -1
  77. package/package.json +9 -8
  78. package/src/components/atoms/list.tsx +33 -69
  79. package/src/components/commerce/search.tsx +0 -6
  80. package/src/stories/List.stories.tsx +0 -4
  81. package/src/test-setup.ts +68 -0
  82. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -8
  83. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  84. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -8
  85. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
  86. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -9
  87. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  88. package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js +0 -28
  89. package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js.map +0 -1
  90. package/dist/shop-minis-react/node_modules/.pnpm/react-intersection-observer@9.16.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-intersection-observer/dist/index.js.map +0 -1
  91. package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js +0 -375
  92. package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js.map +0 -1
  93. /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_5kif5qsljjcymh5vn5h26ovoye → @radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_773c2f41d00caf3f92b3d7605949da61}/node_modules/@radix-ui/react-collection/dist/index.js +0 -0
  94. /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu → @radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_14564cac32122309a7cc56096494b6e8}/node_modules/@radix-ui/react-presence/dist/index.js +0 -0
  95. /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_ec571b14c8dc7e1c1fa1383d9a1e10bd}/node_modules/@radix-ui/react-primitive/dist/index.js +0 -0
  96. /package/dist/shop-minis-react/node_modules/.pnpm/{react-intersection-observer@9.16.0_react-dom@19.1.0_react@19.1.0__react@19.1.0 → react-intersection-observer@9.13.1_react-dom@19.1.0_react@19.1.0__react@19.1.0}/node_modules/react-intersection-observer/dist/index.js +0 -0
@@ -0,0 +1,3132 @@
1
+ import { jsx as U, jsxs as Ze } from "react/jsx-runtime";
2
+ import B, { createElement as dt } from "react";
3
+ import en from "react-dom";
4
+ const It = 0, Ee = 1, Ue = 2, To = 4;
5
+ function Qt(e) {
6
+ return () => e;
7
+ }
8
+ function tn(e) {
9
+ e();
10
+ }
11
+ function xo(e, t) {
12
+ return (o) => e(t(o));
13
+ }
14
+ function eo(e, t) {
15
+ return () => e(t);
16
+ }
17
+ function on(e, t) {
18
+ return (o) => e(t, o);
19
+ }
20
+ function Wt(e) {
21
+ return e !== void 0;
22
+ }
23
+ function nn(...e) {
24
+ return () => {
25
+ e.map(tn);
26
+ };
27
+ }
28
+ function je() {
29
+ }
30
+ function Tt(e, t) {
31
+ return t(e), e;
32
+ }
33
+ function rn(e, t) {
34
+ return t(e);
35
+ }
36
+ function X(...e) {
37
+ return e;
38
+ }
39
+ function q(e, t) {
40
+ return e(Ee, t);
41
+ }
42
+ function V(e, t) {
43
+ e(It, t);
44
+ }
45
+ function Pt(e) {
46
+ e(Ue);
47
+ }
48
+ function ee(e) {
49
+ return e(To);
50
+ }
51
+ function k(e, t) {
52
+ return q(e, on(t, It));
53
+ }
54
+ function Te(e, t) {
55
+ const o = e(Ee, (n) => {
56
+ o(), t(n);
57
+ });
58
+ return o;
59
+ }
60
+ function to(e) {
61
+ let t, o;
62
+ return (n) => (r) => {
63
+ t = r, o && clearTimeout(o), o = setTimeout(() => {
64
+ n(t);
65
+ }, e);
66
+ };
67
+ }
68
+ function So(e, t) {
69
+ return e === t;
70
+ }
71
+ function $(e = So) {
72
+ let t;
73
+ return (o) => (n) => {
74
+ e(t, n) || (t = n, o(n));
75
+ };
76
+ }
77
+ function W(e) {
78
+ return (t) => (o) => {
79
+ e(o) && t(o);
80
+ };
81
+ }
82
+ function b(e) {
83
+ return (t) => xo(t, e);
84
+ }
85
+ function we(e) {
86
+ return (t) => () => {
87
+ t(e);
88
+ };
89
+ }
90
+ function p(e, ...t) {
91
+ const o = ln(...t);
92
+ return (n, r) => {
93
+ switch (n) {
94
+ case Ue:
95
+ Pt(e);
96
+ return;
97
+ case Ee:
98
+ return q(e, o(r));
99
+ }
100
+ };
101
+ }
102
+ function Ce(e, t) {
103
+ return (o) => (n) => {
104
+ o(t = e(t, n));
105
+ };
106
+ }
107
+ function Ae(e) {
108
+ return (t) => (o) => {
109
+ e > 0 ? e-- : t(o);
110
+ };
111
+ }
112
+ function be(e) {
113
+ let t = null, o;
114
+ return (n) => (r) => {
115
+ t = r, !o && (o = setTimeout(() => {
116
+ o = void 0, n(t);
117
+ }, e));
118
+ };
119
+ }
120
+ function D(...e) {
121
+ const t = new Array(e.length);
122
+ let o = 0, n = null;
123
+ const r = Math.pow(2, e.length) - 1;
124
+ return e.forEach((i, l) => {
125
+ const s = Math.pow(2, l);
126
+ q(i, (c) => {
127
+ const a = o;
128
+ o = o | s, t[l] = c, a !== r && o === r && n && (n(), n = null);
129
+ });
130
+ }), (i) => (l) => {
131
+ const s = () => {
132
+ i([l].concat(t));
133
+ };
134
+ o === r ? s() : n = s;
135
+ };
136
+ }
137
+ function ln(...e) {
138
+ return (t) => e.reduceRight(rn, t);
139
+ }
140
+ function sn(e) {
141
+ let t, o;
142
+ const n = () => t?.();
143
+ return function(r, i) {
144
+ switch (r) {
145
+ case Ee:
146
+ return i ? o === i ? void 0 : (n(), o = i, t = q(e, i), t) : (n(), je);
147
+ case Ue:
148
+ n(), o = null;
149
+ return;
150
+ }
151
+ };
152
+ }
153
+ function x(e) {
154
+ let t = e;
155
+ const o = G();
156
+ return (n, r) => {
157
+ switch (n) {
158
+ case It:
159
+ t = r;
160
+ break;
161
+ case Ee: {
162
+ r(t);
163
+ break;
164
+ }
165
+ case To:
166
+ return t;
167
+ }
168
+ return o(n, r);
169
+ };
170
+ }
171
+ function le(e, t) {
172
+ return Tt(x(t), (o) => k(e, o));
173
+ }
174
+ function G() {
175
+ const e = [];
176
+ return (t, o) => {
177
+ switch (t) {
178
+ case It:
179
+ e.slice().forEach((n) => {
180
+ n(o);
181
+ });
182
+ return;
183
+ case Ue:
184
+ e.splice(0, e.length);
185
+ return;
186
+ case Ee:
187
+ return e.push(o), () => {
188
+ const n = e.indexOf(o);
189
+ n > -1 && e.splice(n, 1);
190
+ };
191
+ }
192
+ };
193
+ }
194
+ function fe(e) {
195
+ return Tt(G(), (t) => k(e, t));
196
+ }
197
+ function _(e, t = [], { singleton: o } = { singleton: !0 }) {
198
+ return {
199
+ constructor: e,
200
+ dependencies: t,
201
+ id: cn(),
202
+ singleton: o
203
+ };
204
+ }
205
+ const cn = () => Symbol();
206
+ function an(e) {
207
+ const t = /* @__PURE__ */ new Map(), o = ({ constructor: n, dependencies: r, id: i, singleton: l }) => {
208
+ if (l && t.has(i))
209
+ return t.get(i);
210
+ const s = n(r.map((c) => o(c)));
211
+ return l && t.set(i, s), s;
212
+ };
213
+ return o(e);
214
+ }
215
+ function te(...e) {
216
+ const t = G(), o = new Array(e.length);
217
+ let n = 0;
218
+ const r = Math.pow(2, e.length) - 1;
219
+ return e.forEach((i, l) => {
220
+ const s = Math.pow(2, l);
221
+ q(i, (c) => {
222
+ o[l] = c, n = n | s, n === r && V(t, o);
223
+ });
224
+ }), function(i, l) {
225
+ switch (i) {
226
+ case Ue: {
227
+ Pt(t);
228
+ return;
229
+ }
230
+ case Ee:
231
+ return n === r && l(o), q(t, l);
232
+ }
233
+ };
234
+ }
235
+ function O(e, t = So) {
236
+ return p(e, $(t));
237
+ }
238
+ function Bt(...e) {
239
+ return function(t, o) {
240
+ switch (t) {
241
+ case Ue:
242
+ return;
243
+ case Ee:
244
+ return nn(...e.map((n) => q(n, o)));
245
+ }
246
+ };
247
+ }
248
+ var ue = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(ue || {});
249
+ const un = {
250
+ 0: "debug",
251
+ 3: "error",
252
+ 1: "log",
253
+ 2: "warn"
254
+ }, dn = () => typeof globalThis > "u" ? window : globalThis, ke = _(
255
+ () => {
256
+ const e = x(
257
+ 3
258
+ /* ERROR */
259
+ );
260
+ return {
261
+ log: x((t, o, n = 1) => {
262
+ var r;
263
+ const i = (r = dn().VIRTUOSO_LOG_LEVEL) != null ? r : ee(e);
264
+ n >= i && console[un[n]](
265
+ "%creact-virtuoso: %c%s %o",
266
+ "color: #0253b3; font-weight: bold",
267
+ "color: initial",
268
+ t,
269
+ o
270
+ );
271
+ }),
272
+ logLevel: e
273
+ };
274
+ },
275
+ [],
276
+ { singleton: !0 }
277
+ );
278
+ function Ve(e, t, o) {
279
+ return At(e, t, o).callbackRef;
280
+ }
281
+ function At(e, t, o) {
282
+ const n = B.useRef(null);
283
+ let r = (l) => {
284
+ };
285
+ const i = B.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((l) => {
286
+ const s = () => {
287
+ const c = l[0].target;
288
+ c.offsetParent !== null && e(c);
289
+ };
290
+ o ? s() : requestAnimationFrame(s);
291
+ }) : null, [e, o]);
292
+ return r = (l) => {
293
+ l && t ? (i?.observe(l), n.current = l) : (n.current && i?.unobserve(n.current), n.current = null);
294
+ }, { callbackRef: r, ref: n };
295
+ }
296
+ function fn(e, t, o, n, r, i, l, s, c) {
297
+ const a = B.useCallback(
298
+ (m) => {
299
+ const T = hn(m.children, t, s ? "offsetWidth" : "offsetHeight", r);
300
+ let g = m.parentElement;
301
+ for (; !g.dataset.virtuosoScroller; )
302
+ g = g.parentElement;
303
+ const I = g.lastElementChild.dataset.viewportType === "window";
304
+ let H;
305
+ I && (H = g.ownerDocument.defaultView);
306
+ const y = l ? s ? l.scrollLeft : l.scrollTop : I ? s ? H.scrollX || H.document.documentElement.scrollLeft : H.scrollY || H.document.documentElement.scrollTop : s ? g.scrollLeft : g.scrollTop, v = l ? s ? l.scrollWidth : l.scrollHeight : I ? s ? H.document.documentElement.scrollWidth : H.document.documentElement.scrollHeight : s ? g.scrollWidth : g.scrollHeight, h = l ? s ? l.offsetWidth : l.offsetHeight : I ? s ? H.innerWidth : H.innerHeight : s ? g.offsetWidth : g.offsetHeight;
307
+ n({
308
+ scrollHeight: v,
309
+ scrollTop: Math.max(y, 0),
310
+ viewportHeight: h
311
+ }), i?.(
312
+ s ? oo("column-gap", getComputedStyle(m).columnGap, r) : oo("row-gap", getComputedStyle(m).rowGap, r)
313
+ ), T !== null && e(T);
314
+ },
315
+ [e, t, r, i, l, n, s]
316
+ );
317
+ return At(a, o, c);
318
+ }
319
+ function hn(e, t, o, n) {
320
+ const r = e.length;
321
+ if (r === 0)
322
+ return null;
323
+ const i = [];
324
+ for (let l = 0; l < r; l++) {
325
+ const s = e.item(l);
326
+ if (s.dataset.index === void 0)
327
+ continue;
328
+ const c = parseInt(s.dataset.index), a = parseFloat(s.dataset.knownSize), m = t(s, o);
329
+ if (m === 0 && n("Zero-sized element, this should not happen", { child: s }, ue.ERROR), m === a)
330
+ continue;
331
+ const T = i[i.length - 1];
332
+ i.length === 0 || T.size !== m || T.endIndex !== c - 1 ? i.push({ endIndex: c, size: m, startIndex: c }) : i[i.length - 1].endIndex++;
333
+ }
334
+ return i;
335
+ }
336
+ function oo(e, t, o) {
337
+ return t !== "normal" && !(t != null && t.endsWith("px")) && o(`${e} was not resolved to pixel value correctly`, t, ue.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
338
+ }
339
+ function wo(e, t, o) {
340
+ const n = B.useRef(null), r = B.useCallback(
341
+ (c) => {
342
+ if (!(c != null && c.offsetParent))
343
+ return;
344
+ const a = c.getBoundingClientRect(), m = a.width;
345
+ let T, g;
346
+ if (t) {
347
+ const I = t.getBoundingClientRect(), H = a.top - I.top;
348
+ g = I.height - Math.max(0, H), T = H + t.scrollTop;
349
+ } else {
350
+ const I = l.current.ownerDocument.defaultView;
351
+ g = I.innerHeight - Math.max(0, a.top), T = a.top + I.scrollY;
352
+ }
353
+ n.current = {
354
+ offsetTop: T,
355
+ visibleHeight: g,
356
+ visibleWidth: m
357
+ }, e(n.current);
358
+ },
359
+ // eslint-disable-next-line react-hooks/exhaustive-deps
360
+ [e, t]
361
+ ), { callbackRef: i, ref: l } = At(r, !0, o), s = B.useCallback(() => {
362
+ r(l.current);
363
+ }, [r, l]);
364
+ return B.useEffect(() => {
365
+ var c;
366
+ if (t) {
367
+ t.addEventListener("scroll", s);
368
+ const a = new ResizeObserver(() => {
369
+ requestAnimationFrame(s);
370
+ });
371
+ return a.observe(t), () => {
372
+ t.removeEventListener("scroll", s), a.unobserve(t);
373
+ };
374
+ } else {
375
+ const a = (c = l.current) == null ? void 0 : c.ownerDocument.defaultView;
376
+ return a?.addEventListener("scroll", s), a?.addEventListener("resize", s), () => {
377
+ a?.removeEventListener("scroll", s), a?.removeEventListener("resize", s);
378
+ };
379
+ }
380
+ }, [s, t, l]), i;
381
+ }
382
+ const ce = _(
383
+ () => {
384
+ const e = G(), t = G(), o = x(0), n = G(), r = x(0), i = G(), l = G(), s = x(0), c = x(0), a = x(0), m = x(0), T = G(), g = G(), I = x(!1), H = x(!1), y = x(!1);
385
+ return k(
386
+ p(
387
+ e,
388
+ b(({ scrollTop: v }) => v)
389
+ ),
390
+ t
391
+ ), k(
392
+ p(
393
+ e,
394
+ b(({ scrollHeight: v }) => v)
395
+ ),
396
+ l
397
+ ), k(t, r), {
398
+ deviation: o,
399
+ fixedFooterHeight: a,
400
+ fixedHeaderHeight: c,
401
+ footerHeight: m,
402
+ headerHeight: s,
403
+ horizontalDirection: H,
404
+ scrollBy: g,
405
+ // input
406
+ scrollContainerState: e,
407
+ scrollHeight: l,
408
+ scrollingInProgress: I,
409
+ // signals
410
+ scrollTo: T,
411
+ scrollTop: t,
412
+ skipAnimationFrameInResizeObserver: y,
413
+ smoothScrollTargetReached: n,
414
+ // state
415
+ statefulScrollTop: r,
416
+ viewportHeight: i
417
+ };
418
+ },
419
+ [],
420
+ { singleton: !0 }
421
+ ), Je = { lvl: 0 };
422
+ function Co(e, t) {
423
+ const o = e.length;
424
+ if (o === 0)
425
+ return [];
426
+ let { index: n, value: r } = t(e[0]);
427
+ const i = [];
428
+ for (let l = 1; l < o; l++) {
429
+ const { index: s, value: c } = t(e[l]);
430
+ i.push({ end: s - 1, start: n, value: r }), n = s, r = c;
431
+ }
432
+ return i.push({ end: 1 / 0, start: n, value: r }), i;
433
+ }
434
+ function K(e) {
435
+ return e === Je;
436
+ }
437
+ function Qe(e, t) {
438
+ if (!K(e))
439
+ return t === e.k ? e.v : t < e.k ? Qe(e.l, t) : Qe(e.r, t);
440
+ }
441
+ function xe(e, t, o = "k") {
442
+ if (K(e))
443
+ return [-1 / 0, void 0];
444
+ if (Number(e[o]) === t)
445
+ return [e.k, e.v];
446
+ if (Number(e[o]) < t) {
447
+ const n = xe(e.r, t, o);
448
+ return n[0] === -1 / 0 ? [e.k, e.v] : n;
449
+ }
450
+ return xe(e.l, t, o);
451
+ }
452
+ function de(e, t, o) {
453
+ return K(e) ? bo(t, o, 1) : t === e.k ? oe(e, { k: t, v: o }) : t < e.k ? no(oe(e, { l: de(e.l, t, o) })) : no(oe(e, { r: de(e.r, t, o) }));
454
+ }
455
+ function _e() {
456
+ return Je;
457
+ }
458
+ function xt(e, t, o) {
459
+ if (K(e))
460
+ return [];
461
+ const n = xe(e, t)[0];
462
+ return mn(kt(e, n, o));
463
+ }
464
+ function Et(e, t) {
465
+ if (K(e)) return Je;
466
+ const { k: o, l: n, r } = e;
467
+ if (t === o) {
468
+ if (K(n))
469
+ return r;
470
+ if (K(r))
471
+ return n;
472
+ {
473
+ const [i, l] = yo(n);
474
+ return ft(oe(e, { k: i, l: Ho(n), v: l }));
475
+ }
476
+ } else return t < o ? ft(oe(e, { l: Et(n, t) })) : ft(oe(e, { r: Et(r, t) }));
477
+ }
478
+ function Pe(e) {
479
+ return K(e) ? [] : [...Pe(e.l), { k: e.k, v: e.v }, ...Pe(e.r)];
480
+ }
481
+ function kt(e, t, o) {
482
+ if (K(e))
483
+ return [];
484
+ const { k: n, l: r, r: i, v: l } = e;
485
+ let s = [];
486
+ return n > t && (s = s.concat(kt(r, t, o))), n >= t && n <= o && s.push({ k: n, v: l }), n <= o && (s = s.concat(kt(i, t, o))), s;
487
+ }
488
+ function ft(e) {
489
+ const { l: t, lvl: o, r: n } = e;
490
+ if (n.lvl >= o - 1 && t.lvl >= o - 1)
491
+ return e;
492
+ if (o > n.lvl + 1) {
493
+ if (Ht(t))
494
+ return zo(oe(e, { lvl: o - 1 }));
495
+ if (!K(t) && !K(t.r))
496
+ return oe(t.r, {
497
+ l: oe(t, { r: t.r.l }),
498
+ lvl: o,
499
+ r: oe(e, {
500
+ l: t.r.r,
501
+ lvl: o - 1
502
+ })
503
+ });
504
+ throw new Error("Unexpected empty nodes");
505
+ } else {
506
+ if (Ht(e))
507
+ return Lt(oe(e, { lvl: o - 1 }));
508
+ if (!K(n) && !K(n.l)) {
509
+ const r = n.l, i = Ht(r) ? n.lvl - 1 : n.lvl;
510
+ return oe(r, {
511
+ l: oe(e, {
512
+ lvl: o - 1,
513
+ r: r.l
514
+ }),
515
+ lvl: r.lvl + 1,
516
+ r: Lt(oe(n, { l: r.r, lvl: i }))
517
+ });
518
+ } else
519
+ throw new Error("Unexpected empty nodes");
520
+ }
521
+ }
522
+ function oe(e, t) {
523
+ return bo(
524
+ t.k !== void 0 ? t.k : e.k,
525
+ t.v !== void 0 ? t.v : e.v,
526
+ t.lvl !== void 0 ? t.lvl : e.lvl,
527
+ t.l !== void 0 ? t.l : e.l,
528
+ t.r !== void 0 ? t.r : e.r
529
+ );
530
+ }
531
+ function Ho(e) {
532
+ return K(e.r) ? e.l : ft(oe(e, { r: Ho(e.r) }));
533
+ }
534
+ function Ht(e) {
535
+ return K(e) || e.lvl > e.r.lvl;
536
+ }
537
+ function yo(e) {
538
+ return K(e.r) ? [e.k, e.v] : yo(e.r);
539
+ }
540
+ function bo(e, t, o, n = Je, r = Je) {
541
+ return { k: e, l: n, lvl: o, r, v: t };
542
+ }
543
+ function no(e) {
544
+ return Lt(zo(e));
545
+ }
546
+ function zo(e) {
547
+ const { l: t } = e;
548
+ return !K(t) && t.lvl === e.lvl ? oe(t, { r: oe(e, { l: t.r }) }) : e;
549
+ }
550
+ function Lt(e) {
551
+ const { lvl: t, r: o } = e;
552
+ return !K(o) && !K(o.r) && o.lvl === t && o.r.lvl === t ? oe(o, { l: oe(e, { r: o.l }), lvl: t + 1 }) : e;
553
+ }
554
+ function mn(e) {
555
+ return Co(e, ({ k: t, v: o }) => ({ index: t, value: o }));
556
+ }
557
+ function Ro(e, t) {
558
+ return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
559
+ }
560
+ function et(e, t) {
561
+ return !!(e && e[0] === t[0] && e[1] === t[1]);
562
+ }
563
+ const Vt = _(
564
+ () => ({ recalcInProgress: x(!1) }),
565
+ [],
566
+ { singleton: !0 }
567
+ );
568
+ function Bo(e, t, o) {
569
+ return e[mt(e, t, o)];
570
+ }
571
+ function mt(e, t, o, n = 0) {
572
+ let r = e.length - 1;
573
+ for (; n <= r; ) {
574
+ const i = Math.floor((n + r) / 2), l = e[i], s = o(l, t);
575
+ if (s === 0)
576
+ return i;
577
+ if (s === -1) {
578
+ if (r - n < 2)
579
+ return i - 1;
580
+ r = i - 1;
581
+ } else {
582
+ if (r === n)
583
+ return i;
584
+ n = i + 1;
585
+ }
586
+ }
587
+ throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
588
+ }
589
+ function gn(e, t, o, n) {
590
+ const r = mt(e, t, n), i = mt(e, o, n, r);
591
+ return e.slice(r, i + 1);
592
+ }
593
+ function Be(e, t) {
594
+ return Math.round(e.getBoundingClientRect()[t]);
595
+ }
596
+ function St(e) {
597
+ return !K(e.groupOffsetTree);
598
+ }
599
+ function Dt({ index: e }, t) {
600
+ return t === e ? 0 : t < e ? -1 : 1;
601
+ }
602
+ function pn() {
603
+ return {
604
+ groupIndices: [],
605
+ groupOffsetTree: _e(),
606
+ lastIndex: 0,
607
+ lastOffset: 0,
608
+ lastSize: 0,
609
+ offsetTree: [],
610
+ sizeTree: _e()
611
+ };
612
+ }
613
+ function vn(e, t) {
614
+ let o = K(e) ? 0 : 1 / 0;
615
+ for (const n of t) {
616
+ const { endIndex: r, size: i, startIndex: l } = n;
617
+ if (o = Math.min(o, l), K(e)) {
618
+ e = de(e, 0, i);
619
+ continue;
620
+ }
621
+ const s = xt(e, l - 1, r + 1);
622
+ if (s.some(Hn(n)))
623
+ continue;
624
+ let c = !1, a = !1;
625
+ for (const { end: m, start: T, value: g } of s)
626
+ c ? (r >= T || i === g) && (e = Et(e, T)) : (a = g !== i, c = !0), m > r && r >= T && g !== i && (e = de(e, r + 1, g));
627
+ a && (e = de(e, l, i));
628
+ }
629
+ return [e, o];
630
+ }
631
+ function In(e) {
632
+ return typeof e.groupIndex < "u";
633
+ }
634
+ function Tn({ offset: e }, t) {
635
+ return t === e ? 0 : t < e ? -1 : 1;
636
+ }
637
+ function tt(e, t, o) {
638
+ if (t.length === 0)
639
+ return 0;
640
+ const { index: n, offset: r, size: i } = Bo(t, e, Dt), l = e - n, s = i * l + (l - 1) * o + r;
641
+ return s > 0 ? s + o : s;
642
+ }
643
+ function Eo(e, t) {
644
+ if (!St(t))
645
+ return e;
646
+ let o = 0;
647
+ for (; t.groupIndices[o] <= e + o; )
648
+ o++;
649
+ return e + o;
650
+ }
651
+ function ko(e, t, o) {
652
+ if (In(e))
653
+ return t.groupIndices[e.groupIndex] + 1;
654
+ {
655
+ const n = e.index === "LAST" ? o : e.index;
656
+ let r = Eo(n, t);
657
+ return r = Math.max(0, r, Math.min(o, r)), r;
658
+ }
659
+ }
660
+ function xn(e, t, o, n = 0) {
661
+ return n > 0 && (t = Math.max(t, Bo(e, n, Dt).offset)), Co(gn(e, t, o, Tn), Cn);
662
+ }
663
+ function Sn(e, [t, o, n, r]) {
664
+ t.length > 0 && n("received item sizes", t, ue.DEBUG);
665
+ const i = e.sizeTree;
666
+ let l = i, s = 0;
667
+ if (o.length > 0 && K(i) && t.length === 2) {
668
+ const g = t[0].size, I = t[1].size;
669
+ l = o.reduce((H, y) => de(de(H, y, g), y + 1, I), l);
670
+ } else
671
+ [l, s] = vn(l, t);
672
+ if (l === i)
673
+ return e;
674
+ const { lastIndex: c, lastOffset: a, lastSize: m, offsetTree: T } = Mt(e.offsetTree, s, l, r);
675
+ return {
676
+ groupIndices: o,
677
+ groupOffsetTree: o.reduce((g, I) => de(g, I, tt(I, T, r)), _e()),
678
+ lastIndex: c,
679
+ lastOffset: a,
680
+ lastSize: m,
681
+ offsetTree: T,
682
+ sizeTree: l
683
+ };
684
+ }
685
+ function wn(e) {
686
+ return Pe(e).map(({ k: t, v: o }, n, r) => {
687
+ const i = r[n + 1];
688
+ return { endIndex: i ? i.k - 1 : 1 / 0, size: o, startIndex: t };
689
+ });
690
+ }
691
+ function ro(e, t) {
692
+ let o = 0, n = 0;
693
+ for (; o < e; )
694
+ o += t[n + 1] - t[n] - 1, n++;
695
+ return n - (o === e ? 0 : 1);
696
+ }
697
+ function Mt(e, t, o, n) {
698
+ let r = e, i = 0, l = 0, s = 0, c = 0;
699
+ if (t !== 0) {
700
+ c = mt(r, t - 1, Dt), s = r[c].offset;
701
+ const a = xe(o, t - 1);
702
+ i = a[0], l = a[1], r.length && r[c].size === xe(o, t)[1] && (c -= 1), r = r.slice(0, c + 1);
703
+ } else
704
+ r = [];
705
+ for (const { start: a, value: m } of xt(o, t, 1 / 0)) {
706
+ const T = a - i, g = T * l + s + T * n;
707
+ r.push({
708
+ index: a,
709
+ offset: g,
710
+ size: m
711
+ }), i = a, s = g, l = m;
712
+ }
713
+ return {
714
+ lastIndex: i,
715
+ lastOffset: s,
716
+ lastSize: l,
717
+ offsetTree: r
718
+ };
719
+ }
720
+ function Cn(e) {
721
+ return { index: e.index, value: e };
722
+ }
723
+ function Hn(e) {
724
+ const { endIndex: t, size: o, startIndex: n } = e;
725
+ return (r) => r.start === n && (r.end === t || r.end === 1 / 0) && r.value === o;
726
+ }
727
+ const yn = {
728
+ offsetHeight: "height",
729
+ offsetWidth: "width"
730
+ }, He = _(
731
+ ([{ log: e }, { recalcInProgress: t }]) => {
732
+ const o = G(), n = G(), r = le(n, 0), i = G(), l = G(), s = x(0), c = x([]), a = x(void 0), m = x(void 0), T = x((f, u) => Be(f, yn[u])), g = x(void 0), I = x(0), H = pn(), y = le(
733
+ p(o, D(c, e, I), Ce(Sn, H), $()),
734
+ H
735
+ ), v = le(
736
+ p(
737
+ c,
738
+ $(),
739
+ Ce((f, u) => ({ current: u, prev: f.current }), {
740
+ current: [],
741
+ prev: []
742
+ }),
743
+ b(({ prev: f }) => f)
744
+ ),
745
+ []
746
+ );
747
+ k(
748
+ p(
749
+ c,
750
+ W((f) => f.length > 0),
751
+ D(y, I),
752
+ b(([f, u, S]) => {
753
+ const z = f.reduce((L, M, P) => de(L, M, tt(M, u.offsetTree, S) || P), _e());
754
+ return {
755
+ ...u,
756
+ groupIndices: f,
757
+ groupOffsetTree: z
758
+ };
759
+ })
760
+ ),
761
+ y
762
+ ), k(
763
+ p(
764
+ n,
765
+ D(y),
766
+ W(([f, { lastIndex: u }]) => f < u),
767
+ b(([f, { lastIndex: u, lastSize: S }]) => [
768
+ {
769
+ endIndex: u,
770
+ size: S,
771
+ startIndex: f
772
+ }
773
+ ])
774
+ ),
775
+ o
776
+ ), k(a, m);
777
+ const h = le(
778
+ p(
779
+ a,
780
+ b((f) => f === void 0)
781
+ ),
782
+ !0
783
+ );
784
+ k(
785
+ p(
786
+ m,
787
+ W((f) => f !== void 0 && K(ee(y).sizeTree)),
788
+ b((f) => [{ endIndex: 0, size: f, startIndex: 0 }])
789
+ ),
790
+ o
791
+ );
792
+ const d = fe(
793
+ p(
794
+ o,
795
+ D(y),
796
+ Ce(
797
+ ({ sizes: f }, [u, S]) => ({
798
+ changed: S !== f,
799
+ sizes: S
800
+ }),
801
+ { changed: !1, sizes: H }
802
+ ),
803
+ b((f) => f.changed)
804
+ )
805
+ );
806
+ q(
807
+ p(
808
+ s,
809
+ Ce(
810
+ (f, u) => ({ diff: f.prev - u, prev: u }),
811
+ { diff: 0, prev: 0 }
812
+ ),
813
+ b((f) => f.diff)
814
+ ),
815
+ (f) => {
816
+ const { groupIndices: u } = ee(y);
817
+ if (f > 0)
818
+ V(t, !0), V(i, f + ro(f, u));
819
+ else if (f < 0) {
820
+ const S = ee(v);
821
+ S.length > 0 && (f -= ro(-f, S)), V(l, f);
822
+ }
823
+ }
824
+ ), q(p(s, D(e)), ([f, u]) => {
825
+ f < 0 && u(
826
+ "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
827
+ { firstItemIndex: s },
828
+ ue.ERROR
829
+ );
830
+ });
831
+ const C = fe(i);
832
+ k(
833
+ p(
834
+ i,
835
+ D(y),
836
+ b(([f, u]) => {
837
+ const S = u.groupIndices.length > 0, z = [], L = u.lastSize;
838
+ if (S) {
839
+ const M = Qe(u.sizeTree, 0);
840
+ let P = 0, N = 0;
841
+ for (; P < f; ) {
842
+ const E = u.groupIndices[N], j = u.groupIndices.length === N + 1 ? 1 / 0 : u.groupIndices[N + 1] - E - 1;
843
+ z.push({
844
+ endIndex: E,
845
+ size: M,
846
+ startIndex: E
847
+ }), z.push({
848
+ endIndex: E + 1 + j - 1,
849
+ size: L,
850
+ startIndex: E + 1
851
+ }), N++, P += j + 1;
852
+ }
853
+ const Y = Pe(u.sizeTree);
854
+ return P !== f && Y.shift(), Y.reduce(
855
+ (E, { k: j, v: ne }) => {
856
+ let he = E.ranges;
857
+ return E.prevSize !== 0 && (he = [
858
+ ...E.ranges,
859
+ {
860
+ endIndex: j + f - 1,
861
+ size: E.prevSize,
862
+ startIndex: E.prevIndex
863
+ }
864
+ ]), {
865
+ prevIndex: j + f,
866
+ prevSize: ne,
867
+ ranges: he
868
+ };
869
+ },
870
+ {
871
+ prevIndex: f,
872
+ prevSize: 0,
873
+ ranges: z
874
+ }
875
+ ).ranges;
876
+ }
877
+ return Pe(u.sizeTree).reduce(
878
+ (M, { k: P, v: N }) => ({
879
+ prevIndex: P + f,
880
+ prevSize: N,
881
+ ranges: [...M.ranges, { endIndex: P + f - 1, size: M.prevSize, startIndex: M.prevIndex }]
882
+ }),
883
+ {
884
+ prevIndex: 0,
885
+ prevSize: L,
886
+ ranges: []
887
+ }
888
+ ).ranges;
889
+ })
890
+ ),
891
+ o
892
+ );
893
+ const R = fe(
894
+ p(
895
+ l,
896
+ D(y, I),
897
+ b(([f, { offsetTree: u }, S]) => {
898
+ const z = -f;
899
+ return tt(z, u, S);
900
+ })
901
+ )
902
+ );
903
+ return k(
904
+ p(
905
+ l,
906
+ D(y, I),
907
+ b(([f, u, S]) => {
908
+ if (u.groupIndices.length > 0) {
909
+ if (K(u.sizeTree))
910
+ return u;
911
+ let z = _e();
912
+ const L = ee(v);
913
+ let M = 0, P = 0, N = 0;
914
+ for (; M < -f; ) {
915
+ N = L[P];
916
+ const Y = L[P + 1] - N - 1;
917
+ P++, M += Y + 1;
918
+ }
919
+ if (z = Pe(u.sizeTree).reduce((Y, { k: E, v: j }) => de(Y, Math.max(0, E + f), j), z), M !== -f) {
920
+ const Y = Qe(u.sizeTree, N);
921
+ z = de(z, 0, Y);
922
+ const E = xe(u.sizeTree, -f + 1)[1];
923
+ z = de(z, 1, E);
924
+ }
925
+ return {
926
+ ...u,
927
+ sizeTree: z,
928
+ ...Mt(u.offsetTree, 0, z, S)
929
+ };
930
+ } else {
931
+ const z = Pe(u.sizeTree).reduce((L, { k: M, v: P }) => de(L, Math.max(0, M + f), P), _e());
932
+ return {
933
+ ...u,
934
+ sizeTree: z,
935
+ ...Mt(u.offsetTree, 0, z, S)
936
+ };
937
+ }
938
+ })
939
+ ),
940
+ y
941
+ ), {
942
+ beforeUnshiftWith: C,
943
+ // input
944
+ data: g,
945
+ defaultItemSize: m,
946
+ firstItemIndex: s,
947
+ fixedItemSize: a,
948
+ gap: I,
949
+ groupIndices: c,
950
+ itemSize: T,
951
+ listRefresh: d,
952
+ shiftWith: l,
953
+ shiftWithOffset: R,
954
+ sizeRanges: o,
955
+ // output
956
+ sizes: y,
957
+ statefulTotalCount: r,
958
+ totalCount: n,
959
+ trackItemSizes: h,
960
+ unshiftWith: i
961
+ };
962
+ },
963
+ X(ke, Vt),
964
+ { singleton: !0 }
965
+ );
966
+ function bn(e) {
967
+ return e.reduce(
968
+ (t, o) => (t.groupIndices.push(t.totalCount), t.totalCount += o + 1, t),
969
+ {
970
+ groupIndices: [],
971
+ totalCount: 0
972
+ }
973
+ );
974
+ }
975
+ const Lo = _(
976
+ ([{ groupIndices: e, sizes: t, totalCount: o }, { headerHeight: n, scrollTop: r }]) => {
977
+ const i = G(), l = G(), s = fe(p(i, b(bn)));
978
+ return k(
979
+ p(
980
+ s,
981
+ b((c) => c.totalCount)
982
+ ),
983
+ o
984
+ ), k(
985
+ p(
986
+ s,
987
+ b((c) => c.groupIndices)
988
+ ),
989
+ e
990
+ ), k(
991
+ p(
992
+ te(r, t, n),
993
+ W(([c, a]) => St(a)),
994
+ b(([c, a, m]) => xe(a.groupOffsetTree, Math.max(c - m, 0), "v")[0]),
995
+ $(),
996
+ b((c) => [c])
997
+ ),
998
+ l
999
+ ), { groupCounts: i, topItemsIndexes: l };
1000
+ },
1001
+ X(He, ce)
1002
+ ), Le = _(
1003
+ ([{ log: e }]) => {
1004
+ const t = x(!1), o = fe(
1005
+ p(
1006
+ t,
1007
+ W((n) => n),
1008
+ $()
1009
+ )
1010
+ );
1011
+ return q(t, (n) => {
1012
+ n && ee(e)("props updated", {}, ue.DEBUG);
1013
+ }), { didMount: o, propsReady: t };
1014
+ },
1015
+ X(ke),
1016
+ { singleton: !0 }
1017
+ ), zn = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1018
+ function Mo(e) {
1019
+ const t = typeof e == "number" ? { index: e } : e;
1020
+ return t.align || (t.align = "start"), (!t.behavior || !zn) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
1021
+ }
1022
+ const nt = _(
1023
+ ([
1024
+ { gap: e, listRefresh: t, sizes: o, totalCount: n },
1025
+ {
1026
+ fixedFooterHeight: r,
1027
+ fixedHeaderHeight: i,
1028
+ footerHeight: l,
1029
+ headerHeight: s,
1030
+ scrollingInProgress: c,
1031
+ scrollTo: a,
1032
+ smoothScrollTargetReached: m,
1033
+ viewportHeight: T
1034
+ },
1035
+ { log: g }
1036
+ ]) => {
1037
+ const I = G(), H = G(), y = x(0);
1038
+ let v = null, h = null, d = null;
1039
+ function C() {
1040
+ v && (v(), v = null), d && (d(), d = null), h && (clearTimeout(h), h = null), V(c, !1);
1041
+ }
1042
+ return k(
1043
+ p(
1044
+ I,
1045
+ D(o, T, n, y, s, l, g),
1046
+ D(e, i, r),
1047
+ b(
1048
+ ([
1049
+ [R, f, u, S, z, L, M, P],
1050
+ N,
1051
+ Y,
1052
+ E
1053
+ ]) => {
1054
+ const j = Mo(R), { align: ne, behavior: he, offset: pe } = j, ve = S - 1, ae = ko(j, f, ve);
1055
+ let se = tt(ae, f.offsetTree, N) + L;
1056
+ ne === "end" ? (se += Y + xe(f.sizeTree, ae)[1] - u + E, ae === ve && (se += M)) : ne === "center" ? se += (Y + xe(f.sizeTree, ae)[1] - u + E) / 2 : se -= z, pe && (se += pe);
1057
+ const Me = (Ie) => {
1058
+ C(), Ie ? (P("retrying to scroll to", { location: R }, ue.DEBUG), V(I, R)) : (V(H, !0), P("list did not change, scroll successful", {}, ue.DEBUG));
1059
+ };
1060
+ if (C(), he === "smooth") {
1061
+ let Ie = !1;
1062
+ d = q(t, (qe) => {
1063
+ Ie = Ie || qe;
1064
+ }), v = Te(m, () => {
1065
+ Me(Ie);
1066
+ });
1067
+ } else
1068
+ v = Te(p(t, Rn(150)), Me);
1069
+ return h = setTimeout(() => {
1070
+ C();
1071
+ }, 1200), V(c, !0), P("scrolling from index to", { behavior: he, index: ae, top: se }, ue.DEBUG), { behavior: he, top: se };
1072
+ }
1073
+ )
1074
+ ),
1075
+ a
1076
+ ), {
1077
+ scrollTargetReached: H,
1078
+ scrollToIndex: I,
1079
+ topListHeight: y
1080
+ };
1081
+ },
1082
+ X(He, ce, ke),
1083
+ { singleton: !0 }
1084
+ );
1085
+ function Rn(e) {
1086
+ return (t) => {
1087
+ const o = setTimeout(() => {
1088
+ t(!1);
1089
+ }, e);
1090
+ return (n) => {
1091
+ n && (t(!0), clearTimeout(o));
1092
+ };
1093
+ };
1094
+ }
1095
+ function Ft(e, t) {
1096
+ e == 0 ? t() : requestAnimationFrame(() => {
1097
+ Ft(e - 1, t);
1098
+ });
1099
+ }
1100
+ function Gt(e, t) {
1101
+ const o = t - 1;
1102
+ return typeof e == "number" ? e : e.index === "LAST" ? o : e.index;
1103
+ }
1104
+ const rt = _(
1105
+ ([{ defaultItemSize: e, listRefresh: t, sizes: o }, { scrollTop: n }, { scrollTargetReached: r, scrollToIndex: i }, { didMount: l }]) => {
1106
+ const s = x(!0), c = x(0), a = x(!0);
1107
+ return k(
1108
+ p(
1109
+ l,
1110
+ D(c),
1111
+ W(([m, T]) => !!T),
1112
+ we(!1)
1113
+ ),
1114
+ s
1115
+ ), k(
1116
+ p(
1117
+ l,
1118
+ D(c),
1119
+ W(([m, T]) => !!T),
1120
+ we(!1)
1121
+ ),
1122
+ a
1123
+ ), q(
1124
+ p(
1125
+ te(t, l),
1126
+ D(s, o, e, a),
1127
+ W(([[, m], T, { sizeTree: g }, I, H]) => m && (!K(g) || Wt(I)) && !T && !H),
1128
+ D(c)
1129
+ ),
1130
+ ([, m]) => {
1131
+ Te(r, () => {
1132
+ V(a, !0);
1133
+ }), Ft(4, () => {
1134
+ Te(n, () => {
1135
+ V(s, !0);
1136
+ }), V(i, m);
1137
+ });
1138
+ }
1139
+ ), {
1140
+ initialItemFinalLocationReached: a,
1141
+ initialTopMostItemIndex: c,
1142
+ scrolledToInitialItem: s
1143
+ };
1144
+ },
1145
+ X(He, ce, nt, Le),
1146
+ { singleton: !0 }
1147
+ );
1148
+ function Oo(e, t) {
1149
+ return Math.abs(e - t) < 1.01;
1150
+ }
1151
+ const ot = "up", $e = "down", Bn = "none", En = {
1152
+ atBottom: !1,
1153
+ notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
1154
+ state: {
1155
+ offsetBottom: 0,
1156
+ scrollHeight: 0,
1157
+ scrollTop: 0,
1158
+ viewportHeight: 0
1159
+ }
1160
+ }, kn = 0, it = _(([{ footerHeight: e, headerHeight: t, scrollBy: o, scrollContainerState: n, scrollTop: r, viewportHeight: i }]) => {
1161
+ const l = x(!1), s = x(!0), c = G(), a = G(), m = x(4), T = x(kn), g = le(
1162
+ p(
1163
+ Bt(p(O(r), Ae(1), we(!0)), p(O(r), Ae(1), we(!1), to(100))),
1164
+ $()
1165
+ ),
1166
+ !1
1167
+ ), I = le(
1168
+ p(Bt(p(o, we(!0)), p(o, we(!1), to(200))), $()),
1169
+ !1
1170
+ );
1171
+ k(
1172
+ p(
1173
+ te(O(r), O(T)),
1174
+ b(([d, C]) => d <= C),
1175
+ $()
1176
+ ),
1177
+ s
1178
+ ), k(p(s, be(50)), a);
1179
+ const H = fe(
1180
+ p(
1181
+ te(n, O(i), O(t), O(e), O(m)),
1182
+ Ce((d, [{ scrollHeight: C, scrollTop: R }, f, u, S, z]) => {
1183
+ const L = R + f - C > -z, M = {
1184
+ scrollHeight: C,
1185
+ scrollTop: R,
1186
+ viewportHeight: f
1187
+ };
1188
+ if (L) {
1189
+ let N, Y;
1190
+ return R > d.state.scrollTop ? (N = "SCROLLED_DOWN", Y = d.state.scrollTop - R) : (N = "SIZE_DECREASED", Y = d.state.scrollTop - R || d.scrollTopDelta), {
1191
+ atBottom: !0,
1192
+ atBottomBecause: N,
1193
+ scrollTopDelta: Y,
1194
+ state: M
1195
+ };
1196
+ }
1197
+ let P;
1198
+ return M.scrollHeight > d.state.scrollHeight ? P = "SIZE_INCREASED" : f < d.state.viewportHeight ? P = "VIEWPORT_HEIGHT_DECREASING" : R < d.state.scrollTop ? P = "SCROLLING_UPWARDS" : P = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1199
+ atBottom: !1,
1200
+ notAtBottomBecause: P,
1201
+ state: M
1202
+ };
1203
+ }, En),
1204
+ $((d, C) => d && d.atBottom === C.atBottom)
1205
+ )
1206
+ ), y = le(
1207
+ p(
1208
+ n,
1209
+ Ce(
1210
+ (d, { scrollHeight: C, scrollTop: R, viewportHeight: f }) => {
1211
+ if (Oo(d.scrollHeight, C))
1212
+ return {
1213
+ changed: !1,
1214
+ jump: 0,
1215
+ scrollHeight: C,
1216
+ scrollTop: R
1217
+ };
1218
+ {
1219
+ const u = C - (R + f) < 1;
1220
+ return d.scrollTop !== R && u ? {
1221
+ changed: !0,
1222
+ jump: d.scrollTop - R,
1223
+ scrollHeight: C,
1224
+ scrollTop: R
1225
+ } : {
1226
+ changed: !0,
1227
+ jump: 0,
1228
+ scrollHeight: C,
1229
+ scrollTop: R
1230
+ };
1231
+ }
1232
+ },
1233
+ { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1234
+ ),
1235
+ W((d) => d.changed),
1236
+ b((d) => d.jump)
1237
+ ),
1238
+ 0
1239
+ );
1240
+ k(
1241
+ p(
1242
+ H,
1243
+ b((d) => d.atBottom)
1244
+ ),
1245
+ l
1246
+ ), k(p(l, be(50)), c);
1247
+ const v = x($e);
1248
+ k(
1249
+ p(
1250
+ n,
1251
+ b(({ scrollTop: d }) => d),
1252
+ $(),
1253
+ Ce(
1254
+ (d, C) => ee(I) ? { direction: d.direction, prevScrollTop: C } : { direction: C < d.prevScrollTop ? ot : $e, prevScrollTop: C },
1255
+ { direction: $e, prevScrollTop: 0 }
1256
+ ),
1257
+ b((d) => d.direction)
1258
+ ),
1259
+ v
1260
+ ), k(p(n, be(50), we(Bn)), v);
1261
+ const h = x(0);
1262
+ return k(
1263
+ p(
1264
+ g,
1265
+ W((d) => !d),
1266
+ we(0)
1267
+ ),
1268
+ h
1269
+ ), k(
1270
+ p(
1271
+ r,
1272
+ be(100),
1273
+ D(g),
1274
+ W(([d, C]) => !!C),
1275
+ Ce(([d, C], [R]) => [C, R], [0, 0]),
1276
+ b(([d, C]) => C - d)
1277
+ ),
1278
+ h
1279
+ ), {
1280
+ atBottomState: H,
1281
+ atBottomStateChange: c,
1282
+ atBottomThreshold: m,
1283
+ atTopStateChange: a,
1284
+ atTopThreshold: T,
1285
+ isAtBottom: l,
1286
+ isAtTop: s,
1287
+ isScrolling: g,
1288
+ lastJumpDueToItemResize: y,
1289
+ scrollDirection: v,
1290
+ scrollVelocity: h
1291
+ };
1292
+ }, X(ce)), gt = "top", pt = "bottom", io = "none";
1293
+ function lo(e, t, o) {
1294
+ return typeof e == "number" ? o === ot && t === gt || o === $e && t === pt ? e : 0 : o === ot ? t === gt ? e.main : e.reverse : t === pt ? e.main : e.reverse;
1295
+ }
1296
+ function so(e, t) {
1297
+ var o;
1298
+ return typeof e == "number" ? e : (o = e[t]) != null ? o : 0;
1299
+ }
1300
+ const Nt = _(
1301
+ ([{ deviation: e, fixedHeaderHeight: t, headerHeight: o, scrollTop: n, viewportHeight: r }]) => {
1302
+ const i = G(), l = x(0), s = x(0), c = x(0), a = le(
1303
+ p(
1304
+ te(
1305
+ O(n),
1306
+ O(r),
1307
+ O(o),
1308
+ O(i, et),
1309
+ O(c),
1310
+ O(l),
1311
+ O(t),
1312
+ O(e),
1313
+ O(s)
1314
+ ),
1315
+ b(
1316
+ ([
1317
+ m,
1318
+ T,
1319
+ g,
1320
+ [I, H],
1321
+ y,
1322
+ v,
1323
+ h,
1324
+ d,
1325
+ C
1326
+ ]) => {
1327
+ const R = m - d, f = v + h, u = Math.max(g - R, 0);
1328
+ let S = io;
1329
+ const z = so(C, gt), L = so(C, pt);
1330
+ return I -= d, I += g + h, H += g + h, H -= d, I > m + f - z && (S = ot), H < m - u + T + L && (S = $e), S !== io ? [
1331
+ Math.max(R - g - lo(y, gt, S) - z, 0),
1332
+ R - u - h + T + lo(y, pt, S) + L
1333
+ ] : null;
1334
+ }
1335
+ ),
1336
+ W((m) => m != null),
1337
+ $(et)
1338
+ ),
1339
+ [0, 0]
1340
+ );
1341
+ return {
1342
+ increaseViewportBy: s,
1343
+ // input
1344
+ listBoundary: i,
1345
+ overscan: c,
1346
+ topListHeight: l,
1347
+ // output
1348
+ visibleRange: a
1349
+ };
1350
+ },
1351
+ X(ce),
1352
+ { singleton: !0 }
1353
+ );
1354
+ function Ln(e, t, o) {
1355
+ if (St(t)) {
1356
+ const n = Eo(e, t);
1357
+ return [
1358
+ { index: xe(t.groupOffsetTree, n)[0], offset: 0, size: 0 },
1359
+ { data: o?.[0], index: n, offset: 0, size: 0 }
1360
+ ];
1361
+ }
1362
+ return [{ data: o?.[0], index: e, offset: 0, size: 0 }];
1363
+ }
1364
+ const yt = {
1365
+ bottom: 0,
1366
+ firstItemIndex: 0,
1367
+ items: [],
1368
+ offsetBottom: 0,
1369
+ offsetTop: 0,
1370
+ top: 0,
1371
+ topItems: [],
1372
+ topListHeight: 0,
1373
+ totalCount: 0
1374
+ };
1375
+ function ht(e, t, o, n, r, i) {
1376
+ const { lastIndex: l, lastOffset: s, lastSize: c } = r;
1377
+ let a = 0, m = 0;
1378
+ if (e.length > 0) {
1379
+ a = e[0].offset;
1380
+ const y = e[e.length - 1];
1381
+ m = y.offset + y.size;
1382
+ }
1383
+ const T = o - l, g = s + T * c + (T - 1) * n, I = a, H = g - m;
1384
+ return {
1385
+ bottom: m,
1386
+ firstItemIndex: i,
1387
+ items: co(e, r, i),
1388
+ offsetBottom: H,
1389
+ offsetTop: a,
1390
+ top: I,
1391
+ topItems: co(t, r, i),
1392
+ topListHeight: t.reduce((y, v) => v.size + y, 0),
1393
+ totalCount: o
1394
+ };
1395
+ }
1396
+ function Wo(e, t, o, n, r, i) {
1397
+ let l = 0;
1398
+ if (o.groupIndices.length > 0)
1399
+ for (const m of o.groupIndices) {
1400
+ if (m - l >= e)
1401
+ break;
1402
+ l++;
1403
+ }
1404
+ const s = e + l, c = Gt(t, s), a = Array.from({ length: s }).map((m, T) => ({
1405
+ data: i[T + c],
1406
+ index: T + c,
1407
+ offset: 0,
1408
+ size: 0
1409
+ }));
1410
+ return ht(a, [], s, r, o, n);
1411
+ }
1412
+ function co(e, t, o) {
1413
+ if (e.length === 0)
1414
+ return [];
1415
+ if (!St(t))
1416
+ return e.map((a) => ({ ...a, index: a.index + o, originalIndex: a.index }));
1417
+ const n = e[0].index, r = e[e.length - 1].index, i = [], l = xt(t.groupOffsetTree, n, r);
1418
+ let s, c = 0;
1419
+ for (const a of e) {
1420
+ (!s || s.end < a.index) && (s = l.shift(), c = t.groupIndices.indexOf(s.start));
1421
+ let m;
1422
+ a.index === s.start ? m = {
1423
+ index: c,
1424
+ type: "group"
1425
+ } : m = {
1426
+ groupIndex: c,
1427
+ index: a.index - (c + 1) + o
1428
+ }, i.push({
1429
+ ...m,
1430
+ data: a.data,
1431
+ offset: a.offset,
1432
+ originalIndex: a.index,
1433
+ size: a.size
1434
+ });
1435
+ }
1436
+ return i;
1437
+ }
1438
+ const De = _(
1439
+ ([
1440
+ { data: e, firstItemIndex: t, gap: o, sizes: n, totalCount: r },
1441
+ i,
1442
+ { listBoundary: l, topListHeight: s, visibleRange: c },
1443
+ { initialTopMostItemIndex: a, scrolledToInitialItem: m },
1444
+ { topListHeight: T },
1445
+ g,
1446
+ { didMount: I },
1447
+ { recalcInProgress: H }
1448
+ ]) => {
1449
+ const y = x([]), v = x(0), h = G();
1450
+ k(i.topItemsIndexes, y);
1451
+ const d = le(
1452
+ p(
1453
+ te(
1454
+ I,
1455
+ H,
1456
+ O(c, et),
1457
+ O(r),
1458
+ O(n),
1459
+ O(a),
1460
+ m,
1461
+ O(y),
1462
+ O(t),
1463
+ O(o),
1464
+ e
1465
+ ),
1466
+ W(([u, S, , z, , , , , , , L]) => {
1467
+ const M = L && L.length !== z;
1468
+ return u && !S && !M;
1469
+ }),
1470
+ b(
1471
+ ([
1472
+ ,
1473
+ ,
1474
+ [u, S],
1475
+ z,
1476
+ L,
1477
+ M,
1478
+ P,
1479
+ N,
1480
+ Y,
1481
+ E,
1482
+ j
1483
+ ]) => {
1484
+ const ne = L, { offsetTree: he, sizeTree: pe } = ne, ve = ee(v);
1485
+ if (z === 0)
1486
+ return { ...yt, totalCount: z };
1487
+ if (u === 0 && S === 0)
1488
+ return ve === 0 ? { ...yt, totalCount: z } : Wo(ve, M, L, Y, E, j || []);
1489
+ if (K(pe))
1490
+ return ve > 0 ? null : ht(
1491
+ Ln(Gt(M, z), ne, j),
1492
+ [],
1493
+ z,
1494
+ E,
1495
+ ne,
1496
+ Y
1497
+ );
1498
+ const ae = [];
1499
+ if (N.length > 0) {
1500
+ const Fe = N[0], Se = N[N.length - 1];
1501
+ let ye = 0;
1502
+ for (const w of xt(pe, Fe, Se)) {
1503
+ const F = w.value, Z = Math.max(w.start, Fe), re = Math.min(w.end, Se);
1504
+ for (let Q = Z; Q <= re; Q++)
1505
+ ae.push({ data: j?.[Q], index: Q, offset: ye, size: F }), ye += F;
1506
+ }
1507
+ }
1508
+ if (!P)
1509
+ return ht([], ae, z, E, ne, Y);
1510
+ const se = N.length > 0 ? N[N.length - 1] + 1 : 0, Me = xn(he, u, S, se);
1511
+ if (Me.length === 0)
1512
+ return null;
1513
+ const Ie = z - 1, qe = Tt([], (Fe) => {
1514
+ for (const Se of Me) {
1515
+ const ye = Se.value;
1516
+ let w = ye.offset, F = Se.start;
1517
+ const Z = ye.size;
1518
+ if (ye.offset < u) {
1519
+ F += Math.floor((u - ye.offset + E) / (Z + E));
1520
+ const Q = F - Se.start;
1521
+ w += Q * Z + Q * E;
1522
+ }
1523
+ F < se && (w += (se - F) * Z, F = se);
1524
+ const re = Math.min(Se.end, Ie);
1525
+ for (let Q = F; Q <= re && !(w >= S); Q++)
1526
+ Fe.push({ data: j?.[Q], index: Q, offset: w, size: Z }), w += Z + E;
1527
+ }
1528
+ });
1529
+ return ht(qe, ae, z, E, ne, Y);
1530
+ }
1531
+ ),
1532
+ //@ts-expect-error filter needs to be fixed
1533
+ W((u) => u !== null),
1534
+ $()
1535
+ ),
1536
+ yt
1537
+ );
1538
+ k(
1539
+ p(
1540
+ e,
1541
+ W(Wt),
1542
+ b((u) => u?.length)
1543
+ ),
1544
+ r
1545
+ ), k(
1546
+ p(
1547
+ d,
1548
+ b((u) => u.topListHeight)
1549
+ ),
1550
+ T
1551
+ ), k(T, s), k(
1552
+ p(
1553
+ d,
1554
+ b((u) => [u.top, u.bottom])
1555
+ ),
1556
+ l
1557
+ ), k(
1558
+ p(
1559
+ d,
1560
+ b((u) => u.items)
1561
+ ),
1562
+ h
1563
+ );
1564
+ const C = fe(
1565
+ p(
1566
+ d,
1567
+ W(({ items: u }) => u.length > 0),
1568
+ D(r, e),
1569
+ W(([{ items: u }, S]) => u[u.length - 1].originalIndex === S - 1),
1570
+ b(([, u, S]) => [u - 1, S]),
1571
+ $(et),
1572
+ b(([u]) => u)
1573
+ )
1574
+ ), R = fe(
1575
+ p(
1576
+ d,
1577
+ be(200),
1578
+ W(({ items: u, topItems: S }) => u.length > 0 && u[0].originalIndex === S.length),
1579
+ b(({ items: u }) => u[0].index),
1580
+ $()
1581
+ )
1582
+ ), f = fe(
1583
+ p(
1584
+ d,
1585
+ W(({ items: u }) => u.length > 0),
1586
+ b(({ items: u }) => {
1587
+ let S = 0, z = u.length - 1;
1588
+ for (; u[S].type === "group" && S < z; )
1589
+ S++;
1590
+ for (; u[z].type === "group" && z > S; )
1591
+ z--;
1592
+ return {
1593
+ endIndex: u[z].index,
1594
+ startIndex: u[S].index
1595
+ };
1596
+ }),
1597
+ $(Ro)
1598
+ )
1599
+ );
1600
+ return { endReached: C, initialItemCount: v, itemsRendered: h, listState: d, rangeChanged: f, startReached: R, topItemsIndexes: y, ...g };
1601
+ },
1602
+ X(
1603
+ He,
1604
+ Lo,
1605
+ Nt,
1606
+ rt,
1607
+ nt,
1608
+ it,
1609
+ Le,
1610
+ Vt
1611
+ ),
1612
+ { singleton: !0 }
1613
+ ), Po = _(
1614
+ ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: o, headerHeight: n }, { listState: r }]) => {
1615
+ const i = G(), l = le(
1616
+ p(
1617
+ te(o, e, n, t, r),
1618
+ b(([s, c, a, m, T]) => s + c + a + m + T.offsetBottom + T.bottom)
1619
+ ),
1620
+ 0
1621
+ );
1622
+ return k(O(l), i), { totalListHeight: l, totalListHeightChanged: i };
1623
+ },
1624
+ X(ce, De),
1625
+ { singleton: !0 }
1626
+ ), Mn = _(
1627
+ ([{ viewportHeight: e }, { totalListHeight: t }]) => {
1628
+ const o = x(!1), n = le(
1629
+ p(
1630
+ te(o, e, t),
1631
+ W(([r]) => r),
1632
+ b(([, r, i]) => Math.max(0, r - i)),
1633
+ be(0),
1634
+ $()
1635
+ ),
1636
+ 0
1637
+ );
1638
+ return { alignToBottom: o, paddingTopAddition: n };
1639
+ },
1640
+ X(ce, Po),
1641
+ { singleton: !0 }
1642
+ ), Ao = _(() => ({
1643
+ context: x(null)
1644
+ })), On = ({
1645
+ itemBottom: e,
1646
+ itemTop: t,
1647
+ locationParams: { align: o, behavior: n, ...r },
1648
+ viewportBottom: i,
1649
+ viewportTop: l
1650
+ }) => t < l ? { ...r, align: o ?? "start", behavior: n } : e > i ? { ...r, align: o ?? "end", behavior: n } : null, Vo = _(
1651
+ ([
1652
+ { gap: e, sizes: t, totalCount: o },
1653
+ { fixedFooterHeight: n, fixedHeaderHeight: r, headerHeight: i, scrollingInProgress: l, scrollTop: s, viewportHeight: c },
1654
+ { scrollToIndex: a }
1655
+ ]) => {
1656
+ const m = G();
1657
+ return k(
1658
+ p(
1659
+ m,
1660
+ D(t, c, o, i, r, n, s),
1661
+ D(e),
1662
+ b(([[T, g, I, H, y, v, h, d], C]) => {
1663
+ const { align: R, behavior: f, calculateViewLocation: u = On, done: S, ...z } = T, L = ko(T, g, H - 1), M = tt(L, g.offsetTree, C) + y + v, P = M + xe(g.sizeTree, L)[1], N = d + v, Y = d + I - h, E = u({
1664
+ itemBottom: P,
1665
+ itemTop: M,
1666
+ locationParams: { align: R, behavior: f, ...z },
1667
+ viewportBottom: Y,
1668
+ viewportTop: N
1669
+ });
1670
+ return E ? S && Te(
1671
+ p(
1672
+ l,
1673
+ W((j) => !j),
1674
+ // skips the initial publish of false, and the cleanup call.
1675
+ // but if scrollingInProgress is true, we skip the initial publish.
1676
+ Ae(ee(l) ? 1 : 2)
1677
+ ),
1678
+ S
1679
+ ) : S && S(), E;
1680
+ }),
1681
+ W((T) => T !== null)
1682
+ ),
1683
+ a
1684
+ ), {
1685
+ scrollIntoView: m
1686
+ };
1687
+ },
1688
+ X(He, ce, nt, De, ke),
1689
+ { singleton: !0 }
1690
+ );
1691
+ function ao(e) {
1692
+ return e ? e === "smooth" ? "smooth" : "auto" : !1;
1693
+ }
1694
+ const Wn = (e, t) => typeof e == "function" ? ao(e(t)) : t && ao(e), Pn = _(
1695
+ ([
1696
+ { listRefresh: e, totalCount: t, fixedItemSize: o, data: n },
1697
+ { atBottomState: r, isAtBottom: i },
1698
+ { scrollToIndex: l },
1699
+ { scrolledToInitialItem: s },
1700
+ { didMount: c, propsReady: a },
1701
+ { log: m },
1702
+ { scrollingInProgress: T },
1703
+ { context: g },
1704
+ { scrollIntoView: I }
1705
+ ]) => {
1706
+ const H = x(!1), y = G();
1707
+ let v = null;
1708
+ function h(f) {
1709
+ V(l, {
1710
+ align: "end",
1711
+ behavior: f,
1712
+ index: "LAST"
1713
+ });
1714
+ }
1715
+ q(
1716
+ p(
1717
+ te(p(O(t), Ae(1)), c),
1718
+ D(O(H), i, s, T),
1719
+ b(([[f, u], S, z, L, M]) => {
1720
+ let P = u && L, N = "auto";
1721
+ return P && (N = Wn(S, z || M), P = P && !!N), { followOutputBehavior: N, shouldFollow: P, totalCount: f };
1722
+ }),
1723
+ W(({ shouldFollow: f }) => f)
1724
+ ),
1725
+ ({ followOutputBehavior: f, totalCount: u }) => {
1726
+ v && (v(), v = null), ee(o) ? requestAnimationFrame(() => {
1727
+ ee(m)("following output to ", { totalCount: u }, ue.DEBUG), h(f);
1728
+ }) : v = Te(e, () => {
1729
+ ee(m)("following output to ", { totalCount: u }, ue.DEBUG), h(f), v = null;
1730
+ });
1731
+ }
1732
+ );
1733
+ function d(f) {
1734
+ const u = Te(r, (S) => {
1735
+ f && !S.atBottom && S.notAtBottomBecause === "SIZE_INCREASED" && !v && (ee(m)("scrolling to bottom due to increased size", {}, ue.DEBUG), h("auto"));
1736
+ });
1737
+ setTimeout(u, 100);
1738
+ }
1739
+ q(
1740
+ p(
1741
+ te(O(H), t, a),
1742
+ W(([f, , u]) => f && u),
1743
+ Ce(
1744
+ ({ value: f }, [, u]) => ({ refreshed: f === u, value: u }),
1745
+ { refreshed: !1, value: 0 }
1746
+ ),
1747
+ W(({ refreshed: f }) => f),
1748
+ D(H, t)
1749
+ ),
1750
+ ([, f]) => {
1751
+ ee(s) && d(f !== !1);
1752
+ }
1753
+ ), q(y, () => {
1754
+ d(ee(H) !== !1);
1755
+ }), q(te(O(H), r), ([f, u]) => {
1756
+ f && !u.atBottom && u.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && h("auto");
1757
+ });
1758
+ const C = x(null), R = G();
1759
+ return k(
1760
+ Bt(
1761
+ p(
1762
+ O(n),
1763
+ b((f) => {
1764
+ var u;
1765
+ return (u = f?.length) != null ? u : 0;
1766
+ })
1767
+ ),
1768
+ p(O(t))
1769
+ ),
1770
+ R
1771
+ ), q(
1772
+ p(
1773
+ te(p(R, Ae(1)), c),
1774
+ D(O(C), s, T, g),
1775
+ b(([[f, u], S, z, L, M]) => u && z && S?.({ context: M, totalCount: f, scrollingInProgress: L })),
1776
+ W((f) => !!f),
1777
+ be(0)
1778
+ ),
1779
+ (f) => {
1780
+ v && (v(), v = null), ee(o) ? requestAnimationFrame(() => {
1781
+ ee(m)("scrolling into view", {}), V(I, f);
1782
+ }) : v = Te(e, () => {
1783
+ ee(m)("scrolling into view", {}), V(I, f), v = null;
1784
+ });
1785
+ }
1786
+ ), { autoscrollToBottom: y, followOutput: H, scrollIntoViewOnChange: C };
1787
+ },
1788
+ X(
1789
+ He,
1790
+ it,
1791
+ nt,
1792
+ rt,
1793
+ Le,
1794
+ ke,
1795
+ ce,
1796
+ Ao,
1797
+ Vo
1798
+ )
1799
+ ), An = _(
1800
+ ([{ data: e, firstItemIndex: t, gap: o, sizes: n }, { initialTopMostItemIndex: r }, { initialItemCount: i, listState: l }, { didMount: s }]) => (k(
1801
+ p(
1802
+ s,
1803
+ D(i),
1804
+ W(([, c]) => c !== 0),
1805
+ D(r, n, t, o, e),
1806
+ b(([[, c], a, m, T, g, I = []]) => Wo(c, a, m, T, g, I))
1807
+ ),
1808
+ l
1809
+ ), {}),
1810
+ X(He, rt, De, Le),
1811
+ { singleton: !0 }
1812
+ ), Vn = _(
1813
+ ([{ didMount: e }, { scrollTo: t }, { listState: o }]) => {
1814
+ const n = x(0);
1815
+ return q(
1816
+ p(
1817
+ e,
1818
+ D(n),
1819
+ W(([, r]) => r !== 0),
1820
+ b(([, r]) => ({ top: r }))
1821
+ ),
1822
+ (r) => {
1823
+ Te(
1824
+ p(
1825
+ o,
1826
+ Ae(1),
1827
+ W((i) => i.items.length > 1)
1828
+ ),
1829
+ () => {
1830
+ requestAnimationFrame(() => {
1831
+ V(t, r);
1832
+ });
1833
+ }
1834
+ );
1835
+ }
1836
+ ), {
1837
+ initialScrollTop: n
1838
+ };
1839
+ },
1840
+ X(Le, ce, De),
1841
+ { singleton: !0 }
1842
+ ), Do = _(
1843
+ ([{ scrollVelocity: e }]) => {
1844
+ const t = x(!1), o = G(), n = x(!1);
1845
+ return k(
1846
+ p(
1847
+ e,
1848
+ D(n, t, o),
1849
+ W(([r, i]) => !!i),
1850
+ b(([r, i, l, s]) => {
1851
+ const { enter: c, exit: a } = i;
1852
+ if (l) {
1853
+ if (a(r, s))
1854
+ return !1;
1855
+ } else if (c(r, s))
1856
+ return !0;
1857
+ return l;
1858
+ }),
1859
+ $()
1860
+ ),
1861
+ t
1862
+ ), q(
1863
+ p(te(t, e, o), D(n)),
1864
+ ([[r, i, l], s]) => {
1865
+ r && s && s.change && s.change(i, l);
1866
+ }
1867
+ ), { isSeeking: t, scrollSeekConfiguration: n, scrollSeekRangeChanged: o, scrollVelocity: e };
1868
+ },
1869
+ X(it),
1870
+ { singleton: !0 }
1871
+ ), _t = _(([{ scrollContainerState: e, scrollTo: t }]) => {
1872
+ const o = G(), n = G(), r = G(), i = x(!1), l = x(void 0);
1873
+ return k(
1874
+ p(
1875
+ te(o, n),
1876
+ b(([{ scrollHeight: s, scrollTop: c, viewportHeight: a }, { offsetTop: m }]) => ({
1877
+ scrollHeight: s,
1878
+ scrollTop: Math.max(0, c - m),
1879
+ viewportHeight: a
1880
+ }))
1881
+ ),
1882
+ e
1883
+ ), k(
1884
+ p(
1885
+ t,
1886
+ D(n),
1887
+ b(([s, { offsetTop: c }]) => ({
1888
+ ...s,
1889
+ top: s.top + c
1890
+ }))
1891
+ ),
1892
+ r
1893
+ ), {
1894
+ customScrollParent: l,
1895
+ // config
1896
+ useWindowScroll: i,
1897
+ // input
1898
+ windowScrollContainerState: o,
1899
+ // signals
1900
+ windowScrollTo: r,
1901
+ windowViewportRect: n
1902
+ };
1903
+ }, X(ce)), Dn = _(
1904
+ ([
1905
+ { sizeRanges: e, sizes: t },
1906
+ { headerHeight: o, scrollTop: n },
1907
+ { initialTopMostItemIndex: r },
1908
+ { didMount: i },
1909
+ { useWindowScroll: l, windowScrollContainerState: s, windowViewportRect: c }
1910
+ ]) => {
1911
+ const a = G(), m = x(void 0), T = x(null), g = x(null);
1912
+ return k(s, T), k(c, g), q(
1913
+ p(
1914
+ a,
1915
+ D(t, n, l, T, g, o)
1916
+ ),
1917
+ ([I, H, y, v, h, d, C]) => {
1918
+ const R = wn(H.sizeTree);
1919
+ v && h !== null && d !== null && (y = h.scrollTop - d.offsetTop), y -= C, I({ ranges: R, scrollTop: y });
1920
+ }
1921
+ ), k(p(m, W(Wt), b(Fn)), r), k(
1922
+ p(
1923
+ i,
1924
+ D(m),
1925
+ W(([, I]) => I !== void 0),
1926
+ $(),
1927
+ b(([, I]) => I.ranges)
1928
+ ),
1929
+ e
1930
+ ), {
1931
+ getState: a,
1932
+ restoreStateFrom: m
1933
+ };
1934
+ },
1935
+ X(He, ce, rt, Le, _t)
1936
+ );
1937
+ function Fn(e) {
1938
+ return { align: "start", index: 0, offset: e.scrollTop };
1939
+ }
1940
+ const Gn = _(([{ topItemsIndexes: e }]) => {
1941
+ const t = x(0);
1942
+ return k(
1943
+ p(
1944
+ t,
1945
+ W((o) => o >= 0),
1946
+ b((o) => Array.from({ length: o }).map((n, r) => r))
1947
+ ),
1948
+ e
1949
+ ), { topItemCount: t };
1950
+ }, X(De));
1951
+ function Fo(e) {
1952
+ let t = !1, o;
1953
+ return () => (t || (t = !0, o = e()), o);
1954
+ }
1955
+ const Nn = Fo(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), _n = _(
1956
+ ([
1957
+ { deviation: e, scrollBy: t, scrollingInProgress: o, scrollTop: n },
1958
+ { isAtBottom: r, isScrolling: i, lastJumpDueToItemResize: l, scrollDirection: s },
1959
+ { listState: c },
1960
+ { beforeUnshiftWith: a, gap: m, shiftWithOffset: T, sizes: g },
1961
+ { log: I },
1962
+ { recalcInProgress: H }
1963
+ ]) => {
1964
+ const y = fe(
1965
+ p(
1966
+ c,
1967
+ D(l),
1968
+ Ce(
1969
+ ([, h, d, C], [{ bottom: R, items: f, offsetBottom: u, totalCount: S }, z]) => {
1970
+ const L = R + u;
1971
+ let M = 0;
1972
+ return d === S && h.length > 0 && f.length > 0 && (f[0].originalIndex === 0 && h[0].originalIndex === 0 || (M = L - C, M !== 0 && (M += z))), [M, f, S, L];
1973
+ },
1974
+ [0, [], 0, 0]
1975
+ ),
1976
+ W(([h]) => h !== 0),
1977
+ D(n, s, o, r, I, H),
1978
+ W(([, h, d, C, , , R]) => !R && !C && h !== 0 && d === ot),
1979
+ b(([[h], , , , , d]) => (d("Upward scrolling compensation", { amount: h }, ue.DEBUG), h))
1980
+ )
1981
+ );
1982
+ function v(h) {
1983
+ h > 0 ? (V(t, { behavior: "auto", top: -h }), V(e, 0)) : (V(e, 0), V(t, { behavior: "auto", top: -h }));
1984
+ }
1985
+ return q(p(y, D(e, i)), ([h, d, C]) => {
1986
+ C && Nn() ? V(e, d - h) : v(-h);
1987
+ }), q(
1988
+ p(
1989
+ te(le(i, !1), e, H),
1990
+ W(([h, d, C]) => !h && !C && d !== 0),
1991
+ b(([h, d]) => d),
1992
+ be(1)
1993
+ ),
1994
+ v
1995
+ ), k(
1996
+ p(
1997
+ T,
1998
+ b((h) => ({ top: -h }))
1999
+ ),
2000
+ t
2001
+ ), q(
2002
+ p(
2003
+ a,
2004
+ D(g, m),
2005
+ b(([h, { groupIndices: d, lastSize: C, sizeTree: R }, f]) => {
2006
+ function u(S) {
2007
+ return S * (C + f);
2008
+ }
2009
+ if (d.length === 0)
2010
+ return u(h);
2011
+ {
2012
+ let S = 0;
2013
+ const z = Qe(R, 0);
2014
+ let L = 0, M = 0;
2015
+ for (; L < h; ) {
2016
+ L++, S += z;
2017
+ let P = d.length === M + 1 ? 1 / 0 : d[M + 1] - d[M] - 1;
2018
+ L + P > h && (S -= z, P = h - L + 1), L += P, S += u(P), M++;
2019
+ }
2020
+ return S;
2021
+ }
2022
+ })
2023
+ ),
2024
+ (h) => {
2025
+ V(e, h), requestAnimationFrame(() => {
2026
+ V(t, { top: h }), requestAnimationFrame(() => {
2027
+ V(e, 0), V(H, !1);
2028
+ });
2029
+ });
2030
+ }
2031
+ ), { deviation: e };
2032
+ },
2033
+ X(ce, it, De, He, ke, Vt)
2034
+ ), Un = _(
2035
+ ([
2036
+ e,
2037
+ t,
2038
+ o,
2039
+ n,
2040
+ r,
2041
+ i,
2042
+ l,
2043
+ s,
2044
+ c,
2045
+ a,
2046
+ m
2047
+ ]) => ({
2048
+ ...e,
2049
+ ...t,
2050
+ ...o,
2051
+ ...n,
2052
+ ...r,
2053
+ ...i,
2054
+ ...l,
2055
+ ...s,
2056
+ ...c,
2057
+ ...a,
2058
+ ...m
2059
+ }),
2060
+ X(
2061
+ Nt,
2062
+ An,
2063
+ Le,
2064
+ Do,
2065
+ Po,
2066
+ Vn,
2067
+ Mn,
2068
+ _t,
2069
+ Vo,
2070
+ ke,
2071
+ Ao
2072
+ )
2073
+ ), Go = _(
2074
+ ([
2075
+ {
2076
+ data: e,
2077
+ defaultItemSize: t,
2078
+ firstItemIndex: o,
2079
+ fixedItemSize: n,
2080
+ gap: r,
2081
+ groupIndices: i,
2082
+ itemSize: l,
2083
+ sizeRanges: s,
2084
+ sizes: c,
2085
+ statefulTotalCount: a,
2086
+ totalCount: m,
2087
+ trackItemSizes: T
2088
+ },
2089
+ { initialItemFinalLocationReached: g, initialTopMostItemIndex: I, scrolledToInitialItem: H },
2090
+ y,
2091
+ v,
2092
+ h,
2093
+ { listState: d, topItemsIndexes: C, ...R },
2094
+ { scrollToIndex: f },
2095
+ u,
2096
+ { topItemCount: S },
2097
+ { groupCounts: z },
2098
+ L
2099
+ ]) => (k(R.rangeChanged, L.scrollSeekRangeChanged), k(
2100
+ p(
2101
+ L.windowViewportRect,
2102
+ b((M) => M.visibleHeight)
2103
+ ),
2104
+ y.viewportHeight
2105
+ ), {
2106
+ data: e,
2107
+ defaultItemHeight: t,
2108
+ firstItemIndex: o,
2109
+ fixedItemHeight: n,
2110
+ gap: r,
2111
+ groupCounts: z,
2112
+ initialItemFinalLocationReached: g,
2113
+ initialTopMostItemIndex: I,
2114
+ scrolledToInitialItem: H,
2115
+ sizeRanges: s,
2116
+ topItemCount: S,
2117
+ topItemsIndexes: C,
2118
+ // input
2119
+ totalCount: m,
2120
+ ...h,
2121
+ groupIndices: i,
2122
+ itemSize: l,
2123
+ listState: d,
2124
+ scrollToIndex: f,
2125
+ // output
2126
+ statefulTotalCount: a,
2127
+ trackItemSizes: T,
2128
+ // exported from stateFlagsSystem
2129
+ ...R,
2130
+ // the bag of IO from featureGroup1System
2131
+ ...L,
2132
+ ...y,
2133
+ sizes: c,
2134
+ ...v
2135
+ }),
2136
+ X(
2137
+ He,
2138
+ rt,
2139
+ ce,
2140
+ Dn,
2141
+ Pn,
2142
+ De,
2143
+ nt,
2144
+ _n,
2145
+ Gn,
2146
+ Lo,
2147
+ Un
2148
+ )
2149
+ );
2150
+ function jn(e, t) {
2151
+ const o = {}, n = {};
2152
+ let r = 0;
2153
+ const i = e.length;
2154
+ for (; r < i; )
2155
+ n[e[r]] = 1, r += 1;
2156
+ for (const l in t)
2157
+ Object.hasOwn(n, l) || (o[l] = t[l]);
2158
+ return o;
2159
+ }
2160
+ const at = typeof document < "u" ? B.useLayoutEffect : B.useEffect;
2161
+ function No(e, t, o) {
2162
+ const n = Object.keys(t.required || {}), r = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), l = Object.keys(t.events || {}), s = B.createContext({});
2163
+ function c(v, h) {
2164
+ v.propsReady && V(v.propsReady, !1);
2165
+ for (const d of n) {
2166
+ const C = v[t.required[d]];
2167
+ V(C, h[d]);
2168
+ }
2169
+ for (const d of r)
2170
+ if (d in h) {
2171
+ const C = v[t.optional[d]];
2172
+ V(C, h[d]);
2173
+ }
2174
+ v.propsReady && V(v.propsReady, !0);
2175
+ }
2176
+ function a(v) {
2177
+ return i.reduce((h, d) => (h[d] = (C) => {
2178
+ const R = v[t.methods[d]];
2179
+ V(R, C);
2180
+ }, h), {});
2181
+ }
2182
+ function m(v) {
2183
+ return l.reduce((h, d) => (h[d] = sn(v[t.events[d]]), h), {});
2184
+ }
2185
+ const T = B.forwardRef((v, h) => {
2186
+ const { children: d, ...C } = v, [R] = B.useState(() => Tt(an(e), (S) => {
2187
+ c(S, C);
2188
+ })), [f] = B.useState(eo(m, R));
2189
+ at(() => {
2190
+ for (const S of l)
2191
+ S in C && q(f[S], C[S]);
2192
+ return () => {
2193
+ Object.values(f).map(Pt);
2194
+ };
2195
+ }, [C, f, R]), at(() => {
2196
+ c(R, C);
2197
+ }), B.useImperativeHandle(h, Qt(a(R)));
2198
+ const u = o;
2199
+ return /* @__PURE__ */ U(s.Provider, { value: R, children: o ? /* @__PURE__ */ U(u, { ...jn([...n, ...r, ...l], C), children: d }) : d });
2200
+ }), g = (v) => {
2201
+ const h = B.useContext(s);
2202
+ return B.useCallback(
2203
+ (d) => {
2204
+ V(h[v], d);
2205
+ },
2206
+ [h, v]
2207
+ );
2208
+ }, I = (v) => {
2209
+ const h = B.useContext(s)[v], d = B.useCallback(
2210
+ (C) => q(h, C),
2211
+ [h]
2212
+ );
2213
+ return B.useSyncExternalStore(
2214
+ d,
2215
+ () => ee(h),
2216
+ () => ee(h)
2217
+ );
2218
+ }, H = (v) => {
2219
+ const h = B.useContext(s)[v], [d, C] = B.useState(eo(ee, h));
2220
+ return at(
2221
+ () => q(h, (R) => {
2222
+ R !== d && C(Qt(R));
2223
+ }),
2224
+ [h, d]
2225
+ ), d;
2226
+ }, y = B.version.startsWith("18") ? I : H;
2227
+ return {
2228
+ Component: T,
2229
+ useEmitter: (v, h) => {
2230
+ const d = B.useContext(s)[v];
2231
+ at(() => q(d, h), [h, d]);
2232
+ },
2233
+ useEmitterValue: y,
2234
+ usePublisher: g
2235
+ };
2236
+ }
2237
+ const _o = B.createContext(void 0), Uo = B.createContext(void 0), jo = typeof document < "u" ? B.useLayoutEffect : B.useEffect;
2238
+ function bt(e) {
2239
+ return "self" in e;
2240
+ }
2241
+ function qn(e) {
2242
+ return "body" in e;
2243
+ }
2244
+ function qo(e, t, o, n = je, r, i) {
2245
+ const l = B.useRef(null), s = B.useRef(null), c = B.useRef(null), a = B.useCallback(
2246
+ (g) => {
2247
+ let I, H, y;
2248
+ const v = g.target;
2249
+ if (qn(v) || bt(v)) {
2250
+ const d = bt(v) ? v : v.defaultView;
2251
+ y = i ? d.scrollX : d.scrollY, I = i ? d.document.documentElement.scrollWidth : d.document.documentElement.scrollHeight, H = i ? d.innerWidth : d.innerHeight;
2252
+ } else
2253
+ y = i ? v.scrollLeft : v.scrollTop, I = i ? v.scrollWidth : v.scrollHeight, H = i ? v.offsetWidth : v.offsetHeight;
2254
+ const h = () => {
2255
+ e({
2256
+ scrollHeight: I,
2257
+ scrollTop: Math.max(y, 0),
2258
+ viewportHeight: H
2259
+ });
2260
+ };
2261
+ g.suppressFlushSync ? h() : en.flushSync(h), s.current !== null && (y === s.current || y <= 0 || y === I - H) && (s.current = null, t(!0), c.current && (clearTimeout(c.current), c.current = null));
2262
+ },
2263
+ [e, t, i]
2264
+ );
2265
+ B.useEffect(() => {
2266
+ const g = r || l.current;
2267
+ return n(r || l.current), a({ suppressFlushSync: !0, target: g }), g.addEventListener("scroll", a, { passive: !0 }), () => {
2268
+ n(null), g.removeEventListener("scroll", a);
2269
+ };
2270
+ }, [l, a, o, n, r]);
2271
+ function m(g) {
2272
+ const I = l.current;
2273
+ if (!I || (i ? "offsetWidth" in I && I.offsetWidth === 0 : "offsetHeight" in I && I.offsetHeight === 0))
2274
+ return;
2275
+ const H = g.behavior === "smooth";
2276
+ let y, v, h;
2277
+ bt(I) ? (v = Math.max(
2278
+ Be(I.document.documentElement, i ? "width" : "height"),
2279
+ i ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
2280
+ ), y = i ? I.innerWidth : I.innerHeight, h = i ? window.scrollX : window.scrollY) : (v = I[i ? "scrollWidth" : "scrollHeight"], y = Be(I, i ? "width" : "height"), h = I[i ? "scrollLeft" : "scrollTop"]);
2281
+ const d = v - y;
2282
+ if (g.top = Math.ceil(Math.max(Math.min(d, g.top), 0)), Oo(y, v) || g.top === h) {
2283
+ e({ scrollHeight: v, scrollTop: h, viewportHeight: y }), H && t(!0);
2284
+ return;
2285
+ }
2286
+ H ? (s.current = g.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2287
+ c.current = null, s.current = null, t(!0);
2288
+ }, 1e3)) : s.current = null, i && (g = { behavior: g.behavior, left: g.top }), I.scrollTo(g);
2289
+ }
2290
+ function T(g) {
2291
+ i && (g = { behavior: g.behavior, left: g.top }), l.current.scrollBy(g);
2292
+ }
2293
+ return { scrollByCallback: T, scrollerRef: l, scrollToCallback: m };
2294
+ }
2295
+ const zt = "-webkit-sticky", uo = "sticky", Ut = Fo(() => {
2296
+ if (typeof document > "u")
2297
+ return uo;
2298
+ const e = document.createElement("div");
2299
+ return e.style.position = zt, e.style.position === zt ? zt : uo;
2300
+ });
2301
+ function jt(e) {
2302
+ return e;
2303
+ }
2304
+ const Kn = /* @__PURE__ */ _(() => {
2305
+ const e = x((s) => `Item ${s}`), t = x((s) => `Group ${s}`), o = x({}), n = x(jt), r = x("div"), i = x(je), l = (s, c = null) => le(
2306
+ p(
2307
+ o,
2308
+ b((a) => a[s]),
2309
+ $()
2310
+ ),
2311
+ c
2312
+ );
2313
+ return {
2314
+ components: o,
2315
+ computeItemKey: n,
2316
+ EmptyPlaceholder: l("EmptyPlaceholder"),
2317
+ FooterComponent: l("Footer"),
2318
+ GroupComponent: l("Group", "div"),
2319
+ groupContent: t,
2320
+ HeaderComponent: l("Header"),
2321
+ HeaderFooterTag: r,
2322
+ ItemComponent: l("Item", "div"),
2323
+ itemContent: e,
2324
+ ListComponent: l("List", "div"),
2325
+ ScrollerComponent: l("Scroller", "div"),
2326
+ scrollerRef: i,
2327
+ ScrollSeekPlaceholder: l("ScrollSeekPlaceholder"),
2328
+ TopItemListComponent: l("TopItemList")
2329
+ };
2330
+ }), Yn = /* @__PURE__ */ _(
2331
+ ([e, t]) => ({ ...e, ...t }),
2332
+ X(Go, Kn)
2333
+ ), $n = ({ height: e }) => /* @__PURE__ */ U("div", { style: { height: e } }), Xn = { overflowAnchor: "none", position: Ut(), zIndex: 1 }, Ko = { overflowAnchor: "none" }, Zn = { ...Ko, display: "inline-block", height: "100%" }, fo = /* @__PURE__ */ B.memo(function({ showTopList: e = !1 }) {
2334
+ const t = A("listState"), o = me("sizeRanges"), n = A("useWindowScroll"), r = A("customScrollParent"), i = me("windowScrollContainerState"), l = me("scrollContainerState"), s = r || n ? i : l, c = A("itemContent"), a = A("context"), m = A("groupContent"), T = A("trackItemSizes"), g = A("itemSize"), I = A("log"), H = me("gap"), y = A("horizontalDirection"), { callbackRef: v } = fn(
2335
+ o,
2336
+ g,
2337
+ T,
2338
+ e ? je : s,
2339
+ I,
2340
+ H,
2341
+ r,
2342
+ y,
2343
+ A("skipAnimationFrameInResizeObserver")
2344
+ ), [h, d] = B.useState(0);
2345
+ qt("deviation", (E) => {
2346
+ h !== E && d(E);
2347
+ });
2348
+ const C = A("EmptyPlaceholder"), R = A("ScrollSeekPlaceholder") || $n, f = A("ListComponent"), u = A("ItemComponent"), S = A("GroupComponent"), z = A("computeItemKey"), L = A("isSeeking"), M = A("groupIndices").length > 0, P = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Y = e ? {} : {
2349
+ boxSizing: "border-box",
2350
+ ...y ? {
2351
+ display: "inline-block",
2352
+ height: "100%",
2353
+ marginLeft: h !== 0 ? h : P ? "auto" : 0,
2354
+ paddingLeft: t.offsetTop,
2355
+ paddingRight: t.offsetBottom,
2356
+ whiteSpace: "nowrap"
2357
+ } : {
2358
+ marginTop: h !== 0 ? h : P ? "auto" : 0,
2359
+ paddingBottom: t.offsetBottom,
2360
+ paddingTop: t.offsetTop
2361
+ },
2362
+ ...N ? {} : { visibility: "hidden" }
2363
+ };
2364
+ return !e && t.totalCount === 0 && C ? /* @__PURE__ */ U(C, { ...ie(C, a) }) : /* @__PURE__ */ U(
2365
+ f,
2366
+ {
2367
+ ...ie(f, a),
2368
+ "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2369
+ ref: v,
2370
+ style: Y,
2371
+ children: (e ? t.topItems : t.items).map((E) => {
2372
+ const j = E.originalIndex, ne = z(j + t.firstItemIndex, E.data, a);
2373
+ return L ? /* @__PURE__ */ dt(
2374
+ R,
2375
+ {
2376
+ ...ie(R, a),
2377
+ height: E.size,
2378
+ index: E.index,
2379
+ key: ne,
2380
+ type: E.type || "item",
2381
+ ...E.type === "group" ? {} : { groupIndex: E.groupIndex }
2382
+ }
2383
+ ) : E.type === "group" ? /* @__PURE__ */ dt(
2384
+ S,
2385
+ {
2386
+ ...ie(S, a),
2387
+ "data-index": j,
2388
+ "data-item-index": E.index,
2389
+ "data-known-size": E.size,
2390
+ key: ne,
2391
+ style: Xn
2392
+ },
2393
+ m(E.index, a)
2394
+ ) : /* @__PURE__ */ dt(
2395
+ u,
2396
+ {
2397
+ ...ie(u, a),
2398
+ ...tr(u, E.data),
2399
+ "data-index": j,
2400
+ "data-item-group-index": E.groupIndex,
2401
+ "data-item-index": E.index,
2402
+ "data-known-size": E.size,
2403
+ key: ne,
2404
+ style: y ? Zn : Ko
2405
+ },
2406
+ M ? c(E.index, E.groupIndex, E.data, a) : c(E.index, E.data, a)
2407
+ );
2408
+ })
2409
+ }
2410
+ );
2411
+ }), Jn = {
2412
+ height: "100%",
2413
+ outline: "none",
2414
+ overflowY: "auto",
2415
+ position: "relative",
2416
+ WebkitOverflowScrolling: "touch"
2417
+ }, Qn = {
2418
+ outline: "none",
2419
+ overflowX: "auto",
2420
+ position: "relative"
2421
+ }, wt = (e) => ({
2422
+ height: "100%",
2423
+ position: "absolute",
2424
+ top: 0,
2425
+ width: "100%",
2426
+ ...e ? { display: "flex", flexDirection: "column" } : {}
2427
+ }), er = {
2428
+ position: Ut(),
2429
+ top: 0,
2430
+ width: "100%",
2431
+ zIndex: 1
2432
+ };
2433
+ function ie(e, t) {
2434
+ if (typeof e != "string")
2435
+ return { context: t };
2436
+ }
2437
+ function tr(e, t) {
2438
+ return { item: typeof e == "string" ? void 0 : t };
2439
+ }
2440
+ const or = /* @__PURE__ */ B.memo(function() {
2441
+ const e = A("HeaderComponent"), t = me("headerHeight"), o = A("HeaderFooterTag"), n = Ve(
2442
+ B.useMemo(
2443
+ () => (i) => {
2444
+ t(Be(i, "height"));
2445
+ },
2446
+ [t]
2447
+ ),
2448
+ !0,
2449
+ A("skipAnimationFrameInResizeObserver")
2450
+ ), r = A("context");
2451
+ return e ? /* @__PURE__ */ U(o, { ref: n, children: /* @__PURE__ */ U(e, { ...ie(e, r) }) }) : null;
2452
+ }), nr = /* @__PURE__ */ B.memo(function() {
2453
+ const e = A("FooterComponent"), t = me("footerHeight"), o = A("HeaderFooterTag"), n = Ve(
2454
+ B.useMemo(
2455
+ () => (i) => {
2456
+ t(Be(i, "height"));
2457
+ },
2458
+ [t]
2459
+ ),
2460
+ !0,
2461
+ A("skipAnimationFrameInResizeObserver")
2462
+ ), r = A("context");
2463
+ return e ? /* @__PURE__ */ U(o, { ref: n, children: /* @__PURE__ */ U(e, { ...ie(e, r) }) }) : null;
2464
+ });
2465
+ function Yo({ useEmitter: e, useEmitterValue: t, usePublisher: o }) {
2466
+ return B.memo(function({ children: n, style: r, ...i }) {
2467
+ const l = o("scrollContainerState"), s = t("ScrollerComponent"), c = o("smoothScrollTargetReached"), a = t("scrollerRef"), m = t("context"), T = t("horizontalDirection") || !1, { scrollByCallback: g, scrollerRef: I, scrollToCallback: H } = qo(
2468
+ l,
2469
+ c,
2470
+ s,
2471
+ a,
2472
+ void 0,
2473
+ T
2474
+ );
2475
+ return e("scrollTo", H), e("scrollBy", g), /* @__PURE__ */ U(
2476
+ s,
2477
+ {
2478
+ "data-testid": "virtuoso-scroller",
2479
+ "data-virtuoso-scroller": !0,
2480
+ ref: I,
2481
+ style: { ...T ? Qn : Jn, ...r },
2482
+ tabIndex: 0,
2483
+ ...i,
2484
+ ...ie(s, m),
2485
+ children: n
2486
+ }
2487
+ );
2488
+ });
2489
+ }
2490
+ function $o({ useEmitter: e, useEmitterValue: t, usePublisher: o }) {
2491
+ return B.memo(function({ children: n, style: r, ...i }) {
2492
+ const l = o("windowScrollContainerState"), s = t("ScrollerComponent"), c = o("smoothScrollTargetReached"), a = t("totalListHeight"), m = t("deviation"), T = t("customScrollParent"), g = t("context"), I = B.useRef(null), H = t("scrollerRef"), { scrollByCallback: y, scrollerRef: v, scrollToCallback: h } = qo(
2493
+ l,
2494
+ c,
2495
+ s,
2496
+ H,
2497
+ T
2498
+ );
2499
+ return jo(() => {
2500
+ var d;
2501
+ return v.current = T || ((d = I.current) == null ? void 0 : d.ownerDocument.defaultView), () => {
2502
+ v.current = null;
2503
+ };
2504
+ }, [v, T]), e("windowScrollTo", h), e("scrollBy", y), /* @__PURE__ */ U(
2505
+ s,
2506
+ {
2507
+ ref: I,
2508
+ "data-virtuoso-scroller": !0,
2509
+ style: { position: "relative", ...r, ...a !== 0 ? { height: a + m } : {} },
2510
+ ...i,
2511
+ ...ie(s, g),
2512
+ children: n
2513
+ }
2514
+ );
2515
+ });
2516
+ }
2517
+ const rr = ({ children: e }) => {
2518
+ const t = B.useContext(_o), o = me("viewportHeight"), n = me("fixedItemHeight"), r = A("alignToBottom"), i = A("horizontalDirection"), l = B.useMemo(
2519
+ () => xo(o, (c) => Be(c, i ? "width" : "height")),
2520
+ [o, i]
2521
+ ), s = Ve(l, !0, A("skipAnimationFrameInResizeObserver"));
2522
+ return B.useEffect(() => {
2523
+ t && (o(t.viewportHeight), n(t.itemHeight));
2524
+ }, [t, o, n]), /* @__PURE__ */ U("div", { "data-viewport-type": "element", ref: s, style: wt(r), children: e });
2525
+ }, ir = ({ children: e }) => {
2526
+ const t = B.useContext(_o), o = me("windowViewportRect"), n = me("fixedItemHeight"), r = A("customScrollParent"), i = wo(
2527
+ o,
2528
+ r,
2529
+ A("skipAnimationFrameInResizeObserver")
2530
+ ), l = A("alignToBottom");
2531
+ return B.useEffect(() => {
2532
+ t && (n(t.itemHeight), o({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
2533
+ }, [t, o, n]), /* @__PURE__ */ U("div", { "data-viewport-type": "window", ref: i, style: wt(l), children: e });
2534
+ }, lr = ({ children: e }) => {
2535
+ const t = A("TopItemListComponent") || "div", o = A("headerHeight"), n = { ...er, marginTop: `${o}px` }, r = A("context");
2536
+ return /* @__PURE__ */ U(t, { style: n, ...ie(t, r), children: e });
2537
+ }, sr = /* @__PURE__ */ B.memo(function(e) {
2538
+ const t = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, n = A("customScrollParent"), r = A("context"), i = n || t ? ur : ar, l = n || t ? ir : rr;
2539
+ return /* @__PURE__ */ Ze(i, { ...e, ...ie(i, r), children: [
2540
+ o && /* @__PURE__ */ U(lr, { children: /* @__PURE__ */ U(fo, { showTopList: !0 }) }),
2541
+ /* @__PURE__ */ Ze(l, { children: [
2542
+ /* @__PURE__ */ U(or, {}),
2543
+ /* @__PURE__ */ U(fo, {}),
2544
+ /* @__PURE__ */ U(nr, {})
2545
+ ] })
2546
+ ] });
2547
+ }), {
2548
+ Component: cr,
2549
+ useEmitter: qt,
2550
+ useEmitterValue: A,
2551
+ usePublisher: me
2552
+ } = /* @__PURE__ */ No(
2553
+ Yn,
2554
+ {
2555
+ required: {},
2556
+ optional: {
2557
+ restoreStateFrom: "restoreStateFrom",
2558
+ context: "context",
2559
+ followOutput: "followOutput",
2560
+ scrollIntoViewOnChange: "scrollIntoViewOnChange",
2561
+ itemContent: "itemContent",
2562
+ groupContent: "groupContent",
2563
+ overscan: "overscan",
2564
+ increaseViewportBy: "increaseViewportBy",
2565
+ totalCount: "totalCount",
2566
+ groupCounts: "groupCounts",
2567
+ topItemCount: "topItemCount",
2568
+ firstItemIndex: "firstItemIndex",
2569
+ initialTopMostItemIndex: "initialTopMostItemIndex",
2570
+ components: "components",
2571
+ atBottomThreshold: "atBottomThreshold",
2572
+ atTopThreshold: "atTopThreshold",
2573
+ computeItemKey: "computeItemKey",
2574
+ defaultItemHeight: "defaultItemHeight",
2575
+ fixedItemHeight: "fixedItemHeight",
2576
+ itemSize: "itemSize",
2577
+ scrollSeekConfiguration: "scrollSeekConfiguration",
2578
+ headerFooterTag: "HeaderFooterTag",
2579
+ data: "data",
2580
+ initialItemCount: "initialItemCount",
2581
+ initialScrollTop: "initialScrollTop",
2582
+ alignToBottom: "alignToBottom",
2583
+ useWindowScroll: "useWindowScroll",
2584
+ customScrollParent: "customScrollParent",
2585
+ scrollerRef: "scrollerRef",
2586
+ logLevel: "logLevel",
2587
+ horizontalDirection: "horizontalDirection",
2588
+ skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver"
2589
+ },
2590
+ methods: {
2591
+ scrollToIndex: "scrollToIndex",
2592
+ scrollIntoView: "scrollIntoView",
2593
+ scrollTo: "scrollTo",
2594
+ scrollBy: "scrollBy",
2595
+ autoscrollToBottom: "autoscrollToBottom",
2596
+ getState: "getState"
2597
+ },
2598
+ events: {
2599
+ isScrolling: "isScrolling",
2600
+ endReached: "endReached",
2601
+ startReached: "startReached",
2602
+ rangeChanged: "rangeChanged",
2603
+ atBottomStateChange: "atBottomStateChange",
2604
+ atTopStateChange: "atTopStateChange",
2605
+ totalListHeightChanged: "totalListHeightChanged",
2606
+ itemsRendered: "itemsRendered",
2607
+ groupIndices: "groupIndices"
2608
+ }
2609
+ },
2610
+ sr
2611
+ ), ar = /* @__PURE__ */ Yo({ useEmitter: qt, useEmitterValue: A, usePublisher: me }), ur = /* @__PURE__ */ $o({ useEmitter: qt, useEmitterValue: A, usePublisher: me }), Br = cr, dr = /* @__PURE__ */ _(() => {
2612
+ const e = x((a) => /* @__PURE__ */ Ze("td", { children: [
2613
+ "Item $",
2614
+ a
2615
+ ] })), t = x(null), o = x((a) => /* @__PURE__ */ Ze("td", { colSpan: 1e3, children: [
2616
+ "Group ",
2617
+ a
2618
+ ] })), n = x(null), r = x(null), i = x({}), l = x(jt), s = x(je), c = (a, m = null) => le(
2619
+ p(
2620
+ i,
2621
+ b((T) => T[a]),
2622
+ $()
2623
+ ),
2624
+ m
2625
+ );
2626
+ return {
2627
+ components: i,
2628
+ computeItemKey: l,
2629
+ context: t,
2630
+ EmptyPlaceholder: c("EmptyPlaceholder"),
2631
+ FillerRow: c("FillerRow"),
2632
+ fixedFooterContent: r,
2633
+ fixedHeaderContent: n,
2634
+ itemContent: e,
2635
+ groupContent: o,
2636
+ ScrollerComponent: c("Scroller", "div"),
2637
+ scrollerRef: s,
2638
+ ScrollSeekPlaceholder: c("ScrollSeekPlaceholder"),
2639
+ TableBodyComponent: c("TableBody", "tbody"),
2640
+ TableComponent: c("Table", "table"),
2641
+ TableFooterComponent: c("TableFoot", "tfoot"),
2642
+ TableHeadComponent: c("TableHead", "thead"),
2643
+ TableRowComponent: c("TableRow", "tr"),
2644
+ GroupComponent: c("Group", "tr")
2645
+ };
2646
+ });
2647
+ X(Go, dr);
2648
+ Ut();
2649
+ const ho = {
2650
+ bottom: 0,
2651
+ itemHeight: 0,
2652
+ items: [],
2653
+ itemWidth: 0,
2654
+ offsetBottom: 0,
2655
+ offsetTop: 0,
2656
+ top: 0
2657
+ }, fr = {
2658
+ bottom: 0,
2659
+ itemHeight: 0,
2660
+ items: [{ index: 0 }],
2661
+ itemWidth: 0,
2662
+ offsetBottom: 0,
2663
+ offsetTop: 0,
2664
+ top: 0
2665
+ }, { ceil: mo, floor: vt, max: Xe, min: Rt, round: go } = Math;
2666
+ function po(e, t, o) {
2667
+ return Array.from({ length: t - e + 1 }).map((n, r) => ({ data: o === null ? null : o[r + e], index: r + e }));
2668
+ }
2669
+ function hr(e) {
2670
+ return {
2671
+ ...fr,
2672
+ items: e
2673
+ };
2674
+ }
2675
+ function ut(e, t) {
2676
+ return e && e.width === t.width && e.height === t.height;
2677
+ }
2678
+ function mr(e, t) {
2679
+ return e && e.column === t.column && e.row === t.row;
2680
+ }
2681
+ const gr = /* @__PURE__ */ _(
2682
+ ([
2683
+ { increaseViewportBy: e, listBoundary: t, overscan: o, visibleRange: n },
2684
+ { footerHeight: r, headerHeight: i, scrollBy: l, scrollContainerState: s, scrollTo: c, scrollTop: a, smoothScrollTargetReached: m, viewportHeight: T },
2685
+ g,
2686
+ I,
2687
+ { didMount: H, propsReady: y },
2688
+ { customScrollParent: v, useWindowScroll: h, windowScrollContainerState: d, windowScrollTo: C, windowViewportRect: R },
2689
+ f
2690
+ ]) => {
2691
+ const u = x(0), S = x(0), z = x(ho), L = x({ height: 0, width: 0 }), M = x({ height: 0, width: 0 }), P = G(), N = G(), Y = x(0), E = x(null), j = x({ column: 0, row: 0 }), ne = G(), he = G(), pe = x(!1), ve = x(0), ae = x(!0), se = x(!1), Me = x(!1);
2692
+ q(
2693
+ p(
2694
+ H,
2695
+ D(ve),
2696
+ W(([w, F]) => !!F)
2697
+ ),
2698
+ () => {
2699
+ V(ae, !1);
2700
+ }
2701
+ ), q(
2702
+ p(
2703
+ te(H, ae, M, L, ve, se),
2704
+ W(([w, F, Z, re, , Q]) => w && !F && Z.height !== 0 && re.height !== 0 && !Q)
2705
+ ),
2706
+ ([, , , , w]) => {
2707
+ V(se, !0), Ft(1, () => {
2708
+ V(P, w);
2709
+ }), Te(p(a), () => {
2710
+ V(t, [0, 0]), V(ae, !0);
2711
+ });
2712
+ }
2713
+ ), k(
2714
+ p(
2715
+ he,
2716
+ W((w) => w != null && w.scrollTop > 0),
2717
+ we(0)
2718
+ ),
2719
+ S
2720
+ ), q(
2721
+ p(
2722
+ H,
2723
+ D(he),
2724
+ W(([, w]) => w != null)
2725
+ ),
2726
+ ([, w]) => {
2727
+ w && (V(L, w.viewport), V(M, w.item), V(j, w.gap), w.scrollTop > 0 && (V(pe, !0), Te(p(a, Ae(1)), (F) => {
2728
+ V(pe, !1);
2729
+ }), V(c, { top: w.scrollTop })));
2730
+ }
2731
+ ), k(
2732
+ p(
2733
+ L,
2734
+ b(({ height: w }) => w)
2735
+ ),
2736
+ T
2737
+ ), k(
2738
+ p(
2739
+ te(
2740
+ O(L, ut),
2741
+ O(M, ut),
2742
+ O(j, (w, F) => w && w.column === F.column && w.row === F.row),
2743
+ O(a)
2744
+ ),
2745
+ b(([w, F, Z, re]) => ({
2746
+ gap: Z,
2747
+ item: F,
2748
+ scrollTop: re,
2749
+ viewport: w
2750
+ }))
2751
+ ),
2752
+ ne
2753
+ ), k(
2754
+ p(
2755
+ te(
2756
+ O(u),
2757
+ n,
2758
+ O(j, mr),
2759
+ O(M, ut),
2760
+ O(L, ut),
2761
+ O(E),
2762
+ O(S),
2763
+ O(pe),
2764
+ O(ae),
2765
+ O(ve)
2766
+ ),
2767
+ W(([, , , , , , , w]) => !w),
2768
+ b(
2769
+ ([
2770
+ w,
2771
+ [F, Z],
2772
+ re,
2773
+ Q,
2774
+ Oe,
2775
+ Ke,
2776
+ Ge,
2777
+ ,
2778
+ lt,
2779
+ ze
2780
+ ]) => {
2781
+ const { column: Re, row: Ye } = re, { height: st, width: Ct } = Q, { width: Kt } = Oe;
2782
+ if (Ge === 0 && (w === 0 || Kt === 0))
2783
+ return ho;
2784
+ if (Ct === 0) {
2785
+ const Jt = Gt(ze, w), Qo = Jt + Math.max(Ge - 1, 0);
2786
+ return hr(po(Jt, Qo, Ke));
2787
+ }
2788
+ const ct = Xo(Kt, Ct, Re);
2789
+ let Ne, We;
2790
+ lt ? F === 0 && Z === 0 && Ge > 0 ? (Ne = 0, We = Ge - 1) : (Ne = ct * vt((F + Ye) / (st + Ye)), We = ct * mo((Z + Ye) / (st + Ye)) - 1, We = Rt(w - 1, Xe(We, ct - 1)), Ne = Rt(We, Xe(0, Ne))) : (Ne = 0, We = -1);
2791
+ const Yt = po(Ne, We, Ke), { bottom: $t, top: Xt } = vo(Oe, re, Q, Yt), Zt = mo(w / ct), Jo = Zt * st + (Zt - 1) * Ye - $t;
2792
+ return { bottom: $t, itemHeight: st, items: Yt, itemWidth: Ct, offsetBottom: Jo, offsetTop: Xt, top: Xt };
2793
+ }
2794
+ )
2795
+ ),
2796
+ z
2797
+ ), k(
2798
+ p(
2799
+ E,
2800
+ W((w) => w !== null),
2801
+ b((w) => w.length)
2802
+ ),
2803
+ u
2804
+ ), k(
2805
+ p(
2806
+ te(L, M, z, j),
2807
+ W(([w, F, { items: Z }]) => Z.length > 0 && F.height !== 0 && w.height !== 0),
2808
+ b(([w, F, { items: Z }, re]) => {
2809
+ const { bottom: Q, top: Oe } = vo(w, re, F, Z);
2810
+ return [Oe, Q];
2811
+ }),
2812
+ $(et)
2813
+ ),
2814
+ t
2815
+ );
2816
+ const Ie = x(!1);
2817
+ k(
2818
+ p(
2819
+ a,
2820
+ D(Ie),
2821
+ b(([w, F]) => F || w !== 0)
2822
+ ),
2823
+ Ie
2824
+ );
2825
+ const qe = fe(
2826
+ p(
2827
+ te(z, u),
2828
+ W(([{ items: w }]) => w.length > 0),
2829
+ D(Ie),
2830
+ W(([[w, F], Z]) => {
2831
+ const re = w.items[w.items.length - 1].index === F - 1;
2832
+ return (Z || w.bottom > 0 && w.itemHeight > 0 && w.offsetBottom === 0 && w.items.length === F) && re;
2833
+ }),
2834
+ b(([[, w]]) => w - 1),
2835
+ $()
2836
+ )
2837
+ ), Fe = fe(
2838
+ p(
2839
+ O(z),
2840
+ W(({ items: w }) => w.length > 0 && w[0].index === 0),
2841
+ we(0),
2842
+ $()
2843
+ )
2844
+ ), Se = fe(
2845
+ p(
2846
+ O(z),
2847
+ D(pe),
2848
+ W(([{ items: w }, F]) => w.length > 0 && !F),
2849
+ b(([{ items: w }]) => ({
2850
+ endIndex: w[w.length - 1].index,
2851
+ startIndex: w[0].index
2852
+ })),
2853
+ $(Ro),
2854
+ be(0)
2855
+ )
2856
+ );
2857
+ k(Se, I.scrollSeekRangeChanged), k(
2858
+ p(
2859
+ P,
2860
+ D(L, M, u, j),
2861
+ b(([w, F, Z, re, Q]) => {
2862
+ const Oe = Mo(w), { align: Ke, behavior: Ge, offset: lt } = Oe;
2863
+ let ze = Oe.index;
2864
+ ze === "LAST" && (ze = re - 1), ze = Xe(0, ze, Rt(re - 1, ze));
2865
+ let Re = Ot(F, Q, Z, ze);
2866
+ return Ke === "end" ? Re = go(Re - F.height + Z.height) : Ke === "center" && (Re = go(Re - F.height / 2 + Z.height / 2)), lt && (Re += lt), { behavior: Ge, top: Re };
2867
+ })
2868
+ ),
2869
+ c
2870
+ );
2871
+ const ye = le(
2872
+ p(
2873
+ z,
2874
+ b((w) => w.offsetBottom + w.bottom)
2875
+ ),
2876
+ 0
2877
+ );
2878
+ return k(
2879
+ p(
2880
+ R,
2881
+ b((w) => ({ height: w.visibleHeight, width: w.visibleWidth }))
2882
+ ),
2883
+ L
2884
+ ), {
2885
+ customScrollParent: v,
2886
+ // input
2887
+ data: E,
2888
+ deviation: Y,
2889
+ footerHeight: r,
2890
+ gap: j,
2891
+ headerHeight: i,
2892
+ increaseViewportBy: e,
2893
+ initialItemCount: S,
2894
+ itemDimensions: M,
2895
+ overscan: o,
2896
+ restoreStateFrom: he,
2897
+ scrollBy: l,
2898
+ scrollContainerState: s,
2899
+ scrollHeight: N,
2900
+ scrollTo: c,
2901
+ scrollToIndex: P,
2902
+ scrollTop: a,
2903
+ smoothScrollTargetReached: m,
2904
+ totalCount: u,
2905
+ useWindowScroll: h,
2906
+ viewportDimensions: L,
2907
+ windowScrollContainerState: d,
2908
+ windowScrollTo: C,
2909
+ windowViewportRect: R,
2910
+ ...I,
2911
+ // output
2912
+ gridState: z,
2913
+ horizontalDirection: Me,
2914
+ initialTopMostItemIndex: ve,
2915
+ totalListHeight: ye,
2916
+ ...g,
2917
+ endReached: qe,
2918
+ propsReady: y,
2919
+ rangeChanged: Se,
2920
+ startReached: Fe,
2921
+ stateChanged: ne,
2922
+ stateRestoreInProgress: pe,
2923
+ ...f
2924
+ };
2925
+ },
2926
+ X(Nt, ce, it, Do, Le, _t, ke)
2927
+ );
2928
+ function Xo(e, t, o) {
2929
+ return Xe(1, vt((e + o) / (vt(t) + o)));
2930
+ }
2931
+ function vo(e, t, o, n) {
2932
+ const { height: r } = o;
2933
+ if (r === void 0 || n.length === 0)
2934
+ return { bottom: 0, top: 0 };
2935
+ const i = Ot(e, t, o, n[0].index);
2936
+ return { bottom: Ot(e, t, o, n[n.length - 1].index) + r, top: i };
2937
+ }
2938
+ function Ot(e, t, o, n) {
2939
+ const r = Xo(e.width, o.width, t.column), i = vt(n / r), l = i * o.height + Xe(0, i - 1) * t.row;
2940
+ return l > 0 ? l + t.row : l;
2941
+ }
2942
+ const pr = /* @__PURE__ */ _(() => {
2943
+ const e = x((T) => `Item ${T}`), t = x({}), o = x(null), n = x("virtuoso-grid-item"), r = x("virtuoso-grid-list"), i = x(jt), l = x("div"), s = x(je), c = (T, g = null) => le(
2944
+ p(
2945
+ t,
2946
+ b((I) => I[T]),
2947
+ $()
2948
+ ),
2949
+ g
2950
+ ), a = x(!1), m = x(!1);
2951
+ return k(O(m), a), {
2952
+ components: t,
2953
+ computeItemKey: i,
2954
+ context: o,
2955
+ FooterComponent: c("Footer"),
2956
+ HeaderComponent: c("Header"),
2957
+ headerFooterTag: l,
2958
+ itemClassName: n,
2959
+ ItemComponent: c("Item", "div"),
2960
+ itemContent: e,
2961
+ listClassName: r,
2962
+ ListComponent: c("List", "div"),
2963
+ readyStateChanged: a,
2964
+ reportReadyState: m,
2965
+ ScrollerComponent: c("Scroller", "div"),
2966
+ scrollerRef: s,
2967
+ ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
2968
+ };
2969
+ }), vr = /* @__PURE__ */ _(
2970
+ ([e, t]) => ({ ...e, ...t }),
2971
+ X(gr, pr)
2972
+ ), Ir = /* @__PURE__ */ B.memo(function() {
2973
+ const e = J("gridState"), t = J("listClassName"), o = J("itemClassName"), n = J("itemContent"), r = J("computeItemKey"), i = J("isSeeking"), l = ge("scrollHeight"), s = J("ItemComponent"), c = J("ListComponent"), a = J("ScrollSeekPlaceholder"), m = J("context"), T = ge("itemDimensions"), g = ge("gap"), I = J("log"), H = J("stateRestoreInProgress"), y = ge("reportReadyState"), v = Ve(
2974
+ B.useMemo(
2975
+ () => (h) => {
2976
+ const d = h.parentElement.parentElement.scrollHeight;
2977
+ l(d);
2978
+ const C = h.firstChild;
2979
+ if (C) {
2980
+ const { height: R, width: f } = C.getBoundingClientRect();
2981
+ T({ height: R, width: f });
2982
+ }
2983
+ g({
2984
+ column: Io("column-gap", getComputedStyle(h).columnGap, I),
2985
+ row: Io("row-gap", getComputedStyle(h).rowGap, I)
2986
+ });
2987
+ },
2988
+ [l, T, g, I]
2989
+ ),
2990
+ !0,
2991
+ !1
2992
+ );
2993
+ return jo(() => {
2994
+ e.itemHeight > 0 && e.itemWidth > 0 && y(!0);
2995
+ }, [e]), H ? null : /* @__PURE__ */ U(
2996
+ c,
2997
+ {
2998
+ className: t,
2999
+ ref: v,
3000
+ ...ie(c, m),
3001
+ "data-testid": "virtuoso-item-list",
3002
+ style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3003
+ children: e.items.map((h) => {
3004
+ const d = r(h.index, h.data, m);
3005
+ return i ? /* @__PURE__ */ U(
3006
+ a,
3007
+ {
3008
+ ...ie(a, m),
3009
+ height: e.itemHeight,
3010
+ index: h.index,
3011
+ width: e.itemWidth
3012
+ },
3013
+ d
3014
+ ) : /* @__PURE__ */ dt(
3015
+ s,
3016
+ {
3017
+ ...ie(s, m),
3018
+ className: o,
3019
+ "data-index": h.index,
3020
+ key: d
3021
+ },
3022
+ n(h.index, h.data, m)
3023
+ );
3024
+ })
3025
+ }
3026
+ );
3027
+ }), Tr = B.memo(function() {
3028
+ const e = J("HeaderComponent"), t = ge("headerHeight"), o = J("headerFooterTag"), n = Ve(
3029
+ B.useMemo(
3030
+ () => (i) => {
3031
+ t(Be(i, "height"));
3032
+ },
3033
+ [t]
3034
+ ),
3035
+ !0,
3036
+ !1
3037
+ ), r = J("context");
3038
+ return e ? /* @__PURE__ */ U(o, { ref: n, children: /* @__PURE__ */ U(e, { ...ie(e, r) }) }) : null;
3039
+ }), xr = B.memo(function() {
3040
+ const e = J("FooterComponent"), t = ge("footerHeight"), o = J("headerFooterTag"), n = Ve(
3041
+ B.useMemo(
3042
+ () => (i) => {
3043
+ t(Be(i, "height"));
3044
+ },
3045
+ [t]
3046
+ ),
3047
+ !0,
3048
+ !1
3049
+ ), r = J("context");
3050
+ return e ? /* @__PURE__ */ U(o, { ref: n, children: /* @__PURE__ */ U(e, { ...ie(e, r) }) }) : null;
3051
+ }), Sr = ({ children: e }) => {
3052
+ const t = B.useContext(Uo), o = ge("itemDimensions"), n = ge("viewportDimensions"), r = Ve(
3053
+ B.useMemo(
3054
+ () => (i) => {
3055
+ n(i.getBoundingClientRect());
3056
+ },
3057
+ [n]
3058
+ ),
3059
+ !0,
3060
+ !1
3061
+ );
3062
+ return B.useEffect(() => {
3063
+ t && (n({ height: t.viewportHeight, width: t.viewportWidth }), o({ height: t.itemHeight, width: t.itemWidth }));
3064
+ }, [t, n, o]), /* @__PURE__ */ U("div", { ref: r, style: wt(!1), children: e });
3065
+ }, wr = ({ children: e }) => {
3066
+ const t = B.useContext(Uo), o = ge("windowViewportRect"), n = ge("itemDimensions"), r = J("customScrollParent"), i = wo(o, r, !1);
3067
+ return B.useEffect(() => {
3068
+ t && (n({ height: t.itemHeight, width: t.itemWidth }), o({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
3069
+ }, [t, o, n]), /* @__PURE__ */ U("div", { ref: i, style: wt(!1), children: e });
3070
+ }, Cr = /* @__PURE__ */ B.memo(function({ ...e }) {
3071
+ const t = J("useWindowScroll"), o = J("customScrollParent"), n = o || t ? yr : Hr, r = o || t ? wr : Sr, i = J("context");
3072
+ return /* @__PURE__ */ U(n, { ...e, ...ie(n, i), children: /* @__PURE__ */ Ze(r, { children: [
3073
+ /* @__PURE__ */ U(Tr, {}),
3074
+ /* @__PURE__ */ U(Ir, {}),
3075
+ /* @__PURE__ */ U(xr, {})
3076
+ ] }) });
3077
+ }), {
3078
+ useEmitter: Zo,
3079
+ useEmitterValue: J,
3080
+ usePublisher: ge
3081
+ } = /* @__PURE__ */ No(
3082
+ vr,
3083
+ {
3084
+ optional: {
3085
+ context: "context",
3086
+ totalCount: "totalCount",
3087
+ overscan: "overscan",
3088
+ itemContent: "itemContent",
3089
+ components: "components",
3090
+ computeItemKey: "computeItemKey",
3091
+ data: "data",
3092
+ initialItemCount: "initialItemCount",
3093
+ scrollSeekConfiguration: "scrollSeekConfiguration",
3094
+ headerFooterTag: "headerFooterTag",
3095
+ listClassName: "listClassName",
3096
+ itemClassName: "itemClassName",
3097
+ useWindowScroll: "useWindowScroll",
3098
+ customScrollParent: "customScrollParent",
3099
+ scrollerRef: "scrollerRef",
3100
+ logLevel: "logLevel",
3101
+ restoreStateFrom: "restoreStateFrom",
3102
+ initialTopMostItemIndex: "initialTopMostItemIndex",
3103
+ increaseViewportBy: "increaseViewportBy"
3104
+ },
3105
+ methods: {
3106
+ scrollTo: "scrollTo",
3107
+ scrollBy: "scrollBy",
3108
+ scrollToIndex: "scrollToIndex"
3109
+ },
3110
+ events: {
3111
+ isScrolling: "isScrolling",
3112
+ endReached: "endReached",
3113
+ startReached: "startReached",
3114
+ rangeChanged: "rangeChanged",
3115
+ atBottomStateChange: "atBottomStateChange",
3116
+ atTopStateChange: "atTopStateChange",
3117
+ stateChanged: "stateChanged",
3118
+ readyStateChanged: "readyStateChanged"
3119
+ }
3120
+ },
3121
+ Cr
3122
+ ), Hr = /* @__PURE__ */ Yo({ useEmitter: Zo, useEmitterValue: J, usePublisher: ge }), yr = /* @__PURE__ */ $o({ useEmitter: Zo, useEmitterValue: J, usePublisher: ge });
3123
+ function Io(e, t, o) {
3124
+ return t !== "normal" && !(t != null && t.endsWith("px")) && o(`${e} was not resolved to pixel value correctly`, t, ue.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3125
+ }
3126
+ export {
3127
+ ue as LogLevel,
3128
+ Br as Virtuoso,
3129
+ Uo as VirtuosoGridMockContext,
3130
+ _o as VirtuosoMockContext
3131
+ };
3132
+ //# sourceMappingURL=index.js.map