@accounter/client 0.0.8-alpha-20251030162201-d2f279aafe537912ec3546af855cbd3a38ac0f5c → 0.0.8-alpha-20251030162303-87017b2c2addf0e61478260aac336b9343f15c98

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 (116) hide show
  1. package/CHANGELOG.md +1 -16
  2. package/dist/assets/{Checkbox-qEdmT4HE.js → Checkbox-CLE7WylX.js} +2 -2
  3. package/dist/assets/{MultiSelect-Dm9mO7pJ.js → MultiSelect-SsgUtHuW.js} +1 -1
  4. package/dist/assets/{Progress-kr0gnfBa.js → Progress-D7j8SJRp.js} +1 -1
  5. package/dist/assets/{Table-DnHfGe-y.js → Table-DpZKU9e6.js} +1 -1
  6. package/dist/assets/{Typography-Cu3puAUK.js → Typography-DOCvIzjw.js} +1 -1
  7. package/dist/assets/{YearPickerInput-oa86GF4P.js → YearPickerInput-BbyQMsmW.js} +1 -1
  8. package/dist/assets/{accordion-DLtMSqIv.js → accordion-KRd9M_7N.js} +1 -1
  9. package/dist/assets/{accountant-approvals-DsL0uiBa.js → accountant-approvals-BWkXiUJx.js} +1 -1
  10. package/dist/assets/{accounter-table-BL_yrGIl.js → accounter-table-BvOYdMv2.js} +1 -1
  11. package/dist/assets/{addDays-DqZEDZy3.js → addDays-HTdY9JyJ.js} +1 -1
  12. package/dist/assets/{all-charges-D3Xf-pEY.js → all-charges-uOrXkSoe.js} +1 -1
  13. package/dist/assets/{arrow-up-down-DchtBEG4.js → arrow-up-down-D0e6luFS.js} +1 -1
  14. package/dist/assets/{building-2-ZTKteVvf.js → building-2-BScQAy2y.js} +1 -1
  15. package/dist/assets/{business-extended-info-1mzdXJbs.js → business-extended-info-BPdDug4k.js} +4 -4
  16. package/dist/assets/{business-header-CJqfKV4d.js → business-header-ScM944FH.js} +1 -1
  17. package/dist/assets/{business-ledger-filters-BRB1r_DP.js → business-ledger-filters-C6zdPVNQ.js} +1 -1
  18. package/dist/assets/{business-ledger-single-C8FIQJ8V.js → business-ledger-single-D_gxQY7c.js} +1 -1
  19. package/dist/assets/business-qHY5sNtm.js +37 -0
  20. package/dist/assets/business-trip-BD6qMULS.js +1 -0
  21. package/dist/assets/{charge-Df3lWZH-.js → charge-CXgCTI2e.js} +1 -1
  22. package/dist/assets/charges-filters-DhYogrgu.js +1 -0
  23. package/dist/assets/{charges-ledger-validation-CtCBR3C-.js → charges-ledger-validation-K96Gpr99.js} +1 -1
  24. package/dist/assets/{charges-table-CWbe3t13.js → charges-table-Cff0tibm.js} +7 -7
  25. package/dist/assets/{chart-Cmm-jp0c.js → chart-Rag7RVt5.js} +1 -1
  26. package/dist/assets/contracts-C26gq1yS.js +16 -0
  27. package/dist/assets/{data-table-pagination-fdOZTf64.js → data-table-pagination-BenxjRXY.js} +2 -2
  28. package/dist/assets/{download-csv-button-CwK31swX.js → download-csv-button-8ow10rSS.js} +1 -1
  29. package/dist/assets/edit-issue-document-modal-2d_PTbvO.js +1 -0
  30. package/dist/assets/{editable-business-trip-Bjxkm9xV.js → editable-business-trip-BFJ_Mqji.js} +2 -2
  31. package/dist/assets/eye-off-BNMLF-BO.js +6 -0
  32. package/dist/assets/{funnel-CMG4QvaK.js → funnel-DW3_rS_8.js} +1 -1
  33. package/dist/assets/{index-BZVrGMgV.js → index-1iKxq5ag.js} +2 -2
  34. package/dist/assets/{index-C_ZNQ0Zr.js → index-2unHvdGT.js} +1 -1
  35. package/dist/assets/{index-DInU4RP4.js → index-4ufIi3AX.js} +2 -2
  36. package/dist/assets/index-B0Je179L.js +1 -0
  37. package/dist/assets/index-B2VI47XT.js +1 -0
  38. package/dist/assets/index-B86FoQmY.js +1 -0
  39. package/dist/assets/{index-CgokSIpu.js → index-BCiHeRl-.js} +1 -1
  40. package/dist/assets/{index-6G62OvEh.js → index-BDUyPP2c.js} +1 -1
  41. package/dist/assets/index-BHA96r33.js +1 -0
  42. package/dist/assets/{index-CjC_SXIA.js → index-BPS5RB7_.js} +1 -1
  43. package/dist/assets/{index-B9CbQIGq.js → index-BQyZXdTq.js} +2 -2
  44. package/dist/assets/index-BZLSFBEt.js +1 -0
  45. package/dist/assets/{index-Cw_aKL-8.js → index-Bd-SKdyy.js} +178 -173
  46. package/dist/assets/{index-C7oYbGGm.js → index-Bo2SK7RM.js} +1 -1
  47. package/dist/assets/{index-jCPWIpdP.js → index-Bp6IHcih.js} +1 -1
  48. package/dist/assets/index-BrSZxw1u.css +1 -0
  49. package/dist/assets/{index-DFW4nqx8.js → index-CEiIgRJ2.js} +7 -7
  50. package/dist/assets/{index-CTatkdRy.js → index-CKNxDyu9.js} +2 -2
  51. package/dist/assets/index-CqIav7Xr.js +1 -0
  52. package/dist/assets/index-Dp9F68vS.js +1 -0
  53. package/dist/assets/{index-CriBDqbK.js → index-DvvRs9Ha.js} +1 -1
  54. package/dist/assets/{index-DLwMwjDQ.js → index-DyLWk3js.js} +1 -1
  55. package/dist/assets/index-NdA_oCxx.js +1 -0
  56. package/dist/assets/{index-BEahR51x.js → index-VD71ra9C.js} +2 -2
  57. package/dist/assets/{index-xxe8M91O.js → index-lMXNkFuw.js} +2 -2
  58. package/dist/assets/index-q3ev6JER.js +1 -0
  59. package/dist/assets/{index.es-B_Bf6nNm.js → index.es-C9I2aTP4.js} +1 -1
  60. package/dist/assets/{insert-business-trip-modal-Ds3RIlmF.js → insert-business-trip-modal-DVcWpJHr.js} +2 -2
  61. package/dist/assets/issue-document-BxTTlJ1T.js +1 -0
  62. package/dist/assets/{list-plus-B3EB-dKe.js → list-plus-B7wBrICK.js} +1 -1
  63. package/dist/assets/login-page-BpgscuKm.js +1 -0
  64. package/dist/assets/{match-document-modal-Bo9pBr8W.js → match-document-modal-CqP2SE2c.js} +4 -4
  65. package/dist/assets/{missing-info-charges-BQYXI7bj.js → missing-info-charges-CIs_kE3P.js} +1 -1
  66. package/dist/assets/{modal-Pj_6bAFk.js → modal-CwuHXtxz.js} +1 -1
  67. package/dist/assets/modify-contract-dialog-BoeamC68.js +1 -0
  68. package/dist/assets/{page-layout-CVTeUSZp.js → page-layout-XgNPsCmr.js} +1 -1
  69. package/dist/assets/{page-not-found-TvTAiAs4.js → page-not-found-CrFJMQNO.js} +1 -1
  70. package/dist/assets/{panel-top-open-DzBY_TuM.js → panel-top-open-DU7alj-S.js} +1 -1
  71. package/dist/assets/{pencil-BBmFhuZN.js → pencil-9DTTP5vx.js} +1 -1
  72. package/dist/assets/{report-commentary-row-Dqw62LLo.js → report-commentary-row-BdS3qqMS.js} +1 -1
  73. package/dist/assets/{save-BW18gNVs.js → save-i8sPy_OW.js} +1 -1
  74. package/dist/assets/similar-transactions-modal-CZAOYt-d.js +1 -0
  75. package/dist/assets/sub-BL9nfaPD.js +1 -0
  76. package/dist/assets/subMonths-DHPWOZP6.js +1 -0
  77. package/dist/assets/{summary-Bbsq64IN.js → summary-Dfiju7xJ.js} +1 -1
  78. package/dist/assets/{toggle-expansion-button-BrKkZtGj.js → toggle-expansion-button-BbVh8z6s.js} +1 -1
  79. package/dist/assets/tooltip-C-fd9L1l.js +1 -0
  80. package/dist/assets/{use-url-query-C0mVgO2i.js → use-url-query-5TFyEk1x.js} +1 -1
  81. package/dist/index.html +2 -2
  82. package/package.json +1 -1
  83. package/src/components/business/admin-business-section.tsx +103 -282
  84. package/src/components/clients/contracts/modify-contract-dialog.tsx +341 -253
  85. package/src/components/contracts/cells/client.tsx +24 -0
  86. package/src/components/contracts/cells/date.tsx +10 -0
  87. package/src/components/contracts/cells/index.ts +2 -0
  88. package/src/components/contracts/columns.tsx +182 -0
  89. package/src/components/contracts/contracts-filter.tsx +160 -0
  90. package/src/components/contracts/index.tsx +264 -0
  91. package/src/components/contracts/issue-documents-modal.tsx +234 -0
  92. package/src/components/layout/sidelinks.tsx +7 -0
  93. package/src/components/screens/businesses/clients/contracts/contracts.tsx +56 -0
  94. package/src/gql/gql.ts +27 -3
  95. package/src/gql/graphql.ts +73 -52
  96. package/src/router/config.tsx +13 -0
  97. package/src/router/routes.ts +1 -0
  98. package/dist/assets/business-CAcKSrnu.js +0 -37
  99. package/dist/assets/business-trip-DkTEY8b1.js +0 -1
  100. package/dist/assets/charges-filters-DUuY-N0H.js +0 -1
  101. package/dist/assets/index-BD4s2ucv.css +0 -1
  102. package/dist/assets/index-BFwWHKS1.js +0 -1
  103. package/dist/assets/index-BI0XToIk.js +0 -1
  104. package/dist/assets/index-BQb_C-JL.js +0 -1
  105. package/dist/assets/index-CJQlHnFs.js +0 -1
  106. package/dist/assets/index-Cm6Blkgf.js +0 -1
  107. package/dist/assets/index-DJLQkpmI.js +0 -6
  108. package/dist/assets/index-DcwGbXWr.js +0 -1
  109. package/dist/assets/index-Dlj3jpuW.js +0 -1
  110. package/dist/assets/index-iya2tfvn.js +0 -1
  111. package/dist/assets/issue-document-_iHCFO9h.js +0 -1
  112. package/dist/assets/login-page-BtT_TCEJ.js +0 -1
  113. package/dist/assets/similar-transactions-modal-B39q1NLa.js +0 -1
  114. package/dist/assets/sub-DOjETdwl.js +0 -1
  115. package/dist/assets/subMonths-DqeFZ4O6.js +0 -1
  116. package/dist/assets/tooltip-CbnJYNc4.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @accounter/client
2
2
 
3
- ## 0.0.8-alpha-20251030162201-d2f279aafe537912ec3546af855cbd3a38ac0f5c
3
+ ## 0.0.8-alpha-20251030162303-87017b2c2addf0e61478260aac336b9343f15c98
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -325,21 +325,6 @@
325
325
  streamline the process of adding new businesses, specifically by simplifying the handling of tax
326
326
  category insertions.
327
327
 
328
- - [#2645](https://github.com/Urigo/accounter-fullstack/pull/2645)
329
- [`69331f9`](https://github.com/Urigo/accounter-fullstack/commit/69331f9b74e1afdc954f3cddb93735445fb9ad8d)
330
- Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Refactor**: The
331
- `businesses_admin` table is updated to replace single-value fields for tax and social security
332
- identifiers with array-based JSONB columns, allowing for multiple annual IDs and historical tax
333
- rates.
334
- - **GraphQL Schema Update**: The GraphQL `AdminBusiness` type and related input types
335
- (`CreateAdminBusinessInput`, `UpdateAdminBusinessInput`) are modified to reflect the new array
336
- structures, introducing `AnnualId` and `TaxAdvancesRate` types.
337
- - **Frontend Form Overhaul**: The `admin-business-section.tsx` component is refactored to use
338
- `react-hook-form`'s `useFieldArray` for dynamic management of annual IDs and tax rates,
339
- providing a more flexible user interface.
340
- - **Backend Logic Adaptation**: New Zod schemas and resolver logic are implemented on the server
341
- to validate and process the updated array-based data for admin business updates.
342
-
343
328
  - [#2640](https://github.com/Urigo/accounter-fullstack/pull/2640)
344
329
  [`26618ff`](https://github.com/Urigo/accounter-fullstack/commit/26618ff2d4a47d63e16ecec59f39887f48df52cf)
345
330
  Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Renaming and Restructuring**: Key
@@ -1,6 +1,6 @@
1
- import{v as fr,r as w,bE as Q,el as ur,ai as t,em as R,bC as X,bD as D,bF as n,en as I,bG as z,eo as vr,ep as _r,eq as br}from"./index-Cw_aKL-8.js";/**
1
+ import{v as fr,r as w,c7 as Q,ep as ur,aa as t,eq as R,c5 as X,c6 as D,c8 as n,er as I,c9 as z,es as vr,et as _r,eu as yr}from"./index-Bd-SKdyy.js";/**
2
2
  * @license lucide-react v0.548.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const yr=[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]],qr=fr("merge",yr),Z=w.createContext(null),mr=Z.Provider,gr=()=>w.useContext(Z);var Pr=Object.defineProperty,h=Object.getOwnPropertySymbols,rr=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,M=(r,e,a)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,W=(r,e)=>{for(var a in e||(e={}))rr.call(e,a)&&M(r,a,e[a]);if(h)for(var a of h(e))er.call(e,a)&&M(r,a,e[a]);return r},Or=(r,e)=>{var a={};for(var o in r)rr.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&h)for(var o of h(r))e.indexOf(o)<0&&er.call(r,o)&&(a[o]=r[o]);return a};const wr={size:"sm"},ar=w.forwardRef((r,e)=>{const a=Q("CheckboxGroup",wr,r),{children:o,value:f,defaultValue:u,onChange:i,size:c,wrapperProps:s}=a,d=Or(a,["children","value","defaultValue","onChange","size","wrapperProps"]),[l,y]=ur({value:f,defaultValue:u,finalValue:[],onChange:i}),m=v=>{const _=v.currentTarget.value;y(l.includes(_)?l.filter($=>$!==_):[...l,_])};return t.createElement(mr,{value:{value:l,onChange:m,size:c}},t.createElement(R.Wrapper,W(W({labelElement:"div",size:c,__staticSelector:"CheckboxGroup",ref:e},s),d),o))});ar.displayName="@mantine/core/CheckboxGroup";var $r=Object.defineProperty,xr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,kr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Y=(r,e,a)=>e in r?$r(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,q=(r,e)=>{for(var a in e||(e={}))kr.call(e,a)&&Y(r,a,e[a]);if(H)for(var a of H(e))Sr.call(e,a)&&Y(r,a,e[a]);return r},B=(r,e)=>xr(r,hr(e));const Cr={xs:n(16),sm:n(20),md:n(24),lg:n(30),xl:n(36)};var Er=X((r,{radius:e,color:a,transitionDuration:o,labelPosition:f,error:u,indeterminate:i},{size:c})=>{const s=D({size:c,sizes:Cr}),d=r.fn.variant({variant:"filled",color:a});return{icon:B(q({},r.fn.cover()),{ref:I("icon"),color:i?"inherit":r.white,transform:i?"none":`translateY(${n(5)}) scale(0.5)`,opacity:i?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${o}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:r.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:s,height:s,order:f==="left"?2:1},input:B(q({},r.fn.focusStyles()),{appearance:"none",backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white,border:`${n(1)} solid ${u?r.fn.variant({variant:"filled",color:"red"}).background:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[4]}`,width:s,height:s,borderRadius:r.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${o}ms ease, background-color ${o}ms ease`,cursor:r.cursorType,"&:checked":{backgroundColor:d.background,borderColor:d.background,[`& + .${I("icon")}`]:{opacity:1,color:r.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[2],borderColor:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${I("icon")}`]:{color:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[5]}}})}}),Nr=Object.defineProperty,Ir=Object.defineProperties,zr=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,A=(r,e,a)=>e in r?Nr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,Dr=(r,e)=>{for(var a in e||(e={}))jr.call(e,a)&&A(r,a,e[a]);if(U)for(var a of U(e))Rr.call(e,a)&&A(r,a,e[a]);return r},Vr=(r,e)=>Ir(r,zr(e));const j={xs:n(16),sm:n(20),md:n(24),lg:n(30),xl:n(36)};var Gr=X((r,{labelPosition:e},{size:a})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]}},labelWrapper:Vr(Dr({},r.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:a in j?D({size:a,sizes:r.fontSizes}):void 0,lineHeight:a in j?D({size:a,sizes:j}):void 0,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,cursor:r.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${r.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm},error:{marginTop:`calc(${r.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm},label:{cursor:r.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm,"&:disabled, &[data-disabled]":{color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]}}})),Tr=Object.defineProperty,k=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,J=(r,e,a)=>e in r?Tr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,Lr=(r,e)=>{for(var a in e||(e={}))or.call(e,a)&&J(r,a,e[a]);if(k)for(var a of k(e))tr.call(e,a)&&J(r,a,e[a]);return r},Fr=(r,e)=>{var a={};for(var o in r)or.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&k)for(var o of k(r))e.indexOf(o)<0&&tr.call(r,o)&&(a[o]=r[o]);return a};const nr=w.forwardRef((r,e)=>{var a=r,{__staticSelector:o,className:f,classNames:u,styles:i,unstyled:c,children:s,label:d,description:l,id:y,disabled:m,error:v,size:_,labelPosition:$,bodyElement:g="div",labelElement:P="label",variant:C}=a,E=Fr(a,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","bodyElement","labelElement","variant"]);const{classes:p,cx:O}=Gr({labelPosition:$},{name:o,styles:i,classNames:u,unstyled:c,variant:C,size:_});return t.createElement(z,Lr({className:O(p.root,f),ref:e},E),t.createElement(z,{component:g,htmlFor:g==="label"?y:void 0,className:O(p.body)},s,t.createElement("div",{className:p.labelWrapper},d!=null&&t.createElement(z,{component:P,htmlFor:P==="label"?y:void 0,className:p.label,"data-disabled":m||void 0},d),l&&t.createElement(R.Description,{className:p.description},l),v&&v!=="boolean"&&t.createElement(R.Error,{className:p.error},v))))});nr.displayName="@mantine/core/InlineInput";var Mr=Object.defineProperty,S=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,K=(r,e,a)=>e in r?Mr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,x=(r,e)=>{for(var a in e||(e={}))sr.call(e,a)&&K(r,a,e[a]);if(S)for(var a of S(e))lr.call(e,a)&&K(r,a,e[a]);return r},Wr=(r,e)=>{var a={};for(var o in r)sr.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&S)for(var o of S(r))e.indexOf(o)<0&&lr.call(r,o)&&(a[o]=r[o]);return a};const Hr={size:"sm",transitionDuration:100,icon:vr,labelPosition:"right"},ir=w.forwardRef((r,e)=>{const a=Q("Checkbox",Hr,r),{className:o,style:f,sx:u,checked:i,disabled:c,color:s,label:d,indeterminate:l,id:y,size:m,radius:v,wrapperProps:_,children:$,classNames:g,styles:P,transitionDuration:C,icon:E,unstyled:p,labelPosition:O,description:cr,error:V,variant:G}=a,dr=Wr(a,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),b=gr(),T=_r(y),{systemStyles:pr,rest:L}=br(dr),{classes:N}=Er({radius:v,color:s,transitionDuration:C,labelPosition:O,error:!!V,indeterminate:l},{name:"Checkbox",classNames:g,styles:P,unstyled:p,variant:G,size:b?.size||m}),F=b?{checked:b.value.includes(L.value),onChange:b.onChange}:{};return t.createElement(nr,x(x({className:o,sx:u,style:f,id:T,size:b?.size||m,labelPosition:O,label:d,description:cr,error:V,disabled:c,__staticSelector:"Checkbox",classNames:g,styles:P,unstyled:p,"data-checked":F.checked||void 0,variant:G},pr),_),t.createElement("div",{className:N.inner},t.createElement("input",x(x({id:T,ref:e,type:"checkbox",className:N.input,checked:i,disabled:c},L),F)),t.createElement(E,{indeterminate:l,className:N.icon})))});ir.displayName="@mantine/core/Checkbox";ir.Group=ar;export{ir as C,qr as M};
6
+ */const br=[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]],qr=fr("merge",br),Z=w.createContext(null),mr=Z.Provider,gr=()=>w.useContext(Z);var Pr=Object.defineProperty,h=Object.getOwnPropertySymbols,rr=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,W=(r,e,a)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,F=(r,e)=>{for(var a in e||(e={}))rr.call(e,a)&&W(r,a,e[a]);if(h)for(var a of h(e))er.call(e,a)&&W(r,a,e[a]);return r},Or=(r,e)=>{var a={};for(var o in r)rr.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&h)for(var o of h(r))e.indexOf(o)<0&&er.call(r,o)&&(a[o]=r[o]);return a};const wr={size:"sm"},ar=w.forwardRef((r,e)=>{const a=Q("CheckboxGroup",wr,r),{children:o,value:f,defaultValue:u,onChange:i,size:c,wrapperProps:s}=a,d=Or(a,["children","value","defaultValue","onChange","size","wrapperProps"]),[l,b]=ur({value:f,defaultValue:u,finalValue:[],onChange:i}),m=v=>{const _=v.currentTarget.value;b(l.includes(_)?l.filter($=>$!==_):[...l,_])};return t.createElement(mr,{value:{value:l,onChange:m,size:c}},t.createElement(R.Wrapper,F(F({labelElement:"div",size:c,__staticSelector:"CheckboxGroup",ref:e},s),d),o))});ar.displayName="@mantine/core/CheckboxGroup";var $r=Object.defineProperty,xr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,kr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Y=(r,e,a)=>e in r?$r(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,q=(r,e)=>{for(var a in e||(e={}))kr.call(e,a)&&Y(r,a,e[a]);if(H)for(var a of H(e))Sr.call(e,a)&&Y(r,a,e[a]);return r},B=(r,e)=>xr(r,hr(e));const Cr={xs:n(16),sm:n(20),md:n(24),lg:n(30),xl:n(36)};var Er=X((r,{radius:e,color:a,transitionDuration:o,labelPosition:f,error:u,indeterminate:i},{size:c})=>{const s=D({size:c,sizes:Cr}),d=r.fn.variant({variant:"filled",color:a});return{icon:B(q({},r.fn.cover()),{ref:I("icon"),color:i?"inherit":r.white,transform:i?"none":`translateY(${n(5)}) scale(0.5)`,opacity:i?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${o}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:r.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:s,height:s,order:f==="left"?2:1},input:B(q({},r.fn.focusStyles()),{appearance:"none",backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white,border:`${n(1)} solid ${u?r.fn.variant({variant:"filled",color:"red"}).background:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[4]}`,width:s,height:s,borderRadius:r.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${o}ms ease, background-color ${o}ms ease`,cursor:r.cursorType,"&:checked":{backgroundColor:d.background,borderColor:d.background,[`& + .${I("icon")}`]:{opacity:1,color:r.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[2],borderColor:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${I("icon")}`]:{color:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[5]}}})}}),Nr=Object.defineProperty,Ir=Object.defineProperties,zr=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,A=(r,e,a)=>e in r?Nr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,Dr=(r,e)=>{for(var a in e||(e={}))jr.call(e,a)&&A(r,a,e[a]);if(U)for(var a of U(e))Rr.call(e,a)&&A(r,a,e[a]);return r},Vr=(r,e)=>Ir(r,zr(e));const j={xs:n(16),sm:n(20),md:n(24),lg:n(30),xl:n(36)};var Gr=X((r,{labelPosition:e},{size:a})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]}},labelWrapper:Vr(Dr({},r.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:a in j?D({size:a,sizes:r.fontSizes}):void 0,lineHeight:a in j?D({size:a,sizes:j}):void 0,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,cursor:r.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${r.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm},error:{marginTop:`calc(${r.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm},label:{cursor:r.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:r.spacing.sm,"&:disabled, &[data-disabled]":{color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]}}})),Tr=Object.defineProperty,k=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,J=(r,e,a)=>e in r?Tr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,Lr=(r,e)=>{for(var a in e||(e={}))or.call(e,a)&&J(r,a,e[a]);if(k)for(var a of k(e))tr.call(e,a)&&J(r,a,e[a]);return r},Mr=(r,e)=>{var a={};for(var o in r)or.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&k)for(var o of k(r))e.indexOf(o)<0&&tr.call(r,o)&&(a[o]=r[o]);return a};const nr=w.forwardRef((r,e)=>{var a=r,{__staticSelector:o,className:f,classNames:u,styles:i,unstyled:c,children:s,label:d,description:l,id:b,disabled:m,error:v,size:_,labelPosition:$,bodyElement:g="div",labelElement:P="label",variant:C}=a,E=Mr(a,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","bodyElement","labelElement","variant"]);const{classes:p,cx:O}=Gr({labelPosition:$},{name:o,styles:i,classNames:u,unstyled:c,variant:C,size:_});return t.createElement(z,Lr({className:O(p.root,f),ref:e},E),t.createElement(z,{component:g,htmlFor:g==="label"?b:void 0,className:O(p.body)},s,t.createElement("div",{className:p.labelWrapper},d!=null&&t.createElement(z,{component:P,htmlFor:P==="label"?b:void 0,className:p.label,"data-disabled":m||void 0},d),l&&t.createElement(R.Description,{className:p.description},l),v&&v!=="boolean"&&t.createElement(R.Error,{className:p.error},v))))});nr.displayName="@mantine/core/InlineInput";var Wr=Object.defineProperty,S=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,K=(r,e,a)=>e in r?Wr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,x=(r,e)=>{for(var a in e||(e={}))sr.call(e,a)&&K(r,a,e[a]);if(S)for(var a of S(e))lr.call(e,a)&&K(r,a,e[a]);return r},Fr=(r,e)=>{var a={};for(var o in r)sr.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(r!=null&&S)for(var o of S(r))e.indexOf(o)<0&&lr.call(r,o)&&(a[o]=r[o]);return a};const Hr={size:"sm",transitionDuration:100,icon:vr,labelPosition:"right"},ir=w.forwardRef((r,e)=>{const a=Q("Checkbox",Hr,r),{className:o,style:f,sx:u,checked:i,disabled:c,color:s,label:d,indeterminate:l,id:b,size:m,radius:v,wrapperProps:_,children:$,classNames:g,styles:P,transitionDuration:C,icon:E,unstyled:p,labelPosition:O,description:cr,error:V,variant:G}=a,dr=Fr(a,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),y=gr(),T=_r(b),{systemStyles:pr,rest:L}=yr(dr),{classes:N}=Er({radius:v,color:s,transitionDuration:C,labelPosition:O,error:!!V,indeterminate:l},{name:"Checkbox",classNames:g,styles:P,unstyled:p,variant:G,size:y?.size||m}),M=y?{checked:y.value.includes(L.value),onChange:y.onChange}:{};return t.createElement(nr,x(x({className:o,sx:u,style:f,id:T,size:y?.size||m,labelPosition:O,label:d,description:cr,error:V,disabled:c,__staticSelector:"Checkbox",classNames:g,styles:P,unstyled:p,"data-checked":M.checked||void 0,variant:G},pr),_),t.createElement("div",{className:N.inner},t.createElement("input",x(x({id:T,ref:e,type:"checkbox",className:N.input,checked:i,disabled:c},L),M)),t.createElement(E,{indeterminate:l,className:N.icon})))});ir.displayName="@mantine/core/Checkbox";ir.Group=ar;export{ir as C,qr as M};
@@ -1 +1 @@
1
- import{bC as Ee,bF as f,bD as _,ai as p,ey as Br,hp as Se,r as E,bE as jr,ez as Fr,hq as Hr,eq as Wr,ep as Ar,el as _e,hr as Kr,hs as qr,fL as ae,em as Oe,ht as te,hu as Ur,ew as Tr,hv as Zr,hw as Gr}from"./index-Cw_aKL-8.js";const Ve={xs:f(16),sm:f(22),md:f(26),lg:f(30),xl:f(36)},Jr={xs:f(10),sm:f(12),md:f(14),lg:f(16),xl:f(18)};var Qr=Ee((e,{disabled:r,radius:a,readOnly:n},{size:v,variant:b})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:r?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:b==="filled"?e.white:e.colors.gray[1],color:r?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:_({size:v,sizes:Ve}),paddingLeft:`calc(${_({size:v,sizes:e.spacing})} / 1.5)`,paddingRight:r||n?_({size:v,sizes:e.spacing}):0,fontWeight:500,fontSize:_({size:v,sizes:Jr}),borderRadius:_({size:a,sizes:e.radius}),cursor:r?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${f(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${_({size:v,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),Xr=Object.defineProperty,G=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(e,r,a)=>r in e?Xr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,Yr=(e,r)=>{for(var a in r||(r={}))$e.call(r,a)&&Pe(e,a,r[a]);if(G)for(var a of G(r))Re.call(r,a)&&Pe(e,a,r[a]);return e},ea=(e,r)=>{var a={};for(var n in e)$e.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&G)for(var n of G(e))r.indexOf(n)<0&&Re.call(e,n)&&(a[n]=e[n]);return a};const ra={xs:16,sm:22,md:24,lg:26,xl:30};function ze(e){var r=e,{label:a,classNames:n,styles:v,className:b,onRemove:N,disabled:I,readOnly:s,size:u,radius:h="sm",variant:O,unstyled:K}=r,Q=ea(r,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:H,cx:M}=Qr({disabled:I,readOnly:s,radius:h},{name:"MultiSelect",classNames:n,styles:v,unstyled:K,size:u,variant:O});return p.createElement("div",Yr({className:M(H.defaultValue,b)},Q),p.createElement("span",{className:H.defaultValueLabel},a),!I&&!s&&p.createElement(Br,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:H.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:b,disableSelectedItemFiltering:N}){if(!r&&b.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!b.some(h=>h===e[u].value&&!e[u].disabled))&&s.push(e[u]);return s}const I=[];for(let s=0;s<e.length&&(v(n,!N&&b.some(u=>u===e[s].value&&!e[s].disabled),e[s])&&I.push(e[s]),!(I.length>=a));s+=1);return I}var ta=Object.defineProperty,na=Object.defineProperties,la=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,Ie=(e,r,a)=>r in e?ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,ia=(e,r)=>{for(var a in r||(r={}))oa.call(r,a)&&Ie(e,a,r[a]);if(xe)for(var a of xe(r))sa.call(r,a)&&Ie(e,a,r[a]);return e},ca=(e,r)=>na(e,la(r)),ua=Ee((e,{invalid:r},{size:a})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${_({size:a,sizes:Se})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:Se})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${f(2)}) calc(${e.spacing.xs} / 2)`},searchInput:ca(ia({},e.fn.fontStyles()),{flex:1,minWidth:f(60),backgroundColor:"transparent",border:0,outline:0,fontSize:_({size:a,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:_({size:a,sizes:Ve}),"&::placeholder":{opacity:1,color:r?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}})),da=Object.defineProperty,pa=Object.defineProperties,fa=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ce=(e,r,a)=>r in e?da(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,F=(e,r)=>{for(var a in r||(r={}))Ne.call(r,a)&&Ce(e,a,r[a]);if(J)for(var a of J(r))Me.call(r,a)&&Ce(e,a,r[a]);return e},De=(e,r)=>pa(e,fa(r)),ha=(e,r)=>{var a={};for(var n in e)Ne.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&J)for(var n of J(e))r.indexOf(n)<0&&Me.call(e,n)&&(a[n]=e[n]);return a};function ga(e,r,a){return r?!1:a.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ma(e,r){return!!e&&!r.some(a=>a.value.toLowerCase()===e.toLowerCase())}function ke(e,r){if(!Array.isArray(e))return;if(r.length===0)return[];const a=r.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>a.includes(n))}const va={size:"sm",valueComponent:ze,itemComponent:Hr,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:ga,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:ma,switchDirectionOnFlip:!1,zIndex:Fr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},wa=E.forwardRef((e,r)=>{const a=jr("MultiSelect",va,e),{className:n,style:v,required:b,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:H,data:M,onChange:Le,valueComponent:Be,itemComponent:je,id:Fe,transitionProps:He,maxDropdownHeight:We,shadow:ba,nothingFound:ne,onFocus:le,onBlur:oe,searchable:y,placeholder:Ae,filter:Ke,limit:qe,clearSearchOnChange:Ue,clearable:se,clearSearchOnBlur:Te,variant:L,onSearchChange:Ze,searchValue:Ge,disabled:P,initiallyOpened:Je,radius:ie,icon:Qe,rightSection:Xe,rightSectionWidth:Ye,creatable:ce,getCreateLabel:ue,shouldCreate:er,onCreate:de,sx:rr,dropdownComponent:ar,onDropdownClose:tr,onDropdownOpen:nr,maxSelectedValues:g,withinPortal:lr,portalProps:or,switchDirectionOnFlip:sr,zIndex:ir,selectOnBlur:cr,name:ur,dropdownPosition:dr,errorProps:pr,labelProps:fr,descriptionProps:hr,form:gr,positionDependencies:mr,onKeyDown:pe,unstyled:W,inputContainer:vr,inputWrapperOrder:wr,readOnly:V,withAsterisk:br,clearButtonProps:yr,hoverOnSearchChange:fe,disableSelectedItemFiltering:Sr}=a,_r=ha(a,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:C,cx:he,theme:Or}=ua({invalid:!!u},{name:"MultiSelect",classNames:h,styles:O,unstyled:W,size:s,variant:L}),{systemStyles:Pr,rest:xr}=Wr(_r),X=E.useRef(),Y=E.useRef({}),B=Ar(Fe),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[S,q]=_e({value:Ge,defaultValue:"",finalValue:void 0,onChange:Ze}),[Dr,me]=E.useState(!1),{scrollIntoView:U,targetRef:ve,scrollableRef:kr}=Kr({duration:0,offset:5,cancelable:!1,isList:!0}),we=ce&&typeof ue=="function";let ee=null;const Er=M.map(t=>typeof t=="string"?{label:t,value:t}:t),re=qr({data:Er}),[o,j]=_e({value:ke(Q,M),defaultValue:ke(H,M),finalValue:[],onChange:Le}),w=E.useRef(!!g&&g<o.length),be=t=>{if(!V){const l=o.filter(m=>m!==t);j(l),g&&l.length<g&&(w.current=!1)}},Vr=t=>{q(t.currentTarget.value),!P&&!w.current&&y&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!w.current&&y&&c(!0)},i=aa({data:re,searchable:y,searchValue:S,limit:qe,filter:Ke,value:o,disableSelectedItemFiltering:Sr});we&&er(S,re)&&(ee=ue(S),i.push({label:S,value:S,creatable:!0}));const $=Math.min(Ir,i.length-1),ye=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&S?0:-1)},[S,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(w.current=!1),g&&o.length>=g&&(w.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(Ue&&q(""),o.includes(t.value))be(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&j(typeof l=="string"?[...o,l]:[...o,l.value])}else j([...o,t.value]);o.length===g-1&&(w.current=!0,c(!1)),i.length===1&&c(!1)}},Rr=t=>{typeof oe=="function"&&oe(t),cr&&i[$]&&d&&T(i[$]),Te&&q(""),c(!1)},zr=t=>{if(Dr||(pe?.(t),V)||t.key!=="Backspace"&&g&&w.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=ye(R,z=>z+1,z=>z<i.length-1);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],U({alignment:l?"end":"start"})),A})},k=()=>{D(R=>{var x;const A=ye(R,z=>z-1,z=>z>0);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],U({alignment:l?"start":"end"})),A})};switch(t.key){case"ArrowUp":{t.preventDefault(),c(!0),l?k():m();break}case"ArrowDown":{t.preventDefault(),c(!0),l?m():k();break}case"Enter":{t.preventDefault(),i[$]&&d?T(i[$]):c(!0);break}case" ":{y||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&S.length===0&&(j(o.slice(0,-1)),c(!0),g&&(w.current=!1));break}case"Home":{if(!y){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),U({alignment:l?"end":"start"})}break}case"End":{if(!y){t.preventDefault(),d||c(!0);const R=i.map(x=>!!x.disabled).lastIndexOf(!1);D(R),U({alignment:l?"end":"start"})}break}case"Escape":c(!1)}},Nr=o.map(t=>{let l=re.find(m=>m.value===t&&!m.disabled);return!l&&we&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(Be,De(F({},t),{variant:L,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),be(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Lr=()=>{var t;q(""),j([]),(t=X.current)==null||t.focus(),g&&(w.current=!1)},Z=!V&&(i.length>0?d:d&&!!ne);return ae(()=>{const t=Z?nr:tr;typeof t=="function"&&t()},[Z]),p.createElement(Oe.Wrapper,F(F({required:b,id:B,label:N,error:u,description:I,size:s,className:n,style:v,classNames:h,styles:O,__staticSelector:"MultiSelect",sx:rr,errorProps:pr,descriptionProps:hr,labelProps:fr,inputContainer:vr,inputWrapperOrder:wr,unstyled:W,withAsterisk:br,variant:L},Pr),K),p.createElement(te,{opened:Z,transitionProps:He,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,S],classNames:h,styles:O,unstyled:W,variant:L},p.createElement(te.Target,null,p.createElement("div",{className:C.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":d&&Z?`${B}-items`:null,"aria-controls":B,"aria-expanded":d,onMouseLeave:()=>D(-1),tabIndex:-1},p.createElement("input",{type:"hidden",name:ur,value:o.join(","),form:gr,disabled:P}),p.createElement(Oe,F({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:L,disabled:P,error:u,required:b,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!w.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(F({},h),{input:he({[C.input]:!y},h?.input)})},Ur({theme:Or,rightSection:Xe,rightSectionWidth:Ye,styles:O,size:s,shouldClear:se&&o.length>0,onClear:Lr,error:u,disabled:P,clearButtonProps:yr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",F({ref:Tr(r,X),type:"search",id:B,className:he(C.searchInput,{[C.searchInputPointer]:!y,[C.searchInputInputHidden]:!d&&o.length>0||!y&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:S,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!y||w.current||V,placeholder:o.length===0?Ae:void 0,disabled:P,"data-mantine-stop-propagation":d,autoComplete:"off",onCompositionStart:()=>me(!0),onCompositionEnd:()=>me(!1)},xr)))))),p.createElement(te.Dropdown,{component:ar||Zr,maxHeight:We,direction:ge,id:B,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:B,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:je,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:L}))))});wa.displayName="@mantine/core/MultiSelect";export{wa as M};
1
+ import{c5 as Ee,c8 as f,c6 as _,aa as p,eC as Lr,ht as be,r as E,c7 as jr,eD as Fr,hu as Hr,eu as Wr,et as Ar,ep as _e,hv as Kr,hw as Ur,fP as ae,eq as Oe,hx as te,hy as qr,eA as Tr,hz as Zr,hA as Gr}from"./index-Bd-SKdyy.js";const Ve={xs:f(16),sm:f(22),md:f(26),lg:f(30),xl:f(36)},Jr={xs:f(10),sm:f(12),md:f(14),lg:f(16),xl:f(18)};var Qr=Ee((e,{disabled:r,radius:a,readOnly:n},{size:v,variant:y})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:r?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:y==="filled"?e.white:e.colors.gray[1],color:r?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:_({size:v,sizes:Ve}),paddingLeft:`calc(${_({size:v,sizes:e.spacing})} / 1.5)`,paddingRight:r||n?_({size:v,sizes:e.spacing}):0,fontWeight:500,fontSize:_({size:v,sizes:Jr}),borderRadius:_({size:a,sizes:e.radius}),cursor:r?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${f(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${_({size:v,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),Xr=Object.defineProperty,G=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(e,r,a)=>r in e?Xr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,Yr=(e,r)=>{for(var a in r||(r={}))$e.call(r,a)&&Pe(e,a,r[a]);if(G)for(var a of G(r))Re.call(r,a)&&Pe(e,a,r[a]);return e},ea=(e,r)=>{var a={};for(var n in e)$e.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&G)for(var n of G(e))r.indexOf(n)<0&&Re.call(e,n)&&(a[n]=e[n]);return a};const ra={xs:16,sm:22,md:24,lg:26,xl:30};function ze(e){var r=e,{label:a,classNames:n,styles:v,className:y,onRemove:N,disabled:I,readOnly:s,size:u,radius:h="sm",variant:O,unstyled:K}=r,Q=ea(r,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:H,cx:M}=Qr({disabled:I,readOnly:s,radius:h},{name:"MultiSelect",classNames:n,styles:v,unstyled:K,size:u,variant:O});return p.createElement("div",Yr({className:M(H.defaultValue,y)},Q),p.createElement("span",{className:H.defaultValueLabel},a),!I&&!s&&p.createElement(Lr,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:H.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:y,disableSelectedItemFiltering:N}){if(!r&&y.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!y.some(h=>h===e[u].value&&!e[u].disabled))&&s.push(e[u]);return s}const I=[];for(let s=0;s<e.length&&(v(n,!N&&y.some(u=>u===e[s].value&&!e[s].disabled),e[s])&&I.push(e[s]),!(I.length>=a));s+=1);return I}var ta=Object.defineProperty,na=Object.defineProperties,la=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,Ie=(e,r,a)=>r in e?ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,ia=(e,r)=>{for(var a in r||(r={}))oa.call(r,a)&&Ie(e,a,r[a]);if(xe)for(var a of xe(r))sa.call(r,a)&&Ie(e,a,r[a]);return e},ca=(e,r)=>na(e,la(r)),ua=Ee((e,{invalid:r},{size:a})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${_({size:a,sizes:be})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:be})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${f(2)}) calc(${e.spacing.xs} / 2)`},searchInput:ca(ia({},e.fn.fontStyles()),{flex:1,minWidth:f(60),backgroundColor:"transparent",border:0,outline:0,fontSize:_({size:a,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:_({size:a,sizes:Ve}),"&::placeholder":{opacity:1,color:r?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}})),da=Object.defineProperty,pa=Object.defineProperties,fa=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ce=(e,r,a)=>r in e?da(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,F=(e,r)=>{for(var a in r||(r={}))Ne.call(r,a)&&Ce(e,a,r[a]);if(J)for(var a of J(r))Me.call(r,a)&&Ce(e,a,r[a]);return e},De=(e,r)=>pa(e,fa(r)),ha=(e,r)=>{var a={};for(var n in e)Ne.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&J)for(var n of J(e))r.indexOf(n)<0&&Me.call(e,n)&&(a[n]=e[n]);return a};function ga(e,r,a){return r?!1:a.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ma(e,r){return!!e&&!r.some(a=>a.value.toLowerCase()===e.toLowerCase())}function ke(e,r){if(!Array.isArray(e))return;if(r.length===0)return[];const a=r.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>a.includes(n))}const va={size:"sm",valueComponent:ze,itemComponent:Hr,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:ga,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:ma,switchDirectionOnFlip:!1,zIndex:Fr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},wa=E.forwardRef((e,r)=>{const a=jr("MultiSelect",va,e),{className:n,style:v,required:y,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:H,data:M,onChange:Be,valueComponent:Le,itemComponent:je,id:Fe,transitionProps:He,maxDropdownHeight:We,shadow:ya,nothingFound:ne,onFocus:le,onBlur:oe,searchable:S,placeholder:Ae,filter:Ke,limit:Ue,clearSearchOnChange:qe,clearable:se,clearSearchOnBlur:Te,variant:B,onSearchChange:Ze,searchValue:Ge,disabled:P,initiallyOpened:Je,radius:ie,icon:Qe,rightSection:Xe,rightSectionWidth:Ye,creatable:ce,getCreateLabel:ue,shouldCreate:er,onCreate:de,sx:rr,dropdownComponent:ar,onDropdownClose:tr,onDropdownOpen:nr,maxSelectedValues:g,withinPortal:lr,portalProps:or,switchDirectionOnFlip:sr,zIndex:ir,selectOnBlur:cr,name:ur,dropdownPosition:dr,errorProps:pr,labelProps:fr,descriptionProps:hr,form:gr,positionDependencies:mr,onKeyDown:pe,unstyled:W,inputContainer:vr,inputWrapperOrder:wr,readOnly:V,withAsterisk:yr,clearButtonProps:Sr,hoverOnSearchChange:fe,disableSelectedItemFiltering:br}=a,_r=ha(a,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:C,cx:he,theme:Or}=ua({invalid:!!u},{name:"MultiSelect",classNames:h,styles:O,unstyled:W,size:s,variant:B}),{systemStyles:Pr,rest:xr}=Wr(_r),X=E.useRef(),Y=E.useRef({}),L=Ar(Fe),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[b,U]=_e({value:Ge,defaultValue:"",finalValue:void 0,onChange:Ze}),[Dr,me]=E.useState(!1),{scrollIntoView:q,targetRef:ve,scrollableRef:kr}=Kr({duration:0,offset:5,cancelable:!1,isList:!0}),we=ce&&typeof ue=="function";let ee=null;const Er=M.map(t=>typeof t=="string"?{label:t,value:t}:t),re=Ur({data:Er}),[o,j]=_e({value:ke(Q,M),defaultValue:ke(H,M),finalValue:[],onChange:Be}),w=E.useRef(!!g&&g<o.length),ye=t=>{if(!V){const l=o.filter(m=>m!==t);j(l),g&&l.length<g&&(w.current=!1)}},Vr=t=>{U(t.currentTarget.value),!P&&!w.current&&S&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!w.current&&S&&c(!0)},i=aa({data:re,searchable:S,searchValue:b,limit:Ue,filter:Ke,value:o,disableSelectedItemFiltering:br});we&&er(b,re)&&(ee=ue(b),i.push({label:b,value:b,creatable:!0}));const $=Math.min(Ir,i.length-1),Se=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&b?0:-1)},[b,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(w.current=!1),g&&o.length>=g&&(w.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(qe&&U(""),o.includes(t.value))ye(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&j(typeof l=="string"?[...o,l]:[...o,l.value])}else j([...o,t.value]);o.length===g-1&&(w.current=!0,c(!1)),i.length===1&&c(!1)}},Rr=t=>{typeof oe=="function"&&oe(t),cr&&i[$]&&d&&T(i[$]),Te&&U(""),c(!1)},zr=t=>{if(Dr||(pe?.(t),V)||t.key!=="Backspace"&&g&&w.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=Se(R,z=>z+1,z=>z<i.length-1);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"end":"start"})),A})},k=()=>{D(R=>{var x;const A=Se(R,z=>z-1,z=>z>0);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"start":"end"})),A})};switch(t.key){case"ArrowUp":{t.preventDefault(),c(!0),l?k():m();break}case"ArrowDown":{t.preventDefault(),c(!0),l?m():k();break}case"Enter":{t.preventDefault(),i[$]&&d?T(i[$]):c(!0);break}case" ":{S||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&b.length===0&&(j(o.slice(0,-1)),c(!0),g&&(w.current=!1));break}case"Home":{if(!S){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),q({alignment:l?"end":"start"})}break}case"End":{if(!S){t.preventDefault(),d||c(!0);const R=i.map(x=>!!x.disabled).lastIndexOf(!1);D(R),q({alignment:l?"end":"start"})}break}case"Escape":c(!1)}},Nr=o.map(t=>{let l=re.find(m=>m.value===t&&!m.disabled);return!l&&we&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(Le,De(F({},t),{variant:B,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),ye(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Br=()=>{var t;U(""),j([]),(t=X.current)==null||t.focus(),g&&(w.current=!1)},Z=!V&&(i.length>0?d:d&&!!ne);return ae(()=>{const t=Z?nr:tr;typeof t=="function"&&t()},[Z]),p.createElement(Oe.Wrapper,F(F({required:y,id:L,label:N,error:u,description:I,size:s,className:n,style:v,classNames:h,styles:O,__staticSelector:"MultiSelect",sx:rr,errorProps:pr,descriptionProps:hr,labelProps:fr,inputContainer:vr,inputWrapperOrder:wr,unstyled:W,withAsterisk:yr,variant:B},Pr),K),p.createElement(te,{opened:Z,transitionProps:He,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,b],classNames:h,styles:O,unstyled:W,variant:B},p.createElement(te.Target,null,p.createElement("div",{className:C.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":d&&Z?`${L}-items`:null,"aria-controls":L,"aria-expanded":d,onMouseLeave:()=>D(-1),tabIndex:-1},p.createElement("input",{type:"hidden",name:ur,value:o.join(","),form:gr,disabled:P}),p.createElement(Oe,F({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:P,error:u,required:y,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!w.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(F({},h),{input:he({[C.input]:!S},h?.input)})},qr({theme:Or,rightSection:Xe,rightSectionWidth:Ye,styles:O,size:s,shouldClear:se&&o.length>0,onClear:Br,error:u,disabled:P,clearButtonProps:Sr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",F({ref:Tr(r,X),type:"search",id:L,className:he(C.searchInput,{[C.searchInputPointer]:!S,[C.searchInputInputHidden]:!d&&o.length>0||!S&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:b,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!S||w.current||V,placeholder:o.length===0?Ae:void 0,disabled:P,"data-mantine-stop-propagation":d,autoComplete:"off",onCompositionStart:()=>me(!0),onCompositionEnd:()=>me(!1)},xr)))))),p.createElement(te.Dropdown,{component:ar||Zr,maxHeight:We,direction:ge,id:L,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:L,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:je,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:B}))))});wa.displayName="@mantine/core/MultiSelect";export{wa as M};
@@ -1 +1 @@
1
- import{bC as W,bD as _,bF as o,dt as q,r as H,bE as J,ai as s,T as K,bG as w,bn as O}from"./index-Cw_aKL-8.js";const k={xs:o(3),sm:o(5),md:o(8),lg:o(12),xl:o(16)},Q=q({from:{backgroundPosition:"0 0"},to:{backgroundPosition:`${o(40)} 0`}});var U=W((a,{color:r,radius:e},{size:t})=>({root:{position:"relative",height:_({size:t,sizes:k}),backgroundColor:a.colorScheme==="dark"?a.colors.dark[4]:a.colors.gray[2],borderRadius:a.fn.radius(e),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:a.fn.variant({variant:"filled",primaryFallback:!1,color:r||a.primaryColor}).background,transition:"width 100ms linear","&[data-animate]":{animation:`${Q} 1000ms linear infinite`},"&[data-striped]":{backgroundSize:`${o(20)} ${o(20)}`,backgroundImage:"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)"},"&:last-of-type":{borderTopRightRadius:a.fn.radius(e),borderBottomRightRadius:a.fn.radius(e)},"&:first-of-type":{borderTopLeftRadius:a.fn.radius(e),borderBottomLeftRadius:a.fn.radius(e)},"@media (prefers-reduced-motion)":{transitionDuration:a.respectReducedMotion?"0ms":void 0}},label:{color:a.white,fontSize:`calc(${_({size:t,sizes:k})} * 0.65)`,fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}})),X=Object.defineProperty,Y=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,N=(a,r,e)=>r in a?X(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,d=(a,r)=>{for(var e in r||(r={}))R.call(r,e)&&N(a,e,r[e]);if(n)for(var e of n(r))S.call(r,e)&&N(a,e,r[e]);return a},C=(a,r)=>Y(a,Z(r)),x=(a,r)=>{var e={};for(var t in a)R.call(a,t)&&r.indexOf(t)<0&&(e[t]=a[t]);if(a!=null&&n)for(var t of n(a))r.indexOf(t)<0&&S.call(a,t)&&(e[t]=a[t]);return e};function aa(a){return a.reduce((r,e)=>(r.sections.push(C(d({},e),{accumulated:r.accumulated})),r.accumulated+=e.value,r),{accumulated:0,sections:[]}).sections}const ea={size:"md",radius:"sm",striped:!1,animate:!1,label:""},ra=H.forwardRef((a,r)=>{const e=J("Progress",ea,a),{className:t,value:c,color:E,size:h,radius:$,striped:u,animate:i,label:m,"aria-label":j,classNames:z,styles:D,sections:p,unstyled:T,variant:F}=e,I=x(e,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled","variant"]),{classes:l,cx:f,theme:b}=U({color:E,radius:$},{name:"Progress",classNames:z,styles:D,unstyled:T,variant:F,size:h}),L=Array.isArray(p)?aa(p).map((A,B)=>{var v=A,{tooltip:g,accumulated:V,value:G,label:y,color:M}=v,P=x(v,["tooltip","accumulated","value","label","color"]);return s.createElement(K.Floating,{label:g,disabled:!g,key:B},s.createElement(w,C(d({},P),{className:f(l.bar,P.className),"data-striped":u||i||void 0,"data-animate":i||void 0,sx:{width:`${G}%`,left:`${V}%`,backgroundColor:b.fn.variant({variant:"filled",primaryFallback:!1,color:M||b.primaryColor}).background}}),y&&s.createElement(O,{className:l.label},y)))}):null;return s.createElement(w,d({className:f(l.root,t),ref:r},I),L||s.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-label":j,className:l.bar,style:{width:`${c}%`},"data-striped":u||i||void 0,"data-animate":i||void 0},m?s.createElement(O,{className:l.label},m):""))});ra.displayName="@mantine/core/Progress";export{ra as P};
1
+ import{c5 as q,c6 as _,c8 as o,dA as G,r as H,c7 as J,aa as s,T as K,c9 as w,ba as O}from"./index-Bd-SKdyy.js";const k={xs:o(3),sm:o(5),md:o(8),lg:o(12),xl:o(16)},Q=G({from:{backgroundPosition:"0 0"},to:{backgroundPosition:`${o(40)} 0`}});var U=q((a,{color:r,radius:e},{size:t})=>({root:{position:"relative",height:_({size:t,sizes:k}),backgroundColor:a.colorScheme==="dark"?a.colors.dark[4]:a.colors.gray[2],borderRadius:a.fn.radius(e),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:a.fn.variant({variant:"filled",primaryFallback:!1,color:r||a.primaryColor}).background,transition:"width 100ms linear","&[data-animate]":{animation:`${Q} 1000ms linear infinite`},"&[data-striped]":{backgroundSize:`${o(20)} ${o(20)}`,backgroundImage:"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)"},"&:last-of-type":{borderTopRightRadius:a.fn.radius(e),borderBottomRightRadius:a.fn.radius(e)},"&:first-of-type":{borderTopLeftRadius:a.fn.radius(e),borderBottomLeftRadius:a.fn.radius(e)},"@media (prefers-reduced-motion)":{transitionDuration:a.respectReducedMotion?"0ms":void 0}},label:{color:a.white,fontSize:`calc(${_({size:t,sizes:k})} * 0.65)`,fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}})),X=Object.defineProperty,Y=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,N=(a,r,e)=>r in a?X(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,c=(a,r)=>{for(var e in r||(r={}))R.call(r,e)&&N(a,e,r[e]);if(n)for(var e of n(r))S.call(r,e)&&N(a,e,r[e]);return a},h=(a,r)=>Y(a,Z(r)),x=(a,r)=>{var e={};for(var t in a)R.call(a,t)&&r.indexOf(t)<0&&(e[t]=a[t]);if(a!=null&&n)for(var t of n(a))r.indexOf(t)<0&&S.call(a,t)&&(e[t]=a[t]);return e};function aa(a){return a.reduce((r,e)=>(r.sections.push(h(c({},e),{accumulated:r.accumulated})),r.accumulated+=e.value,r),{accumulated:0,sections:[]}).sections}const ea={size:"md",radius:"sm",striped:!1,animate:!1,label:""},ra=H.forwardRef((a,r)=>{const e=J("Progress",ea,a),{className:t,value:d,color:C,size:E,radius:$,striped:u,animate:i,label:m,"aria-label":j,classNames:z,styles:T,sections:p,unstyled:A,variant:D}=e,I=x(e,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled","variant"]),{classes:l,cx:f,theme:b}=U({color:C,radius:$},{name:"Progress",classNames:z,styles:T,unstyled:A,variant:D,size:E}),L=Array.isArray(p)?aa(p).map((B,F)=>{var v=B,{tooltip:g,accumulated:V,value:M,label:y,color:W}=v,P=x(v,["tooltip","accumulated","value","label","color"]);return s.createElement(K.Floating,{label:g,disabled:!g,key:F},s.createElement(w,h(c({},P),{className:f(l.bar,P.className),"data-striped":u||i||void 0,"data-animate":i||void 0,sx:{width:`${M}%`,left:`${V}%`,backgroundColor:b.fn.variant({variant:"filled",primaryFallback:!1,color:W||b.primaryColor}).background}}),y&&s.createElement(O,{className:l.label},y)))}):null;return s.createElement(w,c({className:f(l.root,t),ref:r},I),L||s.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":d,"aria-label":j,className:l.bar,style:{width:`${d}%`},"data-striped":u||i||void 0,"data-animate":i||void 0},m?s.createElement(O,{className:l.label},m):""))});ra.displayName="@mantine/core/Progress";export{ra as P};
@@ -1 +1 @@
1
- import{bC as $,bF as k,bD as s,r as j,bE as m,ai as x,bG as T}from"./index-Cw_aKL-8.js";var B=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,p=(r,o,t)=>o in r?B(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,R=(r,o)=>{for(var t in o||(o={}))D.call(o,t)&&p(r,t,o[t]);if(c)for(var t of c(o))N.call(o,t)&&p(r,t,o[t]);return r},H=(r,o)=>E(r,C(o)),I=$((r,{captionSide:o,horizontalSpacing:t,verticalSpacing:e,fontSize:n,withBorder:d,withColumnBorders:i})=>{const a=`${k(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`;return{root:H(R({},r.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:o,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,border:d?a:void 0,"& > caption":{marginTop:o==="top"?0:r.spacing.xs,marginBottom:o==="bottom"?0:r.spacing.xs,fontSize:r.fontSizes.sm,color:r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:r.colorScheme==="dark"?r.colors.dark[0]:r.colors.gray[7],fontSize:s({size:n,sizes:r.fontSizes}),padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`,borderTop:a,fontSize:s({size:n,sizes:r.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:i?a:"none","&:last-of-type":{borderRight:"none",borderLeft:i?a:"none"}},"& > tbody > tr > th":{borderRight:i?a:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[0]},"&[data-hover] > tbody > tr":r.fn.hover({backgroundColor:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[1]})})}}),V=Object.defineProperty,A=Object.defineProperties,F=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,f=(r,o,t)=>o in r?V(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,G=(r,o)=>{for(var t in o||(o={}))g.call(o,t)&&f(r,t,o[t]);if(l)for(var t of l(o))b.call(o,t)&&f(r,t,o[t]);return r},L=(r,o)=>A(r,F(o)),W=(r,o)=>{var t={};for(var e in r)g.call(r,e)&&o.indexOf(e)<0&&(t[e]=r[e]);if(r!=null&&l)for(var e of l(r))o.indexOf(e)<0&&b.call(r,e)&&(t[e]=r[e]);return t};const q={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},J=j.forwardRef((r,o)=>{const t=m("Table",q,r),{className:e,children:n,striped:d,highlightOnHover:i,captionSide:a,horizontalSpacing:_,verticalSpacing:v,fontSize:y,unstyled:O,withBorder:S,withColumnBorders:P,variant:z}=t,h=W(t,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:u,cx:w}=I({captionSide:a,verticalSpacing:v,horizontalSpacing:_,fontSize:y,withBorder:S,withColumnBorders:P},{unstyled:O,name:"Table",variant:z});return x.createElement(T,L(G({},h),{component:"table",ref:o,className:w(u.root,e),"data-striped":d||void 0,"data-hover":i||void 0}),n)});J.displayName="@mantine/core/Table";export{J as T};
1
+ import{c5 as $,c8 as k,c6 as s,r as j,c7 as m,aa as x,c9 as T}from"./index-Bd-SKdyy.js";var B=Object.defineProperty,E=Object.defineProperties,N=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,p=(r,o,t)=>o in r?B(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,D=(r,o)=>{for(var t in o||(o={}))R.call(o,t)&&p(r,t,o[t]);if(c)for(var t of c(o))C.call(o,t)&&p(r,t,o[t]);return r},H=(r,o)=>E(r,N(o)),I=$((r,{captionSide:o,horizontalSpacing:t,verticalSpacing:e,fontSize:n,withBorder:d,withColumnBorders:i})=>{const a=`${k(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`;return{root:H(D({},r.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:o,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,border:d?a:void 0,"& > caption":{marginTop:o==="top"?0:r.spacing.xs,marginBottom:o==="bottom"?0:r.spacing.xs,fontSize:r.fontSizes.sm,color:r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:r.colorScheme==="dark"?r.colors.dark[0]:r.colors.gray[7],fontSize:s({size:n,sizes:r.fontSizes}),padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`,borderTop:a,fontSize:s({size:n,sizes:r.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:i?a:"none","&:last-of-type":{borderRight:"none",borderLeft:i?a:"none"}},"& > tbody > tr > th":{borderRight:i?a:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[0]},"&[data-hover] > tbody > tr":r.fn.hover({backgroundColor:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[1]})})}}),V=Object.defineProperty,A=Object.defineProperties,L=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,f=(r,o,t)=>o in r?V(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,W=(r,o)=>{for(var t in o||(o={}))g.call(o,t)&&f(r,t,o[t]);if(l)for(var t of l(o))b.call(o,t)&&f(r,t,o[t]);return r},q=(r,o)=>A(r,L(o)),F=(r,o)=>{var t={};for(var e in r)g.call(r,e)&&o.indexOf(e)<0&&(t[e]=r[e]);if(r!=null&&l)for(var e of l(r))o.indexOf(e)<0&&b.call(r,e)&&(t[e]=r[e]);return t};const G={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},J=j.forwardRef((r,o)=>{const t=m("Table",G,r),{className:e,children:n,striped:d,highlightOnHover:i,captionSide:a,horizontalSpacing:_,verticalSpacing:v,fontSize:y,unstyled:O,withBorder:S,withColumnBorders:P,variant:z}=t,h=F(t,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:u,cx:w}=I({captionSide:a,verticalSpacing:v,horizontalSpacing:_,fontSize:y,withBorder:S,withColumnBorders:P},{unstyled:O,name:"Table",variant:z});return x.createElement(T,q(W({},h),{component:"table",ref:o,className:w(u.root,e),"data-striped":d||void 0,"data-hover":i||void 0}),n)});J.displayName="@mantine/core/Table";export{J as T};
@@ -1 +1 @@
1
- import{dM as S,dN as J,dO as Q,dP as X,dQ as W,dR as Y,cG as Z,cF as N,r as M,cK as z,dS as tt,j as et,aj as rt,du as _}from"./index-Cw_aKL-8.js";function kt(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}const $=t=>t,nt=()=>{let t=$;return{configure(e){t=e},generate(e){return t(e)},reset(){t=$}}},ot=nt(),st={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function H(t,e,r="Mui"){const n=st[e];return n?`${r}-${n}`:`${ot.generate(t)}-${e}`}function it(t,e,r="Mui"){const n={};return e.forEach(o=>{n[o]=H(t,o,r)}),n}function U(t){const{variants:e,...r}=t,n={variants:e,style:S(r),isProcessed:!0};return n.style===r||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=S(o.style))}),n}const at=J();function V(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function g(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function lt(t){return t?(e,r)=>r[t]:null}function ut(t,e,r){t.theme=ht(t.theme)?r:t.theme[e]||t.theme}function A(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>A(t,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?g(n.style,r):n.style;else{const{variants:s,...i}=n;o=r?g(S(i),r):i}return I(t,n.variants,[o],r)}return n?.isProcessed?r?g(S(n.style),r):n.style:r?g(S(n),r):n}function I(t,e,r=[],n=void 0){let o;t:for(let s=0;s<e.length;s+=1){const i=e[s];if(typeof i.props=="function"){if(o??={...t,...t.ownerState,ownerState:t.ownerState},!i.props(o))continue}else for(const a in i.props)if(t[a]!==i.props[a]&&t.ownerState?.[a]!==i.props[a])continue t;typeof i.style=="function"?(o??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?g(S(i.style(o)),n):i.style(o))):r.push(n?g(S(i.style),n):i.style)}return r}function ct(t={}){const{themeId:e,defaultTheme:r=at,rootShouldForwardProp:n=V,slotShouldForwardProp:o=V}=t;function s(a){ut(a,e,r)}return(a,y={})=>{Q(a,u=>u.filter(c=>c!==W));const{name:l,slot:h,skipVariantsResolver:b,skipSx:C,overridesResolver:v=lt(dt(h)),...T}=y,w=l&&l.startsWith("Mui")||h?"components":"custom",P=b!==void 0?b:h&&h!=="Root"&&h!=="root"||!1,k=C||!1;let x=V;h==="Root"||h==="root"?x=n:h?x=o:pt(a)&&(x=void 0);const F=X(a,{shouldForwardProp:x,label:ft(),...T}),q=u=>{if(u.__emotion_real===u)return u;if(typeof u=="function")return function(m){return A(m,u,m.theme.modularCssLayers?w:void 0)};if(Y(u)){const c=U(u);return function(d){return c.variants?A(d,c,d.theme.modularCssLayers?w:void 0):d.theme.modularCssLayers?g(c.style,w):c.style}}return u},j=(...u)=>{const c=[],m=u.map(q),d=[];if(c.push(s),l&&v&&d.push(function(f){const p=f.theme.components?.[l]?.styleOverrides;if(!p)return null;const B={};for(const E in p)B[E]=A(f,p[E],f.theme.modularCssLayers?"theme":void 0);return v(f,B)}),l&&!P&&d.push(function(f){const p=f.theme?.components?.[l]?.variants;return p?I(f,p,[],f.theme.modularCssLayers?"theme":void 0):null}),k||d.push(W),Array.isArray(m[0])){const O=m.shift(),f=new Array(c.length).fill(""),R=new Array(d.length).fill("");let p;p=[...f,...O,...R],p.raw=[...f,...O.raw,...R],c.unshift(p)}const K=[...c,...m,...d],L=F(...K);return a.muiName&&(L.muiName=a.muiName),L};return F.withConfig&&(j.withConfig=F.withConfig),j}}function ft(t,e){return void 0}function ht(t){for(const e in t)return!1;return!0}function pt(t){return typeof t=="string"&&t.charCodeAt(0)>96}function dt(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const D={theme:void 0};function yt(t){let e,r;return function(o){let s=e;return(s===void 0||o.theme!==r)&&(D.theme=o.theme,s=U(t(D)),e=s,r=o.theme),s}}function mt(t,e,r=void 0){const n={};for(const o in t){const s=t[o];let i="",a=!0;for(let y=0;y<s.length;y+=1){const l=s[y];l&&(i+=(a===!0?"":" ")+e(l),a=!1,r&&r[l]&&(i+=" "+r[l]))}n[o]=i}return n}function gt(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const St=t=>gt(t)&&t!=="classes",vt=ct({themeId:Z,defaultTheme:N,rootShouldForwardProp:St}),wt=yt;function Ft(...t){const e=M.useRef(void 0),r=M.useCallback(n=>{const o=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(n);return typeof a=="function"?a:()=>{i(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},t);return M.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function xt(t){return typeof t.main=="string"}function bt(t,e=[]){if(!xt(t))return!1;for(const r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function Ct(t=[]){return([,e])=>e&&bt(e,t)}function Tt(t){return H("MuiTypography",t)}it("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Pt={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ot=tt(),Rt=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${_(e)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return mt(a,Tt,i)},Mt=vt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${_(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(wt(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(Ct()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${_(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),G={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Vt=M.forwardRef(function(e,r){const{color:n,...o}=z({props:e,name:"MuiTypography"}),s=!Pt[n],i=Ot({...o,...s&&{color:n}}),{align:a="inherit",className:y,component:l,gutterBottom:h=!1,noWrap:b=!1,paragraph:C=!1,variant:v="body1",variantMapping:T=G,...w}=i,P={...i,align:a,color:n,className:y,component:l,gutterBottom:h,noWrap:b,paragraph:C,variant:v,variantMapping:T},k=l||(C?"p":T[v]||G[v])||"span",x=Rt(P);return et.jsx(Mt,{as:k,ref:r,className:rt(x.root,y),...w,ownerState:P,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...w.style}})});export{Vt as T,kt as _,it as a,V as b,mt as c,Ct as d,H as g,wt as m,vt as s,Ft as u};
1
+ import{dQ as S,dR as K,dS as Q,dT as X,dU as E,dV as Y,d6 as Z,d5 as z,r as A,da as N,dW as tt,j as et,ab as rt,dB as _}from"./index-Bd-SKdyy.js";function kt(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}const $=t=>t,nt=()=>{let t=$;return{configure(e){t=e},generate(e){return t(e)},reset(){t=$}}},ot=nt(),st={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function H(t,e,r="Mui"){const n=st[e];return n?`${r}-${n}`:`${ot.generate(t)}-${e}`}function it(t,e,r="Mui"){const n={};return e.forEach(o=>{n[o]=H(t,o,r)}),n}function G(t){const{variants:e,...r}=t,n={variants:e,style:S(r),isProcessed:!0};return n.style===r||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=S(o.style))}),n}const at=K();function F(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function g(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function lt(t){return t?(e,r)=>r[t]:null}function ut(t,e,r){t.theme=ht(t.theme)?r:t.theme[e]||t.theme}function M(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>M(t,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?g(n.style,r):n.style;else{const{variants:s,...i}=n;o=r?g(S(i),r):i}return I(t,n.variants,[o],r)}return n?.isProcessed?r?g(S(n.style),r):n.style:r?g(S(n),r):n}function I(t,e,r=[],n=void 0){let o;t:for(let s=0;s<e.length;s+=1){const i=e[s];if(typeof i.props=="function"){if(o??={...t,...t.ownerState,ownerState:t.ownerState},!i.props(o))continue}else for(const a in i.props)if(t[a]!==i.props[a]&&t.ownerState?.[a]!==i.props[a])continue t;typeof i.style=="function"?(o??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?g(S(i.style(o)),n):i.style(o))):r.push(n?g(S(i.style),n):i.style)}return r}function ct(t={}){const{themeId:e,defaultTheme:r=at,rootShouldForwardProp:n=F,slotShouldForwardProp:o=F}=t;function s(a){ut(a,e,r)}return(a,y={})=>{Q(a,u=>u.filter(c=>c!==E));const{name:l,slot:h,skipVariantsResolver:x,skipSx:C,overridesResolver:v=lt(dt(h)),...T}=y,w=l&&l.startsWith("Mui")||h?"components":"custom",P=x!==void 0?x:h&&h!=="Root"&&h!=="root"||!1,k=C||!1;let b=F;h==="Root"||h==="root"?b=n:h?b=o:pt(a)&&(b=void 0);const V=X(a,{shouldForwardProp:b,label:ft(),...T}),q=u=>{if(u.__emotion_real===u)return u;if(typeof u=="function")return function(m){return M(m,u,m.theme.modularCssLayers?w:void 0)};if(Y(u)){const c=G(u);return function(d){return c.variants?M(d,c,d.theme.modularCssLayers?w:void 0):d.theme.modularCssLayers?g(c.style,w):c.style}}return u},B=(...u)=>{const c=[],m=u.map(q),d=[];if(c.push(s),l&&v&&d.push(function(f){const p=f.theme.components?.[l]?.styleOverrides;if(!p)return null;const W={};for(const j in p)W[j]=M(f,p[j],f.theme.modularCssLayers?"theme":void 0);return v(f,W)}),l&&!P&&d.push(function(f){const p=f.theme?.components?.[l]?.variants;return p?I(f,p,[],f.theme.modularCssLayers?"theme":void 0):null}),k||d.push(E),Array.isArray(m[0])){const R=m.shift(),f=new Array(c.length).fill(""),O=new Array(d.length).fill("");let p;p=[...f,...R,...O],p.raw=[...f,...R.raw,...O],c.unshift(p)}const J=[...c,...m,...d],L=V(...J);return a.muiName&&(L.muiName=a.muiName),L};return V.withConfig&&(B.withConfig=V.withConfig),B}}function ft(t,e){return void 0}function ht(t){for(const e in t)return!1;return!0}function pt(t){return typeof t=="string"&&t.charCodeAt(0)>96}function dt(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const U={theme:void 0};function yt(t){let e,r;return function(o){let s=e;return(s===void 0||o.theme!==r)&&(U.theme=o.theme,s=G(t(U)),e=s,r=o.theme),s}}function mt(t,e,r=void 0){const n={};for(const o in t){const s=t[o];let i="",a=!0;for(let y=0;y<s.length;y+=1){const l=s[y];l&&(i+=(a===!0?"":" ")+e(l),a=!1,r&&r[l]&&(i+=" "+r[l]))}n[o]=i}return n}function gt(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const St=t=>gt(t)&&t!=="classes",vt=ct({themeId:Z,defaultTheme:z,rootShouldForwardProp:St}),wt=yt;function Vt(...t){const e=A.useRef(void 0),r=A.useCallback(n=>{const o=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(n);return typeof a=="function"?a:()=>{i(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},t);return A.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function bt(t){return typeof t.main=="string"}function xt(t,e=[]){if(!bt(t))return!1;for(const r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function Ct(t=[]){return([,e])=>e&&xt(e,t)}function Tt(t){return H("MuiTypography",t)}it("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Pt={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Rt=tt(),Ot=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${_(e)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return mt(a,Tt,i)},At=vt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${_(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(wt(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(Ct()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${_(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),D={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ft=A.forwardRef(function(e,r){const{color:n,...o}=N({props:e,name:"MuiTypography"}),s=!Pt[n],i=Rt({...o,...s&&{color:n}}),{align:a="inherit",className:y,component:l,gutterBottom:h=!1,noWrap:x=!1,paragraph:C=!1,variant:v="body1",variantMapping:T=D,...w}=i,P={...i,align:a,color:n,className:y,component:l,gutterBottom:h,noWrap:x,paragraph:C,variant:v,variantMapping:T},k=l||(C?"p":T[v]||D[v])||"span",b=Ot(P);return et.jsx(At,{as:k,ref:r,className:rt(b.root,y),...w,ownerState:P,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...w.style}})});export{Ft as T,kt as _,it as a,F as b,mt as c,Ct as d,H as g,wt as m,vt as s,Vt as u};
@@ -1 +1 @@
1
- import{r as E,bE as j,gk as q,ai as C,gl as G,gm as J,gn as K,go as Q,gp as S}from"./index-Cw_aKL-8.js";var U=Object.defineProperty,v=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,h=(e,a,r)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,Y=(e,a)=>{for(var r in a||(a={}))k.call(a,r)&&h(e,r,a[r]);if(v)for(var r of v(a))R.call(a,r)&&h(e,r,a[r]);return e},W=(e,a)=>{var r={};for(var t in e)k.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&v)for(var t of v(e))a.indexOf(t)<0&&R.call(e,t)&&(r[t]=e[t]);return r};const X={type:"default"},V=E.forwardRef((e,a)=>{const r=j("YearPicker",X,e),{type:t,defaultValue:g,value:m,onChange:y,__staticSelector:O,getYearControlProps:p,allowSingleDateInRange:i,allowDeselect:c,onMouseLeave:u,onYearSelect:n}=r,w=W(r,["type","defaultValue","value","onChange","__staticSelector","getYearControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onYearSelect"]),{onDateChange:f,onRootMouseLeave:d,onHoveredDateChange:_,getControlProps:D}=q({type:t,level:"year",allowDeselect:c,allowSingleDateInRange:i,value:m,defaultValue:g,onChange:y,onMouseLeave:u});return C.createElement(G,Y({ref:a,minLevel:"decade",__updateDateOnYearSelect:!1,__staticSelector:O||"YearPicker",onMouseLeave:d,onYearMouseEnter:(o,l)=>_(l),onYearSelect:o=>{f(o),n?.(o)},getYearControlProps:o=>Y(Y({},D(o)),p?.(o))},w))});V.displayName="@mantine/dates/YearPicker";var Z=Object.defineProperty,ee=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,I=(e,a,r)=>a in e?Z(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,b=(e,a)=>{for(var r in a||(a={}))$.call(a,r)&&I(e,r,a[r]);if(P)for(var r of P(a))x.call(a,r)&&I(e,r,a[r]);return e},re=(e,a)=>ee(e,ae(a)),te=(e,a)=>{var r={};for(var t in e)$.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&P)for(var t of P(e))a.indexOf(t)<0&&x.call(e,t)&&(r[t]=e[t]);return r};const oe={type:"default",valueFormat:"YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},ne=E.forwardRef((e,a)=>{const r=j("YearPickerInput",oe,e),{type:t,value:g,defaultValue:m,onChange:y,valueFormat:O,labelSeparator:p,locale:i,classNames:c,styles:u,unstyled:n,closeOnChange:w,size:f,variant:d,dropdownType:_,sortDates:D,minDate:o,maxDate:l}=r,N=te(r,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:L,others:M}=J(N),{_value:s,setValue:F,formattedValue:T,dropdownHandlers:z,dropdownOpened:A,onClear:H,shouldClear:B}=K({type:t,value:g,defaultValue:m,onChange:y,locale:i,format:O,labelSeparator:p,closeOnChange:w,sortDates:D});return C.createElement(Q,b({formattedValue:T,dropdownOpened:A,dropdownHandlers:z,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",ref:a,onClear:H,shouldClear:B,value:s,type:t,size:f,variant:d,dropdownType:_},M),C.createElement(V,re(b({},L),{size:f,variant:d,type:t,value:s,defaultDate:Array.isArray(s)?s[0]||S({maxDate:l,minDate:o}):s||S({maxDate:l,minDate:o}),onChange:F,locale:i,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",__stopPropagation:_==="popover",minDate:o,maxDate:l})))});ne.displayName="@mantine/dates/YearPickerInput";export{ne as Y};
1
+ import{r as E,c7 as j,go as B,aa as C,gp as G,gq as J,gr as K,gs as Q,gt as S}from"./index-Bd-SKdyy.js";var U=Object.defineProperty,v=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,h=(e,a,r)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,Y=(e,a)=>{for(var r in a||(a={}))R.call(a,r)&&h(e,r,a[r]);if(v)for(var r of v(a))V.call(a,r)&&h(e,r,a[r]);return e},W=(e,a)=>{var r={};for(var t in e)R.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&v)for(var t of v(e))a.indexOf(t)<0&&V.call(e,t)&&(r[t]=e[t]);return r};const X={type:"default"},$=E.forwardRef((e,a)=>{const r=j("YearPicker",X,e),{type:t,defaultValue:g,value:m,onChange:y,__staticSelector:O,getYearControlProps:p,allowSingleDateInRange:i,allowDeselect:c,onMouseLeave:u,onYearSelect:n}=r,w=W(r,["type","defaultValue","value","onChange","__staticSelector","getYearControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onYearSelect"]),{onDateChange:f,onRootMouseLeave:d,onHoveredDateChange:_,getControlProps:D}=B({type:t,level:"year",allowDeselect:c,allowSingleDateInRange:i,value:m,defaultValue:g,onChange:y,onMouseLeave:u});return C.createElement(G,Y({ref:a,minLevel:"decade",__updateDateOnYearSelect:!1,__staticSelector:O||"YearPicker",onMouseLeave:d,onYearMouseEnter:(o,l)=>_(l),onYearSelect:o=>{f(o),n?.(o)},getYearControlProps:o=>Y(Y({},D(o)),p?.(o))},w))});$.displayName="@mantine/dates/YearPicker";var Z=Object.defineProperty,ee=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,I=(e,a,r)=>a in e?Z(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,b=(e,a)=>{for(var r in a||(a={}))k.call(a,r)&&I(e,r,a[r]);if(P)for(var r of P(a))x.call(a,r)&&I(e,r,a[r]);return e},re=(e,a)=>ee(e,ae(a)),te=(e,a)=>{var r={};for(var t in e)k.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&P)for(var t of P(e))a.indexOf(t)<0&&x.call(e,t)&&(r[t]=e[t]);return r};const oe={type:"default",valueFormat:"YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},ne=E.forwardRef((e,a)=>{const r=j("YearPickerInput",oe,e),{type:t,value:g,defaultValue:m,onChange:y,valueFormat:O,labelSeparator:p,locale:i,classNames:c,styles:u,unstyled:n,closeOnChange:w,size:f,variant:d,dropdownType:_,sortDates:D,minDate:o,maxDate:l}=r,N=te(r,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:L,others:M}=J(N),{_value:s,setValue:F,formattedValue:T,dropdownHandlers:z,dropdownOpened:A,onClear:H,shouldClear:q}=K({type:t,value:g,defaultValue:m,onChange:y,locale:i,format:O,labelSeparator:p,closeOnChange:w,sortDates:D});return C.createElement(Q,b({formattedValue:T,dropdownOpened:A,dropdownHandlers:z,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",ref:a,onClear:H,shouldClear:q,value:s,type:t,size:f,variant:d,dropdownType:_},M),C.createElement($,re(b({},L),{size:f,variant:d,type:t,value:s,defaultDate:Array.isArray(s)?s[0]||S({maxDate:l,minDate:o}):s||S({maxDate:l,minDate:o}),onChange:F,locale:i,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",__stopPropagation:_==="popover",minDate:o,maxDate:l})))});ne.displayName="@mantine/dates/YearPickerInput";export{ne as Y};
@@ -1 +1 @@
1
- import{ai as l,j as t,gX as F,gY as J,gZ as O,g_ as Q,g$ as W,h0 as T,h1 as ee,h2 as oe,h3 as M,h4 as re,h5 as te,h6 as ne,m as P,dr as ae}from"./index-Cw_aKL-8.js";var d="Accordion",ce=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[k,ie,se]=F(d),[b]=J(d,[se,O]),E=O(),V=l.forwardRef((e,n)=>{const{type:o,...a}=e,c=a,r=a;return t.jsx(k.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(ue,{...r,ref:n}):t.jsx(pe,{...c,ref:n})})});V.displayName=d;var[H,le]=b(d),[$,de]=b(d,{collapsible:!1}),pe=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},collapsible:r=!1,...s}=e,[i,p]=M({prop:o,defaultProp:a??"",onChange:c,caller:d});return t.jsx(H,{scope:e.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:t.jsx($,{scope:e.__scopeAccordion,collapsible:r,children:t.jsx(K,{...s,ref:n})})})}),ue=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},...r}=e,[s,i]=M({prop:o,defaultProp:a??[],onChange:c,caller:d}),p=l.useCallback(x=>i((f=[])=>[...f,x]),[i]),v=l.useCallback(x=>i((f=[])=>f.filter(h=>h!==x)),[i]);return t.jsx(H,{scope:e.__scopeAccordion,value:s,onItemOpen:p,onItemClose:v,children:t.jsx($,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx(K,{...r,ref:n})})})}),[fe,C]=b(d),K=l.forwardRef((e,n)=>{const{__scopeAccordion:o,disabled:a,dir:c,orientation:r="vertical",...s}=e,i=l.useRef(null),p=re(i,n),v=ie(o),f=te(c)==="ltr",h=ne(e.onKeyDown,m=>{if(!ce.includes(m.key))return;const q=m.target,I=v().filter(R=>!R.ref.current?.disabled),g=I.findIndex(R=>R.ref.current===q),D=I.length;if(g===-1)return;m.preventDefault();let u=g;const j=0,w=D-1,_=()=>{u=g+1,u>w&&(u=j)},y=()=>{u=g-1,u<j&&(u=w)};switch(m.key){case"Home":u=j;break;case"End":u=w;break;case"ArrowRight":r==="horizontal"&&(f?_():y());break;case"ArrowDown":r==="vertical"&&_();break;case"ArrowLeft":r==="horizontal"&&(f?y():_());break;case"ArrowUp":r==="vertical"&&y();break}const B=u%D;I[B].ref.current?.focus()});return t.jsx(fe,{scope:o,disabled:a,direction:c,orientation:r,children:t.jsx(k.Slot,{scope:o,children:t.jsx(T.div,{...s,"data-orientation":r,ref:p,onKeyDown:a?void 0:h})})})}),A="AccordionItem",[ve,S]=b(A),z=l.forwardRef((e,n)=>{const{__scopeAccordion:o,value:a,...c}=e,r=C(A,o),s=le(A,o),i=E(o),p=Q(),v=a&&s.value.includes(a)||!1,x=r.disabled||e.disabled;return t.jsx(ve,{scope:o,open:v,disabled:x,triggerId:p,children:t.jsx(W,{"data-orientation":r.orientation,"data-state":Z(v),...i,...c,ref:n,disabled:x,open:v,onOpenChange:f=>{f?s.onItemOpen(a):s.onItemClose(a)}})})});z.displayName=A;var L="AccordionHeader",G=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(L,o);return t.jsx(T.h3,{"data-orientation":c.orientation,"data-state":Z(r.open),"data-disabled":r.disabled?"":void 0,...a,ref:n})});G.displayName=L;var N="AccordionTrigger",U=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(N,o),s=de(N,o),i=E(o);return t.jsx(k.ItemSlot,{scope:o,children:t.jsx(ee,{"aria-disabled":r.open&&!s.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...i,...a,ref:n})})});U.displayName=N;var Y="AccordionContent",X=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(Y,o),s=E(o);return t.jsx(oe,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...s,...a,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});X.displayName=Y;function Z(e){return e?"open":"closed"}var xe=V,me=z,ge=G,Ae=U,be=X;function he({...e}){return t.jsx(xe,{"data-slot":"accordion",...e})}function Ie({className:e,...n}){return t.jsx(me,{"data-slot":"accordion-item",className:P("border-b last:border-b-0",e),...n})}function je({className:e,children:n,...o}){return t.jsx(ge,{className:"flex",children:t.jsxs(Ae,{"data-slot":"accordion-trigger",className:P("focus-visible:border-gray-950 focus-visible:ring-gray-950/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50",e),...o,children:[n,t.jsx(ae,{className:"text-gray-500 pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-gray-400"})]})})}function we({className:e,children:n,...o}){return t.jsx(be,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...o,children:t.jsx("div",{className:P("pt-0 pb-4",e),children:n})})}export{he as A,Ie as a,we as b,je as c};
1
+ import{aa as l,j as t,g$ as Q,h0 as W,h1 as O,h2 as X,h3 as Z,h4 as T,h5 as ee,h6 as oe,h7 as M,h8 as re,h9 as te,ha as ne,m as P,bK as ae}from"./index-Bd-SKdyy.js";var d="Accordion",ce=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[k,ie,se]=Q(d),[b]=W(d,[se,O]),E=O(),V=l.forwardRef((e,n)=>{const{type:o,...a}=e,c=a,r=a;return t.jsx(k.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(ue,{...r,ref:n}):t.jsx(pe,{...c,ref:n})})});V.displayName=d;var[H,le]=b(d),[K,de]=b(d,{collapsible:!1}),pe=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},collapsible:r=!1,...s}=e,[i,p]=M({prop:o,defaultProp:a??"",onChange:c,caller:d});return t.jsx(H,{scope:e.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:t.jsx(K,{scope:e.__scopeAccordion,collapsible:r,children:t.jsx($,{...s,ref:n})})})}),ue=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},...r}=e,[s,i]=M({prop:o,defaultProp:a??[],onChange:c,caller:d}),p=l.useCallback(x=>i((f=[])=>[...f,x]),[i]),v=l.useCallback(x=>i((f=[])=>f.filter(C=>C!==x)),[i]);return t.jsx(H,{scope:e.__scopeAccordion,value:s,onItemOpen:p,onItemClose:v,children:t.jsx(K,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx($,{...r,ref:n})})})}),[fe,h]=b(d),$=l.forwardRef((e,n)=>{const{__scopeAccordion:o,disabled:a,dir:c,orientation:r="vertical",...s}=e,i=l.useRef(null),p=re(i,n),v=ie(o),f=te(c)==="ltr",C=ne(e.onKeyDown,m=>{if(!ce.includes(m.key))return;const F=m.target,I=v().filter(R=>!R.ref.current?.disabled),g=I.findIndex(R=>R.ref.current===F),D=I.length;if(g===-1)return;m.preventDefault();let u=g;const j=0,w=D-1,_=()=>{u=g+1,u>w&&(u=j)},y=()=>{u=g-1,u<j&&(u=w)};switch(m.key){case"Home":u=j;break;case"End":u=w;break;case"ArrowRight":r==="horizontal"&&(f?_():y());break;case"ArrowDown":r==="vertical"&&_();break;case"ArrowLeft":r==="horizontal"&&(f?y():_());break;case"ArrowUp":r==="vertical"&&y();break}const J=u%D;I[J].ref.current?.focus()});return t.jsx(fe,{scope:o,disabled:a,direction:c,orientation:r,children:t.jsx(k.Slot,{scope:o,children:t.jsx(T.div,{...s,"data-orientation":r,ref:p,onKeyDown:a?void 0:C})})})}),A="AccordionItem",[ve,S]=b(A),z=l.forwardRef((e,n)=>{const{__scopeAccordion:o,value:a,...c}=e,r=h(A,o),s=le(A,o),i=E(o),p=X(),v=a&&s.value.includes(a)||!1,x=r.disabled||e.disabled;return t.jsx(ve,{scope:o,open:v,disabled:x,triggerId:p,children:t.jsx(Z,{"data-orientation":r.orientation,"data-state":B(v),...i,...c,ref:n,disabled:x,open:v,onOpenChange:f=>{f?s.onItemOpen(a):s.onItemClose(a)}})})});z.displayName=A;var L="AccordionHeader",G=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(d,o),r=S(L,o);return t.jsx(T.h3,{"data-orientation":c.orientation,"data-state":B(r.open),"data-disabled":r.disabled?"":void 0,...a,ref:n})});G.displayName=L;var N="AccordionTrigger",U=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(d,o),r=S(N,o),s=de(N,o),i=E(o);return t.jsx(k.ItemSlot,{scope:o,children:t.jsx(ee,{"aria-disabled":r.open&&!s.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...i,...a,ref:n})})});U.displayName=N;var Y="AccordionContent",q=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(d,o),r=S(Y,o),s=E(o);return t.jsx(oe,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...s,...a,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});q.displayName=Y;function B(e){return e?"open":"closed"}var xe=V,me=z,ge=G,Ae=U,be=q;function Ce({...e}){return t.jsx(xe,{"data-slot":"accordion",...e})}function Ie({className:e,...n}){return t.jsx(me,{"data-slot":"accordion-item",className:P("border-b last:border-b-0",e),...n})}function je({className:e,children:n,...o}){return t.jsx(ge,{className:"flex",children:t.jsxs(Ae,{"data-slot":"accordion-trigger",className:P("focus-visible:border-gray-950 focus-visible:ring-gray-950/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50",e),...o,children:[n,t.jsx(ae,{className:"text-gray-500 pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-gray-400"})]})})}function we({className:e,children:n,...o}){return t.jsx(be,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...o,children:t.jsx("div",{className:P("pt-0 pb-4",e),children:n})})}export{Ce as A,Ie as a,we as b,je as c};
@@ -1 +1 @@
1
- import{r as s,F as h,af as v,ah as C,u as P,j as e,L as A,h7 as F}from"./index-Cw_aKL-8.js";import{u as b}from"./use-url-query-C0mVgO2i.js";import{C as y}from"./charges-filters-DUuY-N0H.js";import{P as j}from"./page-layout-CVTeUSZp.js";import{P as D}from"./Progress-kr0gnfBa.js";import"./modal-Pj_6bAFk.js";import"./funnel-CMG4QvaK.js";import"./sub-DOjETdwl.js";import"./addDays-DqZEDZy3.js";import"./subMonths-DqeFZ4O6.js";import"./MultiSelect-Dm9mO7pJ.js";const L=()=>{const{setFiltersContext:c}=s.useContext(h),{get:i}=b(),{userContext:p}=s.useContext(v),[a,m]=s.useState(i("chargesFilters")?JSON.parse(decodeURIComponent(i("chargesFilters"))):{byOwners:p?.context.adminBusinessId?[p?.context.adminBusinessId]:[],sortBy:{field:C.Date,asc:!1},toAnyDate:null,fromAnyDate:null}),[{data:r,fetching:u}]=P({query:F,variables:{filters:a,page:1,limit:999999}}),t=r?.allCharges?.nodes.length??0;let o=0,l=0,n=0;r?.allCharges?.nodes.map(f=>{switch(f.accountantApproval){case"APPROVED":o+=1;break;case"PENDING":l+=1;break;case"UNAPPROVED":n+=1;break}});const x=100*o/t,d=100*l/t,g=100*n/t;return s.useEffect(()=>{c(e.jsx("div",{className:"flex flex-row gap-x-5",children:e.jsx(y,{filter:a,setFilter:m,activePage:1,setPage:()=>{},totalPages:1})}))},[r,u,a,c,m]),e.jsx(j,{title:"Accountant Approvals Status",children:u?e.jsx(A,{className:"h-10 w-10 animate-spin mr-2 self-center"}):e.jsxs("div",{className:"mx-10 mt-5 flex flex-col gap-5",children:[`Total charges: ${t}`,e.jsx(D,{color:"green",radius:"xl",size:"xl",sections:[{value:x,color:"green",label:`${x.toFixed(1)}% (${o})`},{value:d,color:"orange",label:`${d.toFixed(1)}% (${l})`},{value:g,color:"red",label:`${g.toFixed(1)}% (${n})`}]})]})})};export{L as AccountantApprovals};
1
+ import{r as s,F as h,a7 as v,a9 as C,u as P,j as e,L as A,hb as F}from"./index-Bd-SKdyy.js";import{u as b}from"./use-url-query-5TFyEk1x.js";import{C as y}from"./charges-filters-DhYogrgu.js";import{P as j}from"./page-layout-XgNPsCmr.js";import{P as D}from"./Progress-D7j8SJRp.js";import"./modal-CwuHXtxz.js";import"./funnel-DW3_rS_8.js";import"./sub-BL9nfaPD.js";import"./addDays-HTdY9JyJ.js";import"./subMonths-DHPWOZP6.js";import"./MultiSelect-SsgUtHuW.js";const L=()=>{const{setFiltersContext:c}=s.useContext(h),{get:i}=b(),{userContext:p}=s.useContext(v),[a,m]=s.useState(i("chargesFilters")?JSON.parse(decodeURIComponent(i("chargesFilters"))):{byOwners:p?.context.adminBusinessId?[p?.context.adminBusinessId]:[],sortBy:{field:C.Date,asc:!1},toAnyDate:null,fromAnyDate:null}),[{data:r,fetching:u}]=P({query:F,variables:{filters:a,page:1,limit:999999}}),t=r?.allCharges?.nodes.length??0;let o=0,l=0,n=0;r?.allCharges?.nodes.map(f=>{switch(f.accountantApproval){case"APPROVED":o+=1;break;case"PENDING":l+=1;break;case"UNAPPROVED":n+=1;break}});const x=100*o/t,d=100*l/t,g=100*n/t;return s.useEffect(()=>{c(e.jsx("div",{className:"flex flex-row gap-x-5",children:e.jsx(y,{filter:a,setFilter:m,activePage:1,setPage:()=>{},totalPages:1})}))},[r,u,a,c,m]),e.jsx(j,{title:"Accountant Approvals Status",children:u?e.jsx(A,{className:"h-10 w-10 animate-spin mr-2 self-center"}):e.jsxs("div",{className:"mx-10 mt-5 flex flex-col gap-5",children:[`Total charges: ${t}`,e.jsx(D,{color:"green",radius:"xl",size:"xl",sections:[{value:x,color:"green",label:`${x.toFixed(1)}% (${o})`},{value:d,color:"orange",label:`${d.toFixed(1)}% (${l})`},{value:g,color:"red",label:`${g.toFixed(1)}% (${n})`}]})]})})};export{L as AccountantApprovals};
@@ -1 +1 @@
1
- import{r as s,j as t,B as r,dX as a}from"./index-Cw_aKL-8.js";import{T as c}from"./Table-DnHfGe-y.js";function h(e){const[i,o]=s.useState(!1),l=e.moreInfo?e.moreInfo(e.item):null;return t.jsxs(t.Fragment,{children:[t.jsxs("tr",{children:[e.columns.map((n,d)=>n.disabled?null:t.jsx("td",{style:n.style,children:n.value(e.item,e.rowContext?e.rowContext(e.item):void 0)},String(d))),e.moreInfo&&t.jsx("td",{children:l===null?t.jsx("p",{children:"No Data Related"}):t.jsx(r,{onClick:()=>o(!i),className:"ml-auto",children:"More Info"})})]}),(e.isShowAll||i)&&l!==null&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,children:t.jsx(a,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:l})})})]})}function u(e){const[i,o]=s.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex flex-row justify-end w-full",children:e.showButton===!0?t.jsx(r,{type:"button",onClick:()=>{o(l=>!l)},children:i?"Hide All":"Show All"}):null}),t.jsxs(c,{striped:e.striped,highlightOnHover:e.highlightOnHover,children:[t.jsx("thead",{style:e.stickyHeader?{position:"sticky",top:0,zIndex:20}:{},children:t.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.columns.map((l,n)=>l.disabled?null:t.jsx("th",{children:l.title},String(n))),e.moreInfo&&t.jsx("th",{children:"More Info"})]})}),t.jsx("tbody",{children:e.items.map((l,n)=>t.jsx(h,{columns:e.columns,item:l,moreInfo:e.moreInfo,isShowAll:i,rowContext:e.rowContext},n))})]})]})}export{h as A,u as a};
1
+ import{r as s,j as t,B as r,d$ as a}from"./index-Bd-SKdyy.js";import{T as c}from"./Table-DpZKU9e6.js";function h(e){const[i,o]=s.useState(!1),l=e.moreInfo?e.moreInfo(e.item):null;return t.jsxs(t.Fragment,{children:[t.jsxs("tr",{children:[e.columns.map((n,d)=>n.disabled?null:t.jsx("td",{style:n.style,children:n.value(e.item,e.rowContext?e.rowContext(e.item):void 0)},String(d))),e.moreInfo&&t.jsx("td",{children:l===null?t.jsx("p",{children:"No Data Related"}):t.jsx(r,{onClick:()=>o(!i),className:"ml-auto",children:"More Info"})})]}),(e.isShowAll||i)&&l!==null&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,children:t.jsx(a,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:l})})})]})}function u(e){const[i,o]=s.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex flex-row justify-end w-full",children:e.showButton===!0?t.jsx(r,{type:"button",onClick:()=>{o(l=>!l)},children:i?"Hide All":"Show All"}):null}),t.jsxs(c,{striped:e.striped,highlightOnHover:e.highlightOnHover,children:[t.jsx("thead",{style:e.stickyHeader?{position:"sticky",top:0,zIndex:20}:{},children:t.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.columns.map((l,n)=>l.disabled?null:t.jsx("th",{children:l.title},String(n))),e.moreInfo&&t.jsx("th",{children:"More Info"})]})}),t.jsx("tbody",{children:e.items.map((l,n)=>t.jsx(h,{columns:e.columns,item:l,moreInfo:e.moreInfo,isShowAll:i,rowContext:e.rowContext},n))})]})]})}export{h as A,u as a};
@@ -1 +1 @@
1
- import{fK as s,gt as i}from"./index-Cw_aKL-8.js";function o(a,r,e){const t=s(a,e?.in);return isNaN(r)?i(a,NaN):(r&&t.setDate(t.getDate()+r),t)}export{o as a};
1
+ import{fO as s,gx as i}from"./index-Bd-SKdyy.js";function o(a,r,e){const t=s(a,e?.in);return isNaN(r)?i(a,NaN):(r&&t.setDate(t.getDate()+r),t)}export{o as a};
@@ -1 +1 @@
1
- import{r as t,F as y,u as A,j as e,T as N,B as b,L as w,A as O}from"./index-Cw_aKL-8.js";import{u as T}from"./use-url-query-C0mVgO2i.js";import{C as z}from"./charges-filters-DUuY-N0H.js";import{C as B}from"./charges-table-CWbe3t13.js";import{M as L}from"./index-CTatkdRy.js";import{E as R,I as k,M as Q}from"./match-document-modal-Bo9pBr8W.js";import{P as U}from"./page-layout-CVTeUSZp.js";import{P as q,a as J}from"./panel-top-open-DzBY_TuM.js";import"./modal-Pj_6bAFk.js";import"./funnel-CMG4QvaK.js";import"./sub-DOjETdwl.js";import"./addDays-DqZEDZy3.js";import"./subMonths-DqeFZ4O6.js";import"./MultiSelect-Dm9mO7pJ.js";import"./toggle-expansion-button-BrKkZtGj.js";import"./index-xxe8M91O.js";import"./similar-transactions-modal-B39q1NLa.js";import"./list-plus-B3EB-dKe.js";import"./tooltip-CbnJYNc4.js";import"./Table-DnHfGe-y.js";import"./summary-Bbsq64IN.js";import"./Checkbox-qEdmT4HE.js";import"./YearPickerInput-oa86GF4P.js";import"./insert-business-trip-modal-Ds3RIlmF.js";import"./accounter-table-BL_yrGIl.js";const he=()=>{const{setFiltersContext:h}=t.useContext(y),[i,C]=t.useState(void 0),[n,f]=t.useState(void 0),[l,x]=t.useState(void 0),[c,j]=t.useState(!1),[a,m]=t.useState([]),{get:p}=T(),[d,M]=t.useState(p("page")?Number(p("page")):1),g=p("chargesFilters"),v=t.useMemo(()=>{if(g)try{return JSON.parse(decodeURIComponent(g))}catch{return}},[g]),[r,S]=t.useState(v),D=t.useCallback((s,F)=>{a.map(u=>u.id).includes(s)?m(a.filter(u=>u.id!==s)):m([...a,{id:s,onChange:F}])},[a]),[{data:o,fetching:I},P]=A({query:O,variables:{filters:r,page:d,limit:100},pause:!0});t.useEffect(()=>{r&&P()},[r,P]);function E(){m([])}return t.useEffect(()=>{h(e.jsxs("div",{className:"flex flex-row gap-x-5",children:[e.jsx(z,{filter:r,setFilter:S,activePage:d,setPage:M,totalPages:o?.allCharges?.pageInfo.totalPages,initiallyOpened:!r}),e.jsx(N,{label:"Expand all accounts",children:e.jsx(b,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>j(s=>!s),children:c?e.jsx(q,{className:"size-5"}):e.jsx(J,{className:"size-5"})})}),e.jsx(L,{selected:a,resetMerge:E})]}))},[o,I,r,d,c,h,M,S,j,a,v]),e.jsxs(U,{title:"All Charges",description:"Manage charges",children:[I?e.jsx(w,{className:"h-10 w-10 animate-spin mr-2 self-center"}):o?.allCharges.nodes?e.jsx(B,{setEditChargeId:C,setInsertDocument:f,setMatchDocuments:x,toggleMergeCharge:D,mergeSelectedCharges:new Set(a.map(s=>s.id)),data:o?.allCharges?.nodes,isAllOpened:c}):e.jsx("span",{children:"Please apply filters"}),i&&e.jsx(R,{chargeId:i?.id,close:()=>C(void 0),onChange:i.onChange}),n&&e.jsx(k,{chargeId:n.id,onChange:n.onChange,close:()=>f(void 0)}),l&&e.jsx(Q,{chargeId:l.id,ownerId:l.ownerId,setMatchDocuments:()=>x(void 0)})]})};export{he as AllCharges};
1
+ import{r as t,F as y,u as A,j as e,T as N,B as b,L as w,A as O}from"./index-Bd-SKdyy.js";import{u as T}from"./use-url-query-5TFyEk1x.js";import{C as z}from"./charges-filters-DhYogrgu.js";import{C as B}from"./charges-table-Cff0tibm.js";import{M as L}from"./index-CKNxDyu9.js";import{E as R,I as k,M as Q}from"./match-document-modal-CqP2SE2c.js";import{P as U}from"./page-layout-XgNPsCmr.js";import{P as q,a as J}from"./panel-top-open-DU7alj-S.js";import"./modal-CwuHXtxz.js";import"./funnel-DW3_rS_8.js";import"./sub-BL9nfaPD.js";import"./addDays-HTdY9JyJ.js";import"./subMonths-DHPWOZP6.js";import"./MultiSelect-SsgUtHuW.js";import"./toggle-expansion-button-BbVh8z6s.js";import"./index-lMXNkFuw.js";import"./similar-transactions-modal-CZAOYt-d.js";import"./list-plus-B7wBrICK.js";import"./tooltip-C-fd9L1l.js";import"./Table-DpZKU9e6.js";import"./summary-Dfiju7xJ.js";import"./Checkbox-CLE7WylX.js";import"./YearPickerInput-BbyQMsmW.js";import"./insert-business-trip-modal-DVcWpJHr.js";import"./accounter-table-BvOYdMv2.js";const he=()=>{const{setFiltersContext:h}=t.useContext(y),[i,C]=t.useState(void 0),[n,f]=t.useState(void 0),[l,x]=t.useState(void 0),[c,j]=t.useState(!1),[a,m]=t.useState([]),{get:p}=T(),[d,M]=t.useState(p("page")?Number(p("page")):1),g=p("chargesFilters"),v=t.useMemo(()=>{if(g)try{return JSON.parse(decodeURIComponent(g))}catch{return}},[g]),[r,S]=t.useState(v),D=t.useCallback((s,F)=>{a.map(u=>u.id).includes(s)?m(a.filter(u=>u.id!==s)):m([...a,{id:s,onChange:F}])},[a]),[{data:o,fetching:I},P]=A({query:O,variables:{filters:r,page:d,limit:100},pause:!0});t.useEffect(()=>{r&&P()},[r,P]);function E(){m([])}return t.useEffect(()=>{h(e.jsxs("div",{className:"flex flex-row gap-x-5",children:[e.jsx(z,{filter:r,setFilter:S,activePage:d,setPage:M,totalPages:o?.allCharges?.pageInfo.totalPages,initiallyOpened:!r}),e.jsx(N,{label:"Expand all accounts",children:e.jsx(b,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>j(s=>!s),children:c?e.jsx(q,{className:"size-5"}):e.jsx(J,{className:"size-5"})})}),e.jsx(L,{selected:a,resetMerge:E})]}))},[o,I,r,d,c,h,M,S,j,a,v]),e.jsxs(U,{title:"All Charges",description:"Manage charges",children:[I?e.jsx(w,{className:"h-10 w-10 animate-spin mr-2 self-center"}):o?.allCharges.nodes?e.jsx(B,{setEditChargeId:C,setInsertDocument:f,setMatchDocuments:x,toggleMergeCharge:D,mergeSelectedCharges:new Set(a.map(s=>s.id)),data:o?.allCharges?.nodes,isAllOpened:c}):e.jsx("span",{children:"Please apply filters"}),i&&e.jsx(R,{chargeId:i?.id,close:()=>C(void 0),onChange:i.onChange}),n&&e.jsx(k,{chargeId:n.id,onChange:n.onChange,close:()=>f(void 0)}),l&&e.jsx(Q,{chargeId:l.id,ownerId:l.ownerId,setMatchDocuments:()=>x(void 0)})]})};export{he as AllCharges};
@@ -1,4 +1,4 @@
1
- import{v as o}from"./index-Cw_aKL-8.js";/**
1
+ import{v as o}from"./index-Bd-SKdyy.js";/**
2
2
  * @license lucide-react v0.548.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{v as a}from"./index-Cw_aKL-8.js";/**
1
+ import{v as a}from"./index-Bd-SKdyy.js";/**
2
2
  * @license lucide-react v0.548.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{v as M,bC as G,r as D,bE as V,ai as J,bG as H,j as e,cP as K,x as v,u as Y,dT as q,aR as o,c as Q,T as W,B as X,bV as L,R as b,b2 as A,bp as Z}from"./index-Cw_aKL-8.js";import{D as ee}from"./download-csv-button-CwK31swX.js";import{T as ne}from"./Table-DnHfGe-y.js";/**
1
+ import{v as M,c5 as G,r as D,c7 as J,aa as V,c9 as H,j as e,de as K,w as v,u as Y,dX as q,bb as o,c as Q,T as W,B as X,bm as P,R as S,aK as A,bd as Z}from"./index-Bd-SKdyy.js";import{D as ee}from"./download-csv-button-8ow10rSS.js";import{T as ne}from"./Table-DpZKU9e6.js";/**
2
2
  * @license lucide-react v0.548.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,6 +8,6 @@ import{v as M,bC as G,r as D,bE as V,ai as J,bG as H,j as e,cP as K,x as v,u as
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const re=[["path",{d:"m20 17-5-5 5-5",key:"30x0n2"}],["path",{d:"m4 17 5-5-5-5",key:"16spf4"}]],ae=M("chevrons-right-left",re);var oe=G((n,{color:s})=>({root:{backgroundColor:n.fn.themeColor(s,n.colorScheme==="dark"?5:2),color:n.colorScheme==="dark"?n.colors.dark[9]:"inherit"}})),ce=Object.defineProperty,C=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,T=(n,s,t)=>s in n?ce(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ie=(n,s)=>{for(var t in s||(s={}))O.call(s,t)&&T(n,t,s[t]);if(C)for(var t of C(s))R.call(s,t)&&T(n,t,s[t]);return n},le=(n,s)=>{var t={};for(var a in n)O.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&C)for(var a of C(n))s.indexOf(a)<0&&R.call(n,a)&&(t[a]=n[a]);return t};const de={color:"yellow"},p=D.forwardRef((n,s)=>{const t=V("Mark",de,n),{color:a,className:i,unstyled:u,variant:h}=t,x=le(t,["color","className","unstyled","variant"]),{classes:f,cx:l}=oe({color:a},{unstyled:u,name:"Mark",variant:h});return J.createElement(H,ie({component:"mark",ref:s,className:l(f.root,i)},x))});p.displayName="@mantine/core/Mark";const ue=({ledgerRecords:n,businessName:s,fromDate:t,toDate:a})=>{const i=D.useCallback(async()=>{const u=me(n);return{fileName:`business_${s}_ledger_records${t?`_${t}`:""}${a?`_${a}`:""}`,fileContent:u}},[n,s,t,a]);return e.jsx(ee,{createFileVariables:i})},me=n=>{let s="";const t=Array.from(new Set(n.filter(a=>a.foreignAmount?.currency).map(a=>a.foreignAmount.currency)));s+=`Sorting Date,Date,Amount,Amount Balance,${he(t)}Reference,Details,Counter Account\r
12
- `;for(const a of n){const i=fe(a,t);s+=i}return s};function he(n){let s="";return n.map(t=>{const a=K(t);s+=`${t}(${a}) Amount,${t}(${a}) Balance,`}),s}function xe(n,s){let t="";return s.map(a=>{n.foreignAmount&&n.foreignAmount.currency===a?t+=`${n.foreignAmount.raw},${n[`${a.toLowerCase()}Balance`]??0},`:t+=",,"}),t}function fe(n,s){let t="";const a=n.invoiceDate?v(new Date(n.invoiceDate),"yyy-MM-dd"):null,i=n.invoiceDate?v(new Date(n.invoiceDate),"dd/MM/yy"):null,u=n.amount.raw,{ilsBalance:h,reference:x,details:f}=n,l=n.counterAccount?.name??"";return t+=`${a},${i},${u},${h},${xe(n,s)}${S(x??"")},${S(f??"")},${S(l)},\r
13
- `,t}function S(n){return n===""?"":Number.isNaN(Number(n))?String(n).replace(/"/g,'""').replace(/,/g,"."):Number(n).toFixed(2).toString()}function Ae({businessID:n,filter:s}){const[t,a]=D.useState(!1),{fromDate:i,ownerIds:u,toDate:h}=s??{},[{data:x,fetching:f}]=Y({query:q,variables:{filters:{fromDate:i,ownerIds:u,toDate:h,businessIDs:[n]}}}),l=x?.businessTransactionsFromLedgerRecords.__typename==="CommonError"?[]:x?.businessTransactionsFromLedgerRecords.businessTransactions.sort((r,g)=>r.invoiceDate>g.invoiceDate?1:-1)??[],j=[];for(let r=0;r<l.length;r++){const{__typename:g,...c}=l[r],z=r===0?c.amount.raw:(j[r-1].ilsBalance??0)+c.amount.raw,I={};Object.values(o).map(y=>{if(y!==o.Ils){const P=`${y.toLowerCase()}Balance`;I[P]=r===0?(c.foreignAmount?.currency===y?c.foreignAmount?.raw:0)??0:(j[r-1]?.[P]??0)+(c.foreignAmount?.currency===y?c.foreignAmount?.raw:0)}}),j.push({...c,ilsBalance:z,...I})}const m=new Set(l.filter(r=>r.foreignAmount?.currency).map(r=>r.foreignAmount.currency)),B=t||m.has(o.Eur),E=t||m.has(o.Usd),_=t||m.has(o.Gbp),k=t||m.has(o.Cad),N=t||m.has(o.Jpy),$=t||m.has(o.Aud),F=t||m.has(o.Sek),w=l[0]?.business.name??"unknown";return e.jsx("div",{className:"flex flex-row gap-5",children:f?e.jsx(Q,{}):e.jsxs(ne,{striped:!0,highlightOnHover:!0,children:[e.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:e.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.jsx("th",{children:"Business Name"}),e.jsx("th",{children:"Date"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Amount Balance"}),B&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"EUR Amount"}),e.jsx("th",{children:"EUR Balance"})]}),E&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"USD Amount"}),e.jsx("th",{children:"USD Balance"})]}),_&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"GBP Amount"}),e.jsx("th",{children:"GBP Balance"})]}),k&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"CAD Amount"}),e.jsx("th",{children:"CAD Balance"})]}),N&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"JPY Amount"}),e.jsx("th",{children:"JPY Balance"})]}),$&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"AUD Amount"}),e.jsx("th",{children:"AUD Balance"})]}),F&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"SEK Amount"}),e.jsx("th",{children:"SEK Balance"})]}),e.jsx("th",{children:e.jsx(W,{label:"Expand all currencies",children:e.jsx(X,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>a(r=>!r),children:t?e.jsx(ae,{className:"size-5"}):e.jsx(se,{className:"size-5"})})})}),t&&e.jsx(e.Fragment,{children:U.map(r=>e.jsxs(e.Fragment,{children:[e.jsxs("th",{children:[r," Amount"]}),e.jsxs("th",{children:[r," Balance"]})]}))}),e.jsx("th",{children:"Reference"}),e.jsx("th",{children:"Details"}),e.jsx("th",{children:"Counter Account"}),e.jsx("th",{children:e.jsx(ue,{ledgerRecords:j,businessName:w,fromDate:s?.fromDate??void 0,toDate:s?.toDate??void 0})})]})}),e.jsx("tbody",{children:j.map((r,g)=>e.jsxs("tr",{className:"cursor-pointer",onClick:c=>{c.stopPropagation(),window.open(b.CHARGES.DETAIL(r.chargeId),"_blank","noreferrer")},children:[e.jsx("td",{children:e.jsx(L,{to:b.BUSINESSES.DETAIL(r.business.id),target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),className:"inline-flex items-center font-semibold",children:r.business.name})}),e.jsx("td",{children:r.invoiceDate?v(new Date(r.invoiceDate),"dd/MM/yy"):null}),e.jsx("td",{style:{whiteSpace:"nowrap"},children:r.amount&&r.amount.raw!==0&&e.jsx(p,{color:r.amount.raw>0?"green":"red",children:r.amount.formatted})}),e.jsx("td",{children:r.ilsBalance===0?A(r.ilsBalance,o.Ils):e.jsx(p,{color:r.ilsBalance>0?"green":"red",children:A(r.ilsBalance,o.Ils)})}),B&&e.jsx(d,{data:r,currency:o.Eur}),E&&e.jsx(d,{data:r,currency:o.Usd}),_&&e.jsx(d,{data:r,currency:o.Gbp}),k&&e.jsx(d,{data:r,currency:o.Cad}),N&&e.jsx(d,{data:r,currency:o.Jpy}),$&&e.jsx(d,{data:r,currency:o.Aud}),F&&e.jsx(d,{data:r,currency:o.Sek}),e.jsx("td",{}),t&&e.jsx(je,{data:r}),e.jsx("td",{children:r.reference}),e.jsx("td",{children:r.details}),e.jsx("td",{children:r.counterAccount&&e.jsx(L,{to:b.BUSINESSES.DETAIL(r.counterAccount.id),target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),className:"inline-flex items-center font-semibold",children:r.counterAccount.name})}),e.jsx("td",{})]},g))})]})})}function d({currency:n,data:s}){const t=s.foreignAmount&&s.foreignAmount.currency===n?s.foreignAmount:null,a=`${n.toLowerCase()}Balance`;return e.jsxs(e.Fragment,{children:[e.jsx("td",{style:{whiteSpace:"nowrap"},children:!!t&&t.raw!==0&&e.jsx(p,{color:t.raw>0?"green":"red",children:t.formatted})}),e.jsx("td",{children:(s[a]??0)!==0&&(s[a]===0?A(s[a],n):e.jsx(p,{color:s[a]>0?"green":"red",children:A(s[a],n)}))})]})}const U=Object.values(o).filter(n=>!Z.includes(n));function je({data:n}){return e.jsx(e.Fragment,{children:U.map(s=>e.jsx(d,{currency:s,data:n},s))})}export{Ae as B,ae as C,p as M,se as a};
11
+ */const re=[["path",{d:"m20 17-5-5 5-5",key:"30x0n2"}],["path",{d:"m4 17 5-5-5-5",key:"16spf4"}]],ae=M("chevrons-right-left",re);var oe=G((n,{color:s})=>({root:{backgroundColor:n.fn.themeColor(s,n.colorScheme==="dark"?5:2),color:n.colorScheme==="dark"?n.colors.dark[9]:"inherit"}})),ce=Object.defineProperty,C=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,T=(n,s,t)=>s in n?ce(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ie=(n,s)=>{for(var t in s||(s={}))O.call(s,t)&&T(n,t,s[t]);if(C)for(var t of C(s))w.call(s,t)&&T(n,t,s[t]);return n},le=(n,s)=>{var t={};for(var a in n)O.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&C)for(var a of C(n))s.indexOf(a)<0&&w.call(n,a)&&(t[a]=n[a]);return t};const de={color:"yellow"},p=D.forwardRef((n,s)=>{const t=J("Mark",de,n),{color:a,className:i,unstyled:u,variant:h}=t,x=le(t,["color","className","unstyled","variant"]),{classes:f,cx:l}=oe({color:a},{unstyled:u,name:"Mark",variant:h});return V.createElement(H,ie({component:"mark",ref:s,className:l(f.root,i)},x))});p.displayName="@mantine/core/Mark";const ue=({ledgerRecords:n,businessName:s,fromDate:t,toDate:a})=>{const i=D.useCallback(async()=>{const u=me(n);return{fileName:`business_${s}_ledger_records${t?`_${t}`:""}${a?`_${a}`:""}`,fileContent:u}},[n,s,t,a]);return e.jsx(ee,{createFileVariables:i})},me=n=>{let s="";const t=Array.from(new Set(n.filter(a=>a.foreignAmount?.currency).map(a=>a.foreignAmount.currency)));s+=`Sorting Date,Date,Amount,Amount Balance,${he(t)}Reference,Details,Counter Account\r
12
+ `;for(const a of n){const i=fe(a,t);s+=i}return s};function he(n){let s="";return n.map(t=>{const a=K(t);s+=`${t}(${a}) Amount,${t}(${a}) Balance,`}),s}function xe(n,s){let t="";return s.map(a=>{n.foreignAmount&&n.foreignAmount.currency===a?t+=`${n.foreignAmount.raw},${n[`${a.toLowerCase()}Balance`]??0},`:t+=",,"}),t}function fe(n,s){let t="";const a=n.invoiceDate?v(new Date(n.invoiceDate),"yyy-MM-dd"):null,i=n.invoiceDate?v(new Date(n.invoiceDate),"dd/MM/yy"):null,u=n.amount.raw,{ilsBalance:h,reference:x,details:f}=n,l=n.counterAccount?.name??"";return t+=`${a},${i},${u},${h},${xe(n,s)}${b(x??"")},${b(f??"")},${b(l)},\r
13
+ `,t}function b(n){return n===""?"":Number.isNaN(Number(n))?String(n).replace(/"/g,'""').replace(/,/g,"."):Number(n).toFixed(2).toString()}function Ae({businessID:n,filter:s}){const[t,a]=D.useState(!1),{fromDate:i,ownerIds:u,toDate:h}=s??{},[{data:x,fetching:f}]=Y({query:q,variables:{filters:{fromDate:i,ownerIds:u,toDate:h,businessIDs:[n]}}}),l=x?.businessTransactionsFromLedgerRecords.__typename==="CommonError"?[]:x?.businessTransactionsFromLedgerRecords.businessTransactions.sort((r,g)=>r.invoiceDate>g.invoiceDate?1:-1)??[],j=[];for(let r=0;r<l.length;r++){const{__typename:g,...c}=l[r],z=r===0?c.amount.raw:(j[r-1].ilsBalance??0)+c.amount.raw,I={};Object.values(o).map(y=>{if(y!==o.Ils){const L=`${y.toLowerCase()}Balance`;I[L]=r===0?(c.foreignAmount?.currency===y?c.foreignAmount?.raw:0)??0:(j[r-1]?.[L]??0)+(c.foreignAmount?.currency===y?c.foreignAmount?.raw:0)}}),j.push({...c,ilsBalance:z,...I})}const m=new Set(l.filter(r=>r.foreignAmount?.currency).map(r=>r.foreignAmount.currency)),B=t||m.has(o.Eur),_=t||m.has(o.Usd),k=t||m.has(o.Gbp),E=t||m.has(o.Cad),N=t||m.has(o.Jpy),$=t||m.has(o.Aud),F=t||m.has(o.Sek),R=l[0]?.business.name??"unknown";return e.jsx("div",{className:"flex flex-row gap-5",children:f?e.jsx(Q,{}):e.jsxs(ne,{striped:!0,highlightOnHover:!0,children:[e.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:e.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.jsx("th",{children:"Business Name"}),e.jsx("th",{children:"Date"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Amount Balance"}),B&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"EUR Amount"}),e.jsx("th",{children:"EUR Balance"})]}),_&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"USD Amount"}),e.jsx("th",{children:"USD Balance"})]}),k&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"GBP Amount"}),e.jsx("th",{children:"GBP Balance"})]}),E&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"CAD Amount"}),e.jsx("th",{children:"CAD Balance"})]}),N&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"JPY Amount"}),e.jsx("th",{children:"JPY Balance"})]}),$&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"AUD Amount"}),e.jsx("th",{children:"AUD Balance"})]}),F&&e.jsxs(e.Fragment,{children:[e.jsx("th",{children:"SEK Amount"}),e.jsx("th",{children:"SEK Balance"})]}),e.jsx("th",{children:e.jsx(W,{label:"Expand all currencies",children:e.jsx(X,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>a(r=>!r),children:t?e.jsx(ae,{className:"size-5"}):e.jsx(se,{className:"size-5"})})})}),t&&e.jsx(e.Fragment,{children:U.map(r=>e.jsxs(e.Fragment,{children:[e.jsxs("th",{children:[r," Amount"]}),e.jsxs("th",{children:[r," Balance"]})]}))}),e.jsx("th",{children:"Reference"}),e.jsx("th",{children:"Details"}),e.jsx("th",{children:"Counter Account"}),e.jsx("th",{children:e.jsx(ue,{ledgerRecords:j,businessName:R,fromDate:s?.fromDate??void 0,toDate:s?.toDate??void 0})})]})}),e.jsx("tbody",{children:j.map((r,g)=>e.jsxs("tr",{className:"cursor-pointer",onClick:c=>{c.stopPropagation(),window.open(S.CHARGES.DETAIL(r.chargeId),"_blank","noreferrer")},children:[e.jsx("td",{children:e.jsx(P,{to:S.BUSINESSES.DETAIL(r.business.id),target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),className:"inline-flex items-center font-semibold",children:r.business.name})}),e.jsx("td",{children:r.invoiceDate?v(new Date(r.invoiceDate),"dd/MM/yy"):null}),e.jsx("td",{style:{whiteSpace:"nowrap"},children:r.amount&&r.amount.raw!==0&&e.jsx(p,{color:r.amount.raw>0?"green":"red",children:r.amount.formatted})}),e.jsx("td",{children:r.ilsBalance===0?A(r.ilsBalance,o.Ils):e.jsx(p,{color:r.ilsBalance>0?"green":"red",children:A(r.ilsBalance,o.Ils)})}),B&&e.jsx(d,{data:r,currency:o.Eur}),_&&e.jsx(d,{data:r,currency:o.Usd}),k&&e.jsx(d,{data:r,currency:o.Gbp}),E&&e.jsx(d,{data:r,currency:o.Cad}),N&&e.jsx(d,{data:r,currency:o.Jpy}),$&&e.jsx(d,{data:r,currency:o.Aud}),F&&e.jsx(d,{data:r,currency:o.Sek}),e.jsx("td",{}),t&&e.jsx(je,{data:r}),e.jsx("td",{children:r.reference}),e.jsx("td",{children:r.details}),e.jsx("td",{children:r.counterAccount&&e.jsx(P,{to:S.BUSINESSES.DETAIL(r.counterAccount.id),target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),className:"inline-flex items-center font-semibold",children:r.counterAccount.name})}),e.jsx("td",{})]},g))})]})})}function d({currency:n,data:s}){const t=s.foreignAmount&&s.foreignAmount.currency===n?s.foreignAmount:null,a=`${n.toLowerCase()}Balance`;return e.jsxs(e.Fragment,{children:[e.jsx("td",{style:{whiteSpace:"nowrap"},children:!!t&&t.raw!==0&&e.jsx(p,{color:t.raw>0?"green":"red",children:t.formatted})}),e.jsx("td",{children:(s[a]??0)!==0&&(s[a]===0?A(s[a],n):e.jsx(p,{color:s[a]>0?"green":"red",children:A(s[a],n)}))})]})}const U=Object.values(o).filter(n=>!Z.includes(n));function je({data:n}){return e.jsx(e.Fragment,{children:U.map(s=>e.jsx(d,{currency:s,data:n},s))})}export{Ae as B,ae as C,p as M,se as a};
@@ -1 +1 @@
1
- import{J as l,j as e,aB as t,x as m,bm as x}from"./index-Cw_aKL-8.js";import{B as o}from"./building-2-ZTKteVvf.js";function h({data:n}){const s=l(x,n);if(!s||s.__typename!=="LtdFinancialEntity")return e.jsx("div",{});const{isActive:i,adminInfo:r,clientInfo:a}=s,d=!!r?.id,c=!!a?.id;return e.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/60",children:e.jsx("div",{className:"container mx-auto px-4 md:px-6 lg:px-8 max-w-7xl",children:e.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-accent",children:e.jsx(o,{className:"h-5 w-5 text-accent-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h1",{className:"text-lg font-semibold text-foreground",children:s.name}),i?e.jsx(t,{variant:"secondary",children:"Active"}):e.jsx(t,{variant:"destructive",children:"Inactive"}),d&&e.jsx(t,{variant:"outline",children:"Admin"}),c&&e.jsx(t,{variant:"outline",children:"Client"})]}),e.jsxs("p",{className:"text-sm text-muted-foreground truncate",children:["Business ID: ",s.id]})]})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-6 text-sm",children:[s.governmentId&&e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Tax ID"}),e.jsx("p",{className:"font-medium text-foreground",children:s.governmentId})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Since"}),e.jsx("p",{className:"font-medium text-foreground",children:m(s.createdAt,"MMM yyyy")})]})]})]})})})}export{h as B};
1
+ import{G as l,j as e,au as t,w as m,b9 as x}from"./index-Bd-SKdyy.js";import{B as o}from"./building-2-BScQAy2y.js";function h({data:n}){const s=l(x,n);if(!s||s.__typename!=="LtdFinancialEntity")return e.jsx("div",{});const{isActive:i,adminInfo:r,clientInfo:a}=s,d=!!r?.id,c=!!a?.id;return e.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/60",children:e.jsx("div",{className:"container mx-auto px-4 md:px-6 lg:px-8 max-w-7xl",children:e.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-accent",children:e.jsx(o,{className:"h-5 w-5 text-accent-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h1",{className:"text-lg font-semibold text-foreground",children:s.name}),i?e.jsx(t,{variant:"secondary",children:"Active"}):e.jsx(t,{variant:"destructive",children:"Inactive"}),d&&e.jsx(t,{variant:"outline",children:"Admin"}),c&&e.jsx(t,{variant:"outline",children:"Client"})]}),e.jsxs("p",{className:"text-sm text-muted-foreground truncate",children:["Business ID: ",s.id]})]})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-6 text-sm",children:[s.governmentId&&e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Tax ID"}),e.jsx("p",{className:"font-medium text-foreground",children:s.governmentId})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Since"}),e.jsx("p",{className:"font-medium text-foreground",children:m(s.createdAt,"MMM yyyy")})]})]})]})})})}export{h as B};
@@ -1 +1 @@
1
- import{r as g,bq as v,j as e,br as C,B as S,G as I,bs as F,af as B,bt as m,bu as y,bv as j,x as f,bw as E,bx as w}from"./index-Cw_aKL-8.js";import{u as N}from"./use-url-query-C0mVgO2i.js";import{P as L}from"./modal-Pj_6bAFk.js";import{F as R}from"./funnel-CMG4QvaK.js";import{M as D}from"./MultiSelect-Dm9mO7pJ.js";function A({filter:r,setFilter:b,closeModal:u,single:l=!1}){const{control:n,handleSubmit:p}=I({defaultValues:{...r}}),{selectableBusinesses:d,fetching:i}=F(),{userContext:x}=g.useContext(B),h=s=>{b(s),u()};function o(){b({businessIDs:l?r.businessIDs:void 0}),u()}return e.jsxs(e.Fragment,{children:[i?e.jsx("div",{children:"Loading..."}):e.jsx("div",{}),e.jsxs("form",{onSubmit:p(h),children:[e.jsx(m,{name:"ownerIds",control:n,defaultValue:r.ownerIds,render:({field:s,fieldState:a})=>e.jsx(D,{...s,data:d,value:s.value??(x?.context.adminBusinessId?[x.context.adminBusinessId]:void 0),disabled:i,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:a.error?.message})}),!l&&e.jsx(m,{name:"businessIDs",control:n,defaultValue:r.businessIDs,render:({field:s,fieldState:a})=>e.jsx(D,{...s,data:d,value:s.value??void 0,disabled:i,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:a.error?.message})}),e.jsx(m,{name:"fromDate",control:n,defaultValue:r.fromDate,rules:{pattern:{value:y,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:a.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"toDate",control:n,defaultValue:r.toDate,rules:{pattern:{value:y,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:a.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"type",control:n,defaultValue:null,render:({field:s,fieldState:a})=>e.jsx(E,{...s,onChange:t=>s.onChange(t==="NULL"?null:t),data:[{value:"NULL",label:"All"},{value:"BUSINESS",label:"Business"},{value:"TAX_CATEGORY",label:"Tax Category"}],error:a.error?.message,label:"Type"})}),e.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[e.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),e.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:o,children:"Clear"}),e.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:u,children:"Cancel"})]})]})]})}function V({filter:r,setFilter:b}){const[u,l]=g.useState(!1),[n,p]=g.useState(!v(r)),{get:d,set:i}=N();function x(o){return Object.entries(o??{}).filter(([a,t])=>t!==void 0&&Array.isArray(t)&&t.length>0).length>0}function h(o){o.fromDate?.trim()===""&&(o.fromDate=void 0),o.toDate?.trim()===""&&(o.toDate=void 0),w(o,r)||(b(o),p(x(o)))}return g.useEffect(()=>{const o=v(r)?null:encodeURIComponent(JSON.stringify(r)),s=d("ledgerRecordsFilters");o!==s&&i("ledgerRecordsFilters",o)},[r,d,i]),e.jsxs(e.Fragment,{children:[e.jsx(L,{opened:u,onClose:()=>l(!1),content:e.jsx(A,{single:!0,filter:r,setFilter:h,closeModal:()=>l(!1)})}),e.jsx(C,{inline:!0,size:16,disabled:!n,children:e.jsx(S,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>l(!0),children:e.jsx(R,{className:"size-5"})})})]})}export{V as B};
1
+ import{r as x,be as y,j as e,bf as C,B as S,y as I,bg as F,a7 as B,bh as m,bi as v,bj as j,w as f,bk as E,bl as w}from"./index-Bd-SKdyy.js";import{u as N}from"./use-url-query-5TFyEk1x.js";import{P as L}from"./modal-CwuHXtxz.js";import{F as R}from"./funnel-DW3_rS_8.js";import{M as D}from"./MultiSelect-SsgUtHuW.js";function A({filter:r,setFilter:b,closeModal:u,single:l=!1}){const{control:n,handleSubmit:p}=I({defaultValues:{...r}}),{selectableBusinesses:d,fetching:i}=F(),{userContext:g}=x.useContext(B),h=s=>{b(s),u()};function o(){b({businessIDs:l?r.businessIDs:void 0}),u()}return e.jsxs(e.Fragment,{children:[i?e.jsx("div",{children:"Loading..."}):e.jsx("div",{}),e.jsxs("form",{onSubmit:p(h),children:[e.jsx(m,{name:"ownerIds",control:n,defaultValue:r.ownerIds,render:({field:s,fieldState:a})=>e.jsx(D,{...s,data:d,value:s.value??(g?.context.adminBusinessId?[g.context.adminBusinessId]:void 0),disabled:i,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:a.error?.message})}),!l&&e.jsx(m,{name:"businessIDs",control:n,defaultValue:r.businessIDs,render:({field:s,fieldState:a})=>e.jsx(D,{...s,data:d,value:s.value??void 0,disabled:i,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:a.error?.message})}),e.jsx(m,{name:"fromDate",control:n,defaultValue:r.fromDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:a.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"toDate",control:n,defaultValue:r.toDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:a.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"type",control:n,defaultValue:null,render:({field:s,fieldState:a})=>e.jsx(E,{...s,onChange:t=>s.onChange(t==="NULL"?null:t),data:[{value:"NULL",label:"All"},{value:"BUSINESS",label:"Business"},{value:"TAX_CATEGORY",label:"Tax Category"}],error:a.error?.message,label:"Type"})}),e.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[e.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),e.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:o,children:"Clear"}),e.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:u,children:"Cancel"})]})]})]})}function O({filter:r,setFilter:b}){const[u,l]=x.useState(!1),[n,p]=x.useState(!y(r)),{get:d,set:i}=N();function g(o){return Object.entries(o??{}).filter(([a,t])=>t!==void 0&&Array.isArray(t)&&t.length>0).length>0}function h(o){o.fromDate?.trim()===""&&(o.fromDate=void 0),o.toDate?.trim()===""&&(o.toDate=void 0),w(o,r)||(b(o),p(g(o)))}return x.useEffect(()=>{const o=y(r)?null:encodeURIComponent(JSON.stringify(r)),s=d("ledgerRecordsFilters");o!==s&&i("ledgerRecordsFilters",o)},[r,d,i]),e.jsxs(e.Fragment,{children:[e.jsx(L,{opened:u,onClose:()=>l(!1),content:e.jsx(A,{single:!0,filter:r,setFilter:h,closeModal:()=>l(!1)})}),e.jsx(C,{inline:!0,size:16,disabled:!n,children:e.jsx(S,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>l(!0),children:e.jsx(R,{className:"size-5"})})})]})}export{O as B};
@@ -1 +1 @@
1
- import{a as S,r as c,F as w,u as C,j as n,c as x,aR as o,bo as y}from"./index-Cw_aKL-8.js";import{u as R}from"./use-url-query-C0mVgO2i.js";import{a as h}from"./accounter-table-BL_yrGIl.js";import{M as p,B as F}from"./business-extended-info-1mzdXJbs.js";import{B as v}from"./business-ledger-filters-BRB1r_DP.js";import"./Table-DnHfGe-y.js";import"./download-csv-button-CwK31swX.js";import"./modal-Pj_6bAFk.js";import"./funnel-CMG4QvaK.js";import"./MultiSelect-Dm9mO7pJ.js";const M=({businessId:t})=>{const{businessId:r}=S(),{get:s}=R(),{setFiltersContext:u}=c.useContext(w),l=t||r,[m,d]=c.useState(s("ledgerRecordsFilters")?{...JSON.parse(decodeURIComponent(s("ledgerRecordsFilters"))),businessIDs:l?[l]:[]}:{businessIDs:l?[l]:[]}),[{data:a,fetching:f}]=C({query:y,variables:{filters:m}});c.useEffect(()=>{u(n.jsx(v,{filter:m,setFilter:d}))},[a,m,u,d]);const b=c.useMemo(()=>a?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:a?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?a.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((e,g)=>e.business.name.localeCompare(g.business.name)):[],[a?.businessTransactionsSumFromLedgerRecords]);return f?n.jsx(x,{}):n.jsx(h,{moreInfo:e=>n.jsx(F,{businessID:e.business.id,filter:m}),striped:!0,highlightOnHover:!0,stickyHeader:!0,items:b,columns:[{title:"Business Name",value:e=>e.business.name},{title:"Debit",value:e=>e.debit.formatted,style:{whiteSpace:"nowrap"}},{title:"Credit",value:e=>e.credit.formatted,style:{whiteSpace:"nowrap"}},{title:"Total",value:e=>e.total.raw&&(e.total.raw<-1e-4||e.total.raw>1e-4)?n.jsx(p,{color:e.total.raw>0?"green":"red",children:e.total.formatted}):e.total.formatted,style:{whiteSpace:"nowrap"}},...i(o.Eur),...i(o.Usd),...i(o.Gbp),...i(o.Cad),...i(o.Jpy),...i(o.Aud),...i(o.Sek)]})};function i(t){return[{title:`${t} Debit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.debit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Credit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.credit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Total`,value:r=>{const s=r.foreignCurrenciesSum.find(u=>u.currency===t);return s?.total?.raw&&(s.total.raw<-1e-4||s.total.raw>1e-4)?n.jsx(p,{color:s.total.raw>0?"green":"red",children:s.total.formatted}):s?.total?.formatted},style:{whiteSpace:"nowrap"}}]}export{M as BusinessLedgerRecordsSingle};
1
+ import{a as S,r as c,F as w,u as C,j as n,c as x,bb as o,bc as y}from"./index-Bd-SKdyy.js";import{u as h}from"./use-url-query-5TFyEk1x.js";import{a as F}from"./accounter-table-BvOYdMv2.js";import{M as p,B as R}from"./business-extended-info-BPdDug4k.js";import{B as v}from"./business-ledger-filters-C6zdPVNQ.js";import"./Table-DpZKU9e6.js";import"./download-csv-button-8ow10rSS.js";import"./modal-CwuHXtxz.js";import"./funnel-DW3_rS_8.js";import"./MultiSelect-SsgUtHuW.js";const M=({businessId:t})=>{const{businessId:r}=S(),{get:s}=h(),{setFiltersContext:u}=c.useContext(w),l=t||r,[m,d]=c.useState(s("ledgerRecordsFilters")?{...JSON.parse(decodeURIComponent(s("ledgerRecordsFilters"))),businessIDs:l?[l]:[]}:{businessIDs:l?[l]:[]}),[{data:a,fetching:f}]=C({query:y,variables:{filters:m}});c.useEffect(()=>{u(n.jsx(v,{filter:m,setFilter:d}))},[a,m,u,d]);const b=c.useMemo(()=>a?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:a?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?a.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((e,g)=>e.business.name.localeCompare(g.business.name)):[],[a?.businessTransactionsSumFromLedgerRecords]);return f?n.jsx(x,{}):n.jsx(F,{moreInfo:e=>n.jsx(R,{businessID:e.business.id,filter:m}),striped:!0,highlightOnHover:!0,stickyHeader:!0,items:b,columns:[{title:"Business Name",value:e=>e.business.name},{title:"Debit",value:e=>e.debit.formatted,style:{whiteSpace:"nowrap"}},{title:"Credit",value:e=>e.credit.formatted,style:{whiteSpace:"nowrap"}},{title:"Total",value:e=>e.total.raw&&(e.total.raw<-1e-4||e.total.raw>1e-4)?n.jsx(p,{color:e.total.raw>0?"green":"red",children:e.total.formatted}):e.total.formatted,style:{whiteSpace:"nowrap"}},...i(o.Eur),...i(o.Usd),...i(o.Gbp),...i(o.Cad),...i(o.Jpy),...i(o.Aud),...i(o.Sek)]})};function i(t){return[{title:`${t} Debit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.debit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Credit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.credit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Total`,value:r=>{const s=r.foreignCurrenciesSum.find(u=>u.currency===t);return s?.total?.raw&&(s.total.raw<-1e-4||s.total.raw>1e-4)?n.jsx(p,{color:s.total.raw>0?"green":"red",children:s.total.formatted}):s?.total?.formatted},style:{whiteSpace:"nowrap"}}]}export{M as BusinessLedgerRecordsSingle};