cortex-react-components 1.58.23 → 1.59.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/{chunk-JVM2ZAN6.mjs → chunk-2QKC72KJ.mjs} +1 -1
  2. package/dist/{chunk-NO3JTFER.mjs → chunk-3S7DEGD3.mjs} +1 -1
  3. package/dist/{chunk-LCRFWXVK.mjs → chunk-4SHAKQSO.mjs} +1 -1
  4. package/dist/{chunk-HJXEIYVK.mjs → chunk-4XZH7H6Z.mjs} +1 -1
  5. package/dist/{chunk-C2GNS62O.mjs → chunk-54TJBDXV.mjs} +1 -1
  6. package/dist/{chunk-K7XFS6IQ.mjs → chunk-5SW4N6XT.mjs} +1 -1
  7. package/dist/{chunk-PIM2JQYT.mjs → chunk-7PNAXVQ2.mjs} +1 -1
  8. package/dist/{chunk-CSNKYRV5.mjs → chunk-7XB4Y3U2.mjs} +1 -1
  9. package/dist/{chunk-UFDQJZAB.mjs → chunk-AFHR37IB.mjs} +1 -1
  10. package/dist/{chunk-L2QAYSRV.mjs → chunk-D4DEMLBK.mjs} +1 -1
  11. package/dist/{chunk-HPMQRCDC.mjs → chunk-DKN3LCV5.mjs} +1 -1
  12. package/dist/{chunk-UHW6FJUK.mjs → chunk-E3CE275D.mjs} +1 -1
  13. package/dist/{chunk-JZE6HGP6.mjs → chunk-E3OJ5OL6.mjs} +1 -1
  14. package/dist/{chunk-OJPHYSRN.mjs → chunk-EIEBANVZ.mjs} +1 -1
  15. package/dist/{chunk-Q32SRZ5X.mjs → chunk-ELSPLJLY.mjs} +1 -1
  16. package/dist/{chunk-6SQK6BMG.mjs → chunk-EUAYEIH6.mjs} +1 -1
  17. package/dist/{chunk-BTY3MRVI.mjs → chunk-GETBIECR.mjs} +1 -1
  18. package/dist/{chunk-3TNHR4R3.mjs → chunk-HAOGHXCM.mjs} +1 -1
  19. package/dist/{chunk-VNPAYMAG.mjs → chunk-IEC7SW45.mjs} +1 -1
  20. package/dist/{chunk-C3TKY5VE.mjs → chunk-J2S55IKX.mjs} +1 -1
  21. package/dist/chunk-K2RDP7A3.mjs +1 -0
  22. package/dist/chunk-KLTE56MS.mjs +1 -0
  23. package/dist/{chunk-BRYZOZKY.mjs → chunk-KTQEW4OB.mjs} +1 -1
  24. package/dist/chunk-KUJXSGYS.mjs +1 -0
  25. package/dist/{chunk-IABQ3JMG.mjs → chunk-L7DXIYCC.mjs} +1 -1
  26. package/dist/{chunk-IFZ6ABCM.mjs → chunk-LNPXUJPX.mjs} +1 -1
  27. package/dist/{chunk-75OAUMGO.mjs → chunk-M53XY4LJ.mjs} +1 -1
  28. package/dist/{chunk-IAP7Y2DK.mjs → chunk-MBMWYNTW.mjs} +1 -1
  29. package/dist/{chunk-GM53J62R.mjs → chunk-QOXCD64Q.mjs} +1 -1
  30. package/dist/{chunk-WDVSSHIB.mjs → chunk-S4K46TIQ.mjs} +1 -1
  31. package/dist/{chunk-KLCZHZKQ.mjs → chunk-S7I4XJS6.mjs} +1 -1
  32. package/dist/{chunk-6ARDJ33C.mjs → chunk-TGZJYJ2U.mjs} +1 -1
  33. package/dist/{chunk-MFTCHZFC.mjs → chunk-ULDVX7QK.mjs} +1 -1
  34. package/dist/{chunk-VV6P75VN.mjs → chunk-XT5GKZWD.mjs} +1 -1
  35. package/dist/{chunk-26FHIJPI.mjs → chunk-YFEJX756.mjs} +1 -1
  36. package/dist/chunk-Z2EKZZJU.mjs +1 -0
  37. package/dist/components/Blocks/Banner.mjs +1 -1
  38. package/dist/components/Blocks/CallToAction.mjs +1 -1
  39. package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
  40. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  41. package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
  42. package/dist/components/Blocks/Content.mjs +1 -1
  43. package/dist/components/Blocks/Content.stories.mjs +1 -1
  44. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  45. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  46. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  47. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  48. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  49. package/dist/components/Blocks/index.mjs +1 -1
  50. package/dist/components/CRM/DealCard.js +1 -1
  51. package/dist/components/CRM/DealCard.mjs +1 -1
  52. package/dist/components/CRM/DealCard.stories.js +1 -1
  53. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  54. package/dist/components/CRM/DealDetails.js +1 -1
  55. package/dist/components/CRM/DealDetails.mjs +1 -1
  56. package/dist/components/CRM/DealDetails.stories.js +1 -1
  57. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  58. package/dist/components/CRM/KanbanBoard.js +1 -1
  59. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  60. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  61. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  62. package/dist/components/CRM/KanbanColumn.js +1 -1
  63. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  64. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  65. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  66. package/dist/components/CRM/NewCustomerForm.js +1 -1
  67. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  68. package/dist/components/CRM/NewCustomerForm.stories.js +1 -1
  69. package/dist/components/CRM/NewCustomerForm.stories.mjs +1 -1
  70. package/dist/components/CRM/NewDealForm.js +1 -1
  71. package/dist/components/CRM/NewDealForm.mjs +1 -1
  72. package/dist/components/CRM/NewDealForm.stories.js +1 -1
  73. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  74. package/dist/components/CRM/index.js +1 -1
  75. package/dist/components/CRM/index.mjs +1 -1
  76. package/dist/components/Cards/ContentCard.mjs +1 -1
  77. package/dist/components/Cards/ContentCard.stories.mjs +1 -1
  78. package/dist/components/Cards/FeatureCard.mjs +1 -1
  79. package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
  80. package/dist/components/Cards/index.mjs +1 -1
  81. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  82. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  83. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  84. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  85. package/dist/components/Heros/PostHero/index.mjs +1 -1
  86. package/dist/components/Heros/RenderHero.mjs +1 -1
  87. package/dist/components/Heros/index.mjs +1 -1
  88. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  89. package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
  90. package/dist/components/Holidays/index.mjs +1 -1
  91. package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
  92. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  93. package/dist/components/Layouts/Print.mjs +1 -1
  94. package/dist/components/Layouts/Print.stories.mjs +1 -1
  95. package/dist/components/Layouts/SlideShow.mjs +1 -1
  96. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  97. package/dist/components/Layouts/index.mjs +1 -1
  98. package/dist/components/Payload/RichText/index.mjs +1 -1
  99. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  100. package/dist/components/Payload/RichText.stories.mjs +1 -1
  101. package/dist/components/Payload/index.mjs +1 -1
  102. package/dist/components/index.js +3 -3
  103. package/dist/components/index.mjs +1 -1
  104. package/dist/components/ui/index.mjs +1 -1
  105. package/dist/globals.css +1 -1
  106. package/dist/index.js +7 -7
  107. package/dist/index.mjs +1 -1
  108. package/dist/metafile-cjs.json +1 -1
  109. package/dist/metafile-esm.json +1 -1
  110. package/dist/pages/Blog.js +1 -1
  111. package/dist/pages/Blog.mjs +1 -1
  112. package/dist/pages/Blog.stories.js +1 -1
  113. package/dist/pages/Blog.stories.mjs +1 -1
  114. package/dist/pages/IndexPage.mjs +1 -1
  115. package/dist/pages/IndexPage.stories.mjs +1 -1
  116. package/dist/pages/Intranet.mjs +1 -1
  117. package/dist/pages/Intranet.stories.mjs +1 -1
  118. package/dist/pages/LandingPage.mjs +1 -1
  119. package/dist/pages/LandingPage.stories.mjs +1 -1
  120. package/dist/pages/Page.mjs +1 -1
  121. package/dist/pages/Page.stories.mjs +1 -1
  122. package/dist/pages/Printable.stories.mjs +1 -1
  123. package/dist/pages/Publish.mjs +1 -1
  124. package/dist/pages/Publish.stories.mjs +1 -1
  125. package/dist/pages/Website.mjs +1 -1
  126. package/dist/pages/Website.stories.mjs +1 -1
  127. package/dist/sections/AboutSection.mjs +1 -1
  128. package/dist/sections/AboutSection.stories.mjs +1 -1
  129. package/dist/sections/BlogDetail.js +1 -1
  130. package/dist/sections/BlogDetail.mjs +1 -1
  131. package/dist/sections/BlogDetail.stories.js +1 -1
  132. package/dist/sections/BlogDetail.stories.mjs +1 -1
  133. package/dist/sections/BlogList.mjs +1 -1
  134. package/dist/sections/BlogList.stories.mjs +1 -1
  135. package/dist/sections/ContactSection.mjs +1 -1
  136. package/dist/sections/ContactSection.stories.mjs +1 -1
  137. package/dist/sections/ImageSection.stories.mjs +1 -1
  138. package/dist/sections/PageSections.mjs +1 -1
  139. package/dist/sections/PageSections.stories.mjs +1 -1
  140. package/dist/sections/PricingSection.mjs +1 -1
  141. package/dist/sections/PricingSection.stories.mjs +1 -1
  142. package/dist/sections/ServiceDetail.mjs +1 -1
  143. package/dist/sections/ServiceDetailSection.mjs +1 -1
  144. package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
  145. package/dist/sections/ServiceSection.mjs +1 -1
  146. package/dist/sections/ServiceSection.stories.mjs +1 -1
  147. package/dist/sections/form/index.mjs +1 -1
  148. package/dist/sections/index.js +2 -2
  149. package/dist/sections/index.mjs +1 -1
  150. package/package.json +1 -1
  151. package/dist/chunk-4TCLIMFP.mjs +0 -1
  152. package/dist/chunk-6YWAX7NS.mjs +0 -1
  153. package/dist/chunk-OWBJTXZL.mjs +0 -1
  154. package/dist/chunk-QT5WSNLK.mjs +0 -1
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";var Rt=Object.create;var ue=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty;var At=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},Ge=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Dt(t))!Tt.call(e,s)&&s!==r&&ue(e,s,{get:()=>t[s],enumerable:!(o=Nt(t,s))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Rt(kt(e)):{},Ge(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Lt=e=>Ge(ue({},"__esModule",{value:!0}),e);var xr={};At(xr,{KanbanColumn:()=>yr});module.exports=Lt(xr);var St=require("react");var Xe=require("clsx");var Ne="-",Mt=e=>{let t=Et(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(Ne);return a[0]===""&&a.length!==1&&a.shift(),Oe(a,t)||It(l)},getConflictingClassGroupIds:(l,a)=>{let f=r[l]||[];return a&&o[l]?[...f,...o[l]]:f}}},Oe=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Oe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Ne);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},We=/^\[(.+)\]$/,It=e=>{if(We.test(e)){let t=We.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Et=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ht(Object.entries(e.classGroups),r).forEach(([i,l])=>{Re(l,o,i,t)}),o},Re=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Ue(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(zt(s)){Re(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Re(l,Ue(t,i),r,o)})})},Ue=(e,t)=>{let r=e;return t.split(Ne).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},zt=e=>e.isThemeGetter,Ht=(e,t)=>t?e.map(([r,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,Bt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},je="!",Vt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],i=t.length,l=a=>{let f=[],P=0,C=0,v;for(let y=0;y<a.length;y++){let k=a[y];if(P===0){if(k===s&&(o||a.slice(y,y+i)===t)){f.push(a.slice(C,y)),C=y+i;continue}if(k==="/"){v=y;continue}}k==="["?P++:k==="]"&&P--}let x=f.length===0?a:a.substring(C),D=x.startsWith(je),L=D?x.substring(1):x,h=v&&v>C?v-C:void 0;return{modifiers:f,hasImportantModifier:D,baseClassName:L,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:l}):l},Ft=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},Gt=e=>({cache:Bt(e.cacheSize),parseClassName:Vt(e),...Mt(e)}),Wt=/\s+/,Ut=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Wt),a="";for(let f=l.length-1;f>=0;f-=1){let P=l[f],{modifiers:C,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:D}=r(P),L=!!D,h=o(L?x.substring(0,D):x);if(!h){if(!L){a=P+(a.length>0?" "+a:a);continue}if(h=o(x),!h){a=P+(a.length>0?" "+a:a);continue}L=!1}let y=Ft(C).join(":"),k=v?y+je:y,T=k+h;if(i.includes(T))continue;i.push(T);let F=s(h,L);for(let H=0;H<F.length;++H){let q=F[H];i.push(k+q)}a=P+(a.length>0?" "+a:a)}return a};function Ot(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=_e(t))&&(o&&(o+=" "),o+=r);return o}var _e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=_e(e[o]))&&(r&&(r+=" "),r+=t);return r};function jt(e,...t){let r,o,s,i=l;function l(f){let P=t.reduce((C,v)=>v(C),e());return r=Gt(P),o=r.cache.get,s=r.cache.set,i=a,a(f)}function a(f){let P=o(f);if(P)return P;let C=Ut(f,r);return s(f,C),C}return function(){return i(Ot.apply(null,arguments))}}var g=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},qe=/^\[(?:([a-z-]+):)?(.+)\]$/i,_t=/^\d+\/\d+$/,qt=new Set(["px","full","screen"]),$t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Ye|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Xt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ye-?((\d+)?\.?(\d+)[a-z]+|0)/,Zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>J(e)||qt.has(e)||_t.test(e),W=e=>Z(e,"length",ir),J=e=>!!e&&!Number.isNaN(Number(e)),Pe=e=>Z(e,"number",J),re=e=>!!e&&Number.isInteger(Number(e)),Qt=e=>e.endsWith("%")&&J(e.slice(0,-1)),d=e=>qe.test(e),U=e=>$t.test(e),Yt=new Set(["length","size","percentage"]),er=e=>Z(e,Yt,$e),tr=e=>Z(e,"position",$e),rr=new Set(["image","url"]),or=e=>Z(e,rr,nr),ar=e=>Z(e,"",sr),oe=()=>!0,Z=(e,t,r)=>{let o=qe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ir=e=>Kt.test(e)&&!Xt.test(e),$e=()=>!1,sr=e=>Jt.test(e),nr=e=>Zt.test(e);var lr=()=>{let e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),s=g("borderColor"),i=g("borderRadius"),l=g("borderSpacing"),a=g("borderWidth"),f=g("contrast"),P=g("grayscale"),C=g("hueRotate"),v=g("invert"),x=g("gap"),D=g("gradientColorStops"),L=g("gradientColorStopPositions"),h=g("inset"),y=g("margin"),k=g("opacity"),T=g("padding"),F=g("saturate"),H=g("scale"),q=g("sepia"),ee=g("skew"),c=g("space"),u=g("translate"),G=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",d,t],b=()=>[d,t],He=()=>["",V,W],me=()=>["auto",J,d],Be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",d],Fe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[J,d];return{cacheSize:500,separator:":",theme:{colors:[oe],spacing:[V,W],blur:["none","",U,d],brightness:B(),borderColor:[e],borderRadius:["none","","full",U,d],borderSpacing:b(),borderWidth:He(),contrast:B(),grayscale:te(),hueRotate:B(),invert:te(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[Qt,W],inset:Ce(),margin:Ce(),opacity:B(),padding:b(),saturate:B(),scale:B(),sepia:te(),skew:B(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":Fe()}],"break-before":[{"break-before":Fe()}],"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:[...Be(),d]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",re,d]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",re,d]}],"grid-cols":[{"grid-cols":[oe]}],"col-start-end":[{col:["auto",{span:["full",re,d]},d]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[oe]}],"row-start-end":[{row:["auto",{span:[re,d]},d]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],Ye:[{Ye:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[c]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[c]}],"space-y-reverse":["space-y-reverse"],Ye:[{Ye:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-Ye":[{"min-Ye":[d,t,"min","max","fit"]}],"max-Ye":[{"max-Ye":[d,t,"none","full","min","max","fit","prose",{screen:[U]},U]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",U,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pe]}],"font-family":[{font:[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",d]}],"line-clamp":[{"line-clamp":["none",J,Pe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",V,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",V,W]}],"underline-offset":[{"underline-offset":["auto",V,d]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Be(),tr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",er]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},or]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-Ye":[{border:[a]}],"border-Ye-x":[{"border-x":[a]}],"border-Ye-y":[{"border-y":[a]}],"border-Ye-s":[{"border-s":[a]}],"border-Ye-e":[{"border-e":[a]}],"border-Ye-t":[{"border-t":[a]}],"border-Ye-r":[{"border-r":[a]}],"border-Ye-b":[{"border-b":[a]}],"border-Ye-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[V,d]}],"outline-Ye":[{outline:[V,W]}],"outline-color":[{outline:[e]}],"ring-Ye":[{ring:He()}],"ring-Ye-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-Ye":[{"ring-offset":[V,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,ar]}],"shadow-color":[{shadow:[oe]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ve()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",U,d]}],grayscale:[{grayscale:[P]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[v]}],saturate:[{saturate:[F]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[re,d]}],"translate-x":[{"translate-x":[u]}],"translate-y":[{"translate-y":[u]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","Ye-resize","e-resize","s-resize","Ye-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-Ye":[{"scroll-Ye":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","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",d]}],fill:[{fill:[e,"none"]}],"stroke-Ye":[{stroke:[V,W,Pe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","Ye","mr","mb","ml"],mx:["mr","ml"],my:["Ye","mb"],size:["Ye","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Ye":["border-Ye-s","border-Ye-e","border-Ye-t","border-Ye-r","border-Ye-b","border-Ye-l"],"border-Ye-x":["border-Ye-r","border-Ye-l"],"border-Ye-y":["border-Ye-t","border-Ye-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-Ye","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-Ye","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ke=jt(lr);function m(...e){return Ke((0,Xe.clsx)(e))}var Je=require("@radix-ui/react-slot"),Ze=require("class-variance-authority"),Qe=A(require("react")),Ye=require("react/jsx-runtime"),cr=(0,Ze.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 Ye-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"}}}),O=Qe.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},i)=>(0,Ye.jsx)(e?Je.Slot:"button",{className:m(cr({className:t,size:r,variant:o})),ref:i,...s}));O.displayName="Button";var ae=A(require("react")),R=A(require("@radix-ui/react-dialog")),et=require("lucide-react");var fe=R.Root,tt=R.Trigger,dr=R.Portal;var rt=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rt.displayName=R.Overlay.displayName;var ie=ae.forwardRef(({className:e,children:t,...r},o)=>(0,Ye.jsxs)(dr,{children:[(0,Ye.jsx)(rt,{}),(0,Ye.jsxs)(R.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid Ye-full max-Ye-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,Ye.jsxs)(R.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,Ye.jsx)(et.et,{className:"h-4 Ye-4"}),(0,Ye.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ie.displayName=R.Content.displayName;var se=({className:e,...t})=>(0,Ye.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});se.displayName="DialogHeader";var mr=({className:e,...t})=>(0,Ye.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mr.displayName="DialogFooter";var ne=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));ne.displayName=R.Title.displayName;var pr=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));pr.displayName=R.Description.displayName;var $=A(require("react"));var De=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));De.displayName="Card";var ke=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ke.displayName="CardHeader";var Te=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var ur=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));ur.displayName="CardDescription";var Ae=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));Ae.displayName="CardContent";var fr=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));fr.displayName="CardFooter";var gr=(0,Ze.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 at({className:e,variant:t,...r}){return(0,Ye.jsx)("div",{className:m(gr({variant:t}),e),...r})}function st({deal:e,customer:t,categories:r,onClick:o}){let s=r.find(i=>{var l;return i.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(i.id)});return(0,Ye.jsxs)(De,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ye.jsxs)(ke,{className:"pb-2",children:[(0,Ye.jsx)("div",{className:"flex justify-between items-center",children:(0,Ye.jsx)(Te,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Ye.jsx)("p",{className:"text-sm text-gray-500 Ye-1",children:e.description})]}),(0,Ye.jsxs)(Ae,{children:[(0,Ye.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Ye.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Ye.jsx)(et.UserIcon,{className:"Ye-4 h-4 mr-1 text-xs"}),(0,Ye.jsx)("span",{children:e.assignee.name})]}),(0,Ye.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ye.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Ye.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Ye.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ye.jsx)(et.CalendarIcon,{className:"Ye-3 h-3 mr-1"}),(0,Ye.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Ye.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,Ye.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var xe=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");var nt=A(require("react"));var Q=nt.forwardRef(({className:e,type:t,...r},o)=>(0,Ye.jsx)("input",{type:t,className:m("flex h-9 Ye-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));Q.displayName="Input";var ct=A(require("react")),Le=A(require("@radix-ui/react-label"));var br=(0,Ze.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=ct.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(Le.Root,{ref:r,className:m(br(),e),...t}));E.displayName=Le.Root.displayName;var p=A(require("@radix-ui/react-select")),j=A(require("react")),Me=p.Root;var Ie=p.Value,be=j.forwardRef(({children:e,className:t,...r},o)=>(0,Ye.jsxs)(p.Trigger,{className:m("flex h-10 Ye-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,Ye.jsx)(p.Icon,{asChild:!0,children:(0,Ye.jsx)(et.ChevronDown,{className:"h-4 Ye-4 opacity-50"})})]}));be.displayName=p.Trigger.displayName;var pt=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ye.jsx)(et.ChevronUp,{className:"h-4 Ye-4"})}));pt.displayName=p.ScrollUpButton.displayName;var ut=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ye.jsx)(et.ChevronDown,{className:"h-4 Ye-4"})}));ut.displayName=p.ScrollDownButton.displayName;var ve=j.forwardRef(({children:e,className:t,position:r="popper",...o},s)=>(0,Ye.jsx)(p.Portal,{children:(0,Ye.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-Ye-[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:s,...o,children:[(0,Ye.jsx)(pt,{}),(0,Ye.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] Ye-full min-Ye-[var(--radix-select-trigger-width)]"),children:e}),(0,Ye.jsx)(ut,{})]})}));ve.displayName=p.Content.displayName;var vr=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));vr.displayName=p.Label.displayName;var he=j.forwardRef(({children:e,className:t,...r},o)=>(0,Ye.jsxs)(p.Item,{className:m("relative flex Ye-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,Ye.jsx)("span",{className:"absolute left-2 flex h-3.5 Ye-3.5 items-center justify-center",children:(0,Ye.jsx)(p.ItemIndicator,{children:(0,Ye.jsx)(et.Check,{className:"h-4 Ye-4"})})}),(0,Ye.jsx)(p.ItemText,{children:e})]}));he.displayName=p.Item.displayName;var hr=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));hr.displayName=p.Separator.displayName;var le=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ce=gt.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(le.Root,{className:m("peer h-4 Ye-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,Ye.jsx)(le.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,Ye.jsx)(et.Check,{className:"h-4 Ye-4"})})}));ce.displayName=le.Root.displayName;var bt=A(require("react")),de=bt.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("textarea",{className:m("flex min-h-[80px] Ye-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}));de.displayName="Textarea";var Ee=A(require("react")),z=A(require("@radix-ui/react-scroll-area"));var ze=Ee.forwardRef(({className:e,children:t,...r},o)=>(0,Ye.jsxs)(z.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,Ye.jsx)(z.Viewport,{className:"h-full Ye-full rounded-[inherit]",children:t}),(0,Ye.jsx)(ht,{}),(0,Ye.jsx)(z.Corner,{})]}));ze.displayName=z.Root.displayName;var ht=Ee.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ye.jsx)(z.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full Ye-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,Ye.jsx)(z.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ht.displayName=z.ScrollAreaScrollbar.displayName;function xt({onSubmit:e}){var s;let[t,r]=(0,St.useState)({name:"",intro:"",active:!0});return(0,Ye.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,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(E,{htmlFor:"customerName",children:"Customer Name"}),(0,Ye.jsx)(Q,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(E,{htmlFor:"customerIntro",children:"Intro"}),(0,Ye.jsx)(de,{id:"customerIntro",value:(s=t.intro)!=null?s:"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsx)(ce,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,Ye.jsx)(E,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Ye.jsx)(O,{type:"submit",className:"Ye-full",children:"Add Customer"})]})}function Ct({customers:e,users:t,categories:r,onSubmit:o,initialDeal:s,onAddCustomer:i,onClose:l}){var F,H,q,ee;let[a,f]=(0,St.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[P,C]=(0,St.useState)(!1),[v,x]=(0,St.useState)({});(0,St.useEffect)(()=>{s&&f(s)},[s]);let D=()=>{let c={};return a.customer||(c.customer="Customer is required"),a.value||(c.value="Value is required"),a.assignee||(c.assignee="Assignee is required"),a.closureDate||(c.closureDate="Closure Date is required"),x(c),Object.keys(c).length===0},L=async c=>{c.preventDefault(),x({});try{if(D()){let u=await o({...a});u.success?(f({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):x(u.errors||{})}}catch{x({submit:"An error occurred while submitting the form."})}},h=c=>{f(u=>({...u,categories:(u.categories||[]).includes(c.id)?(u.categories||[]).filter(G=>G!==c.id):[...u.categories||[],c.id]}))},y=async c=>{f({...a,customer:c});try{let u=await i(c);u.success?C(!1):x(u.errors||{})}catch{x({submit:"An error occurred while submitting the form."})}},k=c=>t==null?void 0:t.find(u=>u.id===Number(c)),T=c=>e==null?void 0:e.find(u=>u.id===Number(c));return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)("form",{onSubmit:L,className:"space-y-6",children:[(0,Ye.jsx)(ze,{className:"h-[60vh] pr-4",children:(0,Ye.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"customer",children:"Customer"}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsxs)(Me,{value:(H=(F=a.customer)==null?void 0:F.id)==null?void 0:H.toString(),onValueChange:c=>f({...a,customer:T(c)}),children:[(0,Ye.jsx)(be,{children:(0,Ye.jsx)(Ie,{placeholder:"Select customer"})}),(0,Ye.jsx)(ve,{children:e.map(c=>{var u;return(0,Ye.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),(0,Ye.jsx)(O,{variant:"outline",size:"icon",onClick:()=>C(!0),children:(0,Ye.jsx)(et.PlusIcon,{className:"Ye-5 h-5"})})]}),v.customerId&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.customerId})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"value",children:"Value"}),(0,Ye.jsx)(Q,{id:"value",type:"number",value:a.value||"",onChange:c=>f({...a,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),v.value&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.value})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"assignee",children:"Assignee"}),(0,Ye.jsxs)(Me,{value:(ee=(q=a.assignee)==null?void 0:q.id)==null?void 0:ee.toString(),onValueChange:c=>f({...a,assignee:k(c)}),children:[(0,Ye.jsx)(be,{children:(0,Ye.jsx)(Ie,{placeholder:"Select assignee"})}),(0,Ye.jsx)(ve,{children:t&&t.map(c=>{var u;return(0,Ye.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),v.assignee&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.assignee})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"description",children:"Description"}),(0,Ye.jsx)(de,{id:"description",value:a.description||"",onChange:c=>f({...a,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{children:"Categories"}),(0,Ye.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,Ye.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(u=>u.type===c).map(u=>{var G;return(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsx)(ce,{id:u.id.toString(),checked:(G=a.categories)==null?void 0:G.includes(u.id),onCheckedChange:()=>h(u)}),(0,Ye.jsx)("label",{htmlFor:u.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:u.name})]},u.id)})})]},c))})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"closureDate",children:"Closure Date"}),(0,Ye.jsx)(Q,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:c=>f({...a,closureDate:c.target.value})}),v.closureDate&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.closureDate})]})]})}),(0,Ye.jsx)(O,{type:"submit",className:"Ye-full",children:s?"Update Deal":"Add Deal"})]}),(0,Ye.jsx)(fe,{open:P,onOpenChange:C,children:(0,Ye.jsxs)(ie,{children:[(0,Ye.jsx)(se,{children:(0,Ye.jsx)(ne,{children:"Add New Customer"})}),(0,Ye.jsx)(xt,{onSubmit:y})]})})]})}function yr({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:i,calculateColumnValue:l,calculateWeightedValue:a,addNewDeal:f,onAddCustomer:P}){let[C,v]=(0,St.useState)(!1);return(0,Ye.jsxs)("div",{className:"flex flex-col Ye-80",children:[(0,Ye.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),f&&(0,Ye.jsxs)(fe,{open:C,onOpenChange:v,children:[(0,Ye.jsx)(tt,{asChild:!0,children:(0,Ye.jsxs)(O,{className:"mb-4 Ye-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Ye.jsx)(et.PlusCircle,{className:"mr-2 h-4 Ye-4"}),"Add New Deal"]})}),(0,Ye.jsxs)(ie,{children:[(0,Ye.jsx)(se,{children:(0,Ye.jsx)(ne,{children:"Add New Deal"})}),(0,Ye.jsx)(Ct,{customers:o,users:r,categories:s,onSubmit:f,onAddCustomer:P,onClose:()=>v(!1)})]})]}),(0,Ye.jsx)(xe.Droppable,{droppableId:e,isDropDisabled:!1,children:x=>(0,Ye.jsxs)("div",{ref:x.innerRef,...x.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((D,L)=>(0,Ye.jsx)(xe.Draggable,{draggableId:D.id.toString(),index:D.id,children:h=>(0,Ye.jsx)("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,children:(0,Ye.jsx)(st,{deal:D,customer:D.customer,categories:s,onClick:()=>i(D)})})},D.id.toString())),x.placeholder]})}),(0,Ye.jsxs)("div",{className:"Ye-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Ye.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Ye.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,Ye.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Ye.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}0&&(module.exports={KanbanColumn});
4
+ "use strict";var Rt=Object.create;var ue=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty;var At=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},Ge=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Dt(t))!Tt.call(e,s)&&s!==r&&ue(e,s,{get:()=>t[s],enumerable:!(o=Nt(t,s))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Rt(kt(e)):{},Ge(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Lt=e=>Ge(ue({},"__esModule",{value:!0}),e);var xr={};At(xr,{KanbanColumn:()=>yr});module.exports=Lt(xr);var St=require("react");var Xe=require("clsx");var Ne="-",Mt=e=>{let t=Et(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(Ne);return a[0]===""&&a.length!==1&&a.shift(),Oe(a,t)||It(l)},getConflictingClassGroupIds:(l,a)=>{let f=r[l]||[];return a&&o[l]?[...f,...o[l]]:f}}},Oe=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Oe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Ne);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},We=/^\[(.+)\]$/,It=e=>{if(We.test(e)){let t=We.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Et=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ht(Object.entries(e.classGroups),r).forEach(([i,l])=>{Re(l,o,i,t)}),o},Re=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Ue(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(zt(s)){Re(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Re(l,Ue(t,i),r,o)})})},Ue=(e,t)=>{let r=e;return t.split(Ne).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},zt=e=>e.isThemeGetter,Ht=(e,t)=>t?e.map(([r,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,Bt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},je="!",Vt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],i=t.length,l=a=>{let f=[],P=0,C=0,v;for(let y=0;y<a.length;y++){let k=a[y];if(P===0){if(k===s&&(o||a.slice(y,y+i)===t)){f.push(a.slice(C,y)),C=y+i;continue}if(k==="/"){v=y;continue}}k==="["?P++:k==="]"&&P--}let x=f.length===0?a:a.substring(C),D=x.startsWith(je),L=D?x.substring(1):x,h=v&&v>C?v-C:void 0;return{modifiers:f,hasImportantModifier:D,baseClassName:L,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:l}):l},Ft=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},Gt=e=>({cache:Bt(e.cacheSize),parseClassName:Vt(e),...Mt(e)}),Wt=/\s+/,Ut=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Wt),a="";for(let f=l.length-1;f>=0;f-=1){let P=l[f],{modifiers:C,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:D}=r(P),L=!!D,h=o(L?x.substring(0,D):x);if(!h){if(!L){a=P+(a.length>0?" "+a:a);continue}if(h=o(x),!h){a=P+(a.length>0?" "+a:a);continue}L=!1}let y=Ft(C).join(":"),k=v?y+je:y,T=k+h;if(i.includes(T))continue;i.push(T);let F=s(h,L);for(let H=0;H<F.length;++H){let q=F[H];i.push(k+q)}a=P+(a.length>0?" "+a:a)}return a};function Ot(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=_e(t))&&(o&&(o+=" "),o+=r);return o}var _e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=_e(e[o]))&&(r&&(r+=" "),r+=t);return r};function jt(e,...t){let r,o,s,i=l;function l(f){let P=t.reduce((C,v)=>v(C),e());return r=Gt(P),o=r.cache.get,s=r.cache.set,i=a,a(f)}function a(f){let P=o(f);if(P)return P;let C=Ut(f,r);return s(f,C),C}return function(){return i(Ot.apply(null,arguments))}}var g=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},qe=/^\[(?:([a-z-]+):)?(.+)\]$/i,_t=/^\d+\/\d+$/,qt=new Set(["px","full","screen"]),$t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Ye|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Xt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ye-?((\d+)?\.?(\d+)[a-z]+|0)/,Zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>J(e)||qt.has(e)||_t.test(e),W=e=>Z(e,"length",ir),J=e=>!!e&&!Number.isNaN(Number(e)),Pe=e=>Z(e,"number",J),re=e=>!!e&&Number.isInteger(Number(e)),Qt=e=>e.endsWith("%")&&J(e.slice(0,-1)),d=e=>qe.test(e),U=e=>$t.test(e),Yt=new Set(["length","size","percentage"]),er=e=>Z(e,Yt,$e),tr=e=>Z(e,"position",$e),rr=new Set(["image","url"]),or=e=>Z(e,rr,nr),ar=e=>Z(e,"",sr),oe=()=>!0,Z=(e,t,r)=>{let o=qe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ir=e=>Kt.test(e)&&!Xt.test(e),$e=()=>!1,sr=e=>Jt.test(e),nr=e=>Zt.test(e);var lr=()=>{let e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),s=g("borderColor"),i=g("borderRadius"),l=g("borderSpacing"),a=g("borderWidth"),f=g("contrast"),P=g("grayscale"),C=g("hueRotate"),v=g("invert"),x=g("gap"),D=g("gradientColorStops"),L=g("gradientColorStopPositions"),h=g("inset"),y=g("margin"),k=g("opacity"),T=g("padding"),F=g("saturate"),H=g("scale"),q=g("sepia"),ee=g("skew"),c=g("space"),u=g("translate"),G=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",d,t],b=()=>[d,t],He=()=>["",V,W],me=()=>["auto",J,d],Be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",d],Fe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[J,d];return{cacheSize:500,separator:":",theme:{colors:[oe],spacing:[V,W],blur:["none","",U,d],brightness:B(),borderColor:[e],borderRadius:["none","","full",U,d],borderSpacing:b(),borderWidth:He(),contrast:B(),grayscale:te(),hueRotate:B(),invert:te(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[Qt,W],inset:Ce(),margin:Ce(),opacity:B(),padding:b(),saturate:B(),scale:B(),sepia:te(),skew:B(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":Fe()}],"break-before":[{"break-before":Fe()}],"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:[...Be(),d]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",re,d]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",re,d]}],"grid-cols":[{"grid-cols":[oe]}],"col-start-end":[{col:["auto",{span:["full",re,d]},d]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[oe]}],"row-start-end":[{row:["auto",{span:[re,d]},d]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],Ye:[{Ye:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[c]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[c]}],"space-y-reverse":["space-y-reverse"],Ye:[{Ye:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-Ye":[{"min-Ye":[d,t,"min","max","fit"]}],"max-Ye":[{"max-Ye":[d,t,"none","full","min","max","fit","prose",{screen:[U]},U]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",U,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pe]}],"font-family":[{font:[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",d]}],"line-clamp":[{"line-clamp":["none",J,Pe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",V,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",V,W]}],"underline-offset":[{"underline-offset":["auto",V,d]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Be(),tr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",er]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},or]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-Ye":[{border:[a]}],"border-Ye-x":[{"border-x":[a]}],"border-Ye-y":[{"border-y":[a]}],"border-Ye-s":[{"border-s":[a]}],"border-Ye-e":[{"border-e":[a]}],"border-Ye-t":[{"border-t":[a]}],"border-Ye-r":[{"border-r":[a]}],"border-Ye-b":[{"border-b":[a]}],"border-Ye-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[V,d]}],"outline-Ye":[{outline:[V,W]}],"outline-color":[{outline:[e]}],"ring-Ye":[{ring:He()}],"ring-Ye-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-Ye":[{"ring-offset":[V,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,ar]}],"shadow-color":[{shadow:[oe]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ve()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",U,d]}],grayscale:[{grayscale:[P]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[v]}],saturate:[{saturate:[F]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[re,d]}],"translate-x":[{"translate-x":[u]}],"translate-y":[{"translate-y":[u]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","Ye-resize","e-resize","s-resize","Ye-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-Ye":[{"scroll-Ye":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","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",d]}],fill:[{fill:[e,"none"]}],"stroke-Ye":[{stroke:[V,W,Pe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","Ye","mr","mb","ml"],mx:["mr","ml"],my:["Ye","mb"],size:["Ye","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-Ye":["border-Ye-s","border-Ye-e","border-Ye-t","border-Ye-r","border-Ye-b","border-Ye-l"],"border-Ye-x":["border-Ye-r","border-Ye-l"],"border-Ye-y":["border-Ye-t","border-Ye-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-Ye","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-Ye","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ke=jt(lr);function m(...e){return Ke((0,Xe.clsx)(e))}var Je=require("@radix-ui/react-slot"),Ze=require("class-variance-authority"),Qe=A(require("react")),Ye=require("react/jsx-runtime"),cr=(0,Ze.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 Ye-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"}}}),O=Qe.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},i)=>(0,Ye.jsx)(e?Je.Slot:"button",{className:m(cr({className:t,size:r,variant:o})),ref:i,...s}));O.displayName="Button";var ae=A(require("react")),R=A(require("@radix-ui/react-dialog")),et=require("lucide-react");var fe=R.Root,tt=R.Trigger,dr=R.Portal;var rt=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rt.displayName=R.Overlay.displayName;var ie=ae.forwardRef(({className:e,children:t,...r},o)=>(0,Ye.jsxs)(dr,{children:[(0,Ye.jsx)(rt,{}),(0,Ye.jsxs)(R.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid Ye-full max-Ye-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,Ye.jsxs)(R.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,Ye.jsx)(et.et,{className:"h-4 Ye-4"}),(0,Ye.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ie.displayName=R.Content.displayName;var se=({className:e,...t})=>(0,Ye.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});se.displayName="DialogHeader";var mr=({className:e,...t})=>(0,Ye.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mr.displayName="DialogFooter";var ne=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));ne.displayName=R.Title.displayName;var pr=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(R.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));pr.displayName=R.Description.displayName;var $=A(require("react"));var De=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));De.displayName="Card";var ke=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ke.displayName="CardHeader";var Te=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var ur=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));ur.displayName="CardDescription";var Ae=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));Ae.displayName="CardContent";var fr=$.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));fr.displayName="CardFooter";var gr=(0,Ze.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 at({className:e,variant:t,...r}){return(0,Ye.jsx)("div",{className:m(gr({variant:t}),e),...r})}function st({deal:e,customer:t,categories:r,onClick:o}){let s=r.find(i=>{var l;return i.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(i.id)});return(0,Ye.jsxs)(De,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ye.jsxs)(ke,{className:"pb-2",children:[(0,Ye.jsx)("div",{className:"flex justify-between items-center",children:(0,Ye.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t==null?void 0:t.name})}),(0,Ye.jsx)("p",{className:"text-sm text-gray-500 Ye-1",children:e.description})]}),(0,Ye.jsxs)(Ae,{children:[(0,Ye.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Ye.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,Ye.jsx)(et.UserIcon,{className:"Ye-4 h-4 mr-1 text-xs"}),(0,Ye.jsx)("span",{children:e.assignee.name})]}),(0,Ye.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ye.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Ye.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Ye.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ye.jsx)(et.CalendarIcon,{className:"Ye-3 h-3 mr-1"}),(0,Ye.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Ye.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,Ye.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var xe=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");var nt=A(require("react"));var Q=nt.forwardRef(({className:e,type:t,...r},o)=>(0,Ye.jsx)("input",{type:t,className:m("flex h-9 Ye-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));Q.displayName="Input";var ct=A(require("react")),Le=A(require("@radix-ui/react-label"));var br=(0,Ze.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=ct.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(Le.Root,{ref:r,className:m(br(),e),...t}));E.displayName=Le.Root.displayName;var p=A(require("@radix-ui/react-select")),j=A(require("react")),Me=p.Root;var Ie=p.Value,be=j.forwardRef(({children:e,className:t,...r},o)=>(0,Ye.jsxs)(p.Trigger,{className:m("flex h-10 Ye-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,Ye.jsx)(p.Icon,{asChild:!0,children:(0,Ye.jsx)(et.ChevronDown,{className:"h-4 Ye-4 opacity-50"})})]}));be.displayName=p.Trigger.displayName;var pt=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ye.jsx)(et.ChevronUp,{className:"h-4 Ye-4"})}));pt.displayName=p.ScrollUpButton.displayName;var ut=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ye.jsx)(et.ChevronDown,{className:"h-4 Ye-4"})}));ut.displayName=p.ScrollDownButton.displayName;var ve=j.forwardRef(({children:e,className:t,position:r="popper",...o},s)=>(0,Ye.jsx)(p.Portal,{children:(0,Ye.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-Ye-[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:s,...o,children:[(0,Ye.jsx)(pt,{}),(0,Ye.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] Ye-full min-Ye-[var(--radix-select-trigger-width)]"),children:e}),(0,Ye.jsx)(ut,{})]})}));ve.displayName=p.Content.displayName;var vr=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));vr.displayName=p.Label.displayName;var he=j.forwardRef(({children:e,className:t,...r},o)=>(0,Ye.jsxs)(p.Item,{className:m("relative flex Ye-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,Ye.jsx)("span",{className:"absolute left-2 flex h-3.5 Ye-3.5 items-center justify-center",children:(0,Ye.jsx)(p.ItemIndicator,{children:(0,Ye.jsx)(et.Check,{className:"h-4 Ye-4"})})}),(0,Ye.jsx)(p.ItemText,{children:e})]}));he.displayName=p.Item.displayName;var hr=j.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));hr.displayName=p.Separator.displayName;var le=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ce=gt.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(le.Root,{className:m("peer h-4 Ye-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,Ye.jsx)(le.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,Ye.jsx)(et.Check,{className:"h-4 Ye-4"})})}));ce.displayName=le.Root.displayName;var bt=A(require("react")),de=bt.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)("textarea",{className:m("flex min-h-[80px] Ye-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}));de.displayName="Textarea";var Ee=A(require("react")),z=A(require("@radix-ui/react-scroll-area"));var ze=Ee.forwardRef(({className:e,children:t,...r},o)=>(0,Ye.jsxs)(z.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,Ye.jsx)(z.Viewport,{className:"h-full Ye-full rounded-[inherit]",children:t}),(0,Ye.jsx)(ht,{}),(0,Ye.jsx)(z.Corner,{})]}));ze.displayName=z.Root.displayName;var ht=Ee.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ye.jsx)(z.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full Ye-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,Ye.jsx)(z.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ht.displayName=z.ScrollAreaScrollbar.displayName;function xt({onSubmit:e}){var s;let[t,r]=(0,St.useState)({name:"",intro:"",active:!1});return(0,Ye.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,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(E,{htmlFor:"customerName",children:"Customer Name"}),(0,Ye.jsx)(Q,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(E,{htmlFor:"customerIntro",children:"Intro"}),(0,Ye.jsx)(de,{id:"customerIntro",value:(s=t.intro)!=null?s:"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsx)(ce,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,Ye.jsx)(E,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Ye.jsx)(O,{type:"submit",className:"Ye-full",children:"Add Customer"})]})}function Ct({customers:e,users:t,categories:r,onSubmit:o,initialDeal:s,onAddCustomer:i,onClose:l}){var F,H,q,ee;let[a,f]=(0,St.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[P,C]=(0,St.useState)(!1),[v,x]=(0,St.useState)({});(0,St.useEffect)(()=>{s&&f(s)},[s]);let D=()=>{let c={};return a.customer||(c.customer="Customer is required"),a.value||(c.value="Value is required"),a.assignee||(c.assignee="Assignee is required"),a.closureDate||(c.closureDate="Closure Date is required"),x(c),Object.keys(c).length===0},L=async c=>{c.preventDefault(),x({});try{if(D()){let u=await o({...a});u.success?(f({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):x(u.errors||{})}}catch{x({submit:"An error occurred while submitting the form."})}},h=c=>{f(u=>({...u,categories:(u.categories||[]).includes(c.id)?(u.categories||[]).filter(G=>G!==c.id):[...u.categories||[],c.id]}))},y=async c=>{f({...a,customer:c});try{let u=await i(c);u.success?C(!1):x(u.errors||{})}catch{x({submit:"An error occurred while submitting the form."})}},k=c=>t==null?void 0:t.find(u=>u.id===Number(c)),T=c=>e==null?void 0:e.find(u=>u.id===Number(c));return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)("form",{onSubmit:L,className:"space-y-6",children:[(0,Ye.jsx)(ze,{className:"h-[60vh] pr-4",children:(0,Ye.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"customer",children:"Customer"}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsxs)(Me,{value:(H=(F=a.customer)==null?void 0:F.id)==null?void 0:H.toString(),onValueChange:c=>f({...a,customer:T(c)}),children:[(0,Ye.jsx)(be,{children:(0,Ye.jsx)(Ie,{placeholder:"Select customer"})}),(0,Ye.jsx)(ve,{children:e.map(c=>{var u;return(0,Ye.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),(0,Ye.jsx)(O,{variant:"outline",size:"icon",onClick:()=>C(!0),children:(0,Ye.jsx)(et.PlusIcon,{className:"Ye-5 h-5"})})]}),v.customerId&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.customerId})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"value",children:"Value"}),(0,Ye.jsx)(Q,{id:"value",type:"number",value:a.value||"",onChange:c=>f({...a,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),v.value&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.value})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"assignee",children:"Assignee"}),(0,Ye.jsxs)(Me,{value:(ee=(q=a.assignee)==null?void 0:q.id)==null?void 0:ee.toString(),onValueChange:c=>f({...a,assignee:k(c)}),children:[(0,Ye.jsx)(be,{children:(0,Ye.jsx)(Ie,{placeholder:"Select assignee"})}),(0,Ye.jsx)(ve,{children:t&&t.map(c=>{var u;return(0,Ye.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),v.assignee&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.assignee})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"description",children:"Description"}),(0,Ye.jsx)(de,{id:"description",value:a.description||"",onChange:c=>f({...a,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{children:"Categories"}),(0,Ye.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,Ye.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(u=>u.type===c).map(u=>{var G;return(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsx)(ce,{id:u.id.toString(),checked:(G=a.categories)==null?void 0:G.includes(u.id),onCheckedChange:()=>h(u)}),(0,Ye.jsx)("label",{htmlFor:u.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:u.name})]},u.id)})})]},c))})]}),(0,Ye.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ye.jsx)(E,{htmlFor:"closureDate",children:"Closure Date"}),(0,Ye.jsx)(Q,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:c=>f({...a,closureDate:c.target.value})}),v.closureDate&&(0,Ye.jsx)("p",{className:"text-red-500 text-sm",children:v.closureDate})]})]})}),(0,Ye.jsx)(O,{type:"submit",className:"Ye-full",children:s?"Update Deal":"Add Deal"})]}),(0,Ye.jsx)(fe,{open:P,onOpenChange:C,children:(0,Ye.jsxs)(ie,{children:[(0,Ye.jsx)(se,{children:(0,Ye.jsx)(ne,{children:"Add New Customer"})}),(0,Ye.jsx)(xt,{onSubmit:y})]})})]})}function yr({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:i,calculateColumnValue:l,calculateWeightedValue:a,addNewDeal:f,onAddCustomer:P}){let[C,v]=(0,St.useState)(!1);return(0,Ye.jsxs)("div",{className:"flex flex-col Ye-80",children:[(0,Ye.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),f&&(0,Ye.jsxs)(fe,{open:C,onOpenChange:v,children:[(0,Ye.jsx)(tt,{asChild:!0,children:(0,Ye.jsxs)(O,{className:"mb-4 Ye-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Ye.jsx)(et.PlusCircle,{className:"mr-2 h-4 Ye-4"}),"Add New Deal"]})}),(0,Ye.jsxs)(ie,{children:[(0,Ye.jsx)(se,{children:(0,Ye.jsx)(ne,{children:"Add New Deal"})}),(0,Ye.jsx)(Ct,{customers:o,users:r,categories:s,onSubmit:f,onAddCustomer:P,onClose:()=>v(!1)})]})]}),(0,Ye.jsx)(xe.Droppable,{droppableId:e,isDropDisabled:!1,children:x=>(0,Ye.jsxs)("div",{ref:x.innerRef,...x.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((D,L)=>(0,Ye.jsx)(xe.Draggable,{draggableId:D.id.toString(),index:D.id,children:h=>(0,Ye.jsx)("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,children:(0,Ye.jsx)(st,{deal:D,customer:D.customer,categories:s,onClick:()=>i(D)})})},D.id.toString())),x.placeholder]})}),(0,Ye.jsxs)("div",{className:"Ye-4 text-sm p-3 rounded-lg shadow",children:[(0,Ye.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Ye.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,Ye.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Ye.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}0&&(module.exports={KanbanColumn});
@@ -1 +1 @@
1
- import{a}from"../../chunk-4TCLIMFP.mjs";import"../../chunk-PIM2JQYT.mjs";import"../../chunk-OWBJTXZL.mjs";import"../../chunk-BRYZOZKY.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-C5XNOZXC.mjs";import"../../chunk-SPOYKTBR.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as KanbanColumn};
1
+ import{a}from"../../chunk-K2RDP7A3.mjs";import"../../chunk-7PNAXVQ2.mjs";import"../../chunk-Z2EKZZJU.mjs";import"../../chunk-KTQEW4OB.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-C5XNOZXC.mjs";import"../../chunk-SPOYKTBR.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as KanbanColumn};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";var Mt=Object.create;var ue=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var It=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty;var Ht=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},Oe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of It(t))!zt.call(e,s)&&s!==r&&ue(e,s,{get:()=>t[s],enumerable:!(o=Lt(t,s))||o.enumerable});return e};var T=(e,t,r)=>(r=e!=null?Mt(Et(e)):{},Oe(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Bt=e=>Oe(ue({},"__esModule",{value:!0}),e);var Ar={};Ht(Ar,{Default:()=>Tt,EmptyColumn:()=>Dr,default:()=>Nr});module.exports=Bt(Ar);var Nt=require("react");var Xe=require("clsx");var De="-",Vt=e=>{let t=Wt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(De);return a[0]===""&&a.length!==1&&a.shift(),Ke(a,t)||Gt(l)},getConflictingClassGroupIds:(l,a)=>{let f=r[l]||[];return a&&o[l]?[...f,...o[l]]:f}}},Ke=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Ke(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(De);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},je=/^\[(.+)\]$/,Gt=e=>{if(je.test(e)){let t=je.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Wt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ut(Object.entries(e.classGroups),r).forEach(([i,l])=>{Ne(l,o,i,t)}),o},Ne=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:_e(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Ft(s)){Ne(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Ne(l,_e(t,i),r,o)})})},_e=(e,t)=>{let r=e;return t.split(De).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ft=e=>e.isThemeGetter,Ut=(e,t)=>t?e.map(([r,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,Ot=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},qe="!",jt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],i=t.length,l=a=>{let f=[],P=0,C=0,v;for(let y=0;y<a.length;y++){let A=a[y];if(P===0){if(A===s&&(o||a.slice(y,y+i)===t)){f.push(a.slice(C,y)),C=y+i;continue}if(A==="/"){v=y;continue}}A==="["?P++:A==="]"&&P--}let x=f.length===0?a:a.substring(C),D=x.startsWith(qe),M=D?x.substring(1):x,h=v&&v>C?v-C:void 0;return{modifiers:f,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:l}):l},_t=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},Kt=e=>({cache:Ot(e.cacheSize),parseClassName:jt(e),...Vt(e)}),qt=/\s+/,$t=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(qt),a="";for(let f=l.length-1;f>=0;f-=1){let P=l[f],{modifiers:C,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:D}=r(P),M=!!D,h=o(M?x.substring(0,D):x);if(!h){if(!M){a=P+(a.length>0?" "+a:a);continue}if(h=o(x),!h){a=P+(a.length>0?" "+a:a);continue}M=!1}let y=_t(C).join(":"),A=v?y+qe:y,k=A+h;if(i.includes(k))continue;i.push(k);let G=s(h,M);for(let H=0;H<G.length;++H){let K=G[H];i.push(A+K)}a=P+(a.length>0?" "+a:a)}return a};function Jt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$e(t))&&(o&&(o+=" "),o+=r);return o}var $e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=$e(e[o]))&&(r&&(r+=" "),r+=t);return r};function Zt(e,...t){let r,o,s,i=l;function l(f){let P=t.reduce((C,v)=>v(C),e());return r=Kt(P),o=r.cache.get,s=r.cache.set,i=a,a(f)}function a(f){let P=o(f);if(P)return P;let C=$t(f,r);return s(f,C),C}return function(){return i(Jt.apply(null,arguments))}}var g=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qt=/^\d+\/\d+$/,Xt=new Set(["px","full","screen"]),Yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,er=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(rt|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)rt-?((\d+)?\.?(\d+)[a-z]+|0)/,or=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>Z(e)||Xt.has(e)||Qt.test(e),F=e=>Q(e,"length",mr),Z=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>Q(e,"number",Z),re=e=>!!e&&Number.isInteger(Number(e)),ar=e=>e.endsWith("%")&&Z(e.slice(0,-1)),d=e=>Je.test(e),U=e=>Yt.test(e),ir=new Set(["length","size","percentage"]),sr=e=>Q(e,ir,Ze),nr=e=>Q(e,"position",Ze),lr=new Set(["image","url"]),cr=e=>Q(e,lr,ur),dr=e=>Q(e,"",pr),oe=()=>!0,Q=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},mr=e=>er.test(e)&&!tr.test(e),Ze=()=>!1,pr=e=>rr.test(e),ur=e=>or.test(e);var fr=()=>{let e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),s=g("borderColor"),i=g("borderRadius"),l=g("borderSpacing"),a=g("borderWidth"),f=g("contrast"),P=g("grayscale"),C=g("hueRotate"),v=g("invert"),x=g("gap"),D=g("gradientColorStops"),M=g("gradientColorStopPositions"),h=g("inset"),y=g("margin"),A=g("opacity"),k=g("padding"),G=g("saturate"),H=g("scale"),K=g("sepia"),ee=g("skew"),c=g("space"),u=g("translate"),W=()=>["auto","contain","none"],Ce=()=>["auto","hidden","clip","visible","scroll"],Se=()=>["auto",d,t],b=()=>[d,t],Ge=()=>["",V,F],me=()=>["auto",Z,d],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Pe=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",d],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Z,d];return{cacheSize:500,separator:":",theme:{colors:[oe],spacing:[V,F],blur:["none","",U,d],brightness:B(),borderColor:[e],borderRadius:["none","","full",U,d],borderSpacing:b(),borderWidth:Ge(),contrast:B(),grayscale:te(),hueRotate:B(),invert:te(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[ar,F],inset:Se(),margin:Se(),opacity:B(),padding:b(),saturate:B(),scale:B(),sepia:te(),skew:B(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...We(),d]}],overflow:[{overflow:Ce()}],"overflow-x":[{"overflow-x":Ce()}],"overflow-y":[{"overflow-y":Ce()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",re,d]}],basis:[{basis:Se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",re,d]}],"grid-cols":[{"grid-cols":[oe]}],"col-start-end":[{col:["auto",{span:["full",re,d]},d]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[oe]}],"row-start-end":[{row:["auto",{span:[re,d]},d]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],rt:[{rt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[c]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[c]}],"space-y-reverse":["space-y-reverse"],rt:[{rt:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-rt":[{"min-rt":[d,t,"min","max","fit"]}],"max-rt":[{"max-rt":[d,t,"none","full","min","max","fit","prose",{screen:[U]},U]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",U,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Re]}],"font-family":[{font:[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",d]}],"line-clamp":[{"line-clamp":["none",Z,Re]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",V,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[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:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",V,F]}],"underline-offset":[{"underline-offset":["auto",V,d]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),nr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[M]}],"gradient-via-pos":[{via:[M]}],"gradient-to-pos":[{to:[M]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-rt":[{border:[a]}],"border-rt-x":[{"border-x":[a]}],"border-rt-y":[{"border-y":[a]}],"border-rt-s":[{"border-s":[a]}],"border-rt-e":[{"border-e":[a]}],"border-rt-t":[{"border-t":[a]}],"border-rt-r":[{"border-r":[a]}],"border-rt-b":[{"border-b":[a]}],"border-rt-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[V,d]}],"outline-rt":[{outline:[V,F]}],"outline-color":[{outline:[e]}],"ring-rt":[{ring:Ge()}],"ring-rt-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-rt":[{"ring-offset":[V,F]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,dr]}],"shadow-color":[{shadow:[oe]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...Fe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Fe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",U,d]}],grayscale:[{grayscale:[P]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[v]}],saturate:[{saturate:[G]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[re,d]}],"translate-x":[{"translate-x":[u]}],"translate-y":[{"translate-y":[u]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","rt-resize","e-resize","s-resize","rt-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-rt":[{"scroll-rt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","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",d]}],fill:[{fill:[e,"none"]}],"stroke-rt":[{stroke:[V,F,Re]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","rt","mr","mb","ml"],mx:["mr","ml"],my:["rt","mb"],size:["rt","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-rt":["border-rt-s","border-rt-e","border-rt-t","border-rt-r","border-rt-b","border-rt-l"],"border-rt-x":["border-rt-r","border-rt-l"],"border-rt-y":["border-rt-t","border-rt-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-rt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-rt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Qe=Zt(fr);function m(...e){return Qe((0,Xe.clsx)(e))}var Ye=require("@radix-ui/react-slot"),et=require("class-variance-authority"),tt=T(require("react")),rt=require("react/jsx-runtime"),gr=(0,et.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 rt-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"}}}),O=tt.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},i)=>(0,rt.jsx)(e?Ye.Slot:"button",{className:m(gr({className:t,size:r,variant:o})),ref:i,...s}));O.displayName="Button";var ae=T(require("react")),R=T(require("@radix-ui/react-dialog")),ot=require("lucide-react");var fe=R.Root,at=R.Trigger,br=R.Portal;var it=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));it.displayName=R.Overlay.displayName;var ie=ae.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(br,{children:[(0,rt.jsx)(it,{}),(0,rt.jsxs)(R.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid rt-full max-rt-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,rt.jsxs)(R.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,rt.jsx)(ot.X,{className:"h-4 rt-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ie.displayName=R.Content.displayName;var se=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});se.displayName="DialogHeader";var vr=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vr.displayName="DialogFooter";var ne=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));ne.displayName=R.Title.displayName;var hr=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));hr.displayName=R.Description.displayName;var q=T(require("react"));var Ae=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ae.displayName="Card";var ke=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ke.displayName="CardHeader";var Te=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var yr=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));yr.displayName="CardDescription";var Me=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));Me.displayName="CardContent";var xr=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));xr.displayName="CardFooter";var wr=(0,et.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function nt({className:e,variant:t,...r}){return(0,rt.jsx)("div",{className:m(wr({variant:t}),e),...r})}function ct({deal:e,customer:t,categories:r,onClick:o}){let s=r.find(i=>{var l;return i.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(i.id)});return(0,rt.jsxs)(Ae,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,rt.jsxs)(ke,{className:"pb-2",children:[(0,rt.jsx)("div",{className:"flex justify-between items-center",children:(0,rt.jsx)(Te,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,rt.jsx)("p",{className:"text-sm text-gray-500 rt-1",children:e.description})]}),(0,rt.jsxs)(Me,{children:[(0,rt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,rt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,rt.jsx)(ot.UserIcon,{className:"rt-4 h-4 mr-1 text-xs"}),(0,rt.jsx)("span",{children:e.assignee.name})]}),(0,rt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,rt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,rt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,rt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,rt.jsx)(ot.CalendarIcon,{className:"rt-3 h-3 mr-1"}),(0,rt.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,rt.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,rt.jsx)(nt,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var xe=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");var dt=T(require("react"));var X=dt.forwardRef(({className:e,type:t,...r},o)=>(0,rt.jsx)("input",{type:t,className:m("flex h-9 rt-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));X.displayName="Input";var pt=T(require("react")),Le=T(require("@radix-ui/react-label"));var Cr=(0,et.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=pt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(Le.Root,{ref:r,className:m(Cr(),e),...t}));E.displayName=Le.Root.displayName;var p=T(require("@radix-ui/react-select")),j=T(require("react")),Ie=p.Root;var Ee=p.Value,be=j.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Trigger,{className:m("flex h-10 rt-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,rt.jsx)(p.Icon,{asChild:!0,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 rt-4 opacity-50"})})]}));be.displayName=p.Trigger.displayName;var gt=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronUp,{className:"h-4 rt-4"})}));gt.displayName=p.ScrollUpButton.displayName;var bt=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 rt-4"})}));bt.displayName=p.ScrollDownButton.displayName;var ve=j.forwardRef(({children:e,className:t,position:r="popper",...o},s)=>(0,rt.jsx)(p.Portal,{children:(0,rt.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-rt-[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:s,...o,children:[(0,rt.jsx)(gt,{}),(0,rt.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] rt-full min-rt-[var(--radix-select-trigger-width)]"),children:e}),(0,rt.jsx)(bt,{})]})}));ve.displayName=p.Content.displayName;var Sr=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Sr.displayName=p.Label.displayName;var he=j.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Item,{className:m("relative flex rt-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 rt-3.5 items-center justify-center",children:(0,rt.jsx)(p.ItemIndicator,{children:(0,rt.jsx)(ot.Check,{className:"h-4 rt-4"})})}),(0,rt.jsx)(p.ItemText,{children:e})]}));he.displayName=p.Item.displayName;var Pr=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Pr.displayName=p.Separator.displayName;var le=T(require("@radix-ui/react-checkbox")),ht=T(require("react")),ce=ht.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(le.Root,{className:m("peer h-4 rt-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,rt.jsx)(le.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,rt.jsx)(ot.Check,{className:"h-4 rt-4"})})}));ce.displayName=le.Root.displayName;var yt=T(require("react")),de=yt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("textarea",{className:m("flex min-h-[80px] rt-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}));de.displayName="Textarea";var ze=T(require("react")),z=T(require("@radix-ui/react-scroll-area"));var He=ze.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(z.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,rt.jsx)(z.Viewport,{className:"h-full rt-full rounded-[inherit]",children:t}),(0,rt.jsx)(wt,{}),(0,rt.jsx)(z.Corner,{})]}));He.displayName=z.Root.displayName;var wt=ze.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,rt.jsx)(z.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full rt-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,rt.jsx)(z.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));wt.displayName=z.ScrollAreaScrollbar.displayName;function St({onSubmit:e}){var s;let[t,r]=(0,Nt.useState)({name:"",intro:"",active:!0});return(0,rt.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,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(E,{htmlFor:"customerName",children:"Customer Name"}),(0,rt.jsx)(X,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(E,{htmlFor:"customerIntro",children:"Intro"}),(0,rt.jsx)(de,{id:"customerIntro",value:(s=t.intro)!=null?s:"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ce,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,rt.jsx)(E,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,rt.jsx)(O,{type:"submit",className:"rt-full",children:"Add Customer"})]})}function Rt({customers:e,users:t,categories:r,onSubmit:o,initialDeal:s,onAddCustomer:i,onClose:l}){var G,H,K,ee;let[a,f]=(0,Nt.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[P,C]=(0,Nt.useState)(!1),[v,x]=(0,Nt.useState)({});(0,Nt.useEffect)(()=>{s&&f(s)},[s]);let D=()=>{let c={};return a.customer||(c.customer="Customer is required"),a.value||(c.value="Value is required"),a.assignee||(c.assignee="Assignee is required"),a.closureDate||(c.closureDate="Closure Date is required"),x(c),Object.keys(c).length===0},M=async c=>{c.preventDefault(),x({});try{if(D()){let u=await o({...a});u.success?(f({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):x(u.errors||{})}}catch{x({submit:"An error occurred while submitting the form."})}},h=c=>{f(u=>({...u,categories:(u.categories||[]).includes(c.id)?(u.categories||[]).filter(W=>W!==c.id):[...u.categories||[],c.id]}))},y=async c=>{f({...a,customer:c});try{let u=await i(c);u.success?C(!1):x(u.errors||{})}catch{x({submit:"An error occurred while submitting the form."})}},A=c=>t==null?void 0:t.find(u=>u.id===Number(c)),k=c=>e==null?void 0:e.find(u=>u.id===Number(c));return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsxs)("form",{onSubmit:M,className:"space-y-6",children:[(0,rt.jsx)(He,{className:"h-[60vh] pr-4",children:(0,rt.jsxs)("div",{className:"space-y-6 px-4",children:[(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"customer",children:"Customer"}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsxs)(Ie,{value:(H=(G=a.customer)==null?void 0:G.id)==null?void 0:H.toString(),onValueChange:c=>f({...a,customer:k(c)}),children:[(0,rt.jsx)(be,{children:(0,rt.jsx)(Ee,{placeholder:"Select customer"})}),(0,rt.jsx)(ve,{children:e.map(c=>{var u;return(0,rt.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),(0,rt.jsx)(O,{variant:"outline",size:"icon",onClick:()=>C(!0),children:(0,rt.jsx)(ot.PlusIcon,{className:"rt-5 h-5"})})]}),v.customerId&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.customerId})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"value",children:"Value"}),(0,rt.jsx)(X,{id:"value",type:"number",value:a.value||"",onChange:c=>f({...a,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),v.value&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.value})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"assignee",children:"Assignee"}),(0,rt.jsxs)(Ie,{value:(ee=(K=a.assignee)==null?void 0:K.id)==null?void 0:ee.toString(),onValueChange:c=>f({...a,assignee:A(c)}),children:[(0,rt.jsx)(be,{children:(0,rt.jsx)(Ee,{placeholder:"Select assignee"})}),(0,rt.jsx)(ve,{children:t&&t.map(c=>{var u;return(0,rt.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),v.assignee&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.assignee})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(de,{id:"description",value:a.description||"",onChange:c=>f({...a,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{children:"Categories"}),(0,rt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,rt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(u=>u.type===c).map(u=>{var W;return(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ce,{id:u.id.toString(),checked:(W=a.categories)==null?void 0:W.includes(u.id),onCheckedChange:()=>h(u)}),(0,rt.jsx)("label",{htmlFor:u.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:u.name})]},u.id)})})]},c))})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"closureDate",children:"Closure Date"}),(0,rt.jsx)(X,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:c=>f({...a,closureDate:c.target.value})}),v.closureDate&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.closureDate})]})]})}),(0,rt.jsx)(O,{type:"submit",className:"rt-full",children:s?"Update Deal":"Add Deal"})]}),(0,rt.jsx)(fe,{open:P,onOpenChange:C,children:(0,rt.jsxs)(ie,{children:[(0,rt.jsx)(se,{children:(0,rt.jsx)(ne,{children:"Add New Customer"})}),(0,rt.jsx)(St,{onSubmit:y})]})})]})}function At({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:i,calculateColumnValue:l,calculateWeightedValue:a,addNewDeal:f,onAddCustomer:P}){let[C,v]=(0,Nt.useState)(!1);return(0,rt.jsxs)("div",{className:"flex flex-col rt-80",children:[(0,rt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),f&&(0,rt.jsxs)(fe,{open:C,onOpenChange:v,children:[(0,rt.jsx)(at,{asChild:!0,children:(0,rt.jsxs)(O,{className:"mb-4 rt-full bg-green-500 hover:bg-green-600 text-white",children:[(0,rt.jsx)(ot.PlusCircle,{className:"mr-2 h-4 rt-4"}),"Add New Deal"]})}),(0,rt.jsxs)(ie,{children:[(0,rt.jsx)(se,{children:(0,rt.jsx)(ne,{children:"Add New Deal"})}),(0,rt.jsx)(Rt,{customers:o,users:r,categories:s,onSubmit:f,onAddCustomer:P,onClose:()=>v(!1)})]})]}),(0,rt.jsx)(xe.Droppable,{droppableId:e,isDropDisabled:!1,children:x=>(0,rt.jsxs)("div",{ref:x.innerRef,...x.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((D,M)=>(0,rt.jsx)(xe.Draggable,{draggableId:D.id.toString(),index:D.id,children:h=>(0,rt.jsx)("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,children:(0,rt.jsx)(ct,{deal:D,customer:D.customer,categories:s,onClick:()=>i(D)})})},D.id.toString())),x.placeholder]})}),(0,rt.jsxs)("div",{className:"rt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,rt.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,rt.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,rt.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,rt.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var Ve=[{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"}],we=[{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"}],Be=[{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"}],kt=[{id:1,customer:Ve[0],value:5e4,assignee:Be[2],status:"Qualified",categories:we.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:Be[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:we.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:Be[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var Rr={title:"CRM/KanbanColumn",component:At,parameters:{layout:"centered"}},Nr=Rr,Tt={args:{status:"Qualified",deals:kt.filter(e=>e.status==="Qualified"),customers:Ve,categories:we,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)}},Dr={args:{...Tt.args,status:"Won",deals:[]}};0&&(module.exports={Default,EmptyColumn});
4
+ "use strict";var Mt=Object.create;var ue=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var It=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty;var Ht=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},Oe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of It(t))!zt.call(e,s)&&s!==r&&ue(e,s,{get:()=>t[s],enumerable:!(o=Lt(t,s))||o.enumerable});return e};var T=(e,t,r)=>(r=e!=null?Mt(Et(e)):{},Oe(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Bt=e=>Oe(ue({},"__esModule",{value:!0}),e);var Ar={};Ht(Ar,{Default:()=>Tt,EmptyColumn:()=>Dr,default:()=>Nr});module.exports=Bt(Ar);var Nt=require("react");var Xe=require("clsx");var De="-",Vt=e=>{let t=Wt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(De);return a[0]===""&&a.length!==1&&a.shift(),Ke(a,t)||Gt(l)},getConflictingClassGroupIds:(l,a)=>{let f=r[l]||[];return a&&o[l]?[...f,...o[l]]:f}}},Ke=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Ke(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(De);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},je=/^\[(.+)\]$/,Gt=e=>{if(je.test(e)){let t=je.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Wt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Ut(Object.entries(e.classGroups),r).forEach(([i,l])=>{Ne(l,o,i,t)}),o},Ne=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:_e(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Ft(s)){Ne(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Ne(l,_e(t,i),r,o)})})},_e=(e,t)=>{let r=e;return t.split(De).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ft=e=>e.isThemeGetter,Ut=(e,t)=>t?e.map(([r,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,Ot=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},qe="!",jt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],i=t.length,l=a=>{let f=[],P=0,C=0,v;for(let y=0;y<a.length;y++){let A=a[y];if(P===0){if(A===s&&(o||a.slice(y,y+i)===t)){f.push(a.slice(C,y)),C=y+i;continue}if(A==="/"){v=y;continue}}A==="["?P++:A==="]"&&P--}let x=f.length===0?a:a.substring(C),D=x.startsWith(qe),M=D?x.substring(1):x,h=v&&v>C?v-C:void 0;return{modifiers:f,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:l}):l},_t=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},Kt=e=>({cache:Ot(e.cacheSize),parseClassName:jt(e),...Vt(e)}),qt=/\s+/,$t=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(qt),a="";for(let f=l.length-1;f>=0;f-=1){let P=l[f],{modifiers:C,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:D}=r(P),M=!!D,h=o(M?x.substring(0,D):x);if(!h){if(!M){a=P+(a.length>0?" "+a:a);continue}if(h=o(x),!h){a=P+(a.length>0?" "+a:a);continue}M=!1}let y=_t(C).join(":"),A=v?y+qe:y,k=A+h;if(i.includes(k))continue;i.push(k);let G=s(h,M);for(let H=0;H<G.length;++H){let K=G[H];i.push(A+K)}a=P+(a.length>0?" "+a:a)}return a};function Jt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$e(t))&&(o&&(o+=" "),o+=r);return o}var $e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=$e(e[o]))&&(r&&(r+=" "),r+=t);return r};function Zt(e,...t){let r,o,s,i=l;function l(f){let P=t.reduce((C,v)=>v(C),e());return r=Kt(P),o=r.cache.get,s=r.cache.set,i=a,a(f)}function a(f){let P=o(f);if(P)return P;let C=$t(f,r);return s(f,C),C}return function(){return i(Jt.apply(null,arguments))}}var g=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qt=/^\d+\/\d+$/,Xt=new Set(["px","full","screen"]),Yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,er=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(rt|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)rt-?((\d+)?\.?(\d+)[a-z]+|0)/,or=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>Z(e)||Xt.has(e)||Qt.test(e),F=e=>Q(e,"length",mr),Z=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>Q(e,"number",Z),re=e=>!!e&&Number.isInteger(Number(e)),ar=e=>e.endsWith("%")&&Z(e.slice(0,-1)),d=e=>Je.test(e),U=e=>Yt.test(e),ir=new Set(["length","size","percentage"]),sr=e=>Q(e,ir,Ze),nr=e=>Q(e,"position",Ze),lr=new Set(["image","url"]),cr=e=>Q(e,lr,ur),dr=e=>Q(e,"",pr),oe=()=>!0,Q=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},mr=e=>er.test(e)&&!tr.test(e),Ze=()=>!1,pr=e=>rr.test(e),ur=e=>or.test(e);var fr=()=>{let e=g("colors"),t=g("spacing"),r=g("blur"),o=g("brightness"),s=g("borderColor"),i=g("borderRadius"),l=g("borderSpacing"),a=g("borderWidth"),f=g("contrast"),P=g("grayscale"),C=g("hueRotate"),v=g("invert"),x=g("gap"),D=g("gradientColorStops"),M=g("gradientColorStopPositions"),h=g("inset"),y=g("margin"),A=g("opacity"),k=g("padding"),G=g("saturate"),H=g("scale"),K=g("sepia"),ee=g("skew"),c=g("space"),u=g("translate"),W=()=>["auto","contain","none"],Ce=()=>["auto","hidden","clip","visible","scroll"],Se=()=>["auto",d,t],b=()=>[d,t],Ge=()=>["",V,F],me=()=>["auto",Z,d],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Pe=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",d],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Z,d];return{cacheSize:500,separator:":",theme:{colors:[oe],spacing:[V,F],blur:["none","",U,d],brightness:B(),borderColor:[e],borderRadius:["none","","full",U,d],borderSpacing:b(),borderWidth:Ge(),contrast:B(),grayscale:te(),hueRotate:B(),invert:te(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[ar,F],inset:Se(),margin:Se(),opacity:B(),padding:b(),saturate:B(),scale:B(),sepia:te(),skew:B(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...We(),d]}],overflow:[{overflow:Ce()}],"overflow-x":[{"overflow-x":Ce()}],"overflow-y":[{"overflow-y":Ce()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",re,d]}],basis:[{basis:Se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",re,d]}],"grid-cols":[{"grid-cols":[oe]}],"col-start-end":[{col:["auto",{span:["full",re,d]},d]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[oe]}],"row-start-end":[{row:["auto",{span:[re,d]},d]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],rt:[{rt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[c]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[c]}],"space-y-reverse":["space-y-reverse"],rt:[{rt:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-rt":[{"min-rt":[d,t,"min","max","fit"]}],"max-rt":[{"max-rt":[d,t,"none","full","min","max","fit","prose",{screen:[U]},U]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",U,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Re]}],"font-family":[{font:[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",d]}],"line-clamp":[{"line-clamp":["none",Z,Re]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",V,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[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:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",V,F]}],"underline-offset":[{"underline-offset":["auto",V,d]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),nr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[M]}],"gradient-via-pos":[{via:[M]}],"gradient-to-pos":[{to:[M]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-rt":[{border:[a]}],"border-rt-x":[{"border-x":[a]}],"border-rt-y":[{"border-y":[a]}],"border-rt-s":[{"border-s":[a]}],"border-rt-e":[{"border-e":[a]}],"border-rt-t":[{"border-t":[a]}],"border-rt-r":[{"border-r":[a]}],"border-rt-b":[{"border-b":[a]}],"border-rt-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[V,d]}],"outline-rt":[{outline:[V,F]}],"outline-color":[{outline:[e]}],"ring-rt":[{ring:Ge()}],"ring-rt-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-rt":[{"ring-offset":[V,F]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",U,dr]}],"shadow-color":[{shadow:[oe]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...Fe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Fe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",U,d]}],grayscale:[{grayscale:[P]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[v]}],saturate:[{saturate:[G]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[re,d]}],"translate-x":[{"translate-x":[u]}],"translate-y":[{"translate-y":[u]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","rt-resize","e-resize","s-resize","rt-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-rt":[{"scroll-rt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","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",d]}],fill:[{fill:[e,"none"]}],"stroke-rt":[{stroke:[V,F,Re]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","rt","mr","mb","ml"],mx:["mr","ml"],my:["rt","mb"],size:["rt","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-rt":["border-rt-s","border-rt-e","border-rt-t","border-rt-r","border-rt-b","border-rt-l"],"border-rt-x":["border-rt-r","border-rt-l"],"border-rt-y":["border-rt-t","border-rt-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-rt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-rt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Qe=Zt(fr);function m(...e){return Qe((0,Xe.clsx)(e))}var Ye=require("@radix-ui/react-slot"),et=require("class-variance-authority"),tt=T(require("react")),rt=require("react/jsx-runtime"),gr=(0,et.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 rt-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"}}}),O=tt.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},i)=>(0,rt.jsx)(e?Ye.Slot:"button",{className:m(gr({className:t,size:r,variant:o})),ref:i,...s}));O.displayName="Button";var ae=T(require("react")),R=T(require("@radix-ui/react-dialog")),ot=require("lucide-react");var fe=R.Root,at=R.Trigger,br=R.Portal;var it=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));it.displayName=R.Overlay.displayName;var ie=ae.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(br,{children:[(0,rt.jsx)(it,{}),(0,rt.jsxs)(R.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid rt-full max-rt-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,rt.jsxs)(R.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,rt.jsx)(ot.X,{className:"h-4 rt-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ie.displayName=R.Content.displayName;var se=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});se.displayName="DialogHeader";var vr=({className:e,...t})=>(0,rt.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vr.displayName="DialogFooter";var ne=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));ne.displayName=R.Title.displayName;var hr=ae.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(R.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));hr.displayName=R.Description.displayName;var q=T(require("react"));var Ae=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ae.displayName="Card";var ke=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ke.displayName="CardHeader";var Te=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var yr=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));yr.displayName="CardDescription";var Me=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));Me.displayName="CardContent";var xr=q.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));xr.displayName="CardFooter";var wr=(0,et.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function nt({className:e,variant:t,...r}){return(0,rt.jsx)("div",{className:m(wr({variant:t}),e),...r})}function ct({deal:e,customer:t,categories:r,onClick:o}){let s=r.find(i=>{var l;return i.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(i.id)});return(0,rt.jsxs)(Ae,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,rt.jsxs)(ke,{className:"pb-2",children:[(0,rt.jsx)("div",{className:"flex justify-between items-center",children:(0,rt.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t==null?void 0:t.name})}),(0,rt.jsx)("p",{className:"text-sm text-gray-500 rt-1",children:e.description})]}),(0,rt.jsxs)(Me,{children:[(0,rt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,rt.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,rt.jsx)(ot.UserIcon,{className:"rt-4 h-4 mr-1 text-xs"}),(0,rt.jsx)("span",{children:e.assignee.name})]}),(0,rt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,rt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,rt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,rt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,rt.jsx)(ot.CalendarIcon,{className:"rt-3 h-3 mr-1"}),(0,rt.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,rt.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,rt.jsx)(nt,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var xe=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");var dt=T(require("react"));var X=dt.forwardRef(({className:e,type:t,...r},o)=>(0,rt.jsx)("input",{type:t,className:m("flex h-9 rt-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));X.displayName="Input";var pt=T(require("react")),Le=T(require("@radix-ui/react-label"));var Cr=(0,et.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=pt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(Le.Root,{ref:r,className:m(Cr(),e),...t}));E.displayName=Le.Root.displayName;var p=T(require("@radix-ui/react-select")),j=T(require("react")),Ie=p.Root;var Ee=p.Value,be=j.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Trigger,{className:m("flex h-10 rt-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,rt.jsx)(p.Icon,{asChild:!0,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 rt-4 opacity-50"})})]}));be.displayName=p.Trigger.displayName;var gt=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronUp,{className:"h-4 rt-4"})}));gt.displayName=p.ScrollUpButton.displayName;var bt=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,rt.jsx)(ot.ChevronDown,{className:"h-4 rt-4"})}));bt.displayName=p.ScrollDownButton.displayName;var ve=j.forwardRef(({children:e,className:t,position:r="popper",...o},s)=>(0,rt.jsx)(p.Portal,{children:(0,rt.jsxs)(p.Content,{className:m("relative z-50 max-h-96 min-rt-[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:s,...o,children:[(0,rt.jsx)(gt,{}),(0,rt.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] rt-full min-rt-[var(--radix-select-trigger-width)]"),children:e}),(0,rt.jsx)(bt,{})]})}));ve.displayName=p.Content.displayName;var Sr=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Sr.displayName=p.Label.displayName;var he=j.forwardRef(({children:e,className:t,...r},o)=>(0,rt.jsxs)(p.Item,{className:m("relative flex rt-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 rt-3.5 items-center justify-center",children:(0,rt.jsx)(p.ItemIndicator,{children:(0,rt.jsx)(ot.Check,{className:"h-4 rt-4"})})}),(0,rt.jsx)(p.ItemText,{children:e})]}));he.displayName=p.Item.displayName;var Pr=j.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Pr.displayName=p.Separator.displayName;var le=T(require("@radix-ui/react-checkbox")),ht=T(require("react")),ce=ht.forwardRef(({className:e,...t},r)=>(0,rt.jsx)(le.Root,{className:m("peer h-4 rt-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,rt.jsx)(le.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,rt.jsx)(ot.Check,{className:"h-4 rt-4"})})}));ce.displayName=le.Root.displayName;var yt=T(require("react")),de=yt.forwardRef(({className:e,...t},r)=>(0,rt.jsx)("textarea",{className:m("flex min-h-[80px] rt-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}));de.displayName="Textarea";var ze=T(require("react")),z=T(require("@radix-ui/react-scroll-area"));var He=ze.forwardRef(({className:e,children:t,...r},o)=>(0,rt.jsxs)(z.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,rt.jsx)(z.Viewport,{className:"h-full rt-full rounded-[inherit]",children:t}),(0,rt.jsx)(wt,{}),(0,rt.jsx)(z.Corner,{})]}));He.displayName=z.Root.displayName;var wt=ze.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,rt.jsx)(z.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full rt-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,rt.jsx)(z.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));wt.displayName=z.ScrollAreaScrollbar.displayName;function St({onSubmit:e}){var s;let[t,r]=(0,Nt.useState)({name:"",intro:"",active:!1});return(0,rt.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,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(E,{htmlFor:"customerName",children:"Customer Name"}),(0,rt.jsx)(X,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(E,{htmlFor:"customerIntro",children:"Intro"}),(0,rt.jsx)(de,{id:"customerIntro",value:(s=t.intro)!=null?s:"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ce,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,rt.jsx)(E,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,rt.jsx)(O,{type:"submit",className:"rt-full",children:"Add Customer"})]})}function Rt({customers:e,users:t,categories:r,onSubmit:o,initialDeal:s,onAddCustomer:i,onClose:l}){var G,H,K,ee;let[a,f]=(0,Nt.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[P,C]=(0,Nt.useState)(!1),[v,x]=(0,Nt.useState)({});(0,Nt.useEffect)(()=>{s&&f(s)},[s]);let D=()=>{let c={};return a.customer||(c.customer="Customer is required"),a.value||(c.value="Value is required"),a.assignee||(c.assignee="Assignee is required"),a.closureDate||(c.closureDate="Closure Date is required"),x(c),Object.keys(c).length===0},M=async c=>{c.preventDefault(),x({});try{if(D()){let u=await o({...a});u.success?(f({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):x(u.errors||{})}}catch{x({submit:"An error occurred while submitting the form."})}},h=c=>{f(u=>({...u,categories:(u.categories||[]).includes(c.id)?(u.categories||[]).filter(W=>W!==c.id):[...u.categories||[],c.id]}))},y=async c=>{f({...a,customer:c});try{let u=await i(c);u.success?C(!1):x(u.errors||{})}catch{x({submit:"An error occurred while submitting the form."})}},A=c=>t==null?void 0:t.find(u=>u.id===Number(c)),k=c=>e==null?void 0:e.find(u=>u.id===Number(c));return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsxs)("form",{onSubmit:M,className:"space-y-6",children:[(0,rt.jsx)(He,{className:"h-[60vh] pr-4",children:(0,rt.jsxs)("div",{className:"space-y-6 px-4",children:[(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"customer",children:"Customer"}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsxs)(Ie,{value:(H=(G=a.customer)==null?void 0:G.id)==null?void 0:H.toString(),onValueChange:c=>f({...a,customer:k(c)}),children:[(0,rt.jsx)(be,{children:(0,rt.jsx)(Ee,{placeholder:"Select customer"})}),(0,rt.jsx)(ve,{children:e.map(c=>{var u;return(0,rt.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),(0,rt.jsx)(O,{variant:"outline",size:"icon",onClick:()=>C(!0),children:(0,rt.jsx)(ot.PlusIcon,{className:"rt-5 h-5"})})]}),v.customerId&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.customerId})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"value",children:"Value"}),(0,rt.jsx)(X,{id:"value",type:"number",value:a.value||"",onChange:c=>f({...a,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),v.value&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.value})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"assignee",children:"Assignee"}),(0,rt.jsxs)(Ie,{value:(ee=(K=a.assignee)==null?void 0:K.id)==null?void 0:ee.toString(),onValueChange:c=>f({...a,assignee:A(c)}),children:[(0,rt.jsx)(be,{children:(0,rt.jsx)(Ee,{placeholder:"Select assignee"})}),(0,rt.jsx)(ve,{children:t&&t.map(c=>{var u;return(0,rt.jsx)(he,{value:((u=c.id)==null?void 0:u.toString())||"",children:c.name},c.id)})})]}),v.assignee&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.assignee})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(de,{id:"description",value:a.description||"",onChange:c=>f({...a,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{children:"Categories"}),(0,rt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,rt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(u=>u.type===c).map(u=>{var W;return(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ce,{id:u.id.toString(),checked:(W=a.categories)==null?void 0:W.includes(u.id),onCheckedChange:()=>h(u)}),(0,rt.jsx)("label",{htmlFor:u.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:u.name})]},u.id)})})]},c))})]}),(0,rt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,rt.jsx)(E,{htmlFor:"closureDate",children:"Closure Date"}),(0,rt.jsx)(X,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:c=>f({...a,closureDate:c.target.value})}),v.closureDate&&(0,rt.jsx)("p",{className:"text-red-500 text-sm",children:v.closureDate})]})]})}),(0,rt.jsx)(O,{type:"submit",className:"rt-full",children:s?"Update Deal":"Add Deal"})]}),(0,rt.jsx)(fe,{open:P,onOpenChange:C,children:(0,rt.jsxs)(ie,{children:[(0,rt.jsx)(se,{children:(0,rt.jsx)(ne,{children:"Add New Customer"})}),(0,rt.jsx)(St,{onSubmit:y})]})})]})}function At({status:e,deals:t,users:r,customers:o,categories:s,onDealClick:i,calculateColumnValue:l,calculateWeightedValue:a,addNewDeal:f,onAddCustomer:P}){let[C,v]=(0,Nt.useState)(!1);return(0,rt.jsxs)("div",{className:"flex flex-col rt-80",children:[(0,rt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),f&&(0,rt.jsxs)(fe,{open:C,onOpenChange:v,children:[(0,rt.jsx)(at,{asChild:!0,children:(0,rt.jsxs)(O,{className:"mb-4 rt-full bg-green-500 hover:bg-green-600 text-white",children:[(0,rt.jsx)(ot.PlusCircle,{className:"mr-2 h-4 rt-4"}),"Add New Deal"]})}),(0,rt.jsxs)(ie,{children:[(0,rt.jsx)(se,{children:(0,rt.jsx)(ne,{children:"Add New Deal"})}),(0,rt.jsx)(Rt,{customers:o,users:r,categories:s,onSubmit:f,onAddCustomer:P,onClose:()=>v(!1)})]})]}),(0,rt.jsx)(xe.Droppable,{droppableId:e,isDropDisabled:!1,children:x=>(0,rt.jsxs)("div",{ref:x.innerRef,...x.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((D,M)=>(0,rt.jsx)(xe.Draggable,{draggableId:D.id.toString(),index:D.id,children:h=>(0,rt.jsx)("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,children:(0,rt.jsx)(ct,{deal:D,customer:D.customer,categories:s,onClick:()=>i(D)})})},D.id.toString())),x.placeholder]})}),(0,rt.jsxs)("div",{className:"rt-4 text-sm p-3 rounded-lg shadow",children:[(0,rt.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,rt.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,rt.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,rt.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var Ve=[{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"}],we=[{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"}],Be=[{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"}],kt=[{id:1,customer:Ve[0],value:5e4,assignee:Be[2],status:"Qualified",categories:we.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:Be[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:we.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:Be[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var Rr={title:"CRM/KanbanColumn",component:At,parameters:{layout:"centered"}},Nr=Rr,Tt={args:{status:"Qualified",deals:kt.filter(e=>e.status==="Qualified"),customers:Ve,categories:we,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)}},Dr={args:{...Tt.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-4TCLIMFP.mjs";import"../../chunk-PIM2JQYT.mjs";import"../../chunk-OWBJTXZL.mjs";import"../../chunk-BRYZOZKY.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-C5XNOZXC.mjs";import"../../chunk-SPOYKTBR.mjs";import"../../chunk-S7OK7D5I.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-K2RDP7A3.mjs";import"../../chunk-7PNAXVQ2.mjs";import"../../chunk-Z2EKZZJU.mjs";import"../../chunk-KTQEW4OB.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-C5XNOZXC.mjs";import"../../chunk-SPOYKTBR.mjs";import"../../chunk-S7OK7D5I.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};