cortex-react-components 2.28.3 → 2.29.0-beta.1
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.
- package/dist/{chunk-IISYRLNU.mjs → chunk-2AZMG5X5.mjs} +1 -1
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-2LQLKZYT.mjs} +1 -1
- package/dist/{chunk-6FHRZHAJ.mjs → chunk-2OGUZJVD.mjs} +1 -1
- package/dist/{chunk-CC57QZMB.mjs → chunk-2UVHBGOC.mjs} +1 -1
- package/dist/{chunk-UENQZNU3.mjs → chunk-2ZBHHV3P.mjs} +1 -1
- package/dist/{chunk-GUEJKEJJ.mjs → chunk-3MK7GU65.mjs} +1 -1
- package/dist/{chunk-JBGWDOOS.mjs → chunk-3PAS4AKZ.mjs} +1 -1
- package/dist/{chunk-R4SE63GR.mjs → chunk-3W5SE2HO.mjs} +1 -1
- package/dist/{chunk-2TUBS2HM.mjs → chunk-4DESBE4R.mjs} +1 -1
- package/dist/{chunk-HD6E7KI2.mjs → chunk-4KVVVRGU.mjs} +1 -1
- package/dist/{chunk-COBOHCBL.mjs → chunk-5G7LCLOY.mjs} +1 -1
- package/dist/{chunk-ITNR7N47.mjs → chunk-5ISPA3SI.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/{chunk-QOZ2O3FG.mjs → chunk-5WTGNFUL.mjs} +1 -1
- package/dist/{chunk-CK2TD4BY.mjs → chunk-6A2O63AU.mjs} +1 -1
- package/dist/{chunk-VGWDYD6Z.mjs → chunk-6LJCQVKZ.mjs} +1 -1
- package/dist/{chunk-TKY52BNP.mjs → chunk-7HIL4GBK.mjs} +1 -1
- package/dist/{chunk-CTAIR3TE.mjs → chunk-7HLSAUWP.mjs} +1 -1
- package/dist/{chunk-MS7YIAWP.mjs → chunk-ABWLO5GA.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/{chunk-YH72WKGC.mjs → chunk-BEUDMDIW.mjs} +1 -1
- package/dist/{chunk-XJKNH5LL.mjs → chunk-BLOKJ7Y2.mjs} +1 -1
- package/dist/{chunk-LLED3RQS.mjs → chunk-BQJDTDBP.mjs} +1 -1
- package/dist/{chunk-NXAXOI33.mjs → chunk-C6RV2I5S.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-CGL3R3BQ.mjs} +1 -1
- package/dist/{chunk-SNTLCFXF.mjs → chunk-DDQVEARQ.mjs} +1 -1
- package/dist/{chunk-TQKXHMD7.mjs → chunk-DDYANYQB.mjs} +1 -1
- package/dist/{chunk-FJ2HHNPX.mjs → chunk-DLX4NQ3T.mjs} +1 -1
- package/dist/{chunk-SNFBF6KT.mjs → chunk-DZDMH6IZ.mjs} +1 -1
- package/dist/{chunk-7BYNW77I.mjs → chunk-EDRIV2VR.mjs} +1 -1
- package/dist/{chunk-NDBSSX6Q.mjs → chunk-EVQAIFAP.mjs} +1 -1
- package/dist/{chunk-SX2LOHXX.mjs → chunk-FNOAYUJ3.mjs} +1 -1
- package/dist/{chunk-46N4YPMB.mjs → chunk-FOO5RONL.mjs} +1 -1
- package/dist/{chunk-CO6AQNZ5.mjs → chunk-G53ROINJ.mjs} +1 -1
- package/dist/{chunk-5EKGFFJD.mjs → chunk-G5UB3YKZ.mjs} +1 -1
- package/dist/{chunk-QKDYTCZC.mjs → chunk-GFYO6B7H.mjs} +1 -1
- package/dist/{chunk-NSMXJCXE.mjs → chunk-GLKM2IVW.mjs} +1 -1
- package/dist/{chunk-4USR4WTH.mjs → chunk-GMLLRSAH.mjs} +1 -1
- package/dist/chunk-HCHZUZUK.mjs +4 -0
- package/dist/{chunk-Z22NSJMF.mjs → chunk-HF33ZXKX.mjs} +1 -1
- package/dist/{chunk-EOXVYLPB.mjs → chunk-HFND7WDK.mjs} +1 -1
- package/dist/{chunk-VKLEU4ZW.mjs → chunk-I3G2R2J2.mjs} +1 -1
- package/dist/{chunk-MXMW65GM.mjs → chunk-IKVDX3WJ.mjs} +1 -1
- package/dist/{chunk-MCOHKE2T.mjs → chunk-JGKLAY6J.mjs} +1 -1
- package/dist/chunk-JION2IPC.mjs +4 -0
- package/dist/{chunk-6XUIHSKG.mjs → chunk-JKVQOOCZ.mjs} +1 -1
- package/dist/{chunk-NCJAMNMQ.mjs → chunk-K7NFBXL3.mjs} +1 -1
- package/dist/{chunk-3M5KHST3.mjs → chunk-KHJKOKJN.mjs} +1 -1
- package/dist/{chunk-6YHCNPFB.mjs → chunk-KOLP657S.mjs} +1 -1
- package/dist/{chunk-TIIYFAV6.mjs → chunk-KRDGYYCK.mjs} +1 -1
- package/dist/{chunk-JDMIQLAZ.mjs → chunk-KSYES4GX.mjs} +1 -1
- package/dist/{chunk-AOQPH32M.mjs → chunk-LCHPGIER.mjs} +1 -1
- package/dist/{chunk-KX2NCNCS.mjs → chunk-LF55USCD.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/{chunk-6ZMZX5TB.mjs → chunk-LL7CRB4U.mjs} +1 -1
- package/dist/{chunk-VRHJOUL3.mjs → chunk-LMDGHBG2.mjs} +1 -1
- package/dist/{chunk-MH4YPGH4.mjs → chunk-LPCO4T25.mjs} +1 -1
- package/dist/{chunk-5MMNC65L.mjs → chunk-LRNWBTXT.mjs} +1 -1
- package/dist/{chunk-AABB4TFO.mjs → chunk-M3DLWHPQ.mjs} +1 -1
- package/dist/{chunk-VNKGAW4K.mjs → chunk-MQ7ZFZRG.mjs} +1 -1
- package/dist/{chunk-KPTGYVDM.mjs → chunk-MQG7MKTK.mjs} +1 -1
- package/dist/{chunk-TZKQXT7Y.mjs → chunk-N25B5TQ5.mjs} +1 -1
- package/dist/{chunk-U3PUWUVM.mjs → chunk-NCHC4HCU.mjs} +1 -1
- package/dist/{chunk-SME3D72Q.mjs → chunk-OAK45GQL.mjs} +1 -1
- package/dist/{chunk-J3VJUPR7.mjs → chunk-ORCATWOS.mjs} +1 -1
- package/dist/{chunk-KPQ56JSD.mjs → chunk-PAERB6R2.mjs} +1 -1
- package/dist/{chunk-7MPZOMXK.mjs → chunk-PG4VW7VP.mjs} +1 -1
- package/dist/{chunk-M2REXGQW.mjs → chunk-PKI57UXP.mjs} +1 -1
- package/dist/{chunk-LCSO56PM.mjs → chunk-PQYMYQXD.mjs} +1 -1
- package/dist/{chunk-56X4PU43.mjs → chunk-Q35D7SUU.mjs} +1 -1
- package/dist/{chunk-JU4TJYSZ.mjs → chunk-QDK5I675.mjs} +1 -1
- package/dist/{chunk-2R3MJSQ7.mjs → chunk-QHIZOLWH.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-QPGVTPZ4.mjs} +1 -1
- package/dist/{chunk-P2B3OITE.mjs → chunk-R422HRMQ.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-F6DMXMR4.mjs → chunk-S3OBSLA5.mjs} +1 -1
- package/dist/{chunk-6SWKEZN6.mjs → chunk-S7SHOCHM.mjs} +1 -1
- package/dist/{chunk-53ERRCTV.mjs → chunk-SKTNOZL2.mjs} +1 -1
- package/dist/{chunk-EZC3YWSQ.mjs → chunk-SRCJSWQF.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-LCEEFZH7.mjs → chunk-SRXU4X35.mjs} +1 -1
- package/dist/{chunk-V7SNI22Q.mjs → chunk-T23BJQBB.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-T46EPXCV.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-LJFBHY4P.mjs → chunk-TBKC2B4Z.mjs} +1 -1
- package/dist/{chunk-PVPDARFR.mjs → chunk-TCZNV2C2.mjs} +1 -1
- package/dist/{chunk-FB5PBKLV.mjs → chunk-TGJ74O6U.mjs} +1 -1
- package/dist/{chunk-TR6RBROH.mjs → chunk-U3OEUDKT.mjs} +1 -1
- package/dist/{chunk-47OE4ZPY.mjs → chunk-UE66RIJN.mjs} +1 -1
- package/dist/{chunk-QDP657UR.mjs → chunk-UG7FEEFM.mjs} +1 -1
- package/dist/{chunk-ZHBYZ4HE.mjs → chunk-UW65QW5M.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-XGGWZIPM.mjs → chunk-V4OXGW5U.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-4LUF5GZ6.mjs → chunk-VR75QVWG.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-MAZGVZJN.mjs → chunk-VWHOSOCB.mjs} +1 -1
- package/dist/{chunk-MU47F4UR.mjs → chunk-WAM7RYAU.mjs} +1 -1
- package/dist/{chunk-2LINLX4S.mjs → chunk-WHOWQZV6.mjs} +1 -1
- package/dist/{chunk-MU5WPW4N.mjs → chunk-WPH2ALD6.mjs} +1 -1
- package/dist/{chunk-2UNIT7NC.mjs → chunk-XSPGO55P.mjs} +1 -1
- package/dist/{chunk-RS4WAAGI.mjs → chunk-XTUH2DJE.mjs} +1 -1
- package/dist/{chunk-FSCDCSVK.mjs → chunk-YCD46AKJ.mjs} +1 -1
- package/dist/{chunk-GS3P2V76.mjs → chunk-YONYS5B2.mjs} +1 -1
- package/dist/{chunk-E6NVWHRS.mjs → chunk-ZERDRART.mjs} +1 -1
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/{chunk-X3YJJBFJ.mjs → chunk-ZKTIH47I.mjs} +1 -1
- package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
- package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/PricingCard.mjs +1 -1
- package/dist/components/Cards/ServiceCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/capability-menu.mjs +1 -1
- package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.js +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
- package/dist/components/DigitalColleagues/team-form.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/DashboardHeader.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/LandingMenu.mjs +1 -1
- package/dist/components/Foundary/Login.mjs +1 -1
- package/dist/components/Foundary/MainPage.js +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/SearchableSelect.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/colleague-card.mjs +1 -1
- package/dist/components/Foundary/colleague-form.mjs +1 -1
- package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/file-edit.mjs +1 -1
- package/dist/components/Foundary/foundary-clone.mjs +1 -1
- package/dist/components/Foundary/foundary-layout.mjs +1 -1
- package/dist/components/Foundary/foundary-options.mjs +1 -1
- package/dist/components/Foundary/index.js +4 -4
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/Foundary/knowledge-search.mjs +1 -1
- package/dist/components/Foundary/types.d.ts +1 -1
- package/dist/components/HeaderFooter/Header.js +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.js +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
- package/dist/components/HeaderFooter/index.js +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
- package/dist/components/Heros/DashboardHero/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/PlanningView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/TaskSidebar.mjs +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/TeamSwitcher.mjs +1 -1
- package/dist/components/Projects/file-list.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/Projects/project-card.mjs +1 -1
- package/dist/components/Projects/team-card.mjs +1 -1
- package/dist/components/dc-temp/creative.mjs +1 -1
- package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +29 -29
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/carousel.css +1 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.js +4 -0
- package/dist/components/ui/carousel.mjs +2 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/decorators/Intranet.css +1 -0
- package/dist/decorators/Intranet.d.ts +7 -0
- package/dist/decorators/Intranet.js +4 -0
- package/dist/decorators/Intranet.mjs +1 -0
- package/dist/globals.css +1 -1
- package/dist/index.js +36 -36
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.js +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.js +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.js +2 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.js +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.js +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/MainPageSection.mjs +1 -1
- package/dist/sections/PageSections.js +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +3 -1
- package/dist/chunk-L3BLBPSR.mjs +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
"use strict";var tm=Object.create;var $r=Object.defineProperty;var am=Object.getOwnPropertyDescriptor;var om=Object.getOwnPropertyNames;var rm=Object.getPrototypeOf,im=Object.prototype.hasOwnProperty;var sm=(e,t)=>{for(var a in t)$r(e,a,{get:t[a],enumerable:!0})},Rn=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of om(t))!im.call(e,r)&&r!==a&&$r(e,r,{get:()=>t[r],enumerable:!(o=am(t,r))||o.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?tm(rm(e)):{},Rn(t||!e||!e.__esModule?$r(a,"default",{value:e,enumerable:!0}):a,e)),nm=e=>Rn($r({},"__esModule",{value:!0}),e);var du={};sm(du,{AppSidebarLeft:()=>qr,ColleagueCard:()=>rd,ColleagueForm:()=>nd,ColleagueTypeSelection:()=>Ni,ColleaguesView:()=>gn,DashboardHeader:()=>nl,DashboardPage:()=>un,DigitalColleageusLayout:()=>ui,DigitalColleagueClone:()=>ld,DigitalColleagueOptions:()=>Ci,DocumentEdit:()=>Fi,DocumentPreview:()=>Li,FileView:()=>Ur,KnowledgeBrowser:()=>Oi,KnowledgeSearch:()=>Sr,KnowledgeView:()=>Or,MainPage:()=>Os,ManagementSidebar:()=>wi,PlanningView:()=>Ki,ProjectView:()=>yn,ProjectsIndexView:()=>Cn,SearchableSelect:()=>ad,TeamForm:()=>Di,TeamsIndexView:()=>Sn});module.exports=nm(du);var sl=require("lucide-react");var jo=ne(require("@radix-ui/react-collapsible")),qi=jo.Root,An=jo.CollapsibleTrigger,In=jo.CollapsibleContent;var gs=ne(require("clsx"));var Un=require("clsx");var Qi="-",lm=e=>{let t=cm(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(Qi);return s[0]===""&&s.length!==1&&s.shift(),Bn(s,t)||dm(n)},getConflictingClassGroupIds:(n,s)=>{let c=a[n]||[];return s&&o[n]?[...c,...o[n]]:c}}},Bn=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Bn(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(Qi);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Mn=/^\[(.+)\]$/,dm=e=>{if(Mn.test(e)){let t=Mn.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},cm=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return pm(Object.entries(e.classGroups),a).forEach(([i,n])=>{Zi(n,o,i,t)}),o},Zi=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:En(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(mm(r)){Zi(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{Zi(n,En(t,i),a,o)})})},En=(e,t)=>{let a=e;return t.split(Qi).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},mm=e=>e.isThemeGetter,pm=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,um=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},Fn="!",gm=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let c=[],l=0,d=0,p;for(let m=0;m<s.length;m++){let C=s[m];if(l===0){if(C===r&&(o||s.slice(m,m+i)===t)){c.push(s.slice(d,m)),d=m+i;continue}if(C==="/"){p=m;continue}}C==="["?l++:C==="]"&&l--}let u=c.length===0?s:s.substring(d),g=u.startsWith(Fn),h=g?u.substring(1):u,x=p&&p>d?p-d:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:x}};return a?s=>a({className:s,parseClassName:n}):n},fm=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},vm=e=>({cache:um(e.cacheSize),parseClassName:gm(e),...lm(e)}),hm=/\s+/,bm=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(hm),s="";for(let c=n.length-1;c>=0;c-=1){let l=n[c],{modifiers:d,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:g}=a(l),h=!!g,x=o(h?u.substring(0,g):u);if(!x){if(!h){s=l+(s.length>0?" "+s:s);continue}if(x=o(u),!x){s=l+(s.length>0?" "+s:s);continue}h=!1}let m=fm(d).join(":"),C=p?m+Fn:m,I=C+x;if(i.includes(I))continue;i.push(I);let D=r(x,h);for(let T=0;T<D.length;++T){let G=D[T];i.push(C+G)}s=l+(s.length>0?" "+s:s)}return s};function xm(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ln(t))&&(o&&(o+=" "),o+=a);return o}var Ln=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ln(e[o]))&&(a&&(a+=" "),a+=t);return a};function ym(e,...t){let a,o,r,i=n;function n(c){let l=t.reduce((d,p)=>p(d),e());return a=vm(l),o=a.cache.get,r=a.cache.set,i=s,s(c)}function s(c){let l=o(c);if(l)return l;let d=bm(c,a);return r(c,d),d}return function(){return i(xm.apply(null,arguments))}}var et=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},On=/^\[(?:([a-z-]+):)?(.+)\]$/i,wm=/^\d+\/\d+$/,Nm=new Set(["px","full","screen"]),Cm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sm=/\d+(%|px|r?em|[sdl]?zn([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|zn|min|max))|\zn(calc|min|max|clamp)\(.+\)|^0$/,Dm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Tm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,km=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=e=>Uo(e)||Nm.has(e)||wm.test(e),to=e=>zo(e,"length",Fm),Uo=e=>!!e&&!Number.isNaN(Number(e)),Yi=e=>zo(e,"number",Uo),nr=e=>!!e&&Number.isInteger(Number(e)),Pm=e=>e.endsWith("%")&&Uo(e.slice(0,-1)),he=e=>On.test(e),ao=e=>Cm.test(e),Rm=new Set(["length","size","percentage"]),Am=e=>zo(e,Rm,Hn),Im=e=>zo(e,"position",Hn),Mm=new Set(["image","url"]),Em=e=>zo(e,Mm,Om),Bm=e=>zo(e,"",Lm),lr=()=>!0,zo=(e,t,a)=>{let o=On.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Fm=e=>Sm.test(e)&&!Dm.test(e),Hn=()=>!1,Lm=e=>Tm.test(e),Om=e=>km.test(e);var Hm=()=>{let e=et("colors"),t=et("spacing"),a=et("blur"),o=et("brightness"),r=et("borderColor"),i=et("borderRadius"),n=et("borderSpacing"),s=et("borderWidth"),c=et("contrast"),l=et("grayscale"),d=et("hueRotate"),p=et("invert"),u=et("gap"),g=et("gradientColorStops"),h=et("gradientColorStopPositions"),x=et("inset"),m=et("margin"),C=et("opacity"),I=et("padding"),D=et("saturate"),T=et("scale"),G=et("sepia"),w=et("skew"),M=et("space"),S=et("translate"),R=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",he,t],P=()=>[he,t],Ue=()=>["",$a,to],Me=()=>["auto",Uo,he],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>["start","end","center","between","around","evenly","stretch"],Ne=()=>["","0",he],Ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Uo,he];return{cacheSize:500,separator:":",theme:{colors:[lr],spacing:[$a,to],blur:["none","",ao,he],brightness:B(),borderColor:[e],borderRadius:["none","","full",ao,he],borderSpacing:P(),borderWidth:Ue(),contrast:B(),grayscale:Ne(),hueRotate:B(),invert:Ne(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Pm,to],inset:ce(),margin:ce(),opacity:B(),padding:P(),saturate:B(),scale:B(),sepia:Ne(),skew:B(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[ao]}],"break-after":[{"break-after":Ee()}],"break-before":[{"break-before":Ee()}],"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:[...N(),he]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nr,he]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:Ne()}],shrink:[{shrink:Ne()}],order:[{order:["first","last","none",nr,he]}],"grid-cols":[{"grid-cols":[lr]}],"col-start-end":[{col:["auto",{span:["full",nr,he]},he]}],"col-start":[{"col-start":Me()}],"col-end":[{"col-end":Me()}],"grid-rows":[{"grid-rows":[lr]}],"row-start-end":[{row:["auto",{span:[nr,he]},he]}],"row-start":[{"row-start":Me()}],"row-end":[{"row-end":Me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Ge()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ge(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ge(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],zn:[{zn:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],sl:[{sl:[I]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],zn:[{zn:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],sl:[{sl:[m]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[ao]},ao]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ao,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yi]}],"font-family":[{font:[lr]}],"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",he]}],"line-clamp":[{"line-clamp":["none",Uo,Yi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$a,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","sl-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$a,to]}],"underline-offset":[{"underline-offset":["auto",$a,he]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),Im]}],"bg-repeat":[{bg:["sl-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Am]}],"bg-image":[{bg:["none",{"gradient-to":["t","sl","r","br","zn","bl","l","tl"]},Em]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-zn":[{"rounded-zn":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-zn":[{"rounded-zn":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-sl":[{"rounded-sl":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-zn":[{"border-zn":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:X()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-zn":[{"border-zn":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[$a,he]}],"outline-w":[{outline:[$a,to]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[$a,to]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ao,Bm]}],"shadow-color":[{shadow:[lr]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ao,he]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"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",he]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[nr,he]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],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","sl-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-zn":[{"scroll-zn":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-sl":[{"scroll-sl":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-zn":[{"scroll-zn":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-sl":[{"scroll-sl":P()}],"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",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$a,to,Yi]}],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","zn","pt","pr","pb","sl"],px:["pr","sl"],py:["pt","pb"],m:["mx","my","ms","zn","mt","mr","mb","sl"],mx:["mr","sl"],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-s","rounded-e","rounded-t","rounded-r","rounded-zn","rounded-l","rounded-ss","rounded-se","rounded-zn","rounded-es","rounded-tl","rounded-sl","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-zn"],"rounded-t":["rounded-tl","rounded-sl"],"rounded-r":["rounded-sl","rounded-br"],"rounded-zn":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-zn","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-zn"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-zn","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-zn"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-zn","scroll-mt","scroll-mr","scroll-mb","scroll-sl"],"scroll-mx":["scroll-mr","scroll-sl"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-zn","scroll-pt","scroll-pr","scroll-pb","scroll-sl"],"scroll-px":["scroll-pr","scroll-sl"],"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 jn=ym(Hm);function f(...e){return jn((0,Un.clsx)(e))}var zn=require("react/jsx-runtime");function Ut({className:e,...t}){return(0,zn.jsx)("div",{className:f("animate-pulse rounded-md bg-primary/10",e),...t})}var Ce=ne(require("react")),Vo=require("@radix-ui/react-slot"),al=require("class-variance-authority");var Kr=require("react"),Vn=(e=768)=>{let[t,a]=(0,Kr.useState)(!1);return(0,Kr.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Kn=ne(require("react")),dr=(0,$n.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"}}}),y=Kn.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,zn.jsx)(e?Vo.Slot:"button",{className:f(dr({className:t,size:a,variant:o})),ref:i,...r}));y.displayName="Button";var Wn=ne(require("react"));var W=Wn.forwardRef(({className:e,type:t,...a},o)=>(0,zn.jsx)("input",{type:t,className:f("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:o,...a}));W.displayName="Input";var Xn=ne(require("react")),es=ne(require("@radix-ui/react-separator"));var cr=Xn.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,zn.jsx)(es.Root,{ref:r,decorative:a,orientation:t,className:f("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));cr.displayName=es.Root.displayName;var mr=ne(require("react")),At=ne(require("@radix-ui/react-dialog")),Yn=require("@radix-ui/react-icons");var Qn=At.Root;var jm=At.Portal,el=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Overlay,{className:f("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,ref:a}));el.displayName=At.Overlay.displayName;var Um=(0,al.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-zn data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ts=mr.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,zn.jsxs)(jm,{children:[(0,zn.jsx)(el,{}),(0,zn.jsxs)(At.Content,{ref:r,className:f(Um({side:e}),t),...o,children:[(0,zn.jsxs)(At.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-secondary",children:[(0,zn.jsx)(Yn.Cross2Icon,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));ts.displayName=At.Content.displayName;var zm=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",e),...t});zm.displayName="SheetHeader";var Vm=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Vm.displayName="SheetFooter";var _m=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Title,{ref:a,className:f("text-lg font-semibold text-foreground",e),...t}));_m.displayName=At.Title.displayName;var $m=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));$m.displayName=At.Description.displayName;var tl=ne(require("react")),ya=ne(require("@radix-ui/react-tooltip"));var Ra=ya.Provider,Aa=ya.Root,Ia=ya.Trigger,wa=tl.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,zn.jsx)(ya.Portal,{children:(0,zn.jsx)(ya.Content,{ref:o,sideOffset:t,className:f("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),...a})}));wa.displayName=ya.Content.displayName;var Km="sidebar:state",Gm=60*60*24*7,Wm="16rem",Jm="18rem",Xm="3rem",qm="zn",rl=Ce.createContext(null);function Gr(){let e=Ce.useContext(rl);if(!e)throw new Error("useSidebar must zn used within a SidebarProvider.");return e}var os=Ce.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let c=Vn(),[l,d]=Ce.useState(!1),[p,u]=Ce.useState(e),g=t??p,h=Ce.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(g):I);u(I),document.cookie=`${Km}=${g}; path=/; max-age=${Gm}`},[a,g]),x=Ce.useCallback(()=>c?d(I=>!I):h(I=>!I),[c,h,d]);Ce.useEffect(()=>{let I=D=>{D.key===qm&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),x())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[x]);let m=g?"expanded":"collapsed",C=Ce.useMemo(()=>({state:m,open:g,setOpen:h,isMobile:c,openMobile:l,setOpenMobile:d,toggleSidebar:x}),[m,g,h,c,l,d,x]);return(0,zn.jsx)(rl.Provider,{value:C,children:(0,zn.jsx)(Ra,{delayDuration:0,children:(0,zn.jsx)("div",{style:{"--sidebar-width":Wm,"--sidebar-width-icon":Xm,...r},className:f("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});os.displayName="SidebarProvider";var rs=Ce.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:c,openMobile:l,setOpenMobile:d}=Gr();return a==="none"?(0,zn.jsx)("div",{className:f("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,zn.jsx)(Qn,{open:l,onOpenChange:d,...i,children:(0,zn.jsx)(ts,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Jm},side:e,children:(0,zn.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,zn.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,zn.jsx)("div",{className:f("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,zn.jsx)("div",{className:f("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,zn.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});rs.displayName="Sidebar";var is=Ce.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Gr();return(0,zn.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:f("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,zn.jsx)(sl.PanelLeft,{}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});is.displayName="SidebarTrigger";var Ym=Ce.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Gr();return(0,zn.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:f("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Ym.displayName="SidebarRail";var ss=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("main",{ref:a,className:f("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:sl-2 md:peer-data-[variant=inset]:sl-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));ss.displayName="SidebarInset";var Zm=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(W,{ref:a,"data-sidebar":"input",className:f("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Zm.displayName="SidebarInput";var ns=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"header",className:f("flex flex-col gap-2 p-2",e),...t}));ns.displayName="SidebarHeader";var ls=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"footer",className:f("flex flex-col gap-2 p-2",e),...t}));ls.displayName="SidebarFooter";var Qm=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(cr,{ref:a,"data-sidebar":"separator",className:f("mx-2 w-auto bg-sidebar-border",e),...t}));Qm.displayName="SidebarSeparator";var Wr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"content",className:f("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Wr.displayName="SidebarContent";var Jr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"group",className:f("relative flex w-full min-w-0 flex-col p-2",e),...t}));Jr.displayName="SidebarGroup";var ep=Ce.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,zn.jsx)(t?Vo.Slot:"div",{ref:o,"data-sidebar":"group-label",className:f("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ep.displayName="SidebarGroupLabel";var tp=Ce.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,zn.jsx)(t?Vo.Slot:"button",{ref:o,"data-sidebar":"group-action",className:f("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));tp.displayName="SidebarGroupAction";var ds=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"group-content",className:f("w-full text-sm",e),...t}));ds.displayName="SidebarGroupContent";var pr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("ul",{ref:a,"data-sidebar":"menu",className:f("flex w-full min-w-0 flex-col gap-1",e),...t}));pr.displayName="SidebarMenu";var ur=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:f("group/menu-item relative",e),...t}));ur.displayName="SidebarMenuItem";var ap=(0,al.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Xr=Ce.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let c=e?Vo.Slot:"button",{isMobile:l,state:d}=Gr(),p=(0,zn.jsx)(c,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:f(ap({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:p}),(0,zn.jsx)(wa,{side:"right",align:"center",hidden:d!=="collapsed"||l,...r})]})):p});Xr.displayName="SidebarMenuButton";var cs=Ce.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,zn.jsx)(t?Vo.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:f("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));cs.displayName="SidebarMenuAction";var op=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:f("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));op.displayName="SidebarMenuBadge";var rp=Ce.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ce.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,zn.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:f("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,zn.jsx)(Ut,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,zn.jsx)(Ut,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});rp.displayName="SidebarMenuSkeleton";var ms=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:f("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ms.displayName="SidebarMenuSub";var ps=Ce.forwardRef(({...e},t)=>(0,zn.jsx)("li",{ref:t,...e}));ps.displayName="SidebarMenuSubItem";var us=Ce.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,zn.jsx)(e?Vo.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:f("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));us.displayName="SidebarMenuSubButton";function qr({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:c=!1,LinkComponent:l,...d}){let u=l?g=>(0,zn.jsx)(l,{...g}):s?({href:g,children:h,...x})=>(0,zn.jsx)("button",{onClick:()=>s&&s(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...x,children:h}):g=>(0,zn.jsx)("a",{...g});return(0,zn.jsxs)(rs,{...d,variant:"inset",children:[(0,zn.jsx)(ns,{children:(0,zn.jsx)(pr,{children:(0,zn.jsx)(ur,{children:c?(0,zn.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,zn.jsx)(Ut,{className:"bg-gray-200 my-2 w-full h-7"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,zn.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,zn.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,zn.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),c&&(0,zn.jsxs)(Wr,{children:[(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,zn.jsxs)(Wr,{children:[(0,zn.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!c&&a.map((g,h)=>(0,zn.jsx)(il,{subNav:g,pathName:i,Link:u},h)),(0,zn.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!c&&e.map((g,h)=>(0,zn.jsx)(il,{subNav:g,pathName:i,Link:u},h)),(0,zn.jsx)(Jr,{className:"mt-auto",children:(0,zn.jsx)(ds,{children:(0,zn.jsx)(pr,{children:t&&!c&&t.map(g=>(0,zn.jsx)(ur,{children:(0,zn.jsx)(Xr,{asChild:!0,size:"sm",children:(0,zn.jsxs)(u,{href:g.url||"",children:[g.icon&&(0,zn.jsx)(g.icon,{}),(0,zn.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,zn.jsx)(ls,{})]})}function il({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,zn.jsx)(qi,{defaultOpen:!0,className:"group/collapsible",children:(0,zn.jsx)(Jr,{className:"py-0",children:(0,zn.jsx)(pr,{children:(0,zn.jsx)(qi,{asChild:!0,defaultOpen:o.isActive,children:(0,zn.jsxs)(ur,{children:[(0,zn.jsx)(Xr,{asChild:!0,tooltip:o.label,className:(0,gs.default)(r&&"font-bold text-accent"),children:(0,zn.jsxs)(a,{href:o.url,children:[o.icon&&(0,zn.jsx)(o.icon,{}),(0,zn.jsx)("span",{children:o.label})]})}),o.links?.length?(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)(An,{asChild:!0,children:(0,zn.jsxs)(cs,{className:"data-[state=open]:rotate-90",children:[(0,zn.jsx)(sl.ChevronRight,{}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,zn.jsx)(In,{children:(0,zn.jsx)(ms,{children:o.links?.map(i=>(0,zn.jsx)(ps,{children:(0,zn.jsx)(us,{asChild:!0,className:(0,gs.default)(i.url===t&&"font-bold text-accent"),children:(0,zn.jsx)(a,{href:i.url,children:(0,zn.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Yr=ne(require("react")),Ka=ne(require("@radix-ui/react-avatar"));var ea=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Root,{ref:a,className:f("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ea.displayName=Ka.Root.displayName;var yo=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Image,{ref:a,className:f("aspect-square h-full w-full",e),...t}));yo.displayName=Ka.Image.displayName;var ta=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Fallback,{ref:a,className:f("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ta.displayName=Ka.Fallback.displayName;var Ga=ne(require("react")),Ae=ne(require("@radix-ui/react-dropdown-menu"));var Ma=Ae.Root,Ea=Ae.Trigger;var ip=Ga.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,zn.jsxs)(Ae.SubTrigger,{ref:r,className:f("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&&"sl-8",e),...o,children:[a,(0,zn.jsx)(Yn.ChevronRightIcon,{className:"sl-auto"})]}));ip.displayName=Ae.SubTrigger.displayName;var sp=Ga.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ae.SubContent,{ref:a,className:f("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}));sp.displayName=Ae.SubContent.displayName;var Na=Ga.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,zn.jsx)(Ae.Portal,{children:(0,zn.jsx)(Ae.Content,{ref:o,sideOffset:t,className:f("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),...a})}));Na.displayName=Ae.Content.displayName;var qt=Ga.forwardRef(({className:e,inset:t,...a},o)=>(0,zn.jsx)(Ae.Item,{ref:o,className:f("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&&"sl-8",e),...a}));qt.displayName=Ae.Item.displayName;var np=Ga.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,zn.jsxs)(Ae.CheckboxItem,{ref:r,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 sl-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:a,...o,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ae.ItemIndicator,{children:(0,zn.jsx)(Yn.CheckIcon,{className:"h-4 w-4"})})}),t]}));np.displayName=Ae.CheckboxItem.displayName;var lp=Ga.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(Ae.RadioItem,{ref:o,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 sl-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),...a,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ae.ItemIndicator,{children:(0,zn.jsx)(Yn.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));lp.displayName=Ae.RadioItem.displayName;var fs=Ga.forwardRef(({className:e,inset:t,...a},o)=>(0,zn.jsx)(Ae.Label,{ref:o,className:f("px-2 py-1.5 text-sm font-semibold",t&&"sl-8",e),...a}));fs.displayName=Ae.Label.displayName;var vs=Ga.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ae.Separator,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",e),...t}));vs.displayName=Ae.Separator.displayName;var dp=({className:e,...t})=>(0,zn.jsx)("span",{className:f("sl-auto text-xs tracking-widest opacity-60",e),...t});dp.displayName="DropdownMenuShortcut";var nl=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,zn.jsx)("header",{className:"border-zn bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,zn.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,zn.jsx)(sl.Menu,{className:"h-5 w-5"})}),(0,zn.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"}),(0,zn.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsx)(Ea,{asChild:!0,children:(0,zn.jsx)(y,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,zn.jsxs)(ea,{className:"h-10 w-10",children:[(0,zn.jsx)(yo,{src:"/avatars/01.png",alt:"@user"}),(0,zn.jsx)(ta,{children:"JD"})]})})}),(0,zn.jsxs)(Na,{className:"w-56",align:"end",forceMount:!0,children:[(0,zn.jsx)(fs,{className:"font-normal",children:(0,zn.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,zn.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,zn.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,zn.jsx)(vs,{}),(0,zn.jsxs)(qt,{children:[(0,zn.jsx)(sl.User,{className:"mr-2 h-4 w-4"}),(0,zn.jsx)("span",{children:"Profile"})]}),(0,zn.jsxs)(qt,{children:[(0,zn.jsx)(sl.Settings,{className:"mr-2 h-4 w-4"}),(0,zn.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var li=ne(require("react")),di=ne(require("next/link"));var cp=(0,al.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,zn.jsx)("div",{className:f(cp({variant:t}),e),...a})}var hs=ne(require("react")),la=ne(require("@radix-ui/react-scroll-area"));var Ba=hs.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(la.Root,{ref:o,className:f("relative overflow-hidden",e),...a,children:[(0,zn.jsx)(la.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,zn.jsx)(cl,{}),(0,zn.jsx)(la.Corner,{})]}));Ba.displayName=la.Root.displayName;var cl=hs.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,zn.jsx)(la.ScrollAreaScrollbar,{ref:o,orientation:t,className:f("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,zn.jsx)(la.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));cl.displayName=la.ScrollAreaScrollbar.displayName;var gr=ne(require("react")),Mt=ne(require("@radix-ui/react-dialog"));var mt=Mt.Root;var bs=Mt.Portal;var Qr=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Overlay,{ref:a,className:f("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}));Qr.displayName=Mt.Overlay.displayName;var gt=gr.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(bs,{children:[(0,zn.jsx)(Qr,{}),(0,zn.jsxs)(Mt.Content,{ref:o,className:f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,zn.jsxs)(Mt.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,zn.jsx)(sl.X,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));gt.displayName=Mt.Content.displayName;var ft=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ft.displayName="DialogHeader";var fr=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fr.displayName="DialogFooter";var rt=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Title,{ref:a,className:f("text-lg font-semibold leading-none tracking-tight",e),...t}));rt.displayName=Mt.Title.displayName;var vr=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));vr.displayName=Mt.Description.displayName;var hr=ne(require("@radix-ui/react-checkbox")),ul=ne(require("react")),br=ul.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(hr.Root,{className:f("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,zn.jsx)(hr.Indicator,{className:f("flex items-center justify-center text-current"),children:(0,zn.jsx)(sl.Check,{className:"h-4 w-4"})})}));br.displayName=hr.Root.displayName;var Fa=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),fl=[{id:"home",title:"Home",icon:(0,zn.jsx)(sl.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,zn.jsx)(sl.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,zn.jsx)(sl.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,zn.jsx)(sl.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,zn.jsx)(sl.FileText,{}),url:"/knowledge"}],vl=[{id:"1",title:"New comment zn your post",description:"Alex Morgan commented zn your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'zn used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial zn 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],hl=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,zn.jsx)(sl.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,zn.jsx)(sl.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,zn.jsx)(sl.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,zn.jsx)(sl.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,zn.jsx)(sl.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,zn.jsx)(sl.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,zn.jsx)(sl.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,zn.jsx)(sl.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"we",name:"IT Support",description:"Information technology and infrastructure",icon:(0,zn.jsx)(sl.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,zn.jsx)(sl.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],oi=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var xs=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],ti=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],ii=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],mp=[...ii,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems zn mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],pp=[...oi,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ai={projects:[{id:"1",name:"Empty Project",description:"A project with sl tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},gl={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:ii.filter(e=>e.epicId==="1")};var kg={empty:{initialProjects:ai.projects,initialEpics:ai.epics,initialSprints:ai.sprints,initialTasks:ai.tasks},default:{initialProjects:oi,initialEpics:xs,initialSprints:ti,initialTasks:ii},highDensity:{initialProjects:oi,initialEpics:xs,initialSprints:ti,initialTasks:mp},singleEpic:{initialProjects:oi,initialEpics:gl.epics,initialSprints:ti,initialTasks:gl.tasks},multipleProjects:{initialProjects:pp,initialEpics:xs,initialSprints:ti,initialTasks:ii}},ri=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.Kr","Python","Git"].map(Fa),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Fa),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused zn driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Fa),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Fa),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Fa),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Fa),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Fa),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Fa),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Fa),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Fa),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Pg=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:ri.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:ri.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:ri.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Rg=ri.filter(e=>e.type==="digital");function ni(e,t){let[a,o]=(0,Kr.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Kr.useEffect)(()=>{r(a)},[]),[a,r]}function ys({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=hl[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:c="/headerlogo.png",logoLink:l="/teams",appName:d="Nuvia",tagline:p="Collaboration Platform"}){let[u,g]=li.useState({}),[h,x]=ni("sidebar-favorites",{}),[m,C]=li.useState(null),[I,D]=li.useState(""),T=N=>{g(X=>({...X,[N]:!X[N]}))},G=N=>{i?.(N)},w=()=>{I.trim()&&n?.(I.trim())},M=N=>{N.key==="Enter"&&(N.preventDefault(),w())},S=(N,X)=>{let Q=h[N]||[],Ge=Q.includes(X)?Q.filter(Ne=>Ne!==X):Q.concat(X);x({...h,[N]:Ge})},R=N=>{if(!N.items||!N.maxItems||N.items.length<=N.maxItems)return N.items||[];let X=h[N.id]||[],Q=N.items.filter(Ne=>X.includes(Ne.id)),Ge=N.items.filter(Ne=>!X.includes(Ne.id));return[...Q,...Ge].slice(0,N.maxItems)},L=N=>N.maxItems&&N.items&&N.items.length>N.maxItems,ce=e,P=N=>{let X=L(N),Q=R(N),Ge=(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[N.icon,(0,zn.jsx)("span",{children:N.title})]}),N.badge&&(0,zn.jsx)(se,{variant:"outline",className:"sl-auto rounded-full px-2 py-0.5 text-xs",children:N.badge}),N.items&&(0,zn.jsx)(sl.ChevronDown,{className:f("sl-2 h-4 w-4 transition-transform",u[N.title]?"rotate-180":"")})]}),Ne=f("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",N.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return N.url?(0,zn.jsx)(di.default,{href:N.url,className:Ne,onClick:a?o:void 0,children:Ge}):(0,zn.jsx)("button",{className:Ne,onClick:()=>N.items&&T(N.title),children:Ge})},Ue=()=>{let N=e.find(Q=>Q.id===m);if(!N||!N.items||!N.maxItems)return null;let X=h[N.id]||[];return(0,zn.jsx)(mt,{open:!!m,onOpenChange:Q=>!Q&&C(null),children:(0,zn.jsxs)(gt,{className:"sm:max-w-md",children:[(0,zn.jsxs)(ft,{children:[(0,zn.jsxs)(rt,{children:["Manage ",N.title," Favorites"]}),(0,zn.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",N.maxItems," items to show in ",N.title.toLowerCase(),"."]})]}),(0,zn.jsx)(Ba,{className:"max-h-96 pr-4",children:(0,zn.jsx)("div",{className:"space-y-4",children:N.items.map(Q=>(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(br,{id:Q.id,checked:X.includes(Q.id),onCheckedChange:()=>S(N.id,Q.id),disabled:!X.includes(Q.id)&&X.length>=(N.maxItems||0)}),(0,zn.jsxs)("label",{htmlFor:Q.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[Q.title,Q.badge&&(0,zn.jsx)(se,{variant:"outline",className:"text-xs",children:Q.badge})]})]},Q.id))})})]})})},Me=(0,zn.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,zn.jsxs)(di.default,{href:l,className:"flex items-center gap-3",children:[(0,zn.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,zn.jsx)("img",{src:c,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h2",{className:"font-semibold",children:d}),(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:p})]})]}),a&&(0,zn.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,zn.jsx)(sl.X,{className:"h-5 w-5"})})]}),(0,zn.jsx)("div",{className:"px-3 py-2",children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted sl-9 pr-4 py-2",value:I,onChange:N=>D(N.target.value),onKeyPress:M})]})}),(0,zn.jsx)(Ba,{className:"flex-1 px-3 py-2",children:(0,zn.jsx)("div",{className:"space-y-1",children:ce.map(N=>(0,zn.jsxs)("div",{className:"mb-1",children:[P(N),N.items&&u[N.title]&&(0,zn.jsxs)("div",{className:"mt-1 sl-6 space-y-1 border-l sl-3",children:[R(N).map(X=>(0,zn.jsxs)(di.default,{href:X.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[X.title,X.badge&&(0,zn.jsx)(se,{variant:"outline",className:"sl-auto rounded-full px-2 py-0.5 text-xs",children:X.badge})]},X.id)),L(N)&&N.items&&N.items.length>R(N).length&&(0,zn.jsxs)("button",{onClick:()=>C(N.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",N.items.length-R(N).length," more available"]})]})]},N.id))})}),(0,zn.jsx)("div",{className:"p-3",children:(0,zn.jsx)("div",{className:"space-y-1",children:(0,zn.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,zn.jsx)(sl.Settings,{className:"h-5 w-5"}),(0,zn.jsx)("span",{children:"Settings"})]})})}),(0,zn.jsx)(Ue,{})]});return a?(0,zn.jsx)("div",{className:f("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Me}):(0,zn.jsx)("div",{className:f("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Me})}var so=require("motion/react");var bl=require("next-themes");function xl(){let{setTheme:e,theme:t}=(0,bl.useTheme)();return(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,zn.jsx)(sl.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,zn.jsx)(sl.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,zn.jsx)(wa,{children:"Toggle theme"})]})})}function yl({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(l=>!l.read),s=n.length,c=l=>{switch(l){case"info":return(0,zn.jsx)(sl.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,zn.jsx)(sl.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,zn.jsx)(sl.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,zn.jsx)(sl.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,zn.jsx)(so.AnimatePresence,{children:t&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)(so.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,zn.jsx)(so.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:f("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,zn.jsxs)("div",{className:"flex h-full flex-col",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between border-zn p-4",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"}),(0,zn.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,zn.jsxs)(se,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,zn.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,zn.jsx)(sl.X,{className:"h-5 w-5"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,zn.jsxs)("div",{className:"flex items-center justify-between border-zn p-2",children:[(0,zn.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,zn.jsx)(y,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,zn.jsx)(Ba,{className:"flex-1",children:(0,zn.jsx)("div",{className:"divide-y",children:n.map(l=>(0,zn.jsxs)("div",{className:f("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,zn.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:c(l.type)}),(0,zn.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsx)("p",{className:"font-medium",children:l.title}),(0,zn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,zn.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,zn.jsx)(sl.Check,{className:"h-3 w-3"})})]})]}),(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,zn.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,zn.jsx)(sl.ChevronRight,{className:"sl-1 h-3 w-3"})]})]})]},l.id))})}):(0,zn.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,zn.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,zn.jsx)(sl.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,zn.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,zn.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'al appear here."})]})]})})]})})}var wo=ne(require("@radix-ui/react-tabs"));function wl({className:e,...t}){return(0,zn.jsx)(wo.Root,{"data-slot":"tabs",className:f("flex flex-col gap-2",e),...t})}function Nl({className:e,...t}){return(0,zn.jsx)(wo.List,{"data-slot":"tabs-list",className:f("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Cl({className:e,...t}){return(0,zn.jsx)(wo.Trigger,{"data-slot":"tabs-trigger",className:f("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function $o({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,zn.jsxs)(so.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,zn.jsx)("div",{className:"hidden lg:block",children:(0,zn.jsx)(wl,{value:e,onValueChange:t,children:(0,zn.jsx)(Nl,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,zn.jsx)(Cl,{value:s.value,onClick:()=>t?.(s.value),className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,zn.jsx)("div",{className:"lg:hidden",children:(0,zn.jsxs)(Ma,{children:[(0,zn.jsx)(Ea,{asChild:!0,children:(0,zn.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4 sl-2"})]})}),(0,zn.jsx)(Na,{align:"center",className:"w-[180px]",children:a.map(s=>(0,zn.jsx)(qt,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function Dl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:c=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:p=(0,zn.jsx)(sl.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:g,onRemoveAll:h,logo:x="/headerlogo.png",appName:m="Nuvia",tagline:C="Collaboration Platform"}){let[I,D]=(0,Kr.useState)(!1),[T,G]=(0,Kr.useState)(t),w=T.filter(R=>!R.read).length,M=R=>{G(L=>L.filter(ce=>ce.id!==R)),g?.(R)},S=()=>{G(R=>R.filter(L=>L.read)),h?.()};return(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 sl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,zn.jsx)(sl.Menu,{className:"h-5 w-5"})}),(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,zn.jsx)(sl.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,zn.jsxs)(so.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,zn.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,zn.jsx)("img",{src:x,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h2",{className:"font-semibold text-sm",children:m}),(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:C})]})]}),(0,zn.jsxs)("div",{className:"flex flex-1 items-center",children:[c&&(0,zn.jsx)($o,{activeTab:n,onTabChange:s,tabOptions:l}),(0,zn.jsxs)("div",{className:"flex items-center gap-3 sl-auto",children:[(0,zn.jsx)(so.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[p,u]})})}),(0,zn.jsx)(xl,{}),(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>D(!0),children:[(0,zn.jsx)(so.motion.div,{animate:w>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:w>0?1/0:0,repeatDelay:3},children:(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"})}),w>0&&(0,zn.jsx)(so.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:w})]})})}),(0,zn.jsx)(wa,{children:"Notifications"})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(ea,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,zn.jsx)(yo,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,zn.jsx)(ta,{})]})})]})]})]}),(0,zn.jsx)(yl,{notifications:T,open:I,onClose:()=>D(!1),onNotificationRemove:M,onRemoveAll:S})]})}var Tl=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,zn.jsx)(sl.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function ui({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Tl[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Tl,activeTab:c,onTabChange:l,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:g="Action",onNotificationRemove:h,onRemoveAll:x,logo:m="/headerlogo.png",appName:C="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:D=!1}){let[T,G]=(0,Kr.useState)(!D),[w,M]=(0,Kr.useState)(!1),[S,R]=(0,Kr.useState)(r),L=ce=>{R(ce),i?.(ce)};return(0,zn.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[w&&(0,zn.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>M(!1)}),(0,zn.jsx)("div",{className:"md:hidden",children:(0,zn.jsx)(ys,{items:e,isOpen:w,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:S,onBusinessUnitChange:L,onSearch:n,logo:m,appName:C,tagline:I})}),(0,zn.jsx)("div",{className:"hidden md:block",children:(0,zn.jsx)(ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:S,onBusinessUnitChange:L,onSearch:n,logo:m,appName:C,tagline:I})}),(0,zn.jsxs)("div",{className:f("min-h-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:sl-64":"md:sl-0"),children:[(0,zn.jsx)(Dl,{title:a,notifications:o,onToggleSidebar:()=>G(!T),onToggleMobileMenu:()=>M(!0),sidebarOpen:T,activeTab:c,onTabChange:l,showTabs:d,onActionClick:p,actionIcon:u,actionText:g,onNotificationRemove:h,onRemoveAll:x,logo:m,appName:C,tagline:I}),(0,zn.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Ko=ne(require("react"));var Cs=Ko.forwardRef(({...e},t)=>(0,zn.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Cs.displayName="Breadcrumb";var Ss=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("sl",{ref:a,className:f("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Ss.displayName="BreadcrumbList";var fi=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("li",{ref:a,className:f("inline-flex items-center gap-1.5",e),...t}));fi.displayName="BreadcrumbItem";var Ds=Ko.forwardRef(({asChild:e,className:t,...a},o)=>(0,zn.jsx)(e?Vo.Slot:"a",{ref:o,className:f("transition-colors hover:text-foreground",t),...a}));Ds.displayName="BreadcrumbLink";var Ts=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:f("font-normal text-foreground",e),...t}));Ts.displayName="BreadcrumbPage";var ks=({children:e,className:t,...a})=>(0,zn.jsx)("li",{role:"presentation","aria-hidden":"true",className:f("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,zn.jsx)(Yn.ChevronRightIcon,{})});ks.displayName="BreadcrumbSeparator";var up=({className:e,...t})=>(0,zn.jsxs)("span",{role:"presentation","aria-hidden":"true",className:f("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,zn.jsx)(Yn.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"More"})]});up.displayName="BreadcrumbElipssis";var bi=ne(require("react")),gp=1,fp=1e6;var Ps=0;function vp(){return Ps=(Ps+1)%Number.MAX_SAFE_INTEGER,Ps.toString()}var Rs=new Map,Rl=e=>{if(Rs.has(e))return;let t=setTimeout(()=>{Rs.delete(e),yr({type:"REMOVE_TOAST",toastId:e})},fp);Rs.set(e,t)},hp=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gp)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?Rl(a):e.toasts.forEach(o=>{Rl(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},vi=[],hi={toasts:[]};function yr(e){hi=hp(hi,e),vi.forEach(t=>{t(hi)})}function bp({...e}){let t=vp(),a=r=>yr({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>yr({type:"DISMISS_TOAST",toastId:t});return yr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Al(){let[e,t]=bi.useState(hi);return bi.useEffect(()=>(vi.push(t),()=>{let a=vi.indexOf(t);a>-1&&vi.splice(a,1)}),[e]),{...e,toast:bp,dismiss:a=>yr({type:"DISMISS_TOAST",toastId:a})}}var No=ne(require("react")),Nt=ne(require("@radix-ui/react-toast"));var El=Nt.Provider,As=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Viewport,{ref:a,className:f("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));As.displayName=Nt.Viewport.displayName;var xp=(0,al.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Is=No.forwardRef(({className:e,variant:t,...a},o)=>(0,zn.jsx)(Nt.Root,{ref:o,className:f(xp({variant:t}),e),...a}));Is.displayName=Nt.Root.displayName;var yp=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Action,{ref:a,className:f("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));yp.displayName=Nt.Action.displayName;var Ms=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Close,{ref:a,className:f("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,zn.jsx)(sl.X,{className:"h-4 w-4"})}));Ms.displayName=Nt.Close.displayName;var Es=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Title,{ref:a,className:f("text-sm font-semibold [&+div]:text-xs",e),...t}));Es.displayName=Nt.Title.displayName;var Bs=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Description,{ref:a,className:f("text-sm opacity-90",e),...t}));Bs.displayName=Nt.Description.displayName;function Bl(){let{toasts:e}=Al();return(0,zn.jsxs)(El,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,zn.jsxs)(Is,{...i,children:[(0,zn.jsxs)("div",{className:"grid gap-1",children:[a&&(0,zn.jsx)(Es,{children:a}),o&&(0,zn.jsx)(Bs,{children:o})]}),r,(0,zn.jsx)(Ms,{})]},t)}),(0,zn.jsx)(As,{})]})}var Fl=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("zn-")?e+" ":"zn-"+e+" ",i="zn-"+t,n=o??"",s=r+i+" zn-"+a+" "+n;return(0,zn.jsx)("i",{className:s})};var Go=require("@headlessui/react"),Hl=require("@heroicons/react/20/solid");var wp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,zn.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,zn.jsxs)("span",{className:"relative",children:[e,(0,zn.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,zn.jsxs)(Go.Popover,{children:[(0,zn.jsxs)(Go.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,zn.jsxs)("span",{className:"relative",children:[e,(0,zn.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,zn.jsx)(Hl.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,zn.jsxs)(Go.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,zn.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8 z-50",children:t&&t.map(r=>(0,zn.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,zn.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,zn.jsx)(Ol,{icon:r.icon,size:"4x"})}),(0,zn.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,zn.jsx)("span",{className:"absolute inset-0"})]}),(0,zn.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,zn.jsx)("div",{className:"bg-gray-50",children:(0,zn.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,zn.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,zn.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,zn.jsx)(Ol,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Ol=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,zn.jsx)(Fl,{...e,size:a});if("src"in e)return(0,zn.jsx)("div",{className:f(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,zn.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},jl=wp;var Ul=ne(require("next/link"));function zl({children:e,href:t,openNewTab:a,...o}){return(0,zn.jsx)(Ul.default,{href:t,target:a?"_blank":"_self",...o,children:e})}var Fs=ne(require("next/image"));function Nr({logoLight:e,logoDark:t,mobile:a=!1}){return(0,zn.jsxs)(zl,{href:"/",className:f(a?"py-1":"py-2"),children:[(0,zn.jsx)(Fs.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,zn.jsx)(Fs.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Kl({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,Kr.useState)(!1),[c,l]=(0,Kr.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,bl.useTheme)();(0,Kr.useEffect)(()=>{l(p||"dark")},[p]);let g=()=>{let h=d[(d.indexOf(c)+1)%d.length];l(h),u(h)};return(0,Kr.useEffect)(()=>{let h=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",h,{passive:!0}),()=>window.removeEventListener("scroll",h)},[]),(0,zn.jsx)(zn.Fragment,{children:(0,zn.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,zn.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,zn.jsxs)("div",{className:f("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,zn.jsx)(Nr,{logoDark:a,logoLight:t}),(0,zn.jsx)($l.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(h=>(0,zn.jsx)(jl,{...h},h.name))}),r&&(0,zn.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:g,children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,zn.jsx)(sl.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var yi=require("@heroicons/react/24/outline");var Ls=["light","dark"];function Wl({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,Kr.useState)(!1),{theme:n,setTheme:s}=(0,bl.useTheme)(),[c,l]=(0,Kr.useState)(!1),[d,p]=(0,Kr.useState)("light");(0,Kr.useEffect)(()=>{let g=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,Kr.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let g=Ls[(Ls.indexOf(d)+1)%Ls.length];p(g),s(g)};return(0,zn.jsx)(zn.Fragment,{children:(0,zn.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,zn.jsx)("nav",{className:f("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,zn.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-zn dark:border-accent",children:[(0,zn.jsx)(Nr,{logoDark:t,logoLight:e,mobile:!0}),(0,zn.jsx)("div",{className:"flex items-center space-x-4",children:(0,zn.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,zn.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,zn.jsx)(yi.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,zn.jsxs)(Go.Dialog,{open:c,onClose:l,className:"lg:hidden",children:[(0,zn.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,zn.jsxs)(Go.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,zn.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,zn.jsx)(Nr,{logoDark:t,logoLight:e,mobile:!0}),(0,zn.jsxs)("button",{type:"button",onClick:()=>l(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,zn.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,zn.jsx)(yi.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,zn.jsx)("div",{className:"mt-6 flow-root",children:(0,zn.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,zn.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(g=>(0,zn.jsx)(Np,{...g},g.name))})})})]})]})]})})}function Np({name:e,items:t,actions:a,href:o}){return!t&&o?(0,zn.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,zn.jsxs)(Go.Disclosure,{zn:"div",className:"-mx-3",children:[(0,zn.jsx)(Go.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 sl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,zn.jsx)(Go.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,zn.jsx)(Go.DisclosureButton,{zn:"a",href:r.href,className:"block rounded-lg py-2 sl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}function Jl({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,zn.jsxs)("div",{className:f("fixed top-0 left-0 right-0 z-50",r),children:[(0,zn.jsx)(Kl,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,zn.jsx)(Wl,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Xl="../../cortex-reply-light-27IMI3G7.png";var ql="../../cortex-reply-dark-XPAJJJYY.png";function Os({...e}){return(0,zn.jsxs)("div",{className:"bg-sidebar",children:[(0,zn.jsx)(Jl,{isMenuOpen:!0,logoLight:Xl,logoDark:ql,...e.header,className:"bg-sidebar",wide:!0}),(0,zn.jsxs)(os,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,zn.jsx)(qr,{...e.sidebarLeft,className:"flex-none top-24"}),(0,zn.jsxs)(ss,{className:"grow overflow-hidden",children:[(0,zn.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,zn.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,zn.jsx)(is,{className:"-sl-1"}),(0,zn.jsx)(cr,{orientation:"vertical",className:"mr-2 h-4"}),(0,zn.jsx)(Cs,{children:(0,zn.jsxs)(Ss,{children:[(0,zn.jsx)(fi,{className:"hidden md:block",children:(0,zn.jsx)(Ds,{href:"#",children:"Building Your Application"})}),(0,zn.jsx)(ks,{className:"hidden md:block"}),(0,zn.jsx)(fi,{children:(0,zn.jsx)(Ts,{children:"Data Fetching"})})]})})]})}),(0,zn.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,zn.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),(0,zn.jsx)("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),(0,zn.jsx)(Bl,{})]})}var Dp=[{key:"kanban",icon:sl.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:sl.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:sl.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:sl.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:sl.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],wi=({currentView:e,onViewChange:t,children:a})=>(0,zn.jsxs)("div",{className:"flex w-full h-screen",children:[(0,zn.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Dp.map(o=>{let r=o.icon,i=e===o.key;return(0,zn.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:sl-3`,title:o.title,children:[(0,zn.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,zn.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,zn.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,zn.jsx)("div",{className:"w-full h-full",children:a})})]});var Yl=ne(require("react")),Hs=ne(require("@radix-ui/react-label"));var Tp=(0,al.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),F=Yl.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Hs.Root,{ref:a,className:f(Tp(),e),...t}));F.displayName=Hs.Root.displayName;var Ie=ne(require("@radix-ui/react-select")),co=ne(require("react")),vt=Ie.Root;var Vt=Ie.Value,pt=co.forwardRef(({children:e,className:t,...a},o)=>(0,zn.jsxs)(Ie.Trigger,{className:f("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:o,...a,children:[e,(0,zn.jsx)(Ie.Icon,{asChild:!0,children:(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pt.displayName=Ie.Trigger.displayName;var ed=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.ScrollUpButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,zn.jsx)(sl.ChevronUp,{className:"h-4 w-4"})}));ed.displayName=Ie.ScrollUpButton.displayName;var td=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.ScrollDownButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4"})}));td.displayName=Ie.ScrollDownButton.displayName;var ut=co.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,zn.jsx)(Ie.Portal,{children:(0,zn.jsxs)(Ie.Content,{className:f("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",a==="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:a,ref:r,...o,children:[(0,zn.jsx)(ed,{}),(0,zn.jsx)(Ie.Viewport,{className:f("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,zn.jsx)(td,{})]})}));ut.displayName=Ie.Content.displayName;var kp=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.Label,{className:f("py-1.5 sl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));kp.displayName=Ie.Label.displayName;var Pe=co.forwardRef(({children:e,className:t,...a},o)=>(0,zn.jsxs)(Ie.Item,{className:f("relative flex w-full cursor-default select-none items-center rounded py-1.5 sl-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:o,...a,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ie.ItemIndicator,{children:(0,zn.jsx)(sl.Check,{className:"h-4 w-4"})})}),(0,zn.jsx)(Ie.ItemText,{children:e})]}));Pe.displayName=Ie.Item.displayName;var Pp=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.Separator,{className:f("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Pp.displayName=Ie.Separator.displayName;var ad=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,c]=(0,Kr.useState)(!1),[l,d]=(0,Kr.useState)(""),p=o.find(m=>m.value===t),u=o.filter(m=>m.label.toLowerCase().includes(l.toLowerCase())),g=m=>{a(m),c(!1),d("")},h=()=>{i&&l.trim()&&!o.find(m=>m.value===l.trim())&&(a(l.trim()),c(!1),d(""))};return(0,zn.jsxs)("div",{className:"space-y-1",children:[(0,zn.jsx)(F,{className:"text-xs text-muted-foreground",children:e}),(0,zn.jsxs)(vt,{value:t,onValueChange:g,open:s,onOpenChange:m=>{n||c(m)},disabled:n,children:[(0,zn.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,zn.jsx)(se,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&c(!s),children:p?.label||t||"Select..."})}),(0,zn.jsxs)(ut,{children:[(0,zn.jsx)("div",{className:"p-2",children:(0,zn.jsx)(W,{placeholder:r,value:l,onChange:m=>d(m.target.value),onKeyDown:m=>{m.key==="Enter"&&i&&h()},className:"mb-2"})}),u.map(m=>(0,zn.jsx)(Pe,{value:m.value,children:m.label},m.value)),i&&l.trim()&&!u.find(m=>m.value===l.trim())&&(0,zn.jsxs)(Pe,{value:l.trim(),children:['Add "',l.trim(),'"']})]})]})]})};var Do=ne(require("react"));var _=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_.displayName="Card";var We=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("flex flex-col space-y-1.5 p-6",e),...t}));We.displayName="CardHeader";var at=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("font-semibold leading-none tracking-tight",e),...t}));at.displayName="CardTitle";var To=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("text-sm text-muted-foreground",e),...t}));To.displayName="CardDescription";var xe=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("p-6 pt-0",e),...t}));xe.displayName="CardContent";var ko=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("flex items-center p-6 pt-0",e),...t}));ko.displayName="CardFooter";function rd({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,c]=(0,Kr.useState)(!1),l=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=u=>{if(!u)return"Never";let h=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return h<1?"Just now":h<60?`${h}m ago`:h<1440?`${Math.floor(h/60)}h ago`:`${Math.floor(h/1440)}d ago`};return(0,$.jsxs)(_,{className:f("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,$.jsx)(We,{className:f("pb-3",i&&"pb-2"),children:(0,$.jsxs)("div",{className:"flex items-start justify-between",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$.jsx)("div",{className:"relative",children:(0,$.jsxs)(ea,{className:f("h-12 w-12",i&&"h-8 w-8"),children:[(0,$.jsx)(yo,{src:"/placeholder.svg",alt:e.name}),(0,$.jsx)(ta,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,$.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$.jsx)("h3",{className:f("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,$.jsx)(sl.Bot,{className:f("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,$.jsx)(sl.User,{className:f("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,$.jsx)("p",{className:f("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,$.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,$.jsx)(se,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,$.jsxs)(se,{variant:"secondary",className:"text-xs",children:["zn",e.version]}),(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:d(e.status)})]})]})]}),r&&(0,$.jsxs)(Ma,{children:[(0,$.jsx)(Ea,{asChild:!0,children:(0,$.jsx)(y,{variant:"ghost",size:"icon",className:f("h-8 w-8",i&&"h-6 w-6"),children:(0,$.jsx)(sl.MoreHorizontal,{className:f("h-4 w-4",i&&"h-3 w-3")})})}),(0,$.jsxs)(Na,{align:"end",children:[e.type==="digital"&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(qt,{onClick:()=>o?.(e),children:[(0,$.jsx)(sl.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,$.jsxs)(qt,{onClick:()=>t?.(e),children:[(0,$.jsx)(sl.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),(0,$.jsxs)(qt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,$.jsx)(sl.Trash2,{className:"h-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,$.jsxs)(xe,{className:"pt-0",children:[(0,$.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Mail,{className:"h-3 w-3"}),(0,$.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,$.jsxs)($.Fragment,{children:[e.phone&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Phone,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.phone})]}),e.location&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.MapPin,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Settings,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["zn",e.version]})]}),(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Clock,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["Last active: ",p(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,$.jsx)("div",{className:"mt-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,s?e.skills.length:3).map(u=>(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:u},u)),e.skills.length>3&&(0,$.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>c(!s),children:s?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,$.jsx)("div",{className:"mt-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,s?e.capabilities.length:2).map(u=>(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:u},u)),e.capabilities.length>2&&(0,$.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>c(!s),children:s?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var id=ne(require("react")),He=id.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("textarea",{className:f("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:a,...t}));He.displayName="Textarea";function Sr({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,c]=(0,Kr.useState)(""),[l,d]=(0,Kr.useState)([]),[p,u]=(0,Kr.useState)(!1);(0,Kr.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let m=a.filter(C=>{if(e.map(T=>T.id).includes(C.id))return!1;let D=s.toLowerCase();return C.title.toLowerCase().includes(D)||C.description?.toLowerCase().includes(D)||C.tags?.some(T=>T.toLowerCase().includes(D))||Object.values(C.metadata||{}).some(T=>String(T).toLowerCase().includes(D))});d(m),u(!0)},[s,e,a]);let g=m=>{i&&e.length>=i||(t([...e,m]),c(""),u(!1))},h=m=>{t(e.filter(C=>C.id!==m))},x=!i||e.length<i;return(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{children:o}),(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{value:s,onChange:m=>c(m.target.value),placeholder:x?r:`Maximum ${i} documents selected`,className:"sl-9",disabled:n||!x,onFocus:()=>s&&u(!0)})]}),p&&l.length>0&&(0,zn.jsx)(_,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60",children:(0,zn.jsx)(Ba,{className:"h-full",children:(0,zn.jsx)(xe,{className:"p-2",children:l.map(m=>(0,zn.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>g(m),disabled:n,children:(0,zn.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,zn.jsx)(sl.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,zn.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,zn.jsx)("div",{className:"font-medium text-sm truncate",children:m.title}),m.description&&(0,zn.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description}),m.tags&&m.tags.length>0&&(0,zn.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[m.tags.slice(0,3).map(C=>(0,zn.jsx)(se,{variant:"outline",className:"text-xs",children:C},C)),m.tags.length>3&&(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:["+",m.tags.length-3," more"]})]})]})]})},m.id))})})}),p&&s&&l.length===0&&(0,zn.jsx)(_,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:(0,zn.jsxs)(xe,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,zn.jsx)("div",{className:"space-y-2",children:e.map(m=>(0,zn.jsx)(_,{className:"p-3",children:(0,zn.jsxs)("div",{className:"flex items-start gap-3",children:[(0,zn.jsx)(sl.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,zn.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,zn.jsx)("div",{className:"font-medium text-sm",children:m.title}),m.description&&(0,zn.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:m.description}),m.tags&&m.tags.length>0&&(0,zn.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:m.tags.map(C=>(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:[(0,zn.jsx)(sl.Tag,{className:"h-3 w-3 mr-1"}),C]},C))})]}),(0,zn.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>h(m.id),disabled:n,children:(0,zn.jsx)(sl.X,{className:"h-3 w-3"})})]})},m.id))})]}),p&&(0,zn.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function nd({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:c=[]}){let[l,d]=(0,Kr.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[p,u]=(0,Kr.useState)(""),[g,h]=(0,Kr.useState)(""),[x,m]=(0,Kr.useState)(!s);(0,Kr.useEffect)(()=>{e&&d(e)},[e]);let C=S=>{S.preventDefault();let R=l.version?parseInt(l.version):0,L=e?(R+1).toString():"1",ce={id:l.id||Date.now().toString(),name:l.name,type:"digital",status:"active",joinedDate:l.joinedDate||new Date,lastActive:l.lastActive||new Date,description:l.description,jobDescription:l.jobDescription||"",workInstructions:l.workInstructions||"",capabilities:l.capabilities||[],knowledge:l.knowledge||[],coreKnowledge:l.coreKnowledge||[],version:L,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(ce)},I=(S,R,L)=>{if(!R.trim())return;let ce=l[S]||[];d({...l,[S]:[...ce,R.trim()]}),L("")},D=(S,R)=>{let L=l[S]||[];d({...l,[S]:L.filter((ce,P)=>P!==R)})},T=S=>{S.preventDefault(),m(!x)},G=(S,R,L,ce,P)=>{let Ue=l[S]||[];return(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{children:R}),x&&(0,zn.jsxs)("div",{className:"flex gap-2",children:[(0,zn.jsx)(W,{value:L,onChange:Me=>ce(Me.target.value),placeholder:P,onKeyPress:Me=>{Me.key==="Enter"&&(Me.preventDefault(),I(S,L,ce))},disabled:o}),(0,zn.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>I(S,L,ce),disabled:o,children:(0,zn.jsx)(sl.Plus,{className:"h-4 w-4"})})]}),(0,zn.jsx)("div",{className:"flex flex-wrap gap-2",children:Ue.map((Me,N)=>(0,zn.jsxs)(se,{className:"gap-1",children:[Me,x&&(0,zn.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>D(S,N),disabled:o,children:(0,zn.jsx)(sl.X,{className:"h-3 w-3"})})]},`${S}-${N}-${Me}`))})]})},w=r||(x?e?"Edit Colleague":"Add New Colleague":"View Colleague"),M=i||(e?"Update Colleague":"Add Colleague");return(0,zn.jsxs)(_,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,zn.jsx)(We,{children:(0,zn.jsxs)(at,{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Bot,{className:"h-5 w-5"}),w]})}),(0,zn.jsx)(xe,{children:(0,zn.jsxs)("form",{onSubmit:C,className:"space-y-6",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"name",children:"Name *"}),(0,zn.jsx)(W,{id:"name",value:l.name||"",onChange:S=>d({...l,name:S.target.value}),required:!0,disabled:o||!x})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"description",children:"Description"}),(0,zn.jsx)(He,{id:"description",value:l.description||"",onChange:S=>d({...l,description:S.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!x})]})]}),(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"jobDescription",children:"Job Description *"}),(0,zn.jsx)(He,{id:"jobDescription",value:l.jobDescription||"",onChange:S=>d({...l,jobDescription:S.target.value}),rows:4,required:l.type==="digital",disabled:o||!x})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,zn.jsx)(He,{id:"workInstructions",value:l.workInstructions||"",onChange:S=>d({...l,workInstructions:S.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!x})]}),G("capabilities","Capabilities",g,h,"Add capability"),(0,zn.jsx)(Sr,{selectedDocuments:l.knowledge||[],onDocumentsChange:S=>d({...l,knowledge:S}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!x,availableDocuments:c}),(0,zn.jsx)(Sr,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:S=>d({...l,coreKnowledge:S}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!x,availableDocuments:c})]}),(0,zn.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,zn.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:x?n:"Close"}),x?(0,zn.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":M}):(0,zn.jsxs)(y,{type:"button",onClick:T,disabled:o,className:"gap-2",children:[(0,zn.jsx)(sl.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Ni({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,zn.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.User,{className:"h-8 w-8 text-blue-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Add Human Colleague"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add zn team members."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Users,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Browse existing users"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.User,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Import user details automatically"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-purple-600"}),(0,zn.jsx)("span",{children:"Clone existing colleagues"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Users,{className:"h-4 w-4 text-purple-600"}),(0,zn.jsx)("span",{children:"Create from templates"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function ld({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Kr.useState)(""),[n,s]=(0,Kr.useState)("all"),c=(0,Kr.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())),[e,r,n]),l=p=>{let u={...p,id:Date.now(),name:`${p.name} (Copy)`};t(u)},d=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,zn.jsx)(_,{children:(0,zn.jsx)(xe,{className:"pt-6",children:(0,zn.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,zn.jsx)("div",{className:"flex-1",children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:p=>i(p.target.value),className:"sl-9"})]})}),(0,zn.jsxs)("select",{value:n,onChange:p=>s(p.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,zn.jsx)("option",{value:"all",children:"All Status"}),(0,zn.jsx)("option",{value:"active",children:"Active"}),(0,zn.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,zn.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(p=>(0,zn.jsx)(so.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,zn.jsxs)(_,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===p.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>l(p),children:[(0,zn.jsx)(We,{className:"pb-3",children:(0,zn.jsxs)("div",{className:"flex items-start justify-between",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[(0,zn.jsx)(ea,{children:(0,zn.jsx)(ta,{className:"bg-blue-100",children:(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,zn.jsx)("div",{children:(0,zn.jsx)(at,{className:"text-lg flex items-center gap-2",children:p.name})})]}),(0,zn.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),l(p)},children:[(0,zn.jsx)(sl.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,zn.jsx)(xe,{className:"pt-0",children:(0,zn.jsxs)("div",{className:"space-y-3",children:[(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,zn.jsx)("p",{className:"text-sm line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,zn.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:["+",p.capabilities.length-3]})})]}),(0,zn.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,zn.jsx)("div",{className:"flex items-center gap-1",children:(0,zn.jsx)(sl.Calendar,{className:"h-3 w-3"})}),p.knowledge&&(0,zn.jsx)("div",{className:"flex items-center gap-1",children:(0,zn.jsx)(sl.Users,{className:"h-3 w-3"})})]}),p.workInstructions&&(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,zn.jsx)("p",{className:"text-xs line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),c.length===0&&(0,zn.jsx)(_,{children:(0,zn.jsx)(xe,{className:"pt-6",children:(0,zn.jsxs)("div",{className:"text-center py-8",children:[(0,zn.jsx)(sl.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,zn.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Ci({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,zn.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Clone Existing"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize we for your needs."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Copy,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Create New"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Plus,{className:"h-4 w-4 text-green-600"}),(0,zn.jsx)("span",{children:"Custom job description"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,zn.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var dd=ne(require("react")),kr=ne(require("@radix-ui/react-switch"));var Yo=dd.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(kr.Root,{className:f("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,zn.jsx)(kr.Thumb,{className:f("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Yo.displayName=kr.Root.displayName;function Di({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[c,l]=(0,Kr.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,p]=(0,Kr.useState)(!s);(0,Kr.useEffect)(()=>{e&&l(e)},[e]);let u=m=>{m.preventDefault();let C={id:c.id||Date.now(),name:c.name,description:c.description||null,systemMsg:c.systemMsg||null,useProjects:c.useProjects||!1,useKnowledge:c.useKnowledge||!1,useFiles:c.useFiles||!1,useChat:c.useChat||!1,updatedAt:new Date().toISOString(),createdAt:c.createdAt||new Date().toISOString()};t(C)},g=m=>{m.preventDefault(),p(!d)},h=r||(d?e?"Edit Team":"Create New Team":"View Team"),x=i||(e?"Update Team":"Create Team");return(0,zn.jsxs)(_,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,zn.jsx)(We,{children:(0,zn.jsxs)(at,{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Users,{className:"h-5 w-5"}),h]})}),(0,zn.jsx)(xe,{children:(0,zn.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"name",children:"Team Name *"}),(0,zn.jsx)(W,{id:"name",value:c.name||"",onChange:m=>l({...c,name:m.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"description",children:"Description"}),(0,zn.jsx)(He,{id:"description",value:c.description||"",onChange:m=>l({...c,description:m.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"systemMsg",children:"Ways of working"}),(0,zn.jsx)(He,{id:"systemMsg",value:c.systemMsg||"",onChange:m=>l({...c,systemMsg:m.target.value}),rows:3,placeholder:"Describe how this team works in zn much detail zn possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,zn.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useProjects",checked:c.useProjects||!1,onCheckedChange:m=>l({...c,useProjects:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useKnowledge",checked:c.useKnowledge||!1,onCheckedChange:m=>l({...c,useKnowledge:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useFiles",checked:c.useFiles||!1,onCheckedChange:m=>l({...c,useFiles:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useChat",checked:c.useChat||!1,onCheckedChange:m=>l({...c,useChat:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,zn.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,zn.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,zn.jsx)(y,{type:"submit",disabled:o||!c.name?.trim(),children:o?"Saving...":x}):(0,zn.jsxs)(y,{type:"button",onClick:g,disabled:o,className:"gap-2",children:[(0,zn.jsx)(sl.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}var Ti=require("react-icons/zn");function qe({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[c,l]=ni(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||c;return(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,zn.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,zn.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,zn.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,zn.jsx)("button",{"aria-label":c?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!c),style:{lineHeight:0},children:c?(0,zn.jsx)(Ti.FaChevronDown,{size:22}):(0,zn.jsx)(Ti.FaChevronUp,{size:22})})]})]}),!d&&(0,zn.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,zn.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,zn.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,zn.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,zn.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var md=ne(require("react")),Rr=ne(require("@radix-ui/react-progress"));var Ar=md.forwardRef(({className:e,value:t,...a},o)=>(0,zn.jsx)(Rr.Root,{ref:o,className:f("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,zn.jsx)(Rr.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ar.displayName=Rr.Root.displayName;function Vs({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,zn.jsxs)(_,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,zn.jsx)(We,{className:"pb-2",children:(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,zn.jsx)(se,{className:"rounded-xl bg-amber-500",children:"New"}):(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,zn.jsx)(sl.Star,{className:"h-4 w-4"})})]})}),(0,zn.jsxs)(xe,{className:"pb-2",children:[(0,zn.jsx)(at,{className:"text-lg",children:e.name}),(0,zn.jsx)(To,{children:e.description}),o&&e.progress<100&&(0,zn.jsxs)("div",{className:"mt-2",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,zn.jsx)("span",{children:"Installation"}),(0,zn.jsxs)("span",{children:[e.progress,"%"]})]}),(0,zn.jsx)(Ar,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,zn.jsx)(ko,{children:(0,zn.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var nc=ne(require("@radix-ui/react-dialog"));var po=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,c]=(0,Kr.useState)(!1),[l,d]=(0,Kr.useState)(""),p=()=>{n||(c(!0),d(t))},u=async()=>{l!==t&&await r(e,l),c(!1)},g=h=>{h.key==="Enter"&&!o||h.key==="Enter"&&h.ctrlKey&&o?u():h.key==="Escape"&&(c(!1),d(""))};return(0,zn.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,zn.jsx)(F,{children:a}),s?o?(0,zn.jsx)(He,{value:l,onChange:h=>d(h.target.value),onBlur:u,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,zn.jsx)(W,{value:l,onChange:h=>d(h.target.value),onBlur:u,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,zn.jsxs)("div",{onClick:p,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 ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,zn.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,zn.jsx)(sl.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Ud=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),zd=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Vd=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),_d=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),$d=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Kd=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Gd=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ri=require("@payloadcms/richtext-lexical/lexical/list"),Wd=require("@payloadcms/richtext-lexical/lexical/rich-text"),Jd=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Hd=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Br=require("@payloadcms/richtext-lexical/lexical/utils"),we=require("@payloadcms/richtext-lexical/lexical"),Qs=require("@payloadcms/richtext-lexical/lexical/selection");var Sd=require("@radix-ui/react-dialog"),ki=require("@payloadcms/richtext-lexical/client");var $s=ne(require("bson-objectid"));var fd=require("@payloadcms/ui");var Rp=e=>{let{data:{relationTo:t,value:a},nodeKey:o}=e,[r]=(0,Hd.useLexicalComposerContext)(),[i,n]=(0,Kr.useState)(""),[s,c]=(0,Kr.useState)(""),[l,d]=(0,Kr.useState)(""),p=async m=>{console.log("fetchMedia",m)};(0,Kr.useEffect)(()=>{typeof a=="string"?a.length===24?p(a):(n(a||""),d(x(h())),c(g()||"")):typeof a=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${a.url}`||""),d(x(a.filesize)),c(a.mimeType?.split("/")[1]||""))},[]);let u=(0,Kr.useCallback)(()=>{r.update(()=>{(0,we.$getNodeByKey)(o)?.remove()})},[r,o]),g=()=>{let m=e.data.value;return typeof m=="string"?m.split(";base64")[0]?.split("image/")[1]:""},h=()=>{let m=e.data.value;if(typeof m=="string"){let C=m.split(",")[1]?.length||0;return 4*Math.ceil(C/3)*.5624896334383812/1e3}return 0};function x(m){if(m>=1e6){let I=m/1e6;return`${I>=10?Math.round(I).toString():I.toFixed(1)} MB`}return`${Math.floor(m/1e3)} KB`}return(0,zn.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,zn.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,zn.jsxs)("div",{className:"flex gap-2 border-zn border-zn-slate-100/10",children:[(0,zn.jsx)("div",{className:"flex-1",children:e.data.value?(0,zn.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":a,"data-lexical-upload-relation-to":t,src:i}):(0,zn.jsx)(fd.File,{})}),(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsxs)(Ia,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,zn.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,zn.jsx)("button",{onClick:m=>{m.preventDefault(),u()},className:"flex-1 flex justify-center items-center",children:(0,zn.jsx)(sl.X,{width:24,height:24,strokeWidth:1})})]}),(0,zn.jsx)(wa,{children:(0,zn.jsx)("span",{children:"Remove image"})})]})})]}),(0,zn.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,zn.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,zn.jsx)("span",{children:l})]})]})})},xd=Rp;function Ap(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let a=e.getAttribute("data-lexical-upload-id");if(a)return{node:Zo({fields:{},relationTo:"media",value:a})}}return e.src.startsWith("file:///"),null}var Ir=class extends ki.UploadNode{static importDOM(){return{img:()=>({conversion:Ap,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new $s.default().toHexString(),t.version=3);let a={id:t.id??new $s.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},o=Zo(a);return o.setFormat?.(t.format),o}decorate(){return(0,zn.jsx)(xd,{data:this.__data,nodeKey:this.getKey()})}};function Zo(e){return new Ir({data:e})}var Ip=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mp=e=>Ip?(e||window).getSelection():null,ib=(0,we.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),Ks=(0,we.createCommand)("INSERT_UPLOAD_COMMAND");function Dd({activeEditor:e,onClose:t,isOpen:a=!1}){let o=(0,Kr.useRef)(!1),[r,i]=(0,Kr.useState)(!0),[n,s]=(0,Kr.useState)(""),[c,l]=(0,Kr.useState)(""),[d,p]=(0,Kr.useState)(!1),[u,g]=(0,Kr.useState)("left"),h=n==="",x=T=>{p(T.target.checked)},m=T=>{g(T.target.value)},C=T=>{let G=new FileReader;G.onload=function(){return typeof G.result=="string"&&s(G.result),""},T!==null&&T[0]&&G.readAsDataURL(T[0])};(0,Kr.useEffect)(()=>{o.current=!1;let T=G=>{o.current=G.altKey};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[e]),(0,Kr.useEffect)(()=>{r||t()},[r]),(0,Kr.useEffect)(()=>{i(a)},[a]);let I=({editor:T,relationTo:G,replaceNodeKey:w,value:M})=>{if(w)T.update(()=>{let S=(0,we.$getNodeByKey)(w);S&&S.replace(Zo({id:"",fields:{},relationTo:"media",value:M}))});else{let S=T.dispatchCommand(Ks,{fields:null,relationTo:"media",value:M})}},D=()=>{I({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:c,src:n,showCaption:d,position:u}.src}),i(!1),t()};return(0,zn.jsx)(mt,{open:r,onOpenChange:T=>i(T),children:(0,zn.jsxs)(gt,{children:[(0,zn.jsxs)(ft,{children:[(0,zn.jsx)(rt,{children:"Upload Image"}),(0,zn.jsx)(Sd.DialogDescription,{children:"Description"})]}),(0,zn.jsxs)("div",{className:"",children:[(0,zn.jsx)("div",{style:{marginBottom:"1em"},children:(0,zn.jsx)(W,{type:"file",onChange:T=>C(T.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,zn.jsx)("div",{style:{marginBottom:"1em"},children:(0,zn.jsx)(W,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:T=>l(T.currentTarget.value),value:c,"data-test-id":"image-modal-alt-text-input"})}),(0,zn.jsx)(y,{"data-test-id":"image-modal-file-upload-btn",disabled:h,onClick:()=>D(),children:"Confirm"})]})]})})}function Gs({captionsEnabled:e}){let[t]=(0,Hd.useLexicalComposerContext)();return(0,Kr.useEffect)(()=>{if(!t.hasNodes([ki.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered zn editor");return(0,Br.mergeRegister)(t.registerCommand(we.DRAGSTART_COMMAND,a=>Ep(a),we.COMMAND_PRIORITY_HIGH),t.registerCommand(we.DRAGOVER_COMMAND,a=>Bp(a),we.COMMAND_PRIORITY_LOW),t.registerCommand(we.DROP_COMMAND,a=>Fp(a,t),we.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Ep(e){if(!Ws())return!1;let a=e.dataTransfer;return a?(a.setData("text/plain","_"),!0):!1}function Bp(e){return Ws()?(Td(e)||e.preventDefault(),!0):!1}function Fp(e,t){let a=Ws();if(!a)return!1;if(e.preventDefault(),Td(e)){let o=Lp(e);a.remove();let r=(0,we.$createRangeSelection)();o!=null&&r.applyDOMRange(o),(0,we.$setSelection)(r)}return!0}function Ws(){let e=(0,we.$getSelection)();if(!(0,we.$isNodeSelection)(e))return null;let a=e.getNodes()[0];return(0,ki.$isUploadNode)(a)?a:null}function Td(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 Lp(e){let t,a=e.target,o=a==null?null:a.nodeType===9?a.defaultView:a.ownerDocument.defaultView,r=Mp(o);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&r!==null)r.collapse(e.rangeParent,e.rangeOffset||0),t=r.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Op=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),kd=Op;var Hp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Pd=Hp;var jp=()=>(0,zn.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,zn.jsx)("path",{d:"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,zn.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Rd=jp;var Up=()=>(0,zn.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,zn.jsx)("path",{d:"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,zn.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Ad=Up;var zp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Id=zp;var Vp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Md=Vp;var Ed=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Bd=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Fd=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Ld=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Od=()=>(0,zn.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,zn.jsx)("path",{d:"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 Zs=1;function _p(){return(0,zn.jsx)("span",{className:"border border-[#222222]"})}function en(){let[e]=(0,Hd.useLexicalComposerContext)(),t=(0,Kr.useRef)(null),[a,o]=(0,Kr.useState)(!1),[r,i]=(0,Kr.useState)(!1),[n,s]=(0,Kr.useState)(!1),[c,l]=(0,Kr.useState)(!1),[d,p]=(0,Kr.useState)(!1),[u,g]=(0,Kr.useState)(!1),[h,x]=(0,Kr.useState)(!1),[m,C]=(0,Kr.useState)(!1),[I,D]=(0,Kr.useState)(!1),[T,G]=(0,Kr.useState)("left"),[w,M]=(0,Kr.useState)("p"),S=N=>{e.update(()=>{let X=(0,we.$getSelection)();(0,we.$isRangeSelection)(X)&&(N==="p"?(0,Qs.$setBlocksType)(X,()=>(0,we.$createParagraphNode)()):(0,Qs.$setBlocksType)(X,()=>(0,Wd.$createHeadingNode)(N)))})},R=(0,Kr.useCallback)(()=>{let N=(0,we.$getSelection)();if((0,we.$isRangeSelection)(N)){s(N.hasFormat("bold")),l(N.hasFormat("italic")),p(N.hasFormat("underline")),g(N.hasFormat("strikethrough")),x(N.hasFormat("subscript")),C(N.hasFormat("superscript"));let X=N.anchor.getNode(),Q=X;for(;Q&&!(0,we.$isParagraphNode)(Q)&&Q!==(0,we.$getRoot)();){let Ne=Q.getParent();Ne&&(Q=Ne)}if(Q){let Ne=Q.getFormatType();G(Ne||"left")}let Ge=X.getTopLevelElement()?.__tag;M(Ge||"p")}},[]);(0,Kr.useEffect)(()=>(0,Br.mergeRegister)(e.registerUpdateListener(({editorState:N})=>{N.read(()=>{R()})}),e.registerCommand(we.SELECTION_CHANGE_COMMAND,(N,X)=>(R(),!1),Zs),e.registerCommand(we.CAN_UNDO_COMMAND,N=>(o(N),!1),Zs),e.registerCommand(we.CAN_REDO_COMMAND,N=>(i(N),!1),Zs),(0,Br.mergeRegister)(e.registerCommand(Ks,N=>(e.update(()=>{let X=(0,we.$getSelection)()||(0,we.$getPreviousSelection)();if((0,we.$isRangeSelection)(X)){let Q=Zo({id:N.id,fields:N.fields,relationTo:N.relationTo,value:N.value}),{focus:Ge}=X,Ne=Ge.getNode();(0,Br.$insertNodeToNearestRoot)(Q),(0,we.$isParagraphNode)(Ne)&&!Ne.__first&&Ne.remove()}}),!0),we.COMMAND_PRIORITY_EDITOR))),[e,R]);let L=[[{label:"Undo",icon:(0,zn.jsx)(sl.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,zn.jsx)(sl.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,zn.jsx)(kd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,zn.jsx)(Pd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:c},{label:"Underline",icon:(0,zn.jsx)(Rd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,zn.jsx)(Ad,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,zn.jsx)(Id,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:h},{label:"Superscript",icon:(0,zn.jsx)(Md,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:m}]],ce=[{label:"Left Align",direction:"left",icon:(0,zn.jsx)(sl.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,zn.jsx)(sl.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,zn.jsx)(sl.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,zn.jsx)(sl.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"justify")}}],Ue=[{label:"Normal Text",value:"p",icon:(0,zn.jsx)(Ed,{}),onClick:()=>S("p")},{label:"Heading 1",value:"h1",icon:(0,zn.jsx)(Bd,{}),onClick:()=>S("h1")},{label:"Heading 2",value:"h2",icon:(0,zn.jsx)(Fd,{}),onClick:()=>S("h2")},{label:"Heading 3",value:"h3",icon:(0,zn.jsx)(Ld,{}),onClick:()=>S("h3")},{label:"Heading 4",value:"h4",icon:(0,zn.jsx)(Od,{}),onClick:()=>S("h4")},...[{label:"Unordered List",value:"ul",icon:(0,zn.jsx)(sl.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ri.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"sl",icon:(0,zn.jsx)(sl.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ri.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],Me=[{label:"Insert Image",icon:(0,zn.jsx)(sl.ImageUp,{width:15,height:15}),onClick:()=>{D(!0)},disabled:!1}];return(0,zn.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,zn.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[L.map((N,X)=>(0,zn.jsxs)(Kr.Fragment,{children:[(0,zn.jsx)("div",{className:"flex items-center gap-2",children:N.map((Q,Ge)=>(0,zn.jsx)("div",{role:"button","aria-disabled":Q.disabled||!1,onClick:Q.onClick,className:f("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]",Q.active&&"bg-[#3c3c3c]"),"aria-label":Q.label,children:(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{className:"text-[#b5b5b5]",children:Q.icon}),(0,zn.jsx)(wa,{children:(0,zn.jsx)("p",{children:Q.label})})]})})},Ge))}),(0,zn.jsx)(_p,{})]},`toolbar-option-${N.length}-${X}`)),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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:[ce.find(N=>N.direction===T)?.icon,ce.find(N=>N.direction===T)?.label,(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:ce.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},`${N.label}-${X}`))})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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:[Ue.find(N=>N.value===w)?.icon,Ue.find(N=>N.value===w)?.label,(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:Ue.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},`heading-option-${N.label}-${X}`))})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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,zn.jsx)(sl.Plus,{width:15,height:15}),(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:Me.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.onClick,disabled:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},X))})]}),I&&(0,zn.jsx)(Dd,{activeEditor:e,onClose:()=>{D(!1)},isOpen:I})]})})}var $p=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,Hd.useLexicalComposerContext)(),i=(0,Kr.useRef)(null),n=s=>{s.read(()=>{let c=s.toJSON();JSON.stringify(c)!==JSON.stringify(i.current)&&(i.current=c,e?.(()=>c))})};return(0,Kr.useEffect)(()=>{r.setEditable(o)},[o,r]),(0,Kr.useEffect)(()=>{t&&JSON.stringify(t)!==JSON.stringify(i.current)&&r.update(()=>{try{let s=r.parseEditorState(t);r.setEditorState(s),i.current=t}catch(s){console.error("Error parsing editor state:",s)}},{discrete:!0})},[t,r]),(0,zn.jsx)("div",{className:"w-full",children:(0,zn.jsxs)("div",{className:" ",children:[o&&(0,zn.jsx)(en,{}),(0,zn.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,zn.jsx)(Kd.RichTextPlugin,{contentEditable:(0,zn.jsx)(Vd.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:_d.LexicalErrorBoundary}),o&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)($d.HistoryPlugin,{}),(0,zn.jsx)(Ud.AutoFocusPlugin,{}),(0,zn.jsx)(Gd.ListPlugin,{}),(0,zn.jsx)(Jd.OnChangePlugin,{onChange:n}),(0,zn.jsx)(Gs,{})]})]})]})})},Kp=({setValue:e,value:t,name:a,editable:o=!0})=>(0,zn.jsx)(zd.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ri.ListNode,Ri.ListItemNode,Wd.HeadingNode,Ir],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"},sl:"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,zn.jsx)($p,{value:t,setValue:e,name:a,editable:o})}),qd=Kp;var Yd=ne(require("react")),tn=ne(require("@radix-ui/react-toggle"));var an=(0,al.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=zn]:bg-accent data-[state=zn]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Gp=Yd.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,zn.jsx)(tn.Root,{ref:r,className:f(an({variant:t,size:a,className:e})),...o}));Gp.displayName=tn.Root.displayName;var Ao=ne(require("react")),Qo=ne(require("@radix-ui/react-toggle-group"));var ec=Ao.createContext({size:"default",variant:"default"}),Io=Ao.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,zn.jsx)(Qo.Root,{ref:i,className:f("flex items-center justify-center gap-1",e),...r,children:(0,zn.jsx)(ec.Provider,{value:{variant:t,size:a},children:o})}));Io.displayName=Qo.Root.displayName;var Mo=Ao.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=Ao.useContext(ec);return(0,zn.jsx)(Qo.Item,{ref:i,className:f(an({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Mo.displayName=Qo.Item.displayName;var tc=ne(require("react")),Oa=ne(require("@radix-ui/react-popover"));var rn=Oa.Root,sn=Oa.Trigger;var Ii=tc.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,zn.jsx)(Oa.Portal,{children:(0,zn.jsx)(Oa.Content,{ref:r,align:t,sideOffset:a,className:f("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));Ii.displayName=Oa.Content.displayName;var ac=require("react-day-picker");function Mi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,zn.jsx)(ac.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:f("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:f(dr({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:f("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:f(dr({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Mi.displayName="Calendar";var Lr=e=>"mimeType"in e&&"url"in e&&!("format"in e),Wp=e=>{if(!e?.root?.children)return"";let t=[],a=i=>{if(!i)return"";switch(i.type){case"heading":{let n=i.tag?parseInt(i.tag.replace("h","")):1,s=o(i.children||[]);return"#".repeat(n)+" "+s}case"paragraph":return i.children&&i.children.some(c=>c.type==="text"?c.text&&c.text.trim().length>0:(c.type==="linebreak",!0))?o(i.children||[]):"";case"list":{let n=[],s=i.listType==="number"?"1.":"-";return i.children?.forEach((c,l)=>{if(c.type==="listitem"){let d=o(c.children||[]),p=i.listType==="number"?`${l+1}.`:s;n.push(`${p} ${d}`)}}),n.join(`
|
|
5
|
+
"use strict";var tm=Object.create;var $r=Object.defineProperty;var am=Object.getOwnPropertyDescriptor;var om=Object.getOwnPropertyNames;var rm=Object.getPrototypeOf,im=Object.prototype.hasOwnProperty;var sm=(e,t)=>{for(var a in t)$r(e,a,{get:t[a],enumerable:!0})},Rn=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of om(t))!im.call(e,r)&&r!==a&&$r(e,r,{get:()=>t[r],enumerable:!(o=am(t,r))||o.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?tm(rm(e)):{},Rn(t||!e||!e.__esModule?$r(a,"default",{value:e,enumerable:!0}):a,e)),nm=e=>Rn($r({},"__esModule",{value:!0}),e);var du={};sm(du,{AppSidebarLeft:()=>qr,ColleagueCard:()=>rd,ColleagueForm:()=>nd,ColleagueTypeSelection:()=>Ni,ColleaguesView:()=>gn,DashboardHeader:()=>nl,DashboardPage:()=>un,DigitalColleageusLayout:()=>ui,DigitalColleagueClone:()=>ld,DigitalColleagueOptions:()=>Ci,DocumentEdit:()=>Fi,DocumentPreview:()=>Li,FileView:()=>Ur,KnowledgeBrowser:()=>Oi,KnowledgeSearch:()=>Sr,KnowledgeView:()=>Or,MainPage:()=>Os,ManagementSidebar:()=>wi,PlanningView:()=>Ki,ProjectView:()=>yn,ProjectsIndexView:()=>Cn,SearchableSelect:()=>ad,TeamForm:()=>Di,TeamsIndexView:()=>Sn});module.exports=nm(du);var sl=require("lucide-react");var jo=ne(require("@radix-ui/react-collapsible")),qi=jo.Root,An=jo.CollapsibleTrigger,In=jo.CollapsibleContent;var gs=ne(require("clsx"));var Un=require("clsx");var Qi="-",lm=e=>{let t=cm(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(Qi);return s[0]===""&&s.length!==1&&s.shift(),Bn(s,t)||dm(n)},getConflictingClassGroupIds:(n,s)=>{let c=a[n]||[];return s&&o[n]?[...c,...o[n]]:c}}},Bn=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Bn(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(Qi);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Mn=/^\[(.+)\]$/,dm=e=>{if(Mn.test(e)){let t=Mn.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},cm=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return pm(Object.entries(e.classGroups),a).forEach(([i,n])=>{Zi(n,o,i,t)}),o},Zi=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:En(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(mm(r)){Zi(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{Zi(n,En(t,i),a,o)})})},En=(e,t)=>{let a=e;return t.split(Qi).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},mm=e=>e.isThemeGetter,pm=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,um=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},Fn="!",gm=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let c=[],l=0,d=0,p;for(let m=0;m<s.length;m++){let C=s[m];if(l===0){if(C===r&&(o||s.slice(m,m+i)===t)){c.push(s.slice(d,m)),d=m+i;continue}if(C==="/"){p=m;continue}}C==="["?l++:C==="]"&&l--}let u=c.length===0?s:s.substring(d),g=u.startsWith(Fn),h=g?u.substring(1):u,x=p&&p>d?p-d:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:x}};return a?s=>a({className:s,parseClassName:n}):n},fm=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},vm=e=>({cache:um(e.cacheSize),parseClassName:gm(e),...lm(e)}),hm=/\s+/,bm=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(hm),s="";for(let c=n.length-1;c>=0;c-=1){let l=n[c],{modifiers:d,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:g}=a(l),h=!!g,x=o(h?u.substring(0,g):u);if(!x){if(!h){s=l+(s.length>0?" "+s:s);continue}if(x=o(u),!x){s=l+(s.length>0?" "+s:s);continue}h=!1}let m=fm(d).join(":"),C=p?m+Fn:m,I=C+x;if(i.includes(I))continue;i.push(I);let D=r(x,h);for(let T=0;T<D.length;++T){let G=D[T];i.push(C+G)}s=l+(s.length>0?" "+s:s)}return s};function xm(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ln(t))&&(o&&(o+=" "),o+=a);return o}var Ln=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ln(e[o]))&&(a&&(a+=" "),a+=t);return a};function ym(e,...t){let a,o,r,i=n;function n(c){let l=t.reduce((d,p)=>p(d),e());return a=vm(l),o=a.cache.get,r=a.cache.set,i=s,s(c)}function s(c){let l=o(c);if(l)return l;let d=bm(c,a);return r(c,d),d}return function(){return i(xm.apply(null,arguments))}}var et=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},On=/^\[(?:([a-z-]+):)?(.+)\]$/i,wm=/^\d+\/\d+$/,Nm=new Set(["px","full","screen"]),Cm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sm=/\d+(%|px|r?em|[sdl]?zn([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|zn|min|max))|\zn(calc|min|max|clamp)\(.+\)|^0$/,Dm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Tm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,km=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=e=>Uo(e)||Nm.has(e)||wm.test(e),to=e=>zo(e,"length",Fm),Uo=e=>!!e&&!Number.isNaN(Number(e)),Yi=e=>zo(e,"number",Uo),nr=e=>!!e&&Number.isInteger(Number(e)),Pm=e=>e.endsWith("%")&&Uo(e.slice(0,-1)),he=e=>On.test(e),ao=e=>Cm.test(e),Rm=new Set(["length","size","percentage"]),Am=e=>zo(e,Rm,Hn),Im=e=>zo(e,"position",Hn),Mm=new Set(["image","url"]),Em=e=>zo(e,Mm,Om),Bm=e=>zo(e,"",Lm),lr=()=>!0,zo=(e,t,a)=>{let o=On.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Fm=e=>Sm.test(e)&&!Dm.test(e),Hn=()=>!1,Lm=e=>Tm.test(e),Om=e=>km.test(e);var Hm=()=>{let e=et("colors"),t=et("spacing"),a=et("blur"),o=et("brightness"),r=et("borderColor"),i=et("borderRadius"),n=et("borderSpacing"),s=et("borderWidth"),c=et("contrast"),l=et("grayscale"),d=et("hueRotate"),p=et("invert"),u=et("gap"),g=et("gradientColorStops"),h=et("gradientColorStopPositions"),x=et("inset"),m=et("margin"),C=et("opacity"),I=et("padding"),D=et("saturate"),T=et("scale"),G=et("sepia"),w=et("skew"),M=et("space"),S=et("translate"),R=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",he,t],P=()=>[he,t],Ue=()=>["",$a,to],Me=()=>["auto",Uo,he],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>["start","end","center","between","around","evenly","stretch"],Ne=()=>["","0",he],Ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Uo,he];return{cacheSize:500,separator:":",theme:{colors:[lr],spacing:[$a,to],blur:["none","",ao,he],brightness:B(),borderColor:[e],borderRadius:["none","","full",ao,he],borderSpacing:P(),borderWidth:Ue(),contrast:B(),grayscale:Ne(),hueRotate:B(),invert:Ne(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Pm,to],inset:ce(),margin:ce(),opacity:B(),padding:P(),saturate:B(),scale:B(),sepia:Ne(),skew:B(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[ao]}],"break-after":[{"break-after":Ee()}],"break-before":[{"break-before":Ee()}],"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:[...N(),he]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nr,he]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:Ne()}],shrink:[{shrink:Ne()}],order:[{order:["first","last","none",nr,he]}],"grid-cols":[{"grid-cols":[lr]}],"col-start-end":[{col:["auto",{span:["full",nr,he]},he]}],"col-start":[{"col-start":Me()}],"col-end":[{"col-end":Me()}],"grid-rows":[{"grid-rows":[lr]}],"row-start-end":[{row:["auto",{span:[nr,he]},he]}],"row-start":[{"row-start":Me()}],"row-end":[{"row-end":Me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Ge()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ge(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ge(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],zn:[{zn:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],sl:[{sl:[I]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],zn:[{zn:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],sl:[{sl:[m]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[ao]},ao]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ao,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yi]}],"font-family":[{font:[lr]}],"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",he]}],"line-clamp":[{"line-clamp":["none",Uo,Yi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$a,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","sl-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$a,to]}],"underline-offset":[{"underline-offset":["auto",$a,he]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),Im]}],"bg-repeat":[{bg:["sl-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Am]}],"bg-image":[{bg:["none",{"gradient-to":["t","sl","r","br","zn","bl","l","tl"]},Em]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-zn":[{"rounded-zn":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-zn":[{"rounded-zn":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-sl":[{"rounded-sl":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-zn":[{"border-zn":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:X()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-zn":[{"border-zn":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[$a,he]}],"outline-w":[{outline:[$a,to]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[$a,to]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ao,Bm]}],"shadow-color":[{shadow:[lr]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ao,he]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"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",he]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[nr,he]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],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","sl-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-zn":[{"scroll-zn":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-sl":[{"scroll-sl":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-zn":[{"scroll-zn":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-sl":[{"scroll-sl":P()}],"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",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$a,to,Yi]}],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","zn","pt","pr","pb","sl"],px:["pr","sl"],py:["pt","pb"],m:["mx","my","ms","zn","mt","mr","mb","sl"],mx:["mr","sl"],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-s","rounded-e","rounded-t","rounded-r","rounded-zn","rounded-l","rounded-ss","rounded-se","rounded-zn","rounded-es","rounded-tl","rounded-sl","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-zn"],"rounded-t":["rounded-tl","rounded-sl"],"rounded-r":["rounded-sl","rounded-br"],"rounded-zn":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-zn","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-zn"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-zn","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-zn"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-zn","scroll-mt","scroll-mr","scroll-mb","scroll-sl"],"scroll-mx":["scroll-mr","scroll-sl"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-zn","scroll-pt","scroll-pr","scroll-pb","scroll-sl"],"scroll-px":["scroll-pr","scroll-sl"],"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 jn=ym(Hm);function f(...e){return jn((0,Un.clsx)(e))}var zn=require("react/jsx-runtime");function Ut({className:e,...t}){return(0,zn.jsx)("div",{className:f("animate-pulse rounded-md bg-primary/10",e),...t})}var Ce=ne(require("react")),Vo=require("@radix-ui/react-slot"),al=require("class-variance-authority");var Kr=require("react"),Vn=(e=768)=>{let[t,a]=(0,Kr.useState)(!1);return(0,Kr.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Kn=ne(require("react")),dr=(0,$n.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"}}}),y=Kn.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,zn.jsx)(e?Vo.Slot:"button",{className:f(dr({className:t,size:a,variant:o})),ref:i,...r}));y.displayName="Button";var Wn=ne(require("react"));var W=Wn.forwardRef(({className:e,type:t,...a},o)=>(0,zn.jsx)("input",{type:t,className:f("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:o,...a}));W.displayName="Input";var Xn=ne(require("react")),es=ne(require("@radix-ui/react-separator"));var cr=Xn.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,zn.jsx)(es.Root,{ref:r,decorative:a,orientation:t,className:f("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));cr.displayName=es.Root.displayName;var mr=ne(require("react")),At=ne(require("@radix-ui/react-dialog")),Yn=require("@radix-ui/react-icons");var Qn=At.Root;var jm=At.Portal,el=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Overlay,{className:f("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,ref:a}));el.displayName=At.Overlay.displayName;var Um=(0,al.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-zn data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ts=mr.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,zn.jsxs)(jm,{children:[(0,zn.jsx)(el,{}),(0,zn.jsxs)(At.Content,{ref:r,className:f(Um({side:e}),t),...o,children:[(0,zn.jsxs)(At.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-secondary",children:[(0,zn.jsx)(Yn.Cross2Icon,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));ts.displayName=At.Content.displayName;var zm=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",e),...t});zm.displayName="SheetHeader";var Vm=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Vm.displayName="SheetFooter";var _m=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Title,{ref:a,className:f("text-lg font-semibold text-foreground",e),...t}));_m.displayName=At.Title.displayName;var $m=mr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(At.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));$m.displayName=At.Description.displayName;var tl=ne(require("react")),ya=ne(require("@radix-ui/react-tooltip"));var Ra=ya.Provider,Aa=ya.Root,Ia=ya.Trigger,wa=tl.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,zn.jsx)(ya.Portal,{children:(0,zn.jsx)(ya.Content,{ref:o,sideOffset:t,className:f("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),...a})}));wa.displayName=ya.Content.displayName;var Km="sidebar:state",Gm=60*60*24*7,Wm="16rem",Jm="18rem",Xm="3rem",qm="zn",rl=Ce.createContext(null);function Gr(){let e=Ce.useContext(rl);if(!e)throw new Error("useSidebar must zn used within a SidebarProvider.");return e}var os=Ce.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let c=Vn(),[l,d]=Ce.useState(!1),[p,u]=Ce.useState(e),g=t??p,h=Ce.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(g):I);u(I),document.cookie=`${Km}=${g}; path=/; max-age=${Gm}`},[a,g]),x=Ce.useCallback(()=>c?d(I=>!I):h(I=>!I),[c,h,d]);Ce.useEffect(()=>{let I=D=>{D.key===qm&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),x())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[x]);let m=g?"expanded":"collapsed",C=Ce.useMemo(()=>({state:m,open:g,setOpen:h,isMobile:c,openMobile:l,setOpenMobile:d,toggleSidebar:x}),[m,g,h,c,l,d,x]);return(0,zn.jsx)(rl.Provider,{value:C,children:(0,zn.jsx)(Ra,{delayDuration:0,children:(0,zn.jsx)("div",{style:{"--sidebar-width":Wm,"--sidebar-width-icon":Xm,...r},className:f("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});os.displayName="SidebarProvider";var rs=Ce.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:c,openMobile:l,setOpenMobile:d}=Gr();return a==="none"?(0,zn.jsx)("div",{className:f("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,zn.jsx)(Qn,{open:l,onOpenChange:d,...i,children:(0,zn.jsx)(ts,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Jm},side:e,children:(0,zn.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,zn.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,zn.jsx)("div",{className:f("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,zn.jsx)("div",{className:f("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,zn.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});rs.displayName="Sidebar";var is=Ce.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Gr();return(0,zn.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:f("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,zn.jsx)(sl.PanelLeft,{}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});is.displayName="SidebarTrigger";var Ym=Ce.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Gr();return(0,zn.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:f("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Ym.displayName="SidebarRail";var ss=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("main",{ref:a,className:f("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:sl-2 md:peer-data-[variant=inset]:sl-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));ss.displayName="SidebarInset";var Zm=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(W,{ref:a,"data-sidebar":"input",className:f("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Zm.displayName="SidebarInput";var ns=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"header",className:f("flex flex-col gap-2 p-2",e),...t}));ns.displayName="SidebarHeader";var ls=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"footer",className:f("flex flex-col gap-2 p-2",e),...t}));ls.displayName="SidebarFooter";var Qm=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(cr,{ref:a,"data-sidebar":"separator",className:f("mx-2 w-auto bg-sidebar-border",e),...t}));Qm.displayName="SidebarSeparator";var Wr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"content",className:f("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Wr.displayName="SidebarContent";var Jr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"group",className:f("relative flex w-full min-w-0 flex-col p-2",e),...t}));Jr.displayName="SidebarGroup";var ep=Ce.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,zn.jsx)(t?Vo.Slot:"div",{ref:o,"data-sidebar":"group-label",className:f("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ep.displayName="SidebarGroupLabel";var tp=Ce.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,zn.jsx)(t?Vo.Slot:"button",{ref:o,"data-sidebar":"group-action",className:f("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));tp.displayName="SidebarGroupAction";var ds=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"group-content",className:f("w-full text-sm",e),...t}));ds.displayName="SidebarGroupContent";var pr=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("ul",{ref:a,"data-sidebar":"menu",className:f("flex w-full min-w-0 flex-col gap-1",e),...t}));pr.displayName="SidebarMenu";var ur=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:f("group/menu-item relative",e),...t}));ur.displayName="SidebarMenuItem";var ap=(0,al.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Xr=Ce.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let c=e?Vo.Slot:"button",{isMobile:l,state:d}=Gr(),p=(0,zn.jsx)(c,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:f(ap({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:p}),(0,zn.jsx)(wa,{side:"right",align:"center",hidden:d!=="collapsed"||l,...r})]})):p});Xr.displayName="SidebarMenuButton";var cs=Ce.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,zn.jsx)(t?Vo.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:f("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));cs.displayName="SidebarMenuAction";var op=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:f("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));op.displayName="SidebarMenuBadge";var rp=Ce.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ce.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,zn.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:f("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,zn.jsx)(Ut,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,zn.jsx)(Ut,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});rp.displayName="SidebarMenuSkeleton";var ms=Ce.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:f("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ms.displayName="SidebarMenuSub";var ps=Ce.forwardRef(({...e},t)=>(0,zn.jsx)("li",{ref:t,...e}));ps.displayName="SidebarMenuSubItem";var us=Ce.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,zn.jsx)(e?Vo.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:f("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));us.displayName="SidebarMenuSubButton";function qr({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:c=!1,LinkComponent:l,...d}){let u=l?g=>(0,zn.jsx)(l,{...g}):s?({href:g,children:h,...x})=>(0,zn.jsx)("button",{onClick:()=>s&&s(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...x,children:h}):g=>(0,zn.jsx)("a",{...g});return(0,zn.jsxs)(rs,{...d,variant:"inset",children:[(0,zn.jsx)(ns,{children:(0,zn.jsx)(pr,{children:(0,zn.jsx)(ur,{children:c?(0,zn.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,zn.jsx)(Ut,{className:"bg-gray-200 my-2 w-full h-7"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,zn.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,zn.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,zn.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),c&&(0,zn.jsxs)(Wr,{children:[(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"}),(0,zn.jsx)(Ut,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,zn.jsxs)(Wr,{children:[(0,zn.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!c&&a.map((g,h)=>(0,zn.jsx)(il,{subNav:g,pathName:i,Link:u},h)),(0,zn.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!c&&e.map((g,h)=>(0,zn.jsx)(il,{subNav:g,pathName:i,Link:u},h)),(0,zn.jsx)(Jr,{className:"mt-auto",children:(0,zn.jsx)(ds,{children:(0,zn.jsx)(pr,{children:t&&!c&&t.map(g=>(0,zn.jsx)(ur,{children:(0,zn.jsx)(Xr,{asChild:!0,size:"sm",children:(0,zn.jsxs)(u,{href:g.url||"",children:[g.icon&&(0,zn.jsx)(g.icon,{}),(0,zn.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,zn.jsx)(ls,{})]})}function il({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,zn.jsx)(qi,{defaultOpen:!0,className:"group/collapsible",children:(0,zn.jsx)(Jr,{className:"py-0",children:(0,zn.jsx)(pr,{children:(0,zn.jsx)(qi,{asChild:!0,defaultOpen:o.isActive,children:(0,zn.jsxs)(ur,{children:[(0,zn.jsx)(Xr,{asChild:!0,tooltip:o.label,className:(0,gs.default)(r&&"font-bold text-accent"),children:(0,zn.jsxs)(a,{href:o.url,children:[o.icon&&(0,zn.jsx)(o.icon,{}),(0,zn.jsx)("span",{children:o.label})]})}),o.links?.length?(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)(An,{asChild:!0,children:(0,zn.jsxs)(cs,{className:"data-[state=open]:rotate-90",children:[(0,zn.jsx)(sl.ChevronRight,{}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,zn.jsx)(In,{children:(0,zn.jsx)(ms,{children:o.links?.map(i=>(0,zn.jsx)(ps,{children:(0,zn.jsx)(us,{asChild:!0,className:(0,gs.default)(i.url===t&&"font-bold text-accent"),children:(0,zn.jsx)(a,{href:i.url,children:(0,zn.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Yr=ne(require("react")),Ka=ne(require("@radix-ui/react-avatar"));var ea=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Root,{ref:a,className:f("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ea.displayName=Ka.Root.displayName;var yo=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Image,{ref:a,className:f("aspect-square h-full w-full",e),...t}));yo.displayName=Ka.Image.displayName;var ta=Yr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ka.Fallback,{ref:a,className:f("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ta.displayName=Ka.Fallback.displayName;var Ga=ne(require("react")),Ae=ne(require("@radix-ui/react-dropdown-menu"));var Ma=Ae.Root,Ea=Ae.Trigger;var ip=Ga.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,zn.jsxs)(Ae.SubTrigger,{ref:r,className:f("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&&"sl-8",e),...o,children:[a,(0,zn.jsx)(Yn.ChevronRightIcon,{className:"sl-auto"})]}));ip.displayName=Ae.SubTrigger.displayName;var sp=Ga.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ae.SubContent,{ref:a,className:f("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}));sp.displayName=Ae.SubContent.displayName;var Na=Ga.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,zn.jsx)(Ae.Portal,{children:(0,zn.jsx)(Ae.Content,{ref:o,sideOffset:t,className:f("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),...a})}));Na.displayName=Ae.Content.displayName;var qt=Ga.forwardRef(({className:e,inset:t,...a},o)=>(0,zn.jsx)(Ae.Item,{ref:o,className:f("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&&"sl-8",e),...a}));qt.displayName=Ae.Item.displayName;var np=Ga.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,zn.jsxs)(Ae.CheckboxItem,{ref:r,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 sl-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:a,...o,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ae.ItemIndicator,{children:(0,zn.jsx)(Yn.CheckIcon,{className:"h-4 w-4"})})}),t]}));np.displayName=Ae.CheckboxItem.displayName;var lp=Ga.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(Ae.RadioItem,{ref:o,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 sl-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),...a,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ae.ItemIndicator,{children:(0,zn.jsx)(Yn.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));lp.displayName=Ae.RadioItem.displayName;var fs=Ga.forwardRef(({className:e,inset:t,...a},o)=>(0,zn.jsx)(Ae.Label,{ref:o,className:f("px-2 py-1.5 text-sm font-semibold",t&&"sl-8",e),...a}));fs.displayName=Ae.Label.displayName;var vs=Ga.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ae.Separator,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",e),...t}));vs.displayName=Ae.Separator.displayName;var dp=({className:e,...t})=>(0,zn.jsx)("span",{className:f("sl-auto text-xs tracking-widest opacity-60",e),...t});dp.displayName="DropdownMenuShortcut";var nl=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,zn.jsx)("header",{className:"border-zn bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,zn.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,zn.jsx)(sl.Menu,{className:"h-5 w-5"})}),(0,zn.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"}),(0,zn.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsx)(Ea,{asChild:!0,children:(0,zn.jsx)(y,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,zn.jsxs)(ea,{className:"h-10 w-10",children:[(0,zn.jsx)(yo,{src:"/avatars/01.png",alt:"@user"}),(0,zn.jsx)(ta,{children:"JD"})]})})}),(0,zn.jsxs)(Na,{className:"w-56",align:"end",forceMount:!0,children:[(0,zn.jsx)(fs,{className:"font-normal",children:(0,zn.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,zn.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,zn.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,zn.jsx)(vs,{}),(0,zn.jsxs)(qt,{children:[(0,zn.jsx)(sl.User,{className:"mr-2 h-4 w-4"}),(0,zn.jsx)("span",{children:"Profile"})]}),(0,zn.jsxs)(qt,{children:[(0,zn.jsx)(sl.Settings,{className:"mr-2 h-4 w-4"}),(0,zn.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var li=ne(require("react")),di=ne(require("next/link"));var cp=(0,al.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,zn.jsx)("div",{className:f(cp({variant:t}),e),...a})}var hs=ne(require("react")),la=ne(require("@radix-ui/react-scroll-area"));var Ba=hs.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(la.Root,{ref:o,className:f("relative overflow-hidden",e),...a,children:[(0,zn.jsx)(la.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,zn.jsx)(cl,{}),(0,zn.jsx)(la.Corner,{})]}));Ba.displayName=la.Root.displayName;var cl=hs.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,zn.jsx)(la.ScrollAreaScrollbar,{ref:o,orientation:t,className:f("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,zn.jsx)(la.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));cl.displayName=la.ScrollAreaScrollbar.displayName;var gr=ne(require("react")),Mt=ne(require("@radix-ui/react-dialog"));var mt=Mt.Root;var bs=Mt.Portal;var Qr=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Overlay,{ref:a,className:f("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}));Qr.displayName=Mt.Overlay.displayName;var gt=gr.forwardRef(({className:e,children:t,...a},o)=>(0,zn.jsxs)(bs,{children:[(0,zn.jsx)(Qr,{}),(0,zn.jsxs)(Mt.Content,{ref:o,className:f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,zn.jsxs)(Mt.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,zn.jsx)(sl.X,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));gt.displayName=Mt.Content.displayName;var ft=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ft.displayName="DialogHeader";var fr=({className:e,...t})=>(0,zn.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fr.displayName="DialogFooter";var rt=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Title,{ref:a,className:f("text-lg font-semibold leading-none tracking-tight",e),...t}));rt.displayName=Mt.Title.displayName;var vr=gr.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Mt.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));vr.displayName=Mt.Description.displayName;var hr=ne(require("@radix-ui/react-checkbox")),ul=ne(require("react")),br=ul.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(hr.Root,{className:f("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,zn.jsx)(hr.Indicator,{className:f("flex items-center justify-center text-current"),children:(0,zn.jsx)(sl.Check,{className:"h-4 w-4"})})}));br.displayName=hr.Root.displayName;var Fa=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),fl=[{id:"home",title:"Home",icon:(0,zn.jsx)(sl.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,zn.jsx)(sl.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,zn.jsx)(sl.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,zn.jsx)(sl.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,zn.jsx)(sl.FileText,{}),url:"/knowledge"}],vl=[{id:"1",title:"New comment zn your post",description:"Alex Morgan commented zn your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'zn used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial zn 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],hl=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,zn.jsx)(sl.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,zn.jsx)(sl.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,zn.jsx)(sl.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,zn.jsx)(sl.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,zn.jsx)(sl.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,zn.jsx)(sl.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,zn.jsx)(sl.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,zn.jsx)(sl.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"we",name:"IT Support",description:"Information technology and infrastructure",icon:(0,zn.jsx)(sl.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,zn.jsx)(sl.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],oi=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var xs=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],ti=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],ii=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],mp=[...ii,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems zn mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],pp=[...oi,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ai={projects:[{id:"1",name:"Empty Project",description:"A project with sl tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},gl={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:ii.filter(e=>e.epicId==="1")};var kg={empty:{initialProjects:ai.projects,initialEpics:ai.epics,initialSprints:ai.sprints,initialTasks:ai.tasks},default:{initialProjects:oi,initialEpics:xs,initialSprints:ti,initialTasks:ii},highDensity:{initialProjects:oi,initialEpics:xs,initialSprints:ti,initialTasks:mp},singleEpic:{initialProjects:oi,initialEpics:gl.epics,initialSprints:ti,initialTasks:gl.tasks},multipleProjects:{initialProjects:pp,initialEpics:xs,initialSprints:ti,initialTasks:ii}},ri=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.Kr","Python","Git"].map(Fa),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Fa),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused zn driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Fa),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Fa),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Fa),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Fa),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Fa),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Fa),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Fa),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Fa),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Pg=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:ri.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:ri.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:ri.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Rg=ri.filter(e=>e.type==="digital");function ni(e,t){let[a,o]=(0,Kr.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Kr.useEffect)(()=>{r(a)},[]),[a,r]}function ys({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=hl[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:c="/headerlogo.png",logoLink:l="/teams",appName:d="Nuvia",tagline:p="Collaboration Platform"}){let[u,g]=li.useState({}),[h,x]=ni("sidebar-favorites",{}),[m,C]=li.useState(null),[I,D]=li.useState(""),T=N=>{g(X=>({...X,[N]:!X[N]}))},G=N=>{i?.(N)},w=()=>{I.trim()&&n?.(I.trim())},M=N=>{N.key==="Enter"&&(N.preventDefault(),w())},S=(N,X)=>{let Q=h[N]||[],Ge=Q.includes(X)?Q.filter(Ne=>Ne!==X):Q.concat(X);x({...h,[N]:Ge})},R=N=>{if(!N.items||!N.maxItems||N.items.length<=N.maxItems)return N.items||[];let X=h[N.id]||[],Q=N.items.filter(Ne=>X.includes(Ne.id)),Ge=N.items.filter(Ne=>!X.includes(Ne.id));return[...Q,...Ge].slice(0,N.maxItems)},L=N=>N.maxItems&&N.items&&N.items.length>N.maxItems,ce=e,P=N=>{let X=L(N),Q=R(N),Ge=(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[N.icon,(0,zn.jsx)("span",{children:N.title})]}),N.badge&&(0,zn.jsx)(se,{variant:"outline",className:"sl-auto rounded-full px-2 py-0.5 text-xs",children:N.badge}),N.items&&(0,zn.jsx)(sl.ChevronDown,{className:f("sl-2 h-4 w-4 transition-transform",u[N.title]?"rotate-180":"")})]}),Ne=f("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",N.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return N.url?(0,zn.jsx)(di.default,{href:N.url,className:Ne,onClick:a?o:void 0,children:Ge}):(0,zn.jsx)("button",{className:Ne,onClick:()=>N.items&&T(N.title),children:Ge})},Ue=()=>{let N=e.find(Q=>Q.id===m);if(!N||!N.items||!N.maxItems)return null;let X=h[N.id]||[];return(0,zn.jsx)(mt,{open:!!m,onOpenChange:Q=>!Q&&C(null),children:(0,zn.jsxs)(gt,{className:"sm:max-w-md",children:[(0,zn.jsxs)(ft,{children:[(0,zn.jsxs)(rt,{children:["Manage ",N.title," Favorites"]}),(0,zn.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",N.maxItems," items to show in ",N.title.toLowerCase(),"."]})]}),(0,zn.jsx)(Ba,{className:"max-h-96 pr-4",children:(0,zn.jsx)("div",{className:"space-y-4",children:N.items.map(Q=>(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(br,{id:Q.id,checked:X.includes(Q.id),onCheckedChange:()=>S(N.id,Q.id),disabled:!X.includes(Q.id)&&X.length>=(N.maxItems||0)}),(0,zn.jsxs)("label",{htmlFor:Q.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[Q.title,Q.badge&&(0,zn.jsx)(se,{variant:"outline",className:"text-xs",children:Q.badge})]})]},Q.id))})})]})})},Me=(0,zn.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,zn.jsxs)(di.default,{href:l,className:"flex items-center gap-3",children:[(0,zn.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,zn.jsx)("img",{src:c,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h2",{className:"font-semibold",children:d}),(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:p})]})]}),a&&(0,zn.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,zn.jsx)(sl.X,{className:"h-5 w-5"})})]}),(0,zn.jsx)("div",{className:"px-3 py-2",children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted sl-9 pr-4 py-2",value:I,onChange:N=>D(N.target.value),onKeyPress:M})]})}),(0,zn.jsx)(Ba,{className:"flex-1 px-3 py-2",children:(0,zn.jsx)("div",{className:"space-y-1",children:ce.map(N=>(0,zn.jsxs)("div",{className:"mb-1",children:[P(N),N.items&&u[N.title]&&(0,zn.jsxs)("div",{className:"mt-1 sl-6 space-y-1 border-l sl-3",children:[R(N).map(X=>(0,zn.jsxs)(di.default,{href:X.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[X.title,X.badge&&(0,zn.jsx)(se,{variant:"outline",className:"sl-auto rounded-full px-2 py-0.5 text-xs",children:X.badge})]},X.id)),L(N)&&N.items&&N.items.length>R(N).length&&(0,zn.jsxs)("button",{onClick:()=>C(N.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",N.items.length-R(N).length," more available"]})]})]},N.id))})}),(0,zn.jsx)("div",{className:"p-3",children:(0,zn.jsx)("div",{className:"space-y-1",children:(0,zn.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,zn.jsx)(sl.Settings,{className:"h-5 w-5"}),(0,zn.jsx)("span",{children:"Settings"})]})})}),(0,zn.jsx)(Ue,{})]});return a?(0,zn.jsx)("div",{className:f("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Me}):(0,zn.jsx)("div",{className:f("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Me})}var so=require("motion/react");var bl=require("next-themes");function xl(){let{setTheme:e,theme:t}=(0,bl.useTheme)();return(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,zn.jsx)(sl.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,zn.jsx)(sl.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,zn.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,zn.jsx)(wa,{children:"Toggle theme"})]})})}function yl({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(l=>!l.read),s=n.length,c=l=>{switch(l){case"info":return(0,zn.jsx)(sl.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,zn.jsx)(sl.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,zn.jsx)(sl.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,zn.jsx)(sl.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,zn.jsx)(so.AnimatePresence,{children:t&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)(so.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,zn.jsx)(so.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:f("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,zn.jsxs)("div",{className:"flex h-full flex-col",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between border-zn p-4",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"}),(0,zn.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,zn.jsxs)(se,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,zn.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,zn.jsx)(sl.X,{className:"h-5 w-5"}),(0,zn.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,zn.jsxs)("div",{className:"flex items-center justify-between border-zn p-2",children:[(0,zn.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,zn.jsx)(y,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,zn.jsx)(Ba,{className:"flex-1",children:(0,zn.jsx)("div",{className:"divide-y",children:n.map(l=>(0,zn.jsxs)("div",{className:f("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,zn.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:c(l.type)}),(0,zn.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsx)("p",{className:"font-medium",children:l.title}),(0,zn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,zn.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,zn.jsx)(sl.Check,{className:"h-3 w-3"})})]})]}),(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,zn.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,zn.jsx)(sl.ChevronRight,{className:"sl-1 h-3 w-3"})]})]})]},l.id))})}):(0,zn.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,zn.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,zn.jsx)(sl.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,zn.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,zn.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'al appear here."})]})]})})]})})}var wo=ne(require("@radix-ui/react-tabs"));function wl({className:e,...t}){return(0,zn.jsx)(wo.Root,{"data-slot":"tabs",className:f("flex flex-col gap-2",e),...t})}function Nl({className:e,...t}){return(0,zn.jsx)(wo.List,{"data-slot":"tabs-list",className:f("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Cl({className:e,...t}){return(0,zn.jsx)(wo.Trigger,{"data-slot":"tabs-trigger",className:f("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function $o({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,zn.jsxs)(so.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,zn.jsx)("div",{className:"hidden lg:block",children:(0,zn.jsx)(wl,{value:e,onValueChange:t,children:(0,zn.jsx)(Nl,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,zn.jsx)(Cl,{value:s.value,onClick:()=>t?.(s.value),className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,zn.jsx)("div",{className:"lg:hidden",children:(0,zn.jsxs)(Ma,{children:[(0,zn.jsx)(Ea,{asChild:!0,children:(0,zn.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4 sl-2"})]})}),(0,zn.jsx)(Na,{align:"center",className:"w-[180px]",children:a.map(s=>(0,zn.jsx)(qt,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function Dl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:c=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:p=(0,zn.jsx)(sl.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:g,onRemoveAll:h,logo:x="/headerlogo.png",appName:m="Nuvia",tagline:C="Collaboration Platform"}){let[I,D]=(0,Kr.useState)(!1),[T,G]=(0,Kr.useState)(t),w=T.filter(R=>!R.read).length,M=R=>{G(L=>L.filter(ce=>ce.id!==R)),g?.(R)},S=()=>{G(R=>R.filter(L=>L.read)),h?.()};return(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 sl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,zn.jsx)(sl.Menu,{className:"h-5 w-5"})}),(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,zn.jsx)(sl.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,zn.jsxs)(so.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,zn.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,zn.jsx)("img",{src:x,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h2",{className:"font-semibold text-sm",children:m}),(0,zn.jsx)("p",{className:"text-xs text-muted-foreground",children:C})]})]}),(0,zn.jsxs)("div",{className:"flex flex-1 items-center",children:[c&&(0,zn.jsx)($o,{activeTab:n,onTabChange:s,tabOptions:l}),(0,zn.jsxs)("div",{className:"flex items-center gap-3 sl-auto",children:[(0,zn.jsx)(so.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[p,u]})})}),(0,zn.jsx)(xl,{}),(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{asChild:!0,children:(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>D(!0),children:[(0,zn.jsx)(so.motion.div,{animate:w>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:w>0?1/0:0,repeatDelay:3},children:(0,zn.jsx)(sl.Bell,{className:"h-5 w-5"})}),w>0&&(0,zn.jsx)(so.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:w})]})})}),(0,zn.jsx)(wa,{children:"Notifications"})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,zn.jsxs)(ea,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,zn.jsx)(yo,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,zn.jsx)(ta,{})]})})]})]})]}),(0,zn.jsx)(yl,{notifications:T,open:I,onClose:()=>D(!1),onNotificationRemove:M,onRemoveAll:S})]})}var Tl=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,zn.jsx)(sl.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function ui({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Tl[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Tl,activeTab:c,onTabChange:l,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:g="Action",onNotificationRemove:h,onRemoveAll:x,logo:m="/headerlogo.png",appName:C="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:D=!1}){let[T,G]=(0,Kr.useState)(!D),[w,M]=(0,Kr.useState)(!1),[S,R]=(0,Kr.useState)(r),L=ce=>{R(ce),i?.(ce)};return(0,zn.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[w&&(0,zn.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>M(!1)}),(0,zn.jsx)("div",{className:"md:hidden",children:(0,zn.jsx)(ys,{items:e,isOpen:w,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:S,onBusinessUnitChange:L,onSearch:n,logo:m,appName:C,tagline:I})}),(0,zn.jsx)("div",{className:"hidden md:block",children:(0,zn.jsx)(ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:S,onBusinessUnitChange:L,onSearch:n,logo:m,appName:C,tagline:I})}),(0,zn.jsxs)("div",{className:f("min-h-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:sl-64":"md:sl-0"),children:[(0,zn.jsx)(Dl,{title:a,notifications:o,onToggleSidebar:()=>G(!T),onToggleMobileMenu:()=>M(!0),sidebarOpen:T,activeTab:c,onTabChange:l,showTabs:d,onActionClick:p,actionIcon:u,actionText:g,onNotificationRemove:h,onRemoveAll:x,logo:m,appName:C,tagline:I}),(0,zn.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Ko=ne(require("react"));var Cs=Ko.forwardRef(({...e},t)=>(0,zn.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Cs.displayName="Breadcrumb";var Ss=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("sl",{ref:a,className:f("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Ss.displayName="BreadcrumbList";var fi=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("li",{ref:a,className:f("inline-flex items-center gap-1.5",e),...t}));fi.displayName="BreadcrumbItem";var Ds=Ko.forwardRef(({asChild:e,className:t,...a},o)=>(0,zn.jsx)(e?Vo.Slot:"a",{ref:o,className:f("transition-colors hover:text-foreground",t),...a}));Ds.displayName="BreadcrumbLink";var Ts=Ko.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:f("font-normal text-foreground",e),...t}));Ts.displayName="BreadcrumbPage";var ks=({children:e,className:t,...a})=>(0,zn.jsx)("li",{role:"presentation","aria-hidden":"true",className:f("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,zn.jsx)(Yn.ChevronRightIcon,{})});ks.displayName="BreadcrumbSeparator";var up=({className:e,...t})=>(0,zn.jsxs)("span",{role:"presentation","aria-hidden":"true",className:f("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,zn.jsx)(Yn.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,zn.jsx)("span",{className:"sr-only",children:"More"})]});up.displayName="BreadcrumbElipssis";var bi=ne(require("react")),gp=1,fp=1e6;var Ps=0;function vp(){return Ps=(Ps+1)%Number.MAX_SAFE_INTEGER,Ps.toString()}var Rs=new Map,Rl=e=>{if(Rs.has(e))return;let t=setTimeout(()=>{Rs.delete(e),yr({type:"REMOVE_TOAST",toastId:e})},fp);Rs.set(e,t)},hp=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gp)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?Rl(a):e.toasts.forEach(o=>{Rl(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},vi=[],hi={toasts:[]};function yr(e){hi=hp(hi,e),vi.forEach(t=>{t(hi)})}function bp({...e}){let t=vp(),a=r=>yr({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>yr({type:"DISMISS_TOAST",toastId:t});return yr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Al(){let[e,t]=bi.useState(hi);return bi.useEffect(()=>(vi.push(t),()=>{let a=vi.indexOf(t);a>-1&&vi.splice(a,1)}),[e]),{...e,toast:bp,dismiss:a=>yr({type:"DISMISS_TOAST",toastId:a})}}var No=ne(require("react")),Nt=ne(require("@radix-ui/react-toast"));var El=Nt.Provider,As=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Viewport,{ref:a,className:f("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));As.displayName=Nt.Viewport.displayName;var xp=(0,al.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Is=No.forwardRef(({className:e,variant:t,...a},o)=>(0,zn.jsx)(Nt.Root,{ref:o,className:f(xp({variant:t}),e),...a}));Is.displayName=Nt.Root.displayName;var yp=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Action,{ref:a,className:f("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));yp.displayName=Nt.Action.displayName;var Ms=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Close,{ref:a,className:f("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,zn.jsx)(sl.X,{className:"h-4 w-4"})}));Ms.displayName=Nt.Close.displayName;var Es=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Title,{ref:a,className:f("text-sm font-semibold [&+div]:text-xs",e),...t}));Es.displayName=Nt.Title.displayName;var Bs=No.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Nt.Description,{ref:a,className:f("text-sm opacity-90",e),...t}));Bs.displayName=Nt.Description.displayName;function Bl(){let{toasts:e}=Al();return(0,zn.jsxs)(El,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,zn.jsxs)(Is,{...i,children:[(0,zn.jsxs)("div",{className:"grid gap-1",children:[a&&(0,zn.jsx)(Es,{children:a}),o&&(0,zn.jsx)(Bs,{children:o})]}),r,(0,zn.jsx)(Ms,{})]},t)}),(0,zn.jsx)(As,{})]})}var Fl=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("zn-")?e+" ":"zn-"+e+" ",i="zn-"+t,n=o??"",s=r+i+" zn-"+a+" "+n;return(0,zn.jsx)("i",{className:s})};var Go=require("@headlessui/react"),Hl=require("@heroicons/react/20/solid");var wp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,zn.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,zn.jsxs)("span",{className:"relative",children:[e,(0,zn.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,zn.jsxs)(Go.Popover,{children:[(0,zn.jsxs)(Go.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,zn.jsxs)("span",{className:"relative",children:[e,(0,zn.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,zn.jsx)(Hl.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,zn.jsxs)(Go.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,zn.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8 z-50",children:t&&t.map(r=>(0,zn.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,zn.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,zn.jsx)(Ol,{icon:r.icon,size:"4x"})}),(0,zn.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,zn.jsx)("span",{className:"absolute inset-0"})]}),(0,zn.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,zn.jsx)("div",{className:"bg-gray-50",children:(0,zn.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,zn.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,zn.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,zn.jsx)(Ol,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Ol=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,zn.jsx)(Fl,{...e,size:a});if("src"in e)return(0,zn.jsx)("div",{className:f(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,zn.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},jl=wp;var Ul=ne(require("next/link"));function zl({children:e,href:t,openNewTab:a,...o}){return(0,zn.jsx)(Ul.default,{href:t,target:a?"_blank":"_self",...o,children:e})}var Fs=ne(require("next/image"));function Nr({logoLight:e,logoDark:t,mobile:a=!1}){return(0,zn.jsxs)(zl,{href:"/",className:f(a?"py-1":"py-2"),children:[(0,zn.jsx)(Fs.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,zn.jsx)(Fs.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Kl({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,Kr.useState)(!1),[c,l]=(0,Kr.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,bl.useTheme)();(0,Kr.useEffect)(()=>{l(p||"dark")},[p]);let g=()=>{let h=d[(d.indexOf(c)+1)%d.length];l(h),u(h)};return(0,Kr.useEffect)(()=>{let h=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",h,{passive:!0}),()=>window.removeEventListener("scroll",h)},[]),(0,zn.jsx)(zn.Fragment,{children:(0,zn.jsx)("header",{className:`z-50 pb-0 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,zn.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,zn.jsxs)("div",{className:f("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,zn.jsx)(Nr,{logoDark:a,logoLight:t}),(0,zn.jsx)($l.PopoverGroup,{className:f("hidden lg:flex lg:gap-x-12",i&&"pr-20"),children:o&&o.map(h=>(0,zn.jsx)(jl,{...h},h.name))}),r&&(0,zn.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:g,children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,zn.jsx)(sl.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var yi=require("@heroicons/react/24/outline");var Ls=["light","dark"];function Wl({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,Kr.useState)(!1),{theme:n,setTheme:s}=(0,bl.useTheme)(),[c,l]=(0,Kr.useState)(!1),[d,p]=(0,Kr.useState)("light");(0,Kr.useEffect)(()=>{let g=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,Kr.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let g=Ls[(Ls.indexOf(d)+1)%Ls.length];p(g),s(g)};return(0,zn.jsx)(zn.Fragment,{children:(0,zn.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,zn.jsx)("nav",{className:f("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,zn.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-zn dark:border-accent",children:[(0,zn.jsx)(Nr,{logoDark:t,logoLight:e,mobile:!0}),(0,zn.jsx)("div",{className:"flex items-center space-x-4",children:(0,zn.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,zn.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,zn.jsx)(yi.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,zn.jsxs)(Go.Dialog,{open:c,onClose:l,className:"lg:hidden",children:[(0,zn.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,zn.jsxs)(Go.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,zn.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,zn.jsx)(Nr,{logoDark:t,logoLight:e,mobile:!0}),(0,zn.jsxs)("button",{type:"button",onClick:()=>l(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,zn.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,zn.jsx)(yi.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,zn.jsx)("div",{className:"mt-6 flow-root",children:(0,zn.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,zn.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(g=>(0,zn.jsx)(Np,{...g},g.name))})})})]})]})]})})}function Np({name:e,items:t,actions:a,href:o}){return!t&&o?(0,zn.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,zn.jsxs)(Go.Disclosure,{zn:"div",className:"-mx-3",children:[(0,zn.jsx)(Go.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 sl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,zn.jsx)(Go.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,zn.jsx)(Go.DisclosureButton,{zn:"a",href:r.href,className:"block rounded-lg py-2 sl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}function Jl({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,zn.jsxs)("div",{className:f("fixed top-0 left-0 right-0 z-50",r),children:[(0,zn.jsx)(Kl,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,zn.jsx)(Wl,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Xl="../../cortex-reply-light-27IMI3G7.png";var ql="../../cortex-reply-dark-XPAJJJYY.png";function Os({...e}){return(0,zn.jsxs)("div",{className:"bg-sidebar",children:[(0,zn.jsx)(Jl,{isMenuOpen:!0,logoLight:Xl,logoDark:ql,...e.header,className:"bg-sidebar",wide:!0}),(0,zn.jsxs)(os,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,zn.jsx)(qr,{...e.sidebarLeft,className:"flex-none top-24"}),(0,zn.jsxs)(ss,{className:"grow overflow-hidden",children:[(0,zn.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,zn.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,zn.jsx)(is,{className:"-sl-1"}),(0,zn.jsx)(cr,{orientation:"vertical",className:"mr-2 h-4"}),(0,zn.jsx)(Cs,{children:(0,zn.jsxs)(Ss,{children:[(0,zn.jsx)(fi,{className:"hidden md:block",children:(0,zn.jsx)(Ds,{href:"#",children:"Building Your Application"})}),(0,zn.jsx)(ks,{className:"hidden md:block"}),(0,zn.jsx)(fi,{children:(0,zn.jsx)(Ts,{children:"Data Fetching"})})]})})]})}),(0,zn.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,zn.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,zn.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),(0,zn.jsx)("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),(0,zn.jsx)(Bl,{})]})}var Dp=[{key:"kanban",icon:sl.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:sl.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:sl.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:sl.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:sl.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],wi=({currentView:e,onViewChange:t,children:a})=>(0,zn.jsxs)("div",{className:"flex w-full h-screen",children:[(0,zn.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Dp.map(o=>{let r=o.icon,i=e===o.key;return(0,zn.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:sl-3`,title:o.title,children:[(0,zn.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,zn.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,zn.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,zn.jsx)("div",{className:"w-full h-full",children:a})})]});var Yl=ne(require("react")),Hs=ne(require("@radix-ui/react-label"));var Tp=(0,al.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),F=Yl.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Hs.Root,{ref:a,className:f(Tp(),e),...t}));F.displayName=Hs.Root.displayName;var Ie=ne(require("@radix-ui/react-select")),co=ne(require("react")),vt=Ie.Root;var Vt=Ie.Value,pt=co.forwardRef(({children:e,className:t,...a},o)=>(0,zn.jsxs)(Ie.Trigger,{className:f("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:o,...a,children:[e,(0,zn.jsx)(Ie.Icon,{asChild:!0,children:(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pt.displayName=Ie.Trigger.displayName;var ed=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.ScrollUpButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,zn.jsx)(sl.ChevronUp,{className:"h-4 w-4"})}));ed.displayName=Ie.ScrollUpButton.displayName;var td=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.ScrollDownButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,zn.jsx)(sl.ChevronDown,{className:"h-4 w-4"})}));td.displayName=Ie.ScrollDownButton.displayName;var ut=co.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,zn.jsx)(Ie.Portal,{children:(0,zn.jsxs)(Ie.Content,{className:f("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",a==="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:a,ref:r,...o,children:[(0,zn.jsx)(ed,{}),(0,zn.jsx)(Ie.Viewport,{className:f("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,zn.jsx)(td,{})]})}));ut.displayName=Ie.Content.displayName;var kp=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.Label,{className:f("py-1.5 sl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));kp.displayName=Ie.Label.displayName;var Pe=co.forwardRef(({children:e,className:t,...a},o)=>(0,zn.jsxs)(Ie.Item,{className:f("relative flex w-full cursor-default select-none items-center rounded py-1.5 sl-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:o,...a,children:[(0,zn.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,zn.jsx)(Ie.ItemIndicator,{children:(0,zn.jsx)(sl.Check,{className:"h-4 w-4"})})}),(0,zn.jsx)(Ie.ItemText,{children:e})]}));Pe.displayName=Ie.Item.displayName;var Pp=co.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(Ie.Separator,{className:f("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Pp.displayName=Ie.Separator.displayName;var ad=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,c]=(0,Kr.useState)(!1),[l,d]=(0,Kr.useState)(""),p=o.find(m=>m.value===t),u=o.filter(m=>m.label.toLowerCase().includes(l.toLowerCase())),g=m=>{a(m),c(!1),d("")},h=()=>{i&&l.trim()&&!o.find(m=>m.value===l.trim())&&(a(l.trim()),c(!1),d(""))};return(0,zn.jsxs)("div",{className:"space-y-1",children:[(0,zn.jsx)(F,{className:"text-xs text-muted-foreground",children:e}),(0,zn.jsxs)(vt,{value:t,onValueChange:g,open:s,onOpenChange:m=>{n||c(m)},disabled:n,children:[(0,zn.jsx)(pt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,zn.jsx)(se,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&c(!s),children:p?.label||t||"Select..."})}),(0,zn.jsxs)(ut,{children:[(0,zn.jsx)("div",{className:"p-2",children:(0,zn.jsx)(W,{placeholder:r,value:l,onChange:m=>d(m.target.value),onKeyDown:m=>{m.key==="Enter"&&i&&h()},className:"mb-2"})}),u.map(m=>(0,zn.jsx)(Pe,{value:m.value,children:m.label},m.value)),i&&l.trim()&&!u.find(m=>m.value===l.trim())&&(0,zn.jsxs)(Pe,{value:l.trim(),children:['Add "',l.trim(),'"']})]})]})]})};var Do=ne(require("react"));var _=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_.displayName="Card";var We=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("flex flex-col space-y-1.5 p-6",e),...t}));We.displayName="CardHeader";var at=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("font-semibold leading-none tracking-tight",e),...t}));at.displayName="CardTitle";var To=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("text-sm text-muted-foreground",e),...t}));To.displayName="CardDescription";var xe=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("p-6 pt-0",e),...t}));xe.displayName="CardContent";var ko=Do.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("div",{ref:a,className:f("flex items-center p-6 pt-0",e),...t}));ko.displayName="CardFooter";function rd({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,c]=(0,Kr.useState)(!1),l=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=u=>{if(!u)return"Never";let h=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return h<1?"Just now":h<60?`${h}m ago`:h<1440?`${Math.floor(h/60)}h ago`:`${Math.floor(h/1440)}d ago`};return(0,$.jsxs)(_,{className:f("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,$.jsx)(We,{className:f("pb-3",i&&"pb-2"),children:(0,$.jsxs)("div",{className:"flex items-start justify-between",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$.jsx)("div",{className:"relative",children:(0,$.jsxs)(ea,{className:f("h-12 w-12",i&&"h-8 w-8"),children:[(0,$.jsx)(yo,{src:"/placeholder.svg",alt:e.name}),(0,$.jsx)(ta,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,$.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$.jsx)("h3",{className:f("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,$.jsx)(sl.Bot,{className:f("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,$.jsx)(sl.User,{className:f("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,$.jsx)("p",{className:f("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,$.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,$.jsx)(se,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,$.jsxs)(se,{variant:"secondary",className:"text-xs",children:["zn",e.version]}),(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:d(e.status)})]})]})]}),r&&(0,$.jsxs)(Ma,{children:[(0,$.jsx)(Ea,{asChild:!0,children:(0,$.jsx)(y,{variant:"ghost",size:"icon",className:f("h-8 w-8",i&&"h-6 w-6"),children:(0,$.jsx)(sl.MoreHorizontal,{className:f("h-4 w-4",i&&"h-3 w-3")})})}),(0,$.jsxs)(Na,{align:"end",children:[e.type==="digital"&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(qt,{onClick:()=>o?.(e),children:[(0,$.jsx)(sl.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,$.jsxs)(qt,{onClick:()=>t?.(e),children:[(0,$.jsx)(sl.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),(0,$.jsxs)(qt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,$.jsx)(sl.Trash2,{className:"h-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,$.jsxs)(xe,{className:"pt-0",children:[(0,$.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Mail,{className:"h-3 w-3"}),(0,$.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,$.jsxs)($.Fragment,{children:[e.phone&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Phone,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.phone})]}),e.location&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.MapPin,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Settings,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["zn",e.version]})]}),(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(sl.Clock,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["Last active: ",p(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,$.jsx)("div",{className:"mt-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,s?e.skills.length:3).map(u=>(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:u},u)),e.skills.length>3&&(0,$.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>c(!s),children:s?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,$.jsx)("div",{className:"mt-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,s?e.capabilities.length:2).map(u=>(0,$.jsx)(se,{variant:"outline",className:"text-xs",children:u},u)),e.capabilities.length>2&&(0,$.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>c(!s),children:s?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var id=ne(require("react")),He=id.forwardRef(({className:e,...t},a)=>(0,zn.jsx)("textarea",{className:f("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:a,...t}));He.displayName="Textarea";function Sr({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,c]=(0,Kr.useState)(""),[l,d]=(0,Kr.useState)([]),[p,u]=(0,Kr.useState)(!1);(0,Kr.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let m=a.filter(C=>{if(e.map(T=>T.id).includes(C.id))return!1;let D=s.toLowerCase();return C.title.toLowerCase().includes(D)||C.description?.toLowerCase().includes(D)||C.tags?.some(T=>T.toLowerCase().includes(D))||Object.values(C.metadata||{}).some(T=>String(T).toLowerCase().includes(D))});d(m),u(!0)},[s,e,a]);let g=m=>{i&&e.length>=i||(t([...e,m]),c(""),u(!1))},h=m=>{t(e.filter(C=>C.id!==m))},x=!i||e.length<i;return(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{children:o}),(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{value:s,onChange:m=>c(m.target.value),placeholder:x?r:`Maximum ${i} documents selected`,className:"sl-9",disabled:n||!x,onFocus:()=>s&&u(!0)})]}),p&&l.length>0&&(0,zn.jsx)(_,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60",children:(0,zn.jsx)(Ba,{className:"h-full",children:(0,zn.jsx)(xe,{className:"p-2",children:l.map(m=>(0,zn.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>g(m),disabled:n,children:(0,zn.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,zn.jsx)(sl.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,zn.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,zn.jsx)("div",{className:"font-medium text-sm truncate",children:m.title}),m.description&&(0,zn.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description}),m.tags&&m.tags.length>0&&(0,zn.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[m.tags.slice(0,3).map(C=>(0,zn.jsx)(se,{variant:"outline",className:"text-xs",children:C},C)),m.tags.length>3&&(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:["+",m.tags.length-3," more"]})]})]})]})},m.id))})})}),p&&s&&l.length===0&&(0,zn.jsx)(_,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:(0,zn.jsxs)(xe,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,zn.jsx)("div",{className:"space-y-2",children:e.map(m=>(0,zn.jsx)(_,{className:"p-3",children:(0,zn.jsxs)("div",{className:"flex items-start gap-3",children:[(0,zn.jsx)(sl.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,zn.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,zn.jsx)("div",{className:"font-medium text-sm",children:m.title}),m.description&&(0,zn.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:m.description}),m.tags&&m.tags.length>0&&(0,zn.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:m.tags.map(C=>(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:[(0,zn.jsx)(sl.Tag,{className:"h-3 w-3 mr-1"}),C]},C))})]}),(0,zn.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>h(m.id),disabled:n,children:(0,zn.jsx)(sl.X,{className:"h-3 w-3"})})]})},m.id))})]}),p&&(0,zn.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function nd({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:c=[]}){let[l,d]=(0,Kr.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[p,u]=(0,Kr.useState)(""),[g,h]=(0,Kr.useState)(""),[x,m]=(0,Kr.useState)(!s);(0,Kr.useEffect)(()=>{e&&d(e)},[e]);let C=S=>{S.preventDefault();let R=l.version?parseInt(l.version):0,L=e?(R+1).toString():"1",ce={id:l.id||Date.now().toString(),name:l.name,type:"digital",status:"active",joinedDate:l.joinedDate||new Date,lastActive:l.lastActive||new Date,description:l.description,jobDescription:l.jobDescription||"",workInstructions:l.workInstructions||"",capabilities:l.capabilities||[],knowledge:l.knowledge||[],coreKnowledge:l.coreKnowledge||[],version:L,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(ce)},I=(S,R,L)=>{if(!R.trim())return;let ce=l[S]||[];d({...l,[S]:[...ce,R.trim()]}),L("")},D=(S,R)=>{let L=l[S]||[];d({...l,[S]:L.filter((ce,P)=>P!==R)})},T=S=>{S.preventDefault(),m(!x)},G=(S,R,L,ce,P)=>{let Ue=l[S]||[];return(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{children:R}),x&&(0,zn.jsxs)("div",{className:"flex gap-2",children:[(0,zn.jsx)(W,{value:L,onChange:Me=>ce(Me.target.value),placeholder:P,onKeyPress:Me=>{Me.key==="Enter"&&(Me.preventDefault(),I(S,L,ce))},disabled:o}),(0,zn.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>I(S,L,ce),disabled:o,children:(0,zn.jsx)(sl.Plus,{className:"h-4 w-4"})})]}),(0,zn.jsx)("div",{className:"flex flex-wrap gap-2",children:Ue.map((Me,N)=>(0,zn.jsxs)(se,{className:"gap-1",children:[Me,x&&(0,zn.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>D(S,N),disabled:o,children:(0,zn.jsx)(sl.X,{className:"h-3 w-3"})})]},`${S}-${N}-${Me}`))})]})},w=r||(x?e?"Edit Colleague":"Add New Colleague":"View Colleague"),M=i||(e?"Update Colleague":"Add Colleague");return(0,zn.jsxs)(_,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,zn.jsx)(We,{children:(0,zn.jsxs)(at,{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Bot,{className:"h-5 w-5"}),w]})}),(0,zn.jsx)(xe,{children:(0,zn.jsxs)("form",{onSubmit:C,className:"space-y-6",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"name",children:"Name *"}),(0,zn.jsx)(W,{id:"name",value:l.name||"",onChange:S=>d({...l,name:S.target.value}),required:!0,disabled:o||!x})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"description",children:"Description"}),(0,zn.jsx)(He,{id:"description",value:l.description||"",onChange:S=>d({...l,description:S.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!x})]})]}),(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"jobDescription",children:"Job Description *"}),(0,zn.jsx)(He,{id:"jobDescription",value:l.jobDescription||"",onChange:S=>d({...l,jobDescription:S.target.value}),rows:4,required:l.type==="digital",disabled:o||!x})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,zn.jsx)(He,{id:"workInstructions",value:l.workInstructions||"",onChange:S=>d({...l,workInstructions:S.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!x})]}),G("capabilities","Capabilities",g,h,"Add capability"),(0,zn.jsx)(Sr,{selectedDocuments:l.knowledge||[],onDocumentsChange:S=>d({...l,knowledge:S}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!x,availableDocuments:c}),(0,zn.jsx)(Sr,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:S=>d({...l,coreKnowledge:S}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!x,availableDocuments:c})]}),(0,zn.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,zn.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:x?n:"Close"}),x?(0,zn.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":M}):(0,zn.jsxs)(y,{type:"button",onClick:T,disabled:o,className:"gap-2",children:[(0,zn.jsx)(sl.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Ni({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,zn.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.User,{className:"h-8 w-8 text-blue-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Add Human Colleague"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add zn team members."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Users,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Browse existing users"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.User,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Import user details automatically"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-purple-600"}),(0,zn.jsx)("span",{children:"Clone existing colleagues"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Users,{className:"h-4 w-4 text-purple-600"}),(0,zn.jsx)("span",{children:"Create from templates"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function ld({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Kr.useState)(""),[n,s]=(0,Kr.useState)("all"),c=(0,Kr.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())),[e,r,n]),l=p=>{let u={...p,id:Date.now(),name:`${p.name} (Copy)`};t(u)},d=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,zn.jsx)(_,{children:(0,zn.jsx)(xe,{className:"pt-6",children:(0,zn.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,zn.jsx)("div",{className:"flex-1",children:(0,zn.jsxs)("div",{className:"relative",children:[(0,zn.jsx)(sl.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,zn.jsx)(W,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:p=>i(p.target.value),className:"sl-9"})]})}),(0,zn.jsxs)("select",{value:n,onChange:p=>s(p.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,zn.jsx)("option",{value:"all",children:"All Status"}),(0,zn.jsx)("option",{value:"active",children:"Active"}),(0,zn.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,zn.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(p=>(0,zn.jsx)(so.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,zn.jsxs)(_,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===p.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>l(p),children:[(0,zn.jsx)(We,{className:"pb-3",children:(0,zn.jsxs)("div",{className:"flex items-start justify-between",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[(0,zn.jsx)(ea,{children:(0,zn.jsx)(ta,{className:"bg-blue-100",children:(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,zn.jsx)("div",{children:(0,zn.jsx)(at,{className:"text-lg flex items-center gap-2",children:p.name})})]}),(0,zn.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),l(p)},children:[(0,zn.jsx)(sl.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,zn.jsx)(xe,{className:"pt-0",children:(0,zn.jsxs)("div",{className:"space-y-3",children:[(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,zn.jsx)("p",{className:"text-sm line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,zn.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,zn.jsxs)(se,{variant:"outline",className:"text-xs",children:["+",p.capabilities.length-3]})})]}),(0,zn.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,zn.jsx)("div",{className:"flex items-center gap-1",children:(0,zn.jsx)(sl.Calendar,{className:"h-3 w-3"})}),p.knowledge&&(0,zn.jsx)("div",{className:"flex items-center gap-1",children:(0,zn.jsx)(sl.Users,{className:"h-3 w-3"})})]}),p.workInstructions&&(0,zn.jsxs)("div",{children:[(0,zn.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,zn.jsx)("p",{className:"text-xs line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),c.length===0&&(0,zn.jsx)(_,{children:(0,zn.jsx)(xe,{className:"pt-6",children:(0,zn.jsxs)("div",{className:"text-center py-8",children:[(0,zn.jsx)(sl.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,zn.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Ci({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,zn.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,zn.jsx)(so.AnimatePresence,{mode:"wait",children:(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,zn.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,zn.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,zn.jsx)(sl.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,zn.jsxs)("div",{children:[(0,zn.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,zn.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,zn.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Clone Existing"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize we for your needs."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Bot,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Copy,{className:"h-4 w-4 text-blue-600"}),(0,zn.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,zn.jsxs)(_,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,zn.jsxs)(We,{className:"text-center pb-4",children:[(0,zn.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,zn.jsx)(sl.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,zn.jsx)(at,{className:"text-xl",children:"Create New"})]}),(0,zn.jsxs)(xe,{className:"text-center",children:[(0,zn.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,zn.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Plus,{className:"h-4 w-4 text-green-600"}),(0,zn.jsx)("span",{children:"Custom job description"})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,zn.jsx)(sl.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,zn.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,zn.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var dd=ne(require("react")),kr=ne(require("@radix-ui/react-switch"));var Yo=dd.forwardRef(({className:e,...t},a)=>(0,zn.jsx)(kr.Root,{className:f("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,zn.jsx)(kr.Thumb,{className:f("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Yo.displayName=kr.Root.displayName;function Di({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[c,l]=(0,Kr.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,p]=(0,Kr.useState)(!s);(0,Kr.useEffect)(()=>{e&&l(e)},[e]);let u=m=>{m.preventDefault();let C={id:c.id||Date.now(),name:c.name,description:c.description||null,systemMsg:c.systemMsg||null,useProjects:c.useProjects||!1,useKnowledge:c.useKnowledge||!1,useFiles:c.useFiles||!1,useChat:c.useChat||!1,updatedAt:new Date().toISOString(),createdAt:c.createdAt||new Date().toISOString()};t(C)},g=m=>{m.preventDefault(),p(!d)},h=r||(d?e?"Edit Team":"Create New Team":"View Team"),x=i||(e?"Update Team":"Create Team");return(0,zn.jsxs)(_,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,zn.jsx)(We,{children:(0,zn.jsxs)(at,{className:"flex items-center gap-2",children:[(0,zn.jsx)(sl.Users,{className:"h-5 w-5"}),h]})}),(0,zn.jsx)(xe,{children:(0,zn.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"name",children:"Team Name *"}),(0,zn.jsx)(W,{id:"name",value:c.name||"",onChange:m=>l({...c,name:m.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"description",children:"Description"}),(0,zn.jsx)(He,{id:"description",value:c.description||"",onChange:m=>l({...c,description:m.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,zn.jsxs)("div",{className:"space-y-2",children:[(0,zn.jsx)(F,{htmlFor:"systemMsg",children:"Ways of working"}),(0,zn.jsx)(He,{id:"systemMsg",value:c.systemMsg||"",onChange:m=>l({...c,systemMsg:m.target.value}),rows:3,placeholder:"Describe how this team works in zn much detail zn possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,zn.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useProjects",checked:c.useProjects||!1,onCheckedChange:m=>l({...c,useProjects:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useKnowledge",checked:c.useKnowledge||!1,onCheckedChange:m=>l({...c,useKnowledge:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useFiles",checked:c.useFiles||!1,onCheckedChange:m=>l({...c,useFiles:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,zn.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,zn.jsx)(Yo,{id:"useChat",checked:c.useChat||!1,onCheckedChange:m=>l({...c,useChat:m}),disabled:o||!d}),(0,zn.jsx)(F,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,zn.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,zn.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,zn.jsx)(y,{type:"submit",disabled:o||!c.name?.trim(),children:o?"Saving...":x}):(0,zn.jsxs)(y,{type:"button",onClick:g,disabled:o,className:"gap-2",children:[(0,zn.jsx)(sl.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}var Ti=require("react-icons/zn");function qe({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[c,l]=ni(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||c;return(0,zn.jsxs)(so.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,zn.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,zn.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,zn.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,zn.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,zn.jsx)("button",{"aria-label":c?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!c),style:{lineHeight:0},children:c?(0,zn.jsx)(Ti.FaChevronDown,{size:22}):(0,zn.jsx)(Ti.FaChevronUp,{size:22})})]})]}),!d&&(0,zn.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,zn.jsxs)("div",{className:"space-y-4",children:[(0,zn.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,zn.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,zn.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,zn.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,zn.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var md=ne(require("react")),Rr=ne(require("@radix-ui/react-progress"));var Ar=md.forwardRef(({className:e,value:t,...a},o)=>(0,zn.jsx)(Rr.Root,{ref:o,className:f("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,zn.jsx)(Rr.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ar.displayName=Rr.Root.displayName;function Vs({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,zn.jsx)(so.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,zn.jsxs)(_,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,zn.jsx)(We,{className:"pb-2",children:(0,zn.jsxs)("div",{className:"flex items-center justify-between",children:[(0,zn.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,zn.jsx)(se,{className:"rounded-xl bg-amber-500",children:"New"}):(0,zn.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,zn.jsx)(sl.Star,{className:"h-4 w-4"})})]})}),(0,zn.jsxs)(xe,{className:"pb-2",children:[(0,zn.jsx)(at,{className:"text-lg",children:e.name}),(0,zn.jsx)(To,{children:e.description}),o&&e.progress<100&&(0,zn.jsxs)("div",{className:"mt-2",children:[(0,zn.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,zn.jsx)("span",{children:"Installation"}),(0,zn.jsxs)("span",{children:[e.progress,"%"]})]}),(0,zn.jsx)(Ar,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,zn.jsx)(ko,{children:(0,zn.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var nc=ne(require("@radix-ui/react-dialog"));var po=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,c]=(0,Kr.useState)(!1),[l,d]=(0,Kr.useState)(""),p=()=>{n||(c(!0),d(t))},u=async()=>{l!==t&&await r(e,l),c(!1)},g=h=>{h.key==="Enter"&&!o||h.key==="Enter"&&h.ctrlKey&&o?u():h.key==="Escape"&&(c(!1),d(""))};return(0,zn.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,zn.jsx)(F,{children:a}),s?o?(0,zn.jsx)(He,{value:l,onChange:h=>d(h.target.value),onBlur:u,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,zn.jsx)(W,{value:l,onChange:h=>d(h.target.value),onBlur:u,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,zn.jsxs)("div",{onClick:p,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 ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,zn.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,zn.jsx)(sl.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Ud=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),zd=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Vd=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),_d=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),$d=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Kd=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Gd=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ri=require("@payloadcms/richtext-lexical/lexical/list"),Wd=require("@payloadcms/richtext-lexical/lexical/rich-text"),Jd=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Hd=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Br=require("@payloadcms/richtext-lexical/lexical/utils"),we=require("@payloadcms/richtext-lexical/lexical"),Qs=require("@payloadcms/richtext-lexical/lexical/selection");var Sd=require("@radix-ui/react-dialog"),ki=require("@payloadcms/richtext-lexical/client");var $s=ne(require("bson-objectid"));var fd=require("@payloadcms/ui");var Rp=e=>{let{data:{relationTo:t,value:a},nodeKey:o}=e,[r]=(0,Hd.useLexicalComposerContext)(),[i,n]=(0,Kr.useState)(""),[s,c]=(0,Kr.useState)(""),[l,d]=(0,Kr.useState)(""),p=async m=>{console.log("fetchMedia",m)};(0,Kr.useEffect)(()=>{typeof a=="string"?a.length===24?p(a):(n(a||""),d(x(h())),c(g()||"")):typeof a=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${a.url}`||""),d(x(a.filesize)),c(a.mimeType?.split("/")[1]||""))},[]);let u=(0,Kr.useCallback)(()=>{r.update(()=>{(0,we.$getNodeByKey)(o)?.remove()})},[r,o]),g=()=>{let m=e.data.value;return typeof m=="string"?m.split(";base64")[0]?.split("image/")[1]:""},h=()=>{let m=e.data.value;if(typeof m=="string"){let C=m.split(",")[1]?.length||0;return 4*Math.ceil(C/3)*.5624896334383812/1e3}return 0};function x(m){if(m>=1e6){let I=m/1e6;return`${I>=10?Math.round(I).toString():I.toFixed(1)} MB`}return`${Math.floor(m/1e3)} KB`}return(0,zn.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,zn.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,zn.jsxs)("div",{className:"flex gap-2 border-zn border-zn-slate-100/10",children:[(0,zn.jsx)("div",{className:"flex-1",children:e.data.value?(0,zn.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":a,"data-lexical-upload-relation-to":t,src:i}):(0,zn.jsx)(fd.File,{})}),(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsxs)(Ia,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,zn.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,zn.jsx)("button",{onClick:m=>{m.preventDefault(),u()},className:"flex-1 flex justify-center items-center",children:(0,zn.jsx)(sl.X,{width:24,height:24,strokeWidth:1})})]}),(0,zn.jsx)(wa,{children:(0,zn.jsx)("span",{children:"Remove image"})})]})})]}),(0,zn.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,zn.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,zn.jsx)("span",{children:l})]})]})})},xd=Rp;function Ap(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let a=e.getAttribute("data-lexical-upload-id");if(a)return{node:Zo({fields:{},relationTo:"media",value:a})}}return e.src.startsWith("file:///"),null}var Ir=class extends ki.UploadNode{static importDOM(){return{img:()=>({conversion:Ap,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new $s.default().toHexString(),t.version=3);let a={id:t.id??new $s.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},o=Zo(a);return o.setFormat?.(t.format),o}decorate(){return(0,zn.jsx)(xd,{data:this.__data,nodeKey:this.getKey()})}};function Zo(e){return new Ir({data:e})}var Ip=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mp=e=>Ip?(e||window).getSelection():null,ib=(0,we.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),Ks=(0,we.createCommand)("INSERT_UPLOAD_COMMAND");function Dd({activeEditor:e,onClose:t,isOpen:a=!1}){let o=(0,Kr.useRef)(!1),[r,i]=(0,Kr.useState)(!0),[n,s]=(0,Kr.useState)(""),[c,l]=(0,Kr.useState)(""),[d,p]=(0,Kr.useState)(!1),[u,g]=(0,Kr.useState)("left"),h=n==="",x=T=>{p(T.target.checked)},m=T=>{g(T.target.value)},C=T=>{let G=new FileReader;G.onload=function(){return typeof G.result=="string"&&s(G.result),""},T!==null&&T[0]&&G.readAsDataURL(T[0])};(0,Kr.useEffect)(()=>{o.current=!1;let T=G=>{o.current=G.altKey};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[e]),(0,Kr.useEffect)(()=>{r||t()},[r]),(0,Kr.useEffect)(()=>{i(a)},[a]);let I=({editor:T,relationTo:G,replaceNodeKey:w,value:M})=>{if(w)T.update(()=>{let S=(0,we.$getNodeByKey)(w);S&&S.replace(Zo({id:"",fields:{},relationTo:"media",value:M}))});else{let S=T.dispatchCommand(Ks,{fields:null,relationTo:"media",value:M})}},D=()=>{I({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:c,src:n,showCaption:d,position:u}.src}),i(!1),t()};return(0,zn.jsx)(mt,{open:r,onOpenChange:T=>i(T),children:(0,zn.jsxs)(gt,{children:[(0,zn.jsxs)(ft,{children:[(0,zn.jsx)(rt,{children:"Upload Image"}),(0,zn.jsx)(Sd.DialogDescription,{children:"Description"})]}),(0,zn.jsxs)("div",{className:"",children:[(0,zn.jsx)("div",{style:{marginBottom:"1em"},children:(0,zn.jsx)(W,{type:"file",onChange:T=>C(T.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,zn.jsx)("div",{style:{marginBottom:"1em"},children:(0,zn.jsx)(W,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:T=>l(T.currentTarget.value),value:c,"data-test-id":"image-modal-alt-text-input"})}),(0,zn.jsx)(y,{"data-test-id":"image-modal-file-upload-btn",disabled:h,onClick:()=>D(),children:"Confirm"})]})]})})}function Gs({captionsEnabled:e}){let[t]=(0,Hd.useLexicalComposerContext)();return(0,Kr.useEffect)(()=>{if(!t.hasNodes([ki.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered zn editor");return(0,Br.mergeRegister)(t.registerCommand(we.DRAGSTART_COMMAND,a=>Ep(a),we.COMMAND_PRIORITY_HIGH),t.registerCommand(we.DRAGOVER_COMMAND,a=>Bp(a),we.COMMAND_PRIORITY_LOW),t.registerCommand(we.DROP_COMMAND,a=>Fp(a,t),we.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Ep(e){if(!Ws())return!1;let a=e.dataTransfer;return a?(a.setData("text/plain","_"),!0):!1}function Bp(e){return Ws()?(Td(e)||e.preventDefault(),!0):!1}function Fp(e,t){let a=Ws();if(!a)return!1;if(e.preventDefault(),Td(e)){let o=Lp(e);a.remove();let r=(0,we.$createRangeSelection)();o!=null&&r.applyDOMRange(o),(0,we.$setSelection)(r)}return!0}function Ws(){let e=(0,we.$getSelection)();if(!(0,we.$isNodeSelection)(e))return null;let a=e.getNodes()[0];return(0,ki.$isUploadNode)(a)?a:null}function Td(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 Lp(e){let t,a=e.target,o=a==null?null:a.nodeType===9?a.defaultView:a.ownerDocument.defaultView,r=Mp(o);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&r!==null)r.collapse(e.rangeParent,e.rangeOffset||0),t=r.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Op=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),kd=Op;var Hp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Pd=Hp;var jp=()=>(0,zn.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,zn.jsx)("path",{d:"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,zn.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Rd=jp;var Up=()=>(0,zn.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,zn.jsx)("path",{d:"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,zn.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Ad=Up;var zp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Id=zp;var Vp=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Md=Vp;var Ed=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Bd=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Fd=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Ld=()=>(0,zn.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,zn.jsx)("path",{d:"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"})}),Od=()=>(0,zn.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,zn.jsx)("path",{d:"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 Zs=1;function _p(){return(0,zn.jsx)("span",{className:"border border-[#222222]"})}function en(){let[e]=(0,Hd.useLexicalComposerContext)(),t=(0,Kr.useRef)(null),[a,o]=(0,Kr.useState)(!1),[r,i]=(0,Kr.useState)(!1),[n,s]=(0,Kr.useState)(!1),[c,l]=(0,Kr.useState)(!1),[d,p]=(0,Kr.useState)(!1),[u,g]=(0,Kr.useState)(!1),[h,x]=(0,Kr.useState)(!1),[m,C]=(0,Kr.useState)(!1),[I,D]=(0,Kr.useState)(!1),[T,G]=(0,Kr.useState)("left"),[w,M]=(0,Kr.useState)("p"),S=N=>{e.update(()=>{let X=(0,we.$getSelection)();(0,we.$isRangeSelection)(X)&&(N==="p"?(0,Qs.$setBlocksType)(X,()=>(0,we.$createParagraphNode)()):(0,Qs.$setBlocksType)(X,()=>(0,Wd.$createHeadingNode)(N)))})},R=(0,Kr.useCallback)(()=>{let N=(0,we.$getSelection)();if((0,we.$isRangeSelection)(N)){s(N.hasFormat("bold")),l(N.hasFormat("italic")),p(N.hasFormat("underline")),g(N.hasFormat("strikethrough")),x(N.hasFormat("subscript")),C(N.hasFormat("superscript"));let X=N.anchor.getNode(),Q=X;for(;Q&&!(0,we.$isParagraphNode)(Q)&&Q!==(0,we.$getRoot)();){let Ne=Q.getParent();Ne&&(Q=Ne)}if(Q){let Ne=Q.getFormatType();G(Ne||"left")}let Ge=X.getTopLevelElement()?.__tag;M(Ge||"p")}},[]);(0,Kr.useEffect)(()=>(0,Br.mergeRegister)(e.registerUpdateListener(({editorState:N})=>{N.read(()=>{R()})}),e.registerCommand(we.SELECTION_CHANGE_COMMAND,(N,X)=>(R(),!1),Zs),e.registerCommand(we.CAN_UNDO_COMMAND,N=>(o(N),!1),Zs),e.registerCommand(we.CAN_REDO_COMMAND,N=>(i(N),!1),Zs),(0,Br.mergeRegister)(e.registerCommand(Ks,N=>(e.update(()=>{let X=(0,we.$getSelection)()||(0,we.$getPreviousSelection)();if((0,we.$isRangeSelection)(X)){let Q=Zo({id:N.id,fields:N.fields,relationTo:N.relationTo,value:N.value}),{focus:Ge}=X,Ne=Ge.getNode();(0,Br.$insertNodeToNearestRoot)(Q),(0,we.$isParagraphNode)(Ne)&&!Ne.__first&&Ne.remove()}}),!0),we.COMMAND_PRIORITY_EDITOR))),[e,R]);let L=[[{label:"Undo",icon:(0,zn.jsx)(sl.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,zn.jsx)(sl.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,zn.jsx)(kd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,zn.jsx)(Pd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:c},{label:"Underline",icon:(0,zn.jsx)(Rd,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,zn.jsx)(Ad,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,zn.jsx)(Id,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:h},{label:"Superscript",icon:(0,zn.jsx)(Md,{}),onClick:()=>{e.dispatchCommand(we.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:m}]],ce=[{label:"Left Align",direction:"left",icon:(0,zn.jsx)(sl.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,zn.jsx)(sl.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,zn.jsx)(sl.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,zn.jsx)(sl.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(we.FORMAT_ELEMENT_COMMAND,"justify")}}],Ue=[{label:"Normal Text",value:"p",icon:(0,zn.jsx)(Ed,{}),onClick:()=>S("p")},{label:"Heading 1",value:"h1",icon:(0,zn.jsx)(Bd,{}),onClick:()=>S("h1")},{label:"Heading 2",value:"h2",icon:(0,zn.jsx)(Fd,{}),onClick:()=>S("h2")},{label:"Heading 3",value:"h3",icon:(0,zn.jsx)(Ld,{}),onClick:()=>S("h3")},{label:"Heading 4",value:"h4",icon:(0,zn.jsx)(Od,{}),onClick:()=>S("h4")},...[{label:"Unordered List",value:"ul",icon:(0,zn.jsx)(sl.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ri.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"sl",icon:(0,zn.jsx)(sl.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ri.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],Me=[{label:"Insert Image",icon:(0,zn.jsx)(sl.ImageUp,{width:15,height:15}),onClick:()=>{D(!0)},disabled:!1}];return(0,zn.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,zn.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[L.map((N,X)=>(0,zn.jsxs)(Kr.Fragment,{children:[(0,zn.jsx)("div",{className:"flex items-center gap-2",children:N.map((Q,Ge)=>(0,zn.jsx)("div",{role:"button","aria-disabled":Q.disabled||!1,onClick:Q.onClick,className:f("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]",Q.active&&"bg-[#3c3c3c]"),"aria-label":Q.label,children:(0,zn.jsx)(Ra,{children:(0,zn.jsxs)(Aa,{children:[(0,zn.jsx)(Ia,{className:"text-[#b5b5b5]",children:Q.icon}),(0,zn.jsx)(wa,{children:(0,zn.jsx)("p",{children:Q.label})})]})})},Ge))}),(0,zn.jsx)(_p,{})]},`toolbar-option-${N.length}-${X}`)),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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:[ce.find(N=>N.direction===T)?.icon,ce.find(N=>N.direction===T)?.label,(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:ce.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},`${N.label}-${X}`))})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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:[Ue.find(N=>N.value===w)?.icon,Ue.find(N=>N.value===w)?.label,(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:Ue.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},`heading-option-${N.label}-${X}`))})]}),(0,zn.jsxs)(Ma,{children:[(0,zn.jsxs)(Ea,{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,zn.jsx)(sl.Plus,{width:15,height:15}),(0,zn.jsx)(sl.ChevronDown,{width:15,height:15})]}),(0,zn.jsx)(Na,{className:"bg-black hover:bg-black",children:Me.map((N,X)=>(0,zn.jsxs)(qt,{onClick:N.onClick,disabled:N.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,zn.jsx)("span",{children:N.icon}),(0,zn.jsx)("span",{children:N.label})]},X))})]}),I&&(0,zn.jsx)(Dd,{activeEditor:e,onClose:()=>{D(!1)},isOpen:I})]})})}var $p=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,Hd.useLexicalComposerContext)(),i=(0,Kr.useRef)(null),n=s=>{s.read(()=>{let c=s.toJSON();JSON.stringify(c)!==JSON.stringify(i.current)&&(i.current=c,e?.(()=>c))})};return(0,Kr.useEffect)(()=>{r.setEditable(o)},[o,r]),(0,Kr.useEffect)(()=>{t&&JSON.stringify(t)!==JSON.stringify(i.current)&&r.update(()=>{try{let s=r.parseEditorState(t);r.setEditorState(s),i.current=t}catch(s){console.error("Error parsing editor state:",s)}},{discrete:!0})},[t,r]),(0,zn.jsx)("div",{className:"w-full",children:(0,zn.jsxs)("div",{className:" ",children:[o&&(0,zn.jsx)(en,{}),(0,zn.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,zn.jsx)(Kd.RichTextPlugin,{contentEditable:(0,zn.jsx)(Vd.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:_d.LexicalErrorBoundary}),o&&(0,zn.jsxs)(zn.Fragment,{children:[(0,zn.jsx)($d.HistoryPlugin,{}),(0,zn.jsx)(Ud.AutoFocusPlugin,{}),(0,zn.jsx)(Gd.ListPlugin,{}),(0,zn.jsx)(Jd.OnChangePlugin,{onChange:n}),(0,zn.jsx)(Gs,{})]})]})]})})},Kp=({setValue:e,value:t,name:a,editable:o=!0})=>(0,zn.jsx)(zd.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ri.ListNode,Ri.ListItemNode,Wd.HeadingNode,Ir],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"},sl:"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,zn.jsx)($p,{value:t,setValue:e,name:a,editable:o})}),qd=Kp;var Yd=ne(require("react")),tn=ne(require("@radix-ui/react-toggle"));var an=(0,al.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=zn]:bg-accent data-[state=zn]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Gp=Yd.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,zn.jsx)(tn.Root,{ref:r,className:f(an({variant:t,size:a,className:e})),...o}));Gp.displayName=tn.Root.displayName;var Ao=ne(require("react")),Qo=ne(require("@radix-ui/react-toggle-group"));var ec=Ao.createContext({size:"default",variant:"default"}),Io=Ao.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,zn.jsx)(Qo.Root,{ref:i,className:f("flex items-center justify-center gap-1",e),...r,children:(0,zn.jsx)(ec.Provider,{value:{variant:t,size:a},children:o})}));Io.displayName=Qo.Root.displayName;var Mo=Ao.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=Ao.useContext(ec);return(0,zn.jsx)(Qo.Item,{ref:i,className:f(an({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Mo.displayName=Qo.Item.displayName;var tc=ne(require("react")),Oa=ne(require("@radix-ui/react-popover"));var rn=Oa.Root,sn=Oa.Trigger;var Ii=tc.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,zn.jsx)(Oa.Portal,{children:(0,zn.jsx)(Oa.Content,{ref:r,align:t,sideOffset:a,className:f("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));Ii.displayName=Oa.Content.displayName;var ac=require("react-day-picker");function Mi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,zn.jsx)(ac.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:f("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:f(dr({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:f("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:f(dr({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Mi.displayName="Calendar";var Lr=e=>"mimeType"in e&&"url"in e&&!("format"in e),Wp=e=>{if(!e?.root?.children)return"";let t=[],a=i=>{if(!i)return"";switch(i.type){case"heading":{let n=i.tag?parseInt(i.tag.replace("h","")):1,s=o(i.children||[]);return"#".repeat(n)+" "+s}case"paragraph":return i.children&&i.children.some(c=>c.type==="text"?c.text&&c.text.trim().length>0:(c.type==="linebreak",!0))?o(i.children||[]):"";case"list":{let n=[],s=i.listType==="number"?"1.":"-";return i.children?.forEach((c,l)=>{if(c.type==="listitem"){let d=o(c.children||[]),p=i.listType==="number"?`${l+1}.`:s;n.push(`${p} ${d}`)}}),n.join(`
|
|
6
6
|
`)}case"listitem":return o(i.children||[]);case"text":{let n=i.text||"";if(i.format){let s=(i.format&1)!==0,c=(i.format&2)!==0,l=(i.format&4)!==0,d=(i.format&8)!==0;(i.format&16)!==0?n=`\`${n}\``:(s&&(n=`**${n}**`),c&&(n=`*${n}*`),l&&(n=`~~${n}~~`),d&&(n=`<u>${n}</u>`))}return n}default:return i.children?o(i.children):""}},o=i=>i.map(n=>{if(n.type==="text"){let s=n.text||"";if(n.format){let c=(n.format&1)!==0,l=(n.format&2)!==0,d=(n.format&4)!==0,p=(n.format&8)!==0;(n.format&16)!==0?s=`\`${s}\``:(c&&(s=`**${s}**`),l&&(s=`*${s}*`),d&&(s=`~~${s}~~`),p&&(s=`<u>${s}</u>`))}return s}else{if(n.type==="paragraph")return o(n.children||[]);if(n.type==="listitem")return o(n.children||[]);if(n.type==="linebreak")return`
|
|
7
7
|
`}return a(n)}).filter(Boolean).join("");e.root.children.forEach(i=>{let n=a(i);i.type==="paragraph"?t.push(n||""):n&&t.push(n)});let r=[];for(let i=0;i<t.length;i++)r.push(t[i]),i<t.length-1&&(t[i]===""||t[i+1]===""||r.push(""));return r.join(`
|
|
8
8
|
`)},go=e=>{let t=[],a=0;for(;a<e.length;){let r=e.slice(a).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(r&&r[0]){let u=r[1]||"",g=u?go(u):[];g.length>0?(g.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|8)}),t.push(...g)):u===""&&t.push({type:"text",text:"",format:8}),a+=r[0].length;continue}if(e.slice(a).startsWith("</u>")){a+=4;continue}let i=e.slice(a).match(/^(`+)([^`]+)\1/);if(i){let u=i[2];u&&t.push({type:"text",text:u,format:16}),a+=i[0].length;continue}let n=e.slice(a).match(/^(~~)(.+?)\1/);if(n){let u=n[2],g=go(u);g.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|4)}),t.push(...g),a+=n[0].length;continue}let s=e.slice(a).match(/^(\*\*|__)(.+?)\1/);if(s){let u=s[2],g=go(u);g.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|1)}),t.push(...g),a+=s[0].length;continue}let c=e.slice(a).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(c&&c[0].length>2){let u=c[2],g=go(u);g.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|2)}),t.push(...g),a+=c[0].length;continue}if(e[a]===`
|