PageSourceSearch

https://login.kalaway.com/_next/static/chunks/5523-29b5744302d7fb75.js

js kalaway.com collected 2026-10-09 01:49:55 UTC 30,677 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5523],{70548:function(e,n,t){var l=t(31549),a=t(83503),o=t(96697),i=t(39233),r=t(59709),s=t(53058);let d=a.rf.create(e=>{let{t:n}=(0,r.$G)(),{visible:t}=(0,a.A2)(),{popModal:d}=(0,a.Ty)();return(0,l.jsx)(s.Z,{open:t,onClose:d,header:(0,l.jsx)(o.Z,{variant:"subtitle1",children:n("alert")}),footer:(0,l.jsx)("div",{className:"flex flex-row justify-end",children:(0,l.jsx)(i.z,{variant:"outlined",color:"white",onPress:d,children:n("close")})}),className:"md:min-w-[300px] md:max-w-[300px]",children:(0,l.jsx)(o.Z,{className:"leading-0",children:n(e.modalMessage)})})});n.Z=d},92511:function(e,n,t){t.d(n,{t:function(){return p}});var l=t(31549),a=t(96697),o=t(9314),i=t(97285),r=t(95870),s=t(39233),d=t(59709),c=t(44194),u=t(72301);let m=()=>(0,l.jsx)("div",{className:"w-10 h-10 flex items-center justify-center",children:(0,l.jsx)(a.Z,{variant:"body1",children:"..."})}),v=e=>{let{isActive:n,page:t,onPress:a}=e;return(0,l.jsx)(o.h,{color:n?"primary":"white",variant:"text",onPress:()=>{a(t-1)},className:"rounded-lg w-fit min-w-[40px]",children:t})}
1,p=e=>{let{pageCount:n,currentPage:t,onPageChange:a,className:o,showPageSizing:p,pageSize:x,onPageSizeChange:h}=e,{t:f}=(0,d.$G)("common"),g=Array(n).fill(0).map((e,n)=>n+1),w=t<=2,b=t+2>=n-1,j=(0,c.useMemo)(()=>w?g.slice(0,5):b?g.slice(-5):g.slice(t-2+1,t+2),[t,w,b,g]),y=(0,c.useCallback)(()=>g.slice(0,j[0]-1),[j,g]),N=(0,c.useMemo)(()=>w||y().length<1?[]:g.slice(0,1).filter(e=>!j.includes(e)),[y,w,j,g]),S=(0,c.useMemo)(()=>g.slice(j[j.length-1],g[g.length]),[g,j]),C=(0,c.useMemo)(()=>b||S.length<1?[]:g.slice(g.length-1,g.length).filter(e=>!j.includes(e)),[S.length,b,j,g]),P=(0,c.useMemo)(()=>j[0]>N[N.length-1]+1,[N,j]),T=(0,c.useMemo)(()=>j[j.length-1]+1<C[0],[C,j]);return(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[p&&(0,l.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,l.jsx)("span",{children:f("show")}),(0,l.jsx)(i.P,{"aria-label":"pagination",options:[{id:"10",value:10},{id:"25",value:25},{id:"50",value:50}],placeholder:f("select"),onChange:e=>{h&&h(e.value)},TextFieldProps:{endIcon:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"w-4 h-4 flex items-center justify-center relative",children:(0,l.jsx)(u.J,{name:"▾-arrow-3",size:12,label:f("iconLabels.expand")})})})},nameExtractor:e=>{var n;return f("rows",{number:null!==(n=null==e?void 0:e.value)&&void 0!==n?n:""})},value:{id:x.toString(),value:x},color:"white",OptionsListProps:{className:"dark:bg-tertiary-sl06"},className:"w-32"},"mostra-elementi")]}),(0,l.jsxs)("nav",{className:(0,r.cn)("flex flex-row gap-1 justify-center items-center w-full max-md:grid max-md:grid-cols-3 max-md:gap-2",o),children:[(0,l.jsx)(s.z,{isDisabled:0===t,onPress:()=>{a(t-1)},className:e=>{let{isDisabled:n}=e;return(0,r.cn)("mr-1 max-md:order-2",n&&"!bg-transparent")},variant:"text",color:"white",children:f("prev")}),(0,l.jsxs)("ul",{className:"flex justify-center items-center gap-1 max-w-full max-md:order-1 max-md:col-span-3",children:[N.map(e=>(0,l.jsx)("li",{className:"",children:(0,l.jsx)(v,{isActive:t+1===e,page:e,onPress:a})},e)),P&&(0,l.jsx)(m,{}),j.map(e=>(0,l.jsx)("li",{className:"",children:(0,l.jsx)(v,{isActive:t+1===e,page:e,onPress:a})},e)),T&&(0,l.jsx)(m,{}),C.map(e=>(0,l.jsx)("li",{className:"",children:(0,l.jsx)(v,{isActive:t+1===e,page:e,onPress:a})},e))]}),(0,l.jsx)("div",{className:"hidden max-md:flex max-md:items-center max-md:justify-center max-md:order-3"}),(0,l.jsx)(s.z,{isDisabled:t===n-1,onPress:()=>{a(t+1)},variant:"text",className:e=>{let{isDisabled:n}=e;return(0,r.cn)("ml-1 max-md:order-4",n&&"!bg-transparent")},color:"white",children:f("next")})]})]})}},23952:function(e,n,t){t.d(n,{a:function(){return u}});
1var l=t(31549),a=t(40618),o=t(59709),i=t(82707),r=t(437),s=t(77229),d=t(28433),c=t(44194);function u(e){var n,t;let{...u}=e,{t:m}=(0,o.$G)(),v=(0,r.useRouter)(),[p,x]=(0,c.useState)(!1);return(0,l.jsx)(s.t7,{tooltip:m("startNewChat"),color:"default",withoutBakcground:!0,className:u.className,onClick:()=>{x(!0),(0,d.Xwc)({userId:u.userId}).then(e=>{v.push("/chat?id=".concat(e.data))}).catch(e=>{console.error(e),a.ZP.error({message:m("somethingWentWrong")})}).finally(()=>x(!1))},loading:p,disabled:null!==(n=u.disabled)&&void 0!==n&&n,icon:(0,l.jsx)(i.svI,{size:null!==(t=u.iconButtonSize)&&void 0!==t?t:20})})}},92873:function(e,n,t){t.d(n,{o:function(){return o}});var l=t(16460),a=t(44194);function o(e){let{queryFn:n,queryKey:t,staleTime:o,enabled:i,sortable:r,pageSize:s,initialSorting:d}=e,c=(0,a.useState)({pageIndex:0,pageSize:null!=s?s:10}),[u,m]=(0,a.useState)(null!=d?d:[]),v=(0,l.a)({queryKey:"function"==typeof t?t({page:c[0].pageIndex,perPage:c[0].pageSize,sorting:u}):[...t,c[0].pageIndex,c[0].pageSize,u],queryFn:async()=>await n({page:c[0].pageIndex,perPage:c[0].pageSize,sorting:u}),staleTime:o,enabled:null==i||i,keepPreviousData:!0});return{pagination:c,sorting:{state:u,setSorting:m},sortable:r,query:v}}},81429:function(e,n,t){t.d(n,{i:function(){return w}});var l=t(31549),a=t(44194),o=t(95870),i=t(96697),r=t(87005),s=t(78008),d=t(92321),c=t(9749),u=t(52493),m=t(59709),v=t(72301),p=t(92511),x=t(12225);let h=(e,n)=>{if(e.cell){let t={id:e.key,header:e.header,cell:n=>{let{row:t}=n;return e.cell({index:t.index,item:t.original})},meta:{headerContainerProps:e.headerContainerProps,cellContainerProps:e.cellContainerProps,hasSeparator:e.hasSeparator,colSpan:e.colSpan}};return e.canSort?n.accessor(n=>n[e.key],t):n.display(t)}return n.group({id:e.key,header:e.header,columns:e.columns.map(e=>h(e,n)),meta:{headerContainerProps:e.headerContainerProps,hasSeparator:e.hasSeparator,colSpan:e.colSpan}})},f=e=>{let{_columns:n,enableSelection:t}=e,o=(0,a.useMemo)(()=>(0,c.Cl)(),[]);return(0,a.useMemo)(()=>{let e=n.map(e=>h(e,o));return t?[o.display({id:"select",header:e=>{let{table:n}=e;return(0,l.jsx)(s.X,{"aria-label":"Select all rows",isSelected:n.getIsAllPageRowsSelected(),isIndeterminate:n.getIsSomeRowsSelected(),checked:n.getIsAllPageRowsSelected(),onChange:()=>{n.getToggleAllPageRowsSelectedHandler()({target:{}})}})},cell:e=>{let{row:n}=e;return(0,l.jsx)(s.X,{"aria-label":"Select row",isSelected:n.getIsSelected(),isDisabled:!n.getCanSelect(),isIndeterminate:n.getIsSomeSelected(),onChange:n.getToggleSelectedHandler()})},meta:{headerContainerProps:{className:"w-12"},cellContainerProps:{className:"w-12"}}}),...e]:e},[n,o,t])};var g=t(65079);let w=e=>{var n,t,h;let{className:w,rowProps:b,hasRowDivider:j,tableProps:y,preContent:N,columns:S,tableState:C,canSelectRow:P,enableSelection:T,noContentMessage:k,onSelectedRowsChange:I,title:M,noTableHeader:z,selectedRows:D,header:A,renderResponsiveRow:F,truncateResponsiveRow:Z,hideHeaderBackground:E,disableStickyHeader:R,stickyHeaderOffset:O,keepHeaderOnNoData:L,showPageSizing:q,noCellBorder:B,hasDarkBackground:_,hidePagination:G,noFixedTable:W,highlightRowId:$,onHighlightRowConsumed:V}=e,{pagination:[{pageIndex:H,pageSize:J},X],sorting:{state:K,setSorting:Y},sortable:U,query:{data:Q,isLoading:ee,isFetching:en}}=C,{t:et}=(0,m.$G)(),el=0===(null!==(n=null==Q?void 0:Q.data)&&void 0!==n?n:[]).length&&!ee,ea=(0,u.Gc)(),eo=(0,u.DT)("md"),ei=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!$||ee||en||ei.current)return;let e=document.getElementById("table-row-".concat($));e&&(e.scrollIntoView({block:"center",behavior:"smooth"}),ei.current=!0,null==V||V())},[$,null==Q?void 0:Q.data,ee,en,V]),(0,a.useEffect)(()=>{ei.current=!1},[$]);let er=(0,a.useMemo)(()=>({pageIndex:H,pageSize:J}),[H,J]),es=(0,a.useMemo)(()=>Math.ceil(((null==Q?void 0:Q.totalCount)||0)/J),[null==Q?void 0:Q.totalCount,J]);(0,a.useEffect)(()=>{es-1<H&&!en&&X(e=>({...e,pageIndex:es-1>0?es-1:0}))},[es,en]);let ed=f({_columns:S,enableSelection:T}),ec=null!==(t=null==D?void 0:D.reduce((e,n)=>(e[n.id]=!0,e),{}))&&void 0!==t?t:{},eu=(0,d.b7)({columns:ed,data:(null==Q?void 0:Q.data)||[],pageCount:(null==Q?void 0:Q.totalCount)||0,getCoreRowModel:(0,
1c.sC)(),getRowId:e=>e.id.toString(),manualPagination:!0,enableRowSelection:P,state:{pagination:er,rowSelection:ec,sorting:K},onRowSelectionChange:e=>{var n;let t;t="function"==typeof e?e(ec):e,null==I||I(null!==(n=null==Q?void 0:Q.data.filter(e=>t[e.id]))&&void 0!==n?n:[])},onPaginationChange:X,enableSorting:U,manualSorting:!0,onSortingChange:Y,enableSortingRemoval:!1,getSortedRowModel:(0,c.tj)()}),em=(0,a.useRef)(null),ev=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(R)return;let e=()=>{var e,n,t;let l=ev.current,a=em.current,o=null==a?void 0:a.getBoundingClientRect(),i=null!==(e=null==o?void 0:o.top)&&void 0!==e?e:0,r=null!==(n=null==o?void 0:o.height)&&void 0!==n?n:0,s=null!==(t=null==l?void 0:l.clientHeight)&&void 0!==t?t:0,d=null!=O?O:0;if(l){if(i>=d){l.childNodes.forEach(e=>{e.childNodes.forEach(e=>{let n=e.firstChild;n&&(n.style.transform="translateY(0px)")})});return}i<d&&-i<r-d-s&&l.childNodes.forEach(e=>{e.childNodes.forEach(e=>{let n=e.firstChild;n&&(n.style.transform="translateY(".concat(-i+d,"px)"))})}),-i>=r-d&&l.childNodes.forEach(e=>{e.childNodes.forEach(e=>{let n=e.firstChild;n&&(n.style.transform="translateY(".concat(r,"px)"))})})}};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[R]),(0,l.jsxs)("div",{className:_?"w-full flex flex-col justify-center gap-4 bg-tertiary border border-tertiary rounded-xl p-4 text-sm":"",children:["function"==typeof A?null==A?void 0:A(null!==(h=null==Q?void 0:Q.data)&&void 0!==h?h:[]):A,(0,l.jsxs)("div",{className:(0,o.cn)("flex flex-col gap-8 dark:bg-tertiary rounded-2xl md:py-6 md:px-6",w),children:[M&&!eo&&("string"==typeof M?(0,l.jsx)(i.Z,{variant:"subtitle1",className:"font-bold md:text-[1.5rem] md:leading-[1.625rem]",children:M}):M),(0,l.jsxs)("div",{className:(0,o.cn)("flex-1 flex min-h-0 relative"),children:[(0,l.jsx)(x.b,{isLoading:en&&!ee,className:"mt-3"}),(0,l.jsx)("div",{className:(0,o.cn)("max-h-full w-full Table-container overflow-auto",(ee||el)&&"flex items-center justify-center overflow-visible",L&&el&&"flex-col"),children:ee?(0,l.jsx)(r.$,{className:"h-10 w-10"}):el&&!L?"string"==typeof k?(0,l.jsx)(i.Z,{variant:"subtitle1",className:"text-center max-w-md md:font-normal md:text-[1.5rem] md:leading-[1.625rem]",children:k}):k:eo&&F?(0,l.jsx)("div",{className:"flex flex-col w-full relative table-fixed",children:eu.getRowModel().rows.map((e,n)=>(0,l.jsxs)("div",{className:"py-6 px-2 border-b-[1px] last-of-type:border-b-0 border-white/10 flex flex-row gap-2",children:[P&&(0,l.jsx)("div",{children:(0,l.jsx)(s.X,{isSelected:e.getIsSelected(),onChange:()=>{e.toggleSelected()},"aria-label":""})}),(0,l.jsx)("div",{className:(0,o.cn)("flex-1 min-w-0",Z&&"truncate"),children:null==F?void 0:F(e.original)})]},e.id))}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("table",{ref:em,...y,className:(0,o.cn)("w-full relative isolate",(g.vU||g.un)&&"border-separate border-spacing-0",null==y?void 0:y.className,W?"":"table-fixed"),children:[!z&&(0,l.jsx)("thead",{ref:ev,children:eu.getHeaderGroups().map(e=>(0,l.jsx)("tr",{className:"h-1",children:e.headers.map((n,t)=>{var a,i;let r=n.column.columnDef.meta,s=null!==(i=(0,u.pt)(null!==(a=null==r?void 0:r.colSpan)&&void 0!==a?a:1,ea))&&void 0!==i?i:0,c=null==r?void 0:r.headerContainerProps,{className:m,...p}=null!=c?c:{},x=n.column.getCanSort(),h=n.column.getIsSorted();return 0===s?null:(0,l.jsx)("th",{colSpan:s,className:(0,o.cn)("p-0 h-1 supports-[height:_-moz-available]:h-full",x&&"cursor-pointer",m),onClick:e=>{var t,l,a,o;n.column.getCanSort()&&("asc"===h?n.column.toggleSorting(!0,!!n.column.getCanMultiSort()&&(null===(t=(l=eu.options).isMultiSortEvent)||void 0===t?void 0:t.call(l,e))):n.column.toggleSorting(!1,!!n.column.getCanMultiSort()&&(null===(a=(o=eu.options).isMultiSortEvent)||void 0===a?void 0:a.call(o,e))))},...p,children:(0,l.jsxs)("div",{className:(0,o.cn)("relative z-[100] p-4 text-left flex items-center h-full ",!E&&"dark:bg-[#273A5E]",0===t?"pr-4 rounded-l-lg":t===e.headers.length-1?"pl-4 rounded-r-lg":"px-4"),children:[n.isPlaceholder?null:(0,d.ie)(n.column.columnDef.header,n.getContext()),x&&K.find(e=>e.id===n.column.id)&&(0,l.jsx)(v.J,{size:24,className:"select-none",name:h&&"desc"!==h?"▾-arrow-1":"▾-arrow-3",label:h&&"desc"!==h?et("ascOrder"):et("descOrder")})]})},n.id)})},e.id))}),(0,l.jsx)("tbody",{className:"",children:eu.getRowModel().rows.map((e,n)=>{let{className:t,...i}=null!=b?b:{},r=e.getVisibleCells().reduce((e,n)=>{var t,l;let a=n.column.columnDef.meta;return e+(null!==(l=(0,u.pt)(null!==(t=null==a?void 0:a.colSpan)&&void 0!==t?t:1,ea))&&void 0!==l?l:0)},0);return(0,l.jsxs)(a.Fragment,{children:[0===n&&N&&(0,l.jsxs)(l.Fragment,{children:[(0,a.createElement)("tr",{className:(0,o.cn)(j&&n<eu.getRowModel().rows.length-1&&"border-b-[1px] border-white/[0.12] border-solid",t),...i,key:e.id},e.getVisibleCells().map((e,n)=>{var t,a,i;let r=e.column.columnDef.meta,s=null!==(a=(0,u.pt)(null!==(t=null==r?void 0:r.colSpan)&&void 0!==t?t:1,ea))&&void 0!==a?a:0,d=null==r?void 0:r.cellContainerProps,{className:c,...m}=null!==(i="function"==typeof d?d():d)&&void 0!==i?i:{};return 0===s?null:(0,l.jsx)("td",{colSpan:s,className:(0,o.cn)(c,"p-0"),...m},e.id)})),(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:r,className:"overflow-hidden",children:N})})]}),(0,a.createElement)("tr",{id:"table-row-".concat(e.id),className:(0,o.cn)(j&&n<eu.getRowModel().rows.length-1&&"border-b-[1px] border-white/[0.12] border-solid",$===e.id&&"outline outline-1 outline-[#1890ff] outline-offset-[-1px]",t),...i,key:e.id},e.getVisibleCells().map((t,a)=>{var i,r,s,c,m;let v=t.column.columnDef.meta,p=null!==(s=(0,u.pt)(null!==(r=null==v?void 0:v.colSpan)&&void 0!==r?r:1,ea))&&void 0!==s?s:0,x=null==v?void 0:v.cellContainerProps,{className:h,...f}=null!==(c="function"==typeof x?x(null==Q?void 0:null===(i=Q.data)||void 0===i?void 0:i[n],n):x)&&void 0!==c?c:{},g=null!==(m=(0,u.pt)(v.hasSeparator,ea))&&void 0!==m&&m;return 0===p?null:(0,l.jsx)("td",{colSpan:p,style:B?{border:"transparent"}:{},className:(0,o.cn)("text-left py-2 px-0",h),...f,children:(0,l.jsx)("div",{className:(0,o.cn)("h-full w-full overflow-hidden relative",0===a?"pr-4":a===e.getVisibleCells().length-1?"pl-4":"px-2",g&&"after:h-5 after:w-[1px] after:bg-black dark:after:bg-white after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2"),children:(0,d.ie)(t.column.columnDef.cell,t.getContext())})},t.id)}))]},e.id)})})]}),el?"string"==typeof k?(0,l.jsx)(i.Z,{variant:"subtitle1",className:"text-center max-w-md md:font-normal md:text-[1.5rem] md:leading-[1.625rem]",children:k}):k:null]})})]}),!G&&es>0&&(0,l.jsx)(p.t,{currentPage:H,onPageChange:e=>{X(n=>({...n,pageIndex:e}))},className:"w-full flex items-center justify-end",pageCount:es,showPageSizing:q,pageSize:J,onPageSizeChange:e=>{X({pageSize:e,pageIndex:0})}})]})]})}},95293:function(e,n,t){t.d(n,{Z:function(){return u}});
1var l=t(31549),a=t(96697),o=t(99474),i=t(52493),r=t(72301),s=t(84082),d=t(59709);let c=["common","debt","bank"];function u(e){let{t:n}=(0,d.$G)([...c]),{data:t,isLoading:u,isRefetching:m}=(0,o.eGJ)({companyId:e.company,filter:(0,i.Li)({where:{AND:[{bank:{id:{equals:e.bank}}}]},orderBy:[{bank:{name:"asc"}},{surname:"asc"},{name:"asc"}]})},{query:{keepPreviousData:!0}});return(0,l.jsxs)("div",{className:"w-full h-full flex flex-col justify-start max-w-[20rem]",children:[(0,l.jsx)(a.Z,{variant:"body1",className:"dark:text-white/[0.65]",children:n("yourManagers")}),(0,l.jsx)("div",{className:"flex flex-col w-full max-w-[20rem] mt-2",children:t&&t.data.length<1?(0,l.jsxs)("div",{className:"w-full text-center",children:[(0,l.jsx)(r.J,{label:"",name:"profile_outline_02",size:28}),(0,l.jsx)(a.Z,{variant:"body1",className:"mt-1 text-center",children:n("noManagers")})]}):null==t?void 0:t.data.map(e=>(0,l.jsx)(s.Z,{user:e,isCompact:!0},e.id))})]})}},10326:function(e,n,t){var l=t(31549),a=t(83503),o=t(96697),i=t(39233),r=t(59709),s=t(53058);let d=a.rf.create(e=>{var n;let{t}=(0,r.$G)(),{visible:d}=(0,a.A2)(),{popModal:c}=(0,a.Ty)();return(0,l.jsx)(s.Z,{open:d,onClose:c,header:(0,l.jsx)(o.Z,{variant:"subtitle1",children:t("confirmDelete")}),footer:(0,l.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,l.jsx)(i.z,{variant:"outlined",color:"white",onPress:()=>c(),children:t("cancel")}),(0,l.jsx)(i.z,{variant:"contained",color:"error",onPress:()=>{e.onContinue(),c()},className:"max-md:min-w-[140px] flex-1",children:t(null!==(n=e.deleteButtonText)&&void 0!==n?n:"delete")})]}),className:"md:min-w-[300px] md:max-w-[300px]",children:(0,l.jsx)(o.Z,{className:"leading-0",children:t(e.modalMessage)})})});n.Z=d},49821:function(e,n,t){t.d(n,{Z:function(){return C}});var l=t(31549),a=t(49421),o=t(83503),i=t(96697),r=t(77739),s=t(39233),d=t(48532),c=t(95870),u=t(95035),m=t(4766),v=t(59709),p=t(44194),x=t(81429),h=t(92873),f=t(80849),g=t(57201),w=t(72511),b=t(10326),j=t(77133),y=t(11598);function N(e){let{t:n}=(0,v.$G)(),[t,a]=(0,p.useState)(!1),o=(0,p.useRef)(null);return(0,p.useEffect)(()=>{o.current&&a(o.current.clientHeight>32)},[o.current,t]),(0,l.jsxs)("div",{className:"min-w-[100px] ".concat(e.expanded?"min-h-[2rem]":"h-8"," relative flex flex-col justify-start items-start rounded-xl px-2 py-2 bg-grey/[0.075]"),children:[(0,l.jsx)("div",{children:(0,l.jsx)("p",{ref:o,className:"block whitespace-normal whitespace-pre-wrap break-words overflow-hidden text-ellipsis",style:{wordBreak:"break-word"},children:e.expanded?e.text:e.text.split("\n")[0]})}),(e.text.split("\n").length>1||t)&&(e.expanded?(0,l.jsx)("div",{className:"w-full flex justify-end",children:(0,l.jsx)(s.z,{variant:"text",color:"primary",onPress:()=>e.expandedMethod(!e.expanded),children:n(e.expanded?"showLess":"debt:weiversAndConditionTable.showMore")})}):(0,l.jsx)("div",{className:"absolute ".concat(e.expanded?"bottom-0":"top-0"," right-0 rounded-xl bg-[#272C46]"),children:(0,l.jsx)(s.z,{variant:"text",color:"primary",onPress:()=>e.expandedMethod(!e.expanded),className:"py-1",style:{marginTop:"1px"},children:n(e.expanded?"showLess":"debt:weiversAndConditionTable.showMore")})}))]})}var S=t(70548),C=e=>{var n,t,C,P,T,k;let{bankCredit:I,loan:M,leasing:z,onlyCondition:D,onlyWeiver:A,refreshData:F}=e,{i18n:Z,t:E}=(0,v.$G)(),{isDarkMode:R}=(0,a.G)(),{pushModalByComponent:O}=(0,o.Ty)(),[L,q]=(0,p.useState)(new Date().toISOString()),[B,_]=(0,p.useState)(!0);(0,p.useEffect)(()=>{q(new Date().toISOString())},[B]);let[G,W]=(0,p.useState)(!1),$=null!==(C=null!==(t=null!==(n=null==M?void 0:M.weivers)&&void 0!==n?n:null==z?void 0:z.weivers)&&void 0!==t?t:null==I?void 0:I.weivers)&&void 0!==C?C:[],V=null!==(k=null!==(T=null!==(P=null==M?void 0:M.conditions)&&void 0!==P?P:null==z?void 0:z.conditions)&&void 0!==T?T:null==I?void 0:I.conditions)&&void 0!==k?k:[],H=e=>{var n,t,l;let a="termination"===e.weiverType?M?null===(n=M.amortizationPaymentsDetails)||void 0===n?void 0:n[M.amortizationPaymentsDetails.length-1].terminationCost:z?null===(t=z.amortizationPaymentsDetails)||void 0===t?void 0:t[z.amortizationPaymentsDetails.length-1].terminationCost:void 0:void 0;switch(e.weiverType){case"suspension":return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes,", \n")).concat(E("debt:addNewWeive.suspensions.suspensionType"),": ").concat(E("debt:addNewWeive.suspensions.".concat(e.suspensionType)));case"termination":return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes).concat(I?"":"\n")," ").concat(a?"".concat(E("debt:addNewWeive.terminationCostPayment"),": ").concat(f.iq.format(a)):"");
1case"renewal":return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes,", \n")).concat((null!==(l=e.guarantees)&&void 0!==l?l:[]).map(e=>"".concat(E("debt:guarantee.guaranteeType"),": ").concat(E("debt:guarantee.guaranteeTypes.".concat(e.type.toLowerCase()))," - ").concat(E("debt:guarantee.guaranteeSubtypes.".concat(e.subtype.toLowerCase())),", ").concat(e.guarantor?e.guarantor+",":""," ").concat("".concat(E("debt:guarantee.guaranteedValue").replace(" (€)","")),": ").concat(f.iq.format(e.guaranteedValue))).join(", \n"));default:return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes))}},J=(e,n)=>{var t,l,a;switch(null===(t=e.condition)||void 0===t?void 0:t.requireParameter){case!0:switch(e.rateType){case"fixed":return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes,", \n")).concat(E("debt:weiversAndConditionTable.fixedRate"));case"variable":return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes,", \n")).concat(E("parameter"),": ").concat(null===(l=e.euriborType)||void 0===l?void 0:l.name," ").concat(E("debt:euriborProcMethods.".concat(null===(a=e.euriborProcMethod)||void 0===a?void 0:a.name))," (").concat(f.LB.format(n/100),"),\n").concat(E("debt:spread").replace(" (%)",""),": ").concat(f.LB.format(e.spread/100),", ").concat(E("floor"),": ").concat(e.floor?f.LB.format(e.floor/100):"-",",\n").concat(E("rounding"),": ").concat(E("debt:amortizationRoundings.".concat(e.rounding,"%")));default:return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes))}case!1:return"".concat(e.notes&&"".concat(E("notes"),": ").concat(e.notes));default:return""}};async function X(e,n){let t=(D?[]:e).reduce((e,n)=>(D||e.push({id:n.id,modificationType:E("debt:addNewWeive.".concat(M?"loan":z?"leasing":"bankCredit",".").concat(n.weiverType)),value:"renewal"===n.weiverType?f.iq.format(n.newAmount):"termination"===n.weiverType?I?"-":f.LB.format(n.terminationCost/100):"-",validFrom:m.ou.fromISO(n.validFrom),validTo:n.validTo&&n.validTo!==new Date(1e13).toISOString()?m.ou.fromISO(n.validTo):void 0,description:H(n),object:n}),e),[]),l=await Promise.all((A?[]:n).map(async e=>{var n,t,l,a,o,i,r,s,d,c,v;let p=null!==(r=null!==(i=e.updatedValidTo)&&void 0!==i?i:e.validTo)&&void 0!==r?r:new Date(1e13).toISOString();if(D&&B&&((0,f.aO)(new Date(e.validFrom),new Date,!1)||(0,f.Jb)(new Date(p),new Date,!1)))return{id:"invalid",modificationType:"",condition:e,value:"",validFrom:m.ou.fromISO(e.validFrom),validTo:m.ou.fromISO(p),description:"",object:e};let x=(null===(n=e.condition)||void 0===n?void 0:n.requireParameter)||null==e.value?await (0,u.Ov)({bankId:null!==(d=null!==(s=null==M?void 0:M.bankId)&&void 0!==s?s:null==z?void 0:z.bankId)&&void 0!==d?d:null==I?void 0:I.bankId,companyId:null!==(v=null!==(c=null==M?void 0:M.bankId)&&void 0!==c?c:null==z?void 0:z.bankId)&&void 0!==v?v:null==I?void 0:I.bankId,rateType:e.rateType,euriborTypeId:e.euriborTypeId,euriborProcMethodId:e.euriborProcMethodId,rounding:e.rounding,floor:e.floor,spread:e.spread,conditionTypeId:"",requireParameter:null===(t=e.condition)||void 0===t?void 0:t.requireParameter,validFrom:""}):{data:{rate:0,parameter:0}};return{id:e.id,modificationType:E("debt:conditions.".concat(null===(l=e.condition)||void 0===l?void 0:l.name)),typeId:e.conditionTypeId,value:(null===(a=e.condition)||void 0===a?void 0:a.requireParameter)||null==e.value?f.LB.format(x.data.rate/100):(null===(o=e.condition)||void 0===o?void 0:o.postfix)==="perc"?f.LB.format(e.value/100):(0,f.Sz)(e.value),validFrom:m.ou.fromISO(e.validFrom),validTo:p!==new Date(1e13).toISOString()?m.ou.fromISO(p):void 0,description:J(e,x.data.parameter),object:e}}));return l.sort((e,n)=>{var t,l,a,o,i,r,s,d;return(null===(t=e.object.condition)||void 0===t?void 0:t.order)!=(null===(l=n.object.condition)||void 0===l?void 0:l.order)?(null===(i=e.object.condition)||void 0===i?void 0:i.order)?(null===(r=n.object.condition)||void 0===r?void 0:r.order)?(null===(s=e.object.condition)||void 0===s?void 0:s.order)-(null===(d=n.object.condition)||void 0===d?void 0:d.order):1:-1:(null===(a=e.validTo)||void 0===a?void 0:a.toMillis())!=(null===(o=n.validTo)||void 0===o?void 0:o.toMillis())?e.validTo?n.validTo?n.validTo.toMillis()-e.validTo.toMillis():1:-1:n.validFrom.toMillis()-e.validFrom.toMillis()}),t.sort((e,n)=>e.validFrom.toMillis()-n.validFrom.toMillis()),t.concat(l.filter(e=>"invalid"!==e.id))}let K=(0,h.o)({queryKey:e=>{let{sorting:n}=e;return[D,A,L,n]},queryFn:e=>{let{sorting:n}=e;return X($,V).then(e=>(e.sort((e,t)=>
1{if(null==n?void 0:n.length){let l=n[0],a=e[n[0].id],o=t[n[0].id];return a==o?0:a?o?a instanceof m.ou?l.desc?o.toMillis()-a.toMillis():a.toMillis()-o.toMillis():l.desc?o.localeCompare(a):a.localeCompare(o):l.desc?1:-1:l.desc?-1:1}}),{data:e,totalCount:e.length}))},sortable:!0,staleTime:0}),Y=e=>{var n,t,l,a;return"renewal"===e.object.weiverType||I&&e.object.condition?null!==(l=null===(t=e.validTo)||void 0===t?void 0:t.toLocaleString({},{locale:Z.language}))&&void 0!==l?l:E("onRevoke"):null!==(a=null===(n=e.validTo)||void 0===n?void 0:n.toLocaleString({},{locale:Z.language}))&&void 0!==a?a:"-"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex max-md:flex-col justify-between p-4 pb-0",children:[(0,l.jsx)("div",{children:(0,l.jsx)(i.Z,{variant:"h6",children:(0,l.jsx)("span",{className:"font-medium",children:E("debt:weiversAndConditionTable."+(D?"conditionTable":A?"weiversTable":"weiversAndConditionTable"))})})}),(0,l.jsxs)("div",{className:"flex gap-4 lg:mt-2",children:[I&&D&&(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[(0,l.jsx)(r.r,{checked:B,onChange:_,color:R?"white":"primary"}),(0,l.jsx)(i.Z,{variant:"body2",className:"flex-1",children:E("debt:weiversAndConditionTable.showFormer")})]}),(0,l.jsx)(s.z,{className:"",variant:"contained",color:"primary",startIcon:(0,l.jsx)(w.zth,{className:"w-5 h-5"}),onPress:()=>{(null==M?void 0:M.isManualAmortizationPlan)?O(S.Z,{modalMessage:"debt:manualAmortizationPlanAddConditionAlert"}):O(g.RA,{bankCredit:I,loan:M,leasing:z,onlyWeiver:A,onlyCondition:D,onCompletedInsert:()=>{F().then(()=>{q(new Date().toISOString()),K.query.refetch()})}})},children:E("debt:addNewWeive."+(D?"newCondition":A?"newWeiver":"newWeiverOrCondition"))})]})]}),(0,l.jsx)(x.i,{disableStickyHeader:!0,noContentMessage:(0,l.jsx)(i.Z,{variant:"body1",children:E("debt:weiversAndConditionTable."+(D?"norConditions":A?"noWeivers":"noWeiversNorConditions"))}),hideHeaderBackground:!0,tableState:K,hasDarkBackground:!0,noCellBorder:!0,noFixedTable:!0,hidePagination:!0,columns:[{key:"modificationType",header:()=>(0,l.jsx)("div",{className:"flex items-center gap-1 mr-1 min-w-100",children:E("iconLabels.type")}),canSort:!0,cell:e=>{let{item:n}=e;return(0,l.jsx)("div",{className:"w-full h-8 flex justify-start items-center gap-4 roun
1ded-xl px-2 py-2 bg-grey/[0.075]",children:(0,l.jsx)(d.u,{title:n.modificationType,position:"top",darkMode:!0,children:(0,l.jsx)("p",{className:"whitespace-nowrap overflow-hidden text-ellipsis",children:n.modificationType})})})},headerContainerProps:{className:"w-40"},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:pr-1")})},{key:"value",header:()=>(0,l.jsx)("div",{className:"flex items-center gap-1 mr-1 min-w-0",children:E("value")}),canSort:!0,cell:e=>{let{item:n}=e;return(0,l.jsx)("div",{className:"w-full h-8 flex justify-start items-center gap-4 rounded-xl px-2 py-2 bg-grey/[0.075]",children:(0,l.jsx)("p",{className:"whitespace-nowrap overflow-hidden text-ellipsis",children:n.value})})},headerContainerProps:{className:"w-28"},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:px-1")})},{key:"validFrom",header:()=>(0,l.jsx)("div",{className:"flex items-center gap-1 mr-1 min-w-0",children:E("validFrom")}),canSort:!0,cell:e=>{let{item:n}=e;return(0,l.jsx)("div",{className:"h-8 flex justify-start items-center gap-4 roun
1ded-xl px-2 py-2 bg-grey/[0.075]",children:(0,l.jsx)("p",{className:"whitespace-nowrap overflow-hidden text-ellipsis",children:"termination"!==n.object.weiverType&&"nonExercisePurchase"!==n.object.weiverType?n.validFrom.toLocaleString({},{locale:Z.language}):"-"})})},headerContainerProps:{className:"w-28"},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:px-1")})},{key:"validTo",header:()=>(0,l.jsx)("div",{className:"flex items-center gap-1 mr-1 min-w-0",children:E("validTo")}),canSort:!0,cell:e=>{let{item:n}=e;return(0,l.jsx)("div",{className:(0,c.cn)("h-8 flex justify-start items-center gap-4 rounded-xl px-2 py-2 bg-grey/[0.075]",{"border-2 border-[#FF0000]":!["suspension","termination","renewal","nonExercisePurchase"].includes(n.object.weiverType)&&n.validTo&&n.validTo<m.ou.now().startOf("day")}),children:(0,l.jsx)("p",{className:"whitespace-nowrap overflow-hidden text-ellipsis",children:Y(n)})})},headerContainerProps:{className:"w-28"},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:px-1")})},{key:"description",header:()=>(0,l.jsx)("div",{className:"flex items-center gap-1 mr-1 min-w-0",children:E("debt:weiversAndConditionTable.description")}),canSort:!0,cell:e=>{let{item:n}=e;return(0,l.jsx)(N,{text:n.description,expanded:G,expandedMethod:W})},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:px-1")})},{key:"actions",header:()=>(0,l.jsx)("div",{className:"flex items-center justify-center gap-1 mr-1",children:E("actions")}),cell:e=>{let{item:n}=e;return(0,l.jsxs)("div",{className:"w-full h-8 flex justify-center items-center gap-2",children:[I&&D&&(0,l.jsx)(s.z,{variant:"contained",color:"primary",onPress:()=>O(g.RA,{bankCredit:I,loan:M,leasing:z,onlyWeiver:A,onlyCondition:D,isEditMode:!0,condition:n.object,onCompletedInsert:()=>{F().then(()=>{q(new Date().toISOString()),K.query.refetch()})}}),children:(0,l.jsx)(y.fmQ,{className:"w-4 h-4"})}),(0,l.jsx)(s.z,{variant:"contained",color:"primary",onPress:()=>O(b.Z,{modalMessage:"debt:weiversAndConditionTable.confirmDeleteWeiverOrCondition",onContinue:async()=>{"weiverType"in n.object?await (0,u.arU)(n.object.id):await (0,u.GSm)(n.object.id),F().then(()=>{q(new Date().toISOString()),K.query.refetch()})}}),children:(0,l.jsx)(j.Z2m,{className:"w-4 h-4"})})]})},headerContainerProps:{className:"w-20"},cellContainerProps:e=>({className:(0,c.cn)("[&_>div]:pl-1")})}],className:"[&_td]:border-[1px] [&_td]:border-black/[0.12] dark:[&_td]:border-white/[0.12] [&_td]:border-solid  md:px-0 md:py-0 dark:bg-transparent"})]})}},84082:function(e,n,t){var l=t(31549),a=t(96697),o=t(17052),i=t(52493),r=t(23952);n.Z=e=>{let{user:n,isCompact:t}=e;return(0,l.jsxs)("div",{className:"px-4 py-3 bg-tertiary rounded-2xl flex items-center max-w-[18rem]",children:[(0,l.jsxs)("div",{className:"flex items-center min-w-0 flex-1 gap-2",children:[(0,l.jsx)(o.Z,{size:"small",className:"bg-[#0A7ABC] flex-shrink-0",children:(0,i.Kc)(n.fullName)}),(0,l.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,l.jsx)("span",{className:"text-lg text-white font-medium truncate",children:n.fullName||"-"}),!t&&(0,l.jsx)(a.Z,{variant:"caption",className:"truncate",children:n.email})]})]}),(0,l.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,l.jsx)(r.a,{userId:n.id,disabled:!1,iconButtonSize:24})})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.