cortex-react-components 2.17.3 → 2.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/{chunk-P7S6XFU4.mjs → chunk-23XORW7A.mjs} +1 -1
  2. package/dist/{chunk-2OOJ4ZFB.mjs → chunk-2GZQYAN3.mjs} +1 -1
  3. package/dist/{chunk-PNUBVBSR.mjs → chunk-4NHQXOKZ.mjs} +1 -1
  4. package/dist/{chunk-KUFXQZI5.mjs → chunk-57HKHEQN.mjs} +1 -1
  5. package/dist/{chunk-GETYSIZV.mjs → chunk-5KS3DITB.mjs} +1 -1
  6. package/dist/{chunk-PTZT4QJW.mjs → chunk-66ODXUVL.mjs} +1 -1
  7. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  8. package/dist/{chunk-5NIEZE7A.mjs → chunk-AGWQ5S2Z.mjs} +1 -1
  9. package/dist/{chunk-2GM2LPLB.mjs → chunk-BDNY6OKE.mjs} +1 -1
  10. package/dist/{chunk-FYQBRCQM.mjs → chunk-BGADMIWV.mjs} +1 -1
  11. package/dist/{chunk-HKMNAXLM.mjs → chunk-BN747TQM.mjs} +1 -1
  12. package/dist/{chunk-AQQCH7Z2.mjs → chunk-CNCT3JZV.mjs} +1 -1
  13. package/dist/{chunk-3GROWGZ5.mjs → chunk-CQAMS7RZ.mjs} +1 -1
  14. package/dist/{chunk-JCWFPKF3.mjs → chunk-CYWA6TR2.mjs} +1 -1
  15. package/dist/{chunk-UCPJ4KXN.mjs → chunk-DA2BPW6D.mjs} +1 -1
  16. package/dist/{chunk-LHO4WFYP.mjs → chunk-ERHNVIOZ.mjs} +1 -1
  17. package/dist/{chunk-O24GFE6Q.mjs → chunk-GIL2SMPM.mjs} +1 -1
  18. package/dist/{chunk-GQEGZKN6.mjs → chunk-I6OBIS4J.mjs} +1 -1
  19. package/dist/{chunk-GAZHKHGB.mjs → chunk-JLUX7EHB.mjs} +1 -1
  20. package/dist/{chunk-MO4HRQEL.mjs → chunk-JT65KF7C.mjs} +1 -1
  21. package/dist/{chunk-R6AYIVIR.mjs → chunk-JUFFNFV6.mjs} +1 -1
  22. package/dist/{chunk-FEWOSBUJ.mjs → chunk-KRLNPNMZ.mjs} +1 -1
  23. package/dist/{chunk-RQLUMNJE.mjs → chunk-L5NPH5RX.mjs} +1 -1
  24. package/dist/{chunk-HDKHF3EA.mjs → chunk-M74BIPBM.mjs} +1 -1
  25. package/dist/{chunk-4SRUEQTP.mjs → chunk-NXG2Y4N4.mjs} +1 -1
  26. package/dist/chunk-ONNK2NEI.mjs +4 -0
  27. package/dist/{chunk-RS4VD3ML.mjs → chunk-PMYLKWPE.mjs} +1 -1
  28. package/dist/{chunk-7OMPPFGG.mjs → chunk-PRK2XFAZ.mjs} +1 -1
  29. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  30. package/dist/{chunk-P6OSMPUQ.mjs → chunk-PZZTGPEO.mjs} +1 -1
  31. package/dist/chunk-RBJOTC2X.mjs +4 -0
  32. package/dist/chunk-RZELSUQT.mjs +4 -0
  33. package/dist/{chunk-KVLUT4U2.mjs → chunk-S3P6OGB7.mjs} +1 -1
  34. package/dist/chunk-SK2QJG6J.mjs +4 -0
  35. package/dist/{chunk-F64CA5CH.mjs → chunk-T36QUKC6.mjs} +1 -1
  36. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  37. package/dist/{chunk-AGDKFAMN.mjs → chunk-UECG3SCG.mjs} +1 -1
  38. package/dist/{chunk-KG3MNGT6.mjs → chunk-UENQZNU3.mjs} +1 -1
  39. package/dist/{chunk-3ANJOET7.mjs → chunk-UX5OJ3WS.mjs} +1 -1
  40. package/dist/{chunk-BQQ4V4PX.mjs → chunk-WDZOGIT2.mjs} +1 -1
  41. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  42. package/dist/{chunk-NSWNM3O5.mjs → chunk-X5UJBRSB.mjs} +1 -1
  43. package/dist/{chunk-U3FYDDE2.mjs → chunk-Y62OBV2E.mjs} +1 -1
  44. package/dist/{chunk-RFRNTKO7.mjs → chunk-ZAAHG2J7.mjs} +1 -1
  45. package/dist/chunk-ZCBUDRT7.mjs +4 -0
  46. package/dist/chunk-ZNSW443Y.mjs +4 -0
  47. package/dist/components/Blocks/Banner.mjs +1 -1
  48. package/dist/components/Blocks/CallToAction.mjs +1 -1
  49. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  50. package/dist/components/Blocks/Content.mjs +1 -1
  51. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  52. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  53. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  54. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  55. package/dist/components/Blocks/index.mjs +1 -1
  56. package/dist/components/Cards/ContentCard.mjs +1 -1
  57. package/dist/components/Cards/FeatureCard.mjs +1 -1
  58. package/dist/components/Cards/index.mjs +1 -1
  59. package/dist/components/Chat/example-usage.mjs +1 -1
  60. package/dist/components/Chat/index.mjs +1 -1
  61. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  62. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  63. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  64. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  65. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
  66. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  68. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  69. package/dist/components/DigitalColleagues/document-edit.js +1 -1
  70. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  71. package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
  72. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  73. package/dist/components/DigitalColleagues/document-preview.js +1 -1
  74. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  75. package/dist/components/DigitalColleagues/index.js +1 -1
  76. package/dist/components/DigitalColleagues/index.mjs +1 -1
  77. package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
  78. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  79. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  80. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  81. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  82. package/dist/components/Foundary/MainPage.mjs +1 -1
  83. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  84. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  85. package/dist/components/Foundary/RichText/index.js +1 -1
  86. package/dist/components/Foundary/RichText/index.mjs +1 -1
  87. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  88. package/dist/components/Foundary/Views/KnowledgeView.js +2 -2
  89. package/dist/components/Foundary/Views/KnowledgeView.mjs +2 -1
  90. package/dist/components/Foundary/Views/index.js +1 -1
  91. package/dist/components/Foundary/Views/index.mjs +1 -1
  92. package/dist/components/Foundary/document-edit.js +1 -1
  93. package/dist/components/Foundary/document-edit.mjs +1 -1
  94. package/dist/components/Foundary/document-preview-examples.js +3 -3
  95. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  96. package/dist/components/Foundary/document-preview.js +1 -1
  97. package/dist/components/Foundary/document-preview.mjs +1 -1
  98. package/dist/components/Foundary/index.js +1 -1
  99. package/dist/components/Foundary/index.mjs +1 -1
  100. package/dist/components/Foundary/knowledge-browser.js +1 -1
  101. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  102. package/dist/components/HeaderFooter/Header.mjs +1 -1
  103. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  104. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  105. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  106. package/dist/components/HeaderFooter/index.mjs +1 -1
  107. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  108. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  109. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  110. package/dist/components/Heros/PostHero/index.mjs +1 -1
  111. package/dist/components/Heros/RenderHero.mjs +1 -1
  112. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  113. package/dist/components/Heros/index.mjs +1 -1
  114. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  115. package/dist/components/Layouts/Print.mjs +1 -1
  116. package/dist/components/Layouts/SlideShow.mjs +1 -1
  117. package/dist/components/Layouts/index.mjs +1 -1
  118. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  119. package/dist/components/Menus/SidebarRight.mjs +1 -1
  120. package/dist/components/Menus/index.mjs +1 -1
  121. package/dist/components/Other/index.mjs +1 -1
  122. package/dist/components/Payload/RichText/index.mjs +1 -1
  123. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  124. package/dist/components/Payload/index.mjs +1 -1
  125. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  126. package/dist/components/Projects/ProjectPage.mjs +1 -1
  127. package/dist/components/Projects/ProjectView.mjs +1 -1
  128. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  129. package/dist/components/Projects/index.mjs +1 -1
  130. package/dist/components/dc-temp/index.js +1 -1
  131. package/dist/components/dc-temp/index.mjs +1 -1
  132. package/dist/components/index.js +17 -17
  133. package/dist/components/index.mjs +1 -1
  134. package/dist/components/ui/index.mjs +1 -1
  135. package/dist/components/ui/sidebar.mjs +1 -1
  136. package/dist/globals.css +1 -1
  137. package/dist/index.js +14 -14
  138. package/dist/index.mjs +1 -1
  139. package/dist/metafile-cjs.json +1 -1
  140. package/dist/metafile-esm.json +1 -1
  141. package/dist/pages/Blog.mjs +1 -1
  142. package/dist/pages/Documentation.mjs +1 -1
  143. package/dist/pages/IndexPage.mjs +1 -1
  144. package/dist/pages/Intranet.mjs +1 -1
  145. package/dist/pages/LandingPage.mjs +1 -1
  146. package/dist/pages/Page.mjs +1 -1
  147. package/dist/pages/Publish.mjs +1 -1
  148. package/dist/pages/Website.mjs +1 -1
  149. package/dist/sections/AboutSection.mjs +1 -1
  150. package/dist/sections/BlogDetail.mjs +1 -1
  151. package/dist/sections/BlogList.mjs +1 -1
  152. package/dist/sections/BlogListSection.mjs +1 -1
  153. package/dist/sections/ContactSection.mjs +1 -1
  154. package/dist/sections/PageSections.mjs +1 -1
  155. package/dist/sections/PricingSection.mjs +1 -1
  156. package/dist/sections/ServiceDetail.mjs +1 -1
  157. package/dist/sections/ServiceDetailSection.mjs +1 -1
  158. package/dist/sections/ServiceSection.mjs +1 -1
  159. package/dist/sections/index.mjs +1 -1
  160. package/package.json +1 -1
  161. package/dist/chunk-AREQGH47.mjs +0 -4
  162. package/dist/chunk-RHR3YOLG.mjs +0 -4
  163. package/dist/chunk-SX456QYL.mjs +0 -4
  164. package/dist/chunk-TNQS3NVB.mjs +0 -1
  165. package/dist/chunk-UK7PR73C.mjs +0 -4
  166. package/dist/chunk-ZXPDSSCF.mjs +0 -4
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
- 'use client'
3
+ "use client"
4
4
 
5
- "use strict";var ar=Object.create;var Ze=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var sr=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var dr=(e,t)=>{for(var o in t)Ze(e,o,{get:t[o],enumerable:!0})},Pt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ir(t))!lr.call(e,a)&&a!==o&&Ze(e,a,{get:()=>t[a],enumerable:!(r=nr(t,a))||r.enumerable});return e};var _=(e,t,o)=>(o=e!=null?ar(sr(e)):{},Pt(t||!e||!e.__esModule?Ze(o,"default",{value:e,enumerable:!0}):o,e)),cr=e=>Pt(Ze({},"__esModule",{value:!0}),e);var oa={};dr(oa,{default:()=>rr});module.exports=cr(oa);var nt=require("react");var Ut=require("motion/react");var Vt=require("class-variance-authority");var Et=require("clsx");var lt="-",mr=e=>{let t=pr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(lt);return i[0]===""&&i.length!==1&&i.shift(),Tt(i,t)||ur(s)},getConflictingClassGroupIds:(s,i)=>{let h=o[s]||[];return i&&r[s]?[...h,...r[s]]:h}}},Tt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Tt(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(lt);return t.validators.find(({validator:s})=>s(n))?.classGroupId},kt=/^\[(.+)\]$/,ur=e=>{if(kt.test(e)){let t=kt.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},pr=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return gr(Object.entries(e.classGroups),o).forEach(([n,s])=>{st(s,r,n,t)}),r},st=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Mt(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(fr(a)){st(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{st(s,Mt(t,n),o,r)})})},Mt=(e,t)=>{let o=e;return t.split(lt).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},fr=e=>e.isThemeGetter,gr=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,i])=>[t+s,i])):n);return[o,a]}):e,br=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,s)=>{o.set(n,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let s=o.get(n);if(s!==void 0)return s;if((s=r.get(n))!==void 0)return a(n,s),s},set(n,s){o.has(n)?o.set(n,s):a(n,s)}}},It="!",hr=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,s=i=>{let h=[],u=0,k=0,m;for(let l=0;l<i.length;l++){let g=i[l];if(u===0){if(g===a&&(r||i.slice(l,l+n)===t)){h.push(i.slice(k,l)),k=l+n;continue}if(g==="/"){m=l;continue}}g==="["?u++:g==="]"&&u--}let v=h.length===0?i:i.substring(k),N=v.startsWith(It),P=N?v.substring(1):v,f=m&&m>k?m-k:void 0;return{modifiers:h,hasImportantModifier:N,baseClassName:P,maybePostfixModifierPosition:f}};return o?i=>o({className:i,parseClassName:s}):s},vr=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},xr=e=>({cache:br(e.cacheSize),parseClassName:hr(e),...mr(e)}),wr=/\s+/,yr=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(wr),i="";for(let h=s.length-1;h>=0;h-=1){let u=s[h],{modifiers:k,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:N}=o(u),P=!!N,f=r(P?v.substring(0,N):v);if(!f){if(!P){i=u+(i.length>0?" "+i:i);continue}if(f=r(v),!f){i=u+(i.length>0?" "+i:i);continue}P=!1}let l=vr(k).join(":"),g=m?l+It:l,d=g+f;if(n.includes(d))continue;n.push(d);let c=a(f,P);for(let A=0;A<c.length;++A){let U=c[A];n.push(g+U)}i=u+(i.length>0?" "+i:i)}return i};function Cr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ht(t))&&(r&&(r+=" "),r+=o);return r}var Ht=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Ht(e[r]))&&(o&&(o+=" "),o+=t);return o};function Nr(e,...t){let o,r,a,n=s;function s(h){let u=t.reduce((k,m)=>m(k),e());return o=xr(u),r=o.cache.get,a=o.cache.set,n=i,i(h)}function i(h){let u=r(h);if(u)return u;let k=yr(h,o);return a(h,k),k}return function(){return n(Cr.apply(null,arguments))}}var B=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},At=/^\[(?:([a-zt-]+):)?(.+)\]$/i,Sr=/^\d+\/\d+$/,Dr=new Set(["px","full","screen"]),Rr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|zt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(zt|h|i|zt|min|max))|\zt(calc|min|max|clamp)\(.+\)|^0$/,kr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mr=/^(inset_)?-?((\d+)?\.?(\d+)[a-zt]+|0)_-?((\d+)?\.?(\d+)[a-zt]+|0)/,Tr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>ke(e)||Dr.has(e)||Sr.test(e),he=e=>Me(e,"length",Kr),ke=e=>!!e&&!Number.isNaN(Number(e)),it=e=>Me(e,"number",ke),Be=e=>!!e&&Number.isInteger(Number(e)),Ir=e=>e.endsWith("%")&&ke(e.slice(0,-1)),R=e=>At.test(e),ve=e=>Rr.test(e),Hr=new Set(["length","size","percentage"]),Ar=e=>Me(e,Hr,Lt),Lr=e=>Me(e,"position",Lt),Br=new Set(["image","url"]),Er=e=>Me(e,Br,Or),Vr=e=>Me(e,"",zr),Ee=()=>!0,Me=(e,t,o)=>{let r=At.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Kr=e=>Pr.test(e)&&!kr.test(e),Lt=()=>!1,zr=e=>Mr.test(e),Or=e=>Tr.test(e);var Fr=()=>{let e=B("colors"),t=B("spacing"),o=B("blur"),r=B("brightness"),a=B("borderColor"),n=B("borderRadius"),s=B("borderSpacing"),i=B("borderWidth"),h=B("contrast"),u=B("grayscale"),k=B("hueRotate"),m=B("invert"),v=B("gap"),N=B("gradientColorStops"),P=B("gradientColorStopPositions"),f=B("inset"),l=B("margin"),g=B("opacity"),d=B("padding"),c=B("saturate"),A=B("scale"),U=B("sepia"),E=B("skew"),V=B("space"),q=B("translate"),Y=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto",R,t],H=()=>[R,t],Pe=()=>["",ue,he],Le=()=>["auto",ke,R],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>["start","end","center","between","around","evenly","stretch"],le=()=>["","0",R],Rt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[ke,R];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[ue,he],blur:["none","",ve,R],brightness:me(),borderColor:[e],borderRadius:["none","","full",ve,R],borderSpacing:H(),borderWidth:Pe(),contrast:me(),grayscale:le(),hueRotate:me(),invert:le(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[Ir,he],inset:ae(),margin:ae(),opacity:me(),padding:H(),saturate:me(),scale:me(),sepia:le(),skew:me(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",R]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":Rt()}],"break-before":[{"break-before":Rt()}],"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:[...D(),R]}],overflow:[{overflow:W()}],"overflow-zt":[{"overflow-zt":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:Y()}],"overscroll-zt":[{"overscroll-zt":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-zt":[{"inset-zt":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],zt:[{zt:["auto",Be,R]}],basis:[{basis:ae()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",R]}],grow:[{grow:le()}],shrink:[{shrink:le()}],order:[{order:["first","last","none",Be,R]}],"grid-cols":[{"grid-cols":[Ee]}],"col-start-end":[{col:["auto",{span:["full",Be,R]},R]}],"col-start":[{"col-start":Le()}],"col-end":[{"col-end":Le()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[Be,R]},R]}],"row-start":[{"row-start":Le()}],"row-end":[{"row-end":Le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",R]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",R]}],gap:[{gap:[v]}],"gap-zt":[{"gap-zt":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Ne()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ne(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ne(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],zt:[{zt:[d]}],px:[{px:[d]}],py:[{py:[d]}],ps:[{ps:[d]}],pe:[{pe:[d]}],zt:[{zt:[d]}],pr:[{pr:[d]}],pb:[{pb:[d]}],pl:[{pl:[d]}],m:[{m:[l]}],mx:[{mx:[l]}],my:[{my:[l]}],ms:[{ms:[l]}],me:[{me:[l]}],zt:[{zt:[l]}],mr:[{mr:[l]}],mb:[{mb:[l]}],ml:[{ml:[l]}],"space-zt":[{"space-zt":[V]}],"space-zt-reverse":["space-zt-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],zt:[{zt:["auto","min","max","fit","svw","lvw","dvw",R,t]}],"min-zt":[{"min-zt":[R,t,"min","max","fit"]}],"max-zt":[{"max-zt":[R,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],h:[{h:[R,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[R,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",it]}],"font-family":[{font:[Ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",R]}],"line-clamp":[{"line-clamp":["none",ke,it]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,R]}],"list-image":[{"list-image":["none",R]}],"list-style-type":[{list:["none","disc","decimal",R]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,he]}],"underline-offset":[{"underline-offset":["auto",ue,R]}],"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:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R]}],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",R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Lr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","zt","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ar]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","zt","bl","l","tl"]},Er]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-zt":[{"rounded-zt":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-zt":[{border:[i]}],"border-zt-zt":[{"border-zt":[i]}],"border-zt-y":[{"border-y":[i]}],"border-zt-s":[{"border-s":[i]}],"border-zt-e":[{"border-e":[i]}],"border-zt-t":[{"border-t":[i]}],"border-zt-r":[{"border-r":[i]}],"border-zt-zt":[{"border-zt":[i]}],"border-zt-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-zt":[{"divide-zt":[i]}],"divide-zt-reverse":["divide-zt-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Z()}],"border-color":[{border:[a]}],"border-color-zt":[{"border-zt":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-zt":[{"border-zt":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[ue,R]}],"outline-zt":[{outline:[ue,he]}],"outline-color":[{outline:[e]}],"ring-zt":[{ring:Pe()}],"ring-zt-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-zt":[{"ring-offset":[ue,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,Vr]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",ve,R]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[k]}],invert:[{invert:[m]}],saturate:[{saturate:[c]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[c]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-zt":[{"border-spacing-zt":[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",R]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",R]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",R]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-zt":[{"scale-zt":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Be,R]}],"translate-zt":[{"translate-zt":[q]}],"translate-y":[{"translate-y":[q]}],"skew-zt":[{"skew-zt":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",R]}],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","zt-resize","zt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","zt",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-zt":[{"scroll-zt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-zt":[{"scroll-zt":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-zt":[{"scroll-zt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","zt","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-zt":[{"touch-pan":["zt","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",R]}],fill:[{fill:[e,"none"]}],"stroke-zt":[{stroke:[ue,he,it]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-zt","overflow-y"],overscroll:["overscroll-zt","overscroll-y"],inset:["inset-zt","inset-y","start","end","top","right","bottom","left"],"inset-zt":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-zt","gap-y"],zt:["px","py","ps","pe","zt","pr","pb","pl"],px:["pr","pl"],py:["zt","pb"],m:["mx","my","ms","me","zt","mr","mb","ml"],mx:["mr","ml"],my:["zt","mb"],size:["zt","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-zt","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-zt":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-zt","border-spacing-y"],"border-zt":["border-zt-s","border-zt-e","border-zt-t","border-zt-r","border-zt-zt","border-zt-l"],"border-zt-zt":["border-zt-r","border-zt-l"],"border-zt-y":["border-zt-t","border-zt-zt"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-zt","border-color-l"],"border-color-zt":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-zt"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-zt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-zt","scroll-mb"],"scroll-zt":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-zt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-zt","scroll-pb"],touch:["touch-zt","touch-y","touch-pz"],"touch-zt":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Bt=Nr(Fr);function y(...e){return Bt((0,Et.clsx)(e))}var zt=require("react/jsx-runtime"),Kt=(0,Vt.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 Ve({className:e,variant:t,...o}){return(0,zt.jsx)("div",{className:y(Kt({variant:t}),e),...o})}var Ot=require("@radix-ui/react-slot"),_t=_(require("react")),Gt=(0,Vt.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 zt-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"}}}),K=_t.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},n)=>(0,$t.jsx)(e?Ot.Slot:"button",{className:y(Gt({className:t,size:o,variant:r})),ref:n,...a}));K.displayName="Button";function jt(e,t){let[o,r]=(0,nt.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),a=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,nt.useEffect)(()=>{a(o)},[]),[o,a]}var Xe=require("react-icons/fa");function Wt({title:e,description:t,badge:o,primaryAction:r,secondaryAction:a,gradient:n,children:s,className:i}){let[h,u]=jt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!a&&!t),k=!a&&!t||h;return(0,zt.jsxs)(Ut.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} zt-8 text-white ${i||""}`,children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,zt.jsx)(Ve,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,zt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,zt.jsxs)("div",{className:"flex items-center gap-3",children:[k&&r&&(0,zt.jsx)(K,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(a||t)&&(0,zt.jsx)("button",{"aria-label":h?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 zt-1 text-white transition-colors",onClick:()=>u(!h),style:{lineHeight:0},children:h?(0,zt.jsx)(Xe.FaChevronDown,{size:22}):(0,zt.jsx)(Xe.FaChevronUp,{size:22})})]})]}),!k&&(0,zt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,zt.jsxs)("div",{className:"space-y-4",children:[(0,zt.jsx)("zt",{className:"max-zt-[600px] text-white/80",children:t}),(0,zt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,zt.jsx)(K,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),a&&(0,zt.jsx)(K,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:a.onClick,children:a.label})]})]}),s&&(0,zt.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var se=require("lucide-react");var Zt=_(require("react"));var J=Zt.forwardRef(({className:e,type:t,...o},r)=>(0,zt.jsx)("input",{type:t,className:y("flex h-9 zt-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}));J.displayName="Input";var dt=_(require("react")),oe=_(require("@radix-ui/react-scroll-area"));var ct=dt.forwardRef(({className:e,children:t,...o},r)=>(0,zt.jsxs)(oe.Root,{ref:r,className:y("relative overflow-hidden",e),...o,children:[(0,zt.jsx)(oe.Viewport,{className:"h-full zt-full rounded-[inherit]",children:t}),(0,zt.jsx)(Xt,{}),(0,zt.jsx)(oe.Corner,{})]}));ct.displayName=oe.Root.displayName;var Xt=dt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,zt.jsx)(oe.ScrollAreaScrollbar,{ref:r,orientation:t,className:y("flex touch-none select-none transition-colors",t==="vertical"&&"h-full zt-2.5 border-l border-l-transparent zt-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent zt-[1px]",e),...o,children:(0,zt.jsx)(oe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Xt.displayName=oe.ScrollAreaScrollbar.displayName;var Jt=_(require("react")),Je=Jt.forwardRef(({className:e,...t},o)=>(0,zt.jsx)("textarea",{className:y("flex min-h-[80px] zt-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}));Je.displayName="Textarea";var M=_(require("@radix-ui/react-select")),we=_(require("react")),ye=M.Root;var Ce=M.Value,pe=we.forwardRef(({children:e,className:t,...o},r)=>(0,zt.jsxs)(M.Trigger,{className:y("flex h-10 zt-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,zt.jsx)(M.Icon,{asChild:!0,children:(0,zt.jsx)(se.ChevronDown,{className:"h-4 zt-4 opacity-50"})})]}));pe.displayName=M.Trigger.displayName;var Yt=we.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(M.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,zt.jsx)(se.ChevronUp,{className:"h-4 zt-4"})}));Yt.displayName=M.ScrollUpButton.displayName;var eo=we.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(M.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,zt.jsx)(se.ChevronDown,{className:"h-4 zt-4"})}));eo.displayName=M.ScrollDownButton.displayName;var fe=we.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,zt.jsx)(M.Portal,{children:(0,zt.jsxs)(M.Content,{className:y("relative zt-50 max-h-96 min-zt-[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-zt-1 data-[side=right]:translate-zt-1 data-[side=top]:-translate-y-1",t),position:o,ref:a,...r,children:[(0,zt.jsx)(Yt,{}),(0,zt.jsx)(M.Viewport,{className:y("zt-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] zt-full min-zt-[var(--radix-select-trigger-width)]"),children:e}),(0,zt.jsx)(eo,{})]})}));fe.displayName=M.Content.displayName;var _r=we.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(M.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));_r.displayName=M.Label.displayName;var re=we.forwardRef(({children:e,className:t,...o},r)=>(0,zt.jsxs)(M.Item,{className:y("relative flex zt-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,zt.jsx)("span",{className:"absolute left-2 flex h-3.5 zt-3.5 items-center justify-center",children:(0,zt.jsx)(M.ItemIndicator,{children:(0,zt.jsx)(se.Check,{className:"h-4 zt-4"})})}),(0,zt.jsx)(M.ItemText,{children:e})]}));re.displayName=M.Item.displayName;var Gr=we.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(M.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Gr.displayName=M.Separator.displayName;var Ao=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Lo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Bo=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Eo=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Vo=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Ko=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),zo=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),rt=require("@payloadcms/richtext-lexical/lexical/list"),Oo=require("@payloadcms/richtext-lexical/lexical/rich-text"),Fo=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var To=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Io=require("@payloadcms/richtext-lexical/lexical/utils"),I=require("@payloadcms/richtext-lexical/lexical"),Nt=require("@payloadcms/richtext-lexical/lexical/selection");var $r=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),to=$r;var jr=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),oo=jr;var Ur=()=>(0,zt.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,zt.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,zt.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),ro=Ur;var Wr=()=>(0,zt.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,zt.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,zt.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),ao=Wr;var Zr=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),no=Zr;var qr=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),io=qr;var so=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"zt-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),lo=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"zt-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),co=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"zt-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),mo=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"zt-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),uo=()=>(0,zt.jsx)("svg",{"aria-hidden":"true",className:"zt-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,zt.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var ge=_(require("react")),T=_(require("@radix-ui/react-dropdown-menu")),Te=require("@radix-ui/react-icons");var Qe=T.Root,Ye=T.Trigger;var po=ge.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,$.jsxs)(T.SubTrigger,{ref:a,className:y("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,$.jsx)(Te.ChevronRightIcon,{className:"ml-auto"})]}));po.displayName=T.SubTrigger.displayName;var fo=ge.forwardRef(({className:e,...t},o)=>(0,$.jsx)(T.SubContent,{ref:o,className:y("zt-50 min-zt-[8rem] overflow-hidden rounded-md border bg-popover zt-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}));fo.displayName=T.SubContent.displayName;var Oe=ge.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$.jsx)(T.Portal,{children:(0,$.jsx)(T.Content,{ref:r,sideOffset:t,className:y("zt-50 min-zt-[8rem] overflow-hidden rounded-md border bg-popover zt-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})}));Oe.displayName=T.Content.displayName;var Fe=ge.forwardRef(({className:e,inset:t,...o},r)=>(0,$.jsx)(T.Item,{ref:r,className:y("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}));Fe.displayName=T.Item.displayName;var go=ge.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,$.jsxs)(T.CheckboxItem,{ref:a,className:y("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,$.jsx)("span",{className:"absolute left-2 flex h-3.5 zt-3.5 items-center justify-center",children:(0,$.jsx)(T.ItemIndicator,{children:(0,$.jsx)(Te.CheckIcon,{className:"h-4 zt-4"})})}),t]}));go.displayName=T.CheckboxItem.displayName;var bo=ge.forwardRef(({className:e,children:t,...o},r)=>(0,$.jsxs)(T.RadioItem,{ref:r,className:y("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,$.jsx)("span",{className:"absolute left-2 flex h-3.5 zt-3.5 items-center justify-center",children:(0,$.jsx)(T.ItemIndicator,{children:(0,$.jsx)(Te.DotFilledIcon,{className:"h-4 zt-4 fill-current"})})}),t]}));bo.displayName=T.RadioItem.displayName;var ho=ge.forwardRef(({className:e,inset:t,...o},r)=>(0,$.jsx)(T.Label,{ref:r,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ho.displayName=T.Label.displayName;var vo=ge.forwardRef(({className:e,...t},o)=>(0,$.jsx)(T.Separator,{ref:o,className:y("-mx-1 my-1 h-px bg-muted",e),...t}));vo.displayName=T.Separator.displayName;var xo=({className:e,...t})=>(0,$.jsx)("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});xo.displayName="DropdownMenuShortcut";var wo=_(require("react")),ie=_(require("@radix-ui/react-tooltip"));var bt=ie.Provider,ht=ie.Root,vt=ie.Trigger,et=wo.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,zt.jsx)(ie.Portal,{children:(0,zt.jsx)(ie.Content,{ref:r,sideOffset:t,className:y("zt-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));et.displayName=ie.Content.displayName;var yo=_(require("react")),xt=_(require("@radix-ui/react-label"));var Xr=(0,Vt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=yo.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(xt.Root,{ref:o,className:y(Xr(),e),...t}));ee.displayName=xt.Root.displayName;var _e=_(require("react")),j=_(require("@radix-ui/react-dialog"));var Ge=j.Root;var Do=j.Portal;var wt=_e.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(j.Overlay,{ref:o,className:y("fixed inset-0 zt-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}));wt.displayName=j.Overlay.displayName;var Ie=_e.forwardRef(({className:e,children:t,...o},r)=>(0,zt.jsxs)(Do,{children:[(0,zt.jsx)(wt,{}),(0,zt.jsxs)(j.Content,{ref:r,className:y("fixed left-[50%] top-[50%] zt-50 grid zt-full max-zt-lg translate-zt-[-50%] translate-y-[-50%] gap-4 border bg-background zt-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,zt.jsxs)(j.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,zt.jsx)(se.X,{className:"h-4 zt-4"}),(0,zt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ie.displayName=j.Content.displayName;var He=({className:e,...t})=>(0,zt.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});He.displayName="DialogHeader";var Ro=({className:e,...t})=>(0,zt.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-zt-2",e),...t});Ro.displayName="DialogFooter";var Ae=_e.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(j.Title,{ref:o,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));Ae.displayName=j.Title.displayName;var Po=_e.forwardRef(({className:e,...t},o)=>(0,zt.jsx)(j.Description,{ref:o,className:y("text-sm text-muted-foreground",e),...t}));Po.displayName=j.Description.displayName;var $e=_(require("@radix-ui/react-checkbox")),Mo=_(require("react")),yt=Mo.forwardRef(({className:e,...t},o)=>(0,zt.jsx)($e.Root,{className:y("peer h-4 zt-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,zt.jsx)($e.Indicator,{className:y("flex items-center justify-center text-current"),children:(0,zt.jsx)(se.Check,{className:"h-4 zt-4"})})}));yt.displayName=$e.Root.displayName;var Ct=1;function Jr(){return(0,zt.jsx)("span",{className:"border border-[#222222]"})}function St(){let[e]=(0,To.useLexicalComposerContext)(),t=(0,nt.useRef)(null),[o,r]=(0,nt.useState)(!1),[a,n]=(0,nt.useState)(!1),[s,i]=(0,nt.useState)(!1),[h,u]=(0,nt.useState)(!1),[k,m]=(0,nt.useState)(!1),[v,N]=(0,nt.useState)(!1),[P,f]=(0,nt.useState)(!1),[l,g]=(0,nt.useState)(!1),[d,c]=(0,nt.useState)(!1),[A,U]=(0,nt.useState)("left"),[E,V]=(0,nt.useState)("zt"),q=D=>{e.update(()=>{let Z=(0,I.$getSelection)();(0,I.$isRangeSelection)(Z)&&(D==="zt"?(0,Nt.$setBlocksType)(Z,()=>(0,I.$createParagraphNode)()):(0,Nt.$setBlocksType)(Z,()=>(0,Oo.$createHeadingNode)(D)))})},Y=(0,nt.useCallback)(()=>{let D=(0,I.$getSelection)();if((0,I.$isRangeSelection)(D)){i(D.hasFormat("bold")),u(D.hasFormat("italic")),m(D.hasFormat("underline")),N(D.hasFormat("strikethrough")),f(D.hasFormat("subscript")),g(D.hasFormat("superscript"));let Z=D.anchor.getNode(),X=Z;for(;X&&!(0,I.$isParagraphNode)(X)&&X!==(0,I.$getRoot)();){let le=X.getParent();le&&(X=le)}if(X){let le=X.getFormatType();U(le||"left")}let Ne=Z.getTopLevelElement()?.__tag;V(Ne||"zt")}},[]);(0,nt.useEffect)(()=>(0,Io.mergeRegister)(e.registerUpdateListener(({editorState:D})=>{D.read(()=>{Y()})}),e.registerCommand(I.SELECTION_CHANGE_COMMAND,(D,Z)=>(Y(),!1),Ct),e.registerCommand(I.CAN_UNDO_COMMAND,D=>(r(D),!1),Ct),e.registerCommand(I.CAN_REDO_COMMAND,D=>(n(D),!1),Ct)),[e,Y]);let W=[[{label:"Undo",icon:(0,zt.jsx)(se.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,zt.jsx)(se.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,zt.jsx)(to,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:s},{label:"Italic",icon:(0,zt.jsx)(oo,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:h},{label:"Underline",icon:(0,zt.jsx)(ro,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:k},{label:"Strikethrough",icon:(0,zt.jsx)(ao,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:v},{label:"Subscript",icon:(0,zt.jsx)(no,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:P},{label:"Superscript",icon:(0,zt.jsx)(io,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:l}]],ae=[{label:"Left Align",direction:"left",icon:(0,zt.jsx)(se.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,zt.jsx)(se.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,zt.jsx)(se.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,zt.jsx)(se.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"justify")}}],Pe=[{label:"Normal Text",value:"zt",icon:(0,zt.jsx)(so,{}),onClick:()=>q("zt")},{label:"Heading 1",value:"h1",icon:(0,zt.jsx)(lo,{}),onClick:()=>q("h1")},{label:"Heading 2",value:"h2",icon:(0,zt.jsx)(co,{}),onClick:()=>q("h2")},{label:"Heading 3",value:"h3",icon:(0,zt.jsx)(mo,{}),onClick:()=>q("h3")},{label:"Heading 4",value:"h4",icon:(0,zt.jsx)(uo,{}),onClick:()=>q("h4")},...[{label:"Unordered List",value:"ul",icon:(0,zt.jsx)(se.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(rt.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,zt.jsx)(se.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(rt.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],Le=[{label:"Insert Image",icon:(0,zt.jsx)(se.ImageUp,{width:15,height:15}),onClick:()=>{c(!0)},disabled:!1}];return(0,zt.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,zt.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[W.map((D,Z)=>(0,zt.jsxs)(nt.Fragment,{children:[(0,zt.jsx)("div",{className:"flex items-center gap-2",children:D.map((X,Ne)=>(0,zt.jsx)("div",{role:"button","aria-disabled":X.disabled||!1,onClick:X.onClick,className:y("zt-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",X.active&&"bg-[#3c3c3c]"),"aria-label":X.label,children:(0,zt.jsx)(bt,{children:(0,zt.jsxs)(ht,{children:[(0,zt.jsx)(vt,{className:"text-[#b5b5b5]",children:X.icon}),(0,zt.jsx)(et,{children:(0,zt.jsx)("zt",{children:X.label})})]})})},Ne))}),(0,zt.jsx)(Jr,{})]},`toolbar-option-${D.length}-${Z}`)),(0,zt.jsxs)(Qe,{children:[(0,zt.jsxs)(Ye,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ae.find(D=>D.direction===A)?.icon,ae.find(D=>D.direction===A)?.label,(0,zt.jsx)(se.ChevronDown,{width:15,height:15})]}),(0,zt.jsx)(Oe,{className:"bg-black hover:bg-black",children:ae.map((D,Z)=>(0,zt.jsxs)(Fe,{onClick:D.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,zt.jsx)("span",{children:D.icon}),(0,zt.jsx)("span",{children:D.label})]},`${D.label}-${Z}`))})]}),(0,zt.jsxs)(Qe,{children:[(0,zt.jsxs)(Ye,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Pe.find(D=>D.value===E)?.icon,Pe.find(D=>D.value===E)?.label,(0,zt.jsx)(se.ChevronDown,{width:15,height:15})]}),(0,zt.jsx)(Oe,{className:"bg-black hover:bg-black",children:Pe.map((D,Z)=>(0,zt.jsxs)(Fe,{onClick:D.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,zt.jsx)("span",{children:D.icon}),(0,zt.jsx)("span",{children:D.label})]},`heading-option-${D.label}-${Z}`))})]})]})})}var Qr=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,To.useLexicalComposerContext)(),n=s=>{s.read(()=>{let i=s.toJSON();e?.(()=>i)})};return(0,nt.useEffect)(()=>{t&&a.update(()=>{a.setEditorState(a.parseEditorState(t))})},[]),(0,zt.jsx)("div",{className:"zt-full px-10",children:(0,zt.jsxs)("div",{className:" ",children:[r&&(0,zt.jsx)(St,{}),(0,zt.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,zt.jsx)(Ko.RichTextPlugin,{contentEditable:(0,zt.jsx)(Bo.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Eo.LexicalErrorBoundary}),r&&(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Vo.HistoryPlugin,{}),(0,zt.jsx)(Ao.AutoFocusPlugin,{}),(0,zt.jsx)(zo.ListPlugin,{}),(0,zt.jsx)(Fo.OnChangePlugin,{onChange:n})]})]})]})})},Yr=({setValue:e,value:t,name:o,editable:r=!0})=>(0,zt.jsx)(Lo.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[rt.ListNode,rt.ListItemNode,Oo.HeadingNode],onError(n){throw console.error("Lexical error:",n),n},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,zt.jsx)(Qr,{value:t,setValue:e,name:o,editable:r})}),at=Yr;function jo({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:a=[],knowledgeContexts:n=[]}){let[s,i]=(0,nt.useState)({...e,updatedAt:new Date}),[h,u]=(0,nt.useState)(s.richTextContent);(0,nt.useEffect)(()=>{i(e)},[e]);let k=()=>{let d=new Set,c=new Set;return n.forEach(A=>{A.menuConfig.groupBy.forEach(U=>d.add(U))}),a.forEach(A=>{A.metadata&&Object.keys(A.metadata).forEach(U=>c.add(U))}),{contextKeys:Array.from(d).sort(),documentKeys:Array.from(c).sort(),allKeys:Array.from(new Set([...d,...c])).sort()}},m=d=>{let c=new Set;return a.forEach(A=>{A.metadata?.[d]&&c.add(String(A.metadata[d]))}),Array.from(c).sort()},v=k(),N=()=>{t({...s,richTextContent:h})},P=(d,c)=>{i(A=>({...A,metadata:{...A.metadata,[d]:c}}))},f=(d,c)=>{c==="__custom__"?P(d,""):P(d,c)},l=()=>{P("","")},g=d=>{i(c=>{let A={...c.metadata};return delete A[d],{...c,metadata:A}})};return(0,zt.jsxs)($o.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,zt.jsxs)("div",{className:"border-zt border-border bg-card zt-8",children:[(0,zt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,zt.jsx)("div",{className:"flex-shrink-0 zt-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,zt.jsx)(se.Edit3,{className:"h-6 zt-6 text-primary"})}),(0,zt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:o==="edit"?"Edit Document":"Create Document"})]}),(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsxs)(K,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,zt.jsx)(se.X,{className:"h-4 zt-4"}),"Cancel"]}),(0,zt.jsxs)(K,{size:"sm",onClick:N,className:"gap-2",children:[(0,zt.jsx)(se.Save,{className:"h-4 zt-4"}),"Save Changes"]})]})]}),(0,zt.jsxs)("div",{className:"space-y-4",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,zt.jsx)(J,{value:s.title,onChange:d=>i(c=>({...c,title:d.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,zt.jsx)(Je,{value:s.description||"",onChange:d=>i(c=>({...c,description:d.target.value})),placeholder:"Document description...",rows:2})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),v.contextKeys.length>0&&(0,zt.jsxs)("zt",{className:"text-xs text-muted-foreground",children:["Suggested: ",v.contextKeys.slice(0,4).join(", "),v.contextKeys.length>4&&` +${v.contextKeys.length-4}`]})]}),(0,zt.jsxs)(K,{type:"button",variant:"outline",size:"sm",onClick:l,className:"gap-1 h-8",children:[(0,zt.jsx)(se.Plus,{className:"h-3 zt-3"}),"Add"]})]}),s.metadata&&Object.keys(s.metadata).length>0?(0,zt.jsx)("div",{className:"space-y-2",children:Object.entries(s.metadata).map(([d,c],A)=>{let U=m(d);return(0,zt.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,zt.jsx)(J,{value:d,onChange:E=>{let V=E.target.value||"",q=s.metadata?.[d];i(Y=>{let W={...Y.metadata};return delete W[d],V&&(W[V]=q||""),{...Y,metadata:W}})},placeholder:"Key",className:"zt-32 h-8 text-sm",list:`metadata-keys-${d}`}),(0,zt.jsx)("datalist",{id:`metadata-keys-${d}`,children:v.allKeys.map(E=>(0,zt.jsx)("option",{value:E},E))}),(0,zt.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),U.length>0?(0,zt.jsxs)(ye,{value:String(c||""),onValueChange:E=>f(d,E),children:[(0,zt.jsx)(pe,{className:"flex-1 h-8 text-sm",children:(0,zt.jsx)(Ce,{placeholder:"Value"})}),(0,zt.jsxs)(fe,{children:[U.map(E=>(0,zt.jsx)(re,{value:E,children:E},E)),(0,zt.jsx)(re,{value:"__custom__",children:(0,zt.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,zt.jsx)(J,{value:String(c||""),onChange:E=>P(d,E.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,zt.jsx)(K,{type:"button",variant:"ghost",size:"sm",onClick:()=>g(d),className:"h-8 zt-8 zt-0 text-muted-foreground hover:text-destructive",children:(0,zt.jsx)(se.X,{className:"h-3 zt-3"})})]},`metadata-key-${A}`)})}):(0,zt.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,zt.jsx)("zt",{className:"text-xs text-muted-foreground",children:'zt metadata \u2022 Click "Add" to create fields'})})]}),(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format"}),(0,zt.jsxs)(ye,{value:s.format,onValueChange:d=>i(c=>({...c,format:d})),children:[(0,zt.jsx)(pe,{className:"flex-1 h-8 text-sm",children:(0,zt.jsx)(Ce,{placeholder:"Format"})}),(0,zt.jsxs)(fe,{children:[(0,zt.jsx)(re,{value:"markdown",children:"Markdown"}),(0,zt.jsx)(re,{value:"richText",children:"Rich Text"})]})]})]})]})]}),(0,zt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,zt.jsxs)("div",{className:"zt-8",children:[(0,zt.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),s.format==="richText"?(0,zt.jsx)(at,{setValue:u,value:h,name:"richTextContent"}):(0,zt.jsx)(Je,{value:s.content||"",onChange:d=>i(c=>({...c,content:d.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Zo=_(require("react-markdown")),qo=_(require("remark-gfm"));var Xo=e=>(0,zt.jsx)(Zo.default,{remarkPlugins:[qo.default],components:{h1:({children:t})=>(0,zt.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,zt.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,zt.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,zt.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,zt.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,zt.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,zt.jsx)("li",{className:"ml-4",children:t}),zt:({children:t})=>(0,zt.jsx)("zt",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,zt.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,zt.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,zt.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Uo=e=>(0,zt.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),ea=e=>(0,zt.jsx)("div",{className:"prose prose-slate dark:prose-invert max-zt-none",children:e&&(0,zt.jsx)(at,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),ta=e=>(0,zt.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-zt-none",children:[(0,zt.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg zt-4 mb-4",children:(0,zt.jsxs)("zt",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,zt.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Xo(e)]});function Jo({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:a,availableDocuments:n=[],knowledgeContexts:s=[]}){let[i,h]=(0,nt.useState)(!1),[u,k]=(0,nt.useState)(e);(0,nt.useEffect)(()=>{k(e)},[e]);let m=l=>{switch(l){case"markdown":case"mdx":return(0,zt.jsx)(se.FileText,{className:"h-6 zt-6 text-primary"});case"richText":return(0,zt.jsx)(se.File,{className:"h-6 zt-6 text-success"});case"text":return(0,zt.jsx)(se.Type,{className:"h-6 zt-6 text-muted-foreground"});default:return(0,zt.jsx)(se.File,{className:"h-6 zt-6 text-muted-foreground"})}},v=l=>{switch(l){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=(l,g)=>{let d={markdown:Xo,mdx:ta,text:Uo},c=a?.[g]||d[g];if(g==="richText"&&typeof l=="object")return ea(l);if(c&&typeof l=="string")return c(l);if(typeof l=="string")return Uo(l)},P=l=>{h(!1),t?.(l),k(l)},f=()=>{h(!1)};return i||r==="create"?(0,zt.jsx)(jo,{mode:r==="create"?"create":"edit",document:u,onSave:P,onCancel:f,availableDocuments:n,knowledgeContexts:s}):(0,zt.jsxs)(Ut.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,zt.jsxs)("div",{className:"border-zt border-border bg-card zt-8",children:[(0,zt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,zt.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-zt-0",children:[(0,zt.jsx)("div",{className:"flex-shrink-0 zt-3 rounded-xl bg-muted border border-border",children:m(u.format)}),(0,zt.jsxs)("div",{className:"flex-1 min-zt-0",children:[(0,zt.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:u.title}),u.description&&(0,zt.jsx)("zt",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:u.description})]})]}),o&&(0,zt.jsx)("div",{className:"flex-shrink-0",children:(0,zt.jsxs)(K,{variant:"outline",size:"sm",onClick:()=>h(!0),className:"gap-2",children:[(0,zt.jsx)(se.Edit3,{className:"h-4 zt-4"}),"Edit"]})})]}),(0,zt.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,zt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(u.format)}`,children:u.format.toUpperCase()}),u.tags?.map(l=>(0,zt.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",l]},l))]})]}),(0,zt.jsx)("div",{className:"flex-1 overflow-auto",children:(0,zt.jsxs)("div",{className:"zt-8",children:[u.metadata&&Object.keys(u.metadata).length>0&&(0,zt.jsxs)("div",{className:"mb-6",children:[(0,zt.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,zt.jsx)("div",{className:"bg-muted rounded-lg zt-3 border border-border",children:(0,zt.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-zt-4 gap-y-1 text-xs",children:Object.entries(u.metadata).map(([l,g])=>(0,zt.jsxs)("div",{className:"flex gap-1",children:[(0,zt.jsxs)("span",{className:"text-muted-foreground font-medium",children:[l.replace(/([A-Z])/g," $1").trim(),":"]}),(0,zt.jsx)("span",{className:"text-foreground truncate",children:String(g)})]},l))})})]}),(0,zt.jsx)("div",{className:"space-y-4",children:u.content||u.richTextContent?(0,zt.jsx)("div",{className:"relative",children:(0,zt.jsx)("div",{className:"bg-card border border-border rounded-xl zt-6 overflow-hidden",children:N(u.format==="richText"?u.richTextContent:u.content,u.format)})}):(0,zt.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,zt.jsx)("div",{className:"zt-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,zt.jsx)(se.FileText,{className:"h-8 zt-8 text-muted-foreground"})}),(0,zt.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"zt content available"}),(0,zt.jsx)("zt",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Qo({label:e,documents:t,children:o,level:r,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:s=!0}){let[i,h]=(0,nt.useState)(r===0),u=o&&Object.keys(o).length>0,k=t.length+(o?Object.values(o).reduce((N,P)=>N+P.documents.length,0):0),m=N=>{switch(N){case"markdown":case"mdx":return(0,zt.jsx)(se.FileText,{className:"h-3.5 zt-3.5 text-muted-foreground"});case"richText":return(0,zt.jsx)(se.File,{className:"h-3.5 zt-3.5 text-muted-foreground"});default:return(0,zt.jsx)(se.File,{className:"h-3.5 zt-3.5 text-muted-foreground"})}},v=N=>{let P=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return P[N%P.length]};return(0,zt.jsxs)("div",{className:"space-y-1",children:[(u||t.length>0)&&(0,zt.jsxs)(Ut.motion.div,{className:`group flex items-center gap-3 zt-3 rounded-xl cursor-pointer transition-all duration-200 ${i?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>h(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,zt.jsx)("div",{className:`zt-1 h-6 rounded-full ${v(r)}`}),(0,zt.jsx)(Ut.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,zt.jsx)(se.ChevronRight,{className:"h-4 zt-4 text-muted-foreground"})}),(0,zt.jsxs)("div",{className:"flex-1 flex items-center justify-between min-zt-0",children:[(0,zt.jsx)("div",{className:"flex items-center gap-2 min-zt-0",children:(0,zt.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&k>0&&(0,zt.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,zt.jsx)("span",{className:"inline-flex items-center justify-center zt-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:k})})]})]}),(0,zt.jsx)(Ut.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,zt.jsxs)("div",{className:"zt-2 space-y-1",children:[t.map((N,P)=>(0,zt.jsxs)(Ut.motion.div,{initial:{opacity:0,zt:-10},animate:{opacity:1,zt:0},transition:{delay:P*.05,duration:.2},className:`group flex items-center gap-3 zt-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${n===N.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-zt-1"}`,style:{marginLeft:`${r*20+20}px`},onClick:()=>a?.(N),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,zt.jsx)("div",{className:"flex-shrink-0",children:m(N.format)}),(0,zt.jsxs)("div",{className:"flex-1 min-zt-0",children:[(0,zt.jsx)("zt",{className:`text-sm truncate transition-colors ${n===N.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:N.title}),N.description&&(0,zt.jsx)("zt",{className:"text-xs text-muted-foreground truncate zt-0.5",children:N.description})]}),N.tags&&N.tags.length>0&&(0,zt.jsx)("div",{className:"flex-shrink-0",children:(0,zt.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:N.tags[0]})})]},N.id)),o&&Object.entries(o).map(([N,P])=>(0,zt.jsx)(Qo,{label:N,documents:P.documents,children:P.children,level:r+1,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:s},N))]})})]})}function Yo({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:a,selectedDocumentId:n,className:s,editable:i=!0}){let[h,u]=(0,nt.useState)(""),[k,m]=(0,nt.useState)(null),[v,N]=(0,nt.useState)(e);(0,nt.useEffect)(()=>{N(e)},[e]);let P=(0,nt.useMemo)(()=>h?v.filter(g=>g.title.toLowerCase().includes(h.toLowerCase())||g.description?.toLowerCase().includes(h.toLowerCase())||g.tags?.some(d=>d.toLowerCase().includes(h.toLowerCase()))||Object.values(g.metadata||{}).some(d=>String(d).toLowerCase().includes(h.toLowerCase()))):v,[v,h]),f=(0,nt.useMemo)(()=>{let g=(d,c)=>{if(c.length===0)return{};let[A,...U]=c;return d.reduce((V,q)=>{let Y=q.metadata?.[A]||"Uncategorized",W=String(Y);if(V[W]||(V[W]={documents:[],children:{}}),U.length===0)V[W].documents.push(q);else{let ae=g([q],U),H=Object.keys(ae)[0];H&&(V[W].children||(V[W].children={}),V[W].children[H]?V[W].children[H].documents.push(...ae[H].documents):V[W].children[H]=ae[H])}return V},{})};return g(P,t.groupBy)},[P,t.groupBy]),l=g=>{m(g),o?.(g)};return(0,zt.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,zt.jsxs)("div",{className:"zt-1/3 border-r border-border bg-muted/20",children:[(0,zt.jsx)("div",{className:"zt-6 border-zt border-border",children:(0,zt.jsxs)("div",{className:"relative",children:[(0,zt.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,zt.jsx)(se.Search,{className:"h-4 zt-4 text-muted-foreground"})}),(0,zt.jsx)(J,{placeholder:"Search knowledge base...",value:h,onChange:g=>u(g.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,zt.jsx)(ct,{className:"h-[calc(100%-100px)]",children:(0,zt.jsxs)("div",{className:"zt-4 space-y-3",children:[Object.entries(f).map(([g,d])=>(0,zt.jsx)(Qo,{label:g,documents:d.documents,children:d.children,level:0,onDocumentClick:l,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},g)),Object.keys(f).length===0&&(0,zt.jsxs)(Ut.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,zt.jsx)("div",{className:"zt-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,zt.jsx)(se.FileText,{className:"h-8 zt-8 text-muted-foreground"})}),(0,zt.jsx)("zt",{className:"text-sm font-medium",children:"zt documents found"}),(0,zt.jsx)("zt",{className:"text-xs zt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,zt.jsx)("div",{className:"flex-1 bg-background",children:k?(0,zt.jsx)(Jo,{document:k,onDocumentUpdate:a,editable:i}):(0,zt.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,zt.jsxs)(Ut.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-zt-sm",children:[(0,zt.jsx)("div",{className:"zt-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,zt.jsx)(se.FileText,{className:"h-10 zt-10 text-primary"})}),(0,zt.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,zt.jsx)("zt",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}var tr=({isOpen:e,onClose:t,onAddKnowledge:o,knowledgeContexts:r})=>{let[a,n]=(0,nt.useState)({name:"",description:"",metadata:[]}),s=f=>{f.preventDefault(),a.name&&(o({name:a.name,description:a.description,metadata:a.metadata,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),n({name:"",description:"",metadata:[]}),t())},i=()=>{n({name:"",description:"",metadata:[]}),t()},u=(()=>{let f=new Set,l=new Set;return r.forEach(g=>{g.menuConfig.groupBy.forEach(d=>f.add(d))}),{contextKeys:Array.from(f).sort(),documentKeys:Array.from(l).sort(),allKeys:Array.from(new Set([...f,...l])).sort()}})(),k=f=>{let l=new Set;return Array.from(l).sort()},m=(f,l)=>{n(g=>{let d=g.metadata.find(c=>c.key===f);return d&&(d.value=l),{...g,metadata:[...g.metadata.filter(c=>c.key!==f),{key:f,value:l}]}})},v=(f,l)=>{l==="__custom__"?m(f,""):m(f,l)},N=()=>{m(" ","")},P=f=>{n(l=>{let g=[...l.metadata],d=g.findIndex(c=>c.key===f);return d!==-1&&g.splice(d,1),{...l,metadata:g}})};return(0,zt.jsx)(Ge,{open:e,onOpenChange:i,children:(0,zt.jsxs)(Ie,{className:"sm:max-zt-md",children:[(0,zt.jsx)(He,{children:(0,zt.jsx)(Ae,{children:"Add New Knowledge source"})}),(0,zt.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"name",children:"Name *"}),(0,zt.jsx)(J,{id:"name",value:a.name,onChange:f=>n(l=>({...l,name:f.target.value})),required:!0})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"name",children:"Description"}),(0,zt.jsx)(J,{id:"name",value:a.description,onChange:f=>n(l=>({...l,description:f.target.value})),required:!0})]}),(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"metadata",children:"Metadata"}),u.contextKeys.length>0&&(0,zt.jsxs)("zt",{className:"text-xs text-muted-foreground",children:["Suggested: ",u.contextKeys.slice(0,4).join(", "),u.contextKeys.length>4&&` +${u.contextKeys.length-4}`]})]}),(0,zt.jsxs)(K,{type:"button",variant:"outline",size:"sm",onClick:N,className:"gap-1 h-8",children:[(0,zt.jsx)(se.Plus,{className:"h-3 zt-3"}),"Add"]})]}),a.metadata&&a.metadata.length>0?(0,zt.jsx)("div",{className:"space-y-2",children:a.metadata.map(({key:f,value:l},g)=>{let d=k(f);return(0,zt.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,zt.jsx)(J,{value:f,onChange:c=>{let A=c.target.value||" ",U=a.metadata.find(E=>E.key===f)?.value;n(E=>{let V=[...E.metadata],q=V.findIndex(Y=>Y.key===f);return q!==-1&&V.splice(q,1),A&&V.push({key:A,value:U||""}),{...E,metadata:V}}),c.target.focus()},placeholder:"Key",className:"zt-32 h-8 text-sm",list:`metadata-keys-${f}`}),(0,zt.jsx)("datalist",{id:`metadata-keys-${f}`,children:u.allKeys.map(c=>(0,zt.jsx)("option",{value:c},c))}),(0,zt.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),d.length>0?(0,zt.jsxs)(ye,{value:String(l||""),onValueChange:c=>v(f,c),children:[(0,zt.jsx)(pe,{className:"flex-1 h-8 text-sm",children:(0,zt.jsx)(Ce,{placeholder:"Value"})}),(0,zt.jsxs)(fe,{children:[d.map(c=>(0,zt.jsx)(re,{value:c,children:c},c)),(0,zt.jsx)(re,{value:"__custom__",children:(0,zt.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,zt.jsx)(J,{value:String(l||""),onChange:c=>m(f,c.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,zt.jsx)(K,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(f),className:"h-8 zt-8 zt-0 text-muted-foreground hover:text-destructive",children:(0,zt.jsx)(se.X,{className:"h-3 zt-3"})})]},`metadata-key-${g}`)})}):(0,zt.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,zt.jsx)("zt",{className:"text-xs text-muted-foreground",children:'zt metadata \u2022 Click "Add" to create fields'})})]})]}),(0,zt.jsxs)("div",{className:"flex justify-end gap-3 zt-4",children:[(0,zt.jsxs)(K,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,zt.jsx)(se.X,{className:"h-4 zt-4"}),"Cancel"]}),(0,zt.jsxs)(K,{type:"submit",children:[(0,zt.jsx)(se.Save,{className:"h-4 zt-4"}),"Create"]})]})]})]})})};var or=({isOpen:e,onClose:t,onAddTeamContext:o})=>{let[r,a]=(0,nt.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[n,s]=(0,nt.useState)(""),i=m=>{m.preventDefault(),console.log("formData",r),r.label&&(o({id:r.label,label:r.label,description:r.description,menuConfig:{groupBy:r.groupBy,sortBy:r.sortBy||null,sortOrder:r.sortOrder,showDocumentCount:r.showDocumentCount}}),a({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},h=()=>{a({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},u=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],k=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,zt.jsx)(Ge,{open:e,onOpenChange:h,children:(0,zt.jsxs)(Ie,{className:"sm:max-zt-md",children:[(0,zt.jsx)(He,{children:(0,zt.jsx)(Ae,{children:"Add New Knowledge source"})}),(0,zt.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,zt.jsxs)("div",{className:"space-y-4",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"label",children:"Label *"}),(0,zt.jsx)(J,{id:"label",value:r.label,onChange:m=>a(v=>({...v,label:m.target.value})),required:!0})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"description",children:"Description"}),(0,zt.jsx)(J,{id:"description",value:r.description,onChange:m=>a(v=>({...v,description:m.target.value}))})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{children:"Group By"}),(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsx)("div",{className:"flex flex-wrap gap-2",children:r.groupBy.map(m=>(0,zt.jsxs)(Ve,{variant:"secondary",className:"px-2 py-1",children:[m,(0,zt.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{a(v=>({...v,groupBy:v.groupBy.filter(N=>N!==m)}))},"aria-label":`Remove ${m}`,children:(0,zt.jsx)(se.X,{className:"h-3 zt-3"})})]},m))}),(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsx)(J,{placeholder:"Type a tag and press Enter",value:n,onChange:m=>s(m.target.value),onKeyDown:m=>{(m.key==="Enter"||m.key===",")&&(m.preventDefault(),a(v=>({...v,groupBy:[...v.groupBy,n]})),s(""))}}),(0,zt.jsx)(K,{type:"button",onClick:()=>{a(m=>({...m,groupBy:[...m.groupBy,n]})),s("")},children:"Add"})]})]})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"sortBy",children:"Sort By"}),(0,zt.jsxs)(ye,{value:r.sortBy,onValueChange:m=>a(v=>({...v,sortBy:m})),children:[(0,zt.jsx)(pe,{children:(0,zt.jsx)(Ce,{placeholder:"Select sort field"})}),(0,zt.jsx)(fe,{children:u.map(m=>(0,zt.jsx)(re,{value:m.value,children:m.label},m.value))})]})]}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(ee,{htmlFor:"sortOrder",children:"Sort Order"}),(0,zt.jsxs)(ye,{value:r.sortOrder,onValueChange:m=>a(v=>({...v,sortOrder:m})),children:[(0,zt.jsx)(pe,{children:(0,zt.jsx)(Ce,{placeholder:"Select sort order"})}),(0,zt.jsx)(fe,{children:k.map(m=>(0,zt.jsx)(re,{value:m.value,children:m.label},m.value))})]})]}),(0,zt.jsxs)("div",{className:"flex items-center space-zt-2",children:[(0,zt.jsx)(yt,{id:"showDocumentCount",checked:r.showDocumentCount,onCheckedChange:m=>a(v=>({...v,showDocumentCount:m}))}),(0,zt.jsx)(ee,{htmlFor:"showDocumentCount",className:"text-sm",children:"Show Document Count"})]})]}),(0,zt.jsxs)("div",{className:"flex justify-end gap-3 zt-4",children:[(0,zt.jsxs)(K,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,zt.jsx)(se.X,{className:"h-4 zt-4"}),"Cancel"]}),(0,zt.jsxs)(K,{type:"submit",children:[(0,zt.jsx)(se.Save,{className:"h-4 zt-4"}),"Create"]})]})]})]})})};function rr({documents:e=[],contexts:t=[],onDocumentClick:o=u=>console.log("Document clicked:",u),onDocumentShare:r=u=>console.log("Share document:",u),onLoadDocumentContent:a,selectedDocumentId:n,onAddKnowledge:s,onAddTeamContext:i,onDocumentUpdate:h}){let[u,k]=(0,nt.useState)(t[0]),[m,v]=(0,nt.useState)(!1),[N,P]=(0,nt.useState)(!1),f=c=>{s&&s(c),v(!1)},l=c=>{i&&i(c),P(!1)},g=()=>(0,zt.jsx)(Wt,{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:s?{label:"Create",onClick:()=>v(!0)}:void 0,secondaryAction:i?{label:"Add Context",onClick:()=>P(!0)}:void 0}),d=()=>(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(or,{isOpen:N,onClose:()=>P(!1),onAddTeamContext:l}),(0,zt.jsx)(tr,{isOpen:m,onClose:()=>v(!1),onAddKnowledge:f,knowledgeContexts:t})]});return!t||t.length===0?(0,zt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,zt.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,zt.jsx)(g,{})}),(0,zt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,zt.jsx)("zt",{className:"text-muted-foreground",children:"zt contexts available"})}),(0,zt.jsx)(d,{})]}):(0,zt.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,zt.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,zt.jsx)(g,{}),(0,zt.jsxs)("div",{className:"zt-6",children:[(0,zt.jsx)("div",{className:"border-zt border-border",children:(0,zt.jsx)("nav",{className:"-mb-px flex space-zt-8 overflow-zt-auto",children:t.map(c=>(0,zt.jsxs)("button",{onClick:()=>k(c),className:`group inline-flex items-center gap-2 py-3 px-1 border-zt-2 font-medium text-sm whitespace-nowrap transition-colors ${u.id===c.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[c.icon,c.label]},c.id))})}),u.description&&(0,zt.jsx)("div",{className:"zt-3 px-1",children:(0,zt.jsx)("zt",{className:"text-sm text-muted-foreground",children:u.description})})]})]}),(0,zt.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,zt.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,zt.jsx)(Yo,{documents:e,menuConfig:u.menuConfig,onDocumentClick:o,onDocumentShare:r,selectedDocumentId:n,onDocumentUpdate:h})})}),(0,zt.jsx)(d,{})]})}
5
+ "use strict";"use client";var ar=Object.create;var qe=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var sr=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var dr=(e,t)=>{for(var o in t)qe(e,o,{get:t[o],enumerable:!0})},Mt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ir(t))!lr.call(e,a)&&a!==o&&qe(e,a,{get:()=>t[a],enumerable:!(r=nr(t,a))||r.enumerable});return e};var _=(e,t,o)=>(o=e!=null?ar(sr(e)):{},Mt(t||!e||!e.__esModule?qe(o,"default",{value:e,enumerable:!0}):o,e)),cr=e=>Mt(qe({},"__esModule",{value:!0}),e);var oa={};dr(oa,{default:()=>rr});module.exports=cr(oa);var Le=require("react");var Zt=require("motion/react");var zt=require("class-variance-authority");var Kt=require("clsx");var lt="-",mr=e=>{let t=pr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(lt);return i[0]===""&&i.length!==1&&i.shift(),At(i,t)||ur(s)},getConflictingClassGroupIds:(s,i)=>{let v=o[s]||[];return i&&r[s]?[...v,...r[s]]:v}}},At=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?At(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(lt);return t.validators.find(({validator:s})=>s(n))?.classGroupId},Tt=/^\[(.+)\]$/,ur=e=>{if(Tt.test(e)){let t=Tt.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},pr=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return gr(Object.entries(e.classGroups),o).forEach(([n,s])=>{st(s,r,n,t)}),r},st=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:It(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(fr(a)){st(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{st(s,It(t,n),o,r)})})},It=(e,t)=>{let o=e;return t.split(lt).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},fr=e=>e.isThemeGetter,gr=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,i])=>[t+s,i])):n);return[o,a]}):e,br=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,s)=>{o.set(n,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let s=o.get(n);if(s!==void 0)return s;if((s=r.get(n))!==void 0)return a(n,s),s},set(n,s){o.has(n)?o.set(n,s):a(n,s)}}},Ht="!",hr=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,s=i=>{let v=[],m=0,k=0,u;for(let l=0;l<i.length;l++){let c=i[l];if(m===0){if(c===a&&(r||i.slice(l,l+n)===t)){v.push(i.slice(k,l)),k=l+n;continue}if(c==="/"){u=l;continue}}c==="["?m++:c==="]"&&m--}let x=v.length===0?i:i.substring(k),N=x.startsWith(Ht),P=N?x.substring(1):x,g=u&&u>k?u-k:void 0;return{modifiers:v,hasImportantModifier:N,baseClassName:P,maybePostfixModifierPosition:g}};return o?i=>o({className:i,parseClassName:s}):s},vr=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},xr=e=>({cache:br(e.cacheSize),parseClassName:hr(e),...mr(e)}),wr=/\s+/,yr=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(wr),i="";for(let v=s.length-1;v>=0;v-=1){let m=s[v],{modifiers:k,hasImportantModifier:u,baseClassName:x,maybePostfixModifierPosition:N}=o(m),P=!!N,g=r(P?x.substring(0,N):x);if(!g){if(!P){i=m+(i.length>0?" "+i:i);continue}if(g=r(x),!g){i=m+(i.length>0?" "+i:i);continue}P=!1}let l=vr(k).join(":"),c=u?l+Ht:l,d=c+g;if(n.includes(d))continue;n.push(d);let p=a(g,P);for(let H=0;H<p.length;++H){let U=p[H];n.push(c+U)}i=m+(i.length>0?" "+i:i)}return i};function Cr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Lt(t))&&(r&&(r+=" "),r+=o);return r}var Lt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Lt(e[r]))&&(o&&(o+=" "),o+=t);return o};function Nr(e,...t){let o,r,a,n=s;function s(v){let m=t.reduce((k,u)=>u(k),e());return o=xr(m),r=o.cache.get,a=o.cache.set,n=i,i(v)}function i(v){let m=r(v);if(m)return m;let k=yr(v,o);return a(v,k),k}return function(){return n(Cr.apply(null,arguments))}}var L=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Bt=/^\[(?:([a-se-]+):)?(.+)\]$/i,Sr=/^\d+\/\d+$/,Dr=new Set(["px","full","screen"]),Rr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Ft|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Ft|Ft|i|Ft|min|max))|\Ft(calc|min|max|clamp)\(.+\)|^0$/,kr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mr=/^(inset_)?-?((\d+)?\.?(\d+)[a-se]+|0)_-?((\d+)?\.?(\d+)[a-se]+|0)/,Tr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>ke(e)||Dr.has(e)||Sr.test(e),he=e=>Me(e,"length",Kr),ke=e=>!!e&&!Number.isNaN(Number(e)),it=e=>Me(e,"number",ke),Ee=e=>!!e&&Number.isInteger(Number(e)),Ir=e=>e.endsWith("%")&&ke(e.slice(0,-1)),R=e=>Bt.test(e),ve=e=>Rr.test(e),Ar=new Set(["length","size","percentage"]),Hr=e=>Me(e,Ar,Et),Lr=e=>Me(e,"position",Et),Br=new Set(["image","url"]),Er=e=>Me(e,Br,Or),Vr=e=>Me(e,"",zr),Ve=()=>!0,Me=(e,t,o)=>{let r=Bt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Kr=e=>Pr.test(e)&&!kr.test(e),Et=()=>!1,zr=e=>Mr.test(e),Or=e=>Tr.test(e);var Fr=()=>{let e=L("colors"),t=L("spacing"),o=L("blur"),r=L("brightness"),a=L("borderColor"),n=L("borderRadius"),s=L("borderSpacing"),i=L("borderWidth"),v=L("contrast"),m=L("grayscale"),k=L("hueRotate"),u=L("invert"),x=L("gap"),N=L("gradientColorStops"),P=L("gradientColorStopPositions"),g=L("inset"),l=L("margin"),c=L("opacity"),d=L("padding"),p=L("saturate"),H=L("scale"),U=L("sepia"),B=L("skew"),E=L("space"),q=L("translate"),Y=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto",R,t],A=()=>[R,t],Pe=()=>["",ue,he],Be=()=>["auto",ke,R],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>["start","end","center","between","around","evenly","stretch"],le=()=>["","0",R],kt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[ke,R];return{cacheSize:500,separator:":",theme:{colors:[Ve],spacing:[ue,he],blur:["none","",ve,R],brightness:me(),borderColor:[e],borderRadius:["none","","full",ve,R],borderSpacing:A(),borderWidth:Pe(),contrast:me(),grayscale:le(),hueRotate:me(),invert:le(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Ir,he],inset:ae(),margin:ae(),opacity:me(),padding:A(),saturate:me(),scale:me(),sepia:le(),skew:me(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",R]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":kt()}],"break-before":[{"break-before":kt()}],"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:[...D(),R]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],se:[{se:["auto",Ee,R]}],basis:[{basis:ae()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",R]}],grow:[{grow:le()}],shrink:[{shrink:le()}],order:[{order:["first","last","none",Ee,R]}],"grid-cols":[{"grid-cols":[Ve]}],"col-start-end":[{col:["auto",{span:["full",Ee,R]},R]}],"col-start":[{"col-start":Be()}],"col-end":[{"col-end":Be()}],"grid-rows":[{"grid-rows":[Ve]}],"row-start-end":[{row:["auto",{span:[Ee,R]},R]}],"row-start":[{"row-start":Be()}],"row-end":[{"row-end":Be()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",R]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",R]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Ne()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ne(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ne(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[d]}],px:[{px:[d]}],py:[{py:[d]}],ps:[{ps:[d]}],pe:[{pe:[d]}],Ft:[{Ft:[d]}],pr:[{pr:[d]}],pb:[{pb:[d]}],pl:[{pl:[d]}],m:[{m:[l]}],mx:[{mx:[l]}],my:[{my:[l]}],ms:[{ms:[l]}],me:[{me:[l]}],Ft:[{Ft:[l]}],mr:[{mr:[l]}],mb:[{mb:[l]}],ml:[{ml:[l]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],Ft:[{Ft:["auto","min","max","fit","svw","lvw","dvw",R,t]}],"min-Ft":[{"min-Ft":[R,t,"min","max","fit"]}],"max-Ft":[{"max-Ft":[R,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],Ft:[{Ft:[R,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Ft":[{"min-Ft":[R,t,"min","max","fit","svh","lvh","dvh"]}],"max-Ft":[{"max-Ft":[R,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[R,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",it]}],"font-family":[{font:[Ve]}],"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",R]}],"line-clamp":[{"line-clamp":["none",ke,it]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,R]}],"list-image":[{"list-image":["none",R]}],"list-style-type":[{list:["none","disc","decimal",R]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[c]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,he]}],"underline-offset":[{"underline-offset":["auto",ue,R]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R]}],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",R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[c]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Lr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Ft","bl","l","tl"]},Er]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-Ft":[{"rounded-Ft":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-Ft":[{border:[i]}],"border-Ft-x":[{"border-x":[i]}],"border-Ft-y":[{"border-y":[i]}],"border-Ft-s":[{"border-s":[i]}],"border-Ft-e":[{"border-e":[i]}],"border-Ft-t":[{"border-t":[i]}],"border-Ft-r":[{"border-r":[i]}],"border-Ft-Ft":[{"border-Ft":[i]}],"border-Ft-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[c]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[c]}],"divide-style":[{divide:Z()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-Ft":[{"border-Ft":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[ue,R]}],"outline-Ft":[{outline:[ue,he]}],"outline-color":[{outline:[e]}],"ring-Ft":[{ring:Pe()}],"ring-Ft-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[c]}],"ring-offset-Ft":[{"ring-offset":[ue,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,Vr]}],"shadow-color":[{shadow:[Ve]}],opacity:[{opacity:[c]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",ve,R]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[k]}],invert:[{invert:[u]}],saturate:[{saturate:[p]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[c]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"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",R]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",R]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",R]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[Ee,R]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",R]}],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","Ft-resize","Ft-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-Ft":[{"scroll-Ft":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-Ft":[{"scroll-Ft":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",R]}],fill:[{fill:[e,"none"]}],"stroke-Ft":[{stroke:[ue,he,it]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","Ft","pr","pb","pl"],px:["pr","pl"],py:["Ft","pb"],m:["mx","my","ms","me","Ft","mr","mb","ml"],mx:["mr","ml"],my:["Ft","mb"],size:["Ft","Ft"],"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-Ft","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Ft":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Ft":["border-Ft-s","border-Ft-e","border-Ft-t","border-Ft-r","border-Ft-Ft","border-Ft-l"],"border-Ft-x":["border-Ft-r","border-Ft-l"],"border-Ft-y":["border-Ft-t","border-Ft-Ft"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Ft","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-Ft"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-Ft","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-Ft","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-Ft","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Ft","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Vt=Nr(Fr);function y(...e){return Vt((0,Kt.clsx)(e))}var Ft=require("react/jsx-runtime"),Ot=(0,zt.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 Ke({className:e,variant:t,...o}){return(0,Ft.jsx)("div",{className:y(Ot({variant:t}),e),...o})}var _t=require("@radix-ui/react-slot"),$t=_(require("react")),jt=(0,zt.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:"Ft-10 px-4 py-2",icon:"Ft-10 Ft-10",lg:"Ft-11 rounded px-8",sm:"Ft-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"}}}),V=$t.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},n)=>(0,Ft.jsx)(e?_t.Slot:"button",{className:y(jt({className:t,size:o,variant:r})),ref:n,...a}));V.displayName="Button";function Wt(e,t){let[o,r]=(0,Le.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),a=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,Le.useEffect)(()=>{a(o)},[]),[o,a]}var Je=require("react-icons/fa");function qt({title:e,description:t,badge:o,primaryAction:r,secondaryAction:a,gradient:n,children:s,className:i}){let[v,m]=Wt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!a&&!t),k=!a&&!t||v;return(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${i||""}`,children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Ft.jsx)(Ke,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Ft.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ft.jsxs)("div",{className:"flex items-center gap-3",children:[k&&r&&(0,Ft.jsx)(V,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(a||t)&&(0,Ft.jsx)("button",{"aria-label":v?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!v),style:{lineHeight:0},children:v?(0,Ft.jsx)(Je.FaChevronDown,{size:22}):(0,Ft.jsx)(Je.FaChevronUp,{size:22})})]})]}),!k&&(0,Ft.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ft.jsxs)("div",{className:"space-y-4",children:[(0,Ft.jsx)("p",{className:"max-Ft-[600px] text-white/80",children:t}),(0,Ft.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Ft.jsx)(V,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),a&&(0,Ft.jsx)(V,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:a.onClick,children:a.label})]})]}),s&&(0,Ft.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var se=require("lucide-react");var Xt=_(require("react"));var J=Xt.forwardRef(({className:e,type:t,...o},r)=>(0,Ft.jsx)("input",{type:t,className:y("flex Ft-9 Ft-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}));J.displayName="Input";var dt=_(require("react")),oe=_(require("@radix-ui/react-scroll-area"));var ct=dt.forwardRef(({className:e,children:t,...o},r)=>(0,Ft.jsxs)(oe.Root,{ref:r,className:y("relative overflow-hidden",e),...o,children:[(0,Ft.jsx)(oe.Viewport,{className:"Ft-full Ft-full rounded-[inherit]",children:t}),(0,Ft.jsx)(Qt,{}),(0,Ft.jsx)(oe.Corner,{})]}));ct.displayName=oe.Root.displayName;var Qt=dt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Ft.jsx)(oe.ScrollAreaScrollbar,{ref:r,orientation:t,className:y("flex touch-none select-none transition-colors",t==="vertical"&&"Ft-full Ft-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"Ft-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Ft.jsx)(oe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Qt.displayName=oe.ScrollAreaScrollbar.displayName;var Yt=_(require("react")),Qe=Yt.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)("textarea",{className:y("flex min-Ft-[80px] Ft-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}));Qe.displayName="Textarea";var M=_(require("@radix-ui/react-select")),we=_(require("react")),ye=M.Root;var Ce=M.Value,pe=we.forwardRef(({children:e,className:t,...o},r)=>(0,Ft.jsxs)(M.Trigger,{className:y("flex Ft-10 Ft-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,Ft.jsx)(M.Icon,{asChild:!0,children:(0,Ft.jsx)(se.ChevronDown,{className:"Ft-4 Ft-4 opacity-50"})})]}));pe.displayName=M.Trigger.displayName;var to=we.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(M.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Ft.jsx)(se.ChevronUp,{className:"Ft-4 Ft-4"})}));to.displayName=M.ScrollUpButton.displayName;var oo=we.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(M.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Ft.jsx)(se.ChevronDown,{className:"Ft-4 Ft-4"})}));oo.displayName=M.ScrollDownButton.displayName;var fe=we.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,Ft.jsx)(M.Portal,{children:(0,Ft.jsxs)(M.Content,{className:y("relative se-50 max-Ft-96 min-Ft-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:a,...r,children:[(0,Ft.jsx)(to,{}),(0,Ft.jsx)(M.Viewport,{className:y("p-1",o==="popper"&&"Ft-[var(--radix-select-trigger-height)] Ft-full min-Ft-[var(--radix-select-trigger-width)]"),children:e}),(0,Ft.jsx)(oo,{})]})}));fe.displayName=M.Content.displayName;var _r=we.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(M.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));_r.displayName=M.Label.displayName;var re=we.forwardRef(({children:e,className:t,...o},r)=>(0,Ft.jsxs)(M.Item,{className:y("relative flex Ft-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,Ft.jsx)("span",{className:"absolute left-2 flex Ft-3.5 Ft-3.5 items-center justify-center",children:(0,Ft.jsx)(M.ItemIndicator,{children:(0,Ft.jsx)(se.Check,{className:"Ft-4 Ft-4"})})}),(0,Ft.jsx)(M.ItemText,{children:e})]}));re.displayName=M.Item.displayName;var Gr=we.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(M.Separator,{className:y("-mx-1 my-1 Ft-px bg-muted",e),ref:o,...t}));Gr.displayName=M.Separator.displayName;var Bo=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Eo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Vo=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Ko=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),zo=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Oo=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Fo=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),at=require("@payloadcms/richtext-lexical/lexical/list"),_o=require("@payloadcms/richtext-lexical/lexical/rich-text"),Go=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Ao=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Ho=require("@payloadcms/richtext-lexical/lexical/utils"),I=require("@payloadcms/richtext-lexical/lexical"),Nt=require("@payloadcms/richtext-lexical/lexical/selection");var $r=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),ro=$r;var jr=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),ao=jr;var Ur=()=>(0,Ft.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ft.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,Ft.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),no=Ur;var Wr=()=>(0,Ft.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ft.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,Ft.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),io=Wr;var Zr=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),so=Zr;var qr=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),lo=qr;var co=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"Ft-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),mo=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"Ft-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),uo=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"Ft-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),po=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"Ft-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),fo=()=>(0,Ft.jsx)("svg",{"aria-hidden":"true",className:"Ft-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Ft.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var ge=_(require("react")),T=_(require("@radix-ui/react-dropdown-menu")),Te=require("@radix-ui/react-icons");var Ye=T.Root,et=T.Trigger;var go=ge.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,$.jsxs)(T.SubTrigger,{ref:a,className:y("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,$.jsx)(Te.ChevronRightIcon,{className:"ml-auto"})]}));go.displayName=T.SubTrigger.displayName;var bo=ge.forwardRef(({className:e,...t},o)=>(0,$.jsx)(T.SubContent,{ref:o,className:y("se-50 min-Ft-[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}));bo.displayName=T.SubContent.displayName;var Fe=ge.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$.jsx)(T.Portal,{children:(0,$.jsx)(T.Content,{ref:r,sideOffset:t,className:y("se-50 min-Ft-[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})}));Fe.displayName=T.Content.displayName;var _e=ge.forwardRef(({className:e,inset:t,...o},r)=>(0,$.jsx)(T.Item,{ref:r,className:y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));_e.displayName=T.Item.displayName;var ho=ge.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,$.jsxs)(T.CheckboxItem,{ref:a,className:y("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,$.jsx)("span",{className:"absolute left-2 flex Ft-3.5 Ft-3.5 items-center justify-center",children:(0,$.jsx)(T.ItemIndicator,{children:(0,$.jsx)(Te.CheckIcon,{className:"Ft-4 Ft-4"})})}),t]}));ho.displayName=T.CheckboxItem.displayName;var vo=ge.forwardRef(({className:e,children:t,...o},r)=>(0,$.jsxs)(T.RadioItem,{ref:r,className:y("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,$.jsx)("span",{className:"absolute left-2 flex Ft-3.5 Ft-3.5 items-center justify-center",children:(0,$.jsx)(T.ItemIndicator,{children:(0,$.jsx)(Te.DotFilledIcon,{className:"Ft-4 Ft-4 fill-current"})})}),t]}));vo.displayName=T.RadioItem.displayName;var xo=ge.forwardRef(({className:e,inset:t,...o},r)=>(0,$.jsx)(T.Label,{ref:r,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));xo.displayName=T.Label.displayName;var wo=ge.forwardRef(({className:e,...t},o)=>(0,$.jsx)(T.Separator,{ref:o,className:y("-mx-1 my-1 Ft-px bg-muted",e),...t}));wo.displayName=T.Separator.displayName;var yo=({className:e,...t})=>(0,$.jsx)("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});yo.displayName="DropdownMenuShortcut";var Co=_(require("react")),ie=_(require("@radix-ui/react-tooltip"));var bt=ie.Provider,ht=ie.Root,vt=ie.Trigger,tt=Co.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Ft.jsx)(ie.Portal,{children:(0,Ft.jsx)(ie.Content,{ref:r,sideOffset:t,className:y("se-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));tt.displayName=ie.Content.displayName;var No=_(require("react")),xt=_(require("@radix-ui/react-label"));var Xr=(0,zt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=No.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(xt.Root,{ref:o,className:y(Xr(),e),...t}));ee.displayName=xt.Root.displayName;var Ge=_(require("react")),j=_(require("@radix-ui/react-dialog"));var $e=j.Root;var Po=j.Portal;var wt=Ge.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(j.Overlay,{ref:o,className:y("fixed inset-0 se-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}));wt.displayName=j.Overlay.displayName;var Ie=Ge.forwardRef(({className:e,children:t,...o},r)=>(0,Ft.jsxs)(Po,{children:[(0,Ft.jsx)(wt,{}),(0,Ft.jsxs)(j.Content,{ref:r,className:y("fixed left-[50%] top-[50%] se-50 grid Ft-full max-Ft-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,Ft.jsxs)(j.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,Ft.jsx)(se.X,{className:"Ft-4 Ft-4"}),(0,Ft.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ie.displayName=j.Content.displayName;var Ae=({className:e,...t})=>(0,Ft.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ae.displayName="DialogHeader";var ko=({className:e,...t})=>(0,Ft.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ko.displayName="DialogFooter";var He=Ge.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(j.Title,{ref:o,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));He.displayName=j.Title.displayName;var Mo=Ge.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(j.Description,{ref:o,className:y("text-sm text-muted-foreground",e),...t}));Mo.displayName=j.Description.displayName;var je=_(require("@radix-ui/react-checkbox")),Io=_(require("react")),yt=Io.forwardRef(({className:e,...t},o)=>(0,Ft.jsx)(je.Root,{className:y("peer Ft-4 Ft-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,Ft.jsx)(je.Indicator,{className:y("flex items-center justify-center text-current"),children:(0,Ft.jsx)(se.Check,{className:"Ft-4 Ft-4"})})}));yt.displayName=je.Root.displayName;var Ct=1;function Jr(){return(0,Ft.jsx)("span",{className:"border border-[#222222]"})}function St(){let[e]=(0,Ao.useLexicalComposerContext)(),t=(0,Le.useRef)(null),[o,r]=(0,Le.useState)(!1),[a,n]=(0,Le.useState)(!1),[s,i]=(0,Le.useState)(!1),[v,m]=(0,Le.useState)(!1),[k,u]=(0,Le.useState)(!1),[x,N]=(0,Le.useState)(!1),[P,g]=(0,Le.useState)(!1),[l,c]=(0,Le.useState)(!1),[d,p]=(0,Le.useState)(!1),[H,U]=(0,Le.useState)("left"),[B,E]=(0,Le.useState)("p"),q=D=>{e.update(()=>{let Z=(0,I.$getSelection)();(0,I.$isRangeSelection)(Z)&&(D==="p"?(0,Nt.$setBlocksType)(Z,()=>(0,I.$createParagraphNode)()):(0,Nt.$setBlocksType)(Z,()=>(0,_o.$createHeadingNode)(D)))})},Y=(0,Le.useCallback)(()=>{let D=(0,I.$getSelection)();if((0,I.$isRangeSelection)(D)){i(D.hasFormat("bold")),m(D.hasFormat("italic")),u(D.hasFormat("underline")),N(D.hasFormat("strikethrough")),g(D.hasFormat("subscript")),c(D.hasFormat("superscript"));let Z=D.anchor.getNode(),X=Z;for(;X&&!(0,I.$isParagraphNode)(X)&&X!==(0,I.$getRoot)();){let le=X.getParent();le&&(X=le)}if(X){let le=X.getFormatType();U(le||"left")}let Ne=Z.getTopLevelElement()?.__tag;E(Ne||"p")}},[]);(0,Le.useEffect)(()=>(0,Ho.mergeRegister)(e.registerUpdateListener(({editorState:D})=>{D.read(()=>{Y()})}),e.registerCommand(I.SELECTION_CHANGE_COMMAND,(D,Z)=>(Y(),!1),Ct),e.registerCommand(I.CAN_UNDO_COMMAND,D=>(r(D),!1),Ct),e.registerCommand(I.CAN_REDO_COMMAND,D=>(n(D),!1),Ct)),[e,Y]);let W=[[{label:"Undo",icon:(0,Ft.jsx)(se.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,Ft.jsx)(se.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,Ft.jsx)(ro,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:s},{label:"Italic",icon:(0,Ft.jsx)(ao,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:v},{label:"Underline",icon:(0,Ft.jsx)(no,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:k},{label:"Strikethrough",icon:(0,Ft.jsx)(io,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:x},{label:"Subscript",icon:(0,Ft.jsx)(so,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:P},{label:"Superscript",icon:(0,Ft.jsx)(lo,{}),onClick:()=>{e.dispatchCommand(I.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:l}]],ae=[{label:"Left Align",direction:"left",icon:(0,Ft.jsx)(se.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,Ft.jsx)(se.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,Ft.jsx)(se.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,Ft.jsx)(se.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(I.FORMAT_ELEMENT_COMMAND,"justify")}}],Pe=[{label:"Normal Text",value:"p",icon:(0,Ft.jsx)(co,{}),onClick:()=>q("p")},{label:"Heading 1",value:"h1",icon:(0,Ft.jsx)(mo,{}),onClick:()=>q("h1")},{label:"Heading 2",value:"h2",icon:(0,Ft.jsx)(uo,{}),onClick:()=>q("h2")},{label:"Heading 3",value:"h3",icon:(0,Ft.jsx)(po,{}),onClick:()=>q("h3")},{label:"Heading 4",value:"h4",icon:(0,Ft.jsx)(fo,{}),onClick:()=>q("h4")},...[{label:"Unordered List",value:"ul",icon:(0,Ft.jsx)(se.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(at.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,Ft.jsx)(se.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(at.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],Be=[{label:"Insert Image",icon:(0,Ft.jsx)(se.ImageUp,{width:15,height:15}),onClick:()=>{p(!0)},disabled:!1}];return(0,Ft.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,Ft.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[W.map((D,Z)=>(0,Ft.jsxs)(Le.Fragment,{children:[(0,Ft.jsx)("div",{className:"flex items-center gap-2",children:D.map((X,Ne)=>(0,Ft.jsx)("div",{role:"button","aria-disabled":X.disabled||!1,onClick:X.onClick,className:y("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",X.active&&"bg-[#3c3c3c]"),"aria-label":X.label,children:(0,Ft.jsx)(bt,{children:(0,Ft.jsxs)(ht,{children:[(0,Ft.jsx)(vt,{className:"text-[#b5b5b5]",children:X.icon}),(0,Ft.jsx)(tt,{children:(0,Ft.jsx)("p",{children:X.label})})]})})},Ne))}),(0,Ft.jsx)(Jr,{})]},`toolbar-option-${D.length}-${Z}`)),(0,Ft.jsxs)(Ye,{children:[(0,Ft.jsxs)(et,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ae.find(D=>D.direction===H)?.icon,ae.find(D=>D.direction===H)?.label,(0,Ft.jsx)(se.ChevronDown,{width:15,height:15})]}),(0,Ft.jsx)(Fe,{className:"bg-black hover:bg-black",children:ae.map((D,Z)=>(0,Ft.jsxs)(_e,{onClick:D.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Ft.jsx)("span",{children:D.icon}),(0,Ft.jsx)("span",{children:D.label})]},`${D.label}-${Z}`))})]}),(0,Ft.jsxs)(Ye,{children:[(0,Ft.jsxs)(et,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Pe.find(D=>D.value===B)?.icon,Pe.find(D=>D.value===B)?.label,(0,Ft.jsx)(se.ChevronDown,{width:15,height:15})]}),(0,Ft.jsx)(Fe,{className:"bg-black hover:bg-black",children:Pe.map((D,Z)=>(0,Ft.jsxs)(_e,{onClick:D.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Ft.jsx)("span",{children:D.icon}),(0,Ft.jsx)("span",{children:D.label})]},`heading-option-${D.label}-${Z}`))})]})]})})}var Qr=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,$o.useLexicalComposerContext)(),n=s=>{s.read(()=>{let i=s.toJSON();e?.(()=>i)})};return(0,Le.useEffect)(()=>{a.setEditable(r)},[r]),(0,Le.useEffect)(()=>{t&&a.update(()=>{a.setEditorState(a.parseEditorState(t))})},[]),(0,Ft.jsx)("div",{className:"Ft-full",children:(0,Ft.jsxs)("div",{className:" ",children:[r&&(0,Ft.jsx)(St,{}),(0,Ft.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,Ft.jsx)(Oo.RichTextPlugin,{contentEditable:(0,Ft.jsx)(Vo.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-Ft-40"}),ErrorBoundary:Ko.LexicalErrorBoundary}),r&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(zo.HistoryPlugin,{}),(0,Ft.jsx)(Bo.AutoFocusPlugin,{}),(0,Ft.jsx)(Fo.ListPlugin,{}),(0,Ft.jsx)(Go.OnChangePlugin,{onChange:n})]})]})]})})},Yr=({setValue:e,value:t,name:o,editable:r=!0})=>(0,Ft.jsx)(Eo.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[at.ListNode,at.ListItemNode,_o.HeadingNode],onError(n){throw console.error("Lexical error:",n),n},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,Ft.jsx)(Qr,{value:t,setValue:e,name:o,editable:r})}),nt=Yr;function Uo({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:a=[],knowledgeContexts:n=[]}){let[s,i]=(0,Le.useState)({...e,updatedAt:new Date}),[v,m]=(0,Le.useState)(s.richTextContent);(0,Le.useEffect)(()=>{i(e)},[e]);let k=()=>{let d=new Set,p=new Set;return n.forEach(H=>{H.menuConfig.groupBy.forEach(U=>d.add(U))}),a.forEach(H=>{H.metadata&&Object.keys(H.metadata).forEach(U=>p.add(U))}),{contextKeys:Array.from(d).sort(),documentKeys:Array.from(p).sort(),allKeys:Array.from(new Set([...d,...p])).sort()}},u=d=>{let p=new Set;return a.forEach(H=>{H.metadata?.[d]&&p.add(String(H.metadata[d]))}),Array.from(p).sort()},x=k(),N=()=>{t({...s,richTextContent:v})},P=(d,p)=>{i(H=>({...H,metadata:{...H.metadata,[d]:p}}))},g=(d,p)=>{p==="__custom__"?P(d,""):P(d,p)},l=()=>{P("","")},c=d=>{i(p=>{let H={...p.metadata};return delete H[d],{...p,metadata:H}})};return(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Ft-full flex flex-col",children:[(0,Ft.jsxs)("div",{className:"border-Ft border-border bg-card p-8",children:[(0,Ft.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ft.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Ft.jsx)(se.Edit3,{className:"Ft-6 Ft-6 text-primary"})}),(0,Ft.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:o==="edit"?"Edit Document":"Create Document"})]}),(0,Ft.jsxs)("div",{className:"flex gap-2",children:[(0,Ft.jsxs)(V,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,Ft.jsx)(se.X,{className:"Ft-4 Ft-4"}),"Cancel"]}),(0,Ft.jsxs)(V,{size:"sm",onClick:N,className:"gap-2",children:[(0,Ft.jsx)(se.Save,{className:"Ft-4 Ft-4"}),"Save Changes"]})]})]}),(0,Ft.jsxs)("div",{className:"space-y-4",children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Ft.jsx)(J,{value:s.title,onChange:d=>i(p=>({...p,title:d.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Ft.jsx)(Qe,{value:s.description||"",onChange:d=>i(p=>({...p,description:d.target.value})),placeholder:"Document description...",rows:2})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),x.contextKeys.length>0&&(0,Ft.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",x.contextKeys.slice(0,4).join(", "),x.contextKeys.length>4&&` +${x.contextKeys.length-4}`]})]}),(0,Ft.jsxs)(V,{type:"button",variant:"outline",size:"sm",onClick:l,className:"gap-1 Ft-8",children:[(0,Ft.jsx)(se.Plus,{className:"Ft-3 Ft-3"}),"Add"]})]}),s.metadata&&Object.keys(s.metadata).length>0?(0,Ft.jsx)("div",{className:"space-y-2",children:Object.entries(s.metadata).map(([d,p],H)=>{let U=u(d);return(0,Ft.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ft.jsx)(J,{value:d,onChange:B=>{let E=B.target.value||"",q=s.metadata?.[d];i(Y=>{let W={...Y.metadata};return delete W[d],E&&(W[E]=q||""),{...Y,metadata:W}})},placeholder:"Key",className:"Ft-32 Ft-8 text-sm",list:`metadata-keys-${d}`}),(0,Ft.jsx)("datalist",{id:`metadata-keys-${d}`,children:x.allKeys.map(B=>(0,Ft.jsx)("option",{value:B},B))}),(0,Ft.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),U.length>0?(0,Ft.jsxs)(ye,{value:String(p||""),onValueChange:B=>g(d,B),children:[(0,Ft.jsx)(pe,{className:"flex-1 Ft-8 text-sm",children:(0,Ft.jsx)(Ce,{placeholder:"Value"})}),(0,Ft.jsxs)(fe,{children:[U.map(B=>(0,Ft.jsx)(re,{value:B,children:B},B)),(0,Ft.jsx)(re,{value:"__custom__",children:(0,Ft.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ft.jsx)(J,{value:String(p||""),onChange:B=>P(d,B.target.value),placeholder:"Value",className:"flex-1 Ft-8 text-sm"}),(0,Ft.jsx)(V,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(d),className:"Ft-8 Ft-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ft.jsx)(se.X,{className:"Ft-3 Ft-3"})})]},`metadata-key-${H}`)})}):(0,Ft.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Ft.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ft.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format"}),(0,Ft.jsxs)(ye,{value:s.format,onValueChange:d=>i(p=>({...p,format:d})),children:[(0,Ft.jsx)(pe,{className:"flex-1 Ft-8 text-sm",children:(0,Ft.jsx)(Ce,{placeholder:"Format"})}),(0,Ft.jsxs)(fe,{children:[(0,Ft.jsx)(re,{value:"markdown",children:"Markdown"}),(0,Ft.jsx)(re,{value:"richText",children:"Rich Text"})]})]})]})]})]}),(0,Ft.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ft.jsxs)("div",{className:"p-8",children:[(0,Ft.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),s.format==="richText"?(0,Ft.jsx)(nt,{setValue:m,value:v,name:"richTextContent"}):(0,Ft.jsx)(Qe,{value:s.content||"",onChange:d=>i(p=>({...p,content:d.target.value})),placeholder:"Document content...",className:"min-Ft-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var qo=_(require("react-markdown")),Xo=_(require("remark-gfm"));var Jo=e=>(0,Ft.jsx)(qo.default,{remarkPlugins:[Xo.default],components:{h1:({children:t})=>(0,Ft.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,Ft.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,Ft.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,Ft.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,Ft.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,Ft.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,Ft.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,Ft.jsx)("p",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,Ft.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,Ft.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,Ft.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Wo=e=>(0,Ft.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),ea=e=>(0,Ft.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Ft-none",children:e&&(0,Ft.jsx)(nt,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),ta=e=>(0,Ft.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Ft-none",children:[(0,Ft.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,Ft.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ft.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Jo(e)]});function Qo({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:a,availableDocuments:n=[],knowledgeContexts:s=[]}){let[i,v]=(0,Le.useState)(!1),[m,k]=(0,Le.useState)(e);(0,Le.useEffect)(()=>{k(e)},[e]);let u=l=>{switch(l){case"markdown":case"mdx":return(0,Ft.jsx)(se.FileText,{className:"Ft-6 Ft-6 text-primary"});case"richText":return(0,Ft.jsx)(se.File,{className:"Ft-6 Ft-6 text-success"});case"text":return(0,Ft.jsx)(se.Type,{className:"Ft-6 Ft-6 text-muted-foreground"});default:return(0,Ft.jsx)(se.File,{className:"Ft-6 Ft-6 text-muted-foreground"})}},x=l=>{switch(l){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=(l,c)=>{let d={markdown:Jo,mdx:ta,text:Wo},p=a?.[c]||d[c];if(c==="richText"&&typeof l=="object")return ea(l);if(p&&typeof l=="string")return p(l);if(typeof l=="string")return Wo(l)},P=l=>{v(!1),t?.(l),k(l)},g=()=>{v(!1)};return i||r==="create"?(0,Ft.jsx)(Uo,{mode:r==="create"?"create":"edit",document:m,onSave:P,onCancel:g,availableDocuments:n,knowledgeContexts:s}):(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Ft-full flex flex-col",children:[(0,Ft.jsxs)("div",{className:"border-Ft border-border bg-card p-8",children:[(0,Ft.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ft.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Ft-0",children:[(0,Ft.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:u(m.format)}),(0,Ft.jsxs)("div",{className:"flex-1 min-Ft-0",children:[(0,Ft.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:m.title}),m.description&&(0,Ft.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:m.description})]})]}),o&&(0,Ft.jsx)("div",{className:"flex-shrink-0",children:(0,Ft.jsxs)(V,{variant:"outline",size:"sm",onClick:()=>v(!0),className:"gap-2",children:[(0,Ft.jsx)(se.Edit3,{className:"Ft-4 Ft-4"}),"Edit"]})})]}),(0,Ft.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Ft.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${x(m.format)}`,children:m.format.toUpperCase()}),m.tags?.map(l=>(0,Ft.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",l]},l))]})]}),(0,Ft.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ft.jsxs)("div",{className:"p-8",children:[m.metadata&&Object.keys(m.metadata).length>0&&(0,Ft.jsxs)("div",{className:"mb-6",children:[(0,Ft.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Ft.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Ft.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(m.metadata).map(([l,c])=>(0,Ft.jsxs)("div",{className:"flex gap-1",children:[(0,Ft.jsxs)("span",{className:"text-muted-foreground font-medium",children:[l.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Ft.jsx)("span",{className:"text-foreground truncate",children:String(c)})]},l))})})]}),(0,Ft.jsx)("div",{className:"space-y-4",children:m.content||m.richTextContent?(0,Ft.jsx)("div",{className:"relative",children:(0,Ft.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:N(m.format==="richText"?m.richTextContent:m.content,m.format)})}):(0,Ft.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Ft.jsx)("div",{className:"Ft-16 Ft-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Ft.jsx)(se.FileText,{className:"Ft-8 Ft-8 text-muted-foreground"})}),(0,Ft.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Ft.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Rt({label:e,documents:t,children:o,level:r,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:s=!0}){let[i,v]=(0,Le.useState)(r===0),m=o&&Object.keys(o).length>0,k=t.length+(o?Object.values(o).reduce((N,P)=>N+P.documents.length,0):0),u=N=>{switch(N){case"markdown":case"mdx":return(0,Ft.jsx)(se.FileText,{className:"Ft-3.5 Ft-3.5 text-muted-foreground"});case"richText":return(0,Ft.jsx)(se.File,{className:"Ft-3.5 Ft-3.5 text-muted-foreground"});default:return(0,Ft.jsx)(se.File,{className:"Ft-3.5 Ft-3.5 text-muted-foreground"})}},x=N=>{let P=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return P[N%P.length]};return(0,Ft.jsxs)("div",{className:"space-y-1",children:[(m||t.length>0)&&(0,Ft.jsxs)(Zt.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${i?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>v(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ft.jsx)("div",{className:`Ft-1 Ft-6 rounded-full ${x(r)}`}),(0,Ft.jsx)(Zt.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Ft.jsx)(se.ChevronRight,{className:"Ft-4 Ft-4 text-muted-foreground"})}),(0,Ft.jsxs)("div",{className:"flex-1 flex items-center justify-between min-Ft-0",children:[(0,Ft.jsx)("div",{className:"flex items-center gap-2 min-Ft-0",children:(0,Ft.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&k>0&&(0,Ft.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Ft.jsx)("span",{className:"inline-flex items-center justify-center Ft-6 Ft-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:k})})]})]}),(0,Ft.jsx)(Zt.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ft.jsxs)("div",{className:"Ft-2 space-y-1",children:[t.map((N,P)=>(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:P*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${n===N.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:()=>a?.(N),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ft.jsx)("div",{className:"flex-shrink-0",children:u(N.format)}),(0,Ft.jsxs)("div",{className:"flex-1 min-Ft-0",children:[(0,Ft.jsx)("p",{className:`text-sm truncate transition-colors ${n===N.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:N.title}),N.description&&(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground truncate Ft-0.5",children:N.description})]}),N.tags&&N.tags.length>0&&(0,Ft.jsx)("div",{className:"flex-shrink-0",children:(0,Ft.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:N.tags[0]})})]},N.id)),o&&Object.entries(o).map(([N,P])=>(0,Ft.jsx)(Rt,{label:N,documents:P.documents,children:P.children,level:r+1,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:s},N))]})})]})}function Yo({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:a,selectedDocumentId:n,className:s,editable:i=!0}){let[v,m]=(0,Le.useState)(""),[k,u]=(0,Le.useState)(null),[x,N]=(0,Le.useState)(e);(0,Le.useEffect)(()=>{N(e)},[e]);let P=(0,Le.useMemo)(()=>v?x.filter(c=>c.title.toLowerCase().includes(v.toLowerCase())||c.description?.toLowerCase().includes(v.toLowerCase())||c.tags?.some(d=>d.toLowerCase().includes(v.toLowerCase()))||Object.values(c.metadata||{}).some(d=>String(d).toLowerCase().includes(v.toLowerCase()))):x,[x,v]),g=(0,Le.useMemo)(()=>{let c=(d,p)=>{if(p.length===0)return{};let[H,...U]=p;return d.reduce((E,q)=>{let Y=q.metadata?.[H]||"Uncategorized",W=String(Y);if(E[W]||(E[W]={documents:[],children:{}}),U.length===0)E[W].documents.push(q);else{let ae=c([q],U),A=Object.keys(ae)[0];A&&(E[W].children||(E[W].children={}),E[W].children[A]?E[W].children[A].documents.push(...ae[A].documents):E[W].children[A]=ae[A])}return E},{})};return c(P,t.groupBy)},[P,t.groupBy]),l=c=>{u(c),o?.(c)};return(0,Ft.jsxs)("div",{className:`flex Ft-full ${s||""}`,children:[(0,Ft.jsxs)("div",{className:"Ft-1/3 border-r border-border bg-muted/20",children:[(0,Ft.jsx)("div",{className:"p-6 border-Ft border-border",children:(0,Ft.jsxs)("div",{className:"relative",children:[(0,Ft.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Ft.jsx)(se.Search,{className:"Ft-4 Ft-4 text-muted-foreground"})}),(0,Ft.jsx)(J,{placeholder:"Search knowledge base...",value:v,onChange:c=>m(c.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl Ft-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Ft.jsx)(ct,{className:"Ft-[calc(100%-100px)]",children:(0,Ft.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(Rt,{label:"Document",documents:P,level:0,onDocumentClick:l,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},"Document")}):(0,Ft.jsxs)(Ft.Fragment,{children:[Object.entries(g).map(([c,d])=>(0,Ft.jsx)(Rt,{label:c,documents:d.documents,children:d.children,level:0,onDocumentClick:l,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},c)),Object.keys(g).length===0&&(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Ft.jsx)("div",{className:"Ft-16 Ft-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Ft.jsx)(se.FileText,{className:"Ft-8 Ft-8 text-muted-foreground"})}),(0,Ft.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Ft.jsx)("p",{className:"text-xs Ft-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,Ft.jsx)("div",{className:"flex-1 bg-background",children:k?(0,Ft.jsx)(Qo,{document:k,onDocumentUpdate:a,editable:i}):(0,Ft.jsx)("div",{className:"Ft-full flex items-center justify-center text-center",children:(0,Ft.jsxs)(Zt.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-Ft-sm",children:[(0,Ft.jsx)("div",{className:"Ft-20 Ft-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Ft.jsx)(se.FileText,{className:"Ft-10 Ft-10 text-primary"})}),(0,Ft.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Ft.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}var tr=({isOpen:e,onClose:t,onAddKnowledge:o,knowledgeContexts:r})=>{let[a,n]=(0,Le.useState)({name:"",description:"",metadata:[]}),s=g=>{g.preventDefault(),a.name&&(o({name:a.name,description:a.description,metadata:a.metadata,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),n({name:"",description:"",metadata:[]}),t())},i=()=>{n({name:"",description:"",metadata:[]}),t()},m=(()=>{let g=new Set,l=new Set;return r.forEach(c=>{c.menuConfig.groupBy.forEach(d=>g.add(d))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(l).sort(),allKeys:Array.from(new Set([...g,...l])).sort()}})(),k=g=>{let l=new Set;return Array.from(l).sort()},u=(g,l)=>{n(c=>{let d=c.metadata.find(p=>p.key===g);return d&&(d.value=l),{...c,metadata:[...c.metadata.filter(p=>p.key!==g),{key:g,value:l}]}})},x=(g,l)=>{l==="__custom__"?u(g,""):u(g,l)},N=()=>{u(" ","")},P=g=>{n(l=>{let c=[...l.metadata],d=c.findIndex(p=>p.key===g);return d!==-1&&c.splice(d,1),{...l,metadata:c}})};return(0,Ft.jsx)($e,{open:e,onOpenChange:i,children:(0,Ft.jsxs)(Ie,{className:"sm:max-Ft-md",children:[(0,Ft.jsx)(Ae,{children:(0,Ft.jsx)(He,{children:"Add New Knowledge source"})}),(0,Ft.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Ft.jsxs)("div",{className:"space-y-2",children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"name",children:"Name *"}),(0,Ft.jsx)(J,{id:"name",value:a.name,onChange:g=>n(l=>({...l,name:g.target.value})),required:!0})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"name",children:"Description"}),(0,Ft.jsx)(J,{id:"name",value:a.description,onChange:g=>n(l=>({...l,description:g.target.value})),required:!0})]}),(0,Ft.jsxs)("div",{className:"space-y-2",children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"metadata",children:"Metadata"}),m.contextKeys.length>0&&(0,Ft.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",m.contextKeys.slice(0,4).join(", "),m.contextKeys.length>4&&` +${m.contextKeys.length-4}`]})]}),(0,Ft.jsxs)(V,{type:"button",variant:"outline",size:"sm",onClick:N,className:"gap-1 Ft-8",children:[(0,Ft.jsx)(se.Plus,{className:"Ft-3 Ft-3"}),"Add"]})]}),a.metadata&&a.metadata.length>0?(0,Ft.jsx)("div",{className:"space-y-2",children:a.metadata.map(({key:g,value:l},c)=>{let d=k(g);return(0,Ft.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ft.jsx)(J,{value:g,onChange:p=>{let H=p.target.value||" ",U=a.metadata.find(B=>B.key===g)?.value;n(B=>{let E=[...B.metadata],q=E.findIndex(Y=>Y.key===g);return q!==-1&&E.splice(q,1),H&&E.push({key:H,value:U||""}),{...B,metadata:E}}),p.target.focus()},placeholder:"Key",className:"Ft-32 Ft-8 text-sm",list:`metadata-keys-${g}`}),(0,Ft.jsx)("datalist",{id:`metadata-keys-${g}`,children:m.allKeys.map(p=>(0,Ft.jsx)("option",{value:p},p))}),(0,Ft.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),d.length>0?(0,Ft.jsxs)(ye,{value:String(l||""),onValueChange:p=>x(g,p),children:[(0,Ft.jsx)(pe,{className:"flex-1 Ft-8 text-sm",children:(0,Ft.jsx)(Ce,{placeholder:"Value"})}),(0,Ft.jsxs)(fe,{children:[d.map(p=>(0,Ft.jsx)(re,{value:p,children:p},p)),(0,Ft.jsx)(re,{value:"__custom__",children:(0,Ft.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ft.jsx)(J,{value:String(l||""),onChange:p=>u(g,p.target.value),placeholder:"Value",className:"flex-1 Ft-8 text-sm"}),(0,Ft.jsx)(V,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(g),className:"Ft-8 Ft-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ft.jsx)(se.X,{className:"Ft-3 Ft-3"})})]},`metadata-key-${c}`)})}):(0,Ft.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]})]}),(0,Ft.jsxs)("div",{className:"flex justify-end gap-3 Ft-4",children:[(0,Ft.jsxs)(V,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Ft.jsx)(se.X,{className:"Ft-4 Ft-4"}),"Cancel"]}),(0,Ft.jsxs)(V,{type:"submit",children:[(0,Ft.jsx)(se.Save,{className:"Ft-4 Ft-4"}),"Create"]})]})]})]})})};var or=({isOpen:e,onClose:t,onAddTeamContext:o})=>{let[r,a]=(0,Le.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[n,s]=(0,Le.useState)(""),i=u=>{u.preventDefault(),console.log("formData",r),r.label&&(o({id:r.label,label:r.label,description:r.description,menuConfig:{groupBy:r.groupBy,sortBy:r.sortBy||null,sortOrder:r.sortOrder,showDocumentCount:r.showDocumentCount}}),a({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},v=()=>{a({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},m=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],k=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,Ft.jsx)($e,{open:e,onOpenChange:v,children:(0,Ft.jsxs)(Ie,{className:"sm:max-Ft-md",children:[(0,Ft.jsx)(Ae,{children:(0,Ft.jsx)(He,{children:"Add New Knowledge source"})}),(0,Ft.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Ft.jsxs)("div",{className:"space-y-4",children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"label",children:"Label *"}),(0,Ft.jsx)(J,{id:"label",value:r.label,onChange:u=>a(x=>({...x,label:u.target.value})),required:!0})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"description",children:"Description"}),(0,Ft.jsx)(J,{id:"description",value:r.description,onChange:u=>a(x=>({...x,description:u.target.value}))})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{children:"Group By"}),(0,Ft.jsxs)("div",{className:"space-y-2",children:[(0,Ft.jsx)("div",{className:"flex flex-wrap gap-2",children:r.groupBy.map(u=>(0,Ft.jsxs)(Ke,{variant:"secondary",className:"px-2 py-1",children:[u,(0,Ft.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{a(x=>({...x,groupBy:x.groupBy.filter(N=>N!==u)}))},"aria-label":`Remove ${u}`,children:(0,Ft.jsx)(se.X,{className:"Ft-3 Ft-3"})})]},u))}),(0,Ft.jsxs)("div",{className:"flex gap-2",children:[(0,Ft.jsx)(J,{placeholder:"Type a tag and press Enter",value:n,onChange:u=>s(u.target.value),onKeyDown:u=>{(u.key==="Enter"||u.key===",")&&(u.preventDefault(),a(x=>({...x,groupBy:[...x.groupBy,n]})),s(""))}}),(0,Ft.jsx)(V,{type:"button",onClick:()=>{a(u=>({...u,groupBy:[...u.groupBy,n]})),s("")},children:"Add"})]})]})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"sortBy",children:"Sort By"}),(0,Ft.jsxs)(ye,{value:r.sortBy,onValueChange:u=>a(x=>({...x,sortBy:u})),children:[(0,Ft.jsx)(pe,{children:(0,Ft.jsx)(Ce,{placeholder:"Select sort field"})}),(0,Ft.jsx)(fe,{children:m.map(u=>(0,Ft.jsx)(re,{value:u.value,children:u.label},u.value))})]})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)(ee,{htmlFor:"sortOrder",children:"Sort Order"}),(0,Ft.jsxs)(ye,{value:r.sortOrder,onValueChange:u=>a(x=>({...x,sortOrder:u})),children:[(0,Ft.jsx)(pe,{children:(0,Ft.jsx)(Ce,{placeholder:"Select sort order"})}),(0,Ft.jsx)(fe,{children:k.map(u=>(0,Ft.jsx)(re,{value:u.value,children:u.label},u.value))})]})]}),(0,Ft.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ft.jsx)(yt,{id:"showDocumentCount",checked:r.showDocumentCount,onCheckedChange:u=>a(x=>({...x,showDocumentCount:u}))}),(0,Ft.jsx)(ee,{htmlFor:"showDocumentCount",className:"text-sm",children:"Show Document Count"})]})]}),(0,Ft.jsxs)("div",{className:"flex justify-end gap-3 Ft-4",children:[(0,Ft.jsxs)(V,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Ft.jsx)(se.X,{className:"Ft-4 Ft-4"}),"Cancel"]}),(0,Ft.jsxs)(V,{type:"submit",children:[(0,Ft.jsx)(se.Save,{className:"Ft-4 Ft-4"}),"Create"]})]})]})]})})};function rr({documents:e=[],contexts:t=[],onDocumentClick:o=m=>console.log("Document clicked:",m),onDocumentShare:r=m=>console.log("Share document:",m),onLoadDocumentContent:a,selectedDocumentId:n,onAddKnowledge:s,onAddTeamContext:i,onDocumentUpdate:v}){let[m,k]=(0,Le.useState)(t[0]),[u,x]=(0,Le.useState)(!1),[N,P]=(0,Le.useState)(!1);(0,Le.useEffect)(()=>{!m&&t&&t.length>0&&k(t[0])},[t]);let g=c=>{s&&s(c),x(!1)},l=c=>{i&&i(c),P(!1)};return(0,Ft.jsxs)("div",{className:"flex flex-col Ft-full max-Ft-[calc(100vh-8rem)]",children:[(0,Ft.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Ft.jsx)(qt,{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:s?{label:"Create",onClick:()=>x(!0)}:void 0,secondaryAction:i?{label:"Add Context",onClick:()=>P(!0)}:void 0}),t&&t.length>0&&(0,Ft.jsxs)("div",{className:"Ft-6",children:[(0,Ft.jsx)("div",{className:"border-Ft border-border",children:(0,Ft.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(c=>(0,Ft.jsxs)("button",{onClick:()=>k(c),className:`group inline-flex items-center gap-2 py-3 px-1 border-Ft-2 font-medium text-sm whitespace-nowrap transition-colors ${m?.id===c.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[c.icon,c.label]},c.id))})}),m?.description&&(0,Ft.jsx)("div",{className:"Ft-3 px-1",children:(0,Ft.jsx)("p",{className:"text-sm text-muted-foreground",children:m?.description})})]})]}),m?(0,Ft.jsx)("div",{className:"flex-1 min-Ft-0 px-2 md:px-4 pb-4",children:(0,Ft.jsx)("div",{className:"Ft-full rounded-3xl border overflow-hidden",children:(0,Ft.jsx)(Yo,{documents:e,menuConfig:m?.menuConfig,onDocumentClick:o,onDocumentShare:r,selectedDocumentId:n,onDocumentUpdate:v})})}):(0,Ft.jsx)("div",{className:"flex-1 min-Ft-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Ft.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})}),(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(or,{isOpen:N,onClose:()=>P(!1),onAddTeamContext:l}),(0,Ft.jsx)(tr,{isOpen:u,onClose:()=>x(!1),onAddKnowledge:g,knowledgeContexts:t})]})]})}
@@ -1 +1,2 @@
1
- import{a}from"../../../chunk-TNQS3NVB.mjs";import"../../../chunk-3F6AUCZF.mjs";import"../../../chunk-U2OXF7PJ.mjs";import"../../../chunk-UK7PR73C.mjs";import"../../../chunk-UCPJ4KXN.mjs";import"../../../chunk-RFRNTKO7.mjs";import"../../../chunk-SX456QYL.mjs";import"../../../chunk-EUMMM454.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-YNCJATT7.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-EGEO3FNE.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-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
1
+ "use client";
2
+ "use strict";import{a}from"../../../chunk-SK2QJG6J.mjs";import"../../../chunk-3F6AUCZF.mjs";import"../../../chunk-U2OXF7PJ.mjs";import"../../../chunk-ZCBUDRT7.mjs";import"../../../chunk-DA2BPW6D.mjs";import"../../../chunk-ZAAHG2J7.mjs";import"../../../chunk-RBJOTC2X.mjs";import"../../../chunk-EUMMM454.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-PXLSH6S2.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-YNCJATT7.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-EGEO3FNE.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-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};