cortex-react-components 1.65.2 → 1.65.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/{chunk-5CCW24XE.mjs → chunk-4AT3EYCF.mjs} +1 -1
  2. package/dist/{chunk-ULWFOWF2.mjs → chunk-6L2BDKJU.mjs} +1 -1
  3. package/dist/{chunk-Y5ZPWPOT.mjs → chunk-7SPGDJJI.mjs} +1 -1
  4. package/dist/{chunk-ZOP4SDLB.mjs → chunk-CSFID44M.mjs} +1 -1
  5. package/dist/{chunk-6E5WHIW6.mjs → chunk-CZIRJUID.mjs} +1 -1
  6. package/dist/{chunk-OQR6YVKI.mjs → chunk-DNOTHVMH.mjs} +1 -1
  7. package/dist/{chunk-5C4F3OYA.mjs → chunk-E6ZAA4QH.mjs} +1 -1
  8. package/dist/{chunk-6YHRHDB7.mjs → chunk-E7W2GFKO.mjs} +1 -1
  9. package/dist/chunk-EEELKBAD.mjs +4 -0
  10. package/dist/{chunk-KJ7DELAG.mjs → chunk-FE7YQRL2.mjs} +1 -1
  11. package/dist/{chunk-5UQKSJU5.mjs → chunk-FSQNNG2C.mjs} +1 -1
  12. package/dist/{chunk-W3ONOYB6.mjs → chunk-JPWY5ADC.mjs} +1 -1
  13. package/dist/{chunk-NGBQVG6N.mjs → chunk-JTQWVSV5.mjs} +1 -1
  14. package/dist/{chunk-NIUDBN75.mjs → chunk-KD7K2ENG.mjs} +1 -1
  15. package/dist/{chunk-QYMXR42G.mjs → chunk-N4NSSICX.mjs} +1 -1
  16. package/dist/{chunk-JBWGBBHF.mjs → chunk-OU3PM75Z.mjs} +1 -1
  17. package/dist/{chunk-L74JGLMR.mjs → chunk-P3PIMDIR.mjs} +1 -1
  18. package/dist/{chunk-4MFTG62S.mjs → chunk-PADGOK5C.mjs} +1 -1
  19. package/dist/{chunk-JRB2R6LE.mjs → chunk-PKDUSZWL.mjs} +1 -1
  20. package/dist/{chunk-TYBLC6LO.mjs → chunk-Q5LSCSF7.mjs} +1 -1
  21. package/dist/{chunk-Y73QTPA6.mjs → chunk-ROEJPYRW.mjs} +1 -1
  22. package/dist/{chunk-NUPPPEG7.mjs → chunk-TWPRI2XQ.mjs} +1 -1
  23. package/dist/{chunk-4NRRPFAV.mjs → chunk-WLA5QCBE.mjs} +1 -1
  24. package/dist/{chunk-5V2PNTEF.mjs → chunk-WSDHDEFO.mjs} +1 -1
  25. package/dist/chunk-WXZ3IRTS.mjs +1 -0
  26. package/dist/{chunk-WG2HHJYU.mjs → chunk-YRJA3PJ5.mjs} +1 -1
  27. package/dist/{chunk-FCNEFWQ7.mjs → chunk-Z3YAIJQT.mjs} +1 -1
  28. package/dist/{chunk-TTRDD6M2.mjs → chunk-ZEOV7BEN.mjs} +1 -1
  29. package/dist/components/Blocks/Banner.mjs +1 -1
  30. package/dist/components/Blocks/CallToAction.mjs +1 -1
  31. package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
  32. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  33. package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
  34. package/dist/components/Blocks/Content.mjs +1 -1
  35. package/dist/components/Blocks/Content.stories.mjs +1 -1
  36. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  37. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  38. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  39. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  40. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  41. package/dist/components/Blocks/index.mjs +1 -1
  42. package/dist/components/CRM/CogeBoard.js +1 -1
  43. package/dist/components/CRM/CogeBoard.mjs +1 -1
  44. package/dist/components/CRM/CogeBoard.stories.js +1 -1
  45. package/dist/components/CRM/CogeBoard.stories.mjs +1 -1
  46. package/dist/components/CRM/DealCard.js +1 -1
  47. package/dist/components/CRM/DealCard.mjs +1 -1
  48. package/dist/components/CRM/DealCard.stories.js +1 -1
  49. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  50. package/dist/components/CRM/DealDetails.mjs +1 -1
  51. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  52. package/dist/components/CRM/KanbanBoard.js +1 -1
  53. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  54. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  55. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  56. package/dist/components/CRM/KanbanColumn.js +1 -1
  57. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  58. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  59. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  60. package/dist/components/CRM/index.js +1 -1
  61. package/dist/components/CRM/index.mjs +1 -1
  62. package/dist/components/Cards/ContentCard.mjs +1 -1
  63. package/dist/components/Cards/ContentCard.stories.mjs +1 -1
  64. package/dist/components/Cards/FeatureCard.mjs +1 -1
  65. package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
  66. package/dist/components/Cards/index.mjs +1 -1
  67. package/dist/components/DigitalColleagues/ChatInterface.mjs +1 -1
  68. package/dist/components/DigitalColleagues/ChatInterface.stories.mjs +1 -1
  69. package/dist/components/DigitalColleagues/CommentSection.mjs +1 -1
  70. package/dist/components/DigitalColleagues/CommentSection.stories.mjs +1 -1
  71. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  72. package/dist/components/DigitalColleagues/DashboardHeader.stories.mjs +1 -1
  73. package/dist/components/DigitalColleagues/EpicsView.mjs +1 -1
  74. package/dist/components/DigitalColleagues/EpicsView.stories.mjs +1 -1
  75. package/dist/components/DigitalColleagues/KanbanBoard.mjs +1 -1
  76. package/dist/components/DigitalColleagues/KanbanBoard.stories.mjs +1 -1
  77. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  78. package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
  79. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  80. package/dist/components/DigitalColleagues/ManagementSidebar.stories.mjs +1 -1
  81. package/dist/components/DigitalColleagues/PlanningView.mjs +1 -1
  82. package/dist/components/DigitalColleagues/PlanningView.stories.mjs +1 -1
  83. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  84. package/dist/components/DigitalColleagues/TaskDetailsModal.mjs +1 -1
  85. package/dist/components/DigitalColleagues/TaskDetailsModal.stories.mjs +1 -1
  86. package/dist/components/DigitalColleagues/TaskSidebar.mjs +1 -1
  87. package/dist/components/DigitalColleagues/TaskSidebar.stories.mjs +1 -1
  88. package/dist/components/DigitalColleagues/TeamSwitcher.mjs +1 -1
  89. package/dist/components/DigitalColleagues/TeamSwitcher.stories.mjs +1 -1
  90. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  91. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  92. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  93. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  94. package/dist/components/Heros/PostHero/index.mjs +1 -1
  95. package/dist/components/Heros/RenderHero.mjs +1 -1
  96. package/dist/components/Heros/index.mjs +1 -1
  97. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  98. package/dist/components/Holidays/ApproveLeave.stories.mjs +1 -1
  99. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  100. package/dist/components/Holidays/HolidayGrid.stories.mjs +1 -1
  101. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  102. package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
  103. package/dist/components/Holidays/index.mjs +1 -1
  104. package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
  105. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  106. package/dist/components/Layouts/Print.mjs +1 -1
  107. package/dist/components/Layouts/Print.stories.mjs +1 -1
  108. package/dist/components/Layouts/SlideShow.mjs +1 -1
  109. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  110. package/dist/components/Layouts/index.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.js +1 -1
  117. package/dist/components/index.mjs +1 -1
  118. package/dist/components/ui/index.mjs +1 -1
  119. package/dist/globals.css +1 -1
  120. package/dist/hooks/index.mjs +1 -1
  121. package/dist/index.js +2 -2
  122. package/dist/index.mjs +1 -1
  123. package/dist/metafile-cjs.json +1 -1
  124. package/dist/metafile-esm.json +1 -1
  125. package/dist/pages/Blog.mjs +1 -1
  126. package/dist/pages/Blog.stories.mjs +1 -1
  127. package/dist/pages/Documentation.mjs +1 -1
  128. package/dist/pages/Documentation.stories.mjs +1 -1
  129. package/dist/pages/IndexPage.mjs +1 -1
  130. package/dist/pages/IndexPage.stories.mjs +1 -1
  131. package/dist/pages/LandingPage.mjs +1 -1
  132. package/dist/pages/LandingPage.stories.mjs +1 -1
  133. package/dist/pages/Page.mjs +1 -1
  134. package/dist/pages/Page.stories.mjs +1 -1
  135. package/dist/pages/Printable.stories.mjs +1 -1
  136. package/dist/pages/Publish.mjs +1 -1
  137. package/dist/pages/Publish.stories.mjs +1 -1
  138. package/dist/pages/Website.mjs +1 -1
  139. package/dist/pages/Website.stories.mjs +1 -1
  140. package/dist/sections/AboutSection.mjs +1 -1
  141. package/dist/sections/AboutSection.stories.mjs +1 -1
  142. package/dist/sections/BlogDetail.mjs +1 -1
  143. package/dist/sections/BlogDetail.stories.mjs +1 -1
  144. package/dist/sections/BlogList.mjs +1 -1
  145. package/dist/sections/BlogList.stories.mjs +1 -1
  146. package/dist/sections/BlogListSection.mjs +1 -1
  147. package/dist/sections/BlogListSection.stories.mjs +1 -1
  148. package/dist/sections/ContactSection.mjs +1 -1
  149. package/dist/sections/ContactSection.stories.mjs +1 -1
  150. package/dist/sections/ImageSection.stories.mjs +1 -1
  151. package/dist/sections/MainPageSection.js +1 -1
  152. package/dist/sections/MainPageSection.mjs +1 -1
  153. package/dist/sections/PageSections.mjs +1 -1
  154. package/dist/sections/PageSections.stories.mjs +1 -1
  155. package/dist/sections/PricingSection.mjs +1 -1
  156. package/dist/sections/PricingSection.stories.mjs +1 -1
  157. package/dist/sections/ServiceDetail.mjs +1 -1
  158. package/dist/sections/ServiceDetailSection.mjs +1 -1
  159. package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
  160. package/dist/sections/ServiceSection.mjs +1 -1
  161. package/dist/sections/ServiceSection.stories.mjs +1 -1
  162. package/dist/sections/index.js +2 -2
  163. package/dist/sections/index.mjs +1 -1
  164. package/package.json +1 -1
  165. package/dist/chunk-FFESN4FM.mjs +0 -1
  166. package/dist/chunk-HFT5KFCM.mjs +0 -4
@@ -1 +1 @@
1
- "use strict";var Re=Object.create;var W=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ze=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Le=(e,t)=>{for(var r in t)W(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Te(t))!Pe.call(e,s)&&s!==r&&W(e,s,{get:()=>t[s],enumerable:!(o=De(t,s))||o.enumerable});return e};var Ge=(e,t,r)=>(r=e!=null?Re(ze(e)):{},pe(t||!e||!e.__esModule?W(r,"default",{value:e,enumerable:!0}):r,e)),Ee=e=>pe(W({},"__esModule",{value:!0}),e);var xt={};Le(xt,{Default:()=>Ne,EmptyColumn:()=>yt,default:()=>ht});module.exports=Ee(xt);var T=Ge(require("react"));var ve=require("clsx");var te="-",He=e=>{let t=je(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let a=i.split(te);return a[0]===""&&a.length!==1&&a.shift(),ge(a,t)||Ie(i)},getConflictingClassGroupIds:(i,a)=>{let u=r[i]||[];return a&&o[i]?[...u,...o[i]]:u}}},ge=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?ge(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(te);return t.validators.find(({validator:i})=>i(n))?.classGroupId},ue=/^\[(.+)\]$/,Ie=e=>{if(ue.test(e)){let t=ue.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},je=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Be(Object.entries(e.classGroups),r).forEach(([n,i])=>{ee(i,o,n,t)}),o},ee=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:me(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(Ve(s)){ee(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,i])=>{ee(i,me(t,n),r,o)})})},me=(e,t)=>{let r=e;return t.split(te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ve=e=>e.isThemeGetter,Be=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[r,s]}):e,We=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(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 s(n,i),i},set(n,i){r.has(n)?r.set(n,i):s(n,i)}}},be="!",Ue=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,i=a=>{let u=[],b=0,m=0,v;for(let g=0;g<a.length;g++){let h=a[g];if(b===0){if(h===s&&(o||a.slice(g,g+n)===t)){u.push(a.slice(m,g)),m=g+n;continue}if(h==="/"){v=g;continue}}h==="["?b++:h==="]"&&b--}let y=u.length===0?a:a.substring(m),k=y.startsWith(be),C=k?y.substring(1):y,f=v&&v>m?v-m:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:f}};return r?a=>r({className:a,parseClassName:i}):i},_e=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},Fe=e=>({cache:We(e.cacheSize),parseClassName:Ue(e),...He(e)}),Ke=/\s+/,$e=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],i=e.trim().split(Ke),a="";for(let u=i.length-1;u>=0;u-=1){let b=i[u],{modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:k}=r(b),C=!!k,f=o(C?y.substring(0,k):y);if(!f){if(!C){a=b+(a.length>0?" "+a:a);continue}if(f=o(y),!f){a=b+(a.length>0?" "+a:a);continue}C=!1}let g=_e(m).join(":"),h=v?g+be:g,w=h+f;if(n.includes(w))continue;n.push(w);let G=s(f,C);for(let D=0;D<G.length;++D){let j=G[D];n.push(h+j)}a=b+(a.length>0?" "+a:a)}return a};function Oe(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=fe(t))&&(o&&(o+=" "),o+=r);return o}var fe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=fe(e[o]))&&(r&&(r+=" "),r+=t);return r};function Je(e,...t){let r,o,s,n=i;function i(u){let b=t.reduce((m,v)=>v(m),e());return r=Fe(b),o=r.cache.get,s=r.cache.set,n=a,a(u)}function a(u){let b=o(u);if(b)return b;let m=$e(u,r);return s(u,m),m}return function(){return n(Oe.apply(null,arguments))}}var d=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ze=/^\d+\/\d+$/,Qe=new Set(["px","full","screen"]),qe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ye=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,et=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>P(e)||Qe.has(e)||Ze.test(e),N=e=>L(e,"length",ct),P=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>L(e,"number",P),H=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&P(e.slice(0,-1)),l=e=>he.test(e),R=e=>qe.test(e),ot=new Set(["length","size","percentage"]),nt=e=>L(e,ot,ye),st=e=>L(e,"position",ye),at=new Set(["image","url"]),it=e=>L(e,at,pt),lt=e=>L(e,"",dt),I=()=>!0,L=(e,t,r)=>{let o=he.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ct=e=>Xe.test(e)&&!Ye.test(e),ye=()=>!1,dt=e=>et.test(e),pt=e=>tt.test(e);var ut=()=>{let e=d("colors"),t=d("spacing"),r=d("blur"),o=d("brightness"),s=d("borderColor"),n=d("borderRadius"),i=d("borderSpacing"),a=d("borderWidth"),u=d("contrast"),b=d("grayscale"),m=d("hueRotate"),v=d("invert"),y=d("gap"),k=d("gradientColorStops"),C=d("gradientColorStopPositions"),f=d("inset"),g=d("margin"),h=d("opacity"),w=d("padding"),G=d("saturate"),D=d("scale"),j=d("sepia"),ne=d("skew"),se=d("space"),ae=d("translate"),Z=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",l,t],p=()=>[l,t],ie=()=>["",M,N],V=()=>["auto",P,l],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],E=()=>["","0",l],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[P,l];return{cacheSize:500,separator:":",theme:{colors:[I],spacing:[M,N],blur:["none","",R,l],brightness:S(),borderColor:[e],borderRadius:["none","","full",R,l],borderSpacing:p(),borderWidth:ie(),contrast:S(),grayscale:E(),hueRotate:S(),invert:E(),gap:p(),gradientColorStops:[e],gradientColorStopPositions:[rt,N],inset:q(),margin:q(),opacity:S(),padding:p(),saturate:S(),scale:S(),sepia:E(),skew:S(),space:p(),translate:p()},classGroups:{aspect:[{aspect:["auto","square","video",l]}],container:["container"],columns:[{columns:[R]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"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:[...le(),l]}],overflow:[{overflow:Q()}],"overflow-z":[{"overflow-z":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:Z()}],"overscroll-z":[{"overscroll-z":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-z":[{"inset-z":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",H,l]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",l]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",H,l]}],"grid-cols":[{"grid-cols":[I]}],"col-start-end":[{col:["auto",{span:["full",H,l]},l]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[I]}],"row-start-end":[{row:["auto",{span:[H,l]},l]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",l]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",l]}],gap:[{gap:[y]}],"gap-z":[{"gap-z":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-z":[{"space-z":[se]}],"space-z-reverse":["space-z-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",l,t]}],"min-w":[{"min-w":[l,t,"min","max","fit"]}],"max-w":[{"max-w":[l,t,"none","full","min","max","fit","prose",{screen:[R]},R]}],h:[{h:[l,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[l,t,"auto","min","max","fit"]}],"font-size":[{text:["base",R,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y]}],"font-family":[{font:[I]}],"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",l]}],"line-clamp":[{"line-clamp":["none",P,Y]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,l]}],"list-image":[{"list-image":["none",l]}],"list-style-type":[{list:["none","disc","decimal",l]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,N]}],"underline-offset":[{"underline-offset":["auto",M,l]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l]}],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",l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),st]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","z","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},it]}],"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:[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-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:[a]}],"border-w-z":[{"border-z":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...B(),"hidden"]}],"divide-z":[{"divide-z":[a]}],"divide-z-reverse":["divide-z-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-z":[{"border-z":[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:["",...B()]}],"outline-offset":[{"outline-offset":[M,l]}],"outline-w":[{outline:[M,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[M,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",R,lt]}],"shadow-color":[{shadow:[I]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",R,l]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[v]}],saturate:[{saturate:[G]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-z":[{"border-spacing-z":[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",l]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",l]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",l]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-z":[{"scale-z":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[H,l]}],"translate-z":[{"translate-z":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-z":[{"skew-z":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",l]}],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",l]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","z",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","z","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-z":[{"touch-pan":["z","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",l]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,N,Y]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-z","overflow-y"],overscroll:["overscroll-z","overscroll-y"],inset:["inset-z","inset-y","start","end","top","right","bottom","left"],"inset-z":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-z","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","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-z","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-z":["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-z":["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-z","touch-y","touch-pz"],"touch-z":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var xe=Je(ut);function A(...e){return xe((0,ve.clsx)(e))}var z=require("react/jsx-runtime"),U=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("rounded-xl border bg-card text-card-foreground shadow",e),...t}));U.displayName="Card";var _=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("flex flex-col space-y-1.5 p-6",e),...t}));_.displayName="CardHeader";var F=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("font-semibold leading-none tracking-tight",e),...t}));F.displayName="CardTitle";var mt=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("text-sm text-muted-foreground",e),...t}));mt.displayName="CardDescription";var K=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("p-6 pt-0",e),...t}));K.displayName="CardContent";var gt=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("flex items-center p-6 pt-0",e),...t}));gt.displayName="CardFooter";var we=require("class-variance-authority");var bt=(0,we.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 Ce({className:e,variant:t,...r}){return(0,z.jsx)("div",{className:A(bt({variant:t}),e),...r})}var $=require("lucide-react");function ke({deal:e,customer:t,categories:r,onClick:o,compact:s=!1}){let n=r.find(i=>i.type==="proposition"&&(e.categories??[]).includes(i.id));return s?(0,z.jsxs)(U,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,z.jsxs)(_,{className:"pb-1 pt-2",children:[(0,z.jsx)(F,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,z.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,z.jsx)(K,{className:"text-xs text-gray-500 pb-2",children:(0,z.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,z.jsxs)(U,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,z.jsxs)(_,{className:"pb-2",children:[(0,z.jsx)("div",{className:"flex justify-between items-center",children:(0,z.jsx)(F,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,z.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,z.jsxs)(K,{children:[(0,z.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,z.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,z.jsx)($.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,z.jsx)("span",{children:e.assignee.name})]}),(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,z.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,z.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,z.jsx)($.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,z.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,z.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,z.jsx)(Ce,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var O=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Se({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:n,calculateColumnValue:i,calculateWeightedValue:a,compact:u=!1}){return(0,z.jsxs)("div",{className:"flex flex-col w-80",children:[(0,z.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,z.jsx)(O.Droppable,{droppableId:e,isDropDisabled:!1,children:b=>(0,z.jsxs)("div",{ref:b.innerRef,...b.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((m,v)=>(0,z.jsx)(O.Draggable,{draggableId:m.id.toString(),index:m.id,children:y=>(0,z.jsx)("div",{ref:y.innerRef,...y.draggableProps,...y.dragHandleProps,children:(0,z.jsx)(ke,{deal:m,customer:m.customer,categories:s,onClick:()=>n(m),compact:u})})},m.id.toString())),b.placeholder]})}),(0,z.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,z.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,z.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,z.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,z.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var oe=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1,createdAt:"2023-01-01",updatedAt:"2023-01-01"}],J=[{id:1,name:"Software",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Hardware",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Referral",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Outbound",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Tech",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:6,name:"Finance",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],re=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],Me=[{id:1,customer:oe[0],value:5e4,assignee:re[2],status:"Qualified",categories:J.slice(0,3),dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",createdAt:"2023-01-01",comments:[{id:"1",text:"Initial contact made",author:re[5],timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},value:75e3,assignee:{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},status:"Proposal Made",categories:J.slice(0,3),dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",createdAt:"2023-01-01",comments:[{id:"2",text:"Proposal sent",author:re[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var ft={title:"CRM/KanbanColumn",component:Se,parameters:{layout:"centered"}},ht=ft,Ne={args:{status:"Qualified",deals:Me.filter(e=>e.status==="Qualified"),customers:oe,categories:J,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((t,r)=>t+r.value,0),calculateWeightedValue:(e,t)=>{let r={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return e.reduce((o,s)=>o+s.value*r[t],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},yt={args:{...Ne.args,status:"Won",deals:[]}};0&&(module.exports={Default,EmptyColumn});
1
+ "use strict";var Re=Object.create;var W=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ze=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Le=(e,t)=>{for(var r in t)W(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Te(t))!Pe.call(e,s)&&s!==r&&W(e,s,{get:()=>t[s],enumerable:!(o=De(t,s))||o.enumerable});return e};var Ge=(e,t,r)=>(r=e!=null?Re(ze(e)):{},pe(t||!e||!e.__esModule?W(r,"default",{value:e,enumerable:!0}):r,e)),Ee=e=>pe(W({},"__esModule",{value:!0}),e);var xt={};Le(xt,{Default:()=>Ne,EmptyColumn:()=>yt,default:()=>ht});module.exports=Ee(xt);var T=Ge(require("react"));var ve=require("clsx");var te="-",He=e=>{let t=je(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let a=i.split(te);return a[0]===""&&a.length!==1&&a.shift(),ge(a,t)||Ie(i)},getConflictingClassGroupIds:(i,a)=>{let u=r[i]||[];return a&&o[i]?[...u,...o[i]]:u}}},ge=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?ge(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(te);return t.validators.find(({validator:i})=>i(n))?.classGroupId},ue=/^\[(.+)\]$/,Ie=e=>{if(ue.test(e)){let t=ue.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},je=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Be(Object.entries(e.classGroups),r).forEach(([n,i])=>{ee(i,o,n,t)}),o},ee=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:me(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(Ve(s)){ee(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,i])=>{ee(i,me(t,n),r,o)})})},me=(e,t)=>{let r=e;return t.split(te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ve=e=>e.isThemeGetter,Be=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[r,s]}):e,We=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(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 s(n,i),i},set(n,i){r.has(n)?r.set(n,i):s(n,i)}}},fe="!",Ue=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,i=a=>{let u=[],f=0,m=0,v;for(let g=0;g<a.length;g++){let h=a[g];if(f===0){if(h===s&&(o||a.slice(g,g+n)===t)){u.push(a.slice(m,g)),m=g+n;continue}if(h==="/"){v=g;continue}}h==="["?f++:h==="]"&&f--}let y=u.length===0?a:a.substring(m),k=y.startsWith(fe),C=k?y.substring(1):y,b=v&&v>m?v-m:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:b}};return r?a=>r({className:a,parseClassName:i}):i},_e=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},Fe=e=>({cache:We(e.cacheSize),parseClassName:Ue(e),...He(e)}),Ke=/\s+/,$e=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],i=e.trim().split(Ke),a="";for(let u=i.length-1;u>=0;u-=1){let f=i[u],{modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:k}=r(f),C=!!k,b=o(C?y.substring(0,k):y);if(!b){if(!C){a=f+(a.length>0?" "+a:a);continue}if(b=o(y),!b){a=f+(a.length>0?" "+a:a);continue}C=!1}let g=_e(m).join(":"),h=v?g+fe:g,w=h+b;if(n.includes(w))continue;n.push(w);let G=s(b,C);for(let D=0;D<G.length;++D){let j=G[D];n.push(h+j)}a=f+(a.length>0?" "+a:a)}return a};function Oe(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=be(t))&&(o&&(o+=" "),o+=r);return o}var be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=be(e[o]))&&(r&&(r+=" "),r+=t);return r};function Je(e,...t){let r,o,s,n=i;function i(u){let f=t.reduce((m,v)=>v(m),e());return r=Fe(f),o=r.cache.get,s=r.cache.set,n=a,a(u)}function a(u){let f=o(u);if(f)return f;let m=$e(u,r);return s(u,m),m}return function(){return n(Oe.apply(null,arguments))}}var d=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ze=/^\d+\/\d+$/,Qe=new Set(["px","full","screen"]),qe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ye=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,et=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>P(e)||Qe.has(e)||Ze.test(e),N=e=>L(e,"length",ct),P=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>L(e,"number",P),H=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&P(e.slice(0,-1)),l=e=>he.test(e),R=e=>qe.test(e),ot=new Set(["length","size","percentage"]),nt=e=>L(e,ot,ye),st=e=>L(e,"position",ye),at=new Set(["image","url"]),it=e=>L(e,at,pt),lt=e=>L(e,"",dt),I=()=>!0,L=(e,t,r)=>{let o=he.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ct=e=>Xe.test(e)&&!Ye.test(e),ye=()=>!1,dt=e=>et.test(e),pt=e=>tt.test(e);var ut=()=>{let e=d("colors"),t=d("spacing"),r=d("blur"),o=d("brightness"),s=d("borderColor"),n=d("borderRadius"),i=d("borderSpacing"),a=d("borderWidth"),u=d("contrast"),f=d("grayscale"),m=d("hueRotate"),v=d("invert"),y=d("gap"),k=d("gradientColorStops"),C=d("gradientColorStopPositions"),b=d("inset"),g=d("margin"),h=d("opacity"),w=d("padding"),G=d("saturate"),D=d("scale"),j=d("sepia"),ne=d("skew"),se=d("space"),ae=d("translate"),Z=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",l,t],p=()=>[l,t],ie=()=>["",M,N],V=()=>["auto",P,l],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],E=()=>["","0",l],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[P,l];return{cacheSize:500,separator:":",theme:{colors:[I],spacing:[M,N],blur:["none","",R,l],brightness:S(),borderColor:[e],borderRadius:["none","","full",R,l],borderSpacing:p(),borderWidth:ie(),contrast:S(),grayscale:E(),hueRotate:S(),invert:E(),gap:p(),gradientColorStops:[e],gradientColorStopPositions:[rt,N],inset:q(),margin:q(),opacity:S(),padding:p(),saturate:S(),scale:S(),sepia:E(),skew:S(),space:p(),translate:p()},classGroups:{aspect:[{aspect:["auto","square","video",l]}],container:["container"],columns:[{columns:[R]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"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:[...le(),l]}],overflow:[{overflow:Q()}],"overflow-z":[{"overflow-z":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:Z()}],"overscroll-z":[{"overscroll-z":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-z":[{"inset-z":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",H,l]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",l]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",H,l]}],"grid-cols":[{"grid-cols":[I]}],"col-start-end":[{col:["auto",{span:["full",H,l]},l]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[I]}],"row-start-end":[{row:["auto",{span:[H,l]},l]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",l]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",l]}],gap:[{gap:[y]}],"gap-z":[{"gap-z":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-z":[{"space-z":[se]}],"space-z-reverse":["space-z-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",l,t]}],"min-w":[{"min-w":[l,t,"min","max","fit"]}],"max-w":[{"max-w":[l,t,"none","full","min","max","fit","prose",{screen:[R]},R]}],h:[{h:[l,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[l,t,"auto","min","max","fit"]}],"font-size":[{text:["base",R,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y]}],"font-family":[{font:[I]}],"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",l]}],"line-clamp":[{"line-clamp":["none",P,Y]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,l]}],"list-image":[{"list-image":["none",l]}],"list-style-type":[{list:["none","disc","decimal",l]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,N]}],"underline-offset":[{"underline-offset":["auto",M,l]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l]}],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",l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),st]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","z","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},it]}],"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:[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-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:[a]}],"border-w-z":[{"border-z":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...B(),"hidden"]}],"divide-z":[{"divide-z":[a]}],"divide-z-reverse":["divide-z-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-z":[{"border-z":[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:["",...B()]}],"outline-offset":[{"outline-offset":[M,l]}],"outline-w":[{outline:[M,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[M,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",R,lt]}],"shadow-color":[{shadow:[I]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",R,l]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[v]}],saturate:[{saturate:[G]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-z":[{"border-spacing-z":[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",l]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",l]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",l]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-z":[{"scale-z":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[H,l]}],"translate-z":[{"translate-z":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-z":[{"skew-z":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",l]}],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",l]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","z",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","z","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-z":[{"touch-pan":["z","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",l]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,N,Y]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-z","overflow-y"],overscroll:["overscroll-z","overscroll-y"],inset:["inset-z","inset-y","start","end","top","right","bottom","left"],"inset-z":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-z","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","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-z","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-z":["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-z":["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-z","touch-y","touch-pz"],"touch-z":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var xe=Je(ut);function A(...e){return xe((0,ve.clsx)(e))}var z=require("react/jsx-runtime"),U=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("rounded-xl border bg-card text-card-foreground shadow",e),...t}));U.displayName="Card";var _=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("flex flex-col space-y-1.5 p-6",e),...t}));_.displayName="CardHeader";var F=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("font-semibold leading-none tracking-tight",e),...t}));F.displayName="CardTitle";var mt=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("text-sm text-muted-foreground",e),...t}));mt.displayName="CardDescription";var K=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("p-6 pt-0",e),...t}));K.displayName="CardContent";var gt=T.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:A("flex items-center p-6 pt-0",e),...t}));gt.displayName="CardFooter";var we=require("class-variance-authority");var ft=(0,we.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 Ce({className:e,variant:t,...r}){return(0,z.jsx)("div",{className:A(ft({variant:t}),e),...r})}var $=require("lucide-react");function ke({deal:e,customer:t,categories:r,onClick:o,compact:s=!1}){let n=r.find(i=>i.type==="proposition"&&(e.categories??[]).includes(i.id));return s?(0,z.jsxs)(U,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,z.jsxs)(_,{className:"pb-1 pt-2",children:[(0,z.jsx)(F,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,z.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,z.jsx)(K,{className:"text-xs text-gray-200 pb-2",children:(0,z.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,z.jsxs)(U,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,z.jsxs)(_,{className:"pb-2",children:[(0,z.jsx)("div",{className:"flex justify-between items-center",children:(0,z.jsx)(F,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,z.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,z.jsxs)(K,{children:[(0,z.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,z.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,z.jsx)($.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,z.jsx)("span",{children:e.assignee.name})]}),(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,z.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,z.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,z.jsx)($.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,z.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,z.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,z.jsx)(Ce,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var O=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Se({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:n,calculateColumnValue:i,calculateWeightedValue:a,compact:u=!1}){return(0,z.jsxs)("div",{className:"flex flex-col w-80",children:[(0,z.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,z.jsx)(O.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,z.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((m,v)=>(0,z.jsx)(O.Draggable,{draggableId:m.id.toString(),index:m.id,children:y=>(0,z.jsx)("div",{ref:y.innerRef,...y.draggableProps,...y.dragHandleProps,children:(0,z.jsx)(ke,{deal:m,customer:m.customer,categories:s,onClick:()=>n(m),compact:u})})},m.id.toString())),f.placeholder]})}),(0,z.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,z.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,z.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,z.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,z.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var oe=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1,createdAt:"2023-01-01",updatedAt:"2023-01-01"}],J=[{id:1,name:"Software",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Hardware",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Referral",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Outbound",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Tech",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:6,name:"Finance",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],re=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],Me=[{id:1,customer:oe[0],value:5e4,assignee:re[2],status:"Qualified",categories:J.slice(0,3),dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",createdAt:"2023-01-01",comments:[{id:"1",text:"Initial contact made",author:re[5],timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},value:75e3,assignee:{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},status:"Proposal Made",categories:J.slice(0,3),dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",createdAt:"2023-01-01",comments:[{id:"2",text:"Proposal sent",author:re[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var bt={title:"CRM/KanbanColumn",component:Se,parameters:{layout:"centered"}},ht=bt,Ne={args:{status:"Qualified",deals:Me.filter(e=>e.status==="Qualified"),customers:oe,categories:J,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((t,r)=>t+r.value,0),calculateWeightedValue:(e,t)=>{let r={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return e.reduce((o,s)=>o+s.value*r[t],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},yt={args:{...Ne.args,status:"Won",deals:[]}};0&&(module.exports={Default,EmptyColumn});
@@ -1 +1 @@
1
- import{a as l,b as n,d as r}from"../../chunk-TLBLUYXL.mjs";import{a}from"../../chunk-W3ONOYB6.mjs";import"../../chunk-FFESN4FM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";var m={title:"CRM/KanbanColumn",component:a,parameters:{layout:"centered"}},p=m,c={args:{status:"Qualified",deals:r.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,"SoW Submitted":.7,Won:1,Lost:0};return e.reduce((s,u)=>s+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:{...c.args,status:"Won",deals:[]}};export{c as Default,y as EmptyColumn,p as default};
1
+ import{a as l,b as n,d as r}from"../../chunk-TLBLUYXL.mjs";import{a}from"../../chunk-JPWY5ADC.mjs";import"../../chunk-WXZ3IRTS.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";var m={title:"CRM/KanbanColumn",component:a,parameters:{layout:"centered"}},p=m,c={args:{status:"Qualified",deals:r.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,"SoW Submitted":.7,Won:1,Lost:0};return e.reduce((s,u)=>s+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:{...c.args,status:"Won",deals:[]}};export{c as Default,y as EmptyColumn,p as default};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";var Mt=Object.create;var Ne=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty;var Vt=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Et(t))!zt.call(e,i)&&i!==r&&Ne(e,i,{get:()=>t[i],enumerable:!(a=It(t,i))||a.enumerable});return e};var E=(e,t,r)=>(r=e!=null?Mt(Bt(e)):{},Ze(t||!e||!e.__esModule?Ne(r,"default",{value:e,enumerable:!0}):r,e)),Ht=e=>Ze(Ne({},"__esModule",{value:!0}),e);var Lr={};Vt(Lr,{CRMCogeBoard:()=>Tr,CRMKanbanBoard:()=>Rr,DealCard:()=>je,DealDetails:()=>ye,KanbanColumn:()=>Ce,NewCustomerForm:()=>Ke,NewDealForm:()=>kr});module.exports=Ht(Lr);var Ee=require("react");var ge=E(require("react")),M=E(require("@radix-ui/react-dialog")),lt=require("lucide-react");var nt=require("clsx");var Ge="-",Wt=e=>{let t=Ut(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:d=>{let o=d.split(Ge);return o[0]===""&&o.length!==1&&o.shift(),tt(o,t)||Ft(d)},getConflictingClassGroupIds:(d,o)=>{let h=r[d]||[];return o&&a[d]?[...h,...a[d]]:h}}},tt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],a=t.nextPart.get(r),i=a?tt(e.slice(1),a):void 0;if(i)return i;if(t.validators.length===0)return;let l=e.join(Ge);return t.validators.find(({validator:d})=>d(l))?.classGroupId},Ye=/^\[(.+)\]$/,Ft=e=>{if(Ye.test(e)){let t=Ye.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ut=e=>{let{theme:t,prefix:r}=e,a={nextPart:new Map,validators:[]};return Ot(Object.entries(e.classGroups),r).forEach(([l,d])=>{Ue(d,a,l,t)}),a},Ue=(e,t,r,a)=>{e.forEach(i=>{if(typeof i=="string"){let l=i===""?t:et(t,i);l.classGroupId=r;return}if(typeof i=="function"){if(Gt(i)){Ue(i(a),t,r,a);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([l,d])=>{Ue(d,et(t,l),r,a)})})},et=(e,t)=>{let r=e;return t.split(Ge).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},Gt=e=>e.isThemeGetter,Ot=(e,t)=>t?e.map(([r,a])=>{let i=a.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([d,o])=>[t+d,o])):l);return[r,i]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map,i=(l,d)=>{r.set(l,d),t++,t>e&&(t=0,a=r,r=new Map)};return{get(l){let d=r.get(l);if(d!==void 0)return d;if((d=a.get(l))!==void 0)return i(l,d),d},set(l,d){r.has(l)?r.set(l,d):i(l,d)}}},rt="!",jt=e=>{let{separator:t,experimentalParseClassName:r}=e,a=t.length===1,i=t[0],l=t.length,d=o=>{let h=[],f=0,p=0,u;for(let x=0;x<o.length;x++){let A=o[x];if(f===0){if(A===i&&(a||o.slice(x,x+l)===t)){h.push(o.slice(p,x)),p=x+l;continue}if(A==="/"){u=x;continue}}A==="["?f++:A==="]"&&f--}let g=h.length===0?o:o.substring(p),w=g.startsWith(rt),S=w?g.substring(1):g,P=u&&u>p?u-p:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:P}};return r?o=>r({className:o,parseClassName:d}):d},Kt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(a=>{a[0]==="["?(t.push(...r.sort(),a),r=[]):r.push(a)}),t.push(...r.sort()),t},$t=e=>({cache:_t(e.cacheSize),parseClassName:jt(e),...Wt(e)}),qt=/\z+/,Qt=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i}=t,l=[],d=e.trim().split(qt),o="";for(let h=d.length-1;h>=0;h-=1){let f=d[h],{modifiers:p,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:w}=r(f),S=!!w,P=a(S?g.substring(0,w):g);if(!P){if(!S){o=f+(o.length>0?" "+o:o);continue}if(P=a(g),!P){o=f+(o.length>0?" "+o:o);continue}S=!1}let x=Kt(p).join(":"),A=u?x+rt:x,I=A+P;if(l.includes(I))continue;l.push(I);let m=i(P,S);for(let C=0;C<m.length;++C){let n=m[C];l.push(A+n)}o=f+(o.length>0?" "+o:o)}return o};function Jt(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ot(t))&&(a&&(a+=" "),a+=r);return a}var ot=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=ot(e[a]))&&(r&&(r+=" "),r+=t);return r};function Xt(e,...t){let r,a,i,l=d;function d(h){let f=t.reduce((p,u)=>u(p),e());return r=$t(f),a=r.cache.get,i=r.cache.set,l=o,o(h)}function o(h){let f=a(h);if(f)return f;let p=Qt(h,r);return i(h,p),p}return function(){return l(Jt.apply(null,arguments))}}var R=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},at=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zt=/^\d+\/\d+$/,Yt=new Set(["px","full","screen"]),er=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|z|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,or=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ar=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,G=e=>le(e)||Yt.has(e)||Zt.test(e),O=e=>ce(e,"length",ur),le=e=>!!e&&!Number.isNaN(Number(e)),Fe=e=>ce(e,"number",le),pe=e=>!!e&&Number.isInteger(Number(e)),sr=e=>e.endsWith("%")&&le(e.slice(0,-1)),b=e=>at.test(e),_=e=>er.test(e),ir=new Set(["length","size","percentage"]),nr=e=>ce(e,ir,st),lr=e=>ce(e,"position",st),cr=new Set(["image","url"]),dr=e=>ce(e,cr,fr),mr=e=>ce(e,"",pr),fe=()=>!0,ce=(e,t,r)=>{let a=at.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):r(a[2]):!1},ur=e=>tr.test(e)&&!rr.test(e),st=()=>!1,pr=e=>or.test(e),fr=e=>ar.test(e);var gr=()=>{let e=R("colors"),t=R("spacing"),r=R("blur"),a=R("brightness"),i=R("borderColor"),l=R("borderRadius"),d=R("borderSpacing"),o=R("borderWidth"),h=R("contrast"),f=R("grayscale"),p=R("hueRotate"),u=R("invert"),g=R("gap"),w=R("gradientColorStops"),S=R("gradientColorStopPositions"),P=R("inset"),x=R("margin"),A=R("opacity"),I=R("padding"),m=R("saturate"),C=R("scale"),n=R("sepia"),D=R("skew"),ne=R("space"),$e=R("translate"),ze=()=>["auto","contain","none"],Ve=()=>["auto","hidden","clip","visible","scroll"],He=()=>["auto",b,t],k=()=>[b,t],qe=()=>["",G,O],we=()=>["auto",le,b],Qe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],Je=()=>["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"],ue=()=>["","0",b],Xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[le,b];return{cacheSize:500,separator:":",theme:{colors:[fe],spacing:[G,O],blur:["none","",_,b],brightness:U(),borderColor:[e],borderRadius:["none","","full",_,b],borderSpacing:k(),borderWidth:qe(),contrast:U(),grayscale:ue(),hueRotate:U(),invert:ue(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[sr,O],inset:He(),margin:He(),opacity:U(),padding:k(),saturate:U(),scale:U(),sepia:ue(),skew:U(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":Xe()}],"break-before":[{"break-before":Xe()}],"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(),b]}],overflow:[{overflow:Ve()}],"overflow-x":[{"overflow-x":Ve()}],"overflow-y":[{"overflow-y":Ve()}],overscroll:[{overscroll:ze()}],"overscroll-x":[{"overscroll-x":ze()}],"overscroll-y":[{"overscroll-y":ze()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[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",pe,b]}],basis:[{basis:He()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",pe,b]}],"grid-cols":[{"grid-cols":[fe]}],"col-start-end":[{col:["auto",{span:["full",pe,b]},b]}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":[fe]}],"row-start-end":[{row:["auto",{span:[pe,b]},b]}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"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:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],z:[{z:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],Ee:[{Ee:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,t]}],"min-w":[{"min-w":[b,t,"min","max","fit"]}],"max-w":[{"max-w":[b,t,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[b,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fe]}],"font-family":[{font:[fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",b]}],"line-clamp":[{"line-clamp":["none",le,Fe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",G,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",G,O]}],"underline-offset":[{"underline-offset":["auto",G,b]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Qe(),lr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-z":[{"rounded-z":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-z":[{"rounded-z":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-z":[{"border-z":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Se()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-z":[{"border-z":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[G,b]}],"outline-w":[{outline:[G,O]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:qe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[G,O]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,mr]}],"shadow-color":[{shadow:[fe]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",_,b]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[u]}],saturate:[{saturate:[m]}],sepia:[{sepia:[n]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[pe,b]}],"translate-x":[{"translate-x":[$e]}],"translate-y":[{"translate-y":[$e]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","z-resize","w-resize","ne-resize","nw-resize","z-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-Ee":[{"scroll-Ee":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-z":[{"scroll-z":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[G,O,Fe]}],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","z","pr","pb","pl"],px:["pr","pl"],py:["z","pb"],m:["mx","my","ms","Ee","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-z","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-z","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-z":["rounded-ss","rounded-es"],"rounded-e":["rounded-z","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-z","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-z","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-Ee","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-z","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-z","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var it=Xt(gr);function v(...e){return it((0,nt.clsx)(e))}var z=require("react/jsx-runtime"),Pe=M.Root;var br=M.Portal;var ct=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Overlay,{ref:r,className:v("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=M.Overlay.displayName;var be=ge.forwardRef(({className:e,children:t,...r},a)=>(0,z.jsxs)(br,{children:[(0,z.jsx)(ct,{}),(0,z.jsxs)(M.Content,{ref:a,className:v("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),...r,children:[t,(0,z.jsxs)(M.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,z.jsx)(lt.X,{className:"h-4 w-4"}),(0,z.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));be.displayName=M.Content.displayName;var ve=({className:e,...t})=>(0,z.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ve.displayName="DialogHeader";var vr=({className:e,...t})=>(0,z.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vr.displayName="DialogFooter";var he=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Title,{ref:r,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));he.displayName=M.Title.displayName;var hr=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Description,{ref:r,className:v("text-sm text-muted-foreground",e),...t}));hr.displayName=M.Description.displayName;var dt=require("@radix-ui/react-slot"),mt=require("class-variance-authority"),ut=E(require("react")),xr=(0,mt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-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-accent"}}}),W=ut.forwardRef(({asChild:e=!1,className:t,size:r,variant:a,...i},l)=>(0,z.jsx)(e?dt.Slot:"button",{className:v(xr({className:t,size:r,variant:a})),ref:l,...i}));W.displayName="Button";var ft=E(require("react"));var F=ft.forwardRef(({className:e,type:t,...r},a)=>(0,z.jsx)("input",{type:t,className:v("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:a,...r}));F.displayName="Input";var bt=E(require("react")),Oe=E(require("@radix-ui/react-label"));var yr=(0,mt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L=bt.forwardRef(({className:e,...t},r)=>(0,z.jsx)(Oe.Root,{ref:r,className:v(yr(),e),...t}));L.displayName=Oe.Root.displayName;var xt=E(require("react")),X=xt.forwardRef(({className:e,...t},r)=>(0,z.jsx)("textarea",{className:v("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}));X.displayName="Textarea";var y=E(require("@radix-ui/react-select")),j=E(require("react")),Y=y.Root;var ee=y.Value,K=j.forwardRef(({children:e,className:t,...r},a)=>(0,z.jsxs)(y.Trigger,{className:v("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:a,...r,children:[e,(0,z.jsx)(y.Icon,{asChild:!0,children:(0,z.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));K.displayName=y.Trigger.displayName;var Ct=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,z.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));Ct.displayName=y.ScrollUpButton.displayName;var wt=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,z.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));wt.displayName=y.ScrollDownButton.displayName;var $=j.forwardRef(({children:e,className:t,position:r="popper",...a},i)=>(0,z.jsx)(y.Portal,{children:(0,z.jsxs)(y.Content,{className:v("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-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:i,...a,children:[(0,z.jsx)(Ct,{}),(0,z.jsx)(y.Viewport,{className:v("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,z.jsx)(wt,{})]})}));$.displayName=y.Content.displayName;var Cr=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Cr.displayName=y.Label.displayName;var q=j.forwardRef(({children:e,className:t,...r},a)=>(0,z.jsxs)(y.Item,{className:v("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:a,...r,children:[(0,z.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,z.jsx)(y.ItemIndicator,{children:(0,z.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,z.jsx)(y.ItemText,{children:e})]}));q.displayName=y.Item.displayName;var wr=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));wr.displayName=y.Separator.displayName;var xe=E(require("@radix-ui/react-checkbox")),Nt=E(require("react")),te=Nt.forwardRef(({className:e,...t},r)=>(0,z.jsx)(xe.Root,{className:v("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,z.jsx)(xe.Indicator,{className:v("flex items-center justify-center text-current"),children:(0,z.jsx)(lt.Check,{className:"h-4 w-4"})})}));te.displayName=xe.Root.displayName;var Sr=(0,mt.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 Re({className:e,variant:t,...r}){return(0,z.jsx)("div",{className:v(Sr({variant:t}),e),...r})}var _e=E(require("react")),H=E(require("@radix-ui/react-scroll-area"));var de=_e.forwardRef(({className:e,children:t,...r},a)=>(0,z.jsxs)(H.Root,{ref:a,className:v("relative overflow-hidden",e),...r,children:[(0,z.jsx)(H.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,z.jsx)(Rt,{}),(0,z.jsx)(H.Corner,{})]}));de.displayName=H.Root.displayName;var Rt=_e.forwardRef(({className:e,orientation:t="vertical",...r},a)=>(0,z.jsx)(H.ScrollAreaScrollbar,{ref:a,orientation:t,className:v("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),...r,children:(0,z.jsx)(H.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=H.ScrollAreaScrollbar.displayName;function ye({deal:e,users:t,customer:r,categories:a,onClose:i,onSave:l,onAddComment:d}){let[o,h]=(0,Ee.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[f,p]=(0,Ee.useState)(""),[u,g]=(0,Ee.useState)(!1),[w,S]=(0,Ee.useState)(null);(0,Ee.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(o))},[e,o]);let P=async()=>{try{let n=await l(o);n.success?(g(!1),S(null)):console.error("Failed to save deal:",n.errors)}catch(n){console.error("Failed to save deal:",n)}},x=(n,D)=>{h(ne=>({...ne,[n]:D}))},A=n=>{let D=(o.categories||[]).includes(n)?(o.categories||[]).filter(ne=>ne!==n):[...o.categories||[],n];x("categories",D)},I=async()=>{if(f.trim()){let n={text:f,timestamp:new Date().toISOString()};try{let D=await d(n);if(!D.success){console.error("Failed to add comment:",D.errors);return}}catch(D){console.error("Failed to add comment:",D)}h(D=>({...D,comments:[...D.comments||[],n]})),p("")}},m=n=>{switch(n){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},C=n=>t?.find(D=>D.id===Number(n));return(0,z.jsx)(Pe,{open:!0,children:(0,z.jsxs)(be,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,z.jsxs)(ve,{className:"flex flex-row items-center justify-between",children:[(0,z.jsx)(he,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,z.jsxs)("div",{className:"flex space-x-2",children:[(0,z.jsx)(W,{variant:"outline",onClick:i,children:"Close"}),(0,z.jsxs)(W,{onClick:P,disabled:!u,children:[(0,z.jsx)(lt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,z.jsxs)(de,{className:"flex-grow pr-4",children:[(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,z.jsx)("div",{className:"grid gap-2 m-1",children:w==="value"?(0,z.jsx)(F,{type:"number",value:o.value,onChange:n=>x("value",Number(n.target.value)),onBlur:()=>S(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,z.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("value"),children:["\xA3",o.value?.toLocaleString()]})}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Assignee"}),w==="assignee"?(0,z.jsxs)(Y,{value:o?.assignee?.id?.toString()||"",onValueChange:n=>x("assignee",C(n)),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select assignee"})}),(0,z.jsx)($,{children:t&&t.map(n=>(0,z.jsx)(q,{value:n?.id?.toString()||"",children:n.name},n.id))})]}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("assignee"),children:[(0,z.jsx)(lt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:o?.assignee?.name})]})]}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Closure Date"}),w==="closureDate"?(0,z.jsx)(F,{type:"date",value:o.closureDate?.split("z")[0]??"",onChange:n=>x("closureDate",n.target.value),onBlur:()=>S(null),className:"mr-2",autoFocus:!0}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("closureDate"),children:[(0,z.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:o.closureDate?new Date(o.closureDate).toLocaleDateString("en-GB"):"z/A"})]})]})]}),(0,z.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Description"}),w==="description"?(0,z.jsx)(X,{value:o.description||"",onChange:n=>x("description",n.target.value),onBlur:()=>S(null),className:"min-h-[100px]",autoFocus:!0}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>S("description"),children:o.description})]})}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 z-2 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Status"}),w==="status"?(0,z.jsxs)(Y,{value:o.status,onValueChange:n=>{x("status",n),S(null)},children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select status"})}),(0,z.jsx)($,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(n=>(0,z.jsx)(q,{value:n,children:n},n))})]}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("status"),children:o.status})]}),(0,z.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Categories"}),w==="categories"?(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:a.map(n=>(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:n.id?.toString()||"",checked:(o.categories||[]).some(D=>D.id===n.id),onCheckedChange:()=>n.id!==void 0&&A(n)}),(0,z.jsx)("label",{htmlFor:(n.id??"").toString(),className:`text-sm font-medium ${m(n.type||"sector")} px-2 py-1 rounded`,children:n.name})]},n.id))}):(0,z.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("categories"),children:o.categories&&o.categories.map(n=>{let D=n;return D?(0,z.jsx)(Re,{variant:"outline",className:m(D.type||"sector"),children:D.name},D.id):null})})]}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"COGE Status"}),w==="gecoStatus"?(0,z.jsxs)(Y,{value:o.gecoStatus??void 0,onValueChange:n=>{x("gecoStatus",n),S(null)},children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select status"})}),(0,z.jsx)($,{children:["firm","forecast","other"].map(n=>(0,z.jsx)(q,{value:n,children:n.charAt(0).toUpperCase()+n.slice(1)},n))})]}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("gecoStatus"),children:o.gecoStatus?o.gecoStatus.charAt(0).toUpperCase()+o.gecoStatus.slice(1):"z/A"})]})]}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 z-4 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,z.jsx)(de,{className:"h-[200px] overflow-y-auto",children:(0,z.jsx)("div",{className:"space-y-2",children:o.comments&&o.comments.slice().sort((n,D)=>new Date(D.timestamp||"").getTime()-new Date(n.timestamp||"").getTime()).map(n=>(0,z.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,z.jsx)("p",{className:"text-sm text-foreground",children:n.text}),(0,z.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[n?.author?.name," - ",new Date(n.timestamp||"").toLocaleString()]})]},n.id))})}),(0,z.jsxs)("div",{className:"flex mt-2",children:[(0,z.jsx)(F,{value:f,onChange:n=>p(n.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,z.jsxs)(W,{onClick:I,className:"ml-2",children:[(0,z.jsx)(lt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,z.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(o.updatedAt||"").toLocaleString()]})]})]})]})})}var oe=E(require("react"));var ke=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ke.displayName="Card";var Ae=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("flex flex-col space-y-1.5 p-6",e),...t}));Ae.displayName="CardHeader";var Te=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Nr=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("text-sm text-muted-foreground",e),...t}));Nr.displayName="CardDescription";var Le=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("p-6 z-0",e),...t}));Le.displayName="CardContent";var Pr=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("flex items-center p-6 z-0",e),...t}));Pr.displayName="CardFooter";function je({deal:e,customer:t,categories:r,onClick:a,compact:i=!1}){let l=r.find(d=>d.type==="proposition"&&(e.categories??[]).includes(d.id));return i?(0,z.jsxs)(ke,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,z.jsxs)(Ae,{className:"pb-1 z-2",children:[(0,z.jsx)(Te,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,z.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,z.jsx)(Le,{className:"text-xs text-gray-500 pb-2",children:(0,z.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,z.jsxs)(ke,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,z.jsxs)(Ae,{className:"pb-2",children:[(0,z.jsx)("div",{className:"flex justify-between items-center",children:(0,z.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,z.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,z.jsxs)(Le,{children:[(0,z.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,z.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,z.jsx)(lt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,z.jsx)("span",{children:e.assignee.name})]}),(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,z.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,z.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,z.jsx)(lt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,z.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,z.jsx)("div",{className:"flex justify-between items-left",children:l&&(0,z.jsx)(Re,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:l.name})})]})]})}var Ie=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Ce({status:e,deals:t,users:r,customers:a,categories:i,onDealClick:l,calculateColumnValue:d,calculateWeightedValue:o,compact:h=!1}){return(0,z.jsxs)("div",{className:"flex flex-col w-80",children:[(0,z.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,z.jsx)(Ie.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,z.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((p,u)=>(0,z.jsx)(Ie.Draggable,{draggableId:p.id.toString(),index:p.id,children:g=>(0,z.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,z.jsx)(je,{deal:p,customer:p.customer,categories:i,onClick:()=>l(p),compact:h})})},p.id.toString())),f.placeholder]})}),(0,z.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,z.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,z.jsxs)("span",{className:"text-green-600",children:["\xA3",d(t).toLocaleString()]})]}),(0,z.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,z.jsxs)("span",{className:"text-blue-600",children:["\xA3",o(t,e).toLocaleString()]})]})]})]})}var Dr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Rr({initialData:e,addNewDeal:t,updateDeal:r,addComment:a,addNewCustomer:i}){let[l,d]=(0,Ee.useState)(null),o=u=>(e.deals??[]).filter(g=>g.status===u),h=u=>u.reduce((g,w)=>g+(w.value||0),0),f=(u,g)=>{let w={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return u.reduce((S,P)=>S+(P.value||0)*w[g],0)},p=(0,Ee.useCallback)(u=>{let{source:g,destination:w}=u;if(!w||g.droppableId===w.droppableId&&g.index===w.index)return;let S=g.droppableId,P=w.droppableId,x=e.deals?.filter(I=>I.id===g.index)[0],A=[...e.deals??[]];x&&(x.status=P,r(x))},[r]);return(0,z.jsx)(Ie.DragDropContext,{onDragEnd:p,children:(0,z.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,z.jsx)("div",{className:"flex space-x-4 pb-4",children:Dr.filter(u=>u!=="Lost").map(u=>{let g=o(u);return(0,z.jsx)(Ce,{status:u,deals:g,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:d,calculateColumnValue:h,calculateWeightedValue:f},u)})}),l&&(0,z.jsx)(ye,{deal:l,users:e.users,customer:l.customer,categories:e.categories??[],onClose:()=>d(null),onSave:r,onAddComment:u=>a(l.id.toString(),u)})]})})}function Ke({onSubmit:e}){let[t,r]=(0,Ee.useState)({name:"",intro:"",active:!1});return(0,z.jsxs)("form",{onSubmit:i=>{i.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),r({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerName",children:"Customer Name"}),(0,z.jsx)(F,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerIntro",children:"Intro"}),(0,z.jsx)(X,{id:"customerIntro",value:t.intro??"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,z.jsx)(L,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,z.jsx)(W,{type:"submit",className:"w-full",children:"Add Customer"})]})}function kr({customers:e,users:t,categories:r,onSubmit:a,initialDeal:i,onAddCustomer:l,onClose:d}){let[o,h]=(0,Ee.useState)(i||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("z")[0],closureDate:"",comments:[],description:""}),[f,p]=(0,Ee.useState)(!1),[u,g]=(0,Ee.useState)({});(0,Ee.useEffect)(()=>{i&&h(i)},[i]);let w=()=>{let m={};return o.customer||(m.customer="Customer is required"),o.value||(m.value="Value is required"),o.assignee||(m.assignee="Assignee is required"),o.closureDate||(m.closureDate="Closure Date is required"),g(m),Object.keys(m).length===0},S=async m=>{m.preventDefault(),g({});try{if(w()){let C=await a({...o});C.success?(h({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),d?.()):g(C.errors||{})}}catch{g({submit:"An error occurred while submitting the form."})}},P=m=>{h(C=>({...C,categories:(C.categories||[]).includes(m.id)?(C.categories||[]).filter(n=>n!==m.id):[...C.categories||[],m.id]}))},x=async m=>{h({...o,customer:m});try{let C=await l(m);C.success?p(!1):g(C.errors||{})}catch{g({submit:"An error occurred while submitting the form."})}},A=m=>t?.find(C=>C.id===Number(m)),I=m=>e?.find(C=>C.id===Number(m));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("form",{onSubmit:S,className:"space-y-6",children:[(0,z.jsx)(de,{className:"h-[60vh] pr-4",children:(0,z.jsxs)("div",{className:"space-y-6 px-4",children:[(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"customer",children:"Customer"}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsxs)(Y,{value:o.customer?.id?.toString(),onValueChange:m=>h({...o,customer:I(m)}),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select customer"})}),(0,z.jsx)($,{children:e.map(m=>(0,z.jsx)(q,{value:m.id?.toString()||"",children:m.name},m.id))})]}),(0,z.jsx)(W,{variant:"outline",size:"icon",onClick:()=>p(!0),children:(0,z.jsx)(lt.PlusIcon,{className:"w-5 h-5"})})]}),u.customerId&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.customerId})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"value",children:"Value"}),(0,z.jsx)(F,{id:"value",type:"number",value:o.value||"",onChange:m=>h({...o,value:Number.parseFloat(m.target.value)}),placeholder:"Enter deal value"}),u.value&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.value})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"assignee",children:"Assignee"}),(0,z.jsxs)(Y,{value:o.assignee?.id?.toString(),onValueChange:m=>h({...o,assignee:A(m)}),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select assignee"})}),(0,z.jsx)($,{children:t&&t.map(m=>(0,z.jsx)(q,{value:m.id?.toString()||"",children:m.name},m.id))})]}),u.assignee&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.assignee})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"description",children:"Description"}),(0,z.jsx)(X,{id:"description",value:o.description||"",onChange:m=>h({...o,description:m.target.value}),placeholder:"Enter deal description"})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{children:"Categories"}),(0,z.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(m=>(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)("h4",{className:"text-sm font-medium",children:m.charAt(0).toUpperCase()+m.slice(1)}),(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(C=>C.type===m).map(C=>(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:C.id.toString(),checked:o.categories?.includes(C.id),onCheckedChange:()=>P(C)}),(0,z.jsx)("label",{htmlFor:C.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:C.name})]},C.id))})]},m))})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"closureDate",children:"Closure Date"}),(0,z.jsx)(F,{id:"closureDate",type:"date",value:o.closureDate||"",onChange:m=>h({...o,closureDate:m.target.value})}),u.closureDate&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.closureDate})]})]})}),(0,z.jsx)(W,{type:"submit",className:"w-full",children:i?"Update Deal":"Add Deal"})]}),(0,z.jsx)(Pe,{open:f,onOpenChange:p,children:(0,z.jsxs)(be,{children:[(0,z.jsx)(ve,{children:(0,z.jsx)(he,{children:"Add New Customer"})}),(0,z.jsx)(Ke,{onSubmit:x})]})})]})}var Ar=["firm","forecast","other"];function Tr({initialData:e,updateDeal:t,addComment:r}){let[a,i]=(0,Ee.useState)(null),l=f=>(e.deals??[]).filter(p=>p.gecoStatus===f).filter(p=>p.status!=="Lost").filter(p=>p.status!=="Cold"),d=f=>f.reduce((p,u)=>p+(u.value||0),0),o=(f,p)=>{let u={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return f.reduce((g,w)=>g+(w.value||0)*(u[w.status]??0),0)},h=(0,Ee.useCallback)(f=>{let{source:p,destination:u}=f;if(!u||p.droppableId===u.droppableId&&p.index===u.index)return;let g=p.droppableId,w=u.droppableId,S=e.deals?.filter(x=>x.id===p.index)[0],P=[...e.deals??[]];S&&(S.gecoStatus=w,t(S))},[t]);return(0,z.jsx)(Ie.DragDropContext,{onDragEnd:h,children:(0,z.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,z.jsx)("div",{className:"flex space-x-4 pb-4",children:Ar.map(f=>{let p=l(f);return(0,z.jsx)(Ce,{status:f,deals:p,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:i,calculateColumnValue:d,calculateWeightedValue:o,compact:!0},f)})}),a&&(0,z.jsx)(ye,{deal:a,users:e.users,customer:a.customer,categories:e.categories??[],onClose:()=>i(null),onSave:t,onAddComment:f=>r(a.id.toString(),f)})]})})}0&&(module.exports={CRMCogeBoard,CRMKanbanBoard,DealCard,DealDetails,KanbanColumn,NewCustomerForm,NewDealForm});
4
+ "use strict";var Mt=Object.create;var Ne=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty;var Vt=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Et(t))!zt.call(e,i)&&i!==r&&Ne(e,i,{get:()=>t[i],enumerable:!(a=It(t,i))||a.enumerable});return e};var E=(e,t,r)=>(r=e!=null?Mt(Bt(e)):{},Ze(t||!e||!e.__esModule?Ne(r,"default",{value:e,enumerable:!0}):r,e)),Ht=e=>Ze(Ne({},"__esModule",{value:!0}),e);var Lr={};Vt(Lr,{CRMCogeBoard:()=>Tr,CRMKanbanBoard:()=>Rr,DealCard:()=>je,DealDetails:()=>ye,KanbanColumn:()=>Ce,NewCustomerForm:()=>Ke,NewDealForm:()=>kr});module.exports=Ht(Lr);var Ee=require("react");var ge=E(require("react")),M=E(require("@radix-ui/react-dialog")),lt=require("lucide-react");var nt=require("clsx");var Ge="-",Wt=e=>{let t=Ut(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:d=>{let o=d.split(Ge);return o[0]===""&&o.length!==1&&o.shift(),tt(o,t)||Ft(d)},getConflictingClassGroupIds:(d,o)=>{let h=r[d]||[];return o&&a[d]?[...h,...a[d]]:h}}},tt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],a=t.nextPart.get(r),i=a?tt(e.slice(1),a):void 0;if(i)return i;if(t.validators.length===0)return;let l=e.join(Ge);return t.validators.find(({validator:d})=>d(l))?.classGroupId},Ye=/^\[(.+)\]$/,Ft=e=>{if(Ye.test(e)){let t=Ye.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ut=e=>{let{theme:t,prefix:r}=e,a={nextPart:new Map,validators:[]};return Ot(Object.entries(e.classGroups),r).forEach(([l,d])=>{Ue(d,a,l,t)}),a},Ue=(e,t,r,a)=>{e.forEach(i=>{if(typeof i=="string"){let l=i===""?t:et(t,i);l.classGroupId=r;return}if(typeof i=="function"){if(Gt(i)){Ue(i(a),t,r,a);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([l,d])=>{Ue(d,et(t,l),r,a)})})},et=(e,t)=>{let r=e;return t.split(Ge).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},Gt=e=>e.isThemeGetter,Ot=(e,t)=>t?e.map(([r,a])=>{let i=a.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([d,o])=>[t+d,o])):l);return[r,i]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map,i=(l,d)=>{r.set(l,d),t++,t>e&&(t=0,a=r,r=new Map)};return{get(l){let d=r.get(l);if(d!==void 0)return d;if((d=a.get(l))!==void 0)return i(l,d),d},set(l,d){r.has(l)?r.set(l,d):i(l,d)}}},rt="!",jt=e=>{let{separator:t,experimentalParseClassName:r}=e,a=t.length===1,i=t[0],l=t.length,d=o=>{let h=[],f=0,p=0,u;for(let x=0;x<o.length;x++){let A=o[x];if(f===0){if(A===i&&(a||o.slice(x,x+l)===t)){h.push(o.slice(p,x)),p=x+l;continue}if(A==="/"){u=x;continue}}A==="["?f++:A==="]"&&f--}let g=h.length===0?o:o.substring(p),w=g.startsWith(rt),S=w?g.substring(1):g,P=u&&u>p?u-p:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:P}};return r?o=>r({className:o,parseClassName:d}):d},Kt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(a=>{a[0]==="["?(t.push(...r.sort(),a),r=[]):r.push(a)}),t.push(...r.sort()),t},$t=e=>({cache:_t(e.cacheSize),parseClassName:jt(e),...Wt(e)}),qt=/\z+/,Qt=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i}=t,l=[],d=e.trim().split(qt),o="";for(let h=d.length-1;h>=0;h-=1){let f=d[h],{modifiers:p,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:w}=r(f),S=!!w,P=a(S?g.substring(0,w):g);if(!P){if(!S){o=f+(o.length>0?" "+o:o);continue}if(P=a(g),!P){o=f+(o.length>0?" "+o:o);continue}S=!1}let x=Kt(p).join(":"),A=u?x+rt:x,I=A+P;if(l.includes(I))continue;l.push(I);let m=i(P,S);for(let C=0;C<m.length;++C){let n=m[C];l.push(A+n)}o=f+(o.length>0?" "+o:o)}return o};function Jt(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ot(t))&&(a&&(a+=" "),a+=r);return a}var ot=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=ot(e[a]))&&(r&&(r+=" "),r+=t);return r};function Xt(e,...t){let r,a,i,l=d;function d(h){let f=t.reduce((p,u)=>u(p),e());return r=$t(f),a=r.cache.get,i=r.cache.set,l=o,o(h)}function o(h){let f=a(h);if(f)return f;let p=Qt(h,r);return i(h,p),p}return function(){return l(Jt.apply(null,arguments))}}var R=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},at=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zt=/^\d+\/\d+$/,Yt=new Set(["px","full","screen"]),er=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|z|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,or=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ar=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,G=e=>le(e)||Yt.has(e)||Zt.test(e),O=e=>ce(e,"length",ur),le=e=>!!e&&!Number.isNaN(Number(e)),Fe=e=>ce(e,"number",le),pe=e=>!!e&&Number.isInteger(Number(e)),sr=e=>e.endsWith("%")&&le(e.slice(0,-1)),b=e=>at.test(e),_=e=>er.test(e),ir=new Set(["length","size","percentage"]),nr=e=>ce(e,ir,st),lr=e=>ce(e,"position",st),cr=new Set(["image","url"]),dr=e=>ce(e,cr,fr),mr=e=>ce(e,"",pr),fe=()=>!0,ce=(e,t,r)=>{let a=at.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):r(a[2]):!1},ur=e=>tr.test(e)&&!rr.test(e),st=()=>!1,pr=e=>or.test(e),fr=e=>ar.test(e);var gr=()=>{let e=R("colors"),t=R("spacing"),r=R("blur"),a=R("brightness"),i=R("borderColor"),l=R("borderRadius"),d=R("borderSpacing"),o=R("borderWidth"),h=R("contrast"),f=R("grayscale"),p=R("hueRotate"),u=R("invert"),g=R("gap"),w=R("gradientColorStops"),S=R("gradientColorStopPositions"),P=R("inset"),x=R("margin"),A=R("opacity"),I=R("padding"),m=R("saturate"),C=R("scale"),n=R("sepia"),D=R("skew"),ne=R("space"),$e=R("translate"),ze=()=>["auto","contain","none"],Ve=()=>["auto","hidden","clip","visible","scroll"],He=()=>["auto",b,t],k=()=>[b,t],qe=()=>["",G,O],we=()=>["auto",le,b],Qe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],Je=()=>["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"],ue=()=>["","0",b],Xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[le,b];return{cacheSize:500,separator:":",theme:{colors:[fe],spacing:[G,O],blur:["none","",_,b],brightness:U(),borderColor:[e],borderRadius:["none","","full",_,b],borderSpacing:k(),borderWidth:qe(),contrast:U(),grayscale:ue(),hueRotate:U(),invert:ue(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[sr,O],inset:He(),margin:He(),opacity:U(),padding:k(),saturate:U(),scale:U(),sepia:ue(),skew:U(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":Xe()}],"break-before":[{"break-before":Xe()}],"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(),b]}],overflow:[{overflow:Ve()}],"overflow-x":[{"overflow-x":Ve()}],"overflow-y":[{"overflow-y":Ve()}],overscroll:[{overscroll:ze()}],"overscroll-x":[{"overscroll-x":ze()}],"overscroll-y":[{"overscroll-y":ze()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[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",pe,b]}],basis:[{basis:He()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",pe,b]}],"grid-cols":[{"grid-cols":[fe]}],"col-start-end":[{col:["auto",{span:["full",pe,b]},b]}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":[fe]}],"row-start-end":[{row:["auto",{span:[pe,b]},b]}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"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:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],z:[{z:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],Ee:[{Ee:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,t]}],"min-w":[{"min-w":[b,t,"min","max","fit"]}],"max-w":[{"max-w":[b,t,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[b,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fe]}],"font-family":[{font:[fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",b]}],"line-clamp":[{"line-clamp":["none",le,Fe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",G,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",G,O]}],"underline-offset":[{"underline-offset":["auto",G,b]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Qe(),lr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-z":[{"rounded-z":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-z":[{"rounded-z":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-z":[{"border-z":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Se()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-z":[{"border-z":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[G,b]}],"outline-w":[{outline:[G,O]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:qe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[G,O]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,mr]}],"shadow-color":[{shadow:[fe]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",_,b]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[u]}],saturate:[{saturate:[m]}],sepia:[{sepia:[n]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[pe,b]}],"translate-x":[{"translate-x":[$e]}],"translate-y":[{"translate-y":[$e]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","z-resize","w-resize","ne-resize","nw-resize","z-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-Ee":[{"scroll-Ee":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-z":[{"scroll-z":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[G,O,Fe]}],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","z","pr","pb","pl"],px:["pr","pl"],py:["z","pb"],m:["mx","my","ms","Ee","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-z","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-z","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-z":["rounded-ss","rounded-es"],"rounded-e":["rounded-z","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-z","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-z","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-Ee","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-z","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-z","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var it=Xt(gr);function v(...e){return it((0,nt.clsx)(e))}var z=require("react/jsx-runtime"),Pe=M.Root;var br=M.Portal;var ct=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Overlay,{ref:r,className:v("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=M.Overlay.displayName;var be=ge.forwardRef(({className:e,children:t,...r},a)=>(0,z.jsxs)(br,{children:[(0,z.jsx)(ct,{}),(0,z.jsxs)(M.Content,{ref:a,className:v("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),...r,children:[t,(0,z.jsxs)(M.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,z.jsx)(lt.X,{className:"h-4 w-4"}),(0,z.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));be.displayName=M.Content.displayName;var ve=({className:e,...t})=>(0,z.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ve.displayName="DialogHeader";var vr=({className:e,...t})=>(0,z.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vr.displayName="DialogFooter";var he=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Title,{ref:r,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));he.displayName=M.Title.displayName;var hr=ge.forwardRef(({className:e,...t},r)=>(0,z.jsx)(M.Description,{ref:r,className:v("text-sm text-muted-foreground",e),...t}));hr.displayName=M.Description.displayName;var dt=require("@radix-ui/react-slot"),mt=require("class-variance-authority"),ut=E(require("react")),xr=(0,mt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-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-accent"}}}),W=ut.forwardRef(({asChild:e=!1,className:t,size:r,variant:a,...i},l)=>(0,z.jsx)(e?dt.Slot:"button",{className:v(xr({className:t,size:r,variant:a})),ref:l,...i}));W.displayName="Button";var ft=E(require("react"));var F=ft.forwardRef(({className:e,type:t,...r},a)=>(0,z.jsx)("input",{type:t,className:v("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:a,...r}));F.displayName="Input";var bt=E(require("react")),Oe=E(require("@radix-ui/react-label"));var yr=(0,mt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L=bt.forwardRef(({className:e,...t},r)=>(0,z.jsx)(Oe.Root,{ref:r,className:v(yr(),e),...t}));L.displayName=Oe.Root.displayName;var xt=E(require("react")),X=xt.forwardRef(({className:e,...t},r)=>(0,z.jsx)("textarea",{className:v("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}));X.displayName="Textarea";var y=E(require("@radix-ui/react-select")),j=E(require("react")),Y=y.Root;var ee=y.Value,K=j.forwardRef(({children:e,className:t,...r},a)=>(0,z.jsxs)(y.Trigger,{className:v("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:a,...r,children:[e,(0,z.jsx)(y.Icon,{asChild:!0,children:(0,z.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));K.displayName=y.Trigger.displayName;var Ct=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,z.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));Ct.displayName=y.ScrollUpButton.displayName;var wt=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,z.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));wt.displayName=y.ScrollDownButton.displayName;var $=j.forwardRef(({children:e,className:t,position:r="popper",...a},i)=>(0,z.jsx)(y.Portal,{children:(0,z.jsxs)(y.Content,{className:v("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-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:i,...a,children:[(0,z.jsx)(Ct,{}),(0,z.jsx)(y.Viewport,{className:v("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,z.jsx)(wt,{})]})}));$.displayName=y.Content.displayName;var Cr=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Cr.displayName=y.Label.displayName;var q=j.forwardRef(({children:e,className:t,...r},a)=>(0,z.jsxs)(y.Item,{className:v("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:a,...r,children:[(0,z.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,z.jsx)(y.ItemIndicator,{children:(0,z.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,z.jsx)(y.ItemText,{children:e})]}));q.displayName=y.Item.displayName;var wr=j.forwardRef(({className:e,...t},r)=>(0,z.jsx)(y.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));wr.displayName=y.Separator.displayName;var xe=E(require("@radix-ui/react-checkbox")),Nt=E(require("react")),te=Nt.forwardRef(({className:e,...t},r)=>(0,z.jsx)(xe.Root,{className:v("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,z.jsx)(xe.Indicator,{className:v("flex items-center justify-center text-current"),children:(0,z.jsx)(lt.Check,{className:"h-4 w-4"})})}));te.displayName=xe.Root.displayName;var Sr=(0,mt.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 Re({className:e,variant:t,...r}){return(0,z.jsx)("div",{className:v(Sr({variant:t}),e),...r})}var _e=E(require("react")),H=E(require("@radix-ui/react-scroll-area"));var de=_e.forwardRef(({className:e,children:t,...r},a)=>(0,z.jsxs)(H.Root,{ref:a,className:v("relative overflow-hidden",e),...r,children:[(0,z.jsx)(H.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,z.jsx)(Rt,{}),(0,z.jsx)(H.Corner,{})]}));de.displayName=H.Root.displayName;var Rt=_e.forwardRef(({className:e,orientation:t="vertical",...r},a)=>(0,z.jsx)(H.ScrollAreaScrollbar,{ref:a,orientation:t,className:v("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),...r,children:(0,z.jsx)(H.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=H.ScrollAreaScrollbar.displayName;function ye({deal:e,users:t,customer:r,categories:a,onClose:i,onSave:l,onAddComment:d}){let[o,h]=(0,Ee.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[f,p]=(0,Ee.useState)(""),[u,g]=(0,Ee.useState)(!1),[w,S]=(0,Ee.useState)(null);(0,Ee.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(o))},[e,o]);let P=async()=>{try{let n=await l(o);n.success?(g(!1),S(null)):console.error("Failed to save deal:",n.errors)}catch(n){console.error("Failed to save deal:",n)}},x=(n,D)=>{h(ne=>({...ne,[n]:D}))},A=n=>{let D=(o.categories||[]).includes(n)?(o.categories||[]).filter(ne=>ne!==n):[...o.categories||[],n];x("categories",D)},I=async()=>{if(f.trim()){let n={text:f,timestamp:new Date().toISOString()};try{let D=await d(n);if(!D.success){console.error("Failed to add comment:",D.errors);return}}catch(D){console.error("Failed to add comment:",D)}h(D=>({...D,comments:[...D.comments||[],n]})),p("")}},m=n=>{switch(n){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},C=n=>t?.find(D=>D.id===Number(n));return(0,z.jsx)(Pe,{open:!0,children:(0,z.jsxs)(be,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,z.jsxs)(ve,{className:"flex flex-row items-center justify-between",children:[(0,z.jsx)(he,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,z.jsxs)("div",{className:"flex space-x-2",children:[(0,z.jsx)(W,{variant:"outline",onClick:i,children:"Close"}),(0,z.jsxs)(W,{onClick:P,disabled:!u,children:[(0,z.jsx)(lt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,z.jsxs)(de,{className:"flex-grow pr-4",children:[(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,z.jsx)("div",{className:"grid gap-2 m-1",children:w==="value"?(0,z.jsx)(F,{type:"number",value:o.value,onChange:n=>x("value",Number(n.target.value)),onBlur:()=>S(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,z.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("value"),children:["\xA3",o.value?.toLocaleString()]})}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Assignee"}),w==="assignee"?(0,z.jsxs)(Y,{value:o?.assignee?.id?.toString()||"",onValueChange:n=>x("assignee",C(n)),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select assignee"})}),(0,z.jsx)($,{children:t&&t.map(n=>(0,z.jsx)(q,{value:n?.id?.toString()||"",children:n.name},n.id))})]}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("assignee"),children:[(0,z.jsx)(lt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:o?.assignee?.name})]})]}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Closure Date"}),w==="closureDate"?(0,z.jsx)(F,{type:"date",value:o.closureDate?.split("z")[0]??"",onChange:n=>x("closureDate",n.target.value),onBlur:()=>S(null),className:"mr-2",autoFocus:!0}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("closureDate"),children:[(0,z.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:o.closureDate?new Date(o.closureDate).toLocaleDateString("en-GB"):"z/A"})]})]})]}),(0,z.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Description"}),w==="description"?(0,z.jsx)(X,{value:o.description||"",onChange:n=>x("description",n.target.value),onBlur:()=>S(null),className:"min-h-[100px]",autoFocus:!0}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>S("description"),children:o.description})]})}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 z-2 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Status"}),w==="status"?(0,z.jsxs)(Y,{value:o.status,onValueChange:n=>{x("status",n),S(null)},children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select status"})}),(0,z.jsx)($,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(n=>(0,z.jsx)(q,{value:n,children:n},n))})]}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("status"),children:o.status})]}),(0,z.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Categories"}),w==="categories"?(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:a.map(n=>(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:n.id?.toString()||"",checked:(o.categories||[]).some(D=>D.id===n.id),onCheckedChange:()=>n.id!==void 0&&A(n)}),(0,z.jsx)("label",{htmlFor:(n.id??"").toString(),className:`text-sm font-medium ${m(n.type||"sector")} px-2 py-1 rounded`,children:n.name})]},n.id))}):(0,z.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("categories"),children:o.categories&&o.categories.map(n=>{let D=n;return D?(0,z.jsx)(Re,{variant:"outline",className:m(D.type||"sector"),children:D.name},D.id):null})})]}),(0,z.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"COGE Status"}),w==="gecoStatus"?(0,z.jsxs)(Y,{value:o.gecoStatus??void 0,onValueChange:n=>{x("gecoStatus",n),S(null)},children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select status"})}),(0,z.jsx)($,{children:["firm","forecast","other"].map(n=>(0,z.jsx)(q,{value:n,children:n.charAt(0).toUpperCase()+n.slice(1)},n))})]}):(0,z.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>S("gecoStatus"),children:o.gecoStatus?o.gecoStatus.charAt(0).toUpperCase()+o.gecoStatus.slice(1):"z/A"})]})]}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 z-4 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,z.jsx)(de,{className:"h-[200px] overflow-y-auto",children:(0,z.jsx)("div",{className:"space-y-2",children:o.comments&&o.comments.slice().sort((n,D)=>new Date(D.timestamp||"").getTime()-new Date(n.timestamp||"").getTime()).map(n=>(0,z.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,z.jsx)("p",{className:"text-sm text-foreground",children:n.text}),(0,z.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[n?.author?.name," - ",new Date(n.timestamp||"").toLocaleString()]})]},n.id))})}),(0,z.jsxs)("div",{className:"flex mt-2",children:[(0,z.jsx)(F,{value:f,onChange:n=>p(n.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,z.jsxs)(W,{onClick:I,className:"ml-2",children:[(0,z.jsx)(lt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,z.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(o.updatedAt||"").toLocaleString()]})]})]})]})})}var oe=E(require("react"));var ke=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ke.displayName="Card";var Ae=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("flex flex-col space-y-1.5 p-6",e),...t}));Ae.displayName="CardHeader";var Te=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Nr=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("text-sm text-muted-foreground",e),...t}));Nr.displayName="CardDescription";var Le=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("p-6 z-0",e),...t}));Le.displayName="CardContent";var Pr=oe.forwardRef(({className:e,...t},r)=>(0,z.jsx)("div",{ref:r,className:v("flex items-center p-6 z-0",e),...t}));Pr.displayName="CardFooter";function je({deal:e,customer:t,categories:r,onClick:a,compact:i=!1}){let l=r.find(d=>d.type==="proposition"&&(e.categories??[]).includes(d.id));return i?(0,z.jsxs)(ke,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,z.jsxs)(Ae,{className:"pb-1 z-2",children:[(0,z.jsx)(Te,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,z.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,z.jsx)(Le,{className:"text-xs text-gray-200 pb-2",children:(0,z.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,z.jsxs)(ke,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,z.jsxs)(Ae,{className:"pb-2",children:[(0,z.jsx)("div",{className:"flex justify-between items-center",children:(0,z.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,z.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,z.jsxs)(Le,{children:[(0,z.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,z.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,z.jsx)(lt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,z.jsx)("span",{children:e.assignee.name})]}),(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,z.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,z.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,z.jsx)(lt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,z.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,z.jsx)("div",{className:"flex justify-between items-left",children:l&&(0,z.jsx)(Re,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:l.name})})]})]})}var Ie=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Ce({status:e,deals:t,users:r,customers:a,categories:i,onDealClick:l,calculateColumnValue:d,calculateWeightedValue:o,compact:h=!1}){return(0,z.jsxs)("div",{className:"flex flex-col w-80",children:[(0,z.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,z.jsx)(Ie.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,z.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((p,u)=>(0,z.jsx)(Ie.Draggable,{draggableId:p.id.toString(),index:p.id,children:g=>(0,z.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,z.jsx)(je,{deal:p,customer:p.customer,categories:i,onClick:()=>l(p),compact:h})})},p.id.toString())),f.placeholder]})}),(0,z.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,z.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,z.jsxs)("span",{className:"text-green-600",children:["\xA3",d(t).toLocaleString()]})]}),(0,z.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,z.jsxs)("span",{className:"text-blue-600",children:["\xA3",o(t,e).toLocaleString()]})]})]})]})}var Dr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Rr({initialData:e,addNewDeal:t,updateDeal:r,addComment:a,addNewCustomer:i}){let[l,d]=(0,Ee.useState)(null),o=u=>(e.deals??[]).filter(g=>g.status===u),h=u=>u.reduce((g,w)=>g+(w.value||0),0),f=(u,g)=>{let w={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return u.reduce((S,P)=>S+(P.value||0)*w[g],0)},p=(0,Ee.useCallback)(u=>{let{source:g,destination:w}=u;if(!w||g.droppableId===w.droppableId&&g.index===w.index)return;let S=g.droppableId,P=w.droppableId,x=e.deals?.filter(I=>I.id===g.index)[0],A=[...e.deals??[]];x&&(x.status=P,r(x))},[r]);return(0,z.jsx)(Ie.DragDropContext,{onDragEnd:p,children:(0,z.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,z.jsx)("div",{className:"flex space-x-4 pb-4",children:Dr.filter(u=>u!=="Lost").map(u=>{let g=o(u);return(0,z.jsx)(Ce,{status:u,deals:g,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:d,calculateColumnValue:h,calculateWeightedValue:f},u)})}),l&&(0,z.jsx)(ye,{deal:l,users:e.users,customer:l.customer,categories:e.categories??[],onClose:()=>d(null),onSave:r,onAddComment:u=>a(l.id.toString(),u)})]})})}function Ke({onSubmit:e}){let[t,r]=(0,Ee.useState)({name:"",intro:"",active:!1});return(0,z.jsxs)("form",{onSubmit:i=>{i.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),r({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerName",children:"Customer Name"}),(0,z.jsx)(F,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerIntro",children:"Intro"}),(0,z.jsx)(X,{id:"customerIntro",value:t.intro??"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,z.jsx)(L,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,z.jsx)(W,{type:"submit",className:"w-full",children:"Add Customer"})]})}function kr({customers:e,users:t,categories:r,onSubmit:a,initialDeal:i,onAddCustomer:l,onClose:d}){let[o,h]=(0,Ee.useState)(i||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("z")[0],closureDate:"",comments:[],description:""}),[f,p]=(0,Ee.useState)(!1),[u,g]=(0,Ee.useState)({});(0,Ee.useEffect)(()=>{i&&h(i)},[i]);let w=()=>{let m={};return o.customer||(m.customer="Customer is required"),o.value||(m.value="Value is required"),o.assignee||(m.assignee="Assignee is required"),o.closureDate||(m.closureDate="Closure Date is required"),g(m),Object.keys(m).length===0},S=async m=>{m.preventDefault(),g({});try{if(w()){let C=await a({...o});C.success?(h({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),d?.()):g(C.errors||{})}}catch{g({submit:"An error occurred while submitting the form."})}},P=m=>{h(C=>({...C,categories:(C.categories||[]).includes(m.id)?(C.categories||[]).filter(n=>n!==m.id):[...C.categories||[],m.id]}))},x=async m=>{h({...o,customer:m});try{let C=await l(m);C.success?p(!1):g(C.errors||{})}catch{g({submit:"An error occurred while submitting the form."})}},A=m=>t?.find(C=>C.id===Number(m)),I=m=>e?.find(C=>C.id===Number(m));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("form",{onSubmit:S,className:"space-y-6",children:[(0,z.jsx)(de,{className:"h-[60vh] pr-4",children:(0,z.jsxs)("div",{className:"space-y-6 px-4",children:[(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"customer",children:"Customer"}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsxs)(Y,{value:o.customer?.id?.toString(),onValueChange:m=>h({...o,customer:I(m)}),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select customer"})}),(0,z.jsx)($,{children:e.map(m=>(0,z.jsx)(q,{value:m.id?.toString()||"",children:m.name},m.id))})]}),(0,z.jsx)(W,{variant:"outline",size:"icon",onClick:()=>p(!0),children:(0,z.jsx)(lt.PlusIcon,{className:"w-5 h-5"})})]}),u.customerId&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.customerId})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"value",children:"Value"}),(0,z.jsx)(F,{id:"value",type:"number",value:o.value||"",onChange:m=>h({...o,value:Number.parseFloat(m.target.value)}),placeholder:"Enter deal value"}),u.value&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.value})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"assignee",children:"Assignee"}),(0,z.jsxs)(Y,{value:o.assignee?.id?.toString(),onValueChange:m=>h({...o,assignee:A(m)}),children:[(0,z.jsx)(K,{children:(0,z.jsx)(ee,{placeholder:"Select assignee"})}),(0,z.jsx)($,{children:t&&t.map(m=>(0,z.jsx)(q,{value:m.id?.toString()||"",children:m.name},m.id))})]}),u.assignee&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.assignee})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"description",children:"Description"}),(0,z.jsx)(X,{id:"description",value:o.description||"",onChange:m=>h({...o,description:m.target.value}),placeholder:"Enter deal description"})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{children:"Categories"}),(0,z.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(m=>(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)("h4",{className:"text-sm font-medium",children:m.charAt(0).toUpperCase()+m.slice(1)}),(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(C=>C.type===m).map(C=>(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(te,{id:C.id.toString(),checked:o.categories?.includes(C.id),onCheckedChange:()=>P(C)}),(0,z.jsx)("label",{htmlFor:C.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:C.name})]},C.id))})]},m))})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"closureDate",children:"Closure Date"}),(0,z.jsx)(F,{id:"closureDate",type:"date",value:o.closureDate||"",onChange:m=>h({...o,closureDate:m.target.value})}),u.closureDate&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:u.closureDate})]})]})}),(0,z.jsx)(W,{type:"submit",className:"w-full",children:i?"Update Deal":"Add Deal"})]}),(0,z.jsx)(Pe,{open:f,onOpenChange:p,children:(0,z.jsxs)(be,{children:[(0,z.jsx)(ve,{children:(0,z.jsx)(he,{children:"Add New Customer"})}),(0,z.jsx)(Ke,{onSubmit:x})]})})]})}var Ar=["firm","forecast","other"];function Tr({initialData:e,updateDeal:t,addComment:r}){let[a,i]=(0,Ee.useState)(null),l=f=>(e.deals??[]).filter(p=>p.gecoStatus===f).filter(p=>p.status!=="Lost").filter(p=>p.status!=="Cold"),d=f=>f.reduce((p,u)=>p+(u.value||0),0),o=(f,p)=>{let u={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return f.reduce((g,w)=>g+(w.value||0)*(u[w.status]??0),0)},h=(0,Ee.useCallback)(f=>{let{source:p,destination:u}=f;if(!u||p.droppableId===u.droppableId&&p.index===u.index)return;let g=p.droppableId,w=u.droppableId,S=e.deals?.filter(x=>x.id===p.index)[0],P=[...e.deals??[]];S&&(S.gecoStatus=w,t(S))},[t]);return(0,z.jsx)(Ie.DragDropContext,{onDragEnd:h,children:(0,z.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,z.jsx)("div",{className:"flex space-x-4 pb-4",children:Ar.map(f=>{let p=l(f);return(0,z.jsx)(Ce,{status:f,deals:p,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:i,calculateColumnValue:d,calculateWeightedValue:o,compact:!0},f)})}),a&&(0,z.jsx)(ye,{deal:a,users:e.users,customer:a.customer,categories:e.categories??[],onClose:()=>i(null),onSave:t,onAddComment:f=>r(a.id.toString(),f)})]})})}0&&(module.exports={CRMCogeBoard,CRMKanbanBoard,DealCard,DealDetails,KanbanColumn,NewCustomerForm,NewDealForm});
@@ -1 +1 @@
1
- import{a as f}from"../../chunk-TASJS6US.mjs";import{a as e}from"../../chunk-ERUB6LU6.mjs";import{a as g}from"../../chunk-QYMXR42G.mjs";import{a as d}from"../../chunk-5UQKSJU5.mjs";import{a as c}from"../../chunk-W3ONOYB6.mjs";import{a as b}from"../../chunk-FFESN4FM.mjs";import{a}from"../../chunk-5V2PNTEF.mjs";import"../../chunk-OGZERPA4.mjs";import"../../chunk-6T322YHB.mjs";import"../../chunk-KJIBE57R.mjs";import"../../chunk-CX4XB5W2.mjs";import"../../chunk-EECIYMTX.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-JPZJET3B.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{g as CRMCogeBoard,d as CRMKanbanBoard,b as DealCard,a as DealDetails,c as KanbanColumn,e as NewCustomerForm,f as NewDealForm};
1
+ import{a as f}from"../../chunk-TASJS6US.mjs";import{a as e}from"../../chunk-ERUB6LU6.mjs";import{a as g}from"../../chunk-N4NSSICX.mjs";import{a as d}from"../../chunk-FSQNNG2C.mjs";import{a as c}from"../../chunk-JPWY5ADC.mjs";import{a as b}from"../../chunk-WXZ3IRTS.mjs";import{a}from"../../chunk-WSDHDEFO.mjs";import"../../chunk-OGZERPA4.mjs";import"../../chunk-6T322YHB.mjs";import"../../chunk-KJIBE57R.mjs";import"../../chunk-CX4XB5W2.mjs";import"../../chunk-EECIYMTX.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-JPZJET3B.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{g as CRMCogeBoard,d as CRMKanbanBoard,b as DealCard,a as DealDetails,c as KanbanColumn,e as NewCustomerForm,f as NewDealForm};
@@ -1 +1 @@
1
- import{h as a}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as ContentCard};
1
+ import{h as a}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as ContentCard};
@@ -1 +1 @@
1
- import{a as o,b as t}from"../../chunk-3TVLETYW.mjs";import{h as e}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";var i={title:"Reusable Blocks/ContentCard",component:e,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:"select",options:["solid","light","gradient","radial"],description:"The visual style variant of the card"},heading:{control:"text"},subheading:{control:"text"},content:{control:"object"},statistic:{control:"text"},buttonText:{control:"text"},buttonHref:{control:"text"},icon:{control:"boolean"}}},d=i,a={args:{variant:"solid",heading:"Results",icon:{type:"kit",iconName:"software"},statistic:"85%",content:{root:{children:[{type:"paragraph",children:[{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",mode:"normal",type:"text"}]}]}}}},m={args:{variant:"outline",heading:"Lorem ipsum dolor sit",icon:{type:"kit",iconName:"software"},iconSize:"small",width:"1/4"}},n={args:{variant:"light",icon:{type:"kit",iconName:"software"},heading:"Lorem ipsum dolor sit amet",content:{root:{children:[{type:"paragraph",children:[{text:"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",mode:"normal",type:"text"}]},{tag:"h2",type:"heading",format:"",indent:0,version:1,children:[{mode:"normal",text:"Ut enim ad minim veniam, quis nostrud exercitation ",type:"text",style:"",detail:0,format:0,version:1}],direction:"ltr"},{type:"paragraph",children:[{text:"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",mode:"normal",type:"text"}]}]}}}},u={args:{variant:"gradient",heading:"Lorem ipsum dolor sit amet",content:{root:{children:[{type:"paragraph",children:[{text:"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",mode:"normal",type:"text"}]},{type:"paragraph",children:[{text:"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",mode:"normal",type:"text"}]}]}}}},p={args:{variant:"radial",subheading:"go to the next level",heading:"Lorem ipsum dolor sit amet",buttonText:"Go here",buttonHref:"#"}},g={args:{...n.args,icon:void 0}},y={args:{...a.args,className:"max-w-md"}},h={args:{icon:{type:"fa-thin",iconName:"robot"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,settings:{card:"outline",icon:"large"}}},x={args:{icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Intelligent Insights",statistic:"80%",content:"They provide valuable insights and improve ways of working, saving time and boosting efficiency across your organisation.",variant:"light"}},b={args:{icon:{type:"fa-thin",iconName:"robot"},heading:"Sed at eros vel lacus varius varius nec id metus.",link:{label:"label",type:"custom",url:"#"},content:t.simple,settings:{card:"outline",iconSize:"large"}}},v={args:{icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,iconSize:"small",statistic:"80%",settings:{card:"radial"}}},S={args:{image:o.hero,icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,iconSize:"small",statistic:"80%",settings:{card:"radial"}}};export{y as CustomStyling,u as Gradient,h as IconOutline,b as IconOutlineCTA,S as Image,n as Light,m as Minimal,g as NoIcon,x as NoOutline,p as Radial,v as SmallIcon,a as Solid,d as default};
1
+ import{a as o,b as t}from"../../chunk-3TVLETYW.mjs";import{h as e}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";var i={title:"Reusable Blocks/ContentCard",component:e,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:"select",options:["solid","light","gradient","radial"],description:"The visual style variant of the card"},heading:{control:"text"},subheading:{control:"text"},content:{control:"object"},statistic:{control:"text"},buttonText:{control:"text"},buttonHref:{control:"text"},icon:{control:"boolean"}}},d=i,a={args:{variant:"solid",heading:"Results",icon:{type:"kit",iconName:"software"},statistic:"85%",content:{root:{children:[{type:"paragraph",children:[{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",mode:"normal",type:"text"}]}]}}}},m={args:{variant:"outline",heading:"Lorem ipsum dolor sit",icon:{type:"kit",iconName:"software"},iconSize:"small",width:"1/4"}},n={args:{variant:"light",icon:{type:"kit",iconName:"software"},heading:"Lorem ipsum dolor sit amet",content:{root:{children:[{type:"paragraph",children:[{text:"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",mode:"normal",type:"text"}]},{tag:"h2",type:"heading",format:"",indent:0,version:1,children:[{mode:"normal",text:"Ut enim ad minim veniam, quis nostrud exercitation ",type:"text",style:"",detail:0,format:0,version:1}],direction:"ltr"},{type:"paragraph",children:[{text:"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",mode:"normal",type:"text"}]}]}}}},u={args:{variant:"gradient",heading:"Lorem ipsum dolor sit amet",content:{root:{children:[{type:"paragraph",children:[{text:"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",mode:"normal",type:"text"}]},{type:"paragraph",children:[{text:"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",mode:"normal",type:"text"}]}]}}}},p={args:{variant:"radial",subheading:"go to the next level",heading:"Lorem ipsum dolor sit amet",buttonText:"Go here",buttonHref:"#"}},g={args:{...n.args,icon:void 0}},y={args:{...a.args,className:"max-w-md"}},h={args:{icon:{type:"fa-thin",iconName:"robot"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,settings:{card:"outline",icon:"large"}}},x={args:{icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Intelligent Insights",statistic:"80%",content:"They provide valuable insights and improve ways of working, saving time and boosting efficiency across your organisation.",variant:"light"}},b={args:{icon:{type:"fa-thin",iconName:"robot"},heading:"Sed at eros vel lacus varius varius nec id metus.",link:{label:"label",type:"custom",url:"#"},content:t.simple,settings:{card:"outline",iconSize:"large"}}},v={args:{icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,iconSize:"small",statistic:"80%",settings:{card:"radial"}}},S={args:{image:o.hero,icon:{type:"fa-thin",iconName:"lightbulb"},link:{label:"label",type:"custom",url:"#"},heading:"Sed at eros vel lacus varius varius nec id metus.",content:t.simple,iconSize:"small",statistic:"80%",settings:{card:"radial"}}};export{y as CustomStyling,u as Gradient,h as IconOutline,b as IconOutlineCTA,S as Image,n as Light,m as Minimal,g as NoIcon,x as NoOutline,p as Radial,v as SmallIcon,a as Solid,d as default};
@@ -1 +1 @@
1
- import{g as a}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as FeatureCard};
1
+ import{g as a}from"../../chunk-NLA3SBVN.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-C4DU747D.mjs";import"../../chunk-TT4SPGZU.mjs";import"../../chunk-L3PFZ7PW.mjs";import"../../chunk-CTKUF2I6.mjs";import"../../chunk-56RXRTGZ.mjs";import"../../chunk-WDDAVAVV.mjs";import"../../chunk-VIS6GPCT.mjs";import"../../chunk-E6KVX2UG.mjs";import"../../chunk-LLNCOMIM.mjs";import"../../chunk-6HORFOA3.mjs";import"../../chunk-KUZCFJTH.mjs";import"../../chunk-IC57R2EU.mjs";import"../../chunk-PBRC3UOA.mjs";import"../../chunk-SX5U74MW.mjs";import"../../chunk-KHZPOMKL.mjs";import"../../chunk-FRTYO74I.mjs";import"../../chunk-7PBTM4J4.mjs";import"../../chunk-4BDIVC2Q.mjs";import"../../chunk-TQQVBE66.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-FHJDQP4I.mjs";import"../../chunk-BLD454AX.mjs";import"../../chunk-4BHOIXJM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as FeatureCard};