cortex-react-components 2.23.2 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2HKAJ4TZ.mjs +4 -0
- package/dist/{chunk-IF3425JX.mjs → chunk-2VOOH4YJ.mjs} +1 -1
- package/dist/{chunk-LBUC4M6L.mjs → chunk-3MCZBHGA.mjs} +1 -1
- package/dist/{chunk-UECG3SCG.mjs → chunk-3Y4EXCL7.mjs} +1 -1
- package/dist/{chunk-CBIULUZQ.mjs → chunk-4IVQWIYV.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-57PJ7CHJ.mjs} +1 -1
- package/dist/{chunk-GZ7FGBTR.mjs → chunk-5EM6P7SU.mjs} +1 -1
- package/dist/{chunk-5WVFEIMC.mjs → chunk-6DQ7FEQQ.mjs} +1 -1
- package/dist/chunk-6UDBIRMT.mjs +1 -0
- package/dist/{chunk-HKGW6JI2.mjs → chunk-75XBZHOC.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-B2TBKNIJ.mjs} +1 -1
- package/dist/{chunk-TSFX33PR.mjs → chunk-BGQC6IQK.mjs} +1 -1
- package/dist/{chunk-GSSW663E.mjs → chunk-BZOG5JBW.mjs} +1 -1
- package/dist/{chunk-XJKRA2AE.mjs → chunk-CMU5JFUC.mjs} +1 -1
- package/dist/{chunk-N3B3XNV3.mjs → chunk-FRXZ2OKW.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-FX6IXEMQ.mjs} +1 -1
- package/dist/{chunk-LEUI66J6.mjs → chunk-GULRIPMU.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/{chunk-NWISIJFD.mjs → chunk-K4MFTVNB.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-KY3ELFX5.mjs} +1 -1
- package/dist/{chunk-LJOWXPWW.mjs → chunk-MUHR5KA5.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-N52FSTLG.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-NPGGDQ6F.mjs} +1 -1
- package/dist/{chunk-JTMIQ7MK.mjs → chunk-NXAQ6ESJ.mjs} +1 -1
- package/dist/chunk-P5LSKHQC.mjs +9 -0
- package/dist/{chunk-CQAMS7RZ.mjs → chunk-PDAMYUP7.mjs} +1 -1
- package/dist/{chunk-JPLBPV7J.mjs → chunk-PYFPL7A5.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-Q7KKN6MH.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-QWFFSMKK.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-RUZVSK25.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-S4ES6P3Y.mjs} +1 -1
- package/dist/chunk-SEITRCGW.mjs +1 -0
- package/dist/{chunk-7GMAMIHM.mjs → chunk-SPAOEUCG.mjs} +1 -1
- package/dist/{chunk-B7AXSCTN.mjs → chunk-STX6KQP5.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-TUACRDU3.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-SCBDVNHG.mjs → chunk-VATGKKXW.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-VBSFVJM5.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/chunk-VTFO5GXK.mjs +4 -0
- package/dist/chunk-XDELWNND.mjs +4 -0
- package/dist/{chunk-S7MFNEEY.mjs → chunk-YJ7XPZWV.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +6 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +6 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +6 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +6 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.js +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +6 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.js +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.js +3 -3
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.js +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/file-edit.css +1 -0
- package/dist/components/Foundary/file-edit.d.ts +9 -0
- package/dist/components/Foundary/file-edit.js +9 -0
- package/dist/components/Foundary/file-edit.mjs +2 -0
- package/dist/components/Foundary/index.js +6 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.js +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/Foundary/types.d.ts +1 -0
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/FileView.d.ts +2 -1
- package/dist/components/Projects/FileView.js +6 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.d.ts +3 -0
- package/dist/components/Projects/KanbanBoardView.js +6 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +6 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +6 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.d.ts +3 -0
- package/dist/components/Projects/TaskDetailsModal.js +6 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/file-list.d.ts +4 -2
- package/dist/components/Projects/file-list.js +6 -1
- package/dist/components/Projects/file-list.mjs +1 -1
- package/dist/components/Projects/index.js +6 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.js +6 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +31 -26
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +36 -31
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-JXQRVEQB.mjs +0 -4
- package/dist/chunk-L5NPH5RX.mjs +0 -1
- package/dist/chunk-NAGBKKTZ.mjs +0 -4
- package/dist/chunk-PZFYJ5FS.mjs +0 -4
- package/dist/chunk-UM57PWI7.mjs +0 -1
|
@@ -2,4 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
"use strict";var To=Object.create;var Qe=Object.defineProperty;var ko=Object.getOwnPropertyDescriptor;var Po=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Do=Object.prototype.hasOwnProperty;var Ao=(e,t)=>{for(var o in t)Qe(e,o,{get:t[o],enumerable:!0})},Nt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Po(t))!Do.call(e,s)&&s!==o&&Qe(e,s,{get:()=>t[s],enumerable:!(r=ko(t,s))||r.enumerable});return e};var U=(e,t,o)=>(o=e!=null?To(Ro(e)):{},Nt(t||!e||!e.__esModule?Qe(o,"default",{value:e,enumerable:!0}):o,e)),Eo=e=>Nt(Qe({},"__esModule",{value:!0}),e);var Rr={};Ao(Rr,{KanbanBoardView:()=>Pr});module.exports=Eo(Rr);var R=U(require("react"));var It=require("class-variance-authority");var Lt=require("clsx");var dt="-",Lo=e=>{let t=Mo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{let a=l.split(dt);return a[0]===""&&a.length!==1&&a.shift(),kt(a,t)||Io(l)},getConflictingClassGroupIds:(l,a)=>{let m=o[l]||[];return a&&r[l]?[...m,...r[l]]:m}}},kt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),s=r?kt(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(dt);return t.validators.find(({validator:l})=>l(i))?.classGroupId},Ct=/^\[(.+)\]$/,Io=e=>{if(Ct.test(e)){let t=Ct.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Mo=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return zo(Object.entries(e.classGroups),o).forEach(([i,l])=>{ct(l,r,i,t)}),r},ct=(e,t,o,r)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Tt(t,s);i.classGroupId=o;return}if(typeof s=="function"){if(Bo(s)){ct(s(r),t,o,r);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([i,l])=>{ct(l,Tt(t,i),o,r)})})},Tt=(e,t)=>{let o=e;return t.split(dt).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Bo=e=>e.isThemeGetter,zo=(e,t)=>t?e.map(([o,r])=>{let s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[o,s]}):e,Ho=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,s=(i,l)=>{o.set(i,l),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let l=o.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return s(i,l),l},set(i,l){o.has(i)?o.set(i,l):s(i,l)}}},Pt="!",Vo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,s=t[0],i=t.length,l=a=>{let m=[],d=0,n=0,c;for(let f=0;f<a.length;f++){let z=a[f];if(d===0){if(z===s&&(r||a.slice(f,f+i)===t)){m.push(a.slice(n,f)),n=f+i;continue}if(z==="/"){c=f;continue}}z==="["?d++:z==="]"&&d--}let N=m.length===0?a:a.substring(n),C=N.startsWith(Pt),v=C?N.substring(1):N,P=c&&c>n?c-n:void 0;return{modifiers:m,hasImportantModifier:C,baseClassName:v,maybePostfixModifierPosition:P}};return o?a=>o({className:a,parseClassName:l}):l},Oo=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},Go=e=>({cache:Ho(e.cacheSize),parseClassName:Vo(e),...Lo(e)}),Fo=/\s+/,$o=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Fo),a="";for(let m=l.length-1;m>=0;m-=1){let d=l[m],{modifiers:n,hasImportantModifier:c,baseClassName:N,maybePostfixModifierPosition:C}=o(d),v=!!C,P=r(v?N.substring(0,C):N);if(!P){if(!v){a=d+(a.length>0?" "+a:a);continue}if(P=r(N),!P){a=d+(a.length>0?" "+a:a);continue}v=!1}let f=Oo(n).join(":"),z=c?f+Pt:f,$=z+P;if(i.includes($))continue;i.push($);let b=s(P,v);for(let M=0;M<b.length;++M){let ie=b[M];i.push(z+ie)}a=d+(a.length>0?" "+a:a)}return a};function Uo(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Rt(t))&&(r&&(r+=" "),r+=o);return r}var Rt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Rt(e[r]))&&(o&&(o+=" "),o+=t);return o};function Wo(e,...t){let o,r,s,i=l;function l(m){let d=t.reduce((n,c)=>c(n),e());return o=Go(d),r=o.cache.get,s=o.cache.set,i=a,a(m)}function a(m){let d=r(m);if(d)return d;let n=$o(m,o);return s(m,n),n}return function(){return i(Uo.apply(null,arguments))}}var A=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Dt=/^\[(?:([a-z-]+):)?(.+)\]$/i,jo=/^\d+\/\d+$/,Ko=new Set(["px","full","screen"]),_o=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Mt-?((\d+)?\.?(\d+)[a-z]+|0)/,Zo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Me(e)||Ko.has(e)||jo.test(e),he=e=>Be(e,"length",sr),Me=e=>!!e&&!Number.isNaN(Number(e)),lt=e=>Be(e,"number",Me),We=e=>!!e&&Number.isInteger(Number(e)),Qo=e=>e.endsWith("%")&&Me(e.slice(0,-1)),w=e=>Dt.test(e),ye=e=>_o.test(e),Yo=new Set(["length","size","percentage"]),er=e=>Be(e,Yo,At),tr=e=>Be(e,"position",At),or=new Set(["image","url"]),rr=e=>Be(e,or,nr),ar=e=>Be(e,"",ir),je=()=>!0,Be=(e,t,o)=>{let r=Dt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},sr=e=>Jo.test(e)&&!qo.test(e),At=()=>!1,ir=e=>Xo.test(e),nr=e=>Zo.test(e);var lr=()=>{let e=A("colors"),t=A("spacing"),o=A("blur"),r=A("brightness"),s=A("borderColor"),i=A("borderRadius"),l=A("borderSpacing"),a=A("borderWidth"),m=A("contrast"),d=A("grayscale"),n=A("hueRotate"),c=A("invert"),N=A("gap"),C=A("gradientColorStops"),v=A("gradientColorStopPositions"),P=A("inset"),f=A("margin"),z=A("opacity"),$=A("padding"),b=A("saturate"),M=A("scale"),ie=A("sepia"),J=A("skew"),ne=A("space"),fe=A("translate"),ce=()=>["auto","contain","none"],be=()=>["auto","hidden","clip","visible","scroll"],Ie=()=>["auto",w,t],x=()=>[w,t],ae=()=>["",de,he],K=()=>["auto",Me,w],Fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$e=()=>["start","end","center","between","around","evenly","stretch"],ve=()=>["","0",w],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Me,w];return{cacheSize:500,separator:":",theme:{colors:[je],spacing:[de,he],blur:["none","",ye,w],brightness:X(),borderColor:[e],borderRadius:["none","","full",ye,w],borderSpacing:x(),borderWidth:ae(),contrast:X(),grayscale:ve(),hueRotate:X(),invert:ve(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[Qo,he],inset:Ie(),margin:Ie(),opacity:X(),padding:x(),saturate:X(),scale:X(),sepia:ve(),skew:X(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[ye]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...Fe(),w]}],overflow:[{overflow:be()}],"overflow-x":[{"overflow-x":be()}],"overflow-Mt":[{"overflow-Mt":be()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-Mt":[{"overscroll-Mt":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-Mt":[{"inset-Mt":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",We,w]}],basis:[{basis:Ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:ve()}],shrink:[{shrink:ve()}],order:[{order:["first","last","none",We,w]}],"grid-cols":[{"grid-cols":[je]}],"col-start-end":[{col:["auto",{span:["full",We,w]},w]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[je]}],"row-start-end":[{row:["auto",{span:[We,w]},w]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[N]}],"gap-x":[{"gap-x":[N]}],"gap-Mt":[{"gap-Mt":[N]}],"justify-content":[{justify:["normal",...$e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[$]}],px:[{px:[$]}],py:[{py:[$]}],ps:[{ps:[$]}],Mt:[{Mt:[$]}],pt:[{pt:[$]}],pr:[{pr:[$]}],pb:[{pb:[$]}],pl:[{pl:[$]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-Mt":[{"space-Mt":[ne]}],"space-Mt-reverse":["space-Mt-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,t]}],"min-w":[{"min-w":[w,t,"min","max","fit"]}],"max-w":[{"max-w":[w,t,"none","full","min","max","fit","prose",{screen:[ye]},ye]}],h:[{h:[w,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ye,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lt]}],"font-family":[{font:[je]}],"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",w]}],"line-clamp":[{"line-clamp":["none",Me,lt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",de,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[z]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",de,he]}],"underline-offset":[{"underline-offset":["auto",de,w]}],"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:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],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",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[z]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Fe(),tr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","Mt","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",er]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-Mt":[{"border-Mt":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[z]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-Mt":[{"divide-Mt":[a]}],"divide-Mt-reverse":["divide-Mt-reverse"],"divide-opacity":[{"divide-opacity":[z]}],"divide-style":[{divide:q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-Mt":[{"border-Mt":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[de,w]}],"outline-w":[{outline:[de,he]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[z]}],"ring-offset-w":[{"ring-offset":[de,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ye,ar]}],"shadow-color":[{shadow:[je]}],opacity:[{opacity:[z]}],"mix-blend":[{"mix-blend":[...qe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":qe()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",ye,w]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[n]}],invert:[{invert:[c]}],saturate:[{saturate:[b]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[n]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[z]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-Mt":[{"border-spacing-Mt":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-Mt":[{"scale-Mt":[M]}],rotate:[{rotate:[We,w]}],"translate-x":[{"translate-x":[fe]}],"translate-Mt":[{"translate-Mt":[fe]}],"skew-x":[{"skew-x":[J]}],"skew-Mt":[{"skew-Mt":[J]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Mt","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-Mt":[{"scroll-Mt":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","Mt","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-Mt":[{"touch-pan":["Mt","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[de,he,lt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-Mt"],overscroll:["overscroll-x","overscroll-Mt"],inset:["inset-x","inset-Mt","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-Mt":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-Mt"],p:["px","py","ps","Mt","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","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-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-Mt"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-Mt":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-Mt":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Mt","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-Mt","touch-pz"],"touch-x":["touch"],"touch-Mt":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Et=Wo(lr);function h(...e){return Et((0,Lt.clsx)(e))}var Mt=require("react/jsx-runtime"),cr=(0,It.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 Z({className:e,variant:t,...o}){return(0,Mt.jsx)("div",{className:h(cr({variant:t}),e),...o})}var Se=U(require("react"));var ze=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ze.displayName="Card";var dr=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("flex flex-col space-Mt-1.5 p-6",e),...t}));dr.displayName="CardHeader";var mr=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("font-semibold leading-none tracking-tight",e),...t}));mr.displayName="CardTitle";var pr=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("text-sm text-muted-foreground",e),...t}));pr.displayName="CardDescription";var ur=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("p-6 pt-0",e),...t}));ur.displayName="CardContent";var gr=Se.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("div",{ref:o,className:h("flex items-center p-6 pt-0",e),...t}));gr.displayName="CardFooter";var Bt=({title:e,status:t,taskCount:o,children:r,onDrop:s,isCompact:i=!1,height:l})=>{let a=n=>{n.preventDefault()},m=n=>{n.preventDefault(),s(t)};return(0,Mt.jsxs)(ze,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-w-xs":""}`,style:{height:l||"calc(100vh - 350px)"},onDragOver:a,onDrop:m,children:[(0,Mt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Mt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Mt.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:o})]}),(0,Mt.jsx)("div",{className:"flex-1 overflow-Mt-auto space-Mt-4 min-h-0",children:r})]})};var Q=require("lucide-react"),mt=({task:e,epic:t,onDragStart:o,onTaskClick:r,isCompact:s=!1})=>{let i=n=>{o(e)},l=()=>{r(e)},a=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},m=()=>{switch(e.type){case"story":return(0,Mt.jsx)(Q.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Mt.jsx)(Q.Bug,{className:"h-3 w-3"});case"spike":return(0,Mt.jsx)(Q.Zap,{className:"h-3 w-3"});case"task":default:return(0,Mt.jsx)(Q.AlertCircle,{className:"h-3 w-3"})}},d=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return s?(0,Mt.jsx)(ze,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:l,children:(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${d()}`,children:m()}),(0,Mt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Mt.jsxs)(ze,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:l,children:[(0,Mt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Mt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${d()}`,children:[m(),(0,Mt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Mt.jsxs)("div",{className:"flex gap-1",children:[(0,Mt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${a()}`,children:e.priority}),(0,Mt.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,Mt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Mt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Mt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Mt.jsx)(Q.User,{className:"h-4 w-4"}),(0,Mt.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Mt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Mt.jsx)(Q.Calendar,{className:"h-4 w-4"}),(0,Mt.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Je=require("react");var Ke=U(require("react")),O=U(require("@radix-ui/react-dialog"));var He=O.Root;var fr=O.Portal;var Ht=Ke.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(O.Overlay,{ref:o,className:h("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ht.displayName=O.Overlay.displayName;var Te=Ke.forwardRef(({className:e,children:t,...o},r)=>(0,Mt.jsxs)(fr,{children:[(0,Mt.jsx)(Ht,{}),(0,Mt.jsxs)(O.Content,{ref:r,className:h("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-Mt-[-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,Mt.jsxs)(O.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,Mt.jsx)(Q.X,{className:"h-4 w-4"}),(0,Mt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Te.displayName=O.Content.displayName;var ke=({className:e,...t})=>(0,Mt.jsx)("div",{className:h("flex flex-col space-Mt-1.5 text-center sm:text-left",e),...t});ke.displayName="DialogHeader";var _e=({className:e,...t})=>(0,Mt.jsx)("div",{className:h("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_e.displayName="DialogFooter";var Pe=Ke.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(O.Title,{ref:o,className:h("text-lg font-semibold leading-none tracking-tight",e),...t}));Pe.displayName=O.Title.displayName;var br=Ke.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(O.Description,{ref:o,className:h("text-sm text-muted-foreground",e),...t}));br.displayName=O.Description.displayName;var Vt=require("@radix-ui/react-slot"),Gt=U(require("react")),vr=(0,It.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),G=Gt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...s},i)=>(0,Mt.jsx)(e?Vt.Slot:"button",{className:h(vr({className:t,size:o,variant:r})),ref:i,...s}));G.displayName="Button";var $t=U(require("react"));var Y=$t.forwardRef(({className:e,type:t,...o},r)=>(0,Mt.jsx)("input",{type:t,className:h("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));Y.displayName="Input";var Wt=U(require("react")),me=Wt.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)("textarea",{className:h("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));me.displayName="Textarea";var S=U(require("@radix-ui/react-select")),xe=U(require("react")),se=S.Root;var De=S.Value,ee=xe.forwardRef(({children:e,className:t,...o},r)=>(0,Mt.jsxs)(S.Trigger,{className:h("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,Mt.jsx)(S.Icon,{asChild:!0,children:(0,Mt.jsx)(Q.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ee.displayName=S.Trigger.displayName;var Kt=xe.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(S.ScrollUpButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Mt.jsx)(Q.ChevronUp,{className:"h-4 w-4"})}));Kt.displayName=S.ScrollUpButton.displayName;var _t=xe.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(S.ScrollDownButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,Mt.jsx)(Q.ChevronDown,{className:"h-4 w-4"})}));_t.displayName=S.ScrollDownButton.displayName;var te=xe.forwardRef(({children:e,className:t,position:o="popper",...r},s)=>(0,Mt.jsx)(S.Portal,{children:(0,Mt.jsxs)(S.Content,{className:h("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-Mt-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-Mt-1",t),position:o,ref:s,...r,children:[(0,Mt.jsx)(Kt,{}),(0,Mt.jsx)(S.Viewport,{className:h("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Mt.jsx)(_t,{})]})}));te.displayName=S.Content.displayName;var hr=xe.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(S.Label,{className:h("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));hr.displayName=S.Label.displayName;var W=xe.forwardRef(({children:e,className:t,...o},r)=>(0,Mt.jsxs)(S.Item,{className:h("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,Mt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Mt.jsx)(S.ItemIndicator,{children:(0,Mt.jsx)(Q.Check,{className:"h-4 w-4"})})}),(0,Mt.jsx)(S.ItemText,{children:e})]}));W.displayName=S.Item.displayName;var yr=xe.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(S.Separator,{className:h("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));yr.displayName=S.Separator.displayName;var Jt=U(require("react")),pt=U(require("@radix-ui/react-label"));var xr=(0,It.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=Jt.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(pt.Root,{ref:o,className:h(xr(),e),...t}));T.displayName=pt.Root.displayName;var Ae=U(require("react")),Ve=U(require("@radix-ui/react-toggle-group"));var Zt=U(require("react")),ut=U(require("@radix-ui/react-toggle"));var gt=(0,It.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),wr=Zt.forwardRef(({className:e,variant:t,size:o,...r},s)=>(0,Mt.jsx)(ut.Root,{ref:s,className:h(gt({variant:t,size:o,className:e})),...r}));wr.displayName=ut.Root.displayName;var eo=Ae.createContext({size:"default",variant:"default"}),Ee=Ae.forwardRef(({className:e,variant:t,size:o,children:r,...s},i)=>(0,Mt.jsx)(Ve.Root,{ref:i,className:h("flex items-center justify-center gap-1",e),...s,children:(0,Mt.jsx)(eo.Provider,{value:{variant:t,size:o},children:r})}));Ee.displayName=Ve.Root.displayName;var Le=Ae.forwardRef(({className:e,children:t,variant:o,size:r,...s},i)=>{let l=Ae.useContext(eo);return(0,Mt.jsx)(Ve.Item,{ref:i,className:h(gt({variant:l.variant||o,size:l.size||r}),e),...s,children:t})});Le.displayName=Ve.Item.displayName;var Sr=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Q.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Q.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Q.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Q.Zap}],Nr=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],to=({isOpen:e,onClose:t,onAddTask:o,epics:r,sprints:s,assignees:i,defaultEpicId:l})=>{let[a,m]=(0,Je.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Je.useEffect)(()=>{e&&l&&m(c=>({...c,epic:l}))},[e,l]),(0,Je.useEffect)(()=>{e&&m({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:l||"",sprint:"none",assignee:""})},[e]);let d=c=>{c.preventDefault(),a.name.trim()&&(o({name:a.name.trim(),description:a.description.trim(),status:"todo",priority:a.priority,type:a.type,storyPoints:a.storyPoints,epic:Number(a.epic),sprint:Number(a.sprint),assignee:a.assignee.trim()?{relationTo:"digital-colleagues",value:Number(a.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),m({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:l||"",sprint:"",assignee:""}),t())},n=(c,N)=>{m(C=>({...C,[c]:N}))};return(0,Mt.jsx)(He,{open:e,onOpenChange:t,children:(0,Mt.jsxs)(Te,{className:"sm:max-w-md",children:[(0,Mt.jsx)(ke,{children:(0,Mt.jsx)(Pe,{children:"Add New Task"})}),(0,Mt.jsxs)("form",{onSubmit:d,className:"space-Mt-4",children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"name",children:"Task Title"}),(0,Mt.jsx)(Y,{id:"name",value:a.name,onChange:c=>n("name",c.target.value),placeholder:"Enter task title",required:!0})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Mt.jsx)(me,{id:"description",value:a.description,onChange:c=>n("description",c.target.value),placeholder:"Enter task description",rows:3})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Type"}),(0,Mt.jsx)(Ee,{type:"single",value:a.type||"",onValueChange:c=>c&&n("type",c),children:Sr.map(c=>{let N=c.icon;return(0,Mt.jsxs)(Le,{value:c.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Mt.jsx)(N,{className:"h-4 w-4"}),c.label]},c.value)})})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Priority"}),(0,Mt.jsx)(Ee,{type:"single",value:a.priority||"",onValueChange:c=>c&&n("priority",c),children:Nr.map(c=>(0,Mt.jsx)(Le,{value:c.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:c.label},c.value))})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"points",children:"Story Points"}),(0,Mt.jsx)(Y,{id:"points",type:"number",min:"1",max:"100",value:a.storyPoints,onChange:c=>n("storyPoints",parseInt(c.target.value)||1),placeholder:"Enter story points",required:!0})]}),!l&&(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"epic",children:"Epic"}),(0,Mt.jsxs)(se,{value:a.epic,onValueChange:c=>n("epic",c),children:[(0,Mt.jsx)(ee,{children:(0,Mt.jsx)(De,{placeholder:"Select an epic"})}),(0,Mt.jsx)(te,{children:r.map(c=>(0,Mt.jsx)(W,{value:c.id.toString(),children:(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.name]})},c.id))})]})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Mt.jsxs)(se,{value:a.sprint,onValueChange:c=>n("sprint",c),children:[(0,Mt.jsx)(ee,{children:(0,Mt.jsx)(De,{placeholder:"Select a sprint"})}),(0,Mt.jsxs)(te,{children:[(0,Mt.jsx)(W,{value:"none",children:"No Sprint"}),s.map(c=>(0,Mt.jsx)(W,{value:c.id.toString(),children:(0,Mt.jsx)("div",{className:"flex items-center gap-2",children:c.name})},c.id))]})]})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"sprint",children:"Assignee"}),(0,Mt.jsxs)(se,{value:a.assignee,onValueChange:c=>n("assignee",c),children:[(0,Mt.jsx)(ee,{children:(0,Mt.jsx)(De,{placeholder:"Select an Assignee"})}),(0,Mt.jsxs)(te,{children:[(0,Mt.jsx)(W,{value:"none",children:"No Assignee"}),i.map(c=>(0,Mt.jsx)(W,{value:c.id.toString(),children:(0,Mt.jsx)("div",{className:"flex items-center gap-2",children:c.name})},c.id))]})]})]}),(0,Mt.jsxs)(_e,{children:[(0,Mt.jsx)(G,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Mt.jsx)(G,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var bt=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:s,className:i="",disabled:l=!1})=>{let[a,m]=(0,Je.useState)(!1),[d,n]=(0,Je.useState)(""),c=()=>{l||(m(!0),n(t))},N=async()=>{d!==t&&await s(e,d),m(!1)},C=v=>{v.key==="Enter"&&!r||v.key==="Enter"&&v.ctrlKey&&r?N():v.key==="Escape"&&(m(!1),n(""))};return(0,Mt.jsxs)("div",{className:`space-Mt-2 ${i}`,children:[(0,Mt.jsx)(T,{children:o}),a?r?(0,Mt.jsx)(me,{value:d,onChange:v=>n(v.target.value),onBlur:N,onKeyDown:C,autoFocus:!0,rows:4,className:"resize-none"}):(0,Mt.jsx)(Y,{value:d,onChange:v=>n(v.target.value),onBlur:N,onKeyPress:C,autoFocus:!0,className:"text-lg font-medium"}):(0,Mt.jsxs)("div",{onClick:c,className:`${l?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Mt.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!l&&(0,Mt.jsx)(Q.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var et=U(require("react")),ue=U(require("@radix-ui/react-avatar"));var vt=et.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(ue.Root,{ref:o,className:h("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));vt.displayName=ue.Root.displayName;var Cr=et.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(ue.Image,{ref:o,className:h("aspect-square h-full w-full",e),...t}));Cr.displayName=ue.Image.displayName;var ht=et.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(ue.Fallback,{ref:o,className:h("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ht.displayName=ue.Fallback.displayName;var ao=({comments:e,onAddComment:t})=>{let[o,r]=(0,Je.useState)(""),s=l=>l.split(" ").map(a=>a[0]).join("").toUpperCase(),i=()=>{o.trim()&&(t(o),r(""))};return(0,Mt.jsxs)("div",{className:"space-Mt-4",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)(Q.MessageSquare,{className:"h-5 w-5"}),(0,Mt.jsx)(T,{className:"text-lg font-medium",children:"Comments"}),(0,Mt.jsx)(Z,{variant:"secondary",children:e.length})]}),(0,Mt.jsx)("div",{className:"space-Mt-4 max-h-60 overflow-Mt-auto",children:e.map(l=>(0,Mt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Mt.jsx)(vt,{className:"h-8 w-8 mt-1",children:(0,Mt.jsx)(ht,{className:"text-xs bg-muted text-muted-foreground",children:s(l.author)})}),(0,Mt.jsxs)("div",{className:"flex-1",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Mt.jsx)("span",{className:"font-medium text-sm",children:l.author}),(0,Mt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[l.createdAt.toLocaleDateString()," Je ",l.createdAt.toLocaleTimeString()]})]}),(0,Mt.jsx)("p",{className:"text-sm text-muted-foreground",children:l.text})]})]},l.id))}),(0,Mt.jsxs)("div",{className:"flex gap-2",children:[(0,Mt.jsx)(me,{value:o,onChange:l=>r(l.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Mt.jsx)(G,{onClick:i,disabled:!o.trim(),size:"sm",className:"self-end",children:(0,Mt.jsx)(Q.Send,{className:"h-4 w-4"})})]})]})};var rt=({label:e,value:t,onValueChange:o,options:r,showColor:s=!1,disabled:i=!1})=>{let[l,a]=(0,Je.useState)(!1),m=r.find(n=>n.value===t);return(0,Mt.jsxs)("div",{className:"space-Mt-1",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Mt.jsxs)(se,{value:t,onValueChange:o,open:l,onOpenChange:n=>{i||a(n)},disabled:i,children:[(0,Mt.jsx)(ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Mt.jsxs)(Z,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&a(!l),children:[s&&m?.color&&(0,Mt.jsx)("div",{className:`w-2 h-2 rounded-full ${m.color} mr-1`}),m?.label||"Select..."]})}),(0,Mt.jsx)(te,{children:r.map(n=>(0,Mt.jsx)(W,{value:n.value,children:s&&n.color?(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)("div",{className:`w-3 h-3 rounded-full ${n.color}`}),n.label]}):n.label},n.value))})]})]})};var io=({label:e,value:t,onValueChange:o,options:r,placeholder:s="Search...",allowCustomValue:i=!1,disabled:l=!1})=>{let[a,m]=(0,Je.useState)(!1),[d,n]=(0,Je.useState)(""),c=r.find(f=>f.value===t),N=r.filter(f=>f.label.toLowerCase().includes(d.toLowerCase())),C=f=>{o(f),m(!1),n("")},v=()=>{i&&d.trim()&&!r.find(f=>f.value===d.trim())&&(o(d.trim()),m(!1),n(""))};return(0,Mt.jsxs)("div",{className:"space-Mt-1",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Mt.jsxs)(se,{value:t,onValueChange:C,open:a,onOpenChange:f=>{l||m(f)},disabled:l,children:[(0,Mt.jsx)(ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Mt.jsx)(Z,{variant:"secondary",className:`${l?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!l&&m(!a),children:c?.label||t||"Select..."})}),(0,Mt.jsxs)(te,{children:[(0,Mt.jsx)("div",{className:"p-2",children:(0,Mt.jsx)(Y,{placeholder:s,value:d,onChange:f=>n(f.target.value),onKeyDown:f=>{f.key==="Enter"&&i&&v()},className:"mb-2"})}),N.map(f=>(0,Mt.jsx)(W,{value:f.value,children:f.label},f.value)),i&&d.trim()&&!N.find(f=>f.value===d.trim())&&(0,Mt.jsxs)(W,{value:d.trim(),children:['Add "',d.trim(),'"']})]})]})]})};var Oe=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var Tr=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Q.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Q.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Q.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Q.Zap}],kr=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var no=({task:e,epics:t,sprints:o,lastUpdated:r,onUpdateTask:s,onClose:i,onDelete:l,isUpdating:a=!1,isDeleting:m=!1,deleteState:d="idle",teamMembers:n})=>{let[c,N]=(0,Je.useState)(e.storyPoints),C=(0,Je.useRef)(null),[v,P]=(0,Je.useState)(n);(0,Je.useEffect)(()=>{P(n)},[n]);let f=(0,Je.useCallback)((b,M)=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{s(b,M)},500)},[s]);(0,Je.useEffect)(()=>{f("storyPoints",c?.toString()||"1")},[c]);let z=b=>b.split(" ").map(M=>M[0]).join("").toUpperCase(),$=()=>d==="loading"?(0,Mt.jsxs)(G,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Mt.jsx)(Q.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):d==="success"?(0,Mt.jsxs)(G,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Mt.jsx)(Q.Check,{className:"h-3 w-3"}),"Deleted"]}):d==="error"?(0,Mt.jsxs)(G,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Mt.jsx)(Q.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Mt.jsxs)(G,{onClick:l,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:a||m,children:[(0,Mt.jsx)(Q.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Mt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Mt.jsxs)("div",{className:"space-Mt-4",style:{opacity:a?.6:1},children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Mt.jsx)(rt,{label:"",value:e.status,onValueChange:b=>s("status",b),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:a})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Mt.jsx)(Ee,{type:"single",value:e.type||"",onValueChange:b=>b&&s("type",b),className:"grid grid-cols-2 gap-1",disabled:a,children:Tr.map(b=>{let M=b.icon;return(0,Mt.jsxs)(Le,{value:b.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:a,children:[(0,Mt.jsx)(M,{className:"h-3 w-3"}),b.label]},b.value)})})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Mt.jsx)(Ee,{type:"single",value:e.priority||"",onValueChange:b=>b&&s("priority",b),className:"grid grid-cols-3 gap-1",disabled:a,children:kr.map(b=>(0,Mt.jsx)(Le,{value:b.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:a,children:b.label},b.value))})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Mt.jsx)("input",{type:"number",min:"1",max:"100",value:c||1,onChange:b=>{let M=Number(b.target.value);M<1?N(1):M>100?N(100):N(M)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:a})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Mt.jsx)(rt,{label:"",value:Oe(e.epic).toString(),onValueChange:b=>s("epic",b),options:(t||[]).map(b=>({value:b.id.toString(),label:b?.name,color:b.color})),showColor:!0,disabled:a})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Mt.jsx)(rt,{label:"",value:Oe(e.sprint).toString()||"none",onValueChange:b=>s("sprint",b==="none"?"":b),options:[{value:"none",label:"No Sprint"},...(o||[]).map(b=>({value:b.id.toString(),label:`${b?.name}`}))],disabled:a})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Mt.jsx)(io,{label:"",value:e.assignee?.value?.name,onValueChange:b=>s("assignee",b),options:v.map(b=>({value:`${typeof b.email=="string"?"users":"digital-colleagues"}:${b.id}`,label:b?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:a})]})]}),(0,Mt.jsxs)("div",{className:"mt-auto pt-4 space-Mt-4",children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(G,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:a||m,children:"Close"}),$()]}),(0,Mt.jsxs)("div",{className:"pt-4 border-t border-border space-Mt-2",children:[(0,Mt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Mt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Mt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Mt.jsx)(Q.User,{className:"h-3 w-3"}),(0,Mt.jsx)("span",{children:"System"})]})]}),(0,Mt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Mt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Mt.jsx)(Q.Calendar,{className:"h-3 w-3"}),(0,Mt.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Mt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Mt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Mt.jsx)(Q.Clock,{className:"h-3 w-3"}),(0,Mt.jsxs)("span",{children:[new Date(r).toLocaleDateString()," Je"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var lo=({isOpen:e,onClose:t,initialTask:o,epics:r,sprints:s,onUpdateTask:i,onDeleteTask:l,onAddComment:a,colleagues:m})=>{let[d,n]=(0,Je.useState)(o),[c,N]=(0,Je.useState)(new Date),[C,v]=(0,Je.useState)("idle"),[P,f]=(0,Je.useState)("idle"),[z,$]=(0,Je.useState)([]),[b,M]=(0,Je.useState)(m);(0,Je.useEffect)(()=>{n(o)},[o]);let ie=async(x,ae)=>{if(ae!==d[x]){v("loading");try{await i(d.id.toString(),{[x]:ae}),N(new Date),v("success"),setTimeout(()=>v("idle"),1500)}catch(K){console.log("error",K),v("error"),setTimeout(()=>v("idle"),3e3)}}},J=async(x,ae)=>{if(ae!==d[x]){v("loading");try{await i(d.id.toString(),{[x]:ae}),N(new Date),v("success"),setTimeout(()=>v("idle"),1500)}catch(K){console.log("error",K),v("error"),setTimeout(()=>v("idle"),3e3)}}},ne=async x=>{if(a){v("loading");try{await a?.({content:x,taskId:d.id.toString()}),N(new Date),v("success"),setTimeout(()=>v("idle"),1500)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}}},fe=async()=>{f("loading");try{await l(d.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},ce=C!=="loading"&&P!=="loading",be=()=>{ce&&t()},Ie=()=>C==="loading"?(0,Mt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Mt.jsx)(Q.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Mt.jsx)("span",{children:"Updating..."})]}):C==="success"?(0,Mt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Mt.jsx)(Q.Check,{className:"h-4 w-4"}),(0,Mt.jsx)("span",{children:"Updated successfully"})]}):C==="error"?(0,Mt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Mt.jsx)(Q.X,{className:"h-4 w-4"}),(0,Mt.jsx)("span",{children:"Update failed"})]}):null;return(0,Mt.jsx)(He,{open:e,onOpenChange:be,children:(0,Mt.jsxs)(Te,{className:"max-w-3xl max-h-[80vh] overflow-Mt-auto p-4",children:[(0,Mt.jsxs)(ke,{children:[(0,Mt.jsx)(Pe,{className:"sr-only",children:d?.name}),(0,Mt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Mt.jsx)("div",{className:"flex-1",children:Ie()}),!ce&&(0,Mt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Mt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Mt.jsxs)("div",{className:"lg:col-span-2 space-Mt-4",children:[(0,Mt.jsx)(bt,{fieldName:"name",value:d.name||"",label:"",onSave:ie,className:"border-b border-border pb-3",disabled:C==="loading"}),(0,Mt.jsx)(bt,{fieldName:"description",value:d.description||"",label:"Description",multiline:!0,onSave:ie,disabled:C==="loading"}),(0,Mt.jsx)(ao,{comments:(d?.comments||[]).map(x=>({author:x.author.value.name||"",createdAt:new Date(x.timestamp),text:x.text,id:x.id||""})),onAddComment:ne})]}),(0,Mt.jsx)(no,{task:d,epics:r,sprints:s,lastUpdated:c,onUpdateTask:J,onClose:be,onDelete:fe,isUpdating:C==="loading",isDeleting:P==="loading",deleteState:P,teamMembers:b})]})]})})};var mo=({isOpen:e,onClose:t,onAddEpic:o})=>{let[r,s]=(0,Je.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],l=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],a=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],m=n=>{n.preventDefault(),r.name.trim()&&(o({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate}),s({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},d=(n,c)=>{s(N=>({...N,[n]:c}))};return(0,Mt.jsx)(He,{open:e,onOpenChange:t,children:(0,Mt.jsxs)(Te,{className:"sm:max-w-md",children:[(0,Mt.jsx)(ke,{children:(0,Mt.jsx)(Pe,{children:"Add New Epic"})}),(0,Mt.jsxs)("form",{onSubmit:m,className:"space-Mt-4",children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"name",children:"Epic Name"}),(0,Mt.jsx)(Y,{id:"name",value:r.name,onChange:n=>d("name",n.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Mt.jsx)(me,{id:"description",value:r.description,onChange:n=>d("description",n.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Color"}),(0,Mt.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(n=>(0,Mt.jsx)("button",{type:"button",onClick:()=>d("color",n),className:`w-8 h-8 rounded-full ${n} ${r.color===n?"ring-2 ring-gray-400":""}`},n))})]}),(0,Mt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Confidence"}),(0,Mt.jsxs)(se,{value:r.confidence,onValueChange:n=>d("confidence",n),children:[(0,Mt.jsx)(ee,{children:(0,Mt.jsx)(De,{})}),(0,Mt.jsx)(te,{children:l.map(n=>(0,Mt.jsx)(W,{value:n.value,children:n.label},n.value))})]})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Phase"}),(0,Mt.jsxs)(se,{value:r.phase.toString(),onValueChange:n=>d("phase",parseInt(n)),children:[(0,Mt.jsx)(ee,{children:(0,Mt.jsx)(De,{})}),(0,Mt.jsx)(te,{children:a.map(n=>(0,Mt.jsx)(W,{value:n.value.toString(),children:n.label},n.value))})]})]})]}),(0,Mt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"Start Date"}),(0,Mt.jsx)(Y,{type:"date",value:r.startDate,onChange:n=>d("startDate",n.target.value)})]}),(0,Mt.jsxs)("div",{className:"space-Mt-2",children:[(0,Mt.jsx)(T,{children:"End Date"}),(0,Mt.jsx)(Y,{type:"date",value:r.endDate,onChange:n=>d("endDate",n.target.value)})]})]}),(0,Mt.jsxs)(_e,{children:[(0,Mt.jsx)(G,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Mt.jsx)(G,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var uo=require("motion/react");function po(e,t){let[o,r]=(0,Je.useState)(()=>{if(typeof window>"Mt")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),s=i=>{try{r(i),typeof window<"Mt"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Je.useEffect)(()=>{s(o)},[]),[o,s]}var st=require("react-icons/fa");function go({title:e,description:t,badge:o,primaryAction:r,secondaryAction:s,gradient:i,children:l,className:a}){let[m,d]=po(`hero-section-minimized-${e.replace(/\s+/Mt,"-").toLowerCase()}`,!s&&!t),n=!s&&!t||m;return(0,Mt.jsxs)(uo.motion.div,{initial:{opacity:0,Mt:20},animate:{opacity:1,Mt:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${a||""}`,children:[(0,Mt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Mt.jsx)(Z,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Mt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Mt.jsxs)("div",{className:"flex items-center gap-3",children:[n&&r&&(0,Mt.jsx)(G,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(s||t)&&(0,Mt.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>d(!m),style:{lineHeight:0},children:m?(0,Mt.jsx)(st.FaChevronDown,{size:22}):(0,Mt.jsx)(st.FaChevronUp,{size:22})})]})]}),!n&&(0,Mt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Mt.jsxs)("div",{className:"space-Mt-4",children:[(0,Mt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Mt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Mt.jsx)(G,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),s&&(0,Mt.jsx)(G,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),l&&(0,Mt.jsx)("div",{className:"hidden lg:block",children:l})]})]})}var Pr=({initialTasks:e=[],initialEpics:t=[],initialSprints:o=[],initialUsers:r=[],initialColleagues:s=[],initialProjects:i=[],onAddTask:l,onUpdateTask:a,onDeleteTask:m,onTaskClick:d,onAddEpic:n,onAddComment:c})=>{let[N,C]=(0,R.useState)([]),[v,P]=(0,R.useState)([]),[f,z]=(0,R.useState)([]),[$,b]=(0,R.useState)(!1),[M,ie]=(0,R.useState)(!1),[J,ne]=(0,R.useState)(null),[fe,ce]=(0,R.useState)(null),[be,Ie]=(0,R.useState)([]),[x,ae]=(0,R.useState)([]),[K,Fe]=(0,R.useState)(0),q=(0,R.useRef)(null),qe=(0,R.useRef)(null),$e=R.default.useMemo(()=>[...v.map(p=>p.id),0],[v]),ve=(0,R.useRef)(""),Ue=(0,R.useRef)(""),X=(0,R.useRef)(""),xt=(0,R.useRef)(""),Xe=p=>p.map(k=>`${k.id}-${new Date(k.createdAt).getTime()}-${new Date(k.updatedAt).getTime()}`).join("-");(0,R.useEffect)(()=>{let p=Xe(e);p!==ve.current&&(C(e),J&&ne(e.find(k=>k.id===J.id)||null),ve.current=p)},[e]),(0,R.useEffect)(()=>{let p=Xe(t);p!==Ue.current&&(P(t),Ue.current=p)},[t]),(0,R.useEffect)(()=>{let p=Xe(o);p!==X.current&&(z(o),X.current=p)},[o]),(0,R.useEffect)(()=>{let p=Xe(s.map(k=>({id:k.id,updatedAt:k.updatedAt,createdAt:k.createdAt})));p!==xt.current&&(ae(s),xt.current=p)},[s]),(0,R.useEffect)(()=>{let p=()=>{if(q.current){let j=q.current.offsetHeight;Fe(j)}};p();let k=new ResizeObserver(p);q.current&&k.observe(q.current);let E=()=>{setTimeout(p,100)};return window.addEventListener("storage",E),()=>{k.disconnect(),window.removeEventListener("storage",E)}},[]),(0,R.useEffect)(()=>{let p=setTimeout(()=>{q.current&&Fe(q.current.offsetHeight)},300);return()=>clearTimeout(p)},[$,M]);let fo=N.filter(p=>!0),bo=p=>fo.filter(k=>k.status===p),vo=p=>{let k={};return v.forEach(E=>{k[E.id]=p.filter(j=>Oe(j.epic)===E.id)}),k["no-epic"]=p.filter(E=>!Oe(E.epic)),k},wt=p=>{ce(p)},ho=p=>{fe&&(C(k=>k.map(E=>E.id===fe.id?{...E,status:p}:E)),a?.(fe.id.toString(),{status:p}),ce(null))},yo=p=>{let k={...p,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};C(E=>[...E,k]),l?.(p)},xo=async(p,k)=>{C(E=>E.map(j=>j.id===Number(p)?{...j,...k}:j)),a&&await a(p,k),J?.id===Number(p)&&ne(E=>({...E,...k}))},wo=async p=>{C(k=>k.filter(E=>E.id!==Number(p))),J?.id===Number(p)&&ne(null),m&&await m(p)},So=p=>{let k={...p,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};P(E=>[...E,k]),n?.(p)},St=p=>{ne(p),d?.(p)},No=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Co=K>0?`calc(100vh - ${K+120}px)`:"calc(100vh - 12rem)";return(0,Mt.jsxs)("div",{ref:qe,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Mt.jsx)("div",{ref:q,className:"flex-shrink-0",children:(0,Mt.jsx)(go,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>b(!0)},secondaryAction:{label:"Add epic",onClick:()=>ie(!0)}})}),(0,Mt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Mt.jsx)("div",{className:"h-full",style:{height:K>0?`calc(100vh - ${K+120}px)`:"calc(100vh - 12rem)"},children:(0,Mt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:No.map(p=>{let k=bo(p.status),E=vo(k);return(0,Mt.jsxs)(Bt,{title:p.title,status:p.status,taskCount:k.length,onDrop:ho,isCompact:p.status==="done",height:Co,children:[E["no-epic"].map(j=>(0,Mt.jsx)(mt,{epic:null,task:j,onDragStart:wt,onTaskClick:St,isCompact:p.status==="done"},j.id)),$e.map(j=>{let it=v.find(Ze=>Ze.id===j),nt=E[j]||[];return nt.length===0?null:(0,Mt.jsxs)("div",{className:"mb-6",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Mt.jsx)("div",{className:`w-3 h-3 rounded-full ${it?.color}`}),(0,Mt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:it?.name||"No Epic"}),(0,Mt.jsx)(Z,{variant:"secondary",className:"text-xs",children:nt.length})]})," ",(0,Mt.jsx)("div",{className:"space-Mt-3",children:nt.map(Ze=>(0,Mt.jsx)(mt,{task:Ze,epic:it,onDragStart:wt,onTaskClick:St,isCompact:p.status==="done"},Ze.id))})]},j)})]},p.id)})})})}),(0,Mt.jsx)(to,{isOpen:$,onClose:()=>b(!1),onAddTask:yo,assignees:[...x,...be],epics:v,sprints:f}),(0,Mt.jsx)(mo,{isOpen:M,onClose:()=>ie(!1),onAddEpic:So}),J&&(0,Mt.jsx)(lo,{isOpen:!!J,onClose:()=>ne(null),initialTask:J,epics:v,sprints:f,onUpdateTask:xo,onDeleteTask:wo,colleagues:x,onAddComment:c})]})};0&&(module.exports={KanbanBoardView});
|
|
5
|
+
"use strict";var Ca=Object.create;var Lt=Object.defineProperty;var Na=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var Sa=Object.getPrototypeOf,Da=Object.prototype.hasOwnProperty;var Pa=(e,t)=>{for(var o in t)Lt(e,o,{get:t[o],enumerable:!0})},Io=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ta(t))!Da.call(e,a)&&a!==o&&Lt(e,a,{get:()=>t[a],enumerable:!(r=Na(t,a))||r.enumerable});return e};var X=(e,t,o)=>(o=e!=null?Ca(Sa(e)):{},Io(t||!e||!e.__esModule?Lt(o,"default",{value:e,enumerable:!0}):o,e)),ka=e=>Io(Lt({},"__esModule",{value:!0}),e);var qi={};Pa(qi,{KanbanBoardView:()=>Xi});module.exports=ka(qi);var _=X(require("react"));var zo=require("class-variance-authority");var Uo=require("clsx");var oo="-",Ra=e=>{let t=Ia(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:n=>{let s=n.split(oo);return s[0]===""&&s.length!==1&&s.shift(),Lo(s,t)||Ma(n)},getConflictingClassGroupIds:(n,s)=>{let d=o[n]||[];return s&&r[n]?[...d,...r[n]]:d}}},Lo=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Lo(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join(oo);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Eo=/^\[(.+)\]$/,Ma=e=>{if(Eo.test(e)){let t=Eo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ia=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Aa(Object.entries(e.classGroups),o).forEach(([i,n])=>{to(n,r,i,t)}),r},to=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:Ao(t,a);i.classGroupId=o;return}if(typeof a=="function"){if(Ea(a)){to(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([i,n])=>{to(n,Ao(t,i),o,r)})})},Ao=(e,t)=>{let o=e;return t.split(oo).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Ea=e=>e.isThemeGetter,Aa=(e,t)=>t?e.map(([o,r])=>{let a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[o,a]}):e,La=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(i,n)=>{o.set(i,n),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let n=o.get(i);if(n!==void 0)return n;if((n=r.get(i))!==void 0)return a(i,n),n},set(i,n){o.has(i)?o.set(i,n):a(i,n)}}},Ho="!",Ha=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],i=t.length,n=s=>{let d=[],p=0,l=0,m;for(let c=0;c<s.length;c++){let f=s[c];if(p===0){if(f===a&&(r||s.slice(c,c+i)===t)){d.push(s.slice(l,c)),l=c+i;continue}if(f==="/"){m=c;continue}}f==="["?p++:f==="]"&&p--}let u=d.length===0?s:s.substring(l),h=u.startsWith(Ho),v=h?u.substring(1):u,R=m&&m>l?m-l:void 0;return{modifiers:d,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:R}};return o?s=>o({className:s,parseClassName:n}):n},Fa=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},Ba=e=>({cache:La(e.cacheSize),parseClassName:Ha(e),...Ra(e)}),Oa=/\s+/,Va=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],n=e.trim().split(Oa),s="";for(let d=n.length-1;d>=0;d-=1){let p=n[d],{modifiers:l,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:h}=o(p),v=!!h,R=r(v?u.substring(0,h):u);if(!R){if(!v){s=p+(s.length>0?" "+s:s);continue}if(R=r(u),!R){s=p+(s.length>0?" "+s:s);continue}v=!1}let c=Fa(l).join(":"),f=m?c+Ho:c,E=f+R;if(i.includes(E))continue;i.push(E);let g=a(R,v);for(let S=0;S<g.length;++S){let Q=g[S];i.push(f+Q)}s=p+(s.length>0?" "+s:s)}return s};function Ua(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Fo(t))&&(r&&(r+=" "),r+=o);return r}var Fo=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Fo(e[r]))&&(o&&(o+=" "),o+=t);return o};function za(e,...t){let o,r,a,i=n;function n(d){let p=t.reduce((l,m)=>m(l),e());return o=Ba(p),r=o.cache.get,a=o.cache.set,i=s,s(d)}function s(d){let p=r(d);if(p)return p;let l=Va(d,o);return a(d,l),l}return function(){return i(Ua.apply(null,arguments))}}var W=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Bo=/^\[(?:([a-z-]+):)?(.+)\]$/i,$a=/^\d+\/\d+$/,_a=new Set(["px","full","screen"]),Ga=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ka=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ja=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Za=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>lt(e)||_a.has(e)||$a.test(e),je=e=>ct(e,"length",oi),lt=e=>!!e&&!Number.isNaN(Number(e)),eo=e=>ct(e,"number",lt),vt=e=>!!e&&Number.isInteger(Number(e)),Ja=e=>e.endsWith("%")&<(e.slice(0,-1)),P=e=>Bo.test(e),Ze=e=>Ga.test(e),Xa=new Set(["length","size","percentage"]),qa=e=>ct(e,Xa,Oo),Ya=e=>ct(e,"position",Oo),Qa=new Set(["image","url"]),ei=e=>ct(e,Qa,ai),ti=e=>ct(e,"",ri),bt=()=>!0,ct=(e,t,o)=>{let r=Bo.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},oi=e=>Wa.test(e)&&!Ka.test(e),Oo=()=>!1,ri=e=>ja.test(e),ai=e=>Za.test(e);var ii=()=>{let e=W("colors"),t=W("spacing"),o=W("blur"),r=W("brightness"),a=W("borderColor"),i=W("borderRadius"),n=W("borderSpacing"),s=W("borderWidth"),d=W("contrast"),p=W("grayscale"),l=W("hueRotate"),m=W("invert"),u=W("gap"),h=W("gradientColorStops"),v=W("gradientColorStopPositions"),R=W("inset"),c=W("margin"),f=W("opacity"),E=W("padding"),g=W("saturate"),S=W("scale"),Q=W("sepia"),Ce=W("skew"),Me=W("space"),de=W("translate"),me=()=>["auto","contain","none"],ge=()=>["auto","hidden","clip","visible","scroll"],be=()=>["auto",P,t],V=()=>[P,t],Be=()=>["",$e,je],ze=()=>["auto",lt,P],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",P],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[lt,P];return{cacheSize:500,separator:":",theme:{colors:[bt],spacing:[$e,je],blur:["none","",Ze,P],brightness:q(),borderColor:[e],borderRadius:["none","","full",Ze,P],borderSpacing:V(),borderWidth:Be(),contrast:q(),grayscale:K(),hueRotate:q(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[Ja,je],inset:be(),margin:be(),opacity:q(),padding:V(),saturate:q(),scale:q(),sepia:K(),skew:q(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",P]}],container:["container"],columns:[{columns:[Ze]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...x(),P]}],overflow:[{overflow:ge()}],"overflow-x":[{"overflow-x":ge()}],"overflow-$o":[{"overflow-$o":ge()}],overscroll:[{overscroll:me()}],"overscroll-x":[{"overscroll-x":me()}],"overscroll-$o":[{"overscroll-$o":me()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-$o":[{"inset-$o":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,P]}],basis:[{basis:be()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",P]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",vt,P]}],"grid-cols":[{"grid-cols":[bt]}],"col-start-end":[{col:["auto",{span:["full",vt,P]},P]}],"col-start":[{"col-start":ze()}],"col-end":[{"col-end":ze()}],"grid-rows":[{"grid-rows":[bt]}],"row-start-end":[{row:["auto",{span:[vt,P]},P]}],"row-start":[{"row-start":ze()}],"row-end":[{"row-end":ze()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",P]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",P]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-$o":[{"gap-$o":[u]}],"justify-content":[{justify:["normal",...pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[c]}],mx:[{mx:[c]}],my:[{my:[c]}],ms:[{ms:[c]}],me:[{me:[c]}],mt:[{mt:[c]}],yt:[{yt:[c]}],mb:[{mb:[c]}],ml:[{ml:[c]}],"space-x":[{"space-x":[Me]}],"space-x-reverse":["space-x-reverse"],"space-$o":[{"space-$o":[Me]}],"space-$o-reverse":["space-$o-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",P,t]}],"min-w":[{"min-w":[P,t,"min","max","fit"]}],"max-w":[{"max-w":[P,t,"none","full","min","max","fit","prose",{screen:[Ze]},Ze]}],h:[{h:[P,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[P,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[P,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[P,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ze,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",eo]}],"font-family":[{font:[bt]}],"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",P]}],"line-clamp":[{"line-clamp":["none",lt,eo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,P]}],"list-image":[{"list-image":["none",P]}],"list-style-type":[{list:["none","disc","decimal",P]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,je]}],"underline-offset":[{"underline-offset":["auto",$e,P]}],"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:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P]}],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",P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Ya]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","$o","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ei]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-$o":[{"rounded-$o":[i]}],"rounded-$o":[{"rounded-$o":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-$o":[{"border-$o":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-$o":[{"divide-$o":[s]}],"divide-$o-reverse":["divide-$o-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:U()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-$o":[{"border-$o":[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-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[$e,P]}],"outline-w":[{outline:[$e,je]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[$e,je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ze,ti]}],"shadow-color":[{shadow:[bt]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Ze,P]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[m]}],saturate:[{saturate:[g]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-$o":[{"border-spacing-$o":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",P]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",P]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",P]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-$o":[{"scale-$o":[S]}],rotate:[{rotate:[vt,P]}],"translate-x":[{"translate-x":[de]}],"translate-$o":[{"translate-$o":[de]}],"skew-x":[{"skew-x":[Ce]}],"skew-$o":[{"skew-$o":[Ce]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",P]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","$o-resize","nw-resize","$o-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",P]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","$o","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-yt":[{"scroll-yt":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","$o","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-$o":[{"touch-pan":["$o","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",P]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,je,eo]}],stroke:[{stroke:[e,"none"]}],$o:["$o-only","not-$o-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-$o"],overscroll:["overscroll-x","overscroll-$o"],inset:["inset-x","inset-$o","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-$o":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-$o"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","yt","mb","ml"],mx:["yt","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-$o","rounded-$o","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-$o","rounded-$o"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-$o"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-$o":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-$o":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-yt","scroll-mb","scroll-ml"],"scroll-mx":["scroll-yt","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-$o","touch-pz"],"touch-x":["touch"],"touch-$o":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Vo=za(ii);function b(...e){return Vo((0,Uo.clsx)(e))}var $o=require("react/jsx-runtime"),ni=(0,zo.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 Ne({className:e,variant:t,...o}){return(0,$o.jsx)("div",{className:b(ni({variant:t}),e),...o})}var Ye=X(require("react"));var dt=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("rounded-xl border bg-card text-card-foreground shadow",e),...t}));dt.displayName="Card";var si=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("flex flex-col space-$o-1.5 p-6",e),...t}));si.displayName="CardHeader";var li=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("font-semibold leading-none tracking-tight",e),...t}));li.displayName="CardTitle";var ci=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("text-sm text-muted-foreground",e),...t}));ci.displayName="CardDescription";var di=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("p-6 pt-0",e),...t}));di.displayName="CardContent";var mi=Ye.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:b("flex items-center p-6 pt-0",e),...t}));mi.displayName="CardFooter";var _o=({title:e,status:t,taskCount:o,children:r,onDrop:a,isCompact:i=!1,height:n})=>{let s=l=>{l.preventDefault()},d=l=>{l.preventDefault(),a(t)};return(0,$o.jsxs)(dt,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-w-xs":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:s,onDrop:d,children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,$o.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,$o.jsx)(Ne,{variant:"secondary",className:"bg-muted text-muted-foreground",children:o})]}),(0,$o.jsx)("div",{className:"flex-1 overflow-$o-auto space-$o-4 min-h-0",children:r})]})};var Te=require("lucide-react"),ro=({task:e,epic:t,onDragStart:o,onTaskClick:r,isCompact:a=!1})=>{let i=l=>{o(e)},n=()=>{r(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},d=()=>{switch(e.type){case"story":return(0,$o.jsx)(Te.BookOpen,{className:"h-3 w-3"});case"bug":return(0,$o.jsx)(Te.Bug,{className:"h-3 w-3"});case"spike":return(0,$o.jsx)(Te.Zap,{className:"h-3 w-3"});case"task":default:return(0,$o.jsx)(Te.AlertCircle,{className:"h-3 w-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return a?(0,$o.jsx)(dt,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:n,children:(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:d()}),(0,$o.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,$o.jsxs)(dt,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:n,children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,$o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[d(),(0,$o.jsx)("span",{className:"capitalize",children:e.type})]}),(0,$o.jsxs)("div",{className:"flex gap-1",children:[(0,$o.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${s()}`,children:e.priority}),(0,$o.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,$o.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,$o.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,$o.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,$o.jsx)(Te.User,{className:"h-4 w-4"}),(0,$o.jsx)("span",{children:e.assignee?.value?.name})]}),(0,$o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,$o.jsx)(Te.Calendar,{className:"h-4 w-4"}),(0,$o.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var yt=require("react");var ht=X(require("react")),ae=X(require("@radix-ui/react-dialog"));var Se=ae.Root;var ao=ae.Portal;var Ht=ht.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(ae.Overlay,{ref:o,className:b("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ht.displayName=ae.Overlay.displayName;var Ie=ht.forwardRef(({className:e,children:t,...o},r)=>(0,$o.jsxs)(ao,{children:[(0,$o.jsx)(Ht,{}),(0,$o.jsxs)(ae.Content,{ref:r,className:b("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-$o-[-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,$o.jsxs)(ae.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,$o.jsx)(Te.X,{className:"h-4 w-4"}),(0,$o.jsx)("span",{className:"$o-only",children:"Close"})]})]})]}));Ie.displayName=ae.Content.displayName;var Ee=({className:e,...t})=>(0,$o.jsx)("div",{className:b("flex flex-col space-$o-1.5 text-center sm:text-left",e),...t});Ee.displayName="DialogHeader";var xt=({className:e,...t})=>(0,$o.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xt.displayName="DialogFooter";var xe=ht.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(ae.Title,{ref:o,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));xe.displayName=ae.Title.displayName;var pi=ht.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(ae.Description,{ref:o,className:b("text-sm text-muted-foreground",e),...t}));pi.displayName=ae.Description.displayName;var Wo=require("@radix-ui/react-slot"),jo=X(require("react")),Zo=(0,zo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),A=jo.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},i)=>(0,$o.jsx)(e?Wo.Slot:"button",{className:b(Zo({className:t,size:o,variant:r})),ref:i,...a}));A.displayName="Button";var Xo=X(require("react"));var ue=Xo.forwardRef(({className:e,type:t,...o},r)=>(0,$o.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));ue.displayName="Input";var Yo=X(require("react")),Ae=Yo.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("textarea",{className:b("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Ae.displayName="Textarea";var M=X(require("@radix-ui/react-select")),Je=X(require("react")),Le=M.Root;var ot=M.Value,De=Je.forwardRef(({children:e,className:t,...o},r)=>(0,$o.jsxs)(M.Trigger,{className:b("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,$o.jsx)(M.Icon,{asChild:!0,children:(0,$o.jsx)(Te.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));De.displayName=M.Trigger.displayName;var er=Je.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(M.ScrollUpButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$o.jsx)(Te.ChevronUp,{className:"h-4 w-4"})}));er.displayName=M.ScrollUpButton.displayName;var tr=Je.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(M.ScrollDownButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$o.jsx)(Te.ChevronDown,{className:"h-4 w-4"})}));tr.displayName=M.ScrollDownButton.displayName;var Pe=Je.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,$o.jsx)(M.Portal,{children:(0,$o.jsxs)(M.Content,{className:b("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-$o-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-$o-1",t),position:o,ref:a,...r,children:[(0,$o.jsx)(er,{}),(0,$o.jsx)(M.Viewport,{className:b("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$o.jsx)(tr,{})]})}));Pe.displayName=M.Content.displayName;var ui=Je.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(M.Label,{className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));ui.displayName=M.Label.displayName;var fe=Je.forwardRef(({children:e,className:t,...o},r)=>(0,$o.jsxs)(M.Item,{className:b("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,$o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$o.jsx)(M.ItemIndicator,{children:(0,$o.jsx)(Te.Check,{className:"h-4 w-4"})})}),(0,$o.jsx)(M.ItemText,{children:e})]}));fe.displayName=M.Item.displayName;var fi=Je.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(M.Separator,{className:b("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));fi.displayName=M.Separator.displayName;var or=X(require("react")),io=X(require("@radix-ui/react-label"));var gi=(0,zo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L=or.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(io.Root,{ref:o,className:b(gi(),e),...t}));L.displayName=io.Root.displayName;var rt=X(require("react")),mt=X(require("@radix-ui/react-toggle-group"));var ir=X(require("react")),no=X(require("@radix-ui/react-toggle"));var so=(0,zo.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),vi=ir.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,$o.jsx)(no.Root,{ref:a,className:b(so({variant:t,size:o,className:e})),...r}));vi.displayName=no.Root.displayName;var lr=rt.createContext({size:"default",variant:"default"}),at=rt.forwardRef(({className:e,variant:t,size:o,children:r,...a},i)=>(0,$o.jsx)(mt.Root,{ref:i,className:b("flex items-center justify-center gap-1",e),...a,children:(0,$o.jsx)(lr.Provider,{value:{variant:t,size:o},children:r})}));at.displayName=mt.Root.displayName;var it=rt.forwardRef(({className:e,children:t,variant:o,size:r,...a},i)=>{let n=rt.useContext(lr);return(0,$o.jsx)(mt.Item,{ref:i,className:b(so({variant:n.variant||o,size:n.size||r}),e),...a,children:t})});it.displayName=mt.Item.displayName;var bi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Te.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Te.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Te.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Te.Zap}],hi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],cr=({isOpen:e,onClose:t,onAddTask:o,epics:r,sprints:a,assignees:i,defaultEpicId:n})=>{let[s,d]=(0,yt.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,yt.useEffect)(()=>{e&&n&&d(m=>({...m,epic:n}))},[e,n]),(0,yt.useEffect)(()=>{e&&d({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let p=m=>{m.preventDefault(),s.name.trim()&&(o({name:s.name.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,storyPoints:s.storyPoints,epic:Number(s.epic),sprint:Number(s.sprint),assignee:s.assignee.trim()?{relationTo:"digital-colleagues",value:Number(s.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),d({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},l=(m,u)=>{d(h=>({...h,[m]:u}))};return(0,$o.jsx)(Se,{open:e,onOpenChange:t,children:(0,$o.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,$o.jsx)(Ee,{children:(0,$o.jsx)(xe,{children:"Add New Task"})}),(0,$o.jsxs)("form",{onSubmit:p,className:"space-$o-4",children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"name",children:"Task Title"}),(0,$o.jsx)(ue,{id:"name",value:s.name,onChange:m=>l("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"description",children:"Description"}),(0,$o.jsx)(Ae,{id:"description",value:s.description,onChange:m=>l("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Type"}),(0,$o.jsx)(at,{type:"single",value:s.type||"",onValueChange:m=>m&&l("type",m),children:bi.map(m=>{let u=m.icon;return(0,$o.jsxs)(it,{value:m.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,$o.jsx)(u,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Priority"}),(0,$o.jsx)(at,{type:"single",value:s.priority||"",onValueChange:m=>m&&l("priority",m),children:hi.map(m=>(0,$o.jsx)(it,{value:m.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:m.label},m.value))})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"points",children:"Story Points"}),(0,$o.jsx)(ue,{id:"points",type:"number",min:"1",max:"100",value:s.storyPoints,onChange:m=>l("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"epic",children:"Epic"}),(0,$o.jsxs)(Le,{value:s.epic,onValueChange:m=>l("epic",m),children:[(0,$o.jsx)(De,{children:(0,$o.jsx)(ot,{placeholder:"Select an epic"})}),(0,$o.jsx)(Pe,{children:r.map(m=>(0,$o.jsx)(fe,{value:m.id.toString(),children:(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,$o.jsxs)(Le,{value:s.sprint,onValueChange:m=>l("sprint",m),children:[(0,$o.jsx)(De,{children:(0,$o.jsx)(ot,{placeholder:"Select a sprint"})}),(0,$o.jsxs)(Pe,{children:[(0,$o.jsx)(fe,{value:"none",children:"No Sprint"}),a.map(m=>(0,$o.jsx)(fe,{value:m.id.toString(),children:(0,$o.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"sprint",children:"Assignee"}),(0,$o.jsxs)(Le,{value:s.assignee,onValueChange:m=>l("assignee",m),children:[(0,$o.jsx)(De,{children:(0,$o.jsx)(ot,{placeholder:"Select an Assignee"})}),(0,$o.jsxs)(Pe,{children:[(0,$o.jsx)(fe,{value:"none",children:"No Assignee"}),i.map(m=>(0,$o.jsx)(fe,{value:m.id.toString(),children:(0,$o.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,$o.jsxs)(xt,{children:[(0,$o.jsx)(A,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,$o.jsx)(A,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var wt=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:a,className:i="",disabled:n=!1})=>{let[s,d]=(0,yt.useState)(!1),[p,l]=(0,yt.useState)(""),m=()=>{n||(d(!0),l(t))},u=async()=>{p!==t&&await a(e,p),d(!1)},h=v=>{v.key==="Enter"&&!r||v.key==="Enter"&&v.ctrlKey&&r?u():v.key==="Escape"&&(d(!1),l(""))};return(0,$o.jsxs)("div",{className:`space-$o-2 ${i}`,children:[(0,$o.jsx)(L,{children:o}),s?r?(0,$o.jsx)(Ae,{value:p,onChange:v=>l(v.target.value),onBlur:u,onKeyDown:h,autoFocus:!0,rows:4,className:"resize-none"}):(0,$o.jsx)(ue,{value:p,onChange:v=>l(v.target.value),onBlur:u,onKeyPress:h,autoFocus:!0,className:"text-lg font-medium"}):(0,$o.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,$o.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,$o.jsx)(Te.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Bt=X(require("react")),Ge=X(require("@radix-ui/react-avatar"));var co=Bt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Ge.Root,{ref:o,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));co.displayName=Ge.Root.displayName;var xi=Bt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Ge.Image,{ref:o,className:b("aspect-square h-full w-full",e),...t}));xi.displayName=Ge.Image.displayName;var mo=Bt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Ge.Fallback,{ref:o,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));mo.displayName=Ge.Fallback.displayName;var pr=({comments:e,onAddComment:t})=>{let[o,r]=(0,yt.useState)(""),a=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{o.trim()&&(t(o),r(""))};return(0,$o.jsxs)("div",{className:"space-$o-4",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)(Te.MessageSquare,{className:"h-5 w-5"}),(0,$o.jsx)(L,{className:"text-lg font-medium",children:"Comments"}),(0,$o.jsx)(Ne,{variant:"secondary",children:e.length})]}),(0,$o.jsx)("div",{className:"space-$o-4 max-h-60 overflow-$o-auto",children:e.map(n=>(0,$o.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,$o.jsx)(co,{className:"h-8 w-8 mt-1",children:(0,$o.jsx)(mo,{className:"text-xs bg-muted text-muted-foreground",children:a(n.author)})}),(0,$o.jsxs)("div",{className:"flex-1",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,$o.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,$o.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,$o.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,$o.jsxs)("div",{className:"flex gap-2",children:[(0,$o.jsx)(Ae,{value:o,onChange:n=>r(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,$o.jsx)(A,{onClick:i,disabled:!o.trim(),size:"sm",className:"self-end",children:(0,$o.jsx)(Te.Send,{className:"h-4 w-4"})})]})]})};var Ut=({label:e,value:t,onValueChange:o,options:r,showColor:a=!1,disabled:i=!1})=>{let[n,s]=(0,yt.useState)(!1),d=r.find(l=>l.value===t);return(0,$o.jsxs)("div",{className:"space-$o-1",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:e}),(0,$o.jsxs)(Le,{value:t,onValueChange:o,open:n,onOpenChange:l=>{i||s(l)},disabled:i,children:[(0,$o.jsx)(De,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,$o.jsxs)(Ne,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[a&&d?.color&&(0,$o.jsx)("div",{className:`w-2 h-2 rounded-full ${d.color} yt-1`}),d?.label||"Select..."]})}),(0,$o.jsx)(Pe,{children:r.map(l=>(0,$o.jsx)(fe,{value:l.value,children:a&&l.color?(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var fr=({label:e,value:t,onValueChange:o,options:r,placeholder:a="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,d]=(0,yt.useState)(!1),[p,l]=(0,yt.useState)(""),m=r.find(c=>c.value===t),u=r.filter(c=>c.label.toLowerCase().includes(p.toLowerCase())),h=c=>{o(c),d(!1),l("")},v=()=>{i&&p.trim()&&!r.find(c=>c.value===p.trim())&&(o(p.trim()),d(!1),l(""))};return(0,$o.jsxs)("div",{className:"space-$o-1",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:e}),(0,$o.jsxs)(Le,{value:t,onValueChange:h,open:s,onOpenChange:c=>{n||d(c)},disabled:n,children:[(0,$o.jsx)(De,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,$o.jsx)(Ne,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!s),children:m?.label||t||"Select..."})}),(0,$o.jsxs)(Pe,{children:[(0,$o.jsx)("div",{className:"p-2",children:(0,$o.jsx)(ue,{placeholder:a,value:p,onChange:c=>l(c.target.value),onKeyDown:c=>{c.key==="Enter"&&i&&v()},className:"mb-2"})}),u.map(c=>(0,$o.jsx)(fe,{value:c.value,children:c.label},c.value)),i&&p.trim()&&!u.find(c=>c.value===p.trim())&&(0,$o.jsxs)(fe,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var pt=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var yi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Te.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Te.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Te.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Te.Zap}],wi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var gr=({task:e,epics:t,sprints:o,lastUpdated:r,onUpdateTask:a,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:d=!1,deleteState:p="idle",teamMembers:l})=>{let[m,u]=(0,yt.useState)(e.storyPoints),h=(0,yt.useRef)(null),[v,R]=(0,yt.useState)(l);(0,yt.useEffect)(()=>{R(l)},[l]);let c=(0,yt.useCallback)((g,S)=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{a(g,S)},500)},[a]);(0,yt.useEffect)(()=>{c("storyPoints",m?.toString()||"1")},[m]);let f=g=>g.split(" ").map(S=>S[0]).join("").toUpperCase(),E=()=>p==="loading"?(0,$o.jsxs)(A,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,$o.jsx)(Te.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,$o.jsxs)(A,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,$o.jsx)(Te.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,$o.jsxs)(A,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,$o.jsx)(Te.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,$o.jsxs)(A,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:s||d,children:[(0,$o.jsx)(Te.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,$o.jsxs)("div",{className:"flex flex-col h-full",children:[(0,$o.jsxs)("div",{className:"space-$o-4",style:{opacity:s?.6:1},children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Status"}),(0,$o.jsx)(Ut,{label:"",value:e.status,onValueChange:g=>a("status",g),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Type"}),(0,$o.jsx)(at,{type:"single",value:e.type||"",onValueChange:g=>g&&a("type",g),className:"grid grid-cols-2 gap-1",disabled:s,children:yi.map(g=>{let S=g.icon;return(0,$o.jsxs)(it,{value:g.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:[(0,$o.jsx)(S,{className:"h-3 w-3"}),g.label]},g.value)})})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,$o.jsx)(at,{type:"single",value:e.priority||"",onValueChange:g=>g&&a("priority",g),className:"grid grid-cols-3 gap-1",disabled:s,children:wi.map(g=>(0,$o.jsx)(it,{value:g.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:g.label},g.value))})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,$o.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:g=>{let S=Number(g.target.value);S<1?u(1):S>100?u(100):u(S)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,$o.jsx)(Ut,{label:"",value:pt(e.epic).toString(),onValueChange:g=>a("epic",g),options:(t||[]).map(g=>({value:g.id.toString(),label:g?.name,color:g.color})),showColor:!0,disabled:s})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,$o.jsx)(Ut,{label:"",value:pt(e.sprint).toString()||"none",onValueChange:g=>a("sprint",g==="none"?"":g),options:[{value:"none",label:"No Sprint"},...(o||[]).map(g=>({value:g.id.toString(),label:`${g?.name}`}))],disabled:s})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,$o.jsx)(fr,{label:"",value:e.assignee?.value?.name,onValueChange:g=>a("assignee",g),options:v.map(g=>({value:`${typeof g.email=="string"?"users":"digital-colleagues"}:${g.id}`,label:g?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,$o.jsxs)("div",{className:"mt-auto pt-4 space-$o-4",children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(A,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:s||d,children:"Close"}),E()]}),(0,$o.jsxs)("div",{className:"pt-4 border-t border-border space-$o-2",children:[(0,$o.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,$o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,$o.jsx)(Te.User,{className:"h-3 w-3"}),(0,$o.jsx)("span",{children:"System"})]})]}),(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,$o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,$o.jsx)(Te.Calendar,{className:"h-3 w-3"}),(0,$o.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,$o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,$o.jsx)(Te.Clock,{className:"h-3 w-3"}),(0,$o.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var So=require("motion/react");var oa=X(require("@radix-ui/react-dialog"));var $r=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),_r=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Gr=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Wr=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Kr=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),jr=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Zr=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Zt=require("@payloadcms/richtext-lexical/lexical/list"),Jr=require("@payloadcms/richtext-lexical/lexical/rich-text"),Xr=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Ur=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),kt=require("@payloadcms/richtext-lexical/lexical/utils"),k=require("@payloadcms/richtext-lexical/lexical"),No=require("@payloadcms/richtext-lexical/lexical/selection");var Dr=require("@radix-ui/react-dialog"),Gt=require("@payloadcms/richtext-lexical/client");var fo=X(require("bson-objectid"));var br=require("@payloadcms/ui");var vr=X(require("react")),He=X(require("@radix-ui/react-tooltip"));var zt=He.Provider,$t=He.Root,_t=He.Trigger,Ct=vr.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$o.jsx)(He.Portal,{children:(0,$o.jsx)(He.Content,{ref:r,sideOffset:t,className:b("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ct.displayName=He.Content.displayName;var Ci=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[a]=(0,Ur.useLexicalComposerContext)(),[i,n]=(0,yt.useState)(""),[s,d]=(0,yt.useState)(""),[p,l]=(0,yt.useState)(""),m=async c=>{console.log("fetchMedia",c)};(0,yt.useEffect)(()=>{typeof o=="string"?o.length===24?m(o):(n(o||""),l(R(v())),d(h()||"")):typeof o=="object"&&(n(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),l(R(o.filesize)),d(o.mimeType?.split("/")[1]||""))},[]);let u=(0,yt.useCallback)(()=>{a.update(()=>{(0,k.$getNodeByKey)(r)?.remove()})},[a,r]),h=()=>{let c=e.data.value;return typeof c=="string"?c.split(";base64")[0]?.split("image/")[1]:""},v=()=>{let c=e.data.value;if(typeof c=="string"){let f=c.split(",")[1]?.length||0;return 4*Math.ceil(f/3)*.5624896334383812/1e3}return 0};function R(c){if(c>=1e6){let E=c/1e6;return`${E>=10?Math.round(E).toString():E.toFixed(1)} MB`}return`${Math.floor(c/1e3)} KB`}return(0,$o.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,$o.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,$o.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,$o.jsx)("div",{className:"flex-1",children:e.data.value?(0,$o.jsx)("img",{className:"object-cover m-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:i}):(0,$o.jsx)(br.File,{})}),(0,$o.jsx)(zt,{children:(0,$o.jsxs)($t,{children:[(0,$o.jsxs)(_t,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,$o.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,$o.jsx)("button",{onClick:c=>{c.preventDefault(),u()},className:"flex-1 flex justify-center items-center",children:(0,$o.jsx)(Te.X,{width:24,height:24,strokeWidth:1})})]}),(0,$o.jsx)(Ct,{children:(0,$o.jsx)("span",{children:"Remove image"})})]})})]}),(0,$o.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,$o.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,$o.jsx)("span",{children:p})]})]})})},wr=Ci;function Ni(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:ut({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Nt=class extends Gt.UploadNode{static importDOM(){return{img:()=>({conversion:Ni,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new fo.default().toHexString(),t.version=3);let o={id:t.id??new fo.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=ut(o);return r.setFormat?.(t.format),r}decorate(){return(0,$o.jsx)(wr,{data:this.__data,nodeKey:this.getKey()})}};function ut(e){return new Nt({data:e})}var Ti=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Si=e=>Ti?(e||window).getSelection():null,Us=(0,k.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),go=(0,k.createCommand)("INSERT_UPLOAD_COMMAND");function Pr({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,yt.useRef)(!1),[a,i]=(0,yt.useState)(!0),[n,s]=(0,yt.useState)(""),[d,p]=(0,yt.useState)(""),[l,m]=(0,yt.useState)(!1),[u,h]=(0,yt.useState)("left"),v=n==="",R=S=>{m(S.target.checked)},c=S=>{h(S.target.value)},f=S=>{let Q=new FileReader;Q.onload=function(){return typeof Q.result=="string"&&s(Q.result),""},S!==null&&S[0]&&Q.readAsDataURL(S[0])};(0,yt.useEffect)(()=>{r.current=!1;let S=Q=>{r.current=Q.altKey};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[e]),(0,yt.useEffect)(()=>{a||t()},[a]),(0,yt.useEffect)(()=>{i(o)},[o]);let E=({editor:S,relationTo:Q,replaceNodeKey:Ce,value:Me})=>{if(Ce)S.update(()=>{let de=(0,k.$getNodeByKey)(Ce);de&&de.replace(ut({id:"",fields:{},relationTo:"media",value:Me}))});else{let de=S.dispatchCommand(go,{fields:null,relationTo:"media",value:Me})}},g=()=>{E({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:d,src:n,showCaption:l,position:u}.src}),i(!1),t()};return(0,$o.jsx)(Se,{open:a,onOpenChange:S=>i(S),children:(0,$o.jsxs)(Ie,{children:[(0,$o.jsxs)(Ee,{children:[(0,$o.jsx)(xe,{children:"Upload Image"}),(0,$o.jsx)(Dr.DialogDescription,{children:"Description"})]}),(0,$o.jsxs)("div",{className:"",children:[(0,$o.jsx)("div",{style:{marginBottom:"1em"},children:(0,$o.jsx)(ue,{type:"file",onChange:S=>f(S.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,$o.jsx)("div",{style:{marginBottom:"1em"},children:(0,$o.jsx)(ue,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:S=>p(S.currentTarget.value),value:d,"data-test-id":"image-modal-alt-text-input"})}),(0,$o.jsx)(A,{"data-test-id":"image-modal-file-upload-btn",disabled:v,onClick:()=>g(),children:"Confirm"})]})]})})}function vo({captionsEnabled:e}){let[t]=(0,Ur.useLexicalComposerContext)();return(0,yt.useEffect)(()=>{if(!t.hasNodes([Gt.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,kt.mergeRegister)(t.registerCommand(k.DRAGSTART_COMMAND,o=>Di(o),k.COMMAND_PRIORITY_HIGH),t.registerCommand(k.DRAGOVER_COMMAND,o=>Pi(o),k.COMMAND_PRIORITY_LOW),t.registerCommand(k.DROP_COMMAND,o=>ki(o,t),k.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Di(e){if(!bo())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function Pi(e){return bo()?(kr(e)||e.preventDefault(),!0):!1}function ki(e,t){let o=bo();if(!o)return!1;if(e.preventDefault(),kr(e)){let r=Ri(e);o.remove();let a=(0,k.$createRangeSelection)();r!=null&&a.applyDOMRange(r),(0,k.$setSelection)(a)}return!0}function bo(){let e=(0,k.$getSelection)();if(!(0,k.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Gt.$isUploadNode)(o)?o:null}function kr(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Ri(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,a=Si(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&a!==null)a.collapse(e.rangeParent,e.rangeOffset||0),t=a.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Mi=()=>(0,$o.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,$o.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"})}),Rr=Mi;var Ii=()=>(0,$o.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,$o.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"})}),Mr=Ii;var Ei=()=>(0,$o.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,$o.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,$o.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Ir=Ei;var Ai=()=>(0,$o.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,$o.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,$o.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Er=Ai;var Li=()=>(0,$o.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,$o.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"})}),Ar=Li;var Hi=()=>(0,$o.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,$o.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"})}),Lr=Hi;var Hr=()=>(0,$o.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$o.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"})}),Fr=()=>(0,$o.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$o.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"})}),Br=()=>(0,$o.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$o.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"})}),Or=()=>(0,$o.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$o.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"})}),Vr=()=>(0,$o.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,$o.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 We=X(require("react")),I=X(require("@radix-ui/react-dropdown-menu")),ft=require("@radix-ui/react-icons");var Wt=I.Root,Kt=I.Trigger;var Fi=We.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,$o.jsxs)(I.SubTrigger,{ref:a,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[o,(0,$o.jsx)(ft.ChevronRightIcon,{className:"ml-auto"})]}));Fi.displayName=I.SubTrigger.displayName;var Bi=We.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(I.SubContent,{ref:o,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Bi.displayName=I.SubContent.displayName;var Dt=We.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$o.jsx)(I.Portal,{children:(0,$o.jsx)(I.Content,{ref:r,sideOffset:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Dt.displayName=I.Content.displayName;var Pt=We.forwardRef(({className:e,inset:t,...o},r)=>(0,$o.jsx)(I.Item,{ref:r,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));Pt.displayName=I.Item.displayName;var Oi=We.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,$o.jsxs)(I.CheckboxItem,{ref:a,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,$o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$o.jsx)(I.ItemIndicator,{children:(0,$o.jsx)(ft.CheckIcon,{className:"h-4 w-4"})})}),t]}));Oi.displayName=I.CheckboxItem.displayName;var Vi=We.forwardRef(({className:e,children:t,...o},r)=>(0,$o.jsxs)(I.RadioItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,$o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$o.jsx)(I.ItemIndicator,{children:(0,$o.jsx)(ft.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Vi.displayName=I.RadioItem.displayName;var Ui=We.forwardRef(({className:e,inset:t,...o},r)=>(0,$o.jsx)(I.Label,{ref:r,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Ui.displayName=I.Label.displayName;var zi=We.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(I.Separator,{ref:o,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));zi.displayName=I.Separator.displayName;var $i=({className:e,...t})=>(0,$o.jsx)("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...t});$i.displayName="DropdownMenuShortcut";var Co=1;function _i(){return(0,$o.jsx)("span",{className:"border border-[#222222]"})}function To(){let[e]=(0,Ur.useLexicalComposerContext)(),t=(0,yt.useRef)(null),[o,r]=(0,yt.useState)(!1),[a,i]=(0,yt.useState)(!1),[n,s]=(0,yt.useState)(!1),[d,p]=(0,yt.useState)(!1),[l,m]=(0,yt.useState)(!1),[u,h]=(0,yt.useState)(!1),[v,R]=(0,yt.useState)(!1),[c,f]=(0,yt.useState)(!1),[E,g]=(0,yt.useState)(!1),[S,Q]=(0,yt.useState)("left"),[Ce,Me]=(0,yt.useState)("p"),de=x=>{e.update(()=>{let U=(0,k.$getSelection)();(0,k.$isRangeSelection)(U)&&(x==="p"?(0,No.$setBlocksType)(U,()=>(0,k.$createParagraphNode)()):(0,No.$setBlocksType)(U,()=>(0,Jr.$createHeadingNode)(x)))})},me=(0,yt.useCallback)(()=>{let x=(0,k.$getSelection)();if((0,k.$isRangeSelection)(x)){s(x.hasFormat("bold")),p(x.hasFormat("italic")),m(x.hasFormat("underline")),h(x.hasFormat("strikethrough")),R(x.hasFormat("subscript")),f(x.hasFormat("superscript"));let U=x.anchor.getNode(),z=U;for(;z&&!(0,k.$isParagraphNode)(z)&&z!==(0,k.$getRoot)();){let K=z.getParent();K&&(z=K)}if(z){let K=z.getFormatType();Q(K||"left")}let pe=U.getTopLevelElement()?.__tag;Me(pe||"p")}},[]);(0,yt.useEffect)(()=>(0,kt.mergeRegister)(e.registerUpdateListener(({editorState:x})=>{x.read(()=>{me()})}),e.registerCommand(k.SELECTION_CHANGE_COMMAND,(x,U)=>(me(),!1),Co),e.registerCommand(k.CAN_UNDO_COMMAND,x=>(r(x),!1),Co),e.registerCommand(k.CAN_REDO_COMMAND,x=>(i(x),!1),Co),(0,kt.mergeRegister)(e.registerCommand(go,x=>(e.update(()=>{let U=(0,k.$getSelection)()||(0,k.$getPreviousSelection)();if((0,k.$isRangeSelection)(U)){let z=ut({id:x.id,fields:x.fields,relationTo:x.relationTo,value:x.value}),{focus:pe}=U,K=pe.getNode();(0,kt.$insertNodeToNearestRoot)(z),(0,k.$isParagraphNode)(K)&&!K.__first&&K.remove()}}),!0),k.COMMAND_PRIORITY_EDITOR))),[e,me]);let ge=[[{label:"Undo",icon:(0,$o.jsx)(Te.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,$o.jsx)(Te.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,$o.jsx)(Rr,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,$o.jsx)(Mr,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:d},{label:"Underline",icon:(0,$o.jsx)(Ir,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:l},{label:"Strikethrough",icon:(0,$o.jsx)(Er,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,$o.jsx)(Ar,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:v},{label:"Superscript",icon:(0,$o.jsx)(Lr,{}),onClick:()=>{e.dispatchCommand(k.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:c}]],be=[{label:"Left Align",direction:"left",icon:(0,$o.jsx)(Te.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,$o.jsx)(Te.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,$o.jsx)(Te.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,$o.jsx)(Te.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(k.FORMAT_ELEMENT_COMMAND,"justify")}}],Be=[{label:"Normal Text",value:"p",icon:(0,$o.jsx)(Hr,{}),onClick:()=>de("p")},{label:"Heading 1",value:"h1",icon:(0,$o.jsx)(Fr,{}),onClick:()=>de("h1")},{label:"Heading 2",value:"h2",icon:(0,$o.jsx)(Br,{}),onClick:()=>de("h2")},{label:"Heading 3",value:"h3",icon:(0,$o.jsx)(Or,{}),onClick:()=>de("h3")},{label:"Heading 4",value:"h4",icon:(0,$o.jsx)(Vr,{}),onClick:()=>de("h4")},...[{label:"Unordered List",value:"ul",icon:(0,$o.jsx)(Te.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Zt.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,$o.jsx)(Te.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Zt.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],ze=[{label:"Insert Image",icon:(0,$o.jsx)(Te.ImageUp,{width:15,height:15}),onClick:()=>{g(!0)},disabled:!1}];return(0,$o.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:(0,$o.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[ge.map((x,U)=>(0,$o.jsxs)(yt.Fragment,{children:[(0,$o.jsx)("div",{className:"flex items-center gap-2",children:x.map((z,pe)=>(0,$o.jsx)("div",{role:"button","aria-disabled":z.disabled||!1,onClick:z.onClick,className:b("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",z.active&&"bg-[#3c3c3c]"),"aria-label":z.label,children:(0,$o.jsx)(zt,{children:(0,$o.jsxs)($t,{children:[(0,$o.jsx)(_t,{className:"text-[#b5b5b5]",children:z.icon}),(0,$o.jsx)(Ct,{children:(0,$o.jsx)("p",{children:z.label})})]})})},pe))}),(0,$o.jsx)(_i,{})]},`toolbar-option-${x.length}-${U}`)),(0,$o.jsxs)(Wt,{children:[(0,$o.jsxs)(Kt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[be.find(x=>x.direction===S)?.icon,be.find(x=>x.direction===S)?.label,(0,$o.jsx)(Te.ChevronDown,{width:15,height:15})]}),(0,$o.jsx)(Dt,{className:"bg-black hover:bg-black",children:be.map((x,U)=>(0,$o.jsxs)(Pt,{onClick:x.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,$o.jsx)("span",{children:x.icon}),(0,$o.jsx)("span",{children:x.label})]},`${x.label}-${U}`))})]}),(0,$o.jsxs)(Wt,{children:[(0,$o.jsxs)(Kt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Be.find(x=>x.value===Ce)?.icon,Be.find(x=>x.value===Ce)?.label,(0,$o.jsx)(Te.ChevronDown,{width:15,height:15})]}),(0,$o.jsx)(Dt,{className:"bg-black hover:bg-black",children:Be.map((x,U)=>(0,$o.jsxs)(Pt,{onClick:x.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,$o.jsx)("span",{children:x.icon}),(0,$o.jsx)("span",{children:x.label})]},`heading-option-${x.label}-${U}`))})]}),(0,$o.jsxs)(Wt,{children:[(0,$o.jsxs)(Kt,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[(0,$o.jsx)(Te.Plus,{width:15,height:15}),(0,$o.jsx)(Te.ChevronDown,{width:15,height:15})]}),(0,$o.jsx)(Dt,{className:"bg-black hover:bg-black",children:ze.map((x,U)=>(0,$o.jsxs)(Pt,{onClick:x.onClick,disabled:x.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,$o.jsx)("span",{children:x.icon}),(0,$o.jsx)("span",{children:x.label})]},U))})]}),E&&(0,$o.jsx)(Pr,{activeEditor:e,onClose:()=>{g(!1)},isOpen:E})]})})}var Gi=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,Ur.useLexicalComposerContext)(),i=(0,yt.useRef)(null),n=s=>{s.read(()=>{let d=s.toJSON();JSON.stringify(d)!==JSON.stringify(i.current)&&(i.current=d,e?.(()=>d))})};return(0,yt.useEffect)(()=>{a.setEditable(r)},[r,a]),(0,yt.useEffect)(()=>{t&&JSON.stringify(t)!==JSON.stringify(i.current)&&a.update(()=>{try{let s=a.parseEditorState(t);a.setEditorState(s),i.current=t}catch(s){console.error("Error parsing editor state:",s)}},{discrete:!0})},[t,a]),(0,$o.jsx)("div",{className:"w-full",children:(0,$o.jsxs)("div",{className:" ",children:[r&&(0,$o.jsx)(To,{}),(0,$o.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,$o.jsx)(jr.RichTextPlugin,{contentEditable:(0,$o.jsx)(Gr.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Wr.LexicalErrorBoundary}),r&&(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(Kr.HistoryPlugin,{}),(0,$o.jsx)($r.AutoFocusPlugin,{}),(0,$o.jsx)(Zr.ListPlugin,{}),(0,$o.jsx)(Xr.OnChangePlugin,{onChange:n}),(0,$o.jsx)(vo,{})]})]})]})})},Wi=({setValue:e,value:t,name:o,editable:r=!0})=>(0,$o.jsx)(_r.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Zt.ListNode,Zt.ListItemNode,Jr.HeadingNode,Nt],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl text-primary",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,$o.jsx)(Gi,{value:t,setValue:e,name:o,editable:r})}),Yr=Wi;var Mt=e=>"mimeType"in e&&"url"in e&&!("format"in e),Ki=e=>{if(!e?.root?.children)return"";let t=[],o=a=>{if(!a)return"";switch(a.type){case"heading":{let i=a.tag?parseInt(a.tag.replace("h","")):1,n=r(a.children||[]);return"#".repeat(i)+" "+n}case"paragraph":return r(a.children||[]);case"list":{let i=[],n=a.listType==="number"?"1.":"-";return a.children?.forEach((s,d)=>{if(s.type==="listitem"){let p=r(s.children||[]),l=a.listType==="number"?`${d+1}.`:n;i.push(`${l} ${p}`)}}),i.join(`
|
|
6
|
+
`)}case"listitem":return r(a.children||[]);case"text":{let i=a.text||"";if(a.format){let n=(a.format&1)!==0,s=(a.format&2)!==0,d=(a.format&4)!==0,p=(a.format&8)!==0;(a.format&16)!==0?i=`\`${i}\``:(n&&(i=`**${i}**`),s&&(i=`*${i}*`),d&&(i=`~~${i}~~`),p&&(i=`<u>${i}</u>`))}return i}default:return a.children?r(a.children):""}},r=a=>a.map(i=>{if(i.type==="text"){let n=i.text||"";if(i.format){let s=(i.format&1)!==0,d=(i.format&2)!==0,p=(i.format&4)!==0,l=(i.format&8)!==0;(i.format&16)!==0?n=`\`${n}\``:(s&&(n=`**${n}**`),d&&(n=`*${n}*`),p&&(n=`~~${n}~~`),l&&(n=`<u>${n}</u>`))}return n}else{if(i.type==="paragraph")return r(i.children||[]);if(i.type==="listitem")return r(i.children||[]);if(i.type==="linebreak")return`
|
|
7
|
+
`}return o(i)}).filter(Boolean).join("");return e.root.children.forEach(a=>{let i=o(a);i&&t.push(i)}),t.join(`
|
|
8
|
+
|
|
9
|
+
`)},nt=e=>{let t=[],o=0;for(;o<e.length;){let a=e.slice(o).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(a&&a[0]){let u=a[1]||"",h=u?nt(u):[];h.length>0?(h.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|8)}),t.push(...h)):u===""&&t.push({type:"text",text:"",format:8}),o+=a[0].length;continue}if(e.slice(o).startsWith("</u>")){o+=4;continue}let i=e.slice(o).match(/^(`+)([^`]+)\1/);if(i){let u=i[2];u&&t.push({type:"text",text:u,format:16}),o+=i[0].length;continue}let n=e.slice(o).match(/^(~~)(.+?)\1/);if(n){let u=n[2],h=nt(u);h.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|4)}),t.push(...h),o+=n[0].length;continue}let s=e.slice(o).match(/^(\*\*|__)(.+?)\1/);if(s){let u=s[2],h=nt(u);h.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|1)}),t.push(...h),o+=s[0].length;continue}let d=e.slice(o).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(d&&d[0].length>2){let u=d[2],h=nt(u);h.forEach(v=>{v.type==="text"&&(v.format=(v.format||0)|2)}),t.push(...h),o+=d[0].length;continue}let p=e.length,l=[{pattern:/<u>/i,offset:0},{pattern:/\*\*/,offset:0},{pattern:/__/,offset:0},{pattern:/~~/,offset:0},{pattern:/`+/,offset:0},{pattern:/\*[^*\n]/,offset:0},{pattern:/_[^_\n]/,offset:0}];for(let{pattern:u}of l){let h=e.slice(o+1).search(u);h!==-1&&h+1<p-o&&(p=o+h+1)}let m=e.slice(o,p);m&&t.push({type:"text",text:m,format:0}),o=p}let r=[];for(let a of t)r.length>0&&r[r.length-1].type==="text"&&r[r.length-1].format===a.format?r[r.length-1].text+=a.text:r.push(a);return r.length>0?r:[{type:"text",text:"",format:0}]},ji=e=>{let t=e.split(`
|
|
10
|
+
`),o=[],r=[],a=[],i=()=>{if(r.length>0){let s=r.join(" "),d=nt(s);o.push({type:"paragraph",children:d.length>0?d:[{type:"text",text:"",format:0}]}),r=[]}},n=()=>{a.length>0&&(o.push({type:"list",listType:"bullet",children:a}),a=[])};for(let s of t){let d=s.trim();if(!d){i(),n();continue}let p=d.match(/^(#{1,6})\s+(.+)$/);if(p){i(),n();let m=p[1].length,u=p[2],h=nt(u);o.push({type:"heading",tag:`h${m}`,children:h.length>0?h:[{type:"text",text:"",format:0}]});continue}let l=d.match(/^[-*+]\s+(.+)$/);if(l){i();let m=l[1],u=nt(m);a.push({type:"listitem",children:[{type:"paragraph",children:u.length>0?u:[{type:"text",text:"",format:0}]}]});continue}a.length>0&&n(),r.push(d)}return i(),n(),o.length===0&&o.push({type:"paragraph",children:[{type:"text",text:"",format:0}]}),{root:{type:"root",children:o,direction:"ltr",format:"",indent:0,version:1}}},Zi=async e=>{let t="",o,r="text";if(e.url)try{let a=e.url;!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("/")&&(a="/"+a);let i=await fetch(a);i.ok?(t=await i.text(),console.log("Successfully loaded content, length:",t.length)):console.error("Failed to fetch file content:",i.status,i.statusText)}catch(a){console.error("Failed to fetch file content:",a)}else console.warn("No URL provided for file:",e.name);return e.mimeType==="text/markdown"?(r="richText",o=ji(t)):e.mimeType?.startsWith("text/")&&(r="text"),{id:e.id.toString(),title:e.name,description:void 0,content:r==="richText"?void 0:t,richTextContent:r==="richText"?o:void 0,format:r,metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}};function ea({document:e,onCancel:t,onSave:o,onFileUpdate:r}){let[a,i]=(0,yt.useState)(Mt(e)),[n,s]=(0,yt.useState)(Mt(e)?{id:e.id.toString(),title:e.name,description:void 0,content:"",format:"text",metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}:{...e,updatedAt:new Date}),[d,p]=(0,yt.useState)(Mt(e)?void 0:n.richTextContent),[l,m]=(0,yt.useState)(!1),u=(0,yt.useRef)(Mt(e)?e:null);(0,yt.useEffect)(()=>{Mt(e)?(i(!0),Zi(e).then(c=>{s(c),p(c.richTextContent),i(!1)}).catch(c=>{c instanceof Error&&c.name!=="AbortError"&&(console.error("Failed to convert file:",c),i(!1))})):(s({...e,updatedAt:new Date}),p(e.richTextContent))},[e]);let h=c=>{switch(c){case"markdown":case"mdx":return(0,$o.jsx)(Te.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$o.jsx)(Te.File,{className:"h-6 w-6 text-success"});case"text":return(0,$o.jsx)(Te.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$o.jsx)(Te.File,{className:"h-6 w-6 text-muted-foreground"})}},v=c=>{switch(c){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},R=async()=>{m(!0);try{let c,f;if(u.current&&u.current.mimeType==="text/markdown"){let g=d?Ki(d):"";c={...n,format:"markdown",content:g,richTextContent:void 0},f=g}else c={...n,richTextContent:d},f=n.content||"";let E=u.current?u.current.id.toString():n.id;await Promise.resolve(o()),r?.(E,f)}finally{m(!1)}};return(0,$o.jsxs)(So.motion.div,{initial:{opacity:0,$o:20},animate:{opacity:1,$o:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,$o.jsx)("div",{className:"border-b border-border bg-card p-8 pb-6",children:(0,$o.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,$o.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$o.jsx)("div",{className:"flex-1 min-w-0",children:(0,$o.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,$o.jsx)("div",{className:"flex-1 min-w-0",children:(0,$o.jsx)(wt,{fieldName:"title",value:n.title,label:"",onSave:(c,f)=>s(E=>({...E,title:f})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,$o.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(n.format)} flex-shrink-0 mt-1`,children:n.format.toUpperCase()})]})})}),(0,$o.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,$o.jsxs)(A,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,$o.jsx)(Te.X,{className:"h-4 w-4"}),"Close"]}),(0,$o.jsxs)(A,{size:"sm",onClick:R,className:"gap-2",disabled:l,children:[l?(0,$o.jsx)(Te.Loader2,{className:"h-4 w-4 animate-spin"}):(0,$o.jsx)(Te.Save,{className:"h-4 w-4"}),l?"Saving...":"Save"]})]})]})}),(0,$o.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,$o.jsx)("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:a?(0,$o.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,$o.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,$o.jsx)(Te.Loader2,{className:"h-8 w-8 animate-spin text-primary"}),(0,$o.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):(0,$o.jsx)($o.Fragment,{children:n.format==="richText"?(0,$o.jsx)(Yr,{setValue:p,value:d,name:"richTextContent"},`richtext-${n.id}-${a?"loading":"loaded"}`):(0,$o.jsx)(Ae,{value:n.content||"",onChange:c=>s(f=>({...f,content:c.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}var ta=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function aa({files:e,onFileClick:t,onFileDelete:o,onFileUpdate:r,showHeader:a=!0,className:i,viewMode:n="list"}){let[s,d]=(0,yt.useState)(!1),[p,l]=(0,yt.useState)(!1),[m,u]=(0,yt.useState)(null),h=()=>{d(!1),u(null)},v=()=>{l(!0),setTimeout(()=>{l(!1),d(!1),u(null)},500)},R=c=>{u(c),d(!0)};return(0,$o.jsxs)("div",{className:b("rounded-3xl border overflow-hidden",i),children:[(0,$o.jsxs)("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[a&&n==="list"&&(0,$o.jsxs)("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[(0,$o.jsx)("div",{className:"col-span-6",children:"Name"}),(0,$o.jsx)("div",{className:"col-span-2",children:"Size"}),(0,$o.jsx)("div",{className:"col-span-2",children:"Modified"})]}),n==="card"&&(0,$o.jsx)("div",{className:"text-sm font-medium",children:"Files"})]}),n==="list"&&(0,$o.jsx)("div",{className:"divide-$o",children:e.map(c=>(0,$o.jsxs)(So.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(c),children:[(0,$o.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,$o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,$o.jsx)("div",{children:(0,$o.jsx)("p",{className:"font-medium",children:c.name})})]}),(0,$o.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:ta(c.filesize)}),(0,$o.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,$o.jsx)("span",{className:"text-sm md:text-base",children:new Date(c.createdAt).toLocaleDateString()}),(0,$o.jsxs)("div",{className:"flex gap-1",children:[c.mimeType==="text/markdown"&&(0,$o.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:f=>{f.stopPropagation(),R(c)},children:(0,$o.jsx)(Te.Edit,{className:"h-4 w-4"})}),(0,$o.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:f=>{f.stopPropagation(),o?.(c)},children:(0,$o.jsx)(Te.Trash2,{className:"h-4 w-4"})})]})]})]},c.name))}),n==="card"&&(0,$o.jsx)("div",{className:"p-4 grid grid-cols-1 gap-4",children:e.map(c=>(0,$o.jsx)(So.motion.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>t?.(c),children:(0,$o.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,$o.jsxs)("div",{className:"flex-1 min-w-0 space-$o-2",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),(0,$o.jsx)("div",{className:"min-w-0 flex-1",children:(0,$o.jsx)("p",{className:"font-medium truncate",children:c.name})})]}),(0,$o.jsxs)("div",{className:"space-$o-1 text-sm text-muted-foreground pl-[52px]",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("span",{className:"font-medium",children:"Size:"}),(0,$o.jsx)("span",{children:ta(c.filesize)})]}),(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("span",{className:"font-medium",children:"Modified:"}),(0,$o.jsx)("span",{children:new Date(c.createdAt).toLocaleDateString()})]})]})]}),(0,$o.jsxs)("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[c.mimeType==="text/markdown"&&(0,$o.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:f=>{f.stopPropagation(),R(c)},title:"Edit",children:(0,$o.jsx)(Te.Edit,{className:"h-4 w-4"})}),(0,$o.jsx)(A,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:f=>{f.stopPropagation(),o?.(c)},title:"Delete",children:(0,$o.jsx)(Te.Trash2,{className:"h-4 w-4"})})]})]})},c.name))}),(0,$o.jsx)(Se,{open:s,onOpenChange:c=>!c&&h(),children:(0,$o.jsxs)(ao,{children:[(0,$o.jsx)(Ht,{}),(0,$o.jsxs)(oa.Content,{className:b("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[(0,$o.jsx)(xe,{className:"$o-only",children:m?`Edit ${m.name}`:"Edit File"}),p&&(0,$o.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:(0,$o.jsx)(Te.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),m&&(0,$o.jsx)(ea,{document:m,onSave:v,onFileUpdate:r,onCancel:h})]})]})})]})}var ia=({isOpen:e,onClose:t,onAddFile:o})=>{let[r,a]=(0,yt.useState)(null),[i,n]=(0,yt.useState)(""),[s,d]=(0,yt.useState)(""),[p,l]=(0,yt.useState)(""),m=h=>{let v=h.target.files?.[0];v&&(a(v),i||n(v.name))},u=async h=>{if(h.preventDefault(),!r)return;let v=new FormData;v.append("file",r),v.append("name",i),s&&v.append("description",s),p&&v.append("tags",p),o?.(v),t(),a(null),n(""),d(""),l("")};return(0,$o.jsx)(Se,{open:e,onOpenChange:t,children:(0,$o.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,$o.jsx)(Ee,{children:(0,$o.jsx)(xe,{children:"Add New File"})}),(0,$o.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,$o.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,$o.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,$o.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,$o.jsx)(Ji,{className:"w-10 h-10 text-gray-400"}),(0,$o.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,$o.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,$o.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,$o.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),r&&(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsxs)("div",{children:[(0,$o.jsx)("p",{className:"font-medium",children:r.name}),(0,$o.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((r.size||0)/1024).toFixed(2)," KB"]})]}),(0,$o.jsx)(A,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function Ji(e){return(0,$o.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$o.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,$o.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,$o.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}var na=({isOpen:e,onClose:t,initialTask:o,epics:r,sprints:a,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:d,onUploadFile:p,onDeleteFile:l,onFileUpdate:m})=>{let[u,h]=(0,yt.useState)(o),[v,R]=(0,yt.useState)(new Date),[c,f]=(0,yt.useState)("idle"),[E,g]=(0,yt.useState)("idle"),[S,Q]=(0,yt.useState)(!1),[Ce,Me]=(0,yt.useState)([]),[de,me]=(0,yt.useState)(d);(0,yt.useEffect)(()=>{h(o)},[o]);let ge=async($,q)=>{if(q!==u[$]){f("loading");try{await i(u.id.toString(),{[$]:q}),R(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch(st){console.log("error",st),f("error"),setTimeout(()=>f("idle"),3e3)}}},be=async($,q)=>{if(q!==u[$]){f("loading");try{await i(u.id.toString(),{[$]:q}),R(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch(st){console.log("error",st),f("error"),setTimeout(()=>f("idle"),3e3)}}},V=async $=>{if(s){f("loading");try{await s?.({content:$,taskId:u.id.toString()}),R(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}}},Be=async()=>{g("loading");try{await n(u.id.toString()),g("success"),setTimeout(()=>{t(),g("idle")},1e3)}catch{g("error"),setTimeout(()=>g("idle"),3e3)}},ze=async $=>{if(p){f("loading");try{await p(u.id.toString(),$),R(new Date),f("success"),Q(!1),setTimeout(()=>f("idle"),1500)}catch(q){console.error("Error uploading file:",q),f("error"),setTimeout(()=>f("idle"),3e3)}}},x=async $=>{if(l){f("loading");try{await l(u.id.toString(),$.id.toString()),R(new Date),f("success"),setTimeout(()=>f("idle"),1500)}catch(q){console.error("Error deleting file:",q),f("error"),setTimeout(()=>f("idle"),3e3)}}},U=(u.files||[]).map($=>typeof $=="number"?null:$).filter($=>$!==null),z=c!=="loading"&&E!=="loading",pe=()=>{z&&t()},K=()=>c==="loading"?(0,$o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,$o.jsx)(Te.Loader2,{className:"h-4 w-4 animate-spin"}),(0,$o.jsx)("span",{children:"Updating..."})]}):c==="success"?(0,$o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,$o.jsx)(Te.Check,{className:"h-4 w-4"}),(0,$o.jsx)("span",{children:"Updated successfully"})]}):c==="error"?(0,$o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,$o.jsx)(Te.X,{className:"h-4 w-4"}),(0,$o.jsx)("span",{children:"Update failed"})]}):null;return(0,$o.jsxs)(Se,{open:e,onOpenChange:pe,children:[(0,$o.jsxs)(Ie,{className:"max-w-3xl max-h-[80vh] overflow-$o-auto p-4",children:[(0,$o.jsxs)(Ee,{children:[(0,$o.jsx)(xe,{className:"$o-only",children:u?.name}),(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsx)("div",{className:"flex-1",children:K()}),!z&&(0,$o.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,$o.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,$o.jsxs)("div",{className:"lg:col-span-2 space-$o-4",children:[(0,$o.jsx)(wt,{fieldName:"name",value:u.name||"",label:"",onSave:ge,className:"border-b border-border pb-3",disabled:c==="loading"}),(0,$o.jsx)(wt,{fieldName:"description",value:u.description||"",label:"Description",multiline:!0,onSave:ge,disabled:c==="loading"}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)(Te.File,{className:"h-4 w-4 text-muted-foreground"}),(0,$o.jsx)("h3",{className:"text-sm font-medium",children:"Files"})]}),p&&(0,$o.jsxs)(A,{variant:"outline",size:"sm",onClick:()=>Q(!0),disabled:c==="loading",className:"gap-2",children:[(0,$o.jsx)(Te.Upload,{className:"h-4 w-4"}),"Upload"]})]}),U.length>0?(0,$o.jsx)(aa,{files:U,onFileDelete:l?x:void 0,onFileUpdate:m,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):(0,$o.jsx)("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),(0,$o.jsx)(pr,{comments:(u?.comments||[]).map($=>({author:$.author?.value.name||"",createdAt:new Date($.timestamp),text:$.text,id:$.id||""})),onAddComment:V})]}),(0,$o.jsx)(gr,{task:u,epics:r,sprints:a,lastUpdated:v,onUpdateTask:be,onClose:pe,onDelete:Be,isUpdating:c==="loading",isDeleting:E==="loading",deleteState:E,teamMembers:de})]})]}),p&&(0,$o.jsx)(ia,{isOpen:S,onClose:()=>Q(!1),onAddFile:ze})]})};var la=({isOpen:e,onClose:t,onAddEpic:o})=>{let[r,a]=(0,yt.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("$o")[0],endDate:new Date().toISOString().split("$o")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],d=l=>{l.preventDefault(),r.name.trim()&&(o({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate}),a({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(l,m)=>{a(u=>({...u,[l]:m}))};return(0,$o.jsx)(Se,{open:e,onOpenChange:t,children:(0,$o.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,$o.jsx)(Ee,{children:(0,$o.jsx)(xe,{children:"Add New Epic"})}),(0,$o.jsxs)("form",{onSubmit:d,className:"space-$o-4",children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"name",children:"Epic Name"}),(0,$o.jsx)(ue,{id:"name",value:r.name,onChange:l=>p("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{htmlFor:"description",children:"Description"}),(0,$o.jsx)(Ae,{id:"description",value:r.description,onChange:l=>p("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Color"}),(0,$o.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(l=>(0,$o.jsx)("button",{type:"button",onClick:()=>p("color",l),className:`w-8 h-8 rounded-full ${l} ${r.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,$o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Confidence"}),(0,$o.jsxs)(Le,{value:r.confidence,onValueChange:l=>p("confidence",l),children:[(0,$o.jsx)(De,{children:(0,$o.jsx)(ot,{})}),(0,$o.jsx)(Pe,{children:n.map(l=>(0,$o.jsx)(fe,{value:l.value,children:l.label},l.value))})]})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Phase"}),(0,$o.jsxs)(Le,{value:r.phase.toString(),onValueChange:l=>p("phase",parseInt(l)),children:[(0,$o.jsx)(De,{children:(0,$o.jsx)(ot,{})}),(0,$o.jsx)(Pe,{children:s.map(l=>(0,$o.jsx)(fe,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,$o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"Start Date"}),(0,$o.jsx)(ue,{type:"date",value:r.startDate,onChange:l=>p("startDate",l.target.value)})]}),(0,$o.jsxs)("div",{className:"space-$o-2",children:[(0,$o.jsx)(L,{children:"End Date"}),(0,$o.jsx)(ue,{type:"date",value:r.endDate,onChange:l=>p("endDate",l.target.value)})]})]}),(0,$o.jsxs)(xt,{children:[(0,$o.jsx)(A,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,$o.jsx)(A,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function ca(e,t){let[o,r]=(0,yt.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),a=i=>{try{r(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,yt.useEffect)(()=>{a(o)},[]),[o,a]}var qt=require("react-icons/fa");function ma({title:e,description:t,badge:o,primaryAction:r,secondaryAction:a,gradient:i,children:n,className:s}){let[d,p]=ca(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!a&&!t),l=!a&&!t||d;return(0,$o.jsxs)(So.motion.div,{initial:{opacity:0,$o:20},animate:{opacity:1,$o:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,$o.jsx)(Ne,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,$o.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,$o.jsxs)("div",{className:"flex items-center gap-3",children:[l&&r&&(0,$o.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(a||t)&&(0,$o.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!d),style:{lineHeight:0},children:d?(0,$o.jsx)(qt.FaChevronDown,{size:22}):(0,$o.jsx)(qt.FaChevronUp,{size:22})})]})]}),!l&&(0,$o.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,$o.jsxs)("div",{className:"space-$o-4",children:[(0,$o.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,$o.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,$o.jsx)(A,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),a&&(0,$o.jsx)(A,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:a.onClick,children:a.label})]})]}),n&&(0,$o.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Xi=({initialTasks:e=[],initialEpics:t=[],initialSprints:o=[],initialUsers:r=[],initialColleagues:a=[],initialProjects:i=[],onAddTask:n,onUpdateTask:s,onDeleteTask:d,onTaskClick:p,onAddEpic:l,onAddComment:m,onUploadFile:u,onDeleteFile:h,onFileUpdate:v})=>{let[R,c]=(0,_.useState)([]),[f,E]=(0,_.useState)([]),[g,S]=(0,_.useState)([]),[Q,Ce]=(0,_.useState)(!1),[Me,de]=(0,_.useState)(!1),[me,ge]=(0,_.useState)(null),[be,V]=(0,_.useState)(null),[Be,ze]=(0,_.useState)([]),[x,U]=(0,_.useState)([]),[z,pe]=(0,_.useState)(0),K=(0,_.useRef)(null),$=(0,_.useRef)(null),q=_.default.useMemo(()=>[...f.map(w=>w.id),0],[f]),st=(0,_.useRef)(""),Do=(0,_.useRef)(""),Po=(0,_.useRef)(""),ko=(0,_.useRef)(""),Et=(w,F)=>w.map(B=>`${B.id}-${new Date(B.createdAt).getTime()}-${new Date(B.updatedAt).getTime()}`).join("-")+(F?`-${F}`:"");(0,_.useEffect)(()=>{let w=e.map(B=>B.files?.filter(le=>typeof le=="object").map(le=>new Date(le.updatedAt).getTime())).flat(),F=Et(e,w.join("-"));F!==st.current&&(c(e),me&&ge(e.find(B=>B.id===me.id)||null),st.current=F)},[e]),(0,_.useEffect)(()=>{let w=Et(t);w!==Do.current&&(E(t),Do.current=w)},[t]),(0,_.useEffect)(()=>{let w=Et(o);w!==Po.current&&(S(o),Po.current=w)},[o]),(0,_.useEffect)(()=>{let w=Et(a.map(F=>({id:F.id,updatedAt:F.updatedAt,createdAt:F.createdAt})));w!==ko.current&&(U(a),ko.current=w)},[a]),(0,_.useEffect)(()=>{let w=()=>{if(K.current){let le=K.current.offsetHeight;pe(le)}};w();let F=new ResizeObserver(w);K.current&&F.observe(K.current);let B=()=>{setTimeout(w,100)};return window.addEventListener("storage",B),()=>{F.disconnect(),window.removeEventListener("storage",B)}},[]),(0,_.useEffect)(()=>{let w=setTimeout(()=>{K.current&&pe(K.current.offsetHeight)},300);return()=>clearTimeout(w)},[Q,Me]);let pa=R.filter(w=>!0),ua=w=>pa.filter(F=>F.status===w),fa=w=>{let F={};return f.forEach(B=>{F[B.id]=w.filter(le=>pt(le.epic)===B.id)}),F["no-epic"]=w.filter(B=>!pt(B.epic)),F},Ro=w=>{V(w)},ga=w=>{be&&(c(F=>F.map(B=>B.id===be.id?{...B,status:w}:B)),s?.(be.id.toString(),{status:w}),V(null))},va=w=>{let F={...w,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};c(B=>[...B,F]),n?.(w)},ba=async(w,F)=>{c(B=>B.map(le=>le.id===Number(w)?{...le,...F}:le)),s&&await s(w,F),me?.id===Number(w)&&ge(B=>({...B,...F}))},ha=async w=>{c(F=>F.filter(B=>B.id!==Number(w))),me?.id===Number(w)&&ge(null),d&&await d(w)},xa=w=>{let F={...w,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};E(B=>[...B,F]),l?.(w)},Mo=w=>{ge(w),p?.(w)},ya=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],wa=z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)";return(0,$o.jsxs)("div",{ref:$,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,$o.jsx)("div",{ref:K,className:"flex-shrink-0",children:(0,$o.jsx)(ma,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>Ce(!0)},secondaryAction:{label:"Add epic",onClick:()=>de(!0)}})}),(0,$o.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,$o.jsx)("div",{className:"h-full",style:{height:z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)"},children:(0,$o.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ya.map(w=>{let F=ua(w.status),B=fa(F);return(0,$o.jsxs)(_o,{title:w.title,status:w.status,taskCount:F.length,onDrop:ga,isCompact:w.status==="done",height:wa,children:[B["no-epic"].map(le=>(0,$o.jsx)(ro,{epic:null,task:le,onDragStart:Ro,onTaskClick:Mo,isCompact:w.status==="done"},le.id)),q.map(le=>{let Yt=f.find(At=>At.id===le),Qt=B[le]||[];return Qt.length===0?null:(0,$o.jsxs)("div",{className:"mb-6",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,$o.jsx)("div",{className:`w-3 h-3 rounded-full ${Yt?.color}`}),(0,$o.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Yt?.name||"No Epic"}),(0,$o.jsx)(Ne,{variant:"secondary",className:"text-xs",children:Qt.length})]})," ",(0,$o.jsx)("div",{className:"space-$o-3",children:Qt.map(At=>(0,$o.jsx)(ro,{task:At,epic:Yt,onDragStart:Ro,onTaskClick:Mo,isCompact:w.status==="done"},At.id))})]},le)})]},w.id)})})})}),(0,$o.jsx)(cr,{isOpen:Q,onClose:()=>Ce(!1),onAddTask:va,assignees:[...x,...Be],epics:f,sprints:g}),(0,$o.jsx)(la,{isOpen:Me,onClose:()=>de(!1),onAddEpic:xa}),me&&(0,$o.jsx)(na,{isOpen:!!me,onClose:()=>ge(null),initialTask:me,epics:f,sprints:g,onUpdateTask:ba,onDeleteTask:ha,colleagues:x,onUploadFile:u,onDeleteFile:h,onFileUpdate:v,onAddComment:m})]})};0&&(module.exports={KanbanBoardView});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-SEITRCGW.mjs";import"../../chunk-6UDBIRMT.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-2HKAJ4TZ.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-P5LSKHQC.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.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-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-UVHMI3PU.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-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-QTW33JYG.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 KanbanBoardView};
|