rez-table-listing-mui 1.3.61 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/listing/components/index.scss +0 -144
- package/src/listing/components/login/index.tsx +4 -4
- package/src/listing/components/pagination/default/index.tsx +108 -138
- package/src/listing/components/pagination/default/pagination.styles.ts +113 -0
- package/src/listing/components/{table-body-dnd-cell.tsx → table-body/table-body-dnd-cell.tsx} +18 -25
- package/src/listing/components/table-body/table-body.styles.ts +64 -0
- package/src/listing/components/{table-body.tsx → table-body/table-body.tsx} +35 -32
- package/src/listing/components/table-head/table-head-dnd-cell.tsx +112 -0
- package/src/listing/components/table-head/table-head-pin.tsx +29 -0
- package/src/listing/components/{table-head-popover.tsx → table-head/table-head-popover.tsx} +4 -16
- package/src/listing/components/table-head/table-head-resizer.tsx +22 -0
- package/src/listing/components/table-head/table-head.styles.ts +115 -0
- package/src/listing/components/{table-head.tsx → table-head/table-head.tsx} +36 -69
- package/src/listing/components/table.tsx +2 -2
- package/src/listing/components/tabs/index.tsx +28 -42
- package/src/listing/components/tabs/tabs.styles.ts +49 -0
- package/src/listing/libs/hooks/useEntityTableAPI.tsx +8 -0
- package/src/listing/libs/hooks/useEntityTableHooks.ts +3 -3
- package/src/listing/libs/services/getLayoutAPI.tsx +1 -1
- package/src/listing/libs/utils/apiColumn.ts +17 -8
- package/src/listing/libs/utils/common.ts +45 -1
- package/src/listing/types/common.ts +1 -0
- package/src/listing/types/table.ts +2 -2
- package/src/view/ListingView.tsx +58 -91
- package/src/listing/components/table-head-dnd-cell.tsx +0 -150
- package/src/listing/components/table-head-pin.tsx +0 -22
- package/src/listing/components/tabs/index.scss +0 -42
- package/src/listing/components/tabs/styles.ts +0 -34
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@tanstack/react-table"),n=require("react"),i=require("@mui/material"),s=require("@dnd-kit/core"),a=require("@dnd-kit/sortable"),o=require("@dnd-kit/utilities"),r=require("@mui/icons-material/CloseRounded"),l=require("@mui/icons-material/NavigateBeforeRounded"),c=require("@mui/icons-material/NavigateNextRounded"),d=require("axios"),u=require("uuid"),h=require("@tanstack/react-query"),x=require("@dnd-kit/modifiers"),p=require("@mui/icons-material/Close"),m=require("@mui/material/Box"),g=require("react-hook-form"),C=require("moment"),b=require("@mui/icons-material/Search"),f=require("@mui/x-date-pickers/LocalizationProvider"),_=require("@mui/x-date-pickers/DatePicker"),v=require("@mui/x-date-pickers/AdapterDateFns"),j=require("@mui/icons-material/ArrowBackIosNew"),w=require("@mui/icons-material/ExpandMore"),y=require("@mui/icons-material/CalendarToday"),S=require("@mui/icons-material"),k=require("@mui/icons-material/SettingsOutlined"),T=require("@mui/icons-material/ArrowDropDown");function M(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}M(".ts__table__container {\n --black: #000;\n --white: #fff;\n --grey-100: #fafafa;\n --grey-200: #f4f4f4;\n --grey-300: #edeeef;\n --grey-500: #dcddde;\n --grey-600: #bbbbbd;\n --grey-700: #77787b;\n --grey-900: #414042;\n --filter-width: 24rem;\n}\n.ts__table__container * {\n box-sizing: border-box;\n}\n.ts__table__container .ts__table__layout {\n display: flex;\n width: calc(100% - var(--filter-width));\n transition: all 0.4s ease-in-out;\n}\n.ts__table__container .ts__table__layout .ts__table__filter {\n width: 0rem;\n opacity: 0;\n margin-right: calc(-1 * var(--filter-width));\n transition: all 0.4s ease-in-out;\n max-height: calc(100vh - 110px);\n}\n.ts__table__container .ts__table__layout .ts__table__filter.show {\n transition: all 0.4s ease-in-out;\n opacity: 1;\n width: var(--filter-width);\n max-width: var(--filter-width);\n margin-left: 1.25rem;\n margin-right: 0rem;\n min-height: calc(100vh - 110px);\n}\n.ts__table__container .ts__table__layout.has-filter {\n width: 100%;\n}\n.ts__table__container .ts__table__main {\n flex: 1;\n min-width: 0;\n}\n.ts__table__container .ts__loader {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n color: var(--grey-900);\n font-size: 1.2rem;\n}\n.ts__table__container .ts__table__wrapper {\n overflow-x: auto;\n max-height: calc(100vh - 160px);\n}\n.ts__table__container .ts__table__wrapper.is-fullscreen {\n max-height: calc(100vh - 56px);\n}\n.ts__table__container .ts__table__wrapper .ts__table.ts--striped > .ts__body > .ts__body__tr:nth-of-type(odd) {\n background-color: var(--grey-200);\n}\n.ts__table__container .ts__table__wrapper .ts__table:not(.ts--striped) > .ts__body > .ts__body__tr:hover {\n background-color: var(--grey-100);\n box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.05), inset 0 -2px 2px rgba(0, 0, 0, 0.05);\n}\n.ts__table__container .ts__table__wrapper .ts__table:not(.ts--striped) > .ts__head > .ts__head__tr {\n background-color: var(--grey-100);\n}\n.ts__table__container .ts__table__wrapper .ts__table:not(.ts--striped) > .ts__head > .ts__head__tr .ts__head__th {\n border: 1px solid var(--grey-500);\n}\n.ts__table__container .ts__table__wrapper .ts__table.ts--compact .ts__head > .ts__head__tr > .ts__head__th {\n padding: 0.25rem 0.5rem;\n}\n.ts__table__container .ts__table__wrapper .ts__table.ts--compact .ts__head > .ts__head__tr > .ts__head__th .ts__content {\n font-size: 0.875rem;\n}\n.ts__table__container .ts__table__wrapper .ts__table.ts--compact .ts__body > .ts__body__tr > .ts__body__td {\n padding: 0.25rem 0.5rem;\n}\n.ts__table__container .ts__table__wrapper .ts__table.ts--compact .ts__body > .ts__body__tr > .ts__body__td .ts__content {\n font-size: 0.75rem;\n}\n.ts__table__container .ts__table__wrapper .ts__table {\n width: max-content;\n min-width: 100%;\n border-spacing: 0;\n border-collapse: separate;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head.ts--sticky {\n position: sticky;\n top: 0rem;\n z-index: 3;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head {\n position: relative;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr {\n background-color: var(--white);\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th {\n position: relative;\n padding: 0.5rem 1rem;\n border: 1px solid var(--grey-500);\n cursor: pointer;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__dnd__button {\n color: var(--grey-600);\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__dnd__button:hover {\n scale: 1.1;\n color: var(--grey-900);\n width: max-content;\n height: max-content;\n cursor: grabbing;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n min-height: 44px;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content .ts__content__sort {\n cursor: pointer;\n user-select: none;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content .ts__content__sort svg {\n margin-left: 0.25rem;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content .ts--head--button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content .ts--head--button:hover {\n scale: 1.1;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .ts__content .ts--head--button svg {\n color: var(--grey-700);\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .column__resize {\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n width: 5px;\n background: rgba(0, 0, 0, 0.5);\n cursor: col-resize;\n user-select: none;\n touch-action: none;\n opacity: 0;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .column__resize:hover {\n opacity: 1;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__head .ts__head__tr .ts__head__th .column__resize.is__resizing {\n background: rgba(0, 0, 0, 0.8);\n opacity: 1;\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__body .ts__body__tr {\n background-color: var(--white);\n}\n.ts__table__container .ts__table__wrapper .ts__table .ts__body .ts__body__tr .ts__body__td {\n font-size: 0.875rem;\n padding: 0.5rem 1rem;\n border-top: 1px solid var(--grey-300);\n border-bottom: 1px solid var(--grey-300);\n}\n\n:fullscreen {\n width: 100vw !important;\n height: 100vh !important;\n display: flex !important;\n flex-direction: column !important;\n background: var(--white);\n overflow: hidden;\n}\n\n:-webkit-full-screen {\n width: 100vw !important;\n height: 100vh !important;\n display: flex !important;\n flex-direction: column !important;\n background: var(--white);\n overflow: hidden;\n}");const F=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("polyline",{points:"19 12 12 5 5 12"})]}),D=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),e.jsx("polyline",{points:"5 12 12 19 19 12"})]}),I=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation",children:[e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),e.jsx("path",{fill:"none",d:"M24 24H0V0h24v24z"})]}),B=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation",children:[e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),e.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"})]}),L=()=>e.jsx("svg",{width:"18",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.33331 10.6663H2.17431L8.99865 3.84201L8.15765 3.00101L1.33331 9.82534V10.6663ZM0.93598 11.6663C0.765202 11.6663 0.622091 11.6086 0.506646 11.493C0.391091 11.3776 0.333313 11.2345 0.333313 11.0637V9.90867C0.333313 9.74612 0.364535 9.59118 0.42698 9.44384C0.489313 9.29651 0.575202 9.16812 0.684646 9.05868L9.12698 0.620174C9.22776 0.528619 9.33904 0.457897 9.46081 0.408008C9.5827 0.358008 9.71048 0.333008 9.84415 0.333008C9.97781 0.333008 10.1073 0.35673 10.2325 0.404175C10.3578 0.451619 10.4688 0.527063 10.5653 0.630507L11.3795 1.45484C11.4829 1.5514 11.5566 1.66251 11.6006 1.78817C11.6446 1.91384 11.6666 2.03951 11.6666 2.16517C11.6666 2.29929 11.6438 2.42723 11.598 2.54901C11.5522 2.6709 11.4794 2.78223 11.3795 2.88301L2.94098 11.315C2.83154 11.4245 2.70315 11.5103 2.55581 11.5727C2.40848 11.6351 2.25354 11.6663 2.09098 11.6663H0.93598ZM8.57081 3.42884L8.15765 3.00101L8.99865 3.84201L8.57081 3.42884Z",fill:"#0E0C0B",fillOpacity:.4})}),A=()=>e.jsx("svg",{width:"18",height:"20",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.87183 11.6665C1.54039 11.6665 1.25667 11.5485 1.02067 11.3125C0.784667 11.0765 0.666667 10.7928 0.666667 10.4613V1.99982H0.5C0.358333 1.99982 0.239611 1.95188 0.143833 1.85599C0.0479445 1.7601 0 1.64132 0 1.49966C0 1.35788 0.0479445 1.23916 0.143833 1.14349C0.239611 1.04771 0.358333 0.999823 0.5 0.999823H3C3 0.836601 3.0575 0.69749 3.1725 0.58249C3.28739 0.467601 3.42644 0.410156 3.58967 0.410156H6.41033C6.57356 0.410156 6.71261 0.467601 6.8275 0.58249C6.9425 0.69749 7 0.836601 7 0.999823H9.5C9.64167 0.999823 9.76039 1.04777 9.85617 1.14366C9.95206 1.23955 10 1.35832 10 1.49999C10 1.64177 9.95206 1.76049 9.85617 1.85616C9.76039 1.95193 9.64167 1.99982 9.5 1.99982H9.33333V10.4613C9.33333 10.7928 9.21533 11.0765 8.97933 11.3125C8.74333 11.5485 8.45961 11.6665 8.12817 11.6665H1.87183ZM8.33333 1.99982H1.66667V10.4613C1.66667 10.5212 1.68589 10.5704 1.72433 10.6088C1.76278 10.6473 1.81194 10.6665 1.87183 10.6665H8.12817C8.18806 10.6665 8.23722 10.6473 8.27567 10.6088C8.31411 10.5704 8.33333 10.5212 8.33333 10.4613V1.99982ZM3.7695 9.33316C3.91117 9.33316 4.02989 9.28527 4.12567 9.18949C4.22133 9.0936 4.26917 8.97482 4.26917 8.83316V3.83316C4.26917 3.69149 4.22122 3.57271 4.12533 3.47682C4.02956 3.38104 3.91078 3.33316 3.769 3.33316C3.62733 3.33316 3.50861 3.38104 3.41283 3.47682C3.31717 3.57271 3.26933 3.69149 3.26933 3.83316V8.83316C3.26933 8.97482 3.31722 9.0936 3.413 9.18949C3.50889 9.28527 3.62772 9.33316 3.7695 9.33316ZM6.231 9.33316C6.37267 9.33316 6.49139 9.28527 6.58717 9.18949C6.68283 9.0936 6.73067 8.97482 6.73067 8.83316V3.83316C6.73067 3.69149 6.68278 3.57271 6.587 3.47682C6.49111 3.38104 6.37228 3.33316 6.2305 3.33316C6.08883 3.33316 5.97011 3.38104 5.87433 3.47682C5.77867 3.57271 5.73083 3.69149 5.73083 3.83316V8.83316C5.73083 8.97482 5.77878 9.0936 5.87467 9.18949C5.97044 9.28527 6.08922 9.33316 6.231 9.33316Z",fill:"#F63D68"})}),z=()=>e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M15 3.5H3C2.175 3.5 1.5 4.175 1.5 5V14C1.5 14.825 2.175 15.5 3 15.5H15C15.825 15.5 16.5 14.825 16.5 14V5C16.5 4.175 15.825 3.5 15 3.5ZM6 14H3V5H6V14ZM10.5 14H7.5V5H10.5V14ZM15 14H12V5H15V14Z",fill:"currentColor",stroke:"white",strokeWidth:"0.5"})}),E=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"tabler-icon tabler-icon-grip-horizontal",transform:"rotate(90)",children:[e.jsx("path",{d:"M10 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M10 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M18 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M18 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),O=t=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1rem",width:"1rem",...t,children:e.jsx("path",{d:"M16 12V4h1V2H7v2h1v8l-2 2v2h5.2v6h1.6v-6H18v-2l-2-2m-7.2 2l1.2-1.2V4h4v8.8l1.2 1.2H8.8z"})}),V=t=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1rem",width:"1rem",...t,children:e.jsx("path",{d:"M8 6.2V4H7V2h10v2h-1v8l2 2v2h-.2L14 12.2V4h-4v4.2l-2-2m12 14.5L18.7 22l-5.9-5.9V22h-1.6v-6H6v-2l2-2v-.7l-6-6L3.3 4 20 20.7M8.8 14h1.8l-.9-.9-.9.9z"})}),H=()=>e.jsxs("svg",{viewBox:"0 0 60 60",width:"4rem",children:[e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"6",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 15 ; 0 -15; 0 15",repeatCount:"indefinite",begin:"0.1"})}),e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"24",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 10 ; 0 -10; 0 10",repeatCount:"indefinite",begin:"0.2"})}),e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"42",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})})]}),N=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12587",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12587)",children:e.jsx("path",{d:"M4.42311 17.0834C4.00214 17.0834 3.64582 16.9375 3.35416 16.6459C3.06249 16.3542 2.91666 15.9979 2.91666 15.5769V4.42315C2.91666 4.00217 3.06249 3.64585 3.35416 3.35419C3.64582 3.06252 4.00214 2.91669 4.42311 2.91669H15.5769C15.9978 2.91669 16.3542 3.06252 16.6458 3.35419C16.9375 3.64585 17.0833 4.00217 17.0833 4.42315V15.5769C17.0833 15.9979 16.9375 16.3542 16.6458 16.6459C16.3542 16.9375 15.9978 17.0834 15.5769 17.0834H4.42311ZM4.42311 15.8334H9.37499V4.16669H4.42311C4.35895 4.16669 4.3002 4.19342 4.24687 4.24689C4.19339 4.30023 4.16666 4.35898 4.16666 4.42315V15.5769C4.16666 15.6411 4.19339 15.6998 4.24687 15.7531C4.3002 15.8066 4.35895 15.8334 4.42311 15.8334ZM10.625 15.8334H15.5769C15.641 15.8334 15.6998 15.8066 15.7531 15.7531C15.8066 15.6998 15.8333 15.6411 15.8333 15.5769V10H10.625V15.8334ZM10.625 8.75002H15.8333V4.42315C15.8333 4.35898 15.8066 4.30023 15.7531 4.24689C15.6998 4.19342 15.641 4.16669 15.5769 4.16669H10.625V8.75002Z",fill:"#1E1E1E"})})]}),q=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M11.0833 3.73919L10.2608 2.91669L6.99996 6.17752L3.73913 2.91669L2.91663 3.73919L6.17746 7.00002L2.91663 10.2609L3.73913 11.0834L6.99996 7.82252L10.2608 11.0834L11.0833 10.2609L7.82246 7.00002L11.0833 3.73919Z",fill:"#0C2033"})}),P=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12583",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12583)",children:e.jsx("path",{d:"M7.93274 13.0127C6.50969 13.0127 5.30455 12.5192 4.31733 11.5321C3.33024 10.5449 2.8367 9.33971 2.8367 7.91666C2.8367 6.4936 3.33024 5.28847 4.31733 4.30124C5.30455 3.31416 6.50969 2.82062 7.93274 2.82062C9.3558 2.82062 10.5609 3.31416 11.5482 4.30124C12.5352 5.28847 13.0288 6.4936 13.0288 7.91666C13.0288 8.5118 12.9289 9.0802 12.7292 9.62187C12.5293 10.1635 12.2627 10.6346 11.9294 11.0352L16.7244 15.8302C16.8398 15.9455 16.8989 16.0905 16.9015 16.2652C16.9041 16.4399 16.8451 16.5876 16.7244 16.7083C16.6037 16.829 16.4573 16.8894 16.2852 16.8894C16.1133 16.8894 15.967 16.829 15.8463 16.7083L11.0513 11.9133C10.6346 12.2574 10.1554 12.5266 9.61378 12.721C9.07212 12.9155 8.51177 13.0127 7.93274 13.0127ZM7.93274 11.7629C9.00649 11.7629 9.91594 11.3903 10.6611 10.645C11.4064 9.89985 11.779 8.99041 11.779 7.91666C11.779 6.84291 11.4064 5.93346 10.6611 5.18833C9.91594 4.44305 9.00649 4.07041 7.93274 4.07041C6.85899 4.07041 5.94955 4.44305 5.20441 5.18833C4.45913 5.93346 4.08649 6.84291 4.08649 7.91666C4.08649 8.99041 4.45913 9.89985 5.20441 10.645C5.94955 11.3903 6.85899 11.7629 7.93274 11.7629Z",fill:"#1E1E1E"})})]}),R=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12710",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12710)",children:e.jsx("path",{d:"M7.63605 10.5369C7.45883 10.5369 7.31036 10.477 7.19064 10.3571C7.07105 10.2374 7.01126 10.089 7.01126 9.9119V4.4696L5.08022 6.40065C4.96744 6.51606 4.82654 6.57377 4.65751 6.57377C4.48848 6.57377 4.33932 6.51398 4.21001 6.3944C4.0807 6.26398 4.01605 6.11488 4.01605 5.94711C4.01605 5.77947 4.0807 5.63099 4.21001 5.50169L7.10105 2.61065C7.17897 2.53259 7.26154 2.47759 7.34876 2.44565C7.43612 2.41356 7.52966 2.39752 7.62939 2.39752C7.72911 2.39752 7.82383 2.41363 7.91355 2.44586C8.00327 2.47822 8.08661 2.53315 8.16355 2.61065L11.0754 5.52252C11.1993 5.64641 11.2604 5.79009 11.2588 5.95356C11.2572 6.11704 11.1918 6.26398 11.0625 6.3944C10.9332 6.51398 10.7868 6.57592 10.6233 6.58023C10.4599 6.5844 10.3136 6.5219 10.1844 6.39273L8.26126 4.4696V9.91981C8.26126 10.0947 8.20133 10.2412 8.08147 10.3594C7.96161 10.4777 7.81314 10.5369 7.63605 10.5369ZM12.3706 17.5946C12.2709 17.5946 12.1762 17.5784 12.0865 17.5461C11.9967 17.5138 11.9134 17.459 11.8365 17.3815L8.92459 14.4696C8.8007 14.3456 8.73959 14.2019 8.74126 14.0386C8.74279 13.8751 8.8082 13.7281 8.93751 13.5977C9.06682 13.4781 9.2132 13.4162 9.37668 13.4119C9.54015 13.4076 9.68647 13.4701 9.81564 13.5994L11.7388 15.5225V10.0721C11.7388 9.89738 11.7987 9.75085 11.9186 9.63252C12.0384 9.51433 12.1869 9.45523 12.364 9.45523C12.5412 9.45523 12.6897 9.51509 12.8094 9.63481C12.929 9.75467 12.9888 9.90315 12.9888 10.0802V15.5225L14.9198 13.5913C15.0326 13.476 15.1735 13.4184 15.3425 13.4184C15.5115 13.4184 15.6607 13.4781 15.79 13.5977C15.9193 13.7281 15.984 13.8772 15.984 14.0448C15.984 14.2126 15.9193 14.3611 15.79 14.4904L12.899 17.3815C12.8211 17.4594 12.7385 17.5144 12.6513 17.5465C12.5639 17.5786 12.4704 17.5946 12.3706 17.5946Z",fill:"#1C1B1F"})})]}),W=({color:t="#1C1B1F",...n})=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12698",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12698)",children:e.jsx("path",{d:"M8.33333 15V13.3333H11.6667V15H8.33333ZM5 10.8333V9.16667H15V10.8333H5ZM2.5 6.66667V5H17.5V6.66667H2.5Z",fill:t,...n})})]}),Z=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_957_24305",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_957_24305)",children:e.jsx("path",{d:"M9.91805 5.74863C10.1889 6.01963 10.3983 6.34891 10.5462 6.73647C10.6941 7.12413 10.75 7.51325 10.714 7.9038C10.714 8.03202 10.6679 8.14058 10.5757 8.22947C10.4834 8.31836 10.3731 8.3628 10.2449 8.3628C10.1167 8.3628 10.0081 8.31836 9.91922 8.22947C9.83033 8.14058 9.78588 8.03202 9.78588 7.9038C9.82866 7.61069 9.80455 7.33291 9.71355 7.07047C9.62255 6.80813 9.4826 6.58252 9.29372 6.39363C9.10483 6.20475 8.87705 6.06136 8.61038 5.96347C8.34372 5.86558 8.06249 5.84013 7.76672 5.88713C7.63849 5.89147 7.52783 5.84852 7.43472 5.7583C7.34149 5.66819 7.29277 5.55902 7.28855 5.4308C7.28422 5.30258 7.32544 5.19186 7.41222 5.09863C7.49899 5.00552 7.60649 4.95686 7.73472 4.95263C8.12272 4.90819 8.51266 4.9588 8.90455 5.10447C9.29644 5.25025 9.63427 5.46497 9.91805 5.74863ZM8.00005 3.99997C7.76327 3.99997 7.53099 4.01152 7.30322 4.03463C7.07544 4.05763 6.84872 4.09563 6.62305 4.14863C6.48116 4.17774 6.35338 4.15747 6.23972 4.0878C6.12605 4.01813 6.04788 3.91791 6.00522 3.78713C5.96244 3.65213 5.97655 3.52375 6.04755 3.40197C6.11844 3.28019 6.22138 3.20474 6.35638 3.17563C6.62483 3.11152 6.89599 3.06625 7.16988 3.0398C7.44388 3.01325 7.7206 2.99997 8.00005 2.99997C9.43249 2.99997 10.7483 3.37219 11.9475 4.11663C13.1467 4.86108 14.0688 5.86836 14.714 7.13847C14.7585 7.22302 14.7908 7.30825 14.8109 7.39413C14.831 7.48002 14.841 7.57086 14.841 7.66663C14.841 7.76241 14.8327 7.85325 14.816 7.93913C14.7994 8.02502 14.7688 8.11024 14.7244 8.1948C14.5202 8.62213 14.2719 9.02063 13.9796 9.3903C13.6872 9.75997 13.3654 10.0995 13.0141 10.409C12.9107 10.5013 12.7926 10.5395 12.6597 10.5236C12.5267 10.5079 12.4175 10.4414 12.332 10.3243C12.2466 10.2072 12.2112 10.0816 12.2257 9.94747C12.2403 9.81325 12.2992 9.69997 12.4026 9.60763C12.7034 9.33497 12.9778 9.03691 13.2257 8.71347C13.4736 8.38991 13.6873 8.04097 13.8667 7.66663C13.3112 6.54441 12.5084 5.65275 11.4584 4.99163C10.4084 4.33052 9.2556 3.99997 8.00005 3.99997ZM8.00005 12.3333C6.5966 12.3333 5.31027 11.9583 4.14105 11.2083C2.97183 10.4583 2.04238 9.47047 1.35272 8.2448C1.29716 8.16025 1.25655 8.06836 1.23088 7.96913C1.20522 7.87002 1.19238 7.76919 1.19238 7.66663C1.19238 7.56408 1.20349 7.46491 1.22572 7.36913C1.24794 7.27347 1.28683 7.17991 1.34238 7.08847C1.59027 6.63547 1.87105 6.20402 2.18472 5.79413C2.49838 5.38436 2.85905 5.01708 3.26672 4.6923L1.76155 3.1768C1.66933 3.07769 1.62383 2.95997 1.62505 2.82363C1.62638 2.6873 1.67533 2.57086 1.77188 2.4743C1.86844 2.37775 1.98555 2.32947 2.12322 2.32947C2.26077 2.32947 2.37783 2.37775 2.47438 2.4743L13.5257 13.5256C13.618 13.618 13.667 13.7322 13.6725 13.8685C13.6781 14.0048 13.6292 14.1247 13.5257 14.2281C13.4292 14.3247 13.312 14.373 13.1744 14.373C13.0368 14.373 12.9198 14.3247 12.8232 14.2281L10.477 11.9025C10.0838 12.0546 9.67972 12.1644 9.26472 12.232C8.84983 12.2995 8.42827 12.3333 8.00005 12.3333ZM3.96938 5.3948C3.57872 5.69658 3.22761 6.0378 2.91605 6.41847C2.60449 6.79924 2.3436 7.2153 2.13338 7.66663C2.68894 8.78886 3.49172 9.68052 4.54172 10.3416C5.59172 11.0027 6.74449 11.3333 8.00005 11.3333C8.28638 11.3333 8.56822 11.3141 8.84555 11.2756C9.12288 11.2372 9.39833 11.1778 9.67188 11.0975L8.82822 10.2333C8.69322 10.2923 8.55838 10.3322 8.42372 10.3531C8.28916 10.3741 8.14794 10.3846 8.00005 10.3846C7.2436 10.3846 6.60149 10.1207 6.07372 9.59297C5.54594 9.06519 5.28205 8.42308 5.28205 7.66663C5.28205 7.51874 5.2936 7.37752 5.31672 7.24297C5.33983 7.1083 5.37872 6.97347 5.43338 6.83847L3.96938 5.3948Z",fill:"#1C1B1F"})})]}),Y=()=>e.jsx("svg",{width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.00147 7.38467C7.75692 7.38467 8.39853 7.12028 8.92631 6.5915C9.45408 6.06272 9.71797 5.42061 9.71797 4.66517C9.71797 3.90972 9.45358 3.26811 8.9248 2.74033C8.39603 2.21256 7.75392 1.94867 6.99847 1.94867C6.24303 1.94867 5.60142 2.21306 5.07364 2.74183C4.54586 3.27061 4.28197 3.91272 4.28197 4.66817C4.28197 5.42361 4.54636 6.06522 5.07514 6.593C5.60392 7.12078 6.24603 7.38467 7.00147 7.38467ZM6.99997 6.46667C6.49997 6.46667 6.07497 6.29167 5.72497 5.94167C5.37497 5.59167 5.19997 5.16667 5.19997 4.66667C5.19997 4.16667 5.37497 3.74167 5.72497 3.39167C6.07497 3.04167 6.49997 2.86667 6.99997 2.86667C7.49997 2.86667 7.92497 3.04167 8.27497 3.39167C8.62497 3.74167 8.79997 4.16667 8.79997 4.66667C8.79997 5.16667 8.62497 5.59167 8.27497 5.94167C7.92497 6.29167 7.49997 6.46667 6.99997 6.46667ZM6.99997 9.33333C5.59653 9.33333 4.31297 8.95894 3.1493 8.21017C1.98564 7.4615 1.0568 6.4765 0.362803 5.25517C0.307248 5.15939 0.266637 5.06289 0.24097 4.96567C0.215414 4.86844 0.202637 4.76867 0.202637 4.66633C0.202637 4.564 0.215414 4.46433 0.24097 4.36733C0.266637 4.27033 0.307248 4.17394 0.362803 4.07817C1.0568 2.85683 1.98564 1.87183 3.1493 1.12317C4.31297 0.374389 5.59653 0 6.99997 0C8.40342 0 9.68697 0.374389 10.8506 1.12317C12.0143 1.87183 12.9431 2.85683 13.6371 4.07817C13.6927 4.17394 13.7333 4.27044 13.759 4.36767C13.7845 4.46489 13.7973 4.56467 13.7973 4.667C13.7973 4.76933 13.7845 4.869 13.759 4.966C13.7333 5.063 13.6927 5.15939 13.6371 5.25517C12.9431 6.4765 12.0143 7.4615 10.8506 8.21017C9.68697 8.95894 8.40342 9.33333 6.99997 9.33333ZM6.99997 8.33333C8.25553 8.33333 9.4083 8.00278 10.4583 7.34167C11.5083 6.68055 12.3111 5.78889 12.8666 4.66667C12.3111 3.54444 11.5083 2.65278 10.4583 1.99167C9.4083 1.33056 8.25553 1 6.99997 1C5.74442 1 4.59164 1.33056 3.54164 1.99167C2.49164 2.65278 1.68886 3.54444 1.1333 4.66667C1.68886 5.78889 2.49164 6.68055 3.54164 7.34167C4.59164 8.00278 5.74442 8.33333 6.99997 8.33333Z",fill:"#505050"})}),$=()=>e.jsx("svg",{width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.91793 3.74863C9.18882 4.01963 9.39821 4.34891 9.54609 4.73647C9.69398 5.12413 9.74993 5.51325 9.71393 5.9038C9.71393 6.03202 9.66782 6.14058 9.57559 6.22947C9.48326 6.31836 9.37298 6.3628 9.24476 6.3628C9.11654 6.3628 9.00798 6.31836 8.9191 6.22947C8.83021 6.14058 8.78576 6.03202 8.78576 5.9038C8.82854 5.61069 8.80443 5.33291 8.71343 5.07047C8.62243 4.80813 8.48248 4.58252 8.29359 4.39363C8.1047 4.20475 7.87693 4.06136 7.61026 3.96347C7.34359 3.86558 7.06237 3.84013 6.76659 3.88713C6.63837 3.89147 6.52771 3.84852 6.43459 3.7583C6.34137 3.66819 6.29265 3.55902 6.28843 3.4308C6.28409 3.30258 6.32532 3.19186 6.41209 3.09863C6.49887 3.00552 6.60637 2.95686 6.73459 2.95263C7.12259 2.90819 7.51254 2.9588 7.90443 3.10447C8.29632 3.25025 8.63415 3.46497 8.91793 3.74863ZM6.99993 1.99997C6.76315 1.99997 6.53087 2.01152 6.30309 2.03463C6.07532 2.05763 5.84859 2.09563 5.62293 2.14863C5.48104 2.17774 5.35326 2.15747 5.23959 2.0878C5.12593 2.01813 5.04776 1.91791 5.00509 1.78713C4.96232 1.65213 4.97643 1.52375 5.04743 1.40197C5.11832 1.28019 5.22126 1.20474 5.35626 1.17563C5.62471 1.11152 5.89587 1.06625 6.16976 1.0398C6.44376 1.01325 6.72048 0.999967 6.99993 0.999967C8.43237 0.999967 9.74821 1.37219 10.9474 2.11663C12.1465 2.86108 13.0687 3.86836 13.7139 5.13847C13.7584 5.22302 13.7907 5.30825 13.8108 5.39413C13.8309 5.48002 13.8409 5.57086 13.8409 5.66663C13.8409 5.76241 13.8326 5.85325 13.8159 5.93913C13.7993 6.02502 13.7687 6.11024 13.7243 6.1948C13.52 6.62213 13.2718 7.02063 12.9794 7.3903C12.6871 7.75997 12.3653 8.09952 12.0139 8.40897C11.9106 8.5013 11.7925 8.53952 11.6596 8.52363C11.5266 8.50786 11.4174 8.44141 11.3319 8.3243C11.2465 8.20719 11.211 8.08158 11.2256 7.94747C11.2402 7.81325 11.2991 7.69997 11.4024 7.60763C11.7033 7.33497 11.9777 7.03691 12.2256 6.71347C12.4735 6.38991 12.6872 6.04097 12.8666 5.66663C12.311 4.54441 11.5083 3.65275 10.4583 2.99163C9.40826 2.33052 8.25548 1.99997 6.99993 1.99997ZM6.99993 10.3333C5.59648 10.3333 4.31015 9.9583 3.14093 9.2083C1.97171 8.4583 1.04226 7.47047 0.352594 6.2448C0.297039 6.16025 0.256427 6.06836 0.230761 5.96913C0.205094 5.87002 0.192261 5.76919 0.192261 5.66663C0.192261 5.56408 0.203372 5.46491 0.225594 5.36913C0.247816 5.27347 0.286705 5.17991 0.342261 5.08847C0.59015 4.63547 0.870927 4.20402 1.18459 3.79413C1.49826 3.38436 1.85893 3.01708 2.26659 2.6923L0.761427 1.1768C0.669205 1.07769 0.623705 0.959967 0.624927 0.823634C0.626261 0.6873 0.675205 0.570857 0.771761 0.474301C0.868316 0.377746 0.985427 0.329468 1.12309 0.329468C1.26065 0.329468 1.37771 0.377746 1.47426 0.474301L12.5256 11.5256C12.6179 11.618 12.6669 11.7322 12.6724 11.8685C12.678 12.0048 12.629 12.1247 12.5256 12.2281C12.429 12.3247 12.3119 12.373 12.1743 12.373C12.0367 12.373 11.9197 12.3247 11.8231 12.2281L9.47693 9.90247C9.08371 10.0546 8.67959 10.1644 8.2646 10.232C7.84971 10.2995 7.42815 10.3333 6.99993 10.3333ZM2.96926 3.3948C2.57859 3.69658 2.22748 4.0378 1.91593 4.41847C1.60437 4.79924 1.34348 5.2153 1.13326 5.66663C1.68882 6.78886 2.49159 7.68052 3.54159 8.34163C4.59159 9.00274 5.74437 9.3333 6.99993 9.3333C7.28626 9.3333 7.56809 9.31408 7.84543 9.27563C8.12276 9.23719 8.3982 9.1778 8.67176 9.09747L7.82809 8.2333C7.69309 8.2923 7.55826 8.33224 7.42359 8.35313C7.28904 8.37413 7.14782 8.38463 6.99993 8.38463C6.24348 8.38463 5.60137 8.12074 5.07359 7.59297C4.54582 7.06519 4.28193 6.42308 4.28193 5.66663C4.28193 5.51874 4.29348 5.37752 4.31659 5.24297C4.33971 5.1083 4.37859 4.97347 4.43326 4.83847L2.96926 3.3948Z",fill:"#C5C5C5"})}),G=()=>e.jsx("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.00005 11.0768C1.70394 11.0768 1.45044 10.9714 1.23955 10.7605C1.02866 10.5496 0.923218 10.2961 0.923218 9.99999C0.923218 9.70388 1.02866 9.45038 1.23955 9.23949C1.45044 9.0286 1.70394 8.92316 2.00005 8.92316C2.29616 8.92316 2.54966 9.0286 2.76055 9.23949C2.97144 9.45038 3.07688 9.70388 3.07688 9.99999C3.07688 10.2961 2.97144 10.5496 2.76055 10.7605C2.54966 10.9714 2.29616 11.0768 2.00005 11.0768ZM6.00005 11.0768C5.70394 11.0768 5.45044 10.9714 5.23955 10.7605C5.02866 10.5496 4.92322 10.2961 4.92322 9.99999C4.92322 9.70388 5.02866 9.45038 5.23955 9.23949C5.45044 9.0286 5.70394 8.92316 6.00005 8.92316C6.29616 8.92316 6.54966 9.0286 6.76055 9.23949C6.97144 9.45038 7.07688 9.70388 7.07688 9.99999C7.07688 10.2961 6.97144 10.5496 6.76055 10.7605C6.54966 10.9714 6.29616 11.0768 6.00005 11.0768ZM2.00005 7.07682C1.70394 7.07682 1.45044 6.97138 1.23955 6.76049C1.02866 6.5496 0.923218 6.2961 0.923218 5.99999C0.923218 5.70388 1.02866 5.45038 1.23955 5.23949C1.45044 5.0286 1.70394 4.92316 2.00005 4.92316C2.29616 4.92316 2.54966 5.0286 2.76055 5.23949C2.97144 5.45038 3.07688 5.70388 3.07688 5.99999C3.07688 6.2961 2.97144 6.5496 2.76055 6.76049C2.54966 6.97138 2.29616 7.07682 2.00005 7.07682ZM6.00005 7.07682C5.70394 7.07682 5.45044 6.97138 5.23955 6.76049C5.02866 6.5496 4.92322 6.2961 4.92322 5.99999C4.92322 5.70388 5.02866 5.45038 5.23955 5.23949C5.45044 5.0286 5.70394 4.92316 6.00005 4.92316C6.29616 4.92316 6.54966 5.0286 6.76055 5.23949C6.97144 5.45038 7.07688 5.70388 7.07688 5.99999C7.07688 6.2961 6.97144 6.5496 6.76055 6.76049C6.54966 6.97138 6.29616 7.07682 6.00005 7.07682ZM2.00005 3.07682C1.70394 3.07682 1.45044 2.97138 1.23955 2.76049C1.02866 2.5496 0.923218 2.2961 0.923218 1.99999C0.923218 1.70388 1.02866 1.45038 1.23955 1.23949C1.45044 1.0286 1.70394 0.923157 2.00005 0.923157C2.29616 0.923157 2.54966 1.0286 2.76055 1.23949C2.97144 1.45038 3.07688 1.70388 3.07688 1.99999C3.07688 2.2961 2.97144 2.5496 2.76055 2.76049C2.54966 2.97138 2.29616 3.07682 2.00005 3.07682ZM6.00005 3.07682C5.70394 3.07682 5.45044 2.97138 5.23955 2.76049C5.02866 2.5496 4.92322 2.2961 4.92322 1.99999C4.92322 1.70388 5.02866 1.45038 5.23955 1.23949C5.45044 1.0286 5.70394 0.923157 6.00005 0.923157C6.29616 0.923157 6.54966 1.0286 6.76055 1.23949C6.97144 1.45038 7.07688 1.70388 7.07688 1.99999C7.07688 2.2961 6.97144 2.5496 6.76055 2.76049C6.54966 2.97138 6.29616 3.07682 6.00005 3.07682Z",fill:"#A6A6A6"})}),U=({...t})=>e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M4.50002 5.50002H1.16669C1.02502 5.50002 0.906298 5.45208 0.81052 5.35619C0.714632 5.2603 0.666687 5.14152 0.666687 4.99985C0.666687 4.85808 0.714632 4.73935 0.81052 4.64369C0.906298 4.54791 1.02502 4.50002 1.16669 4.50002H4.50002V1.16669C4.50002 1.02502 4.54797 0.906298 4.64385 0.81052C4.73974 0.714632 4.85852 0.666687 5.00019 0.666687C5.14197 0.666687 5.26069 0.714632 5.35635 0.81052C5.45213 0.906298 5.50002 1.02502 5.50002 1.16669V4.50002H8.83335C8.97502 4.50002 9.09374 4.54797 9.18952 4.64385C9.28541 4.73974 9.33335 4.85852 9.33335 5.00019C9.33335 5.14197 9.28541 5.26069 9.18952 5.35635C9.09374 5.45213 8.97502 5.50002 8.83335 5.50002H5.50002V8.83335C5.50002 8.97502 5.45208 9.09374 5.35619 9.18952C5.2603 9.28541 5.14152 9.33335 4.99985 9.33335C4.85808 9.33335 4.73935 9.28541 4.64369 9.18952C4.54791 9.09374 4.50002 8.97502 4.50002 8.83335V5.50002Z",fill:"currentColor"})}),K=()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5.72054 8.43116L4.17187 6.88233C4.07954 6.7901 3.96349 6.74288 3.82371 6.74066C3.68404 6.73855 3.56587 6.78577 3.46921 6.88233C3.37265 6.97899 3.32437 7.0961 3.32437 7.23366C3.32437 7.37121 3.37265 7.48833 3.46921 7.58499L5.29871 9.41449C5.41926 9.53494 5.55987 9.59516 5.72054 9.59516C5.88121 9.59516 6.02182 9.53494 6.14237 9.41449L9.85137 5.70549C9.9436 5.61316 9.99082 5.4971 9.99304 5.35733C9.99515 5.21766 9.94793 5.09949 9.85137 5.00283C9.75471 4.90627 9.6376 4.85799 9.50004 4.85799C9.36249 4.85799 9.24537 4.90627 9.14871 5.00283L5.72054 8.43116ZM6.66787 13.3337C5.79187 13.3337 4.96848 13.1674 4.19771 12.835C3.42693 12.5025 2.75648 12.0514 2.18637 11.4815C1.61626 10.9116 1.16487 10.2414 0.832207 9.47099C0.499652 8.70055 0.333374 7.87738 0.333374 7.00149C0.333374 6.12549 0.499596 5.3021 0.832041 4.53133C1.16449 3.76055 1.61565 3.0901 2.18554 2.51999C2.75543 1.94988 3.4256 1.49849 4.19604 1.16583C4.96649 0.83327 5.78965 0.666992 6.66554 0.666992C7.54154 0.666992 8.36493 0.833214 9.13571 1.16566C9.90649 1.4981 10.5769 1.94927 11.147 2.51916C11.7172 3.08905 12.1685 3.75921 12.5012 4.52966C12.8338 5.3001 13 6.12327 13 6.99916C13 7.87516 12.8338 8.69855 12.5014 9.46933C12.1689 10.2401 11.7178 10.9105 11.1479 11.4807C10.578 12.0508 9.90782 12.5022 9.13737 12.8348C8.36693 13.1674 7.54376 13.3337 6.66787 13.3337Z",fill:"#16B364"})}),Q=()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6.66659 7.70283L8.71525 9.75166C8.80759 9.84388 8.92364 9.8911 9.06342 9.89333C9.20309 9.89544 9.32125 9.84821 9.41792 9.75166C9.51447 9.65499 9.56275 9.53788 9.56275 9.40033C9.56275 9.26277 9.51447 9.14566 9.41792 9.04899L7.36909 7.00033L9.41792 4.95166C9.51014 4.85933 9.55736 4.74327 9.55959 4.60349C9.5617 4.46383 9.51447 4.34566 9.41792 4.24899C9.32125 4.15244 9.20414 4.10416 9.06659 4.10416C8.92903 4.10416 8.81192 4.15244 8.71525 4.24899L6.66659 6.29783L4.61792 4.24899C4.52559 4.15677 4.40953 4.10955 4.26975 4.10733C4.13009 4.10521 4.01192 4.15244 3.91525 4.24899C3.8187 4.34566 3.77042 4.46277 3.77042 4.60033C3.77042 4.73788 3.8187 4.85499 3.91525 4.95166L5.96409 7.00033L3.91525 9.04899C3.82303 9.14133 3.77581 9.25738 3.77359 9.39716C3.77147 9.53683 3.8187 9.65499 3.91525 9.75166C4.01192 9.84821 4.12903 9.89649 4.26659 9.89649C4.40414 9.89649 4.52125 9.84821 4.61792 9.75166L6.66659 7.70283ZM6.66775 13.3337C5.79175 13.3337 4.96836 13.1674 4.19759 12.835C3.42681 12.5025 2.75636 12.0514 2.18625 11.4815C1.61614 10.9116 1.16475 10.2414 0.832085 9.47099C0.49953 8.70055 0.333252 7.87738 0.333252 7.00149C0.333252 6.12549 0.499474 5.3021 0.831919 4.53133C1.16436 3.76055 1.61553 3.0901 2.18542 2.51999C2.75531 1.94988 3.42547 1.49849 4.19592 1.16583C4.96636 0.83327 5.78953 0.666992 6.66542 0.666992C7.54142 0.666992 8.36481 0.833214 9.13559 1.16566C9.90636 1.4981 10.5768 1.94927 11.1469 2.51916C11.717 3.08905 12.1684 3.75921 12.5011 4.52966C12.8336 5.3001 12.9999 6.12327 12.9999 6.99916C12.9999 7.87516 12.8337 8.69855 12.5013 9.46933C12.1688 10.2401 11.7176 10.9105 11.1478 11.4807C10.5779 12.0508 9.9077 12.5022 9.13725 12.8348C8.36681 13.1674 7.54364 13.3337 6.66775 13.3337Z",fill:"#F63D68"})}),X=()=>e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_6673_82208",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_6673_82208)",children:e.jsx("path",{d:"M8.00147 10.3847C8.75692 10.3847 9.39853 10.1203 9.92631 9.5915C10.4541 9.06272 10.718 8.42061 10.718 7.66517C10.718 6.90972 10.4536 6.26811 9.9248 5.74033C9.39603 5.21256 8.75392 4.94867 7.99847 4.94867C7.24303 4.94867 6.60142 5.21306 6.07364 5.74183C5.54586 6.27061 5.28197 6.91272 5.28197 7.66817C5.28197 8.42361 5.54636 9.06522 6.07514 9.593C6.60392 10.1208 7.24603 10.3847 8.00147 10.3847ZM7.99997 9.46667C7.49997 9.46667 7.07497 9.29167 6.72497 8.94167C6.37497 8.59167 6.19997 8.16667 6.19997 7.66667C6.19997 7.16667 6.37497 6.74167 6.72497 6.39167C7.07497 6.04167 7.49997 5.86667 7.99997 5.86667C8.49997 5.86667 8.92497 6.04167 9.27497 6.39167C9.62497 6.74167 9.79997 7.16667 9.79997 7.66667C9.79997 8.16667 9.62497 8.59167 9.27497 8.94167C8.92497 9.29167 8.49997 9.46667 7.99997 9.46667ZM7.99997 12.3333C6.59653 12.3333 5.31297 11.9589 4.1493 11.2102C2.98564 10.4615 2.0568 9.4765 1.3628 8.25517C1.30725 8.15939 1.26664 8.06289 1.24097 7.96567C1.21541 7.86844 1.20264 7.76867 1.20264 7.66633C1.20264 7.564 1.21541 7.46433 1.24097 7.36733C1.26664 7.27033 1.30725 7.17394 1.3628 7.07817C2.0568 5.85683 2.98564 4.87183 4.1493 4.12317C5.31297 3.37439 6.59653 3 7.99997 3C9.40342 3 10.687 3.37439 11.8506 4.12317C13.0143 4.87183 13.9431 5.85683 14.6371 7.07817C14.6927 7.17394 14.7333 7.27044 14.759 7.36767C14.7845 7.46489 14.7973 7.56467 14.7973 7.667C14.7973 7.76933 14.7845 7.869 14.759 7.966C14.7333 8.063 14.6927 8.15939 14.6371 8.25517C13.9431 9.4765 13.0143 10.4615 11.8506 11.2102C10.687 11.9589 9.40342 12.3333 7.99997 12.3333ZM7.99997 11.3333C9.25553 11.3333 10.4083 11.0028 11.4583 10.3417C12.5083 9.68055 13.3111 8.78889 13.8666 7.66667C13.3111 6.54444 12.5083 5.65278 11.4583 4.99167C10.4083 4.33056 9.25553 4 7.99997 4C6.74442 4 5.59164 4.33056 4.54164 4.99167C3.49164 5.65278 2.68886 6.54444 2.1333 7.66667C2.68886 8.78889 3.49164 9.68055 4.54164 10.3417C5.59164 11.0028 6.74442 11.3333 7.99997 11.3333Z",fill:"#505050"})})]}),J=()=>e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_6673_82183",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_6673_82183)",children:e.jsx("path",{d:"M9.91793 5.74876C10.1888 6.01976 10.3982 6.34903 10.5461 6.73659C10.694 7.12426 10.7499 7.51337 10.7139 7.90392C10.7139 8.03215 10.6678 8.1407 10.5756 8.22959C10.4833 8.31848 10.373 8.36292 10.2448 8.36292C10.1165 8.36292 10.008 8.31848 9.9191 8.22959C9.83021 8.1407 9.78576 8.03215 9.78576 7.90392C9.82854 7.61081 9.80443 7.33303 9.71343 7.07059C9.62243 6.80826 9.48248 6.58264 9.29359 6.39376C9.1047 6.20487 8.87693 6.06148 8.61026 5.96359C8.34359 5.8657 8.06237 5.84026 7.76659 5.88726C7.63837 5.89159 7.52771 5.84864 7.43459 5.75842C7.34137 5.66831 7.29265 5.55914 7.28843 5.43092C7.28409 5.3027 7.32532 5.19198 7.41209 5.09876C7.49887 5.00564 7.60637 4.95698 7.73459 4.95276C8.12259 4.90831 8.51254 4.95892 8.90443 5.10459C9.29632 5.25037 9.63415 5.46509 9.91793 5.74876ZM7.99993 4.00009C7.76315 4.00009 7.53087 4.01165 7.30309 4.03476C7.07532 4.05776 6.84859 4.09576 6.62293 4.14876C6.48104 4.17787 6.35326 4.15759 6.23959 4.08792C6.12593 4.01826 6.04776 3.91803 6.00509 3.78726C5.96232 3.65226 5.97643 3.52387 6.04743 3.40209C6.11832 3.28031 6.22126 3.20487 6.35626 3.17576C6.62471 3.11164 6.89587 3.06637 7.16976 3.03992C7.44376 3.01337 7.72048 3.00009 7.99993 3.00009C9.43237 3.00009 10.7482 3.37231 11.9474 4.11676C13.1465 4.8612 14.0687 5.86848 14.7139 7.13859C14.7584 7.22315 14.7907 7.30837 14.8108 7.39426C14.8309 7.48014 14.8409 7.57098 14.8409 7.66676C14.8409 7.76253 14.8326 7.85337 14.8159 7.93926C14.7993 8.02515 14.7687 8.11037 14.7243 8.19492C14.52 8.62226 14.2718 9.02076 13.9794 9.39042C13.6871 9.76009 13.3653 10.0996 13.0139 10.4091C12.9106 10.5014 12.7925 10.5396 12.6596 10.5238C12.5266 10.508 12.4174 10.4415 12.3319 10.3244C12.2465 10.2073 12.211 10.0817 12.2256 9.94759C12.2402 9.81337 12.2991 9.70009 12.4024 9.60776C12.7033 9.33509 12.9777 9.03703 13.2256 8.71359C13.4735 8.39003 13.6872 8.04109 13.8666 7.66676C13.311 6.54453 12.5083 5.65287 11.4583 4.99176C10.4083 4.33065 9.25548 4.00009 7.99993 4.00009ZM7.99993 12.3334C6.59648 12.3334 5.31015 11.9584 4.14093 11.2084C2.97171 10.4584 2.04226 9.47059 1.35259 8.24492C1.29704 8.16037 1.25643 8.06848 1.23076 7.96926C1.20509 7.87014 1.19226 7.76931 1.19226 7.66676C1.19226 7.5642 1.20337 7.46503 1.22559 7.36926C1.24782 7.27359 1.28671 7.18003 1.34226 7.08859C1.59015 6.63559 1.87093 6.20415 2.18459 5.79426C2.49826 5.38448 2.85893 5.0172 3.26659 4.69242L1.76143 3.17692C1.66921 3.07781 1.62371 2.96009 1.62493 2.82376C1.62626 2.68742 1.67521 2.57098 1.77176 2.47442C1.86832 2.37787 1.98543 2.32959 2.12309 2.32959C2.26065 2.32959 2.37771 2.37787 2.47426 2.47442L13.5256 13.5258C13.6179 13.6181 13.6669 13.7324 13.6724 13.8686C13.678 14.0049 13.629 14.1248 13.5256 14.2283C13.429 14.3248 13.3119 14.3731 13.1743 14.3731C13.0367 14.3731 12.9197 14.3248 12.8231 14.2283L10.4769 11.9026C10.0837 12.0547 9.67959 12.1645 9.2646 12.2321C8.84971 12.2996 8.42815 12.3334 7.99993 12.3334ZM3.96926 5.39492C3.57859 5.6967 3.22748 6.03792 2.91593 6.41859C2.60437 6.79937 2.34348 7.21542 2.13326 7.66676C2.68882 8.78898 3.49159 9.68064 4.54159 10.3418C5.59159 11.0029 6.74437 11.3334 7.99993 11.3334C8.28626 11.3334 8.56809 11.3142 8.84543 11.2758C9.12276 11.2373 9.3982 11.1779 9.67176 11.0976L8.82809 10.2334C8.69309 10.2924 8.55826 10.3324 8.42359 10.3533C8.28904 10.3743 8.14782 10.3848 7.99993 10.3848C7.24348 10.3848 6.60137 10.1209 6.07359 9.59309C5.54582 9.06531 5.28193 8.4232 5.28193 7.66676C5.28193 7.51887 5.29348 7.37765 5.31659 7.24309C5.33971 7.10842 5.37859 6.97359 5.43326 6.83859L3.96926 5.39492Z",fill:"#C5C5C5"})})]}),ee=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",children:e.jsx("path",{d:"M11.3748 18.8346H8.62484C8.47206 18.8346 8.33664 18.786 8.21859 18.6888C8.10053 18.5916 8.02762 18.4666 7.99984 18.3138L7.6665 16.2096C7.40262 16.1124 7.12484 15.9805 6.83317 15.8138C6.5415 15.6471 6.28456 15.4735 6.06234 15.293L4.12484 16.1888C3.97206 16.2582 3.81928 16.2687 3.6665 16.2201C3.51373 16.1714 3.39567 16.0707 3.31234 15.918L1.93734 13.4805C1.854 13.3416 1.83317 13.1957 1.87484 13.043C1.9165 12.8902 1.99984 12.7652 2.12484 12.668L3.9165 11.3555C3.88873 11.2305 3.87137 11.0881 3.86442 10.9284C3.85748 10.7687 3.854 10.6263 3.854 10.5013C3.854 10.3763 3.85748 10.2339 3.86442 10.0742C3.87137 9.9145 3.88873 9.77214 3.9165 9.64714L2.12484 8.33464C1.99984 8.23741 1.9165 8.11241 1.87484 7.95964C1.83317 7.80686 1.854 7.66102 1.93734 7.52214L3.31234 5.08464C3.39567 4.93186 3.51373 4.83116 3.6665 4.78255C3.81928 4.73394 3.97206 4.74436 4.12484 4.8138L6.06234 5.70964C6.28456 5.52908 6.5415 5.35547 6.83317 5.1888C7.12484 5.02214 7.40262 4.89714 7.6665 4.8138L7.99984 2.6888C8.02762 2.53602 8.10053 2.41102 8.21859 2.3138C8.33664 2.21658 8.47206 2.16797 8.62484 2.16797H11.3748C11.5276 2.16797 11.663 2.21658 11.7811 2.3138C11.8991 2.41102 11.9721 2.53602 11.9998 2.6888L12.3332 4.79297C12.5971 4.89019 12.8783 5.01866 13.1769 5.17839C13.4755 5.33811 13.729 5.51519 13.9373 5.70964L15.8748 4.8138C16.0276 4.74436 16.1804 4.73394 16.3332 4.78255C16.4859 4.83116 16.604 4.93186 16.6873 5.08464L18.0623 7.5013C18.1457 7.64019 18.17 7.7895 18.1353 7.94922C18.1005 8.10894 18.0137 8.23741 17.8748 8.33464L16.0832 9.60547C16.1109 9.74436 16.1283 9.89366 16.1353 10.0534C16.1422 10.2131 16.1457 10.3624 16.1457 10.5013C16.1457 10.6402 16.1422 10.786 16.1353 10.9388C16.1283 11.0916 16.1109 11.2374 16.0832 11.3763L17.8748 12.668C17.9998 12.7652 18.0832 12.8902 18.1248 13.043C18.1665 13.1957 18.1457 13.3416 18.0623 13.4805L16.6873 15.918C16.604 16.0707 16.4859 16.1714 16.3332 16.2201C16.1804 16.2687 16.0276 16.2582 15.8748 16.1888L13.9373 15.293C13.7151 15.4735 13.4616 15.6506 13.1769 15.8242C12.8922 15.9978 12.6109 16.1263 12.3332 16.2096L11.9998 18.3138C11.9721 18.4666 11.8991 18.5916 11.7811 18.6888C11.663 18.786 11.5276 18.8346 11.3748 18.8346ZM9.99984 13.2096C10.7498 13.2096 11.3887 12.9457 11.9165 12.418C12.4443 11.8902 12.7082 11.2513 12.7082 10.5013C12.7082 9.7513 12.4443 9.11241 11.9165 8.58464C11.3887 8.05686 10.7498 7.79297 9.99984 7.79297C9.24984 7.79297 8.61095 8.05686 8.08317 8.58464C7.55539 9.11241 7.2915 9.7513 7.2915 10.5013C7.2915 11.2513 7.55539 11.8902 8.08317 12.418C8.61095 12.9457 9.24984 13.2096 9.99984 13.2096ZM9.99984 11.9596C9.59706 11.9596 9.25331 11.8173 8.96859 11.5326C8.68387 11.2478 8.5415 10.9041 8.5415 10.5013C8.5415 10.0985 8.68387 9.75477 8.96859 9.47005C9.25331 9.18533 9.59706 9.04297 9.99984 9.04297C10.4026 9.04297 10.7464 9.18533 11.0311 9.47005C11.3158 9.75477 11.4582 10.0985 11.4582 10.5013C11.4582 10.9041 11.3158 11.2478 11.0311 11.5326C10.7464 11.8173 10.4026 11.9596 9.99984 11.9596ZM9.08317 17.5846H10.9165L11.2082 15.2513C11.6665 15.1402 12.1005 14.9666 12.5103 14.7305C12.92 14.4944 13.2915 14.2096 13.6248 13.8763L15.8332 14.8346L16.6665 13.3346L14.7082 11.8971C14.7637 11.661 14.8089 11.4284 14.8436 11.1992C14.8783 10.9701 14.8957 10.7374 14.8957 10.5013C14.8957 10.2652 14.8818 10.0326 14.854 9.80339C14.8262 9.57422 14.7776 9.34158 14.7082 9.10547L16.6665 7.66797L15.8332 6.16797L13.6248 7.1263C13.3054 6.76519 12.9443 6.46311 12.5415 6.22005C12.1387 5.977 11.6943 5.82075 11.2082 5.7513L10.9165 3.41797H9.08317L8.7915 5.7513C8.31928 5.84852 7.87831 6.01519 7.46859 6.2513C7.05887 6.48741 6.69428 6.77908 6.37484 7.1263L4.1665 6.16797L3.33317 7.66797L5.2915 9.10547C5.23595 9.34158 5.19081 9.57422 5.15609 9.80339C5.12137 10.0326 5.104 10.2652 5.104 10.5013C5.104 10.7374 5.12137 10.9701 5.15609 11.1992C5.19081 11.4284 5.23595 11.661 5.2915 11.8971L3.33317 13.3346L4.1665 14.8346L6.37484 13.8763C6.70817 14.2096 7.0797 14.4944 7.48942 14.7305C7.89914 14.9666 8.33317 15.1402 8.7915 15.2513L9.08317 17.5846Z",fill:"#0E0C0B","fill-opacity":"0.7"})}),te={Board:e.jsx(()=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.37179 9H4.05763V1H1.37179C1.3119 1 1.26274 1.01922 1.22429 1.05767C1.18585 1.09611 1.16663 1.14528 1.16663 1.20517V8.79483C1.16663 8.85472 1.18585 8.90389 1.22429 8.94233C1.26274 8.98078 1.3119 9 1.37179 9ZM5.05763 9H7.94229V1H5.05763V9ZM8.94229 9H11.6281C11.688 9 11.7372 8.98078 11.7756 8.94233C11.8141 8.90389 11.8333 8.85472 11.8333 8.79483V1.20517C11.8333 1.14528 11.8141 1.09611 11.7756 1.05767C11.7372 1.01922 11.688 1 11.6281 1H8.94229V9ZM1.37179 10C1.03501 10 0.749959 9.88333 0.516626 9.65C0.283293 9.41667 0.166626 9.13161 0.166626 8.79483V1.20517C0.166626 0.868389 0.283293 0.583333 0.516626 0.35C0.749959 0.116667 1.03501 0 1.37179 0H11.6281C11.9649 0 12.25 0.116667 12.4833 0.35C12.7166 0.583333 12.8333 0.868389 12.8333 1.20517V8.79483C12.8333 9.13161 12.7166 9.41667 12.4833 9.65C12.25 9.88333 11.9649 10 11.6281 10H1.37179Z",fill:"#A6A6A6"})}),{}),Table:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3.17954 9.16671H5.82054C5.96243 9.16671 6.08121 9.11882 6.17687 9.02304C6.27265 8.92737 6.32054 8.8086 6.32054 8.66671C6.32054 8.52482 6.27265 8.40604 6.17687 8.31037C6.08121 8.2146 5.96243 8.16671 5.82054 8.16671H3.17954C3.03765 8.16671 2.91887 8.2146 2.82321 8.31037C2.72743 8.40604 2.67954 8.52482 2.67954 8.66671C2.67954 8.8086 2.72743 8.92737 2.82321 9.02304C2.91887 9.11882 3.03765 9.16671 3.17954 9.16671ZM5.17954 6.50004H7.82054C7.96243 6.50004 8.08121 6.45215 8.17687 6.35637C8.27265 6.26071 8.32054 6.14193 8.32054 6.00004C8.32054 5.85815 8.27265 5.73937 8.17687 5.64371C8.08121 5.54793 7.96243 5.50004 7.82054 5.50004H5.17954C5.03765 5.50004 4.91887 5.54793 4.82321 5.64371C4.72743 5.73937 4.67954 5.85815 4.67954 6.00004C4.67954 6.14193 4.72743 6.26071 4.82321 6.35637C4.91887 6.45215 5.03765 6.50004 5.17954 6.50004ZM7.17954 3.83337H9.82054C9.96243 3.83337 10.0812 3.78549 10.1769 3.68971C10.2727 3.59404 10.3205 3.47526 10.3205 3.33337C10.3205 3.19148 10.2727 3.07271 10.1769 2.97704C10.0812 2.88126 9.96243 2.83337 9.82054 2.83337H7.17954C7.03765 2.83337 6.91887 2.88126 6.82321 2.97704C6.72743 3.07271 6.67954 3.19148 6.67954 3.33337C6.67954 3.47526 6.72743 3.59404 6.82321 3.68971C6.91887 3.78549 7.03765 3.83337 7.17954 3.83337ZM2.03854 11.6667C1.70176 11.6667 1.41671 11.55 1.18337 11.3167C0.950041 11.0834 0.833374 10.7983 0.833374 10.4615V1.53854C0.833374 1.20176 0.950041 0.916707 1.18337 0.683374C1.41671 0.450041 1.70176 0.333374 2.03854 0.333374H10.9615C11.2983 0.333374 11.5834 0.450041 11.8167 0.683374C12.05 0.916707 12.1667 1.20176 12.1667 1.53854V10.4615C12.1667 10.7983 12.05 11.0834 11.8167 11.3167C11.5834 11.55 11.2983 11.6667 10.9615 11.6667H2.03854ZM2.03854 10.6667H10.9615C11.0129 10.6667 11.0599 10.6453 11.1025 10.6025C11.1453 10.5599 11.1667 10.5129 11.1667 10.4615V1.53854C11.1667 1.48721 11.1453 1.44021 11.1025 1.39754C11.0599 1.35476 11.0129 1.33337 10.9615 1.33337H2.03854C1.98721 1.33337 1.94021 1.35476 1.89754 1.39754C1.85476 1.44021 1.83337 1.48721 1.83337 1.53854V10.4615C1.83337 10.5129 1.85476 10.5599 1.89754 10.6025C1.94021 10.6453 1.98721 10.6667 2.03854 10.6667Z",fill:"#A6A6A6"})}),{}),Timeline:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3.17954 9.16671H5.82054C5.96243 9.16671 6.08121 9.11882 6.17687 9.02304C6.27265 8.92737 6.32054 8.8086 6.32054 8.66671C6.32054 8.52482 6.27265 8.40604 6.17687 8.31037C6.08121 8.2146 5.96243 8.16671 5.82054 8.16671H3.17954C3.03765 8.16671 2.91887 8.2146 2.82321 8.31037C2.72743 8.40604 2.67954 8.52482 2.67954 8.66671C2.67954 8.8086 2.72743 8.92737 2.82321 9.02304C2.91887 9.11882 3.03765 9.16671 3.17954 9.16671ZM5.17954 6.50004H7.82054C7.96243 6.50004 8.08121 6.45215 8.17687 6.35637C8.27265 6.26071 8.32054 6.14193 8.32054 6.00004C8.32054 5.85815 8.27265 5.73937 8.17687 5.64371C8.08121 5.54793 7.96243 5.50004 7.82054 5.50004H5.17954C5.03765 5.50004 4.91887 5.54793 4.82321 5.64371C4.72743 5.73937 4.67954 5.85815 4.67954 6.00004C4.67954 6.14193 4.72743 6.26071 4.82321 6.35637C4.91887 6.45215 5.03765 6.50004 5.17954 6.50004ZM7.17954 3.83337H9.82054C9.96243 3.83337 10.0812 3.78549 10.1769 3.68971C10.2727 3.59404 10.3205 3.47526 10.3205 3.33337C10.3205 3.19148 10.2727 3.07271 10.1769 2.97704C10.0812 2.88126 9.96243 2.83337 9.82054 2.83337H7.17954C7.03765 2.83337 6.91887 2.88126 6.82321 2.97704C6.72743 3.07271 6.67954 3.19148 6.67954 3.33337C6.67954 3.47526 6.72743 3.59404 6.82321 3.68971C6.91887 3.78549 7.03765 3.83337 7.17954 3.83337ZM2.03854 11.6667C1.70176 11.6667 1.41671 11.55 1.18337 11.3167C0.950041 11.0834 0.833374 10.7983 0.833374 10.4615V1.53854C0.833374 1.20176 0.950041 0.916707 1.18337 0.683374C1.41671 0.450041 1.70176 0.333374 2.03854 0.333374H10.9615C11.2983 0.333374 11.5834 0.450041 11.8167 0.683374C12.05 0.916707 12.1667 1.20176 12.1667 1.53854V10.4615C12.1667 10.7983 12.05 11.0834 11.8167 11.3167C11.5834 11.55 11.2983 11.6667 10.9615 11.6667H2.03854ZM2.03854 10.6667H10.9615C11.0129 10.6667 11.0599 10.6453 11.1025 10.6025C11.1453 10.5599 11.1667 10.5129 11.1667 10.4615V1.53854C11.1667 1.48721 11.1453 1.44021 11.1025 1.39754C11.0599 1.35476 11.0129 1.33337 10.9615 1.33337H2.03854C1.98721 1.33337 1.94021 1.35476 1.89754 1.39754C1.85476 1.44021 1.83337 1.48721 1.83337 1.53854V10.4615C1.83337 10.5129 1.85476 10.5599 1.89754 10.6025C1.94021 10.6453 1.98721 10.6667 2.03854 10.6667Z",fill:"#A6A6A6"})}),{}),List:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5.20521 10.5C5.06354 10.5 4.94476 10.452 4.84887 10.3562C4.7531 10.2603 4.70521 10.1415 4.70521 9.99982C4.70521 9.85805 4.7531 9.73932 4.84887 9.64366C4.94476 9.54788 5.06354 9.49999 5.20521 9.49999H11.6667C11.8084 9.49999 11.9271 9.54794 12.0229 9.64382C12.1188 9.73971 12.1667 9.85849 12.1667 10.0002C12.1667 10.1419 12.1188 10.2607 12.0229 10.3563C11.9271 10.4521 11.8084 10.5 11.6667 10.5H5.20521ZM5.20521 6.49999C5.06354 6.49999 4.94476 6.45205 4.84887 6.35616C4.7531 6.26027 4.70521 6.14149 4.70521 5.99982C4.70521 5.85805 4.7531 5.73932 4.84887 5.64366C4.94476 5.54788 5.06354 5.49999 5.20521 5.49999H11.6667C11.8084 5.49999 11.9271 5.54794 12.0229 5.64382C12.1188 5.73971 12.1667 5.85849 12.1667 6.00016C12.1667 6.14194 12.1188 6.26066 12.0229 6.35632C11.9271 6.4521 11.8084 6.49999 11.6667 6.49999H5.20521ZM5.20521 2.49999C5.06354 2.49999 4.94476 2.45205 4.84887 2.35616C4.7531 2.26027 4.70521 2.14149 4.70521 1.99982C4.70521 1.85805 4.7531 1.73932 4.84887 1.64366C4.94476 1.54788 5.06354 1.49999 5.20521 1.49999H11.6667C11.8084 1.49999 11.9271 1.54794 12.0229 1.64382C12.1188 1.73971 12.1667 1.85849 12.1667 2.00016C12.1667 2.14194 12.1188 2.26066 12.0229 2.35632C11.9271 2.4521 11.8084 2.49999 11.6667 2.49999H5.20521ZM1.94237 11.109C1.63737 11.109 1.37632 11.0004 1.15921 10.7832C0.941985 10.566 0.833374 10.305 0.833374 9.99999C0.833374 9.69499 0.941985 9.43394 1.15921 9.21682C1.37632 8.9996 1.63737 8.89099 1.94237 8.89099C2.24737 8.89099 2.50843 8.9996 2.72554 9.21682C2.94276 9.43394 3.05137 9.69499 3.05137 9.99999C3.05137 10.305 2.94276 10.566 2.72554 10.7832C2.50843 11.0004 2.24737 11.109 1.94237 11.109ZM1.94237 7.10899C1.63737 7.10899 1.37632 7.00038 1.15921 6.78316C0.941985 6.56605 0.833374 6.30499 0.833374 5.99999C0.833374 5.69499 0.941985 5.43394 1.15921 5.21682C1.37632 4.9996 1.63737 4.89099 1.94237 4.89099C2.24737 4.89099 2.50843 4.9996 2.72554 5.21682C2.94276 5.43394 3.05137 5.69499 3.05137 5.99999C3.05137 6.30499 2.94276 6.56605 2.72554 6.78316C2.50843 7.00038 2.24737 7.10899 1.94237 7.10899ZM1.94237 3.10899C1.63737 3.10899 1.37632 3.00038 1.15921 2.78316C0.941985 2.56605 0.833374 2.30499 0.833374 1.99999C0.833374 1.69499 0.941985 1.43394 1.15921 1.21682C1.37632 0.999602 1.63737 0.890991 1.94237 0.890991C2.24737 0.890991 2.50843 0.999602 2.72554 1.21682C2.94276 1.43394 3.05137 1.69499 3.05137 1.99999C3.05137 2.30499 2.94276 2.56605 2.72554 2.78316C2.50843 3.00038 2.24737 3.10899 1.94237 3.10899Z",fill:"#A6A6A6"})}),{}),Calendar:e.jsx(()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.03854 13.3333C1.70176 13.3333 1.41671 13.2167 1.18337 12.9833C0.950041 12.75 0.833374 12.465 0.833374 12.1282V3.20518C0.833374 2.8684 0.950041 2.58334 1.18337 2.35001C1.41671 2.11668 1.70176 2.00001 2.03854 2.00001H2.96154V1.10251C2.96154 0.956399 3.01049 0.834399 3.10837 0.73651C3.20626 0.638732 3.32826 0.589844 3.47437 0.589844C3.6206 0.589844 3.7426 0.638732 3.84037 0.73651C3.93826 0.834399 3.98721 0.956399 3.98721 1.10251V2.00001H9.03854V1.08984C9.03854 0.947955 9.08637 0.829121 9.18204 0.733344C9.27782 0.637677 9.39665 0.589844 9.53854 0.589844C9.68043 0.589844 9.79921 0.637677 9.89487 0.733344C9.99065 0.829121 10.0385 0.947955 10.0385 1.08984V2.00001H10.9615C11.2983 2.00001 11.5834 2.11668 11.8167 2.35001C12.05 2.58334 12.1667 2.8684 12.1667 3.20518V12.1282C12.1667 12.465 12.05 12.75 11.8167 12.9833C11.5834 13.2167 11.2983 13.3333 10.9615 13.3333H2.03854ZM2.03854 12.3333H10.9615C11.0129 12.3333 11.0599 12.312 11.1025 12.2692C11.1453 12.2265 11.1667 12.1795 11.1667 12.1282V5.87184H1.83337V12.1282C1.83337 12.1795 1.85476 12.2265 1.89754 12.2692C1.94021 12.312 1.98721 12.3333 2.03854 12.3333ZM1.83337 4.87184H11.1667V3.20518C11.1667 3.15384 11.1453 3.10684 11.1025 3.06418C11.0599 3.0214 11.0129 3.00001 10.9615 3.00001H2.03854C1.98721 3.00001 1.94021 3.0214 1.89754 3.06418C1.85476 3.10684 1.83337 3.15384 1.83337 3.20518V4.87184ZM6.50004 8.38468C6.33682 8.38468 6.19771 8.32718 6.08271 8.21218C5.96782 8.09729 5.91037 7.95818 5.91037 7.79484C5.91037 7.63162 5.96782 7.49251 6.08271 7.37751C6.19771 7.26262 6.33682 7.20518 6.50004 7.20518C6.66326 7.20518 6.80237 7.26262 6.91737 7.37751C7.03226 7.49251 7.08971 7.63162 7.08971 7.79484C7.08971 7.95818 7.03226 8.09729 6.91737 8.21218C6.80237 8.32718 6.66326 8.38468 6.50004 8.38468ZM3.83337 8.38468C3.67015 8.38468 3.53104 8.32718 3.41604 8.21218C3.30115 8.09729 3.24371 7.95818 3.24371 7.79484C3.24371 7.63162 3.30115 7.49251 3.41604 7.37751C3.53104 7.26262 3.67015 7.20518 3.83337 7.20518C3.9966 7.20518 4.13571 7.26262 4.25071 7.37751C4.3656 7.49251 4.42304 7.63162 4.42304 7.79484C4.42304 7.95818 4.3656 8.09729 4.25071 8.21218C4.13571 8.32718 3.9966 8.38468 3.83337 8.38468ZM9.16671 8.38468C9.00348 8.38468 8.86437 8.32718 8.74937 8.21218C8.63449 8.09729 8.57704 7.95818 8.57704 7.79484C8.57704 7.63162 8.63449 7.49251 8.74937 7.37751C8.86437 7.26262 9.00348 7.20518 9.16671 7.20518C9.32993 7.20518 9.46904 7.26262 9.58404 7.37751C9.69893 7.49251 9.75637 7.63162 9.75637 7.79484C9.75637 7.95818 9.69893 8.09729 9.58404 8.21218C9.46904 8.32718 9.32993 8.38468 9.16671 8.38468ZM6.50004 11C6.33682 11 6.19771 10.9425 6.08271 10.8275C5.96782 10.7126 5.91037 10.5736 5.91037 10.4103C5.91037 10.247 5.96782 10.1079 6.08271 9.99301C6.19771 9.87801 6.33682 9.82051 6.50004 9.82051C6.66326 9.82051 6.80237 9.87801 6.91737 9.99301C7.03226 10.1079 7.08971 10.247 7.08971 10.4103C7.08971 10.5736 7.03226 10.7126 6.91737 10.8275C6.80237 10.9425 6.66326 11 6.50004 11ZM3.83337 11C3.67015 11 3.53104 10.9425 3.41604 10.8275C3.30115 10.7126 3.24371 10.5736 3.24371 10.4103C3.24371 10.247 3.30115 10.1079 3.41604 9.99301C3.53104 9.87801 3.67015 9.82051 3.83337 9.82051C3.9966 9.82051 4.13571 9.87801 4.25071 9.99301C4.3656 10.1079 4.42304 10.247 4.42304 10.4103C4.42304 10.5736 4.3656 10.7126 4.25071 10.8275C4.13571 10.9425 3.9966 11 3.83337 11ZM9.16671 11C9.00348 11 8.86437 10.9425 8.74937 10.8275C8.63449 10.7126 8.57704 10.5736 8.57704 10.4103C8.57704 10.247 8.63449 10.1079 8.74937 9.99301C8.86437 9.87801 9.00348 9.82051 9.16671 9.82051C9.32993 9.82051 9.46904 9.87801 9.58404 9.99301C9.69893 10.1079 9.75637 10.247 9.75637 10.4103C9.75637 10.5736 9.69893 10.7126 9.58404 10.8275C9.46904 10.9425 9.32993 11 9.16671 11Z",fill:"#A6A6A6"})}),{}),Gallery:e.jsx(()=>e.jsx("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.87179 9.33329C1.54035 9.33329 1.25663 9.21529 1.02063 8.97929C0.784626 8.74329 0.666626 8.45957 0.666626 8.12813V1.87179C0.666626 1.54035 0.784626 1.25663 1.02063 1.02063C1.25663 0.784626 1.54035 0.666626 1.87179 0.666626H8.12813C8.45957 0.666626 8.74329 0.784626 8.97929 1.02063C9.21529 1.25663 9.33329 1.54035 9.33329 1.87179V8.12813C9.33329 8.45957 9.21529 8.74329 8.97929 8.97929C8.74329 9.21529 8.45957 9.33329 8.12813 9.33329H1.87179ZM11.2723 4.33329C11.0984 4.33329 10.954 4.27579 10.8391 4.16079C10.7241 4.0459 10.6666 3.90151 10.6666 3.72763V1.27246C10.6666 1.09846 10.7241 0.954014 10.8391 0.839126C10.954 0.724126 11.0984 0.666626 11.2723 0.666626H13.7275C13.9015 0.666626 14.0459 0.724126 14.1608 0.839126C14.2758 0.954014 14.3333 1.09846 14.3333 1.27246V3.72763C14.3333 3.90151 14.2758 4.0459 14.1608 4.16079C14.0459 4.27579 13.9015 4.33329 13.7275 4.33329H11.2723ZM11.6666 3.33329H13.3333V1.66663H11.6666V3.33329ZM1.87179 8.33329H8.12813C8.18802 8.33329 8.23718 8.31407 8.27563 8.27563C8.31407 8.23718 8.33329 8.18802 8.33329 8.12813V1.87179C8.33329 1.8119 8.31407 1.76274 8.27563 1.72429C8.23718 1.68585 8.18802 1.66663 8.12813 1.66663H1.87179C1.8119 1.66663 1.76274 1.68585 1.72429 1.72429C1.68585 1.76274 1.66663 1.8119 1.66663 1.87179V8.12813C1.66663 8.18802 1.68585 8.23718 1.72429 8.27563C1.76274 8.31407 1.8119 8.33329 1.87179 8.33329ZM2.99996 6.96796H6.99996C7.11829 6.96796 7.20707 6.91324 7.26629 6.80379C7.32552 6.69435 7.31707 6.58835 7.24096 6.48579L6.15763 5.03579C6.09529 4.95546 6.01496 4.91529 5.91663 4.91529C5.81829 4.91529 5.73796 4.95546 5.67563 5.03579L4.66663 6.38463L3.99096 5.48579C3.92863 5.40546 3.84829 5.36529 3.74996 5.36529C3.65163 5.36529 3.57129 5.40546 3.50896 5.48579L2.75896 6.48579C2.68285 6.58835 2.6744 6.69435 2.73363 6.80379C2.79285 6.91324 2.88163 6.96796 2.99996 6.96796ZM11.2723 9.33329C11.0984 9.33329 10.954 9.27579 10.8391 9.16079C10.7241 9.0459 10.6666 8.90146 10.6666 8.72746V6.27229C10.6666 6.0984 10.7241 5.95402 10.8391 5.83913C10.954 5.72413 11.0984 5.66663 11.2723 5.66663H13.7275C13.9015 5.66663 14.0459 5.72413 14.1608 5.83913C14.2758 5.95402 14.3333 6.0984 14.3333 6.27229V8.72746C14.3333 8.90146 14.2758 9.0459 14.1608 9.16079C14.0459 9.27579 13.9015 9.33329 13.7275 9.33329H11.2723ZM11.6666 8.33329H13.3333V6.66663H11.6666V8.33329Z",fill:"#A6A6A6"})}),{}),Charts:e.jsx(()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.14485 1.42317C7.14485 1.22028 7.22413 1.058 7.38268 0.936332C7.54124 0.814666 7.71879 0.777333 7.91535 0.824333C9.12135 1.07389 10.16 1.64056 11.0314 2.52433C11.9028 3.40811 12.4633 4.46328 12.7128 5.68983C12.753 5.86583 12.7148 6.02133 12.5985 6.15633C12.4822 6.29144 12.3228 6.359 12.1205 6.359H8.42435C8.38424 6.359 8.34907 6.34894 8.31885 6.32883C8.28874 6.30872 8.26363 6.27861 8.24352 6.2385C8.14352 6.01794 8.00863 5.82105 7.83885 5.64783C7.66896 5.47461 7.47779 5.34072 7.26535 5.24617C7.22524 5.22628 7.19513 5.20389 7.17502 5.179C7.1549 5.15411 7.14485 5.12178 7.14485 5.082V1.42317ZM8.14485 1.95133V4.60267C8.29274 4.70689 8.43079 4.82206 8.55902 4.94817C8.68724 5.07417 8.80135 5.21111 8.90135 5.359H11.5653C11.3158 4.54278 10.8874 3.831 10.2802 3.22367C9.67285 2.61644 8.96107 2.19233 8.14485 1.95133ZM5.10518 13.1692C3.6804 12.8462 2.5039 12.113 1.57568 10.9697C0.647461 9.82644 0.18335 8.50322 0.18335 7C0.18335 5.49367 0.647461 4.17028 1.57568 3.02983C2.5039 1.8895 3.6804 1.1565 5.10518 0.830832C5.30607 0.783832 5.48685 0.8265 5.64752 0.958833C5.80818 1.09117 5.88852 1.25917 5.88852 1.46283V5.108C5.88852 5.11867 5.85729 5.16128 5.79485 5.23583C5.43852 5.38294 5.15352 5.61672 4.93985 5.93717C4.72607 6.25772 4.61918 6.61244 4.61918 7.00133C4.61918 7.39022 4.72607 7.74 4.93985 8.05067C5.15352 8.36133 5.43852 8.58805 5.79485 8.73083C5.81285 8.73761 5.84407 8.77989 5.88852 8.85767V12.5577C5.88852 12.7643 5.80818 12.9297 5.64752 13.0537C5.48685 13.1777 5.30607 13.2162 5.10518 13.1692ZM4.88852 1.95133C3.78341 2.28033 2.88957 2.91194 2.20702 3.84617C1.52457 4.78039 1.18335 5.83167 1.18335 7C1.18335 8.16833 1.52457 9.21961 2.20702 10.1538C2.88957 11.0881 3.78341 11.7265 4.88852 12.0692V9.37183C4.50052 9.08805 4.19196 8.74122 3.96285 8.33133C3.73385 7.92156 3.61935 7.47672 3.61935 6.99683C3.61935 6.51694 3.73279 6.071 3.95968 5.659C4.18657 5.247 4.49618 4.89911 4.88852 4.61533V1.95133ZM7.89618 13.1757C7.69963 13.2183 7.52524 13.1806 7.37302 13.0625C7.2209 12.9443 7.14485 12.7867 7.14485 12.5897V8.90133C7.14485 8.86111 7.1549 8.82594 7.17502 8.79583C7.19513 8.76572 7.22524 8.74061 7.26535 8.7205C7.48335 8.62472 7.67707 8.49194 7.84652 8.32217C8.01596 8.15228 8.14829 7.96111 8.24352 7.74867C8.2504 7.735 8.30713 7.69483 8.41368 7.62817H12.1205C12.3022 7.62817 12.4536 7.70405 12.5747 7.85583C12.6958 8.0075 12.7363 8.17822 12.6962 8.368C12.4355 9.59444 11.8667 10.6417 10.9897 11.5097C10.1128 12.3776 9.08163 12.9329 7.89618 13.1757ZM8.90135 8.62817C8.79957 8.77172 8.68502 8.90656 8.55768 9.03267C8.43035 9.15878 8.29274 9.27183 8.14485 9.37183V12.0487C8.9654 11.8034 9.67824 11.3772 10.2833 10.7698C10.8885 10.1626 11.3158 9.44872 11.5653 8.62817H8.90135Z",fill:"#A6A6A6"})}),{})},ne=({onSelect:t,selectedLayout:n})=>e.jsxs(i.Box,{sx:{width:"100%",maxWidth:"500px",height:"330px"},children:[e.jsxs(i.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,py:2,backgroundColor:"#FBFBFC"},children:[e.jsx(i.Typography,{variant:"h5",sx:{fontWeight:400,fontSize:18,color:"#0C2033"},children:"Layouts"}),e.jsx(i.IconButton,{onClick:()=>t("close"),children:e.jsx(q,{})})]}),e.jsx(i.Grid,{container:!0,spacing:2,sx:{p:3},children:Object.keys(te).map(s=>{const a=s===n;return e.jsx(i.Grid,{size:3,children:e.jsxs(i.ButtonBase,{onClick:()=>t(s),sx:{border:a?"1.5px solid #1E1E1E":"1.5px solid #E5E7EB",borderRadius:2,p:2,width:"100%",height:"100%",flexDirection:"column",backgroundColor:a?"#fff":"",transition:"0.3s",boxShadow:a?"0px 2px 6px rgba(0,0,0,0.06)":"none"},children:[e.jsx(i.Box,{mb:1,children:te[s]}),e.jsx(i.Typography,{variant:"subtitle1",sx:{color:"#1E1E1E",fontWeight:a?400:200,opacity:a?1:.5},children:s})]})},s)})})]}),ie=({ref:e,handler:t})=>{n.useEffect(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])};function se(){const[e,t]=n.useState(!!document.fullscreenElement),[i,s]=n.useState(document.fullscreenElement??void 0);return n.useEffect(()=>{const e=()=>{const e=document.fullscreenElement??void 0;t(!!e),s(e)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:e,container:i}}M(".ts__table__container .ts-topbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #fff;\n}\n.ts__table__container .ts-topbar .tabs-section {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n}\n.ts__table__container .ts-topbar .right-section {\n display: flex;\n justify-content: center;\n flex-shrink: 0;\n}\n.ts__table__container .ts-topbar .right-section .search-wrapper {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n position: relative;\n margin-right: 0.1rem;\n}\n.ts__table__container .ts-topbar .right-section .search-wrapper .search-icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 1.2rem;\n}\n.ts__table__container .ts-topbar .right-section .ts--button {\n margin-right: 0.6rem;\n margin-top: 1rem;\n cursor: pointer;\n}\n.ts__table__container .ts-topbar .right-section .change-layout {\n margin-top: 0.99rem;\n cursor: pointer;\n}\n.ts__table__container .ts-topbar .right-section .sort {\n margin-top: 1rem;\n}\n.ts__table__container .ts-topbar .right-section .fullscreen-toggle {\n margin-right: 0.5rem;\n margin-top: 0.9rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column {\n margin-top: 0.9rem;\n position: relative;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .toggle-all {\n cursor: pointer;\n width: inherit;\n background-color: #fff;\n padding: 0.25rem 1rem;\n border-radius: 0.25rem;\n border: 1px solid #dbdbdb;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .toggle-all:hover {\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches {\n margin-top: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches .ts-column-visible {\n display: flex;\n gap: 0.5rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches .ts-column-visible .ts-column-visible-label {\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.MuiDrawer-root {\n display: block !important;\n transform: none !important;\n}");const ae=({compactMode:t,onCompactToggle:n,isFullscreen:s,onFullscreenToggle:a,tableStates:o,onClose:r})=>{const{container:l}=se(),{wrapColumns:c,setWrapColumns:d}=o;return e.jsxs(i.Box,{sx:{p:3,width:380},children:[e.jsxs(i.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,children:[e.jsx(i.Typography,{fontSize:"18px",fontWeight:400,color:"#0C2033",children:"View"}),e.jsx(i.IconButton,{size:"small",onClick:r,children:e.jsx(q,{})})]}),e.jsxs(i.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[e.jsx(i.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"Wrap Cell"}),e.jsx(i.Switch,{checked:c?.all_wrap||!1,onChange:()=>{d(e=>({all_wrap:!e.all_wrap}))}})]}),e.jsxs(i.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[e.jsx(i.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"List View"}),e.jsxs(i.Select,{size:"small",value:t?"Compact":"Comfy",onChange:e=>n(e.target.value),sx:{minWidth:120,fontWeight:400,color:"#000",fontSize:"13px"},MenuProps:{container:l,disablePortal:!1,PaperProps:{style:{zIndex:1500}}},children:[e.jsx(i.MenuItem,{value:"Comfy",children:"Comfy"}),e.jsx(i.MenuItem,{value:"Compact",children:"Compact"})]})]}),e.jsxs(i.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(i.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"Fullscreen"}),e.jsx(i.Switch,{checked:s,onChange:a})]})]})},oe=({id:t,children:n})=>{const{attributes:i,listeners:s,setNodeRef:r,transform:l,transition:c}=a.useSortable({id:t});return e.jsxs("div",{ref:r,style:{transform:o.CSS.Transform.toString(l),transition:c,display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{...i,...s,style:{cursor:"grab"},children:e.jsx(E,{})}),e.jsx("div",{style:{flexGrow:1},children:n})]})},re=({anchorEl:t,onClose:o,columns:r,onChange:l})=>{const[c,d]=n.useState([]),u=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),h=(e,t,n)=>{const i=c.map(i=>i.id===e?{...i,[t]:n}:i);d(i),x(i)},x=e=>{const t=e.map(e=>({id:e.field,desc:"desc"===e.direction}));l(t)};return e.jsx(i.Popover,{open:Boolean(t),anchorEl:t,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsxs(i.Box,{p:2,minWidth:300,children:[e.jsxs(i.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",px:2,py:1,sx:{backgroundColor:"#F9FAFB",margin:"-16px -16px 16px -16px"},children:[e.jsx(i.Typography,{fontSize:"18px",fontWeight:600,color:"#0C2033",children:"Sort By"}),e.jsx(i.IconButton,{size:"small",onClick:o,children:e.jsx(q,{})})]}),c.length>0&&e.jsx(s.DndContext,{sensors:u,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(t.id!==n.id){const e=c.findIndex(e=>e.id===t.id),i=c.findIndex(e=>e.id===n.id),s=a.arrayMove(c,e,i);d(s),x(s)}},children:e.jsx(a.SortableContext,{items:c.map(e=>e.id),strategy:a.verticalListSortingStrategy,children:c.map(t=>e.jsx(oe,{id:t.id,children:e.jsxs(i.Box,{display:"flex",gap:1,alignItems:"center",mb:1,children:[e.jsx(i.Select,{value:t.field,onChange:e=>h(t.id,"field",e.target.value),size:"small",fullWidth:!0,sx:{fontWeight:400,fontSize:14,color:"#000"},children:r.map(t=>e.jsx(i.MenuItem,{value:t.id,children:t.label},t.id))}),e.jsxs(i.Select,{value:t.direction,onChange:e=>h(t.id,"direction",e.target.value),size:"small",sx:{fontWeight:400,fontSize:14,color:"#000"},children:[e.jsx(i.MenuItem,{value:"asc",children:"Ascending"}),e.jsx(i.MenuItem,{value:"desc",children:"Descending"})]}),e.jsx(i.IconButton,{size:"small",onClick:()=>(e=>{const t=c.filter(t=>t.id!==e);d(t),x(t)})(t.id),children:e.jsx(q,{})})]})},t.id))})}),e.jsx(i.Button,{onClick:()=>{const e={id:Date.now().toString(),field:r[0]?.id??"",direction:"asc"},t=[...c,e];d(t),x(t)},startIcon:e.jsx("span",{children:e.jsx(U,{})}),size:"small",sx:{fontWeight:400,fontSize:12,color:"#888888"},children:"Add Sort"})]})})},le=({column:t,onToggle:n})=>{const{attributes:s,listeners:r,setNodeRef:l,transform:c,transition:d}=a.useSortable({id:t.id}),u={transform:o.CSS.Transform.toString(c),transition:d},h=t.getIsVisible(),x="string"==typeof t.columnDef.header?t.columnDef.header:t.id;return e.jsxs("div",{ref:l,style:u,...s,className:"column-row",children:[e.jsx(i.Box,{...r,className:"drag-icon",children:e.jsx(G,{})}),e.jsx(i.Typography,{children:(p=x,p?p.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase()).trim():"")}),e.jsx(i.Box,{onClick:n,className:"visibility-icon",children:h?e.jsx(Y,{}):e.jsx($,{})})]});var p};M(".column-manager {\n width: 320px;\n padding: 0;\n background-color: var(--white);\n}\n.column-manager .header {\n width: 100%;\n padding: 10px 16px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: 400;\n font-size: 18px;\n background-color: #fbfbfc;\n color: #0c2033;\n box-sizing: border-box;\n}\n.column-manager .content-wrapper {\n padding: 10px;\n}\n.column-manager .list-section {\n margin-top: 10px;\n}\n.column-manager .list-section .list-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 12px;\n font-weight: 500;\n color: #888888;\n margin-bottom: 8px;\n padding: 10px 4px;\n}\n.column-manager .list-section .column-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 9px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n cursor: grab;\n}\n.column-manager .list-section .column-row:hover {\n background-color: #f5f5f5;\n}\n.column-manager .list-section .column-row.hidden {\n opacity: 0.6;\n}\n.column-manager .list-section .column-row .drag-icon {\n cursor: grab;\n margin-right: 14px;\n color: #888;\n}\n.column-manager .list-section .column-row .visibility-icon {\n cursor: pointer;\n color: #505050;\n}\n.column-manager .list-section .column-row .MuiTypography-root {\n flex-grow: 1;\n font-size: 14px;\n font-weight: 400;\n}");const ce=({anchorEl:t,onClose:n,table:o,columnOrder:r,setColumnOrder:l})=>{const c=Boolean(t),d=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),u=o.getAllLeafColumns(),h=r.map(e=>u.find(t=>t.id===e)).filter(e=>e?.getIsVisible()),x=r.map(e=>u.find(t=>t.id===e)).filter(e=>e&&!e.getIsVisible()),p=e=>{const t=o.getColumn(e);t?.toggleVisibility()};return e.jsx(i.Popover,{open:c,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},sx:{width:"600px"},children:e.jsxs("div",{className:"column-manager",children:[e.jsxs("div",{className:"header",children:[e.jsx(i.Typography,{variant:"h6",children:"Column"}),e.jsx(i.IconButton,{size:"small",onClick:n,children:e.jsx(q,{})})]}),e.jsx("div",{className:"content-wrapper",children:e.jsxs(s.DndContext,{sensors:d,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(!n||t.id===n.id)return;const i=o.getColumn(t.id),s=o.getColumn(n.id);if(!i||!s)return;i.getIsVisible()!==s.getIsVisible()&&i.toggleVisibility();const c=r.indexOf(t.id),d=r.indexOf(n.id);l(a.arrayMove(r,c,d))},children:[e.jsxs("div",{className:"list-section",children:[e.jsxs("div",{className:"list-header",children:[e.jsx(i.Typography,{variant:"subtitle2",children:"Shown in List"}),e.jsx(i.Box,{onClick:()=>{u.forEach(e=>e.toggleVisibility(!1))},fontStyle:{cursor:"pointer",color:"#C5C5C5",fontSize:"12px"},children:"Hide All"})]}),e.jsx(a.SortableContext,{items:h.map(e=>e.id),strategy:a.verticalListSortingStrategy,children:h.map(t=>e.jsx(le,{column:t,onToggle:()=>p(t.id)},t.id))})]}),e.jsxs("div",{className:"list-section",children:[e.jsxs("div",{className:"list-header",children:[e.jsx(i.Typography,{variant:"subtitle2",children:"Hidden in List"}),e.jsx(i.Box,{onClick:()=>{u.forEach(e=>e.toggleVisibility(!0))},fontStyle:{cursor:"pointer",color:"#C5C5C5",fontSize:"12px"},children:"Show All"})]}),e.jsx(a.SortableContext,{items:x.map(e=>e.id),strategy:a.verticalListSortingStrategy,children:x.map(t=>e.jsx(le,{column:t,onToggle:()=>p(t.id)},t.id))})]})]})})]})})},de=(e,t)=>{let n;return function(...i){const s=this;clearTimeout(n),n=setTimeout(()=>{e.apply(s,i)},t)}},ue=e=>({width:e?"180px":"40px",transition:"all 0.3s ease",opacity:e?1:.8,marginRight:"0.5rem","& .MuiOutlinedInput-root":{paddingRight:"4px",height:"32px",borderRadius:"6px",backgroundColor:"#fff",border:e?"1px solid #ccc":"none"},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"none"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{}," & .css-4bojcr-MuiInputBase-root-MuiOutlinedInput-root ":{paddingLeft:"6px !important"},"& .css-1mnoz6i-MuiInputBase-root-MuiOutlinedInput-root":{paddingLeft:"6px !important"}}),he=({value:t,onChange:s})=>{const[a,o]=n.useState(!1),[l,c]=n.useState(t),d=n.useRef(null),u=n.useCallback(de(e=>{s(e)},1e3),[s]);n.useEffect(()=>{c(t)},[t]),ie({ref:d,handler:()=>{o(!1)}});const h=e=>{const t=e.target.value;c(t),u(t)};return e.jsx(i.Box,{ref:d,className:"search-container",sx:{display:"flex",position:"relative",top:"10px"},children:e.jsx(i.TextField,{type:"text",placeholder:"Search",value:l,onChange:h,onKeyDown:e=>{"Enter"===e.key&&s(l),"Escape"===e.key&&o(!1)},className:"search-input "+(a?"expanded":""),sx:ue(a),InputProps:{startAdornment:e.jsx(i.InputAdornment,{position:"start",children:e.jsx(i.IconButton,{size:"small",onClick:()=>{o(e=>!e),a||setTimeout(()=>{d.current?.querySelector("input")?.focus()},100)},sx:{color:"black",fontSize:"14px"},edge:"start",children:e.jsx(P,{})})}),endAdornment:a&&""!==l?e.jsx(i.InputAdornment,{position:"end",children:e.jsx(i.IconButton,{size:"small",onClick:()=>{c(""),h({target:{value:""}})},sx:{color:"black",fontSize:"14px"},edge:"end",children:e.jsx(r,{fontSize:"small",sx:{color:"black",fontSize:"14px"}})})}):null}})})};function xe({table:t,isCompactTable:s,isFullscreen:a,fullscreenToggle:o,setIsCompactTable:r,paginationComponent:l,topbarOptions:c,tableStates:d,onFilterButtonClick:u}){const[h,x]=n.useState(null),[p,m]=n.useState("None"),[g,C]=n.useState(!1),[b,f]=n.useState(null),[_,v]=n.useState("Table"),[j,w]=n.useState(null),[y,S]=n.useState(t.getAllLeafColumns().map(e=>e.id)),{setShowTableFilter:k}=d,[T,M]=n.useState(!1),F=n.useRef(null);n.useEffect(()=>{t.setColumnOrder(y)},[y]),n.useEffect(()=>{a&&(f(null),x(null),w(null),Y(null),C(!1))},[a]);const{leftSideComponent:D,rightSideComponent:I,showColumnToggle:B,showChangeLayoutToggle:L,showSortingToggle:A,showFilterToggle:E,showSearch:O,searchValue:V,onSearchChange:H}=c??{},{container:q}=se(),P=n.useRef(null);ie({ref:P,handler:()=>C(!1)});ie({ref:F,handler:()=>M(!1)}),n.useEffect(()=>{const e=e=>{const t=e.detail?.target;f(t)},t=()=>{u?.()},n=e=>{const t=e.detail?.target;t&&Y(t)},i=()=>{M(!0),setTimeout(()=>{F.current?.querySelector("input")?.focus()},100)};return window.addEventListener("triggerLayoutPopover",e),window.addEventListener("triggerFilterButton",t),window.addEventListener("triggerViewMore",n),window.addEventListener("triggerSearchInput",i),()=>{window.removeEventListener("triggerLayoutPopover",e),window.removeEventListener("triggerFilterButton",t),window.removeEventListener("triggerViewMore",n),window.removeEventListener("triggerSearchInput",i)}},[u]);const[Z,Y]=n.useState(null),$=Boolean(Z);return e.jsxs("div",{className:"ts-topbar",children:[e.jsx("div",{className:"tabs-section",children:e.jsx("div",{style:{overflowX:"auto",whiteSpace:"nowrap"},children:D})}),e.jsxs("div",{className:"right-section",children:[I,l,O&&e.jsx("div",{title:"Search",className:"external-search-trigger",onClick:()=>{const e=new CustomEvent("triggerSearchInput");window.dispatchEvent(e)},ref:F,children:e.jsx(he,{value:V??"",onChange:H??(()=>{})})}),L&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"change-layout ts--button",title:"Layout",children:e.jsx("div",{onClick:e=>{const t=new CustomEvent("triggerLayoutPopover",{detail:{target:e.currentTarget}});window.dispatchEvent(t)},className:"external-layout-trigger",children:e.jsx(N,{})})})}),e.jsx(i.Popover,{open:Boolean(b),anchorEl:b,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},container:q,sx:{mt:2.2},children:e.jsx(ne,{onSelect:e=>{v(e),f(null)},selectedLayout:_})}),B&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hide-column ts--button",onClick:e=>w(e.currentTarget),title:"Column",children:e.jsx(z,{})}),e.jsx(ce,{anchorEl:j,onClose:()=>w(null),table:t,columnOrder:y,setColumnOrder:S})]}),A&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filter ts--button",title:"Sort",onClick:e=>x(e.currentTarget),children:e.jsx(R,{})}),e.jsx(re,{anchorEl:h,onClose:()=>x(null),columns:t.getAllLeafColumns().map(e=>({id:e.id,label:e.columnDef.meta?.label||e.id})),onChange:e=>t.setSorting(e)})]}),E&&e.jsxs("div",{className:"filter ts--button",title:"Filter",onClick:u,style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:d.showTableFilter||d.filters.length>0?"#eae4fe":"transparent",height:"25px",width:"25px",borderRadius:"6px",cursor:"pointer"},children:[e.jsx(W,{color:d.showTableFilter||d.filters.length>0?"#7A5AF8":"#1C1B1F"}),d.filters.length>0&&!d.showTableFilter&&e.jsx("span",{style:{position:"absolute",top:"1px",right:"1px",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F63D68"}})]}),e.jsx(i.Popover,{open:$,anchorEl:Z,onClose:()=>Y(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},container:q,children:e.jsx(ae,{compactMode:s,onCompactToggle:e=>r("Compact"===e),isFullscreen:a,onFullscreenToggle:o,groupBy:p,onGroupByChange:e=>m(e),tableStates:d,onClose:()=>Y(null)})})]})]})}function pe({table:t,rowsPerPageArray:n,paginationOptions:i}){const s=t.getState().pagination.pageIndex+1,a=t.getPageCount(),o=t.getState().pagination.pageSize,r=t.getRowCount(),d=s*o-o+1,u=Math.min(s*o,r);return e.jsx("div",{className:"pagination_container",children:"full"===i?.paginationView?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"go_to_page_container",children:[" Go to page : ",e.jsx("input",{type:"number",defaultValue:s,onKeyDown:e=>{if("Enter"===e.key){const n=e.currentTarget.value?Number(e.currentTarget.value)-1:0;t.setPageIndex(n)}},style:{width:"60px",textAlign:"center"},min:1,max:t?.getPageCount()})," "]}),e.jsxs("div",{className:"rows_per_page_container",children:[e.jsx("span",{children:"Rows Per Page : "}),e.jsx("select",{value:t.getState().pagination.pageSize,onChange:e=>{t.setPageSize(Number(e.target.value))},children:n.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsxs("div",{className:"records_range_container",children:[e.jsx("span",{children:"Showing "}),e.jsxs("strong",{children:[d," - ",u," of ",r]})]}),e.jsxs("span",{className:"page_range_container",children:[e.jsx("span",{children:" Page "}),e.jsxs("strong",{children:[s," of ",a," "]})]}),e.jsxs("div",{className:"pagination_btn_container",children:[e.jsx("button",{title:"First Page",className:"pagination_btn",disabled:!t.getCanPreviousPage(),onClick:()=>t.setPageIndex(0),children:e.jsx(I,{})}),e.jsx("button",{title:"Previous Page",className:"pagination_btn",disabled:!t.getCanPreviousPage(),onClick:()=>t.previousPage(),children:e.jsx(l,{fontSize:"small"})}),e.jsx("button",{title:"Next Page",className:"pagination_btn",disabled:!t.getCanNextPage(),onClick:()=>t.nextPage(),children:e.jsx(c,{})}),e.jsx("button",{title:"Last Page",className:"pagination_btn",disabled:!t.getCanNextPage(),onClick:()=>t.setPageIndex(a-1),children:e.jsx(B,{})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"rows_per_page_container",children:e.jsx("select",{value:t.getState().pagination.pageSize,onChange:e=>{t.setPageSize(Number(e.target.value))},children:n.map(t=>e.jsx("option",{value:t,children:t},t))})}),e.jsx("div",{className:"records_range_container",children:e.jsxs("strong",{children:[d," - ",u," of ",r]})}),e.jsxs("div",{className:"pagination_btn_container",children:[e.jsx("button",{title:"Previous Page",className:"pagination_btn",disabled:!t.getCanPreviousPage(),onClick:()=>t.previousPage(),children:e.jsx(l,{})}),e.jsx("button",{title:"Next Page",className:"pagination_btn",disabled:!t.getCanNextPage(),onClick:()=>t.nextPage(),children:e.jsx(c,{})})]})]})})}M(".pagination_container {\n --grey-300: #edeeef;\n padding: 8px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n font-size: 0.875rem;\n background-color: #fff;\n}\n@media screen and (max-width: 991px) {\n .pagination_container {\n justify-content: center;\n font-size: 0.75rem;\n }\n .pagination_container .go_to_page_container {\n display: none;\n }\n}\n@media screen and (max-width: 768px) {\n .pagination_container {\n gap: 1rem;\n }\n .pagination_container .records_range_container,\n .pagination_container .rows_per_page_container {\n display: none;\n }\n}\n.pagination_container .pagination_btn_container {\n display: flex;\n}\n.pagination_container .pagination_btn_container .pagination_btn {\n position: relative;\n user-select: none;\n border: none;\n border-radius: 50%;\n height: 2rem;\n width: 2rem;\n padding: 4px;\n cursor: pointer;\n transition: 0.4s;\n background-color: transparent;\n}\n@media screen and (max-width: 768px) {\n .pagination_container .pagination_btn_container .pagination_btn {\n height: 1.5rem;\n width: 1.5rem;\n padding: 0rem;\n }\n .pagination_container .pagination_btn_container .pagination_btn svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n}\n.pagination_container .pagination_btn_container .pagination_btn:disabled {\n cursor: unset;\n fill: rgba(0, 0, 0, 0.18);\n}\n.pagination_container .pagination_btn_container .pagination_btn:not(:disabled) {\n cursor: pointer;\n}\n.pagination_container .pagination_btn_container .pagination_btn:focus {\n outline: none;\n}\n.pagination_container .pagination_btn_container .pagination_btn:hover:not(:disabled) {\n background-color: var(--grey-300);\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.6), 0 1px 3px 1px rgba(60, 64, 67, 0.3);\n}\n\n.rows_per_page_container select {\n border-radius: 4px;\n padding: 6px;\n}");const me=e=>{const t=e.getIsPinned(),n="left"===t&&e.getIsLastColumn("left"),i="right"===t&&e.getIsFirstColumn("right");return{boxShadow:n?"-4px 0 4px -4px gray inset":i?"4px 0 4px -4px gray inset":void 0,background:"inherit",left:"left"===t?`${e.getStart("left")}px`:void 0,right:"right"===t?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative",width:e.getSize()}},ge=e=>{const t=e.getIsPinned(),n="left"===t&&e.getIsLastColumn("left"),i="right"===t&&e.getIsFirstColumn("right");return{boxShadow:n?"-4px 0 4px -4px gray inset":i?"4px 0 4px -4px gray inset":void 0,background:"inherit",left:"left"===t?`${e.getStart("left")}px`:void 0,right:"right"===t?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative",width:e.getSize()}},Ce={adm_dev:"http://localhost:6010/api",crm_dev:"http://localhost:4011/api",uat:"https://api.eth-qa.rezolut.in/api/enrol"};function be({cell:n,tableStates:i}){const{isDragging:s,setNodeRef:r,transform:l}=a.useSortable({id:n.column.id}),{wrapColumns:c}=i,d=n.column.getIsPinned(),u={opacity:s?.8:1,transform:o.CSS.Translate.toString(l),transition:"width transform 0.2s ease-in-out",width:n.column.getSize(),...ge(n.column),...(c.all_wrap||c[n.column.id])&&{wordBreak:"break-all"}};return e.jsx("td",{ref:r,style:{...u,zIndex:d?2:s?1:0},align:n.column.columnDef.meta?.align||"left",className:"ts__body__td",children:n.getIsPlaceholder()?null:t.flexRender(n.column.columnDef.cell,n.getContext())})}d.create({baseURL:Ce.adm_dev,timeout:1e4,headers:{"Content-Type":"application/json"}}).interceptors.request.use(e=>{const t=localStorage.getItem("authToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const fe=({checked:t=!1,disabled:i=!1,onChange:s=()=>{},indeterminate:a=!1,className:o,style:r,...l})=>{const c=u.v4(),[d,h]=n.useState(t),x=n.useRef(null);return n.useEffect(()=>{h(t)},[t]),n.useEffect(()=>{x.current&&(x.current.indeterminate=a)},[a]),e.jsx("input",{id:c,ref:x,type:"checkbox",checked:d,onChange:e=>{const t=e.target.checked;h(t),s&&s(t)},disabled:i,className:o,...l})};function _e({table:i,featureOptions:s,NestedComponent:o,columnOrder:r,tableStates:l}){const{enableColumnReordering:c,enableRowSelection:d}=s,{wrapColumns:u}=l;return e.jsx("tbody",{className:"ts__body",children:i?.getRowModel()?.rows?.map(i=>(i=>{const h=e.jsxs("tr",{className:"ts__body__tr",children:[d&&e.jsx("td",{className:"ts__body__td ts__body__checkbox",style:{position:"sticky",left:0,width:"50px"},children:e.jsx(fe,{checked:i.getIsSelected(),indeterminate:i.getIsSomeSelected(),onChange:i.getToggleSelectedHandler(),className:"checkbox__input"})}),i?.getVisibleCells()?.map(n=>{const i={className:"ts__body__td",style:{...ge(n.column),width:n.column.getSize(),...(u.all_wrap||u[n.column.id])&&{wordBreak:"break-all"}},align:n.column.columnDef.meta?.align||"left"};return c?e.jsx(a.SortableContext,{items:r,strategy:a.horizontalListSortingStrategy,children:e.jsx(be,{cell:n,featureOptions:s,tableStates:l})},n.id):e.jsx("td",{...i,children:t.flexRender(n?.column?.columnDef?.cell,n?.getContext())},n?.id)})]},i.id);return i.getIsExpanded()?e.jsxs(n.Fragment,{children:[h,o&&e.jsx("tr",{children:e.jsx(o,{row:i})})]},i.id):h})(i))})}function ve({header:t}){return"left"!==t.column.getIsPinned()?e.jsx("div",{className:"ts--head--button",onClick:()=>t.column.pin("left")}):e.jsx("div",{className:"ts--head--button",onClick:e=>{e.stopPropagation(),t.column.pin(!1)},children:e.jsx(V,{})})}function je({anchorEl:t,activeTab:n,onClose:s,header:a,tableStates:o,filterSettingStates:r,onSaveSettings:l}){const c=Boolean(t),d=a.column,u="left"===d.getIsPinned(),{container:x}=se();h.useQueryClient();const{wrapColumns:p,setWrapColumns:m}=o;return e.jsx(i.Popover,{open:c,anchorEl:t,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},container:x,children:e.jsxs(i.List,{dense:!0,children:[e.jsxs(i.ListItemButton,{onClick:()=>d.toggleSorting(!1),children:[e.jsx(i.ListItemIcon,{children:e.jsx(F,{})}),e.jsx(i.ListItemText,{primary:"Sort ascending"})]}),e.jsxs(i.ListItemButton,{onClick:()=>d.toggleSorting(!0),children:[e.jsx(i.ListItemIcon,{children:e.jsx(D,{})}),e.jsx(i.ListItemText,{primary:"Sort descending"})]}),e.jsxs(i.ListItemButton,{onClick:()=>{return e=d?.id,void(l&&l(e));var e},children:[e.jsx(i.ListItemIcon,{children:e.jsx(Z,{})}),e.jsx(i.ListItemText,{primary:"Hide in view"})]}),e.jsxs(i.ListItemButton,{onClick:()=>{d.pin(!u&&"left")},children:[e.jsx(i.ListItemIcon,{children:u?e.jsx(V,{}):e.jsx(O,{})}),e.jsx(i.ListItemText,{primary:u?"Unfreeze column":"Freeze column"})]}),e.jsxs(i.ListItemButton,{children:[e.jsx(i.ListItemText,{primary:"Wrap Cell"}),e.jsx(i.Switch,{checked:p.all_wrap||p[d.id],onChange:()=>{return e=d.id,void m(t=>({...t,[e]:!t[e],all_wrap:!1}));var e}})]})]})})}function we({header:i,activeTab:s,featureOptions:r,tableStates:l,filterSettingStates:c,onSaveSettings:d}){const{enableColumnPinning:u}=r,[h,x]=n.useState(null),p=()=>{x(null)},{isDragging:m,transform:g,attributes:C,listeners:b}=a.useSortable({id:i.column.id}),f=i.column.getIsPinned(),_={opacity:m?.8:1,position:"relative",transform:o.CSS.Translate.toString(g),transition:"width transform 0.2s ease-in-out",width:i.column.getSize(),minWidth:`${i.column.columnDef.minSize??180}px`,maxWidth:`${i.column.columnDef.maxSize}px`};return e.jsxs("th",{onMouseLeave:p,className:"ts__head__th",colSpan:i.colSpan,onClick:e=>{x(t=>t?null:e.currentTarget)},style:{width:`${i.column.getSize()}px `,minWidth:`${i.column.columnDef.minSize}px`,maxWidth:`${i.column.columnDef.maxSize}px`,..._,...me(i.column),zIndex:f?3:m?1:0},children:[i.isPlaceholder?null:e.jsxs("div",{className:"ts__content",children:[e.jsxs("div",{className:(""+(i.column.getCanSort()?"ts__content__sort":"")).trim(),children:[t.flexRender(i.column.columnDef.header,i.getContext()),{asc:e.jsx(F,{}),desc:e.jsx(D,{})}[i.column.getIsSorted()]??null]}),u&&e.jsx(ve,{header:i,featureOptions:r,tableStates:l,filterSettingStates:c}),e.jsx("div",{...C,...b,className:"ts__dnd__button",children:e.jsx(E,{})})]}),i.column.getCanResize()?e.jsx("div",{onDoubleClick:()=>i.column.resetSize(),onMouseDown:i.getResizeHandler(),onTouchStart:i.getResizeHandler(),className:"column__resize "+(i.column.getIsResizing()?"is__resizing":"")}):null,e.jsx(je,{anchorEl:h,activeTab:s,onClose:p,header:i,tableStates:l,filterSettingStates:c,onSaveSettings:d})]},i?.id)}function ye({table:i,activeTab:s,featureOptions:o,columnOrder:r,tableStates:l,filterSettingStates:c,onSaveSettings:d}){const{stickyHeader:u,enableColumnReordering:h,enableColumnPinning:x,enableRowSelection:p}=o,[,m]=n.useState(null),g=e=>{m(t=>t?null:e.currentTarget)};return e.jsx("thead",{className:("ts__head "+(u?"ts--sticky":"")).trim(),children:i.getHeaderGroups().map(n=>e.jsxs("tr",{className:"ts__head__tr",children:[p&&e.jsx("th",{className:"ts__head__th ts__head__checkbox",style:{position:"sticky",left:0,width:"50px"},children:e.jsx("div",{className:"ts__content",children:e.jsx(fe,{checked:i.getIsAllRowsSelected(),indeterminate:i.getIsSomeRowsSelected(),onChange:()=>i.toggleAllRowsSelected()})})}),n.headers.map(n=>h?e.jsx(a.SortableContext,{items:r,strategy:a.horizontalListSortingStrategy,children:e.jsx(we,{header:n,activeTab:s,featureOptions:o,tableStates:l,filterSettingStates:c,onSaveSettings:d})},n?.id):e.jsxs("th",{className:"ts__head__th",colSpan:n.colSpan,style:{...me(n.column),width:`${n.column.getSize()}px`,minWidth:`${n.column.columnDef.minSize}px`,maxWidth:`${n.column.columnDef.maxSize}px`},onClick:g,children:[n.isPlaceholder?null:e.jsxs("div",{className:"ts__content",children:[e.jsxs("div",{className:(""+(n.column.getCanSort()?"ts__content__sort":"")).trim(),children:[t.flexRender(n.column.columnDef.header,n.getContext()),{asc:e.jsx(F,{}),desc:e.jsx(D,{})}[n.column.getIsSorted()]??null]}),x&&e.jsx(ve,{header:n,featureOptions:o,tableStates:l})]}),n.column.getCanResize()?e.jsx("div",{onDoubleClick:()=>n.column.resetSize(),onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:"column__resize "+(n.column.getIsResizing()?"is__resizing":"")}):null]},n?.id))]},n?.id))})}function Se({table:t,activeTab:n,featureOptions:i,NestedComponent:s,columnOrder:a,isCompactTable:o,tableStates:r,filterSettingStates:l,onSaveSettings:c}){const{striped:d}=i;return e.jsxs("table",{className:(u=`ts__table ${d?"ts--striped":""} ${o?"ts--compact":""}`,u.replace(/\s+/g," ").trim()),children:[e.jsx(ye,{table:t,activeTab:n,featureOptions:i,columnOrder:a,tableStates:r,filterSettingStates:l,onSaveSettings:c}),e.jsx(_e,{table:t,featureOptions:i,NestedComponent:s,columnOrder:a,tableStates:r})]});var u}function ke({table:t,activeTab:n,featureOptions:i,NestedComponent:o,columnOrder:r,setColumnOrder:l,isCompactTable:c,tableStates:d,filterSettingStates:u,onSaveSettings:h}){const p=s.useSensors(s.useSensor(s.MouseSensor,{}),s.useSensor(s.TouchSensor,{}),s.useSensor(s.KeyboardSensor,{}));return e.jsx(s.DndContext,{collisionDetection:s.closestCenter,modifiers:[x.restrictToHorizontalAxis],onDragEnd:e=>{const{active:t,over:n}=e;t&&n&&t.id!==n.id&&l(e=>{const i=e.indexOf(t.id),s=e.indexOf(n.id);return a.arrayMove(e,i,s)})},sensors:p,children:e.jsx(Se,{table:t,activeTab:n,featureOptions:i,NestedComponent:o,columnOrder:r,setColumnOrder:l,isCompactTable:c,tableStates:d,filterSettingStates:u,onSaveSettings:h})})}M('.table-tabs .tabs {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 0rem;\n padding: 0rem;\n}\n.table-tabs .tabs .tabs-settings {\n margin-left: 0.1rem;\n margin-right: 0.5rem;\n cursor: pointer;\n}\n.table-tabs .tabs .tab {\n display: flex;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n cursor: pointer;\n color: var(--grey-900);\n font-size: 0.875rem;\n font-family: "Satoshi";\n font-weight: 700;\n}\n.table-tabs .tabs .tab .tab__label {\n font-family: inherit;\n}\n.table-tabs .tabs .tab.active {\n background: var(--grey-500);\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n backdrop-filter: blur(200px);\n}\n.table-tabs .tabs .tabs-dropdown {\n margin-left: 1rem;\n cursor: pointer;\n}');const Te={tabs:{minHeight:"38px"},tab:{color:"#888888",padding:"8px 12px",minHeight:"38px",textTransform:"none",minWidth:"unset",whiteSpace:"nowrap","&.Mui-selected":{color:"#0e0c0b",fontWeight:700}},tabCount:{padding:"2px 3px",borderRadius:"6px",border:"1px solid #0E0C0BE6",color:"#0E0C0B"}};const Me=({open:t,onClose:s,title:a,description:o,buttons:r,input:l,maxWidth:c="sm",fullWidth:d=!0})=>{const[u,h]=n.useState(l?.defaultValue||""),[x,m]=n.useState(""),g=()=>{h(l?.defaultValue||""),s()};return e.jsxs(i.Dialog,{open:t,onClose:(e,t)=>{"backdropClick"!==t&&"escapeKeyDown"!==t&&g()},maxWidth:c,fullWidth:d,PaperProps:{sx:{borderRadius:2,padding:1}},children:[e.jsxs(i.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:"0px",marginX:"24px",paddingBottom:o?"18px":"20px",borderBottom:"1px solid #eeeeee"},children:[e.jsx(i.Typography,{variant:"h6",component:"h2",fontWeight:"bold",children:a}),e.jsx(i.IconButton,{onClick:g,size:"small",sx:{color:"text.secondary"},children:e.jsx(p,{})})]}),e.jsxs(i.DialogContent,{sx:{padding:"0 24px 16px 24px",mt:2},children:[o&&e.jsx(i.Typography,{variant:"body2",color:"text.secondary",sx:{marginBottom:l?3:0},children:o}),l&&e.jsxs(i.Box,{sx:{marginTop:o?0:2},children:[e.jsxs(i.Typography,{variant:"body2",component:"label",className:l.labelClassName,sx:{display:"block",marginBottom:1,fontWeight:500,color:"text.primary"},children:[l.label,l.required&&e.jsxs(i.Typography,{component:"span",color:"error.main",children:[" ","*"]})]}),e.jsx(i.TextField,{fullWidth:!0,value:u,onChange:e=>{h(e.target.value)},placeholder:l.placeholder,type:l.type||"text",multiline:l.multiline,rows:l.rows,variant:"outlined",size:"small",sx:{"& .MuiOutlinedInput-root":{maxWidth:280,borderRadius:1,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"2px solid #7A5AF8"}}}}),x&&e.jsx(i.Typography,{variant:"body2",color:"error.main",children:x})]})]}),e.jsx(i.DialogActions,{sx:{padding:"16px 24px 24px 24px",gap:1},children:r.map((t,n)=>e.jsx(i.Button,{variant:t.variant||"outlined",color:t.color||"primary",className:"confirm-modal-button",sx:t.sx,onClick:()=>(e=>{l?e.onClick(u,x,m):e.onClick(),h("")})(t),disabled:t.disabled||l?.required&&!u.trim()&&"contained"===t.variant,children:t.label},n))})]})},Fe=({children:t,value:n,index:i,sx:s,...a})=>e.jsx("div",{role:"tabpanel",hidden:n!==i,id:`simple-tabpanel-${i}`,"aria-labelledby":`simple-tab-${i}`,style:{height:"100%"},...a,children:n===i&&e.jsx(m,{sx:{height:"100%",...s},children:t})}),De=({tabItems:t,activeFilterIndex:s=-1,handleCrossClick:a,value:o,onChange:r,...l})=>{const[c,d]=n.useState(null);return e.jsx(i.Tabs,{value:o,onChange:r,variant:"fullWidth",sx:{px:"12px",borderBottom:"1px solid #ccc","& .MuiTabs-indicator":{backgroundColor:"black"}},...l,children:t.map((t,n)=>{const o=s===n,r=c===n;return e.jsx(i.Tab,{label:e.jsxs(i.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx("span",{children:t.label}),o&&e.jsx(i.Box,{onMouseEnter:()=>d(n),onMouseLeave:()=>d(null),sx:{display:"flex",alignItems:"center",cursor:r?"pointer":"default"},onClick:r?()=>a(n):void 0,children:r?e.jsx(Q,{}):e.jsx(K,{})})]}),sx:{fontSize:"14px",textTransform:"capitalize",color:"#888888",fontWeight:"normal",whiteSpace:"nowrap","&.Mui-selected":{color:"black",fontWeight:"bold"}}},n)})})},Ie=({filter:t,control:n,setValue:s,dropdownList:a,isLoading:o=!1,sx:r,onValueChange:l})=>e.jsx(g.Controller,{name:`${t?.filter_attribute_name}.operator`,control:n,defaultValue:t?.filter_operator||a?.[0]?.value||"",render:({field:n})=>e.jsx(i.FormControl,{sx:r,size:"small",children:e.jsx(i.Select,{...n,variant:"standard",sx:{fontSize:"0.875rem",minWidth:50,border:"none",boxShadow:"none","& .MuiSelect-icon":{top:"45%",transform:"translateY(-50%)","& .MuiOutlinedInput-input":{padding:"12px 20px"}}},disabled:o,disableUnderline:!0,onChange:e=>{const i=e.target.value,a=n.value;n.onChange(e),"date"!==t?.filter_attribute_data_type&&"year"!==t?.filter_attribute_data_type||i===a||("today"===i?s(`${t?.filter_attribute_name}.value`,C().format("YYYY-MM-DD"),{shouldDirty:!0}):"between"===i?s(`${t?.filter_attribute_name}.value`,["",""],{shouldDirty:!0}):"between"!==a&&"today"!==a||s(`${t?.filter_attribute_name}.value`,"",{shouldDirty:!0})),l?.()},children:a?.map((t,n)=>e.jsx(i.MenuItem,{value:t.value,children:t.label},n))})})}),Be={scrollbarCustom:{overflowY:"auto",pr:1,"&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#999",borderRadius:"4px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f0f0f0"}},filterContainer:{backgroundColor:"#fff",height:"100%",overflowY:"hidden",boxShadow:"0px 3px 8px 0px rgba(34, 48, 62, 0.10)",borderRadius:"0.5rem"},filterMainHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#EEEEEE",height:"50px",px:2,borderBottom:"1px solid #ccc",mx:"auto"},filterMainComponentWrapper:{height:"calc(100% - 90px)",overflowY:"auto"}},Le={formEditModeStyle:{border:"1px solid #c5c5c5",borderRadius:"6px",padding:"5px 10px 10px 10px"},formFlexContainer:{display:"flex",flexDirection:"column",gap:"0.75rem"},formListItem:{p:1,backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",gap:.5},formListSectionHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,p:1,backgroundColor:"#FAFAF9"},formListItemHeader:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:2},formListItemHeaderName:{fontWeight:500,fontSize:"13px",color:"#797877"},formListItemHeaderDropdown:{fontSize:"12px",minWidth:50,border:"none",boxShadow:"none","& .MuiSelect-root":{fontSize:"0.75rem","& .MuiSelect-select":{paddingBottom:"0rem"}}}},Ae=({value:t="",onChange:s,placeholder:a="Search..."})=>{const[o,r]=n.useState(t);return e.jsx(i.TextField,{fullWidth:!0,size:"small",value:o,onChange:e=>{const t=e.target.value;r(t),s?.(t)},placeholder:a,className:"search-input",InputProps:{startAdornment:e.jsx(i.InputAdornment,{position:"start",children:e.jsx(b,{sx:{color:"#888888",fontSize:"20px"},className:"search-icon-svg"})}),endAdornment:o&&e.jsx(i.InputAdornment,{position:"end",children:e.jsx(i.IconButton,{edge:"end",onClick:()=>{r(""),s?.("")},sx:{color:"#888888",fontSize:"20px"},className:"cross-icon",children:e.jsx(q,{})})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}}})},ze=({label:t})=>e.jsx(i.Typography,{variant:"body2",align:"center",fontSize:14,fontStyle:"italic",color:"text.secondary",children:t||"No results found"}),Ee=({tableStates:t,filterComponentOptions:s})=>{const[a,o]=n.useState(""),{filters:r,filterData:l,setSelectedFilterEntity:c}=t,d=s?.tabOptions?.isSingleEntity,u=l?.mainFilter?.entityList?.data||[],h=n.useMemo(()=>{if(d&&r?.length>0){const e=r.map(e=>e?.filter_entity_type);return u.filter(t=>e.includes(t.value))}return u.filter(e=>e.label.toLowerCase().includes(a.toLowerCase()))},[d,r,u,a]);return e.jsxs(i.List,{children:[e.jsx(Ae,{placeholder:"Filter by...",value:a,onChange:o}),e.jsx(i.Box,{sx:{my:2,overflowY:"auto",transition:"all 0.4s ease-in-out"},children:0===h.length?e.jsx(ze,{}):h.map((t,n)=>e.jsx(i.ListItem,{onClick:()=>(e=>{c(e)})(t),sx:{cursor:"pointer","&:hover":{backgroundColor:"#f4f4f4"}},children:e.jsx(i.ListItemText,{primary:t.label})},n))})]})},Oe=({loaderText:t})=>e.jsxs(i.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:2,paddingBlock:2,height:"100%",width:"100%",children:[e.jsx(i.CircularProgress,{}),t&&e.jsx(i.Typography,{variant:"h6",children:t})]}),Ve=({tableStates:t,handleAddFilter:s,filterComponentOptions:a})=>{const[o,r]=n.useState(""),{filterData:l,filters:c,selectedFilterEntity:d,setSelectedFilterEntity:u}=t,h=a?.tabOptions?.isSingleEntity,x=n.useMemo(()=>!h||(0===c?.length||!c?.some(e=>e?.filter_entity_type===d?.value)),[c,h,d?.value]);return e.jsxs(e.Fragment,{children:[e.jsxs(i.Box,{className:"group-header",sx:{...Le.formListSectionHeader,position:"sticky",top:0,zIndex:1},children:[e.jsx(i.Typography,{fontSize:14,children:d?.label}),x&&e.jsx(i.IconButton,{size:"small",onClick:()=>!h&&u(void 0),className:"cross-icon",children:e.jsx(q,{})})]}),l?.mainFilter?.entityWiseCriteria?.isPending?e.jsx(Oe,{}):e.jsxs(i.List,{children:[e.jsx(Ae,{placeholder:"Filter by...",value:o,onChange:r}),e.jsx(i.Box,{sx:{my:2,overflowY:"auto",transition:"all 0.4s ease-in-out"},children:(()=>{const t=l?.mainFilter?.entityWiseCriteria?.data?.filter(e=>e.name.toLowerCase().includes(o.toLowerCase()))??[];return 0===t.length?e.jsx(ze,{}):t.map((t,n)=>{const a=c?.some(e=>e.filter_attribute===t.attribute_key);return e.jsx(i.ListItem,{sx:{opacity:a?.5:1,cursor:a?"not-allowed":"pointer","&:hover":{backgroundColor:a?"inherit":"#f4f4f4"}},onClick:()=>!a&&s(t),children:e.jsx(i.ListItemText,{primary:t.name})},n)})})()})]})]})},He=({columnsData:t,tableStates:s,onChangeFunction:a,filterComponentOptions:o})=>{const r=i.styled(i.Button)(({theme:e})=>({borderRadius:20,borderColor:e.palette.primary.main,color:e.palette.primary.main,textTransform:"none",padding:"8px 16px","&:hover":{borderColor:e.palette.primary.dark}})),{filters:l,setFilters:c,showFilterOptions:d,setShowFilterOption:u,filterMaster:h,selectedFilterEntity:x,setSelectedFilterEntity:p}=s,m=n.useRef(null),g=(e=>{const[t,i]=n.useState(0);return n.useEffect(()=>{if(!e.current)return;const t=new ResizeObserver(()=>{e.current&&i(e.current.clientWidth)});return t.observe(e.current),()=>t.disconnect()},[e,e.current?.clientWidth]),t})(m),C=o?.tabOptions?.isSingleEntity,b=o?.tabOptions?.isSingleFilter||!1,f=n.useMemo(()=>b&&l?.length>0,[l?.length,b]);return e.jsxs(i.Box,{children:[e.jsx(r,{fullWidth:!0,startIcon:e.jsx(U,{}),onClick:()=>{u(e=>!e)},disabled:f,sx:{bgcolor:"#eae4fe",borderRadius:"6px",color:"#7a5af8",fontSize:"13px",fontWeight:500},ref:m,children:"Filter Criteria"}),d&&e.jsx(i.ClickAwayListener,{onClickAway:()=>u(!1),children:e.jsx(i.Paper,{sx:{width:g||360,p:1,mt:1.5,cursor:"pointer",position:"absolute",zIndex:1300},children:e.jsx(i.Box,{sx:{maxHeight:h?.saved_filters?.selectedId?"calc(100vh - 601px)":"calc(100vh - 440px)",overflowY:"auto",width:"100%",...Be.scrollbarCustom},className:"filter-criteria-list-box",children:x?e.jsx(Ve,{tableStates:s,handleAddFilter:e=>{const n=t?.operation_list[e?.element_type],i="multiselect"===e.element_type?[]:"",s=n?.[0]?.value||"",o=t?.operation_list[e.element_type]||[],r={...{filter_attribute:e.attribute_key,filter_operator:s,filter_value:i,filter_entity_type:x?.value},filter_attribute_name:e?.name,filter_attribute_data_type:e?.element_type||e?.element_type,datasource_list:e?.datasource_list,dropdown_list:o,filter_entity_name:x?.label,attribute_key:e?.attribute_key};c(e=>[...e,r]);const d=[...l,r];a&&a({filterMaster:h,filters:d}),u(!1),C||p(void 0)},filterComponentOptions:o}):e.jsx(Ee,{tableStates:s,filterComponentOptions:o})})})})]})},Ne={"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fff","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}},qe=({filter:t,control:n,isLoading:s=!1,onValueChange:a})=>e.jsx(g.Controller,{name:`${t?.filter_attribute_name}.value`,control:n,defaultValue:t.filter_value||"",render:({field:n})=>e.jsx(i.TextField,{...n,fullWidth:!0,variant:"outlined",size:"small",sx:{...Ne,"& .MuiOutlinedInput-input":{padding:"12px 20px"}},type:"number"===t?.filter_attribute_data_type?"number":"text",placeholder:"Enter value",disabled:s,onChange:e=>{n.onChange(e),a?.()}})}),Pe=({filter:t,control:n,sx:s,views:a=["day"],onValueChange:o})=>{const r="between"===t.filter_operator,l="today"===t.filter_operator,c="empty"===t.filter_operator||"not_empty"===t.filter_operator;return c?e.jsx(i.TextField,{fullWidth:!0,disabled:!0,value:"",size:"small"}):e.jsx(f.LocalizationProvider,{dateAdapter:v.AdapterDateFns,children:e.jsx(i.Box,{display:"flex",gap:1,children:e.jsx(g.Controller,{name:`${t?.filter_attribute_name}.value`,control:n,defaultValue:r?["",""]:l?C().format("YYYY-MM-DD"):c?null:t.filter_value?C(t.filter_value,"YYYY-MM-DD").toDate():null,render:({field:t})=>{const n=t.value,i=C().toDate();if(r){const r=Array.isArray(n)?n[0]:"",d=Array.isArray(n)?n[1]:"";return e.jsxs(e.Fragment,{children:[e.jsx(_.DatePicker,{views:a,value:l?i:r?C(r,"YYYY-MM-DD").toDate():null,onChange:e=>{if(l)return;let n="";e&&(n=1===a?.length&&"year"===a[0]?C(e).format("YYYY"):C(e).format("YYYY-MM-DD"));const i=[n,d||""];t.onChange(i),o?.()},disabled:l||c,format:1===a?.length&&"year"===a[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===a?.length&&"year"===a[0]?"YYYY":"From Date"}}}),e.jsx(_.DatePicker,{views:a,value:l?i:d?C(d,"YYYY-MM-DD").toDate():null,onChange:e=>{if(l)return;let n="";e&&(n=1===a?.length&&"year"===a[0]?C(e).format("YYYY"):C(e).format("YYYY-MM-DD"));const i=[r||"",n];t.onChange(i),o?.()},disabled:l||c,format:1===a?.length&&"year"===a[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===a?.length&&"year"===a[0]?"YYYY":"To Date"}}})]})}return e.jsx(_.DatePicker,{...t,views:a,value:l?i:t.value?C(t.value,"YYYY-MM-DD").toDate():null,onChange:e=>{if(l)return;let n="";e&&(n=1===a?.length&&"year"===a[0]?C(e).format("YYYY"):C(e).format("YYYY-MM-DD")),t.onChange(n),o?.()},disabled:l||c,format:1===a?.length&&"year"===a[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===a?.length&&"year"===a[0]?"YYYY":"DD-MM-YYYY"}}})}})})})},Re=({filter:t,control:n,dropdownData:s,sx:a,onValueChange:o})=>{const r=s[t.filter_attribute]||[];return e.jsx(g.Controller,{name:`${t?.filter_attribute_name}.value`,control:n,defaultValue:Array.isArray(t.filter_value)?t.filter_value.filter(Boolean):[],render:({field:t})=>{const n=Array.isArray(t.value)?t.value.filter(Boolean):[];return e.jsx(i.FormControl,{sx:a,fullWidth:!0,size:"small",children:e.jsx(i.Select,{...t,sx:{"& .MuiOutlinedInput-input":{padding:"10px 20px",height:"21px"}},multiple:!0,value:n,onChange:e=>{const n=e.target.value,i=Array.isArray(n)?n.filter(Boolean):[];t.onChange(i),o?.()},renderValue:e=>(Array.isArray(e)?e.filter(Boolean):[]).map(e=>r.find(t=>t.value===e)?.label||e).join(", "),children:r?.map((t,s)=>e.jsxs(i.MenuItem,{value:t.value,children:[e.jsx(i.Checkbox,{checked:n.includes(t.value),sx:{marginRight:1}}),t.label]},s))})})}})},We=["equal","before","after","between","is","today","is_before","is_after","is_on_or_before","is_on_or_after","empty","not_empty"],Ze=({columnsData:t,dropdownData:s,searchTerm:a="",setSearchTerm:o,handleRemoveFilter:r,editMode:l=!1,tableStates:c,onSaveFilterButtonClick:d,setDeleteFilterModalOpen:u,onChangeFunction:h,filterComponentOptions:x})=>{const{filterMaster:p,filters:m,setFilters:C,setFilterMaster:b,setPagination:f}=c,_=x?.tabOptions?.mainFilter?.showSaveButton,v=x?.tabOptions?.mainFilter?.showClearAllButton,j=x?.tabOptions?.mainFilter?.customButtons,w=p?.saved_filters?.selectedName||"",y=p?.saved_filters?.is_owner||!1,S=n.useMemo(()=>{const e=m?.reduce((e,t)=>(t?.filter_attribute_name&&(e[t?.filter_attribute_name]={value:t?.filter_value??"",operator:t?.filter_operator??t?.dropdown_list?.[0]?.value??""}),e),{});return{filterName:w??"",dummyChange:"",...e}},[m,w]),{control:k,watch:T,reset:M,setValue:F,unregister:D}=g.useForm({mode:"onChange",defaultValues:S,resetOptions:{keepDirtyValues:!1,keepErrors:!1}}),I=T();n.useEffect(()=>{M(S)},[m]);const B=n.useCallback(de(e=>{C(e);h&&h({filterMaster:p,filters:e})},1e3),[C]),L=n.useCallback(()=>{const e=m?.map(e=>{if(e?.filter_attribute_name&&"object"==typeof I[e?.filter_attribute_name]){const t=I[e?.filter_attribute_name];return{...e,filter_value:t.value,filter_operator:t.operator}}return e});f(e=>({...e,pageIndex:0})),B(e)},[I,m,B]);n.useEffect(()=>()=>{M(),m?.forEach(e=>{e?.filter_attribute_name&&D(e?.filter_attribute_name)})},[]);const z=n.useMemo(()=>m?.reduce((e,t)=>{const n=t?.filter_entity_name||"";return e[n]||(e[n]=[]),e[n].push(t),e},{}),[m]),E=e=>{const t=m?.filter(t=>t.filter_entity_name!==e);m?.forEach(t=>{t?.filter_entity_name===e&&t?.filter_attribute_name&&(D(`${t?.filter_attribute_name}.value`),D(`${t?.filter_attribute_name}.operator`))}),C(t);h&&h({filterMaster:p,filters:t})};return e.jsxs("form",{onSubmit:e=>{e.preventDefault()},children:[e.jsxs(i.Box,{sx:l?Le.formEditModeStyle:{},children:[l&&e.jsxs(i.Box,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}},display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem 0 1rem 0",gap:1},children:[e.jsx(g.Controller,{name:"filterName",control:k,render:({field:t})=>e.jsx(i.TextField,{fullWidth:!0,size:"small",placeholder:"Filter Name",value:w||t.value,onChange:e=>{t.onChange(e),l&&b(t=>({...t,saved_filters:{...t?.saved_filters,selectedName:e.target.value}}))},inputRef:t.ref,sx:{maxWidth:400,"& .MuiOutlinedInput-root":{bgcolor:"white",borderRadius:"0px",fontSize:"14px",color:"#272524",fontWeight:"500","& fieldset":{borderColor:"#c5c5c5"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}}})}),y&&e.jsx(i.Box,{onClick:e=>e.stopPropagation(),children:e.jsx(i.IconButton,{size:"small",onClick:()=>u&&u(!0),children:e.jsx(A,{})})})]}),e.jsxs(i.Box,{className:"filter-criteria-form",sx:{...Le.formFlexContainer,...l&&{maxHeight:"calc(100vh - 570px)",overflowY:"auto"}},children:[e.jsx(He,{columnsData:t,tableStates:c,onChangeFunction:h,filterComponentOptions:x}),!l&&e.jsx(Ae,{value:a,onChange:o}),e.jsx(i.Box,{className:"filter-form-inputs",sx:Le.formFlexContainer,children:Object.entries(z).map(([t,n])=>e.jsxs(i.Box,{sx:{border:"1px solid #c5c5c5",borderRadius:2,overflow:"hidden"},children:[e.jsxs(i.Box,{className:"group-header",sx:Le.formListSectionHeader,children:[e.jsx(i.Typography,{fontSize:14,children:t}),e.jsx(i.IconButton,{size:"small",onClick:()=>E(t),children:e.jsx(q,{})})]}),n.filter(e=>e?.filter_attribute_name?.toLowerCase().includes(a.toLowerCase())||e.filter_value?.toString().toLowerCase().includes(a.toLowerCase())).reverse().map(t=>{const n=t.dropdown_list||[];return e.jsxs(i.Box,{sx:Le.formListItem,children:[e.jsxs(i.Box,{sx:Le.formListItemHeader,children:[e.jsx(i.Typography,{sx:Le.formListItemHeaderName,children:t?.filter_attribute_name}),e.jsx(Ie,{filter:t,control:k,setValue:F,dropdownList:n,sx:Le.formListItemHeaderDropdown,onValueChange:L}),e.jsx(i.IconButton,{sx:{marginLeft:"auto"},onClick:()=>{D(`${t?.filter_attribute_name}.value`),D(`${t?.filter_attribute_name}.operator`);const e=T("dummyChange");F("dummyChange","changed"===e?"reset":"changed",{shouldDirty:!0}),r(t.filter_attribute)},size:"small",children:e.jsx(q,{})})]}),e.jsx(i.Box,{children:(()=>{const n=I[t?.filter_attribute_name],a=n?.operator;return(({filter:t,operator:n,control:s,dropdownData:a,updateFiltersFromForm:o})=>{const r=t?.filter_attribute_data_type;if("text"===r||"number"===r)return e.jsx(qe,{filter:t,control:s,onValueChange:o});if("year"===r)return e.jsx(Pe,{filter:t,control:s,views:["year"],onValueChange:o});if("date"===r)return n&&We.includes(n)?e.jsx(Pe,{filter:t,control:s,onValueChange:o}):e.jsx(qe,{filter:t,control:s,onValueChange:o});return void 0!==t?.filter_attribute_data_type&&["select","multiselect","radio","checkbox"].includes(t?.filter_attribute_data_type)?e.jsx(Re,{filter:t,control:s,dropdownData:a,onValueChange:o}):e.jsx(i.FormControl,{fullWidth:!0,size:"small"})})({filter:t,operator:a,control:k,dropdownData:s,updateFiltersFromForm:L})})()})]},t.filter_attribute)})]},t))})]})]}),m?.length>0&&(v||_)&&e.jsxs(i.Box,{sx:{display:"flex",justifyContent:"center",gap:1,mt:3},children:[v&&e.jsx(i.Button,{variant:"outlined",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8",borderRadius:"6px",textTransform:"none",fontSize:"14px"},fullWidth:!0,onClick:()=>{C([]);const e={...c.filterMaster,activeFilterTabIndex:-1};h&&h({filterMaster:e,filters:[]})},children:"Clear All"}),_&&e.jsx(i.Button,{variant:"contained",fullWidth:!0,sx:{color:"white",backgroundColor:"#7A5AF8","&.Mui-disabled":{backgroundColor:"#d7cefd",color:"rgba(255, 255, 255, 0.7)"}},onClick:()=>{d&&d()},children:"Save Filter"}),j?.map((t,n)=>e.jsx(i.Button,{fullWidth:!0,variant:t?.variant??"outlined",sx:t?.sx,...t,children:t?.label},n))]})]})},Ye=({columnsData:t,dropdownData:s,tableStates:a,onSaveFilterButtonClick:o,onChangeFunction:r,filterComponentOptions:l})=>{const[c,d]=n.useState(""),{setFilters:u,setFilterMaster:h,filterMaster:x}=a;n.useEffect(()=>{h(e=>({...e,activeFilterTabIndex:0}))},[]);const p={...Be.filterMainComponentWrapper,...Be.scrollbarCustom};return e.jsx(i.Box,{sx:p,className:"main-filter-component-wrapper",children:e.jsx(Ze,{columnsData:t,searchTerm:c,setSearchTerm:d,handleRemoveFilter:e=>{u(t=>t.filter(t=>t.filter_attribute!==e)),u(t=>{const n=t.filter(t=>t.filter_attribute!==e);return r&&r({filterMaster:x,filters:n}),n})},tableStates:a,onSaveFilterButtonClick:o,dropdownData:s,onChangeFunction:r,filterComponentOptions:l})})},$e=({columnsData:t,dropdownData:n,tableStates:s,editMode:a,setEditMode:o,searchTerm:r,setSearchTerm:l,onSaveFilterButtonClick:c,setDeleteFilterModalOpen:d,onChangeFunction:u,filterComponentOptions:h})=>{const{setFilters:x,setFilterMaster:p}=s,m=h?.tabOptions?.savedFilter?.showBackButton;return e.jsxs(e.Fragment,{children:[m&&e.jsx(i.Box,{children:e.jsxs(i.Box,{sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",mb:2},onClick:()=>{o&&o(!1),x([]),p(e=>({...e,saved_filters:{...e?.saved_filters,selectedId:"",selectedName:"",selectedCode:"",shareWithTeam:!1,allowTeamEdit:!1},activeFilterTabIndex:-1}))},children:[e.jsx(j,{sx:{width:"13px",height:"13px"}}),e.jsx(i.Typography,{variant:"body2",sx:{color:"#8592A3"},children:"Back To Saved Filters"})]})}),e.jsx(Ze,{handleRemoveFilter:e=>{x(t=>t.filter(t=>t?.filter_attribute!==e))},editMode:a,tableStates:s,columnsData:t,dropdownData:n,searchTerm:r,setSearchTerm:l,onSaveFilterButtonClick:c,setDeleteFilterModalOpen:d,onChangeFunction:u,filterComponentOptions:h})]})},Ge=({columnsData:t,dropdownData:s,tableStates:a,editMode:o,setEditMode:r,setDeleteFilterModalOpen:l,onSaveFilterButtonClick:c,tabValue:d,onChangeFunction:u,filterComponentOptions:h})=>{const{filters:x,filterMaster:p,setFilterMaster:m,setFilterToDelete:g}=a,[C,b]=n.useState(""),f=t?.saved_filter?.map(e=>({label:e.name||e.label||"Unnamed Filter",value:e.id||e.value,code:e.code??"",is_shared:!1,created_by:e.created_by||"",description:e.description||"",is_owner:!0,is_editable:!0===e.is_editable||"true"===e.is_editable}))??[],_=t?.shared_filter?.map(e=>{const t=e.sharedPreferences||e.preferences||e.meta||e.shared_meta||{};return{label:e.name||e.label||"Unnamed Filter",value:e.id||e.value,code:e.code??"",is_shared:e.is_shared??t.is_shared??!0,created_by:e.created_by||"shared_filter",description:e.description||"",is_owner:!0===e.is_owner||"true"===t.is_owner,is_editable:!0===e.is_editable||"true"===e.is_editable||!0===t.is_editable||"true"===t.is_editable}})??[];n.useEffect(()=>()=>{const e=h?.tabOptions?.savedFilter?.editMode;e||(r&&r(!1),m(e=>({...e,saved_filters:{...e?.saved_filters??{},selectedId:"",selectedName:"",description:"",selectedCode:"",shareWithTeam:void 0,allowTeamEdit:void 0}})))},[]);const v=e=>{const t={...p,saved_filters:{...p?.saved_filters??{},selectedId:e.value,selectedName:e.label,description:e.description,selectedCode:e.code,shareWithTeam:e.is_shared,allowTeamEdit:e.is_editable,is_owner:e.is_owner},attributes:{...p?.attributes,radio:[]},activeFilterTabIndex:d};m(t),u&&u({filterMaster:t,filters:x})},j=e=>{v(e),r&&r(!0),g(e)},y=e=>{v(e)},[S,k]=n.useState("my"),T=e=>{k(t=>t===e?null:e)};return e.jsxs(i.Box,{className:"saved-filter-component-wrapper",children:[!o&&e.jsxs(e.Fragment,{children:[e.jsx(i.Box,{sx:{mb:2},children:e.jsx(Ae,{value:C,onChange:b,className:"search-input"})}),e.jsx(i.Box,{sx:{background:"#fff",borderRadius:"12px",border:"1px solid #eee",mb:2,overflow:"hidden"},children:e.jsxs(i.Accordion,{disableGutters:!0,elevation:0,expanded:"my"===S,onChange:()=>T("my"),children:[e.jsx(i.AccordionSummary,{expandIcon:e.jsx(w,{fontSize:"small"}),children:e.jsx(i.Typography,{fontWeight:600,children:"My Filters"})}),e.jsx(i.Divider,{sx:{width:"100%"}}),e.jsx(i.AccordionDetails,{sx:{p:"9px",maxHeight:"230px",overflowY:"auto",scrollbarWidth:"thin"},children:(M=f,0===M.length?e.jsx(i.Typography,{children:"No My Filters"}):e.jsx(i.List,{sx:{display:"flex",flexDirection:"column",gap:1},children:M.filter(e=>e.label?.toLowerCase().includes(C.toLowerCase())).map(t=>e.jsxs(i.ListItem,{sx:{cursor:"pointer",borderRadius:"8px",bgcolor:"#f2f6f8ff",display:"flex",justifyContent:"space-between",gap:1,alignItems:"center","&:hover .action-icons":{opacity:1,visibility:"visible"}},onClick:()=>y(t),children:[t.value===p?.saved_filters?.selectedId&&e.jsx(i.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(K,{})}),e.jsx(i.ListItemText,{primary:t.label}),e.jsxs(i.Box,{onClick:e=>e.stopPropagation(),className:"action-icons",sx:{display:"flex",gap:1,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},children:[e.jsx(i.IconButton,{size:"large",onClick:()=>j(t),children:e.jsx(L,{})}),e.jsx(i.IconButton,{size:"small",onClick:()=>{g(t),l?.(!0)},children:e.jsx(A,{})})]})]},t.value))}))})]})}),e.jsx(i.Box,{sx:{background:"#fff",borderRadius:"12px",border:"1px solid #eee",mb:2,overflow:"hidden"},children:e.jsxs(i.Accordion,{disableGutters:!0,elevation:0,expanded:"shared"===S,onChange:()=>T("shared"),children:[e.jsx(i.AccordionSummary,{expandIcon:e.jsx(w,{fontSize:"small"}),children:e.jsx(i.Typography,{fontWeight:600,children:"Shared Filters"})}),e.jsx(i.Divider,{sx:{width:"100%"}}),e.jsx(i.AccordionDetails,{sx:{p:"9px",maxHeight:"230px",overflowY:"auto",scrollbarWidth:"thin"},children:(t=>0===t.length?e.jsx(i.Typography,{children:"No Shared Filters"}):e.jsx(i.List,{sx:{display:"flex",flexDirection:"column",gap:1},children:t.filter(e=>e.label?.toLowerCase().includes(C.toLowerCase())).map(t=>e.jsxs(i.ListItem,{sx:{cursor:"pointer",borderRadius:"8px",bgcolor:"#f2f6f8ff",display:"flex",justifyContent:"space-between",gap:1,alignItems:"center","&:hover .action-icons":{opacity:1,visibility:"visible"}},onClick:()=>y(t),children:[t.value===p?.saved_filters?.selectedId&&e.jsx(i.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(K,{})}),e.jsx(i.ListItemText,{primary:t.label}),e.jsxs(i.Box,{onClick:e=>e.stopPropagation(),className:"action-icons",sx:{display:"flex",gap:1,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},children:[(t.is_editable||t.is_owner)&&e.jsx(i.IconButton,{size:"large",onClick:()=>j(t),children:e.jsx(L,{})}),t.is_owner&&e.jsx(i.IconButton,{size:"small",onClick:()=>{g(t),l?.(!0)},children:e.jsx(A,{})})]})]},t.value))}))(_)})]})})]}),o&&e.jsx($e,{columnsData:t,dropdownData:s,tableStates:a,editMode:o,setEditMode:r,searchTerm:C,setSearchTerm:b,onSaveFilterButtonClick:c,setDeleteFilterModalOpen:l,onChangeFunction:u,filterComponentOptions:h})]});var M},Ue=({columnsData:t,tableStates:s,dropdownData:a,searchTerm:o,setSearchTerm:r,tabValue:l,onChangeFunction:c})=>{const{filterMaster:d,setFilterMaster:u,filters:h,setFilters:x}=s,p=d?.attributes?.selected,m=n.useMemo(()=>Array.isArray(d?.attributes?.radio)?d.attributes.radio:[],[d?.attributes?.radio]),g=e=>{const n=d?.attributes.selected;if(!n)return;const i=t?.column_list?.find(e=>e.datasource_list===n);if(!i)return;let s=[...h],a=[];if(""===e)s=h?.filter(e=>e.filter_attribute!==i.attribute_key);else{const n=t?.operation_list[i.element_type]?.[0]?.value||"in",o={...i,filter_attribute:i.attribute_key,filter_operator:n,filter_value:[e]},r=h?.some(e=>e?.filter_attribute===i?.attribute_key);s=r?h?.map(e=>e?.filter_attribute===i?.attribute_key?o:e):[...h,o],a=[e]}x(s);const o={...d,attributes:{...d.attributes,radio:a},activeFilterTabIndex:l};u(o),c&&c({filters:s,filterMaster:o})},C=n.useMemo(()=>{const e=t?.column_list?.find(e=>e.datasource_list===p)?.attribute_key;return e?a[e]:[]},[p,a]);return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",gap:"1.25rem"},className:"attributes-filter-component-wrapper",children:[e.jsx(i.FormControl,{fullWidth:!0,size:"small",children:e.jsx(i.Select,{value:p||"",onChange:e=>{const t=e.target.value,n={...d,attributes:{...d?.attributes,selected:t,radio:[]}};u(n);c&&c({filterMaster:n,filters:h})},displayEmpty:!0,renderValue:n=>n?t?.column_list?.find(e=>e.datasource_list===n)?.name:e.jsx("span",{children:"Select Attribute"}),sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#7a5af8 !important"},"&:hover fieldset":{borderColor:"#7a5af8 !important"},"&.Mui-focused fieldset":{borderColor:"#7a5af8 !important",boxShadow:"none"}},"& .MuiSelect-select":{padding:"8px 14px"}},children:t?.column_list?.filter(e=>e.element_type.includes("select")).map((t,n)=>e.jsx(i.MenuItem,{value:t.datasource_list,disabled:t.datasource_list===p,children:t.name},n))})}),e.jsxs(i.Box,{children:[p&&e.jsx(Ae,{value:o,onChange:r}),a&&e.jsx(i.Box,{className:"attributes-filter-list",sx:{mt:2,overflow:"auto",maxHeight:"calc(100dvh - 300px)"},children:e.jsx(i.FormControl,{children:C?.filter(e=>!o||e.label.toLowerCase().includes(o.toLowerCase())).map(t=>{const n=m.includes(t.value);return e.jsx(i.FormControlLabel,{control:e.jsx(i.Radio,{checked:n,onClick:()=>g(n?"":t.value)}),label:t.label},t.value)})})})]})]})};function Ke(e,t){const n={...e};for(const i in t)t[i]&&"object"==typeof t[i]&&!Array.isArray(t[i])?n[i]=Ke(e[i]||{},t[i]):n[i]=t[i];return n}const Qe=({columnsData:t,dropdownData:n,tableStates:s,onSaveFilterButtonClick:a,onChangeFunction:o,filterComponentOptions:r,editMode:l,setEditMode:c,setDeleteFilterModalOpen:d,tabValue:u,searchTerm:h,setSearchTerm:x})=>{const p=r?.tabOptions?.showFilter,m={columnsData:t,dropdownData:n,tableStates:s,onChangeFunction:o},g={editMode:l,setEditMode:c,setDeleteFilterModalOpen:d,tabValue:u},C={searchTerm:h,setSearchTerm:x,tabValue:u};return e.jsxs(i.Box,{sx:{padding:"1.5rem 0.75rem",height:"100%"},children:["main"===p&&e.jsx(Ye,{...m,onSaveFilterButtonClick:a,filterComponentOptions:r}),"saved"===p&&e.jsx(Ge,{...m,...g,onSaveFilterButtonClick:a,filterComponentOptions:r}),"attributes"===p&&e.jsx(Ue,{...m,...C})]})},Xe="#7A5AF8",Je=({open:t,onClose:s,onSave:a,filterMaster:o,setFilterMaster:r,columnsData:l,disableShareFilter:c=!1,forceShowSharingControls:d=!1})=>{const[u,h]=n.useState(!1),[x,p]=n.useState(!1),m=o?.saved_filters?.selectedName??"",g=o?.saved_filters?.description??"",C=!m.trim()||x&&!u,b=o?.saved_filters?.selectedId||"";n.useEffect(()=>{if(!t)return;const e=o?.saved_filters?.selectedId,n=l?.shared_filter?.find(t=>t.id===e);if(!e&&!n)return r(e=>e?{...e,saved_filters:{...e.saved_filters??{},selectedId:null,selectedName:"",description:"",is_shared:!1,is_editable:!1}}:e),h(!1),void p(!1);const i=l?.shared_filter?.find(t=>t.id===e);if(i){r(t=>t?{...t,saved_filters:{...t.saved_filters??{},selectedId:e,selectedName:i.name||"",description:i.description||"",is_shared:i.is_shared||!1,is_editable:"true"===i.is_editable}}:t);const t=!0===i.is_shared||"true"===i.is_shared,n=t&&(!0===i.is_editable||"true"===i.is_editable);h(t),p(n),f(t,n)}},[t,l,o?.saved_filters?.selectedId,r]);const f=(e,t)=>{r(n=>n?{...n,saved_filters:{...n.saved_filters??{},is_shared:e,is_editable:t}}:n)},_=l?.shared_filter?.find(e=>e.id===b),v=l?.shared_filter?.find(e=>e.id===b),j="true"===String(v?.is_owner),w=v&&"true"===v.is_editable||v,S=!w,k=j;return e.jsxs(i.Dialog,{open:t,onClose:s,maxWidth:"sm",fullWidth:!0,children:[e.jsxs(i.DialogTitle,{sx:{display:"flex",justifyContent:"space-between"},children:[e.jsx(i.Typography,{fontSize:18,fontWeight:600,marginTop:1,children:(()=>{const e=o?.saved_filters?.selectedId;if(!e)return"Save Filter";const t=l?.shared_filter?.find(t=>t.id===e);return t?.is_shared?"Shared Filter":"My Filter"})()}),e.jsx(i.Box,{onClick:s,sx:{cursor:"pointer"},children:e.jsx(q,{})})]}),e.jsx(i.Divider,{sx:{mx:"25px",my:"2px",bgcolor:"#f9f7f727"}}),e.jsxs(i.DialogContent,{sx:{pt:0},children:[e.jsx(i.Typography,{my:1,fontSize:"14px",children:"Give a name to this filter so you can easily reuse it later."}),e.jsx(i.Typography,{mt:2,fontSize:11,children:"Filter Name"}),e.jsx(i.TextField,{fullWidth:!0,size:"small",value:m,onChange:e=>r(t=>t?{...t,saved_filters:{...t.saved_filters??{},selectedName:e.target.value}}:t),sx:{mb:0,"& .MuiOutlinedInput-root":{width:"50%","& fieldset":{borderColor:"#888"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:Xe},"& .MuiInputBase-input":{fontSize:"12px"}}}}),e.jsx(i.Typography,{mt:2,fontSize:11,children:"Description"}),e.jsx(i.TextField,{fullWidth:!0,minRows:3,value:g,size:"small",sx:{mb:1,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"#888"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:Xe}}},onChange:e=>{const t=e.target.value;t.length>200||r(e=>e?{...e,saved_filters:{...e.saved_filters??{},description:t}}:e)}}),e.jsx(i.Typography,{sx:{mb:1,fontSize:12,color:"#888"},children:"(Max. 200 Characters)"}),(S||k)&&!c&&e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,"& .MuiFormControlLabel-label":{fontSize:"14px"}},children:[e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{size:"small",checked:u,onChange:(e,t)=>{h(t);const n=!!t&&x;p(n),f(t,n)},sx:{color:"black","&.Mui-checked":{color:"black"}}}),label:"Share with team member."}),u&&e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{size:"small",checked:x,onChange:(e,t)=>{u&&(p(t),f(u,t))},sx:{color:"black","&.Mui-checked":{color:"black"}}}),label:"Allow editing to Team member"})]}),w&&!k&&e.jsxs(i.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:3,mt:2},children:[e.jsxs(i.Box,{children:[e.jsx(i.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Created On*"}),e.jsx(i.TextField,{fullWidth:!0,size:"small",value:_?.created_date?new Date(_.created_date).toLocaleString():"",InputProps:{readOnly:!0,endAdornment:e.jsx(i.IconButton,{size:"small",children:e.jsx(y,{fontSize:"small"})}),sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(i.Box,{children:[e.jsx(i.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Created By*"}),e.jsx(i.TextField,{fullWidth:!0,size:"small",value:_?.created_by||"",InputProps:{readOnly:!0,sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(i.Box,{children:[e.jsx(i.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Modified On*"}),e.jsx(i.TextField,{fullWidth:!0,size:"small",value:_?.modified_date?new Date(_.modified_date).toLocaleString():"",InputProps:{readOnly:!0,endAdornment:e.jsx(i.IconButton,{size:"small",children:e.jsx(y,{fontSize:"small"})}),sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(i.Box,{children:[e.jsx(i.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Modified By*"}),e.jsx(i.TextField,{fullWidth:!0,size:"small",value:_?.modified_by||"",InputProps:{readOnly:!0,sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]})]}),e.jsxs(i.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,mt:3},children:[e.jsx(i.Button,{variant:"outlined",onClick:s,sx:{borderColor:Xe,color:Xe,"&:hover":{borderColor:Xe,backgroundColor:"rgba(122, 90, 248, 0.04)"}},children:"Cancel"}),e.jsx(i.Button,{variant:"contained",onClick:()=>{f(u,x),a()},disabled:C,sx:{backgroundColor:Xe,"&:hover":{backgroundColor:"#6A4DE8"},"&.Mui-disabled":{backgroundColor:"#d7cefd",color:"rgba(255, 255, 255, 0.7)"}},children:"Save"})]})]})]})};const et={mainTabsContainer:{backgroundColor:"#FAFAF9",height:"100%",minWidth:"6.75rem",position:"sticky",top:"0",left:"0","& .MuiTabs-indicator":{display:"none"}},mainTabContainer:{borderRadius:"0.375rem",padding:"0.5rem 1.25rem",alignItems:"flex-start",color:"rgba(14, 12, 11, 0.9)",textTransform:"initial",minHeight:"38px","&.Mui-selected":{backgroundColor:"rgba(122, 90, 248, 0.16)",color:"#7A5AF8",borderRadius:"0.375rem"}},mainTabLabel:{}},tt={mainTabsContainer:{mb:2,"& .MuiTab-root":{color:"#0E0C0BE5",textTransform:"none",fontWeight:500},"& .Mui-selected":{color:"#7A5AF8"},"& .MuiTabs-indicator":{backgroundColor:"#7A5AF8",height:3}}},nt=({tabItems:t,...n})=>{const{value:s,onChange:a}=n;return e.jsx(i.Tabs,{value:s,onChange:a,"aria-label":"vertical-tabs",orientation:"vertical",variant:"scrollable",sx:et.mainTabsContainer,...n,children:t.map((t,n)=>e.jsx(i.Tab,{sx:et.mainTabContainer,label:e.jsx(i.Box,{sx:et.mainTabLabel,children:e.jsx("span",{children:t.label})})},n))})},it=({children:t,value:n,index:i,...s})=>e.jsx(m,{role:"tabpanel",hidden:n!==i,id:`simple-tabpanel-${i}`,"aria-labelledby":`simple-tab-${i}`,...s,sx:{height:"100%"},children:n===i&&t}),st=({id:t,containerId:n,children:s})=>{const{attributes:r,listeners:l,setNodeRef:c,transform:d,transition:u,isDragging:h}=a.useSortable({id:t,data:{type:"filter-item",containerId:n,id:t}}),x={transform:o.CSS.Transform.toString(d),transition:u,opacity:h?.8:1};return e.jsxs(i.Box,{ref:c,style:x,...r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between","&:hover":{bgcolor:"#f5f5f5"},borderRadius:1,marginBottom:1,cursor:h?"grabbing":"default",boxShadow:h?"0 2px 8px rgba(0,0,0,0.1)":"none"},children:[e.jsx(i.Box,{...l,sx:{cursor:"grab",display:"flex",alignItems:"center"},children:e.jsx(S.DragIndicator,{sx:{mr:1,color:"#ccc"}})}),s]})},at={dialogTitle:{backgroundColor:"#FBFBFC",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.75rem"},dialogContent:{display:"flex",gap:"1rem",paddingTop:"1rem !important"},dialogActionsButton:{backgroundColor:"#7A5AF8",color:"#fff"}},ot={wrapper:{border:"0.5px solid #0E0C0B1F",borderRadius:"8px",backgroundColor:"#fdfdfc",zIndex:10,overflow:"hidden"},heading:{fontWeight:400,color:"#0E0C0BB2",fontSize:"16px"},button:{fontSize:"13px",textTransform:"none",color:"#0E0C0BB2"},draggableContainer:{maxHeight:200,borderRadius:1,mt:2,transition:"background-color 0.2s ease"},draggableCover:{minHeight:"200px",maxHeight:"200px",overflowY:"auto"},headerContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2}},rt={mainTabsHeader:{fontStyle:"italic",fontWeight:400,fontSize:"12px",color:"#0E0C0BB2"},mainTabDropdown:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"50%",paddingRight:1},mainTabSelect:{width:"65%","& .MuiOutlinedInput-root":{borderRadius:"6px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#7A5AF8"}}},selectDropdownSeparator:{width:"30%","& .MuiOutlinedInput-root":{borderRadius:"6px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#7A5AF8"}}},checkboxStyle:{display:"flex",flexDirection:"column"}},lt=({item:t,containerId:n,onItemToggle:s})=>e.jsxs(i.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flex:1,color:"tabs"===n?"black":"#9e9d9b"},children:[e.jsx(i.Typography,{children:t.label}),e.jsx(i.IconButton,{size:"small",onClick:()=>s(t,n),children:"tabs"===n?e.jsx(X,{}):e.jsx(J,{})})]}),ct=({filteredValues:t,buttonText:n,onClick:o,headerText:r,searchTerm:l,setSearchTerm:c,containerId:d,tabsApiDataLoading:u,onItemToggle:h,enableDragAndDrop:x=!0,AlertComponenet:p})=>{const{setNodeRef:m}=s.useDroppable({id:d,data:{type:"container",containerId:d}});return e.jsx(i.Grid,{size:6,sx:ot.wrapper,children:u?e.jsx(Oe,{}):e.jsxs(e.Fragment,{children:[e.jsxs(i.Box,{sx:{p:2,backgroundColor:"#fdfdfc",borderRadius:"12px",top:2},children:[e.jsxs(i.Box,{sx:ot.headerContainer,children:[e.jsx(i.Typography,{variant:"h6",sx:ot.heading,children:r}),e.jsx(i.Button,{onClick:o,variant:"text",size:"small",sx:ot.button,disabled:0===t.length,children:n})]}),void 0!==l&&void 0!==c&&e.jsx(Ae,{value:l,onChange:c}),e.jsx(i.Box,{ref:m,sx:ot.draggableContainer,children:x?e.jsx(a.SortableContext,{items:t.map(e=>e.value),strategy:a.verticalListSortingStrategy,children:e.jsx(i.Box,{sx:ot.draggableCover,children:t.map(t=>e.jsx(st,{id:t.value,containerId:d,children:e.jsx(lt,{item:t,containerId:d,onItemToggle:h})},t.value))})}):e.jsx(i.Box,{sx:ot.draggableCover,children:t?.length>0&&t.map(t=>e.jsx(lt,{item:t,containerId:d,onItemToggle:h},t.value))})})]}),p&&p]})})},dt=({message:t,width:n="100%",top:s=10,color:a="#088AB2",zIndex:o=-1,position:r="absolute"})=>e.jsx(i.Box,{sx:{fontSize:"12px",color:a,width:n,height:"fit-content",position:r,zIndex:o,top:s},children:e.jsx(i.Alert,{sx:{borderRadius:"12px 12px 0 0 !important"},severity:"info",children:t})}),ut=({filterSettingStates:t,columnsData:a,tabsApiData:o,tabsApiDataLoading:r,activeTab:l,columnTabAttributes:c})=>{const{settingsData:d,setSettingsData:u,saveButtonError:h,setSaveButtonError:x,columnTabState:p,sortingTabState:m}=t,{container:g}=se(),[C,b]=n.useState(""),[f,_]=n.useState(d?.quick_tab?.attribute||""),v=d?.quick_tab,j=c?.map(e=>({label:e?.name,value:e?.attribute_key}))||[];n.useEffect(()=>{!(v&&Object.entries(v)||[]).length&&u(e=>({...e,quick_tab:{...e?.quick_tab,attribute:a[0]?.value,sorting:"asc"}}))},[a]),n.useEffect(()=>{f!==d?.quick_tab?.attribute&&(o?.length?(u(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:o,show_list:[]}})),_(d?.quick_tab?.attribute||"")):u(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[],show_list:[]}})))},[o]),n.useEffect(()=>{const e=v?.show_list||[];if(e||(v?.hide_list||[])){const t=e.length>0&&e.length<=5,n="quick_tab_error";t?h?.messages?.some(e=>e.type!==n):(e.length,h?.messages?.some(e=>e.type===n))}},[v?.hide_list,v?.show_list]);const w=v?.show_list||[],y=v?.hide_list||[],S=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),k=y.filter(e=>e?.label?.toLowerCase().includes(C.toLowerCase())),T=(e,t)=>{const n=[...v.show_list??[]],i=[...v.hide_list??[]];u(s=>{let a=s.column,o=s.sorting;if("list"===t){if(n.length>=5)return s;const t=i.findIndex(t=>t.value==e.value);if(t>-1){if(i.splice(t,1),n.push(e),!m?.isDefault){const t=s.sorting?.tabs?.some(t=>t.tab_name.value===e.value);t||(o={...s.sorting,tabs:[...s.sorting.tabs,{tab_name:{label:e.label,value:e.value},sortby:[]}]})}if(!p?.isDefault){const t=s?.column?.tabs?.some(t=>t.tab_name.value===e.value);t||(a={...s.column,tabs:[...s.column.tabs,{tab_name:{label:e.label,value:e.value},show_list:j,hide_list:[]}]})}}}else if("tabs"===t){const t=n.findIndex(t=>t.value==e.value);if(t>-1){if(n.splice(t,1),i.push(e),!p?.isDefault){const t=s?.column?.tabs.filter(t=>t.tab_name?.value!==e.value);a={...s.column,tabs:t}}if(!m.isDefault){const t=s?.sorting?.tabs?.filter(t=>t.tab_name?.value!=e.value);o={...s.sorting,tabs:t}}}}return{...s,quick_tab:{...s?.quick_tab,show_list:n,hide_list:i},column:a,sorting:o}})},M="custom"===v?.sorting;return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(i.Typography,{variant:"caption",sx:rt.mainTabsHeader,children:"*Quick filter settings will be reflected in horizontal tabs"}),e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(i.Grid,{size:12,children:e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:rt.mainTabDropdown,size:6,children:[e.jsx(i.FormControl,{sx:rt.mainTabSelect,size:"small",children:e.jsx(i.Select,{value:v?.attribute||"",onChange:e=>u(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),MenuProps:{container:g},children:a?.map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.label},t?.value))})}),e.jsx(i.FormControl,{sx:rt.selectDropdownSeparator,size:"small",children:e.jsx(i.Select,{value:v?.sorting||"asc",onChange:e=>u(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),MenuProps:{container:g},children:[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}].map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(i.Grid,{}),e.jsx(s.DndContext,{sensors:S,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(!n)return;const i=t.data.current?.containerId,s=n.data.current?.containerId;if(!i||!s)return;let a=[...v.show_list??[]],o=[...v.hide_list??[]];if(i===s)if("list"===i){const e=o.findIndex(e=>e.value===t.id),i=o.findIndex(e=>e.value===n.id);if(-1!==e&&-1!==i){const[t]=o.splice(e,1);o.splice(i,0,t)}}else{const e=a.findIndex(e=>e.value===t.id),i=a.findIndex(e=>e.value===n.id);if(-1!==e&&-1!==i){const[t]=a.splice(e,1);a.splice(i,0,t)}}if(i!==s)if("list"===i&&"tabs"===s){if(a.length<5){const e=o.findIndex(e=>e.value===String(t.id));if(-1!==e){const t=o.splice(e,1)[0];a.push(t),u(e=>{let n=e.sorting,i=e.column;if(!e?.sorting?.isDefault){const i=e.sorting?.tabs?.some(e=>e.tab_name.value===t.value);i||(n={...e.sorting,tabs:[...e.sorting.tabs,{tab_name:t,sortby:[]}]})}if(!e?.column?.isDefault){const n=e.column?.tabs?.some(e=>e.tab_name.value===t.value);n||(i={...e.column,tabs:[...e.column.tabs,{tab_name:t,show_list:j,hide_list:[]}]})}return{...e,sorting:n,column:i}})}}}else if("tabs"===i&&"list"===s){const e=a.findIndex(e=>e.value===String(t.id));if(-1!==e){const t=a.splice(e,1)[0];o.push(t),u(e=>{let n=e.sorting,i=e.column;return e?.sorting?.isDefault||(n={...e.sorting,tabs:e?.sorting?.tabs?.filter(e=>e.tab_name?.value!==t?.value)}),e?.column?.isDefault||(i={...e.column,tabs:e?.column?.tabs?.filter(e=>e.tab_name?.value!==t?.value)}),{...e,sorting:n,column:i}})}}u(e=>{let t=e.column;e?.column?.isDefault||(t={...e.column,tabs:e.column?.tabs?[...e.column.tabs].sort((e,t)=>a.findIndex(t=>t.value===e.tab_name.value)-a.findIndex(e=>e.value===t.tab_name.value)):[]});const n=(()=>{if(e.sorting?.isDefault)return{isDefault:!0,sort_by:e.sorting?.sort_by||"asc"};return{...e.sorting,tabs:e.sorting?.tabs?[...e.sorting.tabs].sort((e,t)=>a.findIndex(t=>t.value===e.tab_name.value)-a.findIndex(e=>e.value===t.tab_name.value)):[]}})();return{...e,quick_tab:{...e.quick_tab,show_list:a,hide_list:o},column:t,sorting:n}})},children:e.jsxs(i.Grid,{sx:{mt:1},container:!0,spacing:2,size:12,children:[e.jsx(ct,{buttonText:"Show All",onClick:()=>{const e=v.show_list||[],t=v.hide_list||[],n=5-e.length;if(n<=0)return;const i=t.slice(0,n);u(n=>({...n,quick_tab:{...n?.quick_tab,show_list:[...e,...i],hide_list:t.filter(e=>!i.find(t=>t.value===e.value))}}))},headerText:"List of Values",filteredValues:k,searchTerm:C,setSearchTerm:b,containerId:"list",tabsApiDataLoading:r,onItemToggle:T,enableDragAndDrop:M}),e.jsx(ct,{buttonText:"Hide All",onClick:()=>{u(e=>{const t={...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]},n=(()=>{if(e?.column?.isDefault)return{...e.column,show_list:[],hide_list:[...e.column?.hide_list||[],...e.column?.show_list||[]]};const t=e?.column?.tabs?.map(e=>({...e,show_list:[],hide_list:[...e.hide_list||[],...e.show_list||[]]}));return{...e.column,tabs:t}})(),i=e.sorting?.isDefault?{...e.sorting,sortby:[]}:{...e.sorting,tabs:e.quick_tab?.show_list?.map(()=>({sortby:[]}))};return{...e,quick_tab:t,column:n,sorting:i}})},headerText:"View as Tabs",filteredValues:w,containerId:"tabs",onItemToggle:T,enableDragAndDrop:M,AlertComponenet:e.jsx(dt,{message:"Please select at least 1 and at most 5 values to display as\r\n tabs.",width:"49.2%",zIndex:-1})})]})}),e.jsx(i.Grid,{size:12,children:e.jsxs(i.Box,{sx:rt.checkboxStyle,children:[e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:v?.isAllSelected||!1,onChange:e=>{u(t=>({...t,quick_tab:{...t?.quick_tab,isAllSelected:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:'Show "All" tab'}),e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:v?.isCombineOther||!1,onChange:e=>{u(t=>({...t,quick_tab:{...t?.quick_tab,isCombineOther:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:'Combine remaining values under "Other" tab'})]})})]})})]})},ht={textTransform:"initial",minWidth:"5rem",minHeight:"1.875rem",color:"#7A5AF8",fontWeight:500,fontSize:"0.813rem",borderColor:"#7A5AF8","&.Mui-selected":{backgroundColor:"#7A5AF8",color:"#fff",fontWeight:600,"&:hover":{backgroundColor:"#6346e2"}}};function xt({buttons:t,...n}){return e.jsx(i.ToggleButtonGroup,{exclusive:!0,size:"small",color:"primary",sx:{marginTop:"-4px",marginBottom:"6px"},...n,children:t.map(t=>e.jsx(i.ToggleButton,{value:t?.value,disabled:t?.isDisabled,sx:ht,children:t?.label},t?.label))})}const pt=[{label:"Quick Tab"},{label:"Column"},{label:"Sorting"}],mt=[{label:"Lane"},{label:"Group By"}],gt=[{key:"stage_group",value:"Stage Group"},{key:"stage",value:"Stage"},{key:"source",value:"Source"},{key:"status",value:"Status"}],Ct=[{label:"Default",value:!0,isDisabled:!1},{label:"Tab Wise",value:!1,isDisabled:!1}],bt=({children:t,...n})=>{const{value:s,onChange:a}=n;return e.jsx(i.Tabs,{value:s,onChange:a,"aria-label":"horizontal-tabs",variant:"scrollable",sx:tt.mainTabsContainer,...n,children:t})},ft=({filterSettingStates:t,columnsData:a,columnTabAttributes:o,columnTabAttributesLoading:r})=>{const[l,c]=n.useState(""),[d,u]=n.useState(0),{quickTabStates:h,settingsData:x,setSettingsData:p,saveButtonError:m,setSaveButtonError:g}=t,C=x?.column||{},b=C?.isDefault||!1,f="column_error";n.useEffect(()=>{const e=!(Object.entries(C)||[]).length,t=!C?.show_list?.length&&!C?.hide_list?.length,n=!C?.tabs?.length,i=o?.map(e=>({...e,label:e?.name,value:e?.attribute_key}))||[];if(e)p(e=>({...e,column:{isDefault:!0,show_list:i,hide_list:[]}}));else if(b&&t)p(e=>({...e,column:{...e.column,show_list:i,hide_list:[]}}));else if(!b){const e=n?h?.show_list?.map(e=>({tab_name:e,show_list:i,hide_list:[]}))||[]:h?.show_list?.map((e,t)=>({tab_name:e,show_list:C?.tabs[t]?.show_list||i,hide_list:C?.tabs[t]?.hide_list||[]}))||[];p(t=>({...t,column:{...t.column,tabs:e}}))}},[b]),n.useEffect(()=>{const e=C?.show_list||[];if(e||(C?.hide_list||[])){if(e?.length>0){const e=m?.messages?.some(e=>e.type!==f);g(t=>({...t,hasError:e,messages:t?.messages?.filter(e=>e.type!==f)||[]}))}else{m.messages.some(e=>e.type===f)||g(e=>({...e,hasError:!0,messages:[...e.messages,{type:f,message:"Column: Please select at least one column"}]}))}}},[C?.show_list,C?.hide_list]);const _=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),{showList:v,hideList:j}=(()=>{if(C?.isDefault)return{showList:C.show_list||[],hideList:C.hide_list||[]};{const e=C?.tabs?.[d];return{showList:e?.show_list||[],hideList:e?.hide_list||o?.map(e=>({label:e?.name,value:e?.attribute_key}))||[]}}})(),w=v.map(e=>({value:e.value,label:e.label,visible:!0})),y=j.map(e=>({value:e.value,label:e.label,visible:!1})).filter(e=>e.label.toLowerCase().includes(l.toLowerCase())),S=(e,t)=>{let n=[...v],i=[...j];if("tabs"===t){const t=n.findIndex(t=>t.value===e.value);if(t>-1){const[e]=n.splice(t,1);i.push(e)}}else if("list"===t){const t=i.findIndex(t=>t.value===e.value);if(t>-1){const[e]=i.splice(t,1);n.push(e)}}if(b)p(e=>({...e,column:{...e.column,show_list:n,hide_list:i}}));else{const e=[...C?.tabs||[]];e[d]={...e[d],show_list:n,hide_list:i},p(t=>({...t,column:{...t.column,tabs:e}}))}},k=0!==h?.show_list?.length||b;return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},children:[e.jsxs(i.Box,{children:[e.jsx(i.Typography,{variant:"subtitle2",sx:{mb:1},children:"Customize column by"}),e.jsx(xt,{buttons:Ct,value:b,onChange:(e,t)=>{null!==t&&p(e=>({...e,column:{...e.column,isDefault:t}}))}})]}),e.jsxs(i.Box,{sx:{flex:1},children:[!b&&k&&e.jsx(bt,{value:d,onChange:(e,t)=>{u(t)},children:h?.show_list?.map(t=>e.jsx(i.Tab,{label:t?.label},t?.value))}),k?e.jsx(s.DndContext,{sensors:_,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(!n)return;const i=t.data.current?.containerId,s=n.data.current?.containerId;if(!i||!s)return;const a=[...v,...j].find(e=>e.value===String(t.id));if(!a)return;let o=[...v],r=[...j];if(i===s){const e="list"===i?r:o,s=e.findIndex(e=>e.value===String(t.id)),a=e.findIndex(e=>e.value===String(n.id));if(-1!==s&&-1!==a){const[t]=e.splice(s,1);e.splice(a,0,t)}}else if("list"===i&&"tabs"===s){const e=r.findIndex(e=>e.value===String(t.id));-1!==e&&(r.splice(e,1),o.push(a))}else if("tabs"===i&&"list"===s){const e=o.findIndex(e=>e.value===String(t.id));-1!==e&&(o.splice(e,1),r.push(a))}if(b)p(e=>({...e,column:{...e.column,show_list:o,hide_list:r}}));else{const e=[...C?.tabs||[]];e[d]={...e[d],show_list:o,hide_list:r},p(t=>({...t,column:{...t.column,tabs:e}}))}},children:e.jsxs(i.Grid,{container:!0,spacing:2,children:[e.jsx(ct,{containerId:"list",headerText:"Hidden In List",filteredValues:y,buttonText:"Show All",onClick:()=>{if(b)p(e=>({...e,column:{...e.column,show_list:[...v,...j],hide_list:[]}}));else{const e=[...C.tabs||[]];e[d]={...e[d],show_list:[...v,...j],hide_list:[]},p(t=>({...t,column:{...t.column,tabs:e}}))}},searchTerm:l,setSearchTerm:c,onItemToggle:S}),e.jsx(ct,{containerId:"tabs",headerText:"Show In List",filteredValues:w,buttonText:"Hide All",onClick:()=>{if(b)p(e=>({...e,column:{...e.column,show_list:[],hide_list:[...j,...v]}}));else{const e=[...C.tabs||[]];e[d]={...e[d],show_list:[],hide_list:[...j,...v]},p(t=>({...t,column:{...t.column,tabs:e}}))}},onItemToggle:S,AlertComponenet:e.jsx(dt,{message:"Please select at least 1 value to display as tabs.",width:"49.2%",top:93})})]})}):e.jsx(i.Typography,{children:"View as Tabs empty in Quick Tab"})]})]})},_t=({filterSettingStates:t,columnsData:o})=>{const{quickTabStates:r,saveButtonError:l,settingsData:c,setSettingsData:d}=t,[u,h]=n.useState(r?.show_list?.[0]?.value),x=c?.column,p=c?.sorting,m=p?.isDefault,g=n.useMemo(()=>!p||0===Object.entries(p).length,[p]);n.useMemo(()=>!g&&!p?.sortby?.length,[g,p]),n.useEffect(()=>{const e=[{column:"",order:"asc"}];p&&0!==Object.keys(p).length?!1!==p?.isDefault||p?.tabs&&0!==p?.tabs.length||d(t=>{const n=(t.quick_tab?.show_list||[]).map(t=>({tab_name:{value:t.value,label:t.label},sortby:e}));return{...t,sorting:{...t.sorting,tabs:n}}}):d(e=>({...e,sorting:{isDefault:!0,sortby:[]}}))},[]);const C=s.useSensors(s.useSensor(s.PointerSensor)),b=x?.isDefault?r?.show_list?.findIndex(e=>e?.value===u||e?.label?.toLowerCase()===u?.toLowerCase()):x?.tabs?.findIndex(e=>e?.tab_name?.value==u||e?.tab_name?.label?.toLowerCase()==u?.toLowerCase()),f=n.useMemo(()=>m?p?.sortby||[{column:"",order:"asc"}]:void 0!==u&&p?.tabs?.[b||0]?.sortby?p?.tabs?.[b||0]?.sortby:[],[p,u]),_=e=>{d(t=>{if(t?.sorting?.isDefault)return{...t,sorting:{...t?.sorting,sortby:e}};{const n=[...t?.sorting?.tabs||[]];return n[b||0]={...n[b||0],tab_name:c?.column?.tabs?.[b||0]?.tab_name||{label:"",value:""},sortby:e},{...t,sorting:{...t?.sorting,tabs:n}}}})},v=(e,t,n)=>{if(!f)return;const i=[...f];i[n]={...i[n],[e]:t},_(i)},j=!(0===r?.show_list?.length&&!m),w=n.useMemo(()=>{const e=o?.length??0;return(p?.sortby?.length??0)!==e},[o,p]),y=n.useMemo(()=>{const e=p?.sortby?.some(e=>""===e.column);return e},[l,p]),{showList:S}=p?.isDefault?{showList:o?.map(e=>({label:e?.name,value:e?.attribute_key}))||[],hideList:x?.hide_list||[]}:{showList:o?.map(e=>({label:e?.name,value:e?.attribute_key}))||[]};return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[e.jsx(i.Typography,{children:"Select attribute(s) you want to sort by"}),e.jsx(xt,{buttons:Ct,value:m,onChange:(e,t)=>{null!==t&&d(e=>({...e,sorting:{...e.sorting,isDefault:t}}))}}),j?e.jsx(e.Fragment,{children:e.jsxs(i.Box,{children:[!m&&e.jsx(bt,{value:u,onChange:(e,t)=>h(t),children:r?.show_list?.map(t=>e.jsx(i.Tab,{label:t?.label,value:t?.value},t?.value))}),e.jsx(s.DndContext,{sensors:C,collisionDetection:s.closestCenter,onDragEnd:e=>{if(!f)return;const{active:t,over:n}=e;if(!n||t.id===n.id)return;const i=f.findIndex(e=>e.column===t.id),s=f.findIndex(e=>e.column===n.id);if(-1!==i&&-1!==s){const e=a.arrayMove(f,i,s);_(e)}},children:e.jsx(a.SortableContext,{items:f?.map(e=>e.column)||[],strategy:a.verticalListSortingStrategy,children:f?.map((t,n)=>e.jsx(oe,{id:t.column,children:e.jsxs(i.Box,{display:"flex",gap:1,alignItems:"center",mb:1,children:[e.jsx(i.Select,{value:t.column,onChange:e=>v("column",e.target.value,n),size:"small",fullWidth:!0,children:S.map((t,n)=>e.jsx(i.MenuItem,{value:t.value,disabled:f.some(e=>e.column===t?.value),children:t?.label},n))}),e.jsxs(i.Select,{value:t.order,onChange:e=>v("order",e.target.value,n),size:"small",fullWidth:!0,children:[e.jsx(i.MenuItem,{value:"asc",children:"Ascending"}),e.jsx(i.MenuItem,{value:"dsc",children:"Descending"})]}),e.jsx(i.IconButton,{size:"small",onClick:()=>(e=>{if(!f)return;const t=f.filter(t=>t.column!==e);_(t)})(t.column),children:e.jsx(q,{})})]})},t.column))})}),w&&e.jsx(i.Box,{children:e.jsx(i.Button,{onClick:()=>{if(!f)return;_([...f,{column:"",order:"asc"}])},startIcon:e.jsx(U,{}),variant:"text",sx:{fontSize:13,color:"#7A5AF8"},disabled:y,children:"Add Sort"})})]})}):e.jsx(i.Typography,{children:"View as Tabs empty in Quick Tab"})]})},vt=i.styled(i.Dialog)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:0,height:"100%"},"& .MuiDialogContent-root":{...at.dialogContent,padding:e.spacing(2)},"& .MuiDialogActions-root":{padding:e.spacing(2)}})),jt=n.forwardRef(function(t,n){return e.jsx(i.Slide,{direction:"down",ref:n,...t})}),wt=({...t})=>{const n={...at.dialogActionsButton,...t.sx};return e.jsx(i.Button,{variant:"contained",...t,sx:n,children:t.children})},yt=({filterSettingStates:t,columnsData:a,tabsApiData:o,tabsApiDataLoading:r})=>{const{settingsData:l,setSettingsData:c,saveButtonError:d,setSaveButtonError:u}=t,[h,x]=n.useState(""),[p,m]=n.useState(l?.quick_tab?.attribute||""),g=l?.quick_tab;n.useEffect(()=>{!(g&&Object.entries(g)||[]).length&&c(e=>({...e,quick_tab:{...e?.quick_tab,attribute:gt[0].value,sorting:"asc"}}))},[a]),n.useEffect(()=>{p!==l?.quick_tab?.attribute&&o?.length&&(c(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:o,show_list:[]}})),m(l?.quick_tab?.attribute||""))},[o]),n.useEffect(()=>{const e=g?.show_list||[];if(e||(g?.hide_list||[])){const t=e.length>0&&e.length<=5,n="quick_tab_error";t?d?.messages?.some(e=>e.type!==n):(e.length,d?.messages?.some(e=>e.type===n))}},[g?.hide_list,g?.show_list]);const C=[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}],b=(g?.show_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),f=(g?.hide_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),_=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),v=f.filter(e=>e?.label?.toLowerCase().includes(h.toLowerCase())),j=(e,t)=>{const n=[...g.show_list??[]],i=[...g.hide_list??[]];if("list"===t){if(n.length>=5)return;const t=i.indexOf(e);t>-1&&(i.splice(t,1),n.push(e))}else if("lanes"===t){const t=n.indexOf(e);t>-1&&(n.splice(t,1),i.push(e))}c(e=>({...e,quick_tab:{...e?.quick_tab,show_list:n,hide_list:i}}))},w="custom"===g?.sorting;return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(i.Typography,{variant:"caption",sx:rt.mainTabsHeader,children:"*Quick filter settings will be reflected in vertical lanes"}),e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(i.Grid,{size:12,children:e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:rt.mainTabDropdown,size:6,children:[e.jsx(i.FormControl,{sx:rt.mainTabSelect,size:"small",children:e.jsx(i.Select,{value:g?.attribute||"",onChange:e=>c(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),displayEmpty:!0,renderValue:t=>t||e.jsx("em",{children:"Select Attribute"}),children:gt?.map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.value},t?.key))})}),e.jsx(i.FormControl,{sx:rt.selectDropdownSeparator,size:"small",children:e.jsx(i.Select,{value:g?.sorting||"asc",onChange:e=>c(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),displayEmpty:!0,renderValue:t=>{if(!t)return e.jsx("em",{children:"Sort by"});const n=C.find(e=>e.value===t);return n?.label||t},children:C.map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(i.Grid,{}),e.jsx(s.DndContext,{sensors:_,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(!n)return;const i=t.data.current?.containerId,s=n.data.current?.containerId;if(i&&s)if(i===s){let e=[...g.show_list??[]],s=[...g.hide_list??[]];if("list"===i){const e=s.indexOf(String(t.id)),i=s.indexOf(String(n.id));if(-1!==e&&-1!==i){const[t]=s.splice(e,1);s.splice(i,0,t)}}else{const i=e.indexOf(String(t.id)),s=e.indexOf(String(n.id));if(-1!==i&&-1!==s){const[t]=e.splice(i,1);e.splice(s,0,t)}}c(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:s}}))}else{let e=[...g.show_list??[]],n=[...g.hide_list??[]];if("list"===i&&"lanes"===s){if(e.length>=5)return;const i=n.indexOf(String(t.id));-1!==i&&(n.splice(i,1),e.push(String(t.id)))}else if("lanes"===i&&"list"===s){const i=e.indexOf(String(t.id));-1!==i&&(e.splice(i,1),n.push(String(t.id)))}c(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:n}}))}},children:e.jsxs(i.Grid,{sx:{mt:2},container:!0,spacing:2,size:12,children:[e.jsx(ct,{buttonText:"Show All",onClick:()=>{const e=g.show_list||[],t=g.hide_list||[],n=5-e.length;if(n<=0)return;const i=t.slice(0,n);c(n=>({...n,quick_tab:{...n?.quick_tab,show_list:[...e,...i],hide_list:t.filter(e=>!i.includes(e))}}))},headerText:"List of Values",filteredValues:v,searchTerm:h,setSearchTerm:x,containerId:"list",tabsApiDataLoading:r,onItemToggle:j,enableDragAndDrop:w}),e.jsx(ct,{buttonText:"Hide All",onClick:()=>{c(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]}}))},headerText:"View as Lanes",filteredValues:b,containerId:"lanes",onItemToggle:j,enableDragAndDrop:w,AlertComponenet:e.jsx(dt,{message:"Please select at least 1 and at most 5 values to display as\r\n lanes.",width:"49%",position:"absolute",color:"#088AB2",top:10,zIndex:1})})]})}),e.jsx(i.Grid,{size:12,children:e.jsxs(i.Box,{sx:rt.checkboxStyle,children:[e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:g?.showSubLane||!1,onChange:e=>{c(t=>({...t,quick_tab:{...t?.quick_tab,showSubLane:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Sublane"}),e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:g?.showColorColumns||!1,onChange:e=>{c(t=>({...t,quick_tab:{...t?.quick_tab,showColorColumns:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Color columns"})]})})]})})]})},St=({filterSettingStates:t,columnsData:a,tabsApiData:o,tabsApiDataLoading:r})=>{const{settingsData:l,setSettingsData:c,saveButtonError:d,setSaveButtonError:u}=t,[h,x]=n.useState(""),[p,m]=n.useState(l?.quick_tab?.attribute||""),g=l?.quick_tab;n.useEffect(()=>{!(g&&Object.entries(g)||[]).length&&c(e=>({...e,quick_tab:{...e?.quick_tab,attribute:gt[0].value,sorting:"asc"}}))},[a]),n.useEffect(()=>{p!==l?.quick_tab?.attribute&&o?.length&&(c(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:o,show_list:[]}})),m(l?.quick_tab?.attribute||""))},[o]),n.useEffect(()=>{const e=g?.show_list||[];if(e||(g?.hide_list||[])){const t=e.length>0&&e.length<=5,n="quick_tab_error";t?d?.messages?.some(e=>e.type!==n):(e.length,d?.messages?.some(e=>e.type===n))}},[g?.hide_list,g?.show_list]);const C=[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}],b=(g?.show_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),f=(g?.hide_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),_=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),v=f.filter(e=>e?.label?.toLowerCase().includes(h.toLowerCase())),j=(e,t)=>{const n=[...g.show_list??[]],i=[...g.hide_list??[]];if("list"===t){if(n.length>=5)return;const t=i.indexOf(e);t>-1&&(i.splice(t,1),n.push(e))}else if("lanes"===t){const t=n.indexOf(e);t>-1&&(n.splice(t,1),i.push(e))}c(e=>({...e,quick_tab:{...e?.quick_tab,show_list:n,hide_list:i}}))},w="custom"===g?.sorting;return e.jsxs(i.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(i.Typography,{variant:"caption",sx:rt.mainTabsHeader,children:"*Quick filter settings will be reflected in vertical lanes"}),e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(i.Grid,{size:12,children:e.jsx(i.Box,{children:e.jsxs(i.Grid,{sx:rt.mainTabDropdown,size:6,children:[e.jsx(i.FormControl,{sx:rt.mainTabSelect,size:"small",children:e.jsx(i.Select,{value:g?.attribute||"",onChange:e=>c(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),displayEmpty:!0,renderValue:t=>t||e.jsx("em",{children:"Select Attribute"}),children:gt?.map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.value},t?.key))})}),e.jsx(i.FormControl,{sx:rt.selectDropdownSeparator,size:"small",children:e.jsx(i.Select,{value:g?.sorting||"asc",onChange:e=>c(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),displayEmpty:!0,renderValue:t=>{if(!t)return e.jsx("em",{children:"Sort by"});const n=C.find(e=>e.value===t);return n?.label||t},children:C?.map(t=>e.jsx(i.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(i.Grid,{}),e.jsx(s.DndContext,{sensors:_,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:n}=e;if(!n)return;const i=t.data.current?.containerId,s=n.data.current?.containerId;if(i&&s)if(i===s){let e=[...g.show_list??[]],s=[...g.hide_list??[]];if("list"===i){const e=s.indexOf(String(t.id)),i=s.indexOf(String(n.id));if(-1!==e&&-1!==i){const[t]=s.splice(e,1);s.splice(i,0,t)}}else{const i=e.indexOf(String(t.id)),s=e.indexOf(String(n.id));if(-1!==i&&-1!==s){const[t]=e.splice(i,1);e.splice(s,0,t)}}c(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:s}}))}else{let e=[...g.show_list??[]],n=[...g.hide_list??[]];if("list"===i&&"lanes"===s){if(e.length>=5)return;const i=n.indexOf(String(t.id));-1!==i&&(n.splice(i,1),e.push(String(t.id)))}else if("lanes"===i&&"list"===s){const i=e.indexOf(String(t.id));-1!==i&&(e.splice(i,1),n.push(String(t.id)))}c(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:n}}))}},children:e.jsxs(i.Grid,{sx:{mt:2},container:!0,spacing:2,size:12,children:[e.jsx(ct,{buttonText:"Show All",onClick:()=>{const e=g.show_list||[],t=g.hide_list||[],n=5-e.length;if(n<=0)return;const i=t.slice(0,n);c(n=>({...n,quick_tab:{...n?.quick_tab,show_list:[...e,...i],hide_list:t.filter(e=>!i.includes(e))}}))},headerText:"List of Values",filteredValues:v,searchTerm:h,setSearchTerm:x,containerId:"list",tabsApiDataLoading:r,onItemToggle:j,enableDragAndDrop:w}),e.jsx(ct,{buttonText:"Hide All",onClick:()=>{c(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]}}))},headerText:"View as Lanes",filteredValues:b,containerId:"lanes",onItemToggle:j,enableDragAndDrop:w})]})}),e.jsx(i.Grid,{size:12,children:e.jsxs(i.Box,{sx:rt.checkboxStyle,children:[e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:g?.showSubLane||!1,onChange:e=>{c(t=>({...t,quick_tab:{...t?.quick_tab,showSubLane:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Sublane"}),e.jsx(i.FormControlLabel,{control:e.jsx(i.Checkbox,{checked:g?.showColorColumns||!1,onChange:e=>{c(t=>({...t,quick_tab:{...t?.quick_tab,showColorColumns:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Color columns"})]})})]})})]})};const kt={syncingStyle:{display:"flex",flexDirection:"row",gap:"8px",width:"100%"},topHeader:{display:"flex",alignItems:"center",gap:1,px:1,pt:2,bgcolor:"white",width:"fit-content",position:"sticky",top:0,right:0,zIndex:1100},laneHeader:{flex:1,minWidth:"263px",maxWidth:"263px",display:"flex",fontWeight:700,fontSize:"16px",borderRadius:"6px",alignItems:"center",justifyContent:"center",py:"8px",px:"12px",position:"relative"},badge:{position:"absolute",top:"-12px",left:"8px",px:1,color:"white",borderRadius:"8px"},swimlaneWrapperStyle:{flexDirection:"row-reverse",bgcolor:"white",minHeight:44,px:2,py:0,"&.Mui-expanded":{minHeight:44},"& .MuiAccordionSummary-content":{margin:"8px 0",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:5,"&.Mui-expanded":{margin:"8px 0"}},"& .MuiAccordionSummary-expandIconWrapper":{mr:0}},columnStyle:{flex:1,p:"12px",minHeight:"500px",borderRadius:"6px",minWidth:"263px",maxWidth:"263px"},stageStyle:{mb:2,bgcolor:"#f9fafb",borderTopLeftRadius:"8px !important",borderBottomLeftRadius:"8px !important",borderTopRightRadius:"8px !important",overflow:"hidden",boxShadow:"none","&:before":{display:"none"}},subSectionAccordion:{height:"52px",minHeight:"52px","&.Mui-expanded":{minHeight:"52px",height:"52px"},border:"1px solid #e2e8f0",borderTopRightRadius:"8px",px:2},subSectionCountContainer:{color:"white",height:"26px",width:"26px !important",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"},cardsContainer:{px:1,gap:"12px",display:"flex",flexDirection:"column",p:"8px"},settingStyle:{bgcolor:"#f8fafc",width:"56px",height:"41px",borderRadius:"6px",border:"1px solid #e2e8f0"},swimLaneAccordionStyle:{mb:1,"&:before":{display:"none"},py:0,boxShadow:"none"},subSectionHeaderContainer:{display:"flex",alignItems:"center",gap:"8px"}},Tt=[{color:"#fff0f3",darkColor:"#fea3b4"},{color:"#fffbed",darkColor:"#fde272"},{color:"#ebf9fc",darkColor:"#67e3f9"},{color:"#edf9f3",darkColor:"#73e2a3"}];exports.CraftTableFilter=function({onClose:t,columnsData:s,tableStates:a,onDeleteFilter:o,onSaveFilter:r,onUpdateFilter:l,dropdownData:c,onChangeFunction:d,filterComponentOptions:u}){const[h,x]=n.useState(0),[m,g]=n.useState(!1),[C,b]=n.useState(!1),[f,_]=n.useState(!1),[v,j]=n.useState(!1),[w,y]=n.useState(""),{filters:S,setFilters:k,filterToDelete:T,filterMaster:M,setFilterMaster:F,setShowFilterOption:D}=a,I=Ke({showMainHeader:!0,mainHeaderTitle:"Filter",showTabs:!0,tabOptions:{isSingleFilter:!1,disableShareFilter:!1,isSingleEntity:!1,showFilter:"main",mainFilter:{showSaveButton:!0,showClearAllButton:!0},savedFilter:{showBackButton:!0,editMode:!1}},showMainFilter:!0,showSavedFilter:!0,showAttributesFilter:!0},u??{}),B=I?.showMainHeader,L=I?.mainHeaderTitle,A=I?.showTabs,z=A&&I?.showMainFilter,E=A&&I?.showSavedFilter,O=A&&I?.showAttributesFilter,V=I?.tabOptions?.savedFilter?.editMode;n.useEffect(()=>{V&&g(V)},[V]);const H=[];z&&H.push({label:"Filter"}),E&&H.push({label:"Saved Filter"}),O&&H.push({label:"Attributes"});const N={label:"Filter Name",placeholder:'e.g., "Website Leads - This Week"',required:!0,type:"text"},q=Boolean(s?.saved_filter?.length),P=()=>{m||F(e=>e?{...e,saved_filters:{...e.saved_filters,shareWithTeam:!1,allowTeamEdit:!1}}:e),_(!0)},R={columnsData:s,tableStates:a,onChangeFunction:d,dropdownData:c},W={editMode:m,setEditMode:g,setDeleteFilterModalOpen:j,tabValue:h},Z={searchTerm:w,setSearchTerm:y};return e.jsxs(i.Box,{sx:Be.filterContainer,children:[B&&e.jsxs(i.Box,{sx:Be.filterMainHeader,children:[e.jsx(i.Typography,{variant:"h6",fontWeight:"bold",fontSize:"18px",children:L}),e.jsx(i.IconButton,{onClick:e=>{e.stopPropagation(),t&&t(),D(!1)},"aria-label":"close",children:e.jsx(p,{fontSize:"small"})})]}),A&&e.jsx(De,{value:h,onChange:(e,t)=>{const n=H[t]?.label;"Attributes"===n&&"Filter"===H[h]?.label&&(()=>{const e={...M,attributes:{...M?.attributes,radio:[]},activeFilterTabIndex:0};F(e)})(),x(t),0===t&&F(e=>e?{...e,saved_filters:{...e.saved_filters??{},selectedId:"",selectedName:"",description:"",is_shared:!1,is_editable:!1}}:e),"Filter"===n&&(g(!1),F(e=>({...e,activeFilterTabIndex:0})))},tabItems:H,activeFilterIndex:M?.activeFilterTabIndex??0,handleCrossClick:e=>{const t=H[e];k([]),"Saved Filter"===t?.label&&g(!1);const n={};"Saved Filter"===t?.label?n.saved_filters={...M?.saved_filters??{},selectedId:"",selectedName:"",selectedCode:"",is_shared:void 0,is_editable:void 0}:"Attributes"===t?.label&&(n.attributes={radio:[],selected:""});const i={...M,activeFilterTabIndex:-1,...n};F(i),d&&d({filterMaster:i,filters:S})}}),!A&&e.jsx(Qe,{...R,...W,...Z,onSaveFilterButtonClick:P,filterComponentOptions:I}),z&&e.jsx(Fe,{value:h,index:H.findIndex(e=>"Filter"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(Ye,{...R,onSaveFilterButtonClick:P,filterComponentOptions:I})}),E&&e.jsx(Fe,{value:h,index:H.findIndex(e=>"Saved Filter"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(Ge,{...R,...W,onSaveFilterButtonClick:P,filterComponentOptions:I})}),O&&e.jsx(Fe,{value:h,index:H.findIndex(e=>"Attributes"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(Ue,{...R,...Z,tabValue:h})}),!u?.isRuleEngine&&e.jsx(Me,{open:C,onClose:()=>b(!1),title:m?"Replace Existing Filter ?":"Save Filter",description:m?"You already have a filter applied. Applying a new filter will replace the current one. Do you want to continue?":"Give a name to this filter so you can easily reuse it later.",buttons:[{label:"Cancel",onClick:()=>{b(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:m?"Replace Filter":"Save",onClick:e=>{if(m){const t=M?.saved_filters?.selectedId,n=e||M?.saved_filters?.selectedName,i=M?.saved_filters?.selectedCode,s=e||M?.saved_filters?.description,a={...M,saved_filters:{...M?.saved_filters??{},selectedId:t,selectedName:n,selectedCode:i,description:s}};F(a);return d&&d({filterMaster:a,filters:S}),l&&l(e||""),b(!1),void g(!1)}r&&r(e||""),b(!1),x(1)},variant:"contained",color:"primary",sx:{color:"white",backgroundColor:"#7A5AF8"}}],input:m?void 0:N}),!u?.isRuleEngine&&e.jsx(Me,{open:v,onClose:()=>j(!1),title:"Delete Saved Filter?",description:`You're about to delete the saved filter: "${T?.label||"[Filter Name]"}". This action cannot be undone. Are you sure you want to continue?`,buttons:[{label:"Cancel",onClick:()=>{j(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:"Delete",onClick:()=>{o&&o(),j(!1),g&&g(!1)},variant:"contained",sx:{color:"white",backgroundColor:"#f63d68","&:hover":{backgroundColor:"#f63d68"}}}],maxWidth:"xs"}),u?.isRuleEngine&&e.jsx(Me,{open:C,onClose:()=>b(!1),title:m?u?.recordFilterComponentProps?.edit?.title||"Replace Existing Filter ?":u?.recordFilterComponentProps?.save?.title||"Save Filter",description:m?u?.recordFilterComponentProps?.edit?.description||"You already have a filter applied. Applying a new filter will replace the current one. Do you want to continue?":u?.recordFilterComponentProps?.save?.description||"Give a name to this filter so you can easily reuse it later.",buttons:[{label:u?.recordFilterComponentProps?.save.button?.primary||"Cancel",onClick:()=>{b(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:m?u?.recordFilterComponentProps?.edit.button?.secondary||"Replace Filter":u?.recordFilterComponentProps?.save.button?.secondary||"Save",onClick:e=>{if(m){const t=M?.saved_filters?.selectedId,n=e||M?.saved_filters?.selectedName,i=M?.saved_filters?.selectedCode,s={...M,saved_filters:{...M?.saved_filters??{},selectedId:t,selectedName:n,selectedCode:i}};F(s);d&&d({filterMaster:s,filters:S}),l&&l(e||""),b(!1);let a=u?.tabOptions?.savedFilter?.editMode;return void(a||g(!1))}r&&r(e||""),b(!1),x(1)},variant:"contained",color:"primary",sx:{color:"white",backgroundColor:"#7A5AF8"}}],input:m?void 0:N}),u?.isRuleEngine&&e.jsx(Me,{open:v,onClose:()=>j(!1),title:u?.recordFilterComponentProps?.delete.title||"Delete Saved Filter?",description:u?.recordFilterComponentProps?.delete.description||`You're about to delete the saved filter: "${T?.label||"[Filter Name]"}". This action cannot be undone. Are you sure you want to continue?`,buttons:[{label:u?.recordFilterComponentProps?.delete.button?.primary||"Cancel",onClick:()=>{j(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:u?.recordFilterComponentProps?.delete.button?.secondary||"Delete",onClick:()=>{o&&o(),j(!1);let e=u?.tabOptions?.savedFilter?.editMode;e||g&&g(!1)},variant:"contained",sx:{color:"white",backgroundColor:"#f63d68","&:hover":{backgroundColor:"#f63d68"}}}],maxWidth:"xs"}),e.jsx(Je,{open:f,onClose:()=>_(!1),onSave:()=>{const e=M?.saved_filters?.selectedId,t=M?.saved_filters?.selectedName||"",n=M?.saved_filters?.description||"",i=M?.saved_filters?.selectedCode,s={...M,saved_filters:{...M?.saved_filters??{},selectedId:e,selectedName:t,selectedCode:i,description:n}};F(s);if(d&&d({filterMaster:s,filters:S}),m){l&&l(t);const e=u?.tabOptions?.savedFilter?.editMode;e||g(!1)}else r&&r(t),x(1);_(!1)},filterMaster:a.filterMaster,setFilterMaster:a.setFilterMaster,hasSavedFilters:q,columnsData:s,disableShareFilter:u?.tabOptions?.disableShareFilter})]})},exports.CraftTableSearch=he,exports.CraftTableSettings=function({view:t="listing",show:s,filterSettingStates:a,onClose:o,columnsData:r,columnsDataLoading:l,quickTabAttributes:c,quickTabAttributesLoading:d,columnTabAttributes:u,columnTabAttributesLoading:h,sortingTabAttributes:x,sortingTabAttributesLoading:m,tabsApiData:g,tabsApiDataLoading:C,onSaveSettingsData:b,activeTab:f}){const[_,v]=n.useState(0),{container:j}=se(),{showListViewSettings:w,quickTabStates:y,columnTabState:S,sortingTabState:k,saveButtonError:T}=a,M=Boolean(Object.entries(r).length);let F=S?.isDefault?0===S?.show_list?.length:0===S?.tabs?.find(e=>0===e?.show_list?.length)?.show_list?.length;return e.jsxs(vt,{open:s||w,fullWidth:!0,maxWidth:"lg",slots:{transition:jt},container:j,children:[e.jsxs(i.DialogTitle,{sx:at.dialogTitle,children:[e.jsx(i.Typography,{sx:{fontSize:"1.125rem"},children:"List View Setting"}),e.jsx(i.IconButton,{size:"small",color:"inherit",onClick:()=>{o&&o()},children:e.jsx(p,{})})]}),e.jsx(i.DialogContent,{children:l?e.jsx(Oe,{loaderText:"Loading settings..."}):M?e.jsxs(e.Fragment,{children:[e.jsx(nt,{value:_,onChange:(e,t)=>{v(t)},tabItems:"listing"===t?pt:mt}),e.jsxs(i.Box,{sx:{flex:"1"},children:["listing"===t.toLowerCase()&&e.jsx(it,{value:_,index:0,children:0===_&&e.jsx(ut,{filterSettingStates:a,columnsData:c,tabsApiData:g,tabsApiDataLoading:C,activeTab:f,columnTabAttributes:u})}),"listing"===t.toLowerCase()&&e.jsx(it,{value:_,index:1,children:1===_&&e.jsx(ft,{filterSettingStates:a,columnsData:r,columnTabAttributes:u,columnTabAttributesLoading:h})}),"listing"===t.toLowerCase()&&e.jsx(it,{value:_,index:2,children:2===_&&e.jsx(_t,{filterSettingStates:a,columnsData:x})}),"kanban"===t.toLowerCase()&&e.jsx(it,{value:_,index:0,children:0===_&&e.jsx(yt,{filterSettingStates:a,columnsData:r})}),"kanban"===t.toLowerCase()&&e.jsx(it,{value:_,index:1,children:1===_&&e.jsx(St,{filterSettingStates:a,columnsData:r})})]})]}):e.jsx(i.Typography,{children:"Please pass meta data in component"})}),!l&&M&&e.jsx(i.DialogActions,{children:e.jsx(wt,{disabled:F,onClick:()=>{const e=S?.isDefault?{isDefault:!0,show_list:S?.show_list||[],hide_list:S?.hide_list||[]}:{isDefault:!1,tabs:S?.tabs||[]},t=k?.isDefault?{isDefault:!0,sortby:k?.sortby?.filter(e=>""!==e.column)||[]}:{isDefault:!1,tabs:k?.tabs||[]};b&&b({quick_tab:y,column:e,sorting:t}),o&&o()},children:"listing"===t?"Save Quick Filter":"Save Kanban Layout"})})]})},exports.CraftTableTabs=function({loading:t=!1,tabsData:s=[],activeTab:a="All",onClick:o,tableStates:r,settingsOptions:l}){if(t)return e.jsx(i.CircularProgress,{size:24});const c=n.useMemo(()=>s?.filter(e=>null!==e.tab_name)?.map(e=>({...e,tab_name:e.tab_name})),[s]),d=n.useMemo(()=>c.find(e=>"All"===e.tab_name)?.tab_name||c[0]?.tab_name||"",[c]),u=a||d;return e.jsxs(i.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l?.showIcon&&e.jsx(i.IconButton,{onClick:l?.onClick,sx:{zIndex:1e3,mx:0},children:e.jsx(ee,{})}),e.jsx(i.Tabs,{value:u,onChange:(e,t)=>(o(t),void r.setPagination(e=>({...e,pageIndex:0}))),variant:"scrollable",scrollButtons:"auto",slotProps:{indicator:{sx:{display:"none"}}},sx:Te.tabs,children:c.map(({tab_name:t,count:n})=>{const s=a===t;return e.jsx(i.Tab,{value:t,label:e.jsxs(i.Box,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(i.Box,{children:t}),e.jsx(i.Box,{sx:{...Te.tabCount,...s&&{backgroundColor:"#000",color:"#fff",fontWeight:"500"}},children:0==n?"0":String(n).padStart(2,"0")})]}),sx:Te.tab},t)})})]})},exports.KanbanWrapper=({metaData:t,data:s,isLoading:a,KanbanCardComponent:o,showSettings:r,onOpenSettings:l})=>{const[c,d]=n.useState({Active:!0}),[u,h]=n.useState({});n.useEffect(()=>{if(t?.swim_lanes?.length){const e={};t?.swim_lanes.forEach(t=>{t?.sub_lanes?.forEach(n=>{const i=`${t.id}-${n.lane_id}-${n.id}`;e[i]=n.expanded||!1})}),h(e)}},[t]);const x=e=>{if(!t?.swim_lanes||!s)return 0;const n=new Set;let i=0;return t?.swim_lanes.forEach(t=>{t.sub_lanes?.filter(t=>t.lane_id==e)?.forEach(e=>{s?.forEach(t=>{t?.stage_id!=e?.id||n.has(t?.id)||(n.add(t.id),i++)})})}),i};return e.jsx(e.Fragment,{children:a?e.jsx(Oe,{}):e.jsx(i.Box,{children:e.jsxs(i.Box,{className:"kanban-container",sx:{width:"100%",bgcolor:"white",overflowX:"auto"},children:[e.jsxs(i.Box,{sx:kt.topHeader,children:[e.jsx(i.IconButton,{onClick:l,sx:{...kt.settingStyle,visibility:r?"visible":"hidden"},children:e.jsx(k,{})}),e.jsx(i.Box,{sx:{...kt.syncingStyle,flex:1},children:t?.lanes?.map((t,n)=>e.jsxs(i.Box,{className:"lane-header",sx:{...kt.laneHeader,bgcolor:t.color||Tt[n%4].color},children:[e.jsx(i.Box,{sx:{...kt.badge,bgcolor:t.darkColor||Tt[n%4].darkColor},children:x(Number(t.id))}),e.jsx(i.Typography,{variant:"h6",fontWeight:"bold",sx:{px:2},children:t?.name})]},t.id))})]}),e.jsx(i.Box,{className:"kanban-content",id:"kanban-content",sx:{maxHeight:"calc(100vh - 186px)",width:"fit-content"},children:t?.swim_lanes?.map(n=>{return e.jsxs(i.Accordion,{expanded:!!c[n.name],onChange:(a=n.name,(e,t)=>{d(e=>({...e,[a]:t}))}),sx:kt.swimLaneAccordionStyle,children:[e.jsx(i.AccordionSummary,{disabled:!(n?.sub_lanes?.length>0),expandIcon:e.jsx(T,{sx:{color:"black"}}),sx:kt.swimlaneWrapperStyle,children:e.jsxs(i.Typography,{variant:"body1",fontWeight:"medium",sx:{ml:1.5},children:[n?.name," (",s?.filter(e=>e?.lead_status_id==n?.id).length,")"]})}),e.jsx(i.AccordionDetails,{sx:{pl:"16px",pr:"8px",width:"fit-content",py:0},children:e.jsx(i.Box,{sx:{...kt.syncingStyle,pl:7},children:t?.lanes?.map((t,a)=>e.jsx(i.Box,{className:"column",sx:{...kt.columnStyle,bgcolor:t?.color||Tt[a%4].color},children:n?.sub_lanes?.filter(e=>e.lane_id.toString()==t?.id)?.map(r=>{const l=`${n?.id}-${t?.id}-${r?.id}`;return e.jsxs(i.Accordion,{expanded:0!==s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==n?.id)?.length&&(u[l]||!1),onChange:()=>{return e=l,void h(t=>({...t,[e]:!t[e]}));var e},sx:{...kt.stageStyle,borderLeft:`4px solid ${t.darkColor||Tt[a%4].darkColor}`},children:[e.jsx(i.AccordionSummary,{expandIcon:e.jsx(S.ExpandMore,{sx:{display:0===s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==n?.id)?.length?"none":"block"}}),sx:kt.subSectionAccordion,children:e.jsxs(i.Box,{sx:kt.subSectionHeaderContainer,children:[e.jsx(i.Box,{className:"sub-section-count",sx:{...kt.subSectionCountContainer,bgcolor:t?.darkColor||Tt[a%4].darkColor},children:s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==n?.id)?.length||0}),e.jsx(i.Typography,{fontWeight:"700",color:"#555354",fontSize:"12px",children:r?.name})]})}),e.jsx(i.AccordionDetails,{sx:kt.cardsContainer,children:(s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==n?.id&&e?.stage_group_id==t?.id)||[]).map(t=>o&&e.jsx(o,{cardData:t},t?.id)||null)})]},r.id)})},t.id))})})]},n.id);var a})})]})})})},exports.TableWrapper=function({data:i=[],columns:s=[],tableStates:a,filterSettingStates:o,onSaveSettings:r,paginationOptions:l,featureOptions:c,topbarOptions:d,nestedComponent:u,loadingOptions:h={isLoading:!1},customRenderFn:x={},shouldHideColumn:p,emptyListComponent:m,filterOptions:g,activeTab:C}){if(!Array.isArray(i))throw new Error("data must be an array of objects.");const[b,f]=n.useState([]);n.useEffect(()=>{if(s?.length>0){const e=s?.filter(e=>"function"!=typeof p||!p("accessorKey"in e?e?.accessorKey:void 0))?.map((e,t)=>{const n="accessorKey"in e?e?.accessorKey:`col_${t}`;return{...e,id:n,cell:t=>{if("custom"===e?.meta?.type&&e?.meta?.propName){const n=x?.[e?.meta?.propName];return"function"==typeof n?n({value:t?.getValue(),row:t?.row,table:t?.table?.getRowModel()?.rows}):t?.getValue()}return"function"==typeof e?.cell?e?.cell(t):t?.getValue()}}});f(e)}},[s]),n.useEffect(()=>{$.getAllLeafColumns().forEach(e=>{const t=e.columnDef.meta?.defaultPinned;t&&!e.getIsPinned()&&e.pin(t)})},[a?.columnPinning?.left,b]);const[_,v]=n.useState(()=>b.map(e=>e.id));n.useEffect(()=>{b.length>0&&v(b.map(e=>e.id))},[b]);const[j,w]=n.useState(c?.compactTable??!1),y=n.useRef(null);n.useEffect(()=>{w(c?.compactTable??!1)},[c?.compactTable]);const S={showPagination:!0,paginationPosition:"bottom",paginationView:"full",...l},k=S?.totalRows??i.length,T=S?.rowsPerPageArray??[25,50,100,150],M={showColumnToggle:!0,showCompactTableToggle:!0,showChangeLayoutToggle:!0,viewMoreToggle:!0,showSearch:!0,showSortingToggle:!1,showFilterToggle:!0,tableStates:a,...d},F={enableTopbar:!0,enableSorting:!0,enableServerSidePagination:!1,enableServerSideSorting:!1,enableRowSelection:!1,enableColumnResizing:!0,enableColumnReordering:!0,enableColumnPinning:!0,enableMultiColumnSorting:!0,compactTable:!1,stickyHeader:!0,enableWordBreakAll:!1,striped:!1,...c},{enableTopbar:D,enableRowSelection:I,enableServerSidePagination:B,enableServerSideSorting:L,enableSorting:A,enableColumnResizing:z,enableColumnReordering:E,enableColumnPinning:O}=F,{sorting:V,setSorting:N,pagination:q,setPagination:P,rowSelection:R,setRowSelection:W,expanded:Z,setExpanded:Y}=a,$=t.useReactTable({data:i,columns:b,state:{sorting:V,pagination:q,rowSelection:R,columnOrder:_,expanded:Z},getCoreRowModel:t.getCoreRowModel(),enableSorting:A,onSortingChange:N,getSortedRowModel:t.getSortedRowModel(),manualSorting:L,getPaginationRowModel:t.getPaginationRowModel(),onPaginationChange:P,rowCount:k,manualPagination:B,enableRowSelection:I,onRowSelectionChange:W,enableColumnResizing:z,columnResizeDirection:"ltr",columnResizeMode:"onChange",onColumnOrderChange:v,enableColumnPinning:O,getExpandedRowModel:t.getExpandedRowModel(),onExpandedChange:Y,getSubRows:e=>e.subRows??[]}),{isLoading:G,loadingComponent:U,loaderText:K}=h,{isFullscreen:Q}=se(),X=g?.show;return e.jsx("div",{className:"ts__table__container",children:e.jsxs("div",{className:"ts__table__layout "+(X?"has-filter":""),children:[e.jsxs("div",{className:"ts__table__main "+(Q?"is-fullscreen":""),ref:y,children:[D&&e.jsx(xe,{table:$,topbarOptions:M,isCompactTable:j,setIsCompactTable:w,isFullscreen:Q,fullscreenToggle:()=>{document.fullscreenElement?document.exitFullscreen():y.current?.requestFullscreen().catch(e=>{console.error("Error attempting to enable fullscreen mode:",e)})},paginationComponent:!0===S?.showPagination&&"top"===S?.paginationPosition?e.jsx(pe,{table:$,rowsPerPageArray:T,paginationOptions:S}):null,searchValue:M.searchValue,onSearchChange:M.onSearchChange,tableStates:a,onFilterButtonClick:d?.onFilterButtonClick}),G?U??e.jsxs("div",{className:"ts__loader",children:[e.jsx(H,{}),K&&e.jsx("p",{children:K})]}):!G&&0===i.length&&m?m:e.jsx("div",{className:"ts__table__wrapper "+(Q?"is-fullscreen":""),children:E?e.jsx(ke,{table:$,activeTab:C,columnOrder:_,featureOptions:F,NestedComponent:u,setColumnOrder:v,isCompactTable:j,tableStates:a,filterSettingStates:o,onSaveSettings:r}):e.jsx(Se,{table:$,activeTab:C,featureOptions:F,NestedComponent:u,columnOrder:_,setColumnOrder:v,isCompactTable:j,tableStates:a,filterSettingStates:o,onSaveSettings:r})}),!0===S?.showPagination&&"bottom"===S?.paginationPosition?e.jsx(pe,{table:$,rowsPerPageArray:T,paginationOptions:S}):null]}),e.jsx("div",{className:("ts__table__filter "+(X?"show":"")).trim(),children:g?.component&&g?.component})]})})},exports.useCraftTable=function(e=25){const[t,i]=n.useState({pageIndex:0,pageSize:e}),[s,a]=n.useState([]),[o,r]=n.useState({}),[l,c]=n.useState({}),[d,u]=n.useState({all_wrap:!0}),[h,x]=n.useState([]),[p,m]=n.useState(""),[g,C]=n.useState(null),[b,f]=n.useState(""),[_,v]=n.useState(null),[j,w]=n.useState(!1),[y,S]=n.useState(!1),[k,T]=n.useState(null),[M,F]=n.useState();if(t.pageIndex<0||t.pageSize<=0)throw new Error("Invalid pagination values: pageIndex and pageSize must be positive.");const[D,I]=n.useState({left:[],right:[]});return{sorting:s,setSorting:a,pagination:t,setPagination:i,rowSelection:o,setRowSelection:r,expanded:l,setExpanded:c,wrapColumns:d,setWrapColumns:u,filters:h,setFilters:x,savedFilterEditValue:p,setSavedFilterEditValue:m,filterToDelete:g,setFilterToDelete:C,filterSelectedAttributeValue:b,setFilterSelectedAttributeValue:f,filterMaster:_,setFilterMaster:v,showTableFilter:j,setShowTableFilter:w,showFilterOptions:y,setShowFilterOption:S,columnPinning:D,setColumnPinning:I,filterData:k,setFilterData:T,selectedFilterEntity:M,setSelectedFilterEntity:F}},exports.useCraftTableFilterSettings=function(){const[e,t]=n.useState(!1),[i,s]=n.useState({}),[a,o]=n.useState({}),[r,l]=n.useState({}),[c,d]=n.useState({}),[u,h]=n.useState({hasError:!1,messages:[]});return n.useEffect(()=>{i?.quick_tab&&o(i?.quick_tab),i?.column&&l(i?.column),i?.sorting&&d(i?.sorting)},[i]),{settingsData:i,setSettingsData:s,showListViewSettings:e,setShowListViewSettings:t,quickTabStates:a,setQuickTabStates:o,columnTabState:r,setColumnTabState:l,sortingTabState:c,setSortingTabState:d,saveButtonError:u,setSaveButtonError:h}};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@tanstack/react-table"),i=require("react"),n=require("@mui/material"),s=require("@dnd-kit/core"),o=require("@dnd-kit/sortable"),l=require("@dnd-kit/utilities"),r=require("@mui/icons-material/CloseRounded"),a=require("@mui/icons-material/NavigateBeforeRounded"),d=require("@mui/icons-material/NavigateNextRounded"),c=require("@mui/material/styles"),u=require("axios"),h=require("uuid"),x=require("@dnd-kit/modifiers"),p=require("@mui/material/Tabs"),m=require("@mui/material/Tab"),g=require("@mui/material/Box"),C=require("@mui/icons-material"),b=require("@mui/icons-material/Close"),f=require("react-hook-form"),v=require("moment"),j=require("@mui/icons-material/Search"),_=require("@mui/x-date-pickers/LocalizationProvider"),w=require("@mui/x-date-pickers/DatePicker"),y=require("@mui/x-date-pickers/AdapterDateFns"),S=require("@mui/icons-material/ArrowBackIosNew"),k=require("@mui/icons-material/ExpandMore"),T=require("@mui/icons-material/CalendarToday"),M=require("@mui/icons-material/SettingsOutlined"),F=require("@mui/icons-material/ArrowDropDown");function I(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}I(".ts__table__container {\n --black: #000;\n --white: #fff;\n --grey-100: #fafafa;\n --grey-200: #f4f4f4;\n --grey-300: #edeeef;\n --grey-500: #dcddde;\n --grey-600: #bbbbbd;\n --grey-700: #77787b;\n --grey-900: #414042;\n --filter-width: 24rem;\n}\n.ts__table__container * {\n box-sizing: border-box;\n}\n.ts__table__container .ts__table__layout {\n display: flex;\n width: calc(100% - var(--filter-width));\n transition: all 0.4s ease-in-out;\n}\n.ts__table__container .ts__table__layout .ts__table__filter {\n width: 0rem;\n opacity: 0;\n margin-right: calc(-1 * var(--filter-width));\n transition: all 0.4s ease-in-out;\n max-height: calc(100vh - 110px);\n}\n.ts__table__container .ts__table__layout .ts__table__filter.show {\n transition: all 0.4s ease-in-out;\n opacity: 1;\n width: var(--filter-width);\n max-width: var(--filter-width);\n margin-left: 1.25rem;\n margin-right: 0rem;\n min-height: calc(100vh - 110px);\n}\n.ts__table__container .ts__table__layout.has-filter {\n width: 100%;\n}\n.ts__table__container .ts__table__main {\n flex: 1;\n min-width: 0;\n}\n.ts__table__container .ts__loader {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n color: var(--grey-900);\n font-size: 1.2rem;\n}\n.ts__table__container .ts__table__wrapper {\n overflow-x: auto;\n max-height: calc(100vh - 160px);\n}\n.ts__table__container .ts__table__wrapper.is-fullscreen {\n max-height: calc(100vh - 56px);\n}\n.ts__table__container .ts__table__wrapper .ts__table {\n width: max-content;\n min-width: 100%;\n border-spacing: 0;\n border-collapse: separate;\n}\n\n:fullscreen {\n width: 100vw !important;\n height: 100vh !important;\n display: flex !important;\n flex-direction: column !important;\n background: var(--white);\n overflow: hidden;\n}\n\n:-webkit-full-screen {\n width: 100vw !important;\n height: 100vh !important;\n display: flex !important;\n flex-direction: column !important;\n background: var(--white);\n overflow: hidden;\n}");const D=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("polyline",{points:"19 12 12 5 5 12"})]}),B=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),e.jsx("polyline",{points:"5 12 12 19 19 12"})]}),A=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation",children:[e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),e.jsx("path",{fill:"none",d:"M24 24H0V0h24v24z"})]}),L=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation",children:[e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),e.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"})]}),z=()=>e.jsx("svg",{width:"18",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.33331 10.6663H2.17431L8.99865 3.84201L8.15765 3.00101L1.33331 9.82534V10.6663ZM0.93598 11.6663C0.765202 11.6663 0.622091 11.6086 0.506646 11.493C0.391091 11.3776 0.333313 11.2345 0.333313 11.0637V9.90867C0.333313 9.74612 0.364535 9.59118 0.42698 9.44384C0.489313 9.29651 0.575202 9.16812 0.684646 9.05868L9.12698 0.620174C9.22776 0.528619 9.33904 0.457897 9.46081 0.408008C9.5827 0.358008 9.71048 0.333008 9.84415 0.333008C9.97781 0.333008 10.1073 0.35673 10.2325 0.404175C10.3578 0.451619 10.4688 0.527063 10.5653 0.630507L11.3795 1.45484C11.4829 1.5514 11.5566 1.66251 11.6006 1.78817C11.6446 1.91384 11.6666 2.03951 11.6666 2.16517C11.6666 2.29929 11.6438 2.42723 11.598 2.54901C11.5522 2.6709 11.4794 2.78223 11.3795 2.88301L2.94098 11.315C2.83154 11.4245 2.70315 11.5103 2.55581 11.5727C2.40848 11.6351 2.25354 11.6663 2.09098 11.6663H0.93598ZM8.57081 3.42884L8.15765 3.00101L8.99865 3.84201L8.57081 3.42884Z",fill:"#0E0C0B",fillOpacity:.4})}),E=()=>e.jsx("svg",{width:"18",height:"20",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.87183 11.6665C1.54039 11.6665 1.25667 11.5485 1.02067 11.3125C0.784667 11.0765 0.666667 10.7928 0.666667 10.4613V1.99982H0.5C0.358333 1.99982 0.239611 1.95188 0.143833 1.85599C0.0479445 1.7601 0 1.64132 0 1.49966C0 1.35788 0.0479445 1.23916 0.143833 1.14349C0.239611 1.04771 0.358333 0.999823 0.5 0.999823H3C3 0.836601 3.0575 0.69749 3.1725 0.58249C3.28739 0.467601 3.42644 0.410156 3.58967 0.410156H6.41033C6.57356 0.410156 6.71261 0.467601 6.8275 0.58249C6.9425 0.69749 7 0.836601 7 0.999823H9.5C9.64167 0.999823 9.76039 1.04777 9.85617 1.14366C9.95206 1.23955 10 1.35832 10 1.49999C10 1.64177 9.95206 1.76049 9.85617 1.85616C9.76039 1.95193 9.64167 1.99982 9.5 1.99982H9.33333V10.4613C9.33333 10.7928 9.21533 11.0765 8.97933 11.3125C8.74333 11.5485 8.45961 11.6665 8.12817 11.6665H1.87183ZM8.33333 1.99982H1.66667V10.4613C1.66667 10.5212 1.68589 10.5704 1.72433 10.6088C1.76278 10.6473 1.81194 10.6665 1.87183 10.6665H8.12817C8.18806 10.6665 8.23722 10.6473 8.27567 10.6088C8.31411 10.5704 8.33333 10.5212 8.33333 10.4613V1.99982ZM3.7695 9.33316C3.91117 9.33316 4.02989 9.28527 4.12567 9.18949C4.22133 9.0936 4.26917 8.97482 4.26917 8.83316V3.83316C4.26917 3.69149 4.22122 3.57271 4.12533 3.47682C4.02956 3.38104 3.91078 3.33316 3.769 3.33316C3.62733 3.33316 3.50861 3.38104 3.41283 3.47682C3.31717 3.57271 3.26933 3.69149 3.26933 3.83316V8.83316C3.26933 8.97482 3.31722 9.0936 3.413 9.18949C3.50889 9.28527 3.62772 9.33316 3.7695 9.33316ZM6.231 9.33316C6.37267 9.33316 6.49139 9.28527 6.58717 9.18949C6.68283 9.0936 6.73067 8.97482 6.73067 8.83316V3.83316C6.73067 3.69149 6.68278 3.57271 6.587 3.47682C6.49111 3.38104 6.37228 3.33316 6.2305 3.33316C6.08883 3.33316 5.97011 3.38104 5.87433 3.47682C5.77867 3.57271 5.73083 3.69149 5.73083 3.83316V8.83316C5.73083 8.97482 5.77878 9.0936 5.87467 9.18949C5.97044 9.28527 6.08922 9.33316 6.231 9.33316Z",fill:"#F63D68"})}),O=()=>e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M15 3.5H3C2.175 3.5 1.5 4.175 1.5 5V14C1.5 14.825 2.175 15.5 3 15.5H15C15.825 15.5 16.5 14.825 16.5 14V5C16.5 4.175 15.825 3.5 15 3.5ZM6 14H3V5H6V14ZM10.5 14H7.5V5H10.5V14ZM15 14H12V5H15V14Z",fill:"currentColor",stroke:"white",strokeWidth:"0.5"})}),V=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"tabler-icon tabler-icon-grip-horizontal",transform:"rotate(90)",children:[e.jsx("path",{d:"M10 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M10 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M18 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),e.jsx("path",{d:"M18 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),H=t=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1rem",width:"1rem",...t,children:e.jsx("path",{d:"M16 12V4h1V2H7v2h1v8l-2 2v2h5.2v6h1.6v-6H18v-2l-2-2m-7.2 2l1.2-1.2V4h4v8.8l1.2 1.2H8.8z"})}),R=t=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1rem",width:"1rem",...t,children:e.jsx("path",{d:"M8 6.2V4H7V2h10v2h-1v8l2 2v2h-.2L14 12.2V4h-4v4.2l-2-2m12 14.5L18.7 22l-5.9-5.9V22h-1.6v-6H6v-2l2-2v-.7l-6-6L3.3 4 20 20.7M8.8 14h1.8l-.9-.9-.9.9z"})}),q=()=>e.jsxs("svg",{viewBox:"0 0 60 60",width:"4rem",children:[e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"6",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 15 ; 0 -15; 0 15",repeatCount:"indefinite",begin:"0.1"})}),e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"24",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 10 ; 0 -10; 0 10",repeatCount:"indefinite",begin:"0.2"})}),e.jsx("circle",{fill:"currentColor",stroke:"none",cx:"42",cy:"30",r:"5",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})})]}),P=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12587",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12587)",children:e.jsx("path",{d:"M4.42311 17.0834C4.00214 17.0834 3.64582 16.9375 3.35416 16.6459C3.06249 16.3542 2.91666 15.9979 2.91666 15.5769V4.42315C2.91666 4.00217 3.06249 3.64585 3.35416 3.35419C3.64582 3.06252 4.00214 2.91669 4.42311 2.91669H15.5769C15.9978 2.91669 16.3542 3.06252 16.6458 3.35419C16.9375 3.64585 17.0833 4.00217 17.0833 4.42315V15.5769C17.0833 15.9979 16.9375 16.3542 16.6458 16.6459C16.3542 16.9375 15.9978 17.0834 15.5769 17.0834H4.42311ZM4.42311 15.8334H9.37499V4.16669H4.42311C4.35895 4.16669 4.3002 4.19342 4.24687 4.24689C4.19339 4.30023 4.16666 4.35898 4.16666 4.42315V15.5769C4.16666 15.6411 4.19339 15.6998 4.24687 15.7531C4.3002 15.8066 4.35895 15.8334 4.42311 15.8334ZM10.625 15.8334H15.5769C15.641 15.8334 15.6998 15.8066 15.7531 15.7531C15.8066 15.6998 15.8333 15.6411 15.8333 15.5769V10H10.625V15.8334ZM10.625 8.75002H15.8333V4.42315C15.8333 4.35898 15.8066 4.30023 15.7531 4.24689C15.6998 4.19342 15.641 4.16669 15.5769 4.16669H10.625V8.75002Z",fill:"#1E1E1E"})})]}),W=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M11.0833 3.73919L10.2608 2.91669L6.99996 6.17752L3.73913 2.91669L2.91663 3.73919L6.17746 7.00002L2.91663 10.2609L3.73913 11.0834L6.99996 7.82252L10.2608 11.0834L11.0833 10.2609L7.82246 7.00002L11.0833 3.73919Z",fill:"#0C2033"})}),N=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12583",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12583)",children:e.jsx("path",{d:"M7.93274 13.0127C6.50969 13.0127 5.30455 12.5192 4.31733 11.5321C3.33024 10.5449 2.8367 9.33971 2.8367 7.91666C2.8367 6.4936 3.33024 5.28847 4.31733 4.30124C5.30455 3.31416 6.50969 2.82062 7.93274 2.82062C9.3558 2.82062 10.5609 3.31416 11.5482 4.30124C12.5352 5.28847 13.0288 6.4936 13.0288 7.91666C13.0288 8.5118 12.9289 9.0802 12.7292 9.62187C12.5293 10.1635 12.2627 10.6346 11.9294 11.0352L16.7244 15.8302C16.8398 15.9455 16.8989 16.0905 16.9015 16.2652C16.9041 16.4399 16.8451 16.5876 16.7244 16.7083C16.6037 16.829 16.4573 16.8894 16.2852 16.8894C16.1133 16.8894 15.967 16.829 15.8463 16.7083L11.0513 11.9133C10.6346 12.2574 10.1554 12.5266 9.61378 12.721C9.07212 12.9155 8.51177 13.0127 7.93274 13.0127ZM7.93274 11.7629C9.00649 11.7629 9.91594 11.3903 10.6611 10.645C11.4064 9.89985 11.779 8.99041 11.779 7.91666C11.779 6.84291 11.4064 5.93346 10.6611 5.18833C9.91594 4.44305 9.00649 4.07041 7.93274 4.07041C6.85899 4.07041 5.94955 4.44305 5.20441 5.18833C4.45913 5.93346 4.08649 6.84291 4.08649 7.91666C4.08649 8.99041 4.45913 9.89985 5.20441 10.645C5.94955 11.3903 6.85899 11.7629 7.93274 11.7629Z",fill:"#1E1E1E"})})]}),Z=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12710",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12710)",children:e.jsx("path",{d:"M7.63605 10.5369C7.45883 10.5369 7.31036 10.477 7.19064 10.3571C7.07105 10.2374 7.01126 10.089 7.01126 9.9119V4.4696L5.08022 6.40065C4.96744 6.51606 4.82654 6.57377 4.65751 6.57377C4.48848 6.57377 4.33932 6.51398 4.21001 6.3944C4.0807 6.26398 4.01605 6.11488 4.01605 5.94711C4.01605 5.77947 4.0807 5.63099 4.21001 5.50169L7.10105 2.61065C7.17897 2.53259 7.26154 2.47759 7.34876 2.44565C7.43612 2.41356 7.52966 2.39752 7.62939 2.39752C7.72911 2.39752 7.82383 2.41363 7.91355 2.44586C8.00327 2.47822 8.08661 2.53315 8.16355 2.61065L11.0754 5.52252C11.1993 5.64641 11.2604 5.79009 11.2588 5.95356C11.2572 6.11704 11.1918 6.26398 11.0625 6.3944C10.9332 6.51398 10.7868 6.57592 10.6233 6.58023C10.4599 6.5844 10.3136 6.5219 10.1844 6.39273L8.26126 4.4696V9.91981C8.26126 10.0947 8.20133 10.2412 8.08147 10.3594C7.96161 10.4777 7.81314 10.5369 7.63605 10.5369ZM12.3706 17.5946C12.2709 17.5946 12.1762 17.5784 12.0865 17.5461C11.9967 17.5138 11.9134 17.459 11.8365 17.3815L8.92459 14.4696C8.8007 14.3456 8.73959 14.2019 8.74126 14.0386C8.74279 13.8751 8.8082 13.7281 8.93751 13.5977C9.06682 13.4781 9.2132 13.4162 9.37668 13.4119C9.54015 13.4076 9.68647 13.4701 9.81564 13.5994L11.7388 15.5225V10.0721C11.7388 9.89738 11.7987 9.75085 11.9186 9.63252C12.0384 9.51433 12.1869 9.45523 12.364 9.45523C12.5412 9.45523 12.6897 9.51509 12.8094 9.63481C12.929 9.75467 12.9888 9.90315 12.9888 10.0802V15.5225L14.9198 13.5913C15.0326 13.476 15.1735 13.4184 15.3425 13.4184C15.5115 13.4184 15.6607 13.4781 15.79 13.5977C15.9193 13.7281 15.984 13.8772 15.984 14.0448C15.984 14.2126 15.9193 14.3611 15.79 14.4904L12.899 17.3815C12.8211 17.4594 12.7385 17.5144 12.6513 17.5465C12.5639 17.5786 12.4704 17.5946 12.3706 17.5946Z",fill:"#1C1B1F"})})]}),Y=({color:t="#1C1B1F",...i})=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_811_12698",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_811_12698)",children:e.jsx("path",{d:"M8.33333 15V13.3333H11.6667V15H8.33333ZM5 10.8333V9.16667H15V10.8333H5ZM2.5 6.66667V5H17.5V6.66667H2.5Z",fill:t,...i})})]}),$=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_957_24305",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_957_24305)",children:e.jsx("path",{d:"M9.91805 5.74863C10.1889 6.01963 10.3983 6.34891 10.5462 6.73647C10.6941 7.12413 10.75 7.51325 10.714 7.9038C10.714 8.03202 10.6679 8.14058 10.5757 8.22947C10.4834 8.31836 10.3731 8.3628 10.2449 8.3628C10.1167 8.3628 10.0081 8.31836 9.91922 8.22947C9.83033 8.14058 9.78588 8.03202 9.78588 7.9038C9.82866 7.61069 9.80455 7.33291 9.71355 7.07047C9.62255 6.80813 9.4826 6.58252 9.29372 6.39363C9.10483 6.20475 8.87705 6.06136 8.61038 5.96347C8.34372 5.86558 8.06249 5.84013 7.76672 5.88713C7.63849 5.89147 7.52783 5.84852 7.43472 5.7583C7.34149 5.66819 7.29277 5.55902 7.28855 5.4308C7.28422 5.30258 7.32544 5.19186 7.41222 5.09863C7.49899 5.00552 7.60649 4.95686 7.73472 4.95263C8.12272 4.90819 8.51266 4.9588 8.90455 5.10447C9.29644 5.25025 9.63427 5.46497 9.91805 5.74863ZM8.00005 3.99997C7.76327 3.99997 7.53099 4.01152 7.30322 4.03463C7.07544 4.05763 6.84872 4.09563 6.62305 4.14863C6.48116 4.17774 6.35338 4.15747 6.23972 4.0878C6.12605 4.01813 6.04788 3.91791 6.00522 3.78713C5.96244 3.65213 5.97655 3.52375 6.04755 3.40197C6.11844 3.28019 6.22138 3.20474 6.35638 3.17563C6.62483 3.11152 6.89599 3.06625 7.16988 3.0398C7.44388 3.01325 7.7206 2.99997 8.00005 2.99997C9.43249 2.99997 10.7483 3.37219 11.9475 4.11663C13.1467 4.86108 14.0688 5.86836 14.714 7.13847C14.7585 7.22302 14.7908 7.30825 14.8109 7.39413C14.831 7.48002 14.841 7.57086 14.841 7.66663C14.841 7.76241 14.8327 7.85325 14.816 7.93913C14.7994 8.02502 14.7688 8.11024 14.7244 8.1948C14.5202 8.62213 14.2719 9.02063 13.9796 9.3903C13.6872 9.75997 13.3654 10.0995 13.0141 10.409C12.9107 10.5013 12.7926 10.5395 12.6597 10.5236C12.5267 10.5079 12.4175 10.4414 12.332 10.3243C12.2466 10.2072 12.2112 10.0816 12.2257 9.94747C12.2403 9.81325 12.2992 9.69997 12.4026 9.60763C12.7034 9.33497 12.9778 9.03691 13.2257 8.71347C13.4736 8.38991 13.6873 8.04097 13.8667 7.66663C13.3112 6.54441 12.5084 5.65275 11.4584 4.99163C10.4084 4.33052 9.2556 3.99997 8.00005 3.99997ZM8.00005 12.3333C6.5966 12.3333 5.31027 11.9583 4.14105 11.2083C2.97183 10.4583 2.04238 9.47047 1.35272 8.2448C1.29716 8.16025 1.25655 8.06836 1.23088 7.96913C1.20522 7.87002 1.19238 7.76919 1.19238 7.66663C1.19238 7.56408 1.20349 7.46491 1.22572 7.36913C1.24794 7.27347 1.28683 7.17991 1.34238 7.08847C1.59027 6.63547 1.87105 6.20402 2.18472 5.79413C2.49838 5.38436 2.85905 5.01708 3.26672 4.6923L1.76155 3.1768C1.66933 3.07769 1.62383 2.95997 1.62505 2.82363C1.62638 2.6873 1.67533 2.57086 1.77188 2.4743C1.86844 2.37775 1.98555 2.32947 2.12322 2.32947C2.26077 2.32947 2.37783 2.37775 2.47438 2.4743L13.5257 13.5256C13.618 13.618 13.667 13.7322 13.6725 13.8685C13.6781 14.0048 13.6292 14.1247 13.5257 14.2281C13.4292 14.3247 13.312 14.373 13.1744 14.373C13.0368 14.373 12.9198 14.3247 12.8232 14.2281L10.477 11.9025C10.0838 12.0546 9.67972 12.1644 9.26472 12.232C8.84983 12.2995 8.42827 12.3333 8.00005 12.3333ZM3.96938 5.3948C3.57872 5.69658 3.22761 6.0378 2.91605 6.41847C2.60449 6.79924 2.3436 7.2153 2.13338 7.66663C2.68894 8.78886 3.49172 9.68052 4.54172 10.3416C5.59172 11.0027 6.74449 11.3333 8.00005 11.3333C8.28638 11.3333 8.56822 11.3141 8.84555 11.2756C9.12288 11.2372 9.39833 11.1778 9.67188 11.0975L8.82822 10.2333C8.69322 10.2923 8.55838 10.3322 8.42372 10.3531C8.28916 10.3741 8.14794 10.3846 8.00005 10.3846C7.2436 10.3846 6.60149 10.1207 6.07372 9.59297C5.54594 9.06519 5.28205 8.42308 5.28205 7.66663C5.28205 7.51874 5.2936 7.37752 5.31672 7.24297C5.33983 7.1083 5.37872 6.97347 5.43338 6.83847L3.96938 5.3948Z",fill:"#1C1B1F"})})]}),G=()=>e.jsx("svg",{width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.00147 7.38467C7.75692 7.38467 8.39853 7.12028 8.92631 6.5915C9.45408 6.06272 9.71797 5.42061 9.71797 4.66517C9.71797 3.90972 9.45358 3.26811 8.9248 2.74033C8.39603 2.21256 7.75392 1.94867 6.99847 1.94867C6.24303 1.94867 5.60142 2.21306 5.07364 2.74183C4.54586 3.27061 4.28197 3.91272 4.28197 4.66817C4.28197 5.42361 4.54636 6.06522 5.07514 6.593C5.60392 7.12078 6.24603 7.38467 7.00147 7.38467ZM6.99997 6.46667C6.49997 6.46667 6.07497 6.29167 5.72497 5.94167C5.37497 5.59167 5.19997 5.16667 5.19997 4.66667C5.19997 4.16667 5.37497 3.74167 5.72497 3.39167C6.07497 3.04167 6.49997 2.86667 6.99997 2.86667C7.49997 2.86667 7.92497 3.04167 8.27497 3.39167C8.62497 3.74167 8.79997 4.16667 8.79997 4.66667C8.79997 5.16667 8.62497 5.59167 8.27497 5.94167C7.92497 6.29167 7.49997 6.46667 6.99997 6.46667ZM6.99997 9.33333C5.59653 9.33333 4.31297 8.95894 3.1493 8.21017C1.98564 7.4615 1.0568 6.4765 0.362803 5.25517C0.307248 5.15939 0.266637 5.06289 0.24097 4.96567C0.215414 4.86844 0.202637 4.76867 0.202637 4.66633C0.202637 4.564 0.215414 4.46433 0.24097 4.36733C0.266637 4.27033 0.307248 4.17394 0.362803 4.07817C1.0568 2.85683 1.98564 1.87183 3.1493 1.12317C4.31297 0.374389 5.59653 0 6.99997 0C8.40342 0 9.68697 0.374389 10.8506 1.12317C12.0143 1.87183 12.9431 2.85683 13.6371 4.07817C13.6927 4.17394 13.7333 4.27044 13.759 4.36767C13.7845 4.46489 13.7973 4.56467 13.7973 4.667C13.7973 4.76933 13.7845 4.869 13.759 4.966C13.7333 5.063 13.6927 5.15939 13.6371 5.25517C12.9431 6.4765 12.0143 7.4615 10.8506 8.21017C9.68697 8.95894 8.40342 9.33333 6.99997 9.33333ZM6.99997 8.33333C8.25553 8.33333 9.4083 8.00278 10.4583 7.34167C11.5083 6.68055 12.3111 5.78889 12.8666 4.66667C12.3111 3.54444 11.5083 2.65278 10.4583 1.99167C9.4083 1.33056 8.25553 1 6.99997 1C5.74442 1 4.59164 1.33056 3.54164 1.99167C2.49164 2.65278 1.68886 3.54444 1.1333 4.66667C1.68886 5.78889 2.49164 6.68055 3.54164 7.34167C4.59164 8.00278 5.74442 8.33333 6.99997 8.33333Z",fill:"#505050"})}),U=()=>e.jsx("svg",{width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.91793 3.74863C9.18882 4.01963 9.39821 4.34891 9.54609 4.73647C9.69398 5.12413 9.74993 5.51325 9.71393 5.9038C9.71393 6.03202 9.66782 6.14058 9.57559 6.22947C9.48326 6.31836 9.37298 6.3628 9.24476 6.3628C9.11654 6.3628 9.00798 6.31836 8.9191 6.22947C8.83021 6.14058 8.78576 6.03202 8.78576 5.9038C8.82854 5.61069 8.80443 5.33291 8.71343 5.07047C8.62243 4.80813 8.48248 4.58252 8.29359 4.39363C8.1047 4.20475 7.87693 4.06136 7.61026 3.96347C7.34359 3.86558 7.06237 3.84013 6.76659 3.88713C6.63837 3.89147 6.52771 3.84852 6.43459 3.7583C6.34137 3.66819 6.29265 3.55902 6.28843 3.4308C6.28409 3.30258 6.32532 3.19186 6.41209 3.09863C6.49887 3.00552 6.60637 2.95686 6.73459 2.95263C7.12259 2.90819 7.51254 2.9588 7.90443 3.10447C8.29632 3.25025 8.63415 3.46497 8.91793 3.74863ZM6.99993 1.99997C6.76315 1.99997 6.53087 2.01152 6.30309 2.03463C6.07532 2.05763 5.84859 2.09563 5.62293 2.14863C5.48104 2.17774 5.35326 2.15747 5.23959 2.0878C5.12593 2.01813 5.04776 1.91791 5.00509 1.78713C4.96232 1.65213 4.97643 1.52375 5.04743 1.40197C5.11832 1.28019 5.22126 1.20474 5.35626 1.17563C5.62471 1.11152 5.89587 1.06625 6.16976 1.0398C6.44376 1.01325 6.72048 0.999967 6.99993 0.999967C8.43237 0.999967 9.74821 1.37219 10.9474 2.11663C12.1465 2.86108 13.0687 3.86836 13.7139 5.13847C13.7584 5.22302 13.7907 5.30825 13.8108 5.39413C13.8309 5.48002 13.8409 5.57086 13.8409 5.66663C13.8409 5.76241 13.8326 5.85325 13.8159 5.93913C13.7993 6.02502 13.7687 6.11024 13.7243 6.1948C13.52 6.62213 13.2718 7.02063 12.9794 7.3903C12.6871 7.75997 12.3653 8.09952 12.0139 8.40897C11.9106 8.5013 11.7925 8.53952 11.6596 8.52363C11.5266 8.50786 11.4174 8.44141 11.3319 8.3243C11.2465 8.20719 11.211 8.08158 11.2256 7.94747C11.2402 7.81325 11.2991 7.69997 11.4024 7.60763C11.7033 7.33497 11.9777 7.03691 12.2256 6.71347C12.4735 6.38991 12.6872 6.04097 12.8666 5.66663C12.311 4.54441 11.5083 3.65275 10.4583 2.99163C9.40826 2.33052 8.25548 1.99997 6.99993 1.99997ZM6.99993 10.3333C5.59648 10.3333 4.31015 9.9583 3.14093 9.2083C1.97171 8.4583 1.04226 7.47047 0.352594 6.2448C0.297039 6.16025 0.256427 6.06836 0.230761 5.96913C0.205094 5.87002 0.192261 5.76919 0.192261 5.66663C0.192261 5.56408 0.203372 5.46491 0.225594 5.36913C0.247816 5.27347 0.286705 5.17991 0.342261 5.08847C0.59015 4.63547 0.870927 4.20402 1.18459 3.79413C1.49826 3.38436 1.85893 3.01708 2.26659 2.6923L0.761427 1.1768C0.669205 1.07769 0.623705 0.959967 0.624927 0.823634C0.626261 0.6873 0.675205 0.570857 0.771761 0.474301C0.868316 0.377746 0.985427 0.329468 1.12309 0.329468C1.26065 0.329468 1.37771 0.377746 1.47426 0.474301L12.5256 11.5256C12.6179 11.618 12.6669 11.7322 12.6724 11.8685C12.678 12.0048 12.629 12.1247 12.5256 12.2281C12.429 12.3247 12.3119 12.373 12.1743 12.373C12.0367 12.373 11.9197 12.3247 11.8231 12.2281L9.47693 9.90247C9.08371 10.0546 8.67959 10.1644 8.2646 10.232C7.84971 10.2995 7.42815 10.3333 6.99993 10.3333ZM2.96926 3.3948C2.57859 3.69658 2.22748 4.0378 1.91593 4.41847C1.60437 4.79924 1.34348 5.2153 1.13326 5.66663C1.68882 6.78886 2.49159 7.68052 3.54159 8.34163C4.59159 9.00274 5.74437 9.3333 6.99993 9.3333C7.28626 9.3333 7.56809 9.31408 7.84543 9.27563C8.12276 9.23719 8.3982 9.1778 8.67176 9.09747L7.82809 8.2333C7.69309 8.2923 7.55826 8.33224 7.42359 8.35313C7.28904 8.37413 7.14782 8.38463 6.99993 8.38463C6.24348 8.38463 5.60137 8.12074 5.07359 7.59297C4.54582 7.06519 4.28193 6.42308 4.28193 5.66663C4.28193 5.51874 4.29348 5.37752 4.31659 5.24297C4.33971 5.1083 4.37859 4.97347 4.43326 4.83847L2.96926 3.3948Z",fill:"#C5C5C5"})}),K=()=>e.jsx("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.00005 11.0768C1.70394 11.0768 1.45044 10.9714 1.23955 10.7605C1.02866 10.5496 0.923218 10.2961 0.923218 9.99999C0.923218 9.70388 1.02866 9.45038 1.23955 9.23949C1.45044 9.0286 1.70394 8.92316 2.00005 8.92316C2.29616 8.92316 2.54966 9.0286 2.76055 9.23949C2.97144 9.45038 3.07688 9.70388 3.07688 9.99999C3.07688 10.2961 2.97144 10.5496 2.76055 10.7605C2.54966 10.9714 2.29616 11.0768 2.00005 11.0768ZM6.00005 11.0768C5.70394 11.0768 5.45044 10.9714 5.23955 10.7605C5.02866 10.5496 4.92322 10.2961 4.92322 9.99999C4.92322 9.70388 5.02866 9.45038 5.23955 9.23949C5.45044 9.0286 5.70394 8.92316 6.00005 8.92316C6.29616 8.92316 6.54966 9.0286 6.76055 9.23949C6.97144 9.45038 7.07688 9.70388 7.07688 9.99999C7.07688 10.2961 6.97144 10.5496 6.76055 10.7605C6.54966 10.9714 6.29616 11.0768 6.00005 11.0768ZM2.00005 7.07682C1.70394 7.07682 1.45044 6.97138 1.23955 6.76049C1.02866 6.5496 0.923218 6.2961 0.923218 5.99999C0.923218 5.70388 1.02866 5.45038 1.23955 5.23949C1.45044 5.0286 1.70394 4.92316 2.00005 4.92316C2.29616 4.92316 2.54966 5.0286 2.76055 5.23949C2.97144 5.45038 3.07688 5.70388 3.07688 5.99999C3.07688 6.2961 2.97144 6.5496 2.76055 6.76049C2.54966 6.97138 2.29616 7.07682 2.00005 7.07682ZM6.00005 7.07682C5.70394 7.07682 5.45044 6.97138 5.23955 6.76049C5.02866 6.5496 4.92322 6.2961 4.92322 5.99999C4.92322 5.70388 5.02866 5.45038 5.23955 5.23949C5.45044 5.0286 5.70394 4.92316 6.00005 4.92316C6.29616 4.92316 6.54966 5.0286 6.76055 5.23949C6.97144 5.45038 7.07688 5.70388 7.07688 5.99999C7.07688 6.2961 6.97144 6.5496 6.76055 6.76049C6.54966 6.97138 6.29616 7.07682 6.00005 7.07682ZM2.00005 3.07682C1.70394 3.07682 1.45044 2.97138 1.23955 2.76049C1.02866 2.5496 0.923218 2.2961 0.923218 1.99999C0.923218 1.70388 1.02866 1.45038 1.23955 1.23949C1.45044 1.0286 1.70394 0.923157 2.00005 0.923157C2.29616 0.923157 2.54966 1.0286 2.76055 1.23949C2.97144 1.45038 3.07688 1.70388 3.07688 1.99999C3.07688 2.2961 2.97144 2.5496 2.76055 2.76049C2.54966 2.97138 2.29616 3.07682 2.00005 3.07682ZM6.00005 3.07682C5.70394 3.07682 5.45044 2.97138 5.23955 2.76049C5.02866 2.5496 4.92322 2.2961 4.92322 1.99999C4.92322 1.70388 5.02866 1.45038 5.23955 1.23949C5.45044 1.0286 5.70394 0.923157 6.00005 0.923157C6.29616 0.923157 6.54966 1.0286 6.76055 1.23949C6.97144 1.45038 7.07688 1.70388 7.07688 1.99999C7.07688 2.2961 6.97144 2.5496 6.76055 2.76049C6.54966 2.97138 6.29616 3.07682 6.00005 3.07682Z",fill:"#A6A6A6"})}),Q=({...t})=>e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M4.50002 5.50002H1.16669C1.02502 5.50002 0.906298 5.45208 0.81052 5.35619C0.714632 5.2603 0.666687 5.14152 0.666687 4.99985C0.666687 4.85808 0.714632 4.73935 0.81052 4.64369C0.906298 4.54791 1.02502 4.50002 1.16669 4.50002H4.50002V1.16669C4.50002 1.02502 4.54797 0.906298 4.64385 0.81052C4.73974 0.714632 4.85852 0.666687 5.00019 0.666687C5.14197 0.666687 5.26069 0.714632 5.35635 0.81052C5.45213 0.906298 5.50002 1.02502 5.50002 1.16669V4.50002H8.83335C8.97502 4.50002 9.09374 4.54797 9.18952 4.64385C9.28541 4.73974 9.33335 4.85852 9.33335 5.00019C9.33335 5.14197 9.28541 5.26069 9.18952 5.35635C9.09374 5.45213 8.97502 5.50002 8.83335 5.50002H5.50002V8.83335C5.50002 8.97502 5.45208 9.09374 5.35619 9.18952C5.2603 9.28541 5.14152 9.33335 4.99985 9.33335C4.85808 9.33335 4.73935 9.28541 4.64369 9.18952C4.54791 9.09374 4.50002 8.97502 4.50002 8.83335V5.50002Z",fill:"currentColor"})}),X=()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5.72054 8.43116L4.17187 6.88233C4.07954 6.7901 3.96349 6.74288 3.82371 6.74066C3.68404 6.73855 3.56587 6.78577 3.46921 6.88233C3.37265 6.97899 3.32437 7.0961 3.32437 7.23366C3.32437 7.37121 3.37265 7.48833 3.46921 7.58499L5.29871 9.41449C5.41926 9.53494 5.55987 9.59516 5.72054 9.59516C5.88121 9.59516 6.02182 9.53494 6.14237 9.41449L9.85137 5.70549C9.9436 5.61316 9.99082 5.4971 9.99304 5.35733C9.99515 5.21766 9.94793 5.09949 9.85137 5.00283C9.75471 4.90627 9.6376 4.85799 9.50004 4.85799C9.36249 4.85799 9.24537 4.90627 9.14871 5.00283L5.72054 8.43116ZM6.66787 13.3337C5.79187 13.3337 4.96848 13.1674 4.19771 12.835C3.42693 12.5025 2.75648 12.0514 2.18637 11.4815C1.61626 10.9116 1.16487 10.2414 0.832207 9.47099C0.499652 8.70055 0.333374 7.87738 0.333374 7.00149C0.333374 6.12549 0.499596 5.3021 0.832041 4.53133C1.16449 3.76055 1.61565 3.0901 2.18554 2.51999C2.75543 1.94988 3.4256 1.49849 4.19604 1.16583C4.96649 0.83327 5.78965 0.666992 6.66554 0.666992C7.54154 0.666992 8.36493 0.833214 9.13571 1.16566C9.90649 1.4981 10.5769 1.94927 11.147 2.51916C11.7172 3.08905 12.1685 3.75921 12.5012 4.52966C12.8338 5.3001 13 6.12327 13 6.99916C13 7.87516 12.8338 8.69855 12.5014 9.46933C12.1689 10.2401 11.7178 10.9105 11.1479 11.4807C10.578 12.0508 9.90782 12.5022 9.13737 12.8348C8.36693 13.1674 7.54376 13.3337 6.66787 13.3337Z",fill:"#16B364"})}),J=()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6.66659 7.70283L8.71525 9.75166C8.80759 9.84388 8.92364 9.8911 9.06342 9.89333C9.20309 9.89544 9.32125 9.84821 9.41792 9.75166C9.51447 9.65499 9.56275 9.53788 9.56275 9.40033C9.56275 9.26277 9.51447 9.14566 9.41792 9.04899L7.36909 7.00033L9.41792 4.95166C9.51014 4.85933 9.55736 4.74327 9.55959 4.60349C9.5617 4.46383 9.51447 4.34566 9.41792 4.24899C9.32125 4.15244 9.20414 4.10416 9.06659 4.10416C8.92903 4.10416 8.81192 4.15244 8.71525 4.24899L6.66659 6.29783L4.61792 4.24899C4.52559 4.15677 4.40953 4.10955 4.26975 4.10733C4.13009 4.10521 4.01192 4.15244 3.91525 4.24899C3.8187 4.34566 3.77042 4.46277 3.77042 4.60033C3.77042 4.73788 3.8187 4.85499 3.91525 4.95166L5.96409 7.00033L3.91525 9.04899C3.82303 9.14133 3.77581 9.25738 3.77359 9.39716C3.77147 9.53683 3.8187 9.65499 3.91525 9.75166C4.01192 9.84821 4.12903 9.89649 4.26659 9.89649C4.40414 9.89649 4.52125 9.84821 4.61792 9.75166L6.66659 7.70283ZM6.66775 13.3337C5.79175 13.3337 4.96836 13.1674 4.19759 12.835C3.42681 12.5025 2.75636 12.0514 2.18625 11.4815C1.61614 10.9116 1.16475 10.2414 0.832085 9.47099C0.49953 8.70055 0.333252 7.87738 0.333252 7.00149C0.333252 6.12549 0.499474 5.3021 0.831919 4.53133C1.16436 3.76055 1.61553 3.0901 2.18542 2.51999C2.75531 1.94988 3.42547 1.49849 4.19592 1.16583C4.96636 0.83327 5.78953 0.666992 6.66542 0.666992C7.54142 0.666992 8.36481 0.833214 9.13559 1.16566C9.90636 1.4981 10.5768 1.94927 11.1469 2.51916C11.717 3.08905 12.1684 3.75921 12.5011 4.52966C12.8336 5.3001 12.9999 6.12327 12.9999 6.99916C12.9999 7.87516 12.8337 8.69855 12.5013 9.46933C12.1688 10.2401 11.7176 10.9105 11.1478 11.4807C10.5779 12.0508 9.9077 12.5022 9.13725 12.8348C8.36681 13.1674 7.54364 13.3337 6.66775 13.3337Z",fill:"#F63D68"})}),ee=()=>e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_6673_82208",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_6673_82208)",children:e.jsx("path",{d:"M8.00147 10.3847C8.75692 10.3847 9.39853 10.1203 9.92631 9.5915C10.4541 9.06272 10.718 8.42061 10.718 7.66517C10.718 6.90972 10.4536 6.26811 9.9248 5.74033C9.39603 5.21256 8.75392 4.94867 7.99847 4.94867C7.24303 4.94867 6.60142 5.21306 6.07364 5.74183C5.54586 6.27061 5.28197 6.91272 5.28197 7.66817C5.28197 8.42361 5.54636 9.06522 6.07514 9.593C6.60392 10.1208 7.24603 10.3847 8.00147 10.3847ZM7.99997 9.46667C7.49997 9.46667 7.07497 9.29167 6.72497 8.94167C6.37497 8.59167 6.19997 8.16667 6.19997 7.66667C6.19997 7.16667 6.37497 6.74167 6.72497 6.39167C7.07497 6.04167 7.49997 5.86667 7.99997 5.86667C8.49997 5.86667 8.92497 6.04167 9.27497 6.39167C9.62497 6.74167 9.79997 7.16667 9.79997 7.66667C9.79997 8.16667 9.62497 8.59167 9.27497 8.94167C8.92497 9.29167 8.49997 9.46667 7.99997 9.46667ZM7.99997 12.3333C6.59653 12.3333 5.31297 11.9589 4.1493 11.2102C2.98564 10.4615 2.0568 9.4765 1.3628 8.25517C1.30725 8.15939 1.26664 8.06289 1.24097 7.96567C1.21541 7.86844 1.20264 7.76867 1.20264 7.66633C1.20264 7.564 1.21541 7.46433 1.24097 7.36733C1.26664 7.27033 1.30725 7.17394 1.3628 7.07817C2.0568 5.85683 2.98564 4.87183 4.1493 4.12317C5.31297 3.37439 6.59653 3 7.99997 3C9.40342 3 10.687 3.37439 11.8506 4.12317C13.0143 4.87183 13.9431 5.85683 14.6371 7.07817C14.6927 7.17394 14.7333 7.27044 14.759 7.36767C14.7845 7.46489 14.7973 7.56467 14.7973 7.667C14.7973 7.76933 14.7845 7.869 14.759 7.966C14.7333 8.063 14.6927 8.15939 14.6371 8.25517C13.9431 9.4765 13.0143 10.4615 11.8506 11.2102C10.687 11.9589 9.40342 12.3333 7.99997 12.3333ZM7.99997 11.3333C9.25553 11.3333 10.4083 11.0028 11.4583 10.3417C12.5083 9.68055 13.3111 8.78889 13.8666 7.66667C13.3111 6.54444 12.5083 5.65278 11.4583 4.99167C10.4083 4.33056 9.25553 4 7.99997 4C6.74442 4 5.59164 4.33056 4.54164 4.99167C3.49164 5.65278 2.68886 6.54444 2.1333 7.66667C2.68886 8.78889 3.49164 9.68055 4.54164 10.3417C5.59164 11.0028 6.74442 11.3333 7.99997 11.3333Z",fill:"#505050"})})]}),te=()=>e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_6673_82183",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:e.jsx("rect",{width:"16",height:"16",fill:"#D9D9D9"})}),e.jsx("g",{mask:"url(#mask0_6673_82183)",children:e.jsx("path",{d:"M9.91793 5.74876C10.1888 6.01976 10.3982 6.34903 10.5461 6.73659C10.694 7.12426 10.7499 7.51337 10.7139 7.90392C10.7139 8.03215 10.6678 8.1407 10.5756 8.22959C10.4833 8.31848 10.373 8.36292 10.2448 8.36292C10.1165 8.36292 10.008 8.31848 9.9191 8.22959C9.83021 8.1407 9.78576 8.03215 9.78576 7.90392C9.82854 7.61081 9.80443 7.33303 9.71343 7.07059C9.62243 6.80826 9.48248 6.58264 9.29359 6.39376C9.1047 6.20487 8.87693 6.06148 8.61026 5.96359C8.34359 5.8657 8.06237 5.84026 7.76659 5.88726C7.63837 5.89159 7.52771 5.84864 7.43459 5.75842C7.34137 5.66831 7.29265 5.55914 7.28843 5.43092C7.28409 5.3027 7.32532 5.19198 7.41209 5.09876C7.49887 5.00564 7.60637 4.95698 7.73459 4.95276C8.12259 4.90831 8.51254 4.95892 8.90443 5.10459C9.29632 5.25037 9.63415 5.46509 9.91793 5.74876ZM7.99993 4.00009C7.76315 4.00009 7.53087 4.01165 7.30309 4.03476C7.07532 4.05776 6.84859 4.09576 6.62293 4.14876C6.48104 4.17787 6.35326 4.15759 6.23959 4.08792C6.12593 4.01826 6.04776 3.91803 6.00509 3.78726C5.96232 3.65226 5.97643 3.52387 6.04743 3.40209C6.11832 3.28031 6.22126 3.20487 6.35626 3.17576C6.62471 3.11164 6.89587 3.06637 7.16976 3.03992C7.44376 3.01337 7.72048 3.00009 7.99993 3.00009C9.43237 3.00009 10.7482 3.37231 11.9474 4.11676C13.1465 4.8612 14.0687 5.86848 14.7139 7.13859C14.7584 7.22315 14.7907 7.30837 14.8108 7.39426C14.8309 7.48014 14.8409 7.57098 14.8409 7.66676C14.8409 7.76253 14.8326 7.85337 14.8159 7.93926C14.7993 8.02515 14.7687 8.11037 14.7243 8.19492C14.52 8.62226 14.2718 9.02076 13.9794 9.39042C13.6871 9.76009 13.3653 10.0996 13.0139 10.4091C12.9106 10.5014 12.7925 10.5396 12.6596 10.5238C12.5266 10.508 12.4174 10.4415 12.3319 10.3244C12.2465 10.2073 12.211 10.0817 12.2256 9.94759C12.2402 9.81337 12.2991 9.70009 12.4024 9.60776C12.7033 9.33509 12.9777 9.03703 13.2256 8.71359C13.4735 8.39003 13.6872 8.04109 13.8666 7.66676C13.311 6.54453 12.5083 5.65287 11.4583 4.99176C10.4083 4.33065 9.25548 4.00009 7.99993 4.00009ZM7.99993 12.3334C6.59648 12.3334 5.31015 11.9584 4.14093 11.2084C2.97171 10.4584 2.04226 9.47059 1.35259 8.24492C1.29704 8.16037 1.25643 8.06848 1.23076 7.96926C1.20509 7.87014 1.19226 7.76931 1.19226 7.66676C1.19226 7.5642 1.20337 7.46503 1.22559 7.36926C1.24782 7.27359 1.28671 7.18003 1.34226 7.08859C1.59015 6.63559 1.87093 6.20415 2.18459 5.79426C2.49826 5.38448 2.85893 5.0172 3.26659 4.69242L1.76143 3.17692C1.66921 3.07781 1.62371 2.96009 1.62493 2.82376C1.62626 2.68742 1.67521 2.57098 1.77176 2.47442C1.86832 2.37787 1.98543 2.32959 2.12309 2.32959C2.26065 2.32959 2.37771 2.37787 2.47426 2.47442L13.5256 13.5258C13.6179 13.6181 13.6669 13.7324 13.6724 13.8686C13.678 14.0049 13.629 14.1248 13.5256 14.2283C13.429 14.3248 13.3119 14.3731 13.1743 14.3731C13.0367 14.3731 12.9197 14.3248 12.8231 14.2283L10.4769 11.9026C10.0837 12.0547 9.67959 12.1645 9.2646 12.2321C8.84971 12.2996 8.42815 12.3334 7.99993 12.3334ZM3.96926 5.39492C3.57859 5.6967 3.22748 6.03792 2.91593 6.41859C2.60437 6.79937 2.34348 7.21542 2.13326 7.66676C2.68882 8.78898 3.49159 9.68064 4.54159 10.3418C5.59159 11.0029 6.74437 11.3334 7.99993 11.3334C8.28626 11.3334 8.56809 11.3142 8.84543 11.2758C9.12276 11.2373 9.3982 11.1779 9.67176 11.0976L8.82809 10.2334C8.69309 10.2924 8.55826 10.3324 8.42359 10.3533C8.28904 10.3743 8.14782 10.3848 7.99993 10.3848C7.24348 10.3848 6.60137 10.1209 6.07359 9.59309C5.54582 9.06531 5.28193 8.4232 5.28193 7.66676C5.28193 7.51887 5.29348 7.37765 5.31659 7.24309C5.33971 7.10842 5.37859 6.97359 5.43326 6.83859L3.96926 5.39492Z",fill:"#C5C5C5"})})]}),ie={Board:e.jsx(()=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.37179 9H4.05763V1H1.37179C1.3119 1 1.26274 1.01922 1.22429 1.05767C1.18585 1.09611 1.16663 1.14528 1.16663 1.20517V8.79483C1.16663 8.85472 1.18585 8.90389 1.22429 8.94233C1.26274 8.98078 1.3119 9 1.37179 9ZM5.05763 9H7.94229V1H5.05763V9ZM8.94229 9H11.6281C11.688 9 11.7372 8.98078 11.7756 8.94233C11.8141 8.90389 11.8333 8.85472 11.8333 8.79483V1.20517C11.8333 1.14528 11.8141 1.09611 11.7756 1.05767C11.7372 1.01922 11.688 1 11.6281 1H8.94229V9ZM1.37179 10C1.03501 10 0.749959 9.88333 0.516626 9.65C0.283293 9.41667 0.166626 9.13161 0.166626 8.79483V1.20517C0.166626 0.868389 0.283293 0.583333 0.516626 0.35C0.749959 0.116667 1.03501 0 1.37179 0H11.6281C11.9649 0 12.25 0.116667 12.4833 0.35C12.7166 0.583333 12.8333 0.868389 12.8333 1.20517V8.79483C12.8333 9.13161 12.7166 9.41667 12.4833 9.65C12.25 9.88333 11.9649 10 11.6281 10H1.37179Z",fill:"#A6A6A6"})}),{}),Table:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3.17954 9.16671H5.82054C5.96243 9.16671 6.08121 9.11882 6.17687 9.02304C6.27265 8.92737 6.32054 8.8086 6.32054 8.66671C6.32054 8.52482 6.27265 8.40604 6.17687 8.31037C6.08121 8.2146 5.96243 8.16671 5.82054 8.16671H3.17954C3.03765 8.16671 2.91887 8.2146 2.82321 8.31037C2.72743 8.40604 2.67954 8.52482 2.67954 8.66671C2.67954 8.8086 2.72743 8.92737 2.82321 9.02304C2.91887 9.11882 3.03765 9.16671 3.17954 9.16671ZM5.17954 6.50004H7.82054C7.96243 6.50004 8.08121 6.45215 8.17687 6.35637C8.27265 6.26071 8.32054 6.14193 8.32054 6.00004C8.32054 5.85815 8.27265 5.73937 8.17687 5.64371C8.08121 5.54793 7.96243 5.50004 7.82054 5.50004H5.17954C5.03765 5.50004 4.91887 5.54793 4.82321 5.64371C4.72743 5.73937 4.67954 5.85815 4.67954 6.00004C4.67954 6.14193 4.72743 6.26071 4.82321 6.35637C4.91887 6.45215 5.03765 6.50004 5.17954 6.50004ZM7.17954 3.83337H9.82054C9.96243 3.83337 10.0812 3.78549 10.1769 3.68971C10.2727 3.59404 10.3205 3.47526 10.3205 3.33337C10.3205 3.19148 10.2727 3.07271 10.1769 2.97704C10.0812 2.88126 9.96243 2.83337 9.82054 2.83337H7.17954C7.03765 2.83337 6.91887 2.88126 6.82321 2.97704C6.72743 3.07271 6.67954 3.19148 6.67954 3.33337C6.67954 3.47526 6.72743 3.59404 6.82321 3.68971C6.91887 3.78549 7.03765 3.83337 7.17954 3.83337ZM2.03854 11.6667C1.70176 11.6667 1.41671 11.55 1.18337 11.3167C0.950041 11.0834 0.833374 10.7983 0.833374 10.4615V1.53854C0.833374 1.20176 0.950041 0.916707 1.18337 0.683374C1.41671 0.450041 1.70176 0.333374 2.03854 0.333374H10.9615C11.2983 0.333374 11.5834 0.450041 11.8167 0.683374C12.05 0.916707 12.1667 1.20176 12.1667 1.53854V10.4615C12.1667 10.7983 12.05 11.0834 11.8167 11.3167C11.5834 11.55 11.2983 11.6667 10.9615 11.6667H2.03854ZM2.03854 10.6667H10.9615C11.0129 10.6667 11.0599 10.6453 11.1025 10.6025C11.1453 10.5599 11.1667 10.5129 11.1667 10.4615V1.53854C11.1667 1.48721 11.1453 1.44021 11.1025 1.39754C11.0599 1.35476 11.0129 1.33337 10.9615 1.33337H2.03854C1.98721 1.33337 1.94021 1.35476 1.89754 1.39754C1.85476 1.44021 1.83337 1.48721 1.83337 1.53854V10.4615C1.83337 10.5129 1.85476 10.5599 1.89754 10.6025C1.94021 10.6453 1.98721 10.6667 2.03854 10.6667Z",fill:"#A6A6A6"})}),{}),Timeline:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3.17954 9.16671H5.82054C5.96243 9.16671 6.08121 9.11882 6.17687 9.02304C6.27265 8.92737 6.32054 8.8086 6.32054 8.66671C6.32054 8.52482 6.27265 8.40604 6.17687 8.31037C6.08121 8.2146 5.96243 8.16671 5.82054 8.16671H3.17954C3.03765 8.16671 2.91887 8.2146 2.82321 8.31037C2.72743 8.40604 2.67954 8.52482 2.67954 8.66671C2.67954 8.8086 2.72743 8.92737 2.82321 9.02304C2.91887 9.11882 3.03765 9.16671 3.17954 9.16671ZM5.17954 6.50004H7.82054C7.96243 6.50004 8.08121 6.45215 8.17687 6.35637C8.27265 6.26071 8.32054 6.14193 8.32054 6.00004C8.32054 5.85815 8.27265 5.73937 8.17687 5.64371C8.08121 5.54793 7.96243 5.50004 7.82054 5.50004H5.17954C5.03765 5.50004 4.91887 5.54793 4.82321 5.64371C4.72743 5.73937 4.67954 5.85815 4.67954 6.00004C4.67954 6.14193 4.72743 6.26071 4.82321 6.35637C4.91887 6.45215 5.03765 6.50004 5.17954 6.50004ZM7.17954 3.83337H9.82054C9.96243 3.83337 10.0812 3.78549 10.1769 3.68971C10.2727 3.59404 10.3205 3.47526 10.3205 3.33337C10.3205 3.19148 10.2727 3.07271 10.1769 2.97704C10.0812 2.88126 9.96243 2.83337 9.82054 2.83337H7.17954C7.03765 2.83337 6.91887 2.88126 6.82321 2.97704C6.72743 3.07271 6.67954 3.19148 6.67954 3.33337C6.67954 3.47526 6.72743 3.59404 6.82321 3.68971C6.91887 3.78549 7.03765 3.83337 7.17954 3.83337ZM2.03854 11.6667C1.70176 11.6667 1.41671 11.55 1.18337 11.3167C0.950041 11.0834 0.833374 10.7983 0.833374 10.4615V1.53854C0.833374 1.20176 0.950041 0.916707 1.18337 0.683374C1.41671 0.450041 1.70176 0.333374 2.03854 0.333374H10.9615C11.2983 0.333374 11.5834 0.450041 11.8167 0.683374C12.05 0.916707 12.1667 1.20176 12.1667 1.53854V10.4615C12.1667 10.7983 12.05 11.0834 11.8167 11.3167C11.5834 11.55 11.2983 11.6667 10.9615 11.6667H2.03854ZM2.03854 10.6667H10.9615C11.0129 10.6667 11.0599 10.6453 11.1025 10.6025C11.1453 10.5599 11.1667 10.5129 11.1667 10.4615V1.53854C11.1667 1.48721 11.1453 1.44021 11.1025 1.39754C11.0599 1.35476 11.0129 1.33337 10.9615 1.33337H2.03854C1.98721 1.33337 1.94021 1.35476 1.89754 1.39754C1.85476 1.44021 1.83337 1.48721 1.83337 1.53854V10.4615C1.83337 10.5129 1.85476 10.5599 1.89754 10.6025C1.94021 10.6453 1.98721 10.6667 2.03854 10.6667Z",fill:"#A6A6A6"})}),{}),List:e.jsx(()=>e.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5.20521 10.5C5.06354 10.5 4.94476 10.452 4.84887 10.3562C4.7531 10.2603 4.70521 10.1415 4.70521 9.99982C4.70521 9.85805 4.7531 9.73932 4.84887 9.64366C4.94476 9.54788 5.06354 9.49999 5.20521 9.49999H11.6667C11.8084 9.49999 11.9271 9.54794 12.0229 9.64382C12.1188 9.73971 12.1667 9.85849 12.1667 10.0002C12.1667 10.1419 12.1188 10.2607 12.0229 10.3563C11.9271 10.4521 11.8084 10.5 11.6667 10.5H5.20521ZM5.20521 6.49999C5.06354 6.49999 4.94476 6.45205 4.84887 6.35616C4.7531 6.26027 4.70521 6.14149 4.70521 5.99982C4.70521 5.85805 4.7531 5.73932 4.84887 5.64366C4.94476 5.54788 5.06354 5.49999 5.20521 5.49999H11.6667C11.8084 5.49999 11.9271 5.54794 12.0229 5.64382C12.1188 5.73971 12.1667 5.85849 12.1667 6.00016C12.1667 6.14194 12.1188 6.26066 12.0229 6.35632C11.9271 6.4521 11.8084 6.49999 11.6667 6.49999H5.20521ZM5.20521 2.49999C5.06354 2.49999 4.94476 2.45205 4.84887 2.35616C4.7531 2.26027 4.70521 2.14149 4.70521 1.99982C4.70521 1.85805 4.7531 1.73932 4.84887 1.64366C4.94476 1.54788 5.06354 1.49999 5.20521 1.49999H11.6667C11.8084 1.49999 11.9271 1.54794 12.0229 1.64382C12.1188 1.73971 12.1667 1.85849 12.1667 2.00016C12.1667 2.14194 12.1188 2.26066 12.0229 2.35632C11.9271 2.4521 11.8084 2.49999 11.6667 2.49999H5.20521ZM1.94237 11.109C1.63737 11.109 1.37632 11.0004 1.15921 10.7832C0.941985 10.566 0.833374 10.305 0.833374 9.99999C0.833374 9.69499 0.941985 9.43394 1.15921 9.21682C1.37632 8.9996 1.63737 8.89099 1.94237 8.89099C2.24737 8.89099 2.50843 8.9996 2.72554 9.21682C2.94276 9.43394 3.05137 9.69499 3.05137 9.99999C3.05137 10.305 2.94276 10.566 2.72554 10.7832C2.50843 11.0004 2.24737 11.109 1.94237 11.109ZM1.94237 7.10899C1.63737 7.10899 1.37632 7.00038 1.15921 6.78316C0.941985 6.56605 0.833374 6.30499 0.833374 5.99999C0.833374 5.69499 0.941985 5.43394 1.15921 5.21682C1.37632 4.9996 1.63737 4.89099 1.94237 4.89099C2.24737 4.89099 2.50843 4.9996 2.72554 5.21682C2.94276 5.43394 3.05137 5.69499 3.05137 5.99999C3.05137 6.30499 2.94276 6.56605 2.72554 6.78316C2.50843 7.00038 2.24737 7.10899 1.94237 7.10899ZM1.94237 3.10899C1.63737 3.10899 1.37632 3.00038 1.15921 2.78316C0.941985 2.56605 0.833374 2.30499 0.833374 1.99999C0.833374 1.69499 0.941985 1.43394 1.15921 1.21682C1.37632 0.999602 1.63737 0.890991 1.94237 0.890991C2.24737 0.890991 2.50843 0.999602 2.72554 1.21682C2.94276 1.43394 3.05137 1.69499 3.05137 1.99999C3.05137 2.30499 2.94276 2.56605 2.72554 2.78316C2.50843 3.00038 2.24737 3.10899 1.94237 3.10899Z",fill:"#A6A6A6"})}),{}),Calendar:e.jsx(()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.03854 13.3333C1.70176 13.3333 1.41671 13.2167 1.18337 12.9833C0.950041 12.75 0.833374 12.465 0.833374 12.1282V3.20518C0.833374 2.8684 0.950041 2.58334 1.18337 2.35001C1.41671 2.11668 1.70176 2.00001 2.03854 2.00001H2.96154V1.10251C2.96154 0.956399 3.01049 0.834399 3.10837 0.73651C3.20626 0.638732 3.32826 0.589844 3.47437 0.589844C3.6206 0.589844 3.7426 0.638732 3.84037 0.73651C3.93826 0.834399 3.98721 0.956399 3.98721 1.10251V2.00001H9.03854V1.08984C9.03854 0.947955 9.08637 0.829121 9.18204 0.733344C9.27782 0.637677 9.39665 0.589844 9.53854 0.589844C9.68043 0.589844 9.79921 0.637677 9.89487 0.733344C9.99065 0.829121 10.0385 0.947955 10.0385 1.08984V2.00001H10.9615C11.2983 2.00001 11.5834 2.11668 11.8167 2.35001C12.05 2.58334 12.1667 2.8684 12.1667 3.20518V12.1282C12.1667 12.465 12.05 12.75 11.8167 12.9833C11.5834 13.2167 11.2983 13.3333 10.9615 13.3333H2.03854ZM2.03854 12.3333H10.9615C11.0129 12.3333 11.0599 12.312 11.1025 12.2692C11.1453 12.2265 11.1667 12.1795 11.1667 12.1282V5.87184H1.83337V12.1282C1.83337 12.1795 1.85476 12.2265 1.89754 12.2692C1.94021 12.312 1.98721 12.3333 2.03854 12.3333ZM1.83337 4.87184H11.1667V3.20518C11.1667 3.15384 11.1453 3.10684 11.1025 3.06418C11.0599 3.0214 11.0129 3.00001 10.9615 3.00001H2.03854C1.98721 3.00001 1.94021 3.0214 1.89754 3.06418C1.85476 3.10684 1.83337 3.15384 1.83337 3.20518V4.87184ZM6.50004 8.38468C6.33682 8.38468 6.19771 8.32718 6.08271 8.21218C5.96782 8.09729 5.91037 7.95818 5.91037 7.79484C5.91037 7.63162 5.96782 7.49251 6.08271 7.37751C6.19771 7.26262 6.33682 7.20518 6.50004 7.20518C6.66326 7.20518 6.80237 7.26262 6.91737 7.37751C7.03226 7.49251 7.08971 7.63162 7.08971 7.79484C7.08971 7.95818 7.03226 8.09729 6.91737 8.21218C6.80237 8.32718 6.66326 8.38468 6.50004 8.38468ZM3.83337 8.38468C3.67015 8.38468 3.53104 8.32718 3.41604 8.21218C3.30115 8.09729 3.24371 7.95818 3.24371 7.79484C3.24371 7.63162 3.30115 7.49251 3.41604 7.37751C3.53104 7.26262 3.67015 7.20518 3.83337 7.20518C3.9966 7.20518 4.13571 7.26262 4.25071 7.37751C4.3656 7.49251 4.42304 7.63162 4.42304 7.79484C4.42304 7.95818 4.3656 8.09729 4.25071 8.21218C4.13571 8.32718 3.9966 8.38468 3.83337 8.38468ZM9.16671 8.38468C9.00348 8.38468 8.86437 8.32718 8.74937 8.21218C8.63449 8.09729 8.57704 7.95818 8.57704 7.79484C8.57704 7.63162 8.63449 7.49251 8.74937 7.37751C8.86437 7.26262 9.00348 7.20518 9.16671 7.20518C9.32993 7.20518 9.46904 7.26262 9.58404 7.37751C9.69893 7.49251 9.75637 7.63162 9.75637 7.79484C9.75637 7.95818 9.69893 8.09729 9.58404 8.21218C9.46904 8.32718 9.32993 8.38468 9.16671 8.38468ZM6.50004 11C6.33682 11 6.19771 10.9425 6.08271 10.8275C5.96782 10.7126 5.91037 10.5736 5.91037 10.4103C5.91037 10.247 5.96782 10.1079 6.08271 9.99301C6.19771 9.87801 6.33682 9.82051 6.50004 9.82051C6.66326 9.82051 6.80237 9.87801 6.91737 9.99301C7.03226 10.1079 7.08971 10.247 7.08971 10.4103C7.08971 10.5736 7.03226 10.7126 6.91737 10.8275C6.80237 10.9425 6.66326 11 6.50004 11ZM3.83337 11C3.67015 11 3.53104 10.9425 3.41604 10.8275C3.30115 10.7126 3.24371 10.5736 3.24371 10.4103C3.24371 10.247 3.30115 10.1079 3.41604 9.99301C3.53104 9.87801 3.67015 9.82051 3.83337 9.82051C3.9966 9.82051 4.13571 9.87801 4.25071 9.99301C4.3656 10.1079 4.42304 10.247 4.42304 10.4103C4.42304 10.5736 4.3656 10.7126 4.25071 10.8275C4.13571 10.9425 3.9966 11 3.83337 11ZM9.16671 11C9.00348 11 8.86437 10.9425 8.74937 10.8275C8.63449 10.7126 8.57704 10.5736 8.57704 10.4103C8.57704 10.247 8.63449 10.1079 8.74937 9.99301C8.86437 9.87801 9.00348 9.82051 9.16671 9.82051C9.32993 9.82051 9.46904 9.87801 9.58404 9.99301C9.69893 10.1079 9.75637 10.247 9.75637 10.4103C9.75637 10.5736 9.69893 10.7126 9.58404 10.8275C9.46904 10.9425 9.32993 11 9.16671 11Z",fill:"#A6A6A6"})}),{}),Gallery:e.jsx(()=>e.jsx("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.87179 9.33329C1.54035 9.33329 1.25663 9.21529 1.02063 8.97929C0.784626 8.74329 0.666626 8.45957 0.666626 8.12813V1.87179C0.666626 1.54035 0.784626 1.25663 1.02063 1.02063C1.25663 0.784626 1.54035 0.666626 1.87179 0.666626H8.12813C8.45957 0.666626 8.74329 0.784626 8.97929 1.02063C9.21529 1.25663 9.33329 1.54035 9.33329 1.87179V8.12813C9.33329 8.45957 9.21529 8.74329 8.97929 8.97929C8.74329 9.21529 8.45957 9.33329 8.12813 9.33329H1.87179ZM11.2723 4.33329C11.0984 4.33329 10.954 4.27579 10.8391 4.16079C10.7241 4.0459 10.6666 3.90151 10.6666 3.72763V1.27246C10.6666 1.09846 10.7241 0.954014 10.8391 0.839126C10.954 0.724126 11.0984 0.666626 11.2723 0.666626H13.7275C13.9015 0.666626 14.0459 0.724126 14.1608 0.839126C14.2758 0.954014 14.3333 1.09846 14.3333 1.27246V3.72763C14.3333 3.90151 14.2758 4.0459 14.1608 4.16079C14.0459 4.27579 13.9015 4.33329 13.7275 4.33329H11.2723ZM11.6666 3.33329H13.3333V1.66663H11.6666V3.33329ZM1.87179 8.33329H8.12813C8.18802 8.33329 8.23718 8.31407 8.27563 8.27563C8.31407 8.23718 8.33329 8.18802 8.33329 8.12813V1.87179C8.33329 1.8119 8.31407 1.76274 8.27563 1.72429C8.23718 1.68585 8.18802 1.66663 8.12813 1.66663H1.87179C1.8119 1.66663 1.76274 1.68585 1.72429 1.72429C1.68585 1.76274 1.66663 1.8119 1.66663 1.87179V8.12813C1.66663 8.18802 1.68585 8.23718 1.72429 8.27563C1.76274 8.31407 1.8119 8.33329 1.87179 8.33329ZM2.99996 6.96796H6.99996C7.11829 6.96796 7.20707 6.91324 7.26629 6.80379C7.32552 6.69435 7.31707 6.58835 7.24096 6.48579L6.15763 5.03579C6.09529 4.95546 6.01496 4.91529 5.91663 4.91529C5.81829 4.91529 5.73796 4.95546 5.67563 5.03579L4.66663 6.38463L3.99096 5.48579C3.92863 5.40546 3.84829 5.36529 3.74996 5.36529C3.65163 5.36529 3.57129 5.40546 3.50896 5.48579L2.75896 6.48579C2.68285 6.58835 2.6744 6.69435 2.73363 6.80379C2.79285 6.91324 2.88163 6.96796 2.99996 6.96796ZM11.2723 9.33329C11.0984 9.33329 10.954 9.27579 10.8391 9.16079C10.7241 9.0459 10.6666 8.90146 10.6666 8.72746V6.27229C10.6666 6.0984 10.7241 5.95402 10.8391 5.83913C10.954 5.72413 11.0984 5.66663 11.2723 5.66663H13.7275C13.9015 5.66663 14.0459 5.72413 14.1608 5.83913C14.2758 5.95402 14.3333 6.0984 14.3333 6.27229V8.72746C14.3333 8.90146 14.2758 9.0459 14.1608 9.16079C14.0459 9.27579 13.9015 9.33329 13.7275 9.33329H11.2723ZM11.6666 8.33329H13.3333V6.66663H11.6666V8.33329Z",fill:"#A6A6A6"})}),{}),Charts:e.jsx(()=>e.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.14485 1.42317C7.14485 1.22028 7.22413 1.058 7.38268 0.936332C7.54124 0.814666 7.71879 0.777333 7.91535 0.824333C9.12135 1.07389 10.16 1.64056 11.0314 2.52433C11.9028 3.40811 12.4633 4.46328 12.7128 5.68983C12.753 5.86583 12.7148 6.02133 12.5985 6.15633C12.4822 6.29144 12.3228 6.359 12.1205 6.359H8.42435C8.38424 6.359 8.34907 6.34894 8.31885 6.32883C8.28874 6.30872 8.26363 6.27861 8.24352 6.2385C8.14352 6.01794 8.00863 5.82105 7.83885 5.64783C7.66896 5.47461 7.47779 5.34072 7.26535 5.24617C7.22524 5.22628 7.19513 5.20389 7.17502 5.179C7.1549 5.15411 7.14485 5.12178 7.14485 5.082V1.42317ZM8.14485 1.95133V4.60267C8.29274 4.70689 8.43079 4.82206 8.55902 4.94817C8.68724 5.07417 8.80135 5.21111 8.90135 5.359H11.5653C11.3158 4.54278 10.8874 3.831 10.2802 3.22367C9.67285 2.61644 8.96107 2.19233 8.14485 1.95133ZM5.10518 13.1692C3.6804 12.8462 2.5039 12.113 1.57568 10.9697C0.647461 9.82644 0.18335 8.50322 0.18335 7C0.18335 5.49367 0.647461 4.17028 1.57568 3.02983C2.5039 1.8895 3.6804 1.1565 5.10518 0.830832C5.30607 0.783832 5.48685 0.8265 5.64752 0.958833C5.80818 1.09117 5.88852 1.25917 5.88852 1.46283V5.108C5.88852 5.11867 5.85729 5.16128 5.79485 5.23583C5.43852 5.38294 5.15352 5.61672 4.93985 5.93717C4.72607 6.25772 4.61918 6.61244 4.61918 7.00133C4.61918 7.39022 4.72607 7.74 4.93985 8.05067C5.15352 8.36133 5.43852 8.58805 5.79485 8.73083C5.81285 8.73761 5.84407 8.77989 5.88852 8.85767V12.5577C5.88852 12.7643 5.80818 12.9297 5.64752 13.0537C5.48685 13.1777 5.30607 13.2162 5.10518 13.1692ZM4.88852 1.95133C3.78341 2.28033 2.88957 2.91194 2.20702 3.84617C1.52457 4.78039 1.18335 5.83167 1.18335 7C1.18335 8.16833 1.52457 9.21961 2.20702 10.1538C2.88957 11.0881 3.78341 11.7265 4.88852 12.0692V9.37183C4.50052 9.08805 4.19196 8.74122 3.96285 8.33133C3.73385 7.92156 3.61935 7.47672 3.61935 6.99683C3.61935 6.51694 3.73279 6.071 3.95968 5.659C4.18657 5.247 4.49618 4.89911 4.88852 4.61533V1.95133ZM7.89618 13.1757C7.69963 13.2183 7.52524 13.1806 7.37302 13.0625C7.2209 12.9443 7.14485 12.7867 7.14485 12.5897V8.90133C7.14485 8.86111 7.1549 8.82594 7.17502 8.79583C7.19513 8.76572 7.22524 8.74061 7.26535 8.7205C7.48335 8.62472 7.67707 8.49194 7.84652 8.32217C8.01596 8.15228 8.14829 7.96111 8.24352 7.74867C8.2504 7.735 8.30713 7.69483 8.41368 7.62817H12.1205C12.3022 7.62817 12.4536 7.70405 12.5747 7.85583C12.6958 8.0075 12.7363 8.17822 12.6962 8.368C12.4355 9.59444 11.8667 10.6417 10.9897 11.5097C10.1128 12.3776 9.08163 12.9329 7.89618 13.1757ZM8.90135 8.62817C8.79957 8.77172 8.68502 8.90656 8.55768 9.03267C8.43035 9.15878 8.29274 9.27183 8.14485 9.37183V12.0487C8.9654 11.8034 9.67824 11.3772 10.2833 10.7698C10.8885 10.1626 11.3158 9.44872 11.5653 8.62817H8.90135Z",fill:"#A6A6A6"})}),{})},ne=({onSelect:t,selectedLayout:i})=>e.jsxs(n.Box,{sx:{width:"100%",maxWidth:"500px",height:"330px"},children:[e.jsxs(n.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,py:2,backgroundColor:"#FBFBFC"},children:[e.jsx(n.Typography,{variant:"h5",sx:{fontWeight:400,fontSize:18,color:"#0C2033"},children:"Layouts"}),e.jsx(n.IconButton,{onClick:()=>t("close"),children:e.jsx(W,{})})]}),e.jsx(n.Grid,{container:!0,spacing:2,sx:{p:3},children:Object.keys(ie).map(s=>{const o=s===i;return e.jsx(n.Grid,{size:3,children:e.jsxs(n.ButtonBase,{onClick:()=>t(s),sx:{border:o?"1.5px solid #1E1E1E":"1.5px solid #E5E7EB",borderRadius:2,p:2,width:"100%",height:"100%",flexDirection:"column",backgroundColor:o?"#fff":"",transition:"0.3s",boxShadow:o?"0px 2px 6px rgba(0,0,0,0.06)":"none"},children:[e.jsx(n.Box,{mb:1,children:ie[s]}),e.jsx(n.Typography,{variant:"subtitle1",sx:{color:"#1E1E1E",fontWeight:o?400:200,opacity:o?1:.5},children:s})]})},s)})})]}),se=({ref:e,handler:t})=>{i.useEffect(()=>{const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[e,t])};function oe(){const[e,t]=i.useState(!!document.fullscreenElement),[n,s]=i.useState(document.fullscreenElement??void 0);return i.useEffect(()=>{const e=()=>{const e=document.fullscreenElement??void 0;t(!!e),s(e)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:e,container:n}}I(".ts__table__container .ts-topbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #fff;\n}\n.ts__table__container .ts-topbar .tabs-section {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n}\n.ts__table__container .ts-topbar .right-section {\n display: flex;\n justify-content: center;\n flex-shrink: 0;\n}\n.ts__table__container .ts-topbar .right-section .search-wrapper {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n position: relative;\n margin-right: 0.1rem;\n}\n.ts__table__container .ts-topbar .right-section .search-wrapper .search-icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 1.2rem;\n}\n.ts__table__container .ts-topbar .right-section .ts--button {\n margin-right: 0.6rem;\n margin-top: 1rem;\n cursor: pointer;\n}\n.ts__table__container .ts-topbar .right-section .change-layout {\n margin-top: 0.99rem;\n cursor: pointer;\n}\n.ts__table__container .ts-topbar .right-section .sort {\n margin-top: 1rem;\n}\n.ts__table__container .ts-topbar .right-section .fullscreen-toggle {\n margin-right: 0.5rem;\n margin-top: 0.9rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column {\n margin-top: 0.9rem;\n position: relative;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .toggle-all {\n cursor: pointer;\n width: inherit;\n background-color: #fff;\n padding: 0.25rem 1rem;\n border-radius: 0.25rem;\n border: 1px solid #dbdbdb;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .toggle-all:hover {\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches {\n margin-top: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches .ts-column-visible {\n display: flex;\n gap: 0.5rem;\n}\n.ts__table__container .ts-topbar .right-section .hide-column .ts-dropdown .ts-dropdown-content .switches .ts-column-visible .ts-column-visible-label {\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.MuiDrawer-root {\n display: block !important;\n transform: none !important;\n}");const le=({compactMode:t,onCompactToggle:i,isFullscreen:s,onFullscreenToggle:o,tableStates:l,onClose:r})=>{const{container:a}=oe(),{wrapColumns:d,setWrapColumns:c}=l;return e.jsxs(n.Box,{sx:{p:3,width:380},children:[e.jsxs(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,children:[e.jsx(n.Typography,{fontSize:"18px",fontWeight:400,color:"#0C2033",children:"View"}),e.jsx(n.IconButton,{size:"small",onClick:r,children:e.jsx(W,{})})]}),e.jsxs(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[e.jsx(n.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"Wrap Cell"}),e.jsx(n.Switch,{checked:d?.all_wrap||!1,onChange:()=>{c(e=>({all_wrap:!e.all_wrap}))}})]}),e.jsxs(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[e.jsx(n.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"List View"}),e.jsxs(n.Select,{size:"small",value:t?"Compact":"Comfy",onChange:e=>i(e.target.value),sx:{minWidth:120,fontWeight:400,color:"#000",fontSize:"13px"},MenuProps:{container:a,disablePortal:!1,PaperProps:{style:{zIndex:1500}}},children:[e.jsx(n.MenuItem,{value:"Comfy",children:"Comfy"}),e.jsx(n.MenuItem,{value:"Compact",children:"Compact"})]})]}),e.jsxs(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(n.Typography,{fontSize:"14px",fontWeight:400,color:"#000000DE",children:"Fullscreen"}),e.jsx(n.Switch,{checked:s,onChange:o})]})]})},re=({id:t,children:i})=>{const{attributes:n,listeners:s,setNodeRef:r,transform:a,transition:d}=o.useSortable({id:t});return e.jsxs("div",{ref:r,style:{transform:l.CSS.Transform.toString(a),transition:d,display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{...n,...s,style:{cursor:"grab"},children:e.jsx(V,{})}),e.jsx("div",{style:{flexGrow:1},children:i})]})},ae=({anchorEl:t,onClose:l,columns:r,onChange:a})=>{const[d,c]=i.useState([]),u=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),h=(e,t,i)=>{const n=d.map(n=>n.id===e?{...n,[t]:i}:n);c(n),x(n)},x=e=>{const t=e.map(e=>({id:e.field,desc:"desc"===e.direction}));a(t)};return e.jsx(n.Popover,{open:Boolean(t),anchorEl:t,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsxs(n.Box,{p:2,minWidth:300,children:[e.jsxs(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",px:2,py:1,sx:{backgroundColor:"#F9FAFB",margin:"-16px -16px 16px -16px"},children:[e.jsx(n.Typography,{fontSize:"18px",fontWeight:600,color:"#0C2033",children:"Sort By"}),e.jsx(n.IconButton,{size:"small",onClick:l,children:e.jsx(W,{})})]}),d.length>0&&e.jsx(s.DndContext,{sensors:u,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(t.id!==i.id){const e=d.findIndex(e=>e.id===t.id),n=d.findIndex(e=>e.id===i.id),s=o.arrayMove(d,e,n);c(s),x(s)}},children:e.jsx(o.SortableContext,{items:d.map(e=>e.id),strategy:o.verticalListSortingStrategy,children:d.map(t=>e.jsx(re,{id:t.id,children:e.jsxs(n.Box,{display:"flex",gap:1,alignItems:"center",mb:1,children:[e.jsx(n.Select,{value:t.field,onChange:e=>h(t.id,"field",e.target.value),size:"small",fullWidth:!0,sx:{fontWeight:400,fontSize:14,color:"#000"},children:r.map(t=>e.jsx(n.MenuItem,{value:t.id,children:t.label},t.id))}),e.jsxs(n.Select,{value:t.direction,onChange:e=>h(t.id,"direction",e.target.value),size:"small",sx:{fontWeight:400,fontSize:14,color:"#000"},children:[e.jsx(n.MenuItem,{value:"asc",children:"Ascending"}),e.jsx(n.MenuItem,{value:"desc",children:"Descending"})]}),e.jsx(n.IconButton,{size:"small",onClick:()=>(e=>{const t=d.filter(t=>t.id!==e);c(t),x(t)})(t.id),children:e.jsx(W,{})})]})},t.id))})}),e.jsx(n.Button,{onClick:()=>{const e={id:Date.now().toString(),field:r[0]?.id??"",direction:"asc"},t=[...d,e];c(t),x(t)},startIcon:e.jsx("span",{children:e.jsx(Q,{})}),size:"small",sx:{fontWeight:400,fontSize:12,color:"#888888"},children:"Add Sort"})]})})},de=({column:t,onToggle:i})=>{const{attributes:s,listeners:r,setNodeRef:a,transform:d,transition:c}=o.useSortable({id:t.id}),u={transform:l.CSS.Transform.toString(d),transition:c},h=t.getIsVisible(),x="string"==typeof t.columnDef.header?t.columnDef.header:t.id;return e.jsxs("div",{ref:a,style:u,...s,className:"column-row",children:[e.jsx(n.Box,{...r,className:"drag-icon",children:e.jsx(K,{})}),e.jsx(n.Typography,{children:(p=x,p?p.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase()).trim():"")}),e.jsx(n.Box,{onClick:i,className:"visibility-icon",children:h?e.jsx(G,{}):e.jsx(U,{})})]});var p};I(".column-manager {\n width: 320px;\n padding: 0;\n background-color: var(--white);\n}\n.column-manager .header {\n width: 100%;\n padding: 10px 16px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: 400;\n font-size: 18px;\n background-color: #fbfbfc;\n color: #0c2033;\n box-sizing: border-box;\n}\n.column-manager .content-wrapper {\n padding: 10px;\n}\n.column-manager .list-section {\n margin-top: 10px;\n}\n.column-manager .list-section .list-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 12px;\n font-weight: 500;\n color: #888888;\n margin-bottom: 8px;\n padding: 10px 4px;\n}\n.column-manager .list-section .column-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 9px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n cursor: grab;\n}\n.column-manager .list-section .column-row:hover {\n background-color: #f5f5f5;\n}\n.column-manager .list-section .column-row.hidden {\n opacity: 0.6;\n}\n.column-manager .list-section .column-row .drag-icon {\n cursor: grab;\n margin-right: 14px;\n color: #888;\n}\n.column-manager .list-section .column-row .visibility-icon {\n cursor: pointer;\n color: #505050;\n}\n.column-manager .list-section .column-row .MuiTypography-root {\n flex-grow: 1;\n font-size: 14px;\n font-weight: 400;\n}");const ce=({anchorEl:t,onClose:i,table:l,columnOrder:r,setColumnOrder:a})=>{const d=Boolean(t),c=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),u=l.getAllLeafColumns(),h=r.map(e=>u.find(t=>t.id===e)).filter(e=>e?.getIsVisible()),x=r.map(e=>u.find(t=>t.id===e)).filter(e=>e&&!e.getIsVisible()),p=e=>{const t=l.getColumn(e);t?.toggleVisibility()};return e.jsx(n.Popover,{open:d,anchorEl:t,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},sx:{width:"600px"},children:e.jsxs("div",{className:"column-manager",children:[e.jsxs("div",{className:"header",children:[e.jsx(n.Typography,{variant:"h6",children:"Column"}),e.jsx(n.IconButton,{size:"small",onClick:i,children:e.jsx(W,{})})]}),e.jsx("div",{className:"content-wrapper",children:e.jsxs(s.DndContext,{sensors:c,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(!i||t.id===i.id)return;const n=l.getColumn(t.id),s=l.getColumn(i.id);if(!n||!s)return;n.getIsVisible()!==s.getIsVisible()&&n.toggleVisibility();const d=r.indexOf(t.id),c=r.indexOf(i.id);a(o.arrayMove(r,d,c))},children:[e.jsxs("div",{className:"list-section",children:[e.jsxs("div",{className:"list-header",children:[e.jsx(n.Typography,{variant:"subtitle2",children:"Shown in List"}),e.jsx(n.Box,{onClick:()=>{u.forEach(e=>e.toggleVisibility(!1))},fontStyle:{cursor:"pointer",color:"#C5C5C5",fontSize:"12px"},children:"Hide All"})]}),e.jsx(o.SortableContext,{items:h.map(e=>e.id),strategy:o.verticalListSortingStrategy,children:h.map(t=>e.jsx(de,{column:t,onToggle:()=>p(t.id)},t.id))})]}),e.jsxs("div",{className:"list-section",children:[e.jsxs("div",{className:"list-header",children:[e.jsx(n.Typography,{variant:"subtitle2",children:"Hidden in List"}),e.jsx(n.Box,{onClick:()=>{u.forEach(e=>e.toggleVisibility(!0))},fontStyle:{cursor:"pointer",color:"#C5C5C5",fontSize:"12px"},children:"Show All"})]}),e.jsx(o.SortableContext,{items:x.map(e=>e.id),strategy:o.verticalListSortingStrategy,children:x.map(t=>e.jsx(de,{column:t,onToggle:()=>p(t.id)},t.id))})]})]})})]})})},ue=(e,t)=>{let i;return function(...n){const s=this;clearTimeout(i),i=setTimeout(()=>{e.apply(s,n)},t)}},he=e=>({width:e?"180px":"40px",transition:"all 0.3s ease",opacity:e?1:.8,marginRight:"0.5rem","& .MuiOutlinedInput-root":{paddingRight:"4px",height:"32px",borderRadius:"6px",backgroundColor:"#fff",border:e?"1px solid #ccc":"none"},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"none"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{}," & .css-4bojcr-MuiInputBase-root-MuiOutlinedInput-root ":{paddingLeft:"6px !important"},"& .css-1mnoz6i-MuiInputBase-root-MuiOutlinedInput-root":{paddingLeft:"6px !important"}}),xe=({value:t,onChange:s})=>{const[o,l]=i.useState(!1),[a,d]=i.useState(t),c=i.useRef(null),u=i.useCallback(ue(e=>{s(e)},1e3),[s]);i.useEffect(()=>{d(t)},[t]),se({ref:c,handler:()=>{l(!1)}});const h=e=>{const t=e.target.value;d(t),u(t)};return e.jsx(n.Box,{ref:c,className:"search-container",sx:{display:"flex",position:"relative",top:"10px"},children:e.jsx(n.TextField,{type:"text",placeholder:"Search",value:a,onChange:h,onKeyDown:e=>{"Enter"===e.key&&s(a),"Escape"===e.key&&l(!1)},className:"search-input "+(o?"expanded":""),sx:he(o),InputProps:{startAdornment:e.jsx(n.InputAdornment,{position:"start",children:e.jsx(n.IconButton,{size:"small",onClick:()=>{l(e=>!e),o||setTimeout(()=>{c.current?.querySelector("input")?.focus()},100)},sx:{color:"black",fontSize:"14px"},edge:"start",children:e.jsx(N,{})})}),endAdornment:o&&""!==a?e.jsx(n.InputAdornment,{position:"end",children:e.jsx(n.IconButton,{size:"small",onClick:()=>{d(""),h({target:{value:""}})},sx:{color:"black",fontSize:"14px"},edge:"end",children:e.jsx(r,{fontSize:"small",sx:{color:"black",fontSize:"14px"}})})}):null}})})};function pe({table:t,isCompactTable:s,isFullscreen:o,fullscreenToggle:l,setIsCompactTable:r,paginationComponent:a,topbarOptions:d,tableStates:c,onFilterButtonClick:u}){const[h,x]=i.useState(null),[p,m]=i.useState("None"),[g,C]=i.useState(!1),[b,f]=i.useState(null),[v,j]=i.useState("Table"),[_,w]=i.useState(null),[y,S]=i.useState(t.getAllLeafColumns().map(e=>e.id)),{setShowTableFilter:k}=c,[T,M]=i.useState(!1),F=i.useRef(null);i.useEffect(()=>{t.setColumnOrder(y)},[y]),i.useEffect(()=>{o&&(f(null),x(null),w(null),N(null),C(!1))},[o]);const{leftSideComponent:I,rightSideComponent:D,showColumnToggle:B,showChangeLayoutToggle:A,showSortingToggle:L,showFilterToggle:z,showSearch:E,searchValue:V,onSearchChange:H}=d??{},{container:R}=oe(),q=i.useRef(null);se({ref:q,handler:()=>C(!1)});se({ref:F,handler:()=>M(!1)}),i.useEffect(()=>{const e=e=>{const t=e.detail?.target;f(t)},t=()=>{u?.()},i=e=>{const t=e.detail?.target;t&&N(t)},n=()=>{M(!0),setTimeout(()=>{F.current?.querySelector("input")?.focus()},100)};return window.addEventListener("triggerLayoutPopover",e),window.addEventListener("triggerFilterButton",t),window.addEventListener("triggerViewMore",i),window.addEventListener("triggerSearchInput",n),()=>{window.removeEventListener("triggerLayoutPopover",e),window.removeEventListener("triggerFilterButton",t),window.removeEventListener("triggerViewMore",i),window.removeEventListener("triggerSearchInput",n)}},[u]);const[W,N]=i.useState(null),$=Boolean(W);return e.jsxs("div",{className:"ts-topbar",children:[e.jsx("div",{className:"tabs-section",children:e.jsx("div",{style:{overflowX:"auto",whiteSpace:"nowrap"},children:I})}),e.jsxs("div",{className:"right-section",children:[D,a,E&&e.jsx("div",{title:"Search",className:"external-search-trigger",onClick:()=>{const e=new CustomEvent("triggerSearchInput");window.dispatchEvent(e)},ref:F,children:e.jsx(xe,{value:V??"",onChange:H??(()=>{})})}),A&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"change-layout ts--button",title:"Layout",children:e.jsx("div",{onClick:e=>{const t=new CustomEvent("triggerLayoutPopover",{detail:{target:e.currentTarget}});window.dispatchEvent(t)},className:"external-layout-trigger",children:e.jsx(P,{})})})}),e.jsx(n.Popover,{open:Boolean(b),anchorEl:b,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},container:R,sx:{mt:2.2},children:e.jsx(ne,{onSelect:e=>{j(e),f(null)},selectedLayout:v})}),B&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hide-column ts--button",onClick:e=>w(e.currentTarget),title:"Column",children:e.jsx(O,{})}),e.jsx(ce,{anchorEl:_,onClose:()=>w(null),table:t,columnOrder:y,setColumnOrder:S})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filter ts--button",title:"Sort",onClick:e=>x(e.currentTarget),children:e.jsx(Z,{})}),e.jsx(ae,{anchorEl:h,onClose:()=>x(null),columns:t.getAllLeafColumns().map(e=>({id:e.id,label:e.columnDef.meta?.label||e.id})),onChange:e=>t.setSorting(e)})]}),z&&e.jsxs("div",{className:"filter ts--button",title:"Filter",onClick:u,style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:c.showTableFilter||c.filters.length>0?"#eae4fe":"transparent",height:"25px",width:"25px",borderRadius:"6px",cursor:"pointer"},children:[e.jsx(Y,{color:c.showTableFilter||c.filters.length>0?"#7A5AF8":"#1C1B1F"}),c.filters.length>0&&!c.showTableFilter&&e.jsx("span",{style:{position:"absolute",top:"1px",right:"1px",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F63D68"}})]}),e.jsx(n.Popover,{open:$,anchorEl:W,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},container:R,children:e.jsx(le,{compactMode:s,onCompactToggle:e=>r("Compact"===e),isFullscreen:o,onFullscreenToggle:l,groupBy:p,onGroupByChange:e=>m(e),tableStates:c,onClose:()=>N(null)})})]})]})}const me=c.styled(n.Box)(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"flex-end",alignItems:"center",gap:e.spacing(2),fontSize:e.typography.pxToRem(14),backgroundColor:e.palette.common.white,[e.breakpoints.down("md")]:{justifyContent:"center",fontSize:e.typography.pxToRem(12)}})),ge=c.styled(n.Box)(({theme:e})=>({display:"flex",alignItems:"center",[e.breakpoints.down("md")]:{display:"none"}})),Ce=c.styled(n.Box)(({theme:e})=>({display:"flex",alignItems:"center",[e.breakpoints.down("sm")]:{display:"none"}})),be=c.styled(n.Box)(({theme:e})=>({whiteSpace:"nowrap",fontSize:e.typography.pxToRem(14),[e.breakpoints.down("sm")]:{display:"none"}})),fe=c.styled(n.Box)(({theme:e})=>({whiteSpace:"nowrap",fontSize:e.typography.pxToRem(14)})),ve=c.styled(n.Box)(({theme:e})=>({display:"flex",gap:e.spacing(1)})),je=c.styled(n.IconButton)(({theme:e})=>({borderRadius:"50%",height:24,width:24,padding:2,transition:"0.4s","&:hover":{backgroundColor:e.palette.grey[300],boxShadow:"0 1px 2px 0 rgba(60,64,67,.6), 0 1px 3px 1px rgba(60,64,67,.3)"},"&.Mui-disabled":{color:e.palette.action.disabled},[e.breakpoints.down("sm")]:{height:24,width:24,padding:0,"& svg":{width:20,height:20}}})),_e=c.styled(n.Select)(({theme:e})=>({borderRadius:e.shape.borderRadius,padding:e.spacing(0),fontSize:e.typography.pxToRem(12),"& .MuiSelect-select":{padding:e.spacing(.5,.75)}})),we=c.styled(n.InputBase)(({theme:e})=>({width:60,textAlign:"center",borderRadius:e.shape.borderRadius,border:`1px solid ${e.palette.divider}`,fontSize:e.typography.pxToRem(12),"& .MuiInputBase-input":{padding:e.spacing(.25,.75)}}));function ye({table:t,rowsPerPageArray:i,paginationOptions:s}){const o=t.getState().pagination.pageIndex+1,l=t.getPageCount(),r=t.getState().pagination.pageSize,c=t.getRowCount(),u=o*r-r+1,h=Math.min(o*r,c),x="full"===s?.paginationView;return e.jsxs(me,{children:[x&&e.jsxs(ge,{children:[e.jsx(n.Typography,{variant:"body2",fontSize:14,mr:1,children:"Go to page:"}),e.jsx(we,{defaultValue:o,type:"number",inputProps:{min:1,max:l},onKeyDown:e=>{if("Enter"===e.key){const i=e.currentTarget.value?Number(e.currentTarget.value)-1:0;t.setPageIndex(i)}}})]}),e.jsxs(Ce,{children:[x&&e.jsx(n.Typography,{variant:"body2",fontSize:14,mr:1,children:"Rows per page:"}),e.jsx(_e,{value:r,onChange:e=>t.setPageSize(Number(e.target.value)),children:i.map(t=>e.jsx(n.MenuItem,{value:t,sx:{fontSize:12},children:t},t))})]}),e.jsx(be,{children:e.jsxs("strong",{children:[u," – ",h," of ",c]})}),x&&e.jsx(fe,{children:e.jsxs("strong",{children:["Page ",o," of ",l]})}),e.jsxs(ve,{children:[x&&e.jsx(je,{title:"First Page",disabled:!t.getCanPreviousPage(),onClick:()=>t.setPageIndex(0),children:e.jsx(A,{})}),e.jsx(je,{title:"Previous Page",disabled:!t.getCanPreviousPage(),onClick:()=>t.previousPage(),children:e.jsx(a,{fontSize:"small"})}),e.jsx(je,{title:"Next Page",disabled:!t.getCanNextPage(),onClick:()=>t.nextPage(),children:e.jsx(d,{fontSize:"small"})}),x&&e.jsx(je,{title:"Last Page",disabled:!t.getCanNextPage(),onClick:()=>t.setPageIndex(l-1),children:e.jsx(L,{})})]})]})}const Se=e=>{const t=e.getIsPinned(),i="left"===t&&e.getIsLastColumn("left"),n="right"===t&&e.getIsFirstColumn("right");return{boxShadow:i?"-4px 0 4px -4px gray inset":n?"4px 0 4px -4px gray inset":void 0,background:"inherit",left:"left"===t?`${e.getStart("left")}px`:void 0,right:"right"===t?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative",width:e.getSize()}},ke=e=>{const t=e.getIsPinned(),i="left"===t&&e.getIsLastColumn("left"),n="right"===t&&e.getIsFirstColumn("right");return{boxShadow:i?"-4px 0 4px -4px gray inset":n?"4px 0 4px -4px gray inset":void 0,background:"inherit",left:"left"===t?`${e.getStart("left")}px`:void 0,right:"right"===t?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative",width:e.getSize()}},Te={adm_dev:"http://localhost:6010/api",crm_dev:"http://localhost:4011/api",uat:"https://api.eth-qa.rezolut.in/api/enrol"};u.create({baseURL:Te.adm_dev,timeout:1e4,headers:{"Content-Type":"application/json"}}).interceptors.request.use(e=>{const t=localStorage.getItem("authToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Me=n.styled("tr",{shouldForwardProp:e=>"hoverable"!==e&&"selected"!==e&&"striped"!==e&&"expanded"!==e})(({theme:e,hoverable:t,selected:i,striped:n})=>({backgroundColor:i?e.palette.action.selected:e.palette.background.paper,...n&&{"&:nth-of-type(odd)":{backgroundColor:"dark"===e.palette.mode?e.palette.action.hover:e.palette.grey[50]}},...t&&{transition:"background-color 0.2s ease, box-shadow 0.2s ease","&:hover":{backgroundColor:e.palette.action.hover,boxShadow:"inset 0 2px 2px rgba(0,0,0,0.05),\n inset 0 -2px 2px rgba(0,0,0,0.05)"}}})),Fe=n.styled("td",{shouldForwardProp:e=>"compact"!==e&&"isDragging"!==e&&"isPinned"!==e&&"wrap"!==e})(({theme:e,compact:t,isDragging:i,wrap:n})=>({fontSize:e.typography.pxToRem(14),padding:t?e.spacing(.25,.5):e.spacing(.5,1),borderTop:`1px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`,...n&&{wordBreak:"break-all",whiteSpace:"normal"},...i&&{opacity:.85,backgroundColor:e.palette.action.hover}}));function Ie({cell:i,tableStates:n}){const{isDragging:s,setNodeRef:r,transform:a}=o.useSortable({id:i.column.id}),{wrapColumns:d}=n,c=i.column.getIsPinned();return e.jsx(Fe,{ref:r,align:i.column.columnDef.meta?.align||"left",style:{opacity:s?.8:1,transform:l.CSS.Translate.toString(a),transition:"width transform 0.2s ease-in-out",width:i.column.getSize(),...ke(i.column),...(d.all_wrap||d[i.column.id])&&{wordBreak:"break-all",whiteSpace:"normal"},zIndex:c?2:s?1:0},children:i.getIsPlaceholder()?null:t.flexRender(i.column.columnDef.cell,i.getContext())})}const De=({checked:t=!1,disabled:n=!1,onChange:s=()=>{},indeterminate:o=!1,className:l,style:r,...a})=>{const d=h.v4(),[c,u]=i.useState(t),x=i.useRef(null);return i.useEffect(()=>{u(t)},[t]),i.useEffect(()=>{x.current&&(x.current.indeterminate=o)},[o]),e.jsx("input",{id:d,ref:x,type:"checkbox",checked:c,onChange:e=>{const t=e.target.checked;u(t),s&&s(t)},disabled:n,className:l,...a})};function Be({table:n,featureOptions:s,NestedComponent:l,columnOrder:r,tableStates:a}){const{enableColumnReordering:d,enableRowSelection:c}=s,{wrapColumns:u}=a;return e.jsx("tbody",{children:n?.getRowModel()?.rows?.map(n=>(n=>{const h=e.jsxs(Me,{hoverable:!0,striped:s.striped,selected:n.getIsSelected(),expanded:n.getIsExpanded(),children:[c&&e.jsx(Fe,{style:{position:"sticky",left:0,width:"50px"},children:e.jsx(De,{checked:n.getIsSelected(),indeterminate:n.getIsSomeSelected(),onChange:n.getToggleSelectedHandler(),className:"checkbox__input"})}),n?.getVisibleCells()?.map(i=>d?e.jsx(o.SortableContext,{items:r,strategy:o.horizontalListSortingStrategy,children:e.jsx(Ie,{cell:i,featureOptions:s,tableStates:a})},i.id):e.jsx(Fe,{style:{...ke(i.column),width:i.column.getSize(),...(u.all_wrap||u[i.column.id])&&{wordBreak:"break-all",whiteSpace:"normal"}},align:i.column.columnDef.meta?.align||"left",children:t.flexRender(i?.column?.columnDef?.cell,i?.getContext())}))]},n?.id);return n.getIsExpanded()?e.jsxs(i.Fragment,{children:[h,l&&e.jsx(Me,{hoverable:!0,striped:s.striped,selected:n.getIsSelected(),expanded:n.getIsExpanded(),children:e.jsx(l,{row:n})})]},n.id):h})(n))})}const Ae=c.styled(n.Box,{shouldForwardProp:e=>"isResizing"!==e})(({theme:e,isResizing:t})=>({position:"absolute",top:0,right:0,height:"100%",width:e.spacing(.5),cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:t?1:0,background:t?"rgba(0, 0, 0, 0.8)":"rgba(0, 0, 0, 0.5)","&:hover":{opacity:1}})),Le=c.styled(n.Box)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",transition:"transform 0.15s ease","&:hover":{transform:"scale(1.1)"},"& svg":{color:e.palette.grey[700]}})),ze=c.styled(n.Box,{shouldForwardProp:e=>"sortable"!==e})(({theme:e,sortable:t})=>({userSelect:t?"none":"auto",fontSize:e.typography.pxToRem(14),"& svg":{marginLeft:"0.25rem"}})),Ee=c.styled(n.Box)(({theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",color:e.palette.grey[600],cursor:"grab",transition:"transform 0.15s ease, color 0.15s ease","&:hover":{transform:"scale(1.1)",color:e.palette.grey[900],cursor:"grabbing"}})),Oe=c.styled(n.Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1)})),Ve=c.styled("thead",{shouldForwardProp:e=>"sticky"!==e})(({sticky:e})=>({position:e?"sticky":"relative",top:e?0:"auto",zIndex:e?3:"auto"})),He=c.styled("tr",{shouldForwardProp:e=>"striped"!==e})(({theme:e,striped:t})=>({backgroundColor:t?e.palette.common.white:e.palette.grey[100]})),Re=c.styled("th",{shouldForwardProp:e=>"compact"!==e&&"isDragging"!==e&&"isPinned"!==e})(({theme:e,compact:t,isDragging:i,isPinned:n,sticky:s})=>({position:"relative",padding:t?e.spacing(.375,.675):e.spacing(.75,1),borderWidth:"0.5px",borderStyle:"solid",borderColor:e.palette.grey[500],cursor:"pointer",backgroundColor:e.palette.common.white,userSelect:"none",opacity:i?.8:1,zIndex:n?3:i?1:0,...s&&{position:"sticky",left:0,zIndex:4}}));function qe({header:t}){return t.column.getIsPinned()&&e.jsx(Le,{onClick:e=>{e.stopPropagation(),t.column.pin(!1)},children:e.jsx(R,{})})}function Pe({anchorEl:t,onClose:i,header:s,tableStates:o,onSaveSettings:l}){const r=Boolean(t),a=s.column,d="left"===a.getIsPinned(),{container:c}=oe(),{wrapColumns:u,setWrapColumns:h}=o;return e.jsx(n.Popover,{open:r,anchorEl:t,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},container:c,children:e.jsxs(n.List,{dense:!0,children:[e.jsxs(n.ListItemButton,{onClick:()=>a.toggleSorting(!1),children:[e.jsx(n.ListItemIcon,{children:e.jsx(D,{})}),e.jsx(n.ListItemText,{primary:"Sort ascending"})]}),e.jsxs(n.ListItemButton,{onClick:()=>a.toggleSorting(!0),children:[e.jsx(n.ListItemIcon,{children:e.jsx(B,{})}),e.jsx(n.ListItemText,{primary:"Sort descending"})]}),e.jsxs(n.ListItemButton,{onClick:()=>{return e=a?.id,void(l&&l(e));var e},children:[e.jsx(n.ListItemIcon,{children:e.jsx($,{})}),e.jsx(n.ListItemText,{primary:"Hide in view"})]}),e.jsxs(n.ListItemButton,{onClick:()=>{a.pin(!d&&"left")},children:[e.jsx(n.ListItemIcon,{children:d?e.jsx(R,{}):e.jsx(H,{})}),e.jsx(n.ListItemText,{primary:d?"Unfreeze column":"Freeze column"})]}),e.jsxs(n.ListItemButton,{children:[e.jsx(n.ListItemText,{primary:"Wrap Cell"}),e.jsx(n.Switch,{checked:u.all_wrap||u[a.id],onChange:()=>{return e=a.id,void h(t=>({...t,[e]:!t[e],all_wrap:!1}));var e}})]})]})})}function We({header:t}){return e.jsx(Ae,{isResizing:t.column.getIsResizing(),onDoubleClick:()=>t.column.resetSize(),onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:"column__resize "+(t.column.getIsResizing()?"is__resizing":"")})}function Ne({header:s,activeTab:r,featureOptions:a,tableStates:d,onSaveSettings:c}){const{enableColumnPinning:u}=a,[h,x]=i.useState(null),p=()=>{x(null)},{isDragging:m,transform:g,attributes:C,listeners:b}=o.useSortable({id:s.column.id}),f=s.column.getIsPinned();return e.jsxs(Re,{onMouseLeave:p,colSpan:s.colSpan,onClick:e=>{x(t=>t?null:e.currentTarget)},compact:a?.compactTable,isDragging:m,isPinned:Boolean(f),style:{width:`${s.column.getSize()}px`,minWidth:`${s.column.columnDef.minSize??180}px`,maxWidth:`${s.column.columnDef.maxSize}px`,transform:l.CSS.Translate.toString(g),transition:"width transform 0.2s ease-in-out",...Se(s.column)},children:[s.isPlaceholder?null:e.jsxs(Oe,{children:[e.jsx(ze,{sortable:s.column.getCanSort(),children:t.flexRender(s.column.columnDef.header,s.getContext())}),e.jsxs(n.Box,{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,children:[{asc:e.jsx(D,{}),desc:e.jsx(B,{})}[s.column.getIsSorted()]??null,u&&e.jsx(qe,{header:s,featureOptions:a,tableStates:d}),e.jsx(Ee,{...C,...b,children:e.jsx(V,{})})]})]}),s.column.getCanResize()?e.jsx(We,{header:s}):null,e.jsx(Pe,{anchorEl:h,activeTab:r,onClose:p,header:s,tableStates:d,onSaveSettings:c})]})}function Ze({table:n,activeTab:s,featureOptions:l,columnOrder:r,tableStates:a,filterSettingStates:d,onSaveSettings:c}){const{stickyHeader:u,enableColumnReordering:h,enableColumnPinning:x,enableRowSelection:p}=l,[,m]=i.useState(null),g=e=>{m(t=>t?null:e.currentTarget)};return e.jsx(Ve,{sticky:u,children:n.getHeaderGroups().map(i=>e.jsxs(He,{striped:l.striped,children:[p&&e.jsx(Re,{sticky:!0,compact:l.compactTable,style:{width:50},children:e.jsx(Oe,{children:e.jsx(De,{checked:n.getIsAllRowsSelected(),indeterminate:n.getIsSomeRowsSelected(),onChange:()=>n.toggleAllRowsSelected()})})}),i.headers.map(i=>h?e.jsx(o.SortableContext,{items:r,strategy:o.horizontalListSortingStrategy,children:e.jsx(Ne,{header:i,activeTab:s,featureOptions:l,tableStates:a,filterSettingStates:d,onSaveSettings:c})},i?.id):e.jsxs(Re,{colSpan:i.colSpan,compact:l.compactTable,onClick:g,style:{...Se(i.column),width:`${i.column.getSize()}px`,minWidth:`${i.column.columnDef.minSize}px`,maxWidth:`${i.column.columnDef.maxSize}px`},children:[i.isPlaceholder?null:e.jsxs(Oe,{children:[e.jsxs(ze,{sortable:i.column.getCanSort(),children:[t.flexRender(i.column.columnDef.header,i.getContext()),{asc:e.jsx(D,{}),desc:e.jsx(B,{})}[i.column.getIsSorted()]??null]}),x&&e.jsx(qe,{header:i,featureOptions:l,tableStates:a})]}),i.column.getCanResize()?e.jsx(We,{header:i}):null]},i?.id))]},i?.id))})}function Ye({table:t,activeTab:i,featureOptions:n,NestedComponent:s,columnOrder:o,isCompactTable:l,tableStates:r,filterSettingStates:a,onSaveSettings:d}){const{striped:c}=n;return e.jsxs("table",{className:(u=`ts__table ${c?"ts--striped":""} ${l?"ts--compact":""}`,u.replace(/\s+/g," ").trim()),children:[e.jsx(Ze,{table:t,activeTab:i,featureOptions:n,columnOrder:o,tableStates:r,filterSettingStates:a,onSaveSettings:d}),e.jsx(Be,{table:t,featureOptions:n,NestedComponent:s,columnOrder:o,tableStates:r})]});var u}function $e({table:t,activeTab:i,featureOptions:n,NestedComponent:l,columnOrder:r,setColumnOrder:a,isCompactTable:d,tableStates:c,filterSettingStates:u,onSaveSettings:h}){const p=s.useSensors(s.useSensor(s.MouseSensor,{}),s.useSensor(s.TouchSensor,{}),s.useSensor(s.KeyboardSensor,{}));return e.jsx(s.DndContext,{collisionDetection:s.closestCenter,modifiers:[x.restrictToHorizontalAxis],onDragEnd:e=>{const{active:t,over:i}=e;t&&i&&t.id!==i.id&&a(e=>{const n=e.indexOf(t.id),s=e.indexOf(i.id);return o.arrayMove(e,n,s)})},sensors:p,children:e.jsx(Ye,{table:t,activeTab:i,featureOptions:n,NestedComponent:l,columnOrder:r,setColumnOrder:a,isCompactTable:d,tableStates:c,filterSettingStates:u,onSaveSettings:h})})}const Ge=c.styled(p)(({theme:e})=>({minHeight:e.spacing(3.5),[`& .${p.tabsClasses.flexContainer}`]:{minHeight:e.spacing(3.5)},[`& .${p.tabsClasses.indicator}`]:{display:"none"}})),Ue=c.styled(m)(({theme:e})=>({color:e.palette.grey[600],padding:e.spacing(1,1.5),minHeight:e.spacing(3.5),maxHeight:e.spacing(3.5),textTransform:"none",minWidth:"unset",whiteSpace:"nowrap",[`&.${m.tabClasses.selected}`]:{color:e.palette.text.primary,fontWeight:700}})),Ke=c.styled(g,{shouldForwardProp:e=>"selected"!==e})(({theme:e,selected:t})=>({padding:e.spacing(.25),borderRadius:e.shape.borderRadius,border:`1px solid ${t?e.palette.text.primary:e.palette.grey[700]}`,color:t?e.palette.common.white:e.palette.text.primary,backgroundColor:t?e.palette.text.primary:"transparent",fontWeight:t?500:400,lineHeight:1,minWidth:20,textAlign:"center"}));const Qe=({open:t,onClose:s,title:o,description:l,buttons:r,input:a,maxWidth:d="sm",fullWidth:c=!0})=>{const[u,h]=i.useState(a?.defaultValue||""),[x,p]=i.useState(""),m=()=>{h(a?.defaultValue||""),s()};return e.jsxs(n.Dialog,{open:t,onClose:(e,t)=>{"backdropClick"!==t&&"escapeKeyDown"!==t&&m()},maxWidth:d,fullWidth:c,PaperProps:{sx:{borderRadius:2,padding:1}},children:[e.jsxs(n.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:"0px",marginX:"24px",paddingBottom:l?"18px":"20px",borderBottom:"1px solid #eeeeee"},children:[e.jsx(n.Typography,{variant:"h6",component:"h2",fontWeight:"bold",children:o}),e.jsx(n.IconButton,{onClick:m,size:"small",sx:{color:"text.secondary"},children:e.jsx(b,{})})]}),e.jsxs(n.DialogContent,{sx:{padding:"0 24px 16px 24px",mt:2},children:[l&&e.jsx(n.Typography,{variant:"body2",color:"text.secondary",sx:{marginBottom:a?3:0},children:l}),a&&e.jsxs(n.Box,{sx:{marginTop:l?0:2},children:[e.jsxs(n.Typography,{variant:"body2",component:"label",className:a.labelClassName,sx:{display:"block",marginBottom:1,fontWeight:500,color:"text.primary"},children:[a.label,a.required&&e.jsxs(n.Typography,{component:"span",color:"error.main",children:[" ","*"]})]}),e.jsx(n.TextField,{fullWidth:!0,value:u,onChange:e=>{h(e.target.value)},placeholder:a.placeholder,type:a.type||"text",multiline:a.multiline,rows:a.rows,variant:"outlined",size:"small",sx:{"& .MuiOutlinedInput-root":{maxWidth:280,borderRadius:1,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"2px solid #7A5AF8"}}}}),x&&e.jsx(n.Typography,{variant:"body2",color:"error.main",children:x})]})]}),e.jsx(n.DialogActions,{sx:{padding:"16px 24px 24px 24px",gap:1},children:r.map((t,i)=>e.jsx(n.Button,{variant:t.variant||"outlined",color:t.color||"primary",className:"confirm-modal-button",sx:t.sx,onClick:()=>(e=>{a?e.onClick(u,x,p):e.onClick(),h("")})(t),disabled:t.disabled||a?.required&&!u.trim()&&"contained"===t.variant,children:t.label},i))})]})},Xe=({children:t,value:i,index:n,sx:s,...o})=>e.jsx("div",{role:"tabpanel",hidden:i!==n,id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,style:{height:"100%"},...o,children:i===n&&e.jsx(g,{sx:{height:"100%",...s},children:t})}),Je=({tabItems:t,activeFilterIndex:s=-1,handleCrossClick:o,value:l,onChange:r,...a})=>{const[d,c]=i.useState(null);return e.jsx(n.Tabs,{value:l,onChange:r,variant:"fullWidth",sx:{px:"12px",borderBottom:"1px solid #ccc","& .MuiTabs-indicator":{backgroundColor:"black"}},...a,children:t.map((t,i)=>{const l=s===i,r=d===i;return e.jsx(n.Tab,{label:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx("span",{children:t.label}),l&&e.jsx(n.Box,{onMouseEnter:()=>c(i),onMouseLeave:()=>c(null),sx:{display:"flex",alignItems:"center",cursor:r?"pointer":"default"},onClick:r?()=>o(i):void 0,children:r?e.jsx(J,{}):e.jsx(X,{})})]}),sx:{fontSize:"14px",textTransform:"capitalize",color:"#888888",fontWeight:"normal",whiteSpace:"nowrap","&.Mui-selected":{color:"black",fontWeight:"bold"}}},i)})})},et=({filter:t,control:i,setValue:s,dropdownList:o,isLoading:l=!1,sx:r,onValueChange:a})=>e.jsx(f.Controller,{name:`${t?.filter_attribute_name}.operator`,control:i,defaultValue:t?.filter_operator||o?.[0]?.value||"",render:({field:i})=>e.jsx(n.FormControl,{sx:r,size:"small",children:e.jsx(n.Select,{...i,variant:"standard",sx:{fontSize:"0.875rem",minWidth:50,border:"none",boxShadow:"none","& .MuiSelect-icon":{top:"45%",transform:"translateY(-50%)","& .MuiOutlinedInput-input":{padding:"12px 20px"}}},disabled:l,disableUnderline:!0,onChange:e=>{const n=e.target.value,o=i.value;i.onChange(e),"date"!==t?.filter_attribute_data_type&&"year"!==t?.filter_attribute_data_type||n===o||("today"===n?s(`${t?.filter_attribute_name}.value`,v().format("YYYY-MM-DD"),{shouldDirty:!0}):"between"===n?s(`${t?.filter_attribute_name}.value`,["",""],{shouldDirty:!0}):"between"!==o&&"today"!==o||s(`${t?.filter_attribute_name}.value`,"",{shouldDirty:!0})),a?.()},children:o?.map((t,i)=>e.jsx(n.MenuItem,{value:t.value,children:t.label},i))})})}),tt={scrollbarCustom:{overflowY:"auto",pr:1,"&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#999",borderRadius:"4px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f0f0f0"}},filterContainer:{backgroundColor:"#fff",height:"100%",overflowY:"hidden",boxShadow:"0px 3px 8px 0px rgba(34, 48, 62, 0.10)",borderRadius:"0.5rem"},filterMainHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#EEEEEE",height:"50px",px:2,borderBottom:"1px solid #ccc",mx:"auto"},filterMainComponentWrapper:{height:"calc(100% - 90px)",overflowY:"auto"}},it={formEditModeStyle:{border:"1px solid #c5c5c5",borderRadius:"6px",padding:"5px 10px 10px 10px"},formFlexContainer:{display:"flex",flexDirection:"column",gap:"0.75rem"},formListItem:{p:1,backgroundColor:"#FFFFFF",display:"flex",flexDirection:"column",gap:.5},formListSectionHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,p:1,backgroundColor:"#FAFAF9"},formListItemHeader:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:2},formListItemHeaderName:{fontWeight:500,fontSize:"13px",color:"#797877"},formListItemHeaderDropdown:{fontSize:"12px",minWidth:50,border:"none",boxShadow:"none","& .MuiSelect-root":{fontSize:"0.75rem","& .MuiSelect-select":{paddingBottom:"0rem"}}}},nt=({value:t="",onChange:s,placeholder:o="Search..."})=>{const[l,r]=i.useState(t);return e.jsx(n.TextField,{fullWidth:!0,size:"small",value:l,onChange:e=>{const t=e.target.value;r(t),s?.(t)},placeholder:o,className:"search-input",InputProps:{startAdornment:e.jsx(n.InputAdornment,{position:"start",children:e.jsx(j,{sx:{color:"#888888",fontSize:"20px"},className:"search-icon-svg"})}),endAdornment:l&&e.jsx(n.InputAdornment,{position:"end",children:e.jsx(n.IconButton,{edge:"end",onClick:()=>{r(""),s?.("")},sx:{color:"#888888",fontSize:"20px"},className:"cross-icon",children:e.jsx(W,{})})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}}})},st=({label:t})=>e.jsx(n.Typography,{variant:"body2",align:"center",fontSize:14,fontStyle:"italic",color:"text.secondary",children:t||"No results found"}),ot=({tableStates:t,filterComponentOptions:s})=>{const[o,l]=i.useState(""),{filters:r,filterData:a,setSelectedFilterEntity:d}=t,c=s?.tabOptions?.isSingleEntity,u=a?.mainFilter?.entityList?.data||[],h=i.useMemo(()=>{if(c&&r?.length>0){const e=r.map(e=>e?.filter_entity_type);return u.filter(t=>e.includes(t.value))}return u.filter(e=>e.label.toLowerCase().includes(o.toLowerCase()))},[c,r,u,o]);return e.jsxs(n.List,{children:[e.jsx(nt,{placeholder:"Filter by...",value:o,onChange:l}),e.jsx(n.Box,{sx:{my:2,overflowY:"auto",transition:"all 0.4s ease-in-out"},children:0===h.length?e.jsx(st,{}):h.map((t,i)=>e.jsx(n.ListItem,{onClick:()=>(e=>{d(e)})(t),sx:{cursor:"pointer","&:hover":{backgroundColor:"#f4f4f4"}},children:e.jsx(n.ListItemText,{primary:t.label})},i))})]})},lt=({loaderText:t})=>e.jsxs(n.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:2,paddingBlock:2,height:"100%",width:"100%",children:[e.jsx(n.CircularProgress,{}),t&&e.jsx(n.Typography,{variant:"h6",children:t})]}),rt=({tableStates:t,handleAddFilter:s,filterComponentOptions:o})=>{const[l,r]=i.useState(""),{filterData:a,filters:d,selectedFilterEntity:c,setSelectedFilterEntity:u}=t,h=o?.tabOptions?.isSingleEntity,x=i.useMemo(()=>!h||(0===d?.length||!d?.some(e=>e?.filter_entity_type===c?.value)),[d,h,c?.value]);return e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{className:"group-header",sx:{...it.formListSectionHeader,position:"sticky",top:0,zIndex:1},children:[e.jsx(n.Typography,{fontSize:14,children:c?.label}),x&&e.jsx(n.IconButton,{size:"small",onClick:()=>!h&&u(void 0),className:"cross-icon",children:e.jsx(W,{})})]}),a?.mainFilter?.entityWiseCriteria?.isPending?e.jsx(lt,{}):e.jsxs(n.List,{children:[e.jsx(nt,{placeholder:"Filter by...",value:l,onChange:r}),e.jsx(n.Box,{sx:{my:2,overflowY:"auto",transition:"all 0.4s ease-in-out"},children:(()=>{const t=a?.mainFilter?.entityWiseCriteria?.data?.filter(e=>e.name.toLowerCase().includes(l.toLowerCase()))??[];return 0===t.length?e.jsx(st,{}):t.map((t,i)=>{const o=d?.some(e=>e.filter_attribute===t.attribute_key);return e.jsx(n.ListItem,{sx:{opacity:o?.5:1,cursor:o?"not-allowed":"pointer","&:hover":{backgroundColor:o?"inherit":"#f4f4f4"}},onClick:()=>!o&&s(t),children:e.jsx(n.ListItemText,{primary:t.name})},i)})})()})]})]})},at=({columnsData:t,tableStates:s,onChangeFunction:o,filterComponentOptions:l})=>{const r=n.styled(n.Button)(({theme:e})=>({borderRadius:20,borderColor:e.palette.primary.main,color:e.palette.primary.main,textTransform:"none",padding:"8px 16px","&:hover":{borderColor:e.palette.primary.dark}})),{filters:a,setFilters:d,showFilterOptions:c,setShowFilterOption:u,filterMaster:h,selectedFilterEntity:x,setSelectedFilterEntity:p}=s,m=i.useRef(null),g=(e=>{const[t,n]=i.useState(0);return i.useEffect(()=>{if(!e.current)return;const t=new ResizeObserver(()=>{e.current&&n(e.current.clientWidth)});return t.observe(e.current),()=>t.disconnect()},[e,e.current?.clientWidth]),t})(m),C=l?.tabOptions?.isSingleEntity,b=l?.tabOptions?.isSingleFilter||!1,f=i.useMemo(()=>b&&a?.length>0,[a?.length,b]);return e.jsxs(n.Box,{children:[e.jsx(r,{fullWidth:!0,startIcon:e.jsx(Q,{}),onClick:()=>{u(e=>!e)},disabled:f,sx:{bgcolor:"#eae4fe",borderRadius:"6px",color:"#7a5af8",fontSize:"13px",fontWeight:500},ref:m,children:"Filter Criteria"}),c&&e.jsx(n.ClickAwayListener,{onClickAway:()=>u(!1),children:e.jsx(n.Paper,{sx:{width:g||360,p:1,mt:1.5,cursor:"pointer",position:"absolute",zIndex:1300},children:e.jsx(n.Box,{sx:{maxHeight:h?.saved_filters?.selectedId?"calc(100vh - 601px)":"calc(100vh - 440px)",overflowY:"auto",width:"100%",...tt.scrollbarCustom},className:"filter-criteria-list-box",children:x?e.jsx(rt,{tableStates:s,handleAddFilter:e=>{const i=t?.operation_list[e?.element_type],n="multiselect"===e.element_type?[]:"",s=i?.[0]?.value||"",l=t?.operation_list[e.element_type]||[],r={...{filter_attribute:e.attribute_key,filter_operator:s,filter_value:n,filter_entity_type:x?.value},filter_attribute_name:e?.name,filter_attribute_data_type:e?.element_type||e?.element_type,datasource_list:e?.datasource_list,dropdown_list:l,filter_entity_name:x?.label,attribute_key:e?.attribute_key};d(e=>[...e,r]);const c=[...a,r];o&&o({filterMaster:h,filters:c}),u(!1),C||p(void 0)},filterComponentOptions:l}):e.jsx(ot,{tableStates:s,filterComponentOptions:l})})})})]})},dt={"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fff","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}},ct=({filter:t,control:i,isLoading:s=!1,onValueChange:o})=>e.jsx(f.Controller,{name:`${t?.filter_attribute_name}.value`,control:i,defaultValue:t.filter_value||"",render:({field:i})=>e.jsx(n.TextField,{...i,fullWidth:!0,variant:"outlined",size:"small",sx:{...dt,"& .MuiOutlinedInput-input":{padding:"12px 20px"}},type:"number"===t?.filter_attribute_data_type?"number":"text",placeholder:"Enter value",disabled:s,onChange:e=>{i.onChange(e),o?.()}})}),ut=({filter:t,control:i,sx:s,views:o=["day"],onValueChange:l})=>{const r="between"===t.filter_operator,a="today"===t.filter_operator,d="empty"===t.filter_operator||"not_empty"===t.filter_operator;return d?e.jsx(n.TextField,{fullWidth:!0,disabled:!0,value:"",size:"small"}):e.jsx(_.LocalizationProvider,{dateAdapter:y.AdapterDateFns,children:e.jsx(n.Box,{display:"flex",gap:1,children:e.jsx(f.Controller,{name:`${t?.filter_attribute_name}.value`,control:i,defaultValue:r?["",""]:a?v().format("YYYY-MM-DD"):d?null:t.filter_value?v(t.filter_value,"YYYY-MM-DD").toDate():null,render:({field:t})=>{const i=t.value,n=v().toDate();if(r){const r=Array.isArray(i)?i[0]:"",c=Array.isArray(i)?i[1]:"";return e.jsxs(e.Fragment,{children:[e.jsx(w.DatePicker,{views:o,value:a?n:r?v(r,"YYYY-MM-DD").toDate():null,onChange:e=>{if(a)return;let i="";e&&(i=1===o?.length&&"year"===o[0]?v(e).format("YYYY"):v(e).format("YYYY-MM-DD"));const n=[i,c||""];t.onChange(n),l?.()},disabled:a||d,format:1===o?.length&&"year"===o[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===o?.length&&"year"===o[0]?"YYYY":"From Date"}}}),e.jsx(w.DatePicker,{views:o,value:a?n:c?v(c,"YYYY-MM-DD").toDate():null,onChange:e=>{if(a)return;let i="";e&&(i=1===o?.length&&"year"===o[0]?v(e).format("YYYY"):v(e).format("YYYY-MM-DD"));const n=[r||"",i];t.onChange(n),l?.()},disabled:a||d,format:1===o?.length&&"year"===o[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===o?.length&&"year"===o[0]?"YYYY":"To Date"}}})]})}return e.jsx(w.DatePicker,{...t,views:o,value:a?n:t.value?v(t.value,"YYYY-MM-DD").toDate():null,onChange:e=>{if(a)return;let i="";e&&(i=1===o?.length&&"year"===o[0]?v(e).format("YYYY"):v(e).format("YYYY-MM-DD")),t.onChange(i),l?.()},disabled:a||d,format:1===o?.length&&"year"===o[0]?"yyyy":"dd-MM-yyyy",sx:{"& .MuiOutlinedInput-input":{padding:"12px 20px"},...s},slotProps:{textField:{size:"small",fullWidth:!0,placeholder:1===o?.length&&"year"===o[0]?"YYYY":"DD-MM-YYYY"}}})}})})})},ht=({filter:t,control:i,dropdownData:s,sx:o,onValueChange:l})=>{const r=s[t.filter_attribute]||[];return e.jsx(f.Controller,{name:`${t?.filter_attribute_name}.value`,control:i,defaultValue:Array.isArray(t.filter_value)?t.filter_value.filter(Boolean):[],render:({field:t})=>{const i=Array.isArray(t.value)?t.value.filter(Boolean):[];return e.jsx(n.FormControl,{sx:o,fullWidth:!0,size:"small",children:e.jsx(n.Select,{...t,sx:{"& .MuiOutlinedInput-input":{padding:"10px 20px",height:"21px"}},multiple:!0,value:i,onChange:e=>{const i=e.target.value,n=Array.isArray(i)?i.filter(Boolean):[];t.onChange(n),l?.()},renderValue:e=>(Array.isArray(e)?e.filter(Boolean):[]).map(e=>r.find(t=>t.value===e)?.label||e).join(", "),children:r?.map((t,s)=>e.jsxs(n.MenuItem,{value:t.value,children:[e.jsx(n.Checkbox,{checked:i.includes(t.value),sx:{marginRight:1}}),t.label]},s))})})}})},xt=["equal","before","after","between","is","today","is_before","is_after","is_on_or_before","is_on_or_after","empty","not_empty"],pt=({columnsData:t,dropdownData:s,searchTerm:o="",setSearchTerm:l,handleRemoveFilter:r,editMode:a=!1,tableStates:d,onSaveFilterButtonClick:c,setDeleteFilterModalOpen:u,onChangeFunction:h,filterComponentOptions:x})=>{const{filterMaster:p,filters:m,setFilters:g,setFilterMaster:C,setPagination:b}=d,v=x?.tabOptions?.mainFilter?.showSaveButton,j=x?.tabOptions?.mainFilter?.showClearAllButton,_=x?.tabOptions?.mainFilter?.customButtons,w=p?.saved_filters?.selectedName||"",y=p?.saved_filters?.is_owner||!1,S=i.useMemo(()=>{const e=m?.reduce((e,t)=>(t?.filter_attribute_name&&(e[t?.filter_attribute_name]={value:t?.filter_value??"",operator:t?.filter_operator??t?.dropdown_list?.[0]?.value??""}),e),{});return{filterName:w??"",dummyChange:"",...e}},[m,w]),{control:k,watch:T,reset:M,setValue:F,unregister:I}=f.useForm({mode:"onChange",defaultValues:S,resetOptions:{keepDirtyValues:!1,keepErrors:!1}}),D=T();i.useEffect(()=>{M(S)},[m]);const B=i.useCallback(ue(e=>{g(e);h&&h({filterMaster:p,filters:e})},1e3),[g]),A=i.useCallback(()=>{const e=m?.map(e=>{if(e?.filter_attribute_name&&"object"==typeof D[e?.filter_attribute_name]){const t=D[e?.filter_attribute_name];return{...e,filter_value:t.value,filter_operator:t.operator}}return e});b(e=>({...e,pageIndex:0})),B(e)},[D,m,B]);i.useEffect(()=>()=>{M(),m?.forEach(e=>{e?.filter_attribute_name&&I(e?.filter_attribute_name)})},[]);const L=i.useMemo(()=>m?.reduce((e,t)=>{const i=t?.filter_entity_name||"";return e[i]||(e[i]=[]),e[i].push(t),e},{}),[m]),z=e=>{const t=m?.filter(t=>t.filter_entity_name!==e);m?.forEach(t=>{t?.filter_entity_name===e&&t?.filter_attribute_name&&(I(`${t?.filter_attribute_name}.value`),I(`${t?.filter_attribute_name}.operator`))}),g(t);h&&h({filterMaster:p,filters:t})};return e.jsxs("form",{onSubmit:e=>{e.preventDefault()},children:[e.jsxs(n.Box,{sx:a?it.formEditModeStyle:{},children:[a&&e.jsxs(n.Box,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#c1c1c1"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}},display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem 0 1rem 0",gap:1},children:[e.jsx(f.Controller,{name:"filterName",control:k,render:({field:t})=>e.jsx(n.TextField,{fullWidth:!0,size:"small",placeholder:"Filter Name",value:w||t.value,onChange:e=>{t.onChange(e),a&&C(t=>({...t,saved_filters:{...t?.saved_filters,selectedName:e.target.value}}))},inputRef:t.ref,sx:{maxWidth:400,"& .MuiOutlinedInput-root":{bgcolor:"white",borderRadius:"0px",fontSize:"14px",color:"#272524",fontWeight:"500","& fieldset":{borderColor:"#c5c5c5"},"&.Mui-focused fieldset":{borderColor:"#7A5AF8"}}}})}),y&&e.jsx(n.Box,{onClick:e=>e.stopPropagation(),children:e.jsx(n.IconButton,{size:"small",onClick:()=>u&&u(!0),children:e.jsx(E,{})})})]}),e.jsxs(n.Box,{className:"filter-criteria-form",sx:{...it.formFlexContainer,...a&&{maxHeight:"calc(100vh - 570px)",overflowY:"auto"}},children:[e.jsx(at,{columnsData:t,tableStates:d,onChangeFunction:h,filterComponentOptions:x}),!a&&e.jsx(nt,{value:o,onChange:l}),e.jsx(n.Box,{className:"filter-form-inputs",sx:it.formFlexContainer,children:Object.entries(L).map(([t,i])=>e.jsxs(n.Box,{sx:{border:"1px solid #c5c5c5",borderRadius:2,overflow:"hidden"},children:[e.jsxs(n.Box,{className:"group-header",sx:it.formListSectionHeader,children:[e.jsx(n.Typography,{fontSize:14,children:t}),e.jsx(n.IconButton,{size:"small",onClick:()=>z(t),children:e.jsx(W,{})})]}),i.filter(e=>e?.filter_attribute_name?.toLowerCase().includes(o.toLowerCase())||e.filter_value?.toString().toLowerCase().includes(o.toLowerCase())).reverse().map(t=>{const i=t.dropdown_list||[];return e.jsxs(n.Box,{sx:it.formListItem,children:[e.jsxs(n.Box,{sx:it.formListItemHeader,children:[e.jsx(n.Typography,{sx:it.formListItemHeaderName,children:t?.filter_attribute_name}),e.jsx(et,{filter:t,control:k,setValue:F,dropdownList:i,sx:it.formListItemHeaderDropdown,onValueChange:A}),e.jsx(n.IconButton,{sx:{marginLeft:"auto"},onClick:()=>{I(`${t?.filter_attribute_name}.value`),I(`${t?.filter_attribute_name}.operator`);const e=T("dummyChange");F("dummyChange","changed"===e?"reset":"changed",{shouldDirty:!0}),r(t.filter_attribute)},size:"small",children:e.jsx(W,{})})]}),e.jsx(n.Box,{children:(()=>{const i=D[t?.filter_attribute_name],o=i?.operator;return(({filter:t,operator:i,control:s,dropdownData:o,updateFiltersFromForm:l})=>{const r=t?.filter_attribute_data_type;if("text"===r||"number"===r)return e.jsx(ct,{filter:t,control:s,onValueChange:l});if("year"===r)return e.jsx(ut,{filter:t,control:s,views:["year"],onValueChange:l});if("date"===r)return i&&xt.includes(i)?e.jsx(ut,{filter:t,control:s,onValueChange:l}):e.jsx(ct,{filter:t,control:s,onValueChange:l});return void 0!==t?.filter_attribute_data_type&&["select","multiselect","radio","checkbox"].includes(t?.filter_attribute_data_type)?e.jsx(ht,{filter:t,control:s,dropdownData:o,onValueChange:l}):e.jsx(n.FormControl,{fullWidth:!0,size:"small"})})({filter:t,operator:o,control:k,dropdownData:s,updateFiltersFromForm:A})})()})]},t.filter_attribute)})]},t))})]})]}),m?.length>0&&(j||v)&&e.jsxs(n.Box,{sx:{display:"flex",justifyContent:"center",gap:1,mt:3},children:[j&&e.jsx(n.Button,{variant:"outlined",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8",borderRadius:"6px",textTransform:"none",fontSize:"14px"},fullWidth:!0,onClick:()=>{g([]);const e={...d.filterMaster,activeFilterTabIndex:-1};h&&h({filterMaster:e,filters:[]})},children:"Clear All"}),v&&e.jsx(n.Button,{variant:"contained",fullWidth:!0,sx:{color:"white",backgroundColor:"#7A5AF8","&.Mui-disabled":{backgroundColor:"#d7cefd",color:"rgba(255, 255, 255, 0.7)"}},onClick:()=>{c&&c()},children:"Save Filter"}),_?.map((t,i)=>e.jsx(n.Button,{fullWidth:!0,variant:t?.variant??"outlined",sx:t?.sx,...t,children:t?.label},i))]})]})},mt=({columnsData:t,dropdownData:s,tableStates:o,onSaveFilterButtonClick:l,onChangeFunction:r,filterComponentOptions:a})=>{const[d,c]=i.useState(""),{setFilters:u,setFilterMaster:h,filterMaster:x}=o;i.useEffect(()=>{h(e=>({...e,activeFilterTabIndex:0}))},[]);const p={...tt.filterMainComponentWrapper,...tt.scrollbarCustom};return e.jsx(n.Box,{sx:p,className:"main-filter-component-wrapper",children:e.jsx(pt,{columnsData:t,searchTerm:d,setSearchTerm:c,handleRemoveFilter:e=>{u(t=>t.filter(t=>t.filter_attribute!==e)),u(t=>{const i=t.filter(t=>t.filter_attribute!==e);return r&&r({filterMaster:x,filters:i}),i})},tableStates:o,onSaveFilterButtonClick:l,dropdownData:s,onChangeFunction:r,filterComponentOptions:a})})},gt=({columnsData:t,dropdownData:i,tableStates:s,editMode:o,setEditMode:l,searchTerm:r,setSearchTerm:a,onSaveFilterButtonClick:d,setDeleteFilterModalOpen:c,onChangeFunction:u,filterComponentOptions:h})=>{const{setFilters:x,setFilterMaster:p}=s,m=h?.tabOptions?.savedFilter?.showBackButton;return e.jsxs(e.Fragment,{children:[m&&e.jsx(n.Box,{children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",mb:2},onClick:()=>{l&&l(!1),x([]),p(e=>({...e,saved_filters:{...e?.saved_filters,selectedId:"",selectedName:"",selectedCode:"",shareWithTeam:!1,allowTeamEdit:!1},activeFilterTabIndex:-1}))},children:[e.jsx(S,{sx:{width:"13px",height:"13px"}}),e.jsx(n.Typography,{variant:"body2",sx:{color:"#8592A3"},children:"Back To Saved Filters"})]})}),e.jsx(pt,{handleRemoveFilter:e=>{x(t=>t.filter(t=>t?.filter_attribute!==e))},editMode:o,tableStates:s,columnsData:t,dropdownData:i,searchTerm:r,setSearchTerm:a,onSaveFilterButtonClick:d,setDeleteFilterModalOpen:c,onChangeFunction:u,filterComponentOptions:h})]})},Ct=({columnsData:t,dropdownData:s,tableStates:o,editMode:l,setEditMode:r,setDeleteFilterModalOpen:a,onSaveFilterButtonClick:d,tabValue:c,onChangeFunction:u,filterComponentOptions:h})=>{const{filters:x,filterMaster:p,setFilterMaster:m,setFilterToDelete:g}=o,[C,b]=i.useState(""),f=t?.saved_filter?.map(e=>({label:e.name||e.label||"Unnamed Filter",value:e.id||e.value,code:e.code??"",is_shared:!1,created_by:e.created_by||"",description:e.description||"",is_owner:!0,is_editable:!0===e.is_editable||"true"===e.is_editable}))??[],v=t?.shared_filter?.map(e=>{const t=e.sharedPreferences||e.preferences||e.meta||e.shared_meta||{};return{label:e.name||e.label||"Unnamed Filter",value:e.id||e.value,code:e.code??"",is_shared:e.is_shared??t.is_shared??!0,created_by:e.created_by||"shared_filter",description:e.description||"",is_owner:!0===e.is_owner||"true"===t.is_owner,is_editable:!0===e.is_editable||"true"===e.is_editable||!0===t.is_editable||"true"===t.is_editable}})??[];i.useEffect(()=>()=>{const e=h?.tabOptions?.savedFilter?.editMode;e||(r&&r(!1),m(e=>({...e,saved_filters:{...e?.saved_filters??{},selectedId:"",selectedName:"",description:"",selectedCode:"",shareWithTeam:void 0,allowTeamEdit:void 0}})))},[]);const j=e=>{const t={...p,saved_filters:{...p?.saved_filters??{},selectedId:e.value,selectedName:e.label,description:e.description,selectedCode:e.code,shareWithTeam:e.is_shared,allowTeamEdit:e.is_editable,is_owner:e.is_owner},attributes:{...p?.attributes,radio:[]},activeFilterTabIndex:c};m(t),u&&u({filterMaster:t,filters:x})},_=e=>{j(e),r&&r(!0),g(e)},w=e=>{j(e)},[y,S]=i.useState("my"),T=e=>{S(t=>t===e?null:e)};return e.jsxs(n.Box,{className:"saved-filter-component-wrapper",children:[!l&&e.jsxs(e.Fragment,{children:[e.jsx(n.Box,{sx:{mb:2},children:e.jsx(nt,{value:C,onChange:b,className:"search-input"})}),e.jsx(n.Box,{sx:{background:"#fff",borderRadius:"12px",border:"1px solid #eee",mb:2,overflow:"hidden"},children:e.jsxs(n.Accordion,{disableGutters:!0,elevation:0,expanded:"my"===y,onChange:()=>T("my"),children:[e.jsx(n.AccordionSummary,{expandIcon:e.jsx(k,{fontSize:"small"}),children:e.jsx(n.Typography,{fontWeight:600,children:"My Filters"})}),e.jsx(n.Divider,{sx:{width:"100%"}}),e.jsx(n.AccordionDetails,{sx:{p:"9px",maxHeight:"230px",overflowY:"auto",scrollbarWidth:"thin"},children:(M=f,0===M.length?e.jsx(n.Typography,{children:"No My Filters"}):e.jsx(n.List,{sx:{display:"flex",flexDirection:"column",gap:1},children:M.filter(e=>e.label?.toLowerCase().includes(C.toLowerCase())).map(t=>e.jsxs(n.ListItem,{sx:{cursor:"pointer",borderRadius:"8px",bgcolor:"#f2f6f8ff",display:"flex",justifyContent:"space-between",gap:1,alignItems:"center","&:hover .action-icons":{opacity:1,visibility:"visible"}},onClick:()=>w(t),children:[t.value===p?.saved_filters?.selectedId&&e.jsx(n.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(X,{})}),e.jsx(n.ListItemText,{primary:t.label}),e.jsxs(n.Box,{onClick:e=>e.stopPropagation(),className:"action-icons",sx:{display:"flex",gap:1,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},children:[e.jsx(n.IconButton,{size:"large",onClick:()=>_(t),children:e.jsx(z,{})}),e.jsx(n.IconButton,{size:"small",onClick:()=>{g(t),a?.(!0)},children:e.jsx(E,{})})]})]},t.value))}))})]})}),e.jsx(n.Box,{sx:{background:"#fff",borderRadius:"12px",border:"1px solid #eee",mb:2,overflow:"hidden"},children:e.jsxs(n.Accordion,{disableGutters:!0,elevation:0,expanded:"shared"===y,onChange:()=>T("shared"),children:[e.jsx(n.AccordionSummary,{expandIcon:e.jsx(k,{fontSize:"small"}),children:e.jsx(n.Typography,{fontWeight:600,children:"Shared Filters"})}),e.jsx(n.Divider,{sx:{width:"100%"}}),e.jsx(n.AccordionDetails,{sx:{p:"9px",maxHeight:"230px",overflowY:"auto",scrollbarWidth:"thin"},children:(t=>0===t.length?e.jsx(n.Typography,{children:"No Shared Filters"}):e.jsx(n.List,{sx:{display:"flex",flexDirection:"column",gap:1},children:t.filter(e=>e.label?.toLowerCase().includes(C.toLowerCase())).map(t=>e.jsxs(n.ListItem,{sx:{cursor:"pointer",borderRadius:"8px",bgcolor:"#f2f6f8ff",display:"flex",justifyContent:"space-between",gap:1,alignItems:"center","&:hover .action-icons":{opacity:1,visibility:"visible"}},onClick:()=>w(t),children:[t.value===p?.saved_filters?.selectedId&&e.jsx(n.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(X,{})}),e.jsx(n.ListItemText,{primary:t.label}),e.jsxs(n.Box,{onClick:e=>e.stopPropagation(),className:"action-icons",sx:{display:"flex",gap:1,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},children:[(t.is_editable||t.is_owner)&&e.jsx(n.IconButton,{size:"large",onClick:()=>_(t),children:e.jsx(z,{})}),t.is_owner&&e.jsx(n.IconButton,{size:"small",onClick:()=>{g(t),a?.(!0)},children:e.jsx(E,{})})]})]},t.value))}))(v)})]})})]}),l&&e.jsx(gt,{columnsData:t,dropdownData:s,tableStates:o,editMode:l,setEditMode:r,searchTerm:C,setSearchTerm:b,onSaveFilterButtonClick:d,setDeleteFilterModalOpen:a,onChangeFunction:u,filterComponentOptions:h})]});var M},bt=({columnsData:t,tableStates:s,dropdownData:o,searchTerm:l,setSearchTerm:r,tabValue:a,onChangeFunction:d})=>{const{filterMaster:c,setFilterMaster:u,filters:h,setFilters:x}=s,p=c?.attributes?.selected,m=i.useMemo(()=>Array.isArray(c?.attributes?.radio)?c.attributes.radio:[],[c?.attributes?.radio]),g=e=>{const i=c?.attributes.selected;if(!i)return;const n=t?.column_list?.find(e=>e.datasource_list===i);if(!n)return;let s=[...h],o=[];if(""===e)s=h?.filter(e=>e.filter_attribute!==n.attribute_key);else{const i=t?.operation_list[n.element_type]?.[0]?.value||"in",l={...n,filter_attribute:n.attribute_key,filter_operator:i,filter_value:[e]},r=h?.some(e=>e?.filter_attribute===n?.attribute_key);s=r?h?.map(e=>e?.filter_attribute===n?.attribute_key?l:e):[...h,l],o=[e]}x(s);const l={...c,attributes:{...c.attributes,radio:o},activeFilterTabIndex:a};u(l),d&&d({filters:s,filterMaster:l})},C=i.useMemo(()=>{const e=t?.column_list?.find(e=>e.datasource_list===p)?.attribute_key;return e?o[e]:[]},[p,o]);return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"1.25rem"},className:"attributes-filter-component-wrapper",children:[e.jsx(n.FormControl,{fullWidth:!0,size:"small",children:e.jsx(n.Select,{value:p||"",onChange:e=>{const t=e.target.value,i={...c,attributes:{...c?.attributes,selected:t,radio:[]}};u(i);d&&d({filterMaster:i,filters:h})},displayEmpty:!0,renderValue:i=>i?t?.column_list?.find(e=>e.datasource_list===i)?.name:e.jsx("span",{children:"Select Attribute"}),sx:{"& .MuiOutlinedInput-root":{borderRadius:"6px",fontSize:"14px",bgcolor:"#fafafa","& fieldset":{borderColor:"#7a5af8 !important"},"&:hover fieldset":{borderColor:"#7a5af8 !important"},"&.Mui-focused fieldset":{borderColor:"#7a5af8 !important",boxShadow:"none"}},"& .MuiSelect-select":{padding:"8px 14px"}},children:t?.column_list?.filter(e=>e.element_type.includes("select")).map((t,i)=>e.jsx(n.MenuItem,{value:t.datasource_list,disabled:t.datasource_list===p,children:t.name},i))})}),e.jsxs(n.Box,{children:[p&&e.jsx(nt,{value:l,onChange:r}),o&&e.jsx(n.Box,{className:"attributes-filter-list",sx:{mt:2,overflow:"auto",maxHeight:"calc(100dvh - 300px)"},children:e.jsx(n.FormControl,{children:C?.filter(e=>!l||e.label.toLowerCase().includes(l.toLowerCase())).map(t=>{const i=m.includes(t.value);return e.jsx(n.FormControlLabel,{control:e.jsx(n.Radio,{checked:i,onClick:()=>g(i?"":t.value)}),label:t.label},t.value)})})})]})]})};function ft(e,t){const i={...e};for(const n in t)t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?i[n]=ft(e[n]||{},t[n]):i[n]=t[n];return i}const vt=({columnsData:t,dropdownData:i,tableStates:s,onSaveFilterButtonClick:o,onChangeFunction:l,filterComponentOptions:r,editMode:a,setEditMode:d,setDeleteFilterModalOpen:c,tabValue:u,searchTerm:h,setSearchTerm:x})=>{const p=r?.tabOptions?.showFilter,m={columnsData:t,dropdownData:i,tableStates:s,onChangeFunction:l},g={editMode:a,setEditMode:d,setDeleteFilterModalOpen:c,tabValue:u},C={searchTerm:h,setSearchTerm:x,tabValue:u};return e.jsxs(n.Box,{sx:{padding:"1.5rem 0.75rem",height:"100%"},children:["main"===p&&e.jsx(mt,{...m,onSaveFilterButtonClick:o,filterComponentOptions:r}),"saved"===p&&e.jsx(Ct,{...m,...g,onSaveFilterButtonClick:o,filterComponentOptions:r}),"attributes"===p&&e.jsx(bt,{...m,...C})]})},jt="#7A5AF8",_t=({open:t,onClose:s,onSave:o,filterMaster:l,setFilterMaster:r,columnsData:a,disableShareFilter:d=!1,forceShowSharingControls:c=!1})=>{const[u,h]=i.useState(!1),[x,p]=i.useState(!1),m=l?.saved_filters?.selectedName??"",g=l?.saved_filters?.description??"",C=!m.trim()||x&&!u,b=l?.saved_filters?.selectedId||"";i.useEffect(()=>{if(!t)return;const e=l?.saved_filters?.selectedId,i=a?.shared_filter?.find(t=>t.id===e);if(!e&&!i)return r(e=>e?{...e,saved_filters:{...e.saved_filters??{},selectedId:null,selectedName:"",description:"",is_shared:!1,is_editable:!1}}:e),h(!1),void p(!1);const n=a?.shared_filter?.find(t=>t.id===e);if(n){r(t=>t?{...t,saved_filters:{...t.saved_filters??{},selectedId:e,selectedName:n.name||"",description:n.description||"",is_shared:n.is_shared||!1,is_editable:"true"===n.is_editable}}:t);const t=!0===n.is_shared||"true"===n.is_shared,i=t&&(!0===n.is_editable||"true"===n.is_editable);h(t),p(i),f(t,i)}},[t,a,l?.saved_filters?.selectedId,r]);const f=(e,t)=>{r(i=>i?{...i,saved_filters:{...i.saved_filters??{},is_shared:e,is_editable:t}}:i)},v=a?.shared_filter?.find(e=>e.id===b),j=a?.shared_filter?.find(e=>e.id===b),_="true"===String(j?.is_owner),w=j&&"true"===j.is_editable||j,y=!w,S=_;return e.jsxs(n.Dialog,{open:t,onClose:s,maxWidth:"sm",fullWidth:!0,children:[e.jsxs(n.DialogTitle,{sx:{display:"flex",justifyContent:"space-between"},children:[e.jsx(n.Typography,{fontSize:18,fontWeight:600,marginTop:1,children:(()=>{const e=l?.saved_filters?.selectedId;if(!e)return"Save Filter";const t=a?.shared_filter?.find(t=>t.id===e);return t?.is_shared?"Shared Filter":"My Filter"})()}),e.jsx(n.Box,{onClick:s,sx:{cursor:"pointer"},children:e.jsx(W,{})})]}),e.jsx(n.Divider,{sx:{mx:"25px",my:"2px",bgcolor:"#f9f7f727"}}),e.jsxs(n.DialogContent,{sx:{pt:0},children:[e.jsx(n.Typography,{my:1,fontSize:"14px",children:"Give a name to this filter so you can easily reuse it later."}),e.jsx(n.Typography,{mt:2,fontSize:11,children:"Filter Name"}),e.jsx(n.TextField,{fullWidth:!0,size:"small",value:m,onChange:e=>r(t=>t?{...t,saved_filters:{...t.saved_filters??{},selectedName:e.target.value}}:t),sx:{mb:0,"& .MuiOutlinedInput-root":{width:"50%","& fieldset":{borderColor:"#888"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:jt},"& .MuiInputBase-input":{fontSize:"12px"}}}}),e.jsx(n.Typography,{mt:2,fontSize:11,children:"Description"}),e.jsx(n.TextField,{fullWidth:!0,minRows:3,value:g,size:"small",sx:{mb:1,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"#888"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:jt}}},onChange:e=>{const t=e.target.value;t.length>200||r(e=>e?{...e,saved_filters:{...e.saved_filters??{},description:t}}:e)}}),e.jsx(n.Typography,{sx:{mb:1,fontSize:12,color:"#888"},children:"(Max. 200 Characters)"}),(y||S)&&!d&&e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,"& .MuiFormControlLabel-label":{fontSize:"14px"}},children:[e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{size:"small",checked:u,onChange:(e,t)=>{h(t);const i=!!t&&x;p(i),f(t,i)},sx:{color:"black","&.Mui-checked":{color:"black"}}}),label:"Share with team member."}),u&&e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{size:"small",checked:x,onChange:(e,t)=>{u&&(p(t),f(u,t))},sx:{color:"black","&.Mui-checked":{color:"black"}}}),label:"Allow editing to Team member"})]}),w&&!S&&e.jsxs(n.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:3,mt:2},children:[e.jsxs(n.Box,{children:[e.jsx(n.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Created On*"}),e.jsx(n.TextField,{fullWidth:!0,size:"small",value:v?.created_date?new Date(v.created_date).toLocaleString():"",InputProps:{readOnly:!0,endAdornment:e.jsx(n.IconButton,{size:"small",children:e.jsx(T,{fontSize:"small"})}),sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(n.Box,{children:[e.jsx(n.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Created By*"}),e.jsx(n.TextField,{fullWidth:!0,size:"small",value:v?.created_by||"",InputProps:{readOnly:!0,sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(n.Box,{children:[e.jsx(n.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Modified On*"}),e.jsx(n.TextField,{fullWidth:!0,size:"small",value:v?.modified_date?new Date(v.modified_date).toLocaleString():"",InputProps:{readOnly:!0,endAdornment:e.jsx(n.IconButton,{size:"small",children:e.jsx(T,{fontSize:"small"})}),sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]}),e.jsxs(n.Box,{children:[e.jsx(n.Typography,{sx:{fontSize:"14px",fontWeight:500,color:"#6b6b6b",mb:.5},children:"Modified By*"}),e.jsx(n.TextField,{fullWidth:!0,size:"small",value:v?.modified_by||"",InputProps:{readOnly:!0,sx:{backgroundColor:"#0E0C0B0F",borderRadius:"4px"}}})]})]}),e.jsxs(n.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,mt:3},children:[e.jsx(n.Button,{variant:"outlined",onClick:s,sx:{borderColor:jt,color:jt,"&:hover":{borderColor:jt,backgroundColor:"rgba(122, 90, 248, 0.04)"}},children:"Cancel"}),e.jsx(n.Button,{variant:"contained",onClick:()=>{f(u,x),o()},disabled:C,sx:{backgroundColor:jt,"&:hover":{backgroundColor:"#6A4DE8"},"&.Mui-disabled":{backgroundColor:"#d7cefd",color:"rgba(255, 255, 255, 0.7)"}},children:"Save"})]})]})]})};const wt={mainTabsContainer:{backgroundColor:"#FAFAF9",height:"100%",minWidth:"6.75rem",position:"sticky",top:"0",left:"0","& .MuiTabs-indicator":{display:"none"}},mainTabContainer:{borderRadius:"0.375rem",padding:"0.5rem 1.25rem",alignItems:"flex-start",color:"rgba(14, 12, 11, 0.9)",textTransform:"initial",minHeight:"38px","&.Mui-selected":{backgroundColor:"rgba(122, 90, 248, 0.16)",color:"#7A5AF8",borderRadius:"0.375rem"}},mainTabLabel:{}},yt={mainTabsContainer:{mb:2,"& .MuiTab-root":{color:"#0E0C0BE5",textTransform:"none",fontWeight:500},"& .Mui-selected":{color:"#7A5AF8"},"& .MuiTabs-indicator":{backgroundColor:"#7A5AF8",height:3}}},St=({tabItems:t,...i})=>{const{value:s,onChange:o}=i;return e.jsx(n.Tabs,{value:s,onChange:o,"aria-label":"vertical-tabs",orientation:"vertical",variant:"scrollable",sx:wt.mainTabsContainer,...i,children:t.map((t,i)=>e.jsx(n.Tab,{sx:wt.mainTabContainer,label:e.jsx(n.Box,{sx:wt.mainTabLabel,children:e.jsx("span",{children:t.label})})},i))})},kt=({children:t,value:i,index:n,...s})=>e.jsx(g,{role:"tabpanel",hidden:i!==n,id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,...s,sx:{height:"100%"},children:i===n&&t}),Tt=({id:t,containerId:i,children:s})=>{const{attributes:r,listeners:a,setNodeRef:d,transform:c,transition:u,isDragging:h}=o.useSortable({id:t,data:{type:"filter-item",containerId:i,id:t}}),x={transform:l.CSS.Transform.toString(c),transition:u,opacity:h?.8:1};return e.jsxs(n.Box,{ref:d,style:x,...r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between","&:hover":{bgcolor:"#f5f5f5"},borderRadius:1,marginBottom:1,cursor:h?"grabbing":"default",boxShadow:h?"0 2px 8px rgba(0,0,0,0.1)":"none"},children:[e.jsx(n.Box,{...a,sx:{cursor:"grab",display:"flex",alignItems:"center"},children:e.jsx(C.DragIndicator,{sx:{mr:1,color:"#ccc"}})}),s]})},Mt={dialogTitle:{backgroundColor:"#FBFBFC",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.75rem"},dialogContent:{display:"flex",gap:"1rem",paddingTop:"1rem !important"},dialogActionsButton:{backgroundColor:"#7A5AF8",color:"#fff"}},Ft={wrapper:{border:"0.5px solid #0E0C0B1F",borderRadius:"8px",backgroundColor:"#fdfdfc",zIndex:10,overflow:"hidden"},heading:{fontWeight:400,color:"#0E0C0BB2",fontSize:"16px"},button:{fontSize:"13px",textTransform:"none",color:"#0E0C0BB2"},draggableContainer:{maxHeight:200,borderRadius:1,mt:2,transition:"background-color 0.2s ease"},draggableCover:{minHeight:"200px",maxHeight:"200px",overflowY:"auto"},headerContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2}},It={mainTabsHeader:{fontStyle:"italic",fontWeight:400,fontSize:"12px",color:"#0E0C0BB2"},mainTabDropdown:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"50%",paddingRight:1},mainTabSelect:{width:"65%","& .MuiOutlinedInput-root":{borderRadius:"6px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#7A5AF8"}}},selectDropdownSeparator:{width:"30%","& .MuiOutlinedInput-root":{borderRadius:"6px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#7A5AF8"}}},checkboxStyle:{display:"flex",flexDirection:"column"}},Dt=({item:t,containerId:i,onItemToggle:s})=>e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flex:1,color:"tabs"===i?"black":"#9e9d9b"},children:[e.jsx(n.Typography,{children:t.label}),e.jsx(n.IconButton,{size:"small",onClick:()=>s(t,i),children:"tabs"===i?e.jsx(ee,{}):e.jsx(te,{})})]}),Bt=({filteredValues:t,buttonText:i,onClick:l,headerText:r,searchTerm:a,setSearchTerm:d,containerId:c,tabsApiDataLoading:u,onItemToggle:h,enableDragAndDrop:x=!0,AlertComponenet:p})=>{const{setNodeRef:m}=s.useDroppable({id:c,data:{type:"container",containerId:c}});return e.jsx(n.Grid,{size:6,sx:Ft.wrapper,children:u?e.jsx(lt,{}):e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{p:2,backgroundColor:"#fdfdfc",borderRadius:"12px",top:2},children:[e.jsxs(n.Box,{sx:Ft.headerContainer,children:[e.jsx(n.Typography,{variant:"h6",sx:Ft.heading,children:r}),e.jsx(n.Button,{onClick:l,variant:"text",size:"small",sx:Ft.button,disabled:0===t.length,children:i})]}),void 0!==a&&void 0!==d&&e.jsx(nt,{value:a,onChange:d}),e.jsx(n.Box,{ref:m,sx:Ft.draggableContainer,children:x?e.jsx(o.SortableContext,{items:t.map(e=>e.value),strategy:o.verticalListSortingStrategy,children:e.jsx(n.Box,{sx:Ft.draggableCover,children:t.map(t=>e.jsx(Tt,{id:t.value,containerId:c,children:e.jsx(Dt,{item:t,containerId:c,onItemToggle:h})},t.value))})}):e.jsx(n.Box,{sx:Ft.draggableCover,children:t?.length>0&&t.map(t=>e.jsx(Dt,{item:t,containerId:c,onItemToggle:h},t.value))})})]}),p&&p]})})},At=({message:t,width:i="100%",top:s=10,color:o="#088AB2",zIndex:l=-1,position:r="absolute"})=>e.jsx(n.Box,{sx:{fontSize:"12px",color:o,width:i,height:"fit-content",position:r,zIndex:l,top:s},children:e.jsx(n.Alert,{sx:{borderRadius:"12px 12px 0 0 !important"},severity:"info",children:t})}),Lt=({filterSettingStates:t,columnsData:o,tabsApiData:l,tabsApiDataLoading:r,activeTab:a,columnTabAttributes:d})=>{const{settingsData:c,setSettingsData:u,saveButtonError:h,setSaveButtonError:x,columnTabState:p,sortingTabState:m}=t,{container:g}=oe(),[C,b]=i.useState(""),[f,v]=i.useState(c?.quick_tab?.attribute||""),j=c?.quick_tab,_=d?.map(e=>({label:e?.name,value:e?.attribute_key}))||[];i.useEffect(()=>{!(j&&Object.entries(j)||[]).length&&u(e=>({...e,quick_tab:{...e?.quick_tab,attribute:o[0]?.value,sorting:"asc"}}))},[o]),i.useEffect(()=>{f!==c?.quick_tab?.attribute&&(l?.length?(u(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:l,show_list:[]}})),v(c?.quick_tab?.attribute||"")):u(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[],show_list:[]}})))},[l]),i.useEffect(()=>{const e=j?.show_list||[];if(e||(j?.hide_list||[])){const t=e.length>0&&e.length<=5,i="quick_tab_error";t?h?.messages?.some(e=>e.type!==i):(e.length,h?.messages?.some(e=>e.type===i))}},[j?.hide_list,j?.show_list]);const w=j?.show_list||[],y=j?.hide_list||[],S=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),k=y.filter(e=>e?.label?.toLowerCase().includes(C.toLowerCase())),T=(e,t)=>{const i=[...j.show_list??[]],n=[...j.hide_list??[]];u(s=>{let o=s.column,l=s.sorting;if("list"===t){if(i.length>=5)return s;const t=n.findIndex(t=>t.value==e.value);if(t>-1){if(n.splice(t,1),i.push(e),!m?.isDefault){const t=s.sorting?.tabs?.some(t=>t.tab_name.value===e.value);t||(l={...s.sorting,tabs:[...s.sorting.tabs,{tab_name:{label:e.label,value:e.value},sortby:[]}]})}if(!p?.isDefault){const t=s?.column?.tabs?.some(t=>t.tab_name.value===e.value);t||(o={...s.column,tabs:[...s.column.tabs,{tab_name:{label:e.label,value:e.value},show_list:_,hide_list:[]}]})}}}else if("tabs"===t){const t=i.findIndex(t=>t.value==e.value);if(t>-1){if(i.splice(t,1),n.push(e),!p?.isDefault){const t=s?.column?.tabs.filter(t=>t.tab_name?.value!==e.value);o={...s.column,tabs:t}}if(!m.isDefault){const t=s?.sorting?.tabs?.filter(t=>t.tab_name?.value!=e.value);l={...s.sorting,tabs:t}}}}return{...s,quick_tab:{...s?.quick_tab,show_list:i,hide_list:n},column:o,sorting:l}})},M="custom"===j?.sorting;return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(n.Typography,{variant:"caption",sx:It.mainTabsHeader,children:"*Quick filter settings will be reflected in horizontal tabs"}),e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(n.Grid,{size:12,children:e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:It.mainTabDropdown,size:6,children:[e.jsx(n.FormControl,{sx:It.mainTabSelect,size:"small",children:e.jsx(n.Select,{value:j?.attribute||"",onChange:e=>u(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),MenuProps:{container:g},children:o?.map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.label},t?.value))})}),e.jsx(n.FormControl,{sx:It.selectDropdownSeparator,size:"small",children:e.jsx(n.Select,{value:j?.sorting||"asc",onChange:e=>u(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),MenuProps:{container:g},children:[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}].map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(n.Grid,{}),e.jsx(s.DndContext,{sensors:S,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(!i)return;const n=t.data.current?.containerId,s=i.data.current?.containerId;if(!n||!s)return;let o=[...j.show_list??[]],l=[...j.hide_list??[]];if(n===s)if("list"===n){const e=l.findIndex(e=>e.value===t.id),n=l.findIndex(e=>e.value===i.id);if(-1!==e&&-1!==n){const[t]=l.splice(e,1);l.splice(n,0,t)}}else{const e=o.findIndex(e=>e.value===t.id),n=o.findIndex(e=>e.value===i.id);if(-1!==e&&-1!==n){const[t]=o.splice(e,1);o.splice(n,0,t)}}if(n!==s)if("list"===n&&"tabs"===s){if(o.length<5){const e=l.findIndex(e=>e.value===String(t.id));if(-1!==e){const t=l.splice(e,1)[0];o.push(t),u(e=>{let i=e.sorting,n=e.column;if(!e?.sorting?.isDefault){const n=e.sorting?.tabs?.some(e=>e.tab_name.value===t.value);n||(i={...e.sorting,tabs:[...e.sorting.tabs,{tab_name:t,sortby:[]}]})}if(!e?.column?.isDefault){const i=e.column?.tabs?.some(e=>e.tab_name.value===t.value);i||(n={...e.column,tabs:[...e.column.tabs,{tab_name:t,show_list:_,hide_list:[]}]})}return{...e,sorting:i,column:n}})}}}else if("tabs"===n&&"list"===s){const e=o.findIndex(e=>e.value===String(t.id));if(-1!==e){const t=o.splice(e,1)[0];l.push(t),u(e=>{let i=e.sorting,n=e.column;return e?.sorting?.isDefault||(i={...e.sorting,tabs:e?.sorting?.tabs?.filter(e=>e.tab_name?.value!==t?.value)}),e?.column?.isDefault||(n={...e.column,tabs:e?.column?.tabs?.filter(e=>e.tab_name?.value!==t?.value)}),{...e,sorting:i,column:n}})}}u(e=>{let t=e.column;e?.column?.isDefault||(t={...e.column,tabs:e.column?.tabs?[...e.column.tabs].sort((e,t)=>o.findIndex(t=>t.value===e.tab_name.value)-o.findIndex(e=>e.value===t.tab_name.value)):[]});const i=(()=>{if(e.sorting?.isDefault)return{isDefault:!0,sort_by:e.sorting?.sort_by||"asc"};return{...e.sorting,tabs:e.sorting?.tabs?[...e.sorting.tabs].sort((e,t)=>o.findIndex(t=>t.value===e.tab_name.value)-o.findIndex(e=>e.value===t.tab_name.value)):[]}})();return{...e,quick_tab:{...e.quick_tab,show_list:o,hide_list:l},column:t,sorting:i}})},children:e.jsxs(n.Grid,{sx:{mt:1},container:!0,spacing:2,size:12,children:[e.jsx(Bt,{buttonText:"Show All",onClick:()=>{const e=j.show_list||[],t=j.hide_list||[],i=5-e.length;if(i<=0)return;const n=t.slice(0,i);u(i=>({...i,quick_tab:{...i?.quick_tab,show_list:[...e,...n],hide_list:t.filter(e=>!n.find(t=>t.value===e.value))}}))},headerText:"List of Values",filteredValues:k,searchTerm:C,setSearchTerm:b,containerId:"list",tabsApiDataLoading:r,onItemToggle:T,enableDragAndDrop:M}),e.jsx(Bt,{buttonText:"Hide All",onClick:()=>{u(e=>{const t={...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]},i=(()=>{if(e?.column?.isDefault)return{...e.column,show_list:[],hide_list:[...e.column?.hide_list||[],...e.column?.show_list||[]]};const t=e?.column?.tabs?.map(e=>({...e,show_list:[],hide_list:[...e.hide_list||[],...e.show_list||[]]}));return{...e.column,tabs:t}})(),n=e.sorting?.isDefault?{...e.sorting,sortby:[]}:{...e.sorting,tabs:e.quick_tab?.show_list?.map(()=>({sortby:[]}))};return{...e,quick_tab:t,column:i,sorting:n}})},headerText:"View as Tabs",filteredValues:w,containerId:"tabs",onItemToggle:T,enableDragAndDrop:M,AlertComponenet:e.jsx(At,{message:"Please select at least 1 and at most 5 values to display as\r\n tabs.",width:"49.2%",zIndex:-1})})]})}),e.jsx(n.Grid,{size:12,children:e.jsxs(n.Box,{sx:It.checkboxStyle,children:[e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:j?.isAllSelected||!1,onChange:e=>{u(t=>({...t,quick_tab:{...t?.quick_tab,isAllSelected:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:'Show "All" tab'}),e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:j?.isCombineOther||!1,onChange:e=>{u(t=>({...t,quick_tab:{...t?.quick_tab,isCombineOther:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:'Combine remaining values under "Other" tab'})]})})]})})]})},zt={textTransform:"initial",minWidth:"5rem",minHeight:"1.875rem",color:"#7A5AF8",fontWeight:500,fontSize:"0.813rem",borderColor:"#7A5AF8","&.Mui-selected":{backgroundColor:"#7A5AF8",color:"#fff",fontWeight:600,"&:hover":{backgroundColor:"#6346e2"}}};function Et({buttons:t,...i}){return e.jsx(n.ToggleButtonGroup,{exclusive:!0,size:"small",color:"primary",sx:{marginTop:"-4px",marginBottom:"6px"},...i,children:t.map(t=>e.jsx(n.ToggleButton,{value:t?.value,disabled:t?.isDisabled,sx:zt,children:t?.label},t?.label))})}const Ot=[{label:"Quick Tab"},{label:"Column"},{label:"Sorting"}],Vt=[{label:"Lane"},{label:"Group By"}],Ht=[{key:"stage_group",value:"Stage Group"},{key:"stage",value:"Stage"},{key:"source",value:"Source"},{key:"status",value:"Status"}],Rt=[{label:"Default",value:!0,isDisabled:!1},{label:"Tab Wise",value:!1,isDisabled:!1}],qt=({children:t,...i})=>{const{value:s,onChange:o}=i;return e.jsx(n.Tabs,{value:s,onChange:o,"aria-label":"horizontal-tabs",variant:"scrollable",sx:yt.mainTabsContainer,...i,children:t})},Pt=({filterSettingStates:t,columnsData:o,columnTabAttributes:l,columnTabAttributesLoading:r})=>{const[a,d]=i.useState(""),[c,u]=i.useState(0),{quickTabStates:h,settingsData:x,setSettingsData:p,saveButtonError:m,setSaveButtonError:g}=t,C=x?.column||{},b=C?.isDefault||!1,f="column_error";i.useEffect(()=>{const e=!(Object.entries(C)||[]).length,t=!C?.show_list?.length&&!C?.hide_list?.length,i=!C?.tabs?.length,n=l?.map(e=>({...e,label:e?.name,value:e?.attribute_key}))||[];if(e)p(e=>({...e,column:{isDefault:!0,show_list:n,hide_list:[]}}));else if(b&&t)p(e=>({...e,column:{...e.column,show_list:n,hide_list:[]}}));else if(!b){const e=i?h?.show_list?.map(e=>({tab_name:e,show_list:n,hide_list:[]}))||[]:h?.show_list?.map((e,t)=>({tab_name:e,show_list:C?.tabs[t]?.show_list||n,hide_list:C?.tabs[t]?.hide_list||[]}))||[];p(t=>({...t,column:{...t.column,tabs:e}}))}},[b]),i.useEffect(()=>{const e=C?.show_list||[];if(e||(C?.hide_list||[])){if(e?.length>0){const e=m?.messages?.some(e=>e.type!==f);g(t=>({...t,hasError:e,messages:t?.messages?.filter(e=>e.type!==f)||[]}))}else{m.messages.some(e=>e.type===f)||g(e=>({...e,hasError:!0,messages:[...e.messages,{type:f,message:"Column: Please select at least one column"}]}))}}},[C?.show_list,C?.hide_list]);const v=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),{showList:j,hideList:_}=(()=>{if(C?.isDefault)return{showList:C.show_list||[],hideList:C.hide_list||[]};{const e=C?.tabs?.[c];return{showList:e?.show_list||[],hideList:e?.hide_list||l?.map(e=>({label:e?.name,value:e?.attribute_key}))||[]}}})(),w=j.map(e=>({value:e.value,label:e.label,visible:!0})),y=_.map(e=>({value:e.value,label:e.label,visible:!1})).filter(e=>e.label.toLowerCase().includes(a.toLowerCase())),S=(e,t)=>{let i=[...j],n=[..._];if("tabs"===t){const t=i.findIndex(t=>t.value===e.value);if(t>-1){const[e]=i.splice(t,1);n.push(e)}}else if("list"===t){const t=n.findIndex(t=>t.value===e.value);if(t>-1){const[e]=n.splice(t,1);i.push(e)}}if(b)p(e=>({...e,column:{...e.column,show_list:i,hide_list:n}}));else{const e=[...C?.tabs||[]];e[c]={...e[c],show_list:i,hide_list:n},p(t=>({...t,column:{...t.column,tabs:e}}))}},k=0!==h?.show_list?.length||b;return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},children:[e.jsxs(n.Box,{children:[e.jsx(n.Typography,{variant:"subtitle2",sx:{mb:1},children:"Customize column by"}),e.jsx(Et,{buttons:Rt,value:b,onChange:(e,t)=>{null!==t&&p(e=>({...e,column:{...e.column,isDefault:t}}))}})]}),e.jsxs(n.Box,{sx:{flex:1},children:[!b&&k&&e.jsx(qt,{value:c,onChange:(e,t)=>{u(t)},children:h?.show_list?.map(t=>e.jsx(n.Tab,{label:t?.label},t?.value))}),k?e.jsx(s.DndContext,{sensors:v,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(!i)return;const n=t.data.current?.containerId,s=i.data.current?.containerId;if(!n||!s)return;const o=[...j,..._].find(e=>e.value===String(t.id));if(!o)return;let l=[...j],r=[..._];if(n===s){const e="list"===n?r:l,s=e.findIndex(e=>e.value===String(t.id)),o=e.findIndex(e=>e.value===String(i.id));if(-1!==s&&-1!==o){const[t]=e.splice(s,1);e.splice(o,0,t)}}else if("list"===n&&"tabs"===s){const e=r.findIndex(e=>e.value===String(t.id));-1!==e&&(r.splice(e,1),l.push(o))}else if("tabs"===n&&"list"===s){const e=l.findIndex(e=>e.value===String(t.id));-1!==e&&(l.splice(e,1),r.push(o))}if(b)p(e=>({...e,column:{...e.column,show_list:l,hide_list:r}}));else{const e=[...C?.tabs||[]];e[c]={...e[c],show_list:l,hide_list:r},p(t=>({...t,column:{...t.column,tabs:e}}))}},children:e.jsxs(n.Grid,{container:!0,spacing:2,children:[e.jsx(Bt,{containerId:"list",headerText:"Hidden In List",filteredValues:y,buttonText:"Show All",onClick:()=>{if(b)p(e=>({...e,column:{...e.column,show_list:[...j,..._],hide_list:[]}}));else{const e=[...C.tabs||[]];e[c]={...e[c],show_list:[...j,..._],hide_list:[]},p(t=>({...t,column:{...t.column,tabs:e}}))}},searchTerm:a,setSearchTerm:d,onItemToggle:S}),e.jsx(Bt,{containerId:"tabs",headerText:"Show In List",filteredValues:w,buttonText:"Hide All",onClick:()=>{if(b)p(e=>({...e,column:{...e.column,show_list:[],hide_list:[..._,...j]}}));else{const e=[...C.tabs||[]];e[c]={...e[c],show_list:[],hide_list:[..._,...j]},p(t=>({...t,column:{...t.column,tabs:e}}))}},onItemToggle:S,AlertComponenet:e.jsx(At,{message:"Please select at least 1 value to display as tabs.",width:"49.2%",top:93})})]})}):e.jsx(n.Typography,{children:"View as Tabs empty in Quick Tab"})]})]})},Wt=({filterSettingStates:t,columnsData:l})=>{const{quickTabStates:r,saveButtonError:a,settingsData:d,setSettingsData:c}=t,[u,h]=i.useState(r?.show_list?.[0]?.value),x=d?.column,p=d?.sorting,m=p?.isDefault,g=i.useMemo(()=>!p||0===Object.entries(p).length,[p]);i.useMemo(()=>!g&&!p?.sortby?.length,[g,p]),i.useEffect(()=>{const e=[{column:"",order:"asc"}];p&&0!==Object.keys(p).length?!1!==p?.isDefault||p?.tabs&&0!==p?.tabs.length||c(t=>{const i=(t.quick_tab?.show_list||[]).map(t=>({tab_name:{value:t.value,label:t.label},sortby:e}));return{...t,sorting:{...t.sorting,tabs:i}}}):c(e=>({...e,sorting:{isDefault:!0,sortby:[]}}))},[]);const C=s.useSensors(s.useSensor(s.PointerSensor)),b=x?.isDefault?r?.show_list?.findIndex(e=>e?.value===u||e?.label?.toLowerCase()===u?.toLowerCase()):x?.tabs?.findIndex(e=>e?.tab_name?.value==u||e?.tab_name?.label?.toLowerCase()==u?.toLowerCase()),f=i.useMemo(()=>m?p?.sortby||[{column:"",order:"asc"}]:void 0!==u&&p?.tabs?.[b||0]?.sortby?p?.tabs?.[b||0]?.sortby:[],[p,u]),v=e=>{c(t=>{if(t?.sorting?.isDefault)return{...t,sorting:{...t?.sorting,sortby:e}};{const i=[...t?.sorting?.tabs||[]];return i[b||0]={...i[b||0],tab_name:d?.column?.tabs?.[b||0]?.tab_name||{label:"",value:""},sortby:e},{...t,sorting:{...t?.sorting,tabs:i}}}})},j=(e,t,i)=>{if(!f)return;const n=[...f];n[i]={...n[i],[e]:t},v(n)},_=!(0===r?.show_list?.length&&!m),w=i.useMemo(()=>{const e=l?.length??0;return(p?.sortby?.length??0)!==e},[l,p]),y=i.useMemo(()=>{const e=p?.sortby?.some(e=>""===e.column);return e},[a,p]),{showList:S}=p?.isDefault?{showList:l?.map(e=>({label:e?.name,value:e?.attribute_key}))||[],hideList:x?.hide_list||[]}:{showList:l?.map(e=>({label:e?.name,value:e?.attribute_key}))||[]};return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[e.jsx(n.Typography,{children:"Select attribute(s) you want to sort by"}),e.jsx(Et,{buttons:Rt,value:m,onChange:(e,t)=>{null!==t&&c(e=>({...e,sorting:{...e.sorting,isDefault:t}}))}}),_?e.jsx(e.Fragment,{children:e.jsxs(n.Box,{children:[!m&&e.jsx(qt,{value:u,onChange:(e,t)=>h(t),children:r?.show_list?.map(t=>e.jsx(n.Tab,{label:t?.label,value:t?.value},t?.value))}),e.jsx(s.DndContext,{sensors:C,collisionDetection:s.closestCenter,onDragEnd:e=>{if(!f)return;const{active:t,over:i}=e;if(!i||t.id===i.id)return;const n=f.findIndex(e=>e.column===t.id),s=f.findIndex(e=>e.column===i.id);if(-1!==n&&-1!==s){const e=o.arrayMove(f,n,s);v(e)}},children:e.jsx(o.SortableContext,{items:f?.map(e=>e.column)||[],strategy:o.verticalListSortingStrategy,children:f?.map((t,i)=>e.jsx(re,{id:t.column,children:e.jsxs(n.Box,{display:"flex",gap:1,alignItems:"center",mb:1,children:[e.jsx(n.Select,{value:t.column,onChange:e=>j("column",e.target.value,i),size:"small",fullWidth:!0,children:S.map((t,i)=>e.jsx(n.MenuItem,{value:t.value,disabled:f.some(e=>e.column===t?.value),children:t?.label},i))}),e.jsxs(n.Select,{value:t.order,onChange:e=>j("order",e.target.value,i),size:"small",fullWidth:!0,children:[e.jsx(n.MenuItem,{value:"asc",children:"Ascending"}),e.jsx(n.MenuItem,{value:"dsc",children:"Descending"})]}),e.jsx(n.IconButton,{size:"small",onClick:()=>(e=>{if(!f)return;const t=f.filter(t=>t.column!==e);v(t)})(t.column),children:e.jsx(W,{})})]})},t.column))})}),w&&e.jsx(n.Box,{children:e.jsx(n.Button,{onClick:()=>{if(!f)return;v([...f,{column:"",order:"asc"}])},startIcon:e.jsx(Q,{}),variant:"text",sx:{fontSize:13,color:"#7A5AF8"},disabled:y,children:"Add Sort"})})]})}):e.jsx(n.Typography,{children:"View as Tabs empty in Quick Tab"})]})},Nt=n.styled(n.Dialog)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:0,height:"100%"},"& .MuiDialogContent-root":{...Mt.dialogContent,padding:e.spacing(2)},"& .MuiDialogActions-root":{padding:e.spacing(2)}})),Zt=i.forwardRef(function(t,i){return e.jsx(n.Slide,{direction:"down",ref:i,...t})}),Yt=({...t})=>{const i={...Mt.dialogActionsButton,...t.sx};return e.jsx(n.Button,{variant:"contained",...t,sx:i,children:t.children})},$t=({filterSettingStates:t,columnsData:o,tabsApiData:l,tabsApiDataLoading:r})=>{const{settingsData:a,setSettingsData:d,saveButtonError:c,setSaveButtonError:u}=t,[h,x]=i.useState(""),[p,m]=i.useState(a?.quick_tab?.attribute||""),g=a?.quick_tab;i.useEffect(()=>{!(g&&Object.entries(g)||[]).length&&d(e=>({...e,quick_tab:{...e?.quick_tab,attribute:Ht[0].value,sorting:"asc"}}))},[o]),i.useEffect(()=>{p!==a?.quick_tab?.attribute&&l?.length&&(d(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:l,show_list:[]}})),m(a?.quick_tab?.attribute||""))},[l]),i.useEffect(()=>{const e=g?.show_list||[];if(e||(g?.hide_list||[])){const t=e.length>0&&e.length<=5,i="quick_tab_error";t?c?.messages?.some(e=>e.type!==i):(e.length,c?.messages?.some(e=>e.type===i))}},[g?.hide_list,g?.show_list]);const C=[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}],b=(g?.show_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),f=(g?.hide_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),v=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),j=f.filter(e=>e?.label?.toLowerCase().includes(h.toLowerCase())),_=(e,t)=>{const i=[...g.show_list??[]],n=[...g.hide_list??[]];if("list"===t){if(i.length>=5)return;const t=n.indexOf(e);t>-1&&(n.splice(t,1),i.push(e))}else if("lanes"===t){const t=i.indexOf(e);t>-1&&(i.splice(t,1),n.push(e))}d(e=>({...e,quick_tab:{...e?.quick_tab,show_list:i,hide_list:n}}))},w="custom"===g?.sorting;return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(n.Typography,{variant:"caption",sx:It.mainTabsHeader,children:"*Quick filter settings will be reflected in vertical lanes"}),e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(n.Grid,{size:12,children:e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:It.mainTabDropdown,size:6,children:[e.jsx(n.FormControl,{sx:It.mainTabSelect,size:"small",children:e.jsx(n.Select,{value:g?.attribute||"",onChange:e=>d(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),displayEmpty:!0,renderValue:t=>t||e.jsx("em",{children:"Select Attribute"}),children:Ht?.map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.value},t?.key))})}),e.jsx(n.FormControl,{sx:It.selectDropdownSeparator,size:"small",children:e.jsx(n.Select,{value:g?.sorting||"asc",onChange:e=>d(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),displayEmpty:!0,renderValue:t=>{if(!t)return e.jsx("em",{children:"Sort by"});const i=C.find(e=>e.value===t);return i?.label||t},children:C.map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(n.Grid,{}),e.jsx(s.DndContext,{sensors:v,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(!i)return;const n=t.data.current?.containerId,s=i.data.current?.containerId;if(n&&s)if(n===s){let e=[...g.show_list??[]],s=[...g.hide_list??[]];if("list"===n){const e=s.indexOf(String(t.id)),n=s.indexOf(String(i.id));if(-1!==e&&-1!==n){const[t]=s.splice(e,1);s.splice(n,0,t)}}else{const n=e.indexOf(String(t.id)),s=e.indexOf(String(i.id));if(-1!==n&&-1!==s){const[t]=e.splice(n,1);e.splice(s,0,t)}}d(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:s}}))}else{let e=[...g.show_list??[]],i=[...g.hide_list??[]];if("list"===n&&"lanes"===s){if(e.length>=5)return;const n=i.indexOf(String(t.id));-1!==n&&(i.splice(n,1),e.push(String(t.id)))}else if("lanes"===n&&"list"===s){const n=e.indexOf(String(t.id));-1!==n&&(e.splice(n,1),i.push(String(t.id)))}d(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:i}}))}},children:e.jsxs(n.Grid,{sx:{mt:2},container:!0,spacing:2,size:12,children:[e.jsx(Bt,{buttonText:"Show All",onClick:()=>{const e=g.show_list||[],t=g.hide_list||[],i=5-e.length;if(i<=0)return;const n=t.slice(0,i);d(i=>({...i,quick_tab:{...i?.quick_tab,show_list:[...e,...n],hide_list:t.filter(e=>!n.includes(e))}}))},headerText:"List of Values",filteredValues:j,searchTerm:h,setSearchTerm:x,containerId:"list",tabsApiDataLoading:r,onItemToggle:_,enableDragAndDrop:w}),e.jsx(Bt,{buttonText:"Hide All",onClick:()=>{d(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]}}))},headerText:"View as Lanes",filteredValues:b,containerId:"lanes",onItemToggle:_,enableDragAndDrop:w,AlertComponenet:e.jsx(At,{message:"Please select at least 1 and at most 5 values to display as\r\n lanes.",width:"49%",position:"absolute",color:"#088AB2",top:10,zIndex:1})})]})}),e.jsx(n.Grid,{size:12,children:e.jsxs(n.Box,{sx:It.checkboxStyle,children:[e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:g?.showSubLane||!1,onChange:e=>{d(t=>({...t,quick_tab:{...t?.quick_tab,showSubLane:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Sublane"}),e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:g?.showColorColumns||!1,onChange:e=>{d(t=>({...t,quick_tab:{...t?.quick_tab,showColorColumns:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Color columns"})]})})]})})]})},Gt=({filterSettingStates:t,columnsData:o,tabsApiData:l,tabsApiDataLoading:r})=>{const{settingsData:a,setSettingsData:d,saveButtonError:c,setSaveButtonError:u}=t,[h,x]=i.useState(""),[p,m]=i.useState(a?.quick_tab?.attribute||""),g=a?.quick_tab;i.useEffect(()=>{!(g&&Object.entries(g)||[]).length&&d(e=>({...e,quick_tab:{...e?.quick_tab,attribute:Ht[0].value,sorting:"asc"}}))},[o]),i.useEffect(()=>{p!==a?.quick_tab?.attribute&&l?.length&&(d(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:l,show_list:[]}})),m(a?.quick_tab?.attribute||""))},[l]),i.useEffect(()=>{const e=g?.show_list||[];if(e||(g?.hide_list||[])){const t=e.length>0&&e.length<=5,i="quick_tab_error";t?c?.messages?.some(e=>e.type!==i):(e.length,c?.messages?.some(e=>e.type===i))}},[g?.hide_list,g?.show_list]);const C=[{label:"A-Z",value:"asc"},{label:"Z-A",value:"dsc"},{label:"Count (Ascending)",value:"count_asc"},{label:"Count (Descending)",value:"count_dsc"},{label:"Custom",value:"custom"}],b=(g?.show_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),f=(g?.hide_list||[])?.map(e=>({id:e,label:e?.charAt(0)?.toUpperCase()+e?.slice(1)})),v=s.useSensors(s.useSensor(s.MouseSensor),s.useSensor(s.TouchSensor),s.useSensor(s.KeyboardSensor)),j=f.filter(e=>e?.label?.toLowerCase().includes(h.toLowerCase())),_=(e,t)=>{const i=[...g.show_list??[]],n=[...g.hide_list??[]];if("list"===t){if(i.length>=5)return;const t=n.indexOf(e);t>-1&&(n.splice(t,1),i.push(e))}else if("lanes"===t){const t=i.indexOf(e);t>-1&&(i.splice(t,1),n.push(e))}d(e=>({...e,quick_tab:{...e?.quick_tab,show_list:i,hide_list:n}}))},w="custom"===g?.sorting;return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[e.jsx(n.Typography,{variant:"caption",sx:It.mainTabsHeader,children:"*Quick filter settings will be reflected in vertical lanes"}),e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:{position:"relative"},container:!0,children:[e.jsx(n.Grid,{size:12,children:e.jsx(n.Box,{children:e.jsxs(n.Grid,{sx:It.mainTabDropdown,size:6,children:[e.jsx(n.FormControl,{sx:It.mainTabSelect,size:"small",children:e.jsx(n.Select,{value:g?.attribute||"",onChange:e=>d(t=>({...t,quick_tab:{...t?.quick_tab,attribute:e.target.value}})),displayEmpty:!0,renderValue:t=>t||e.jsx("em",{children:"Select Attribute"}),children:Ht?.map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.value},t?.key))})}),e.jsx(n.FormControl,{sx:It.selectDropdownSeparator,size:"small",children:e.jsx(n.Select,{value:g?.sorting||"asc",onChange:e=>d(t=>({...t,quick_tab:{...t?.quick_tab,sorting:e.target.value}})),displayEmpty:!0,renderValue:t=>{if(!t)return e.jsx("em",{children:"Sort by"});const i=C.find(e=>e.value===t);return i?.label||t},children:C?.map(t=>e.jsx(n.MenuItem,{value:t?.value,children:t?.label},t?.value))})})]})})}),e.jsx(n.Grid,{}),e.jsx(s.DndContext,{sensors:v,collisionDetection:s.closestCenter,onDragEnd:e=>{const{active:t,over:i}=e;if(!i)return;const n=t.data.current?.containerId,s=i.data.current?.containerId;if(n&&s)if(n===s){let e=[...g.show_list??[]],s=[...g.hide_list??[]];if("list"===n){const e=s.indexOf(String(t.id)),n=s.indexOf(String(i.id));if(-1!==e&&-1!==n){const[t]=s.splice(e,1);s.splice(n,0,t)}}else{const n=e.indexOf(String(t.id)),s=e.indexOf(String(i.id));if(-1!==n&&-1!==s){const[t]=e.splice(n,1);e.splice(s,0,t)}}d(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:s}}))}else{let e=[...g.show_list??[]],i=[...g.hide_list??[]];if("list"===n&&"lanes"===s){if(e.length>=5)return;const n=i.indexOf(String(t.id));-1!==n&&(i.splice(n,1),e.push(String(t.id)))}else if("lanes"===n&&"list"===s){const n=e.indexOf(String(t.id));-1!==n&&(e.splice(n,1),i.push(String(t.id)))}d(t=>({...t,quick_tab:{...t?.quick_tab,show_list:e,hide_list:i}}))}},children:e.jsxs(n.Grid,{sx:{mt:2},container:!0,spacing:2,size:12,children:[e.jsx(Bt,{buttonText:"Show All",onClick:()=>{const e=g.show_list||[],t=g.hide_list||[],i=5-e.length;if(i<=0)return;const n=t.slice(0,i);d(i=>({...i,quick_tab:{...i?.quick_tab,show_list:[...e,...n],hide_list:t.filter(e=>!n.includes(e))}}))},headerText:"List of Values",filteredValues:j,searchTerm:h,setSearchTerm:x,containerId:"list",tabsApiDataLoading:r,onItemToggle:_,enableDragAndDrop:w}),e.jsx(Bt,{buttonText:"Hide All",onClick:()=>{d(e=>({...e,quick_tab:{...e?.quick_tab,hide_list:[...e?.quick_tab?.hide_list||[],...e?.quick_tab?.show_list||[]],show_list:[]}}))},headerText:"View as Lanes",filteredValues:b,containerId:"lanes",onItemToggle:_,enableDragAndDrop:w})]})}),e.jsx(n.Grid,{size:12,children:e.jsxs(n.Box,{sx:It.checkboxStyle,children:[e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:g?.showSubLane||!1,onChange:e=>{d(t=>({...t,quick_tab:{...t?.quick_tab,showSubLane:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Sublane"}),e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:g?.showColorColumns||!1,onChange:e=>{d(t=>({...t,quick_tab:{...t?.quick_tab,showColorColumns:e.target.checked}}))},size:"small",sx:{"&.Mui-checked":{color:"#7A5AF8"}}}),label:"Show Color columns"})]})})]})})]})};const Ut={syncingStyle:{display:"flex",flexDirection:"row",gap:"8px",width:"100%"},topHeader:{display:"flex",alignItems:"center",gap:1,px:1,pt:2,bgcolor:"white",width:"fit-content",position:"sticky",top:0,right:0,zIndex:1100},laneHeader:{flex:1,minWidth:"263px",maxWidth:"263px",display:"flex",fontWeight:700,fontSize:"16px",borderRadius:"6px",alignItems:"center",justifyContent:"center",py:"8px",px:"12px",position:"relative"},badge:{position:"absolute",top:"-12px",left:"8px",px:1,color:"white",borderRadius:"8px"},swimlaneWrapperStyle:{flexDirection:"row-reverse",bgcolor:"white",minHeight:44,px:2,py:0,"&.Mui-expanded":{minHeight:44},"& .MuiAccordionSummary-content":{margin:"8px 0",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:5,"&.Mui-expanded":{margin:"8px 0"}},"& .MuiAccordionSummary-expandIconWrapper":{mr:0}},columnStyle:{flex:1,p:"12px",minHeight:"500px",borderRadius:"6px",minWidth:"263px",maxWidth:"263px"},stageStyle:{mb:2,bgcolor:"#f9fafb",borderTopLeftRadius:"8px !important",borderBottomLeftRadius:"8px !important",borderTopRightRadius:"8px !important",overflow:"hidden",boxShadow:"none","&:before":{display:"none"}},subSectionAccordion:{height:"52px",minHeight:"52px","&.Mui-expanded":{minHeight:"52px",height:"52px"},border:"1px solid #e2e8f0",borderTopRightRadius:"8px",px:2},subSectionCountContainer:{color:"white",height:"26px",width:"26px !important",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"},cardsContainer:{px:1,gap:"12px",display:"flex",flexDirection:"column",p:"8px"},settingStyle:{bgcolor:"#f8fafc",width:"56px",height:"41px",borderRadius:"6px",border:"1px solid #e2e8f0"},swimLaneAccordionStyle:{mb:1,"&:before":{display:"none"},py:0,boxShadow:"none"},subSectionHeaderContainer:{display:"flex",alignItems:"center",gap:"8px"}},Kt=[{color:"#fff0f3",darkColor:"#fea3b4"},{color:"#fffbed",darkColor:"#fde272"},{color:"#ebf9fc",darkColor:"#67e3f9"},{color:"#edf9f3",darkColor:"#73e2a3"}];exports.CraftTableFilter=function({onClose:t,columnsData:s,tableStates:o,onDeleteFilter:l,onSaveFilter:r,onUpdateFilter:a,dropdownData:d,onChangeFunction:c,filterComponentOptions:u}){const[h,x]=i.useState(0),[p,m]=i.useState(!1),[g,C]=i.useState(!1),[f,v]=i.useState(!1),[j,_]=i.useState(!1),[w,y]=i.useState(""),{filters:S,setFilters:k,filterToDelete:T,filterMaster:M,setFilterMaster:F,setShowFilterOption:I}=o,D=ft({showMainHeader:!0,mainHeaderTitle:"Filter",showTabs:!0,tabOptions:{isSingleFilter:!1,disableShareFilter:!1,isSingleEntity:!1,showFilter:"main",mainFilter:{showSaveButton:!0,showClearAllButton:!0},savedFilter:{showBackButton:!0,editMode:!1}},showMainFilter:!0,showSavedFilter:!0,showAttributesFilter:!0},u??{}),B=D?.showMainHeader,A=D?.mainHeaderTitle,L=D?.showTabs,z=L&&D?.showMainFilter,E=L&&D?.showSavedFilter,O=L&&D?.showAttributesFilter,V=D?.tabOptions?.savedFilter?.editMode;i.useEffect(()=>{V&&m(V)},[V]);const H=[];z&&H.push({label:"Filter"}),E&&H.push({label:"Saved Filter"}),O&&H.push({label:"Attributes"});const R={label:"Filter Name",placeholder:'e.g., "Website Leads - This Week"',required:!0,type:"text"},q=Boolean(s?.saved_filter?.length),P=()=>{p||F(e=>e?{...e,saved_filters:{...e.saved_filters,shareWithTeam:!1,allowTeamEdit:!1}}:e),v(!0)},W={columnsData:s,tableStates:o,onChangeFunction:c,dropdownData:d},N={editMode:p,setEditMode:m,setDeleteFilterModalOpen:_,tabValue:h},Z={searchTerm:w,setSearchTerm:y};return e.jsxs(n.Box,{sx:tt.filterContainer,children:[B&&e.jsxs(n.Box,{sx:tt.filterMainHeader,children:[e.jsx(n.Typography,{variant:"h6",fontWeight:"bold",fontSize:"18px",children:A}),e.jsx(n.IconButton,{onClick:e=>{e.stopPropagation(),t&&t(),I(!1)},"aria-label":"close",children:e.jsx(b,{fontSize:"small"})})]}),L&&e.jsx(Je,{value:h,onChange:(e,t)=>{const i=H[t]?.label;"Attributes"===i&&"Filter"===H[h]?.label&&(()=>{const e={...M,attributes:{...M?.attributes,radio:[]},activeFilterTabIndex:0};F(e)})(),x(t),0===t&&F(e=>e?{...e,saved_filters:{...e.saved_filters??{},selectedId:"",selectedName:"",description:"",is_shared:!1,is_editable:!1}}:e),"Filter"===i&&(m(!1),F(e=>({...e,activeFilterTabIndex:0})))},tabItems:H,activeFilterIndex:M?.activeFilterTabIndex??0,handleCrossClick:e=>{const t=H[e];k([]),"Saved Filter"===t?.label&&m(!1);const i={};"Saved Filter"===t?.label?i.saved_filters={...M?.saved_filters??{},selectedId:"",selectedName:"",selectedCode:"",is_shared:void 0,is_editable:void 0}:"Attributes"===t?.label&&(i.attributes={radio:[],selected:""});const n={...M,activeFilterTabIndex:-1,...i};F(n),c&&c({filterMaster:n,filters:S})}}),!L&&e.jsx(vt,{...W,...N,...Z,onSaveFilterButtonClick:P,filterComponentOptions:D}),z&&e.jsx(Xe,{value:h,index:H.findIndex(e=>"Filter"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(mt,{...W,onSaveFilterButtonClick:P,filterComponentOptions:D})}),E&&e.jsx(Xe,{value:h,index:H.findIndex(e=>"Saved Filter"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(Ct,{...W,...N,onSaveFilterButtonClick:P,filterComponentOptions:D})}),O&&e.jsx(Xe,{value:h,index:H.findIndex(e=>"Attributes"===e.label),sx:{p:"1.5rem 0.75rem"},children:e.jsx(bt,{...W,...Z,tabValue:h})}),!u?.isRuleEngine&&e.jsx(Qe,{open:g,onClose:()=>C(!1),title:p?"Replace Existing Filter ?":"Save Filter",description:p?"You already have a filter applied. Applying a new filter will replace the current one. Do you want to continue?":"Give a name to this filter so you can easily reuse it later.",buttons:[{label:"Cancel",onClick:()=>{C(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:p?"Replace Filter":"Save",onClick:e=>{if(p){const t=M?.saved_filters?.selectedId,i=e||M?.saved_filters?.selectedName,n=M?.saved_filters?.selectedCode,s=e||M?.saved_filters?.description,o={...M,saved_filters:{...M?.saved_filters??{},selectedId:t,selectedName:i,selectedCode:n,description:s}};F(o);return c&&c({filterMaster:o,filters:S}),a&&a(e||""),C(!1),void m(!1)}r&&r(e||""),C(!1),x(1)},variant:"contained",color:"primary",sx:{color:"white",backgroundColor:"#7A5AF8"}}],input:p?void 0:R}),!u?.isRuleEngine&&e.jsx(Qe,{open:j,onClose:()=>_(!1),title:"Delete Saved Filter?",description:`You're about to delete the saved filter: "${T?.label||"[Filter Name]"}". This action cannot be undone. Are you sure you want to continue?`,buttons:[{label:"Cancel",onClick:()=>{_(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:"Delete",onClick:()=>{l&&l(),_(!1),m&&m(!1)},variant:"contained",sx:{color:"white",backgroundColor:"#f63d68","&:hover":{backgroundColor:"#f63d68"}}}],maxWidth:"xs"}),u?.isRuleEngine&&e.jsx(Qe,{open:g,onClose:()=>C(!1),title:p?u?.recordFilterComponentProps?.edit?.title||"Replace Existing Filter ?":u?.recordFilterComponentProps?.save?.title||"Save Filter",description:p?u?.recordFilterComponentProps?.edit?.description||"You already have a filter applied. Applying a new filter will replace the current one. Do you want to continue?":u?.recordFilterComponentProps?.save?.description||"Give a name to this filter so you can easily reuse it later.",buttons:[{label:u?.recordFilterComponentProps?.save.button?.primary||"Cancel",onClick:()=>{C(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:p?u?.recordFilterComponentProps?.edit.button?.secondary||"Replace Filter":u?.recordFilterComponentProps?.save.button?.secondary||"Save",onClick:e=>{if(p){const t=M?.saved_filters?.selectedId,i=e||M?.saved_filters?.selectedName,n=M?.saved_filters?.selectedCode,s={...M,saved_filters:{...M?.saved_filters??{},selectedId:t,selectedName:i,selectedCode:n}};F(s);c&&c({filterMaster:s,filters:S}),a&&a(e||""),C(!1);let o=u?.tabOptions?.savedFilter?.editMode;return void(o||m(!1))}r&&r(e||""),C(!1),x(1)},variant:"contained",color:"primary",sx:{color:"white",backgroundColor:"#7A5AF8"}}],input:p?void 0:R}),u?.isRuleEngine&&e.jsx(Qe,{open:j,onClose:()=>_(!1),title:u?.recordFilterComponentProps?.delete.title||"Delete Saved Filter?",description:u?.recordFilterComponentProps?.delete.description||`You're about to delete the saved filter: "${T?.label||"[Filter Name]"}". This action cannot be undone. Are you sure you want to continue?`,buttons:[{label:u?.recordFilterComponentProps?.delete.button?.primary||"Cancel",onClick:()=>{_(!1)},variant:"outlined",color:"primary",sx:{color:"#7A5AF8",border:"1px solid #7A5AF8"}},{label:u?.recordFilterComponentProps?.delete.button?.secondary||"Delete",onClick:()=>{l&&l(),_(!1);let e=u?.tabOptions?.savedFilter?.editMode;e||m&&m(!1)},variant:"contained",sx:{color:"white",backgroundColor:"#f63d68","&:hover":{backgroundColor:"#f63d68"}}}],maxWidth:"xs"}),e.jsx(_t,{open:f,onClose:()=>v(!1),onSave:()=>{const e=M?.saved_filters?.selectedId,t=M?.saved_filters?.selectedName||"",i=M?.saved_filters?.description||"",n=M?.saved_filters?.selectedCode,s={...M,saved_filters:{...M?.saved_filters??{},selectedId:e,selectedName:t,selectedCode:n,description:i}};F(s);if(c&&c({filterMaster:s,filters:S}),p){a&&a(t);const e=u?.tabOptions?.savedFilter?.editMode;e||m(!1)}else r&&r(t),x(1);v(!1)},filterMaster:o.filterMaster,setFilterMaster:o.setFilterMaster,hasSavedFilters:q,columnsData:s,disableShareFilter:u?.tabOptions?.disableShareFilter})]})},exports.CraftTableSearch=xe,exports.CraftTableSettings=function({view:t="listing",show:s,filterSettingStates:o,onClose:l,columnsData:r,columnsDataLoading:a,quickTabAttributes:d,quickTabAttributesLoading:c,columnTabAttributes:u,columnTabAttributesLoading:h,sortingTabAttributes:x,sortingTabAttributesLoading:p,tabsApiData:m,tabsApiDataLoading:g,onSaveSettingsData:C,activeTab:f}){const[v,j]=i.useState(0),{container:_}=oe(),{showListViewSettings:w,quickTabStates:y,columnTabState:S,sortingTabState:k,saveButtonError:T}=o,M=Boolean(Object.entries(r).length);let F=S?.isDefault?0===S?.show_list?.length:0===S?.tabs?.find(e=>0===e?.show_list?.length)?.show_list?.length;return e.jsxs(Nt,{open:s||w,fullWidth:!0,maxWidth:"lg",slots:{transition:Zt},container:_,children:[e.jsxs(n.DialogTitle,{sx:Mt.dialogTitle,children:[e.jsx(n.Typography,{sx:{fontSize:"1.125rem"},children:"List View Setting"}),e.jsx(n.IconButton,{size:"small",color:"inherit",onClick:()=>{l&&l()},children:e.jsx(b,{})})]}),e.jsx(n.DialogContent,{children:a?e.jsx(lt,{loaderText:"Loading settings..."}):M?e.jsxs(e.Fragment,{children:[e.jsx(St,{value:v,onChange:(e,t)=>{j(t)},tabItems:"listing"===t?Ot:Vt}),e.jsxs(n.Box,{sx:{flex:"1"},children:["listing"===t.toLowerCase()&&e.jsx(kt,{value:v,index:0,children:0===v&&e.jsx(Lt,{filterSettingStates:o,columnsData:d,tabsApiData:m,tabsApiDataLoading:g,activeTab:f,columnTabAttributes:u})}),"listing"===t.toLowerCase()&&e.jsx(kt,{value:v,index:1,children:1===v&&e.jsx(Pt,{filterSettingStates:o,columnsData:r,columnTabAttributes:u,columnTabAttributesLoading:h})}),"listing"===t.toLowerCase()&&e.jsx(kt,{value:v,index:2,children:2===v&&e.jsx(Wt,{filterSettingStates:o,columnsData:x})}),"kanban"===t.toLowerCase()&&e.jsx(kt,{value:v,index:0,children:0===v&&e.jsx($t,{filterSettingStates:o,columnsData:r})}),"kanban"===t.toLowerCase()&&e.jsx(kt,{value:v,index:1,children:1===v&&e.jsx(Gt,{filterSettingStates:o,columnsData:r})})]})]}):e.jsx(n.Typography,{children:"Please pass meta data in component"})}),!a&&M&&e.jsx(n.DialogActions,{children:e.jsx(Yt,{disabled:F,onClick:()=>{const e=S?.isDefault?{isDefault:!0,show_list:S?.show_list||[],hide_list:S?.hide_list||[]}:{isDefault:!1,tabs:S?.tabs||[]},t=k?.isDefault?{isDefault:!0,sortby:k?.sortby?.filter(e=>""!==e.column)||[]}:{isDefault:!1,tabs:k?.tabs||[]};C&&C({quick_tab:y,column:e,sorting:t}),l&&l()},children:"listing"===t?"Save Quick Filter":"Save Kanban Layout"})})]})},exports.CraftTableTabs=function({loading:t=!1,tabsData:s=[],activeTab:o={tab_name:"All",count:0},onClick:l,tableStates:r,settingsOptions:a}){if(t)return e.jsx(n.CircularProgress,{size:24});const d=i.useMemo(()=>s?.filter(e=>null!==e.tab_name)?.map(e=>({...e,tab_name:e.tab_name})),[s]),c=i.useMemo(()=>d.find(e=>"All"===e.tab_name)?.tab_name||d[0]?.tab_name||"",[d]),u=o?.tab_name||c;return e.jsxs(n.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[a?.showIcon&&e.jsx(n.IconButton,{size:"small",onClick:a?.onClick,children:e.jsx(C.SettingsOutlined,{fontSize:"small"})}),e.jsx(Ge,{value:u,onChange:(e,t)=>(l(t),void r.setPagination(e=>({...e,pageIndex:0}))),variant:"scrollable",scrollButtons:"auto",children:d.map(t=>{const i=o?.tab_name===t?.tab_name;return e.jsx(Ue,{value:t,label:e.jsxs(n.Box,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(n.Box,{sx:{color:i?"#000":""},children:t?.tab_name}),e.jsx(Ke,{selected:i,children:0==t?.count?"0":String(t?.count).padStart(2,"0")})]})},t?.tab_name)})})]})},exports.KanbanWrapper=({metaData:t,data:s,isLoading:o,KanbanCardComponent:l,showSettings:r,onOpenSettings:a})=>{const[d,c]=i.useState({Active:!0}),[u,h]=i.useState({});i.useEffect(()=>{if(t?.swim_lanes?.length){const e={};t?.swim_lanes.forEach(t=>{t?.sub_lanes?.forEach(i=>{const n=`${t.id}-${i.lane_id}-${i.id}`;e[n]=i.expanded||!1})}),h(e)}},[t]);const x=e=>{if(!t?.swim_lanes||!s)return 0;const i=new Set;let n=0;return t?.swim_lanes.forEach(t=>{t.sub_lanes?.filter(t=>t.lane_id==e)?.forEach(e=>{s?.forEach(t=>{t?.stage_id!=e?.id||i.has(t?.id)||(i.add(t.id),n++)})})}),n};return e.jsx(e.Fragment,{children:o?e.jsx(lt,{}):e.jsx(n.Box,{children:e.jsxs(n.Box,{className:"kanban-container",sx:{width:"100%",bgcolor:"white",overflowX:"auto"},children:[e.jsxs(n.Box,{sx:Ut.topHeader,children:[e.jsx(n.IconButton,{onClick:a,sx:{...Ut.settingStyle,visibility:r?"visible":"hidden"},children:e.jsx(M,{})}),e.jsx(n.Box,{sx:{...Ut.syncingStyle,flex:1},children:t?.lanes?.map((t,i)=>e.jsxs(n.Box,{className:"lane-header",sx:{...Ut.laneHeader,bgcolor:t.color||Kt[i%4].color},children:[e.jsx(n.Box,{sx:{...Ut.badge,bgcolor:t.darkColor||Kt[i%4].darkColor},children:x(Number(t.id))}),e.jsx(n.Typography,{variant:"h6",fontWeight:"bold",sx:{px:2},children:t?.name})]},t.id))})]}),e.jsx(n.Box,{className:"kanban-content",id:"kanban-content",sx:{maxHeight:"calc(100vh - 186px)",width:"fit-content"},children:t?.swim_lanes?.map(i=>{return e.jsxs(n.Accordion,{expanded:!!d[i.name],onChange:(o=i.name,(e,t)=>{c(e=>({...e,[o]:t}))}),sx:Ut.swimLaneAccordionStyle,children:[e.jsx(n.AccordionSummary,{disabled:!(i?.sub_lanes?.length>0),expandIcon:e.jsx(F,{sx:{color:"black"}}),sx:Ut.swimlaneWrapperStyle,children:e.jsxs(n.Typography,{variant:"body1",fontWeight:"medium",sx:{ml:1.5},children:[i?.name," (",s?.filter(e=>e?.lead_status_id==i?.id).length,")"]})}),e.jsx(n.AccordionDetails,{sx:{pl:"16px",pr:"8px",width:"fit-content",py:0},children:e.jsx(n.Box,{sx:{...Ut.syncingStyle,pl:7},children:t?.lanes?.map((t,o)=>e.jsx(n.Box,{className:"column",sx:{...Ut.columnStyle,bgcolor:t?.color||Kt[o%4].color},children:i?.sub_lanes?.filter(e=>e.lane_id.toString()==t?.id)?.map(r=>{const a=`${i?.id}-${t?.id}-${r?.id}`;return e.jsxs(n.Accordion,{expanded:0!==s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==i?.id)?.length&&(u[a]||!1),onChange:()=>{return e=a,void h(t=>({...t,[e]:!t[e]}));var e},sx:{...Ut.stageStyle,borderLeft:`4px solid ${t.darkColor||Kt[o%4].darkColor}`},children:[e.jsx(n.AccordionSummary,{expandIcon:e.jsx(C.ExpandMore,{sx:{display:0===s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==i?.id)?.length?"none":"block"}}),sx:Ut.subSectionAccordion,children:e.jsxs(n.Box,{sx:Ut.subSectionHeaderContainer,children:[e.jsx(n.Box,{className:"sub-section-count",sx:{...Ut.subSectionCountContainer,bgcolor:t?.darkColor||Kt[o%4].darkColor},children:s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==i?.id)?.length||0}),e.jsx(n.Typography,{fontWeight:"700",color:"#555354",fontSize:"12px",children:r?.name})]})}),e.jsx(n.AccordionDetails,{sx:Ut.cardsContainer,children:(s?.filter(e=>e?.stage_id==r?.id&&e?.lead_status_id==i?.id&&e?.stage_group_id==t?.id)||[]).map(t=>l&&e.jsx(l,{cardData:t},t?.id)||null)})]},r.id)})},t.id))})})]},i.id);var o})})]})})})},exports.TableWrapper=function({data:n=[],columns:s=[],tableStates:o,filterSettingStates:l,onSaveSettings:r,paginationOptions:a,featureOptions:d,topbarOptions:c,nestedComponent:u,loadingOptions:h={isLoading:!1},customRenderFn:x={},shouldHideColumn:p,emptyListComponent:m,filterOptions:g,activeTab:C}){if(!Array.isArray(n))throw new Error("data must be an array of objects.");const[b,f]=i.useState([]);i.useEffect(()=>{if(s?.length>0){const e=s?.filter(e=>"function"!=typeof p||!p("accessorKey"in e?e?.accessorKey:void 0))?.map((e,t)=>{const i="accessorKey"in e?e?.accessorKey:`col_${t}`;return{...e,id:i,cell:t=>{if("custom"===e?.meta?.type&&e?.meta?.propName){const i=x?.[e?.meta?.propName];return"function"==typeof i?i({value:t?.getValue(),row:t?.row,table:t?.table?.getRowModel()?.rows}):t?.getValue()}return"function"==typeof e?.cell?e?.cell(t):t?.getValue()}}});f(e)}},[s]),i.useEffect(()=>{$.getAllLeafColumns().forEach(e=>{const t=e.columnDef.meta?.defaultPinned;t&&!e.getIsPinned()&&e.pin(t)})},[o?.columnPinning?.left,b]);const[v,j]=i.useState(()=>b.map(e=>e.id));i.useEffect(()=>{b.length>0&&j(b.map(e=>e.id))},[b]);const[_,w]=i.useState(d?.compactTable??!1),y=i.useRef(null);i.useEffect(()=>{w(d?.compactTable??!1)},[d?.compactTable]);const S={showPagination:!0,paginationPosition:"bottom",paginationView:"full",...a},k=S?.totalRows??n.length,T=S?.rowsPerPageArray??[25,50,100,150],M={showColumnToggle:!0,showCompactTableToggle:!0,showChangeLayoutToggle:!0,viewMoreToggle:!0,showSearch:!0,showSortingToggle:!1,showFilterToggle:!0,tableStates:o,...c},F={enableTopbar:!0,enableSorting:!0,enableServerSidePagination:!1,enableServerSideSorting:!1,enableRowSelection:!1,enableColumnResizing:!0,enableColumnReordering:!0,enableColumnPinning:!0,enableMultiColumnSorting:!0,compactTable:!1,stickyHeader:!0,enableWordBreakAll:!1,striped:!1,...d},{enableTopbar:I,enableRowSelection:D,enableServerSidePagination:B,enableServerSideSorting:A,enableSorting:L,enableColumnResizing:z,enableColumnReordering:E,enableColumnPinning:O}=F,{sorting:V,setSorting:H,pagination:R,setPagination:P,rowSelection:W,setRowSelection:N,expanded:Z,setExpanded:Y}=o,$=t.useReactTable({data:n,columns:b,state:{sorting:V,pagination:R,rowSelection:W,columnOrder:v,expanded:Z},getCoreRowModel:t.getCoreRowModel(),enableSorting:L,onSortingChange:H,getSortedRowModel:t.getSortedRowModel(),manualSorting:A,getPaginationRowModel:t.getPaginationRowModel(),onPaginationChange:P,rowCount:k,manualPagination:B,enableRowSelection:D,onRowSelectionChange:N,enableColumnResizing:z,columnResizeDirection:"ltr",columnResizeMode:"onChange",onColumnOrderChange:j,enableColumnPinning:O,getExpandedRowModel:t.getExpandedRowModel(),onExpandedChange:Y,getSubRows:e=>e.subRows??[]}),{isLoading:G,loadingComponent:U,loaderText:K}=h,{isFullscreen:Q}=oe(),X=g?.show;return e.jsx("div",{className:"ts__table__container",children:e.jsxs("div",{className:"ts__table__layout "+(X?"has-filter":""),children:[e.jsxs("div",{className:"ts__table__main "+(Q?"is-fullscreen":""),ref:y,children:[I&&e.jsx(pe,{table:$,topbarOptions:M,isCompactTable:_,setIsCompactTable:w,isFullscreen:Q,fullscreenToggle:()=>{document.fullscreenElement?document.exitFullscreen():y.current?.requestFullscreen().catch(e=>{console.error("Error attempting to enable fullscreen mode:",e)})},paginationComponent:!0===S?.showPagination&&"top"===S?.paginationPosition?e.jsx(ye,{table:$,rowsPerPageArray:T,paginationOptions:S}):null,searchValue:M.searchValue,onSearchChange:M.onSearchChange,tableStates:o,onFilterButtonClick:c?.onFilterButtonClick}),G?U??e.jsxs("div",{className:"ts__loader",children:[e.jsx(q,{}),K&&e.jsx("p",{children:K})]}):!G&&0===n.length&&m?m:e.jsx("div",{className:"ts__table__wrapper "+(Q?"is-fullscreen":""),children:E?e.jsx($e,{table:$,activeTab:C,columnOrder:v,featureOptions:F,NestedComponent:u,setColumnOrder:j,isCompactTable:_,tableStates:o,filterSettingStates:l,onSaveSettings:r}):e.jsx(Ye,{table:$,activeTab:C,featureOptions:F,NestedComponent:u,columnOrder:v,setColumnOrder:j,isCompactTable:_,tableStates:o,filterSettingStates:l,onSaveSettings:r})}),!0===S?.showPagination&&"bottom"===S?.paginationPosition?e.jsx(ye,{table:$,rowsPerPageArray:T,paginationOptions:S}):null]}),e.jsx("div",{className:("ts__table__filter "+(X?"show":"")).trim(),children:g?.component&&g?.component})]})})},exports.useCraftTable=function(e=25){const[t,n]=i.useState({pageIndex:0,pageSize:e}),[s,o]=i.useState([]),[l,r]=i.useState({}),[a,d]=i.useState({}),[c,u]=i.useState({all_wrap:!0}),[h,x]=i.useState([]),[p,m]=i.useState(""),[g,C]=i.useState(null),[b,f]=i.useState(""),[v,j]=i.useState(null),[_,w]=i.useState(!1),[y,S]=i.useState(!1),[k,T]=i.useState(null),[M,F]=i.useState();if(t.pageIndex<0||t.pageSize<=0)throw new Error("Invalid pagination values: pageIndex and pageSize must be positive.");const[I,D]=i.useState({left:[],right:[]});return{sorting:s,setSorting:o,pagination:t,setPagination:n,rowSelection:l,setRowSelection:r,expanded:a,setExpanded:d,wrapColumns:c,setWrapColumns:u,filters:h,setFilters:x,savedFilterEditValue:p,setSavedFilterEditValue:m,filterToDelete:g,setFilterToDelete:C,filterSelectedAttributeValue:b,setFilterSelectedAttributeValue:f,filterMaster:v,setFilterMaster:j,showTableFilter:_,setShowTableFilter:w,showFilterOptions:y,setShowFilterOption:S,columnPinning:I,setColumnPinning:D,filterData:k,setFilterData:T,selectedFilterEntity:M,setSelectedFilterEntity:F}},exports.useCraftTableFilterSettings=function(){const[e,t]=i.useState(!1),[n,s]=i.useState({}),[o,l]=i.useState({}),[r,a]=i.useState({}),[d,c]=i.useState({}),[u,h]=i.useState({hasError:!1,messages:[]});return i.useEffect(()=>{n?.quick_tab&&l(n?.quick_tab),n?.column&&a(n?.column),n?.sorting&&c(n?.sorting)},[n]),{settingsData:n,setSettingsData:s,showListViewSettings:e,setShowListViewSettings:t,quickTabStates:o,setQuickTabStates:l,columnTabState:r,setColumnTabState:a,sortingTabState:d,setSortingTabState:c,saveButtonError:u,setSaveButtonError:h}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|