zudoku 0.25.2 → 0.26.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 (264) hide show
  1. package/dist/app/demo.js +0 -1
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/standalone.js +0 -1
  4. package/dist/app/standalone.js.map +1 -1
  5. package/dist/cli/dev/handler.js +2 -2
  6. package/dist/cli/dev/handler.js.map +1 -1
  7. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  8. package/dist/config/validators/common.d.ts +28 -28
  9. package/dist/config/validators/icon-types.d.ts +1 -1
  10. package/dist/config/validators/validate.d.ts +16 -16
  11. package/dist/lib/components/navigation/SidebarCategory.js +1 -1
  12. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  13. package/dist/lib/oas/graphql/index.d.ts +3 -0
  14. package/dist/lib/oas/graphql/index.js +12 -13
  15. package/dist/lib/oas/graphql/index.js.map +1 -1
  16. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  17. package/dist/lib/plugins/openapi/ColorizedParam.js +16 -7
  18. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  19. package/dist/lib/plugins/openapi/OperationList.js +3 -0
  20. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  21. package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
  22. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  23. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -0
  24. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  25. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -2
  26. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -6
  27. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  28. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +2 -6
  29. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  30. package/dist/lib/plugins/openapi/Sidecar.js +9 -6
  31. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  32. package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
  33. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  34. package/dist/lib/plugins/openapi/{ExampleDisplay.d.ts → SidecarExamples.d.ts} +3 -6
  35. package/dist/lib/plugins/openapi/SidecarExamples.js +65 -0
  36. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  37. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  38. package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -93
  39. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  40. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  41. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  42. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  43. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  44. package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -13
  45. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  46. package/dist/lib/plugins/openapi/index.d.ts +2 -1
  47. package/dist/lib/plugins/openapi/index.js.map +1 -1
  48. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +8 -0
  49. package/dist/lib/plugins/openapi/playground/EnumSelector.js +21 -0
  50. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +1 -0
  51. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -4
  52. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  53. package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -0
  54. package/dist/lib/plugins/openapi/playground/Playground.js +5 -2
  55. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  56. package/dist/lib/plugins/openapi/playground/QueryParams.js +23 -8
  57. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  58. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +2 -1
  59. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  60. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
  61. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  62. package/dist/lib/ui/Badge.d.ts +1 -1
  63. package/dist/lib/ui/Badge.js +2 -1
  64. package/dist/lib/ui/Badge.js.map +1 -1
  65. package/dist/lib/ui/Button.d.ts +1 -1
  66. package/dist/lib/ui/Checkbox.d.ts +8 -2
  67. package/dist/lib/ui/Checkbox.js +13 -1
  68. package/dist/lib/ui/Checkbox.js.map +1 -1
  69. package/dist/lib/util/traverse.d.ts +8 -1
  70. package/dist/lib/util/traverse.js +7 -3
  71. package/dist/lib/util/traverse.js.map +1 -1
  72. package/dist/vite/api/schema-codegen.d.ts +12 -0
  73. package/dist/vite/api/schema-codegen.js +62 -0
  74. package/dist/vite/api/schema-codegen.js.map +1 -0
  75. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  76. package/dist/vite/api/schema-codegen.test.js +247 -0
  77. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  78. package/dist/vite/config.js +0 -7
  79. package/dist/vite/config.js.map +1 -1
  80. package/dist/vite/config.test.js +5 -1
  81. package/dist/vite/config.test.js.map +1 -1
  82. package/dist/vite/plugin-api.js +110 -82
  83. package/dist/vite/plugin-api.js.map +1 -1
  84. package/dist/vite/plugin-component.js +0 -1
  85. package/dist/vite/plugin-component.js.map +1 -1
  86. package/lib/{AnchorLink-DFZZbmvr.js → AnchorLink-_Vu02ceN.js} +3 -3
  87. package/lib/{AnchorLink-DFZZbmvr.js.map → AnchorLink-_Vu02ceN.js.map} +1 -1
  88. package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DNXBcsVN.js} +4 -4
  89. package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DNXBcsVN.js.map} +1 -1
  90. package/lib/{Button-DeAoTouo.js → Button-oroWHXAy.js} +3 -3
  91. package/lib/{Button-DeAoTouo.js.map → Button-oroWHXAy.js.map} +1 -1
  92. package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
  93. package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  94. package/lib/Command-D5DE0DD7.js +611 -0
  95. package/lib/Command-D5DE0DD7.js.map +1 -0
  96. package/lib/{Markdown-CZDLNOFc.js → Markdown-BrfrjEk_.js} +1041 -1041
  97. package/lib/{Markdown-CZDLNOFc.js.map → Markdown-BrfrjEk_.js.map} +1 -1
  98. package/lib/{MdxPage-DKMbBROv.js → MdxPage-LNZLj_A5.js} +24 -24
  99. package/lib/{MdxPage-DKMbBROv.js.map → MdxPage-LNZLj_A5.js.map} +1 -1
  100. package/lib/{OperationList-BLdHAQ39.js → OperationList-PCwzTp1r.js} +1899 -1877
  101. package/lib/OperationList-PCwzTp1r.js.map +1 -0
  102. package/lib/{Route-DYwKZ_c_.js → Route-Pzk6qwIk.js} +5 -5
  103. package/lib/{Route-DYwKZ_c_.js.map → Route-Pzk6qwIk.js.map} +1 -1
  104. package/lib/{Select-B_IxRUUC.js → Select-DkOpAG0c.js} +36 -36
  105. package/lib/{Select-B_IxRUUC.js.map → Select-DkOpAG0c.js.map} +1 -1
  106. package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-DPbx9KdU.js} +53 -53
  107. package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-DPbx9KdU.js.map} +1 -1
  108. package/lib/{Spinner-DuxJLLNE.js → Spinner-C5gHXrVz.js} +2 -2
  109. package/lib/{Spinner-DuxJLLNE.js.map → Spinner-C5gHXrVz.js.map} +1 -1
  110. package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-CJCSPG1F.js} +297 -301
  111. package/lib/{SyntaxHighlight-Bz-lOJtH.js.map → SyntaxHighlight-CJCSPG1F.js.map} +1 -1
  112. package/lib/{ZudokuContext-hmLMUdf2.js → ZudokuContext-D3ayHjP-.js} +357 -356
  113. package/lib/ZudokuContext-D3ayHjP-.js.map +1 -0
  114. package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-KWlHsT7t.js} +407 -410
  115. package/lib/chunk-SYFQ2XB5-KWlHsT7t.js.map +1 -0
  116. package/lib/context-rwLGh-6_.js +22 -0
  117. package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
  118. package/lib/{createServer-Bf5_6o6G.js → createServer-BcaswoFO.js} +4363 -5302
  119. package/lib/createServer-BcaswoFO.js.map +1 -0
  120. package/lib/{hook-CHq7pFyz.js → hook-DUyACbIK.js} +17 -17
  121. package/lib/{hook-CHq7pFyz.js.map → hook-DUyACbIK.js.map} +1 -1
  122. package/lib/index-CaILD1AV.js +1292 -0
  123. package/lib/index-CaILD1AV.js.map +1 -0
  124. package/lib/index-Djenk2Hj.js +36 -0
  125. package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
  126. package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
  127. package/lib/index-Dl3Yl0yb.js.map +1 -0
  128. package/lib/index-TaRXY2w1.js +43 -0
  129. package/lib/index-TaRXY2w1.js.map +1 -0
  130. package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
  131. package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
  132. package/lib/index.esm-CrSoEshU.js +1207 -0
  133. package/lib/index.esm-CrSoEshU.js.map +1 -0
  134. package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
  135. package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
  136. package/lib/post-processors/removeExtensions.js +3 -3
  137. package/lib/post-processors/traverse.js +11 -8
  138. package/lib/post-processors/traverse.js.map +1 -1
  139. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  140. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  141. package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
  142. package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  143. package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
  144. package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  145. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  146. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  147. package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
  148. package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  149. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  150. package/lib/state-mM7uaXTW.js +202 -0
  151. package/lib/state-mM7uaXTW.js.map +1 -0
  152. package/lib/ui/Accordion.js +1 -1
  153. package/lib/ui/ActionButton.js +3 -3
  154. package/lib/ui/Alert.js +2 -2
  155. package/lib/ui/AlertDialog.js +1 -1
  156. package/lib/ui/Badge.js +4 -3
  157. package/lib/ui/Badge.js.map +1 -1
  158. package/lib/ui/Breadcrumb.js +1 -1
  159. package/lib/ui/Button.js +2 -2
  160. package/lib/ui/Callout.js +1 -1
  161. package/lib/ui/Card.js +1 -1
  162. package/lib/ui/Carousel.js +3 -3
  163. package/lib/ui/Carousel.js.map +1 -1
  164. package/lib/ui/Checkbox.js +26 -15
  165. package/lib/ui/Checkbox.js.map +1 -1
  166. package/lib/ui/Command.js +14 -550
  167. package/lib/ui/Command.js.map +1 -1
  168. package/lib/ui/Dialog.js +1 -1
  169. package/lib/ui/Drawer.js +520 -519
  170. package/lib/ui/Drawer.js.map +1 -1
  171. package/lib/ui/DropdownMenu.js +1 -1
  172. package/lib/ui/Form.js +2 -2
  173. package/lib/ui/HoverCard.js +1 -1
  174. package/lib/ui/Input.js +1 -1
  175. package/lib/ui/Label.js +2 -2
  176. package/lib/ui/Pagination.js +7 -7
  177. package/lib/ui/Popover.js +1 -1
  178. package/lib/ui/Progress.js +1 -1
  179. package/lib/ui/RadioGroup.js +1 -1
  180. package/lib/ui/ScrollArea.js +1 -1
  181. package/lib/ui/Select.js +1 -1
  182. package/lib/ui/Skeleton.js +1 -1
  183. package/lib/ui/Slider.js +1 -1
  184. package/lib/ui/Switch.js +1 -1
  185. package/lib/ui/Tabs.js +1 -1
  186. package/lib/ui/Textarea.js +1 -1
  187. package/lib/ui/Toggle.js +2 -2
  188. package/lib/ui/ToggleGroup.js +1 -1
  189. package/lib/ui/Tooltip.js +1 -1
  190. package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-BBHR7aLM.js} +2 -2
  191. package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-BBHR7aLM.js.map} +1 -1
  192. package/lib/zudoku.auth-auth0.js +1 -1
  193. package/lib/zudoku.auth-clerk.js +18 -18
  194. package/lib/zudoku.auth-openid.js +5 -5
  195. package/lib/zudoku.components.js +492 -477
  196. package/lib/zudoku.components.js.map +1 -1
  197. package/lib/zudoku.plugin-api-catalog.js +5 -5
  198. package/lib/zudoku.plugin-api-keys.js +7 -7
  199. package/lib/zudoku.plugin-custom-pages.js +3 -3
  200. package/lib/zudoku.plugin-markdown.js +2 -2
  201. package/lib/zudoku.plugin-openapi.js +5 -5
  202. package/lib/zudoku.plugin-redirect.js +1 -1
  203. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  204. package/package.json +48 -53
  205. package/src/app/demo.tsx +0 -1
  206. package/src/app/standalone.tsx +0 -1
  207. package/src/lib/components/navigation/SidebarCategory.tsx +2 -2
  208. package/src/lib/oas/graphql/index.ts +19 -15
  209. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  210. package/src/lib/plugins/openapi/OperationList.tsx +4 -0
  211. package/src/lib/plugins/openapi/ParameterListItem.tsx +5 -7
  212. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +2 -0
  213. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +9 -8
  214. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -8
  215. package/src/lib/plugins/openapi/Sidecar.tsx +14 -7
  216. package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
  217. package/src/lib/plugins/openapi/SidecarExamples.tsx +163 -0
  218. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -120
  219. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  220. package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -17
  221. package/src/lib/plugins/openapi/index.tsx +2 -1
  222. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +86 -0
  223. package/src/lib/plugins/openapi/playground/PathParams.tsx +72 -64
  224. package/src/lib/plugins/openapi/playground/Playground.tsx +26 -13
  225. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -73
  226. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +4 -7
  227. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
  228. package/src/lib/ui/Badge.tsx +2 -1
  229. package/src/lib/ui/Checkbox.tsx +24 -7
  230. package/src/lib/util/traverse.ts +15 -5
  231. package/dist/lib/plugins/openapi/ExampleDisplay.js +0 -78
  232. package/dist/lib/plugins/openapi/ExampleDisplay.js.map +0 -1
  233. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  234. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  235. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  236. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  237. package/dist/lib/plugins/openapi-worker.js +0 -8
  238. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  239. package/lib/Dialog-Bxv1yEIg.js +0 -67
  240. package/lib/Dialog-Bxv1yEIg.js.map +0 -1
  241. package/lib/OperationList-BLdHAQ39.js.map +0 -1
  242. package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
  243. package/lib/assets/index-C7jnHK4b.js +0 -4841
  244. package/lib/assets/index-C7jnHK4b.js.map +0 -1
  245. package/lib/assets/worker-Cbp2r2BQ.js +0 -18592
  246. package/lib/assets/worker-Cbp2r2BQ.js.map +0 -1
  247. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
  248. package/lib/context-h_UkBLvr.js +0 -22
  249. package/lib/createServer-Bf5_6o6G.js.map +0 -1
  250. package/lib/index-BNx95gkf.js +0 -1284
  251. package/lib/index-BNx95gkf.js.map +0 -1
  252. package/lib/index-CBXSgjaE.js.map +0 -1
  253. package/lib/index-CPNSgwSb.js +0 -36
  254. package/lib/index-DyBL--Kz.js +0 -826
  255. package/lib/index-DyBL--Kz.js.map +0 -1
  256. package/lib/index.esm-BnnBRKJX.js +0 -1214
  257. package/lib/index.esm-BnnBRKJX.js.map +0 -1
  258. package/lib/state-CFQsUZUP.js +0 -202
  259. package/lib/state-CFQsUZUP.js.map +0 -1
  260. package/lib/zudoku.openapi-worker.js +0 -15
  261. package/lib/zudoku.openapi-worker.js.map +0 -1
  262. package/src/lib/plugins/openapi/ExampleDisplay.tsx +0 -163
  263. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  264. package/src/lib/plugins/openapi-worker.ts +0 -11
@@ -0,0 +1,611 @@
1
+ import { j as w } from "./jsx-runtime-Bdg6XQ1m.js";
2
+ import * as C from "@radix-ui/react-dialog";
3
+ import * as a from "react";
4
+ import _e from "react";
5
+ import { Primitive as M } from "@radix-ui/react-primitive";
6
+ import { useId as F } from "@radix-ui/react-id";
7
+ import { X as Te, Search as Me } from "lucide-react";
8
+ import { c as L } from "./cn-qaFjX9_3.js";
9
+ const $e = C.Root, Nt = C.Trigger, Ve = C.Portal, ke = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
10
+ C.Overlay,
11
+ {
12
+ ref: t,
13
+ className: L(
14
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15
+ e
16
+ ),
17
+ ...r
18
+ }
19
+ ));
20
+ ke.displayName = C.Overlay.displayName;
21
+ const Re = a.forwardRef(({ className: e, children: r, ...t }, f) => /* @__PURE__ */ w.jsxs(Ve, { children: [
22
+ /* @__PURE__ */ w.jsx(ke, {}),
23
+ /* @__PURE__ */ w.jsxs(
24
+ C.Content,
25
+ {
26
+ ref: f,
27
+ className: L(
28
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
29
+ e
30
+ ),
31
+ ...t,
32
+ children: [
33
+ r,
34
+ /* @__PURE__ */ w.jsxs(C.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
35
+ /* @__PURE__ */ w.jsx(Te, { className: "h-4 w-4" }),
36
+ /* @__PURE__ */ w.jsx("span", { className: "sr-only", children: "Close" })
37
+ ] })
38
+ ]
39
+ }
40
+ )
41
+ ] }));
42
+ Re.displayName = C.Content.displayName;
43
+ const Ke = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
44
+ C.Title,
45
+ {
46
+ ref: t,
47
+ className: L(
48
+ "text-lg font-semibold leading-none tracking-tight",
49
+ e
50
+ ),
51
+ ...r
52
+ }
53
+ ));
54
+ Ke.displayName = C.Title.displayName;
55
+ const qe = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
56
+ C.Description,
57
+ {
58
+ ref: t,
59
+ className: L("text-sm text-muted-foreground", e),
60
+ ...r
61
+ }
62
+ ));
63
+ qe.displayName = C.Description.displayName;
64
+ var ye = 1, Ue = 0.9, Ge = 0.8, Pe = 0.17, ae = 0.1, le = 0.999, Fe = 0.9999, Be = 0.99, He = /[\\\/_+.#"@\[\(\{&]/, ze = /[\\\/_+.#"@\[\(\{&]/g, We = /[\s-]/, Ce = /[\s-]/g;
65
+ function de(e, r, t, f, l, i, c) {
66
+ if (i === r.length) return l === e.length ? ye : Be;
67
+ var v = `${l},${i}`;
68
+ if (c[v] !== void 0) return c[v];
69
+ for (var h = f.charAt(i), m = t.indexOf(h, l), d = 0, u, y, x, N; m >= 0; ) u = de(e, r, t, f, m + 1, i + 1, c), u > d && (m === l ? u *= ye : He.test(e.charAt(m - 1)) ? (u *= Ge, x = e.slice(l, m - 1).match(ze), x && l > 0 && (u *= Math.pow(le, x.length))) : We.test(e.charAt(m - 1)) ? (u *= Ue, N = e.slice(l, m - 1).match(Ce), N && l > 0 && (u *= Math.pow(le, N.length))) : (u *= Pe, l > 0 && (u *= Math.pow(le, m - l))), e.charAt(m) !== r.charAt(i) && (u *= Fe)), (u < ae && t.charAt(m - 1) === f.charAt(i + 1) || f.charAt(i + 1) === f.charAt(i) && t.charAt(m - 1) !== f.charAt(i)) && (y = de(e, r, t, f, m + 1, i + 2, c), y * ae > u && (u = y * ae)), u > d && (d = u), m = t.indexOf(h, m + 1);
70
+ return c[v] = d, d;
71
+ }
72
+ function Se(e) {
73
+ return e.toLowerCase().replace(Ce, " ");
74
+ }
75
+ function Xe(e, r, t) {
76
+ return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, de(e, r, Se(e), Se(r), 0, 0, {});
77
+ }
78
+ var Z = { exports: {} }, oe = {};
79
+ /**
80
+ * @license React
81
+ * use-sync-external-store-shim.production.min.js
82
+ *
83
+ * Copyright (c) Facebook, Inc. and its affiliates.
84
+ *
85
+ * This source code is licensed under the MIT license found in the
86
+ * LICENSE file in the root directory of this source tree.
87
+ */
88
+ var xe;
89
+ function Ye() {
90
+ if (xe) return oe;
91
+ xe = 1;
92
+ var e = _e;
93
+ function r(u, y) {
94
+ return u === y && (u !== 0 || 1 / u === 1 / y) || u !== u && y !== y;
95
+ }
96
+ var t = typeof Object.is == "function" ? Object.is : r, f = e.useState, l = e.useEffect, i = e.useLayoutEffect, c = e.useDebugValue;
97
+ function v(u, y) {
98
+ var x = y(), N = f({ inst: { value: x, getSnapshot: y } }), O = N[0].inst, I = N[1];
99
+ return i(function() {
100
+ O.value = x, O.getSnapshot = y, h(O) && I({ inst: O });
101
+ }, [u, x, y]), l(function() {
102
+ return h(O) && I({ inst: O }), u(function() {
103
+ h(O) && I({ inst: O });
104
+ });
105
+ }, [u]), c(x), x;
106
+ }
107
+ function h(u) {
108
+ var y = u.getSnapshot;
109
+ u = u.value;
110
+ try {
111
+ var x = y();
112
+ return !t(u, x);
113
+ } catch {
114
+ return !0;
115
+ }
116
+ }
117
+ function m(u, y) {
118
+ return y();
119
+ }
120
+ var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? m : v;
121
+ return oe.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, oe;
122
+ }
123
+ var ue = {};
124
+ /**
125
+ * @license React
126
+ * use-sync-external-store-shim.development.js
127
+ *
128
+ * Copyright (c) Facebook, Inc. and its affiliates.
129
+ *
130
+ * This source code is licensed under the MIT license found in the
131
+ * LICENSE file in the root directory of this source tree.
132
+ */
133
+ var be;
134
+ function Je() {
135
+ return be || (be = 1, process.env.NODE_ENV !== "production" && function() {
136
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
137
+ var e = _e, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
138
+ function t(_) {
139
+ {
140
+ for (var b = arguments.length, R = new Array(b > 1 ? b - 1 : 0), p = 1; p < b; p++)
141
+ R[p - 1] = arguments[p];
142
+ f("error", _, R);
143
+ }
144
+ }
145
+ function f(_, b, R) {
146
+ {
147
+ var p = r.ReactDebugCurrentFrame, k = p.getStackAddendum();
148
+ k !== "" && (b += "%s", R = R.concat([k]));
149
+ var T = R.map(function(j) {
150
+ return String(j);
151
+ });
152
+ T.unshift("Warning: " + b), Function.prototype.apply.call(console[_], console, T);
153
+ }
154
+ }
155
+ function l(_, b) {
156
+ return _ === b && (_ !== 0 || 1 / _ === 1 / b) || _ !== _ && b !== b;
157
+ }
158
+ var i = typeof Object.is == "function" ? Object.is : l, c = e.useState, v = e.useEffect, h = e.useLayoutEffect, m = e.useDebugValue, d = !1, u = !1;
159
+ function y(_, b, R) {
160
+ d || e.startTransition !== void 0 && (d = !0, t("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
161
+ var p = b();
162
+ if (!u) {
163
+ var k = b();
164
+ i(p, k) || (t("The result of getSnapshot should be cached to avoid an infinite loop"), u = !0);
165
+ }
166
+ var T = c({
167
+ inst: {
168
+ value: p,
169
+ getSnapshot: b
170
+ }
171
+ }), j = T[0].inst, $ = T[1];
172
+ return h(function() {
173
+ j.value = p, j.getSnapshot = b, x(j) && $({
174
+ inst: j
175
+ });
176
+ }, [_, p, b]), v(function() {
177
+ x(j) && $({
178
+ inst: j
179
+ });
180
+ var B = function() {
181
+ x(j) && $({
182
+ inst: j
183
+ });
184
+ };
185
+ return _(B);
186
+ }, [_]), m(p), p;
187
+ }
188
+ function x(_) {
189
+ var b = _.getSnapshot, R = _.value;
190
+ try {
191
+ var p = b();
192
+ return !i(R, p);
193
+ } catch {
194
+ return !0;
195
+ }
196
+ }
197
+ function N(_, b, R) {
198
+ return b();
199
+ }
200
+ var O = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", I = !O, G = I ? N : y, J = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : G;
201
+ ue.useSyncExternalStore = J, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
202
+ }()), ue;
203
+ }
204
+ var Ee;
205
+ function Qe() {
206
+ return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? Z.exports = Ye() : Z.exports = Je()), Z.exports;
207
+ }
208
+ var Ze = Qe(), W = '[cmdk-group=""]', ie = '[cmdk-group-items=""]', et = '[cmdk-group-heading=""]', ce = '[cmdk-item=""]', we = `${ce}:not([aria-disabled="true"])`, se = "cmdk-item-select", K = "data-value", tt = (e, r, t) => Xe(e, r, t), Ne = a.createContext(void 0), Y = () => a.useContext(Ne), Oe = a.createContext(void 0), fe = () => a.useContext(Oe), De = a.createContext(void 0), Ie = a.forwardRef((e, r) => {
209
+ let t = P(() => {
210
+ var n, s;
211
+ return { search: "", value: (s = (n = e.value) != null ? n : e.defaultValue) != null ? s : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
212
+ }), f = P(() => /* @__PURE__ */ new Set()), l = P(() => /* @__PURE__ */ new Map()), i = P(() => /* @__PURE__ */ new Map()), c = P(() => /* @__PURE__ */ new Set()), v = je(e), { label: h, children: m, value: d, onValueChange: u, filter: y, shouldFilter: x, loop: N, disablePointerSelection: O = !1, vimBindings: I = !0, ...G } = e, J = F(), _ = F(), b = F(), R = a.useRef(null), p = ft();
213
+ q(() => {
214
+ if (d !== void 0) {
215
+ let n = d.trim();
216
+ t.current.value = n, k.emit();
217
+ }
218
+ }, [d]), q(() => {
219
+ p(6, me);
220
+ }, []);
221
+ let k = a.useMemo(() => ({ subscribe: (n) => (c.current.add(n), () => c.current.delete(n)), snapshot: () => t.current, setState: (n, s, g) => {
222
+ var o, S, E;
223
+ if (!Object.is(t.current[n], s)) {
224
+ if (t.current[n] = s, n === "search") te(), $(), p(1, B);
225
+ else if (n === "value" && (g || p(5, me), ((o = v.current) == null ? void 0 : o.value) !== void 0)) {
226
+ let A = s ?? "";
227
+ (E = (S = v.current).onValueChange) == null || E.call(S, A);
228
+ return;
229
+ }
230
+ k.emit();
231
+ }
232
+ }, emit: () => {
233
+ c.current.forEach((n) => n());
234
+ } }), []), T = a.useMemo(() => ({ value: (n, s, g) => {
235
+ var o;
236
+ s !== ((o = i.current.get(n)) == null ? void 0 : o.value) && (i.current.set(n, { value: s, keywords: g }), t.current.filtered.items.set(n, j(s, g)), p(2, () => {
237
+ $(), k.emit();
238
+ }));
239
+ }, item: (n, s) => (f.current.add(n), s && (l.current.has(s) ? l.current.get(s).add(n) : l.current.set(s, /* @__PURE__ */ new Set([n]))), p(3, () => {
240
+ te(), $(), t.current.value || B(), k.emit();
241
+ }), () => {
242
+ i.current.delete(n), f.current.delete(n), t.current.filtered.items.delete(n);
243
+ let g = H();
244
+ p(4, () => {
245
+ te(), (g == null ? void 0 : g.getAttribute("id")) === n && B(), k.emit();
246
+ });
247
+ }), group: (n) => (l.current.has(n) || l.current.set(n, /* @__PURE__ */ new Set()), () => {
248
+ i.current.delete(n), l.current.delete(n);
249
+ }), filter: () => v.current.shouldFilter, label: h || e["aria-label"], getDisablePointerSelection: () => v.current.disablePointerSelection, listId: J, inputId: b, labelId: _, listInnerRef: R }), []);
250
+ function j(n, s) {
251
+ var g, o;
252
+ let S = (o = (g = v.current) == null ? void 0 : g.filter) != null ? o : tt;
253
+ return n ? S(n, t.current.search, s) : 0;
254
+ }
255
+ function $() {
256
+ if (!t.current.search || v.current.shouldFilter === !1) return;
257
+ let n = t.current.filtered.items, s = [];
258
+ t.current.filtered.groups.forEach((o) => {
259
+ let S = l.current.get(o), E = 0;
260
+ S.forEach((A) => {
261
+ let V = n.get(A);
262
+ E = Math.max(V, E);
263
+ }), s.push([o, E]);
264
+ });
265
+ let g = R.current;
266
+ z().sort((o, S) => {
267
+ var E, A;
268
+ let V = o.getAttribute("id"), Q = S.getAttribute("id");
269
+ return ((E = n.get(Q)) != null ? E : 0) - ((A = n.get(V)) != null ? A : 0);
270
+ }).forEach((o) => {
271
+ let S = o.closest(ie);
272
+ S ? S.appendChild(o.parentElement === S ? o : o.closest(`${ie} > *`)) : g.appendChild(o.parentElement === g ? o : o.closest(`${ie} > *`));
273
+ }), s.sort((o, S) => S[1] - o[1]).forEach((o) => {
274
+ var S;
275
+ let E = (S = R.current) == null ? void 0 : S.querySelector(`${W}[${K}="${encodeURIComponent(o[0])}"]`);
276
+ E == null || E.parentElement.appendChild(E);
277
+ });
278
+ }
279
+ function B() {
280
+ let n = z().find((g) => g.getAttribute("aria-disabled") !== "true"), s = n == null ? void 0 : n.getAttribute(K);
281
+ k.setState("value", s || void 0);
282
+ }
283
+ function te() {
284
+ var n, s, g, o;
285
+ if (!t.current.search || v.current.shouldFilter === !1) {
286
+ t.current.filtered.count = f.current.size;
287
+ return;
288
+ }
289
+ t.current.filtered.groups = /* @__PURE__ */ new Set();
290
+ let S = 0;
291
+ for (let E of f.current) {
292
+ let A = (s = (n = i.current.get(E)) == null ? void 0 : n.value) != null ? s : "", V = (o = (g = i.current.get(E)) == null ? void 0 : g.keywords) != null ? o : [], Q = j(A, V);
293
+ t.current.filtered.items.set(E, Q), Q > 0 && S++;
294
+ }
295
+ for (let [E, A] of l.current) for (let V of A) if (t.current.filtered.items.get(V) > 0) {
296
+ t.current.filtered.groups.add(E);
297
+ break;
298
+ }
299
+ t.current.filtered.count = S;
300
+ }
301
+ function me() {
302
+ var n, s, g;
303
+ let o = H();
304
+ o && (((n = o.parentElement) == null ? void 0 : n.firstChild) === o && ((g = (s = o.closest(W)) == null ? void 0 : s.querySelector(et)) == null || g.scrollIntoView({ block: "nearest" })), o.scrollIntoView({ block: "nearest" }));
305
+ }
306
+ function H() {
307
+ var n;
308
+ return (n = R.current) == null ? void 0 : n.querySelector(`${ce}[aria-selected="true"]`);
309
+ }
310
+ function z() {
311
+ var n;
312
+ return Array.from(((n = R.current) == null ? void 0 : n.querySelectorAll(we)) || []);
313
+ }
314
+ function re(n) {
315
+ let s = z()[n];
316
+ s && k.setState("value", s.getAttribute(K));
317
+ }
318
+ function ne(n) {
319
+ var s;
320
+ let g = H(), o = z(), S = o.findIndex((A) => A === g), E = o[S + n];
321
+ (s = v.current) != null && s.loop && (E = S + n < 0 ? o[o.length - 1] : S + n === o.length ? o[0] : o[S + n]), E && k.setState("value", E.getAttribute(K));
322
+ }
323
+ function pe(n) {
324
+ let s = H(), g = s == null ? void 0 : s.closest(W), o;
325
+ for (; g && !o; ) g = n > 0 ? st(g, W) : ct(g, W), o = g == null ? void 0 : g.querySelector(we);
326
+ o ? k.setState("value", o.getAttribute(K)) : ne(n);
327
+ }
328
+ let ve = () => re(z().length - 1), ge = (n) => {
329
+ n.preventDefault(), n.metaKey ? ve() : n.altKey ? pe(1) : ne(1);
330
+ }, he = (n) => {
331
+ n.preventDefault(), n.metaKey ? re(0) : n.altKey ? pe(-1) : ne(-1);
332
+ };
333
+ return a.createElement(M.div, { ref: r, tabIndex: -1, ...G, "cmdk-root": "", onKeyDown: (n) => {
334
+ var s;
335
+ if ((s = G.onKeyDown) == null || s.call(G, n), !n.defaultPrevented) switch (n.key) {
336
+ case "n":
337
+ case "j": {
338
+ I && n.ctrlKey && ge(n);
339
+ break;
340
+ }
341
+ case "ArrowDown": {
342
+ ge(n);
343
+ break;
344
+ }
345
+ case "p":
346
+ case "k": {
347
+ I && n.ctrlKey && he(n);
348
+ break;
349
+ }
350
+ case "ArrowUp": {
351
+ he(n);
352
+ break;
353
+ }
354
+ case "Home": {
355
+ n.preventDefault(), re(0);
356
+ break;
357
+ }
358
+ case "End": {
359
+ n.preventDefault(), ve();
360
+ break;
361
+ }
362
+ case "Enter":
363
+ if (!n.nativeEvent.isComposing && n.keyCode !== 229) {
364
+ n.preventDefault();
365
+ let g = H();
366
+ if (g) {
367
+ let o = new Event(se);
368
+ g.dispatchEvent(o);
369
+ }
370
+ }
371
+ }
372
+ } }, a.createElement("label", { "cmdk-label": "", htmlFor: T.inputId, id: T.labelId, style: pt }, h), ee(e, (n) => a.createElement(Oe.Provider, { value: k }, a.createElement(Ne.Provider, { value: T }, n))));
373
+ }), rt = a.forwardRef((e, r) => {
374
+ var t, f;
375
+ let l = F(), i = a.useRef(null), c = a.useContext(De), v = Y(), h = je(e), m = (f = (t = h.current) == null ? void 0 : t.forceMount) != null ? f : c == null ? void 0 : c.forceMount;
376
+ q(() => {
377
+ if (!m) return v.item(l, c == null ? void 0 : c.id);
378
+ }, [m]);
379
+ let d = Ae(l, i, [e.value, e.children, i], e.keywords), u = fe(), y = U((p) => p.value && p.value === d.current), x = U((p) => m || v.filter() === !1 ? !0 : p.search ? p.filtered.items.get(l) > 0 : !0);
380
+ a.useEffect(() => {
381
+ let p = i.current;
382
+ if (!(!p || e.disabled)) return p.addEventListener(se, N), () => p.removeEventListener(se, N);
383
+ }, [x, e.onSelect, e.disabled]);
384
+ function N() {
385
+ var p, k;
386
+ O(), (k = (p = h.current).onSelect) == null || k.call(p, d.current);
387
+ }
388
+ function O() {
389
+ u.setState("value", d.current, !0);
390
+ }
391
+ if (!x) return null;
392
+ let { disabled: I, value: G, onSelect: J, forceMount: _, keywords: b, ...R } = e;
393
+ return a.createElement(M.div, { ref: X([i, r]), ...R, id: l, "cmdk-item": "", role: "option", "aria-disabled": !!I, "aria-selected": !!y, "data-disabled": !!I, "data-selected": !!y, onPointerMove: I || v.getDisablePointerSelection() ? void 0 : O, onClick: I ? void 0 : N }, e.children);
394
+ }), nt = a.forwardRef((e, r) => {
395
+ let { heading: t, children: f, forceMount: l, ...i } = e, c = F(), v = a.useRef(null), h = a.useRef(null), m = F(), d = Y(), u = U((x) => l || d.filter() === !1 ? !0 : x.search ? x.filtered.groups.has(c) : !0);
396
+ q(() => d.group(c), []), Ae(c, v, [e.value, e.heading, h]);
397
+ let y = a.useMemo(() => ({ id: c, forceMount: l }), [l]);
398
+ return a.createElement(M.div, { ref: X([v, r]), ...i, "cmdk-group": "", role: "presentation", hidden: u ? void 0 : !0 }, t && a.createElement("div", { ref: h, "cmdk-group-heading": "", "aria-hidden": !0, id: m }, t), ee(e, (x) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? m : void 0 }, a.createElement(De.Provider, { value: y }, x))));
399
+ }), at = a.forwardRef((e, r) => {
400
+ let { alwaysRender: t, ...f } = e, l = a.useRef(null), i = U((c) => !c.search);
401
+ return !t && !i ? null : a.createElement(M.div, { ref: X([l, r]), ...f, "cmdk-separator": "", role: "separator" });
402
+ }), lt = a.forwardRef((e, r) => {
403
+ let { onValueChange: t, ...f } = e, l = e.value != null, i = fe(), c = U((d) => d.search), v = U((d) => d.value), h = Y(), m = a.useMemo(() => {
404
+ var d;
405
+ let u = (d = h.listInnerRef.current) == null ? void 0 : d.querySelector(`${ce}[${K}="${encodeURIComponent(v)}"]`);
406
+ return u == null ? void 0 : u.getAttribute("id");
407
+ }, []);
408
+ return a.useEffect(() => {
409
+ e.value != null && i.setState("search", e.value);
410
+ }, [e.value]), a.createElement(M.input, { ref: r, ...f, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": h.listId, "aria-labelledby": h.labelId, "aria-activedescendant": m, id: h.inputId, type: "text", value: l ? e.value : c, onChange: (d) => {
411
+ l || i.setState("search", d.target.value), t == null || t(d.target.value);
412
+ } });
413
+ }), ot = a.forwardRef((e, r) => {
414
+ let { children: t, label: f = "Suggestions", ...l } = e, i = a.useRef(null), c = a.useRef(null), v = Y();
415
+ return a.useEffect(() => {
416
+ if (c.current && i.current) {
417
+ let h = c.current, m = i.current, d, u = new ResizeObserver(() => {
418
+ d = requestAnimationFrame(() => {
419
+ let y = h.offsetHeight;
420
+ m.style.setProperty("--cmdk-list-height", y.toFixed(1) + "px");
421
+ });
422
+ });
423
+ return u.observe(h), () => {
424
+ cancelAnimationFrame(d), u.unobserve(h);
425
+ };
426
+ }
427
+ }, []), a.createElement(M.div, { ref: X([i, r]), ...l, "cmdk-list": "", role: "listbox", "aria-label": f, id: v.listId }, ee(e, (h) => a.createElement("div", { ref: X([c, v.listInnerRef]), "cmdk-list-sizer": "" }, h)));
428
+ }), ut = a.forwardRef((e, r) => {
429
+ let { open: t, onOpenChange: f, overlayClassName: l, contentClassName: i, container: c, ...v } = e;
430
+ return a.createElement(C.Root, { open: t, onOpenChange: f }, a.createElement(C.Portal, { container: c }, a.createElement(C.Overlay, { "cmdk-overlay": "", className: l }), a.createElement(C.Content, { "aria-label": e.label, "cmdk-dialog": "", className: i }, a.createElement(Ie, { ref: r, ...v }))));
431
+ }), it = a.forwardRef((e, r) => U((t) => t.filtered.count === 0) ? a.createElement(M.div, { ref: r, ...e, "cmdk-empty": "", role: "presentation" }) : null), dt = a.forwardRef((e, r) => {
432
+ let { progress: t, children: f, label: l = "Loading...", ...i } = e;
433
+ return a.createElement(M.div, { ref: r, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": l }, ee(e, (c) => a.createElement("div", { "aria-hidden": !0 }, c)));
434
+ }), D = Object.assign(Ie, { List: ot, Item: rt, Input: lt, Group: nt, Separator: at, Dialog: ut, Empty: it, Loading: dt });
435
+ function st(e, r) {
436
+ let t = e.nextElementSibling;
437
+ for (; t; ) {
438
+ if (t.matches(r)) return t;
439
+ t = t.nextElementSibling;
440
+ }
441
+ }
442
+ function ct(e, r) {
443
+ let t = e.previousElementSibling;
444
+ for (; t; ) {
445
+ if (t.matches(r)) return t;
446
+ t = t.previousElementSibling;
447
+ }
448
+ }
449
+ function je(e) {
450
+ let r = a.useRef(e);
451
+ return q(() => {
452
+ r.current = e;
453
+ }), r;
454
+ }
455
+ var q = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
456
+ function P(e) {
457
+ let r = a.useRef();
458
+ return r.current === void 0 && (r.current = e()), r;
459
+ }
460
+ function X(e) {
461
+ return (r) => {
462
+ e.forEach((t) => {
463
+ typeof t == "function" ? t(r) : t != null && (t.current = r);
464
+ });
465
+ };
466
+ }
467
+ function U(e) {
468
+ let r = fe(), t = () => e(r.snapshot());
469
+ return Ze.useSyncExternalStore(r.subscribe, t, t);
470
+ }
471
+ function Ae(e, r, t, f = []) {
472
+ let l = a.useRef(), i = Y();
473
+ return q(() => {
474
+ var c;
475
+ let v = (() => {
476
+ var m;
477
+ for (let d of t) {
478
+ if (typeof d == "string") return d.trim();
479
+ if (typeof d == "object" && "current" in d) return d.current ? (m = d.current.textContent) == null ? void 0 : m.trim() : l.current;
480
+ }
481
+ })(), h = f.map((m) => m.trim());
482
+ i.value(e, v, h), (c = r.current) == null || c.setAttribute(K, v), l.current = v;
483
+ }), l;
484
+ }
485
+ var ft = () => {
486
+ let [e, r] = a.useState(), t = P(() => /* @__PURE__ */ new Map());
487
+ return q(() => {
488
+ t.current.forEach((f) => f()), t.current = /* @__PURE__ */ new Map();
489
+ }, [e]), (f, l) => {
490
+ t.current.set(f, l), r({});
491
+ };
492
+ };
493
+ function mt(e) {
494
+ let r = e.type;
495
+ return typeof r == "function" ? r(e.props) : "render" in r ? r.render(e.props) : e;
496
+ }
497
+ function ee({ asChild: e, children: r }, t) {
498
+ return e && a.isValidElement(r) ? a.cloneElement(mt(r), { ref: r.ref }, t(r.props.children)) : t(r);
499
+ }
500
+ var pt = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
501
+ const Le = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
502
+ D,
503
+ {
504
+ ref: t,
505
+ className: L(
506
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
507
+ e
508
+ ),
509
+ ...r
510
+ }
511
+ ));
512
+ Le.displayName = D.displayName;
513
+ const Ot = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx($e, { ...r, children: /* @__PURE__ */ w.jsx(Re, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ w.jsx(Le, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), vt = a.forwardRef(({ className: e, ...r }, t) => (
514
+ // eslint-disable-next-line react/no-unknown-property
515
+ /* @__PURE__ */ w.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
516
+ /* @__PURE__ */ w.jsx(Me, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
517
+ /* @__PURE__ */ w.jsx(
518
+ D.Input,
519
+ {
520
+ ref: t,
521
+ className: L(
522
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
523
+ e
524
+ ),
525
+ ...r
526
+ }
527
+ )
528
+ ] })
529
+ ));
530
+ vt.displayName = D.Input.displayName;
531
+ const gt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
532
+ D.List,
533
+ {
534
+ ref: t,
535
+ className: L("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
536
+ ...r
537
+ }
538
+ ));
539
+ gt.displayName = D.List.displayName;
540
+ const ht = a.forwardRef((e, r) => /* @__PURE__ */ w.jsx(
541
+ D.Empty,
542
+ {
543
+ ref: r,
544
+ className: "py-6 text-center text-sm",
545
+ ...e
546
+ }
547
+ ));
548
+ ht.displayName = D.Empty.displayName;
549
+ const yt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
550
+ D.Group,
551
+ {
552
+ ref: t,
553
+ className: L(
554
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
555
+ e
556
+ ),
557
+ ...r
558
+ }
559
+ ));
560
+ yt.displayName = D.Group.displayName;
561
+ const St = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
562
+ D.Separator,
563
+ {
564
+ ref: t,
565
+ className: L("-mx-1 h-px bg-border", e),
566
+ ...r
567
+ }
568
+ ));
569
+ St.displayName = D.Separator.displayName;
570
+ const xt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
571
+ D.Item,
572
+ {
573
+ ref: t,
574
+ className: L(
575
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
576
+ e
577
+ ),
578
+ ...r
579
+ }
580
+ ));
581
+ xt.displayName = D.Item.displayName;
582
+ const bt = ({
583
+ className: e,
584
+ ...r
585
+ }) => /* @__PURE__ */ w.jsx(
586
+ "span",
587
+ {
588
+ className: L(
589
+ "ml-auto text-xs tracking-widest text-muted-foreground",
590
+ e
591
+ ),
592
+ ...r
593
+ }
594
+ );
595
+ bt.displayName = "CommandShortcut";
596
+ export {
597
+ Le as C,
598
+ $e as D,
599
+ vt as a,
600
+ gt as b,
601
+ ht as c,
602
+ xt as d,
603
+ Nt as e,
604
+ Re as f,
605
+ Ke as g,
606
+ Ot as h,
607
+ yt as i,
608
+ St as j,
609
+ bt as k
610
+ };
611
+ //# sourceMappingURL=Command-D5DE0DD7.js.map