@sanity/ui 4.0.0-beta.8 → 4.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +21 -7
  3. package/dist/_chunks/getScopedTheme.cjs +4043 -0
  4. package/dist/_chunks/getScopedTheme.cjs.map +1 -0
  5. package/dist/_chunks/getScopedTheme.js +3803 -0
  6. package/dist/_chunks/getScopedTheme.js.map +1 -0
  7. package/dist/_chunks/portalProvider.cjs +3750 -0
  8. package/dist/_chunks/portalProvider.cjs.map +1 -0
  9. package/dist/_chunks/portalProvider.d.cts +1067 -0
  10. package/dist/_chunks/portalProvider.d.cts.map +1 -0
  11. package/dist/_chunks/portalProvider.d.ts +1067 -0
  12. package/dist/_chunks/portalProvider.d.ts.map +1 -0
  13. package/dist/_chunks/portalProvider.js +3300 -0
  14. package/dist/_chunks/portalProvider.js.map +1 -0
  15. package/dist/_chunks/refractor.cjs +18 -0
  16. package/dist/_chunks/refractor.cjs.map +1 -0
  17. package/dist/_chunks/refractor.js +20 -0
  18. package/dist/_chunks/refractor.js.map +1 -0
  19. package/dist/_chunks/rgba.d.cts +929 -0
  20. package/dist/_chunks/rgba.d.cts.map +1 -0
  21. package/dist/_chunks/rgba.d.ts +929 -0
  22. package/dist/_chunks/rgba.d.ts.map +1 -0
  23. package/dist/_visual-editing.cjs +4 -0
  24. package/dist/_visual-editing.d.cts +2 -0
  25. package/dist/_visual-editing.d.ts +2 -0
  26. package/dist/_visual-editing.js +3 -0
  27. package/dist/index.cjs +3007 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +1275 -0
  30. package/dist/index.d.cts.map +1 -0
  31. package/dist/index.d.ts +708 -1188
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2964 -4783
  34. package/dist/index.js.map +1 -1
  35. package/dist/theme.cjs +54 -0
  36. package/dist/theme.cjs.map +1 -0
  37. package/dist/theme.d.cts +278 -0
  38. package/dist/theme.d.cts.map +1 -0
  39. package/dist/theme.d.ts +278 -0
  40. package/dist/theme.d.ts.map +1 -0
  41. package/dist/theme.js +53 -0
  42. package/dist/theme.js.map +1 -0
  43. package/package.json +65 -88
  44. package/dist/_chunks-es/Syntax.js +0 -23
  45. package/dist/_chunks-es/Syntax.js.map +0 -1
  46. package/dist/index.css +0 -1
  47. package/exports/index.css +0 -1
  48. package/exports/index.ts +0 -125
  49. package/src/components/autocomplete/Autocomplete.tsx +0 -665
  50. package/src/components/autocomplete/AutocompleteOption.tsx +0 -42
  51. package/src/components/autocomplete/__workshop__/Async.tsx +0 -162
  52. package/src/components/autocomplete/__workshop__/ConstrainedHeight.tsx +0 -121
  53. package/src/components/autocomplete/__workshop__/Custom.tsx +0 -91
  54. package/src/components/autocomplete/__workshop__/Example.tsx +0 -70
  55. package/src/components/autocomplete/__workshop__/FocusAndBlur.tsx +0 -39
  56. package/src/components/autocomplete/__workshop__/Fullscreen.tsx +0 -307
  57. package/src/components/autocomplete/__workshop__/index.ts +0 -41
  58. package/src/components/autocomplete/__workshop__/mock/apiStore.ts +0 -49
  59. package/src/components/autocomplete/__workshop__/mock/countries.ts +0 -245
  60. package/src/components/autocomplete/__workshop__/types.ts +0 -4
  61. package/src/components/autocomplete/autocompleteReducer.ts +0 -47
  62. package/src/components/autocomplete/constants.ts +0 -28
  63. package/src/components/autocomplete/types.ts +0 -103
  64. package/src/components/breadcrumbs/Breadcrumbs.tsx +0 -163
  65. package/src/components/breadcrumbs/__workshop__/Example.tsx +0 -48
  66. package/src/components/breadcrumbs/__workshop__/index.ts +0 -16
  67. package/src/components/dialog/Dialog.tsx +0 -230
  68. package/src/components/dialog/DialogCard.tsx +0 -233
  69. package/src/components/dialog/DialogContext.ts +0 -21
  70. package/src/components/dialog/DialogProvider.tsx +0 -34
  71. package/src/components/dialog/__workshop__/Activate.tsx +0 -141
  72. package/src/components/dialog/__workshop__/AutoFocus.tsx +0 -29
  73. package/src/components/dialog/__workshop__/Layering.tsx +0 -41
  74. package/src/components/dialog/__workshop__/Nested.tsx +0 -71
  75. package/src/components/dialog/__workshop__/OnScroll.tsx +0 -51
  76. package/src/components/dialog/__workshop__/Panes.tsx +0 -75
  77. package/src/components/dialog/__workshop__/Position.tsx +0 -30
  78. package/src/components/dialog/__workshop__/Props.tsx +0 -93
  79. package/src/components/dialog/__workshop__/Provider.tsx +0 -11
  80. package/src/components/dialog/__workshop__/Wrapped.tsx +0 -76
  81. package/src/components/dialog/__workshop__/index.ts +0 -21
  82. package/src/components/dialog/isTargetWithinScope.ts +0 -14
  83. package/src/components/dialog/types.ts +0 -2
  84. package/src/components/dialog/useDialog.ts +0 -11
  85. package/src/components/hotkeys/Hotkeys.tsx +0 -70
  86. package/src/components/hotkeys/__workshop__/Plain.tsx +0 -9
  87. package/src/components/hotkeys/__workshop__/index.ts +0 -16
  88. package/src/components/menu/Menu.test.tsx +0 -125
  89. package/src/components/menu/Menu.tsx +0 -174
  90. package/src/components/menu/MenuButton.tsx +0 -231
  91. package/src/components/menu/MenuContext.ts +0 -19
  92. package/src/components/menu/MenuDivider.tsx +0 -32
  93. package/src/components/menu/MenuGroup.tsx +0 -240
  94. package/src/components/menu/MenuItem.tsx +0 -153
  95. package/src/components/menu/__workshop__/AsComponent.tsx +0 -45
  96. package/src/components/menu/__workshop__/AvatarMenu.tsx +0 -36
  97. package/src/components/menu/__workshop__/ClosableMenuButton.tsx +0 -47
  98. package/src/components/menu/__workshop__/ConstrainedInBoundary.tsx +0 -133
  99. package/src/components/menu/__workshop__/CustomMenuItem.tsx +0 -47
  100. package/src/components/menu/__workshop__/CustomSelectedState.tsx +0 -35
  101. package/src/components/menu/__workshop__/DataProps.tsx +0 -27
  102. package/src/components/menu/__workshop__/DisableFocusOnClose.tsx +0 -40
  103. package/src/components/menu/__workshop__/Groups.tsx +0 -164
  104. package/src/components/menu/__workshop__/MenuButton.tsx +0 -79
  105. package/src/components/menu/__workshop__/MenuGroupRight.tsx +0 -73
  106. package/src/components/menu/__workshop__/NestedMenu.tsx +0 -22
  107. package/src/components/menu/__workshop__/OnCloseMenuButton.tsx +0 -50
  108. package/src/components/menu/__workshop__/SelectedItem.tsx +0 -69
  109. package/src/components/menu/__workshop__/ShouldFocus.tsx +0 -42
  110. package/src/components/menu/__workshop__/Tones.tsx +0 -19
  111. package/src/components/menu/__workshop__/index.ts +0 -91
  112. package/src/components/menu/helpers.ts +0 -82
  113. package/src/components/menu/useMenu.ts +0 -21
  114. package/src/components/menu/useMenuController.ts +0 -245
  115. package/src/components/tab/Tab.tsx +0 -135
  116. package/src/components/tab/TabList.tsx +0 -157
  117. package/src/components/tab/TabListContext.ts +0 -10
  118. package/src/components/tab/TabPanel.tsx +0 -94
  119. package/src/components/tab/__workshop__/Example.tsx +0 -135
  120. package/src/components/tab/__workshop__/index.ts +0 -16
  121. package/src/components/tab/types.ts +0 -11
  122. package/src/components/toast/Toast.test.tsx +0 -103
  123. package/src/components/toast/Toast.tsx +0 -191
  124. package/src/components/toast/ToastContext.ts +0 -7
  125. package/src/components/toast/ToastLayer.tsx +0 -54
  126. package/src/components/toast/ToastProvider.tsx +0 -127
  127. package/src/components/toast/__workshop__/Hook.tsx +0 -71
  128. package/src/components/toast/__workshop__/Toast.tsx +0 -26
  129. package/src/components/toast/__workshop__/index.ts +0 -21
  130. package/src/components/toast/toastState.ts +0 -6
  131. package/src/components/toast/types.ts +0 -24
  132. package/src/components/toast/useToast.ts +0 -23
  133. package/src/components/tree/Tree.tsx +0 -248
  134. package/src/components/tree/TreeContext.ts +0 -10
  135. package/src/components/tree/TreeGroup.tsx +0 -46
  136. package/src/components/tree/TreeItem.tsx +0 -236
  137. package/src/components/tree/__workshop__/Basic.tsx +0 -108
  138. package/src/components/tree/__workshop__/TabFromElement.tsx +0 -84
  139. package/src/components/tree/__workshop__/basic.perf.ts +0 -19
  140. package/src/components/tree/__workshop__/index.ts +0 -23
  141. package/src/components/tree/helpers.ts +0 -105
  142. package/src/components/tree/types.ts +0 -24
  143. package/src/components/tree/useTree.ts +0 -17
  144. package/src/components/virtualList/VirtualList.tsx +0 -254
  145. package/src/components/virtualList/__workshop__/ChangingProps.tsx +0 -41
  146. package/src/components/virtualList/__workshop__/ElementScroll.tsx +0 -43
  147. package/src/components/virtualList/__workshop__/InfiniteList.tsx +0 -40
  148. package/src/components/virtualList/__workshop__/WindowScrolll.tsx +0 -23
  149. package/src/components/virtualList/__workshop__/index.ts +0 -31
  150. package/src/core/_keys.ts +0 -26
  151. package/src/core/constants.ts +0 -67
  152. package/src/core/getElementRef.ts +0 -29
  153. package/src/core/helpers/animation.ts +0 -26
  154. package/src/core/helpers/element.ts +0 -55
  155. package/src/core/helpers/focus.ts +0 -92
  156. package/src/core/helpers/props.ts +0 -51
  157. package/src/core/helpers/scroll.ts +0 -15
  158. package/src/core/lib/createGlobalScopedContext.ts +0 -39
  159. package/src/core/lib/globalScope.ts +0 -19
  160. package/src/core/lib/isArray.ts +0 -3
  161. package/src/core/lib/isRecord.ts +0 -3
  162. package/src/core/types.ts +0 -57
  163. package/src/hooks/useClickOutsideEvent.test.tsx +0 -114
  164. package/src/hooks/useClickOutsideEvent.ts +0 -66
  165. package/src/hooks/useCustomValidity.ts +0 -13
  166. package/src/hooks/useElementSize.ts +0 -19
  167. package/src/hooks/useGlobalKeyDown.ts +0 -23
  168. package/src/hooks/useMatchMedia.ts +0 -28
  169. package/src/hooks/useMediaIndex/__workshop__/Test.tsx +0 -14
  170. package/src/hooks/useMediaIndex/__workshop__/index.ts +0 -16
  171. package/src/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -21
  172. package/src/hooks/useMediaIndex/useMediaIndex.ts +0 -111
  173. package/src/hooks/useMounted.ts +0 -15
  174. package/src/hooks/usePrefersDark.hydration.test.tsx +0 -56
  175. package/src/hooks/usePrefersDark.test.tsx +0 -20
  176. package/src/hooks/usePrefersDark.ts +0 -16
  177. package/src/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
  178. package/src/hooks/usePrefersReducedMotion.test.tsx +0 -20
  179. package/src/hooks/usePrefersReducedMotion.ts +0 -16
  180. package/src/hooks/useResponsiveProp.ts +0 -14
  181. package/src/hooks/useUnique.ts +0 -54
  182. package/src/middleware/origin.ts +0 -47
  183. package/src/observers/elementSize.ts +0 -114
  184. package/src/primitives/_syntax/LazySyntax.tsx +0 -4
  185. package/src/primitives/_syntax/Syntax.tsx +0 -26
  186. package/src/primitives/avatar/Avatar.tsx +0 -145
  187. package/src/primitives/avatar/AvatarCounter.tsx +0 -69
  188. package/src/primitives/avatar/AvatarStack.tsx +0 -77
  189. package/src/primitives/avatar/__workshop__/AsButton.tsx +0 -12
  190. package/src/primitives/avatar/__workshop__/PropsStory.tsx +0 -24
  191. package/src/primitives/avatar/__workshop__/Stack.tsx +0 -27
  192. package/src/primitives/avatar/__workshop__/WithinButton.tsx +0 -51
  193. package/src/primitives/avatar/__workshop__/WithinMenuItem.tsx +0 -52
  194. package/src/primitives/avatar/__workshop__/index.ts +0 -36
  195. package/src/primitives/avatar/types.ts +0 -2
  196. package/src/primitives/badge/Badge.test.tsx +0 -16
  197. package/src/primitives/badge/Badge.tsx +0 -53
  198. package/src/primitives/badge/__workshop__/Props.tsx +0 -27
  199. package/src/primitives/badge/__workshop__/Tones.tsx +0 -15
  200. package/src/primitives/badge/__workshop__/index.ts +0 -26
  201. package/src/primitives/badge/__workshop__/within-button.tsx +0 -36
  202. package/src/primitives/box/Box.tsx +0 -73
  203. package/src/primitives/box/__workshop__/Props.tsx +0 -26
  204. package/src/primitives/box/__workshop__/Responsive.tsx +0 -19
  205. package/src/primitives/box/__workshop__/index.ts +0 -21
  206. package/src/primitives/button/Button.test.tsx +0 -30
  207. package/src/primitives/button/Button.tsx +0 -148
  208. package/src/primitives/button/__workshop__/Custom.tsx +0 -39
  209. package/src/primitives/button/__workshop__/CustomIcons.tsx +0 -37
  210. package/src/primitives/button/__workshop__/DataProps.tsx +0 -18
  211. package/src/primitives/button/__workshop__/Disabled.tsx +0 -43
  212. package/src/primitives/button/__workshop__/MixedChildren.tsx +0 -12
  213. package/src/primitives/button/__workshop__/Props.tsx +0 -60
  214. package/src/primitives/button/__workshop__/Stacked.tsx +0 -60
  215. package/src/primitives/button/__workshop__/Styled1.css.ts +0 -7
  216. package/src/primitives/button/__workshop__/Styled1.tsx +0 -11
  217. package/src/primitives/button/__workshop__/TextOverflow.tsx +0 -17
  218. package/src/primitives/button/__workshop__/UploadButton.tsx +0 -28
  219. package/src/primitives/button/__workshop__/index.ts +0 -61
  220. package/src/primitives/button/types.ts +0 -2
  221. package/src/primitives/card/Card.tsx +0 -124
  222. package/src/primitives/card/CardContext.ts +0 -10
  223. package/src/primitives/card/CardInternalContext.ts +0 -10
  224. package/src/primitives/card/CardInternalProvider.tsx +0 -15
  225. package/src/primitives/card/CardProvider.tsx +0 -16
  226. package/src/primitives/card/__workshop__/AsButton.tsx +0 -103
  227. package/src/primitives/card/__workshop__/AsComponent.tsx +0 -25
  228. package/src/primitives/card/__workshop__/Checkered.tsx +0 -25
  229. package/src/primitives/card/__workshop__/DataProps.tsx +0 -25
  230. package/src/primitives/card/__workshop__/Interactive.tsx +0 -29
  231. package/src/primitives/card/__workshop__/ListNavigation.tsx +0 -78
  232. package/src/primitives/card/__workshop__/Props.tsx +0 -59
  233. package/src/primitives/card/__workshop__/Selected.tsx +0 -62
  234. package/src/primitives/card/__workshop__/Styled.tsx +0 -11
  235. package/src/primitives/card/__workshop__/Tones.tsx +0 -26
  236. package/src/primitives/card/__workshop__/index.ts +0 -21
  237. package/src/primitives/card/types.ts +0 -21
  238. package/src/primitives/card/useCard.ts +0 -20
  239. package/src/primitives/checkbox/Checkbox.tsx +0 -80
  240. package/src/primitives/checkbox/__workshop__/Example.tsx +0 -25
  241. package/src/primitives/checkbox/__workshop__/Props.tsx +0 -35
  242. package/src/primitives/checkbox/__workshop__/ReadOnly.tsx +0 -16
  243. package/src/primitives/checkbox/__workshop__/Tones.tsx +0 -26
  244. package/src/primitives/checkbox/__workshop__/index.ts +0 -15
  245. package/src/primitives/code/Code.tsx +0 -47
  246. package/src/primitives/code/__workshop__/OpticalAlignment.tsx +0 -25
  247. package/src/primitives/code/__workshop__/Props.tsx +0 -20
  248. package/src/primitives/code/__workshop__/index.ts +0 -21
  249. package/src/primitives/container/Container.tsx +0 -43
  250. package/src/primitives/container/__workshop__/Example.tsx +0 -16
  251. package/src/primitives/container/__workshop__/index.ts +0 -16
  252. package/src/primitives/container/types.ts +0 -6
  253. package/src/primitives/flex/Flex.tsx +0 -38
  254. package/src/primitives/flex/__workshop__/Example.tsx +0 -26
  255. package/src/primitives/flex/__workshop__/Gap.tsx +0 -25
  256. package/src/primitives/flex/__workshop__/index.ts +0 -13
  257. package/src/primitives/flex/__workshop__/styles.css.ts +0 -12
  258. package/src/primitives/grid/Grid.tsx +0 -38
  259. package/src/primitives/grid/__workshop__/Responsive.tsx +0 -54
  260. package/src/primitives/grid/__workshop__/index.ts +0 -12
  261. package/src/primitives/heading/Heading.tsx +0 -68
  262. package/src/primitives/heading/__workshop__/OpticalAlignment.tsx +0 -27
  263. package/src/primitives/heading/__workshop__/Plain.tsx +0 -25
  264. package/src/primitives/heading/__workshop__/index.ts +0 -21
  265. package/src/primitives/inline/Inline.tsx +0 -37
  266. package/src/primitives/inline/__workshop__/Plain.tsx +0 -22
  267. package/src/primitives/inline/__workshop__/index.ts +0 -10
  268. package/src/primitives/kbd/Kbd.tsx +0 -36
  269. package/src/primitives/kbd/__workshop__/Plain.tsx +0 -9
  270. package/src/primitives/kbd/__workshop__/index.ts +0 -10
  271. package/src/primitives/label/Label.tsx +0 -67
  272. package/src/primitives/label/__workshop__/OpticalAlignment.tsx +0 -27
  273. package/src/primitives/label/__workshop__/Plain.tsx +0 -27
  274. package/src/primitives/label/__workshop__/index.ts +0 -21
  275. package/src/primitives/layer/Layer.test.tsx +0 -110
  276. package/src/primitives/layer/Layer.tsx +0 -35
  277. package/src/primitives/layer/LayerCard.tsx +0 -90
  278. package/src/primitives/layer/LayerContext.ts +0 -7
  279. package/src/primitives/layer/LayerProvider.tsx +0 -106
  280. package/src/primitives/layer/__workshop__/MultipleRoots.tsx +0 -49
  281. package/src/primitives/layer/__workshop__/Nested.tsx +0 -107
  282. package/src/primitives/layer/__workshop__/ResponsiveZOffset.tsx +0 -17
  283. package/src/primitives/layer/__workshop__/_debug.tsx +0 -17
  284. package/src/primitives/layer/__workshop__/index.ts +0 -26
  285. package/src/primitives/layer/getLayerContext.test.ts +0 -32
  286. package/src/primitives/layer/getLayerContext.ts +0 -21
  287. package/src/primitives/layer/types.ts +0 -9
  288. package/src/primitives/layer/useLayer.ts +0 -24
  289. package/src/primitives/popover/Popover.tsx +0 -291
  290. package/src/primitives/popover/PopoverLayer.tsx +0 -101
  291. package/src/primitives/popover/__workshop__/AlignedStory.tsx +0 -75
  292. package/src/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
  293. package/src/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  294. package/src/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  295. package/src/primitives/popover/__workshop__/PlainStory.tsx +0 -67
  296. package/src/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
  297. package/src/primitives/popover/__workshop__/SidePanelStory.tsx +0 -95
  298. package/src/primitives/popover/__workshop__/TestStory.tsx +0 -97
  299. package/src/primitives/popover/__workshop__/index.ts +0 -56
  300. package/src/primitives/popover/__workshop__/portal-inheritance.tsx +0 -15
  301. package/src/primitives/popover/constants.ts +0 -20
  302. package/src/primitives/popover/floating-ui/size.ts +0 -75
  303. package/src/primitives/popover/types.ts +0 -12
  304. package/src/primitives/popover/useMiddleware.ts +0 -126
  305. package/src/primitives/radio/Radio.tsx +0 -64
  306. package/src/primitives/radio/__workshop__/Example.tsx +0 -63
  307. package/src/primitives/radio/__workshop__/Plain.tsx +0 -28
  308. package/src/primitives/radio/__workshop__/index.ts +0 -13
  309. package/src/primitives/select/Select.tsx +0 -76
  310. package/src/primitives/select/__workshop__/Plain.tsx +0 -37
  311. package/src/primitives/select/__workshop__/ReadOnly.tsx +0 -23
  312. package/src/primitives/select/__workshop__/index.ts +0 -13
  313. package/src/primitives/selectable/Selectable.tsx +0 -48
  314. package/src/primitives/selectable/__workshop__/DataProps.tsx +0 -24
  315. package/src/primitives/selectable/__workshop__/as-link.tsx +0 -13
  316. package/src/primitives/selectable/__workshop__/index.ts +0 -19
  317. package/src/primitives/skeleton/CodeSkeleton.tsx +0 -49
  318. package/src/primitives/skeleton/HeadingSkeleton.tsx +0 -48
  319. package/src/primitives/skeleton/LabelSkeleton.tsx +0 -47
  320. package/src/primitives/skeleton/Skeleton.tsx +0 -70
  321. package/src/primitives/skeleton/TextSkeleton.tsx +0 -49
  322. package/src/primitives/skeleton/__workshop__/Delay.tsx +0 -69
  323. package/src/primitives/skeleton/__workshop__/Skeleton.tsx +0 -63
  324. package/src/primitives/skeleton/__workshop__/index.ts +0 -13
  325. package/src/primitives/spinner/Spinner.tsx +0 -45
  326. package/src/primitives/spinner/SpinnerAnimatedIcon.tsx +0 -14
  327. package/src/primitives/spinner/__workshop__/Props.tsx +0 -13
  328. package/src/primitives/spinner/__workshop__/index.ts +0 -16
  329. package/src/primitives/srOnly/SrOnly.tsx +0 -33
  330. package/src/primitives/stack/Stack.tsx +0 -38
  331. package/src/primitives/stack/__workshop__/Plain.tsx +0 -30
  332. package/src/primitives/stack/__workshop__/index.ts +0 -16
  333. package/src/primitives/switch/Switch.tsx +0 -76
  334. package/src/primitives/switch/__workshop__/Example.tsx +0 -25
  335. package/src/primitives/switch/__workshop__/Props.tsx +0 -23
  336. package/src/primitives/switch/__workshop__/index.ts +0 -13
  337. package/src/primitives/text/InlineCode.tsx +0 -25
  338. package/src/primitives/text/Text.tsx +0 -68
  339. package/src/primitives/text/__workshop__/Example.tsx +0 -26
  340. package/src/primitives/text/__workshop__/OpticalAlignment.tsx +0 -27
  341. package/src/primitives/text/__workshop__/index.ts +0 -26
  342. package/src/primitives/text/__workshop__/inline-code.tsx +0 -13
  343. package/src/primitives/textArea/TextArea.tsx +0 -97
  344. package/src/primitives/textArea/__workshop__/Plain.tsx +0 -46
  345. package/src/primitives/textArea/__workshop__/index.ts +0 -16
  346. package/src/primitives/textInput/TextInput.tsx +0 -279
  347. package/src/primitives/textInput/__workshop__/ClearButton.tsx +0 -32
  348. package/src/primitives/textInput/__workshop__/CustomValidity.tsx +0 -17
  349. package/src/primitives/textInput/__workshop__/Plain.tsx +0 -102
  350. package/src/primitives/textInput/__workshop__/ReadOnly.tsx +0 -14
  351. package/src/primitives/textInput/__workshop__/States.tsx +0 -53
  352. package/src/primitives/textInput/__workshop__/Tones.tsx +0 -40
  353. package/src/primitives/textInput/__workshop__/Typed.tsx +0 -23
  354. package/src/primitives/textInput/__workshop__/index.ts +0 -46
  355. package/src/primitives/tooltip/Tooltip.test.tsx +0 -496
  356. package/src/primitives/tooltip/Tooltip.tsx +0 -546
  357. package/src/primitives/tooltip/TooltipLayer.tsx +0 -72
  358. package/src/primitives/tooltip/__workshop__/CustomPortal.tsx +0 -102
  359. package/src/primitives/tooltip/__workshop__/OverflowingBoundary.tsx +0 -74
  360. package/src/primitives/tooltip/__workshop__/Props.tsx +0 -107
  361. package/src/primitives/tooltip/__workshop__/ResizableBoundary.tsx +0 -91
  362. package/src/primitives/tooltip/__workshop__/index.ts +0 -31
  363. package/src/primitives/tooltip/constants.ts +0 -24
  364. package/src/primitives/tooltip/tooltipDelayGroup/TooltipDelayGroupContext.tsx +0 -13
  365. package/src/primitives/tooltip/tooltipDelayGroup/TooltipDelayGroupProvider.tsx +0 -96
  366. package/src/primitives/tooltip/tooltipDelayGroup/types.ts +0 -7
  367. package/src/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
  368. package/src/root/Root.tsx +0 -93
  369. package/src/root/RootProvider.tsx +0 -37
  370. package/src/root/__workshop__/Boundary.tsx +0 -43
  371. package/src/root/__workshop__/index.ts +0 -24
  372. package/src/root/__workshop__/primitives.tsx +0 -49
  373. package/src/root/__workshop__/tone-inheritance.tsx +0 -65
  374. package/src/utils/ErrorBoundary.tsx +0 -50
  375. package/src/utils/boundaryElement/BoundaryElementContext.ts +0 -7
  376. package/src/utils/boundaryElement/BoundaryElementProvider.tsx +0 -16
  377. package/src/utils/boundaryElement/__workshop__/Plain.tsx +0 -49
  378. package/src/utils/boundaryElement/__workshop__/index.ts +0 -16
  379. package/src/utils/boundaryElement/types.ts +0 -2
  380. package/src/utils/boundaryElement/useBoundaryElement.ts +0 -12
  381. package/src/utils/elementQuery/ElementQuery.tsx +0 -75
  382. package/src/utils/elementQuery/__workshop__/CustomMedia.tsx +0 -19
  383. package/src/utils/elementQuery/__workshop__/index.ts +0 -16
  384. package/src/utils/elementQuery/__workshop__/styles.css.ts +0 -31
  385. package/src/utils/elementQuery/helpers.ts +0 -27
  386. package/src/utils/portal/Portal.test.tsx +0 -105
  387. package/src/utils/portal/Portal.tsx +0 -42
  388. package/src/utils/portal/PortalContext.ts +0 -37
  389. package/src/utils/portal/PortalProvider.tsx +0 -38
  390. package/src/utils/portal/__workshop__/Named.tsx +0 -69
  391. package/src/utils/portal/__workshop__/index.ts +0 -16
  392. package/src/utils/portal/types.ts +0 -7
  393. package/src/utils/portal/usePortal.ts +0 -30
@@ -0,0 +1,3750 @@
1
+ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __copyProps = (to, from, except, desc) => {
2
+ if (from && typeof from == "object" || typeof from == "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) key = keys[i], !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
3
+ get: ((k) => from[k]).bind(null, key),
4
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
5
+ });
6
+ return to;
7
+ }, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
8
+ value: mod,
9
+ enumerable: !0
10
+ }) : target, mod));
11
+ const require_getScopedTheme = require("./getScopedTheme.cjs");
12
+ let react_compiler_runtime = require("react-compiler-runtime"), react = require("react");
13
+ react = __toESM(react, 1);
14
+ let styled_components = require("styled-components"), react_jsx_runtime = require("react/jsx-runtime"), react_is = require("react-is"), _sanity_icons_Spinner = require("@sanity/icons/Spinner"), _floating_ui_react_dom = require("@floating-ui/react-dom"), motion_react = require("motion/react"), _juggle_resize_observer = require("@juggle/resize-observer"), react_dom = require("react-dom"), _sanity_icons_Close = require("@sanity/icons/Close"), use_effect_event = require("use-effect-event"), _sanity_icons_ChevronRight = require("@sanity/icons/ChevronRight");
15
+ /**
16
+ * @public
17
+ * @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
18
+ */
19
+ const createColorTheme = require_getScopedTheme.a, hexToRgb = require_getScopedTheme.d, hslToRgb = require_getScopedTheme.f, multiply = require_getScopedTheme.c, parseColor = require_getScopedTheme.u, rgbToHex = require_getScopedTheme.p, rgbToHsl = require_getScopedTheme.m, rgba = require_getScopedTheme.l, screen = require_getScopedTheme.s, studioTheme = require_getScopedTheme.o(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_DURATION = .2, POPOVER_MOTION_PROPS = {
20
+ card: {
21
+ initial: {
22
+ scale: .97,
23
+ willChange: "transform"
24
+ },
25
+ hidden: { opacity: 0 },
26
+ visible: {
27
+ opacity: 1,
28
+ transition: {
29
+ when: "beforeChildren",
30
+ duration: POPOVER_MOTION_DURATION / 2
31
+ }
32
+ },
33
+ scaleIn: { scale: 1 },
34
+ scaleOut: { scale: .97 }
35
+ },
36
+ children: {
37
+ hidden: { opacity: 0 },
38
+ visible: { opacity: 1 }
39
+ },
40
+ transition: {
41
+ type: "spring",
42
+ visualDuration: POPOVER_MOTION_DURATION,
43
+ bounce: .25
44
+ }
45
+ };
46
+ /**
47
+ * @internal
48
+ */
49
+ function _isEnterToClickElement(element) {
50
+ return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
51
+ }
52
+ /**
53
+ * @internal
54
+ */
55
+ function isHTMLElement(node) {
56
+ return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ function isHTMLAnchorElement(element) {
62
+ return isHTMLElement(element) && element.nodeName === "A";
63
+ }
64
+ /**
65
+ * @internal
66
+ */
67
+ function isHTMLInputElement(element) {
68
+ return isHTMLElement(element) && element.nodeName === "INPUT";
69
+ }
70
+ /**
71
+ * @internal
72
+ */
73
+ function isHTMLButtonElement(element) {
74
+ return isHTMLElement(element) && element.nodeName === "BUTTON";
75
+ }
76
+ /**
77
+ * @internal
78
+ */
79
+ function isHTMLSelectElement(element) {
80
+ return isHTMLElement(element) && element.nodeName === "SELECT";
81
+ }
82
+ /**
83
+ * @internal
84
+ */
85
+ function isHTMLTextAreaElement(element) {
86
+ return isHTMLElement(element) && element.nodeName === "TEXTAREA";
87
+ }
88
+ /**
89
+ * @internal
90
+ */
91
+ function containsOrEqualsElement(element, node) {
92
+ return element.contains(node) || element === node;
93
+ }
94
+ /**
95
+ * @internal
96
+ */
97
+ function _fillCSSObject(keys, value) {
98
+ return keys.reduce((style, key) => (style[key] = value, style), {});
99
+ }
100
+ /**
101
+ * @public
102
+ */
103
+ function rem(pixelValue) {
104
+ return pixelValue === 0 ? 0 : `${pixelValue / 16}rem`;
105
+ }
106
+ /**
107
+ * @internal
108
+ */
109
+ function _responsive(media, values, callback) {
110
+ return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : { [`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement });
111
+ }
112
+ /**
113
+ * @internal
114
+ */
115
+ function _getArrayProp(val, defaultVal) {
116
+ return val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];
117
+ }
118
+ /**
119
+ * @internal
120
+ */
121
+ function _getResponsiveSpace(theme, props, spaceIndexes = EMPTY_ARRAY) {
122
+ if (!Array.isArray(spaceIndexes)) throw Error("the property must be array of numbers");
123
+ if (spaceIndexes.length === 0) return null;
124
+ let { media, space } = require_getScopedTheme.i(theme);
125
+ return _responsive(media, spaceIndexes, (spaceIndex) => _fillCSSObject(props, rem(space[spaceIndex])));
126
+ }
127
+ const BASE_STYLE$3 = { "&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none" } }, BOX_SIZING = {
128
+ content: "content-box",
129
+ border: "border-box"
130
+ }, BOX_HEIGHT = {
131
+ stretch: "stretch",
132
+ fill: "100%"
133
+ };
134
+ function boxStyle() {
135
+ return BASE_STYLE$3;
136
+ }
137
+ function responsiveBoxStyle() {
138
+ return [
139
+ responsiveBoxSizingStyle,
140
+ responsiveBoxHeightStyle,
141
+ responsiveBoxOverflowStyle,
142
+ responsiveBoxDisplayStyle
143
+ ];
144
+ }
145
+ function responsiveBoxDisplayStyle(props) {
146
+ let { media } = require_getScopedTheme.i(props.theme);
147
+ return _responsive(media, props.$display, (display) => ({ "&:not([hidden])": { display } }));
148
+ }
149
+ function responsiveBoxSizingStyle(props) {
150
+ let { media } = require_getScopedTheme.i(props.theme);
151
+ return _responsive(media, props.$sizing, (sizing) => ({ boxSizing: BOX_SIZING[sizing] }));
152
+ }
153
+ function responsiveBoxHeightStyle(props) {
154
+ let { media } = require_getScopedTheme.i(props.theme);
155
+ return _responsive(media, props.$height, (height) => ({ height: BOX_HEIGHT[height] }));
156
+ }
157
+ function responsiveBoxOverflowStyle(props) {
158
+ let { media } = require_getScopedTheme.i(props.theme);
159
+ return _responsive(media, props.$overflow, (overflow) => ({ overflow }));
160
+ }
161
+ const BASE_STYLE$2 = {
162
+ minWidth: 0,
163
+ minHeight: 0
164
+ };
165
+ function flexItemStyle() {
166
+ return [BASE_STYLE$2, responsiveFlexItemStyle];
167
+ }
168
+ function responsiveFlexItemStyle(props) {
169
+ let { media } = require_getScopedTheme.i(props.theme);
170
+ return props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex: `${flex}` })) : EMPTY_ARRAY;
171
+ }
172
+ function responsiveGridItemStyle() {
173
+ return [
174
+ responsiveGridItemRowStyle,
175
+ responsiveGridItemRowStartStyle,
176
+ responsiveGridItemRowEndStyle,
177
+ responsiveGridItemColumnStyle,
178
+ responsiveGridItemColumnStartStyle,
179
+ responsiveGridItemColumnEndStyle
180
+ ];
181
+ }
182
+ const GRID_ITEM_ROW = {
183
+ auto: "auto",
184
+ full: "1 / -1"
185
+ }, GRID_ITEM_COLUMN = {
186
+ auto: "auto",
187
+ full: "1 / -1"
188
+ };
189
+ function responsiveGridItemRowStyle(props) {
190
+ let { media } = require_getScopedTheme.i(props.theme);
191
+ return _responsive(media, props.$row, (row) => typeof row == "number" ? { gridRow: `span ${row} / span ${row}` } : { gridRow: GRID_ITEM_ROW[row] });
192
+ }
193
+ function responsiveGridItemRowStartStyle(props) {
194
+ let { media } = require_getScopedTheme.i(props.theme);
195
+ return _responsive(media, props.$rowStart, (rowStart) => ({ gridRowStart: `${rowStart}` }));
196
+ }
197
+ function responsiveGridItemRowEndStyle(props) {
198
+ let { media } = require_getScopedTheme.i(props.theme);
199
+ return _responsive(media, props.$rowEnd, (rowEnd) => ({ gridRowEnd: `${rowEnd}` }));
200
+ }
201
+ function responsiveGridItemColumnStyle(props) {
202
+ let { media } = require_getScopedTheme.i(props.theme);
203
+ return _responsive(media, props.$column, (column) => typeof column == "number" ? { gridColumn: `span ${column} / span ${column}` } : { gridColumn: GRID_ITEM_COLUMN[column] });
204
+ }
205
+ function responsiveGridItemColumnStartStyle(props) {
206
+ let { media } = require_getScopedTheme.i(props.theme);
207
+ return _responsive(media, props.$columnStart, (columnStart) => ({ gridColumnStart: `${columnStart}` }));
208
+ }
209
+ function responsiveGridItemColumnEndStyle(props) {
210
+ let { media } = require_getScopedTheme.i(props.theme);
211
+ return _responsive(media, props.$columnEnd, (columnEnd) => ({ gridColumnEnd: `${columnEnd}` }));
212
+ }
213
+ function responsiveMarginStyle(props) {
214
+ let { theme } = props;
215
+ return [
216
+ _getResponsiveSpace(theme, ["margin"], props.$margin),
217
+ _getResponsiveSpace(theme, ["marginLeft", "marginRight"], props.$marginX),
218
+ _getResponsiveSpace(theme, ["marginTop", "marginBottom"], props.$marginY),
219
+ _getResponsiveSpace(theme, ["marginTop"], props.$marginTop),
220
+ _getResponsiveSpace(theme, ["marginRight"], props.$marginRight),
221
+ _getResponsiveSpace(theme, ["marginBottom"], props.$marginBottom),
222
+ _getResponsiveSpace(theme, ["marginLeft"], props.$marginLeft)
223
+ ].filter(Boolean);
224
+ }
225
+ function responsivePaddingStyle(props) {
226
+ let { theme } = props;
227
+ return [
228
+ _getResponsiveSpace(theme, ["padding"], props.$padding),
229
+ _getResponsiveSpace(theme, ["paddingLeft", "paddingRight"], props.$paddingX),
230
+ _getResponsiveSpace(theme, ["paddingTop", "paddingBottom"], props.$paddingY),
231
+ _getResponsiveSpace(theme, ["paddingTop"], props.$paddingTop),
232
+ _getResponsiveSpace(theme, ["paddingRight"], props.$paddingRight),
233
+ _getResponsiveSpace(theme, ["paddingBottom"], props.$paddingBottom),
234
+ _getResponsiveSpace(theme, ["paddingLeft"], props.$paddingLeft)
235
+ ].filter(Boolean);
236
+ }
237
+ const StyledBox = /* @__PURE__ */ styled_components.styled.div.withConfig({
238
+ displayName: "StyledBox",
239
+ componentId: "sc-p4sc7t-0"
240
+ })(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = (0, react.forwardRef)(function Box(props, ref) {
241
+ let $ = (0, react_compiler_runtime.c)(115), deprecated_column, deprecated_columnEnd, deprecated_columnStart, deprecated_row, deprecated_rowEnd, deprecated_rowStart, flex, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, sizing, t0, t1, t2, t3;
242
+ $[0] === props ? (deprecated_column = $[1], deprecated_columnEnd = $[2], deprecated_columnStart = $[3], deprecated_row = $[4], deprecated_rowEnd = $[5], deprecated_rowStart = $[6], flex = $[7], gridColumn = $[8], gridColumnEnd = $[9], gridColumnStart = $[10], gridRow = $[11], gridRowEnd = $[12], gridRowStart = $[13], height = $[14], marginBottom = $[15], marginLeft = $[16], marginRight = $[17], marginTop = $[18], marginX = $[19], marginY = $[20], overflow = $[21], paddingBottom = $[22], paddingLeft = $[23], paddingRight = $[24], paddingTop = $[25], paddingX = $[26], paddingY = $[27], restProps = $[28], sizing = $[29], t0 = $[30], t1 = $[31], t2 = $[32], t3 = $[33]) : ({as: t0, gridColumn, column: deprecated_column, gridColumnStart, columnStart: deprecated_columnStart, gridColumnEnd, columnEnd: deprecated_columnEnd, display: t1, flex, height, margin: t2, marginX, marginY, marginTop, marginRight, marginBottom, marginLeft, overflow, padding: t3, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, gridRow, row: deprecated_row, gridRowStart, rowStart: deprecated_rowStart, gridRowEnd, rowEnd: deprecated_rowEnd, sizing, ...restProps} = props, $[0] = props, $[1] = deprecated_column, $[2] = deprecated_columnEnd, $[3] = deprecated_columnStart, $[4] = deprecated_row, $[5] = deprecated_rowEnd, $[6] = deprecated_rowStart, $[7] = flex, $[8] = gridColumn, $[9] = gridColumnEnd, $[10] = gridColumnStart, $[11] = gridRow, $[12] = gridRowEnd, $[13] = gridRowStart, $[14] = height, $[15] = marginBottom, $[16] = marginLeft, $[17] = marginRight, $[18] = marginTop, $[19] = marginX, $[20] = marginY, $[21] = overflow, $[22] = paddingBottom, $[23] = paddingLeft, $[24] = paddingRight, $[25] = paddingTop, $[26] = paddingX, $[27] = paddingY, $[28] = restProps, $[29] = sizing, $[30] = t0, $[31] = t1, $[32] = t2, $[33] = t3);
243
+ let asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, column = gridColumn === void 0 ? deprecated_column : gridColumn, columnStart = gridColumnStart === void 0 ? deprecated_columnStart : gridColumnStart, columnEnd = gridColumnEnd === void 0 ? deprecated_columnEnd : gridColumnEnd, row = gridRow === void 0 ? deprecated_row : gridRow, rowStart = gridRowStart === void 0 ? deprecated_rowStart : gridRowStart, rowEnd = gridRowEnd === void 0 ? deprecated_rowEnd : gridRowEnd, t4 = typeof asProp == "string" ? asProp : void 0, t5;
244
+ $[34] === column ? t5 = $[35] : (t5 = _getArrayProp(column), $[34] = column, $[35] = t5);
245
+ let t6;
246
+ $[36] === columnStart ? t6 = $[37] : (t6 = _getArrayProp(columnStart), $[36] = columnStart, $[37] = t6);
247
+ let t7;
248
+ $[38] === columnEnd ? t7 = $[39] : (t7 = _getArrayProp(columnEnd), $[38] = columnEnd, $[39] = t7);
249
+ let t8;
250
+ $[40] === display ? t8 = $[41] : (t8 = _getArrayProp(display), $[40] = display, $[41] = t8);
251
+ let t9;
252
+ $[42] === flex ? t9 = $[43] : (t9 = _getArrayProp(flex), $[42] = flex, $[43] = t9);
253
+ let t10;
254
+ $[44] === height ? t10 = $[45] : (t10 = _getArrayProp(height), $[44] = height, $[45] = t10);
255
+ let t11;
256
+ $[46] === margin ? t11 = $[47] : (t11 = _getArrayProp(margin), $[46] = margin, $[47] = t11);
257
+ let t12;
258
+ $[48] === marginX ? t12 = $[49] : (t12 = _getArrayProp(marginX), $[48] = marginX, $[49] = t12);
259
+ let t13;
260
+ $[50] === marginY ? t13 = $[51] : (t13 = _getArrayProp(marginY), $[50] = marginY, $[51] = t13);
261
+ let t14;
262
+ $[52] === marginTop ? t14 = $[53] : (t14 = _getArrayProp(marginTop), $[52] = marginTop, $[53] = t14);
263
+ let t15;
264
+ $[54] === marginRight ? t15 = $[55] : (t15 = _getArrayProp(marginRight), $[54] = marginRight, $[55] = t15);
265
+ let t16;
266
+ $[56] === marginBottom ? t16 = $[57] : (t16 = _getArrayProp(marginBottom), $[56] = marginBottom, $[57] = t16);
267
+ let t17;
268
+ $[58] === marginLeft ? t17 = $[59] : (t17 = _getArrayProp(marginLeft), $[58] = marginLeft, $[59] = t17);
269
+ let t18;
270
+ $[60] === overflow ? t18 = $[61] : (t18 = _getArrayProp(overflow), $[60] = overflow, $[61] = t18);
271
+ let t19;
272
+ $[62] === padding ? t19 = $[63] : (t19 = _getArrayProp(padding), $[62] = padding, $[63] = t19);
273
+ let t20;
274
+ $[64] === paddingX ? t20 = $[65] : (t20 = _getArrayProp(paddingX), $[64] = paddingX, $[65] = t20);
275
+ let t21;
276
+ $[66] === paddingY ? t21 = $[67] : (t21 = _getArrayProp(paddingY), $[66] = paddingY, $[67] = t21);
277
+ let t22;
278
+ $[68] === paddingTop ? t22 = $[69] : (t22 = _getArrayProp(paddingTop), $[68] = paddingTop, $[69] = t22);
279
+ let t23;
280
+ $[70] === paddingRight ? t23 = $[71] : (t23 = _getArrayProp(paddingRight), $[70] = paddingRight, $[71] = t23);
281
+ let t24;
282
+ $[72] === paddingBottom ? t24 = $[73] : (t24 = _getArrayProp(paddingBottom), $[72] = paddingBottom, $[73] = t24);
283
+ let t25;
284
+ $[74] === paddingLeft ? t25 = $[75] : (t25 = _getArrayProp(paddingLeft), $[74] = paddingLeft, $[75] = t25);
285
+ let t26;
286
+ $[76] === row ? t26 = $[77] : (t26 = _getArrayProp(row), $[76] = row, $[77] = t26);
287
+ let t27;
288
+ $[78] === rowStart ? t27 = $[79] : (t27 = _getArrayProp(rowStart), $[78] = rowStart, $[79] = t27);
289
+ let t28;
290
+ $[80] === rowEnd ? t28 = $[81] : (t28 = _getArrayProp(rowEnd), $[80] = rowEnd, $[81] = t28);
291
+ let t29;
292
+ $[82] === sizing ? t29 = $[83] : (t29 = _getArrayProp(sizing), $[82] = sizing, $[83] = t29);
293
+ let t30;
294
+ return $[84] !== asProp || $[85] !== props.children || $[86] !== ref || $[87] !== restProps || $[88] !== t10 || $[89] !== t11 || $[90] !== t12 || $[91] !== t13 || $[92] !== t14 || $[93] !== t15 || $[94] !== t16 || $[95] !== t17 || $[96] !== t18 || $[97] !== t19 || $[98] !== t20 || $[99] !== t21 || $[100] !== t22 || $[101] !== t23 || $[102] !== t24 || $[103] !== t25 || $[104] !== t26 || $[105] !== t27 || $[106] !== t28 || $[107] !== t29 || $[108] !== t4 || $[109] !== t5 || $[110] !== t6 || $[111] !== t7 || $[112] !== t8 || $[113] !== t9 ? (t30 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledBox, {
295
+ "data-as": t4,
296
+ "data-ui": "Box",
297
+ ...restProps,
298
+ $column: t5,
299
+ $columnStart: t6,
300
+ $columnEnd: t7,
301
+ $display: t8,
302
+ $flex: t9,
303
+ $height: t10,
304
+ $margin: t11,
305
+ $marginX: t12,
306
+ $marginY: t13,
307
+ $marginTop: t14,
308
+ $marginRight: t15,
309
+ $marginBottom: t16,
310
+ $marginLeft: t17,
311
+ $overflow: t18,
312
+ $padding: t19,
313
+ $paddingX: t20,
314
+ $paddingY: t21,
315
+ $paddingTop: t22,
316
+ $paddingRight: t23,
317
+ $paddingBottom: t24,
318
+ $paddingLeft: t25,
319
+ $row: t26,
320
+ $rowStart: t27,
321
+ $rowEnd: t28,
322
+ $sizing: t29,
323
+ as: asProp,
324
+ ref,
325
+ children: props.children
326
+ }), $[84] = asProp, $[85] = props.children, $[86] = ref, $[87] = restProps, $[88] = t10, $[89] = t11, $[90] = t12, $[91] = t13, $[92] = t14, $[93] = t15, $[94] = t16, $[95] = t17, $[96] = t18, $[97] = t19, $[98] = t20, $[99] = t21, $[100] = t22, $[101] = t23, $[102] = t24, $[103] = t25, $[104] = t26, $[105] = t27, $[106] = t28, $[107] = t29, $[108] = t4, $[109] = t5, $[110] = t6, $[111] = t7, $[112] = t8, $[113] = t9, $[114] = t30) : t30 = $[114], t30;
327
+ });
328
+ function responsiveRadiusStyle(props) {
329
+ let { media, radius } = require_getScopedTheme.i(props.theme);
330
+ return _responsive(media, props.$radius, (value) => {
331
+ let borderRadius = 0;
332
+ return typeof value == "number" && (borderRadius = rem(radius[value])), value === "full" && (borderRadius = "9999px"), { borderRadius };
333
+ });
334
+ }
335
+ /**
336
+ * @public
337
+ */
338
+ function useTheme() {
339
+ return (0, styled_components.useTheme)();
340
+ }
341
+ /**
342
+ * @public
343
+ */
344
+ function useTheme_v2() {
345
+ let $ = (0, react_compiler_runtime.c)(2), t0 = (0, styled_components.useTheme)(), t1;
346
+ return $[0] === t0 ? t1 = $[1] : (t1 = require_getScopedTheme.i(t0), $[0] = t0, $[1] = t1), t1;
347
+ }
348
+ const BASE_STYLE$1 = { "&&:not([hidden])": { display: "flex" } };
349
+ function responsiveFlexStyle() {
350
+ return [
351
+ BASE_STYLE$1,
352
+ responsiveFlexAlignStyle,
353
+ responsiveFlexGapStyle,
354
+ responsiveFlexWrapStyle,
355
+ responsiveFlexJustifyStyle,
356
+ responsiveFlexDirectionStyle
357
+ ];
358
+ }
359
+ function responsiveFlexAlignStyle(props) {
360
+ let { media } = require_getScopedTheme.i(props.theme);
361
+ return _responsive(media, props.$align, (align) => ({ alignItems: align }));
362
+ }
363
+ function responsiveFlexGapStyle(props) {
364
+ let { media, space } = require_getScopedTheme.i(props.theme);
365
+ return _responsive(media, props.$gap, (gap) => ({ gap: gap ? rem(space[gap]) : void 0 }));
366
+ }
367
+ function responsiveFlexWrapStyle(props) {
368
+ let { media } = require_getScopedTheme.i(props.theme);
369
+ return _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));
370
+ }
371
+ function responsiveFlexJustifyStyle(props) {
372
+ let { media } = require_getScopedTheme.i(props.theme);
373
+ return _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));
374
+ }
375
+ function responsiveFlexDirectionStyle(props) {
376
+ let { media } = require_getScopedTheme.i(props.theme);
377
+ return _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));
378
+ }
379
+ const StyledFlex = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
380
+ displayName: "StyledFlex",
381
+ componentId: "sc-5lzqa2-0"
382
+ })(flexItemStyle, responsiveFlexStyle), Flex = (0, react.forwardRef)(function Flex(props, ref) {
383
+ let $ = (0, react_compiler_runtime.c)(27), align, as, gap, justify, restProps, t0, wrap;
384
+ $[0] === props ? (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]) : ({align, as, direction: t0, gap, justify, wrap, ...restProps} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap);
385
+ let direction = t0 === void 0 ? "row" : t0, t1;
386
+ $[8] === align ? t1 = $[9] : (t1 = _getArrayProp(align), $[8] = align, $[9] = t1);
387
+ let t2;
388
+ $[10] === direction ? t2 = $[11] : (t2 = _getArrayProp(direction), $[10] = direction, $[11] = t2);
389
+ let t3;
390
+ $[12] === gap ? t3 = $[13] : (t3 = _getArrayProp(gap), $[12] = gap, $[13] = t3);
391
+ let t4;
392
+ $[14] === justify ? t4 = $[15] : (t4 = _getArrayProp(justify), $[14] = justify, $[15] = t4);
393
+ let t5;
394
+ $[16] === wrap ? t5 = $[17] : (t5 = _getArrayProp(wrap), $[16] = wrap, $[17] = t5);
395
+ let t6;
396
+ return $[18] !== as || $[19] !== ref || $[20] !== restProps || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 ? (t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFlex, {
397
+ "data-ui": "Flex",
398
+ ...restProps,
399
+ $align: t1,
400
+ $direction: t2,
401
+ $gap: t3,
402
+ $justify: t4,
403
+ $wrap: t5,
404
+ forwardedAs: as,
405
+ ref
406
+ }), $[18] = as, $[19] = ref, $[20] = restProps, $[21] = t1, $[22] = t2, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6) : t6 = $[26], t6;
407
+ });
408
+ /**
409
+ * Get responsive text align styles.
410
+ * @internal
411
+ */
412
+ function responsiveTextAlignStyle(props) {
413
+ let { media } = require_getScopedTheme.i(props.theme);
414
+ return _responsive(media, props.$align, (textAlign) => ({ textAlign }));
415
+ }
416
+ /**
417
+ * A utility function getting responsive font styles.
418
+ * @internal
419
+ */
420
+ function responsiveFont(fontKey, props) {
421
+ let { $size, $weight } = props, { font, media } = require_getScopedTheme.i(props.theme), { family, sizes, weights } = font[fontKey], fontWeight = $weight && weights[$weight] || weights.regular, defaultSize = sizes[2], base = {
422
+ position: "relative",
423
+ fontFamily: family,
424
+ fontWeight: `${fontWeight}`,
425
+ padding: "1px 0",
426
+ margin: 0,
427
+ "&:before": {
428
+ content: "\"\"",
429
+ display: "block",
430
+ height: 0
431
+ },
432
+ "&:after": {
433
+ content: "\"\"",
434
+ display: "block",
435
+ height: 0
436
+ },
437
+ "& > code, & > span": { display: "block" },
438
+ "&:not([hidden])": { display: "block" }
439
+ };
440
+ return $size ? [base, ..._responsive(media, $size, (sizeIndex) => fontSize(sizes[sizeIndex] || defaultSize))] : (responsiveFont.warned ||= (console.warn("No size specified for responsive font", {
441
+ fontKey,
442
+ $size,
443
+ props,
444
+ base
445
+ }), !0), [base]);
446
+ }
447
+ function fontSize(size) {
448
+ let { ascenderHeight, descenderHeight, fontSize, iconSize, letterSpacing, lineHeight } = size, negHeight = ascenderHeight + descenderHeight, capHeight = lineHeight - negHeight, iconOffset = (capHeight - iconSize) / 2, customIconSize = Math.floor(fontSize * 1.125 / 2) * 2 + 1, customIconOffset = (capHeight - customIconSize) / 2;
449
+ return {
450
+ fontSize: rem(fontSize),
451
+ lineHeight: `calc(${lineHeight} / ${fontSize})`,
452
+ letterSpacing: rem(letterSpacing),
453
+ transform: `translateY(${rem(descenderHeight)})`,
454
+ "&:before": { marginTop: `calc(${rem(0 - negHeight)} - 1px)` },
455
+ "&:after": { marginBottom: "-1px" },
456
+ "& svg:not([data-sanity-icon])": {
457
+ fontSize: `calc(${customIconSize} / 16 * 1rem)`,
458
+ margin: rem(customIconOffset)
459
+ },
460
+ "& [data-sanity-icon]": {
461
+ fontSize: `calc(${iconSize} / 16 * 1rem)`,
462
+ margin: rem(iconOffset)
463
+ }
464
+ };
465
+ }
466
+ /**
467
+ * Get responsive CSS for the `text` font style.
468
+ * @internal
469
+ */
470
+ function responsiveTextFont(props) {
471
+ return responsiveFont("text", props);
472
+ }
473
+ /** @internal */
474
+ const SpanWithTextOverflow = styled_components.styled.span.withConfig({
475
+ displayName: "SpanWithTextOverflow",
476
+ componentId: "sc-xkyu3h-0"
477
+ })`display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;overflow:clip;`;
478
+ function textBaseStyle(props) {
479
+ let { $accent, $muted } = props, { font } = require_getScopedTheme.i(props.theme);
480
+ return styled_components.css`color:var(--card-fg-color);${$accent && styled_components.css`color:var(--card-accent-fg-color);`} ${$muted && styled_components.css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;background-color:var(--card-code-bg-color);color:var(--card-code-fg-color);}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.text.weights.bold};}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;color:var(--card-icon-color);& path{vector-effect:non-scaling-stroke !important;}}`;
481
+ }
482
+ const StyledText = /* @__PURE__ */ styled_components.styled.div.withConfig({
483
+ displayName: "StyledText",
484
+ componentId: "sc-m7q2yn-0"
485
+ })(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text = (0, react.forwardRef)(function Text(props, ref) {
486
+ let $ = (0, react_compiler_runtime.c)(26), align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
487
+ $[0] === props ? (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]) : ({accent: t0, align, children: childrenProp, muted: t1, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight);
488
+ let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
489
+ if (textOverflow === "ellipsis") {
490
+ let t3;
491
+ $[9] === children ? t3 = $[10] : (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t3), children = t3;
492
+ }
493
+ let t3;
494
+ $[11] === align ? t3 = $[12] : (t3 = _getArrayProp(align), $[11] = align, $[12] = t3);
495
+ let t4;
496
+ $[13] === size ? t4 = $[14] : (t4 = _getArrayProp(size), $[13] = size, $[14] = t4);
497
+ let t5;
498
+ $[15] === children ? t5 = $[16] : (t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children }), $[15] = children, $[16] = t5);
499
+ let t6;
500
+ return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledText, {
501
+ "data-ui": "Text",
502
+ ...restProps,
503
+ $accent: accent,
504
+ $align: t3,
505
+ $muted: muted,
506
+ ref,
507
+ $size: t4,
508
+ $weight: weight,
509
+ children: t5
510
+ }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
511
+ }), rotate = styled_components.keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, StyledSpinner = (0, styled_components.styled)(Text).withConfig({
512
+ displayName: "StyledSpinner",
513
+ componentId: "sc-k51eu1-0"
514
+ })`& > span > svg{animation:${rotate} 500ms linear infinite;}`, Spinner = (0, react.forwardRef)(function Spinner(props, ref) {
515
+ let $ = (0, react_compiler_runtime.c)(4), t0;
516
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_sanity_icons_Spinner.SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
517
+ let t1;
518
+ return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledSpinner, {
519
+ "data-ui": "Spinner",
520
+ ...props,
521
+ ref,
522
+ children: t0
523
+ }), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
524
+ });
525
+ /**
526
+ * @internal
527
+ */
528
+ function _cardColorStyle(base, color, checkered = !1) {
529
+ return {
530
+ "--card-backdrop-color": base.backdrop,
531
+ "--card-focus-ring-color": base.focusRing,
532
+ "--card-shadow-outline-color": base.shadow.outline,
533
+ "--card-shadow-umbra-color": base.shadow.umbra,
534
+ "--card-shadow-penumbra-color": base.shadow.penumbra,
535
+ "--card-shadow-ambient-color": base.shadow.ambient,
536
+ "--card-accent-fg-color": color.accent.fg,
537
+ "--card-avatar-gray-bg-color": color.avatar.gray.bg,
538
+ "--card-avatar-gray-fg-color": color.avatar.gray.fg,
539
+ "--card-avatar-blue-bg-color": color.avatar.blue.bg,
540
+ "--card-avatar-blue-fg-color": color.avatar.blue.fg,
541
+ "--card-avatar-purple-bg-color": color.avatar.purple.bg,
542
+ "--card-avatar-purple-fg-color": color.avatar.purple.fg,
543
+ "--card-avatar-magenta-bg-color": color.avatar.magenta.bg,
544
+ "--card-avatar-magenta-fg-color": color.avatar.magenta.fg,
545
+ "--card-avatar-red-bg-color": color.avatar.red.bg,
546
+ "--card-avatar-red-fg-color": color.avatar.red.fg,
547
+ "--card-avatar-orange-bg-color": color.avatar.orange.bg,
548
+ "--card-avatar-orange-fg-color": color.avatar.orange.fg,
549
+ "--card-avatar-yellow-bg-color": color.avatar.yellow.bg,
550
+ "--card-avatar-yellow-fg-color": color.avatar.yellow.fg,
551
+ "--card-avatar-green-bg-color": color.avatar.green.bg,
552
+ "--card-avatar-green-fg-color": color.avatar.green.fg,
553
+ "--card-avatar-cyan-bg-color": color.avatar.cyan.bg,
554
+ "--card-avatar-cyan-fg-color": color.avatar.cyan.fg,
555
+ "--card-bg-color": color.bg,
556
+ "--card-bg-image": checkered ? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)` : void 0,
557
+ "--card-border-color": color.border,
558
+ "--card-badge-default-bg-color": color.badge.default.bg,
559
+ "--card-badge-default-dot-color": color.badge.default.dot,
560
+ "--card-badge-default-fg-color": color.badge.default.fg,
561
+ "--card-badge-default-icon-color": color.badge.default.icon,
562
+ "--card-badge-neutral-bg-color": color.badge.neutral?.bg,
563
+ "--card-badge-neutral-dot-color": color.badge.neutral?.dot,
564
+ "--card-badge-neutral-fg-color": color.badge.neutral?.fg,
565
+ "--card-badge-neutral-icon-color": color.badge.neutral?.icon,
566
+ "--card-badge-primary-bg-color": color.badge.primary.bg,
567
+ "--card-badge-primary-dot-color": color.badge.primary.dot,
568
+ "--card-badge-primary-fg-color": color.badge.primary.fg,
569
+ "--card-badge-primary-icon-color": color.badge.primary.icon,
570
+ "--card-badge-suggest-bg-color": color.badge.suggest?.bg,
571
+ "--card-badge-suggest-dot-color": color.badge.suggest?.dot,
572
+ "--card-badge-suggest-fg-color": color.badge.suggest?.fg,
573
+ "--card-badge-suggest-icon-color": color.badge.suggest?.icon,
574
+ "--card-badge-positive-bg-color": color.badge.positive.bg,
575
+ "--card-badge-positive-dot-color": color.badge.positive.dot,
576
+ "--card-badge-positive-fg-color": color.badge.positive.fg,
577
+ "--card-badge-positive-icon-color": color.badge.positive.icon,
578
+ "--card-badge-caution-bg-color": color.badge.caution.bg,
579
+ "--card-badge-caution-dot-color": color.badge.caution.dot,
580
+ "--card-badge-caution-fg-color": color.badge.caution.fg,
581
+ "--card-badge-caution-icon-color": color.badge.caution.icon,
582
+ "--card-badge-critical-bg-color": color.badge.critical.bg,
583
+ "--card-badge-critical-dot-color": color.badge.critical.dot,
584
+ "--card-badge-critical-fg-color": color.badge.critical.fg,
585
+ "--card-badge-critical-icon-color": color.badge.critical.icon,
586
+ "--card-code-bg-color": color.code.bg,
587
+ "--card-code-fg-color": color.code.fg,
588
+ "--card-fg-color": color.fg,
589
+ "--card-icon-color": color.icon,
590
+ "--card-kbd-bg-color": color.kbd.bg,
591
+ "--card-kbd-border-color": color.kbd.border,
592
+ "--card-kbd-fg-color": color.kbd.fg,
593
+ "--card-link-fg-color": color.link.fg,
594
+ "--card-muted-bg-color": color.muted.bg,
595
+ "--card-muted-fg-color": color.muted.fg,
596
+ "--card-skeleton-color-from": color.skeleton.from,
597
+ "--card-skeleton-color-to": color.skeleton.to,
598
+ "--card-bg2-color": color.muted.bg,
599
+ "--card-link-color": color.link.fg,
600
+ "--card-hairline-soft-color": color.border,
601
+ "--card-hairline-hard-color": color.border
602
+ };
603
+ }
604
+ function focusRingBorderStyle(border) {
605
+ return `inset 0 0 0 ${border.width}px ${border.color}`;
606
+ }
607
+ function focusRingStyle(opts) {
608
+ let { base, border, focusRing } = opts, focusRingOutsetWidth = focusRing.offset + focusRing.width, focusRingInsetWidth = 0 - focusRing.offset, bgColor = base ? base.bg : "var(--card-bg-color)";
609
+ return [
610
+ focusRingInsetWidth > 0 && `inset 0 0 0 ${focusRingInsetWidth}px var(--card-focus-ring-color)`,
611
+ border && focusRingBorderStyle(border),
612
+ focusRingInsetWidth < 0 && `0 0 0 ${0 - focusRingInsetWidth}px ${bgColor}`,
613
+ focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`
614
+ ].filter(Boolean).join(",");
615
+ }
616
+ /**
617
+ * @internal
618
+ */
619
+ function buttonBaseStyles(props) {
620
+ let { $width } = props, { style } = require_getScopedTheme.i(props.theme);
621
+ return styled_components.css`${style?.button};-webkit-font-smoothing:inherit;appearance:none;display:inline-flex;align-items:center;font:inherit;border:0;outline:none;user-select:none;text-decoration:none;border:0;box-sizing:border-box;padding:0;margin:0;white-space:nowrap;text-align:left;position:relative;vertical-align:top;${$width === "fill" && styled_components.css`width:-moz-available;width:-webkit-fill-available;width:stretch;`} & > span{display:block;flex:1;min-width:0;border-radius:inherit;}&::-moz-focus-inner{border:0;padding:0;}`;
622
+ }
623
+ function combineBoxShadow(...boxShadows) {
624
+ return boxShadows.filter(Boolean).join(",");
625
+ }
626
+ /**
627
+ * @internal
628
+ */
629
+ function buttonColorStyles(props) {
630
+ let { $mode } = props, { button, color: baseColor, style } = require_getScopedTheme.i(props.theme);
631
+ props.$mode;
632
+ let mode = baseColor.button[$mode] || baseColor.button.default, color = mode[props.$tone] || mode.default, border = {
633
+ width: button.border.width,
634
+ color: "var(--card-border-color)"
635
+ };
636
+ return [
637
+ _cardColorStyle(baseColor, color.enabled),
638
+ {
639
+ backgroundColor: "var(--card-bg-color)",
640
+ color: "var(--card-fg-color)",
641
+ boxShadow: focusRingBorderStyle(border),
642
+ "&:disabled, &[data-disabled=\"true\"]": _cardColorStyle(baseColor, color.disabled),
643
+ "&:not([data-disabled='true'])": {
644
+ boxShadow: combineBoxShadow(focusRingBorderStyle(border), void 0),
645
+ "&:focus": { boxShadow: focusRingStyle({
646
+ base: baseColor,
647
+ border: {
648
+ width: 2,
649
+ color: baseColor.bg
650
+ },
651
+ focusRing: button.focusRing
652
+ }) },
653
+ "&:focus:not(:focus-visible)": { boxShadow: combineBoxShadow(focusRingBorderStyle(border), void 0) },
654
+ "@media (hover: hover)": {
655
+ "&:hover": _cardColorStyle(baseColor, color.hovered),
656
+ "&:active": _cardColorStyle(baseColor, color.pressed),
657
+ "&[data-hovered]": _cardColorStyle(baseColor, color.hovered)
658
+ },
659
+ "&[data-selected]": _cardColorStyle(baseColor, color.pressed)
660
+ }
661
+ },
662
+ style?.button?.root
663
+ ].filter(Boolean);
664
+ }
665
+ const StyledButton = /* @__PURE__ */ styled_components.styled.button.withConfig({
666
+ displayName: "StyledButton",
667
+ componentId: "sc-5eghxe-0"
668
+ })(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled_components.styled.div.withConfig({
669
+ displayName: "LoadingBox",
670
+ componentId: "sc-5eghxe-1"
671
+ })`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button = (0, react.forwardRef)(function Button(props, ref) {
672
+ let $ = (0, react_compiler_runtime.c)(87), IconComponent, IconRightComponent, children, disabled, gap, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
673
+ $[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], loading = $[6], paddingBottomProp = $[7], paddingLeftProp = $[8], paddingRightProp = $[9], paddingTopProp = $[10], paddingXProp = $[11], paddingYProp = $[12], restProps = $[13], selected = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], t8 = $[23], text = $[24], textAlign = $[25], textWeight = $[26], width = $[27]) : ({children, disabled, fontSize: t0, icon: IconComponent, iconRight: IconRightComponent, justify: t1, loading, mode: t2, padding: t3, paddingX: paddingXProp, paddingY: paddingYProp, paddingTop: paddingTopProp, paddingBottom: paddingBottomProp, paddingLeft: paddingLeftProp, paddingRight: paddingRightProp, radius: t4, selected, gap, space: t5, text, textAlign, textWeight, tone: t6, type: t7, muted: t8, width, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = loading, $[7] = paddingBottomProp, $[8] = paddingLeftProp, $[9] = paddingRightProp, $[10] = paddingTopProp, $[11] = paddingXProp, $[12] = paddingYProp, $[13] = restProps, $[14] = selected, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = text, $[25] = textAlign, $[26] = textWeight, $[27] = width);
674
+ let fontSize = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 !== void 0 && t8, { button } = useTheme_v2(), t9;
675
+ $[28] === justifyProp ? t9 = $[29] : (t9 = _getArrayProp(justifyProp), $[28] = justifyProp, $[29] = t9);
676
+ let justify = t9, t10;
677
+ $[30] === paddingProp ? t10 = $[31] : (t10 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t10);
678
+ let padding = t10, t11;
679
+ $[32] === paddingXProp ? t11 = $[33] : (t11 = _getArrayProp(paddingXProp), $[32] = paddingXProp, $[33] = t11);
680
+ let paddingX = t11, t12;
681
+ $[34] === paddingYProp ? t12 = $[35] : (t12 = _getArrayProp(paddingYProp), $[34] = paddingYProp, $[35] = t12);
682
+ let paddingY = t12, t13;
683
+ $[36] === paddingTopProp ? t13 = $[37] : (t13 = _getArrayProp(paddingTopProp), $[36] = paddingTopProp, $[37] = t13);
684
+ let paddingTop = t13, t14;
685
+ $[38] === paddingBottomProp ? t14 = $[39] : (t14 = _getArrayProp(paddingBottomProp), $[38] = paddingBottomProp, $[39] = t14);
686
+ let paddingBottom = t14, t15;
687
+ $[40] === paddingLeftProp ? t15 = $[41] : (t15 = _getArrayProp(paddingLeftProp), $[40] = paddingLeftProp, $[41] = t15);
688
+ let paddingLeft = t15, t16;
689
+ $[42] === paddingRightProp ? t16 = $[43] : (t16 = _getArrayProp(paddingRightProp), $[42] = paddingRightProp, $[43] = t16);
690
+ let paddingRight = t16, t17;
691
+ $[44] === radiusProp ? t17 = $[45] : (t17 = _getArrayProp(radiusProp), $[44] = radiusProp, $[45] = t17);
692
+ let radius = t17, t18 = gap === void 0 ? deprecated_space : gap, t19;
693
+ $[46] === t18 ? t19 = $[47] : (t19 = _getArrayProp(t18), $[46] = t18, $[47] = t19);
694
+ let spacing = t19, t20;
695
+ $[48] !== padding || $[49] !== paddingBottom || $[50] !== paddingLeft || $[51] !== paddingRight || $[52] !== paddingTop || $[53] !== paddingX || $[54] !== paddingY ? (t20 = {
696
+ padding,
697
+ paddingX,
698
+ paddingY,
699
+ paddingTop,
700
+ paddingBottom,
701
+ paddingLeft,
702
+ paddingRight
703
+ }, $[48] = padding, $[49] = paddingBottom, $[50] = paddingLeft, $[51] = paddingRight, $[52] = paddingTop, $[53] = paddingX, $[54] = paddingY, $[55] = t20) : t20 = $[55];
704
+ let boxProps = t20, t21 = !!(loading || disabled), t22 = selected ? "" : void 0, t23 = !!(loading || disabled), t24;
705
+ $[56] === loading ? t24 = $[57] : (t24 = !!loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingBox, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {}) }), $[56] = loading, $[57] = t24);
706
+ let t25;
707
+ $[58] !== IconComponent || $[59] !== IconRightComponent || $[60] !== boxProps || $[61] !== button || $[62] !== fontSize || $[63] !== justify || $[64] !== muted || $[65] !== spacing || $[66] !== text || $[67] !== textAlign || $[68] !== textWeight ? (t25 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
708
+ as: "span",
709
+ ...boxProps,
710
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Flex, {
711
+ as: "span",
712
+ justify,
713
+ gap: spacing,
714
+ children: [
715
+ IconComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
716
+ size: fontSize,
717
+ children: [(0, react.isValidElement)(IconComponent) && IconComponent, (0, react_is.isValidElementType)(IconComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {})]
718
+ }),
719
+ text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
720
+ muted,
721
+ align: textAlign,
722
+ size: fontSize,
723
+ textOverflow: "ellipsis",
724
+ weight: textWeight ?? button.textWeight,
725
+ children: text
726
+ }) }),
727
+ IconRightComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
728
+ size: fontSize,
729
+ children: [(0, react.isValidElement)(IconRightComponent) && IconRightComponent, (0, react_is.isValidElementType)(IconRightComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconRightComponent, {})]
730
+ })
731
+ ]
732
+ })
733
+ }), $[58] = IconComponent, $[59] = IconRightComponent, $[60] = boxProps, $[61] = button, $[62] = fontSize, $[63] = justify, $[64] = muted, $[65] = spacing, $[66] = text, $[67] = textAlign, $[68] = textWeight, $[69] = t25) : t25 = $[69];
734
+ let t26;
735
+ $[70] !== boxProps || $[71] !== children ? (t26 = children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
736
+ as: "span",
737
+ ...boxProps,
738
+ children
739
+ }), $[70] = boxProps, $[71] = children, $[72] = t26) : t26 = $[72];
740
+ let t27;
741
+ return $[73] !== mode || $[74] !== radius || $[75] !== ref || $[76] !== restProps || $[77] !== t21 || $[78] !== t22 || $[79] !== t23 || $[80] !== t24 || $[81] !== t25 || $[82] !== t26 || $[83] !== tone || $[84] !== type || $[85] !== width ? (t27 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledButton, {
742
+ "data-ui": "Button",
743
+ ...restProps,
744
+ $mode: mode,
745
+ $radius: radius,
746
+ $tone: tone,
747
+ "data-disabled": t21,
748
+ "data-selected": t22,
749
+ disabled: t23,
750
+ ref,
751
+ type,
752
+ $width: width,
753
+ children: [
754
+ t24,
755
+ t25,
756
+ t26
757
+ ]
758
+ }), $[73] = mode, $[74] = radius, $[75] = ref, $[76] = restProps, $[77] = t21, $[78] = t22, $[79] = t23, $[80] = t24, $[81] = t25, $[82] = t26, $[83] = tone, $[84] = type, $[85] = width, $[86] = t27) : t27 = $[86], t27;
759
+ });
760
+ function responsiveBorderStyle() {
761
+ return [
762
+ border,
763
+ borderTop,
764
+ borderRight,
765
+ borderBottom,
766
+ borderLeft
767
+ ];
768
+ }
769
+ function border(props) {
770
+ let { card, media } = require_getScopedTheme.i(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
771
+ return _responsive(media, props.$border, (value) => value ? { "&&": { border: borderStyle } } : { "&&": { border: 0 } });
772
+ }
773
+ function borderTop(props) {
774
+ let { card, media } = require_getScopedTheme.i(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
775
+ return _responsive(media, props.$borderTop, (value) => value ? { "&&": { borderTop: borderStyle } } : { "&&": { borderTop: 0 } });
776
+ }
777
+ function borderRight(props) {
778
+ let { card, media } = require_getScopedTheme.i(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
779
+ return _responsive(media, props.$borderRight, (value) => value ? { "&&": { borderRight: borderStyle } } : { "&&": { borderRight: 0 } });
780
+ }
781
+ function borderBottom(props) {
782
+ let { card, media } = require_getScopedTheme.i(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
783
+ return _responsive(media, props.$borderBottom, (value) => value ? { "&&": { borderBottom: borderStyle } } : { "&&": { borderBottom: 0 } });
784
+ }
785
+ function borderLeft(props) {
786
+ let { card, media } = require_getScopedTheme.i(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
787
+ return _responsive(media, props.$borderLeft, (value) => value ? { "&&": { borderLeft: borderStyle } } : { "&&": { borderLeft: 0 } });
788
+ }
789
+ function toBoxShadow(shadow, color) {
790
+ return `${shadow.map(rem).join(" ")} ${color}`;
791
+ }
792
+ function shadowStyle(shadow, outlineWidth = 1) {
793
+ return shadow ? { boxShadow: `${`0 0 0 ${rem(outlineWidth)} var(--card-shadow-outline-color)`}, ${toBoxShadow(shadow.umbra, "var(--card-shadow-umbra-color)")}, ${toBoxShadow(shadow.penumbra, "var(--card-shadow-penumbra-color)")}, ${toBoxShadow(shadow.ambient, "var(--card-shadow-ambient-color)")}` } : EMPTY_RECORD;
794
+ }
795
+ function responsiveShadowStyle(props) {
796
+ let { card, media, shadow } = require_getScopedTheme.i(props.theme);
797
+ return _responsive(media, props.$shadow, (index) => shadowStyle(shadow[index], card.shadow.outline));
798
+ }
799
+ /**
800
+ * Gets the global scope instance in a given environment.
801
+ *
802
+ * The strategy is to return the most modern, and if not, the most common:
803
+ * - The `globalThis` variable is the modern approach to accessing the global scope
804
+ * - The `window` variable is the global scope in a web browser
805
+ * - The `self` variable is the global scope in workers and others
806
+ * - The `global` variable is the global scope in Node.js
807
+ */
808
+ function getGlobalScope() {
809
+ if (typeof globalThis < "u") return globalThis;
810
+ if (typeof window < "u") return window;
811
+ if (typeof self < "u") return self;
812
+ if (typeof global < "u") return global;
813
+ throw Error("@sanity/ui: could not locate global scope");
814
+ }
815
+ const globalScope = getGlobalScope();
816
+ /**
817
+ * As `@sanity/ui` is declared as a dependency, and may be duplicated, sometimes across major versions
818
+ * it's critical that vital react contexts are shared even when there is a duplicate.
819
+ * If we used a model similar to `sanity` itself, or `styled-components`, this would be unnecessary as
820
+ * those libraries enforce single instances.
821
+ * Since we don't enforce it we have to support a sanity plugin being able to call hooks like `useToast`, and then
822
+ * read the context setup by `sanity`, which calls `ToastProvider`, even if the provider and hook are different instances in memory.
823
+ * It's also why it's vital that all changes to globally scoped providers remain fully backwards compatible to v1.
824
+ */
825
+ function createGlobalScopedContext(key, defaultValue) {
826
+ let symbol = Symbol.for(key);
827
+ /**
828
+ * Prevent errors about re-renders on React SSR on Next.js App Router
829
+ */
830
+ if (typeof document > "u") {
831
+ let context = (0, react.createContext)(defaultValue);
832
+ return context.displayName = key, context;
833
+ }
834
+ return globalScope[symbol] = globalScope[symbol] || (0, react.createContext)(defaultValue), globalScope[symbol];
835
+ }
836
+ /**
837
+ * @internal
838
+ */
839
+ const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
840
+ /**
841
+ * @public
842
+ */
843
+ function ThemeProvider(props) {
844
+ let $ = (0, react_compiler_runtime.c)(15), parentTheme = (0, react.useContext)(ThemeContext), { children } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default"), t0;
845
+ bb0: {
846
+ if (!rootTheme) {
847
+ t0 = null;
848
+ break bb0;
849
+ }
850
+ let t1;
851
+ $[0] !== rootTheme || $[1] !== scheme || $[2] !== tone ? (t1 = {
852
+ version: 0,
853
+ theme: rootTheme,
854
+ scheme,
855
+ tone
856
+ }, $[0] = rootTheme, $[1] = scheme, $[2] = tone, $[3] = t1) : t1 = $[3], t0 = t1;
857
+ }
858
+ let themeContext = t0, t1;
859
+ bb1: {
860
+ if (!rootTheme) {
861
+ t1 = null;
862
+ break bb1;
863
+ }
864
+ let t2;
865
+ $[4] !== rootTheme || $[5] !== scheme || $[6] !== tone ? (t2 = require_getScopedTheme.t(rootTheme, scheme, tone), $[4] = rootTheme, $[5] = scheme, $[6] = tone, $[7] = t2) : t2 = $[7], t1 = t2;
866
+ }
867
+ let theme = t1;
868
+ if (!theme) {
869
+ let t2;
870
+ return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", { children: "ThemeProvider: no \"theme\" property provided" }), $[8] = t2) : t2 = $[8], t2;
871
+ }
872
+ let t2;
873
+ $[9] !== children || $[10] !== theme ? (t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_components.ThemeProvider, {
874
+ theme,
875
+ children
876
+ }), $[9] = children, $[10] = theme, $[11] = t2) : t2 = $[11];
877
+ let t3;
878
+ return $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ThemeContext.Provider, {
879
+ value: themeContext,
880
+ children: t2
881
+ }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;
882
+ }
883
+ /**
884
+ * @public
885
+ */
886
+ function useRootTheme() {
887
+ let value = (0, react.useContext)(ThemeContext);
888
+ if (!value) throw Error("useRootTheme(): missing context value");
889
+ return value;
890
+ }
891
+ /**
892
+ * @public
893
+ */
894
+ function ThemeColorProvider(props) {
895
+ let $ = (0, react_compiler_runtime.c)(5), { children, scheme, tone } = props, root = useRootTheme(), t0 = scheme || root.scheme, t1;
896
+ return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ThemeProvider, {
897
+ scheme: t0,
898
+ theme: root.theme,
899
+ tone,
900
+ children
901
+ }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
902
+ }
903
+ function cardStyle(props) {
904
+ return [cardBaseStyle(props), cardColorStyle(props)];
905
+ }
906
+ function cardBaseStyle(props) {
907
+ let { $checkered } = props, { space } = require_getScopedTheme.i(props.theme);
908
+ return styled_components.css`${$checkered && styled_components.css`background-size:${space[3]}px ${space[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`} &[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`;
909
+ }
910
+ function cardColorStyle(props) {
911
+ let { $checkered, $focusRing, $muted } = props, { card, color, style } = require_getScopedTheme.i(props.theme), border = {
912
+ width: card.border.width,
913
+ color: "var(--card-border-color)"
914
+ };
915
+ return styled_components.css`color-scheme:${color._dark ? "dark" : "light"};${_cardColorStyle(color, color, $checkered)} background-color:${$muted ? "var(--card-muted-bg-color)" : "var(--card-bg-color)"};color:var(--card-fg-color);&[data-as='button']{--card-focus-ring-box-shadow:none;cursor:default;box-shadow:var(--card-focus-ring-box-shadow);&:disabled{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not(:disabled){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({
916
+ base: color,
917
+ border,
918
+ focusRing: card.focusRing
919
+ }) : void 0};}}}&[data-as='a']{cursor:pointer;box-shadow:var(--card-focus-ring-box-shadow);&[data-disabled]{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({
920
+ base: color,
921
+ border,
922
+ focusRing: card.focusRing
923
+ }) : void 0};}}}${style?.card?.root}`;
924
+ }
925
+ const StyledCard = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
926
+ displayName: "StyledCard",
927
+ componentId: "sc-2ikw89-0"
928
+ })(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = (0, react.forwardRef)(function Card(props, ref) {
929
+ let $ = (0, react_compiler_runtime.c)(56), asProp, border, borderBottom, borderLeft, borderRight, borderTop, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
930
+ $[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]) : ({__unstable_checkered: t0, __unstable_focusRing: t1, as: asProp, border, borderTop, borderRight, borderBottom, borderLeft, muted, pressed, radius: t2, scheme, selected, shadow, tone: t3, ...restProps} = props, $[0] = props, $[1] = asProp, $[2] = border, $[3] = borderBottom, $[4] = borderLeft, $[5] = borderRight, $[6] = borderTop, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3);
931
+ let checkered = t0 !== void 0 && t0, focusRing = t1 !== void 0 && t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = (0, react_is.isValidElementType)(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6;
932
+ $[17] === border ? t6 = $[18] : (t6 = _getArrayProp(border), $[17] = border, $[18] = t6);
933
+ let t7;
934
+ $[19] === borderTop ? t7 = $[20] : (t7 = _getArrayProp(borderTop), $[19] = borderTop, $[20] = t7);
935
+ let t8;
936
+ $[21] === borderRight ? t8 = $[22] : (t8 = _getArrayProp(borderRight), $[21] = borderRight, $[22] = t8);
937
+ let t9;
938
+ $[23] === borderBottom ? t9 = $[24] : (t9 = _getArrayProp(borderBottom), $[23] = borderBottom, $[24] = t9);
939
+ let t10;
940
+ $[25] === borderLeft ? t10 = $[26] : (t10 = _getArrayProp(borderLeft), $[25] = borderLeft, $[26] = t10);
941
+ let t11;
942
+ $[27] === radius ? t11 = $[28] : (t11 = _getArrayProp(radius), $[27] = radius, $[28] = t11);
943
+ let t12;
944
+ $[29] === shadow ? t12 = $[30] : (t12 = _getArrayProp(shadow), $[29] = shadow, $[30] = t12);
945
+ let t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0, t16;
946
+ $[31] !== as || $[32] !== checkered || $[33] !== focusRing || $[34] !== muted || $[35] !== ref || $[36] !== restProps || $[37] !== rootTheme.scheme || $[38] !== selected || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t15 || $[45] !== t4 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9 || $[50] !== tone ? (t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledCard, {
947
+ "data-as": t4,
948
+ "data-scheme": t5,
949
+ "data-ui": "Card",
950
+ "data-tone": tone,
951
+ ...restProps,
952
+ $border: t6,
953
+ $borderTop: t7,
954
+ $borderRight: t8,
955
+ $borderBottom: t9,
956
+ $borderLeft: t10,
957
+ $checkered: checkered,
958
+ $focusRing: focusRing,
959
+ $muted: muted,
960
+ $radius: t11,
961
+ $shadow: t12,
962
+ $tone: tone,
963
+ "data-checkered": t13,
964
+ "data-pressed": t14,
965
+ "data-selected": t15,
966
+ forwardedAs: as,
967
+ ref,
968
+ selected
969
+ }), $[31] = as, $[32] = checkered, $[33] = focusRing, $[34] = muted, $[35] = ref, $[36] = restProps, $[37] = rootTheme.scheme, $[38] = selected, $[39] = t10, $[40] = t11, $[41] = t12, $[42] = t13, $[43] = t14, $[44] = t15, $[45] = t4, $[46] = t6, $[47] = t7, $[48] = t8, $[49] = t9, $[50] = tone, $[51] = t16) : t16 = $[51];
970
+ let t17;
971
+ return $[52] !== scheme || $[53] !== t16 || $[54] !== tone ? (t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ThemeColorProvider, {
972
+ scheme,
973
+ tone,
974
+ children: t16
975
+ }), $[52] = scheme, $[53] = t16, $[54] = tone, $[55] = t17) : t17 = $[55], t17;
976
+ }), _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : _juggle_resize_observer.ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
977
+ function _createElementRectValueListener() {
978
+ return { subscribe(element, subscriber) {
979
+ let resizeObserver = new _ResizeObserver(([entry]) => {
980
+ subscriber({
981
+ _contentRect: entry.contentRect,
982
+ border: {
983
+ width: entry.borderBoxSize[0].inlineSize,
984
+ height: entry.borderBoxSize[0].blockSize
985
+ },
986
+ content: {
987
+ width: entry.contentRect.width,
988
+ height: entry.contentRect.height
989
+ }
990
+ });
991
+ });
992
+ return resizeObserver.observe(element), () => {
993
+ resizeObserver.unobserve(element), resizeObserver.disconnect();
994
+ };
995
+ } };
996
+ }
997
+ function _createElementSizeObserver() {
998
+ let disposeCache = /* @__PURE__ */ new WeakMap(), subscribersCache = /* @__PURE__ */ new WeakMap();
999
+ return { subscribe(element, subscriber) {
1000
+ let subscribers = subscribersCache.get(element) || [], dispose = disposeCache.get(element);
1001
+ return subscribersCache.has(element) || (subscribersCache.set(element, subscribers), dispose = _createElementRectValueListener().subscribe(element, (elementRect) => {
1002
+ for (let sub of subscribers) sub(elementRect);
1003
+ })), subscribers.push(subscriber), () => {
1004
+ let idx = subscribers.indexOf(subscriber);
1005
+ idx > -1 && subscribers.splice(idx, 1), subscribers.length === 0 && dispose && dispose();
1006
+ };
1007
+ } };
1008
+ }
1009
+ /**
1010
+ * Subscribe to the size of a DOM element.
1011
+ * @beta
1012
+ */
1013
+ function useElementSize(element) {
1014
+ let $ = (0, react_compiler_runtime.c)(3), [size, setSize] = (0, react.useState)(null), t0, t1;
1015
+ return $[0] === element ? (t0 = $[1], t1 = $[2]) : (t0 = () => {
1016
+ if (element) return _elementSizeObserver.subscribe(element, setSize);
1017
+ }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1), (0, react.useEffect)(t0, t1), size;
1018
+ }
1019
+ function _getMediaQuery(media, index) {
1020
+ return index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;
1021
+ }
1022
+ function _createMediaStore(media) {
1023
+ let mediaLen = media.length, sizes, getSizes = () => {
1024
+ if (!sizes) {
1025
+ sizes = [];
1026
+ for (let index = mediaLen; index > -1; --index) {
1027
+ let mediaQuery = _getMediaQuery(media, index);
1028
+ sizes.push({
1029
+ index,
1030
+ mq: window.matchMedia(mediaQuery)
1031
+ });
1032
+ }
1033
+ }
1034
+ return sizes;
1035
+ }, getSnapshot = () => {
1036
+ for (let { index, mq } of getSizes()) if (mq.matches) return index;
1037
+ return 0;
1038
+ }, subscribe = (onStoreChange) => {
1039
+ let disposeFns = [];
1040
+ for (let { mq } of getSizes()) {
1041
+ let handleChange = () => {
1042
+ mq.matches && onStoreChange();
1043
+ };
1044
+ mq.addEventListener("change", handleChange), disposeFns.push(() => mq.removeEventListener("change", handleChange));
1045
+ }
1046
+ return () => {
1047
+ for (let disposeFn of disposeFns) disposeFn();
1048
+ };
1049
+ };
1050
+ return {
1051
+ getSnapshot,
1052
+ subscribe
1053
+ };
1054
+ }
1055
+ /**
1056
+ * Only called during server-side rendering, and hydration if using hydrateRoot
1057
+ * Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query
1058
+ * and we assume `(prefers-color-scheme: light)` since it's the most common scheme
1059
+ *
1060
+ * @link https://beta.reactjs.org/apis/react/useSyncExternalStore#adding-support-for-server-rendering
1061
+ */
1062
+ function getServerSnapshot() {
1063
+ return 0;
1064
+ }
1065
+ /**
1066
+ * This API might change. DO NOT USE IN PRODUCTION.
1067
+ * @beta
1068
+ */
1069
+ function useMediaIndex() {
1070
+ let $ = (0, react_compiler_runtime.c)(2), { media } = useTheme_v2(), t0;
1071
+ $[0] === media ? t0 = $[1] : (t0 = _createMediaStore(media), $[0] = media, $[1] = t0);
1072
+ let store = t0;
1073
+ return (0, react.useSyncExternalStore)(store.subscribe, store.getSnapshot, getServerSnapshot);
1074
+ }
1075
+ /**
1076
+ * Efficiently subscribes to `window.matchMedia` queries
1077
+ *
1078
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
1079
+ *
1080
+ * @public
1081
+ */
1082
+ function useMatchMedia(mediaQueryString, getServerSnapshot) {
1083
+ let $ = (0, react_compiler_runtime.c)(4);
1084
+ (0, react.useDebugValue)(mediaQueryString);
1085
+ let t0;
1086
+ $[0] === mediaQueryString ? t0 = $[1] : (t0 = (onStoreChange) => {
1087
+ let media = window.matchMedia(mediaQueryString);
1088
+ return media.addEventListener("change", onStoreChange), () => media.removeEventListener("change", onStoreChange);
1089
+ }, $[0] = mediaQueryString, $[1] = t0);
1090
+ let t1;
1091
+ return $[2] === mediaQueryString ? t1 = $[3] : (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1), (0, react.useSyncExternalStore)(t0, t1, getServerSnapshot);
1092
+ }
1093
+ /**
1094
+ * Returns true if motion should be reduced
1095
+ *
1096
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
1097
+ *
1098
+ * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
1099
+ * Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
1100
+ * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
1101
+ *
1102
+ * @public
1103
+ */
1104
+ function usePrefersReducedMotion(t0) {
1105
+ return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$8 : t0);
1106
+ }
1107
+ function _temp$8() {
1108
+ return !1;
1109
+ }
1110
+ /**
1111
+ * Custom floating-ui middleware which calculates transform-origin X + Y offsets
1112
+ * based on the current floating rect's dimensions and shift offset.
1113
+ *
1114
+ * Scaling popovers with these transform-origin offsets will give the effect of
1115
+ * popvers slightly 'growing' from the origin/reference element.
1116
+ *
1117
+ * This middleware must be applied after both `@sanity/ui/size` and `shift` middlewares.
1118
+ */
1119
+ const origin = {
1120
+ name: "@sanity/ui/origin",
1121
+ fn({ middlewareData, placement, rects }) {
1122
+ let [side] = placement.split("-"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = middlewareData.shift?.x || 0, shiftY = middlewareData.shift?.y || 0;
1123
+ if (floatingWidth <= 0 || floatingHeight <= 0) return {};
1124
+ let { originX, originY } = ["bottom", "top"].includes(side) ? {
1125
+ originX: clamp(.5 - shiftX / floatingWidth, 0, 1),
1126
+ originY: side === "bottom" ? 0 : 1
1127
+ } : {
1128
+ originX: +(side === "left"),
1129
+ originY: clamp(.5 - shiftY / floatingHeight, 0, 1)
1130
+ };
1131
+ return { data: {
1132
+ originX,
1133
+ originY
1134
+ } };
1135
+ }
1136
+ };
1137
+ function clamp(num, min, max) {
1138
+ return Math.min(Math.max(num, min), max);
1139
+ }
1140
+ function isRecord(value) {
1141
+ return !!(value && typeof value == "object" && !Array.isArray(value));
1142
+ }
1143
+ const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null), DEFAULT_VALUE = {
1144
+ version: 0,
1145
+ element: null
1146
+ };
1147
+ /**
1148
+ * @public
1149
+ */
1150
+ function useBoundaryElement() {
1151
+ let value = (0, react.useContext)(BoundaryElementContext);
1152
+ if (value && (!isRecord(value) || value.version !== 0)) throw Error("useBoundaryElement(): the context value is not compatible");
1153
+ return value || DEFAULT_VALUE;
1154
+ }
1155
+ function getElementRef(element) {
1156
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1157
+ return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
1158
+ }
1159
+ function getLayerContext(contextValue) {
1160
+ if (!isRecord(contextValue) || contextValue.version !== 0) throw Error("the context value is not compatible");
1161
+ if (!contextValue) throw Error("components using `useLayer()` should be wrapped in a <LayerProvider>.");
1162
+ if (contextValue.version === 0) return contextValue;
1163
+ throw Error("could not get layer context");
1164
+ }
1165
+ const LayerContext = createGlobalScopedContext("@sanity/ui/context/layer", null);
1166
+ /**
1167
+ * @public
1168
+ */
1169
+ function LayerProvider(props) {
1170
+ let $ = (0, react_compiler_runtime.c)(21), { children, zOffset: t0 } = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = (0, react.useContext)(LayerContext), t1;
1171
+ $[0] === parentContextValue ? t1 = $[1] : (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1);
1172
+ let parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, t2;
1173
+ $[2] === zOffsetProp ? t2 = $[3] : (t2 = _getArrayProp(zOffsetProp), $[2] = zOffsetProp, $[3] = t2);
1174
+ let zOffset = t2, maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], t3;
1175
+ $[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {}, $[4] = t3) : t3 = $[4];
1176
+ let [, setChildLayers] = (0, react.useState)(t3), [size, setSize] = (0, react.useState)(0), isTopLayer = size === 0, t4;
1177
+ $[5] !== parentRegisterChild || $[6] !== setChildLayers ? (t4 = (childLevel) => {
1178
+ let parentDispose = parentRegisterChild?.(childLevel);
1179
+ return childLevel === void 0 ? setSize(_temp$7) : setChildLayers((state) => {
1180
+ let prevLen = state[childLevel] ?? 0, nextState = {
1181
+ ...state,
1182
+ [childLevel]: prevLen + 1
1183
+ };
1184
+ return setSize(Object.keys(nextState).length), nextState;
1185
+ }), () => {
1186
+ childLevel === void 0 ? setSize(_temp2$2) : setChildLayers((state_0) => {
1187
+ let nextState_0 = { ...state_0 };
1188
+ return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
1189
+ }), parentDispose?.();
1190
+ };
1191
+ }, $[5] = parentRegisterChild, $[6] = setChildLayers, $[7] = t4) : t4 = $[7];
1192
+ let registerChild = t4, t5, t6;
1193
+ $[8] !== level || $[9] !== parentRegisterChild ? (t5 = () => parentRegisterChild?.(level), t6 = [level, parentRegisterChild], $[8] = level, $[9] = parentRegisterChild, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), (0, react.useEffect)(t5, t6);
1194
+ let t7;
1195
+ $[12] !== isTopLayer || $[13] !== level || $[14] !== registerChild || $[15] !== size || $[16] !== zIndex ? (t7 = {
1196
+ version: 0,
1197
+ isTopLayer,
1198
+ level,
1199
+ registerChild,
1200
+ size,
1201
+ zIndex
1202
+ }, $[12] = isTopLayer, $[13] = level, $[14] = registerChild, $[15] = size, $[16] = zIndex, $[17] = t7) : t7 = $[17];
1203
+ let value = t7, t8;
1204
+ return $[18] !== children || $[19] !== value ? (t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LayerContext.Provider, {
1205
+ value,
1206
+ children
1207
+ }), $[18] = children, $[19] = value, $[20] = t8) : t8 = $[20], t8;
1208
+ }
1209
+ function _temp2$2(v_0) {
1210
+ return v_0 - 1;
1211
+ }
1212
+ function _temp$7(v) {
1213
+ return v + 1;
1214
+ }
1215
+ /**
1216
+ * @public
1217
+ */
1218
+ function useLayer() {
1219
+ let $ = (0, react_compiler_runtime.c)(2), value = (0, react.useContext)(LayerContext);
1220
+ if (!value) throw Error("useLayer(): missing context value");
1221
+ try {
1222
+ let t1;
1223
+ return $[0] === value ? t1 = $[1] : (t1 = getLayerContext(value), $[0] = value, $[1] = t1), t1;
1224
+ } catch (t0) {
1225
+ let err = t0;
1226
+ throw err instanceof Error ? Error(`useLayer(): ${err.message}`) : Error(`useLayer(): ${err}`);
1227
+ }
1228
+ }
1229
+ const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
1230
+ globalScope[elementKey] = null;
1231
+ const PortalContext = createGlobalScopedContext(key, {
1232
+ version: 0,
1233
+ boundaryElement: null,
1234
+ get element() {
1235
+ return typeof document > "u" ? null : globalScope[elementKey] ? globalScope[elementKey] : (globalScope[elementKey] = document.createElement("div"), globalScope[elementKey].setAttribute("data-portal", ""), document.body.appendChild(globalScope[elementKey]), globalScope[elementKey]);
1236
+ }
1237
+ });
1238
+ /**
1239
+ * @public
1240
+ */
1241
+ function usePortal() {
1242
+ let value = (0, react.useContext)(PortalContext);
1243
+ if (!value) throw Error("usePortal(): missing context value");
1244
+ if (!isRecord(value) || value.version !== 0) throw Error("usePortal(): the context value is not compatible");
1245
+ return value;
1246
+ }
1247
+ /**
1248
+ * @public
1249
+ */
1250
+ function Portal(props) {
1251
+ let $ = (0, react_compiler_runtime.c)(3), { children, __unstable_name: name } = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
1252
+ if (!portalElement) return null;
1253
+ let t0;
1254
+ return $[0] !== children || $[1] !== portalElement ? (t0 = (0, react_dom.createPortal)(children, portalElement), $[0] = children, $[1] = portalElement, $[2] = t0) : t0 = $[2], t0;
1255
+ }
1256
+ const DEFAULT_POPOVER_MARGINS = [
1257
+ 0,
1258
+ 0,
1259
+ 0,
1260
+ 0
1261
+ ], DEFAULT_FALLBACK_PLACEMENTS$1 = {
1262
+ top: [
1263
+ "bottom",
1264
+ "left",
1265
+ "right"
1266
+ ],
1267
+ "top-start": [
1268
+ "bottom-start",
1269
+ "left-start",
1270
+ "right-start"
1271
+ ],
1272
+ "top-end": [
1273
+ "bottom-end",
1274
+ "left-end",
1275
+ "right-end"
1276
+ ],
1277
+ bottom: [
1278
+ "top",
1279
+ "left",
1280
+ "right"
1281
+ ],
1282
+ "bottom-start": [
1283
+ "top-start",
1284
+ "left-start",
1285
+ "right-start"
1286
+ ],
1287
+ "bottom-end": [
1288
+ "top-end",
1289
+ "left-end",
1290
+ "right-end"
1291
+ ],
1292
+ left: [
1293
+ "right",
1294
+ "top",
1295
+ "bottom"
1296
+ ],
1297
+ "left-start": [
1298
+ "right-start",
1299
+ "top-start",
1300
+ "bottom-start"
1301
+ ],
1302
+ "left-end": [
1303
+ "right-end",
1304
+ "top-end",
1305
+ "bottom-end"
1306
+ ],
1307
+ right: [
1308
+ "left",
1309
+ "top",
1310
+ "bottom"
1311
+ ],
1312
+ "right-start": [
1313
+ "left-start",
1314
+ "top-start",
1315
+ "bottom-start"
1316
+ ],
1317
+ "right-end": [
1318
+ "left-end",
1319
+ "top-end",
1320
+ "bottom-end"
1321
+ ]
1322
+ };
1323
+ function size(options) {
1324
+ let { constrainSize, margins, matchReferenceWidth, maxWidthRef, padding = 0, referenceWidthRef, setReferenceWidth, widthRef } = options;
1325
+ return {
1326
+ name: "@sanity/ui/size",
1327
+ async fn(args) {
1328
+ let { elements, placement, platform, rects } = args, { floating, reference } = rects, overflow = await (0, _floating_ui_react_dom.detectOverflow)(args, {
1329
+ altBoundary: !0,
1330
+ boundary: options.boundaryElement || void 0,
1331
+ elementContext: "floating",
1332
+ padding,
1333
+ rootBoundary: "viewport"
1334
+ }), maxWidth = Infinity, maxHeight = Infinity, floatingW = floating.width, floatingH = floating.height;
1335
+ placement.includes("top") && (maxWidth = floatingW - (overflow.left + overflow.right), maxHeight = floatingH - overflow.top), placement.includes("right") && (maxWidth = floatingW - overflow.right, maxHeight = floatingH - (overflow.top + overflow.bottom)), placement.includes("bottom") && (maxWidth = floatingW - (overflow.left + overflow.right), maxHeight = floatingH - overflow.bottom), placement.includes("left") && (maxWidth = floatingW - overflow.left, maxHeight = floatingH - (overflow.top + overflow.bottom));
1336
+ let availableWidth = maxWidth - margins[1] - margins[3], availableHeight = maxHeight - margins[0] - margins[2], referenceWidth = reference.width - margins[1] - margins[3];
1337
+ referenceWidthRef.current = referenceWidth, setReferenceWidth(referenceWidth), matchReferenceWidth ? elements.floating.style.width = `${referenceWidth}px` : widthRef.current !== void 0 && (elements.floating.style.width = `${widthRef.current}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, maxWidthRef.current ?? Infinity)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);
1338
+ let nextDimensions = await platform.getDimensions(elements.floating), targetH = nextDimensions.height;
1339
+ return floatingW !== nextDimensions.width || floatingH !== targetH ? { reset: { rects: !0 } } : {};
1340
+ }
1341
+ };
1342
+ }
1343
+ function calcCurrentWidth(params) {
1344
+ let { container, mediaIndex, width } = params, w = width[mediaIndex], currentWidth = w === void 0 ? width[width.length - 1] : w;
1345
+ return typeof currentWidth == "number" ? container[currentWidth] : void 0;
1346
+ }
1347
+ function calcMaxWidth(params) {
1348
+ let { boundaryWidth, currentWidth } = params;
1349
+ if (currentWidth !== void 0 || boundaryWidth !== void 0) return Math.min(currentWidth ?? Infinity, (boundaryWidth || Infinity) - 8);
1350
+ }
1351
+ function moveTowardsLength(movingPoint, targetPoint, amount) {
1352
+ let width = targetPoint.x - movingPoint.x, height = targetPoint.y - movingPoint.y, distance = Math.sqrt(width * width + height * height);
1353
+ return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));
1354
+ }
1355
+ function moveTowardsFractional(movingPoint, targetPoint, fraction) {
1356
+ return {
1357
+ x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,
1358
+ y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction
1359
+ };
1360
+ }
1361
+ function getRoundedCommands(points) {
1362
+ let len = points.length, cmds = [];
1363
+ for (let i = 0; i < len; i += 1) {
1364
+ let point = points[i], prevPoint = points[i - 1], nextPoint = points[i + 1];
1365
+ if (prevPoint && point.radius) {
1366
+ let curveStart = moveTowardsLength(point, prevPoint, point.radius), curveEnd = moveTowardsLength(point, nextPoint, point.radius), startControl = moveTowardsFractional(curveStart, point, .5), endControl = moveTowardsFractional(point, curveEnd, .5);
1367
+ cmds.push({
1368
+ type: "point",
1369
+ ...curveStart
1370
+ }), cmds.push({
1371
+ type: "curve",
1372
+ curveEnd,
1373
+ startControl,
1374
+ endControl
1375
+ });
1376
+ } else cmds.push({
1377
+ type: "point",
1378
+ ...point
1379
+ });
1380
+ }
1381
+ return cmds;
1382
+ }
1383
+ function compileCommands(cmds) {
1384
+ return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
1385
+ }
1386
+ const StyledArrow = /* @__PURE__ */ styled_components.styled.div.withConfig({
1387
+ displayName: "StyledArrow",
1388
+ componentId: "sc-ivw6of-0"
1389
+ })(({ $w: w }) => styled_components.css`position:absolute;width:${w}px;height:${w}px;:empty + &{display:none;}& > svg{display:block;line-height:0;transform-origin:${w / 2}px ${w / 2}px;}[data-placement^='top'] > &{bottom:-${w}px;& > svg{transform:rotate(0);}}[data-placement^='right'] > &{left:-${w}px;& > svg{transform:rotate(90deg);}}[data-placement^='left'] > &{right:-${w}px;& > svg{transform:rotate(-90deg);}}[data-placement^='bottom'] > &{top:-${w}px;& > svg{transform:rotate(180deg);}}`), StrokePath = styled_components.styled.path.withConfig({
1390
+ displayName: "StrokePath",
1391
+ componentId: "sc-ivw6of-1"
1392
+ })`stroke:var(--card-shadow-outline-color);`, ShapePath = styled_components.styled.path.withConfig({
1393
+ displayName: "ShapePath",
1394
+ componentId: "sc-ivw6of-2"
1395
+ })`fill:var(--card-bg-color);`, Arrow = (0, react.forwardRef)(function Arrow(props, ref) {
1396
+ let $ = (0, react_compiler_runtime.c)(29), h, restProps, t0, w;
1397
+ $[0] === props ? (h = $[1], restProps = $[2], t0 = $[3], w = $[4]) : ({width: w, height: h, radius: t0, ...restProps} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w);
1398
+ let radius = t0 === void 0 ? 0 : t0, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, t1;
1399
+ $[5] !== center || $[6] !== h || $[7] !== radius || $[8] !== w ? (t1 = compileCommands(getRoundedCommands([
1400
+ {
1401
+ x: 0,
1402
+ y: 0
1403
+ },
1404
+ {
1405
+ x: radius,
1406
+ y: 0,
1407
+ radius
1408
+ },
1409
+ {
1410
+ x: center,
1411
+ y: h - 1,
1412
+ radius
1413
+ },
1414
+ {
1415
+ x: w - radius,
1416
+ y: 0,
1417
+ radius
1418
+ },
1419
+ {
1420
+ x: w,
1421
+ y: 0
1422
+ }
1423
+ ])), $[5] = center, $[6] = h, $[7] = radius, $[8] = w, $[9] = t1) : t1 = $[9];
1424
+ let path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2 = `0 0 ${w} ${w}`, t3;
1425
+ $[10] !== strokeWidth || $[11] !== w ? (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("mask", {
1426
+ id: "stroke-mask",
1427
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
1428
+ x: 0,
1429
+ y: strokeWidth,
1430
+ width: w,
1431
+ height: w,
1432
+ fill: "white"
1433
+ })
1434
+ }), $[10] = strokeWidth, $[11] = w, $[12] = t3) : t3 = $[12];
1435
+ let t4 = strokeWidth * 2, t5;
1436
+ $[13] !== strokePath || $[14] !== t4 ? (t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StrokePath, {
1437
+ d: strokePath,
1438
+ mask: "url(#stroke-mask)",
1439
+ strokeWidth: t4
1440
+ }), $[13] = strokePath, $[14] = t4, $[15] = t5) : t5 = $[15];
1441
+ let t6;
1442
+ $[16] === fillPath ? t6 = $[17] : (t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShapePath, { d: fillPath }), $[16] = fillPath, $[17] = t6);
1443
+ let t7;
1444
+ $[18] !== t2 || $[19] !== t3 || $[20] !== t5 || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
1445
+ width: w,
1446
+ height: w,
1447
+ viewBox: t2,
1448
+ children: [
1449
+ t3,
1450
+ t5,
1451
+ t6
1452
+ ]
1453
+ }), $[18] = t2, $[19] = t3, $[20] = t5, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23];
1454
+ let t8;
1455
+ return $[24] !== ref || $[25] !== restProps || $[26] !== t7 || $[27] !== w ? (t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledArrow, {
1456
+ ...restProps,
1457
+ $w: w,
1458
+ ref,
1459
+ children: t7
1460
+ }), $[24] = ref, $[25] = restProps, $[26] = t7, $[27] = w, $[28] = t8) : t8 = $[28], t8;
1461
+ }), MotionCard$1 = (0, styled_components.styled)(motion_react.motion.create(Card)).withConfig({
1462
+ displayName: "MotionCard",
1463
+ componentId: "sc-tq6s8o-0"
1464
+ })`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex = (0, styled_components.styled)(motion_react.motion.create(Flex)).withConfig({
1465
+ displayName: "MotionFlex",
1466
+ componentId: "sc-tq6s8o-1"
1467
+ })`will-change:opacity;`, PopoverCard = (0, react.forwardRef)(function PopoverCard(props, ref) {
1468
+ let $ = (0, react_compiler_runtime.c)(66), animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
1469
+ $[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]) : ({__unstable_margins: marginsProp, animate, arrow, arrowRef, arrowX, arrowY, children, padding, placement, originX, originY, overflow, radius, scheme, shadow, strategy, style, tone, width, x: xProp, y: yProp, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp);
1470
+ let { zIndex } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0, t1;
1471
+ $[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t0 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t1 = {
1472
+ left: x,
1473
+ originX,
1474
+ originY,
1475
+ position: strategy,
1476
+ top: y,
1477
+ width,
1478
+ zIndex,
1479
+ willChange: t0,
1480
+ ...style
1481
+ }, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t0, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t1) : t1 = $[32];
1482
+ let rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;
1483
+ $[33] !== t2 || $[34] !== t3 ? (t4 = {
1484
+ left: t2,
1485
+ top: t3,
1486
+ right: void 0,
1487
+ bottom: void 0
1488
+ }, $[33] = t2, $[34] = t3, $[35] = t4) : t4 = $[35];
1489
+ let arrowStyle = t4, t5 = restProps, t6;
1490
+ $[36] === animate ? t6 = $[37] : (t6 = animate ? ["hidden", "initial"] : void 0, $[36] = animate, $[37] = t6);
1491
+ let t7;
1492
+ $[38] === animate ? t7 = $[39] : (t7 = animate ? ["visible", "scaleIn"] : void 0, $[38] = animate, $[39] = t7);
1493
+ let t8;
1494
+ $[40] === animate ? t8 = $[41] : (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[40] = animate, $[41] = t8);
1495
+ let t9;
1496
+ $[42] !== children || $[43] !== padding ? (t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Flex, {
1497
+ direction: "column",
1498
+ flex: 1,
1499
+ padding,
1500
+ children
1501
+ }), $[42] = children, $[43] = padding, $[44] = t9) : t9 = $[44];
1502
+ let t10;
1503
+ $[45] !== overflow || $[46] !== t9 ? (t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MotionFlex, {
1504
+ "data-ui": "Popover__wrapper",
1505
+ direction: "column",
1506
+ flex: 1,
1507
+ overflow,
1508
+ variants: POPOVER_MOTION_PROPS.children,
1509
+ transition: POPOVER_MOTION_PROPS.transition,
1510
+ children: t9
1511
+ }), $[45] = overflow, $[46] = t9, $[47] = t10) : t10 = $[47];
1512
+ let t11;
1513
+ $[48] !== arrow || $[49] !== arrowRef || $[50] !== arrowStyle ? (t11 = arrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Arrow, {
1514
+ ref: arrowRef,
1515
+ style: arrowStyle,
1516
+ width: 19,
1517
+ height: 8,
1518
+ radius: 2
1519
+ }), $[48] = arrow, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t11) : t11 = $[51];
1520
+ let t12;
1521
+ return $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== tone ? (t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(MotionCard$1, {
1522
+ "data-ui": "Popover",
1523
+ ...t5,
1524
+ "data-placement": placement,
1525
+ radius,
1526
+ ref,
1527
+ scheme,
1528
+ shadow,
1529
+ sizing: "border",
1530
+ style: rootStyle,
1531
+ tone,
1532
+ variants: POPOVER_MOTION_PROPS.card,
1533
+ transition: POPOVER_MOTION_PROPS.transition,
1534
+ initial: t6,
1535
+ animate: t7,
1536
+ exit: t8,
1537
+ children: [t10, t11]
1538
+ }), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t5, $[61] = t6, $[62] = t7, $[63] = t8, $[64] = tone, $[65] = t12) : t12 = $[65], t12;
1539
+ }), ViewportOverlay = () => {
1540
+ let $ = (0, react_compiler_runtime.c)(2), { zIndex } = useLayer(), t0;
1541
+ return $[0] === zIndex ? t0 = $[1] : (t0 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
1542
+ height: "100vh",
1543
+ inset: 0,
1544
+ position: "fixed",
1545
+ width: "100vw",
1546
+ zIndex
1547
+ } }), $[0] = zIndex, $[1] = t0), t0;
1548
+ }, Popover = (0, react.forwardRef)(function Popover(props, forwardedRef) {
1549
+ let $ = (0, react_compiler_runtime.c)(126), { container, layer } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), _boundaryElement, _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
1550
+ if ($[0] !== props) {
1551
+ let { __unstable_margins: t12, animate: t13, arrow: t14, boundaryElement: t15, children: t16, constrainSize: t17, content: t18, disabled: t19, fallbackPlacements: t20, matchReferenceWidth: t21, floatingBoundary: t22, modal: t23, onActivate, open: t24, overflow: t25, padding: t26, placement: t27, placementStrategy: t28, portal: t29, preventOverflow: t30, radius: t31, referenceBoundary: t32, referenceElement: t33, scheme: t34, shadow: t35, tone: t36, width: t37, zOffset: t38, updateRef: t39, ...t40 } = props;
1552
+ t0 = t12, t1 = t13, t2 = t14, _boundaryElement = t15, childProp = t16, t3 = t17, content = t18, disabled = t19, _fallbackPlacements = t20, matchReferenceWidth = t21, _floatingBoundary = t22, modal = t23, open = t24, t4 = t25, paddingProp = t26, t5 = t27, t6 = t28, portal = t29, t7 = t30, t8 = t31, _referenceBoundary = t32, referenceElement = t33, scheme = t34, t9 = t35, t10 = t36, t11 = t37, _zOffsetProp = t38, updateRef = t39, restProps = t40, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacements, $[3] = _floatingBoundary, $[4] = _referenceBoundary, $[5] = _zOffsetProp, $[6] = childProp, $[7] = content, $[8] = disabled, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;
1553
+ } else _boundaryElement = $[1], _fallbackPlacements = $[2], _floatingBoundary = $[3], _referenceBoundary = $[4], _zOffsetProp = $[5], childProp = $[6], content = $[7], disabled = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];
1554
+ let margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 !== void 0 && t1, arrowProp = t2 !== void 0 && t2, constrainSize = t3 !== void 0 && t3, overflow = t4 === void 0 ? "hidden" : t4, placementProp = t5 === void 0 ? "bottom" : t5, placementStrategy = t6 === void 0 ? "flip" : t6, preventOverflow = t7 === void 0 || t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? "inherit" : t10, widthProp = t11 === void 0 ? "auto" : t11, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = !usePrefersReducedMotion() && _animate, boundarySize = useElementSize(boundaryElement)?.border, t12;
1555
+ $[30] === paddingProp ? t12 = $[31] : (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12);
1556
+ let padding = t12, t13;
1557
+ $[32] === radiusProp ? t13 = $[33] : (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13);
1558
+ let radius = t13, t14;
1559
+ $[34] === shadowProp ? t14 = $[35] : (t14 = _getArrayProp(shadowProp), $[34] = shadowProp, $[35] = t14);
1560
+ let shadow = t14, widthArrayProp = _getArrayProp(widthProp), t15;
1561
+ $[36] === zOffsetProp ? t15 = $[37] : (t15 = _getArrayProp(zOffsetProp), $[36] = zOffsetProp, $[37] = t15);
1562
+ let zOffset = t15, ref = (0, react.useRef)(null), arrowRef = (0, react.useRef)(null), t16;
1563
+ $[38] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => ref.current, $[38] = t16) : t16 = $[38], (0, react.useImperativeHandle)(forwardedRef, t16);
1564
+ let mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
1565
+ container,
1566
+ mediaIndex,
1567
+ width: widthArrayProp
1568
+ }), widthRef = (0, react.useRef)(width), t17, t18;
1569
+ $[39] === width ? (t17 = $[40], t18 = $[41]) : (t17 = () => {
1570
+ widthRef.current = width;
1571
+ }, t18 = [width], $[39] = width, $[40] = t17, $[41] = t18), (0, react.useEffect)(t17, t18);
1572
+ let t19;
1573
+ $[42] !== boundaryWidth || $[43] !== width ? (t19 = calcMaxWidth({
1574
+ boundaryWidth,
1575
+ currentWidth: width
1576
+ }), $[42] = boundaryWidth, $[43] = width, $[44] = t19) : t19 = $[44];
1577
+ let maxWidth = t19, maxWidthRef = (0, react.useRef)(maxWidth), t20, t21;
1578
+ $[45] === maxWidth ? (t20 = $[46], t21 = $[47]) : (t20 = () => {
1579
+ maxWidthRef.current = maxWidth;
1580
+ }, t21 = [maxWidth], $[45] = maxWidth, $[46] = t20, $[47] = t21), (0, react.useEffect)(t20, t21);
1581
+ let referenceWidthRef = (0, react.useRef)(void 0), t22, t23;
1582
+ $[48] !== matchReferenceWidth || $[49] !== maxWidth || $[50] !== open || $[51] !== width ? (t22 = () => {
1583
+ let floatingElement = ref.current;
1584
+ if (!open || !floatingElement) return;
1585
+ let referenceWidth = referenceWidthRef.current;
1586
+ matchReferenceWidth ? referenceWidth !== void 0 && (floatingElement.style.width = `${referenceWidth}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
1587
+ }, t23 = [
1588
+ width,
1589
+ matchReferenceWidth,
1590
+ maxWidth,
1591
+ open
1592
+ ], $[48] = matchReferenceWidth, $[49] = maxWidth, $[50] = open, $[51] = width, $[52] = t22, $[53] = t23) : (t22 = $[52], t23 = $[53]), (0, react.useEffect)(t22, t23);
1593
+ let [referenceWidth_0, setReferenceWidth] = (0, react.useState)(void 0), t24;
1594
+ $[54] !== animate || $[55] !== arrowProp || $[56] !== constrainSize || $[57] !== fallbackPlacements || $[58] !== floatingBoundary || $[59] !== margins || $[60] !== matchReferenceWidth || $[61] !== placementProp || $[62] !== placementStrategy || $[63] !== preventOverflow || $[64] !== referenceBoundary ? (t24 = {
1595
+ animate,
1596
+ arrowProp,
1597
+ arrowRef,
1598
+ constrainSize,
1599
+ fallbackPlacements,
1600
+ floatingBoundary,
1601
+ margins,
1602
+ matchReferenceWidth,
1603
+ maxWidthRef,
1604
+ placementProp,
1605
+ placementStrategy,
1606
+ preventOverflow,
1607
+ referenceBoundary,
1608
+ referenceWidthRef,
1609
+ rootBoundary: "viewport",
1610
+ setReferenceWidth,
1611
+ widthRef
1612
+ }, $[54] = animate, $[55] = arrowProp, $[56] = constrainSize, $[57] = fallbackPlacements, $[58] = floatingBoundary, $[59] = margins, $[60] = matchReferenceWidth, $[61] = placementProp, $[62] = placementStrategy, $[63] = preventOverflow, $[64] = referenceBoundary, $[65] = t24) : t24 = $[65];
1613
+ let middleware = useMiddleware$1(t24), t25;
1614
+ $[66] === referenceElement ? t25 = $[67] : (t25 = referenceElement ? { reference: referenceElement } : void 0, $[66] = referenceElement, $[67] = t25);
1615
+ let t26;
1616
+ $[68] !== middleware || $[69] !== placementProp || $[70] !== t25 ? (t26 = {
1617
+ middleware,
1618
+ placement: placementProp,
1619
+ whileElementsMounted: _floating_ui_react_dom.autoUpdate,
1620
+ elements: t25
1621
+ }, $[68] = middleware, $[69] = placementProp, $[70] = t25, $[71] = t26) : t26 = $[71];
1622
+ let { x, y, middlewareData, placement, refs, strategy, update } = (0, _floating_ui_react_dom.useFloating)(t26), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, t27;
1623
+ $[72] === Symbol.for("react.memo_cache_sentinel") ? (t27 = (arrowEl) => {
1624
+ arrowRef.current = arrowEl;
1625
+ }, $[72] = t27) : t27 = $[72];
1626
+ let setArrow = t27, t28;
1627
+ $[73] === refs ? t28 = $[74] : (t28 = (node) => {
1628
+ ref.current = node, refs.setFloating(node);
1629
+ }, $[73] = refs, $[74] = t28);
1630
+ let setFloating = t28, t29;
1631
+ $[75] === childProp ? t29 = $[76] : (t29 = childProp ? getElementRef(childProp) : null, $[75] = childProp, $[76] = t29);
1632
+ let t30;
1633
+ $[77] === refs.reference.current ? t30 = $[78] : (t30 = () => refs.reference.current, $[77] = refs.reference.current, $[78] = t30), (0, react.useImperativeHandle)(t29, t30);
1634
+ let t31;
1635
+ bb0: {
1636
+ if (referenceElement) {
1637
+ t31 = childProp;
1638
+ break bb0;
1639
+ }
1640
+ if (!childProp) {
1641
+ t31 = null;
1642
+ break bb0;
1643
+ }
1644
+ let t32;
1645
+ $[79] !== childProp || $[80] !== refs.setReference ? (t32 = (0, react.cloneElement)(childProp, { ref: refs.setReference }), $[79] = childProp, $[80] = refs.setReference, $[81] = t32) : t32 = $[81], t31 = t32;
1646
+ }
1647
+ let child = t31, t32, t33;
1648
+ if ($[82] === update ? (t32 = $[83], t33 = $[84]) : (t32 = () => update, t33 = [update], $[82] = update, $[83] = t32, $[84] = t33), (0, react.useImperativeHandle)(updateRef, t32, t33), disabled) {
1649
+ let t34;
1650
+ return $[85] === childProp ? t34 = $[86] : (t34 = childProp || /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), $[85] = childProp, $[86] = t34), t34;
1651
+ }
1652
+ let t34;
1653
+ $[87] === modal ? t34 = $[88] : (t34 = modal && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ViewportOverlay, {}), $[87] = modal, $[88] = t34);
1654
+ let t35 = matchReferenceWidth ? referenceWidth_0 : width, t36;
1655
+ $[89] !== animate || $[90] !== arrowProp || $[91] !== arrowX || $[92] !== arrowY || $[93] !== content || $[94] !== margins || $[95] !== originX || $[96] !== originY || $[97] !== overflow || $[98] !== padding || $[99] !== placement || $[100] !== radius || $[101] !== referenceHidden || $[102] !== restProps || $[103] !== scheme || $[104] !== setFloating || $[105] !== shadow || $[106] !== strategy || $[107] !== t35 || $[108] !== tone || $[109] !== x || $[110] !== y ? (t36 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverCard, {
1656
+ ...restProps,
1657
+ __unstable_margins: margins,
1658
+ animate,
1659
+ arrow: arrowProp,
1660
+ arrowRef: setArrow,
1661
+ arrowX,
1662
+ arrowY,
1663
+ hidden: referenceHidden,
1664
+ overflow,
1665
+ padding,
1666
+ placement,
1667
+ radius,
1668
+ ref: setFloating,
1669
+ scheme,
1670
+ shadow,
1671
+ originX,
1672
+ originY,
1673
+ strategy,
1674
+ tone,
1675
+ width: t35,
1676
+ x,
1677
+ y,
1678
+ children: content
1679
+ }), $[89] = animate, $[90] = arrowProp, $[91] = arrowX, $[92] = arrowY, $[93] = content, $[94] = margins, $[95] = originX, $[96] = originY, $[97] = overflow, $[98] = padding, $[99] = placement, $[100] = radius, $[101] = referenceHidden, $[102] = restProps, $[103] = scheme, $[104] = setFloating, $[105] = shadow, $[106] = strategy, $[107] = t35, $[108] = tone, $[109] = x, $[110] = y, $[111] = t36) : t36 = $[111];
1680
+ let t37;
1681
+ $[112] !== t34 || $[113] !== t36 || $[114] !== zOffset ? (t37 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(LayerProvider, {
1682
+ zOffset,
1683
+ children: [t34, t36]
1684
+ }), $[112] = t34, $[113] = t36, $[114] = zOffset, $[115] = t37) : t37 = $[115];
1685
+ let popover = t37, t38;
1686
+ $[116] !== open || $[117] !== popover || $[118] !== portal ? (t38 = open && (portal ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Portal, {
1687
+ __unstable_name: typeof portal == "string" ? portal : void 0,
1688
+ children: popover
1689
+ }) : popover), $[116] = open, $[117] = popover, $[118] = portal, $[119] = t38) : t38 = $[119];
1690
+ let children = t38, t39;
1691
+ $[120] !== animate || $[121] !== children ? (t39 = animate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, { children }) : children, $[120] = animate, $[121] = children, $[122] = t39) : t39 = $[122];
1692
+ let t40;
1693
+ return $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t39, child] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;
1694
+ });
1695
+ function useMiddleware$1(t0) {
1696
+ let $ = (0, react_compiler_runtime.c)(42), { animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef } = t0, ret;
1697
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {
1698
+ if (ret = [], constrainSize || preventOverflow) if (placementStrategy === "autoPlacement") {
1699
+ let t1;
1700
+ $[18] !== fallbackPlacements || $[19] !== placementProp ? (t1 = (0, _floating_ui_react_dom.autoPlacement)({ allowedPlacements: [placementProp].concat(fallbackPlacements) }), $[18] = fallbackPlacements, $[19] = placementProp, $[20] = t1) : t1 = $[20], ret.push(t1);
1701
+ } else {
1702
+ let t1 = floatingBoundary || void 0, t2;
1703
+ $[21] !== fallbackPlacements || $[22] !== rootBoundary || $[23] !== t1 ? (t2 = (0, _floating_ui_react_dom.flip)({
1704
+ boundary: t1,
1705
+ fallbackPlacements,
1706
+ padding: 4,
1707
+ rootBoundary
1708
+ }), $[21] = fallbackPlacements, $[22] = rootBoundary, $[23] = t1, $[24] = t2) : t2 = $[24], ret.push(t2);
1709
+ }
1710
+ let t1;
1711
+ if ($[25] === Symbol.for("react.memo_cache_sentinel") ? (t1 = (0, _floating_ui_react_dom.offset)({ mainAxis: 4 }), $[25] = t1) : t1 = $[25], ret.push(t1), constrainSize || matchReferenceWidth) {
1712
+ let t2 = floatingBoundary || void 0, t3;
1713
+ $[26] !== constrainSize || $[27] !== margins || $[28] !== matchReferenceWidth || $[29] !== maxWidthRef || $[30] !== referenceWidthRef || $[31] !== setReferenceWidth || $[32] !== t2 || $[33] !== widthRef ? (t3 = size({
1714
+ boundaryElement: t2,
1715
+ constrainSize,
1716
+ margins,
1717
+ matchReferenceWidth,
1718
+ maxWidthRef,
1719
+ padding: 4,
1720
+ referenceWidthRef,
1721
+ setReferenceWidth,
1722
+ widthRef
1723
+ }), $[26] = constrainSize, $[27] = margins, $[28] = matchReferenceWidth, $[29] = maxWidthRef, $[30] = referenceWidthRef, $[31] = setReferenceWidth, $[32] = t2, $[33] = widthRef, $[34] = t3) : t3 = $[34], ret.push(t3);
1724
+ }
1725
+ if (preventOverflow) {
1726
+ let t2 = floatingBoundary || void 0, t3;
1727
+ $[35] !== rootBoundary || $[36] !== t2 ? (t3 = (0, _floating_ui_react_dom.shift)({
1728
+ boundary: t2,
1729
+ rootBoundary,
1730
+ padding: 4
1731
+ }), $[35] = rootBoundary, $[36] = t2, $[37] = t3) : t3 = $[37], ret.push(t3);
1732
+ }
1733
+ if (arrowProp) {
1734
+ let t2;
1735
+ $[38] === arrowRef ? t2 = $[39] : (t2 = (0, _floating_ui_react_dom.arrow)({
1736
+ element: arrowRef,
1737
+ padding: 4
1738
+ }), $[38] = arrowRef, $[39] = t2), ret.push(t2);
1739
+ }
1740
+ animate && ret.push(origin);
1741
+ let t2 = referenceBoundary || void 0, t3;
1742
+ $[40] === t2 ? t3 = $[41] : (t3 = (0, _floating_ui_react_dom.hide)({
1743
+ boundary: t2,
1744
+ padding: 4,
1745
+ strategy: "referenceHidden"
1746
+ }), $[40] = t2, $[41] = t3), ret.push(t3), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = constrainSize, $[4] = fallbackPlacements, $[5] = floatingBoundary, $[6] = margins, $[7] = matchReferenceWidth, $[8] = maxWidthRef, $[9] = placementProp, $[10] = placementStrategy, $[11] = preventOverflow, $[12] = referenceBoundary, $[13] = referenceWidthRef, $[14] = rootBoundary, $[15] = setReferenceWidth, $[16] = widthRef, $[17] = ret;
1747
+ } else ret = $[17];
1748
+ return ret;
1749
+ }
1750
+ const BASE_STYLE = {
1751
+ "&&:not([hidden])": { display: "grid" },
1752
+ "&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none" },
1753
+ gridTemplateColumns: "minmax(0, 1fr)",
1754
+ gridAutoRows: "min-content"
1755
+ };
1756
+ function stackBaseStyle() {
1757
+ return BASE_STYLE;
1758
+ }
1759
+ function responsiveStackSpaceStyle(props) {
1760
+ let { media, space } = require_getScopedTheme.i(props.theme);
1761
+ return _responsive(media, props.$space, (spaceIndex) => ({ gridGap: rem(space[spaceIndex]) }));
1762
+ }
1763
+ const StyledStack = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
1764
+ displayName: "StyledStack",
1765
+ componentId: "sc-ux0lrj-0"
1766
+ })(stackBaseStyle, responsiveStackSpaceStyle), Stack = (0, react.forwardRef)(function Stack(props, ref) {
1767
+ let $ = (0, react_compiler_runtime.c)(13), as, deprecated_space, gap, restProps;
1768
+ $[0] === props ? (as = $[1], deprecated_space = $[2], gap = $[3], restProps = $[4]) : ({as, gap, space: deprecated_space, ...restProps} = props, $[0] = props, $[1] = as, $[2] = deprecated_space, $[3] = gap, $[4] = restProps);
1769
+ let spacing = gap === void 0 ? deprecated_space : gap, t0 = typeof as == "string" ? as : void 0, t1;
1770
+ $[5] === spacing ? t1 = $[6] : (t1 = _getArrayProp(spacing), $[5] = spacing, $[6] = t1);
1771
+ let t2;
1772
+ return $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t0 || $[11] !== t1 ? (t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledStack, {
1773
+ "data-as": t0,
1774
+ "data-ui": "Stack",
1775
+ ...restProps,
1776
+ $space: t1,
1777
+ forwardedAs: as,
1778
+ ref
1779
+ }), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2) : t2 = $[12], t2;
1780
+ });
1781
+ /**
1782
+ * @beta
1783
+ */
1784
+ function useCustomValidity(ref, customValidity) {
1785
+ let $ = (0, react_compiler_runtime.c)(4), t0, t1;
1786
+ $[0] !== customValidity || $[1] !== ref ? (t0 = () => {
1787
+ ref.current?.setCustomValidity(customValidity || "");
1788
+ }, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), (0, react.useEffect)(t0, t1);
1789
+ }
1790
+ function responsiveInputPaddingStyle(props) {
1791
+ let { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = require_getScopedTheme.i(props.theme), len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];
1792
+ for (let i = 0; i < len; i += 1) _fontSize[i] = $fontSize[i] === void 0 ? _fontSize[i - 1] : $fontSize[i], _padding[i] = $padding[i] === void 0 ? _padding[i - 1] : $padding[i], _space[i] = $space[i] === void 0 ? _space[i - 1] : $space[i];
1793
+ return _responsive(media, _padding, (_, i) => {
1794
+ let size = font.text.sizes[_fontSize[i]] || font.text.sizes[2], emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight, p = space[_padding[i]], s = space[_space[i]], styles = {
1795
+ paddingTop: rem(p - size.ascenderHeight),
1796
+ paddingRight: rem(p),
1797
+ paddingBottom: rem(p - size.descenderHeight),
1798
+ paddingLeft: rem(p)
1799
+ };
1800
+ return $iconRight && (styles.paddingRight = rem(p + emSize + s)), $iconLeft && (styles.paddingLeft = rem(p + emSize + s)), styles;
1801
+ });
1802
+ }
1803
+ function responsiveInputPaddingIconRightStyle(props) {
1804
+ return responsiveInputPaddingStyle({
1805
+ ...props,
1806
+ $iconRight: !0
1807
+ });
1808
+ }
1809
+ const ROOT_STYLE = styled_components.css`&:not([hidden]){display:flex;}align-items:center;`;
1810
+ function textInputRootStyle() {
1811
+ return ROOT_STYLE;
1812
+ }
1813
+ function textInputBaseStyle(props) {
1814
+ let { $scheme, $tone, $weight } = props, { color, font } = require_getScopedTheme.i(props.theme);
1815
+ return styled_components.css`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${font.text.family};font-weight:${$weight && font.text.weights[$weight] || font.text.weights.regular};margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}&[data-scheme='${$scheme}'][data-tone='${$tone}']{--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${color.input.default.disabled.fg};--input-placeholder-color:${color.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${color.input.invalid.enabled.fg};--input-placeholder-color:${color.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${color.input.default.readOnly.fg};--input-placeholder-color:${color.input.default.readOnly.placeholder};}}`;
1816
+ }
1817
+ function textInputFontSizeStyle(props) {
1818
+ let { font, media } = require_getScopedTheme.i(props.theme);
1819
+ return _responsive(media, props.$fontSize, (sizeIndex) => {
1820
+ let size = font.text.sizes[sizeIndex] || font.text.sizes[2];
1821
+ return {
1822
+ fontSize: rem(size.fontSize),
1823
+ lineHeight: `${size.lineHeight / size.fontSize}`
1824
+ };
1825
+ });
1826
+ }
1827
+ function textInputRepresentationStyle(props) {
1828
+ let { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = require_getScopedTheme.i(props.theme);
1829
+ return styled_components.css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0};&[data-scheme='${$scheme}'][data-tone='${$tone}']{--card-bg-color:${color.input.default.enabled.bg};--card-fg-color:${color.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
1830
+ color: color.input.default.enabled.border,
1831
+ width: input.border.width
1832
+ })};}*:not(:disabled):invalid + &{--card-bg-color:${color.input.invalid.enabled.bg};--card-fg-color:${color.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${focusRingBorderStyle({
1833
+ color: color.input.invalid.enabled.border,
1834
+ width: input.border.width
1835
+ })};}}*:not(:disabled):focus + &{&[data-border]{--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({
1836
+ border: {
1837
+ color: color.input.default.enabled.border,
1838
+ width: input.border.width
1839
+ },
1840
+ focusRing: input.text.focusRing
1841
+ })};}&:not([data-border]){--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({ focusRing: input.text.focusRing })};}}*:not(:invalid):disabled + &{--card-bg-color:${color.input.default.disabled.bg} !important;--card-fg-color:${color.input.default.disabled.fg} !important;--card-icon-color:${color.input.default.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
1842
+ color: color.input.default.disabled.border,
1843
+ width: input.border.width
1844
+ })};}}*:invalid:disabled + &{--card-bg-color:${color.input.invalid.disabled.bg} !important;--card-fg-color:${color.input.invalid.disabled.fg} !important;--card-icon-color:${color.input.invalid.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
1845
+ color: color.input.invalid.disabled.border,
1846
+ width: input.border.width
1847
+ })};}}*:not(:invalid):read-only + &{--card-bg-color:${color.input.default.readOnly.bg} !important;--card-fg-color:${color.input.default.readOnly.fg} !important;}*:invalid:read-only + &{--card-bg-color:${color.input.invalid.readOnly.bg} !important;--card-fg-color:${color.input.invalid.readOnly.fg} !important;}@media (hover:hover){*:not(:disabled):not(:read-only):not(:invalid):hover + &{--card-bg-color:${color.input.default.hovered.bg};--card-fg-color:${color.input.default.hovered.fg};}*:invalid:not(:disabled):not(:read-only):hover + &{--card-bg-color:${color.input.invalid.hovered.bg};--card-fg-color:${color.input.invalid.hovered.fg};}*:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
1848
+ color: color.input.default.hovered.border,
1849
+ width: input.border.width
1850
+ })};}*:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
1851
+ color: color.input.invalid.hovered.border,
1852
+ width: input.border.width
1853
+ })};}}}`;
1854
+ }
1855
+ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */ (0, styled_components.styled)(Card).attrs({ forwardedAs: "span" }).withConfig({
1856
+ displayName: "StyledTextInput",
1857
+ componentId: "sc-7gzsyi-0"
1858
+ })(textInputRootStyle), InputRoot = styled_components.styled.span.withConfig({
1859
+ displayName: "InputRoot",
1860
+ componentId: "sc-7gzsyi-1"
1861
+ })`flex:1;min-width:0;display:block;position:relative;`, Prefix = (0, styled_components.styled)(Card).attrs({ forwardedAs: "span" }).withConfig({
1862
+ displayName: "Prefix",
1863
+ componentId: "sc-7gzsyi-2"
1864
+ })`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = (0, styled_components.styled)(Card).attrs({ forwardedAs: "span" }).withConfig({
1865
+ displayName: "Suffix",
1866
+ componentId: "sc-7gzsyi-3"
1867
+ })`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input = /* @__PURE__ */ styled_components.styled.input.withConfig({
1868
+ displayName: "Input",
1869
+ componentId: "sc-7gzsyi-4"
1870
+ })(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled_components.styled.span.withConfig({
1871
+ displayName: "Presentation",
1872
+ componentId: "sc-7gzsyi-5"
1873
+ })(responsiveRadiusStyle, textInputRepresentationStyle), LeftBox = (0, styled_components.styled)(Box).withConfig({
1874
+ displayName: "LeftBox",
1875
+ componentId: "sc-7gzsyi-6"
1876
+ })`position:absolute;top:0;left:0;`, RightBox = (0, styled_components.styled)(Box).withConfig({
1877
+ displayName: "RightBox",
1878
+ componentId: "sc-7gzsyi-7"
1879
+ })`position:absolute;top:0;right:0;`, RightCard = (0, styled_components.styled)(Card).withConfig({
1880
+ displayName: "RightCard",
1881
+ componentId: "sc-7gzsyi-8"
1882
+ })`background-color:transparent;position:absolute;top:0;right:0;`, TextInputClearButton = /* @__PURE__ */ (0, styled_components.styled)(Button).withConfig({
1883
+ displayName: "TextInputClearButton",
1884
+ componentId: "sc-7gzsyi-9"
1885
+ })({ "&:not([hidden])": { display: "block" } }), TextInput = (0, react.forwardRef)(function TextInput(props, forwardedRef) {
1886
+ let $ = (0, react_compiler_runtime.c)(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, gap, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
1887
+ $[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], gap = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t3, prefix, radius: t4, readOnly, space: t5, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = gap, $[7] = onClear, $[8] = prefix, $[9] = readOnly, $[10] = restProps, $[11] = suffix, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = weight);
1888
+ let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = (0, react.useRef)(null), rootTheme = useRootTheme(), t7;
1889
+ $[20] === fontSizeProp ? t7 = $[21] : (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7);
1890
+ let fontSize = t7, t8;
1891
+ $[22] === paddingProp ? t8 = $[23] : (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8);
1892
+ let padding = t8, t9;
1893
+ $[24] === radiusProp ? t9 = $[25] : (t9 = _getArrayProp(radiusProp), $[24] = radiusProp, $[25] = t9);
1894
+ let radius = t9, t10 = gap === void 0 ? deprecated_space : gap, t11;
1895
+ $[26] === t10 ? t11 = $[27] : (t11 = _getArrayProp(t10), $[26] = t10, $[27] = t11);
1896
+ let space = t11, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix, t12;
1897
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t12 = () => ref.current, $[28] = t12) : t12 = $[28], (0, react.useImperativeHandle)(forwardedRef, t12), useCustomValidity(ref, customValidity);
1898
+ let handleClearMouseDown = _temp$6, t13;
1899
+ $[29] === onClear ? t13 = $[30] : (t13 = (event_0) => {
1900
+ event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
1901
+ }, $[29] = onClear, $[30] = t13);
1902
+ let handleClearClick = t13, t14;
1903
+ $[31] !== prefix || $[32] !== radius ? (t14 = prefix && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Prefix, {
1904
+ borderTop: !0,
1905
+ borderLeft: !0,
1906
+ borderBottom: !0,
1907
+ radius,
1908
+ sizing: "border",
1909
+ tone: "inherit",
1910
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: prefix })
1911
+ }), $[31] = prefix, $[32] = radius, $[33] = t14) : t14 = $[33];
1912
+ let prefixNode = t14, t15 = border ? "" : void 0, t16;
1913
+ $[34] !== IconComponent || $[35] !== fontSize || $[36] !== padding ? (t16 = IconComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LeftBox, {
1914
+ padding,
1915
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
1916
+ size: fontSize,
1917
+ children: [(0, react.isValidElement)(IconComponent) && IconComponent, (0, react_is.isValidElementType)(IconComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {})]
1918
+ })
1919
+ }), $[34] = IconComponent, $[35] = fontSize, $[36] = padding, $[37] = t16) : t16 = $[37];
1920
+ let t17;
1921
+ $[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize || $[41] !== padding ? (t17 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightBox, {
1922
+ padding,
1923
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
1924
+ size: fontSize,
1925
+ children: [(0, react.isValidElement)(IconRightComponent) && IconRightComponent, (0, react_is.isValidElementType)(IconRightComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconRightComponent, {})]
1926
+ })
1927
+ }), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize, $[41] = padding, $[42] = t17) : t17 = $[42];
1928
+ let t18;
1929
+ $[43] !== $hasPrefix || $[44] !== $hasSuffix || $[45] !== __unstable_disableFocusRing || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t15 || $[50] !== t16 || $[51] !== t17 ? (t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Presentation, {
1930
+ $hasPrefix,
1931
+ $unstableDisableFocusRing: __unstable_disableFocusRing,
1932
+ $hasSuffix,
1933
+ $radius: radius,
1934
+ $scheme: rootTheme.scheme,
1935
+ $tone: rootTheme.tone,
1936
+ "data-border": t15,
1937
+ "data-scheme": rootTheme.scheme,
1938
+ "data-tone": rootTheme.tone,
1939
+ children: [t16, t17]
1940
+ }), $[43] = $hasPrefix, $[44] = $hasSuffix, $[45] = __unstable_disableFocusRing, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t15, $[50] = t16, $[51] = t17, $[52] = t18) : t18 = $[52];
1941
+ let presentationNode = t18, t19;
1942
+ $[53] === padding ? t19 = $[54] : (t19 = padding.map(_temp2$1), $[53] = padding, $[54] = t19);
1943
+ let clearButtonBoxPadding = t19, t20;
1944
+ $[55] === padding ? t20 = $[56] : (t20 = padding.map(_temp3), $[55] = padding, $[56] = t20);
1945
+ let clearButtonPadding = t20, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD, t21;
1946
+ $[57] !== clearButton || $[58] !== clearButtonBoxPadding || $[59] !== clearButtonPadding || $[60] !== clearButtonProps || $[61] !== customValidity || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t21 = !disabled && !readOnly && clearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightCard, {
1947
+ forwardedAs: "span",
1948
+ padding: clearButtonBoxPadding,
1949
+ style: CLEAR_BUTTON_BOX_STYLE,
1950
+ tone: customValidity ? "critical" : "inherit",
1951
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInputClearButton, {
1952
+ "aria-label": "Clear",
1953
+ "data-qa": "clear-button",
1954
+ fontSize,
1955
+ icon: _sanity_icons_Close.CloseIcon,
1956
+ mode: "bleed",
1957
+ padding: clearButtonPadding,
1958
+ radius,
1959
+ ...clearButtonProps,
1960
+ onClick: handleClearClick,
1961
+ onMouseDown: handleClearMouseDown
1962
+ })
1963
+ }), $[57] = clearButton, $[58] = clearButtonBoxPadding, $[59] = clearButtonPadding, $[60] = clearButtonProps, $[61] = customValidity, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t21) : t21 = $[67];
1964
+ let clearButtonNode = t21, t22;
1965
+ $[68] !== radius || $[69] !== suffix ? (t22 = suffix && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Suffix, {
1966
+ borderTop: !0,
1967
+ borderRight: !0,
1968
+ borderBottom: !0,
1969
+ radius,
1970
+ sizing: "border",
1971
+ tone: "inherit",
1972
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: suffix })
1973
+ }), $[68] = radius, $[69] = suffix, $[70] = t22) : t22 = $[70];
1974
+ let suffixNode = t22, t23 = $hasIconRight || $hasClearButton, t24;
1975
+ $[71] !== $hasIcon || $[72] !== disabled || $[73] !== fontSize || $[74] !== padding || $[75] !== readOnly || $[76] !== restProps || $[77] !== rootTheme.scheme || $[78] !== rootTheme.tone || $[79] !== space || $[80] !== t23 || $[81] !== type || $[82] !== weight ? (t24 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
1976
+ "data-as": "input",
1977
+ "data-scheme": rootTheme.scheme,
1978
+ "data-tone": rootTheme.tone,
1979
+ ...restProps,
1980
+ $fontSize: fontSize,
1981
+ $iconLeft: $hasIcon,
1982
+ $iconRight: t23,
1983
+ $padding: padding,
1984
+ $scheme: rootTheme.scheme,
1985
+ $space: space,
1986
+ $tone: rootTheme.tone,
1987
+ $weight: weight,
1988
+ disabled,
1989
+ readOnly,
1990
+ ref,
1991
+ type
1992
+ }), $[71] = $hasIcon, $[72] = disabled, $[73] = fontSize, $[74] = padding, $[75] = readOnly, $[76] = restProps, $[77] = rootTheme.scheme, $[78] = rootTheme.tone, $[79] = space, $[80] = t23, $[81] = type, $[82] = weight, $[83] = t24) : t24 = $[83];
1993
+ let t25;
1994
+ $[84] !== clearButtonNode || $[85] !== presentationNode || $[86] !== t24 ? (t25 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InputRoot, { children: [
1995
+ t24,
1996
+ presentationNode,
1997
+ clearButtonNode
1998
+ ] }), $[84] = clearButtonNode, $[85] = presentationNode, $[86] = t24, $[87] = t25) : t25 = $[87];
1999
+ let t26;
2000
+ return $[88] !== prefixNode || $[89] !== rootTheme.tone || $[90] !== suffixNode || $[91] !== t25 ? (t26 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledTextInput, {
2001
+ "data-ui": "TextInput",
2002
+ tone: rootTheme.tone,
2003
+ children: [
2004
+ prefixNode,
2005
+ t25,
2006
+ suffixNode
2007
+ ]
2008
+ }), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t25, $[92] = t26) : t26 = $[92], t26;
2009
+ });
2010
+ function _temp$6(event) {
2011
+ event.preventDefault(), event.stopPropagation();
2012
+ }
2013
+ function _temp2$1(v) {
2014
+ return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
2015
+ }
2016
+ function _temp3(v_0) {
2017
+ return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
2018
+ }
2019
+ /**
2020
+ * @public
2021
+ */
2022
+ function useClickOutsideEvent(listener, t0, boundaryElement) {
2023
+ let $ = (0, react_compiler_runtime.c)(9), elementsArg = t0 === void 0 ? _temp$5 : t0, t1;
2024
+ $[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
2025
+ if (!listener) return;
2026
+ let target = evt.target;
2027
+ if (!(target instanceof Node)) return;
2028
+ let resolvedBoundaryElement = boundaryElement?.();
2029
+ if (resolvedBoundaryElement && !resolvedBoundaryElement.contains(target)) return;
2030
+ let elements = elementsArg().flat();
2031
+ for (let el of elements) if (el && (target === el || el.contains(target))) return;
2032
+ listener(evt);
2033
+ }, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];
2034
+ let onEvent = (0, use_effect_event.useEffectEvent)(t1), hasListener = !!listener, t2;
2035
+ $[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {
2036
+ if (!hasListener) return;
2037
+ let handleEvent = (evt_0) => onEvent(evt_0);
2038
+ return document.addEventListener("mousedown", handleEvent), () => {
2039
+ document.removeEventListener("mousedown", handleEvent);
2040
+ };
2041
+ }, $[4] = hasListener, $[5] = onEvent, $[6] = t2) : t2 = $[6];
2042
+ let t3;
2043
+ $[7] === hasListener ? t3 = $[8] : (t3 = [hasListener], $[7] = hasListener, $[8] = t3), (0, react.useEffect)(t2, t3), (0, react.useDebugValue)(listener ? "MouseDown On" : "MouseDown Off");
2044
+ }
2045
+ function _temp$5() {
2046
+ return EMPTY_ARRAY;
2047
+ }
2048
+ /**
2049
+ * Adds global keydown event listener to the window.
2050
+ *
2051
+ * @param onKeyDown - The function to call when a keydown event is triggered.
2052
+ * @param options - The options to pass to the addEventListener function (example, capture: true)
2053
+ * @beta
2054
+ */
2055
+ function useGlobalKeyDown(onKeyDown, options) {
2056
+ let $ = (0, react_compiler_runtime.c)(7), t0;
2057
+ $[0] === onKeyDown ? t0 = $[1] : (t0 = (event) => onKeyDown(event), $[0] = onKeyDown, $[1] = t0);
2058
+ let handleKeyDown = (0, use_effect_event.useEffectEvent)(t0), t1;
2059
+ $[2] !== handleKeyDown || $[3] !== options ? (t1 = () => {
2060
+ let handler = (event_0) => handleKeyDown(event_0);
2061
+ return window.addEventListener("keydown", handler, options), () => window.removeEventListener("keydown", handler, options);
2062
+ }, $[2] = handleKeyDown, $[3] = options, $[4] = t1) : t1 = $[4];
2063
+ let t2;
2064
+ $[5] === options ? t2 = $[6] : (t2 = [options], $[5] = options, $[6] = t2), (0, react.useEffect)(t1, t2);
2065
+ }
2066
+ const StyledLayer = /* @__PURE__ */ styled_components.styled.div.withConfig({
2067
+ displayName: "StyledLayer",
2068
+ componentId: "sc-c59p9w-0"
2069
+ })({ position: "relative" }), LayerChildren = (0, react.forwardRef)(function LayerChildren(props, forwardedRef) {
2070
+ let $ = (0, react_compiler_runtime.c)(22), children, onActivate, onFocus, restProps, t0;
2071
+ $[0] === props ? (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]) : ({children, onActivate, onFocus, style: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0);
2072
+ let style = t0 === void 0 ? EMPTY_RECORD : t0, { zIndex, isTopLayer } = useLayer(), lastFocusedRef = (0, react.useRef)(null), ref = (0, react.useRef)(null), isTopLayerRef = (0, react.useRef)(isTopLayer), t1;
2073
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], (0, react.useImperativeHandle)(forwardedRef, t1);
2074
+ let t2, t3;
2075
+ $[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
2076
+ isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({ activeElement: lastFocusedRef.current }), isTopLayerRef.current = isTopLayer;
2077
+ }, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), (0, react.useEffect)(t2, t3);
2078
+ let t4;
2079
+ $[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
2080
+ onFocus?.(event);
2081
+ let rootElement = ref.current, target = document.activeElement;
2082
+ !isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
2083
+ }, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
2084
+ let handleFocus = t4, t5;
2085
+ $[14] !== style || $[15] !== zIndex ? (t5 = {
2086
+ ...style,
2087
+ zIndex
2088
+ }, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
2089
+ let t6;
2090
+ return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLayer, {
2091
+ ...restProps,
2092
+ "data-ui": "Layer",
2093
+ onFocus: handleFocus,
2094
+ ref,
2095
+ style: t5,
2096
+ children
2097
+ }), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
2098
+ }), Layer = (0, react.forwardRef)(function Layer(props, ref) {
2099
+ let $ = (0, react_compiler_runtime.c)(11), children, restProps, t0;
2100
+ $[0] === props ? (children = $[1], restProps = $[2], t0 = $[3]) : ({children, zOffset: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0);
2101
+ let zOffset = t0 === void 0 ? 1 : t0, t1;
2102
+ $[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LayerChildren, {
2103
+ ...restProps,
2104
+ ref,
2105
+ children
2106
+ }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
2107
+ let t2;
2108
+ return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LayerProvider, {
2109
+ zOffset,
2110
+ children: t1
2111
+ }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
2112
+ });
2113
+ function inlineBaseStyle() {
2114
+ return {
2115
+ lineHeight: "0",
2116
+ "&&:not([hidden])": { display: "block" },
2117
+ "& > div": {
2118
+ display: "inline-block",
2119
+ verticalAlign: "middle"
2120
+ }
2121
+ };
2122
+ }
2123
+ function inlineSpaceStyle(props) {
2124
+ let { media, space } = require_getScopedTheme.i(props.theme);
2125
+ return _responsive(media, props.$space, (spaceIndex) => {
2126
+ let _space = rem(spaceIndex === .5 ? space[1] / 2 : space[spaceIndex]);
2127
+ return {
2128
+ margin: `-${_space} 0 0 -${_space}`,
2129
+ "& > div": { padding: `${_space} 0 0 ${_space}` }
2130
+ };
2131
+ });
2132
+ }
2133
+ const StyledInline = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
2134
+ displayName: "StyledInline",
2135
+ componentId: "sc-zsbqh7-0"
2136
+ })(inlineBaseStyle, inlineSpaceStyle), Inline = (0, react.forwardRef)(function Inline(props, ref) {
2137
+ let $ = (0, react_compiler_runtime.c)(16), as, childrenProp, deprecated_space, gap, restProps;
2138
+ $[0] === props ? (as = $[1], childrenProp = $[2], deprecated_space = $[3], gap = $[4], restProps = $[5]) : ({as, children: childrenProp, gap, space: deprecated_space, ...restProps} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = deprecated_space, $[4] = gap, $[5] = restProps);
2139
+ let spacing = gap === void 0 ? deprecated_space : gap, t0;
2140
+ $[6] === childrenProp ? t0 = $[7] : (t0 = react.Children.map(childrenProp, _temp$4), $[6] = childrenProp, $[7] = t0);
2141
+ let children = t0, t1;
2142
+ $[8] === spacing ? t1 = $[9] : (t1 = _getArrayProp(spacing), $[8] = spacing, $[9] = t1);
2143
+ let t2 = ref, t3;
2144
+ return $[10] !== as || $[11] !== children || $[12] !== restProps || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledInline, {
2145
+ "data-ui": "Inline",
2146
+ ...restProps,
2147
+ $space: t1,
2148
+ forwardedAs: as,
2149
+ ref: t2,
2150
+ children
2151
+ }), $[10] = as, $[11] = children, $[12] = restProps, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
2152
+ });
2153
+ function _temp$4(child) {
2154
+ return child && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: child });
2155
+ }
2156
+ function kbdStyle() {
2157
+ return styled_components.css`--card-bg-color:var(--card-kbd-bg-color);--card-border-color:var(--card-kbd-border-color);--card-fg-color:var(--card-kbd-fg-color);box-shadow:inset 0 0 0 1px var(--card-border-color);background:var(--card-bg-color);font:inherit;vertical-align:top;&:not([hidden]){display:inline-block;}`;
2158
+ }
2159
+ const StyledKBD = /* @__PURE__ */ styled_components.styled.kbd.withConfig({
2160
+ displayName: "StyledKBD",
2161
+ componentId: "sc-xzhxcv-0"
2162
+ })(responsiveRadiusStyle, kbdStyle), KBD = (0, react.forwardRef)(function KBD(props, ref) {
2163
+ let $ = (0, react_compiler_runtime.c)(19), children, restProps, t0, t1, t2;
2164
+ $[0] === props ? (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]) : ({children, fontSize: t0, padding: t1, radius: t2, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2);
2165
+ let fontSize = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2, t3;
2166
+ $[6] === radius ? t3 = $[7] : (t3 = _getArrayProp(radius), $[6] = radius, $[7] = t3);
2167
+ let t4;
2168
+ $[8] !== children || $[9] !== fontSize ? (t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
2169
+ as: "span",
2170
+ size: fontSize,
2171
+ weight: "semibold",
2172
+ children
2173
+ }), $[8] = children, $[9] = fontSize, $[10] = t4) : t4 = $[10];
2174
+ let t5;
2175
+ $[11] !== padding || $[12] !== t4 ? (t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
2176
+ as: "span",
2177
+ padding,
2178
+ children: t4
2179
+ }), $[11] = padding, $[12] = t4, $[13] = t5) : t5 = $[13];
2180
+ let t6;
2181
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t3 || $[17] !== t5 ? (t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledKBD, {
2182
+ "data-ui": "KBD",
2183
+ ...restProps,
2184
+ $radius: t3,
2185
+ ref,
2186
+ children: t5
2187
+ }), $[14] = ref, $[15] = restProps, $[16] = t3, $[17] = t5, $[18] = t6) : t6 = $[18], t6;
2188
+ }), StyledHotkeys = styled_components.styled.kbd.withConfig({
2189
+ displayName: "StyledHotkeys",
2190
+ componentId: "sc-1soubc-0"
2191
+ })`font:inherit;padding:1px;&:not([hidden]){display:block;}`, Key = (0, styled_components.styled)(KBD).withConfig({
2192
+ displayName: "Key",
2193
+ componentId: "sc-1soubc-1"
2194
+ })`&:not([hidden]){display:block;}`, Hotkeys = (0, react.forwardRef)(function Hotkeys(props, ref) {
2195
+ let $ = (0, react_compiler_runtime.c)(27), fontSize, gap, keys, padding, radius, restProps, t0;
2196
+ $[0] === props ? (fontSize = $[1], gap = $[2], keys = $[3], padding = $[4], radius = $[5], restProps = $[6], t0 = $[7]) : ({fontSize, gap, keys, padding, radius, space: t0, ...restProps} = props, $[0] = props, $[1] = fontSize, $[2] = gap, $[3] = keys, $[4] = padding, $[5] = radius, $[6] = restProps, $[7] = t0);
2197
+ let t1 = gap === void 0 ? t0 === void 0 ? .5 : t0 : gap, t2;
2198
+ $[8] === t1 ? t2 = $[9] : (t2 = _getArrayProp(t1), $[8] = t1, $[9] = t2);
2199
+ let spacing = t2;
2200
+ if (!keys || keys.length === 0) {
2201
+ let t3;
2202
+ return $[10] === Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), $[10] = t3) : t3 = $[10], t3;
2203
+ }
2204
+ let t3;
2205
+ if ($[11] !== fontSize || $[12] !== keys || $[13] !== padding || $[14] !== radius) {
2206
+ let t4;
2207
+ $[16] !== fontSize || $[17] !== padding || $[18] !== radius ? (t4 = (key, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Key, {
2208
+ fontSize,
2209
+ padding,
2210
+ radius,
2211
+ children: key
2212
+ }, i), $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t4) : t4 = $[19], t3 = keys.map(t4), $[11] = fontSize, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t3;
2213
+ } else t3 = $[15];
2214
+ let t4;
2215
+ $[20] !== spacing || $[21] !== t3 ? (t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Inline, {
2216
+ as: "span",
2217
+ gap: spacing,
2218
+ children: t3
2219
+ }), $[20] = spacing, $[21] = t3, $[22] = t4) : t4 = $[22];
2220
+ let t5;
2221
+ return $[23] !== ref || $[24] !== restProps || $[25] !== t4 ? (t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledHotkeys, {
2222
+ "data-ui": "Hotkeys",
2223
+ ...restProps,
2224
+ ref,
2225
+ children: t4
2226
+ }), $[23] = ref, $[24] = restProps, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
2227
+ }), MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
2228
+ /**
2229
+ * @internal
2230
+ */
2231
+ function _isFocusable(element) {
2232
+ return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
2233
+ }
2234
+ /**
2235
+ * @internal
2236
+ */
2237
+ function _getFocusableElements(elements) {
2238
+ return elements.filter(_isFocusable);
2239
+ }
2240
+ function _getDOMPath(rootElement, el) {
2241
+ let path = [], e = el;
2242
+ for (; e !== rootElement;) {
2243
+ let parentElement = e.parentElement;
2244
+ if (!parentElement) return path;
2245
+ let index = Array.from(parentElement.childNodes).indexOf(e);
2246
+ if (path.unshift(index), parentElement === rootElement) return path;
2247
+ e = parentElement;
2248
+ }
2249
+ return path;
2250
+ }
2251
+ const EMPTY_PATH = [];
2252
+ /**
2253
+ * @internal
2254
+ */
2255
+ function _sortElements(rootElement, elements) {
2256
+ if (!rootElement) return;
2257
+ let map = /* @__PURE__ */ new WeakMap();
2258
+ for (let el of elements) map.set(el, _getDOMPath(rootElement, el));
2259
+ let _sort = (a, b) => {
2260
+ let _a = map.get(a) || EMPTY_PATH, _b = map.get(b) || EMPTY_PATH, len = Math.max(_a.length, _b.length);
2261
+ for (let i = 0; i < len; i += 1) {
2262
+ let aIndex = _a[i] || -1, bIndex = _b[i] || -1;
2263
+ if (aIndex !== bIndex) return aIndex - bIndex;
2264
+ }
2265
+ return 0;
2266
+ };
2267
+ elements.sort(_sort);
2268
+ }
2269
+ /**
2270
+ * This controller is responsible for controlling UI menu state.
2271
+ *
2272
+ * @internal
2273
+ */
2274
+ function useMenuController(props) {
2275
+ let $ = (0, react_compiler_runtime.c)(21), { onKeyDown, originElement, shouldFocus, rootElementRef } = props, t0;
2276
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
2277
+ let elementsRef = (0, react.useRef)(t0), [activeIndex, _setActiveIndex] = (0, react.useState)(-1), activeIndexRef = (0, react.useRef)(activeIndex), [activeElement, setActiveElement] = (0, react.useState)(null), t1;
2278
+ $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = (nextActiveIndex) => {
2279
+ _setActiveIndex(nextActiveIndex), activeIndexRef.current = nextActiveIndex, setActiveElement(elementsRef.current[nextActiveIndex] || null);
2280
+ }, $[1] = t1) : t1 = $[1];
2281
+ let setActiveIndex = t1, t2;
2282
+ $[2] === rootElementRef ? t2 = $[3] : (t2 = (element, selected) => {
2283
+ if (!element) return _temp$3;
2284
+ if (elementsRef.current.indexOf(element) === -1 && (elementsRef.current.push(element), _sortElements(rootElementRef.current, elementsRef.current)), selected) {
2285
+ let selectedIndex = elementsRef.current.indexOf(element);
2286
+ setActiveIndex(selectedIndex);
2287
+ }
2288
+ return () => {
2289
+ let idx = elementsRef.current.indexOf(element);
2290
+ idx > -1 && elementsRef.current.splice(idx, 1);
2291
+ };
2292
+ }, $[2] = rootElementRef, $[3] = t2);
2293
+ let mount = t2, t3;
2294
+ $[4] !== onKeyDown || $[5] !== originElement ? (t3 = (event) => {
2295
+ if (event.key === "Tab") {
2296
+ originElement && originElement.focus();
2297
+ return;
2298
+ }
2299
+ if (event.key === "Home") {
2300
+ event.preventDefault(), event.stopPropagation();
2301
+ let el = _getFocusableElements(elementsRef.current)[0];
2302
+ if (!el) return;
2303
+ let currentIndex = elementsRef.current.indexOf(el);
2304
+ setActiveIndex(currentIndex);
2305
+ return;
2306
+ }
2307
+ if (event.key === "End") {
2308
+ event.preventDefault(), event.stopPropagation();
2309
+ let focusableElements_0 = _getFocusableElements(elementsRef.current), el_0 = focusableElements_0[focusableElements_0.length - 1];
2310
+ if (!el_0) return;
2311
+ let currentIndex_0 = elementsRef.current.indexOf(el_0);
2312
+ setActiveIndex(currentIndex_0);
2313
+ return;
2314
+ }
2315
+ if (event.key === "ArrowUp") {
2316
+ event.preventDefault(), event.stopPropagation();
2317
+ let focusableElements_1 = _getFocusableElements(elementsRef.current), focusableLen = focusableElements_1.length;
2318
+ if (focusableLen === 0) return;
2319
+ let focusedElement = elementsRef.current[activeIndexRef.current], focusedIndex = focusableElements_1.indexOf(focusedElement);
2320
+ focusedIndex = (focusedIndex - 1 + focusableLen) % focusableLen;
2321
+ let el_1 = focusableElements_1[focusedIndex], currentIndex_1 = elementsRef.current.indexOf(el_1);
2322
+ setActiveIndex(currentIndex_1);
2323
+ return;
2324
+ }
2325
+ if (event.key === "ArrowDown") {
2326
+ event.preventDefault(), event.stopPropagation();
2327
+ let focusableElements_2 = _getFocusableElements(elementsRef.current), focusableLen_0 = focusableElements_2.length;
2328
+ if (focusableLen_0 === 0) return;
2329
+ let focusedElement_0 = elementsRef.current[activeIndexRef.current], focusedIndex_0 = focusableElements_2.indexOf(focusedElement_0);
2330
+ focusedIndex_0 = (focusedIndex_0 + 1) % focusableLen_0;
2331
+ let el_2 = focusableElements_2[focusedIndex_0], currentIndex_2 = elementsRef.current.indexOf(el_2);
2332
+ setActiveIndex(currentIndex_2);
2333
+ return;
2334
+ }
2335
+ onKeyDown && onKeyDown(event);
2336
+ }, $[4] = onKeyDown, $[5] = originElement, $[6] = t3) : t3 = $[6];
2337
+ let handleKeyDown = t3, t4;
2338
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = (event_0) => {
2339
+ let element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
2340
+ setActiveIndex(currentIndex_3);
2341
+ }, $[7] = t4) : t4 = $[7];
2342
+ let handleItemMouseEnter = t4, t5;
2343
+ $[8] === rootElementRef ? t5 = $[9] : (t5 = () => {
2344
+ setActiveIndex(-2), rootElementRef.current?.focus();
2345
+ }, $[8] = rootElementRef, $[9] = t5);
2346
+ let handleItemMouseLeave = t5, t6, t7;
2347
+ $[10] !== activeIndex || $[11] !== rootElementRef || $[12] !== shouldFocus ? (t6 = () => {
2348
+ if (!rootElementRef.current) return;
2349
+ let rafId = requestAnimationFrame(() => {
2350
+ if (activeIndex === -1) {
2351
+ if (shouldFocus === "first") {
2352
+ let el_3 = _getFocusableElements(elementsRef.current)[0];
2353
+ if (el_3) {
2354
+ let currentIndex_4 = elementsRef.current.indexOf(el_3);
2355
+ setActiveIndex(currentIndex_4);
2356
+ }
2357
+ }
2358
+ if (shouldFocus === "last") {
2359
+ let focusableElements_4 = _getFocusableElements(elementsRef.current), el_4 = focusableElements_4[focusableElements_4.length - 1];
2360
+ if (el_4) {
2361
+ let currentIndex_5 = elementsRef.current.indexOf(el_4);
2362
+ setActiveIndex(currentIndex_5);
2363
+ }
2364
+ }
2365
+ return;
2366
+ }
2367
+ (elementsRef.current[activeIndex] || null)?.focus();
2368
+ });
2369
+ return () => cancelAnimationFrame(rafId);
2370
+ }, t7 = [
2371
+ activeIndex,
2372
+ rootElementRef,
2373
+ setActiveIndex,
2374
+ shouldFocus
2375
+ ], $[10] = activeIndex, $[11] = rootElementRef, $[12] = shouldFocus, $[13] = t6, $[14] = t7) : (t6 = $[13], t7 = $[14]), (0, react.useEffect)(t6, t7);
2376
+ let t8;
2377
+ return $[15] !== activeElement || $[16] !== activeIndex || $[17] !== handleItemMouseLeave || $[18] !== handleKeyDown || $[19] !== mount ? (t8 = {
2378
+ activeElement,
2379
+ activeIndex,
2380
+ handleItemMouseEnter,
2381
+ handleItemMouseLeave,
2382
+ handleKeyDown,
2383
+ mount
2384
+ }, $[15] = activeElement, $[16] = activeIndex, $[17] = handleItemMouseLeave, $[18] = handleKeyDown, $[19] = mount, $[20] = t8) : t8 = $[20], t8;
2385
+ }
2386
+ function _temp$3() {}
2387
+ const StyledMenu = (0, styled_components.styled)(Box).withConfig({
2388
+ displayName: "StyledMenu",
2389
+ componentId: "sc-xvs9y5-0"
2390
+ })`outline:none;overflow:auto;`, Menu = (0, react.forwardRef)(function Menu(props, forwardedRef) {
2391
+ let $ = (0, react_compiler_runtime.c)(50), _shouldFocus, children, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
2392
+ if ($[0] !== props) {
2393
+ let { children: t2, focusFirst, focusLast, onClickOutside: t3, onEscape: t4, onItemClick: t5, onItemSelect: t6, onKeyDown: t7, originElement: t8, padding: t9, registerElement: t10, shouldFocus: t11, gap: t12, space: t13, ...t14 } = props;
2394
+ children = t2, onClickOutside = t3, onEscape = t4, onItemClick = t5, onItemSelect = t6, onKeyDown = t7, originElement = t8, t0 = t9, registerElement = t10, _shouldFocus = t11, gap = t12, t1 = t13, restProps = t14, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = gap, $[4] = onClickOutside, $[5] = onEscape, $[6] = onItemClick, $[7] = onItemSelect, $[8] = onKeyDown, $[9] = originElement, $[10] = registerElement, $[11] = restProps, $[12] = t0, $[13] = t1;
2395
+ } else _shouldFocus = $[1], children = $[2], gap = $[3], onClickOutside = $[4], onEscape = $[5], onItemClick = $[6], onItemSelect = $[7], onKeyDown = $[8], originElement = $[9], registerElement = $[10], restProps = $[11], t0 = $[12], t1 = $[13];
2396
+ let padding = t0 === void 0 ? 1 : t0, spacing = gap === void 0 ? t1 === void 0 ? 1 : t1 : gap, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = (0, react.useRef)(null), t2;
2397
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[14] = t2) : t2 = $[14], (0, react.useImperativeHandle)(forwardedRef, t2);
2398
+ let { isTopLayer } = useLayer(), t3;
2399
+ $[15] !== onKeyDown || $[16] !== originElement || $[17] !== shouldFocus ? (t3 = {
2400
+ onKeyDown,
2401
+ originElement,
2402
+ shouldFocus,
2403
+ rootElementRef: ref
2404
+ }, $[15] = onKeyDown, $[16] = originElement, $[17] = shouldFocus, $[18] = t3) : t3 = $[18];
2405
+ let { activeElement, activeIndex, handleItemMouseEnter, handleItemMouseLeave, handleKeyDown, mount } = useMenuController(t3), unregisterElementRef = (0, react.useRef)(null), t4;
2406
+ $[19] === registerElement ? t4 = $[20] : (t4 = (el) => {
2407
+ unregisterElementRef.current &&= (unregisterElementRef.current(), null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
2408
+ }, $[19] = registerElement, $[20] = t4);
2409
+ let handleRefChange = t4, t5, t6;
2410
+ $[21] !== activeIndex || $[22] !== onItemSelect ? (t5 = () => {
2411
+ onItemSelect && onItemSelect(activeIndex);
2412
+ }, t6 = [activeIndex, onItemSelect], $[21] = activeIndex, $[22] = onItemSelect, $[23] = t5, $[24] = t6) : (t5 = $[23], t6 = $[24]), (0, react.useEffect)(t5, t6);
2413
+ let t7;
2414
+ $[25] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[25] = t7) : t7 = $[25], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
2415
+ let t8;
2416
+ $[26] !== isTopLayer || $[27] !== onEscape ? (t8 = (event) => {
2417
+ isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
2418
+ }, $[26] = isTopLayer, $[27] = onEscape, $[28] = t8) : t8 = $[28], useGlobalKeyDown(t8);
2419
+ let t9;
2420
+ $[29] !== activeElement || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t9 = {
2421
+ version: 2,
2422
+ activeElement,
2423
+ mount,
2424
+ onClickOutside,
2425
+ onEscape,
2426
+ onItemClick,
2427
+ onItemMouseEnter: handleItemMouseEnter,
2428
+ onItemMouseLeave: handleItemMouseLeave,
2429
+ registerElement
2430
+ }, $[29] = activeElement, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t9) : t9 = $[37];
2431
+ let value = t9, t10;
2432
+ $[38] !== children || $[39] !== spacing ? (t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Stack, {
2433
+ gap: spacing,
2434
+ children
2435
+ }), $[38] = children, $[39] = spacing, $[40] = t10) : t10 = $[40];
2436
+ let t11;
2437
+ $[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t10 ? (t11 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledMenu, {
2438
+ "data-ui": "Menu",
2439
+ ...restProps,
2440
+ onKeyDown: handleKeyDown,
2441
+ padding,
2442
+ ref: handleRefChange,
2443
+ role: "menu",
2444
+ tabIndex: -1,
2445
+ children: t10
2446
+ }), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t10, $[46] = t11) : t11 = $[46];
2447
+ let t12;
2448
+ return $[47] !== t11 || $[48] !== value ? (t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuContext.Provider, {
2449
+ value,
2450
+ children: t11
2451
+ }), $[47] = t11, $[48] = value, $[49] = t12) : t12 = $[49], t12;
2452
+ }), MenuDivider = styled_components.styled.hr.withConfig({
2453
+ displayName: "MenuDivider",
2454
+ componentId: "sc-sxuath-0"
2455
+ })`height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;`;
2456
+ function selectableBaseStyle() {
2457
+ return styled_components.css`background-color:inherit;color:inherit;&[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{text-decoration:none;}`;
2458
+ }
2459
+ function selectableColorStyle(props) {
2460
+ let { $tone } = props, { color, style } = require_getScopedTheme.i(props.theme), tone = color.selectable[$tone];
2461
+ return styled_components.css`${_cardColorStyle(color, tone.enabled)} background-color:var(--card-bg-color);color:var(--card-fg-color);outline:none;&[data-as='button']{&:disabled{${_cardColorStyle(color, tone.disabled)}}&:not(:disabled){&[aria-pressed='true']{${_cardColorStyle(color, tone.pressed)}}&[data-selected],&[aria-selected='true'] > &{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}&[data-as='a']{&[data-disabled]{${_cardColorStyle(color, tone.disabled)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, tone.pressed)}}&[data-selected]{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}${style?.card?.root}`;
2462
+ }
2463
+ /**
2464
+ * @internal
2465
+ */
2466
+ const Selectable = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
2467
+ displayName: "Selectable",
2468
+ componentId: "sc-njdnrn-0"
2469
+ })(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
2470
+ function useMenu() {
2471
+ let value = (0, react.useContext)(MenuContext);
2472
+ if (!value) throw Error("useMenu(): missing context value");
2473
+ if (!isRecord(value) || value.version !== 2) throw Error("useMenu(): the context value is not compatible");
2474
+ return value;
2475
+ }
2476
+ /**
2477
+ * @public
2478
+ */
2479
+ const MenuGroup = function MenuGroup(props) {
2480
+ let $ = (0, react_compiler_runtime.c)(82), IconComponent, children, gap, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
2481
+ $[0] === props ? (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover = $[6], restProps = $[7], t0 = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13], text = $[14]) : ({as: t0, children, fontSize: t1, icon: IconComponent, menu: menuProps, onClick, padding: t2, popover, radius: t3, gap, space: t4, text, tone: t5, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover, $[7] = restProps, $[8] = t0, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5, $[14] = text);
2482
+ let as = t0 === void 0 ? "button" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, spacing = gap === void 0 ? deprecated_space : gap, menu = useMenu(), { scheme } = useRootTheme(), { activeElement, mount, onClickOutside, onEscape, onItemClick, onItemMouseEnter: _onItemMouseEnter, registerElement } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = (0, react.useState)(null), [open, setOpen] = (0, react.useState)(!1), [shouldFocus, setShouldFocus] = (0, react.useState)(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = (0, react.useState)(!1), t6;
2483
+ $[15] === onItemMouseEnter ? t6 = $[16] : (t6 = (event) => {
2484
+ setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
2485
+ }, $[15] = onItemMouseEnter, $[16] = t6);
2486
+ let handleMouseEnter = t6, t7;
2487
+ $[17] === rootElement ? t7 = $[18] : (t7 = (event_0) => {
2488
+ event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
2489
+ rootElement?.focus();
2490
+ }));
2491
+ }, $[17] = rootElement, $[18] = t7);
2492
+ let handleMenuKeyDown = t7, t8;
2493
+ $[19] === onClick ? t8 = $[20] : (t8 = (event_1) => {
2494
+ onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
2495
+ }, $[19] = onClick, $[20] = t8);
2496
+ let handleClick = t8, t9;
2497
+ $[21] === onItemClick ? t9 = $[22] : (t9 = () => {
2498
+ setOpen(!1), onItemClick?.();
2499
+ }, $[21] = onItemClick, $[22] = t9);
2500
+ let handleChildItemClick = t9, t10;
2501
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => setWithinMenu(!0), $[23] = t10) : t10 = $[23];
2502
+ let handleMenuMouseEnter = t10, t11, t12;
2503
+ $[24] !== mount || $[25] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[24] = mount, $[25] = rootElement, $[26] = t11, $[27] = t12) : (t11 = $[26], t12 = $[27]), (0, react.useEffect)(t11, t12);
2504
+ let t13, t14;
2505
+ $[28] === active ? (t13 = $[29], t14 = $[30]) : (t13 = () => {
2506
+ active || setOpen(!1);
2507
+ }, t14 = [active], $[28] = active, $[29] = t13, $[30] = t14), (0, react.useEffect)(t13, t14);
2508
+ let t15, t16;
2509
+ $[31] === open ? (t15 = $[32], t16 = $[33]) : (t15 = () => {
2510
+ open || setWithinMenu(!1);
2511
+ }, t16 = [open], $[31] = open, $[32] = t15, $[33] = t16), (0, react.useEffect)(t15, t16);
2512
+ let t17, t18;
2513
+ $[34] === shouldFocus ? (t17 = $[35], t18 = $[36]) : (t17 = () => {
2514
+ if (!shouldFocus) return;
2515
+ let rafId = requestAnimationFrame(() => setShouldFocus(null));
2516
+ return () => cancelAnimationFrame(rafId);
2517
+ }, t18 = [shouldFocus], $[34] = shouldFocus, $[35] = t17, $[36] = t18), (0, react.useEffect)(t17, t18);
2518
+ let t19;
2519
+ $[37] !== children || $[38] !== handleChildItemClick || $[39] !== handleMenuKeyDown || $[40] !== menuProps || $[41] !== onClickOutside || $[42] !== onEscape || $[43] !== registerElement || $[44] !== shouldFocus ? (t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu, {
2520
+ ...menuProps,
2521
+ onClickOutside,
2522
+ onEscape,
2523
+ onItemClick: handleChildItemClick,
2524
+ onKeyDown: handleMenuKeyDown,
2525
+ onMouseEnter: handleMenuMouseEnter,
2526
+ registerElement,
2527
+ shouldFocus,
2528
+ children
2529
+ }), $[37] = children, $[38] = handleChildItemClick, $[39] = handleMenuKeyDown, $[40] = menuProps, $[41] = onClickOutside, $[42] = onEscape, $[43] = registerElement, $[44] = shouldFocus, $[45] = t19) : t19 = $[45];
2530
+ let childMenu = t19, t20;
2531
+ $[46] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
2532
+ let target = event_2.currentTarget;
2533
+ if (document.activeElement === target && event_2.key === "ArrowRight") {
2534
+ setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
2535
+ return;
2536
+ }
2537
+ }, $[46] = t20) : t20 = $[46];
2538
+ let handleKeyDown = t20, t21 = as === "button" ? withinMenu : void 0, t22 = as === "button" ? void 0 : withinMenu, t23 = !withinMenu && active ? "" : void 0, t24;
2539
+ $[47] === radius ? t24 = $[48] : (t24 = _getArrayProp(radius), $[47] = radius, $[48] = t24);
2540
+ let t25 = as === "button" ? "button" : void 0, t26;
2541
+ $[49] !== IconComponent || $[50] !== fontSize ? (t26 = IconComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
2542
+ size: fontSize,
2543
+ children: [(0, react.isValidElement)(IconComponent) && IconComponent, (0, react_is.isValidElementType)(IconComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {})]
2544
+ }), $[49] = IconComponent, $[50] = fontSize, $[51] = t26) : t26 = $[51];
2545
+ let t27;
2546
+ $[52] !== fontSize || $[53] !== text ? (t27 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
2547
+ flex: 1,
2548
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
2549
+ size: fontSize,
2550
+ textOverflow: "ellipsis",
2551
+ weight: "medium",
2552
+ children: text
2553
+ })
2554
+ }), $[52] = fontSize, $[53] = text, $[54] = t27) : t27 = $[54];
2555
+ let t28;
2556
+ $[55] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_sanity_icons_ChevronRight.ChevronRightIcon, {}), $[55] = t28) : t28 = $[55];
2557
+ let t29;
2558
+ $[56] === fontSize ? t29 = $[57] : (t29 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
2559
+ size: fontSize,
2560
+ children: t28
2561
+ }), $[56] = fontSize, $[57] = t29);
2562
+ let t30;
2563
+ $[58] !== padding || $[59] !== spacing || $[60] !== t26 || $[61] !== t27 || $[62] !== t29 ? (t30 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Flex, {
2564
+ gap: spacing,
2565
+ padding,
2566
+ children: [
2567
+ t26,
2568
+ t27,
2569
+ t29
2570
+ ]
2571
+ }), $[58] = padding, $[59] = spacing, $[60] = t26, $[61] = t27, $[62] = t29, $[63] = t30) : t30 = $[63];
2572
+ let t31;
2573
+ $[64] !== as || $[65] !== handleClick || $[66] !== handleMouseEnter || $[67] !== restProps || $[68] !== scheme || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 || $[73] !== t25 || $[74] !== t30 || $[75] !== tone ? (t31 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Selectable, {
2574
+ "data-as": as,
2575
+ "data-ui": "MenuGroup",
2576
+ forwardedAs: as,
2577
+ ...restProps,
2578
+ "aria-pressed": t21,
2579
+ "data-pressed": t22,
2580
+ "data-selected": t23,
2581
+ $radius: t24,
2582
+ $tone: tone,
2583
+ $scheme: scheme,
2584
+ onClick: handleClick,
2585
+ onKeyDown: handleKeyDown,
2586
+ onMouseEnter: handleMouseEnter,
2587
+ ref: setRootElement,
2588
+ tabIndex: -1,
2589
+ type: t25,
2590
+ children: t30
2591
+ }), $[64] = as, $[65] = handleClick, $[66] = handleMouseEnter, $[67] = restProps, $[68] = scheme, $[69] = t21, $[70] = t22, $[71] = t23, $[72] = t24, $[73] = t25, $[74] = t30, $[75] = tone, $[76] = t31) : t31 = $[76];
2592
+ let t32;
2593
+ return $[77] !== childMenu || $[78] !== open || $[79] !== popover || $[80] !== t31 ? (t32 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Popover, {
2594
+ ...popover,
2595
+ content: childMenu,
2596
+ "data-ui": "MenuGroup__popover",
2597
+ open,
2598
+ children: t31
2599
+ }), $[77] = childMenu, $[78] = open, $[79] = popover, $[80] = t31, $[81] = t32) : t32 = $[81], t32;
2600
+ }, MenuItem = (0, react.forwardRef)(function MenuItem(props, forwardedRef) {
2601
+ let $ = (0, react_compiler_runtime.c)(76), IconComponent, IconRightComponent, children, disabled, gap, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
2602
+ $[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], hotkeys = $[6], onClick = $[7], paddingBottom = $[8], paddingLeft = $[9], paddingRight = $[10], paddingTop = $[11], paddingX = $[12], paddingY = $[13], pressed = $[14], restProps = $[15], selectedProp = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], text = $[23]) : ({as: t0, children, disabled, fontSize: t1, hotkeys, icon: IconComponent, iconRight: IconRightComponent, onClick, padding: t2, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, pressed, radius: t3, selected: selectedProp, gap, space: t4, text, tone: t5, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = hotkeys, $[7] = onClick, $[8] = paddingBottom, $[9] = paddingLeft, $[10] = paddingRight, $[11] = paddingTop, $[12] = paddingX, $[13] = paddingY, $[14] = pressed, $[15] = restProps, $[16] = selectedProp, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = text);
2603
+ let as = t0 === void 0 ? "button" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, spacing = gap === void 0 ? deprecated_space : gap, { scheme } = useRootTheme(), menu = useMenu(), { activeElement, mount, onItemClick, onItemMouseEnter: _onItemMouseEnter, onItemMouseLeave: _onItemMouseLeave } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = (0, react.useState)(null), active = !!activeElement && activeElement === rootElement, ref = (0, react.useRef)(null), t6;
2604
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[24] = t6) : t6 = $[24], (0, react.useImperativeHandle)(forwardedRef, t6);
2605
+ let t7, t8;
2606
+ $[25] !== mount || $[26] !== rootElement || $[27] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [
2607
+ mount,
2608
+ rootElement,
2609
+ selectedProp
2610
+ ], $[25] = mount, $[26] = rootElement, $[27] = selectedProp, $[28] = t7, $[29] = t8) : (t7 = $[28], t8 = $[29]), (0, react.useEffect)(t7, t8);
2611
+ let t9;
2612
+ $[30] !== disabled || $[31] !== onClick || $[32] !== onItemClick ? (t9 = (event) => {
2613
+ disabled || (onClick && onClick(event), onItemClick && onItemClick());
2614
+ }, $[30] = disabled, $[31] = onClick, $[32] = onItemClick, $[33] = t9) : t9 = $[33];
2615
+ let handleClick = t9, t10;
2616
+ $[34] !== padding || $[35] !== paddingBottom || $[36] !== paddingLeft || $[37] !== paddingRight || $[38] !== paddingTop || $[39] !== paddingX || $[40] !== paddingY ? (t10 = {
2617
+ padding,
2618
+ paddingX,
2619
+ paddingY,
2620
+ paddingTop,
2621
+ paddingRight,
2622
+ paddingBottom,
2623
+ paddingLeft
2624
+ }, $[34] = padding, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = t10) : t10 = $[41];
2625
+ let paddingProps = t10, t11;
2626
+ $[42] === fontSize ? t11 = $[43] : (t11 = _getArrayProp(fontSize).map(_temp$2), $[42] = fontSize, $[43] = t11);
2627
+ let hotkeysFontSize = t11, t12;
2628
+ $[44] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
2629
+ ref.current = el, setRootElement(el);
2630
+ }, $[44] = t12) : t12 = $[44];
2631
+ let setRef = t12, t13 = as !== "button" && pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0, t16;
2632
+ $[45] === radius ? t16 = $[46] : (t16 = _getArrayProp(radius), $[45] = radius, $[46] = t16);
2633
+ let t17;
2634
+ $[47] === Symbol.for("react.memo_cache_sentinel") ? (t17 = _getArrayProp(0), $[47] = t17) : t17 = $[47];
2635
+ let t18 = disabled ? "default" : tone, t19 = as === "button" ? "button" : void 0, t20;
2636
+ $[48] !== IconComponent || $[49] !== IconRightComponent || $[50] !== fontSize || $[51] !== hotkeys || $[52] !== hotkeysFontSize || $[53] !== paddingProps || $[54] !== spacing || $[55] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Flex, {
2637
+ as: "span",
2638
+ gap: spacing,
2639
+ align: "center",
2640
+ ...paddingProps,
2641
+ children: [
2642
+ IconComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
2643
+ size: fontSize,
2644
+ children: [(0, react.isValidElement)(IconComponent) && IconComponent, (0, react_is.isValidElementType)(IconComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {})]
2645
+ }),
2646
+ text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
2647
+ flex: 1,
2648
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
2649
+ size: fontSize,
2650
+ textOverflow: "ellipsis",
2651
+ weight: "medium",
2652
+ children: text
2653
+ })
2654
+ }),
2655
+ hotkeys && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hotkeys, {
2656
+ fontSize: hotkeysFontSize,
2657
+ keys: hotkeys,
2658
+ style: {
2659
+ marginTop: -4,
2660
+ marginBottom: -4
2661
+ }
2662
+ }),
2663
+ IconRightComponent && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Text, {
2664
+ size: fontSize,
2665
+ children: [(0, react.isValidElement)(IconRightComponent) && IconRightComponent, (0, react_is.isValidElementType)(IconRightComponent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconRightComponent, {})]
2666
+ })
2667
+ ]
2668
+ }), $[48] = IconComponent, $[49] = IconRightComponent, $[50] = fontSize, $[51] = hotkeys, $[52] = hotkeysFontSize, $[53] = paddingProps, $[54] = spacing, $[55] = text, $[56] = t20) : t20 = $[56];
2669
+ let t21;
2670
+ $[57] !== children || $[58] !== paddingProps ? (t21 = children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
2671
+ as: "span",
2672
+ ...paddingProps,
2673
+ children
2674
+ }), $[57] = children, $[58] = paddingProps, $[59] = t21) : t21 = $[59];
2675
+ let t22;
2676
+ return $[60] !== as || $[61] !== disabled || $[62] !== handleClick || $[63] !== onItemMouseEnter || $[64] !== onItemMouseLeave || $[65] !== restProps || $[66] !== scheme || $[67] !== t13 || $[68] !== t14 || $[69] !== t15 || $[70] !== t16 || $[71] !== t18 || $[72] !== t19 || $[73] !== t20 || $[74] !== t21 ? (t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Selectable, {
2677
+ "data-ui": "MenuItem",
2678
+ role: "menuitem",
2679
+ ...restProps,
2680
+ "data-pressed": t13,
2681
+ "data-selected": t14,
2682
+ "data-disabled": t15,
2683
+ forwardedAs: as,
2684
+ $radius: t16,
2685
+ $padding: t17,
2686
+ $tone: t18,
2687
+ $scheme: scheme,
2688
+ disabled,
2689
+ onClick: handleClick,
2690
+ onMouseEnter: onItemMouseEnter,
2691
+ onMouseLeave: onItemMouseLeave,
2692
+ ref: setRef,
2693
+ tabIndex: -1,
2694
+ type: t19,
2695
+ children: [t20, t21]
2696
+ }), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = restProps, $[66] = scheme, $[67] = t13, $[68] = t14, $[69] = t15, $[70] = t16, $[71] = t18, $[72] = t19, $[73] = t20, $[74] = t21, $[75] = t22) : t22 = $[75], t22;
2697
+ });
2698
+ function _temp$2(s) {
2699
+ return s - 1;
2700
+ }
2701
+ const CustomButton = (0, styled_components.styled)(Button).withConfig({
2702
+ displayName: "CustomButton",
2703
+ componentId: "sc-whlh6p-0"
2704
+ })`max-width:100%;`, Tab = (0, react.forwardRef)(function Tab(props, forwardedRef) {
2705
+ let $ = (0, react_compiler_runtime.c)(30), focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
2706
+ $[0] === props ? (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]) : ({icon, id, focused, fontSize: t0, label, onClick, onFocus, padding: t1, selected, ...restProps} = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1);
2707
+ let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = (0, react.useRef)(null), focusedRef = (0, react.useRef)(!1), t2;
2708
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], (0, react.useImperativeHandle)(forwardedRef, t2);
2709
+ let t3;
2710
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
2711
+ focusedRef.current = !1;
2712
+ }, $[12] = t3) : t3 = $[12];
2713
+ let handleBlur = t3, t4;
2714
+ $[13] === onFocus ? t4 = $[14] : (t4 = (event) => {
2715
+ focusedRef.current = !0, onFocus && onFocus(event);
2716
+ }, $[13] = onFocus, $[14] = t4);
2717
+ let handleFocus = t4, t5, t6;
2718
+ $[15] === focused ? (t5 = $[16], t6 = $[17]) : (t5 = () => {
2719
+ focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
2720
+ }, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6), (0, react.useEffect)(t5, t6);
2721
+ let t7 = selected ? "true" : "false", t8 = selected ? 0 : -1, t9;
2722
+ return $[18] !== fontSize || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomButton, {
2723
+ "data-ui": "Tab",
2724
+ ...restProps,
2725
+ "aria-selected": t7,
2726
+ fontSize,
2727
+ icon,
2728
+ id,
2729
+ mode: "bleed",
2730
+ onClick,
2731
+ onBlur: handleBlur,
2732
+ onFocus: handleFocus,
2733
+ padding,
2734
+ ref,
2735
+ role: "tab",
2736
+ selected,
2737
+ tabIndex: t8,
2738
+ text: label,
2739
+ type: "button"
2740
+ }), $[18] = fontSize, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
2741
+ }), CustomInline = (0, styled_components.styled)(Inline).withConfig({
2742
+ displayName: "CustomInline",
2743
+ componentId: "sc-tlz8f1-0"
2744
+ })`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList = (0, react.forwardRef)(function TabList(props, ref) {
2745
+ let $ = (0, react_compiler_runtime.c)(15), childrenProp, restProps;
2746
+ $[0] === props ? (childrenProp = $[1], restProps = $[2]) : ({children: childrenProp, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps);
2747
+ let [focusedIndex, setFocusedIndex] = (0, react.useState)(-1), t0;
2748
+ if ($[3] !== childrenProp || $[4] !== focusedIndex) {
2749
+ let children = react.Children.toArray(childrenProp).filter(react.isValidElement), t1;
2750
+ $[6] === focusedIndex ? t1 = $[7] : (t1 = (child, childIndex) => (0, react.cloneElement)(child, {
2751
+ focused: focusedIndex === childIndex,
2752
+ key: childIndex,
2753
+ onFocus: () => setFocusedIndex(childIndex)
2754
+ }), $[6] = focusedIndex, $[7] = t1), t0 = children.map(t1), $[3] = childrenProp, $[4] = focusedIndex, $[5] = t0;
2755
+ } else t0 = $[5];
2756
+ let tabs = t0, numTabs = tabs.length, t1;
2757
+ $[8] === numTabs ? t1 = $[9] : (t1 = (event) => {
2758
+ event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
2759
+ }, $[8] = numTabs, $[9] = t1);
2760
+ let handleKeyDown = t1, t2;
2761
+ return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomInline, {
2762
+ "data-ui": "TabList",
2763
+ ...restProps,
2764
+ onKeyDown: handleKeyDown,
2765
+ ref,
2766
+ role: "tablist",
2767
+ children: tabs
2768
+ }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
2769
+ }), GRID_CSS = {
2770
+ "&&:not([hidden])": { display: "grid" },
2771
+ "&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none" }
2772
+ }, GRID_AUTO_COLUMS = {
2773
+ auto: "auto",
2774
+ min: "min-content",
2775
+ max: "max-content",
2776
+ fr: "minmax(0, 1fr)"
2777
+ }, GRID_AUTO_ROWS = {
2778
+ auto: "auto",
2779
+ min: "min-content",
2780
+ max: "max-content",
2781
+ fr: "minmax(0, 1fr)"
2782
+ };
2783
+ function responsiveGridStyle() {
2784
+ return [
2785
+ GRID_CSS,
2786
+ responsiveGridAutoFlowStyle,
2787
+ responsiveGridAutoRowsStyle,
2788
+ responsiveGridAutoColsStyle,
2789
+ responsiveGridColumnsStyle,
2790
+ responsiveGridRowsStyle,
2791
+ responsiveGridGapStyle,
2792
+ responsiveGridGapXStyle,
2793
+ responsiveGridGapYStyle
2794
+ ];
2795
+ }
2796
+ function responsiveGridAutoFlowStyle(props) {
2797
+ let { media } = require_getScopedTheme.i(props.theme);
2798
+ return _responsive(media, props.$autoFlow, (autoFlow) => ({ gridAutoFlow: autoFlow }));
2799
+ }
2800
+ function responsiveGridAutoRowsStyle(props) {
2801
+ let { media } = require_getScopedTheme.i(props.theme);
2802
+ return _responsive(media, props.$autoRows, (autoRows) => ({ gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows] }));
2803
+ }
2804
+ function responsiveGridAutoColsStyle(props) {
2805
+ let { media } = require_getScopedTheme.i(props.theme);
2806
+ return _responsive(media, props.$autoCols, (autoCols) => ({ gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols] }));
2807
+ }
2808
+ function responsiveGridColumnsStyle(props) {
2809
+ let { media } = require_getScopedTheme.i(props.theme);
2810
+ return _responsive(media, props.$columns, (columns) => ({ gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));` }));
2811
+ }
2812
+ function responsiveGridRowsStyle(props) {
2813
+ let { media } = require_getScopedTheme.i(props.theme);
2814
+ return _responsive(media, props.$rows, (rows) => ({ gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));` }));
2815
+ }
2816
+ function responsiveGridGapStyle(props) {
2817
+ let { media, space } = require_getScopedTheme.i(props.theme);
2818
+ return _responsive(media, props.$gap, (gap) => ({ gridGap: gap ? rem(space[gap]) : void 0 }));
2819
+ }
2820
+ function responsiveGridGapXStyle(props) {
2821
+ let { media, space } = require_getScopedTheme.i(props.theme);
2822
+ return _responsive(media, props.$gapX, (gapX) => ({ columnGap: gapX ? rem(space[gapX]) : void 0 }));
2823
+ }
2824
+ function responsiveGridGapYStyle(props) {
2825
+ let { media, space } = require_getScopedTheme.i(props.theme);
2826
+ return _responsive(media, props.$gapY, (gapY) => ({ rowGap: gapY ? rem(space[gapY]) : void 0 }));
2827
+ }
2828
+ const StyledGrid = /* @__PURE__ */ (0, styled_components.styled)(Box).withConfig({
2829
+ displayName: "StyledGrid",
2830
+ componentId: "sc-osmjhz-0"
2831
+ })(responsiveGridStyle), Grid = (0, react.forwardRef)(function Grid(props, ref) {
2832
+ let $ = (0, react_compiler_runtime.c)(44), as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, gridTemplateColumns, gridTemplateRows, restProps, rows;
2833
+ $[0] === props ? (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], gridTemplateColumns = $[10], gridTemplateRows = $[11], restProps = $[12], rows = $[13]) : ({as, autoRows, autoCols, autoFlow, columns, gridTemplateColumns, gap, gapX, gapY, rows, gridTemplateRows, children, ...restProps} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = gridTemplateColumns, $[11] = gridTemplateRows, $[12] = restProps, $[13] = rows);
2834
+ let t0 = typeof as == "string" ? as : void 0, t1;
2835
+ $[14] === autoRows ? t1 = $[15] : (t1 = _getArrayProp(autoRows), $[14] = autoRows, $[15] = t1);
2836
+ let t2;
2837
+ $[16] === autoCols ? t2 = $[17] : (t2 = _getArrayProp(autoCols), $[16] = autoCols, $[17] = t2);
2838
+ let t3;
2839
+ $[18] === autoFlow ? t3 = $[19] : (t3 = _getArrayProp(autoFlow), $[18] = autoFlow, $[19] = t3);
2840
+ let t4 = gridTemplateColumns === void 0 ? columns : gridTemplateColumns, t5;
2841
+ $[20] === t4 ? t5 = $[21] : (t5 = _getArrayProp(t4), $[20] = t4, $[21] = t5);
2842
+ let t6;
2843
+ $[22] === gap ? t6 = $[23] : (t6 = _getArrayProp(gap), $[22] = gap, $[23] = t6);
2844
+ let t7;
2845
+ $[24] === gapX ? t7 = $[25] : (t7 = _getArrayProp(gapX), $[24] = gapX, $[25] = t7);
2846
+ let t8;
2847
+ $[26] === gapY ? t8 = $[27] : (t8 = _getArrayProp(gapY), $[26] = gapY, $[27] = t8);
2848
+ let t9 = gridTemplateRows === void 0 ? rows : gridTemplateRows, t10;
2849
+ $[28] === t9 ? t10 = $[29] : (t10 = _getArrayProp(t9), $[28] = t9, $[29] = t10);
2850
+ let t11;
2851
+ return $[30] !== as || $[31] !== children || $[32] !== ref || $[33] !== restProps || $[34] !== t0 || $[35] !== t1 || $[36] !== t10 || $[37] !== t2 || $[38] !== t3 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 ? (t11 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledGrid, {
2852
+ "data-as": t0,
2853
+ "data-ui": "Grid",
2854
+ ...restProps,
2855
+ $autoRows: t1,
2856
+ $autoCols: t2,
2857
+ $autoFlow: t3,
2858
+ $columns: t5,
2859
+ $gap: t6,
2860
+ $gapX: t7,
2861
+ $gapY: t8,
2862
+ $rows: t10,
2863
+ forwardedAs: as,
2864
+ ref,
2865
+ children
2866
+ }), $[30] = as, $[31] = children, $[32] = ref, $[33] = restProps, $[34] = t0, $[35] = t1, $[36] = t10, $[37] = t2, $[38] = t3, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t11) : t11 = $[43], t11;
2867
+ });
2868
+ /**
2869
+ * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
2870
+ *
2871
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2872
+ *
2873
+ * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
2874
+ * Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
2875
+ * @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
2876
+ *
2877
+ * @public
2878
+ */
2879
+ function usePrefersDark(t0) {
2880
+ return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$1 : t0);
2881
+ }
2882
+ function _temp$1() {
2883
+ return !1;
2884
+ }
2885
+ /**
2886
+ * @beta
2887
+ */
2888
+ function useDelayedState(initialState) {
2889
+ let $ = (0, react_compiler_runtime.c)(5), [state, setState] = (0, react.useState)(initialState), delayedAction = (0, react.useRef)(void 0), t0;
2890
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (nextState, delay) => {
2891
+ let action = () => {
2892
+ setState(nextState);
2893
+ };
2894
+ if (delayedAction.current &&= (clearTimeout(delayedAction.current), void 0), !delay) return action();
2895
+ delayedAction.current = setTimeout(action, delay);
2896
+ }, $[0] = t0) : t0 = $[0];
2897
+ let onStateChange = t0, t1, t2;
2898
+ $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => () => {
2899
+ delayedAction.current && clearTimeout(delayedAction.current);
2900
+ }, t2 = [], $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), (0, react.useEffect)(t1, t2);
2901
+ let t3;
2902
+ return $[3] === state ? t3 = $[4] : (t3 = [state, onStateChange], $[3] = state, $[4] = t3), t3;
2903
+ }
2904
+ const DEFAULT_FALLBACK_PLACEMENTS = {
2905
+ top: [
2906
+ "top-end",
2907
+ "top-start",
2908
+ "bottom",
2909
+ "left",
2910
+ "right"
2911
+ ],
2912
+ "top-start": [
2913
+ "top",
2914
+ "top-end",
2915
+ "bottom-start",
2916
+ "left-start",
2917
+ "right-start"
2918
+ ],
2919
+ "top-end": [
2920
+ "top",
2921
+ "top-start",
2922
+ "bottom-end",
2923
+ "left-end",
2924
+ "right-end"
2925
+ ],
2926
+ bottom: [
2927
+ "bottom-end",
2928
+ "bottom-start",
2929
+ "top",
2930
+ "left",
2931
+ "right"
2932
+ ],
2933
+ "bottom-start": [
2934
+ "bottom",
2935
+ "bottom-end",
2936
+ "top-start",
2937
+ "left-start",
2938
+ "right-start"
2939
+ ],
2940
+ "bottom-end": [
2941
+ "bottom",
2942
+ "bottom-start",
2943
+ "top-end",
2944
+ "left-end",
2945
+ "right-end"
2946
+ ],
2947
+ left: [
2948
+ "left-end",
2949
+ "left-start",
2950
+ "right",
2951
+ "top",
2952
+ "bottom"
2953
+ ],
2954
+ "left-start": [
2955
+ "left",
2956
+ "left-end",
2957
+ "right-start",
2958
+ "top-start",
2959
+ "bottom-start"
2960
+ ],
2961
+ "left-end": [
2962
+ "left",
2963
+ "left-start",
2964
+ "right-end",
2965
+ "top-end",
2966
+ "bottom-end"
2967
+ ],
2968
+ right: [
2969
+ "right-end",
2970
+ "right-start",
2971
+ "left",
2972
+ "top",
2973
+ "bottom"
2974
+ ],
2975
+ "right-start": [
2976
+ "right",
2977
+ "right-end",
2978
+ "left-start",
2979
+ "top-start",
2980
+ "bottom-start"
2981
+ ],
2982
+ "right-end": [
2983
+ "right",
2984
+ "right-start",
2985
+ "left-end",
2986
+ "top-end",
2987
+ "bottom-end"
2988
+ ]
2989
+ }, MotionCard = (0, styled_components.styled)(motion_react.motion.create(Card)).withConfig({
2990
+ displayName: "MotionCard",
2991
+ componentId: "sc-k6wgsf-0"
2992
+ })`will-change:transform;`, TooltipCard = (0, react.forwardRef)(function TooltipCard(props, ref) {
2993
+ let $ = (0, react_compiler_runtime.c)(48), animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
2994
+ $[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]) : ({animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, scheme, shadow, style, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style);
2995
+ let t0 = animate ? "transform" : void 0, t1;
2996
+ $[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t0 ? (t1 = {
2997
+ originX,
2998
+ originY,
2999
+ willChange: t0,
3000
+ ...style
3001
+ }, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t0, $[20] = t1) : t1 = $[20];
3002
+ let rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;
3003
+ $[21] !== t2 || $[22] !== t3 ? (t4 = {
3004
+ left: t2,
3005
+ top: t3,
3006
+ right: void 0,
3007
+ bottom: void 0
3008
+ }, $[21] = t2, $[22] = t3, $[23] = t4) : t4 = $[23];
3009
+ let arrowStyle = t4, t5 = restProps, t6;
3010
+ $[24] === animate ? t6 = $[25] : (t6 = animate ? ["hidden", "initial"] : void 0, $[24] = animate, $[25] = t6);
3011
+ let t7;
3012
+ $[26] === animate ? t7 = $[27] : (t7 = animate ? ["visible", "scaleIn"] : void 0, $[26] = animate, $[27] = t7);
3013
+ let t8;
3014
+ $[28] === animate ? t8 = $[29] : (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[28] = animate, $[29] = t8);
3015
+ let t9;
3016
+ $[30] !== arrow || $[31] !== arrowRef || $[32] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Arrow, {
3017
+ ref: arrowRef,
3018
+ style: arrowStyle,
3019
+ width: 15,
3020
+ height: 6,
3021
+ radius: 2
3022
+ }), $[30] = arrow, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t9) : t9 = $[33];
3023
+ let t10;
3024
+ return $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle || $[40] !== scheme || $[41] !== shadow || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(MotionCard, {
3025
+ "data-ui": "Tooltip__card",
3026
+ ...t5,
3027
+ "data-placement": placement,
3028
+ padding,
3029
+ radius,
3030
+ ref,
3031
+ scheme,
3032
+ shadow,
3033
+ style: rootStyle,
3034
+ variants: POPOVER_MOTION_PROPS.card,
3035
+ transition: POPOVER_MOTION_PROPS.transition,
3036
+ initial: t6,
3037
+ animate: t7,
3038
+ exit: t8,
3039
+ children: [children, t9]
3040
+ }), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle, $[40] = scheme, $[41] = shadow, $[42] = t5, $[43] = t6, $[44] = t7, $[45] = t8, $[46] = t9, $[47] = t10) : t10 = $[47], t10;
3041
+ }), TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
3042
+ /**
3043
+ * @beta
3044
+ */
3045
+ function useTooltipDelayGroup() {
3046
+ return (0, react.useContext)(TooltipDelayGroupContext);
3047
+ }
3048
+ const StyledTooltip = (0, styled_components.styled)(Layer).withConfig({
3049
+ displayName: "StyledTooltip",
3050
+ componentId: "sc-4nppkj-0"
3051
+ })`pointer-events:none;`, Tooltip = (0, react.forwardRef)(function Tooltip(props, forwardedRef) {
3052
+ let $ = (0, react_compiler_runtime.c)(137), boundaryElementContext = useBoundaryElement(), { layer } = useTheme_v2(), _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;
3053
+ $[0] === props ? (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], portalProp = $[8], restProps = $[9], scheme = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16]) : ({animate: t0, arrow: t1, boundaryElement: _boundaryElement, children: childProp, content, disabled, fallbackPlacements: _fallbackPlacementsProp, padding: t2, placement: t3, portal: portalProp, radius: t4, scheme, shadow: t5, zOffset: _zOffset, delay, ...restProps} = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = portalProp, $[9] = restProps, $[10] = scheme, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5);
3054
+ let _animate = t0 !== void 0 && t0, arrowProp = t1 !== void 0 && t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? "bottom" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = !usePrefersReducedMotion() && _animate, t6;
3055
+ $[17] === fallbackPlacementsProp ? t6 = $[18] : (t6 = _getArrayProp(fallbackPlacementsProp), $[17] = fallbackPlacementsProp, $[18] = t6);
3056
+ let fallbackPlacements = t6, ref = (0, react.useRef)(null), [referenceElement, setReferenceElement] = (0, react.useState)(null), arrowRef = (0, react.useRef)(null), [tooltipMaxWidth, setTooltipMaxWidth] = (0, react.useState)(0), t7;
3057
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], (0, react.useImperativeHandle)(forwardedRef, t7);
3058
+ let portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, t8;
3059
+ $[20] !== animate || $[21] !== arrowProp || $[22] !== boundaryElement || $[23] !== fallbackPlacements ? (t8 = {
3060
+ animate,
3061
+ arrowProp,
3062
+ arrowRef,
3063
+ boundaryElement,
3064
+ fallbackPlacements,
3065
+ rootBoundary: "viewport"
3066
+ }, $[20] = animate, $[21] = arrowProp, $[22] = boundaryElement, $[23] = fallbackPlacements, $[24] = t8) : t8 = $[24];
3067
+ let middleware = useMiddleware(t8), t9;
3068
+ $[25] === referenceElement ? t9 = $[26] : (t9 = { reference: referenceElement }, $[25] = referenceElement, $[26] = t9);
3069
+ let t10;
3070
+ $[27] !== middleware || $[28] !== placementProp || $[29] !== t9 ? (t10 = {
3071
+ middleware,
3072
+ placement: placementProp,
3073
+ whileElementsMounted: _floating_ui_react_dom.autoUpdate,
3074
+ elements: t9
3075
+ }, $[27] = middleware, $[28] = placementProp, $[29] = t9, $[30] = t10) : t10 = $[30];
3076
+ let { floatingStyles, placement, middlewareData, refs, update } = (0, _floating_ui_react_dom.useFloating)(t10), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = (0, react.useId)(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), t11;
3077
+ $[31] === delayGroupContext ? t11 = $[32] : (t11 = delayGroupContext || {}, $[31] = delayGroupContext, $[32] = t11);
3078
+ let { setIsGroupActive, setOpenTooltipId } = t11, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, t12;
3079
+ $[33] !== closeDelay || $[34] !== isInsideGroup || $[35] !== openDelay || $[36] !== setIsGroupActive || $[37] !== setIsOpen || $[38] !== setOpenTooltipId || $[39] !== tooltipId ? (t12 = (open, immediate) => {
3080
+ if (isInsideGroup) if (open) {
3081
+ let groupedOpenDelay = immediate ? 0 : openDelay;
3082
+ setIsGroupActive?.(open, groupedOpenDelay), setOpenTooltipId?.(tooltipId, groupedOpenDelay);
3083
+ } else setIsGroupActive?.(open, closeDelay > 200 ? closeDelay : 200), setOpenTooltipId?.(null, immediate ? 0 : closeDelay);
3084
+ else setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
3085
+ }, $[33] = closeDelay, $[34] = isInsideGroup, $[35] = openDelay, $[36] = setIsGroupActive, $[37] = setIsOpen, $[38] = setOpenTooltipId, $[39] = tooltipId, $[40] = t12) : t12 = $[40];
3086
+ let handleIsOpenChange = t12, t13;
3087
+ $[41] !== childProp?.props || $[42] !== handleIsOpenChange ? (t13 = (e) => {
3088
+ handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
3089
+ }, $[41] = childProp?.props, $[42] = handleIsOpenChange, $[43] = t13) : t13 = $[43], childProp?.props;
3090
+ let handleBlur = t13, t14;
3091
+ $[44] !== childProp?.props || $[45] !== handleIsOpenChange ? (t14 = (e_0) => {
3092
+ handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
3093
+ }, $[44] = childProp?.props, $[45] = handleIsOpenChange, $[46] = t14) : t14 = $[46], childProp?.props;
3094
+ let handleClick = t14, t15;
3095
+ $[47] !== childProp?.props || $[48] !== handleIsOpenChange ? (t15 = (e_1) => {
3096
+ handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
3097
+ }, $[47] = childProp?.props, $[48] = handleIsOpenChange, $[49] = t15) : t15 = $[49], childProp?.props;
3098
+ let handleContextMenu = t15, t16;
3099
+ $[50] !== childProp?.props || $[51] !== handleIsOpenChange ? (t16 = (e_2) => {
3100
+ handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
3101
+ }, $[50] = childProp?.props, $[51] = handleIsOpenChange, $[52] = t16) : t16 = $[52], childProp?.props;
3102
+ let handleFocus = t16, t17;
3103
+ $[53] !== childProp?.props || $[54] !== handleIsOpenChange ? (t17 = (e_3) => {
3104
+ handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
3105
+ }, $[53] = childProp?.props, $[54] = handleIsOpenChange, $[55] = t17) : t17 = $[55], childProp?.props;
3106
+ let handleMouseEnter = t17, t18;
3107
+ $[56] !== childProp?.props || $[57] !== handleIsOpenChange ? (t18 = (e_4) => {
3108
+ handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
3109
+ }, $[56] = childProp?.props, $[57] = handleIsOpenChange, $[58] = t18) : t18 = $[58], childProp?.props;
3110
+ let handleMouseLeave = t18, t19;
3111
+ $[59] !== handleIsOpenChange || $[60] !== isInsideGroup || $[61] !== referenceElement || $[62] !== showTooltip ? (t19 = {
3112
+ handleIsOpenChange,
3113
+ referenceElement,
3114
+ showTooltip,
3115
+ isInsideGroup
3116
+ }, $[59] = handleIsOpenChange, $[60] = isInsideGroup, $[61] = referenceElement, $[62] = showTooltip, $[63] = t19) : t19 = $[63], useCloseOnMouseLeave(t19);
3117
+ let t20, t21;
3118
+ $[64] !== disabled || $[65] !== handleIsOpenChange || $[66] !== showTooltip ? (t20 = () => {
3119
+ disabled && showTooltip && handleIsOpenChange(!1);
3120
+ }, t21 = [
3121
+ disabled,
3122
+ handleIsOpenChange,
3123
+ showTooltip
3124
+ ], $[64] = disabled, $[65] = handleIsOpenChange, $[66] = showTooltip, $[67] = t20, $[68] = t21) : (t20 = $[67], t21 = $[68]), (0, react.useEffect)(t20, t21);
3125
+ let t22, t23;
3126
+ $[69] !== content || $[70] !== handleIsOpenChange || $[71] !== showTooltip ? (t22 = () => {
3127
+ !content && showTooltip && handleIsOpenChange(!1);
3128
+ }, t23 = [
3129
+ content,
3130
+ handleIsOpenChange,
3131
+ showTooltip
3132
+ ], $[69] = content, $[70] = handleIsOpenChange, $[71] = showTooltip, $[72] = t22, $[73] = t23) : (t22 = $[72], t23 = $[73]), (0, react.useEffect)(t22, t23);
3133
+ let t24, t25;
3134
+ $[74] !== handleIsOpenChange || $[75] !== showTooltip ? (t24 = () => {
3135
+ if (!showTooltip) return;
3136
+ let handleWindowKeyDown = function handleWindowKeyDown(event) {
3137
+ event.key === "Escape" && handleIsOpenChange(!1, !0);
3138
+ };
3139
+ return window.addEventListener("keydown", handleWindowKeyDown), () => {
3140
+ window.removeEventListener("keydown", handleWindowKeyDown);
3141
+ };
3142
+ }, t25 = [handleIsOpenChange, showTooltip], $[74] = handleIsOpenChange, $[75] = showTooltip, $[76] = t24, $[77] = t25) : (t24 = $[76], t25 = $[77]), (0, react.useEffect)(t24, t25);
3143
+ let t26;
3144
+ $[78] !== boundaryElement || $[79] !== portalElement?.offsetWidth ? (t26 = () => {
3145
+ let availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
3146
+ setTooltipMaxWidth(Math.min(...availableWidths) - 8);
3147
+ }, $[78] = boundaryElement, $[79] = portalElement?.offsetWidth, $[80] = t26) : t26 = $[80];
3148
+ let t27;
3149
+ $[81] !== boundaryElement || $[82] !== portalElement ? (t27 = [boundaryElement, portalElement], $[81] = boundaryElement, $[82] = portalElement, $[83] = t27) : t27 = $[83], (0, react.useLayoutEffect)(t26, t27);
3150
+ let t28;
3151
+ $[84] === update ? t28 = $[85] : (t28 = (arrowEl) => {
3152
+ arrowRef.current = arrowEl, update();
3153
+ }, $[84] = update, $[85] = t28);
3154
+ let setArrow = t28, t29;
3155
+ $[86] === refs ? t29 = $[87] : (t29 = (node) => {
3156
+ ref.current = node, refs.setFloating(node);
3157
+ }, $[86] = refs, $[87] = t29);
3158
+ let setFloating = t29, t30;
3159
+ bb0: {
3160
+ if (!childProp) {
3161
+ t30 = null;
3162
+ break bb0;
3163
+ }
3164
+ let t31;
3165
+ $[88] !== childProp || $[89] !== handleBlur || $[90] !== handleClick || $[91] !== handleContextMenu || $[92] !== handleFocus || $[93] !== handleMouseEnter || $[94] !== handleMouseLeave ? (t31 = (0, react.cloneElement)(childProp, {
3166
+ onBlur: handleBlur,
3167
+ onFocus: handleFocus,
3168
+ onMouseEnter: handleMouseEnter,
3169
+ onMouseLeave: handleMouseLeave,
3170
+ onClick: handleClick,
3171
+ onContextMenu: handleContextMenu,
3172
+ ref: setReferenceElement
3173
+ }), $[88] = childProp, $[89] = handleBlur, $[90] = handleClick, $[91] = handleContextMenu, $[92] = handleFocus, $[93] = handleMouseEnter, $[94] = handleMouseLeave, $[95] = t31) : t31 = $[95], t30 = t31;
3174
+ }
3175
+ let child = t30, t31;
3176
+ $[96] === childProp ? t31 = $[97] : (t31 = childProp ? getElementRef(childProp) : null, $[96] = childProp, $[97] = t31);
3177
+ let t32, t33;
3178
+ if ($[98] === referenceElement ? (t32 = $[99], t33 = $[100]) : (t32 = () => referenceElement, t33 = [referenceElement], $[98] = referenceElement, $[99] = t32, $[100] = t33), (0, react.useImperativeHandle)(t31, t32, t33), !child) {
3179
+ let t34;
3180
+ return $[101] === Symbol.for("react.memo_cache_sentinel") ? (t34 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {}), $[101] = t34) : t34 = $[101], t34;
3181
+ }
3182
+ if (disabled) return child;
3183
+ let t34 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0, t35;
3184
+ $[102] !== floatingStyles || $[103] !== t34 ? (t35 = {
3185
+ ...floatingStyles,
3186
+ maxWidth: t34
3187
+ }, $[102] = floatingStyles, $[103] = t34, $[104] = t35) : t35 = $[104];
3188
+ let t36;
3189
+ $[105] !== animate || $[106] !== arrowProp || $[107] !== arrowX || $[108] !== arrowY || $[109] !== content || $[110] !== originX || $[111] !== originY || $[112] !== padding || $[113] !== placement || $[114] !== radius || $[115] !== restProps || $[116] !== scheme || $[117] !== setArrow || $[118] !== setFloating || $[119] !== shadow ? (t36 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipCard, {
3190
+ ...restProps,
3191
+ animate,
3192
+ arrow: arrowProp,
3193
+ arrowRef: setArrow,
3194
+ arrowX,
3195
+ arrowY,
3196
+ originX,
3197
+ originY,
3198
+ padding,
3199
+ placement,
3200
+ radius,
3201
+ ref: setFloating,
3202
+ scheme,
3203
+ shadow,
3204
+ children: content
3205
+ }), $[105] = animate, $[106] = arrowProp, $[107] = arrowX, $[108] = arrowY, $[109] = content, $[110] = originX, $[111] = originY, $[112] = padding, $[113] = placement, $[114] = radius, $[115] = restProps, $[116] = scheme, $[117] = setArrow, $[118] = setFloating, $[119] = shadow, $[120] = t36) : t36 = $[120];
3206
+ let t37;
3207
+ $[121] !== restProps || $[122] !== setFloating || $[123] !== t35 || $[124] !== t36 || $[125] !== zOffset ? (t37 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledTooltip, {
3208
+ "data-ui": "Tooltip",
3209
+ ...restProps,
3210
+ ref: setFloating,
3211
+ style: t35,
3212
+ zOffset,
3213
+ children: t36
3214
+ }), $[121] = restProps, $[122] = setFloating, $[123] = t35, $[124] = t36, $[125] = zOffset, $[126] = t37) : t37 = $[126];
3215
+ let tooltip = t37, t38;
3216
+ $[127] !== portalProp || $[128] !== showTooltip || $[129] !== tooltip ? (t38 = showTooltip && (portalProp ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Portal, {
3217
+ __unstable_name: typeof portalProp == "string" ? portalProp : void 0,
3218
+ children: tooltip
3219
+ }) : tooltip), $[127] = portalProp, $[128] = showTooltip, $[129] = tooltip, $[130] = t38) : t38 = $[130];
3220
+ let children = t38, t39;
3221
+ $[131] !== animate || $[132] !== children ? (t39 = animate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, { children }) : children, $[131] = animate, $[132] = children, $[133] = t39) : t39 = $[133];
3222
+ let t40;
3223
+ return $[134] !== child || $[135] !== t39 ? (t40 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t39, child] }), $[134] = child, $[135] = t39, $[136] = t40) : t40 = $[136], t40;
3224
+ });
3225
+ function useMiddleware(t0) {
3226
+ let $ = (0, react_compiler_runtime.c)(17), { animate, arrowProp, arrowRef, boundaryElement, fallbackPlacements, rootBoundary } = t0, ret;
3227
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== boundaryElement || $[4] !== fallbackPlacements || $[5] !== rootBoundary) {
3228
+ ret = [];
3229
+ let t1 = boundaryElement || void 0, t2;
3230
+ $[7] !== fallbackPlacements || $[8] !== rootBoundary || $[9] !== t1 ? (t2 = (0, _floating_ui_react_dom.flip)({
3231
+ boundary: t1,
3232
+ fallbackPlacements,
3233
+ padding: 4,
3234
+ rootBoundary
3235
+ }), $[7] = fallbackPlacements, $[8] = rootBoundary, $[9] = t1, $[10] = t2) : t2 = $[10], ret.push(t2);
3236
+ let t3;
3237
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t3 = (0, _floating_ui_react_dom.offset)({ mainAxis: 4 }), $[11] = t3) : t3 = $[11], ret.push(t3);
3238
+ let t4 = boundaryElement || void 0, t5;
3239
+ if ($[12] !== rootBoundary || $[13] !== t4 ? (t5 = (0, _floating_ui_react_dom.shift)({
3240
+ boundary: t4,
3241
+ rootBoundary,
3242
+ padding: 4
3243
+ }), $[12] = rootBoundary, $[13] = t4, $[14] = t5) : t5 = $[14], ret.push(t5), arrowProp) {
3244
+ let t6;
3245
+ $[15] === arrowRef ? t6 = $[16] : (t6 = (0, _floating_ui_react_dom.arrow)({
3246
+ element: arrowRef,
3247
+ padding: 4
3248
+ }), $[15] = arrowRef, $[16] = t6), ret.push(t6);
3249
+ }
3250
+ animate && ret.push(origin), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = boundaryElement, $[4] = fallbackPlacements, $[5] = rootBoundary, $[6] = ret;
3251
+ } else ret = $[6];
3252
+ return ret;
3253
+ }
3254
+ /**
3255
+ * As `useEffectEvent` should never be passed to other components or hooks, this custom hook groups together the `useEffectEvent` and the `useEffect` hook using it.
3256
+ * @see https://19.react.dev/learn/separating-events-from-effects#reading-latest-props-and-state-with-effect-events:~:text=Never%20pass%20them%20to%20other%20components%20or%20Hooks
3257
+ */
3258
+ function useCloseOnMouseLeave(t0) {
3259
+ let $ = (0, react_compiler_runtime.c)(10), { handleIsOpenChange, referenceElement, showTooltip, isInsideGroup } = t0, t1;
3260
+ $[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {
3261
+ referenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));
3262
+ }, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];
3263
+ let onMouseMove = (0, use_effect_event.useEffectEvent)(t1), t2;
3264
+ $[3] !== isInsideGroup || $[4] !== onMouseMove || $[5] !== showTooltip ? (t2 = () => {
3265
+ if (!showTooltip || isInsideGroup) return;
3266
+ let handleMouseMove = (event) => {
3267
+ onMouseMove(event.target, () => window.removeEventListener("mousemove", handleMouseMove));
3268
+ };
3269
+ return window.addEventListener("mousemove", handleMouseMove), () => window.removeEventListener("mousemove", handleMouseMove);
3270
+ }, $[3] = isInsideGroup, $[4] = onMouseMove, $[5] = showTooltip, $[6] = t2) : t2 = $[6];
3271
+ let t3;
3272
+ $[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], (0, react.useEffect)(t2, t3);
3273
+ }
3274
+ /**
3275
+ * @public
3276
+ */
3277
+ function PortalProvider(props) {
3278
+ let $ = (0, react_compiler_runtime.c)(7), { boundaryElement, children, element, __unstable_elements: elements } = props, fallbackElement = (0, react.useSyncExternalStore)(emptySubscribe, _temp, _temp2), t0 = boundaryElement || null, t1 = element || fallbackElement, t2;
3279
+ $[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {
3280
+ version: 0,
3281
+ boundaryElement: t0,
3282
+ element: t1,
3283
+ elements
3284
+ }, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];
3285
+ let value = t2, t3;
3286
+ return $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalContext.Provider, {
3287
+ value,
3288
+ children
3289
+ }), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;
3290
+ }
3291
+ function _temp2() {
3292
+ return null;
3293
+ }
3294
+ function _temp() {
3295
+ return document.body;
3296
+ }
3297
+ const emptySubscribe = () => () => {};
3298
+ Object.defineProperty(exports, "$", {
3299
+ enumerable: !0,
3300
+ get: function() {
3301
+ return Spinner;
3302
+ }
3303
+ }), Object.defineProperty(exports, "A", {
3304
+ enumerable: !0,
3305
+ get: function() {
3306
+ return Arrow;
3307
+ }
3308
+ }), Object.defineProperty(exports, "At", {
3309
+ enumerable: !0,
3310
+ get: function() {
3311
+ return parseColor;
3312
+ }
3313
+ }), Object.defineProperty(exports, "B", {
3314
+ enumerable: !0,
3315
+ get: function() {
3316
+ return useMediaIndex;
3317
+ }
3318
+ }), Object.defineProperty(exports, "C", {
3319
+ enumerable: !0,
3320
+ get: function() {
3321
+ return textInputRepresentationStyle;
3322
+ }
3323
+ }), Object.defineProperty(exports, "Ct", {
3324
+ enumerable: !0,
3325
+ get: function() {
3326
+ return isHTMLTextAreaElement;
3327
+ }
3328
+ }), Object.defineProperty(exports, "D", {
3329
+ enumerable: !0,
3330
+ get: function() {
3331
+ return useCustomValidity;
3332
+ }
3333
+ }), Object.defineProperty(exports, "Dt", {
3334
+ enumerable: !0,
3335
+ get: function() {
3336
+ return hexToRgb;
3337
+ }
3338
+ }), Object.defineProperty(exports, "E", {
3339
+ enumerable: !0,
3340
+ get: function() {
3341
+ return responsiveInputPaddingStyle;
3342
+ }
3343
+ }), Object.defineProperty(exports, "Et", {
3344
+ enumerable: !0,
3345
+ get: function() {
3346
+ return createColorTheme;
3347
+ }
3348
+ }), Object.defineProperty(exports, "F", {
3349
+ enumerable: !0,
3350
+ get: function() {
3351
+ return useBoundaryElement;
3352
+ }
3353
+ }), Object.defineProperty(exports, "Ft", {
3354
+ enumerable: !0,
3355
+ get: function() {
3356
+ return studioTheme;
3357
+ }
3358
+ }), Object.defineProperty(exports, "G", {
3359
+ enumerable: !0,
3360
+ get: function() {
3361
+ return ThemeColorProvider;
3362
+ }
3363
+ }), Object.defineProperty(exports, "H", {
3364
+ enumerable: !0,
3365
+ get: function() {
3366
+ return _elementSizeObserver;
3367
+ }
3368
+ }), Object.defineProperty(exports, "I", {
3369
+ enumerable: !0,
3370
+ get: function() {
3371
+ return BoundaryElementContext;
3372
+ }
3373
+ }), Object.defineProperty(exports, "It", {
3374
+ enumerable: !0,
3375
+ get: function() {
3376
+ return __toESM;
3377
+ }
3378
+ }), Object.defineProperty(exports, "J", {
3379
+ enumerable: !0,
3380
+ get: function() {
3381
+ return createGlobalScopedContext;
3382
+ }
3383
+ }), Object.defineProperty(exports, "K", {
3384
+ enumerable: !0,
3385
+ get: function() {
3386
+ return useRootTheme;
3387
+ }
3388
+ }), Object.defineProperty(exports, "L", {
3389
+ enumerable: !0,
3390
+ get: function() {
3391
+ return isRecord;
3392
+ }
3393
+ }), Object.defineProperty(exports, "M", {
3394
+ enumerable: !0,
3395
+ get: function() {
3396
+ return usePortal;
3397
+ }
3398
+ }), Object.defineProperty(exports, "Mt", {
3399
+ enumerable: !0,
3400
+ get: function() {
3401
+ return rgbToHsl;
3402
+ }
3403
+ }), Object.defineProperty(exports, "N", {
3404
+ enumerable: !0,
3405
+ get: function() {
3406
+ return useLayer;
3407
+ }
3408
+ }), Object.defineProperty(exports, "Nt", {
3409
+ enumerable: !0,
3410
+ get: function() {
3411
+ return rgba;
3412
+ }
3413
+ }), Object.defineProperty(exports, "O", {
3414
+ enumerable: !0,
3415
+ get: function() {
3416
+ return Stack;
3417
+ }
3418
+ }), Object.defineProperty(exports, "Ot", {
3419
+ enumerable: !0,
3420
+ get: function() {
3421
+ return hslToRgb;
3422
+ }
3423
+ }), Object.defineProperty(exports, "P", {
3424
+ enumerable: !0,
3425
+ get: function() {
3426
+ return LayerProvider;
3427
+ }
3428
+ }), Object.defineProperty(exports, "Pt", {
3429
+ enumerable: !0,
3430
+ get: function() {
3431
+ return screen;
3432
+ }
3433
+ }), Object.defineProperty(exports, "Q", {
3434
+ enumerable: !0,
3435
+ get: function() {
3436
+ return _cardColorStyle;
3437
+ }
3438
+ }), Object.defineProperty(exports, "R", {
3439
+ enumerable: !0,
3440
+ get: function() {
3441
+ return usePrefersReducedMotion;
3442
+ }
3443
+ }), Object.defineProperty(exports, "S", {
3444
+ enumerable: !0,
3445
+ get: function() {
3446
+ return textInputFontSizeStyle;
3447
+ }
3448
+ }), Object.defineProperty(exports, "St", {
3449
+ enumerable: !0,
3450
+ get: function() {
3451
+ return isHTMLSelectElement;
3452
+ }
3453
+ }), Object.defineProperty(exports, "T", {
3454
+ enumerable: !0,
3455
+ get: function() {
3456
+ return responsiveInputPaddingIconRightStyle;
3457
+ }
3458
+ }), Object.defineProperty(exports, "Tt", {
3459
+ enumerable: !0,
3460
+ get: function() {
3461
+ return EMPTY_RECORD;
3462
+ }
3463
+ }), Object.defineProperty(exports, "U", {
3464
+ enumerable: !0,
3465
+ get: function() {
3466
+ return _ResizeObserver;
3467
+ }
3468
+ }), Object.defineProperty(exports, "V", {
3469
+ enumerable: !0,
3470
+ get: function() {
3471
+ return useElementSize;
3472
+ }
3473
+ }), Object.defineProperty(exports, "W", {
3474
+ enumerable: !0,
3475
+ get: function() {
3476
+ return Card;
3477
+ }
3478
+ }), Object.defineProperty(exports, "X", {
3479
+ enumerable: !0,
3480
+ get: function() {
3481
+ return focusRingBorderStyle;
3482
+ }
3483
+ }), Object.defineProperty(exports, "Y", {
3484
+ enumerable: !0,
3485
+ get: function() {
3486
+ return Button;
3487
+ }
3488
+ }), Object.defineProperty(exports, "Z", {
3489
+ enumerable: !0,
3490
+ get: function() {
3491
+ return focusRingStyle;
3492
+ }
3493
+ }), Object.defineProperty(exports, "_", {
3494
+ enumerable: !0,
3495
+ get: function() {
3496
+ return Layer;
3497
+ }
3498
+ }), Object.defineProperty(exports, "_t", {
3499
+ enumerable: !0,
3500
+ get: function() {
3501
+ return containsOrEqualsElement;
3502
+ }
3503
+ }), Object.defineProperty(exports, "a", {
3504
+ enumerable: !0,
3505
+ get: function() {
3506
+ return useDelayedState;
3507
+ }
3508
+ }), Object.defineProperty(exports, "at", {
3509
+ enumerable: !0,
3510
+ get: function() {
3511
+ return Flex;
3512
+ }
3513
+ }), Object.defineProperty(exports, "b", {
3514
+ enumerable: !0,
3515
+ get: function() {
3516
+ return TextInput;
3517
+ }
3518
+ }), Object.defineProperty(exports, "bt", {
3519
+ enumerable: !0,
3520
+ get: function() {
3521
+ return isHTMLElement;
3522
+ }
3523
+ }), Object.defineProperty(exports, "c", {
3524
+ enumerable: !0,
3525
+ get: function() {
3526
+ return TabList;
3527
+ }
3528
+ }), Object.defineProperty(exports, "ct", {
3529
+ enumerable: !0,
3530
+ get: function() {
3531
+ return responsiveRadiusStyle;
3532
+ }
3533
+ }), Object.defineProperty(exports, "d", {
3534
+ enumerable: !0,
3535
+ get: function() {
3536
+ return MenuGroup;
3537
+ }
3538
+ }), Object.defineProperty(exports, "dt", {
3539
+ enumerable: !0,
3540
+ get: function() {
3541
+ return _fillCSSObject;
3542
+ }
3543
+ }), Object.defineProperty(exports, "et", {
3544
+ enumerable: !0,
3545
+ get: function() {
3546
+ return Text;
3547
+ }
3548
+ }), Object.defineProperty(exports, "f", {
3549
+ enumerable: !0,
3550
+ get: function() {
3551
+ return MenuDivider;
3552
+ }
3553
+ }), Object.defineProperty(exports, "ft", {
3554
+ enumerable: !0,
3555
+ get: function() {
3556
+ return _getArrayProp;
3557
+ }
3558
+ }), Object.defineProperty(exports, "g", {
3559
+ enumerable: !0,
3560
+ get: function() {
3561
+ return Inline;
3562
+ }
3563
+ }), Object.defineProperty(exports, "gt", {
3564
+ enumerable: !0,
3565
+ get: function() {
3566
+ return _isEnterToClickElement;
3567
+ }
3568
+ }), Object.defineProperty(exports, "h", {
3569
+ enumerable: !0,
3570
+ get: function() {
3571
+ return KBD;
3572
+ }
3573
+ }), Object.defineProperty(exports, "ht", {
3574
+ enumerable: !0,
3575
+ get: function() {
3576
+ return rem;
3577
+ }
3578
+ }), Object.defineProperty(exports, "i", {
3579
+ enumerable: !0,
3580
+ get: function() {
3581
+ return TooltipDelayGroupContext;
3582
+ }
3583
+ }), Object.defineProperty(exports, "it", {
3584
+ enumerable: !0,
3585
+ get: function() {
3586
+ return responsiveTextAlignStyle;
3587
+ }
3588
+ }), Object.defineProperty(exports, "j", {
3589
+ enumerable: !0,
3590
+ get: function() {
3591
+ return Portal;
3592
+ }
3593
+ }), Object.defineProperty(exports, "jt", {
3594
+ enumerable: !0,
3595
+ get: function() {
3596
+ return rgbToHex;
3597
+ }
3598
+ }), Object.defineProperty(exports, "k", {
3599
+ enumerable: !0,
3600
+ get: function() {
3601
+ return Popover;
3602
+ }
3603
+ }), Object.defineProperty(exports, "kt", {
3604
+ enumerable: !0,
3605
+ get: function() {
3606
+ return multiply;
3607
+ }
3608
+ }), Object.defineProperty(exports, "l", {
3609
+ enumerable: !0,
3610
+ get: function() {
3611
+ return Tab;
3612
+ }
3613
+ }), Object.defineProperty(exports, "lt", {
3614
+ enumerable: !0,
3615
+ get: function() {
3616
+ return Box;
3617
+ }
3618
+ }), Object.defineProperty(exports, "m", {
3619
+ enumerable: !0,
3620
+ get: function() {
3621
+ return Hotkeys;
3622
+ }
3623
+ }), Object.defineProperty(exports, "mt", {
3624
+ enumerable: !0,
3625
+ get: function() {
3626
+ return _responsive;
3627
+ }
3628
+ }), Object.defineProperty(exports, "n", {
3629
+ enumerable: !0,
3630
+ get: function() {
3631
+ return Tooltip;
3632
+ }
3633
+ }), Object.defineProperty(exports, "nt", {
3634
+ enumerable: !0,
3635
+ get: function() {
3636
+ return responsiveTextFont;
3637
+ }
3638
+ }), Object.defineProperty(exports, "o", {
3639
+ enumerable: !0,
3640
+ get: function() {
3641
+ return usePrefersDark;
3642
+ }
3643
+ }), Object.defineProperty(exports, "ot", {
3644
+ enumerable: !0,
3645
+ get: function() {
3646
+ return useTheme;
3647
+ }
3648
+ }), Object.defineProperty(exports, "p", {
3649
+ enumerable: !0,
3650
+ get: function() {
3651
+ return Menu;
3652
+ }
3653
+ }), Object.defineProperty(exports, "pt", {
3654
+ enumerable: !0,
3655
+ get: function() {
3656
+ return _getResponsiveSpace;
3657
+ }
3658
+ }), Object.defineProperty(exports, "q", {
3659
+ enumerable: !0,
3660
+ get: function() {
3661
+ return ThemeProvider;
3662
+ }
3663
+ }), Object.defineProperty(exports, "r", {
3664
+ enumerable: !0,
3665
+ get: function() {
3666
+ return useTooltipDelayGroup;
3667
+ }
3668
+ }), Object.defineProperty(exports, "rt", {
3669
+ enumerable: !0,
3670
+ get: function() {
3671
+ return responsiveFont;
3672
+ }
3673
+ }), Object.defineProperty(exports, "s", {
3674
+ enumerable: !0,
3675
+ get: function() {
3676
+ return Grid;
3677
+ }
3678
+ }), Object.defineProperty(exports, "st", {
3679
+ enumerable: !0,
3680
+ get: function() {
3681
+ return useTheme_v2;
3682
+ }
3683
+ }), Object.defineProperty(exports, "t", {
3684
+ enumerable: !0,
3685
+ get: function() {
3686
+ return PortalProvider;
3687
+ }
3688
+ }), Object.defineProperty(exports, "tt", {
3689
+ enumerable: !0,
3690
+ get: function() {
3691
+ return SpanWithTextOverflow;
3692
+ }
3693
+ }), Object.defineProperty(exports, "u", {
3694
+ enumerable: !0,
3695
+ get: function() {
3696
+ return MenuItem;
3697
+ }
3698
+ }), Object.defineProperty(exports, "ut", {
3699
+ enumerable: !0,
3700
+ get: function() {
3701
+ return responsivePaddingStyle;
3702
+ }
3703
+ }), Object.defineProperty(exports, "v", {
3704
+ enumerable: !0,
3705
+ get: function() {
3706
+ return useGlobalKeyDown;
3707
+ }
3708
+ }), Object.defineProperty(exports, "vt", {
3709
+ enumerable: !0,
3710
+ get: function() {
3711
+ return isHTMLAnchorElement;
3712
+ }
3713
+ }), Object.defineProperty(exports, "w", {
3714
+ enumerable: !0,
3715
+ get: function() {
3716
+ return textInputRootStyle;
3717
+ }
3718
+ }), Object.defineProperty(exports, "wt", {
3719
+ enumerable: !0,
3720
+ get: function() {
3721
+ return EMPTY_ARRAY;
3722
+ }
3723
+ }), Object.defineProperty(exports, "x", {
3724
+ enumerable: !0,
3725
+ get: function() {
3726
+ return textInputBaseStyle;
3727
+ }
3728
+ }), Object.defineProperty(exports, "xt", {
3729
+ enumerable: !0,
3730
+ get: function() {
3731
+ return isHTMLInputElement;
3732
+ }
3733
+ }), Object.defineProperty(exports, "y", {
3734
+ enumerable: !0,
3735
+ get: function() {
3736
+ return useClickOutsideEvent;
3737
+ }
3738
+ }), Object.defineProperty(exports, "yt", {
3739
+ enumerable: !0,
3740
+ get: function() {
3741
+ return isHTMLButtonElement;
3742
+ }
3743
+ }), Object.defineProperty(exports, "z", {
3744
+ enumerable: !0,
3745
+ get: function() {
3746
+ return useMatchMedia;
3747
+ }
3748
+ });
3749
+
3750
+ //# sourceMappingURL=portalProvider.cjs.map