cortex-react-components 1.40.5 → 1.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/{chunk-7BLEXVFN.mjs → chunk-373YJLIH.mjs} +1 -1
  2. package/dist/chunk-4RKYG7LK.mjs +1 -0
  3. package/dist/{chunk-IE2A7UT3.mjs → chunk-4VDJWCUB.mjs} +1 -1
  4. package/dist/{chunk-FJ7WVUEY.mjs → chunk-62YZZSOX.mjs} +1 -1
  5. package/dist/{chunk-D43ENVPX.mjs → chunk-AFA6LBJ4.mjs} +1 -1
  6. package/dist/{chunk-6WTY6CRE.mjs → chunk-BLGU3YGC.mjs} +1 -1
  7. package/dist/{chunk-4E65YJLM.mjs → chunk-CNCPREWR.mjs} +1 -1
  8. package/dist/{chunk-VR56C6WQ.mjs → chunk-CTCV3L4B.mjs} +1 -1
  9. package/dist/{chunk-UDX5Y4SA.mjs → chunk-DJ5BLICX.mjs} +1 -1
  10. package/dist/{chunk-HBEYZSD7.mjs → chunk-ET5WFKM7.mjs} +1 -1
  11. package/dist/chunk-F2YN7SED.mjs +1 -0
  12. package/dist/{chunk-SXZFQ2PY.mjs → chunk-FBFDZOP6.mjs} +1 -1
  13. package/dist/chunk-FTVQOPU3.mjs +4 -0
  14. package/dist/{chunk-OU6CWUG5.mjs → chunk-HAFP6IMI.mjs} +1 -1
  15. package/dist/{chunk-6BHNSSDS.mjs → chunk-HRZRAS6Z.mjs} +1 -1
  16. package/dist/{chunk-DOJBZRLU.mjs → chunk-HTO3HNQS.mjs} +1 -1
  17. package/dist/chunk-I4LMCHGL.mjs +1 -0
  18. package/dist/chunk-IE5X3XS7.mjs +1 -0
  19. package/dist/{chunk-RUUUBQUL.mjs → chunk-IS5OUEJJ.mjs} +1 -1
  20. package/dist/chunk-J7TRHWRM.mjs +4 -0
  21. package/dist/{chunk-PAXKXQ7O.mjs → chunk-JM6ZXLBG.mjs} +1 -1
  22. package/dist/{chunk-TFPXJD6O.mjs → chunk-JYZW3G3N.mjs} +1 -1
  23. package/dist/{chunk-SHN4XZWD.mjs → chunk-KKLZ6CCZ.mjs} +1 -1
  24. package/dist/{chunk-YFB2REV6.mjs → chunk-L44KSGUG.mjs} +1 -1
  25. package/dist/{chunk-FMASBC74.mjs → chunk-LVUWQ35N.mjs} +1 -1
  26. package/dist/{chunk-RVKKRYWM.mjs → chunk-PARYRNXP.mjs} +1 -1
  27. package/dist/{chunk-EMZQNDA7.mjs → chunk-QL74DMZ3.mjs} +1 -1
  28. package/dist/chunk-QMWYQ3FS.mjs +1 -0
  29. package/dist/{chunk-VVGGBJNC.mjs → chunk-QNKQEXU3.mjs} +1 -1
  30. package/dist/{chunk-OZOQU5K2.mjs → chunk-SJWN6J3F.mjs} +1 -1
  31. package/dist/{chunk-EGIRZPQ2.mjs → chunk-TJ6J3OQZ.mjs} +1 -1
  32. package/dist/{chunk-GFV75XSU.mjs → chunk-UDRX6THN.mjs} +1 -1
  33. package/dist/{chunk-DOVGKSK4.mjs → chunk-UDVFDGKM.mjs} +1 -1
  34. package/dist/chunk-UG6FK323.mjs +1 -0
  35. package/dist/chunk-V4CUPKLW.mjs +4 -0
  36. package/dist/{chunk-37UPFBFM.mjs → chunk-Y6QUDCQM.mjs} +1 -1
  37. package/dist/components/Blocks/Banner.mjs +1 -1
  38. package/dist/components/Blocks/CallToAction.mjs +1 -1
  39. package/dist/components/Blocks/Content.mjs +1 -1
  40. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  41. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  42. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  43. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  44. package/dist/components/Blocks/index.mjs +1 -1
  45. package/dist/components/CRM/CRMPage.d.ts +1 -0
  46. package/dist/components/CRM/CRMPage.js +7 -0
  47. package/dist/components/CRM/CRMPage.mjs +2 -0
  48. package/dist/components/CRM/CRMPage.stories.js +196 -0
  49. package/dist/components/CRM/CRMPage.stories.mjs +1 -0
  50. package/dist/components/CRM/DealCard.d.ts +9 -0
  51. package/dist/components/CRM/DealCard.js +1 -0
  52. package/dist/components/CRM/DealCard.mjs +1 -0
  53. package/dist/components/CRM/DealCard.stories.js +1 -0
  54. package/dist/components/CRM/DealCard.stories.mjs +1 -0
  55. package/dist/components/CRM/DealDetails.d.ts +12 -0
  56. package/dist/components/CRM/DealDetails.js +4 -0
  57. package/dist/components/CRM/DealDetails.mjs +1 -0
  58. package/dist/components/CRM/KanbanBoard.d.ts +11 -0
  59. package/dist/components/CRM/KanbanBoard.js +5 -0
  60. package/dist/components/CRM/KanbanBoard.mjs +2 -0
  61. package/dist/components/CRM/KanbanBoard.stories.js +5 -0
  62. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -0
  63. package/dist/components/CRM/KanbanColumn.d.ts +15 -0
  64. package/dist/components/CRM/KanbanColumn.js +4 -0
  65. package/dist/components/CRM/KanbanColumn.mjs +1 -0
  66. package/dist/components/CRM/KanbanColumn.stories.js +4 -0
  67. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -0
  68. package/dist/components/CRM/NewCustomerForm.d.ts +6 -0
  69. package/dist/components/CRM/NewCustomerForm.js +4 -0
  70. package/dist/components/CRM/NewCustomerForm.mjs +1 -0
  71. package/dist/components/CRM/NewCustomerForm.stories.js +4 -0
  72. package/dist/components/CRM/NewCustomerForm.stories.mjs +1 -0
  73. package/dist/components/CRM/NewDealForm.d.ts +11 -0
  74. package/dist/components/CRM/NewDealForm.js +4 -0
  75. package/dist/components/CRM/NewDealForm.mjs +1 -0
  76. package/dist/components/CRM/NewDealForm.stories.js +4 -0
  77. package/dist/components/CRM/NewDealForm.stories.mjs +1 -0
  78. package/dist/components/CRM/actions.d.ts +7 -0
  79. package/dist/components/CRM/actions.js +4 -0
  80. package/dist/components/CRM/actions.mjs +2 -0
  81. package/dist/components/CRM/mockData.d.ts +6 -0
  82. package/dist/components/CRM/mockData.js +1 -0
  83. package/dist/components/CRM/mockData.mjs +1 -0
  84. package/dist/components/CRM/types.d.ts +38 -0
  85. package/dist/components/CRM/types.js +1 -0
  86. package/dist/components/Cards/index.mjs +1 -1
  87. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  88. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  89. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  90. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  91. package/dist/components/Heros/PostHero/index.mjs +1 -1
  92. package/dist/components/Heros/RenderHero.mjs +1 -1
  93. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  94. package/dist/components/Heros/index.mjs +1 -1
  95. package/dist/components/Holidays/HolidayGrid.stories.js +1 -1
  96. package/dist/components/Holidays/HolidayGrid.stories.mjs +1 -1
  97. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  98. package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
  99. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  100. package/dist/components/Holidays/RequestLeave.stories.mjs +1 -1
  101. package/dist/components/Holidays/index.mjs +1 -1
  102. package/dist/components/Layouts/BlogList.mjs +1 -1
  103. package/dist/components/Layouts/BlogList.stories.mjs +1 -1
  104. package/dist/components/Layouts/SlideShow.mjs +1 -1
  105. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  106. package/dist/components/Layouts/index.mjs +1 -1
  107. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  108. package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
  109. package/dist/components/Menus/SidebarRight.mjs +1 -1
  110. package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
  111. package/dist/components/Menus/index.mjs +1 -1
  112. package/dist/components/Payload/RichText/index.mjs +1 -1
  113. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  114. package/dist/components/Payload/RichText.stories.mjs +1 -1
  115. package/dist/components/Payload/index.mjs +1 -1
  116. package/dist/components/index.mjs +1 -1
  117. package/dist/components/ui/index.mjs +1 -1
  118. package/dist/components/ui/sidebar.mjs +1 -1
  119. package/dist/globals.css +1 -1
  120. package/dist/index.mjs +1 -1
  121. package/dist/metafile-cjs.json +1 -1
  122. package/dist/metafile-esm.json +1 -1
  123. package/dist/pages/Blog.mjs +1 -1
  124. package/dist/pages/Blog.stories.mjs +1 -1
  125. package/dist/pages/Documentation.mjs +1 -1
  126. package/dist/pages/Documentation.stories.mjs +1 -1
  127. package/dist/pages/IndexPage.mjs +1 -1
  128. package/dist/pages/IndexPage.stories.mjs +1 -1
  129. package/dist/pages/Page.mjs +1 -1
  130. package/dist/pages/Page.stories.mjs +1 -1
  131. package/dist/pages/Publish.mjs +1 -1
  132. package/dist/pages/Publish.stories.mjs +1 -1
  133. package/dist/pages/Website.mjs +1 -1
  134. package/dist/pages/Website.stories.mjs +1 -1
  135. package/dist/sections/AboutSection.mjs +1 -1
  136. package/dist/sections/AboutSection.stories.mjs +1 -1
  137. package/dist/sections/BlogDetail.mjs +1 -1
  138. package/dist/sections/BlogDetail.stories.mjs +1 -1
  139. package/dist/sections/BlogListSection.mjs +1 -1
  140. package/dist/sections/BlogListSection.stories.mjs +1 -1
  141. package/dist/sections/ContactSection.mjs +1 -1
  142. package/dist/sections/ContactSection.stories.mjs +1 -1
  143. package/dist/sections/PricingSection.mjs +1 -1
  144. package/dist/sections/PricingSection.stories.mjs +1 -1
  145. package/dist/sections/index.mjs +1 -1
  146. package/package.json +3 -1
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ "use strict";
3
+ 'use client'
4
+
5
+ "use strict";var Et=Object.create;var De=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Ht=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty;var Ft=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},Xe=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of zt(t))!Vt.call(e,s)&&s!==o&&De(e,s,{get:()=>t[s],enumerable:!(r=Bt(t,s))||r.enumerable});return e};var z=(e,t,o)=>(o=e!=null?Et(Ht(e)):{},Xe(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),Wt=e=>Xe(De({},"__esModule",{value:!0}),e);var zo={};Ft(zo,{Default:()=>Bo,default:()=>Eo});module.exports=Wt(zo);var me=require("react");var be=z(require("react")),L=z(require("@radix-ui/react-dialog")),lt=require("lucide-react");var nt=require("clsx");var ze="-",Gt=e=>{let t=Ut(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{let i=a.split(ze);return i[0]===""&&i.length!==1&&i.shift(),tt(i,t)||Ot(a)},getConflictingClassGroupIds:(a,i)=>{let b=o[a]||[];return i&&r[a]?[...b,...r[a]]:b}}},tt=(e,t)=>{var a;if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),s=r?tt(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(ze);return(a=t.validators.find(({validator:i})=>i(n)))==null?void 0:a.classGroupId},Ye=/^\[(.+)\]$/,Ot=e=>{if(Ye.test(e)){let t=Ye.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ut=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Kt(Object.entries(e.classGroups),o).forEach(([n,a])=>{Be(a,r,n,t)}),r},Be=(e,t,o,r)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:et(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(jt(s)){Be(s(r),t,o,r);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,a])=>{Be(a,et(t,n),o,r)})})},et=(e,t)=>{let o=e;return t.split(ze).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},jt=e=>e.isThemeGetter,Kt=(e,t)=>t?e.map(([o,r])=>{let s=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([a,i])=>[t+a,i])):n);return[o,s]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,s=(n,a)=>{o.set(n,a),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let a=o.get(n);if(a!==void 0)return a;if((a=r.get(n))!==void 0)return s(n,a),a},set(n,a){o.has(n)?o.set(n,a):s(n,a)}}},ot="!",$t=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,s=t[0],n=t.length,a=i=>{let b=[],x=0,w=0,l;for(let u=0;u<i.length;u++){let S=i[u];if(x===0){if(S===s&&(r||i.slice(u,u+n)===t)){b.push(i.slice(w,u)),w=u+n;continue}if(S==="/"){l=u;continue}}S==="["?x++:S==="]"&&x--}let g=b.length===0?i:i.substring(w),T=g.startsWith(ot),M=T?g.substring(1):g,R=l&&l>w?l-w:void 0;return{modifiers:b,hasImportantModifier:T,baseClassName:M,maybePostfixModifierPosition:R}};return o?i=>o({className:i,parseClassName:a}):a},Jt=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},Qt=e=>({cache:_t(e.cacheSize),parseClassName:$t(e),...Gt(e)}),Zt=/\s+/,qt=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s}=t,n=[],a=e.trim().split(Zt),i="";for(let b=a.length-1;b>=0;b-=1){let x=a[b],{modifiers:w,hasImportantModifier:l,baseClassName:g,maybePostfixModifierPosition:T}=o(x),M=!!T,R=r(M?g.substring(0,T):g);if(!R){if(!M){i=x+(i.length>0?" "+i:i);continue}if(R=r(g),!R){i=x+(i.length>0?" "+i:i);continue}M=!1}let u=Jt(w).join(":"),S=l?u+ot:u,I=S+R;if(n.includes(I))continue;n.push(I);let Q=s(R,M);for(let U=0;U<Q.length;++U){let v=Q[U];n.push(S+v)}i=x+(i.length>0?" "+i:i)}return i};function Xt(){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 Yt(e,...t){let o,r,s,n=a;function a(b){let x=t.reduce((w,l)=>l(w),e());return o=Qt(x),r=o.cache.get,s=o.cache.set,n=i,i(b)}function i(b){let x=r(b);if(x)return x;let w=qt(b,o);return s(b,w),w}return function(){return n(Xt.apply(null,arguments))}}var D=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},at=/^\[(?:([a-z-]+):)?(.+)\]$/i,eo=/^\H+\/\H+$/,to=new Set(["px","full","screen"]),oo=/^(\H+(\.\H+)?)?(xs|sm|md|lg|xl)$/,ro=/\H+(%|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$/,ao=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,io=/^(inset_)?-?((\H+)?\.?(\H+)[a-z]+|0)_-?((\H+)?\.?(\H+)[a-z]+|0)/,so=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>ce(e)||to.has(e)||eo.test(e),Z=e=>de(e,"length",go),ce=e=>!!e&&!Number.isNaN(Number(e)),Ee=e=>de(e,"number",ce),fe=e=>!!e&&Number.isInteger(Number(e)),no=e=>e.endsWith("%")&&ce(e.slice(0,-1)),m=e=>at.test(e),q=e=>oo.test(e),lo=new Set(["length","size","percentage"]),co=e=>de(e,lo,it),mo=e=>de(e,"position",it),po=new Set(["image","url"]),uo=e=>de(e,po,vo),fo=e=>de(e,"",bo),ge=()=>!0,de=(e,t,o)=>{let r=at.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},go=e=>ro.test(e)&&!ao.test(e),it=()=>!1,bo=e=>io.test(e),vo=e=>so.test(e);var yo=()=>{let e=D("colors"),t=D("spacing"),o=D("blur"),r=D("brightness"),s=D("borderColor"),n=D("borderRadius"),a=D("borderSpacing"),i=D("borderWidth"),b=D("contrast"),x=D("grayscale"),w=D("hueRotate"),l=D("invert"),g=D("gap"),T=D("gradientColorStops"),M=D("gradientColorStopPositions"),R=D("inset"),u=D("margin"),S=D("opacity"),I=D("padding"),Q=D("saturate"),U=D("scale"),v=D("sepia"),y=D("skew"),C=D("space"),B=D("translate"),E=()=>["auto","contain","none"],le=()=>["auto","hidden","clip","visible","scroll"],oe=()=>["auto",m,t],h=()=>[m,t],pe=()=>["",K,Z],re=()=>["auto",ce,m],Qe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ce=()=>["solid","dashed","dotted","double","none"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>["start","end","center","between","around","evenly","stretch"],ue=()=>["","0",m],qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ce,m];return{cacheSize:500,separator:":",theme:{colors:[ge],spacing:[K,Z],blur:["none","",q,m],brightness:j(),borderColor:[e],borderRadius:["none","","full",q,m],borderSpacing:h(),borderWidth:pe(),contrast:j(),grayscale:ue(),hueRotate:j(),invert:ue(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[no,Z],inset:oe(),margin:oe(),opacity:j(),padding:h(),saturate:j(),scale:j(),sepia:ue(),skew:j(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[q]}],"break-after":[{"break-after":qe()}],"break-before":[{"break-before":qe()}],"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:[...Qe(),m]}],overflow:[{overflow:le()}],"overflow-x":[{"overflow-x":le()}],"overflow-y":[{"overflow-y":le()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[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",fe,m]}],basis:[{basis:oe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",fe,m]}],"grid-cols":[{"grid-cols":[ge]}],"col-start-end":[{col:["auto",{span:["full",fe,m]},m]}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":[ge]}],"row-start-end":[{row:["auto",{span:[fe,m]},m]}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],H:[{H:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[q]},q]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",q,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ee]}],"font-family":[{font:[ge]}],"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",m]}],"line-clamp":[{"line-clamp":["none",ce,Ee]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",K,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",K,Z]}],"underline-offset":[{"underline-offset":["auto",K,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],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",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Qe(),mo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",co]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[M]}],"gradient-via-pos":[{via:[M]}],"gradient-to-pos":[{to:[M]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-lt":[{"rounded-lt":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Ce(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Ce()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[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:["",...Ce()]}],"outline-offset":[{"outline-offset":[K,m]}],"outline-w":[{outline:[K,Z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[K,Z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",q,fo]}],"shadow-color":[{shadow:[ge]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ze()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",q,m]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[l]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[v]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[fe,m]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],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","H-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-H":[{"scroll-H":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[K,Z,Ee]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","H","mr","mb","ml"],mx:["mr","ml"],my:["H","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-lt","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-lt"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-H","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-H","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var st=Yt(yo);function p(...e){return st((0,nt.clsx)(e))}var H=require("react/jsx-runtime"),X=L.Root,Se=L.Trigger,ho=L.Portal;var ct=be.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Overlay,{ref:o,className:p("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}));ct.displayName=L.Overlay.displayName;var _=be.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(ho,{children:[(0,H.jsx)(ct,{}),(0,H.jsxs)(L.Content,{ref:r,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,H.jsxs)(L.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,H.jsx)(lt.X,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));_.displayName=L.Content.displayName;var $=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});$.displayName="DialogHeader";var xo=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xo.displayName="DialogFooter";var J=be.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));J.displayName=L.Title.displayName;var wo=be.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));wo.displayName=L.Description.displayName;var dt=require("class-variance-authority");var Co=(0,dt.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ve({className:e,variant:t,...o}){return(0,H.jsx)("div",{className:p(Co({variant:t}),e),...o})}var pt=z(require("react")),He=z(require("@radix-ui/react-label"));var Do=(0,dt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),N=pt.forwardRef(({className:e,...t},o)=>(0,H.jsx)(He.Root,{ref:o,className:p(Do(),e),...t}));N.displayName=He.Root.displayName;var gt=require("@radix-ui/react-slot"),vt=z(require("react")),So=(0,dt.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-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),V=vt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...s},n)=>(0,H.jsx)(e?gt.Slot:"button",{className:p(So({className:t,size:o,variant:r})),ref:n,...s}));V.displayName="Button";var ht=z(require("react"));var O=ht.forwardRef(({className:e,type:t,...o},r)=>(0,H.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));O.displayName="Input";var wt=z(require("react")),ae=wt.forwardRef(({className:e,...t},o)=>(0,H.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));ae.displayName="Textarea";var Ve=z(require("react")),W=z(require("@radix-ui/react-scroll-area"));var ye=Ve.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(W.Root,{ref:r,className:p("relative overflow-hidden",e),...o,children:[(0,H.jsx)(W.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,H.jsx)(Dt,{}),(0,H.jsx)(W.Corner,{})]}));ye.displayName=W.Root.displayName;var Dt=Ve.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,H.jsx)(W.ScrollAreaScrollbar,{ref:r,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,H.jsx)(W.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Dt.displayName=W.ScrollAreaScrollbar.displayName;function Fe({deal:e,customer:t,categories:o,onClose:r,onEdit:s,onAddComment:n,onUpdateDescription:a}){let[i,b]=(0,me.useState)(""),[x,w]=(0,me.useState)(e.description||""),[l,g]=(0,me.useState)(!1),T=u=>{switch(u){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},M=()=>{i.trim()&&(n({id:Date.now().toString(),text:i,author:"Current User",timestamp:new Date().toISOString()}),b(""))},R=()=>{a(x),g(!1)};return(0,H.jsx)(X,{open:!0,onOpenChange:r,children:(0,H.jsxs)(_,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,H.jsx)($,{children:(0,H.jsx)(J,{className:"text-2xl font-bold",children:t==null?void 0:t.name})}),(0,H.jsx)(ye,{className:"flex-grow pr-4",children:(0,H.jsxs)("div",{className:"grid gap-6",children:[(0,H.jsxs)("div",{className:"flex justify-between items-center",children:[(0,H.jsx)("div",{className:"flex items-center space-x-2",children:(0,H.jsxs)("span",{className:"text-3xl font-bold text-green-600",children:["\xA3",e.value.toLocaleString()]})}),(0,H.jsx)(V,{onClick:s,children:"Edit Deal"})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(lt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:e.assignee})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Description"}),l?(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ae,{value:x,onChange:u=>w(u.target.value),className:"flex-grow"}),(0,H.jsx)(V,{onClick:R,children:"Save"})]}):(0,H.jsxs)("div",{className:"flex items-center justify-between",children:[(0,H.jsx)("p",{className:"text-gray-700",children:e.description||"No description"}),(0,H.jsx)(V,{variant:"outline",size:"sm",onClick:()=>g(!0),children:"Edit"})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Status"}),(0,H.jsx)(ve,{variant:"outline",className:"w-fit",children:e.status})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Categories"}),(0,H.jsx)("div",{className:"flex flex-wrap gap-2",children:e.categories.map(u=>{let S=o.find(I=>I.id===u);return S?(0,H.jsx)(ve,{variant:"secondary",className:T(S.type),children:S.name},S.id):null})})]}),(0,H.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Date Logged"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.dateLogged).toLocaleDateString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.closureDate).toLocaleDateString()})]})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Last Modified"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,H.jsx)("div",{className:"space-y-2",children:e.comments.map(u=>(0,H.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,H.jsx)("p",{className:"text-sm text-gray-700",children:u.text}),(0,H.jsxs)("p",{className:"text-xs text-gray-500 H-1",children:[u.author," - ",new Date(u.timestamp).toLocaleString()]})]},u.id))}),(0,H.jsxs)("div",{className:"flex H-2",children:[(0,H.jsx)(O,{value:i,onChange:u=>b(u.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,H.jsxs)(V,{onClick:M,className:"ml-2",children:[(0,H.jsx)(lt.MessageSquareIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]})]})})]})})}var f=z(require("@radix-ui/react-select")),te=z(require("react")),We=f.Root;var Ge=f.Value,Pe=te.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,H.jsx)(f.Icon,{asChild:!0,children:(0,H.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Pe.displayName=f.Trigger.displayName;var St=te.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));St.displayName=f.ScrollUpButton.displayName;var Nt=te.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));Nt.displayName=f.ScrollDownButton.displayName;var Re=te.forwardRef(({children:e,className:t,position:o="popper",...r},s)=>(0,H.jsx)(f.Portal,{children:(0,H.jsxs)(f.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:s,...r,children:[(0,H.jsx)(St,{}),(0,H.jsx)(f.Viewport,{className:p("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,H.jsx)(Nt,{})]})}));Re.displayName=f.Content.displayName;var No=te.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));No.displayName=f.Label.displayName;var ke=te.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,H.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,H.jsx)(f.ItemIndicator,{children:(0,H.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,H.jsx)(f.ItemText,{children:e})]}));ke.displayName=f.Item.displayName;var Po=te.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Po.displayName=f.Separator.displayName;var he=z(require("@radix-ui/react-checkbox")),Rt=z(require("react")),xe=Rt.forwardRef(({className:e,...t},o)=>(0,H.jsx)(he.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,H.jsx)(he.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,H.jsx)(lt.Check,{className:"h-4 w-4"})})}));xe.displayName=he.Root.displayName;function Oe({onSubmit:e}){let[t,o]=(0,me.useState)({name:"",intro:"",active:!0});return(0,H.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customerName",children:"Customer Name"}),(0,H.jsx)(O,{id:"customerName",value:t.name,onChange:s=>o({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customerIntro",children:"Intro"}),(0,H.jsx)(ae,{id:"customerIntro",value:t.intro,onChange:s=>o({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(xe,{id:"activeCustomer",checked:t.active,onCheckedChange:s=>o({...t,active:s})}),(0,H.jsx)(N,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:"Add Customer"})]})}function we({customers:e,categories:t,onSubmit:o,onUpdate:r,initialDeal:s,onAddCustomer:n}){let[a,i]=(0,me.useState)({customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""});(0,me.useEffect)(()=>{s&&i(s)},[s]);let b=async l=>{if(l.preventDefault(),a.customerId&&a.value&&a.assignee&&a.closureDate)if(!s)await o(a);else{let g={...a,id:s.id};await r(g)}},x=l=>{i(g=>({...g,categories:g.categories.includes(l)?g.categories.filter(T=>T!==l):[...g.categories,l]}))},w=l=>{switch(l){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}};return(0,H.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,H.jsx)(ye,{className:"h-[60vh] pr-4 mx-2",children:(0,H.jsxs)("div",{className:"space-y-6 mx-2",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customer",children:"Customer"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsxs)(We,{value:a.customerId,onValueChange:l=>i({...a,customerId:l}),children:[(0,H.jsx)(Pe,{className:"flex-grow",children:(0,H.jsx)(Ge,{placeholder:"Select customer"})}),(0,H.jsx)(Re,{children:e.map(l=>(0,H.jsx)(ke,{value:l.id,children:l.name},l.id))})]}),(0,H.jsxs)(X,{children:[(0,H.jsx)(Se,{asChild:!0,children:(0,H.jsxs)(V,{type:"button",size:"icon",variant:"outline",children:[(0,H.jsx)(lt.PlusCircle,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Add new customer"})]})}),(0,H.jsxs)(_,{children:[(0,H.jsx)($,{children:(0,H.jsx)(J,{children:"Add New Customer"})}),(0,H.jsx)(Oe,{onSubmit:n})]})]})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"value",children:"Value"}),(0,H.jsx)(O,{id:"value",type:"number",value:a.value||"",onChange:l=>i({...a,value:Number.parseFloat(l.target.value)}),placeholder:"Enter deal value"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"assignee",children:"Assignee"}),(0,H.jsx)(O,{id:"assignee",value:a.assignee||"",onChange:l=>i({...a,assignee:l.target.value}),placeholder:"Enter assignee name"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"description",children:"Description"}),(0,H.jsx)(ae,{id:"description",value:a.description||"",onChange:l=>i({...a,description:l.target.value}),placeholder:"Enter deal description"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"status",children:"Status"}),(0,H.jsxs)(We,{value:a.status,onValueChange:l=>i({...a,status:l}),children:[(0,H.jsx)(Pe,{children:(0,H.jsx)(Ge,{placeholder:"Select status"})}),(0,H.jsx)(Re,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(l=>(0,H.jsx)(ke,{value:l,children:l},l))})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{children:"Categories"}),(0,H.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(l=>(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)("h4",{className:"text-sm font-medium",children:l.charAt(0).toUpperCase()+l.slice(1)}),(0,H.jsx)("div",{className:"grid grid-cols-2 gap-2",children:t.filter(g=>g.type===l).map(g=>(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(xe,{id:g.id,checked:a.categories.includes(g.id),onCheckedChange:()=>x(g.id)}),(0,H.jsx)("label",{htmlFor:g.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${w(g.type)}`,children:g.name})]},g.id))})]},l))})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"dateLogged",children:"Date Logged"}),(0,H.jsx)(O,{id:"dateLogged",type:"date",value:a.dateLogged,onChange:l=>i({...a,dateLogged:l.target.value})})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"closureDate",children:"Closure Date"}),(0,H.jsx)(O,{id:"closureDate",type:"date",value:a.closureDate,onChange:l=>i({...a,closureDate:l.target.value})})]})]})}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]})}var se=z(require("react"));var Ue=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ue.displayName="Card";var je=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex flex-col space-y-1.5 p-6",e),...t}));je.displayName="CardHeader";var Ke=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("font-semibold leading-none tracking-tight",e),...t}));Ke.displayName="CardTitle";var Ro=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Ro.displayName="CardDescription";var _e=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("p-6 pt-0",e),...t}));_e.displayName="CardContent";var ko=se.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex items-center p-6 pt-0",e),...t}));ko.displayName="CardFooter";function Lt({deal:e,customer:t,categories:o,onClick:r}){let s=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,H.jsxs)(Ue,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:r,children:[(0,H.jsxs)(je,{className:"pb-2",children:[(0,H.jsx)("div",{className:"flex justify-between items-center",children:(0,H.jsx)(Ke,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,H.jsx)("p",{className:"text-sm text-gray-500 H-1",children:e.description})]}),(0,H.jsxs)(_e,{children:[(0,H.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,H.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,H.jsx)(lt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,H.jsx)("span",{children:e.assignee})]}),(0,H.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,H.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,H.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,H.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,H.jsx)(lt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,H.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,H.jsx)(ve,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Me=require("react-beautiful-dnd");function Mt({status:e,deals:t,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:a,addNewDeal:i,updateDeal:b,onAddCustomer:x}){return(0,H.jsxs)("div",{className:"flex flex-col w-80",children:[(0,H.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),i&&(0,H.jsxs)(X,{children:[(0,H.jsx)(Se,{asChild:!0,children:(0,H.jsxs)(V,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,H.jsx)(lt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,H.jsxs)(_,{children:[(0,H.jsx)($,{children:(0,H.jsx)(J,{children:"Add New Deal"})}),(0,H.jsx)(we,{customers:o,categories:r,onSubmit:i,onUpdate:b,onAddCustomer:x})]})]}),(0,H.jsx)(Me.Droppable,{droppableId:e,children:w=>(0,H.jsxs)("div",{ref:w.innerRef,...w.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((l,g)=>(0,H.jsx)(Me.Draggable,{draggableId:l.id,index:g,children:T=>(0,H.jsx)("div",{ref:T.innerRef,...T.draggableProps,...T.dragHandleProps,children:(0,H.jsx)(Lt,{deal:l,customer:o.find(M=>M.id===l.customerId),categories:r,onClick:()=>s(l)})})},l.id)),w.placeholder]})}),(0,H.jsxs)("div",{className:"H-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,H.jsxs)("p",{className:"font-semibold",children:["Total: ",(0,H.jsxs)("span",{className:"text-green-600",children:["$",n(t).toLocaleString()]})]}),(0,H.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,H.jsxs)("span",{className:"text-blue-600",children:["$",a(t,e).toLocaleString()]})]})]})]})}var To=["Cold","Qualified","Proposal Made","Won","Lost"];function $e({initialData:e,addDeal:t,updateDeal:o,addCustomer:r,addComment:s,updateDealDescription:n}){let[a,i]=(0,me.useState)(e),[b,x]=(0,me.useState)(null),[w,l]=(0,me.useState)(null),g=(0,me.useCallback)(async v=>{let{source:y,destination:C}=v;if(!C||y.droppableId===C.droppableId&&y.index===C.index)return;let B=y.droppableId,E=C.droppableId,le=[...a.deals],[oe]=le.splice(y.index,1);oe.status=E,le.splice(C.index,0,oe);let h=await o(oe);i(pe=>({...pe,deals:pe.deals.map(re=>re.id===h.id?h:re)}))},[a,o]),T=async v=>{let y=await t(v);i(C=>({...C,deals:[...C.deals,y]}))},M=async v=>{let y=await o(v);i(C=>({...C,deals:C.deals.map(B=>B.id===y.id?y:B)})),l(null)},R=async(v,y)=>{let C=await s(v,{text:y.text,author:y.author,timestamp:y.timestamp});i(B=>({...B,deals:B.deals.map(E=>E.id===v?{...E,comments:[...E.comments,C],lastModified:new Date().toISOString()}:E)}))},u=v=>a.deals.filter(y=>y.status===v),S=v=>v.reduce((y,C)=>y+C.value,0),I=(v,y)=>{let C={Cold:.2,Qualified:.4,"Proposal Made":.6,Won:1,Lost:0};return v.reduce((B,E)=>B+E.value*C[y],0)},Q=async v=>{let y=await r(v);i(C=>({...C,customers:[...C.customers,y]}))},U=async(v,y)=>{let C=await n(v,y);i(B=>({...B,deals:B.deals.map(E=>E.id===C.id?C:E)}))};return(0,H.jsx)(Me.DragDropContext,{onDragEnd:g,children:(0,H.jsxs)("div",{className:"p-4",children:[(0,H.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:To.map(v=>{let y=u(v);return(0,H.jsx)(Mt,{status:v,deals:y,customers:a.customers,categories:a.categories,onDealClick:x,calculateColumnValue:S,calculateWeightedValue:I,addNewDeal:v==="Cold"?T:void 0,updateDeal:M,onAddCustomer:Q},v)})}),b&&(0,H.jsx)(Fe,{deal:b,customer:a.customers.find(v=>v.id===b.customerId),categories:a.categories,onClose:()=>x(null),onEdit:()=>l(b),onAddComment:v=>R(b.id,v),onUpdateDescription:v=>U(b.id,v)}),w&&(0,H.jsx)(X,{open:!0,onOpenChange:()=>l(null),children:(0,H.jsxs)(_,{className:"sm:max-w-[625px]",children:[(0,H.jsx)($,{children:(0,H.jsx)(J,{children:"Edit Deal"})}),(0,H.jsx)(we,{customers:a.customers,categories:a.categories,onSubmit:T,onUpdate:M,initialDeal:w,onAddCustomer:Q})]})})]})})}var Lo=[{id:"1",name:"Acme Corp",intro:"H leading technology company",active:!0},{id:"2",name:"GlobalTech",intro:"Innovative solutions provider",active:!0},{id:"3",name:"InnoSystems",intro:"Cutting-edge software development",active:!1}],Ao=[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}],Mo=[{id:"1",customerId:"1",value:5e4,assignee:"John Doe",status:"Qualified",categories:["1","3","5"],dateLogged:"2023-01-15",closureDate:"2023-06-30",lastModified:"2023-05-01T10:00:00Z",comments:[{id:"1",text:"Initial contact made",author:"John Doe",timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:"2",customerId:"2",value:75e3,assignee:"Jane Smith",status:"Proposal Made",categories:["2","4","6"],dateLogged:"2023-02-01",closureDate:"2023-07-31",lastModified:"2023-05-10T14:30:00Z",comments:[{id:"2",text:"Proposal sent",author:"Jane Smith",timestamp:"2023-05-10T14:30:00Z"}],description:"Custom hardware solution for GlobalTech"}],Je={deals:Mo,customers:Lo,categories:Ao};var Io={title:"CRM/KanbanBoard",component:$e,parameters:{layout:"fullscreen"}},Eo=Io,Bo={args:{initialData:Je,addDeal:async e=>(console.log("Adding deal:",e),{id:"new-deal-id",...e}),updateDeal:async e=>(console.log("Updating deal:",e),e),addCustomer:async e=>(console.log("Adding customer:",e),{id:"new-customer-id",...e}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{id:"new-comment-id",...t}),updateDealDescription:async(e,t)=>(console.log("Updating deal description:",e,t),{...Je.deals.find(o=>o.id===e),description:t})}};0&&(module.exports={Default});
@@ -0,0 +1 @@
1
+ import{a as e}from"../../chunk-V4CUPKLW.mjs";import"../../chunk-IE5X3XS7.mjs";import"../../chunk-UG6FK323.mjs";import"../../chunk-QMWYQ3FS.mjs";import{d as t}from"../../chunk-I4LMCHGL.mjs";import"../../chunk-F2YN7SED.mjs";import"../../chunk-4RKYG7LK.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var r={title:"CRM/KanbanBoard",component:e,parameters:{layout:"fullscreen"}},i=r,s={args:{initialData:t,addDeal:async o=>(console.log("Adding deal:",o),{id:"new-deal-id",...o}),updateDeal:async o=>(console.log("Updating deal:",o),o),addCustomer:async o=>(console.log("Adding customer:",o),{id:"new-customer-id",...o}),addComment:async(o,a)=>(console.log("Adding comment to deal:",o,a),{id:"new-comment-id",...a}),updateDealDescription:async(o,a)=>(console.log("Updating deal description:",o,a),{...t.deals.find(n=>n.id===o),description:a})}};export{s as Default,i as default};
@@ -0,0 +1,15 @@
1
+ import type { Deal, Status, Category, Customer } from './types';
2
+ type KanbanColumnProps = {
3
+ status: Status;
4
+ deals: Deal[];
5
+ customers: Customer[];
6
+ categories: Category[];
7
+ onDealClick: (deal: Deal) => void;
8
+ calculateColumnValue: (deals: Deal[]) => number;
9
+ calculateWeightedValue: (deals: Deal[], status: Status) => number;
10
+ addNewDeal?: (deal: Omit<Deal, "id">) => Promise<void>;
11
+ updateDeal: (deal: Deal) => Promise<void>;
12
+ onAddCustomer: (customer: Omit<Customer, "id">) => Promise<void>;
13
+ };
14
+ export declare function KanbanColumn({ status, deals, customers, categories, onDealClick, calculateColumnValue, calculateWeightedValue, addNewDeal, updateDeal, onAddCustomer, }: KanbanColumnProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ "use strict";var St=Object.create;var le=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var Tt=(e,t)=>{for(var r in t)le(e,r,{get:t[r],enumerable:!0})},Ue=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Nt(t))!kt.call(e,a)&&a!==r&&le(e,a,{get:()=>t[a],enumerable:!(o=Rt(t,a))||o.enumerable});return e};var D=(e,t,r)=>(r=e!=null?St(Dt(e)):{},Ue(t||!e||!e.__esModule?le(r,"default",{value:e,enumerable:!0}):r,e)),At=e=>Ue(le({},"__esModule",{value:!0}),e);var yr={};Tt(yr,{KanbanColumn:()=>hr});module.exports=At(yr);var Ze=require("clsx");var Se="-",Lt=e=>{let t=It(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(Se);return s[0]===""&&s.length!==1&&s.shift(),$e(s,t)||Mt(i)},getConflictingClassGroupIds:(i,s)=>{let g=r[i]||[];return s&&o[i]?[...g,...o[i]]:g}}},$e=(e,t)=>{var i;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?$e(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(Se);return(i=t.validators.find(({validator:s})=>s(n)))==null?void 0:i.classGroupId},_e=/^\[(.+)\]$/,Mt=e=>{if(_e.test(e)){let t=_e.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},It=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return zt(Object.entries(e.classGroups),r).forEach(([n,i])=>{Pe(i,o,n,t)}),o},Pe=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:je(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(Et(a)){Pe(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,i])=>{Pe(i,je(t,n),r,o)})})},je=(e,t)=>{let r=e;return t.split(Se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Et=e=>e.isThemeGetter,zt=(e,t)=>t?e.map(([r,o])=>{let a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,s])=>[t+i,s])):n);return[r,a]}):e,Ht=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(n,i)=>{r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let i=r.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return a(n,i),i},set(n,i){r.has(n)?r.set(n,i):a(n,i)}}},Ke="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,i=s=>{let g=[],w=0,h=0,c;for(let y=0;y<s.length;y++){let R=s[y];if(w===0){if(R===a&&(o||s.slice(y,y+n)===t)){g.push(s.slice(h,y)),h=y+n;continue}if(R==="/"){c=y;continue}}R==="["?w++:R==="]"&&w--}let u=g.length===0?s:s.substring(h),N=u.startsWith(Ke),L=N?u.substring(1):u,S=c&&c>h?c-h:void 0;return{modifiers:g,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:S}};return r?s=>r({className:s,parseClassName:i}):i},Vt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Ft=e=>({cache:Ht(e.cacheSize),parseClassName:Bt(e),...Lt(e)}),Gt=/\s+/,Wt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(Gt),s="";for(let g=i.length-1;g>=0;g-=1){let w=i[g],{modifiers:h,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:N}=r(w),L=!!N,S=o(L?u.substring(0,N):u);if(!S){if(!L){s=w+(s.length>0?" "+s:s);continue}if(S=o(u),!S){s=w+(s.length>0?" "+s:s);continue}L=!1}let y=Vt(h).join(":"),R=c?y+Ke:y,M=R+S;if(n.includes(M))continue;n.push(M);let q=a(S,L);for(let O=0;O<q.length;++O){let ie=q[O];n.push(R+ie)}s=w+(s.length>0?" "+s:s)}return s};function Ot(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=qe(t))&&(o&&(o+=" "),o+=r);return o}var qe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=qe(e[o]))&&(r&&(r+=" "),r+=t);return r};function Ut(e,...t){let r,o,a,n=i;function i(g){let w=t.reduce((h,c)=>c(h),e());return r=Ft(w),o=r.cache.get,a=r.cache.set,n=s,s(g)}function s(g){let w=o(g);if(w)return w;let h=Wt(g,r);return a(g,h),h}return function(){return n(Ot.apply(null,arguments))}}var f=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Xe=/^\[(?:([a-z-]+):)?(.+)\]$/i,_t=/^\d+\/\d+$/,jt=new Set(["px","full","screen"]),$t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?rt([hwib]|min|max)|et|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)rt-?((\d+)?\.?(\d+)[a-z]+|0)/,Jt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>$(e)||jt.has(e)||_t.test(e),H=e=>K(e,"length",ar),$=e=>!!e&&!Number.isNaN(Number(e)),Ce=e=>K(e,"number",$),J=e=>!!e&&Number.isInteger(Number(e)),Qt=e=>e.endsWith("%")&&$(e.slice(0,-1)),d=e=>Xe.test(e),B=e=>$t.test(e),Zt=new Set(["length","size","percentage"]),Yt=e=>K(e,Zt,Je),er=e=>K(e,"position",Je),tr=new Set(["image","url"]),rr=e=>K(e,tr,sr),or=e=>K(e,"",ir),Q=()=>!0,K=(e,t,r)=>{let o=Xe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ar=e=>Kt.test(e)&&!qt.test(e),Je=()=>!1,ir=e=>Xt.test(e),sr=e=>Jt.test(e);var nr=()=>{let e=f("colors"),t=f("spacing"),r=f("blur"),o=f("brightness"),a=f("borderColor"),n=f("borderRadius"),i=f("borderSpacing"),s=f("borderWidth"),g=f("contrast"),w=f("grayscale"),h=f("hueRotate"),c=f("invert"),u=f("gap"),N=f("gradientColorStops"),L=f("gradientColorStopPositions"),S=f("inset"),y=f("margin"),R=f("opacity"),M=f("padding"),q=f("saturate"),O=f("scale"),ie=f("sepia"),He=f("skew"),Be=f("space"),Ve=f("translate"),he=()=>["auto","contain","none"],ye=()=>["auto","hidden","clip","visible","scroll"],xe=()=>["auto",d,t],b=()=>[d,t],Fe=()=>["",z,H],se=()=>["auto",$,d],Ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",d],Oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[$,d];return{cacheSize:500,separator:":",theme:{colors:[Q],spacing:[z,H],blur:["none","",B,d],brightness:E(),borderColor:[e],borderRadius:["none","","full",B,d],borderSpacing:b(),borderWidth:Fe(),contrast:E(),grayscale:X(),hueRotate:E(),invert:X(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[Qt,H],inset:xe(),margin:xe(),opacity:E(),padding:b(),saturate:E(),scale:E(),sepia:X(),skew:E(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":Oe()}],"break-before":[{"break-before":Oe()}],"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:[...Ge(),d]}],overflow:[{overflow:ye()}],"overflow-rt":[{"overflow-rt":ye()}],"overflow-y":[{"overflow-y":ye()}],overscroll:[{overscroll:he()}],"overscroll-rt":[{"overscroll-rt":he()}],"overscroll-y":[{"overscroll-y":he()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-rt":[{"inset-rt":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",J,d]}],basis:[{basis:xe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",J,d]}],"grid-cols":[{"grid-cols":[Q]}],"col-start-end":[{col:["auto",{span:["full",J,d]},d]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Q]}],"row-start-end":[{row:["auto",{span:[J,d]},d]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[u]}],"gap-rt":[{"gap-rt":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],et:[{et:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],ot:[{ot:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-rt":[{"space-rt":[Be]}],"space-rt-reverse":["space-rt-reverse"],"space-y":[{"space-y":[Be]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,H]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ce]}],"font-family":[{font:[Q]}],"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",d]}],"line-clamp":[{"line-clamp":["none",$,Ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,H]}],"underline-offset":[{"underline-offset":["auto",z,d]}],"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:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ge(),er]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","rt","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","rt","tl"]},rr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-rt":[{"rounded-rt":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-rt":[{"border-rt":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-rt":[{"border-rt":[s]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-rt":[{"divide-rt":[s]}],"divide-rt-reverse":["divide-rt-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:ne()}],"border-color":[{border:[a]}],"border-color-rt":[{"border-rt":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-rt":[{"border-rt":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[z,d]}],"outline-w":[{outline:[z,H]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[z,H]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,or]}],"shadow-color":[{shadow:[Q]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...We(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":We()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",B,d]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[c]}],saturate:[{saturate:[q]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[q]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-rt":[{"border-spacing-rt":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-rt":[{"scale-rt":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[J,d]}],"translate-rt":[{"translate-rt":[Ve]}],"translate-y":[{"translate-y":[Ve]}],"skew-rt":[{"skew-rt":[He]}],"skew-y":[{"skew-y":[He]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","rt",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-ot":[{"scroll-ot":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-et":[{"scroll-et":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","rt","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-rt":[{"touch-pan":["rt","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,H,Ce]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-rt","overflow-y"],overscroll:["overscroll-rt","overscroll-y"],inset:["inset-rt","inset-y","start","end","top","right","bottom","left"],"inset-rt":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-rt","gap-y"],p:["px","py","ps","pe","et","pr","pb","pl"],px:["pr","pl"],py:["et","pb"],m:["mx","my","ms","ot","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-rt","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-rt":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-rt","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-rt"],"border-w-rt":["border-w-r","border-w-rt"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-rt"],"border-color-rt":["border-color-r","border-color-rt"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-ot","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-et","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-et","scroll-pb"],touch:["touch-rt","touch-y","touch-pz"],"touch-rt":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Qe=Ut(nr);function m(...e){return Qe((0,Ze.clsx)(e))}var Ye=require("@radix-ui/react-slot"),et=require("class-variance-authority"),tt=D(require("react")),rt=require("react/jsx-runtime"),lr=(0,et.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-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),V=tt.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...a},n)=>(0,rt.jsx)(e?Ye.Slot:"button",{className:m(lr({className:t,size:r,variant:o})),ref:n,...a}));V.displayName="Button";var Z=D(require("react")),C=D(require("@radix-ui/react-dialog")),ot=require("lucide-react");var ce=C.Root,de=C.Trigger,cr=C.Portal;var at=Z.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(C.Overlay,{ref:r,className:m("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}));at.displayName=C.Overlay.displayName;var Y=Z.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(cr,{children:[(0,rt.jsx)(at,{}),(0,rt.jsxs)(C.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-rt-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,rt.jsxs)(C.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,rt.jsx)(ot.X,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Y.displayName=C.Content.displayName;var ee=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";var dr=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-rt-2",e),...t});dr.displayName="DialogFooter";var te=Z.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(C.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));te.displayName=C.Title.displayName;var mr=Z.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(C.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));mr.displayName=C.Description.displayName;var U=D(require("react"));var Re=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Re.displayName="Card";var Ne=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));Ne.displayName="CardHeader";var De=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));De.displayName="CardTitle";var pr=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));pr.displayName="CardDescription";var ke=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("p-6 et-0",e),...t}));ke.displayName="CardContent";var ur=U.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("div",{ref:r,className:m("flex items-center p-6 et-0",e),...t}));ur.displayName="CardFooter";var fr=(0,et.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 st({className:e,variant:t,...r}){return(0,rt.jsx)("div",{className:m(fr({variant:t}),e),...r})}function lt({deal:e,customer:t,categories:r,onClick:o}){let a=r.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,rt.jsxs)(Re,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-rt-4 border-rt-accent",onClick:o,children:[(0,rt.jsxs)(Ne,{className:"pb-2",children:[(0,rt.jsx)("div",{className:"flex justify-between items-center",children:(0,rt.jsx)(De,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,rt.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,rt.jsxs)(ke,{children:[(0,rt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,rt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,rt.jsx)(ot.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,rt.jsx)("span",{children:e.assignee})]}),(0,rt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,rt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,rt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,rt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,rt.jsx)(ot.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,rt.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,rt.jsx)("div",{className:"flex justify-between items-left",children:a&&(0,rt.jsx)(st,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:a.name})})]})]})}var ve=require("react-beautiful-dnd");var be=require("react");var ct=D(require("react"));var F=ct.forwardRef(({className:e,type:t,...r},o)=>(0,rt.jsx)("input",{type:t,className:m("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));F.displayName="Input";var mt=D(require("react")),Te=D(require("@radix-ui/react-label"));var gr=(0,et.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=mt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(Te.Root,{ref:r,className:m(gr(),e),...t}));k.displayName=Te.Root.displayName;var p=D(require("@radix-ui/react-select")),G=D(require("react")),Ae=p.Root;var Le=p.Value,pe=G.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Trigger,{className:m("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,rt.jsx)(p.Icon,{asChild:!0,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pe.displayName=p.Trigger.displayName;var ft=G.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronUp,{className:"h-4 w-4"})}));ft.displayName=p.ScrollUpButton.displayName;var gt=G.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 w-4"})}));gt.displayName=p.ScrollDownButton.displayName;var ue=G.forwardRef(({children:e,className:t,position:r="popper",...o},a)=>(0,rt.jsx)(p.Portal,{children:(0,rt.jsxs)(p.Content,{className:m("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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-rt-1 data-[side=right]:translate-rt-1 data-[side=top]:-translate-y-1",t),position:r,ref:a,...o,children:[(0,rt.jsx)(ft,{}),(0,rt.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,rt.jsx)(gt,{})]})}));ue.displayName=p.Content.displayName;var br=G.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));br.displayName=p.Label.displayName;var fe=G.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Item,{className:m("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:o,...r,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,rt.jsx)(p.ItemIndicator,{children:(0,rt.jsx)(ot.Check,{className:"h-4 w-4"})})}),(0,rt.jsx)(p.ItemText,{children:e})]}));fe.displayName=p.Item.displayName;var vr=G.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));vr.displayName=p.Separator.displayName;var re=D(require("@radix-ui/react-checkbox")),vt=D(require("react")),oe=vt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(re.Root,{className:m("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,rt.jsx)(re.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,rt.jsx)(ot.Check,{className:"h-4 w-4"})})}));oe.displayName=re.Root.displayName;var ht=D(require("react")),ae=ht.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("textarea",{className:m("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:r,...t}));ae.displayName="Textarea";var Me=D(require("react")),I=D(require("@radix-ui/react-scroll-area"));var Ie=Me.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(I.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,rt.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,rt.jsx)(xt,{}),(0,rt.jsx)(I.Corner,{})]}));Ie.displayName=I.Root.displayName;var xt=Me.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,rt.jsx)(I.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-rt border-rt-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,rt.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function Ee({onSubmit:e}){let[t,r]=(0,be.useState)({name:"",intro:"",active:!0});return(0,rt.jsxs)("form",{onSubmit:a=>{a.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),r({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"customerName",children:"Customer Name"}),(0,rt.jsx)(F,{id:"customerName",value:t.name,onChange:a=>r({...t,name:a.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"customerIntro",children:"Intro"}),(0,rt.jsx)(ae,{id:"customerIntro",value:t.intro,onChange:a=>r({...t,intro:a.target.value}),placeholder:"Enter customer intro"})]}),(0,rt.jsxs)("div",{className:"flex items-center space-rt-2",children:[(0,rt.jsx)(oe,{id:"activeCustomer",checked:t.active,onCheckedChange:a=>r({...t,active:a})}),(0,rt.jsx)(k,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,rt.jsx)(V,{type:"submit",className:"w-full",children:"Add Customer"})]})}function ze({customers:e,categories:t,onSubmit:r,onUpdate:o,initialDeal:a,onAddCustomer:n}){let[i,s]=(0,be.useState)({customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("rt")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""});(0,be.useEffect)(()=>{a&&s(a)},[a]);let g=async c=>{if(c.preventDefault(),i.customerId&&i.value&&i.assignee&&i.closureDate)if(!a)await r(i);else{let u={...i,id:a.id};await o(u)}},w=c=>{s(u=>({...u,categories:u.categories.includes(c)?u.categories.filter(N=>N!==c):[...u.categories,c]}))},h=c=>{switch(c){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}};return(0,rt.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,rt.jsx)(Ie,{className:"h-[60vh] pr-4 mx-2",children:(0,rt.jsxs)("div",{className:"space-y-6 mx-2",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"customer",children:"Customer"}),(0,rt.jsxs)("div",{className:"flex items-center space-rt-2",children:[(0,rt.jsxs)(Ae,{value:i.customerId,onValueChange:c=>s({...i,customerId:c}),children:[(0,rt.jsx)(pe,{className:"flex-grow",children:(0,rt.jsx)(Le,{placeholder:"Select customer"})}),(0,rt.jsx)(ue,{children:e.map(c=>(0,rt.jsx)(fe,{value:c.id,children:c.name},c.id))})]}),(0,rt.jsxs)(ce,{children:[(0,rt.jsx)(de,{asChild:!0,children:(0,rt.jsxs)(V,{type:"button",size:"icon",variant:"outline",children:[(0,rt.jsx)(ot.PlusCircle,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Add new customer"})]})}),(0,rt.jsxs)(Y,{children:[(0,rt.jsx)(ee,{children:(0,rt.jsx)(te,{children:"Add New Customer"})}),(0,rt.jsx)(Ee,{onSubmit:n})]})]})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"value",children:"Value"}),(0,rt.jsx)(F,{id:"value",type:"number",value:i.value||"",onChange:c=>s({...i,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"assignee",children:"Assignee"}),(0,rt.jsx)(F,{id:"assignee",value:i.assignee||"",onChange:c=>s({...i,assignee:c.target.value}),placeholder:"Enter assignee name"})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(ae,{id:"description",value:i.description||"",onChange:c=>s({...i,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"status",children:"Status"}),(0,rt.jsxs)(Ae,{value:i.status,onValueChange:c=>s({...i,status:c}),children:[(0,rt.jsx)(pe,{children:(0,rt.jsx)(Le,{placeholder:"Select status"})}),(0,rt.jsx)(ue,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(c=>(0,rt.jsx)(fe,{value:c,children:c},c))})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{children:"Categories"}),(0,rt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,rt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:t.filter(u=>u.type===c).map(u=>(0,rt.jsxs)("div",{className:"flex items-center space-rt-2",children:[(0,rt.jsx)(oe,{id:u.id,checked:i.categories.includes(u.id),onCheckedChange:()=>w(u.id)}),(0,rt.jsx)("label",{htmlFor:u.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${h(u.type)}`,children:u.name})]},u.id))})]},c))})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"dateLogged",children:"Date Logged"}),(0,rt.jsx)(F,{id:"dateLogged",type:"date",value:i.dateLogged,onChange:c=>s({...i,dateLogged:c.target.value})})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(k,{htmlFor:"closureDate",children:"Closure Date"}),(0,rt.jsx)(F,{id:"closureDate",type:"date",value:i.closureDate,onChange:c=>s({...i,closureDate:c.target.value})})]})]})}),(0,rt.jsx)(V,{type:"submit",className:"w-full",children:a?"Update Deal":"Add Deal"})]})}function hr({status:e,deals:t,customers:r,categories:o,onDealClick:a,calculateColumnValue:n,calculateWeightedValue:i,addNewDeal:s,updateDeal:g,onAddCustomer:w}){return(0,rt.jsxs)("div",{className:"flex flex-col w-80",children:[(0,rt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),s&&(0,rt.jsxs)(ce,{children:[(0,rt.jsx)(de,{asChild:!0,children:(0,rt.jsxs)(V,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,rt.jsx)(ot.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,rt.jsxs)(Y,{children:[(0,rt.jsx)(ee,{children:(0,rt.jsx)(te,{children:"Add New Deal"})}),(0,rt.jsx)(ze,{customers:r,categories:o,onSubmit:s,onUpdate:g,onAddCustomer:w})]})]}),(0,rt.jsx)(ve.Droppable,{droppableId:e,children:h=>(0,rt.jsxs)("div",{ref:h.innerRef,...h.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((c,u)=>(0,rt.jsx)(ve.Draggable,{draggableId:c.id,index:u,children:N=>(0,rt.jsx)("div",{ref:N.innerRef,...N.draggableProps,...N.dragHandleProps,children:(0,rt.jsx)(lt,{deal:c,customer:r.find(L=>L.id===c.customerId),categories:o,onClick:()=>a(c)})})},c.id)),h.placeholder]})}),(0,rt.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,rt.jsxs)("p",{className:"font-semibold",children:["Total: ",(0,rt.jsxs)("span",{className:"text-green-600",children:["$",n(t).toLocaleString()]})]}),(0,rt.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,rt.jsxs)("span",{className:"text-blue-600",children:["$",i(t,e).toLocaleString()]})]})]})]})}0&&(module.exports={KanbanColumn});
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-IE5X3XS7.mjs";import"../../chunk-UG6FK323.mjs";import"../../chunk-QMWYQ3FS.mjs";import"../../chunk-F2YN7SED.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as KanbanColumn};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ "use strict";var Tt=Object.create;var le=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Lt=Object.getOwnPropertyNames;var Mt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var Et=(e,t)=>{for(var o in t)le(e,o,{get:t[o],enumerable:!0})},Ue=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Lt(t))!It.call(e,a)&&a!==o&&le(e,a,{get:()=>t[a],enumerable:!(r=At(t,a))||r.enumerable});return e};var D=(e,t,o)=>(o=e!=null?Tt(Mt(e)):{},Ue(t||!e||!e.__esModule?le(o,"default",{value:e,enumerable:!0}):o,e)),zt=e=>Ue(le({},"__esModule",{value:!0}),e);var Do={};Et(Do,{Default:()=>kt,EmptyColumn:()=>No,default:()=>Ro});module.exports=zt(Do);var Xe=require("clsx");var Pe="-",Ht=e=>{let t=Vt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(Pe);return s[0]===""&&s.length!==1&&s.shift(),$e(s,t)||Bt(i)},getConflictingClassGroupIds:(i,s)=>{let g=o[i]||[];return s&&r[i]?[...g,...r[i]]:g}}},$e=(e,t)=>{var i;if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?$e(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(Pe);return(i=t.validators.find(({validator:s})=>s(n)))==null?void 0:i.classGroupId},je=/^\[(.+)\]$/,Bt=e=>{if(je.test(e)){let t=je.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Vt=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Ft(Object.entries(e.classGroups),o).forEach(([n,i])=>{Se(i,r,n,t)}),r},Se=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:_e(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(Wt(a)){Se(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,i])=>{Se(i,_e(t,n),o,r)})})},_e=(e,t)=>{let o=e;return t.split(Pe).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Wt=e=>e.isThemeGetter,Ft=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,s])=>[t+i,s])):n);return[o,a]}):e,Gt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,i)=>{o.set(n,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let i=o.get(n);if(i!==void 0)return i;if((i=r.get(n))!==void 0)return a(n,i),i},set(n,i){o.has(n)?o.set(n,i):a(n,i)}}},Ke="!",Ot=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,i=s=>{let g=[],w=0,y=0,c;for(let h=0;h<s.length;h++){let R=s[h];if(w===0){if(R===a&&(r||s.slice(h,h+n)===t)){g.push(s.slice(y,h)),y=h+n;continue}if(R==="/"){c=h;continue}}R==="["?w++:R==="]"&&w--}let u=g.length===0?s:s.substring(y),N=u.startsWith(Ke),L=N?u.substring(1):u,P=c&&c>y?c-y:void 0;return{modifiers:g,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:P}};return o?s=>o({className:s,parseClassName:i}):i},Ut=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},jt=e=>({cache:Gt(e.cacheSize),parseClassName:Ot(e),...Ht(e)}),_t=/\s+/,$t=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(_t),s="";for(let g=i.length-1;g>=0;g-=1){let w=i[g],{modifiers:y,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:N}=o(w),L=!!N,P=r(L?u.substring(0,N):u);if(!P){if(!L){s=w+(s.length>0?" "+s:s);continue}if(P=r(u),!P){s=w+(s.length>0?" "+s:s);continue}L=!1}let h=Ut(y).join(":"),R=c?h+Ke:h,M=R+P;if(n.includes(M))continue;n.push(M);let Q=a(P,L);for(let O=0;O<Q.length;++O){let ie=Q[O];n.push(R+ie)}s=w+(s.length>0?" "+s:s)}return s};function Kt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Qe(t))&&(r&&(r+=" "),r+=o);return r}var Qe=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Qe(e[r]))&&(o&&(o+=" "),o+=t);return o};function Qt(e,...t){let o,r,a,n=i;function i(g){let w=t.reduce((y,c)=>c(y),e());return o=jt(w),r=o.cache.get,a=o.cache.set,n=s,s(g)}function s(g){let w=r(g);if(w)return w;let y=$t(g,o);return a(g,y),y}return function(){return n(Kt.apply(null,arguments))}}var f=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jt=/^\d+\/\d+$/,Zt=new Set(["px","full","screen"]),qt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xt=/\d+(%|px|r?em|[sdl]?ot([hwib]|min|max)|et|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,eo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)rt-?((\d+)?\.?(\d+)[a-z]+|0)/,to=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>$(e)||Zt.has(e)||Jt.test(e),H=e=>K(e,"length",co),$=e=>!!e&&!Number.isNaN(Number(e)),Ce=e=>K(e,"number",$),Z=e=>!!e&&Number.isInteger(Number(e)),oo=e=>e.endsWith("%")&&$(e.slice(0,-1)),d=e=>Je.test(e),B=e=>qt.test(e),ro=new Set(["length","size","percentage"]),ao=e=>K(e,ro,Ze),io=e=>K(e,"position",Ze),so=new Set(["image","url"]),no=e=>K(e,so,po),lo=e=>K(e,"",mo),q=()=>!0,K=(e,t,o)=>{let r=Je.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},co=e=>Xt.test(e)&&!Yt.test(e),Ze=()=>!1,mo=e=>eo.test(e),po=e=>to.test(e);var uo=()=>{let e=f("colors"),t=f("spacing"),o=f("blur"),r=f("brightness"),a=f("borderColor"),n=f("borderRadius"),i=f("borderSpacing"),s=f("borderWidth"),g=f("contrast"),w=f("grayscale"),y=f("hueRotate"),c=f("invert"),u=f("gap"),N=f("gradientColorStops"),L=f("gradientColorStopPositions"),P=f("inset"),h=f("margin"),R=f("opacity"),M=f("padding"),Q=f("saturate"),O=f("scale"),ie=f("sepia"),He=f("skew"),Be=f("space"),Ve=f("translate"),ye=()=>["auto","contain","none"],he=()=>["auto","hidden","clip","visible","scroll"],xe=()=>["auto",d,t],b=()=>[d,t],We=()=>["",z,H],se=()=>["auto",$,d],Fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",d],Oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[$,d];return{cacheSize:500,separator:":",theme:{colors:[q],spacing:[z,H],blur:["none","",B,d],brightness:E(),borderColor:[e],borderRadius:["none","","full",B,d],borderSpacing:b(),borderWidth:We(),contrast:E(),grayscale:J(),hueRotate:E(),invert:J(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[oo,H],inset:xe(),margin:xe(),opacity:E(),padding:b(),saturate:E(),scale:E(),sepia:J(),skew:E(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":Oe()}],"break-before":[{"break-before":Oe()}],"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(),d]}],overflow:[{overflow:he()}],"overflow-ot":[{"overflow-ot":he()}],"overflow-y":[{"overflow-y":he()}],overscroll:[{overscroll:ye()}],"overscroll-ot":[{"overscroll-ot":ye()}],"overscroll-y":[{"overscroll-y":ye()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-ot":[{"inset-ot":[P]}],"inset-y":[{"inset-y":[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",Z,d]}],basis:[{basis:xe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Z,d]}],"grid-cols":[{"grid-cols":[q]}],"col-start-end":[{col:["auto",{span:["full",Z,d]},d]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[q]}],"row-start-end":[{row:["auto",{span:[Z,d]},d]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[u]}],"gap-ot":[{"gap-ot":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],et:[{et:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],rt:[{rt:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-ot":[{"space-ot":[Be]}],"space-ot-reverse":["space-ot-reverse"],"space-y":[{"space-y":[Be]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,H]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ce]}],"font-family":[{font:[q]}],"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",d]}],"line-clamp":[{"line-clamp":["none",$,Ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,H]}],"underline-offset":[{"underline-offset":["auto",z,d]}],"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:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Fe(),io]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","ot","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ao]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","ot","tl"]},no]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-ot":[{"rounded-ot":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-ot":[{"border-ot":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-ot":[{"border-ot":[s]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-ot":[{"divide-ot":[s]}],"divide-ot-reverse":["divide-ot-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:ne()}],"border-color":[{border:[a]}],"border-color-ot":[{"border-ot":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-ot":[{"border-ot":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[z,d]}],"outline-w":[{outline:[z,H]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:We()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[z,H]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,lo]}],"shadow-color":[{shadow:[q]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",B,d]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[c]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-ot":[{"border-spacing-ot":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-ot":[{"scale-ot":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Z,d]}],"translate-ot":[{"translate-ot":[Ve]}],"translate-y":[{"translate-y":[Ve]}],"skew-ot":[{"skew-ot":[He]}],"skew-y":[{"skew-y":[He]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","ot",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-rt":[{"scroll-rt":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-et":[{"scroll-et":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","ot","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-ot":[{"touch-pan":["ot","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,H,Ce]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-ot","overflow-y"],overscroll:["overscroll-ot","overscroll-y"],inset:["inset-ot","inset-y","start","end","top","right","bottom","left"],"inset-ot":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-ot","gap-y"],p:["px","py","ps","pe","et","pr","pb","pl"],px:["pr","pl"],py:["et","pb"],m:["mx","my","ms","rt","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-ot","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-ot":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-ot","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-ot"],"border-w-ot":["border-w-r","border-w-ot"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-ot"],"border-color-ot":["border-color-r","border-color-ot"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-rt","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-et","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-et","scroll-pb"],touch:["touch-ot","touch-y","touch-pz"],"touch-ot":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var qe=Qt(uo);function m(...e){return qe((0,Xe.clsx)(e))}var Ye=require("@radix-ui/react-slot"),et=require("class-variance-authority"),tt=D(require("react")),ot=require("react/jsx-runtime"),fo=(0,et.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-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),V=tt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},n)=>(0,ot.jsx)(e?Ye.Slot:"button",{className:m(fo({className:t,size:o,variant:r})),ref:n,...a}));V.displayName="Button";var X=D(require("react")),C=D(require("@radix-ui/react-dialog")),rt=require("lucide-react");var ce=C.Root,de=C.Trigger,go=C.Portal;var at=X.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(C.Overlay,{ref:o,className:m("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}));at.displayName=C.Overlay.displayName;var Y=X.forwardRef(({className:e,children:t,...o},r)=>(0,ot.jsxs)(go,{children:[(0,ot.jsx)(at,{}),(0,ot.jsxs)(C.Content,{ref:r,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-ot-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,ot.jsxs)(C.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,ot.jsx)(rt.X,{className:"h-4 w-4"}),(0,ot.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Y.displayName=C.Content.displayName;var ee=({className:e,...t})=>(0,ot.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";var bo=({className:e,...t})=>(0,ot.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-ot-2",e),...t});bo.displayName="DialogFooter";var te=X.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(C.Title,{ref:o,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));te.displayName=C.Title.displayName;var vo=X.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(C.Description,{ref:o,className:m("text-sm text-muted-foreground",e),...t}));vo.displayName=C.Description.displayName;var U=D(require("react"));var Re=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Re.displayName="Card";var Ne=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("flex flex-col space-y-1.5 p-6",e),...t}));Ne.displayName="CardHeader";var De=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("font-semibold leading-none tracking-tight",e),...t}));De.displayName="CardTitle";var yo=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("text-sm text-muted-foreground",e),...t}));yo.displayName="CardDescription";var ke=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("p-6 et-0",e),...t}));ke.displayName="CardContent";var ho=U.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("div",{ref:o,className:m("flex items-center p-6 et-0",e),...t}));ho.displayName="CardFooter";var xo=(0,et.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 st({className:e,variant:t,...o}){return(0,ot.jsx)("div",{className:m(xo({variant:t}),e),...o})}function lt({deal:e,customer:t,categories:o,onClick:r}){let a=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,ot.jsxs)(Re,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-ot-4 border-ot-accent",onClick:r,children:[(0,ot.jsxs)(Ne,{className:"pb-2",children:[(0,ot.jsx)("div",{className:"flex justify-between items-center",children:(0,ot.jsx)(De,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,ot.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,ot.jsxs)(ke,{children:[(0,ot.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,ot.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,ot.jsx)(rt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,ot.jsx)("span",{children:e.assignee})]}),(0,ot.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,ot.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,ot.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,ot.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ot.jsx)(rt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,ot.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,ot.jsx)("div",{className:"flex justify-between items-left",children:a&&(0,ot.jsx)(st,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:a.name})})]})]})}var ve=require("react-beautiful-dnd");var be=require("react");var ct=D(require("react"));var W=ct.forwardRef(({className:e,type:t,...o},r)=>(0,ot.jsx)("input",{type:t,className:m("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}));W.displayName="Input";var mt=D(require("react")),Te=D(require("@radix-ui/react-label"));var wo=(0,et.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=mt.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(Te.Root,{ref:o,className:m(wo(),e),...t}));k.displayName=Te.Root.displayName;var p=D(require("@radix-ui/react-select")),F=D(require("react")),Ae=p.Root;var Le=p.Value,pe=F.forwardRef(({children:e,className:t,...o},r)=>(0,ot.jsxs)(p.Trigger,{className:m("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,ot.jsx)(p.Icon,{asChild:!0,children:(0,ot.jsx)(rt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pe.displayName=p.Trigger.displayName;var ft=F.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,ot.jsx)(rt.ChevronUp,{className:"h-4 w-4"})}));ft.displayName=p.ScrollUpButton.displayName;var gt=F.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,ot.jsx)(rt.ChevronDown,{className:"h-4 w-4"})}));gt.displayName=p.ScrollDownButton.displayName;var ue=F.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,ot.jsx)(p.Portal,{children:(0,ot.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-ot-1 data-[side=right]:translate-ot-1 data-[side=top]:-translate-y-1",t),position:o,ref:a,...r,children:[(0,ot.jsx)(ft,{}),(0,ot.jsx)(p.Viewport,{className:m("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,ot.jsx)(gt,{})]})}));ue.displayName=p.Content.displayName;var Co=F.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Co.displayName=p.Label.displayName;var fe=F.forwardRef(({children:e,className:t,...o},r)=>(0,ot.jsxs)(p.Item,{className:m("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,ot.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ot.jsx)(p.ItemIndicator,{children:(0,ot.jsx)(rt.Check,{className:"h-4 w-4"})})}),(0,ot.jsx)(p.ItemText,{children:e})]}));fe.displayName=p.Item.displayName;var So=F.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));So.displayName=p.Separator.displayName;var oe=D(require("@radix-ui/react-checkbox")),vt=D(require("react")),re=vt.forwardRef(({className:e,...t},o)=>(0,ot.jsx)(oe.Root,{className:m("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,ot.jsx)(oe.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,ot.jsx)(rt.Check,{className:"h-4 w-4"})})}));re.displayName=oe.Root.displayName;var yt=D(require("react")),ae=yt.forwardRef(({className:e,...t},o)=>(0,ot.jsx)("textarea",{className:m("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 Me=D(require("react")),I=D(require("@radix-ui/react-scroll-area"));var Ie=Me.forwardRef(({className:e,children:t,...o},r)=>(0,ot.jsxs)(I.Root,{ref:r,className:m("relative overflow-hidden",e),...o,children:[(0,ot.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ot.jsx)(xt,{}),(0,ot.jsx)(I.Corner,{})]}));Ie.displayName=I.Root.displayName;var xt=Me.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,ot.jsx)(I.ScrollAreaScrollbar,{ref:r,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-ot border-ot-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,ot.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function Ee({onSubmit:e}){let[t,o]=(0,be.useState)({name:"",intro:"",active:!0});return(0,ot.jsxs)("form",{onSubmit:a=>{a.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"customerName",children:"Customer Name"}),(0,ot.jsx)(W,{id:"customerName",value:t.name,onChange:a=>o({...t,name:a.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"customerIntro",children:"Intro"}),(0,ot.jsx)(ae,{id:"customerIntro",value:t.intro,onChange:a=>o({...t,intro:a.target.value}),placeholder:"Enter customer intro"})]}),(0,ot.jsxs)("div",{className:"flex items-center space-ot-2",children:[(0,ot.jsx)(re,{id:"activeCustomer",checked:t.active,onCheckedChange:a=>o({...t,active:a})}),(0,ot.jsx)(k,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,ot.jsx)(V,{type:"submit",className:"w-full",children:"Add Customer"})]})}function ze({customers:e,categories:t,onSubmit:o,onUpdate:r,initialDeal:a,onAddCustomer:n}){let[i,s]=(0,be.useState)({customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("ot")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""});(0,be.useEffect)(()=>{a&&s(a)},[a]);let g=async c=>{if(c.preventDefault(),i.customerId&&i.value&&i.assignee&&i.closureDate)if(!a)await o(i);else{let u={...i,id:a.id};await r(u)}},w=c=>{s(u=>({...u,categories:u.categories.includes(c)?u.categories.filter(N=>N!==c):[...u.categories,c]}))},y=c=>{switch(c){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}};return(0,ot.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,ot.jsx)(Ie,{className:"h-[60vh] pr-4 mx-2",children:(0,ot.jsxs)("div",{className:"space-y-6 mx-2",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"customer",children:"Customer"}),(0,ot.jsxs)("div",{className:"flex items-center space-ot-2",children:[(0,ot.jsxs)(Ae,{value:i.customerId,onValueChange:c=>s({...i,customerId:c}),children:[(0,ot.jsx)(pe,{className:"flex-grow",children:(0,ot.jsx)(Le,{placeholder:"Select customer"})}),(0,ot.jsx)(ue,{children:e.map(c=>(0,ot.jsx)(fe,{value:c.id,children:c.name},c.id))})]}),(0,ot.jsxs)(ce,{children:[(0,ot.jsx)(de,{asChild:!0,children:(0,ot.jsxs)(V,{type:"button",size:"icon",variant:"outline",children:[(0,ot.jsx)(rt.PlusCircle,{className:"h-4 w-4"}),(0,ot.jsx)("span",{className:"sr-only",children:"Add new customer"})]})}),(0,ot.jsxs)(Y,{children:[(0,ot.jsx)(ee,{children:(0,ot.jsx)(te,{children:"Add New Customer"})}),(0,ot.jsx)(Ee,{onSubmit:n})]})]})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"value",children:"Value"}),(0,ot.jsx)(W,{id:"value",type:"number",value:i.value||"",onChange:c=>s({...i,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"assignee",children:"Assignee"}),(0,ot.jsx)(W,{id:"assignee",value:i.assignee||"",onChange:c=>s({...i,assignee:c.target.value}),placeholder:"Enter assignee name"})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"description",children:"Description"}),(0,ot.jsx)(ae,{id:"description",value:i.description||"",onChange:c=>s({...i,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"status",children:"Status"}),(0,ot.jsxs)(Ae,{value:i.status,onValueChange:c=>s({...i,status:c}),children:[(0,ot.jsx)(pe,{children:(0,ot.jsx)(Le,{placeholder:"Select status"})}),(0,ot.jsx)(ue,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(c=>(0,ot.jsx)(fe,{value:c,children:c},c))})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{children:"Categories"}),(0,ot.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,ot.jsx)("div",{className:"grid grid-cols-2 gap-2",children:t.filter(u=>u.type===c).map(u=>(0,ot.jsxs)("div",{className:"flex items-center space-ot-2",children:[(0,ot.jsx)(re,{id:u.id,checked:i.categories.includes(u.id),onCheckedChange:()=>w(u.id)}),(0,ot.jsx)("label",{htmlFor:u.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${y(u.type)}`,children:u.name})]},u.id))})]},c))})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"dateLogged",children:"Date Logged"}),(0,ot.jsx)(W,{id:"dateLogged",type:"date",value:i.dateLogged,onChange:c=>s({...i,dateLogged:c.target.value})})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(k,{htmlFor:"closureDate",children:"Closure Date"}),(0,ot.jsx)(W,{id:"closureDate",type:"date",value:i.closureDate,onChange:c=>s({...i,closureDate:c.target.value})})]})]})}),(0,ot.jsx)(V,{type:"submit",className:"w-full",children:a?"Update Deal":"Add Deal"})]})}function Pt({status:e,deals:t,customers:o,categories:r,onDealClick:a,calculateColumnValue:n,calculateWeightedValue:i,addNewDeal:s,updateDeal:g,onAddCustomer:w}){return(0,ot.jsxs)("div",{className:"flex flex-col w-80",children:[(0,ot.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),s&&(0,ot.jsxs)(ce,{children:[(0,ot.jsx)(de,{asChild:!0,children:(0,ot.jsxs)(V,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,ot.jsx)(rt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,ot.jsxs)(Y,{children:[(0,ot.jsx)(ee,{children:(0,ot.jsx)(te,{children:"Add New Deal"})}),(0,ot.jsx)(ze,{customers:o,categories:r,onSubmit:s,onUpdate:g,onAddCustomer:w})]})]}),(0,ot.jsx)(ve.Droppable,{droppableId:e,children:y=>(0,ot.jsxs)("div",{ref:y.innerRef,...y.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((c,u)=>(0,ot.jsx)(ve.Draggable,{draggableId:c.id,index:u,children:N=>(0,ot.jsx)("div",{ref:N.innerRef,...N.draggableProps,...N.dragHandleProps,children:(0,ot.jsx)(lt,{deal:c,customer:o.find(L=>L.id===c.customerId),categories:r,onClick:()=>a(c)})})},c.id)),y.placeholder]})}),(0,ot.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,ot.jsxs)("p",{className:"font-semibold",children:["Total: ",(0,ot.jsxs)("span",{className:"text-green-600",children:["$",n(t).toLocaleString()]})]}),(0,ot.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,ot.jsxs)("span",{className:"text-blue-600",children:["$",i(t,e).toLocaleString()]})]})]})]})}var Rt=[{id:"1",name:"Acme Corp",intro:"ot leading technology company",active:!0},{id:"2",name:"GlobalTech",intro:"Innovative solutions provider",active:!0},{id:"3",name:"InnoSystems",intro:"Cutting-edge software development",active:!1}],Nt=[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}],Dt=[{id:"1",customerId:"1",value:5e4,assignee:"John Doe",status:"Qualified",categories:["1","3","5"],dateLogged:"2023-01-15",closureDate:"2023-06-30",lastModified:"2023-05-01T10:00:00Z",comments:[{id:"1",text:"Initial contact made",author:"John Doe",timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:"2",customerId:"2",value:75e3,assignee:"Jane Smith",status:"Proposal Made",categories:["2","4","6"],dateLogged:"2023-02-01",closureDate:"2023-07-31",lastModified:"2023-05-10T14:30:00Z",comments:[{id:"2",text:"Proposal sent",author:"Jane Smith",timestamp:"2023-05-10T14:30:00Z"}],description:"Custom hardware solution for GlobalTech"}];var Po={title:"CRM/KanbanColumn",component:Pt,parameters:{layout:"centered"}},Ro=Po,kt={args:{status:"Qualified",deals:Dt.filter(e=>e.status==="Qualified"),customers:Rt,categories:Nt,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((t,o)=>t+o.value,0),calculateWeightedValue:(e,t)=>{let o={Cold:.2,Qualified:.4,"Proposal Made":.6,Won:1,Lost:0};return e.reduce((r,a)=>r+a.value*o[t],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},No={args:{...kt.args,status:"Won",deals:[]}};0&&(module.exports={Default,EmptyColumn});
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-IE5X3XS7.mjs";import"../../chunk-UG6FK323.mjs";import"../../chunk-QMWYQ3FS.mjs";import{a as l,b as n,c as s}from"../../chunk-I4LMCHGL.mjs";import"../../chunk-F2YN7SED.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var c={title:"CRM/KanbanColumn",component:a,parameters:{layout:"centered"}},p=c,m={args:{status:"Qualified",deals:s.filter(e=>e.status==="Qualified"),customers:l,categories:n,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((o,t)=>o+t.value,0),calculateWeightedValue:(e,o)=>{let t={Cold:.2,Qualified:.4,"Proposal Made":.6,Won:1,Lost:0};return e.reduce((r,u)=>r+u.value*t[o],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},y={args:{...m.args,status:"Won",deals:[]}};export{m as Default,y as EmptyColumn,p as default};
@@ -0,0 +1,6 @@
1
+ import type { Customer } from './types';
2
+ type NewCustomerFormProps = {
3
+ onSubmit: (customer: Customer) => void;
4
+ };
5
+ export default function NewCustomerForm({ onSubmit }: NewCustomerFormProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ "use strict";var Le=Object.create;var H=Object.defineProperty;var Ee=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var We=(e,r)=>{for(var t in r)H(e,t,{get:r[t],enumerable:!0})},le=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ge(r))!Be.call(e,n)&&n!==t&&H(e,n,{get:()=>r[n],enumerable:!(o=Ee(r,n))||o.enumerable});return e};var M=(e,r,t)=>(t=e!=null?Le(Ve(e)):{},le(r||!e||!e.__esModule?H(t,"default",{value:e,enumerable:!0}):t,e)),_e=e=>le(H({},"__esModule",{value:!0}),e);var yr={};We(yr,{default:()=>Te});module.exports=_e(yr);var Ie=require("react");var he=require("clsx");var X="-",Fe=e=>{let r=je(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let i=l.split(X);return i[0]===""&&i.length!==1&&i.shift(),pe(i,r)||He(l)},getConflictingClassGroupIds:(l,i)=>{let u=t[l]||[];return i&&o[l]?[...u,...o[l]]:u}}},pe=(e,r)=>{var l;if(e.length===0)return r.classGroupId;let t=e[0],o=r.nextPart.get(t),n=o?pe(e.slice(1),o):void 0;if(n)return n;if(r.validators.length===0)return;let s=e.join(X);return(l=r.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},ce=/^\[(.+)\]$/,He=e=>{if(ce.test(e)){let r=ce.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},je=e=>{let{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return Oe(Object.entries(e.classGroups),t).forEach(([s,l])=>{K(l,o,s,r)}),o},K=(e,r,t,o)=>{e.forEach(n=>{if(typeof n=="string"){let s=n===""?r:de(r,n);s.classGroupId=t;return}if(typeof n=="function"){if($e(n)){K(n(o),r,t,o);return}r.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([s,l])=>{K(l,de(r,s),t,o)})})},de=(e,r)=>{let t=e;return r.split(X).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},$e=e=>e.isThemeGetter,Oe=(e,r)=>r?e.map(([t,o])=>{let n=o.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[r+l,i])):s);return[t,n]}):e,Ue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map,n=(s,l)=>{t.set(s,l),r++,r>e&&(r=0,o=t,t=new Map)};return{get(s){let l=t.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return n(s,l),l},set(s,l){t.has(s)?t.set(s,l):n(s,l)}}},ue="!",qe=e=>{let{separator:r,experimentalParseClassName:t}=e,o=r.length===1,n=r[0],s=r.length,l=i=>{let u=[],b=0,g=0,v;for(let p=0;p<i.length;p++){let f=i[p];if(b===0){if(f===n&&(o||i.slice(p,p+s)===r)){u.push(i.slice(g,p)),g=p+s;continue}if(f==="/"){v=p;continue}}f==="["?b++:f==="]"&&b--}let w=u.length===0?i:i.substring(g),k=w.startsWith(ue),C=k?w.substring(1):w,m=v&&v>g?v-g:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:m}};return t?i=>t({className:i,parseClassName:l}):l},Je=e=>{if(e.length<=1)return e;let r=[],t=[];return e.forEach(o=>{o[0]==="["?(r.push(...t.sort(),o),t=[]):t.push(o)}),r.push(...t.sort()),r},Ke=e=>({cache:Ue(e.cacheSize),parseClassName:qe(e),...Fe(e)}),Xe=/\s+/,Ze=(e,r)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:n}=r,s=[],l=e.trim().split(Xe),i="";for(let u=l.length-1;u>=0;u-=1){let b=l[u],{modifiers:g,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:k}=t(b),C=!!k,m=o(C?w.substring(0,k):w);if(!m){if(!C){i=b+(i.length>0?" "+i:i);continue}if(m=o(w),!m){i=b+(i.length>0?" "+i:i);continue}C=!1}let p=Je(g).join(":"),f=v?p+ue:p,x=f+m;if(s.includes(x))continue;s.push(x);let T=n(m,C);for(let N=0;N<T.length;++N){let W=T[N];s.push(f+W)}i=b+(i.length>0?" "+i:i)}return i};function Qe(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=me(r))&&(o&&(o+=" "),o+=t);return o}var me=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=me(e[o]))&&(t&&(t+=" "),t+=r);return t};function Ye(e,...r){let t,o,n,s=l;function l(u){let b=r.reduce((g,v)=>v(g),e());return t=Ke(b),o=t.cache.get,n=t.cache.set,s=i,i(u)}function i(u){let b=o(u);if(b)return b;let g=Ze(u,t);return n(u,g),g}return function(){return s(Qe.apply(null,arguments))}}var c=e=>{let r=t=>t[e]||[];return r.isThemeGetter=!0,r},be=/^\[(?:([a-z-]+):)?(.+)\]$/i,De=/^\d+\/\d+$/,er=new Set(["px","full","screen"]),rr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|we|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,or=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,nr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,P=e=>A(e)||er.has(e)||De.test(e),z=e=>I(e,"length",mr),A=e=>!!e&&!Number.isNaN(Number(e)),J=e=>I(e,"number",A),E=e=>!!e&&Number.isInteger(Number(e)),ir=e=>e.endsWith("%")&&A(e.slice(0,-1)),a=e=>be.test(e),S=e=>rr.test(e),ar=new Set(["length","size","percentage"]),lr=e=>I(e,ar,fe),cr=e=>I(e,"position",fe),dr=new Set(["image","url"]),pr=e=>I(e,dr,fr),ur=e=>I(e,"",br),G=()=>!0,I=(e,r,t)=>{let o=be.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},mr=e=>tr.test(e)&&!or.test(e),fe=()=>!1,br=e=>nr.test(e),fr=e=>sr.test(e);var gr=()=>{let e=c("colors"),r=c("spacing"),t=c("blur"),o=c("brightness"),n=c("borderColor"),s=c("borderRadius"),l=c("borderSpacing"),i=c("borderWidth"),u=c("contrast"),b=c("grayscale"),g=c("hueRotate"),v=c("invert"),w=c("gap"),k=c("gradientColorStops"),C=c("gradientColorStopPositions"),m=c("inset"),p=c("margin"),f=c("opacity"),x=c("padding"),T=c("saturate"),N=c("scale"),W=c("sepia"),re=c("skew"),te=c("space"),oe=c("translate"),$=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",a,r],d=()=>[a,r],ne=()=>["",P,z],_=()=>["auto",A,a],se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",a],ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[A,a];return{cacheSize:500,separator:":",theme:{colors:[G],spacing:[P,z],blur:["none","",S,a],brightness:R(),borderColor:[e],borderRadius:["none","","full",S,a],borderSpacing:d(),borderWidth:ne(),contrast:R(),grayscale:L(),hueRotate:R(),invert:L(),gap:d(),gradientColorStops:[e],gradientColorStopPositions:[ir,z],inset:U(),margin:U(),opacity:R(),padding:d(),saturate:R(),scale:R(),sepia:L(),skew:R(),space:d(),translate:d()},classGroups:{aspect:[{aspect:["auto","square","video",a]}],container:["container"],columns:[{columns:[S]}],"break-after":[{"break-after":ae()}],"break-before":[{"break-before":ae()}],"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:[...se(),a]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",E,a]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",a]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",E,a]}],"grid-cols":[{"grid-cols":[G]}],"col-start-end":[{col:["auto",{span:["full",E,a]},a]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[G]}],"row-start-end":[{row:["auto",{span:[E,a]},a]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",a]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",a]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[te]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",a,r]}],"min-w":[{"min-w":[a,r,"min","max","fit"]}],"max-w":[{"max-w":[a,r,"none","full","min","max","fit","prose",{screen:[S]},S]}],we:[{we:[a,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-we":[{"min-we":[a,r,"min","max","fit","svh","lvh","dvh"]}],"max-we":[{"max-we":[a,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[a,r,"auto","min","max","fit"]}],"font-size":[{text:["base",S,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",J]}],"font-family":[{font:[G]}],"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",a]}],"line-clamp":[{"line-clamp":["none",A,J]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",P,a]}],"list-image":[{"list-image":["none",a]}],"list-style-type":[{list:["none","disc","decimal",a]}],"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:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",P,z]}],"underline-offset":[{"underline-offset":["auto",P,a]}],"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:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a]}],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",a]}],"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:[...se(),cr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:F()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[P,a]}],"outline-w":[{outline:[P,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[P,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",S,ur]}],"shadow-color":[{shadow:[G]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",S,a]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[v]}],saturate:[{saturate:[T]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",a]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",a]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",a]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[E,a]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[re]}],"skew-y":[{"skew-y":[re]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",a]}],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",a]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[P,z,J]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","we"],"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-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-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-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ge=Ye(gr);function y(...e){return ge((0,he.clsx)(e))}var xe=require("@radix-ui/react-slot"),ye=require("class-variance-authority"),ve=M(require("react")),we=require("react/jsx-runtime"),hr=(0,ye.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:"we-10 px-4 py-2",icon:"we-10 w-10",lg:"we-11 rounded px-8",sm:"we-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),Z=ve.forwardRef(({asChild:e=!1,className:r,size:t,variant:o,...n},s)=>(0,we.jsx)(e?xe.Slot:"button",{className:y(hr({className:r,size:t,variant:o})),ref:s,...n}));Z.displayName="Button";var Ce=M(require("react"));var Q=Ce.forwardRef(({className:e,type:r,...t},o)=>(0,we.jsx)("input",{type:r,className:y("flex we-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Q.displayName="Input";var Re=M(require("react")),Y=M(require("@radix-ui/react-label"));var xr=(0,ye.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),V=Re.forwardRef(({className:e,...r},t)=>(0,we.jsx)(Y.Root,{ref:t,className:y(xr(),e),...r}));V.displayName=Y.Root.displayName;var Se=M(require("react")),D=Se.forwardRef(({className:e,...r},t)=>(0,we.jsx)("textarea",{className:y("flex min-we-[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:t,...r}));D.displayName="Textarea";var B=M(require("@radix-ui/react-checkbox")),Me=require("lucide-react"),Ae=M(require("react")),ee=Ae.forwardRef(({className:e,...r},t)=>(0,we.jsx)(B.Root,{className:y("peer we-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:t,...r,children:(0,we.jsx)(B.Indicator,{className:y("flex items-center justify-center text-current"),children:(0,we.jsx)(Me.Check,{className:"we-4 w-4"})})}));ee.displayName=B.Root.displayName;function Te({onSubmit:e}){let[r,t]=(0,Ie.useState)({name:"",intro:"",active:!0});return(0,we.jsxs)("form",{onSubmit:n=>{n.preventDefault(),r.name&&(e({id:Date.now().toString(),...r}),t({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,we.jsxs)("div",{className:"space-y-2",children:[(0,we.jsx)(V,{htmlFor:"customerName",children:"Customer Name"}),(0,we.jsx)(Q,{id:"customerName",value:r.name,onChange:n=>t({...r,name:n.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,we.jsxs)("div",{className:"space-y-2",children:[(0,we.jsx)(V,{htmlFor:"customerIntro",children:"Intro"}),(0,we.jsx)(D,{id:"customerIntro",value:r.intro,onChange:n=>t({...r,intro:n.target.value}),placeholder:"Enter customer intro"})]}),(0,we.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,we.jsx)(ee,{id:"activeCustomer",checked:r.active,onCheckedChange:n=>t({...r,active:n})}),(0,we.jsx)(V,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,we.jsx)(Z,{type:"submit",className:"w-full",children:"Add Customer"})]})}
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-QMWYQ3FS.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as default};