cortex-react-components 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VBSFVJM5.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
- package/dist/{chunk-Q7KKN6MH.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-KY3ELFX5.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-6DQ7FEQQ.mjs → chunk-5WVFEIMC.mjs} +1 -1
- package/dist/{chunk-57PJ7CHJ.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/{chunk-U67OTPTT.mjs → chunk-74U3NYS2.mjs} +1 -1
- package/dist/{chunk-SPAOEUCG.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-FRN4LROV.mjs → chunk-CQNQBSED.mjs} +1 -1
- package/dist/chunk-CTAIR3TE.mjs +4 -0
- package/dist/{chunk-P3NMFRBH.mjs → chunk-CTAQQFEO.mjs} +1 -1
- package/dist/{chunk-NPGGDQ6F.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-BHWGOTCJ.mjs → chunk-FGEFYI5E.mjs} +1 -1
- package/dist/{chunk-S4ES6P3Y.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-RY4C3J33.mjs → chunk-FTZRG54P.mjs} +1 -1
- package/dist/{chunk-QWFFSMKK.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-75XBZHOC.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-AEFWTCCE.mjs → chunk-I2GNNRFH.mjs} +1 -1
- package/dist/{chunk-2VOOH4YJ.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
- package/dist/{chunk-5BV4MHV6.mjs → chunk-KG3MNGT6.mjs} +1 -1
- package/dist/{chunk-LQASBVUG.mjs → chunk-LBUC4M6L.mjs} +1 -1
- package/dist/{chunk-TUACRDU3.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-B2TBKNIJ.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-FX6IXEMQ.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-FRXZ2OKW.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-ATDQQSX5.mjs → chunk-NAF6ERBI.mjs} +1 -1
- package/dist/{chunk-U6BCTHV7.mjs → chunk-NLFT5RPF.mjs} +1 -1
- package/dist/{chunk-RUZVSK25.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-U7KI2WJW.mjs → chunk-PWYA45TZ.mjs} +1 -1
- package/dist/{chunk-NVHQBM66.mjs → chunk-Q67RF7VO.mjs} +1 -1
- package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
- package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
- package/dist/{chunk-UN57ZYKQ.mjs → chunk-RLKXKF2X.mjs} +1 -1
- package/dist/{chunk-XW52WZ2B.mjs → chunk-S4A4VHOI.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
- package/dist/{chunk-PH67DP3M.mjs → chunk-WI2RL3XQ.mjs} +1 -1
- package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
- package/dist/{chunk-SJQY7JRS.mjs → chunk-XB3AHDV3.mjs} +1 -1
- package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
- package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
- package/dist/{chunk-N52FSTLG.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-AFQBDAWS.mjs → chunk-YOETYY5S.mjs} +1 -1
- package/dist/{chunk-2AWS5Z43.mjs → chunk-YQP4GEMN.mjs} +1 -1
- package/dist/chunk-YRMNCHFO.mjs +4 -0
- package/dist/{chunk-BY5TSHJ5.mjs → chunk-ZEPEWKBV.mjs} +1 -1
- package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/AdvancedComponents/app-header.js +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.js +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
- package/dist/components/AdvancedComponents/navigation-tabs.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/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +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/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.d.ts +1 -0
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/team-form.css +1 -0
- package/dist/components/DigitalColleagues/team-form.d.ts +24 -0
- package/dist/components/DigitalColleagues/team-form.js +5 -0
- package/dist/components/DigitalColleagues/team-form.mjs +2 -0
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/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/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/Card/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/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/FileView.js +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +13 -13
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/components/ui/switch.mjs +1 -3
- package/dist/index.js +19 -19
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +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/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 +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-PWYA45TZ.mjs";import"../../chunk-ZMB6R6JX.mjs";import"../../chunk-I2ZLKSWR.mjs";import"../../chunk-NLFT5RPF.mjs";import"../../chunk-HHYHENVF.mjs";import"../../chunk-PFLESLNT.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-AM2SRWFU.mjs";import"../../chunk-AMV3MECK.mjs";import"../../chunk-LUM6KEWN.mjs";import"../../chunk-ORNGKQM7.mjs";import"../../chunk-6DEY5ZDD.mjs";import"../../chunk-PFDPO3UX.mjs";import"../../chunk-WI2RL3XQ.mjs";import"../../chunk-GHZ6CUY3.mjs";import"../../chunk-EOXVYLPB.mjs";import"../../chunk-CTAQQFEO.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-74U3NYS2.mjs";import"../../chunk-2RGAV55J.mjs";import"../../chunk-D3B2YO7G.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";var mo=Object.create;var ke=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var fo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var bo=(e,t)=>{for(var o in t)ke(e,o,{get:t[o],enumerable:!0})},ut=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uo(t))!go.call(e,i)&&i!==o&&ke(e,i,{get:()=>t[i],enumerable:!(r=po(t,i))||r.enumerable});return e};var G=(e,t,o)=>(o=e!=null?mo(fo(e)):{},ut(t||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),vo=e=>ut(ke({},"__esModule",{value:!0}),e);var cr={};bo(cr,{FileList:()=>Ne,FileView:()=>lt,KnowledgeBrowser:()=>Le,KnowledgeView:()=>qe,TeamCard:()=>Fe,TeamsIndexView:()=>at});module.exports=vo(cr);var qt=require("react");var Mt=require("motion/react");var Ct=require("class-variance-authority");var Nt=require("clsx");var We="-",xo=e=>{let t=yo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let n=s.split(We);return n[0]===""&&n.length!==1&&n.shift(),bt(n,t)||ho(s)},getConflictingClassGroupIds:(s,n)=>{let f=o[s]||[];return n&&r[s]?[...f,...r[s]]:f}}},bt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),i=r?bt(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(We);return t.validators.find(({validator:s})=>s(a))?.classGroupId},ft=/^\[(.+)\]$/,ho=e=>{if(ft.test(e)){let t=ft.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},yo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return No(Object.entries(e.classGroups),o).forEach(([a,s])=>{Oe(s,r,a,t)}),r},Oe=(e,t,o,r)=>{e.forEach(i=>{if(typeof i=="string"){let a=i===""?t:gt(t,i);a.classGroupId=o;return}if(typeof i=="function"){if(wo(i)){Oe(i(r),t,o,r);return}t.validators.push({validator:i,classGroupId:o});return}Object.entries(i).forEach(([a,s])=>{Oe(s,gt(t,a),o,r)})})},gt=(e,t)=>{let o=e;return t.split(We).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},wo=e=>e.isThemeGetter,No=(e,t)=>t?e.map(([o,r])=>{let i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,n])=>[t+s,n])):a);return[o,i]}):e,Co=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,i=(a,s)=>{o.set(a,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let s=o.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return i(a,s),s},set(a,s){o.has(a)?o.set(a,s):i(a,s)}}},vt="!",Po=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,i=t[0],a=t.length,s=n=>{let f=[],y=0,N=0,D;for(let d=0;d<n.length;d++){let v=n[d];if(y===0){if(v===i&&(r||n.slice(d,d+a)===t)){f.push(n.slice(N,d)),N=d+a;continue}if(v==="/"){D=d;continue}}v==="["?y++:v==="]"&&y--}let M=f.length===0?n:n.substring(N),c=M.startsWith(vt),C=c?M.substring(1):M,l=D&&D>N?D-N:void 0;return{modifiers:f,hasImportantModifier:c,baseClassName:C,maybePostfixModifierPosition:l}};return o?n=>o({className:n,parseClassName:s}):s},Do=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},Ro=e=>({cache:Co(e.cacheSize),parseClassName:Po(e),...xo(e)}),So=/\s+/,To=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(So),n="";for(let f=s.length-1;f>=0;f-=1){let y=s[f],{modifiers:N,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:c}=o(y),C=!!c,l=r(C?M.substring(0,c):M);if(!l){if(!C){n=y+(n.length>0?" "+n:n);continue}if(l=r(M),!l){n=y+(n.length>0?" "+n:n);continue}C=!1}let d=Do(N).join(":"),v=D?d+vt:d,w=v+l;if(a.includes(w))continue;a.push(w);let j=i(l,C);for(let $=0;$<j.length;++$){let I=j[$];a.push(v+I)}n=y+(n.length>0?" "+n:n)}return n};function ko(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=xt(t))&&(r&&(r+=" "),r+=o);return r}var xt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=xt(e[r]))&&(o&&(o+=" "),o+=t);return o};function Mo(e,...t){let o,r,i,a=s;function s(f){let y=t.reduce((N,D)=>D(N),e());return o=Ro(y),r=o.cache.get,i=o.cache.set,a=n,n(f)}function n(f){let y=r(f);if(y)return y;let N=To(f,o);return i(f,N),N}return function(){return a(ko.apply(null,arguments))}}var T=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},ht=/^\[(?:([a-Pt-]+):)?(.+)\]$/i,Io=/^\d+\/\d+$/,Ao=new Set(["px","full","screen"]),Eo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fo=/^(inset_)?-?((\d+)?\.?(\d+)[a-Pt]+|0)Pt-?((\d+)?\.?(\d+)[a-Pt]+|0)/,Ho=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Z=e=>be(e)||Ao.has(e)||Io.test(e),oe=e=>ve(e,"length",Go),be=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>ve(e,"number",be),Pe=e=>!!e&&Number.isInteger(Number(e)),Bo=e=>e.endsWith("%")&&be(e.slice(0,-1)),b=e=>ht.test(e),re=e=>Eo.test(e),Ko=new Set(["length","size","percentage"]),Vo=e=>ve(e,Ko,yt),jo=e=>ve(e,"position",yt),$o=new Set(["image","url"]),Oo=e=>ve(e,$o,Uo),Wo=e=>ve(e,"",_o),De=()=>!0,ve=(e,t,o)=>{let r=ht.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Go=e=>zo.test(e)&&!Lo.test(e),yt=()=>!1,_o=e=>Fo.test(e),Uo=e=>Ho.test(e);var Xo=()=>{let e=T("colors"),t=T("spacing"),o=T("blur"),r=T("brightness"),i=T("borderColor"),a=T("borderRadius"),s=T("borderSpacing"),n=T("borderWidth"),f=T("contrast"),y=T("grayscale"),N=T("hueRotate"),D=T("invert"),M=T("gap"),c=T("gradientColorStops"),C=T("gradientColorStopPositions"),l=T("inset"),d=T("margin"),v=T("opacity"),w=T("padding"),j=T("saturate"),$=T("scale"),I=T("sepia"),O=T("skew"),ge=T("space"),R=T("translate"),X=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],Ve=()=>["auto",b,t],k=()=>[b,t],dt=()=>["",Z,oe],Se=()=>["auto",be,b],ct=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Te=()=>["solid","dashed","dotted","double","none"],mt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>["start","end","center","between","around","evenly","stretch"],Ce=()=>["","0",b],pt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[be,b];return{cacheSize:500,separator:":",theme:{colors:[De],spacing:[Z,oe],blur:["none","",re,b],brightness:Q(),borderColor:[e],borderRadius:["none","","full",re,b],borderSpacing:k(),borderWidth:dt(),contrast:Q(),grayscale:Ce(),hueRotate:Q(),invert:Ce(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Bo,oe],inset:Ve(),margin:Ve(),opacity:Q(),padding:k(),saturate:Q(),scale:Q(),sepia:Ce(),skew:Q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":pt()}],"break-before":[{"break-before":pt()}],"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:[...ct(),b]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[l]}],"inset-x":[{"inset-x":[l]}],"inset-y":[{"inset-y":[l]}],start:[{start:[l]}],end:[{end:[l]}],top:[{top:[l]}],right:[{right:[l]}],bottom:[{bottom:[l]}],left:[{left:[l]}],visibility:["visible","invisible","collapse"],Pt:[{Pt:["auto",Pe,b]}],basis:[{basis:Ve()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:Ce()}],shrink:[{shrink:Ce()}],order:[{order:["first","last","none",Pe,b]}],"grid-cols":[{"grid-cols":[De]}],"col-start-end":[{col:["auto",{span:["full",Pe,b]},b]}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":[De]}],"row-start-end":[{row:["auto",{span:[Pe,b]},b]}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...je()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...je(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...je(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],Pt:[{Pt:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],Pt:[{Pt:[d]}],mx:[{mx:[d]}],my:[{my:[d]}],ms:[{ms:[d]}],me:[{me:[d]}],mt:[{mt:[d]}],mr:[{mr:[d]}],mb:[{mb:[d]}],ml:[{ml:[d]}],"space-x":[{"space-x":[ge]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ge]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,t]}],"min-w":[{"min-w":[b,t,"min","max","fit"]}],"max-w":[{"max-w":[b,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[b,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,oe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[De]}],"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",b]}],"line-clamp":[{"line-clamp":["none",be,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Z,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Z,oe]}],"underline-offset":[{"underline-offset":["auto",Z,b]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],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",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ct(),jo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Oo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[c]}],"gradient-via":[{via:[c]}],"gradient-to":[{to:[c]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-q":[{"rounded-q":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...Te(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:Te()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Te()]}],"outline-offset":[{"outline-offset":[Z,b]}],"outline-w":[{outline:[Z,oe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:dt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Z,oe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,Wo]}],"shadow-color":[{shadow:[De]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...mt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":mt()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",re,b]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[D]}],saturate:[{saturate:[j]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[D]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[Pe,b]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Pt":[{"scroll-Pt":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-Pt":[{"scroll-Pt":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Z,oe,$e]}],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","Pt","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Pt:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-q","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-q"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-Pt":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Pt","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var wt=Mo(Xo);function p(...e){return wt((0,Nt.clsx)(e))}var Pt=require("react/jsx-runtime"),qo=(0,Ct.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 Me({className:e,variant:t,...o}){return(0,Pt.jsx)("div",{className:p(qo({variant:t}),e),...o})}var Dt=require("@radix-ui/react-slot"),St=G(require("react")),Jo=(0,Ct.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"}}}),A=St.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...i},a)=>(0,Pt.jsx)(e?Dt.Slot:"button",{className:p(Jo({className:t,size:o,variant:r})),ref:a,...i}));A.displayName="Button";function kt(e,t){let[o,r]=(0,qt.useState)(()=>{if(typeof window>"Pt")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch{return t}}),i=a=>{try{r(a),typeof window<"Pt"&&window.localStorage.setItem(e,JSON.stringify(a))}catch{}};return(0,qt.useEffect)(()=>{i(o)},[]),[o,i]}var Ae=require("react-icons/fa");function se({title:e,description:t,badge:o,primaryAction:r,secondaryAction:i,gradient:a,children:s,className:n}){let[f,y]=kt(`hero-section-minimized-${e.replace(/\s+/Pt,"-").toLowerCase()}`,!i&&!t),N=!i&&!t||f;return(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${a} p-8 text-white ${n||""}`,children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Pt.jsx)(Me,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Pt.jsx)("h2",{className:"text-3xl font-bold Pt-0",children:e})]}),(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[N&&r&&(0,Pt.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Pt.jsx)("button",{"aria-label":f?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>y(!f),style:{lineHeight:0},children:f?(0,Pt.jsx)(Ae.FaChevronDown,{size:22}):(0,Pt.jsx)(Ae.FaChevronUp,{size:22})})]})]}),!N&&(0,Pt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Pt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Pt.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Pt.jsx)(A,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),s&&(0,Pt.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var q=require("lucide-react");var It=G(require("react"));var Y=It.forwardRef(({className:e,type:t,...o},r)=>(0,Pt.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));Y.displayName="Input";var Ge=G(require("react")),U=G(require("@radix-ui/react-scroll-area"));var _e=Ge.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(U.Root,{ref:r,className:p("relative overflow-hidden",e),...o,children:[(0,Pt.jsx)(U.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Pt.jsx)(Et,{}),(0,Pt.jsx)(U.Corner,{})]}));_e.displayName=U.Root.displayName;var Et=Ge.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Pt.jsx)(U.ScrollAreaScrollbar,{ref:r,orientation:t,className:p("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),...o,children:(0,Pt.jsx)(U.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Et.displayName=U.ScrollAreaScrollbar.displayName;var zt=G(require("react")),Ee=zt.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Ee.displayName="Textarea";var x=G(require("@radix-ui/react-select")),ne=G(require("react")),Ft=x.Root;var Ht=x.Value,Ue=ne.forwardRef(({children:e,className:t,...o},r)=>(0,Pt.jsxs)(x.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,Pt.jsx)(x.Icon,{asChild:!0,children:(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ue.displayName=x.Trigger.displayName;var Bt=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Pt.jsx)(q.ChevronUp,{className:"h-4 w-4"})}));Bt.displayName=x.ScrollUpButton.displayName;var Kt=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4"})}));Kt.displayName=x.ScrollDownButton.displayName;var Xe=ne.forwardRef(({children:e,className:t,position:o="popper",...r},i)=>(0,Pt.jsx)(x.Portal,{children:(0,Pt.jsxs)(x.Content,{className:p("relative Pt-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:i,...r,children:[(0,Pt.jsx)(Bt,{}),(0,Pt.jsx)(x.Viewport,{className:p("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Pt.jsx)(Kt,{})]})}));Xe.displayName=x.Content.displayName;var Qo=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Qo.displayName=x.Label.displayName;var ze=ne.forwardRef(({children:e,className:t,...o},r)=>(0,Pt.jsxs)(x.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(x.ItemIndicator,{children:(0,Pt.jsx)(q.Check,{className:"h-4 w-4"})})}),(0,Pt.jsx)(x.ItemText,{children:e})]}));ze.displayName=x.Item.displayName;var Zo=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Zo.displayName=x.Separator.displayName;function $t({document:e,onSave:t,onCancel:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[a,s]=(0,qt.useState)({...e,updatedAt:new Date}),n=()=>{let l=new Set,d=new Set;return i.forEach(v=>{v.menuConfig.groupBy.forEach(w=>l.add(w))}),r.forEach(v=>{v.metadata&&Object.keys(v.metadata).forEach(w=>d.add(w))}),{contextKeys:Array.from(l).sort(),documentKeys:Array.from(d).sort(),allKeys:Array.from(new Set([...l,...d])).sort()}},f=l=>{let d=new Set;return r.forEach(v=>{v.metadata?.[l]&&d.add(String(v.metadata[l]))}),Array.from(d).sort()},y=n(),N=()=>{t(a)},D=(l,d)=>{s(v=>({...v,metadata:{...v.metadata,[l]:d}}))},M=(l,d)=>{d==="__custom__"?D(l,""):D(l,d)},c=()=>{let l=`field_${Date.now()}`;D(l,"")},C=l=>{s(d=>{let v={...d.metadata};return delete v[l],{...d,metadata:v}})};return(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Pt.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Pt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Pt.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Pt.jsx)(q.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Pt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(A,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,Pt.jsx)(q.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Pt.jsxs)(A,{size:"sm",onClick:N,className:"gap-2",children:[(0,Pt.jsx)(q.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Pt.jsx)(Y,{value:a.title,onChange:l=>s(d=>({...d,title:l.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Pt.jsx)(Ee,{value:a.description||"",onChange:l=>s(d=>({...d,description:l.target.value})),placeholder:"Document description...",rows:2})]}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),y.contextKeys.length>0&&(0,Pt.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",y.contextKeys.slice(0,4).join(", "),y.contextKeys.length>4&&` +${y.contextKeys.length-4}`]})]}),(0,Pt.jsxs)(A,{type:"button",variant:"outline",size:"sm",onClick:c,className:"gap-1 h-8",children:[(0,Pt.jsx)(q.Plus,{className:"h-3 w-3"}),"Add"]})]}),a.metadata&&Object.keys(a.metadata).length>0?(0,Pt.jsx)("div",{className:"space-y-2",children:Object.entries(a.metadata).map(([l,d])=>{let v=f(l);return(0,Pt.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Pt.jsx)(Y,{value:l,onChange:w=>{let j=w.target.value,$=a.metadata?.[l];s(I=>{let O={...I.metadata};return delete O[l],j&&(O[j]=$||""),{...I,metadata:O}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${l}`}),(0,Pt.jsx)("datalist",{id:`metadata-keys-${l}`,children:y.allKeys.map(w=>(0,Pt.jsx)("option",{value:w},w))}),(0,Pt.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),v.length>0?(0,Pt.jsxs)(Ft,{value:String(d||""),onValueChange:w=>M(l,w),children:[(0,Pt.jsx)(Ue,{className:"flex-1 h-8 text-sm",children:(0,Pt.jsx)(Ht,{placeholder:"Value"})}),(0,Pt.jsxs)(Xe,{children:[v.map(w=>(0,Pt.jsx)(ze,{value:w,children:w},w)),(0,Pt.jsx)(ze,{value:"__custom__",children:(0,Pt.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Pt.jsx)(Y,{value:String(d||""),onChange:w=>D(l,w.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Pt.jsx)(A,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(l),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Pt.jsx)(q.X,{className:"h-3 w-3"})})]},l)})}):(0,Pt.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Pt.jsx)(Me,{variant:"secondary",className:"font-mono",children:a.format.toUpperCase()})]})]})]}),(0,Pt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Pt.jsxs)("div",{className:"p-8",children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Pt.jsx)(Ee,{value:a.content||"",onChange:l=>s(d=>({...d,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var _t=e=>(0,Pt.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/Pt,"<br>").replace(/\*\*(.*?)\*\*/Pt,"<strong>$1</strong>").replace(/\*(.*?)\*/Pt,"<em>$1</em>").replace(/`(.*?)`/Pt,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Ot=e=>(0,Pt.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Yo=e=>(0,Pt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Pt.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Pt.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Pt.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Pt.jsx)("pre",{className:"text-sm",children:e})]}),er=e=>(0,Pt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Pt.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Pt.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Pt.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),_t(e)]});function Ut({document:e,onDocumentUpdate:t,editable:o=!0,renderers:r,availableDocuments:i=[],knowledgeContexts:a=[]}){let[s,n]=(0,qt.useState)(!1),f=c=>{switch(c){case"markdown":case"mdx":return(0,Pt.jsx)(q.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Pt.jsx)(q.File,{className:"h-6 w-6 text-success"});case"text":return(0,Pt.jsx)(q.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Pt.jsx)(q.File,{className:"h-6 w-6 text-muted-foreground"})}},y=c=>{switch(c){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},N=(c,C)=>{let l={markdown:_t,mdx:er,richtext:Yo,text:Ot},d=r?.[C]||l[C];return d?d(c):Ot(c)},D=c=>{n(!1),t?.(c)},M=()=>{n(!1)};return s?(0,Pt.jsx)($t,{document:e,onSave:D,onCancel:M,availableDocuments:i,knowledgeContexts:a}):(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Pt.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Pt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Pt.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Pt.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:f(e.format)}),(0,Pt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pt.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Pt.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),o&&(0,Pt.jsx)("div",{className:"flex-shrink-0",children:(0,Pt.jsxs)(A,{variant:"outline",size:"sm",onClick:()=>n(!0),className:"gap-2",children:[(0,Pt.jsx)(q.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Pt.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Pt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${y(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(c=>(0,Pt.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",c]},c))]})]}),(0,Pt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Pt.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Pt.jsxs)("div",{className:"mb-6",children:[(0,Pt.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Pt.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Pt.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([c,C])=>(0,Pt.jsxs)("div",{className:"flex gap-1",children:[(0,Pt.jsxs)("span",{className:"text-muted-foreground font-medium",children:[c.replace(/([A-Z])/Pt," $1").trim(),":"]}),(0,Pt.jsx)("span",{className:"text-foreground truncate",children:String(C)})]},c))})})]}),(0,Pt.jsx)("div",{className:"space-y-4",children:e.content?(0,Pt.jsx)("div",{className:"relative",children:(0,Pt.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:N(e.content,e.format)})}):(0,Pt.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Pt.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Pt.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Xt({label:e,documents:t,children:o,level:r,onDocumentClick:i,selectedDocumentId:a,showDocumentCount:s=!0}){let[n,f]=(0,qt.useState)(r===0),y=o&&Object.keys(o).length>0,N=t.length+(o?Object.values(o).reduce((c,C)=>c+C.documents.length,0):0),D=c=>{switch(c){case"markdown":case"mdx":return(0,Pt.jsx)(q.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Pt.jsx)(q.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Pt.jsx)(q.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},M=c=>{let C=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return C[c%C.length]};return(0,Pt.jsxs)("div",{className:"space-y-1",children:[(y||t.length>0)&&(0,Pt.jsxs)(Mt.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${n?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>f(!n),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Pt.jsx)("div",{className:`w-1 h-6 rounded-full ${M(r)}`}),(0,Pt.jsx)(Mt.motion.div,{animate:{rotate:n?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Pt.jsx)(q.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Pt.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Pt.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Pt.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&N>0&&(0,Pt.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Pt.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:N})})]})]}),(0,Pt.jsx)(Mt.motion.div,{initial:!1,animate:{height:n?"auto":0,opacity:n?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Pt.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((c,C)=>(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:C*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${a===c.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${r*20+20}px`},onClick:()=>i?.(c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Pt.jsx)("div",{className:"flex-shrink-0",children:D(c.format)}),(0,Pt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pt.jsx)("p",{className:`text-sm truncate transition-colors ${a===c.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:c.title}),c.description&&(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:c.description})]}),c.tags&&c.tags.length>0&&(0,Pt.jsx)("div",{className:"flex-shrink-0",children:(0,Pt.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:c.tags[0]})})]},c.id)),o&&Object.entries(o).map(([c,C])=>(0,Pt.jsx)(Xt,{label:c,documents:C.documents,children:C.children,level:r+1,onDocumentClick:i,selectedDocumentId:a,showDocumentCount:s},c))]})})]})}function Le({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:i,selectedDocumentId:a,className:s,editable:n=!0}){let[f,y]=(0,qt.useState)(""),[N,D]=(0,qt.useState)(null),M=(0,qt.useMemo)(()=>f?e.filter(l=>l.title.toLowerCase().includes(f.toLowerCase())||l.description?.toLowerCase().includes(f.toLowerCase())||l.tags?.some(d=>d.toLowerCase().includes(f.toLowerCase()))||Object.values(l.metadata||{}).some(d=>String(d).toLowerCase().includes(f.toLowerCase()))):e,[e,f]),c=(0,qt.useMemo)(()=>{let l=(d,v)=>{if(v.length===0)return{};let[w,...j]=v;return d.reduce((I,O)=>{let ge=O.metadata?.[w]||"Uncategorized",R=String(ge);if(I[R]||(I[R]={documents:[],children:{}}),j.length===0)I[R].documents.push(O);else{let X=l([O],j),W=Object.keys(X)[0];W&&(I[R].children||(I[R].children={}),I[R].children[W]?I[R].children[W].documents.push(...X[W].documents):I[R].children[W]=X[W])}return I},{})};return l(M,t.groupBy)},[M,t.groupBy]),C=l=>{D(l),o?.(l)};return(0,Pt.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,Pt.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Pt.jsx)("div",{className:"p-6 border-b border-border",children:(0,Pt.jsxs)("div",{className:"relative",children:[(0,Pt.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Pt.jsx)(q.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Pt.jsx)(Y,{placeholder:"Search knowledge base...",value:f,onChange:l=>y(l.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Pt.jsx)(_e,{className:"h-[calc(100%-100px)]",children:(0,Pt.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(c).map(([l,d])=>(0,Pt.jsx)(Xt,{label:l,documents:d.documents,children:d.children,level:0,onDocumentClick:C,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},l)),Object.keys(c).length===0&&(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Pt.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Pt.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Pt.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Pt.jsx)("div",{className:"flex-1 bg-background",children:N?(0,Pt.jsx)(Ut,{document:N,onDocumentUpdate:i,editable:n}):(0,Pt.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Pt.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-10 w-10 text-primary"})}),(0,Pt.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Pt.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function qe({documents:e=[],contexts:t=[],onDocumentClick:o=s=>console.log("Document clicked:",s),onDocumentShare:r=s=>console.log("Share document:",s),onLoadDocumentContent:i,selectedDocumentId:a}){let[s,n]=(0,qt.useState)(t[0]);return!t||t.length===0?(0,Pt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Pt.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Pt.jsx)(se,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Pt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Pt.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Pt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Pt.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Pt.jsx)(se,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Pt.jsxs)("div",{className:"mt-6",children:[(0,Pt.jsx)("div",{className:"border-b border-border",children:(0,Pt.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(f=>(0,Pt.jsxs)("button",{onClick:()=>n(f),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${s.id===f.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[f.icon,f.label]},f.id))})}),s.description&&(0,Pt.jsx)("div",{className:"mt-3 px-1",children:(0,Pt.jsx)("p",{className:"text-sm text-muted-foreground",children:s.description})})]})]}),(0,Pt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Pt.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Pt.jsx)(Le,{documents:e,menuConfig:s.menuConfig,onDocumentClick:o,onDocumentShare:r,selectedDocumentId:a})})})]})}var me=G(require("react"));var xe=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));xe.displayName="Card";var Je=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Je.displayName="CardHeader";var Qe=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("font-semibold leading-none tracking-tight",e),...t}));Qe.displayName="CardTitle";var Ze=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Ze.displayName="CardDescription";var he=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("p-6 pt-0",e),...t}));he.displayName="CardContent";var Ye=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("flex items-center p-6 pt-0",e),...t}));Ye.displayName="CardFooter";function Fe({team:e,onOpen:t,className:o}){return(0,Pt.jsx)(Mt.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Pt.jsxs)(xe,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Pt.jsxs)(Je,{children:[(0,Pt.jsx)(Qe,{className:"text-lg",children:e.name}),(0,Pt.jsx)(Ze,{className:"mt-1 text-sm",children:e.description})]}),(0,Pt.jsxs)(he,{className:"space-y-4",children:[(0,Pt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.Users,{className:"h-4 w-4 text-blue-500"}),(0,Pt.jsx)("span",{children:"Human"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Pt.jsx)("span",{children:"Digital"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Pt.jsx)("span",{children:"Projects"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Pt.jsx)(Ye,{className:"flex gap-2",children:(0,Pt.jsx)(A,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}var Re=G(require("react")),H=G(require("@radix-ui/react-dialog"));var Zt=H.Root;var tr=H.Portal;var Yt=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Overlay,{ref:o,className:p("fixed inset-0 Pt-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}));Yt.displayName=H.Overlay.displayName;var et=Re.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(tr,{children:[(0,Pt.jsx)(Yt,{}),(0,Pt.jsxs)(H.Content,{ref:r,className:p("fixed left-[50%] top-[50%] Pt-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,Pt.jsxs)(H.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,Pt.jsx)(q.X,{className:"h-4 w-4"}),(0,Pt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));et.displayName=H.Content.displayName;var tt=({className:e,...t})=>(0,Pt.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tt.displayName="DialogHeader";var or=({className:e,...t})=>(0,Pt.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});or.displayName="DialogFooter";var ot=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));ot.displayName=H.Title.displayName;var rt=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));rt.displayName=H.Description.displayName;function at({teams:e=[],onCreateTeam:t,onTeamOpen:o}){let[r,i]=(0,qt.useState)(!1),a=()=>{i(!0),t?.()},s=n=>{o?.(n)};return(0,Pt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Pt.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Pt.jsx)(se,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:a}}),(0,Pt.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,Pt.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Pt.jsxs)("div",{className:"text-center py-12",children:[(0,Pt.jsx)("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):(0,Pt.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>(0,Pt.jsx)(Fe,{team:n,onOpen:s},n.id))})]})]},"teams-index-view")}),(0,Pt.jsx)(Zt,{open:r,onOpenChange:i,children:(0,Pt.jsxs)(et,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Pt.jsxs)(tt,{children:[(0,Pt.jsx)(ot,{children:"Create New Team"}),(0,Pt.jsx)(rt,{children:"Set up a new team to collaborate with colleagues on projects."})]}),(0,Pt.jsx)("div",{className:"p-6 text-center text-muted-foreground",children:(0,Pt.jsx)("p",{children:"Team creation form coming soon..."})})]})})]})}var ue=G(require("@radix-ui/react-tabs"));function to({className:e,...t}){return(0,Pt.jsx)(ue.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function oo({className:e,...t}){return(0,Pt.jsx)(ue.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ro({className:e,...t}){return(0,Pt.jsx)(ue.Trigger,{"data-slot":"tabs-trigger",className:p("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})}var te=G(require("react")),h=G(require("@radix-ui/react-dropdown-menu")),we=require("@radix-ui/react-icons");var ao=h.Root,no=h.Trigger;var rr=te.forwardRef(({className:e,inset:t,children:o,...r},i)=>(0,Pt.jsxs)(h.SubTrigger,{ref:i,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,Pt.jsx)(we.ChevronRightIcon,{className:"ml-auto"})]}));rr.displayName=h.SubTrigger.displayName;var ar=te.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(h.SubContent,{ref:o,className:p("Pt-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}));ar.displayName=h.SubContent.displayName;var nt=te.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Pt.jsx)(h.Portal,{children:(0,Pt.jsx)(h.Content,{ref:r,sideOffset:t,className:p("Pt-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));nt.displayName=h.Content.displayName;var it=te.forwardRef(({className:e,inset:t,...o},r)=>(0,Pt.jsx)(h.Item,{ref:r,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));it.displayName=h.Item.displayName;var nr=te.forwardRef(({className:e,children:t,checked:o,...r},i)=>(0,Pt.jsxs)(h.CheckboxItem,{ref:i,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(h.ItemIndicator,{children:(0,Pt.jsx)(we.CheckIcon,{className:"h-4 w-4"})})}),t]}));nr.displayName=h.CheckboxItem.displayName;var ir=te.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(h.RadioItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(h.ItemIndicator,{children:(0,Pt.jsx)(we.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ir.displayName=h.RadioItem.displayName;var sr=te.forwardRef(({className:e,inset:t,...o},r)=>(0,Pt.jsx)(h.Label,{ref:r,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));sr.displayName=h.Label.displayName;var lr=te.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(h.Separator,{ref:o,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));lr.displayName=h.Separator.displayName;var dr=({className:e,...t})=>(0,Pt.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});dr.displayName="DropdownMenuShortcut";function so({activeTab:e,onTabChange:t,tabOptions:o,className:r="",maxWidth:i="700px",gridCols:a=6}){let s=o.find(n=>n.value===e);return(0,Pt.jsxs)(Mt.motion.div,{className:`flex-1 flex justify-center ${r}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Pt.jsx)("div",{className:"hidden md:block",children:(0,Pt.jsx)(to,{value:e,onValueChange:t,children:(0,Pt.jsx)(oo,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(a,o.length)}, minmax(0, 1fr))`},children:o.map(n=>(0,Pt.jsx)(Mt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Pt.jsx)(ro,{value:n.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:n.label})},n.value))})})}),(0,Pt.jsx)("div",{className:"md:hidden",children:(0,Pt.jsxs)(ao,{children:[(0,Pt.jsx)(no,{asChild:!0,children:(0,Pt.jsxs)(A,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Pt.jsx)(nt,{align:"center",className:"w-[180px]",children:o.map(n=>(0,Pt.jsx)(it,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function Ne({files:e,onFileClick:t,onFileEdit:o,onFileDelete:r,showHeader:i=!0,className:a}){return(0,Pt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${a||""}`,children:[i&&(0,Pt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Pt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Pt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Pt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Pt.jsx)("div",{className:"divide-y",children:e.map(s=>(0,Pt.jsxs)(Mt.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(s),children:[(0,Pt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Pt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Pt.jsx)("div",{children:(0,Pt.jsx)("p",{className:"font-medium",children:s.name})})]}),(0,Pt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.filesize}),(0,Pt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Pt.jsx)("span",{className:"text-sm md:text-base",children:typeof s.createdAt=="string"?s.createdAt:s.createdAt.toLocaleDateString()}),(0,Pt.jsx)("div",{className:"flex gap-1",children:(0,Pt.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),r?.(s)},children:(0,Pt.jsx)(q.Trash2,{className:"h-4 w-4"})})})]})]},s.name))})]})}function lt({initialFiles:e=[],onFileAdd:t,onFileEdit:o,onFileDelete:r,onFileClick:i,compactView:a=!1,className:s}){let[n,f]=(0,qt.useState)(e),[y,N]=(0,qt.useState)(""),[D,M]=(0,qt.useState)("all"),[c,C]=(0,qt.useState)("all");(0,qt.useEffect)(()=>{f(e)},[e]);let l=Array.from(new Set(n.map(R=>R.mimeType))),d=n.filter(R=>{let X=R.name.toLowerCase().includes(y.toLowerCase()),W=D==="all"||R.mimeType===D;return X&&W}),v=d.slice(0,10),w=d.filter(Boolean),j=()=>{t?.()},$=R=>{o?.(R)},I=R=>{console.log("deleting file",R),f(X=>X.filter(W=>W.name!==R.name)),r?.(R.id)},O=R=>{i?.(R)},ge=()=>{N(""),M("all")};return(0,Pt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Pt.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,Pt.jsx)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Pt.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Pt.jsx)(se,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:j},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Pt.jsx)(xe,{children:(0,Pt.jsx)(he,{className:"pt-6",children:(0,Pt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Pt.jsx)("div",{className:"flex-1",children:(0,Pt.jsxs)("div",{className:"relative",children:[(0,Pt.jsx)(q.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Pt.jsx)(Y,{placeholder:"Search files...",value:y,onChange:R=>N(R.target.value),className:"pl-9"})]})}),(y||D!=="all")&&(0,Pt.jsxs)(A,{variant:"outline",onClick:ge,className:"gap-2",children:[(0,Pt.jsx)(q.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(so,{activeTab:c,onTabChange:C,tabOptions:[{value:"all",label:`All Files (${d.length})`},{value:"recent",label:`Recent (${v.length})`}],maxWidth:"500px",gridCols:3}),c==="all"&&(0,Pt.jsx)(Ne,{files:d,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a}),c==="recent"&&(0,Pt.jsx)(Ne,{files:v,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a}),c==="shared"&&(0,Pt.jsx)(Ne,{files:w,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a})]}),d.length===0&&(0,Pt.jsx)(xe,{children:(0,Pt.jsx)(he,{className:"pt-6",children:(0,Pt.jsxs)("div",{className:"text-center py-8",children:[(0,Pt.jsx)(q.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Pt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Pt.jsx)("p",{className:"text-muted-foreground mb-4",children:y||D!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Pt.jsxs)(A,{onClick:j,className:"gap-2",children:[(0,Pt.jsx)(q.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}0&&(module.exports={FileList,FileView,KnowledgeBrowser,KnowledgeView,TeamCard,TeamsIndexView});
|
|
5
|
+
"use strict";var mo=Object.create;var ke=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var fo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var bo=(e,t)=>{for(var o in t)ke(e,o,{get:t[o],enumerable:!0})},ut=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uo(t))!go.call(e,i)&&i!==o&&ke(e,i,{get:()=>t[i],enumerable:!(r=po(t,i))||r.enumerable});return e};var G=(e,t,o)=>(o=e!=null?mo(fo(e)):{},ut(t||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),vo=e=>ut(ke({},"__esModule",{value:!0}),e);var cr={};bo(cr,{FileList:()=>Ne,FileView:()=>lt,KnowledgeBrowser:()=>Le,KnowledgeView:()=>qe,TeamCard:()=>Fe,TeamsIndexView:()=>at});module.exports=vo(cr);var qt=require("react");var Mt=require("motion/react");var Ct=require("class-variance-authority");var Nt=require("clsx");var We="-",xo=e=>{let t=yo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let n=s.split(We);return n[0]===""&&n.length!==1&&n.shift(),bt(n,t)||ho(s)},getConflictingClassGroupIds:(s,n)=>{let f=o[s]||[];return n&&r[s]?[...f,...r[s]]:f}}},bt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),i=r?bt(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(We);return t.validators.find(({validator:s})=>s(a))?.classGroupId},ft=/^\[(.+)\]$/,ho=e=>{if(ft.test(e)){let t=ft.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},yo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return No(Object.entries(e.classGroups),o).forEach(([a,s])=>{Oe(s,r,a,t)}),r},Oe=(e,t,o,r)=>{e.forEach(i=>{if(typeof i=="string"){let a=i===""?t:gt(t,i);a.classGroupId=o;return}if(typeof i=="function"){if(wo(i)){Oe(i(r),t,o,r);return}t.validators.push({validator:i,classGroupId:o});return}Object.entries(i).forEach(([a,s])=>{Oe(s,gt(t,a),o,r)})})},gt=(e,t)=>{let o=e;return t.split(We).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},wo=e=>e.isThemeGetter,No=(e,t)=>t?e.map(([o,r])=>{let i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,n])=>[t+s,n])):a);return[o,i]}):e,Co=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,i=(a,s)=>{o.set(a,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let s=o.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return i(a,s),s},set(a,s){o.has(a)?o.set(a,s):i(a,s)}}},vt="!",Po=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,i=t[0],a=t.length,s=n=>{let f=[],y=0,N=0,D;for(let d=0;d<n.length;d++){let v=n[d];if(y===0){if(v===i&&(r||n.slice(d,d+a)===t)){f.push(n.slice(N,d)),N=d+a;continue}if(v==="/"){D=d;continue}}v==="["?y++:v==="]"&&y--}let M=f.length===0?n:n.substring(N),c=M.startsWith(vt),C=c?M.substring(1):M,l=D&&D>N?D-N:void 0;return{modifiers:f,hasImportantModifier:c,baseClassName:C,maybePostfixModifierPosition:l}};return o?n=>o({className:n,parseClassName:s}):s},Do=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},Ro=e=>({cache:Co(e.cacheSize),parseClassName:Po(e),...xo(e)}),So=/\s+/,To=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(So),n="";for(let f=s.length-1;f>=0;f-=1){let y=s[f],{modifiers:N,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:c}=o(y),C=!!c,l=r(C?M.substring(0,c):M);if(!l){if(!C){n=y+(n.length>0?" "+n:n);continue}if(l=r(M),!l){n=y+(n.length>0?" "+n:n);continue}C=!1}let d=Do(N).join(":"),v=D?d+vt:d,w=v+l;if(a.includes(w))continue;a.push(w);let j=i(l,C);for(let $=0;$<j.length;++$){let I=j[$];a.push(v+I)}n=y+(n.length>0?" "+n:n)}return n};function ko(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=xt(t))&&(r&&(r+=" "),r+=o);return r}var xt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=xt(e[r]))&&(o&&(o+=" "),o+=t);return o};function Mo(e,...t){let o,r,i,a=s;function s(f){let y=t.reduce((N,D)=>D(N),e());return o=Ro(y),r=o.cache.get,i=o.cache.set,a=n,n(f)}function n(f){let y=r(f);if(y)return y;let N=To(f,o);return i(f,N),N}return function(){return a(ko.apply(null,arguments))}}var T=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},ht=/^\[(?:([a-Pt-]+):)?(.+)\]$/i,Io=/^\d+\/\d+$/,Ao=new Set(["px","full","screen"]),Eo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fo=/^(inset_)?-?((\d+)?\.?(\d+)[a-Pt]+|0)Pt-?((\d+)?\.?(\d+)[a-Pt]+|0)/,Ho=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Z=e=>be(e)||Ao.has(e)||Io.test(e),oe=e=>ve(e,"length",Go),be=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>ve(e,"number",be),Pe=e=>!!e&&Number.isInteger(Number(e)),Bo=e=>e.endsWith("%")&&be(e.slice(0,-1)),b=e=>ht.test(e),re=e=>Eo.test(e),Ko=new Set(["length","size","percentage"]),Vo=e=>ve(e,Ko,yt),jo=e=>ve(e,"position",yt),$o=new Set(["image","url"]),Oo=e=>ve(e,$o,Uo),Wo=e=>ve(e,"",_o),De=()=>!0,ve=(e,t,o)=>{let r=ht.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Go=e=>zo.test(e)&&!Lo.test(e),yt=()=>!1,_o=e=>Fo.test(e),Uo=e=>Ho.test(e);var Xo=()=>{let e=T("colors"),t=T("spacing"),o=T("blur"),r=T("brightness"),i=T("borderColor"),a=T("borderRadius"),s=T("borderSpacing"),n=T("borderWidth"),f=T("contrast"),y=T("grayscale"),N=T("hueRotate"),D=T("invert"),M=T("gap"),c=T("gradientColorStops"),C=T("gradientColorStopPositions"),l=T("inset"),d=T("margin"),v=T("opacity"),w=T("padding"),j=T("saturate"),$=T("scale"),I=T("sepia"),O=T("skew"),ge=T("space"),R=T("translate"),X=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],Ve=()=>["auto",b,t],k=()=>[b,t],dt=()=>["",Z,oe],Se=()=>["auto",be,b],ct=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Te=()=>["solid","dashed","dotted","double","none"],mt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>["start","end","center","between","around","evenly","stretch"],Ce=()=>["","0",b],pt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[be,b];return{cacheSize:500,separator:":",theme:{colors:[De],spacing:[Z,oe],blur:["none","",re,b],brightness:Q(),borderColor:[e],borderRadius:["none","","full",re,b],borderSpacing:k(),borderWidth:dt(),contrast:Q(),grayscale:Ce(),hueRotate:Q(),invert:Ce(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Bo,oe],inset:Ve(),margin:Ve(),opacity:Q(),padding:k(),saturate:Q(),scale:Q(),sepia:Ce(),skew:Q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":pt()}],"break-before":[{"break-before":pt()}],"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:[...ct(),b]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[l]}],"inset-x":[{"inset-x":[l]}],"inset-y":[{"inset-y":[l]}],start:[{start:[l]}],end:[{end:[l]}],top:[{top:[l]}],right:[{right:[l]}],bottom:[{bottom:[l]}],left:[{left:[l]}],visibility:["visible","invisible","collapse"],Pt:[{Pt:["auto",Pe,b]}],basis:[{basis:Ve()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:Ce()}],shrink:[{shrink:Ce()}],order:[{order:["first","last","none",Pe,b]}],"grid-cols":[{"grid-cols":[De]}],"col-start-end":[{col:["auto",{span:["full",Pe,b]},b]}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":[De]}],"row-start-end":[{row:["auto",{span:[Pe,b]},b]}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...je()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...je(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...je(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],Pt:[{Pt:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],Pt:[{Pt:[d]}],mx:[{mx:[d]}],my:[{my:[d]}],ms:[{ms:[d]}],me:[{me:[d]}],mt:[{mt:[d]}],mr:[{mr:[d]}],mb:[{mb:[d]}],ml:[{ml:[d]}],"space-x":[{"space-x":[ge]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ge]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,t]}],"min-w":[{"min-w":[b,t,"min","max","fit"]}],"max-w":[{"max-w":[b,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[b,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,oe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[De]}],"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",b]}],"line-clamp":[{"line-clamp":["none",be,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Z,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Z,oe]}],"underline-offset":[{"underline-offset":["auto",Z,b]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],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",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ct(),jo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Oo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[c]}],"gradient-via":[{via:[c]}],"gradient-to":[{to:[c]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-q":[{"rounded-q":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...Te(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:Te()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Te()]}],"outline-offset":[{"outline-offset":[Z,b]}],"outline-w":[{outline:[Z,oe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:dt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Z,oe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,Wo]}],"shadow-color":[{shadow:[De]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...mt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":mt()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",re,b]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[D]}],saturate:[{saturate:[j]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[D]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[Pe,b]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Pt":[{"scroll-Pt":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-Pt":[{"scroll-Pt":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Z,oe,$e]}],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","Pt","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Pt:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-q","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-q"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-Pt":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Pt","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var wt=Mo(Xo);function p(...e){return wt((0,Nt.clsx)(e))}var Pt=require("react/jsx-runtime"),qo=(0,Ct.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 Me({className:e,variant:t,...o}){return(0,Pt.jsx)("div",{className:p(qo({variant:t}),e),...o})}var Dt=require("@radix-ui/react-slot"),St=G(require("react")),Jo=(0,Ct.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"}}}),A=St.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...i},a)=>(0,Pt.jsx)(e?Dt.Slot:"button",{className:p(Jo({className:t,size:o,variant:r})),ref:a,...i}));A.displayName="Button";function kt(e,t){let[o,r]=(0,qt.useState)(()=>{if(typeof window>"Pt")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch{return t}}),i=a=>{try{r(a),typeof window<"Pt"&&window.localStorage.setItem(e,JSON.stringify(a))}catch{}};return(0,qt.useEffect)(()=>{i(o)},[]),[o,i]}var Ae=require("react-icons/fa");function se({title:e,description:t,badge:o,primaryAction:r,secondaryAction:i,gradient:a,children:s,className:n}){let[f,y]=kt(`hero-section-minimized-${e.replace(/\s+/Pt,"-").toLowerCase()}`,!i&&!t),N=!i&&!t||f;return(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${a} p-8 text-white ${n||""}`,children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Pt.jsx)(Me,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Pt.jsx)("h2",{className:"text-3xl font-bold Pt-0",children:e})]}),(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[N&&r&&(0,Pt.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Pt.jsx)("button",{"aria-label":f?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>y(!f),style:{lineHeight:0},children:f?(0,Pt.jsx)(Ae.FaChevronDown,{size:22}):(0,Pt.jsx)(Ae.FaChevronUp,{size:22})})]})]}),!N&&(0,Pt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Pt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Pt.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Pt.jsx)(A,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),s&&(0,Pt.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var q=require("lucide-react");var It=G(require("react"));var Y=It.forwardRef(({className:e,type:t,...o},r)=>(0,Pt.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));Y.displayName="Input";var Ge=G(require("react")),U=G(require("@radix-ui/react-scroll-area"));var _e=Ge.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(U.Root,{ref:r,className:p("relative overflow-hidden",e),...o,children:[(0,Pt.jsx)(U.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Pt.jsx)(Et,{}),(0,Pt.jsx)(U.Corner,{})]}));_e.displayName=U.Root.displayName;var Et=Ge.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Pt.jsx)(U.ScrollAreaScrollbar,{ref:r,orientation:t,className:p("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),...o,children:(0,Pt.jsx)(U.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Et.displayName=U.ScrollAreaScrollbar.displayName;var zt=G(require("react")),Ee=zt.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Ee.displayName="Textarea";var x=G(require("@radix-ui/react-select")),ne=G(require("react")),Ft=x.Root;var Ht=x.Value,Ue=ne.forwardRef(({children:e,className:t,...o},r)=>(0,Pt.jsxs)(x.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,Pt.jsx)(x.Icon,{asChild:!0,children:(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ue.displayName=x.Trigger.displayName;var Bt=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Pt.jsx)(q.ChevronUp,{className:"h-4 w-4"})}));Bt.displayName=x.ScrollUpButton.displayName;var Kt=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4"})}));Kt.displayName=x.ScrollDownButton.displayName;var Xe=ne.forwardRef(({children:e,className:t,position:o="popper",...r},i)=>(0,Pt.jsx)(x.Portal,{children:(0,Pt.jsxs)(x.Content,{className:p("relative Pt-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:i,...r,children:[(0,Pt.jsx)(Bt,{}),(0,Pt.jsx)(x.Viewport,{className:p("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Pt.jsx)(Kt,{})]})}));Xe.displayName=x.Content.displayName;var Qo=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Qo.displayName=x.Label.displayName;var ze=ne.forwardRef(({children:e,className:t,...o},r)=>(0,Pt.jsxs)(x.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(x.ItemIndicator,{children:(0,Pt.jsx)(q.Check,{className:"h-4 w-4"})})}),(0,Pt.jsx)(x.ItemText,{children:e})]}));ze.displayName=x.Item.displayName;var Zo=ne.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(x.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Zo.displayName=x.Separator.displayName;function $t({document:e,onSave:t,onCancel:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[a,s]=(0,qt.useState)({...e,updatedAt:new Date}),n=()=>{let l=new Set,d=new Set;return i.forEach(v=>{v.menuConfig.groupBy.forEach(w=>l.add(w))}),r.forEach(v=>{v.metadata&&Object.keys(v.metadata).forEach(w=>d.add(w))}),{contextKeys:Array.from(l).sort(),documentKeys:Array.from(d).sort(),allKeys:Array.from(new Set([...l,...d])).sort()}},f=l=>{let d=new Set;return r.forEach(v=>{v.metadata?.[l]&&d.add(String(v.metadata[l]))}),Array.from(d).sort()},y=n(),N=()=>{t(a)},D=(l,d)=>{s(v=>({...v,metadata:{...v.metadata,[l]:d}}))},M=(l,d)=>{d==="__custom__"?D(l,""):D(l,d)},c=()=>{let l=`field_${Date.now()}`;D(l,"")},C=l=>{s(d=>{let v={...d.metadata};return delete v[l],{...d,metadata:v}})};return(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Pt.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Pt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Pt.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Pt.jsx)(q.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Pt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(A,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,Pt.jsx)(q.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Pt.jsxs)(A,{size:"sm",onClick:N,className:"gap-2",children:[(0,Pt.jsx)(q.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Pt.jsx)(Y,{value:a.title,onChange:l=>s(d=>({...d,title:l.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Pt.jsx)(Ee,{value:a.description||"",onChange:l=>s(d=>({...d,description:l.target.value})),placeholder:"Document description...",rows:2})]}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),y.contextKeys.length>0&&(0,Pt.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",y.contextKeys.slice(0,4).join(", "),y.contextKeys.length>4&&` +${y.contextKeys.length-4}`]})]}),(0,Pt.jsxs)(A,{type:"button",variant:"outline",size:"sm",onClick:c,className:"gap-1 h-8",children:[(0,Pt.jsx)(q.Plus,{className:"h-3 w-3"}),"Add"]})]}),a.metadata&&Object.keys(a.metadata).length>0?(0,Pt.jsx)("div",{className:"space-y-2",children:Object.entries(a.metadata).map(([l,d])=>{let v=f(l);return(0,Pt.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Pt.jsx)(Y,{value:l,onChange:w=>{let j=w.target.value,$=a.metadata?.[l];s(I=>{let O={...I.metadata};return delete O[l],j&&(O[j]=$||""),{...I,metadata:O}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${l}`}),(0,Pt.jsx)("datalist",{id:`metadata-keys-${l}`,children:y.allKeys.map(w=>(0,Pt.jsx)("option",{value:w},w))}),(0,Pt.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),v.length>0?(0,Pt.jsxs)(Ft,{value:String(d||""),onValueChange:w=>M(l,w),children:[(0,Pt.jsx)(Ue,{className:"flex-1 h-8 text-sm",children:(0,Pt.jsx)(Ht,{placeholder:"Value"})}),(0,Pt.jsxs)(Xe,{children:[v.map(w=>(0,Pt.jsx)(ze,{value:w,children:w},w)),(0,Pt.jsx)(ze,{value:"__custom__",children:(0,Pt.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Pt.jsx)(Y,{value:String(d||""),onChange:w=>D(l,w.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Pt.jsx)(A,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(l),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Pt.jsx)(q.X,{className:"h-3 w-3"})})]},l)})}):(0,Pt.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Pt.jsx)(Me,{variant:"secondary",className:"font-mono",children:a.format.toUpperCase()})]})]})]}),(0,Pt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Pt.jsxs)("div",{className:"p-8",children:[(0,Pt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Pt.jsx)(Ee,{value:a.content||"",onChange:l=>s(d=>({...d,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var _t=e=>(0,Pt.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/Pt,"<br>").replace(/\*\*(.*?)\*\*/Pt,"<strong>$1</strong>").replace(/\*(.*?)\*/Pt,"<em>$1</em>").replace(/`(.*?)`/Pt,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Ot=e=>(0,Pt.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Yo=e=>(0,Pt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Pt.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Pt.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Pt.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Pt.jsx)("pre",{className:"text-sm",children:e})]}),er=e=>(0,Pt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Pt.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Pt.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Pt.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),_t(e)]});function Ut({document:e,onDocumentUpdate:t,editable:o=!0,renderers:r,availableDocuments:i=[],knowledgeContexts:a=[]}){let[s,n]=(0,qt.useState)(!1),f=c=>{switch(c){case"markdown":case"mdx":return(0,Pt.jsx)(q.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Pt.jsx)(q.File,{className:"h-6 w-6 text-success"});case"text":return(0,Pt.jsx)(q.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Pt.jsx)(q.File,{className:"h-6 w-6 text-muted-foreground"})}},y=c=>{switch(c){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},N=(c,C)=>{let l={markdown:_t,mdx:er,richtext:Yo,text:Ot},d=r?.[C]||l[C];return d?d(c):Ot(c)},D=c=>{n(!1),t?.(c)},M=()=>{n(!1)};return s?(0,Pt.jsx)($t,{document:e,onSave:D,onCancel:M,availableDocuments:i,knowledgeContexts:a}):(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Pt.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Pt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Pt.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Pt.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:f(e.format)}),(0,Pt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pt.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Pt.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),o&&(0,Pt.jsx)("div",{className:"flex-shrink-0",children:(0,Pt.jsxs)(A,{variant:"outline",size:"sm",onClick:()=>n(!0),className:"gap-2",children:[(0,Pt.jsx)(q.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Pt.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Pt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${y(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(c=>(0,Pt.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",c]},c))]})]}),(0,Pt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Pt.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Pt.jsxs)("div",{className:"mb-6",children:[(0,Pt.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Pt.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Pt.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([c,C])=>(0,Pt.jsxs)("div",{className:"flex gap-1",children:[(0,Pt.jsxs)("span",{className:"text-muted-foreground font-medium",children:[c.replace(/([A-Z])/Pt," $1").trim(),":"]}),(0,Pt.jsx)("span",{className:"text-foreground truncate",children:String(C)})]},c))})})]}),(0,Pt.jsx)("div",{className:"space-y-4",children:e.content?(0,Pt.jsx)("div",{className:"relative",children:(0,Pt.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:N(e.content,e.format)})}):(0,Pt.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Pt.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Pt.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Xt({label:e,documents:t,children:o,level:r,onDocumentClick:i,selectedDocumentId:a,showDocumentCount:s=!0}){let[n,f]=(0,qt.useState)(r===0),y=o&&Object.keys(o).length>0,N=t.length+(o?Object.values(o).reduce((c,C)=>c+C.documents.length,0):0),D=c=>{switch(c){case"markdown":case"mdx":return(0,Pt.jsx)(q.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Pt.jsx)(q.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Pt.jsx)(q.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},M=c=>{let C=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return C[c%C.length]};return(0,Pt.jsxs)("div",{className:"space-y-1",children:[(y||t.length>0)&&(0,Pt.jsxs)(Mt.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${n?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>f(!n),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Pt.jsx)("div",{className:`w-1 h-6 rounded-full ${M(r)}`}),(0,Pt.jsx)(Mt.motion.div,{animate:{rotate:n?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Pt.jsx)(q.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Pt.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Pt.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Pt.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&N>0&&(0,Pt.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Pt.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:N})})]})]}),(0,Pt.jsx)(Mt.motion.div,{initial:!1,animate:{height:n?"auto":0,opacity:n?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Pt.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((c,C)=>(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:C*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${a===c.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${r*20+20}px`},onClick:()=>i?.(c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Pt.jsx)("div",{className:"flex-shrink-0",children:D(c.format)}),(0,Pt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pt.jsx)("p",{className:`text-sm truncate transition-colors ${a===c.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:c.title}),c.description&&(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:c.description})]}),c.tags&&c.tags.length>0&&(0,Pt.jsx)("div",{className:"flex-shrink-0",children:(0,Pt.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:c.tags[0]})})]},c.id)),o&&Object.entries(o).map(([c,C])=>(0,Pt.jsx)(Xt,{label:c,documents:C.documents,children:C.children,level:r+1,onDocumentClick:i,selectedDocumentId:a,showDocumentCount:s},c))]})})]})}function Le({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:i,selectedDocumentId:a,className:s,editable:n=!0}){let[f,y]=(0,qt.useState)(""),[N,D]=(0,qt.useState)(null),M=(0,qt.useMemo)(()=>f?e.filter(l=>l.title.toLowerCase().includes(f.toLowerCase())||l.description?.toLowerCase().includes(f.toLowerCase())||l.tags?.some(d=>d.toLowerCase().includes(f.toLowerCase()))||Object.values(l.metadata||{}).some(d=>String(d).toLowerCase().includes(f.toLowerCase()))):e,[e,f]),c=(0,qt.useMemo)(()=>{let l=(d,v)=>{if(v.length===0)return{};let[w,...j]=v;return d.reduce((I,O)=>{let ge=O.metadata?.[w]||"Uncategorized",R=String(ge);if(I[R]||(I[R]={documents:[],children:{}}),j.length===0)I[R].documents.push(O);else{let X=l([O],j),W=Object.keys(X)[0];W&&(I[R].children||(I[R].children={}),I[R].children[W]?I[R].children[W].documents.push(...X[W].documents):I[R].children[W]=X[W])}return I},{})};return l(M,t.groupBy)},[M,t.groupBy]),C=l=>{D(l),o?.(l)};return(0,Pt.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,Pt.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Pt.jsx)("div",{className:"p-6 border-b border-border",children:(0,Pt.jsxs)("div",{className:"relative",children:[(0,Pt.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Pt.jsx)(q.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Pt.jsx)(Y,{placeholder:"Search knowledge base...",value:f,onChange:l=>y(l.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Pt.jsx)(_e,{className:"h-[calc(100%-100px)]",children:(0,Pt.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(c).map(([l,d])=>(0,Pt.jsx)(Xt,{label:l,documents:d.documents,children:d.children,level:0,onDocumentClick:C,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},l)),Object.keys(c).length===0&&(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Pt.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Pt.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Pt.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Pt.jsx)("div",{className:"flex-1 bg-background",children:N?(0,Pt.jsx)(Ut,{document:N,onDocumentUpdate:i,editable:n}):(0,Pt.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Pt.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Pt.jsx)(q.FileText,{className:"h-10 w-10 text-primary"})}),(0,Pt.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Pt.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function qe({documents:e=[],contexts:t=[],onDocumentClick:o=s=>console.log("Document clicked:",s),onDocumentShare:r=s=>console.log("Share document:",s),onLoadDocumentContent:i,selectedDocumentId:a}){let[s,n]=(0,qt.useState)(t[0]);return!t||t.length===0?(0,Pt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Pt.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Pt.jsx)(se,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Pt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Pt.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Pt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Pt.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Pt.jsx)(se,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Pt.jsxs)("div",{className:"mt-6",children:[(0,Pt.jsx)("div",{className:"border-b border-border",children:(0,Pt.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(f=>(0,Pt.jsxs)("button",{onClick:()=>n(f),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${s.id===f.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[f.icon,f.label]},f.id))})}),s.description&&(0,Pt.jsx)("div",{className:"mt-3 px-1",children:(0,Pt.jsx)("p",{className:"text-sm text-muted-foreground",children:s.description})})]})]}),(0,Pt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Pt.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Pt.jsx)(Le,{documents:e,menuConfig:s.menuConfig,onDocumentClick:o,onDocumentShare:r,selectedDocumentId:a})})})]})}var me=G(require("react"));var xe=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));xe.displayName="Card";var Je=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Je.displayName="CardHeader";var Qe=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("font-semibold leading-none tracking-tight",e),...t}));Qe.displayName="CardTitle";var Ze=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Ze.displayName="CardDescription";var he=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("p-6 pt-0",e),...t}));he.displayName="CardContent";var Ye=me.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)("div",{ref:o,className:p("flex items-center p-6 pt-0",e),...t}));Ye.displayName="CardFooter";function Fe({team:e,onOpen:t,className:o}){return(0,Pt.jsx)(Mt.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Pt.jsxs)(xe,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Pt.jsxs)(Je,{children:[(0,Pt.jsx)(Qe,{className:"text-lg",children:e.name}),(0,Pt.jsx)(Ze,{className:"mt-1 text-sm",children:e.description})]}),(0,Pt.jsxs)(he,{className:"space-y-4",children:[(0,Pt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.Users,{className:"h-4 w-4 text-blue-500"}),(0,Pt.jsx)("span",{children:"Human"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Pt.jsx)("span",{children:"Digital"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Pt.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(q.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Pt.jsx)("span",{children:"Projects"})]}),(0,Pt.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Pt.jsx)(Ye,{className:"flex gap-2",children:(0,Pt.jsx)(A,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}var Re=G(require("react")),H=G(require("@radix-ui/react-dialog"));var Zt=H.Root;var tr=H.Portal;var Yt=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Overlay,{ref:o,className:p("fixed inset-0 Pt-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}));Yt.displayName=H.Overlay.displayName;var et=Re.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(tr,{children:[(0,Pt.jsx)(Yt,{}),(0,Pt.jsxs)(H.Content,{ref:r,className:p("fixed left-[50%] top-[50%] Pt-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,Pt.jsxs)(H.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,Pt.jsx)(q.X,{className:"h-4 w-4"}),(0,Pt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));et.displayName=H.Content.displayName;var tt=({className:e,...t})=>(0,Pt.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tt.displayName="DialogHeader";var or=({className:e,...t})=>(0,Pt.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});or.displayName="DialogFooter";var ot=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));ot.displayName=H.Title.displayName;var rt=Re.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(H.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));rt.displayName=H.Description.displayName;function at({teams:e=[],onCreateTeam:t,onTeamOpen:o}){let[r,i]=(0,qt.useState)(!1),a=()=>{i(!0),t?.()},s=n=>{o?.(n)};return(0,Pt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Pt.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,Pt.jsxs)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Pt.jsx)(se,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:a}}),(0,Pt.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,Pt.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Pt.jsxs)("div",{className:"text-center py-12",children:[(0,Pt.jsx)("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):(0,Pt.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>(0,Pt.jsx)(Fe,{team:n,onOpen:s},n.id))})]})]},"teams-index-view")}),(0,Pt.jsx)(Zt,{open:r,onOpenChange:i,children:(0,Pt.jsxs)(et,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Pt.jsxs)(tt,{children:[(0,Pt.jsx)(ot,{children:"Create New Team"}),(0,Pt.jsx)(rt,{children:"Set up a new team to collaborate with colleagues on projects."})]}),(0,Pt.jsx)("div",{className:"p-6 text-center text-muted-foreground",children:(0,Pt.jsx)("p",{children:"Team creation form coming soon..."})})]})})]})}var ue=G(require("@radix-ui/react-tabs"));function to({className:e,...t}){return(0,Pt.jsx)(ue.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function oo({className:e,...t}){return(0,Pt.jsx)(ue.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ro({className:e,...t}){return(0,Pt.jsx)(ue.Trigger,{"data-slot":"tabs-trigger",className:p("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})}var te=G(require("react")),h=G(require("@radix-ui/react-dropdown-menu")),we=require("@radix-ui/react-icons");var ao=h.Root,no=h.Trigger;var rr=te.forwardRef(({className:e,inset:t,children:o,...r},i)=>(0,Pt.jsxs)(h.SubTrigger,{ref:i,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,Pt.jsx)(we.ChevronRightIcon,{className:"ml-auto"})]}));rr.displayName=h.SubTrigger.displayName;var ar=te.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(h.SubContent,{ref:o,className:p("Pt-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}));ar.displayName=h.SubContent.displayName;var nt=te.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Pt.jsx)(h.Portal,{children:(0,Pt.jsx)(h.Content,{ref:r,sideOffset:t,className:p("Pt-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));nt.displayName=h.Content.displayName;var it=te.forwardRef(({className:e,inset:t,...o},r)=>(0,Pt.jsx)(h.Item,{ref:r,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));it.displayName=h.Item.displayName;var nr=te.forwardRef(({className:e,children:t,checked:o,...r},i)=>(0,Pt.jsxs)(h.CheckboxItem,{ref:i,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(h.ItemIndicator,{children:(0,Pt.jsx)(we.CheckIcon,{className:"h-4 w-4"})})}),t]}));nr.displayName=h.CheckboxItem.displayName;var ir=te.forwardRef(({className:e,children:t,...o},r)=>(0,Pt.jsxs)(h.RadioItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Pt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pt.jsx)(h.ItemIndicator,{children:(0,Pt.jsx)(we.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ir.displayName=h.RadioItem.displayName;var sr=te.forwardRef(({className:e,inset:t,...o},r)=>(0,Pt.jsx)(h.Label,{ref:r,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));sr.displayName=h.Label.displayName;var lr=te.forwardRef(({className:e,...t},o)=>(0,Pt.jsx)(h.Separator,{ref:o,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));lr.displayName=h.Separator.displayName;var dr=({className:e,...t})=>(0,Pt.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});dr.displayName="DropdownMenuShortcut";function so({activeTab:e,onTabChange:t,tabOptions:o,className:r="",maxWidth:i="700px",gridCols:a=6}){let s=o.find(n=>n.value===e);return(0,Pt.jsxs)(Mt.motion.div,{className:`flex-1 flex justify-center ${r}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Pt.jsx)("div",{className:"hidden lg:block",children:(0,Pt.jsx)(to,{value:e,onValueChange:t,children:(0,Pt.jsx)(oo,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(a,o.length)}, minmax(0, 1fr))`},children:o.map(n=>(0,Pt.jsx)(Mt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Pt.jsx)(ro,{value:n.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:n.label})},n.value))})})}),(0,Pt.jsx)("div",{className:"lg:hidden",children:(0,Pt.jsxs)(ao,{children:[(0,Pt.jsx)(no,{asChild:!0,children:(0,Pt.jsxs)(A,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Pt.jsx)(q.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Pt.jsx)(nt,{align:"center",className:"w-[180px]",children:o.map(n=>(0,Pt.jsx)(it,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function Ne({files:e,onFileClick:t,onFileEdit:o,onFileDelete:r,showHeader:i=!0,className:a}){return(0,Pt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${a||""}`,children:[i&&(0,Pt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Pt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Pt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Pt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Pt.jsx)("div",{className:"divide-y",children:e.map(s=>(0,Pt.jsxs)(Mt.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(s),children:[(0,Pt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Pt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Pt.jsx)("div",{children:(0,Pt.jsx)("p",{className:"font-medium",children:s.name})})]}),(0,Pt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.filesize}),(0,Pt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Pt.jsx)("span",{className:"text-sm md:text-base",children:typeof s.createdAt=="string"?s.createdAt:s.createdAt.toLocaleDateString()}),(0,Pt.jsx)("div",{className:"flex gap-1",children:(0,Pt.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),r?.(s)},children:(0,Pt.jsx)(q.Trash2,{className:"h-4 w-4"})})})]})]},s.name))})]})}function lt({initialFiles:e=[],onFileAdd:t,onFileEdit:o,onFileDelete:r,onFileClick:i,compactView:a=!1,className:s}){let[n,f]=(0,qt.useState)(e),[y,N]=(0,qt.useState)(""),[D,M]=(0,qt.useState)("all"),[c,C]=(0,qt.useState)("all");(0,qt.useEffect)(()=>{f(e)},[e]);let l=Array.from(new Set(n.map(R=>R.mimeType))),d=n.filter(R=>{let X=R.name.toLowerCase().includes(y.toLowerCase()),W=D==="all"||R.mimeType===D;return X&&W}),v=d.slice(0,10),w=d.filter(Boolean),j=()=>{t?.()},$=R=>{o?.(R)},I=R=>{console.log("deleting file",R),f(X=>X.filter(W=>W.name!==R.name)),r?.(R.id)},O=R=>{i?.(R)},ge=()=>{N(""),M("all")};return(0,Pt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Pt.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,Pt.jsx)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Pt.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Pt.jsx)(se,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:j},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Pt.jsx)(xe,{children:(0,Pt.jsx)(he,{className:"pt-6",children:(0,Pt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Pt.jsx)("div",{className:"flex-1",children:(0,Pt.jsxs)("div",{className:"relative",children:[(0,Pt.jsx)(q.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Pt.jsx)(Y,{placeholder:"Search files...",value:y,onChange:R=>N(R.target.value),className:"pl-9"})]})}),(y||D!=="all")&&(0,Pt.jsxs)(A,{variant:"outline",onClick:ge,className:"gap-2",children:[(0,Pt.jsx)(q.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(so,{activeTab:c,onTabChange:C,tabOptions:[{value:"all",label:`All Files (${d.length})`},{value:"recent",label:`Recent (${v.length})`}],maxWidth:"500px",gridCols:3}),c==="all"&&(0,Pt.jsx)(Ne,{files:d,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a}),c==="recent"&&(0,Pt.jsx)(Ne,{files:v,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a}),c==="shared"&&(0,Pt.jsx)(Ne,{files:w,onFileClick:O,onFileEdit:$,onFileDelete:I,showHeader:!a})]}),d.length===0&&(0,Pt.jsx)(xe,{children:(0,Pt.jsx)(he,{className:"pt-6",children:(0,Pt.jsxs)("div",{className:"text-center py-8",children:[(0,Pt.jsx)(q.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Pt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Pt.jsx)("p",{className:"text-muted-foreground mb-4",children:y||D!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Pt.jsxs)(A,{onClick:j,className:"gap-2",children:[(0,Pt.jsx)(q.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}0&&(module.exports={FileList,FileView,KnowledgeBrowser,KnowledgeView,TeamCard,TeamsIndexView});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"../../chunk-
|
|
1
|
+
import{a as r}from"../../chunk-KG3MNGT6.mjs";import{a as t}from"../../chunk-WI2RL3XQ.mjs";import{a as e}from"../../chunk-GHZ6CUY3.mjs";import{a as f}from"../../chunk-3R75NUYA.mjs";import{a}from"../../chunk-VGWDYD6Z.mjs";import{a as o}from"../../chunk-ZXPDSSCF.mjs";import"../../chunk-RHR3YOLG.mjs";import"../../chunk-AREQGH47.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{e as FileList,t as FileView,o as KnowledgeBrowser,r as KnowledgeView,a as TeamCard,f as TeamsIndexView};
|