cortex-react-components 2.22.3 → 2.23.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 (353) hide show
  1. package/dist/{chunk-GETYSIZV.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  3. package/dist/{chunk-P6OSMPUQ.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  4. package/dist/{chunk-UPRS7OYQ.mjs → chunk-2UNIT7NC.mjs} +1 -1
  5. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  6. package/dist/{chunk-BQQ4V4PX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  7. package/dist/{chunk-R6AYIVIR.mjs → chunk-5WVFEIMC.mjs} +1 -1
  8. package/dist/{chunk-GAZHKHGB.mjs → chunk-67QPOSVV.mjs} +1 -1
  9. package/dist/{chunk-7OMPPFGG.mjs → chunk-7GMAMIHM.mjs} +1 -1
  10. package/dist/chunk-ACGCNGIH.mjs +4 -0
  11. package/dist/{chunk-UECG3SCG.mjs → chunk-AGDKFAMN.mjs} +1 -1
  12. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  13. package/dist/{chunk-KVLUT4U2.mjs → chunk-CBIULUZQ.mjs} +1 -1
  14. package/dist/{chunk-2GM2LPLB.mjs → chunk-ERJXTG6X.mjs} +1 -1
  15. package/dist/{chunk-HDKHF3EA.mjs → chunk-FKU4VQR6.mjs} +1 -1
  16. package/dist/{chunk-G27V7B6H.mjs → chunk-GPFPTU7U.mjs} +1 -1
  17. package/dist/{chunk-F64CA5CH.mjs → chunk-H3CJOE6S.mjs} +1 -1
  18. package/dist/{chunk-U3FYDDE2.mjs → chunk-HKGW6JI2.mjs} +1 -1
  19. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  20. package/dist/chunk-HTMQGMYL.mjs +4 -0
  21. package/dist/{chunk-PNUBVBSR.mjs → chunk-IF3425JX.mjs} +1 -1
  22. package/dist/{chunk-2W4GQ3FI.mjs → chunk-JCWFPKF3.mjs} +1 -1
  23. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  24. package/dist/{chunk-75WE6ZXB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  25. package/dist/{chunk-3ANJOET7.mjs → chunk-LBUC4M6L.mjs} +1 -1
  26. package/dist/chunk-LEUI66J6.mjs +1 -0
  27. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  28. package/dist/{chunk-O24GFE6Q.mjs → chunk-LJOWXPWW.mjs} +1 -1
  29. package/dist/{chunk-PTZT4QJW.mjs → chunk-LJQPLE4S.mjs} +1 -1
  30. package/dist/{chunk-2OOJ4ZFB.mjs → chunk-M7NV6EFH.mjs} +1 -1
  31. package/dist/{chunk-4SRUEQTP.mjs → chunk-MXCW6SOT.mjs} +1 -1
  32. package/dist/{chunk-FYQBRCQM.mjs → chunk-N3B3XNV3.mjs} +1 -1
  33. package/dist/{chunk-62KYJVTC.mjs → chunk-NGL6K2L5.mjs} +1 -1
  34. package/dist/{chunk-FEWOSBUJ.mjs → chunk-NWISIJFD.mjs} +1 -1
  35. package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
  36. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  37. package/dist/{chunk-MO4HRQEL.mjs → chunk-PK3OBSCB.mjs} +1 -1
  38. package/dist/{chunk-D7VHHXGM.mjs → chunk-PZFYJ5FS.mjs} +1 -1
  39. package/dist/{chunk-CQAMS7RZ.mjs → chunk-Q2QAFOWG.mjs} +1 -1
  40. package/dist/chunk-QKOBOCKK.mjs +4 -0
  41. package/dist/chunk-QTW33JYG.mjs +1 -0
  42. package/dist/{chunk-L5NPH5RX.mjs → chunk-RQLUMNJE.mjs} +1 -1
  43. package/dist/{chunk-F2MJXGRT.mjs → chunk-RS4VD3ML.mjs} +1 -1
  44. package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
  45. package/dist/{chunk-RIZ2ODJL.mjs → chunk-THOBCTIL.mjs} +1 -1
  46. package/dist/chunk-WLI2YTOQ.mjs +1 -0
  47. package/dist/{chunk-UMOKAKKS.mjs → chunk-WVSUPHRY.mjs} +1 -1
  48. package/dist/{chunk-R5P4ZICA.mjs → chunk-WYR2HJ75.mjs} +1 -1
  49. package/dist/chunk-X2JWNPWT.mjs +4 -0
  50. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  51. package/dist/{chunk-K3YZPHOE.mjs → chunk-XGGWZIPM.mjs} +1 -1
  52. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  53. package/dist/{chunk-HKMNAXLM.mjs → chunk-YKG4FNS4.mjs} +1 -1
  54. package/dist/{chunk-DPZHVBGG.mjs → chunk-ZEPEWKBV.mjs} +1 -1
  55. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  56. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  57. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  58. package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
  59. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  60. package/dist/components/AdvancedComponents/index.mjs +1 -1
  61. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  62. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  63. package/dist/components/AdvancedComponents/switch.mjs +1 -1
  64. package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
  65. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  66. package/dist/components/Blocks/Banner.mjs +1 -1
  67. package/dist/components/Blocks/CallToAction.mjs +1 -1
  68. package/dist/components/Blocks/CaseStudy.mjs +1 -1
  69. package/dist/components/Blocks/Code.client.mjs +1 -1
  70. package/dist/components/Blocks/Code.mjs +1 -1
  71. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  72. package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
  73. package/dist/components/Blocks/Content.mjs +1 -1
  74. package/dist/components/Blocks/CopyButton.mjs +1 -1
  75. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  76. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  77. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  78. package/dist/components/Blocks/ProposalSummary.mjs +1 -1
  79. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  80. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  81. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  82. package/dist/components/Blocks/index.mjs +1 -1
  83. package/dist/components/CRM/CogeBoard.mjs +1 -1
  84. package/dist/components/CRM/DealCard.mjs +1 -1
  85. package/dist/components/CRM/DealDetails.mjs +1 -1
  86. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  87. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  88. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  89. package/dist/components/CRM/NewDealForm.mjs +1 -1
  90. package/dist/components/CRM/index.mjs +1 -1
  91. package/dist/components/Cards/ContentCard.mjs +1 -1
  92. package/dist/components/Cards/CustomerCard.mjs +1 -1
  93. package/dist/components/Cards/EventCard.mjs +1 -1
  94. package/dist/components/Cards/FeatureCard.mjs +1 -1
  95. package/dist/components/Cards/HeroCard.mjs +1 -1
  96. package/dist/components/Cards/Image.mjs +1 -1
  97. package/dist/components/Cards/PricingCard.mjs +1 -1
  98. package/dist/components/Cards/ServiceCard.mjs +1 -1
  99. package/dist/components/Cards/index.mjs +1 -1
  100. package/dist/components/Chat/ChatInterface.mjs +1 -1
  101. package/dist/components/Chat/ChatInterfaceMessages.mjs +1 -1
  102. package/dist/components/Chat/ChatMessage.mjs +1 -1
  103. package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -1
  104. package/dist/components/Chat/Components/ChatCardTask.mjs +1 -1
  105. package/dist/components/Chat/Components/Conversation.mjs +1 -1
  106. package/dist/components/Chat/Components/Message.mjs +1 -1
  107. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  108. package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
  109. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  110. package/dist/components/Chat/PartTypes/Reasoning.mjs +1 -1
  111. package/dist/components/Chat/PartTypes/Response.mjs +1 -1
  112. package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
  113. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  114. package/dist/components/Chat/capability-menu.mjs +1 -1
  115. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  116. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  117. package/dist/components/Chat/demo-tests.mjs +1 -1
  118. package/dist/components/Chat/demo.mjs +1 -1
  119. package/dist/components/Chat/example-usage.mjs +1 -1
  120. package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
  121. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  122. package/dist/components/Chat/index.mjs +1 -1
  123. package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
  124. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
  125. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  126. package/dist/components/DeliveryLead/index.mjs +1 -1
  127. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  128. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  129. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  130. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  131. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  132. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  133. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  134. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  135. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  136. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  137. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  138. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  139. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  140. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  141. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  142. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  143. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  144. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  145. package/dist/components/DigitalColleagues/index.mjs +1 -1
  146. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  147. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  148. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  149. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  150. package/dist/components/Foundary/DashboardHeader.mjs +1 -1
  151. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  152. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  153. package/dist/components/Foundary/Knowledge/manage-team-context.css +1 -0
  154. package/dist/components/Foundary/Knowledge/manage-team-context.d.ts +11 -0
  155. package/dist/components/Foundary/Knowledge/manage-team-context.js +4 -0
  156. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -0
  157. package/dist/components/Foundary/LandingMenu.mjs +1 -1
  158. package/dist/components/Foundary/Login.mjs +1 -1
  159. package/dist/components/Foundary/MainPage.mjs +1 -1
  160. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  161. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  162. package/dist/components/Foundary/RichText/components/RawUploadComponent/index.mjs +1 -1
  163. package/dist/components/Foundary/RichText/index.js +1 -1
  164. package/dist/components/Foundary/RichText/index.mjs +1 -1
  165. package/dist/components/Foundary/RichText/nodes/image-node.mjs +1 -1
  166. package/dist/components/Foundary/RichText/plugins/image-plugin.mjs +1 -1
  167. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.js +1 -1
  168. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  169. package/dist/components/Foundary/SearchableSelect.mjs +1 -1
  170. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  171. package/dist/components/Foundary/Views/KnowledgeView.d.ts +4 -2
  172. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  173. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  174. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  175. package/dist/components/Foundary/Views/index.js +1 -1
  176. package/dist/components/Foundary/Views/index.mjs +1 -1
  177. package/dist/components/Foundary/colleague-card.mjs +1 -1
  178. package/dist/components/Foundary/colleague-form.mjs +1 -1
  179. package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
  180. package/dist/components/Foundary/document-edit.d.ts +1 -1
  181. package/dist/components/Foundary/document-edit.js +1 -1
  182. package/dist/components/Foundary/document-edit.mjs +1 -1
  183. package/dist/components/Foundary/document-preview-examples.js +4 -4
  184. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  185. package/dist/components/Foundary/document-preview.js +1 -1
  186. package/dist/components/Foundary/document-preview.mjs +1 -1
  187. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  188. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  189. package/dist/components/Foundary/foundary-options.mjs +1 -1
  190. package/dist/components/Foundary/index.js +1 -1
  191. package/dist/components/Foundary/index.mjs +1 -1
  192. package/dist/components/Foundary/knowledge-browser.js +1 -1
  193. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  194. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  195. package/dist/components/Foundary/team-form.mjs +1 -1
  196. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  197. package/dist/components/HeaderFooter/Header.mjs +1 -1
  198. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  199. package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
  200. package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
  201. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  202. package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
  203. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  204. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  205. package/dist/components/HeaderFooter/index.mjs +1 -1
  206. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  207. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  208. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  209. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  210. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  211. package/dist/components/Heros/PostHero/index.mjs +1 -1
  212. package/dist/components/Heros/RenderHero.mjs +1 -1
  213. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  214. package/dist/components/Heros/index.mjs +1 -1
  215. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  216. package/dist/components/Holidays/CalendarView.js +1 -1
  217. package/dist/components/Holidays/CalendarView.mjs +1 -1
  218. package/dist/components/Holidays/HolidayGrid.js +1 -1
  219. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  220. package/dist/components/Holidays/HolidayTracker.js +1 -1
  221. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  222. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  223. package/dist/components/Holidays/index.js +1 -1
  224. package/dist/components/Holidays/index.mjs +1 -1
  225. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  226. package/dist/components/Layouts/Print.mjs +1 -1
  227. package/dist/components/Layouts/SlideShow.mjs +1 -1
  228. package/dist/components/Layouts/index.mjs +1 -1
  229. package/dist/components/Menus/Categories.mjs +1 -1
  230. package/dist/components/Menus/Filter.mjs +1 -1
  231. package/dist/components/Menus/ProjectTeam.mjs +1 -1
  232. package/dist/components/Menus/RelatedContent.mjs +1 -1
  233. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  234. package/dist/components/Menus/SidebarRight.mjs +1 -1
  235. package/dist/components/Menus/index.mjs +1 -1
  236. package/dist/components/Other/Container.mjs +1 -1
  237. package/dist/components/Other/index.mjs +1 -1
  238. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  239. package/dist/components/Payload/Link/index.mjs +1 -1
  240. package/dist/components/Payload/Media/index.mjs +1 -1
  241. package/dist/components/Payload/Pagination/index.mjs +1 -1
  242. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  243. package/dist/components/Payload/RichText/index.mjs +1 -1
  244. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  245. package/dist/components/Payload/index.mjs +1 -1
  246. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  247. package/dist/components/Projects/AddFileModal.mjs +1 -1
  248. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  249. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  250. package/dist/components/Projects/EpicFilter.mjs +1 -1
  251. package/dist/components/Projects/EpicsView.mjs +1 -1
  252. package/dist/components/Projects/FileView.mjs +1 -1
  253. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  254. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  255. package/dist/components/Projects/PlanningView.mjs +1 -1
  256. package/dist/components/Projects/ProjectPage.mjs +1 -1
  257. package/dist/components/Projects/ProjectView.mjs +1 -1
  258. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  259. package/dist/components/Projects/TaskCard.mjs +1 -1
  260. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  261. package/dist/components/Projects/TaskSelect.mjs +1 -1
  262. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  263. package/dist/components/Projects/TasksView.mjs +1 -1
  264. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  265. package/dist/components/Projects/business-unit-switcher.mjs +1 -1
  266. package/dist/components/Projects/file-list.mjs +1 -1
  267. package/dist/components/Projects/index.mjs +1 -1
  268. package/dist/components/Projects/project-card.mjs +1 -1
  269. package/dist/components/Projects/project-form.mjs +1 -1
  270. package/dist/components/Projects/team-card.mjs +1 -1
  271. package/dist/components/Projects/team-switcher-bar.mjs +1 -1
  272. package/dist/components/dc-temp/creative.mjs +1 -1
  273. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  274. package/dist/components/dc-temp/index.mjs +1 -1
  275. package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
  276. package/dist/components/index.js +20 -20
  277. package/dist/components/index.mjs +1 -1
  278. package/dist/components/ui/alert.mjs +1 -1
  279. package/dist/components/ui/avatar.mjs +1 -1
  280. package/dist/components/ui/badge.mjs +1 -1
  281. package/dist/components/ui/breadcrumb.mjs +1 -1
  282. package/dist/components/ui/button.mjs +1 -1
  283. package/dist/components/ui/calendar.mjs +1 -1
  284. package/dist/components/ui/card.mjs +1 -1
  285. package/dist/components/ui/checkbox.mjs +1 -1
  286. package/dist/components/ui/command.mjs +1 -1
  287. package/dist/components/ui/dialog.mjs +1 -1
  288. package/dist/components/ui/dropdown-menu.mjs +1 -1
  289. package/dist/components/ui/hover-card.mjs +1 -1
  290. package/dist/components/ui/index.mjs +1 -1
  291. package/dist/components/ui/input.mjs +1 -1
  292. package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
  293. package/dist/components/ui/inputs/text-input/index.mjs +1 -1
  294. package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
  295. package/dist/components/ui/label.mjs +1 -1
  296. package/dist/components/ui/pagination.mjs +1 -1
  297. package/dist/components/ui/popover.mjs +1 -1
  298. package/dist/components/ui/progress.mjs +1 -1
  299. package/dist/components/ui/scroll-area.mjs +1 -1
  300. package/dist/components/ui/select.mjs +1 -1
  301. package/dist/components/ui/separator.mjs +1 -1
  302. package/dist/components/ui/sheet.mjs +1 -1
  303. package/dist/components/ui/sidebar.mjs +1 -1
  304. package/dist/components/ui/skeleton.mjs +1 -1
  305. package/dist/components/ui/switch.mjs +1 -1
  306. package/dist/components/ui/tabs.mjs +1 -1
  307. package/dist/components/ui/textarea.mjs +1 -1
  308. package/dist/components/ui/toast.mjs +1 -1
  309. package/dist/components/ui/toaster.mjs +1 -1
  310. package/dist/components/ui/toggle-group.mjs +1 -1
  311. package/dist/components/ui/toggle.mjs +1 -1
  312. package/dist/components/ui/tooltip.mjs +1 -1
  313. package/dist/globals.css +1 -1
  314. package/dist/index.js +30 -30
  315. package/dist/index.mjs +1 -1
  316. package/dist/metafile-cjs.json +1 -1
  317. package/dist/metafile-esm.json +1 -1
  318. package/dist/pages/Blog.mjs +1 -1
  319. package/dist/pages/Documentation.mjs +1 -1
  320. package/dist/pages/IndexPage.mjs +1 -1
  321. package/dist/pages/Intranet.mjs +1 -1
  322. package/dist/pages/LandingPage.mjs +1 -1
  323. package/dist/pages/Page.mjs +1 -1
  324. package/dist/pages/Publish.mjs +1 -1
  325. package/dist/pages/Website.mjs +1 -1
  326. package/dist/sections/AboutSection.mjs +1 -1
  327. package/dist/sections/BlogDetail.mjs +1 -1
  328. package/dist/sections/BlogList.mjs +1 -1
  329. package/dist/sections/BlogListSection.mjs +1 -1
  330. package/dist/sections/ContactSection.mjs +1 -1
  331. package/dist/sections/ImageSection.mjs +1 -1
  332. package/dist/sections/MainPageSection.mjs +1 -1
  333. package/dist/sections/PageSections.mjs +1 -1
  334. package/dist/sections/PricingSection.mjs +1 -1
  335. package/dist/sections/ServiceDetail.mjs +1 -1
  336. package/dist/sections/ServiceDetailSection.mjs +1 -1
  337. package/dist/sections/ServiceSection.mjs +1 -1
  338. package/dist/sections/form/index.mjs +1 -1
  339. package/dist/sections/index.mjs +1 -1
  340. package/dist/styles/Colors.mjs +1 -1
  341. package/dist/utils/TimeUtil.d.ts +1 -0
  342. package/dist/utils/TimeUtil.js +1 -1
  343. package/dist/utils/TimeUtil.mjs +1 -1
  344. package/dist/utils/index.js +2 -2
  345. package/dist/utils/index.mjs +1 -1
  346. package/package.json +1 -1
  347. package/dist/chunk-EGEO3FNE.mjs +0 -1
  348. package/dist/chunk-HMZKODQJ.mjs +0 -4
  349. package/dist/chunk-NIGA3VKZ.mjs +0 -4
  350. package/dist/chunk-U2OXF7PJ.mjs +0 -1
  351. package/dist/chunk-UOA5RYVR.mjs +0 -1
  352. package/dist/chunk-VZBIMHCR.mjs +0 -4
  353. package/dist/chunk-YLEBXRJS.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";"use client";var _o=Object.create;var Ae=Object.defineProperty;var Uo=Object.getOwnPropertyDescriptor;var Bo=Object.getOwnPropertyNames;var Fo=Object.getPrototypeOf,$o=Object.prototype.hasOwnProperty;var Ko=(e,t)=>{for(var o in t)Ae(e,o,{get:t[o],enumerable:!0})},Nt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Bo(t))!$o.call(e,a)&&a!==o&&Ae(e,a,{get:()=>t[a],enumerable:!(r=Uo(t,a))||r.enumerable});return e};var X=(e,t,o)=>(o=e!=null?_o(Fo(e)):{},Nt(t||!e||!e.__esModule?Ae(o,"default",{value:e,enumerable:!0}):o,e)),Wo=e=>Nt(Ae({},"__esModule",{value:!0}),e);var oa={};Ko(oa,{DocumentPreview:()=>ta});module.exports=Wo(oa);var yt=require("motion/react"),G=require("lucide-react"),Y=require("react");var Et=require("clsx");var Je="-",Go=e=>{let t=Zo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let l=i.split(Je);return l[0]===""&&l.length!==1&&l.shift(),Dt(l,t)||jo(i)},getConflictingClassGroupIds:(i,l)=>{let b=o[i]||[];return l&&r[i]?[...b,...r[i]]:b}}},Dt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Dt(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(Je);return t.validators.find(({validator:i})=>i(n))?.classGroupId},Rt=/^\[(.+)\]$/,jo=e=>{if(Rt.test(e)){let t=Rt.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Zo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Jo(Object.entries(e.classGroups),o).forEach(([n,i])=>{Xe(i,r,n,t)}),r},Xe=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Pt(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(Xo(a)){Xe(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,i])=>{Xe(i,Pt(t,n),o,r)})})},Pt=(e,t)=>{let o=e;return t.split(Je).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Xo=e=>e.isThemeGetter,Jo=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,l])=>[t+i,l])):n);return[o,a]}):e,qo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,i)=>{o.set(n,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let i=o.get(n);if(i!==void 0)return i;if((i=r.get(n))!==void 0)return a(n,i),i},set(n,i){o.has(n)?o.set(n,i):a(n,i)}}},St="!",Yo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,i=l=>{let b=[],N=0,R=0,u;for(let f=0;f<l.length;f++){let k=l[f];if(N===0){if(k===a&&(r||l.slice(f,f+n)===t)){b.push(l.slice(R,f)),R=f+n;continue}if(k==="/"){u=f;continue}}k==="["?N++:k==="]"&&N--}let T=b.length===0?l:l.substring(R),O=T.startsWith(St),D=O?T.substring(1):T,S=u&&u>R?u-R:void 0;return{modifiers:b,hasImportantModifier:O,baseClassName:D,maybePostfixModifierPosition:S}};return o?l=>o({className:l,parseClassName:i}):i},Qo=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},er=e=>({cache:qo(e.cacheSize),parseClassName:Yo(e),...Go(e)}),tr=/\Vt+/,or=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(tr),l="";for(let b=i.length-1;b>=0;b-=1){let N=i[b],{modifiers:R,hasImportantModifier:u,baseClassName:T,maybePostfixModifierPosition:O}=o(N),D=!!O,S=r(D?T.substring(0,O):T);if(!S){if(!D){l=N+(l.length>0?" "+l:l);continue}if(S=r(T),!S){l=N+(l.length>0?" "+l:l);continue}D=!1}let f=Qo(R).join(":"),k=u?f+St:f,M=k+S;if(n.includes(M))continue;n.push(M);let J=a(S,D);for(let C=0;C<J.length;++C){let j=J[C];n.push(k+j)}l=N+(l.length>0?" "+l:l)}return l};function rr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Mt(t))&&(r&&(r+=" "),r+=o);return r}var Mt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Mt(e[r]))&&(o&&(o+=" "),o+=t);return o};function ar(e,...t){let o,r,a,n=i;function i(b){let N=t.reduce((R,u)=>u(R),e());return o=er(N),r=o.cache.get,a=o.cache.set,n=l,l(b)}function l(b){let N=r(b);if(N)return N;let R=or(b,o);return a(b,R),R}return function(){return n(rr.apply(null,arguments))}}var E=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Tt=/^\[(?:([a-Vt-]+):)?(.+)\]$/i,nr=/^\Vt+\/\Vt+$/,ir=new Set(["px","full","screen"]),sr=/^(\Vt+(\.\Vt+)?)?(xs|sm|md|lg|xl)$/,lr=/\Vt+(%|px|r?em|[sdl]?v([hwib]|min|max)|Vt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cr=/^(inset_)?-?((\Vt+)?\.?(\Vt+)[a-Vt]+|0)G-?((\Vt+)?\.?(\Vt+)[a-Vt]+|0)/,mr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ce=e=>xe(e)||ir.has(e)||nr.test(e),fe=e=>we(e,"length",xr),xe=e=>!!e&&!Number.isNaN(Number(e)),Ze=e=>we(e,"number",xe),Re=e=>!!e&&Number.isInteger(Number(e)),pr=e=>e.endsWith("%")&&xe(e.slice(0,-1)),h=e=>Tt.test(e),ge=e=>sr.test(e),ur=new Set(["length","size","percentage"]),fr=e=>we(e,ur,kt),gr=e=>we(e,"position",kt),br=new Set(["image","url"]),hr=e=>we(e,br,yr),vr=e=>we(e,"",wr),Pe=()=>!0,we=(e,t,o)=>{let r=Tt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},xr=e=>lr.test(e)&&!dr.test(e),kt=()=>!1,wr=e=>cr.test(e),yr=e=>mr.test(e);var Cr=()=>{let e=E("colors"),t=E("spacing"),o=E("blur"),r=E("brightness"),a=E("borderColor"),n=E("borderRadius"),i=E("borderSpacing"),l=E("borderWidth"),b=E("contrast"),N=E("grayscale"),R=E("hueRotate"),u=E("invert"),T=E("gap"),O=E("gradientColorStops"),D=E("gradientColorStopPositions"),S=E("inset"),f=E("margin"),k=E("opacity"),M=E("padding"),J=E("saturate"),C=E("scale"),j=E("sepia"),g=E("skew"),P=E("space"),m=E("translate"),A=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",h,t],I=()=>[h,t],se=()=>["",ce,fe],ie=()=>["auto",xe,h],p=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",h],Ct=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[xe,h];return{cacheSize:500,separator:":",theme:{colors:[Pe],spacing:[ce,fe],blur:["none","",ge,h],brightness:de(),borderColor:[e],borderRadius:["none","","full",ge,h],borderSpacing:I(),borderWidth:se(),contrast:de(),grayscale:q(),hueRotate:de(),invert:q(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[pr,fe],inset:Q(),margin:Q(),opacity:de(),padding:I(),saturate:de(),scale:de(),sepia:q(),skew:de(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[ge]}],"break-after":[{"break-after":Ct()}],"break-before":[{"break-before":Ct()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...p(),h]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],Vt:[{Vt:["auto",Re,h]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Re,h]}],"grid-cols":[{"grid-cols":[Pe]}],"col-start-end":[{col:["auto",{span:["full",Re,h]},h]}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":[Pe]}],"row-start-end":[{row:["auto",{span:[Re,h]},h]}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[T]}],"gap-x":[{"gap-x":[T]}],"gap-y":[{"gap-y":[T]}],"justify-content":[{justify:["normal",...le()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...le(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...le(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],Vt:[{Vt:[M]}],Vt:[{Vt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[ge]},ge]}],h:[{h:[h,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ge,fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ze]}],"font-family":[{font:[Pe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",xe,Ze]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ce,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","Le-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ce,fe]}],"underline-offset":[{"underline-offset":["auto",ce,h]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...p(),gr]}],"bg-repeat":[{bg:["Le-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[D]}],"gradient-via-pos":[{via:[D]}],"gradient-to-pos":[{to:[D]}],"gradient-from":[{from:[O]}],"gradient-via":[{via:[O]}],"gradient-to":[{to:[O]}],rounded:[{rounded:[n]}],"rounded-Vt":[{"rounded-Vt":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-Vt":[{"rounded-Vt":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-Vt":[{"border-Vt":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:V()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-Vt":[{"border-Vt":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[ce,h]}],"outline-w":[{outline:[ce,fe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[ce,fe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ge,vr]}],"shadow-color":[{shadow:[Pe]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",ge,h]}],grayscale:[{grayscale:[N]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[u]}],saturate:[{saturate:[J]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[J]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Re,h]}],"translate-x":[{"translate-x":[m]}],"translate-y":[{"translate-y":[m]}],"skew-x":[{"skew-x":[g]}],"skew-y":[{"skew-y":[g]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","Le-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","Vt-resize","w-resize","Vt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-Vt":[{"scroll-Vt":I()}],"scroll-Vt":[{"scroll-Vt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ce,fe,Ze]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","Vt","Vt","pr","pb","pl"],px:["pr","pl"],py:["Vt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-Vt","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-Vt","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-Vt":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-Vt"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-Vt","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-Vt","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Vt","scroll-Vt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Vt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var It=ar(Cr);function v(...e){return It((0,Et.clsx)(e))}var Ht=require("@radix-ui/react-slot"),Lt=require("class-variance-authority"),At=X(require("react")),Vt=require("react/jsx-runtime"),Nr=(0,Lt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),re=At.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},n)=>(0,Vt.jsx)(e?Ht.Slot:"button",{className:v(Nr({className:t,size:o,variant:r})),ref:n,...a}));re.displayName="Button";var De=X(require("react")),$=X(require("@radix-ui/react-dialog"));var Ve=$.Root;var qe=$.Portal;var Oe=De.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)($.Overlay,{ref:o,className:v("fixed inset-0 Vt-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",e),...t}));Oe.displayName=$.Overlay.displayName;var Ye=De.forwardRef(({className:e,children:t,...o},r)=>(0,Vt.jsxs)(qe,{children:[(0,Vt.jsx)(Oe,{}),(0,Vt.jsxs)($.Content,{ref:r,className:v("fixed left-[50%] top-[50%] Vt-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",e),...o,children:[t,(0,Vt.jsxs)($.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:[(0,Vt.jsx)(G.X,{className:"h-4 w-4"}),(0,Vt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ye.displayName=$.Content.displayName;var Qe=({className:e,...t})=>(0,Vt.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qe.displayName="DialogHeader";var Rr=({className:e,...t})=>(0,Vt.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Rr.displayName="DialogFooter";var et=De.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)($.Title,{ref:o,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));et.displayName=$.Title.displayName;var Pr=De.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)($.Description,{ref:o,className:v("text-sm text-muted-foreground",e),...t}));Pr.displayName=$.Description.displayName;var Ao=X(require("@radix-ui/react-dialog"));var zt=X(require("react")),Se=zt.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)("textarea",{className:v("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Se.displayName="Textarea";var Ut=X(require("react"));var me=Ut.forwardRef(({className:e,type:t,...o},r)=>(0,Vt.jsx)("input",{type:t,className:v("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));me.displayName="Input";var w=X(require("@radix-ui/react-select")),be=X(require("react")),Ft=w.Root;var $t=w.Value,tt=be.forwardRef(({children:e,className:t,...o},r)=>(0,Vt.jsxs)(w.Trigger,{className:v("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,Vt.jsx)(w.Icon,{asChild:!0,children:(0,Vt.jsx)(G.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));tt.displayName=w.Trigger.displayName;var Kt=be.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(w.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Vt.jsx)(G.ChevronUp,{className:"h-4 w-4"})}));Kt.displayName=w.ScrollUpButton.displayName;var Wt=be.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(w.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Vt.jsx)(G.ChevronDown,{className:"h-4 w-4"})}));Wt.displayName=w.ScrollDownButton.displayName;var ot=be.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,Vt.jsx)(w.Portal,{children:(0,Vt.jsxs)(w.Content,{className:v("relative Vt-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:a,...r,children:[(0,Vt.jsx)(Kt,{}),(0,Vt.jsx)(w.Viewport,{className:v("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Vt.jsx)(Wt,{})]})}));ot.displayName=w.Content.displayName;var Dr=be.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(w.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Dr.displayName=w.Label.displayName;var ze=be.forwardRef(({children:e,className:t,...o},r)=>(0,Vt.jsxs)(w.Item,{className:v("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,Vt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vt.jsx)(w.ItemIndicator,{children:(0,Vt.jsx)(G.Check,{className:"h-4 w-4"})})}),(0,Vt.jsx)(w.ItemText,{children:e})]}));ze.displayName=w.Item.displayName;var Sr=be.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(w.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Sr.displayName=w.Separator.displayName;var Gt=X(require("react")),rt=X(require("@radix-ui/react-label"));var Mr=(0,Lt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),at=Gt.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(rt.Root,{ref:o,className:v(Mr(),e),...t}));at.displayName=rt.Root.displayName;var it=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:a,className:n="",disabled:i=!1})=>{let[l,b]=(0,Y.useState)(!1),[N,R]=(0,Y.useState)(""),u=()=>{i||(b(!0),R(t))},T=async()=>{N!==t&&await a(e,N),b(!1)},O=D=>{D.key==="Enter"&&!r||D.key==="Enter"&&D.ctrlKey&&r?T():D.key==="Escape"&&(b(!1),R(""))};return(0,Vt.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,Vt.jsx)(at,{children:o}),l?r?(0,Vt.jsx)(Se,{value:N,onChange:D=>R(D.target.value),onBlur:T,onKeyDown:O,autoFocus:!0,rows:4,className:"resize-none"}):(0,Vt.jsx)(me,{value:N,onChange:D=>R(D.target.value),onBlur:T,onKeyPress:O,autoFocus:!0,className:"text-lg font-medium"}):(0,Vt.jsxs)("div",{onClick:u,className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Vt.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!i&&(0,Vt.jsx)(G.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var No=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Ro=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Po=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Do=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),So=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Mo=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),To=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ge=require("@payloadcms/richtext-lexical/lexical/list"),ko=require("@payloadcms/richtext-lexical/lexical/rich-text"),Io=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var yo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Le=require("@payloadcms/richtext-lexical/lexical/utils"),x=require("@payloadcms/richtext-lexical/lexical"),ht=require("@payloadcms/richtext-lexical/lexical/selection");var io=require("@radix-ui/react-dialog"),Fe=require("@payloadcms/richtext-lexical/client");var lt=X(require("bson-objectid"));var qt=require("@payloadcms/ui");var Jt=X(require("react")),ae=X(require("@radix-ui/react-tooltip"));var _e=ae.Provider,Ue=ae.Root,Be=ae.Trigger,Me=Jt.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Vt.jsx)(ae.Portal,{children:(0,Vt.jsx)(ae.Content,{ref:r,sideOffset:t,className:v("Vt-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Me.displayName=ae.Content.displayName;var Tr=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[a]=(0,yo.useLexicalComposerContext)(),[n,i]=(0,Y.useState)(""),[l,b]=(0,Y.useState)(""),[N,R]=(0,Y.useState)(""),u=async f=>{console.log("fetchMedia",f)};(0,Y.useEffect)(()=>{typeof o=="string"?o.length===24?u(o):(i(o||""),R(S(D())),b(O()||"")):typeof o=="object"&&(i(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),R(S(o.filesize)),b(o.mimeType?.split("/")[1]||""))},[]);let T=(0,Y.useCallback)(()=>{a.update(()=>{(0,x.$getNodeByKey)(r)?.remove()})},[a,r]),O=()=>{let f=e.data.value;return typeof f=="string"?f.split(";base64")[0]?.split("image/")[1]:""},D=()=>{let f=e.data.value;if(typeof f=="string"){let k=f.split(",")[1]?.length||0;return 4*Math.ceil(k/3)*.5624896334383812/1e3}return 0};function S(f){if(f>=1e6){let M=f/1e6;return`${M>=10?Math.round(M).toString():M.toFixed(1)} MB`}return`${Math.floor(f/1e3)} KB`}return(0,Vt.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,Vt.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,Vt.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,Vt.jsx)("div",{className:"flex-1",children:e.data.value?(0,Vt.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:n}):(0,Vt.jsx)(qt.File,{})}),(0,Vt.jsx)(_e,{children:(0,Vt.jsxs)(Ue,{children:[(0,Vt.jsxs)(Be,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,Vt.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,Vt.jsx)("button",{onClick:f=>{f.preventDefault(),T()},className:"flex-1 flex justify-center items-center",children:(0,Vt.jsx)(G.X,{width:24,height:24,strokeWidth:1})})]}),(0,Vt.jsx)(Me,{children:(0,Vt.jsx)("span",{children:"Remove image"})})]})})]}),(0,Vt.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,Vt.jsx)("span",{className:"",children:l?.toLocaleUpperCase()}),(0,Vt.jsx)("span",{children:N})]})]})})},to=Tr;function kr(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:ye({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Te=class extends Fe.UploadNode{static importDOM(){return{img:()=>({conversion:kr,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new lt.default().toHexString(),t.version=3);let o={id:t.id??new lt.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=ye(o);return r.setFormat?.(t.format),r}decorate(){return(0,Vt.jsx)(to,{data:this.__data,nodeKey:this.getKey()})}};function ye(e){return new Te({data:e})}var Ir=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Er=e=>Ir?(e||window).getSelection():null,Ka=(0,x.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),dt=(0,x.createCommand)("INSERT_UPLOAD_COMMAND");function so({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,Y.useRef)(!1),[a,n]=(0,Y.useState)(!0),[i,l]=(0,Y.useState)(""),[b,N]=(0,Y.useState)(""),[R,u]=(0,Y.useState)(!1),[T,O]=(0,Y.useState)("left"),D=i==="",S=C=>{u(C.target.checked)},f=C=>{O(C.target.value)},k=C=>{let j=new FileReader;j.onload=function(){return typeof j.result=="string"&&l(j.result),""},C!==null&&C[0]&&j.readAsDataURL(C[0])};(0,Y.useEffect)(()=>{r.current=!1;let C=j=>{r.current=j.altKey};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[e]),(0,Y.useEffect)(()=>{a||t()},[a]),(0,Y.useEffect)(()=>{n(o)},[o]);let M=({editor:C,relationTo:j,replaceNodeKey:g,value:P})=>{if(g)C.update(()=>{let m=(0,x.$getNodeByKey)(g);m&&m.replace(ye({id:"",fields:{},relationTo:"media",value:P}))});else{let m=C.dispatchCommand(dt,{fields:null,relationTo:"media",value:P})}},J=()=>{M({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:b,src:i,showCaption:R,position:T}.src}),n(!1),t()};return(0,Vt.jsx)(Ve,{open:a,onOpenChange:C=>n(C),children:(0,Vt.jsxs)(Ye,{children:[(0,Vt.jsxs)(Qe,{children:[(0,Vt.jsx)(et,{children:"Upload Image"}),(0,Vt.jsx)(io.DialogDescription,{children:"Description"})]}),(0,Vt.jsxs)("div",{className:"",children:[(0,Vt.jsx)("div",{style:{marginBottom:"1em"},children:(0,Vt.jsx)(me,{type:"file",onChange:C=>k(C.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,Vt.jsx)("div",{style:{marginBottom:"1em"},children:(0,Vt.jsx)(me,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:C=>N(C.currentTarget.value),value:b,"data-test-id":"image-modal-alt-text-input"})}),(0,Vt.jsx)(re,{"data-test-id":"image-modal-file-upload-btn",disabled:D,onClick:()=>J(),children:"Confirm"})]})]})})}function ct({captionsEnabled:e}){let[t]=(0,yo.useLexicalComposerContext)();return(0,Y.useEffect)(()=>{if(!t.hasNodes([Fe.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,Le.mergeRegister)(t.registerCommand(x.DRAGSTART_COMMAND,o=>Hr(o),x.COMMAND_PRIORITY_HIGH),t.registerCommand(x.DRAGOVER_COMMAND,o=>Lr(o),x.COMMAND_PRIORITY_LOW),t.registerCommand(x.DROP_COMMAND,o=>Ar(o,t),x.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Hr(e){if(!mt())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","G"),!0):!1}function Lr(e){return mt()?(lo(e)||e.preventDefault(),!0):!1}function Ar(e,t){let o=mt();if(!o)return!1;if(e.preventDefault(),lo(e)){let r=Vr(e);o.remove();let a=(0,x.$createRangeSelection)();r!=null&&a.applyDOMRange(r),(0,x.$setSelection)(a)}return!0}function mt(){let e=(0,x.$getSelection)();if(!(0,x.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Fe.$isUploadNode)(o)?o:null}function lo(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Vr(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,a=Er(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&a!==null)a.collapse(e.rangeParent,e.rangeOffset||0),t=a.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Or=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),co=Or;var zr=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),mo=zr;var _r=()=>(0,Vt.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{Vt:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,Vt.jsx)("path",{Vt:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),po=_r;var Ur=()=>(0,Vt.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{Vt:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,Vt.jsx)("path",{Vt:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),uo=Ur;var Br=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),fo=Br;var Fr=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),go=Fr;var bo=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),ho=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),vo=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),xo=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),wo=()=>(0,Vt.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Vt.jsx)("path",{Vt:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var ue=X(require("react")),y=X(require("@radix-ui/react-dropdown-menu")),Ce=require("@radix-ui/react-icons");var $e=y.Root,Ke=y.Trigger;var $r=ue.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,Vt.jsxs)(y.SubTrigger,{ref:a,className:v("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,Vt.jsx)(Ce.ChevronRightIcon,{className:"ml-auto"})]}));$r.displayName=y.SubTrigger.displayName;var Kr=ue.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(y.SubContent,{ref:o,className:v("Vt-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Kr.displayName=y.SubContent.displayName;var Ee=ue.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Vt.jsx)(y.Portal,{children:(0,Vt.jsx)(y.Content,{ref:r,sideOffset:t,className:v("Vt-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ee.displayName=y.Content.displayName;var He=ue.forwardRef(({className:e,inset:t,...o},r)=>(0,Vt.jsx)(y.Item,{ref:r,className:v("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));He.displayName=y.Item.displayName;var Wr=ue.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,Vt.jsxs)(y.CheckboxItem,{ref:a,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,Vt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vt.jsx)(y.ItemIndicator,{children:(0,Vt.jsx)(Ce.CheckIcon,{className:"h-4 w-4"})})}),t]}));Wr.displayName=y.CheckboxItem.displayName;var Gr=ue.forwardRef(({className:e,children:t,...o},r)=>(0,Vt.jsxs)(y.RadioItem,{ref:r,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Vt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vt.jsx)(y.ItemIndicator,{children:(0,Vt.jsx)(Ce.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Gr.displayName=y.RadioItem.displayName;var jr=ue.forwardRef(({className:e,inset:t,...o},r)=>(0,Vt.jsx)(y.Label,{ref:r,className:v("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));jr.displayName=y.Label.displayName;var Zr=ue.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(y.Separator,{ref:o,className:v("-mx-1 my-1 h-px bg-muted",e),...t}));Zr.displayName=y.Separator.displayName;var Xr=({className:e,...t})=>(0,Vt.jsx)("span",{className:v("ml-auto text-xs tracking-widest opacity-60",e),...t});Xr.displayName="DropdownMenuShortcut";var bt=1;function Jr(){return(0,Vt.jsx)("span",{className:"border border-[#222222]"})}function vt(){let[e]=(0,yo.useLexicalComposerContext)(),t=(0,Y.useRef)(null),[o,r]=(0,Y.useState)(!1),[a,n]=(0,Y.useState)(!1),[i,l]=(0,Y.useState)(!1),[b,N]=(0,Y.useState)(!1),[R,u]=(0,Y.useState)(!1),[T,O]=(0,Y.useState)(!1),[D,S]=(0,Y.useState)(!1),[f,k]=(0,Y.useState)(!1),[M,J]=(0,Y.useState)(!1),[C,j]=(0,Y.useState)("left"),[g,P]=(0,Y.useState)("p"),m=p=>{e.update(()=>{let V=(0,x.$getSelection)();(0,x.$isRangeSelection)(V)&&(p==="p"?(0,ht.$setBlocksType)(V,()=>(0,x.$createParagraphNode)()):(0,ht.$setBlocksType)(V,()=>(0,ko.$createHeadingNode)(p)))})},A=(0,Y.useCallback)(()=>{let p=(0,x.$getSelection)();if((0,x.$isRangeSelection)(p)){l(p.hasFormat("bold")),N(p.hasFormat("italic")),u(p.hasFormat("underline")),O(p.hasFormat("strikethrough")),S(p.hasFormat("subscript")),k(p.hasFormat("superscript"));let V=p.anchor.getNode(),F=V;for(;F&&!(0,x.$isParagraphNode)(F)&&F!==(0,x.$getRoot)();){let q=F.getParent();q&&(F=q)}if(F){let q=F.getFormatType();j(q||"left")}let le=V.getTopLevelElement()?.__tag;P(le||"p")}},[]);(0,Y.useEffect)(()=>(0,Le.mergeRegister)(e.registerUpdateListener(({editorState:p})=>{p.read(()=>{A()})}),e.registerCommand(x.SELECTION_CHANGE_COMMAND,(p,V)=>(A(),!1),bt),e.registerCommand(x.CAN_UNDO_COMMAND,p=>(r(p),!1),bt),e.registerCommand(x.CAN_REDO_COMMAND,p=>(n(p),!1),bt),(0,Le.mergeRegister)(e.registerCommand(dt,p=>(e.update(()=>{let V=(0,x.$getSelection)()||(0,x.$getPreviousSelection)();if((0,x.$isRangeSelection)(V)){let F=ye({id:p.id,fields:p.fields,relationTo:p.relationTo,value:p.value}),{focus:le}=V,q=le.getNode();(0,Le.$insertNodeToNearestRoot)(F),(0,x.$isParagraphNode)(q)&&!q.__first&&q.remove()}}),!0),x.COMMAND_PRIORITY_EDITOR))),[e,A]);let U=[[{label:"Undo",icon:(0,Vt.jsx)(G.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,Vt.jsx)(G.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,Vt.jsx)(co,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:i},{label:"Italic",icon:(0,Vt.jsx)(mo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:b},{label:"Underline",icon:(0,Vt.jsx)(po,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:R},{label:"Strikethrough",icon:(0,Vt.jsx)(uo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:T},{label:"Subscript",icon:(0,Vt.jsx)(fo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:D},{label:"Superscript",icon:(0,Vt.jsx)(go,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:f}]],Q=[{label:"Left Align",direction:"left",icon:(0,Vt.jsx)(G.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,Vt.jsx)(G.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,Vt.jsx)(G.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,Vt.jsx)(G.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"justify")}}],se=[{label:"Normal Text",value:"p",icon:(0,Vt.jsx)(bo,{}),onClick:()=>m("p")},{label:"Heading 1",value:"h1",icon:(0,Vt.jsx)(ho,{}),onClick:()=>m("h1")},{label:"Heading 2",value:"h2",icon:(0,Vt.jsx)(vo,{}),onClick:()=>m("h2")},{label:"Heading 3",value:"h3",icon:(0,Vt.jsx)(xo,{}),onClick:()=>m("h3")},{label:"Heading 4",value:"h4",icon:(0,Vt.jsx)(wo,{}),onClick:()=>m("h4")},...[{label:"Unordered List",value:"ul",icon:(0,Vt.jsx)(G.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ge.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,Vt.jsx)(G.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ge.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],ie=[{label:"Insert Image",icon:(0,Vt.jsx)(G.ImageUp,{width:15,height:15}),onClick:()=>{J(!0)},disabled:!1}];return(0,Vt.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,Vt.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[U.map((p,V)=>(0,Vt.jsxs)(Y.Fragment,{children:[(0,Vt.jsx)("div",{className:"flex items-center gap-2",children:p.map((F,le)=>(0,Vt.jsx)("div",{role:"button","aria-disabled":F.disabled||!1,onClick:F.onClick,className:v("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",F.active&&"bg-[#3c3c3c]"),"aria-label":F.label,children:(0,Vt.jsx)(_e,{children:(0,Vt.jsxs)(Ue,{children:[(0,Vt.jsx)(Be,{className:"text-[#b5b5b5]",children:F.icon}),(0,Vt.jsx)(Me,{children:(0,Vt.jsx)("p",{children:F.label})})]})})},le))}),(0,Vt.jsx)(Jr,{})]},`toolbar-option-${p.length}-${V}`)),(0,Vt.jsxs)($e,{children:[(0,Vt.jsxs)(Ke,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Q.find(p=>p.direction===C)?.icon,Q.find(p=>p.direction===C)?.label,(0,Vt.jsx)(G.ChevronDown,{width:15,height:15})]}),(0,Vt.jsx)(Ee,{className:"bg-black hover:bg-black",children:Q.map((p,V)=>(0,Vt.jsxs)(He,{onClick:p.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Vt.jsx)("span",{children:p.icon}),(0,Vt.jsx)("span",{children:p.label})]},`${p.label}-${V}`))})]}),(0,Vt.jsxs)($e,{children:[(0,Vt.jsxs)(Ke,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[se.find(p=>p.value===g)?.icon,se.find(p=>p.value===g)?.label,(0,Vt.jsx)(G.ChevronDown,{width:15,height:15})]}),(0,Vt.jsx)(Ee,{className:"bg-black hover:bg-black",children:se.map((p,V)=>(0,Vt.jsxs)(He,{onClick:p.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Vt.jsx)("span",{children:p.icon}),(0,Vt.jsx)("span",{children:p.label})]},`heading-option-${p.label}-${V}`))})]}),(0,Vt.jsxs)($e,{children:[(0,Vt.jsxs)(Ke,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,Vt.jsx)(G.Plus,{width:15,height:15}),(0,Vt.jsx)(G.ChevronDown,{width:15,height:15})]}),(0,Vt.jsx)(Ee,{className:"bg-black hover:bg-black",children:ie.map((p,V)=>(0,Vt.jsxs)(He,{onClick:p.onClick,disabled:p.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Vt.jsx)("span",{children:p.icon}),(0,Vt.jsx)("span",{children:p.label})]},V))})]}),M&&(0,Vt.jsx)(so,{activeEditor:e,onClose:()=>{J(!1)},isOpen:M})]})})}var qr=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,yo.useLexicalComposerContext)(),n=i=>{i.read(()=>{let l=i.toJSON();e?.(()=>l)})};return(0,Y.useEffect)(()=>{a.setEditable(r)},[r]),(0,Y.useEffect)(()=>{t&&a.update(()=>{a.setEditorState(a.parseEditorState(t))})},[]),(0,Vt.jsx)("div",{className:"w-full",children:(0,Vt.jsxs)("div",{className:" ",children:[r&&(0,Vt.jsx)(vt,{}),(0,Vt.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,Vt.jsx)(Mo.RichTextPlugin,{contentEditable:(0,Vt.jsx)(Po.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Do.LexicalErrorBoundary}),r&&(0,Vt.jsxs)(Vt.Fragment,{children:[(0,Vt.jsx)(So.HistoryPlugin,{}),(0,Vt.jsx)(No.AutoFocusPlugin,{}),(0,Vt.jsx)(To.ListPlugin,{}),(0,Vt.jsx)(Io.OnChangePlugin,{onChange:n}),(0,Vt.jsx)(ct,{})]})]})]})})},Yr=({setValue:e,value:t,name:o,editable:r=!0})=>(0,Vt.jsx)(Ro.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ge.ListNode,Ge.ListItemNode,ko.HeadingNode,Te],onError(n){throw console.error("Lexical error:",n),n},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,Vt.jsx)(qr,{value:t,setValue:e,name:o,editable:r})}),je=Yr;function Ho({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:a=[],knowledgeContexts:n=[]}){let[i,l]=(0,Y.useState)({...e,updatedAt:new Date}),[b,N]=(0,Y.useState)(!1),[R,u]=(0,Y.useState)(i.richTextContent);(0,Y.useEffect)(()=>{l(e)},[e]);let T=g=>{switch(g){case"markdown":case"mdx":return(0,Vt.jsx)(G.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Vt.jsx)(G.File,{className:"h-6 w-6 text-success"});case"text":return(0,Vt.jsx)(G.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Vt.jsx)(G.File,{className:"h-6 w-6 text-muted-foreground"})}},O=g=>{switch(g){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},D=()=>{let g=new Set,P=new Set;return n.forEach(m=>{m.menuConfig.groupBy.forEach(A=>g.add(A))}),a.forEach(m=>{m.metadata&&Object.keys(m.metadata).forEach(A=>P.add(A))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(P).sort(),allKeys:Array.from(new Set([...g,...P])).sort()}},S=g=>{let P=new Set;return a.forEach(m=>{m.metadata?.[g]&&P.add(String(m.metadata[g]))}),Array.from(P).sort()},f=D(),k=()=>{t({...i,richTextContent:R})},M=(g,P)=>{l(m=>({...m,metadata:{...m.metadata,[g]:P}}))},J=(g,P)=>{P==="__custom__"?M(g,""):M(g,P)},C=()=>{M("","")},j=g=>{l(P=>{let m={...P.metadata};return delete m[g],{...P,metadata:m}})};return(0,Vt.jsxs)(yt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,Vt.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,Vt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Vt.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Vt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vt.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,Vt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Vt.jsx)(it,{fieldName:"title",value:i.title,label:"",onSave:(g,P)=>l(m=>({...m,title:P})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Vt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${O(i.format)} flex-shrink-0 mt-1`,children:i.format.toUpperCase()})]}),(0,Vt.jsx)("div",{className:"mt-2",children:(0,Vt.jsx)(it,{fieldName:"description",value:i.description||"Click to add description...",label:"",multiline:!0,onSave:(g,P)=>l(m=>({...m,description:P})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,Vt.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Vt.jsxs)(re,{variant:"ghost",size:"sm",onClick:()=>N(!b),className:"gap-2",children:[(0,Vt.jsx)(G.Info,{className:"h-4 w-4"}),"Metadata",i.metadata&&Object.keys(i.metadata).length>0&&(0,Vt.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(i.metadata).length}),b?(0,Vt.jsx)(G.ChevronDown,{className:"h-4 w-4"}):(0,Vt.jsx)(G.ChevronRight,{className:"h-4 w-4"})]}),(0,Vt.jsxs)(re,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Vt.jsx)(G.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Vt.jsxs)(re,{size:"sm",onClick:k,className:"gap-2",children:[(0,Vt.jsx)(G.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,Vt.jsx)(yt.motion.div,{initial:!1,animate:{height:b?"auto":0,opacity:b?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,Vt.jsxs)("div",{className:"Vt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[(0,Vt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Vt.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,Vt.jsx)(G.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Vt.jsxs)(re,{type:"button",variant:"outline",size:"sm",onClick:C,className:"gap-1 h-8",children:[(0,Vt.jsx)(G.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,Vt.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:i.metadata&&Object.keys(i.metadata).length>0?(0,Vt.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([g,P],m)=>{let A=S(g);return(0,Vt.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Vt.jsx)(me,{value:g,onChange:U=>{let Q=U.target.value||"",I=i.metadata?.[g];l(se=>{let ie={...se.metadata};return delete ie[g],Q&&(ie[Q]=I||""),{...se,metadata:ie}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,Vt.jsx)("datalist",{id:`metadata-keys-${g}`,children:f.allKeys.map(U=>(0,Vt.jsx)("option",{value:U},U))}),(0,Vt.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),A.length>0?(0,Vt.jsxs)(Ft,{value:String(P||""),onValueChange:U=>J(g,U),children:[(0,Vt.jsx)(tt,{className:"flex-1 h-8 text-sm",children:(0,Vt.jsx)($t,{placeholder:"Value"})}),(0,Vt.jsxs)(ot,{children:[A.map(U=>(0,Vt.jsx)(ze,{value:U,children:U},U)),(0,Vt.jsx)(ze,{value:"__custom__",children:(0,Vt.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Vt.jsx)(me,{value:String(P||""),onChange:U=>M(g,U.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Vt.jsx)(re,{type:"button",variant:"ghost",size:"sm",onClick:()=>j(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Vt.jsx)(G.X,{className:"h-3 w-3"})})]},`metadata-key-${m}`)})}):(0,Vt.jsxs)("div",{className:"text-center py-4",children:[(0,Vt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,Vt.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,Vt.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Vt.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:i.format==="richText"?(0,Vt.jsx)(je,{setValue:u,value:R,name:"richTextContent"}):(0,Vt.jsx)(Se,{value:i.content||"",onChange:g=>l(P=>({...P,content:g.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var Vo=X(require("react-markdown")),Oo=X(require("remark-gfm"));var zo=e=>(0,Vt.jsx)(Vo.default,{remarkPlugins:[Oo.default],components:{h1:({children:t})=>(0,Vt.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,Vt.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,Vt.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,Vt.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,Vt.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,Vt.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,Vt.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,Vt.jsx)("p",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,Vt.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,Vt.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,Vt.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Lo=e=>(0,Vt.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Qr=e=>(0,Vt.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,Vt.jsx)(je,{value:JSON.stringify(e),editable:!1,name:"richTextContent"},JSON.stringify(e))}),ea=e=>(0,Vt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Vt.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Vt.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Vt.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),zo(e)]});function ta({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:a,availableDocuments:n=[],knowledgeContexts:i=[]}){let[l,b]=(0,Y.useState)(!1),[N,R]=(0,Y.useState)(!1),[u,T]=(0,Y.useState)(e),[O,D]=(0,Y.useState)(!1),S=(0,Y.useRef)(null),f=u.format==="richText"?u.richTextContent:u.content,k=(0,Y.useMemo)(()=>`${u.format}:${JSON.stringify(f)}`,[u.format,f]);(0,Y.useEffect)(()=>{T(e)},[e]);let M=m=>{switch(m){case"markdown":case"mdx":return(0,Vt.jsx)(G.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Vt.jsx)(G.File,{className:"h-6 w-6 text-success"});case"text":return(0,Vt.jsx)(G.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Vt.jsx)(G.File,{className:"h-6 w-6 text-muted-foreground"})}},J=m=>{switch(m){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},C=(m,A)=>{let U={markdown:zo,mdx:ea,text:Lo},Q=a?.[A]||U[A];if(A==="richText"&&typeof m=="object")return Qr(m);if(Q&&typeof m=="string")return Q(m);if(typeof m=="string")return Lo(m)},j=async m=>{D(!0),S.current=u,(0,Y.startTransition)(()=>{T({...m,richTextContent:m.richTextContent?structuredClone(m.richTextContent):void 0})});try{let A=await t?.(m);if(D(!1),!A)throw new Error("save failed");b(!1)}catch{S.current&&(0,Y.startTransition)(()=>T(S.current))}},g=()=>{b(!1)};return(0,Vt.jsxs)(Vt.Fragment,{children:[(0,Vt.jsx)(Ve,{open:l||r==="create",onOpenChange:m=>!m&&g(),children:(0,Vt.jsxs)(qe,{children:[(0,Vt.jsx)(Oe,{}),(0,Vt.jsxs)(Ao.Content,{className:v("fixed inset-0 Vt-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[O&&(0,Vt.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:(0,Vt.jsx)(G.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),(0,Vt.jsx)(Ho,{mode:r==="create"?"create":"edit",document:u,onSave:j,onCancel:g,availableDocuments:n,knowledgeContexts:i})]})]})}),(0,Vt.jsxs)(yt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Vt.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,Vt.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Vt.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Vt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vt.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[u.title,(0,Vt.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${J(u.format)}`,children:u.format.toUpperCase()})]}),u.description&&(0,Vt.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:u.description})]})}),(0,Vt.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[u.metadata&&Object.keys(u.metadata).length>0&&(0,Vt.jsxs)(re,{variant:"ghost",size:"sm",onClick:()=>R(!N),className:"gap-2",children:[(0,Vt.jsx)(G.Info,{className:"h-4 w-4"}),"Metadata",N?(0,Vt.jsx)(G.ChevronDown,{className:"h-4 w-4"}):(0,Vt.jsx)(G.ChevronRight,{className:"h-4 w-4"})]}),o&&(0,Vt.jsxs)(re,{variant:"outline",size:"sm",onClick:()=>b(!0),className:"gap-2",children:[(0,Vt.jsx)(G.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),u.metadata&&Object.keys(u.metadata).length>0&&(0,Vt.jsx)(yt.motion.div,{initial:!1,animate:{height:N?"auto":0,opacity:N?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Vt.jsxs)("div",{className:"Vt-4 border-t border-border mt-4",children:[(0,Vt.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,Vt.jsx)(G.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Vt.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,Vt.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(u.metadata).map(([m,A])=>(0,Vt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Vt.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:m.replace(/([A-Vt])/g," $1").trim()}),(0,Vt.jsx)("span",{className:"text-foreground font-medium",children:String(A)})]},m))})})]})})]}),(0,Vt.jsx)("div",{className:"flex-1 ",children:(0,Vt.jsx)("div",{className:"py-4 h-full",children:(0,Vt.jsx)("div",{className:"space-y-4",children:u.content||u.richTextContent?(0,Vt.jsx)("div",{className:"relative",children:(0,Vt.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:C(u.format==="richText"?u.richTextContent:u.content,u.format)})},k):(0,Vt.jsxs)("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Vt.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Vt.jsx)(G.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Vt.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Vt.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}0&&(module.exports={DocumentPreview});
4
+ "use strict";"use client";var Go=Object.create;var Fe=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var Zo=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Xo=Object.prototype.hasOwnProperty;var qo=(e,t)=>{for(var o in t)Fe(e,o,{get:t[o],enumerable:!0})},kt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Zo(t))!Xo.call(e,a)&&a!==o&&Fe(e,a,{get:()=>t[a],enumerable:!(r=jo(t,a))||r.enumerable});return e};var Y=(e,t,o)=>(o=e!=null?Go(Jo(e)):{},kt(t||!e||!e.__esModule?Fe(o,"default",{value:e,enumerable:!0}):o,e)),Yo=e=>kt(Fe({},"__esModule",{value:!0}),e);var dn={};qo(dn,{DocumentPreview:()=>cn});module.exports=Yo(dn);var Tt=require("motion/react"),J=require("lucide-react"),oe=require("react");var _t=require("clsx");var nt="-",Qo=e=>{let t=tr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:n=>{let l=n.split(nt);return l[0]===""&&l.length!==1&&l.shift(),Ht(l,t)||er(n)},getConflictingClassGroupIds:(n,l)=>{let v=o[n]||[];return l&&r[n]?[...v,...r[n]]:v}}},Ht=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Ht(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join(nt);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Et=/^\[(.+)\]$/,er=e=>{if(Et.test(e)){let t=Et.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},tr=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return rr(Object.entries(e.classGroups),o).forEach(([i,n])=>{rt(n,r,i,t)}),r},rt=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:It(t,a);i.classGroupId=o;return}if(typeof a=="function"){if(or(a)){rt(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([i,n])=>{rt(n,It(t,i),o,r)})})},It=(e,t)=>{let o=e;return t.split(nt).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},or=e=>e.isThemeGetter,rr=(e,t)=>t?e.map(([o,r])=>{let a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,l])=>[t+n,l])):i);return[o,a]}):e,nr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(i,n)=>{o.set(i,n),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let n=o.get(i);if(n!==void 0)return n;if((n=r.get(i))!==void 0)return a(i,n),n},set(i,n){o.has(i)?o.set(i,n):a(i,n)}}},Lt="!",ar=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],i=t.length,n=l=>{let v=[],D=0,w=0,f;for(let g=0;g<l.length;g++){let T=l[g];if(D===0){if(T===a&&(r||l.slice(g,g+i)===t)){v.push(l.slice(w,g)),w=g+i;continue}if(T==="/"){f=g;continue}}T==="["?D++:T==="]"&&D--}let S=v.length===0?l:l.substring(w),V=S.startsWith(Lt),k=V?S.substring(1):S,M=f&&f>w?f-w:void 0;return{modifiers:v,hasImportantModifier:V,baseClassName:k,maybePostfixModifierPosition:M}};return o?l=>o({className:l,parseClassName:n}):n},ir=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},sr=e=>({cache:nr(e.cacheSize),parseClassName:ar(e),...Qo(e)}),lr=/\$t+/,cr=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],n=e.trim().split(lr),l="";for(let v=n.length-1;v>=0;v-=1){let D=n[v],{modifiers:w,hasImportantModifier:f,baseClassName:S,maybePostfixModifierPosition:V}=o(D),k=!!V,M=r(k?S.substring(0,V):S);if(!M){if(!k){l=D+(l.length>0?" "+l:l);continue}if(M=r(S),!M){l=D+(l.length>0?" "+l:l);continue}k=!1}let g=ir(w).join(":"),T=f?g+Lt:g,H=T+M;if(i.includes(H))continue;i.push(H);let F=a(M,k);for(let P=0;P<F.length;++P){let $=F[P];i.push(T+$)}l=D+(l.length>0?" "+l:l)}return l};function dr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=At(t))&&(r&&(r+=" "),r+=o);return r}var At=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=At(e[r]))&&(o&&(o+=" "),o+=t);return o};function mr(e,...t){let o,r,a,i=n;function n(v){let D=t.reduce((w,f)=>f(w),e());return o=sr(D),r=o.cache.get,a=o.cache.set,i=l,l(v)}function l(v){let D=r(v);if(D)return D;let w=cr(v,o);return a(v,w),w}return function(){return i(dr.apply(null,arguments))}}var L=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Ot=/^\[(?:([a-z-]+):)?(.+)\]$/i,pr=/^\$t+\/\$t+$/,ur=new Set(["px","full","screen"]),fr=/^(\$t+(\.\$t+)?)?(xs|sm|md|lg|xl)$/,gr=/\$t+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,br=/^(inset_)?-?((\$t+)?\.?(\$t+)[a-z]+|0)J-?((\$t+)?\.?(\$t+)[a-z]+|0)/,vr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>Pe(e)||ur.has(e)||pr.test(e),xe=e=>De(e,"length",Dr),Pe=e=>!!e&&!Number.isNaN(Number(e)),ot=e=>De(e,"number",Pe),ke=e=>!!e&&Number.isInteger(Number(e)),xr=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),h=e=>Ot.test(e),we=e=>fr.test(e),wr=new Set(["length","size","percentage"]),yr=e=>De(e,wr,Vt),Cr=e=>De(e,"position",Vt),Nr=new Set(["image","url"]),Rr=e=>De(e,Nr,Mr),Pr=e=>De(e,"",Sr),Ee=()=>!0,De=(e,t,o)=>{let r=Ot.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Dr=e=>gr.test(e)&&!hr.test(e),Vt=()=>!1,Sr=e=>br.test(e),Mr=e=>vr.test(e);var Tr=()=>{let e=L("colors"),t=L("spacing"),o=L("blur"),r=L("brightness"),a=L("borderColor"),i=L("borderRadius"),n=L("borderSpacing"),l=L("borderWidth"),v=L("contrast"),D=L("grayscale"),w=L("hueRotate"),f=L("invert"),S=L("gap"),V=L("gradientColorStops"),k=L("gradientColorStopPositions"),M=L("inset"),g=L("margin"),T=L("opacity"),H=L("padding"),F=L("saturate"),P=L("scale"),$=L("sepia"),te=L("skew"),pe=L("space"),y=L("translate"),X=()=>["auto","contain","none"],le=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",h,t],I=()=>[h,t],be=()=>["",ue,xe],ve=()=>["auto",Pe,h],p=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",h],c=()=>["auto","avoid","all","avoid-page","page","left","right","column"],u=()=>[Pe,h];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[ue,xe],blur:["none","",we,h],brightness:u(),borderColor:[e],borderRadius:["none","","full",we,h],borderSpacing:I(),borderWidth:be(),contrast:u(),grayscale:Q(),hueRotate:u(),invert:Q(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[xr,xe],inset:ie(),margin:ie(),opacity:u(),padding:I(),saturate:u(),scale:u(),sepia:Q(),skew:u(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[we]}],"break-after":[{"break-after":c()}],"break-before":[{"break-before":c()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...p(),h]}],overflow:[{overflow:le()}],"overflow-x":[{"overflow-x":le()}],"overflow-y":[{"overflow-y":le()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[M]}],"inset-x":[{"inset-x":[M]}],"inset-y":[{"inset-y":[M]}],start:[{start:[M]}],end:[{end:[M]}],top:[{top:[M]}],right:[{right:[M]}],bottom:[{bottom:[M]}],left:[{left:[M]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ke,h]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",ke,h]}],"grid-cols":[{"grid-cols":[Ee]}],"col-start-end":[{col:["auto",{span:["full",ke,h]},h]}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[ke,h]},h]}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[S]}],"gap-x":[{"gap-x":[S]}],"gap-y":[{"gap-y":[S]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[H]}],px:[{px:[H]}],py:[{py:[H]}],ps:[{ps:[H]}],pe:[{pe:[H]}],pt:[{pt:[H]}],pr:[{pr:[H]}],pb:[{pb:[H]}],pl:[{pl:[H]}],$t:[{$t:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],$t:[{$t:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[pe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[pe]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[we]},we]}],h:[{h:[h,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,t,"auto","min","max","fit"]}],"font-size":[{text:["base",we,xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ot]}],"font-family":[{font:[Ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",Pe,ot]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,xe]}],"underline-offset":[{"underline-offset":["auto",ue,h]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...p(),Cr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yr]}],"bg-image":[{bg:["none",{"gradient-$t":["t","tr","r","br","b","bl","l","tl"]},Rr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-$t-pos":[{$t:[k]}],"gradient-from":[{from:[V]}],"gradient-via":[{via:[V]}],"gradient-$t":[{$t:[V]}],rounded:[{rounded:[i]}],"rounded-$t":[{"rounded-$t":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-oe":[{"rounded-oe":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-$t":[{"border-$t":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:E()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-$t":[{"border-$t":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[ue,h]}],"outline-w":[{outline:[ue,xe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[ue,xe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",we,Pr]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",we,h]}],grayscale:[{grayscale:[D]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[f]}],saturate:[{saturate:[F]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[D]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:u()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:u()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[ke,h]}],"translate-x":[{"translate-x":[y]}],"translate-y":[{"translate-y":[y]}],"skew-x":[{"skew-x":[te]}],"skew-y":[{"skew-y":[te]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","$t-resize","w-resize","$t-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-$t":[{"scroll-$t":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-$t":[{"scroll-$t":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ue,xe,ot]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],$t:["mx","my","ms","$t","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-$t","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-oe","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-$t":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-oe"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-$t","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-$t","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-$t":["scroll-mx","scroll-my","scroll-ms","scroll-$t","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var zt=mr(Tr);function b(...e){return zt((0,_t.clsx)(e))}var Ut=require("@radix-ui/react-slot"),Bt=require("class-variance-authority"),Ft=Y(require("react")),$t=require("react/jsx-runtime"),kr=(0,Bt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),se=Ft.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},i)=>(0,$t.jsx)(e?Ut.Slot:"button",{className:b(kr({className:t,size:o,variant:r})),ref:i,...a}));se.displayName="Button";var Ie=Y(require("react")),G=Y(require("@radix-ui/react-dialog"));var $e=G.Root;var at=G.Portal;var Ke=Ie.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Overlay,{ref:o,className:b("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",e),...t}));Ke.displayName=G.Overlay.displayName;var it=Ie.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(at,{children:[(0,$t.jsx)(Ke,{}),(0,$t.jsxs)(G.Content,{ref:r,className:b("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-$t-left-1/2 data-[state=closed]:slide-out-$t-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,$t.jsxs)(G.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:[(0,$t.jsx)(J.X,{className:"h-4 w-4"}),(0,$t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));it.displayName=G.Content.displayName;var st=({className:e,...t})=>(0,$t.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});st.displayName="DialogHeader";var Er=({className:e,...t})=>(0,$t.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Er.displayName="DialogFooter";var lt=Ie.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Title,{ref:o,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=G.Title.displayName;var Ir=Ie.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Description,{ref:o,className:b("text-sm text-muted-foreground",e),...t}));Ir.displayName=G.Description.displayName;var Fo=Y(require("@radix-ui/react-dialog"));var Wt=Y(require("react")),He=Wt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)("textarea",{className:b("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));He.displayName="Textarea";var jt=Y(require("react"));var fe=jt.forwardRef(({className:e,type:t,...o},r)=>(0,$t.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));fe.displayName="Input";var N=Y(require("@radix-ui/react-select")),ye=Y(require("react")),Jt=N.Root;var Xt=N.Value,ct=ye.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(N.Trigger,{className:b("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,$t.jsx)(N.Icon,{asChild:!0,children:(0,$t.jsx)(J.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ct.displayName=N.Trigger.displayName;var qt=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(N.ScrollUpButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(J.ChevronUp,{className:"h-4 w-4"})}));qt.displayName=N.ScrollUpButton.displayName;var Yt=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(N.ScrollDownButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(J.ChevronDown,{className:"h-4 w-4"})}));Yt.displayName=N.ScrollDownButton.displayName;var dt=ye.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,$t.jsx)(N.Portal,{children:(0,$t.jsxs)(N.Content,{className:b("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:a,...r,children:[(0,$t.jsx)(qt,{}),(0,$t.jsx)(N.Viewport,{className:b("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$t.jsx)(Yt,{})]})}));dt.displayName=N.Content.displayName;var Hr=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(N.Label,{className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Hr.displayName=N.Label.displayName;var We=ye.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(N.Item,{className:b("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(N.ItemIndicator,{children:(0,$t.jsx)(J.Check,{className:"h-4 w-4"})})}),(0,$t.jsx)(N.ItemText,{children:e})]}));We.displayName=N.Item.displayName;var Lr=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(N.Separator,{className:b("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Lr.displayName=N.Separator.displayName;var Qt=Y(require("react")),mt=Y(require("@radix-ui/react-label"));var Ar=(0,Bt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pt=Qt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(mt.Root,{ref:o,className:b(Ar(),e),...t}));pt.displayName=mt.Root.displayName;var ft=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:a,className:i="",disabled:n=!1})=>{let[l,v]=(0,oe.useState)(!1),[D,w]=(0,oe.useState)(""),f=()=>{n||(v(!0),w(t))},S=async()=>{D!==t&&await a(e,D),v(!1)},V=k=>{k.key==="Enter"&&!r||k.key==="Enter"&&k.ctrlKey&&r?S():k.key==="Escape"&&(v(!1),w(""))};return(0,$t.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,$t.jsx)(pt,{children:o}),l?r?(0,$t.jsx)(He,{value:D,onChange:k=>w(k.target.value),onBlur:S,onKeyDown:V,autoFocus:!0,rows:4,className:"resize-none"}):(0,$t.jsx)(fe,{value:D,onChange:k=>w(k.target.value),onBlur:S,onKeyPress:V,autoFocus:!0,className:"text-lg font-medium"}):(0,$t.jsxs)("div",{onClick:f,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,$t.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click $t edit..."}),!n&&(0,$t.jsx)(J.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ko=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Eo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Io=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Ho=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Lo=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Ao=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Oo=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Qe=require("@payloadcms/richtext-lexical/lexical/list"),Vo=require("@payloadcms/richtext-lexical/lexical/rich-text"),zo=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Mo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Ue=require("@payloadcms/richtext-lexical/lexical/utils"),x=require("@payloadcms/richtext-lexical/lexical"),Pt=require("@payloadcms/richtext-lexical/lexical/selection");var fo=require("@radix-ui/react-dialog"),Je=require("@payloadcms/richtext-lexical/client");var ht=Y(require("bson-objectid"));var no=require("@payloadcms/ui");var ro=Y(require("react")),de=Y(require("@radix-ui/react-tooltip"));var Ge=de.Provider,je=de.Root,Ze=de.Trigger,Le=ro.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(de.Portal,{children:(0,$t.jsx)(de.Content,{ref:r,sideOffset:t,className:b("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Le.displayName=de.Content.displayName;var Or=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[a]=(0,Mo.useLexicalComposerContext)(),[i,n]=(0,oe.useState)(""),[l,v]=(0,oe.useState)(""),[D,w]=(0,oe.useState)(""),f=async g=>{console.log("fetchMedia",g)};(0,oe.useEffect)(()=>{typeof o=="string"?o.length===24?f(o):(n(o||""),w(M(k())),v(V()||"")):typeof o=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),w(M(o.filesize)),v(o.mimeType?.split("/")[1]||""))},[]);let S=(0,oe.useCallback)(()=>{a.update(()=>{(0,x.$getNodeByKey)(r)?.remove()})},[a,r]),V=()=>{let g=e.data.value;return typeof g=="string"?g.split(";base64")[0]?.split("image/")[1]:""},k=()=>{let g=e.data.value;if(typeof g=="string"){let T=g.split(",")[1]?.length||0;return 4*Math.ceil(T/3)*.5624896334383812/1e3}return 0};function M(g){if(g>=1e6){let H=g/1e6;return`${H>=10?Math.round(H).toString():H.toFixed(1)} MB`}return`${Math.floor(g/1e3)} KB`}return(0,$t.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,$t.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,$t.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,$t.jsx)("div",{className:"flex-1",children:e.data.value?(0,$t.jsx)("img",{className:"object-cover $t-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-$t":t,src:i}):(0,$t.jsx)(no.File,{})}),(0,$t.jsx)(Ge,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsxs)(Ze,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,$t.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,$t.jsx)("button",{onClick:g=>{g.preventDefault(),S()},className:"flex-1 flex justify-center items-center",children:(0,$t.jsx)(J.X,{width:24,height:24,strokeWidth:1})})]}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("span",{children:"Remove image"})})]})})]}),(0,$t.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,$t.jsx)("span",{className:"",children:l?.toLocaleUpperCase()}),(0,$t.jsx)("span",{children:D})]})]})})},lo=Or;function Vr(e){if(e.hasAttribute("data-lexical-upload-relation-$t")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:Se({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Ae=class extends Je.UploadNode{static importDOM(){return{img:()=>({conversion:Vr,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new ht.default().toHexString(),t.version=3);let o={id:t.id??new ht.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=Se(o);return r.setFormat?.(t.format),r}decorate(){return(0,$t.jsx)(lo,{data:this.__data,nodeKey:this.getKey()})}};function Se(e){return new Ae({data:e})}var zr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_r=e=>zr?(e||window).getSelection():null,Yn=(0,x.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),bt=(0,x.createCommand)("INSERT_UPLOAD_COMMAND");function go({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,oe.useRef)(!1),[a,i]=(0,oe.useState)(!0),[n,l]=(0,oe.useState)(""),[v,D]=(0,oe.useState)(""),[w,f]=(0,oe.useState)(!1),[S,V]=(0,oe.useState)("left"),k=n==="",M=P=>{f(P.target.checked)},g=P=>{V(P.target.value)},T=P=>{let $=new FileReader;$.onload=function(){return typeof $.result=="string"&&l($.result),""},P!==null&&P[0]&&$.readAsDataURL(P[0])};(0,oe.useEffect)(()=>{r.current=!1;let P=$=>{r.current=$.altKey};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[e]),(0,oe.useEffect)(()=>{a||t()},[a]),(0,oe.useEffect)(()=>{i(o)},[o]);let H=({editor:P,relationTo:$,replaceNodeKey:te,value:pe})=>{if(te)P.update(()=>{let y=(0,x.$getNodeByKey)(te);y&&y.replace(Se({id:"",fields:{},relationTo:"media",value:pe}))});else{let y=P.dispatchCommand(bt,{fields:null,relationTo:"media",value:pe})}},F=()=>{H({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:v,src:n,showCaption:w,position:S}.src}),i(!1),t()};return(0,$t.jsx)($e,{open:a,onOpenChange:P=>i(P),children:(0,$t.jsxs)(it,{children:[(0,$t.jsxs)(st,{children:[(0,$t.jsx)(lt,{children:"Upload Image"}),(0,$t.jsx)(fo.DialogDescription,{children:"Description"})]}),(0,$t.jsxs)("div",{className:"",children:[(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(fe,{type:"file",onChange:P=>T(P.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(fe,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:P=>D(P.currentTarget.value),value:v,"data-test-id":"image-modal-alt-text-input"})}),(0,$t.jsx)(se,{"data-test-id":"image-modal-file-upload-btn",disabled:k,onClick:()=>F(),children:"Confirm"})]})]})})}function vt({captionsEnabled:e}){let[t]=(0,Mo.useLexicalComposerContext)();return(0,oe.useEffect)(()=>{if(!t.hasNodes([Je.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,Ue.mergeRegister)(t.registerCommand(x.DRAGSTART_COMMAND,o=>Ur(o),x.COMMAND_PRIORITY_HIGH),t.registerCommand(x.DRAGOVER_COMMAND,o=>Br(o),x.COMMAND_PRIORITY_LOW),t.registerCommand(x.DROP_COMMAND,o=>Fr(o,t),x.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Ur(e){if(!xt())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","J"),!0):!1}function Br(e){return xt()?(ho(e)||e.preventDefault(),!0):!1}function Fr(e,t){let o=xt();if(!o)return!1;if(e.preventDefault(),ho(e)){let r=$r(e);o.remove();let a=(0,x.$createRangeSelection)();r!=null&&a.applyDOMRange(r),(0,x.$setSelection)(a)}return!0}function xt(){let e=(0,x.$getSelection)();if(!(0,x.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Je.$isUploadNode)(o)?o:null}function ho(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function $r(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,a=_r(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&a!==null)a.collapse(e.rangeParent,e.rangeOffset||0),t=a.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Kr=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),bo=Kr;var Wr=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),vo=Wr;var Gr=()=>(0,$t.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,$t.jsx)("path",{$t:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,$t.jsx)("path",{$t:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),xo=Gr;var jr=()=>(0,$t.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,$t.jsx)("path",{$t:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,$t.jsx)("path",{$t:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),wo=jr;var Zr=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),yo=Zr;var Jr=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),Co=Jr;var No=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Ro=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),Po=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),Do=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),So=()=>(0,$t.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$t.jsx)("path",{$t:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var he=Y(require("react")),R=Y(require("@radix-ui/react-dropdown-menu")),Me=require("@radix-ui/react-icons");var Xe=R.Root,qe=R.Trigger;var Xr=he.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,$t.jsxs)(R.SubTrigger,{ref:a,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,$t.jsx)(Me.ChevronRightIcon,{className:"ml-auto"})]}));Xr.displayName=R.SubTrigger.displayName;var qr=he.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(R.SubContent,{ref:o,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));qr.displayName=R.SubContent.displayName;var ze=he.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(R.Portal,{children:(0,$t.jsx)(R.Content,{ref:r,sideOffset:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ze.displayName=R.Content.displayName;var _e=he.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(R.Item,{ref:r,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));_e.displayName=R.Item.displayName;var Yr=he.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,$t.jsxs)(R.CheckboxItem,{ref:a,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(R.ItemIndicator,{children:(0,$t.jsx)(Me.CheckIcon,{className:"h-4 w-4"})})}),t]}));Yr.displayName=R.CheckboxItem.displayName;var Qr=he.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(R.RadioItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(R.ItemIndicator,{children:(0,$t.jsx)(Me.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Qr.displayName=R.RadioItem.displayName;var en=he.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(R.Label,{ref:r,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));en.displayName=R.Label.displayName;var tn=he.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(R.Separator,{ref:o,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));tn.displayName=R.Separator.displayName;var on=({className:e,...t})=>(0,$t.jsx)("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...t});on.displayName="DropdownMenuShortcut";var Rt=1;function rn(){return(0,$t.jsx)("span",{className:"border border-[#222222]"})}function Dt(){let[e]=(0,Mo.useLexicalComposerContext)(),t=(0,oe.useRef)(null),[o,r]=(0,oe.useState)(!1),[a,i]=(0,oe.useState)(!1),[n,l]=(0,oe.useState)(!1),[v,D]=(0,oe.useState)(!1),[w,f]=(0,oe.useState)(!1),[S,V]=(0,oe.useState)(!1),[k,M]=(0,oe.useState)(!1),[g,T]=(0,oe.useState)(!1),[H,F]=(0,oe.useState)(!1),[P,$]=(0,oe.useState)("left"),[te,pe]=(0,oe.useState)("p"),y=p=>{e.update(()=>{let E=(0,x.$getSelection)();(0,x.$isRangeSelection)(E)&&(p==="p"?(0,Pt.$setBlocksType)(E,()=>(0,x.$createParagraphNode)()):(0,Pt.$setBlocksType)(E,()=>(0,Vo.$createHeadingNode)(p)))})},X=(0,oe.useCallback)(()=>{let p=(0,x.$getSelection)();if((0,x.$isRangeSelection)(p)){l(p.hasFormat("bold")),D(p.hasFormat("italic")),f(p.hasFormat("underline")),V(p.hasFormat("strikethrough")),M(p.hasFormat("subscript")),T(p.hasFormat("superscript"));let E=p.anchor.getNode(),U=E;for(;U&&!(0,x.$isParagraphNode)(U)&&U!==(0,x.$getRoot)();){let Q=U.getParent();Q&&(U=Q)}if(U){let Q=U.getFormatType();$(Q||"left")}let ce=E.getTopLevelElement()?.__tag;pe(ce||"p")}},[]);(0,oe.useEffect)(()=>(0,Ue.mergeRegister)(e.registerUpdateListener(({editorState:p})=>{p.read(()=>{X()})}),e.registerCommand(x.SELECTION_CHANGE_COMMAND,(p,E)=>(X(),!1),Rt),e.registerCommand(x.CAN_UNDO_COMMAND,p=>(r(p),!1),Rt),e.registerCommand(x.CAN_REDO_COMMAND,p=>(i(p),!1),Rt),(0,Ue.mergeRegister)(e.registerCommand(bt,p=>(e.update(()=>{let E=(0,x.$getSelection)()||(0,x.$getPreviousSelection)();if((0,x.$isRangeSelection)(E)){let U=Se({id:p.id,fields:p.fields,relationTo:p.relationTo,value:p.value}),{focus:ce}=E,Q=ce.getNode();(0,Ue.$insertNodeToNearestRoot)(U),(0,x.$isParagraphNode)(Q)&&!Q.__first&&Q.remove()}}),!0),x.COMMAND_PRIORITY_EDITOR))),[e,X]);let le=[[{label:"Undo",icon:(0,$t.jsx)(J.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,$t.jsx)(J.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,$t.jsx)(bo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,$t.jsx)(vo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:v},{label:"Underline",icon:(0,$t.jsx)(xo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:w},{label:"Strikethrough",icon:(0,$t.jsx)(wo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:S},{label:"Subscript",icon:(0,$t.jsx)(yo,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:k},{label:"Superscript",icon:(0,$t.jsx)(Co,{}),onClick:()=>{e.dispatchCommand(x.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:g}]],ie=[{label:"Left Align",direction:"left",icon:(0,$t.jsx)(J.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,$t.jsx)(J.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,$t.jsx)(J.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,$t.jsx)(J.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(x.FORMAT_ELEMENT_COMMAND,"justify")}}],be=[{label:"Normal Text",value:"p",icon:(0,$t.jsx)(No,{}),onClick:()=>y("p")},{label:"Heading 1",value:"h1",icon:(0,$t.jsx)(Ro,{}),onClick:()=>y("h1")},{label:"Heading 2",value:"h2",icon:(0,$t.jsx)(Po,{}),onClick:()=>y("h2")},{label:"Heading 3",value:"h3",icon:(0,$t.jsx)(Do,{}),onClick:()=>y("h3")},{label:"Heading 4",value:"h4",icon:(0,$t.jsx)(So,{}),onClick:()=>y("h4")},...[{label:"Unordered List",value:"ul",icon:(0,$t.jsx)(J.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Qe.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,$t.jsx)(J.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Qe.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],ve=[{label:"Insert Image",icon:(0,$t.jsx)(J.ImageUp,{width:15,height:15}),onClick:()=>{F(!0)},disabled:!1}];return(0,$t.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,$t.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[le.map((p,E)=>(0,$t.jsxs)(oe.Fragment,{children:[(0,$t.jsx)("div",{className:"flex items-center gap-2",children:p.map((U,ce)=>(0,$t.jsx)("div",{role:"button","aria-disabled":U.disabled||!1,onClick:U.onClick,className:b("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",U.active&&"bg-[#3c3c3c]"),"aria-label":U.label,children:(0,$t.jsx)(Ge,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsx)(Ze,{className:"text-[#b5b5b5]",children:U.icon}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("p",{children:U.label})})]})})},ce))}),(0,$t.jsx)(rn,{})]},`toolbar-option-${p.length}-${E}`)),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ie.find(p=>p.direction===P)?.icon,ie.find(p=>p.direction===P)?.label,(0,$t.jsx)(J.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:ie.map((p,E)=>(0,$t.jsxs)(_e,{onClick:p.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},`${p.label}-${E}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[be.find(p=>p.value===te)?.icon,be.find(p=>p.value===te)?.label,(0,$t.jsx)(J.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:be.map((p,E)=>(0,$t.jsxs)(_e,{onClick:p.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},`heading-option-${p.label}-${E}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,$t.jsx)(J.Plus,{width:15,height:15}),(0,$t.jsx)(J.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:ve.map((p,E)=>(0,$t.jsxs)(_e,{onClick:p.onClick,disabled:p.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},E))})]}),H&&(0,$t.jsx)(go,{activeEditor:e,onClose:()=>{F(!1)},isOpen:H})]})})}var nn=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,Mo.useLexicalComposerContext)(),i=n=>{n.read(()=>{let l=n.toJSON();e?.(()=>l)})};return(0,oe.useEffect)(()=>{a.setEditable(r)},[r]),(0,oe.useEffect)(()=>{t&&a.update(()=>{a.setEditorState(a.parseEditorState(t))})},[]),(0,$t.jsx)("div",{className:"w-full",children:(0,$t.jsxs)("div",{className:" ",children:[r&&(0,$t.jsx)(Dt,{}),(0,$t.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,$t.jsx)(Ao.RichTextPlugin,{contentEditable:(0,$t.jsx)(Io.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Ho.LexicalErrorBoundary}),r&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Lo.HistoryPlugin,{}),(0,$t.jsx)(ko.AutoFocusPlugin,{}),(0,$t.jsx)(Oo.ListPlugin,{}),(0,$t.jsx)(zo.OnChangePlugin,{onChange:i}),(0,$t.jsx)(vt,{})]})]})]})})},an=({setValue:e,value:t,name:o,editable:r=!0})=>(0,$t.jsx)(Eo.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Qe.ListNode,Qe.ListItemNode,Vo.HeadingNode,Ae],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl text-primary",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,$t.jsx)(nn,{value:t,setValue:e,name:o,editable:r})}),et=an;function Uo({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:a=[],knowledgeContexts:i=[]}){let[n,l]=(0,oe.useState)({...e,updatedAt:new Date}),[v,D]=(0,oe.useState)(!1),[w,f]=(0,oe.useState)(n.richTextContent),[S,V]=(0,oe.useState)(!1),k=(0,oe.useRef)(null),M=(0,oe.useRef)(""),g=(0,oe.useRef)(null),T=(0,oe.useRef)(null),H=c=>{let u=new WeakSet,C=z=>z&&typeof z=="object"?u.has(z)?null:(u.add(z),Array.isArray(z)?z.map(C):Object.keys(z).sort().reduce((W,Ne)=>(W[Ne]=C(z[Ne]),W),{})):z;return JSON.stringify(C(c))},F=c=>c?c.replace(/\$t+/g," ").trim():"",P=c=>{if(!c)return{};let u={};return Object.keys(c).sort().forEach(C=>{u[C]=String(c[C]??"").trim()}),u},$=()=>n.format==="richText"?H(w):F(n.content),te=()=>{let c={title:F(n.title),description:F(n.description),format:n.format,metadata:P(n.metadata),content:$()},u=H(c),C=5381;for(let z=0;z<u.length;z++)C=C*33^u.charCodeAt(z);return(C>>>0).toString(16)},pe=(c,u)=>{if(c===u)return!1;if(n.format!=="richText"){let C=X(c),z=$();if(C==null)return!0;let W=C.length,Ne=z.length,Te=Math.abs(Ne-W),Be=W===0?1:Te/W;return F(C)===F(z)&&Te<3?!1:Te>=10||Be>=.02}return!0},y=(0,oe.useRef)(new Map),X=c=>{let u=y.current.get(c);return u==null?null:"x".repeat(u)};(0,oe.useEffect)(()=>(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{let c=te(),u=M.current;if(pe(u,c)&&(V(!0),t({...n,richTextContent:w},"autosave"),M.current=c,n.format!=="richText")){let C=$();y.current.set(c,C.length)}},800),()=>{T.current&&clearTimeout(T.current)}),[n.title,n.description,n.format,n.content,n.metadata,w]),(0,oe.useEffect)(()=>{let c=()=>{let u=te();u!==M.current&&(t({...n,richTextContent:w},"autosave"),M.current=u)};return window.addEventListener("pagehide",c),window.addEventListener("beforeunload",c),()=>{window.removeEventListener("pagehide",c),window.removeEventListener("beforeunload",c)}},[n,w]),(0,oe.useEffect)(()=>(S&&(g.current=setTimeout(()=>{V(!1)},2e3)),()=>{g.current&&clearTimeout(g.current)}),[S]),(0,oe.useEffect)(()=>{l(e)},[e]);let le=c=>{switch(c){case"markdown":case"mdx":return(0,$t.jsx)(J.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(J.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(J.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(J.File,{className:"h-6 w-6 text-muted-foreground"})}},ie=c=>{switch(c){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},I=()=>{let c=new Set,u=new Set;return i.forEach(C=>{C.menuConfig.groupBy.forEach(z=>c.add(z))}),a.forEach(C=>{C.metadata&&Object.keys(C.metadata).forEach(z=>u.add(z))}),{contextKeys:Array.from(c).sort(),documentKeys:Array.from(u).sort(),allKeys:Array.from(new Set([...c,...u])).sort()}},be=c=>{let u=new Set;return a.forEach(C=>{C.metadata?.[c]&&u.add(String(C.metadata[c]))}),Array.from(u).sort()},ve=I(),p=()=>{t({...n,richTextContent:w},"autosave")},E=(c,u)=>{l(C=>({...C,metadata:{...C.metadata,[c]:u}}))},U=(c,u)=>{u==="__custom__"?E(c,""):E(c,u)},ce=()=>{E("","")},Q=c=>{l(u=>{let C={...u.metadata};return delete C[c],{...u,metadata:C}})};return(0,$t.jsxs)(Tt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,$t.jsx)("div",{className:"flex-1 min-w-0",children:(0,$t.jsx)(ft,{fieldName:"title",value:n.title,label:"",onSave:(c,u)=>l(C=>({...C,title:u})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,$t.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${ie(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]}),(0,$t.jsx)("div",{className:"mt-2",children:(0,$t.jsx)(ft,{fieldName:"description",value:n.description||"Click $t add description...",label:"",multiline:!0,onSave:(c,u)=>l(C=>({...C,description:u})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,$t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,$t.jsxs)(se,{variant:"ghost",size:"sm",onClick:()=>D(!v),className:"gap-2",children:[(0,$t.jsx)(J.Info,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&(0,$t.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),v?(0,$t.jsx)(J.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(J.ChevronRight,{className:"h-4 w-4"})]}),(0,$t.jsxs)(se,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,$t.jsx)(J.X,{className:"h-4 w-4"}),"Close"]}),(0,$t.jsxs)(se,{size:"sm",onClick:p,className:"gap-2",disabled:S,children:[S?(0,$t.jsx)(J.Loader2,{className:"h-4 w-4 animate-spin"}):(0,$t.jsx)(J.Save,{className:"h-4 w-4"}),S?"Auto-saving...":"Save"]})]})]}),(0,$t.jsx)(Tt.motion.div,{initial:!1,animate:{height:v?"auto":0,opacity:v?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,$t.jsx)(J.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsxs)(se,{type:"button",variant:"outline",size:"sm",onClick:ce,className:"gap-1 h-8",children:[(0,$t.jsx)(J.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?(0,$t.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([c,u],C)=>{let z=be(c);return(0,$t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,$t.jsx)(fe,{value:c,onChange:W=>{let Ne=W.target.value||"",Te=n.metadata?.[c];l(Be=>{let tt={...Be.metadata};return delete tt[c],Ne&&(tt[Ne]=Te||""),{...Be,metadata:tt}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${c}`}),(0,$t.jsx)("datalist",{id:`metadata-keys-${c}`,children:ve.allKeys.map(W=>(0,$t.jsx)("option",{value:W},W))}),(0,$t.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),z.length>0?(0,$t.jsxs)(Jt,{value:String(u||""),onValueChange:W=>U(c,W),children:[(0,$t.jsx)(ct,{className:"flex-1 h-8 text-sm",children:(0,$t.jsx)(Xt,{placeholder:"Value"})}),(0,$t.jsxs)(dt,{children:[z.map(W=>(0,$t.jsx)(We,{value:W,children:W},W)),(0,$t.jsx)(We,{value:"__custom__",children:(0,$t.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,$t.jsx)(fe,{value:String(u||""),onChange:W=>E(c,W.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,$t.jsx)(se,{type:"button",variant:"ghost",size:"sm",onClick:()=>Q(c),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,$t.jsx)(J.X,{className:"h-3 w-3"})})]},`metadata-key-${C}`)})}):(0,$t.jsxs)("div",{className:"text-center py-4",children:[(0,$t.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,$t.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" $t create metadata'})]})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,$t.jsx)("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:n.format==="richText"?(0,$t.jsx)(et,{setValue:f,value:w,name:"richTextContent"}):(0,$t.jsx)(He,{value:n.content||"",onChange:c=>l(u=>({...u,content:c.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var $o=Y(require("react-markdown")),Ko=Y(require("remark-gfm"));var Wo=e=>(0,$t.jsx)($o.default,{remarkPlugins:[Ko.default],components:{h1:({children:t})=>(0,$t.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,$t.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,$t.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,$t.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,$t.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,$t.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,$t.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,$t.jsx)("p",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,$t.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,$t.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,$t.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Bo=e=>(0,$t.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),sn=e=>(0,$t.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,$t.jsx)(et,{value:JSON.stringify(e),editable:!1,name:"richTextContent"},JSON.stringify(e))}),ln=e=>(0,$t.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,$t.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,$t.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,$t.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Wo(e)]});function cn({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:a,availableDocuments:i=[],knowledgeContexts:n=[]}){let[l,v]=(0,oe.useState)(!1),[D,w]=(0,oe.useState)(!1),[f,S]=(0,oe.useState)(e),[V,k]=(0,oe.useState)(!1),M=(0,oe.useRef)(null),g=f.format==="richText"?f.richTextContent:f.content,T=(0,oe.useMemo)(()=>`${f.format}:${JSON.stringify(g)}`,[f.format,g]);(0,oe.useEffect)(()=>{S(e)},[e]);let H=y=>{switch(y){case"markdown":case"mdx":return(0,$t.jsx)(J.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(J.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(J.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(J.File,{className:"h-6 w-6 text-muted-foreground"})}},F=y=>{switch(y){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},P=(y,X)=>{let le={markdown:Wo,mdx:ln,text:Bo},ie=a?.[X]||le[X];if(X==="richText"&&typeof y=="object")return sn(y);if(ie&&typeof y=="string")return ie(y);if(typeof y=="string")return Bo(y)},$=async(y,X="save")=>{X==="save"&&k(!0),M.current=f,(0,oe.startTransition)(()=>{S({...y,richTextContent:y.richTextContent?structuredClone(y.richTextContent):void 0})});try{let le=await t?.(y);if(X==="save"&&k(!1),!le)throw new Error("save failed")}catch{M.current&&(0,oe.startTransition)(()=>S(M.current))}},te=()=>{v(!1)};return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)($e,{open:l||r==="create",onOpenChange:y=>!y&&te(),children:(0,$t.jsxs)(at,{children:[(0,$t.jsx)(Ke,{}),(0,$t.jsxs)(Fo.Content,{className:b("fixed inset-0 z-50 bg-background p-0 $t-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[V&&(0,$t.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:(0,$t.jsx)(J.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),(0,$t.jsx)(Uo,{mode:r==="create"?"create":"edit",document:f,onSave:$,onCancel:te,availableDocuments:i,knowledgeContexts:n})]})]})}),(0,$t.jsxs)(Tt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[f.title,(0,$t.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${F(f.format)}`,children:f.format.toUpperCase()})]}),f.description&&(0,$t.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:f.description})]})}),(0,$t.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[f.metadata&&Object.keys(f.metadata).length>0&&(0,$t.jsxs)(se,{variant:"ghost",size:"sm",onClick:()=>w(!D),className:"gap-2",children:[(0,$t.jsx)(J.Info,{className:"h-4 w-4"}),"Metadata",D?(0,$t.jsx)(J.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(J.ChevronRight,{className:"h-4 w-4"})]}),o&&(0,$t.jsxs)(se,{variant:"outline",size:"sm",onClick:()=>v(!0),className:"gap-2",children:[(0,$t.jsx)(J.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),f.metadata&&Object.keys(f.metadata).length>0&&(0,$t.jsx)(Tt.motion.div,{initial:!1,animate:{height:D?"auto":0,opacity:D?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,$t.jsx)(J.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,$t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(f.metadata).map(([y,X])=>(0,$t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,$t.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:y.replace(/([x-$t])/g," $1").trim()}),(0,$t.jsx)("span",{className:"text-foreground font-medium",children:String(X)})]},y))})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 ",children:(0,$t.jsx)("div",{className:"py-4 h-full",children:(0,$t.jsx)("div",{className:"space-y-4",children:f.content||f.richTextContent?(0,$t.jsx)("div",{className:"relative",children:(0,$t.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:P(f.format==="richText"?f.richTextContent:f.content,f.format)})},T):(0,$t.jsxs)("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,$t.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,$t.jsx)(J.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,$t.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,$t.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}0&&(module.exports={DocumentPreview});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-NIGA3VKZ.mjs";import"../../chunk-HMZKODQJ.mjs";import"../../chunk-D7VHHXGM.mjs";import"../../chunk-UOA5RYVR.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DocumentPreview};
2
+ "use strict";import{a}from"../../chunk-QKOBOCKK.mjs";import"../../chunk-ACGCNGIH.mjs";import"../../chunk-PZFYJ5FS.mjs";import"../../chunk-LEUI66J6.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DocumentPreview};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-NDZ26EG6.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DigitalColleagueClone};
2
+ "use strict";import{a}from"../../chunk-NDZ26EG6.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DigitalColleagueClone};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-CRAFZGCI.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as FoundaryLayout};
2
+ "use strict";import{a}from"../../chunk-CRAFZGCI.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as FoundaryLayout};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-M2REXGQW.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DigitalColleagueOptions};
2
+ "use strict";import{a}from"../../chunk-M2REXGQW.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as DigitalColleagueOptions};