react-luminus-components 2.0.12 → 2.0.13
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/main.cjs.js +1 -1
- package/dist/main.es.js +5 -2
- package/package.json +1 -1
package/dist/main.cjs.js
CHANGED
|
@@ -21,4 +21,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
21
21
|
Prefix can't start with '-' when allowNegative is true.
|
|
22
22
|
prefix: `+a+`
|
|
23
23
|
allowNegative: `+i+`
|
|
24
|
-
`),i=!1),Object.assign(Object.assign({},n),{allowNegative:i})}function mc(n){n=uc(n),n.decimalSeparator,n.allowedDecimalSeparators,n.thousandsGroupStyle;var e=n.suffix,t=n.allowNegative,o=n.allowLeadingZeros,a=n.onKeyDown;a===void 0&&(a=bt);var i=n.onBlur;i===void 0&&(i=bt);var r=n.thousandSeparator,c=n.decimalScale,d=n.fixedDecimalScale,u=n.prefix;u===void 0&&(u="");var m=n.defaultValue,p=n.value,f=n.valueIsNumericString,x=n.onValueChange,g=Yo(n,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),y=un(n),h=y.decimalSeparator,b=y.allowedDecimalSeparators,j=function(R){return Ts(R,n)},S=function(R,F){return cc(R,F,n)},N=Ft(p)?m:p,v=f??rc(N,u,e);Ft(p)?Ft(m)||(v=v||typeof m=="number"):v=v||typeof p=="number";var C=function(R){return Qo(R)?R:(typeof R=="number"&&(R=Jo(R)),v&&typeof c=="number"?Is(R,c,!!d):R)},k=tl(C(p),C(m),!!v,j,S,x),I=k[0],T=I.numAsString,L=I.formattedValue,E=k[1],D=function(R){var F=R.target,M=R.key,O=F.selectionStart,B=F.selectionEnd,H=F.value;if(H===void 0&&(H=""),(M==="Backspace"||M==="Delete")&&B<u.length){R.preventDefault();return}if(O!==B){a(R);return}M==="Backspace"&&H[0]==="-"&&O===u.length+1&&t&&It(F,1),c&&d&&(M==="Backspace"&&H[O-1]===h?(It(F,O-1),R.preventDefault()):M==="Delete"&&H[O]===h&&R.preventDefault()),b!=null&&b.includes(M)&&H[O]===h&&It(F,O+1);var z=r===!0?",":r;M==="Backspace"&&H[O-1]===z&&It(F,O-1),M==="Delete"&&H[O]===z&&It(F,O+1),a(R)},_=function(R){var F=T;if(F.match(/\d/g)||(F=""),o||(F=Yr(F)),d&&c&&(F=Is(F,c,d)),F!==T){var M=Ts(F,n);E({formattedValue:M,value:F,floatValue:parseFloat(F)},{event:R,source:Ut.event})}i(R)},P=function(R){return R===h?!0:Wt(R)},$=function(R){var F=R.currentValue,M=R.lastValue,O=R.formattedValue,B=R.currentValueIndex,H=R.formattedValueIndex,z=F[B],W=O[H],A=el(M,F),U=A.to,K=function(V){return S(V).indexOf(".")+u.length};return p===0&&d&&c&&F[U.start]===h&&K(F)<B&&K(O)>H?!1:B>=U.start&&B<U.end&&b&&b.includes(z)&&W===h?!0:z===W};return Object.assign(Object.assign({},g),{value:L,valueIsNumericString:!1,isValidInputCharacter:P,isCharacterSame:$,onValueChange:E,format:j,removeFormatting:S,getCaretBoundary:function(R){return dc(R,n)},onKeyDown:D,onBlur:_})}function Un(n){var e=mc(n);return w.createElement(lc,Object.assign({},e))}const nl=({InputContainer:n=l.FloatingLabelInput,value:e,onChange:t,debounceMs:o,label:a,withoutLabel:i,placeholder:r,size:c,hidden:d,disabled:u,showClearIcon:m,clearValue:p,className:f,step:x,noSelectOnFocus:g,decimalScale:y,fixedDecimalScale:h=!1,numberPrefix:b,numberSuffix:j,min:S,max:N,hint:v})=>{const C=w.useCallback(()=>{if(!t)return;const D=p??null;t(D?Number(D):null)},[p,t]),k=w.useRef(null),[I,T]=w.useState((e==null?void 0:e.toString())??""),L=w.useCallback(D=>{const _=D;t&&t(_==null||_===""?null:Number(_))},[t]),E=w.useCallback(D=>{var P,$;let _=parseFloat((($=(P=D.target)==null?void 0:P.value)==null?void 0:$.replaceAll(" ","").replaceAll(",","."))??0);if(Number.isNaN(_)&&(_=0),!o){L(_.toString());return}T(_.toString()),k.current!==null&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{L(_.toString())},o)},[o,L]);return w.useEffect(()=>{T(e===null?"":e.toString())},[N,S,e]),w.useEffect(()=>{N!==void 0&&Number(I)>N&&T(N.toString()),S!==void 0&&Number(I)<S&&T(S.toString())},[I,N,S,T]),w.useEffect(()=>{!t||e===null||(N!==void 0&&e>N&&t(N),S!==void 0&&e<S&&t(S))},[e,N,S,t]),s.jsxs(n,{withoutLabel:i,label:a??"",hidden:d,className:f,hint:v,disabled:u,children:[s.jsx(Un,{displayType:"input",thousandSeparator:" ",decimalSeparator:",",decimalScale:y,fixedDecimalScale:h,prefix:b,suffix:j,defaultValue:"",value:o?I:(e==null?void 0:e.toString())??"",placeholder:r??a,onFocus:D=>{!g&&D.target.select()},onChange:E,hidden:d,disabled:u,className:l.classNames("form-control text-end w-100",{[`form-control-${c}`]:c}),step:x,min:S,max:N}),m&&e!==null&&t&&!u&&s.jsx("div",{className:"luminus-input-remove-icon inset",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:C,children:s.jsx(l.MdClear,{})})})]})},sl=n=>{const e=l.compilerRuntimeExports.c(21),{InputContainer:t,label:o,options:a,disabled:i,hidden:r,className:c,value:d,onChange:u}=n,m=t===void 0?l.RowLabelInput:t;let p;e[0]!==u?(p=b=>{u&&u(b.target.value)},e[0]=u,e[1]=p):p=e[1];const f=p,x=!o,g=`${o}`;let y;if(e[2]!==i||e[3]!==f||e[4]!==r||e[5]!==a||e[6]!==d){let b;e[8]!==i||e[9]!==f||e[10]!==r||e[11]!==d?(b=j=>s.jsx(l.Form.Check,{id:`radio-${j.id}`,label:j.name,type:"radio",value:j.id??"",checked:d===j.id,onChange:f,hidden:r,disabled:i,className:"w-100"},j.id),e[8]=i,e[9]=f,e[10]=r,e[11]=d,e[12]=b):b=e[12],y=a.map(b),e[2]=i,e[3]=f,e[4]=r,e[5]=a,e[6]=d,e[7]=y}else y=e[7];let h;return e[13]!==m||e[14]!==c||e[15]!==i||e[16]!==r||e[17]!==x||e[18]!==g||e[19]!==y?(h=s.jsx(m,{isForRadioInput:!0,hidden:r,withoutLabel:x,label:g,className:c,disabled:i,children:y}),e[13]=m,e[14]=c,e[15]=i,e[16]=r,e[17]=x,e[18]=g,e[19]=y,e[20]=h):h=e[20],h},fc=n=>{const e=l.compilerRuntimeExports.c(9),{ref:t,onClick:o,text:a}=n;let i;e[0]!==o?(i=u=>{u.preventDefault(),o(u)},e[0]=o,e[1]=i):i=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"mt-",children:"…"}),e[2]=r):r=e[2];let c;e[3]!==a?(c=s.jsxs("div",{className:"d-flex flex-column align-items-center",children:[r,s.jsx("div",{className:"mt-1 middle-letter",children:a})]}),e[3]=a,e[4]=c):c=e[4];let d;return e[5]!==t||e[6]!==i||e[7]!==c?(d=s.jsx("div",{ref:t,onClick:i,role:"button",className:"middle-div",children:c}),e[5]=t,e[6]=i,e[7]=c,e[8]=d):d=e[8],d},_s=[["D","day"],["M","month"],["Y","year"],["C","custom"]],pc="_wrapper_qfqux_1",hc="_lg_qfqux_7",gc="_sm_qfqux_11",xc="_md_qfqux_14",Ds={wrapper:pc,lg:hc,sm:gc,md:xc},on=n=>{const e=new Date(n),t=l.trimIsoDate(e.toISOString());e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(e.getUTCDate()-1);const o=l.trimIsoDate(e.toISOString());return{from:t,to:o}},ln=n=>{const e=new Date(n),t=l.trimIsoDate(e.toISOString());e.setUTCFullYear(e.getUTCFullYear()+1),e.setUTCDate(e.getUTCDate()-1);const o=l.trimIsoDate(e.toISOString());return{from:t,to:o}},yc=(n,e)=>{if(n===null||e===null)return"C";if(n===e)return"D";const t=new Date(n);return on(t).to===e?"M":ln(t).to===e?"Y":"C"},vc=(n,e,t)=>{const o=l.compilerRuntimeExports.c(14);let a;o[0]!==n||o[1]!==t||o[2]!==e?(a=(p,f)=>{if(n==="C"){t(x=>({...x,[p]:f}));return}e:switch(p){case"from":{t(x=>{if(f===null)return x;const g=new Date(f);if(n==="D"){const y=l.trimIsoDate(g.toISOString());return{from:y,to:y}}return n==="M"?on(g):n==="Y"?ln(g):x});break e}case"to":{e("C"),t(x=>({...x,[p]:f}));break e}}},o[0]=n,o[1]=t,o[2]=e,o[3]=a):a=o[3];const i=a;let r;o[4]!==n||o[5]!==t?(r=p=>{t(f=>{if(f.from===null||f.to===null)return f;const x=new Date(f.from);x.setHours(x.getHours()-x.getTimezoneOffset()/60);const g=new Date(f.to);if(n==="D"){x.setDate(x.getDate()+p);const y=l.trimIsoDate(x.toISOString());return{from:y,to:y}}return n==="M"?(x.setMonth(x.getMonth()+p),on(x)):n==="Y"?(x.setFullYear(x.getFullYear()+p),ln(x)):{from:l.trimIsoDate(x.toISOString()),to:l.trimIsoDate(g.toISOString())}})},o[4]=n,o[5]=t,o[6]=r):r=o[6];const c=r;let d;o[7]!==t||o[8]!==e?(d=p=>{p==="D"?t(bc):p==="M"?t(jc):p==="Y"&&t(Sc),e(p)},o[7]=t,o[8]=e,o[9]=d):d=o[9];const u=d;let m;return o[10]!==c||o[11]!==u||o[12]!==i?(m={setFromToProp:i,handleArrowClick:c,handleRangeChange:u},o[10]=c,o[11]=u,o[12]=i,o[13]=m):m=o[13],m};function bc(n){return{from:n.from,to:n.from}}function jc(n){if(n.from===null)return n;const e=l.getFirstDayOfMonth(n.from);return on(e)}function Sc(n){if(n.from===null)return n;const e=l.getFirstDayOfYear(new Date(n.from).getFullYear());return ln(e)}const Cc=n=>{const e=l.compilerRuntimeExports.c(55),{fromtoState:t,className:o,size:a}=n,[i,r]=t,{texts:c,ProjectIconComponent:d}=w.useContext(l.LuminusComponentsContext),{date:u}=c,[m,p]=w.useState("C"),{handleArrowClick:f,handleRangeChange:x,setFromToProp:g}=vc(m,p,r),y=m==="C",h=w.useRef(!0);let b,j;e[0]!==i.from||e[1]!==i.to?(b=()=>{if(h.current){const z=yc(i.from,i.to);p(z),h.current=!1}},j=[i.from,i.to],e[0]=i.from,e[1]=i.to,e[2]=b,e[3]=j):(b=e[2],j=e[3]),w.useEffect(b,j);const S=Ds[a??"md"];let N;e[4]!==o||e[5]!==S?(N=l.classNames("d-inline-flex align-items-center gap-1",Ds.wrapper,S,o),e[4]=o,e[5]=S,e[6]=N):N=e[6];let v;e[7]!==f?(v=()=>{f(-1)},e[7]=f,e[8]=v):v=e[8];let C;e[9]!==d?(C=s.jsx(d,{icon:"chevron-left"}),e[9]=d,e[10]=C):C=e[10];let k;e[11]!==y||e[12]!==v||e[13]!==C?(k=s.jsx(l.IconButton,{disabled:y,onClick:v,children:C}),e[11]=y,e[12]=v,e[13]=C,e[14]=k):k=e[14];let I;e[15]!==g?(I=z=>g("from",z===null?null:z.toString()),e[15]=g,e[16]=I):I=e[16];let T;e[17]!==i.from||e[18]!==a||e[19]!==I?(T=s.jsx(l.TextInput,{type:"date",value:i.from,onChange:I,InputContainer:l.NoInputContainer,size:a}),e[17]=i.from,e[18]=a,e[19]=I,e[20]=T):T=e[20];const L=u[_s.find(z=>z[0]===m)[1]];let E;e[21]!==L?(E=L.substring(0,1),e[21]=L,e[22]=E):E=e[22];let D;e[23]!==E?(D=s.jsx(l.DropdownToggle,{text:E,as:fc}),e[23]=E,e[24]=D):D=e[24];let _;e[25]!==u||e[26]!==x||e[27]!==m?(_=_s.map(z=>s.jsx(l.DropdownItem,{disabled:z[0]===m,className:l.classNames(z[0]===m?"text-black-50":""),onClick:()=>x(z[0]),role:"button",children:u[z[1]]},z[0])),e[25]=u,e[26]=x,e[27]=m,e[28]=_):_=e[28];let P;e[29]!==D||e[30]!==_?(P=s.jsx(l.Dropdown,{toggle:D,children:_}),e[29]=D,e[30]=_,e[31]=P):P=e[31];let $;e[32]!==g?($=z=>g("to",z===null?null:z.toString()),e[32]=g,e[33]=$):$=e[33];let R;e[34]!==i.to||e[35]!==a||e[36]!==$?(R=s.jsx(l.TextInput,{type:"date",value:i.to,onChange:$,InputContainer:l.NoInputContainer,size:a}),e[34]=i.to,e[35]=a,e[36]=$,e[37]=R):R=e[37];let F;e[38]!==T||e[39]!==P||e[40]!==R?(F=s.jsx("div",{children:s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[T,P,R]})}),e[38]=T,e[39]=P,e[40]=R,e[41]=F):F=e[41];let M;e[42]!==f?(M=()=>{f(1)},e[42]=f,e[43]=M):M=e[43];let O;e[44]!==d?(O=s.jsx(d,{icon:"chevron-right"}),e[44]=d,e[45]=O):O=e[45];let B;e[46]!==y||e[47]!==M||e[48]!==O?(B=s.jsx(l.IconButton,{disabled:y,onClick:M,children:O}),e[46]=y,e[47]=M,e[48]=O,e[49]=B):B=e[49];let H;return e[50]!==F||e[51]!==B||e[52]!==N||e[53]!==k?(H=s.jsxs("div",{className:N,children:[k,F,B]}),e[50]=F,e[51]=B,e[52]=N,e[53]=k,e[54]=H):H=e[54],H},Nc=n=>{const e=l.compilerRuntimeExports.c(13),{defaultMonth:t,searchKey:o,yearMin:a,yearMax:i}=n,r=o===void 0?"monthFrom":o,{localizationContext:c}=w.useContext(l.LuminusComponentsContext),{dateFnsLocale:d}=w.useContext(c),{searchParams:u,setSearch:m}=pt.useSearchQuery();let p;if(e[0]!==t||e[1]!==r||e[2]!==u){const h=u.get(r);p=h?l.parseISO(h):t,e[0]=t,e[1]=r,e[2]=u,e[3]=p}else p=e[3];const f=p;let x;e[4]!==r||e[5]!==m?(x=h=>{m(r,Rt(h,{representation:"date"}))},e[4]=r,e[5]=m,e[6]=x):x=e[6];const g=x;let y;return e[7]!==d||e[8]!==f||e[9]!==g||e[10]!==i||e[11]!==a?(y=s.jsx(jo,{month:f,onChangeMonth:g,locale:d,yearMin:a,yearMax:i}),e[7]=d,e[8]=f,e[9]=g,e[10]=i,e[11]=a,e[12]=y):y=e[12],y},wc=n=>{const e=l.compilerRuntimeExports.c(15);let t,o,a;e[0]!==n?({defaultYear:t,searchKey:a,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);const i=a===void 0?"yearFrom":a;let r;e[4]!==t?(r=Rt(t,{representation:"date"}),e[4]=t,e[5]=r):r=e[5];const[c,d]=pt.useSearchQueryState(i,r);let u;e[6]!==t||e[7]!==c?(u=c?l.parseISO(c):t,e[6]=t,e[7]=c,e[8]=u):u=e[8];const m=u;let p;e[9]!==d?(p=g=>{d(Rt(g,{representation:"date"}))},e[9]=d,e[10]=p):p=e[10];const f=p;let x;return e[11]!==f||e[12]!==o||e[13]!==m?(x=s.jsx(So,{year:m,onChangeYear:f,...o}),e[11]=f,e[12]=o,e[13]=m,e[14]=x):x=e[14],x},Ic=n=>{const e=l.compilerRuntimeExports.c(17),{data:t,showLegend:o,legendPosition:a,onClick:i}=n,r=o===void 0?!1:o,c=a===void 0?"left":a,{chartColorPalette:d}=w.useContext(l.LuminusComponentsContext),u=r&&c==="right"?200:100,m=r&&c==="left"?200:100;let p;e[0]!==u||e[1]!==m?(p={top:50,right:u,bottom:50,left:m},e[0]=u,e[1]=m,e[2]=p):p=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={from:"color",modifiers:[["darker",.5]]},e[3]=f):f=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x={from:"color",modifiers:[["darker",.5]]},e[4]=x):x=e[4];let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g={from:"color"},e[5]=g):g=e[5];let y;e[6]!==c||e[7]!==r?(y=r?[{anchor:c,direction:c==="left"||c==="right"?"column":"row",justify:!1,translateX:c==="left"?-200:c==="right"?200:0,translateY:c==="top"?-50:c==="bottom"?50:0,itemsSpacing:4,itemWidth:120,itemHeight:18,itemTextColor:"#1e2832",itemDirection:"left-to-right",itemOpacity:1,symbolSize:18,symbolShape:"circle",padding:10}]:[],e[6]=c,e[7]=r,e[8]=y):y=e[8];let h;e[9]!==i?(h=j=>i&&i(j.data),e[9]=i,e[10]=h):h=e[10];let b;return e[11]!==d||e[12]!==t||e[13]!==h||e[14]!==p||e[15]!==y?(b=s.jsx(l.te,{data:t,margin:p,innerRadius:.4,padAngle:4,cornerRadius:2,activeOuterRadiusOffset:10,borderWidth:2,borderColor:f,colors:d,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:x,arcLinkLabelsThickness:2,arcLinkLabelsColor:g,enableArcLabels:!1,legends:y,onClick:h}),e[11]=d,e[12]=t,e[13]=h,e[14]=p,e[15]=y,e[16]=b):b=e[16],b},kc=n=>{var k,I;const e=l.compilerRuntimeExports.c(23),{val:t,translateKey:o,data:a,unit:i}=n,r=t.point.id.split("."),c=r[0],d=Number(r[1]),u=t.point.x<100?"56%":"-56%",m=t.point.y<60?"70px":"8px",p=`translate(${u}, ${m})`;let f;e[0]!==p?(f={transform:p},e[0]=p,e[1]=f):f=e[1];const x=f;let g;e[2]!==o||e[3]!==t.point.seriesId?(g=o(t.point.seriesId),e[2]=o,e[3]=t.point.seriesId,e[4]=g):g=e[4];let y;e[5]!==g?(y=s.jsx(l.Typography,{variant:"body",children:g}),e[5]=g,e[6]=y):y=e[6];let h;e[7]!==t.point.data.x?(h=(k=t.point.data.x)==null?void 0:k.toString(),e[7]=t.point.data.x,e[8]=h):h=e[8];let b;e[9]!==h?(b=s.jsxs(l.Typography,{variant:"body",className:"pe-1",children:[h,":"]}),e[9]=h,e[10]=b):b=e[10];const j=(I=a==null?void 0:a[d])==null?void 0:I[c];let S;e[11]!==i?(S=i&&s.jsx("span",{className:"ms-1",children:i}),e[11]=i,e[12]=S):S=e[12];let N;e[13]!==j||e[14]!==S?(N=s.jsxs(l.Typography,{variant:"body",className:"fw-bold",children:[j,S]}),e[13]=j,e[14]=S,e[15]=N):N=e[15];let v;e[16]!==b||e[17]!==N?(v=s.jsxs("div",{className:"d-flex",children:[b,N]}),e[16]=b,e[17]=N,e[18]=v):v=e[18];let C;return e[19]!==x||e[20]!==v||e[21]!==y?(C=s.jsxs("div",{className:"bg-white shadow-sm px-2 py-1 rounded",style:x,children:[y,v]}),e[19]=x,e[20]=v,e[21]=y,e[22]=C):C=e[22],C},Tc=n=>{var ne;const e=l.compilerRuntimeExports.c(68),{data:t,xKey:o,yKeys:a,translateKey:i,usePercentageValue:r,variant:c,legendPosition:d,noSort:u,unit:m}=n,p=r===void 0?!1:r,f=c===void 0?"default":c,x=u===void 0?!1:u,{confirm:g}=l.useConfirm(),{chartColorPalette:y,texts:h}=w.useContext(l.LuminusComponentsContext),{chart:b}=h;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,e[0]=j):j=e[0];const[S,N]=w.useState(j),v=w.useRef(null);let C;e[1]!==b||e[2]!==g?(C=async()=>{var te;const ee=(te=v.current)==null?void 0:te.querySelector("svg");if(ee&&await g(b.confirmExport)){const se=ee.cloneNode(!0);se.setAttribute("fill","none");const me=new XMLSerializer().serializeToString(se);l.saveFile(new Blob([me],{type:"image/svg+xml"}),"graf.svg")}},e[1]=b,e[2]=g,e[3]=C):C=e[3];const k=C;let I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I=ee=>{N(te=>{const se=new Set(te);return se.has(ee.id)?se.delete(ee.id):se.add(ee.id),se})},e[4]=I):I=e[4];const T=I;let L;e[5]!==t||e[6]!==x||e[7]!==o?(L=x?t:t.toSorted((ee,te)=>{var se;return typeof te[o]=="number"&&typeof ee[o]=="number"?ee[o]-te[o]:(ee[o]??"").toString().localeCompare(((se=te[o])==null?void 0:se.toString())??"")}),e[5]=t,e[6]=x,e[7]=o,e[8]=L):L=e[8];const E=L;let D;e[9]!==E||e[10]!==p||e[11]!==o||e[12]!==a?(D=[],a.forEach(ee=>{if(p){const te=Math.max(...E.map(ue=>ue[ee.key]??-1/0));if(te===-1/0)return;const se=[];E.forEach(ue=>{ue[ee.key]!=null&&se.push({x:ue[o],y:te===0?0:ue[ee.key]/te})}),D.push({id:ee.key,data:se})}else D.push({id:ee.key,data:E.map(te=>({x:te[o],y:te[ee.key]}))})}),e[9]=E,e[10]=p,e[11]=o,e[12]=a,e[13]=D):D=e[13];const _=D;let P;e[14]!==E||e[15]!==i||e[16]!==m||e[17]!==a?(P=ee=>{var te;return s.jsx(kc,{data:E,translateKey:i,val:ee,unit:((te=a.find(se=>{var ue;return se.key===((ue=ee.point)==null?void 0:ue.seriesId)}))==null?void 0:te.unit)??m??void 0})},e[14]=E,e[15]=i,e[16]=m,e[17]=a,e[18]=P):P=e[18];const $=P;let R;if(e[19]!==t||e[20]!==o){let ee;e[22]!==o?(ee=te=>te[o]??1/0,e[22]=o,e[23]=ee):ee=e[23],R=Math.min(...t.map(ee)),e[19]=t,e[20]=o,e[21]=R}else R=e[21];const F=R;let M;if(e[24]!==t||e[25]!==o){let ee;e[27]!==o?(ee=te=>te[o]??-1/0,e[27]=o,e[28]=ee):ee=e[28],M=Math.max(...t.map(ee)),e[24]=t,e[25]=o,e[26]=M}else M=e[26];const O=M,B=typeof((ne=t==null?void 0:t[0])==null?void 0:ne[o]),H=d??(f==="sideContent"?"bottom":"right"),z=!p&&f!=="sideContent";let W;e[29]!==O||e[30]!==F?(W=[F,O],e[29]=O,e[30]=F,e[31]=W):W=e[31];const A=W;let U;e[32]!==k?(U=()=>k(),e[32]=k,e[33]=U):U=e[33];let K;e[34]!==F||e[35]!==B?(K=B==="string"?{type:"point"}:{type:"linear",min:F},e[34]=F,e[35]=B,e[36]=K):K=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V={type:"linear",nice:!0},e[37]=V):V=e[37];let G;e[38]!==z||e[39]!==p?(G=z?{tickSize:5,tickPadding:5,tickRotation:0,legend:p?"%":"count",legendOffset:-40,legendPosition:"middle",truncateTickAt:0}:null,e[38]=z,e[39]=p,e[40]=G):G=e[40];const Z=f==="sideContent"?A:void 0;let X;e[41]!==Z?(X={tickValues:Z},e[41]=Z,e[42]=X):X=e[42];let le;e[43]!==f?(le=f==="sideContent"?[0]:void 0,e[43]=f,e[44]=le):le=e[44];let q;e[45]!==y||e[46]!==S||e[47]!==H||e[48]!==i||e[49]!==a?(q=H!=="none"?[{data:a.map((ee,te)=>({id:ee.key,label:i(ee.key),color:y==null?void 0:y[te],hidden:S.has(ee.key)})),onClick:T,anchor:H,direction:H==="right"?"column":"row",toggleSerie:!0,justify:!1,translateX:H==="right"?120:void 0,translateY:H==="right"?0:H==="bottom"?44:void 0,itemsSpacing:0,itemDirection:"left-to-right",itemWidth:100,itemHeight:20,itemOpacity:.75,symbolSize:12,symbolShape:"circle",effects:[{on:"hover",style:{itemBackground:"rgba(0, 0, 0, .04)",itemOpacity:1,symbolSize:14}}]}]:void 0,e[45]=y,e[46]=S,e[47]=H,e[48]=i,e[49]=a,e[50]=q):q=e[50];let oe;e[51]===Symbol.for("react.memo_cache_sentinel")?(oe={theme:"background"},e[51]=oe):oe=e[51];let ce;e[52]===Symbol.for("react.memo_cache_sentinel")?(ce={from:"serieColor"},e[52]=ce):ce=e[52];const fe=H==="right"?130:20,pe=H==="bottom"?44:20,J=z?50:20;let Y;e[53]!==fe||e[54]!==pe||e[55]!==J?(Y={top:10,right:fe,bottom:pe,left:J},e[53]=fe,e[54]=pe,e[55]=J,e[56]=Y):Y=e[56];let Q;return e[57]!==y||e[58]!==_||e[59]!==U||e[60]!==K||e[61]!==G||e[62]!==X||e[63]!==le||e[64]!==q||e[65]!==Y||e[66]!==$?(Q=s.jsx("div",{ref:v,className:"d-flex h-100 w-100",children:s.jsx(l.Me,{onClick:U,data:_,xScale:K,yScale:V,axisLeft:G,axisBottom:X,gridYValues:le,legends:q,pointSize:6,pointColor:oe,pointBorderWidth:2,pointBorderColor:ce,margin:Y,colors:y,isInteractive:!0,enableCrosshair:!0,enableTouchCrosshair:!0,useMesh:!0,animate:!1,tooltip:$})}),e[57]=y,e[58]=_,e[59]=U,e[60]=K,e[61]=G,e[62]=X,e[63]=le,e[64]=q,e[65]=Y,e[66]=$,e[67]=Q):Q=e[67],Q},_c=n=>{const e=l.compilerRuntimeExports.c(9),{errors:t,schema:o}=n;let a;e[0]!==o?(a=d=>{var u,m;return d.toLowerCase()==="others"?"Obecné":((m=(u=o.columns)==null?void 0:u.find(p=>p.field===d))==null?void 0:m.caption)??d},e[0]=o,e[1]=a):a=e[1];const i=a;let r;if(e[2]!==t||e[3]!==i){let d;e[5]!==i?(d=u=>s.jsxs("tr",{children:[s.jsx("td",{className:"fw-bold pe-2",children:s.jsxs(l.Typography,{variant:"body",children:[i(u.name),":"]})}),s.jsx("td",{className:"",children:s.jsx(l.Typography,{variant:"body",children:u.errors})})]},u.name),e[5]=i,e[6]=d):d=e[6],r=t.map(d),e[2]=t,e[3]=i,e[4]=r}else r=e[4];let c;return e[7]!==r?(c=s.jsx("div",{className:"alert alert-danger w-100 m-0 p-2",children:s.jsx("table",{children:s.jsx("tbody",{children:r})})}),e[7]=r,e[8]=c):c=e[8],c},ol=n=>{const e={};return Object.keys(n).forEach(t=>{if(n[t].value===!0){e[t]=1;return}if(n[t].value===!1){e[t]=0;return}e[t]=n[t].value}),e},Es=(n,e)=>{const t={};return Object.keys(n).forEach(o=>{var r;const a=n[o],i=(r=e.columns)==null?void 0:r.find(c=>c.field===o);if((i==null?void 0:i.type)==="BIT"&&(a===1||a===0)){t[o]={value:a===1,defaultValue:a===1};return}t[o]={value:a,defaultValue:a}}),t},Dc="_table_1klfy_1",Ec="_table-header_1klfy_10",Lc="_table-row_1klfy_10",Rc="_table-head_1klfy_10",Fc="_filters-row_1klfy_19",$c="_table-body_1klfy_30",Pc="_table-cell_1klfy_30",Mc="_action-column_1klfy_43",Ac="_sticky-top_1klfy_47",Bc="_sticky-first_1klfy_54",Oc="_sticky-last_1klfy_61",_e={table:Dc,tableHeader:Ec,tableRow:Lc,tableHead:Rc,filtersRow:Fc,tableBody:$c,tableCell:Pc,actionColumn:Mc,stickyTop:Ac,stickyFirst:Bc,stickyLast:Oc},zc="_input_pxkkh_1",ht={input:zc},Hc="_multiselect_134m5_1",Vc="_multiselect-menu_134m5_10",Uc="_dropdown-item_134m5_18",Wc="_special-option_134m5_24",Dt={multiselect:Hc,multiselectMenu:Vc,dropdownItem:Uc,specialOption:Wc},Ls=10,Rs=({value:n,field:e,disabled:t,valuesForSelect:o,onChangeHandler:a,separator:i})=>{var h,b,j,S;const{texts:{dynamicForms:r}}=w.useContext(l.LuminusComponentsContext),[c,d]=w.useState("");o==null||o.sort((N,v)=>(N.name??"").localeCompare(v.name??""));const u=w.useMemo(()=>{var N;return n?(N=n==null?void 0:n.toString())==null?void 0:N.split(i):[]},[n,i]),m=w.useCallback((N,v)=>{const C=N.split(i),k=v?C.every(I=>u.includes(I))&&u.length===C.length?null:C:N===""?void 0:u.includes(N)?u.filter(I=>I!==N):[...u,N];a(k!=null&&k.length?k.join(i):null)},[a,u,i]),p=w.useMemo(()=>{const N=[{value:o.map(v=>{var C;return((C=v.id)==null?void 0:C.toString())??""}).join(i),label:r.allOptionsMultiselect,specialOption:!0}];return o.forEach(v=>{var C,k;N.push({value:((C=v.id)==null?void 0:C.toString())??"",label:((k=v.name)==null?void 0:k.toString())??"",specialOption:!1})}),N},[o,r,i]),f=w.useRef(null),x=w.useRef(null),[g,y]=w.useState(!1);return w.useEffect(()=>{g&&x.current&&x.current.focus()},[g]),w.useEffect(()=>{p.length<Ls&&d("")},[p]),s.jsxs(l.Dropdown$1,{autoClose:"outside",onToggle:N=>y(N),children:[s.jsx(l.Dropdown$1.Toggle,{variant:"light",ref:f,id:`multiselect-${e}`,size:"sm",className:l.classNames("bg-white border",Dt.multiselect),onKeyDown:N=>{t||N.key==="Escape"&&a(null)},children:u.length>1||u.length===0?r.xValuesMultiselect(u.length):u.length===1?(h=p.find(N=>N.value===u.at(0)))==null?void 0:h.label:r.allOptionsMultiselect}),s.jsxs(l.Dropdown$1.Menu,{className:l.classNames(Dt.multiselectMenu),style:{left:(b=f.current)==null?void 0:b.getBoundingClientRect().left,top:(j=f.current)==null?void 0:j.getBoundingClientRect().bottom,maxWidth:`max(300px, ${(S=f.current)==null?void 0:S.getBoundingClientRect().width}px)`},children:[p.length>=Ls?s.jsx(l.Dropdown$1.Item,{className:l.classNames("rounded",Dt.dropdownItem,Dt.searchItem),children:s.jsx(l.Form.Control,{ref:x,type:"search",size:"sm",value:c,onChange:N=>d(N.target.value??""),className:"w-100"})}):null,p.filter(N=>N.specialOption?!0:c?l.stringSearchWithin(N.value,c):!0).map(N=>s.jsx(l.Dropdown$1.Item,{onClick:()=>!t&&m(N.value,N.specialOption),disabled:t,className:l.classNames("rounded",Dt.dropdownItem,{[Dt.specialOption]:N.specialOption},{"text-muted":t}),children:s.jsx(l.Form.Check,{disabled:t,label:N.label,checked:N.specialOption?u.length===N.value.split(i).length&&u.every(v=>N.value.split(i).includes(v)):u.includes(N.value),onChange:()=>{}})},N.value))]})]})},ll=n=>{var S;const e=l.compilerRuntimeExports.c(106),{type:t,value:o,field:a,isPrimary:i,isReadonly:r,primaryEditable:c,valuesForSelect:d,addValueToValuesForSelect:u,onChangeHandler:m,hideClearIcon:p,clearValue:f,customPickers:x,isMultiChoice:g,multiChoiceSeparator:y,disabled:h}=n,j=h||r?!0:i?!(c===void 0?!1:c):!1;switch(t){case"NUM":{if(d&&d.length>0){if(!g){let D;e[0]!==o?(D=(o==null?void 0:o.toString())??"",e[0]=o,e[1]=D):D=e[1];let _;e[2]!==a||e[3]!==m?(_=R=>m(a,R===null?null:Number(R)),e[2]=a,e[3]=m,e[4]=_):_=e[4];const P=!p;let $;return e[5]!==f||e[6]!==j||e[7]!==D||e[8]!==_||e[9]!==P||e[10]!==d?($=s.jsx(l.CustomSelectInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",value:D,onChange:_,options:d,disabled:j,showClearIcon:P,clearValue:f,dropdownWidth:200}),e[5]=f,e[6]=j,e[7]=D,e[8]=_,e[9]=P,e[10]=d,e[11]=$):$=e[11],$}let I;e[12]!==o?(I=(o==null?void 0:o.toString())??"",e[12]=o,e[13]=I):I=e[13];const T=y??",";let L;e[14]!==a||e[15]!==m?(L=D=>m(a,D),e[14]=a,e[15]=m,e[16]=L):L=e[16];let E;return e[17]!==a||e[18]!==j||e[19]!==I||e[20]!==T||e[21]!==L||e[22]!==d?(E=s.jsx(Rs,{field:a,value:I,separator:T,onChangeHandler:L,valuesForSelect:d,disabled:j}),e[17]=a,e[18]=j,e[19]=I,e[20]=T,e[21]=L,e[22]=d,e[23]=E):E=e[23],E}const N=o===null?null:Number(o);let v;e[24]!==a||e[25]!==m?(v=I=>m(a,I===null?null:Number(I)),e[24]=a,e[25]=m,e[26]=v):v=e[26];const C=!p;let k;return e[27]!==f||e[28]!==j||e[29]!==N||e[30]!==v||e[31]!==C?(k=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",type:"number",value:N,onChange:v,disabled:j,showClearIcon:C,clearValue:f}),e[27]=f,e[28]=j,e[29]=N,e[30]=v,e[31]=C,e[32]=k):k=e[32],k}case"STR":{if(d&&d.length>0){if(!g){let _;e[33]!==o?(_=(o==null?void 0:o.toString())??"",e[33]=o,e[34]=_):_=e[34];let P;e[35]!==a||e[36]!==m?(P=F=>m(a,(F==null?void 0:F.toString())??null),e[35]=a,e[36]=m,e[37]=P):P=e[37];const $=!p;let R;return e[38]!==f||e[39]!==j||e[40]!==_||e[41]!==P||e[42]!==$||e[43]!==d?(R=s.jsx(l.CustomSelectInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",value:_,onChange:P,options:d,disabled:j,showClearIcon:$,clearValue:f,dropdownWidth:200}),e[38]=f,e[39]=j,e[40]=_,e[41]=P,e[42]=$,e[43]=d,e[44]=R):R=e[44],R}let T;e[45]!==o?(T=(o==null?void 0:o.toString())??"",e[45]=o,e[46]=T):T=e[46];const L=y??",";let E;e[47]!==a||e[48]!==m?(E=_=>{m(a,_)},e[47]=a,e[48]=m,e[49]=E):E=e[49];let D;return e[50]!==a||e[51]!==j||e[52]!==T||e[53]!==L||e[54]!==E||e[55]!==d?(D=s.jsx(Rs,{field:a,value:T,separator:L,onChangeHandler:E,valuesForSelect:d,disabled:j}),e[50]=a,e[51]=j,e[52]=T,e[53]=L,e[54]=E,e[55]=d,e[56]=D):D=e[56],D}let N;e[57]===Symbol.for("react.memo_cache_sentinel")?(N=l.classNames(ht.input,ht.longer),e[57]=N):N=e[57];let v;e[58]!==o?(v=(o==null?void 0:o.toString())??"",e[58]=o,e[59]=v):v=e[59];let C;e[60]!==a||e[61]!==m?(C=T=>m(a,(T==null?void 0:T.toString())??null),e[60]=a,e[61]=m,e[62]=C):C=e[62];const k=!p;let I;return e[63]!==f||e[64]!==j||e[65]!==v||e[66]!==C||e[67]!==k?(I=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:N,size:"sm",type:"text",value:v,onChange:C,disabled:j,showClearIcon:k,clearValue:f}),e[63]=f,e[64]=j,e[65]=v,e[66]=C,e[67]=k,e[68]=I):I=e[68],I}case"BIT":{const N=o===!0;let v;e[69]!==a||e[70]!==m?(v=k=>m(a,k),e[69]=a,e[70]=m,e[71]=v):v=e[71];let C;return e[72]!==j||e[73]!==N||e[74]!==v?(C=s.jsx(Tt,{InputContainer:l.NoInputContainer,className:ht.input,value:N,onChange:v,disabled:j}),e[72]=j,e[73]=N,e[74]=v,e[75]=C):C=e[75],C}case"DT":{let N;e[76]!==o?(N=o?o.toString().split("T")[0]??"":"",e[76]=o,e[77]=N):N=e[77];let v;e[78]!==a||e[79]!==m?(v=I=>m(a,(I==null?void 0:I.toString())??null),e[78]=a,e[79]=m,e[80]=v):v=e[80];const C=!p;let k;return e[81]!==f||e[82]!==j||e[83]!==N||e[84]!==v||e[85]!==C?(k=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",type:"date",value:N,onChange:v,disabled:j,showClearIcon:C,clearValue:f}),e[81]=f,e[82]=j,e[83]=N,e[84]=v,e[85]=C,e[86]=k):k=e[86],k}default:{let N;e[87]!==x||e[88]!==t?(N=x==null?void 0:x.find(E=>E.type===t),e[87]=x,e[88]=t,e[89]=N):N=e[89];const v=N;if(!v){let E;return e[90]!==t?(E=s.jsx("div",{className:"alert alert-warning p-1 m-0",children:s.jsxs(l.Typography,{variant:"body",children:["Neznámý typ ",t]})}),e[90]=t,e[91]=E):E=e[91],E}const C=v.picker;let k;e[92]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames(ht.input,ht.longer),e[92]=k):k=e[92];let I;e[93]!==o||e[94]!==d?(I=o?{id:(o==null?void 0:o.toString())??null,name:((S=d==null?void 0:d.find(E=>{var D;return((D=E.id)==null?void 0:D.toString())===(o==null?void 0:o.toString())}))==null?void 0:S.name)??""}:null,e[93]=o,e[94]=d,e[95]=I):I=e[95];let T;e[96]!==u||e[97]!==a||e[98]!==m||e[99]!==d?(T=E=>{var D;m(a,(E==null?void 0:E.id)??null),console.log(E,d==null?void 0:d.some(_=>{var P,$;return((P=_.id)==null?void 0:P.toString())===(($=E==null?void 0:E.id)==null?void 0:$.toString())}),u),E&&!(d!=null&&d.some(_=>{var P,$;return((P=_.id)==null?void 0:P.toString())===(($=E==null?void 0:E.id)==null?void 0:$.toString())}))&&u&&(console.log("adding to values for select"),u({id:((D=E.id)==null?void 0:D.toString())??"",name:E.name}))},e[96]=u,e[97]=a,e[98]=m,e[99]=d,e[100]=T):T=e[100];let L;return e[101]!==v.picker||e[102]!==j||e[103]!==I||e[104]!==T?(L=s.jsx(C,{className:k,value:I,onChange:T,disabled:j}),e[101]=v.picker,e[102]=j,e[103]=I,e[104]=T,e[105]=L):L=e[105],L}}},Gc=n=>{const e=l.compilerRuntimeExports.c(39),{schema:t,columns:o,setColumns:a,initialItem:i,onEdit:r,onDelete:c,customPickers:d,appDetail:u}=n,{ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),[p,f]=w.useState(i);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=(D,_)=>{console.log("changeValue",D,_),f(P=>({...P,[D]:{...P[D],value:_}}))},e[0]=x):x=e[0];const g=x,y=Kc;let h;e[1]!==p?(h=()=>Object.keys(p).some(D=>y(p[D])),e[1]=p,e[2]=h):h=e[2];const b=h;let j,S;e[3]!==i?(j=()=>{f(i)},S=[i],e[3]=i,e[4]=j,e[5]=S):(j=e[4],S=e[5]),w.useEffect(j,S);let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=l.classNames("table-row",_e.tableRow),e[6]=N):N=e[6];let v;e[7]!==m||e[8]!==b||e[9]!==p||e[10]!==r||e[11]!==t.userCanModify?(v=t.userCanModify&&s.jsx("td",{className:l.classNames("table-cell",_e.tableCell,_e.stickyFirst),children:b()&&s.jsx(l.IconButton,{color:"success",onClick:()=>r(ol(p)),children:s.jsx(m,{icon:"check"})})}),e[7]=m,e[8]=b,e[9]=p,e[10]=r,e[11]=t.userCanModify,e[12]=v):v=e[12];let C;e[13]!==o||e[14]!==d||e[15]!==p||e[16]!==t.id||e[17]!==t.primaryKey||e[18]!==t.userCanModify||e[19]!==a?(C=o.map(D=>{var _,P;return s.jsx("td",{className:l.classNames("table-cell",_e.tableCell),children:s.jsx(ll,{type:D.type,value:(_=p[D.field??""])==null?void 0:_.value,field:D.field,isReadonly:D.readOnly,isPrimary:t.primaryKey===D.field,valuesForSelect:D.valuesForSelect,addValueToValuesForSelect:$=>{a(o.map(R=>R.field===D.field?{...R,valuesForSelect:[...R.valuesForSelect??[],$]}:R))},onChangeHandler:g,hideClearIcon:!y(p[D.field??""]),clearValue:(P=p[D.field??""].defaultValue)==null?void 0:P.toString(),customPickers:d,isMultiChoice:D.multiChoice??!1,multiChoiceSeparator:D.multiChoiceSeparator??null,disabled:!t.userCanModify})},`${t.id}-${D.field}`)}),e[13]=o,e[14]=d,e[15]=p,e[16]=t.id,e[17]=t.primaryKey,e[18]=t.userCanModify,e[19]=a,e[20]=C):C=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames("table-cell d-flex gap-1",_e.tableCell,_e.stickyLast),e[21]=k):k=e[21];let I;e[22]!==u||e[23]!==p||e[24]!==t.slaves?(I=t!=null&&t.slaves&&t.slaves.length>0?t.slaves.map((D,_)=>{var P,$;return s.jsx(l.IconButton,{as:"link",href:`${we.generatePath(u,{id:(P=D.id)==null?void 0:P.toString()})}?type=dynamic-form&masterId=${($=p.id)==null?void 0:$.value}`,children:s.jsx(l.SimpleTooltip,{text:D.name??"",placement:"left",children:s.jsx("div",{children:s.jsxs(l.Typography,{variant:"body",className:"d-flex align-items-center text-primary",children:[t.slaves.length>1?s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:_+1}):null,s.jsx(l.MdOutlineSubdirectoryArrowRight,{})]})})})},D.id)}):null,e[22]=u,e[23]=p,e[24]=t.slaves,e[25]=I):I=e[25];let T;e[26]!==m||e[27]!==p||e[28]!==c||e[29]!==t.primaryKey||e[30]!==t.userCanModify?(T=t.userCanModify&&s.jsx(l.IconButton,{color:"danger",onClick:()=>c(p[t.primaryKey??""].value),children:s.jsx(m,{icon:"delete"})}),e[26]=m,e[27]=p,e[28]=c,e[29]=t.primaryKey,e[30]=t.userCanModify,e[31]=T):T=e[31];let L;e[32]!==T||e[33]!==I?(L=s.jsxs("td",{className:k,children:[I,T]}),e[32]=T,e[33]=I,e[34]=L):L=e[34];let E;return e[35]!==L||e[36]!==v||e[37]!==C?(E=s.jsxs("tr",{className:N,children:[v,C,L]}),e[35]=L,e[36]=v,e[37]=C,e[38]=E):E=e[38],E};function Kc(n){return(n==null?void 0:n.value)!==(n==null?void 0:n.defaultValue)}const qc=n=>{const e=l.compilerRuntimeExports.c(14),{schema:t,columns:o,setColumns:a,onCreate:i,customPickers:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(null);let m;e[0]!==t.columns?(m=()=>{var h;const y={};(h=t.columns)==null||h.forEach(b=>{const j=b.type==="BIT"?!1:b.type==="NUM"?null:b.type==="STR"?"":null;y[b.field??""]={value:j,defaultValue:j}}),u(y)},e[0]=t.columns,e[1]=m):m=e[1];const p=m;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=(y,h)=>{u(b=>b&&{...b,[y]:{...b[y],value:h}})},e[2]=f):f=e[2];const x=f;let g;return e[3]!==c||e[4]!==o||e[5]!==r||e[6]!==p||e[7]!==d||e[8]!==i||e[9]!==t.id||e[10]!==t.primaryKey||e[11]!==t.userCanModify||e[12]!==a?(g=d?s.jsxs("tr",{className:"sticky-bottom shadow",children:[t.userCanModify&&s.jsx("td",{className:"sticky-first",children:s.jsx(l.IconButton,{color:"success",onClick:async()=>{const y=ol(d);y&&await i(y)&&u(null)},children:s.jsx(c,{icon:"check"})})}),o.map(y=>s.jsx("td",{children:s.jsx(ll,{type:y.type,value:d[y.field??""].value,field:y.field,isReadonly:y.readOnly,isPrimary:t.primaryKey===y.field,valuesForSelect:y.valuesForSelect,addValueToValuesForSelect:h=>{a(o.map(b=>b.field===y.field?{...b,valuesForSelect:[...b.valuesForSelect??[],h]}:b))},onChangeHandler:x,primaryEditable:!0,customPickers:r,isMultiChoice:y.multiChoice??!1,multiChoiceSeparator:y.multiChoiceSeparator??null,disabled:!t.userCanModify})},`${t.id}-${y.field}`)),t.userCanModify&&s.jsx("td",{className:"sticky-last",children:s.jsx(l.IconButton,{color:"danger",onClick:()=>u(null),children:s.jsx(c,{icon:"cancel"})})})]}):t.userCanModify&&s.jsxs("tr",{className:"sticky-bottom shadow",children:[s.jsx("td",{className:"sticky-first",children:s.jsx(l.IconButton,{onClick:p,children:s.jsx(c,{icon:"add"})})}),s.jsx("td",{colSpan:o.length+1})]}),e[3]=c,e[4]=o,e[5]=r,e[6]=p,e[7]=d,e[8]=i,e[9]=t.id,e[10]=t.primaryKey,e[11]=t.userCanModify,e[12]=a,e[13]=g):g=e[13],g},Yc="_resizer_ref0b_1",Qc="_content_ref0b_11",Zc="_dragging_ref0b_16",Yt={resizer:Yc,content:Qc,dragging:Zc},al=n=>{const e=l.compilerRuntimeExports.c(20),{cellRef:t,defaultWidth:o}=n,[a,i]=w.useState(o),[,r]=w.useState(null);let c,d;e[0]!==o?(c=()=>{i(o)},d=[o],e[0]=o,e[1]=c,e[2]=d):(c=e[1],d=e[2]),w.useEffect(c,d);let u,m;e[3]!==t||e[4]!==a?(u=()=>{t.current&&(t.current.style.minWidth=`${a}px`)},m=[a,t],e[3]=t,e[4]=a,e[5]=u,e[6]=m):(u=e[5],m=e[6]),w.useEffect(u,m);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=l.classNames("luminus-column-resizer",Yt.resizer),e[7]=p):p=e[7];let f;e[8]!==r?(f=b=>{r(b.currentTarget.getBoundingClientRect().x),b.currentTarget.classList.add(Yt.dragging)},e[8]=r,e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==r?(x=b=>{r(j=>(t.current&&i(S=>S+b.clientX-(j??0)),b.clientX))},e[10]=t,e[11]=r,e[12]=x):x=e[12];let g;e[13]!==r?(g=b=>{r(null),b.currentTarget.classList.remove(Yt.dragging)},e[13]=r,e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:l.classNames("content",Yt.content)}),e[15]=y):y=e[15];let h;return e[16]!==f||e[17]!==x||e[18]!==g?(h=s.jsx("div",{className:p,draggable:!0,onDragStart:f,onDrag:x,onDragEnd:g,children:y}),e[16]=f,e[17]=x,e[18]=g,e[19]=h):h=e[19],h},Xc=n=>{const e=l.compilerRuntimeExports.c(10),{column:t,children:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);if(t.description){const r=t.description??"";let c;e[0]!==a?(c=s.jsx(a,{icon:"info"}),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==o||e[3]!==c?(d=s.jsxs("div",{className:"d-flex justify-content-between",children:[o,c]}),e[2]=o,e[3]=c,e[4]=d):d=e[4];let u;return e[5]!==r||e[6]!==d?(u=s.jsx(l.SimpleTooltip,{placement:"bottom",text:r,children:d}),e[5]=r,e[6]=d,e[7]=u):u=e[7],u}let i;return e[8]!==o?(i=s.jsx(s.Fragment,{children:o}),e[8]=o,e[9]=i):i=e[9],i},Jc=n=>{const e=l.compilerRuntimeExports.c(23),{column:t,sortByField:o,sortByType:a,setSortBy:i}=n,{ProjectIconComponent:r}=w.useContext(l.LuminusComponentsContext),c=w.useRef(null);let d;e:{if(t.valuesForSelect&&t.valuesForSelect.length>0){d=200;break e}switch(t.type){case"NUM":{d=80;break e}case"STR":{d=200;break e}case"BIT":{d=50;break e}case"DT":{d=100;break e}default:d=100}}const u=d;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=l.classNames("table-head",_e.tableHead),e[0]=m):m=e[0];let p;e[1]!==t.field||e[2]!==i||e[3]!==o||e[4]!==a?(p=()=>{const b=o===t.field?a:null;if(b==="asc"){i(t.field,"desc");return}if(b==="desc"){i(t.field,null);return}i(t.field,"asc")},e[1]=t.field,e[2]=i,e[3]=o,e[4]=a,e[5]=p):p=e[5];let f;e[6]!==r||e[7]!==t.field||e[8]!==o||e[9]!==a?(f=o===t.field&&s.jsx(r,{icon:a==="asc"?"chevron-up":"chevron-down"}),e[6]=r,e[7]=t.field,e[8]=o,e[9]=a,e[10]=f):f=e[10];let x;e[11]!==t.label||e[12]!==f?(x=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[t.label,f]}),e[11]=t.label,e[12]=f,e[13]=x):x=e[13];let g;e[14]!==t||e[15]!==x?(g=s.jsx(Xc,{column:t,children:x}),e[14]=t,e[15]=x,e[16]=g):g=e[16];let y;e[17]!==u?(y=s.jsx(al,{cellRef:c,defaultWidth:u}),e[17]=u,e[18]=y):y=e[18];let h;return e[19]!==p||e[20]!==g||e[21]!==y?(h=s.jsxs("th",{ref:c,className:m,onClick:p,children:[g,y]}),e[19]=p,e[20]=g,e[21]=y,e[22]=h):h=e[22],h},ed=n=>{const e=l.compilerRuntimeExports.c(80),{schema:t,items:o,onEditItem:a,onDeleteItem:i,onCreateItem:r,filters:c,setFilter:d,sortByField:u,sortByType:m,setSortBy:p,selectedMaster:f,customPickers:x,appDetail:g}=n,{texts:y}=w.useContext(l.LuminusComponentsContext),{dynamicForms:h}=y;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const[j,S]=w.useState(b);let N;e[1]!==t.columns||e[2]!==t.masterReference||e[3]!==t.masterReferenceColumn||e[4]!==f?(N=()=>{var U,K,V;S([...((V=(K=(U=t.columns)==null?void 0:U.filter(td))==null?void 0:K.filter(G=>t.masterReference?G.field!==t.masterReferenceColumn:!0))==null?void 0:V.map(G=>{var Z;return{label:G.caption??"",width:100,description:G.description??null,field:G.field??"",type:G.type,readOnly:G.readOnly,valuesForSelect:((Z=G.values)==null?void 0:Z.filter(X=>G.valuesFilteredByMaster?X.masterValue===f:!0).map(nd))??void 0,multiChoice:G.multiChoice??!1,multiChoiceSeparator:G.multiChoiceSeparator??null}}))??[]])},e[1]=t.columns,e[2]=t.masterReference,e[3]=t.masterReferenceColumn,e[4]=f,e[5]=N):N=e[5];let v;e[6]!==t||e[7]!==f?(v=[t,f],e[6]=t,e[7]=f,e[8]=v):v=e[8],w.useEffect(N,v);const C=`dynamic-table-${t.id}`;let k,I,T;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames("table table-borderless luminus-df-table",_e.table),I=l.classNames("text-nowrap table-header",_e.stickyTop,_e.tableHeader),T=l.classNames("table-row",_e.tableRow),e[9]=k,e[10]=I,e[11]=T):(k=e[9],I=e[10],T=e[11]);let L;e[12]!==t.userCanModify?(L=t.userCanModify&&s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyFirst)}),e[12]=t.userCanModify,e[13]=L):L=e[13];let E;if(e[14]!==j||e[15]!==t.id||e[16]!==p||e[17]!==u||e[18]!==m){let U;e[20]!==t.id||e[21]!==p||e[22]!==u||e[23]!==m?(U=K=>s.jsx(Jc,{column:K,sortByField:u,sortByType:m,setSortBy:p},`${t.id}-${K.field}`),e[20]=t.id,e[21]=p,e[22]=u,e[23]=m,e[24]=U):U=e[24],E=j.map(U),e[14]=j,e[15]=t.id,e[16]=p,e[17]=u,e[18]=m,e[19]=E}else E=e[19];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyLast)}),e[25]=D):D=e[25];let _;e[26]!==E||e[27]!==L?(_=s.jsxs("tr",{className:T,children:[L,E,D]}),e[26]=E,e[27]=L,e[28]=_):_=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=l.classNames("table-row filters-row",_e.tableRow,_e.filtersRow),e[29]=P):P=e[29];let $;e[30]!==t.userCanModify?($=t.userCanModify&&s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyFirst)}),e[30]=t.userCanModify,e[31]=$):$=e[31];let R;if(e[32]!==j||e[33]!==h||e[34]!==c||e[35]!==t.id||e[36]!==d){let U;e[38]!==h||e[39]!==c||e[40]!==t.id||e[41]!==d?(U=K=>s.jsx("th",{className:l.classNames("table-head",_e.tableHead),children:K.valuesForSelect&&K.valuesForSelect.length>0||K.type==="BIT"?s.jsx(s.Fragment,{children:s.jsx(l.CustomSelectInput,{InputContainer:l.NoInputContainer,withoutLabel:!0,size:"sm",value:c[K.field]??"",onChange:V=>d(K.field,(V==null?void 0:V.toString())??null),options:K.type==="BIT"?[{id:1,name:h.yes},{id:0,name:h.no}]:K.valuesForSelect??[],isNumber:K.type==="BIT",showClearIcon:!0,dropdownWidth:200})}):s.jsx(s.Fragment,{children:s.jsx(l.TextInput,{InputContainer:l.NoInputContainer,withoutLabel:!0,size:"sm",type:K.type==="NUM"?"number":K.type==="DT"?"date":"text",value:c[K.field]??"",onChange:V=>d(K.field,(V==null?void 0:V.toString())??null)})})},`${t.id}-${K.field}`),e[38]=h,e[39]=c,e[40]=t.id,e[41]=d,e[42]=U):U=e[42],R=j.map(U),e[32]=j,e[33]=h,e[34]=c,e[35]=t.id,e[36]=d,e[37]=R}else R=e[37];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyLast)}),e[43]=F):F=e[43];let M;e[44]!==$||e[45]!==R?(M=s.jsxs("tr",{className:P,children:[$,R,F]}),e[44]=$,e[45]=R,e[46]=M):M=e[46];let O;e[47]!==_||e[48]!==M?(O=s.jsxs("thead",{className:I,children:[_,M]}),e[47]=_,e[48]=M,e[49]=O):O=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=l.classNames("table-body",_e.tableBody),e[50]=B):B=e[50];let H;if(e[51]!==g||e[52]!==j||e[53]!==x||e[54]!==o||e[55]!==i||e[56]!==a||e[57]!==t){let U;e[59]!==t.primaryKey?(U=V=>V[t.primaryKey??""],e[59]=t.primaryKey,e[60]=U):U=e[60];let K;e[61]!==g||e[62]!==j||e[63]!==x||e[64]!==i||e[65]!==a||e[66]!==t?(K=V=>s.jsx(Gc,{schema:t,columns:j,setColumns:S,initialItem:V,onEdit:a,onDelete:i,customPickers:x,appDetail:g},`${t.id}-${V[t.primaryKey??""].value}`),e[61]=g,e[62]=j,e[63]=x,e[64]=i,e[65]=a,e[66]=t,e[67]=K):K=e[67],H=o.filter(U).map(K),e[51]=g,e[52]=j,e[53]=x,e[54]=o,e[55]=i,e[56]=a,e[57]=t,e[58]=H}else H=e[58];let z;e[68]!==j||e[69]!==x||e[70]!==r||e[71]!==t?(z=s.jsx(qc,{schema:t,columns:j,setColumns:S,onCreate:r,customPickers:x}),e[68]=j,e[69]=x,e[70]=r,e[71]=t,e[72]=z):z=e[72];let W;e[73]!==H||e[74]!==z?(W=s.jsxs("tbody",{className:B,children:[H,z]}),e[73]=H,e[74]=z,e[75]=W):W=e[75];let A;return e[76]!==O||e[77]!==W||e[78]!==C?(A=s.jsxs("table",{id:C,className:k,children:[O,W]}),e[76]=O,e[77]=W,e[78]=C,e[79]=A):A=e[79],A};function td(n){return!n.hidden}function nd(n){return{id:n.id??"",name:n.name}}const sd=n=>{const e=l.compilerRuntimeExports.c(8),{master:t,onChange:o,options:a,label:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={minWidth:"200px"},e[0]=r):r=e[0];let c;e[1]!==o?(c=u=>o(u?u.toString():null),e[1]=o,e[2]=c):c=e[2];let d;return e[3]!==i||e[4]!==t||e[5]!==a||e[6]!==c?(d=s.jsx("div",{style:r,children:s.jsx(l.CustomSelectInput,{label:i,value:t,onChange:c,options:a,size:"sm"})}),e[3]=i,e[4]=t,e[5]=a,e[6]=c,e[7]=d):d=e[7],d},od="_pagination_gujwe_1",Fs={pagination:od},$s={appDetail:"/settings/:id"},St={apiSchemaGet:"/dynamicForms/schema",apiDataGet:"/dynamicForms/data",apiItemPost:"/dynamicForms/update",apiItemDelete:"/dynamicForms/delete",apiItemCreate:"/dynamicForms/insert",apiExportGet:"/dynamicForms/export"},ld=({id:n,page:e,setPage:t,filters:o,setFilter:a,sortByField:i,sortByType:r,setSortBy:c,appUrls:{appDetail:d=$s.appDetail}=$s,apiUrls:{apiSchemaGet:u=St.apiSchemaGet,apiDataGet:m=St.apiDataGet,apiItemPost:p=St.apiItemPost,apiItemDelete:f=St.apiItemDelete,apiItemCreate:x=St.apiItemCreate,apiExportGet:g=St.apiExportGet}=St,customPickers:y})=>{var ue,me,be,ae,ke,Ne,De;const{texts:{dynamicForms:h},ProjectIconComponent:b}=w.useContext(l.LuminusComponentsContext),j=l.useAxios(),{startLoading:S,stopLoading:N}=w.useContext(l.LoadingContext),[v,C]=w.useState(null),[k,I]=w.useState(null),[T,L]=w.useState(null),[E,D]=w.useState(null),[_,P]=w.useState(!1),{addNotification:$}=l.useNotifications(),[R,F]=w.useState([]),{confirm:M}=l.useConfirm(),O=20,B=O+1,H=E?Math.ceil(E.length/O):1,z=e?e>1:!1,W=e?e<H:!1,A=e?(e-1)*O:0,U=e?e*O:O,K=w.useMemo(()=>E?E.length>B:!1,[E,B]),V=w.useMemo(()=>K?(E==null?void 0:E.slice(A,U))??null:E??null,[K,E,A,U]),[G,Z]=pt.useSearchQueryState("masterId",null,"string"),[X,le]=w.useState(G);w.useEffect(()=>{C(null),I(null),P(!1),F([])},[n]),w.useEffect(()=>{G!==null&&(le(G),Z(null))},[G,n,Z]);const q=w.useCallback(async()=>{S("dynamicFormSchema"),await j.get(`${u}?id=${n}`).then(({data:re})=>{C(re),N("dynamicFormSchema")}).catch(()=>N("dynamicFormSchema"))},[j,n,S,N,u]),oe=w.useCallback(async()=>{var re;if(!(v===null||((re=v.id)==null?void 0:re.toString())!==n)){if(v.masterReference&&!X){I([]);return}S("dynamicFormData"),await j.get(`${m}?id=${n}&showArchive=${_}${v.masterReference?`&master=${X}`:""}`).then(({data:he})=>{const ye=he.map(de=>{var xe;return Object.fromEntries(((xe=v.columns)==null?void 0:xe.filter(je=>je.field).map(je=>[je.field,{value:de[je.field??""],defaultValue:de[je.field??""]}]))??[])});I(ye),N("dynamicFormData")}).catch(()=>N("dynamicFormData"))}},[j,n,v,S,N,_,X,m]),ce=w.useCallback(async()=>{var re;v===null||((re=v.id)==null?void 0:re.toString())!==n||v.masterReference&&!X||(S("dynamicFormExport"),await j.get(`${g}?id=${n}&showArchive=${_}${v.masterReference?`&master=${X}`:""}`,{responseType:"blob"}).then(he=>l.saveFileFromResponse(he,{fallbackName:`export-${n}`})).finally(()=>N("dynamicFormExport")))},[j,n,v,S,N,_,X,g]),fe=w.useCallback(async re=>(S("dynamicFormEdit"),j.post(`${p}?id=${n}`,re).then(({data:he})=>(N("dynamicFormEdit"),F([]),he)).catch(he=>(N("dynamicFormEdit"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,p]),pe=w.useCallback(async re=>(S("dynamicFormDelete"),j.delete(`${f}?id=${n}&pk=${re}`).then(({data:he})=>(N("dynamicFormDelete"),F([]),he)).catch(he=>(N("dynamicFormDelete"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,f]),J=w.useCallback(async re=>(S("dynamicFormCreate"),j.post(`${x}?id=${n}`,re).then(({data:he})=>(N("dynamicFormCreate"),F([]),he)).catch(he=>(N("dynamicFormCreate"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,x]),Y=w.useCallback(async re=>{if(!v)return;const he=await fe(v.masterReference?{...re,[v.masterReferenceColumn??""]:X}:re);if(he!==null){if($(h.editSuccess,"success"),he.affectedOtherRowsByTrigger){oe();return}I(ye=>ye&&ye.map(de=>{var xe;return((xe=de[(v==null?void 0:v.primaryKey)??""])==null?void 0:xe.value)===re[(v==null?void 0:v.primaryKey)??""]?Es(re,v):de}))}},[$,fe,v,X,h,oe]),Q=w.useCallback(async re=>{if(await M(h.deleteConfirm)){const he=await pe(re);if(he!==null){if($(h.deleteSuccess,"success"),he.affectedOtherRowsByTrigger){oe();return}I(ye=>ye&&ye.filter(de=>{var xe;return((xe=de[(v==null?void 0:v.primaryKey)??""])==null?void 0:xe.value)!==re}))}}},[$,pe,h,M,v,oe]),ne=w.useCallback(async re=>{if(!v)return!1;const he=await J(v.masterReference?{...re,[v.masterReferenceColumn??""]:X}:re);if(he!==null){if($(h.createSuccess,"success"),he.affectedOtherRowsByTrigger)return oe(),!0;const ye=Es(re,v);return ye[(v==null?void 0:v.primaryKey)??""]={value:he.primaryKey,defaultValue:he.primaryKey},I(de=>[...de??[],ye]),!0}return!1},[$,J,h,v,X,oe]),ee=re=>{re>H?t(H):re<1&&t(1),t(re)},te=w.useCallback(()=>{if(!k||!v){L(null);return}const re=k.filter(he=>Object.entries(o).every(([ye,de])=>{var ze,Ee,Me;if(de===null)return!0;const xe=(ze=he[ye])==null?void 0:ze.value;if(xe==null)return!1;const je=(Ee=v.columns)==null?void 0:Ee.find(He=>He.field===ye),$e=je==null?void 0:je.type,Pe=(je==null?void 0:je.values)&&((Me=je==null?void 0:je.values)==null?void 0:Me.length)>0;if(!$e)return!1;switch($e){case"STR":return Pe?xe===de:xe.toString().toLowerCase().includes(de.toLowerCase());case"NUM":return Pe?Number(xe)===Number(de):xe.toString().toLowerCase().includes(de.toLowerCase());case"DT":return xe.toString().toLowerCase().includes(de.toLowerCase());case"BIT":return Number(xe)===Number(de);default:return xe.toString().toLowerCase().includes(de.toLowerCase())}}));L(re)},[k,o,v]),se=w.useCallback(()=>{if(!T||!v){D([]);return}if(!i){D(T);return}D([...T].sort((re,he)=>{var $e,Pe,ze,Ee,Me,He;const ye=((Pe=($e=re[i])==null?void 0:$e.value)==null?void 0:Pe.toString())??"",de=((Ee=(ze=he[i])==null?void 0:ze.value)==null?void 0:Ee.toString())??"",xe=v.columns.find(Te=>Te.field===i),je=xe==null?void 0:xe.type;if(!xe||!je||!ye&&!de)return 0;if(!ye)return 1;if(!de)return-1;if(xe.values&&xe.values.length>0){const Te=((Me=xe.values.find(Ve=>{var Ae;return((Ae=Ve.id)==null?void 0:Ae.toString())===ye}))==null?void 0:Me.name)??"",Le=((He=xe.values.find(Ve=>{var Ae;return((Ae=Ve.id)==null?void 0:Ae.toString())===de}))==null?void 0:He.name)??"";return r==="asc"?Te.localeCompare(Le):Le.localeCompare(Te)}if(je==="NUM"){const Te=Number(ye),Le=Number(de);return r==="asc"?Te-Le:Le-Te}if(je==="DT"){const Te=l.parseISO(ye==null?void 0:ye.toString()).getTime(),Le=l.parseISO(de==null?void 0:de.toString()).getTime();return r==="asc"?Te-Le:Le-Te}return r==="asc"?ye.toString().localeCompare(de.toString()):de.toString().localeCompare(ye.toString())}))},[T,v,i,r]);return w.useEffect(()=>{q()},[q]),w.useEffect(()=>{oe()},[oe]),w.useEffect(()=>{te()},[te]),w.useEffect(()=>{se()},[se]),w.useEffect(()=>{K?e||t(1):E&&t(null)},[E,K,e,t]),w.useEffect(()=>{!K||!e||(e>H&&t(H),e<1&&t(1))},[e,K,H,t]),s.jsxs("div",{className:"h-100 w-100 d-flex flex-column",children:[s.jsxs("div",{className:"mb-3 d-flex justify-content-between align-items-start",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"h3",children:(v==null?void 0:v.name)??""}),(v==null?void 0:v.masterReference)&&s.jsx(sd,{label:((me=(ue=v.columns)==null?void 0:ue.find(re=>re.field===v.masterReferenceColumn))==null?void 0:me.caption)??"",options:((ae=(be=v.columns)==null?void 0:be.find(re=>re.field===v.masterReferenceColumn))==null?void 0:ae.values)??[],master:X,onChange:re=>le(re)})]}),s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[(ke=v==null?void 0:v.slaves)==null?void 0:ke.map((re,he)=>{var ye;return s.jsxs(l.ContextButton,{as:"link",href:`${we.generatePath(d,{id:(ye=re.id)==null?void 0:ye.toString()})}?type=dynamic-form`,children:[s.jsxs("div",{className:"d-flex align-items-center",children:[v.slaves.length>1?s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:he+1}):null,s.jsx(l.MdOutlineSubdirectoryArrowRight,{})]}),re.name]},re.id)}),s.jsxs(l.Dropdown,{toggle:s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),children:[s.jsx(l.DropdownItem,{onClick:()=>P(!_),children:_?h.hideArchived:h.showArchived}),s.jsx(l.DropdownDivider,{}),s.jsx(l.DropdownItem,{onClick:ce,icon:s.jsx(b,{icon:"file-download"}),children:h.downloadExport})]})]})]}),(v==null?void 0:v.description)&&s.jsx(l.Typography,{variant:"body2",className:"mb-3",children:v==null?void 0:v.description}),v!=null&&v.masterReference&&!X?s.jsx(l.Alert,{variant:"warning",children:h.selectMaster(((De=(Ne=v.columns)==null?void 0:Ne.find(re=>re.field===v.masterReferenceColumn))==null?void 0:De.caption)??"").toLowerCase()}):s.jsxs(s.Fragment,{children:[v&&R.length>0&&s.jsx("div",{className:"mb-2",children:s.jsx(_c,{errors:R,schema:v})}),v&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:l.classNames("rounded border overflow-auto",Fs.tableContainer),children:s.jsx(ed,{schema:v,items:!K&&E&&(E==null?void 0:E.length)>B?[]:(K?V:E)??[],onEditItem:Y,onDeleteItem:Q,onCreateItem:ne,filters:o,setFilter:a,sortByField:i,sortByType:r,setSortBy:c,selectedMaster:(X==null?void 0:X.toString())??null,customPickers:y,appDetail:d})}),K&&e&&s.jsxs("div",{className:l.classNames(Fs.pagination,"d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"),children:[s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(1),disabled:!z,children:s.jsx(b,{icon:"chevron-double-left"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(e-1),disabled:!z,children:s.jsx(b,{icon:"chevron-left"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(e+1),disabled:!W,children:s.jsx(b,{icon:"chevron-right"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(H),disabled:!W,children:s.jsx(b,{icon:"chevron-double-right"})})]}),s.jsxs(l.Typography,{variant:"body",children:[h.tablePage," ",e," ",h.tablePageFrom," ",H]})]})]})]})]})},Ps={appDetail:"/settings/:id"},Ms={apiDynamicFormsGet:"/dynamicForms"},ad=n=>{const e=l.compilerRuntimeExports.c(7),{item:t,children:o}=n;if(t.description){const i=t.description??"";let r;e[0]!==o?(r=s.jsx("div",{children:o}),e[0]=o,e[1]=r):r=e[1];let c;return e[2]!==i||e[3]!==r?(c=s.jsx(l.SimpleTooltip,{placement:"left",text:i,children:r}),e[2]=i,e[3]=r,e[4]=c):c=e[4],c}let a;return e[5]!==o?(a=s.jsx(s.Fragment,{children:o}),e[5]=o,e[6]=a):a=e[6],a},As=n=>{const e=l.compilerRuntimeExports.c(8);let t,o,a;e[0]!==n?({disabled:t,style:a,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let i;return e[4]!==t||e[5]!==o||e[6]!==a?(i=t?s.jsx("span",{"aria-disabled":!0,style:{...a??{},cursor:"not-allowed",opacity:.4},...o}):s.jsx(we.Link,{...o}),e[4]=t,e[5]=o,e[6]=a,e[7]=i):i=e[7],i},Bs=({item:n,fullSize:e,appDetail:t,search:o,activeId:a,disabled:i})=>{var r,c,d,u;return e?s.jsxs(As,{disabled:!!i,to:`${we.generatePath(t,{id:(r=n.id)==null?void 0:r.toString()})}?type=${n.type}&search=${o??""}`,className:`text-nowrap list-group-item list-group-item-action ${(a==null?void 0:a.toString())===((c=n.id)==null?void 0:c.toString())?"active":""}`,children:[s.jsx(l.Typography,{variant:"body",children:n.name}),n.description&&s.jsx(l.Typography,{variant:"body2",className:"text-muted mt-2",children:n.description})]}):s.jsx(ad,{item:n,children:s.jsx(As,{disabled:!!i,to:`${we.generatePath(t,{id:(d=n.id)==null?void 0:d.toString()})}?type=${n.type}&search=${o??""}`,className:`text-nowrap list-group-item list-group-item-action ${(a==null?void 0:a.toString())===((u=n.id)==null?void 0:u.toString())?"active":""}`,children:s.jsx(l.Typography,{variant:"body2",children:n.name})})},n.id)},id=n=>{const e=l.compilerRuntimeExports.c(33),{activeId:t,anchoredForms:o,otherForms:a,groupsDefs:i,searchQuery:r,fullSize:c,appUrls:d,apiUrls:u}=n;let m;e[0]!==a?(m=a===void 0?[]:a,e[0]=a,e[1]=m):m=e[1];const p=m;let f;e[2]!==i?(f=i===void 0?[]:i,e[2]=i,e[3]=f):f=e[3];const x=f,{appDetail:g}=d===void 0?Ps:d,y=g===void 0?Ps.appDetail:g,{apiDynamicFormsGet:h}=u===void 0?Ms:u,b=h===void 0?Ms.apiDynamicFormsGet:h,j=l.useAxios(),{startLoading:S,stopLoading:N}=w.useContext(l.LoadingContext),[v,C]=w.useState(null),[k]=pt.useSearchQueryState("search","");let I;e[4]!==o||e[5]!==r?(I=(o==null?void 0:o.filter(O=>l.stringSearchWithin(O.name,r)||l.stringSearchWithin(O.description,r)).sort(rd))??[],e[4]=o,e[5]=r,e[6]=I):I=e[6];const T=I;let L;e[7]!==v||e[8]!==p||e[9]!==r?(L=[...(v==null?void 0:v.map(cd))??[],...p].filter(O=>l.stringSearchWithin(O.name,r)||l.stringSearchWithin(O.description,r)).sort(dd)??[],e[7]=v,e[8]=p,e[9]=r,e[10]=L):L=e[10];const E=L;let D;if(e[11]!==E||e[12]!==x){let O;e[14]!==E?(O=B=>({id:B.id,name:B.name??"",items:E.filter(H=>H.group===B.id)}),e[14]=E,e[15]=O):O=e[15],D=x.map(O).filter(ud),e[11]=E,e[12]=x,e[13]=D}else D=e[13];const _=D;let P;e[16]!==b||e[17]!==j||e[18]!==S||e[19]!==N?(P=async()=>{S("dynamicForms"),await j.get(b).then(O=>{const{data:B}=O;C(B),N("dynamicForms")}).catch(()=>N("dynamicForms"))},e[16]=b,e[17]=j,e[18]=S,e[19]=N,e[20]=P):P=e[20];const $=P;let R,F;e[21]!==v||e[22]!==$?(R=()=>{!v&&$()},F=[$,v],e[21]=v,e[22]=$,e[23]=R,e[24]=F):(R=e[23],F=e[24]),w.useEffect(R,F);let M;return e[25]!==t||e[26]!==y||e[27]!==T||e[28]!==_||e[29]!==E||e[30]!==c||e[31]!==k?(M=[...T,...E].length>0?s.jsx(s.Fragment,{children:s.jsxs("div",{className:"w-auto list-group forms-items overflow-x-hidden",children:[T.length>0?s.jsxs(s.Fragment,{children:[T.map(O=>s.jsx(Bs,{item:O,fullSize:c??!1,appDetail:y,search:k,activeId:t,disabled:!O.userCanModify&&!O.userCanSelect},O.id)),s.jsx("hr",{className:"mb-0"})]}):null,_.map(O=>s.jsx(Ot,{title:O.name,defaultOpen:!0,children:O.items.map(B=>s.jsx(Bs,{item:B,fullSize:c??!1,appDetail:y,search:k,activeId:t,disabled:!B.userCanSelect&&!B.userCanModify},B.id))},O.id))]})}):null,e[25]=t,e[26]=y,e[27]=T,e[28]=_,e[29]=E,e[30]=c,e[31]=k,e[32]=M):M=e[32],M};function rd(n,e){return(n.name??"").localeCompare(e.name??"")}function cd(n){return{...n,type:"dynamic-form"}}function dd(n,e){return(n.name??"").localeCompare(e.name??"")}function ud(n){return n.items.length>0}const md=n=>{const e=l.compilerRuntimeExports.c(7),{label:t,to:o,value:a}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("input",{disabled:!0,className:"form-control d-none"}),e[0]=i):i=e[0];let r;e[1]!==o||e[2]!==a?(r=o?s.jsx(we.Link,{to:o,className:"border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center",children:a}):s.jsx("div",{className:"luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center",children:a}),e[1]=o,e[2]=a,e[3]=r):r=e[3];let c;return e[4]!==t||e[5]!==r?(c=s.jsxs(l.RowLabelInput,{label:t,children:[i,r]}),e[4]=t,e[5]=r,e[6]=c):c=e[6],c},fd=()=>{const n=l.compilerRuntimeExports.c(27),{localizationContext:e}=w.useContext(l.LuminusComponentsContext),{language:t,setLanguage:o}=w.useContext(e);let a;if(n[0]!==o){const S=N=>{o(N)};a=(N,v)=>{S(v),N.stopPropagation()},n[0]=o,n[1]=a}else a=n[1];const i=a;let r;n[2]!==i?(r=S=>i(S,"cz"),n[2]=i,n[3]=r):r=n[3];const c=t==="cz";let d;n[4]!==c?(d=l.classNames("w-100 border-end border-primary text-center",{"fw-bold":c}),n[4]=c,n[5]=d):d=n[5];let u;n[6]!==r||n[7]!==d?(u=s.jsx("span",{role:"button",onClick:r,className:d,children:"CZ"}),n[6]=r,n[7]=d,n[8]=u):u=n[8];let m;n[9]!==i?(m=S=>i(S,"en"),n[9]=i,n[10]=m):m=n[10];const p=t==="en";let f;n[11]!==p?(f=l.classNames("w-100 border-end border-primary text-center",{"fw-bold":p}),n[11]=p,n[12]=f):f=n[12];let x;n[13]!==m||n[14]!==f?(x=s.jsx("span",{role:"button",onClick:m,className:f,children:"EN"}),n[13]=m,n[14]=f,n[15]=x):x=n[15];let g;n[16]!==i?(g=S=>i(S,"de"),n[16]=i,n[17]=g):g=n[17];const y=t==="de";let h;n[18]!==y?(h=l.classNames("w-100 text-center",{"fw-bold":y}),n[18]=y,n[19]=h):h=n[19];let b;n[20]!==h||n[21]!==g?(b=s.jsx("span",{role:"button",onClick:g,className:h,children:"DE"}),n[20]=h,n[21]=g,n[22]=b):b=n[22];let j;return n[23]!==b||n[24]!==u||n[25]!==x?(j=s.jsx(l.DropdownItem,{children:s.jsxs("div",{className:"w-100 d-flex align-items-center",children:[u,x,b]})}),n[23]=b,n[24]=u,n[25]=x,n[26]=j):j=n[26],j},pd=n=>{const e=l.compilerRuntimeExports.c(6);let t,o;e[0]!==n?({controlId:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;return e[3]!==t||e[4]!==o?(a=s.jsx(l.Form.Group,{controlId:t,...o}),e[3]=t,e[4]=o,e[5]=a):a=e[5],a},hd=n=>{const e=l.compilerRuntimeExports.c(11),{employeeId:t,alt:o,noPhotoImage:a,cafmApiUrl:i,showLargeInLightBox:r}=n,c=r===void 0?!1:r,{user:d}=w.useContext(l.UserContext),{photoPath:u,photoPathSm:m}=pt.useEmployeePhotoPath(t);let p;e[0]!==o||e[1]!==i||e[2]!==t||e[3]!==a||e[4]!==u||e[5]!==m||e[6]!==c||e[7]!==d?(p=t&&s.jsx(s.Fragment,{children:c?s.jsx(Oo,{baseUrl:i,customToken:d.cafmToken??void 0,photos:[{id:t.toString(),alt:o??"",isDefault:!0,smSrc:m,lgSrc:u}],placeholder:a,ImgComponent:Fn}):s.jsx(Fn,{baseUrl:i,customToken:d.cafmToken??void 0,src:m,alt:o,placeholder:a,className:"rounded w-100"})}),e[0]=o,e[1]=i,e[2]=t,e[3]=a,e[4]=u,e[5]=m,e[6]=c,e[7]=d,e[8]=p):p=e[8];let f;return e[9]!==p?(f=s.jsx(s.Fragment,{children:p}),e[9]=p,e[10]=f):f=e[10],f},gd=n=>{const e=l.compilerRuntimeExports.c(21),{text:t,setText:o,onSearchButtonClick:a,className:i}=n;let r;e[0]!==o?(r=h=>{o(h)},e[0]=o,e[1]=r):r=e[1];const c=r,d=`${i}`;let u;e[2]!==o?(u=h=>o(h.target.value),e[2]=o,e[3]=u):u=e[3];let m;e[4]!==u||e[5]!==t?(m=s.jsx(l.Form.Control,{value:t,onChange:u}),e[4]=u,e[5]=t,e[6]=m):m=e[6];let p;e[7]!==c||e[8]!==t?(p=t&&s.jsx(l.Button,{onClick:()=>c(""),variant:"link",className:"border text-muted",children:s.jsx(l.MdClear,{})}),e[7]=c,e[8]=t,e[9]=p):p=e[9];let f;e[10]!==a||e[11]!==t?(f=()=>a&&a(t),e[10]=a,e[11]=t,e[12]=f):f=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(l.MdSearch,{}),e[13]=x):x=e[13];let g;e[14]!==f?(g=s.jsx(l.Button,{onClick:f,variant:"link",className:"border",children:x}),e[14]=f,e[15]=g):g=e[15];let y;return e[16]!==d||e[17]!==m||e[18]!==p||e[19]!==g?(y=s.jsxs(nn,{className:d,children:[m,p,g]}),e[16]=d,e[17]=m,e[18]=p,e[19]=g,e[20]=y):y=e[20],y},xd=n=>{const e=l.compilerRuntimeExports.c(7),{value:t,numberPrefix:o,numberSuffix:a,decimalScale:i,fixedDecimalScale:r,className:c}=n,d=i===void 0?2:i,u=r===void 0?!1:r;let m;return e[0]!==c||e[1]!==d||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==t?(m=s.jsx(Un,{value:t,displayType:"text",thousandSeparator:" ",decimalScale:d,fixedDecimalScale:u,defaultValue:"",prefix:o,suffix:a,className:c,decimalSeparator:","}),e[0]=c,e[1]=d,e[2]=u,e[3]=o,e[4]=a,e[5]=t,e[6]=m):m=e[6],m},yd=n=>{const e=l.compilerRuntimeExports.c(12),{data:t,keys:o,colors:a,tooltipLabel:i}=n;let r;e[0]!==t?(r=t.map(vd),e[0]=t,e[1]=r):r=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={top:20,right:50,bottom:30,left:150},e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={from:"color",modifiers:[["darker",.5]]},e[3]=d):d=e[3];let u,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={tickSize:5,tickPadding:5,tickRotation:0},m={tickSize:5,tickPadding:5,tickRotation:0},e[4]=u,e[5]=m):(u=e[4],m=e[5]);let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={from:"color",modifiers:[["darker",1.6]]},e[6]=p):p=e[6];let f;return e[7]!==a||e[8]!==o||e[9]!==r||e[10]!==i?(f=s.jsx(l.Xe,{data:r,indexBy:"name",keys:o,margin:c,layout:"horizontal",colors:a,padding:.2,borderRadius:2,borderWidth:2,borderColor:d,axisTop:null,axisRight:null,axisBottom:u,axisLeft:m,labelSkipWidth:12,labelSkipHeight:12,labelTextColor:p,tooltipLabel:i}),e[7]=a,e[8]=o,e[9]=r,e[10]=i,e[11]=f):f=e[11],f};function vd(n){return{name:n.name,...n.values}}const bd="_hrText_xxish_1",jd={hrText:bd},il=n=>{const e=l.compilerRuntimeExports.c(3),{text:t}=n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.classNames(jd.hrText),e[0]=o):o=e[0];let a;return e[1]!==t?(a=s.jsx("hr",{className:o,"data-content":t}),e[1]=t,e[2]=a):a=e[2],a},Sd=n=>{const e=l.compilerRuntimeExports.c(9),{reportsLastUsedGet:t,getReportRoute:o,getReportName:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{reports:r}=i,{data:c}=Fe.useGetApiData(t);let d;e[0]!==a||e[1]!==o||e[2]!==c?(d=c&&c.map(p=>p.versions.map(f=>s.jsxs(l.ListGroupItem,{as:we.Link,to:o(p,f.id),className:"p-1 px-2",action:!0,children:[s.jsx(l.Typography,{variant:"body2",className:"text-uppercase",children:a(p)}),s.jsxs(l.Typography,{variant:"caption",className:"d-flex justify-content-between align-items-center gap-3 text-dark",children:[f.name,s.jsx(l.Typography,{variant:"caption",className:"text-end opacity-50",children:l.formatDate(f.lastUsedDate)})]})]}))),e[0]=a,e[1]=o,e[2]=c,e[3]=d):d=e[3];let u;e[4]!==d?(u=s.jsx(l.ListGroup,{children:d}),e[4]=d,e[5]=u):u=e[5];let m;return e[6]!==r.index.lastUsedReports||e[7]!==u?(m=s.jsx(s.Fragment,{children:s.jsx(Ot,{defaultOpen:!0,title:r.index.lastUsedReports,children:u})}),e[6]=r.index.lastUsedReports,e[7]=u,e[8]=m):m=e[8],m},Cd="_cards-group_163sq_1",Nd="_group-title_163sq_1",wd="_group-content_163sq_8",Id="_report-card_163sq_12",kd="_card-title-link_163sq_22",Td="_disabled_163sq_28",kt={cardsGroup:Cd,groupTitle:Nd,groupContent:wd,reportCard:Id,cardTitleLink:kd,disabled:Td},Os=n=>{const e=l.compilerRuntimeExports.c(9),{reportVersion:t,getReportRoute:o,report:a}=n;let i;e[0]!==o||e[1]!==a||e[2]!==t.id?(i=o(a,t.id),e[0]=o,e[1]=a,e[2]=t.id,e[3]=i):i=e[3];let r;e[4]!==t.name?(r=s.jsx(l.Typography,{variant:"body2",className:"d-flex justify-content-between align-items-center gap-3",children:s.jsx("div",{className:"link",children:t.name})}),e[4]=t.name,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==r?(c=s.jsx(l.ListGroupItem,{as:we.Link,to:i,className:"p-1 px-2",action:!0,children:r}),e[6]=i,e[7]=r,e[8]=c):c=e[8],c},Qt=5,zs=n=>{const e=l.compilerRuntimeExports.c(25),{versionsList:t,getReportRoute:o,report:a}=n,{ProjectIconComponent:i}=w.useContext(l.LuminusComponentsContext),[r,c]=w.useState(!0);let d;e:{if(t.length<=Qt){d=t;break e}let h;e[0]!==t?(h=t.slice(0,Qt-1),e[0]=t,e[1]=h):h=e[1],d=h}const u=d;let m;e:{if(t.length<=Qt){let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[2]=b):b=e[2],m=b;break e}let h;e[3]!==t?(h=t.slice(Qt-1),e[3]=t,e[4]=h):h=e[4],m=h}const p=m;let f;if(e[5]!==u||e[6]!==o||e[7]!==a){let h;e[9]!==o||e[10]!==a?(h=b=>s.jsx(Os,{reportVersion:b,getReportRoute:o,report:a}),e[9]=o,e[10]=a,e[11]=h):h=e[11],f=u.map(h),e[5]=u,e[6]=o,e[7]=a,e[8]=f}else f=e[8];let x;e[12]!==r||e[13]!==o||e[14]!==p||e[15]!==a?(x=r?null:p.map(h=>s.jsx(Os,{reportVersion:h,getReportRoute:o,report:a})),e[12]=r,e[13]=o,e[14]=p,e[15]=a,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==r||e[19]!==p.length?(g=p.length>0&&s.jsx(l.ListGroupItem,{onClick:()=>c(_d),className:"py-0 d-flex justify-content-center",children:r?s.jsx(i,{icon:"chevron-down"}):s.jsx(i,{icon:"chevron-up"})}),e[17]=i,e[18]=r,e[19]=p.length,e[20]=g):g=e[20];let y;return e[21]!==f||e[22]!==x||e[23]!==g?(y=s.jsx(s.Fragment,{children:s.jsxs(l.ListGroup,{children:[f,x,g]})}),e[21]=f,e[22]=x,e[23]=g,e[24]=y):y=e[24],y};function _d(n){return!n}const Dd=n=>{const e=l.compilerRuntimeExports.c(35),{report:t,getReportRoute:o,getReportName:a,getReportDescription:i}=n;let r;e:{if(t.versionsCustom.length===0){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={xs:12},e[0]=v):v=e[0],r=v;break e}let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N={xs:12,sm:6,md:12,lg:12,xl:12,xxl:6},e[1]=N):N=e[1],r=N}const c=r;let d;e[2]!==o||e[3]!==t?(d=o(t),e[2]=o,e[3]=t,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=l.classNames(kt.cardTitleLink,"w-100 text-uppercase fw-normal"),e[5]=u):u=e[5];let m;e[6]!==a||e[7]!==t?(m=a(t),e[6]=a,e[7]=t,e[8]=m):m=e[8];let p;e[9]!==d||e[10]!==m?(p=s.jsx(we.Link,{to:d,className:u,children:m}),e[9]=d,e[10]=m,e[11]=p):p=e[11];const f=!t.userHasPermission;let x;e[12]!==f?(x=l.classNames(kt.reportCard,"shadow h-100 d-flex flex-column",{[kt.disabled]:f}),e[12]=f,e[13]=x):x=e[13];let g;e[14]!==i||e[15]!==t?(g=i(t),e[14]=i,e[15]=t,e[16]=g):g=e[16];let y;e[17]!==g?(y=s.jsx(l.Typography,{variant:"body2",className:"px-2",children:g}),e[17]=g,e[18]=y):y=e[18];let h;e[19]!==o||e[20]!==t||e[21]!==c?(h=t.versions&&t.versions.length>0?s.jsx(l.Col,{...c,children:s.jsx(zs,{versionsList:t.versions,getReportRoute:o,report:t})}):null,e[19]=o,e[20]=t,e[21]=c,e[22]=h):h=e[22];let b;e[23]!==o||e[24]!==t||e[25]!==c?(b=t.versionsCustom&&t.versionsCustom.length>0?s.jsx(l.Col,{...c,children:s.jsx(zs,{versionsList:t.versionsCustom,getReportRoute:o,report:t})}):null,e[23]=o,e[24]=t,e[25]=c,e[26]=b):b=e[26];let j;e[27]!==h||e[28]!==b?(j=s.jsxs(On,{className:"h-100 g-2",children:[h,b]}),e[27]=h,e[28]=b,e[29]=j):j=e[29];let S;return e[30]!==j||e[31]!==p||e[32]!==x||e[33]!==y?(S=s.jsx("div",{className:"col-12 col-lg-4",children:s.jsxs(gt,{title:p,headerClassName:"bg-darker",className:x,contentClassName:"d-flex flex-column gap-2 h-100",children:[y,j]})}),e[30]=j,e[31]=p,e[32]=x,e[33]=y,e[34]=S):S=e[34],S},Ed=n=>{const e=l.compilerRuntimeExports.c(26),{searchQuery:t,setSearchQuery:o,reportsTexts:a,filteredGroups:i,filteredReports:r,getGroupTitle:c,getReportRoute:d,getReportName:u,getReportDescription:m}=n,{isMobile:p}=l.useWindowSize();let f;e[0]!==o?(f=b=>{var j;return o(((j=b.target)==null?void 0:j.value)??"")},e[0]=o,e[1]=f):f=e[1];let x;e[2]!==a.index.search||e[3]!==t||e[4]!==f?(x=s.jsx("div",{children:s.jsx(l.Form.Control,{className:"mb-3",type:"search",value:t,onChange:f,placeholder:a.index.search})}),e[2]=a.index.search,e[3]=t,e[4]=f,e[5]=x):x=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==c||e[9]!==m||e[10]!==u||e[11]!==d||e[12]!==p){let b;e[14]!==r||e[15]!==c||e[16]!==m||e[17]!==u||e[18]!==d||e[19]!==p?(b=j=>s.jsxs("div",{className:l.classNames(kt.cardsGroup,{[kt.mobile]:p}),children:[s.jsx("div",{className:l.classNames("group-title z-1",kt.groupTitle),children:s.jsx(il,{text:c(j)})}),s.jsx("div",{className:l.classNames(kt.groupContent),children:s.jsx("div",{className:l.classNames("row gx-3 gy-3"),children:r[j].map(S=>s.jsx(Dd,{report:S,getReportRoute:d,getReportName:u,getReportDescription:m},S.id))})})]},j),e[14]=r,e[15]=c,e[16]=m,e[17]=u,e[18]=d,e[19]=p,e[20]=b):b=e[20],g=i.map(b),e[6]=i,e[7]=r,e[8]=c,e[9]=m,e[10]=u,e[11]=d,e[12]=p,e[13]=g}else g=e[13];let y;e[21]!==g?(y=s.jsx("div",{className:"overflow-x-hidden luminus-thin-scrollbar luminus-reports-index",children:g}),e[21]=g,e[22]=y):y=e[22];let h;return e[23]!==x||e[24]!==y?(h=s.jsxs(s.Fragment,{children:[x,y]}),e[23]=x,e[24]=y,e[25]=h):h=e[25],h},Ld=(n,e,t,o,a)=>{const i=l.compilerRuntimeExports.c(18),{data:r}=Fe.useGetApiData(n),{data:c}=Fe.useGetApiData(e);let d;e:{if(r===null||c===null){let g;i[0]===Symbol.for("react.memo_cache_sentinel")?(g={},i[0]=g):g=i[0],d=g;break e}let x;i[1]!==a||i[2]!==o||i[3]!==t||i[4]!==c||i[5]!==r?(x={},c.forEach(g=>{x[g.id]=r.filter(y=>y.groupId===g.id&&(l.stringSearchWithin(t(y),a)||l.stringSearchWithin(o(y),a)||y.versions.some(h=>l.stringSearchWithin(h.name,a))||y.versionsCustom.some(h=>l.stringSearchWithin(h.name,a)))).map(y=>({...y,groupId:!y.groupId||y.groupId===0||!c.some(h=>h.id===y.groupId)?999:y.groupId}))}),i[1]=a,i[2]=o,i[3]=t,i[4]=c,i[5]=r,i[6]=x):x=i[6],d=x}const u=d;let m;e:{if(u===null||c===null){let g;i[7]===Symbol.for("react.memo_cache_sentinel")?(g=[],i[7]=g):g=i[7],m=g;break e}let x;if(i[8]!==u||i[9]!==c){let g;i[11]!==u?(g=y=>{var h;return((h=u[y.id])==null?void 0:h.length)>0},i[11]=u,i[12]=g):g=i[12],x=c.filter(g).map(Rd),i[8]=u,i[9]=c,i[10]=x}else x=i[10];m=x}const p=m;let f;return i[13]!==p||i[14]!==u||i[15]!==c||i[16]!==r?(f={reports:r,groupsData:c,filteredReports:u,filteredGroups:p},i[13]=p,i[14]=u,i[15]=c,i[16]=r,i[17]=f):f=i[17],f};function Rd(n){return n.id}const Zt={reportsGet:"/reports",reportsLastUsedGet:"/reports/last-used",groupsGet:"/reports/groups"},Fd=n=>{const e=l.compilerRuntimeExports.c(16),{apiUrls:t,getReportName:o,getReportDescription:a,getGroupTitle:i,getReportRoute:r}=n,{reportsGet:c,reportsLastUsedGet:d,groupsGet:u}=t===void 0?Zt:t,m=c===void 0?Zt.reportsGet:c,p=d===void 0?Zt.reportsLastUsedGet:d,f=u===void 0?Zt.groupsGet:u,{texts:x}=w.useContext(l.LuminusComponentsContext),{reports:g}=x,[y,h]=w.useState(""),[b]=l.a(y,500),{filteredReports:j,filteredGroups:S}=Ld(m,f,o,a,b);let N;e[0]!==o||e[1]!==r||e[2]!==p?(N=s.jsx(Sd,{reportsLastUsedGet:p,getReportName:o,getReportRoute:r}),e[0]=o,e[1]=r,e[2]=p,e[3]=N):N=e[3];let v;e[4]!==S||e[5]!==j||e[6]!==i||e[7]!==a||e[8]!==o||e[9]!==r||e[10]!==g||e[11]!==y?(v=s.jsx(Ed,{searchQuery:y,setSearchQuery:h,reportsTexts:g,filteredGroups:S,filteredReports:j,getGroupTitle:i,getReportRoute:r,getReportName:o,getReportDescription:a}),e[4]=S,e[5]=j,e[6]=i,e[7]=a,e[8]=o,e[9]=r,e[10]=g,e[11]=y,e[12]=v):v=e[12];let C;return e[13]!==N||e[14]!==v?(C=s.jsx(l.PageContainer,{unavailableOnMobile:!0,variant:"fullScreen",sideContent:N,children:v}),e[13]=N,e[14]=v,e[15]=C):C=e[15],C},$d="_mini-detail-popover_obryf_1",Pd="_sm_obryf_5",Md="_lg_obryf_9",Hs={"mini-detail-popover":"_mini-detail-popover_obryf_1",miniDetailPopover:$d,sm:Pd,lg:Md},Ad=({children:n,useMiniDetail:e,miniDetailProps:t,placement:o="bottom",trigger:a=["hover"],delayMs:i=500})=>{const{user:r}=w.useContext(l.UserContext),[c,d]=w.useState(!1),{isLoading:u,detail:m,heading:p,tooltipWidth:f}=e({...t,enabled:c&&!(r!=null&&r.external)}),x=w.useRef(null);return s.jsx("div",{onMouseEnter:()=>{x.current=window.setTimeout(()=>d(!0),i)},onMouseLeave:()=>{x.current&&clearTimeout(x.current),d(!1)},children:c&&!(r!=null&&r.external)?s.jsx(l.HtmlTooltip,{heading:u?s.jsx(l.Typography,{variant:"body2",className:"placeholder-glow",children:s.jsx("span",{className:"placeholder bg-primary col-6"})}):p,content:s.jsx(s.Fragment,{children:u?s.jsxs(l.Typography,{variant:"body2",className:"placeholder-glow",children:[s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-5"}),s.jsx("span",{className:"placeholder col-4"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-3"}),s.jsx("span",{className:"placeholder col-2"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-4"}),s.jsx("span",{className:"placeholder col-6"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-4"}),s.jsx("span",{className:"placeholder col-3"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-5"}),s.jsx("span",{className:"placeholder col-4"})]})]}):m}),placement:o,trigger:a,popoverClassName:l.classNames(Hs.miniDetailPopover,Hs[f]),children:s.jsx("div",{children:n})}):s.jsx(s.Fragment,{children:n})})},Bd=n=>{const e=l.compilerRuntimeExports.c(7),{label:t,value:o}=n;let a;e[0]!==t?(a=s.jsx(l.Typography,{variant:"caption",children:t}),e[0]=t,e[1]=a):a=e[1];const i=o??"-";let r;e[2]!==i?(r=s.jsx(l.Typography,{variant:"body2",className:"text-end",children:i}),e[2]=i,e[3]=r):r=e[3];let c;return e[4]!==a||e[5]!==r?(c=s.jsxs("div",{className:"py-1 border-bottom d-flex gap-3 align-items-center justify-content-between",children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6],c},Od=n=>{const e=l.compilerRuntimeExports.c(21),{route:t,variant:o,children:a,className:i,disabled:r,routeParams:c}=n,d=o===void 0?"link":o,u=r===void 0?!1:r,{checkUserHasPermissions:m}=l.usePermissions(),p=u||!(t.permissions===void 0||m(t.permissions)),f=a??t.name;let x;e:switch(d){case"primaryButton":{x=l.PrimaryButton;break e}case"contextButton":{x=l.ContextButton;break e}case"iconButton":{x=l.IconButton;break e}default:x=w.Fragment}const g=x;if(d==="link"){let S;e[0]!==t.route||e[1]!==c?(S=ot.generateApiPath(t.route,c),e[0]=t.route,e[1]=c,e[2]=S):S=e[2];const N=p?"disabled":void 0;let v;e[3]!==i||e[4]!==N?(v=l.classNames("link font-size-14",N,i),e[3]=i,e[4]=N,e[5]=v):v=e[5];let C;return e[6]!==f||e[7]!==S||e[8]!==v?(C=s.jsx(we.Link,{to:S,className:v,children:f}),e[6]=f,e[7]=S,e[8]=v,e[9]=C):C=e[9],C}let y;e[10]!==t.route||e[11]!==c?(y=ot.generateApiPath(t.route,c),e[10]=t.route,e[11]=c,e[12]=y):y=e[12];const h=p?"disabled":void 0;let b;e[13]!==i||e[14]!==h?(b=l.classNames(h,i),e[13]=i,e[14]=h,e[15]=b):b=e[15];let j;return e[16]!==g||e[17]!==f||e[18]!==y||e[19]!==b?(j=s.jsx(g,{as:"link",href:y,className:b,children:f}),e[16]=g,e[17]=f,e[18]=y,e[19]=b,e[20]=j):j=e[20],j},zd=n=>{var x;const e=l.compilerRuntimeExports.c(17),{id:t,getTimelineApiPath:o}=n,{texts:a,ProjectIconComponent:i}=w.useContext(l.LuminusComponentsContext),{approval:r}=a;let c;e[0]!==o||e[1]!==t?(c=o(t),e[0]=o,e[1]=t,e[2]=c):c=e[2];const{data:d}=Fe.useGetApiData(c);let u;e[3]!==i||e[4]!==r?(u=(g,y)=>{const h=y===void 0?!1:y;switch(g){case l.ApprovalState.Zamitnuto:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateRejected,children:s.jsx("div",{children:s.jsx(i,{icon:"cancel-simple",className:h?"text-danger":"bg-danger rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Nevyrizeno:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateUnrealized,children:s.jsx("div",{children:s.jsx(i,{icon:"pending",className:h?"text-secondary":"bg-secondary rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Odebrano:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateRemoved,children:s.jsx("div",{children:s.jsx(i,{icon:"cancel-simple",className:h?"text-warning":"bg-warning rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Schvaleno:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateApproved,children:s.jsx("div",{children:s.jsx(i,{icon:"check-simple",className:h?"text-success":"bg-success rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});default:return null}},e[3]=i,e[4]=r,e[5]=u):u=e[5];const m=u;let p;e[6]!==r||e[7]!==d?(p=d!=null&&d.startDate?{date:l.parseISO(d.startDate),title:s.jsx(l.Typography,{variant:"body2",children:r.startDate}),dateFormat:"date"}:null,e[6]=r,e[7]=d,e[8]=p):p=e[8];let f;if(e[9]!==r||e[10]!==m||e[11]!==p||e[12]!==d){let g;e[14]!==r||e[15]!==d?(g=d!=null&&d.finishedDate?{date:l.parseISO(d.finishedDate),title:s.jsx(l.Typography,{variant:"body2",children:r.finishedDate}),dateFormat:"date"}:null,e[14]=r,e[15]=d,e[16]=g):g=e[16],f=s.jsx("div",{children:s.jsx(Uo,{dontSort:!0,steps:[p,...((x=d==null?void 0:d.approvalLevels)==null?void 0:x.map(y=>{var h;return{date:void 0,title:s.jsxs("div",{className:"d-flex align-items-center justify-content-between w-100",children:[s.jsx(l.Typography,{variant:"body",className:"fw-bold",children:r.getLevelText(y.index)}),s.jsx(l.Typography,{variant:"caption",className:"text-end",children:r.getThresholdText(y.threshold)})]}),icon:m(y.state),text:y.approvers&&((h=y.approvers)==null?void 0:h.length)>0?s.jsx("div",{className:"list-group",children:y.approvers.map(b=>s.jsx("div",{className:"list-group-item p-1",children:s.jsxs("div",{className:"d-flex justify-content-between align-items-center gap-2",children:[b.automaticApproval?s.jsx(l.SimpleTooltip,{placement:"left",text:r.autoApproved,children:s.jsx("div",{children:s.jsx("div",{className:"text-success",style:{fontSize:"14px"},children:"A"})})}):m(b.state,!0),s.jsxs("div",{className:"text-end",children:[s.jsx(l.Typography,{variant:"body2",children:b.delegatedApprover?b.delegatedApprover.name:b.approver.name}),b.responseDate?s.jsx(l.Typography,{variant:"caption",children:l.formatDate(b.responseDate)}):null]})]})},b.id))}):null}}))??[],g].filter(Hd).map(Vd)})}),e[9]=r,e[10]=m,e[11]=p,e[12]=d,e[13]=f}else f=e[13];return f};function Hd(n){return n!==null}function Vd(n){return n}const Ud="_state-switch_uc6su_1",Wd="_switch-button_uc6su_7",Gd="_bg-layer_uc6su_17",Kd="_text-layer_uc6su_26",qd="_left_uc6su_38",Yd="_right_uc6su_41",Qd="_active_uc6su_44",mt={stateSwitch:Ud,switchButton:Wd,bgLayer:Gd,textLayer:Kd,left:qd,right:Yd,active:Qd},Zd=n=>{const e=l.compilerRuntimeExports.c(21),{isLeftStateActive:t,toggleState:o,leftStateLabel:a,rightStateLabel:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=l.classNames("gap-1",mt.stateSwitch),e[0]=r):r=e[0];let c;e[1]!==t?(c=l.classNames(mt.switchButton,mt.left,{[mt.active]:t}),e[1]=t,e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:mt.bgLayer}),e[3]=d):d=e[3];let u;e[4]!==a?(u=s.jsx("div",{className:mt.textLayer,children:a}),e[4]=a,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==u?(m=s.jsxs(l.Typography,{variant:"body2",className:c,children:[d,u]}),e[6]=c,e[7]=u,e[8]=m):m=e[8];const p=!t;let f;e[9]!==p?(f=l.classNames(mt.switchButton,mt.right,{[mt.active]:p}),e[9]=p,e[10]=f):f=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:mt.bgLayer}),e[11]=x):x=e[11];let g;e[12]!==i?(g=s.jsx("div",{className:mt.textLayer,children:i}),e[12]=i,e[13]=g):g=e[13];let y;e[14]!==f||e[15]!==g?(y=s.jsxs(l.Typography,{variant:"body2",className:f,children:[x,g]}),e[14]=f,e[15]=g,e[16]=y):y=e[16];let h;return e[17]!==y||e[18]!==m||e[19]!==o?(h=s.jsxs("div",{role:"button",className:r,onClick:o,children:[m,y]}),e[17]=y,e[18]=m,e[19]=o,e[20]=h):h=e[20],h},Xd=n=>{const e=l.compilerRuntimeExports.c(30),{showArchived:t,BnfTableComponent:o,tableIdentifier:a,detailRoute:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{substitutions:c}=r,{data:d}=Fe.useGetApiData(`/permissions/substitutions?archived=${t}`);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={enable:!0,column:"archived"},e[0]=u):u=e[0];const m=u;let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=l.u(),e[1]=p):p=e[1];const f=p;let x;e[2]!==c.index.employeeName?(x=f.accessor("employeeName",{header:c.index.employeeName,type:"string",mobileMeta:{isIdentifier:!0}}),e[2]=c.index.employeeName,e[3]=x):x=e[3];let g;e[4]!==c.index.substitute?(g=f.accessor("substituteName",{header:c.index.substitute,type:"string",mobileMeta:{isIdentifier:!0}}),e[4]=c.index.substitute,e[5]=g):g=e[5];let y;e[6]!==c.index.from||e[7]!==c.index.generalInfo?(y=f.accessor("from",{header:c.index.from,type:"date",mobileMeta:{displayGroup:c.index.generalInfo}}),e[6]=c.index.from,e[7]=c.index.generalInfo,e[8]=y):y=e[8];let h;e[9]!==c.index.generalInfo||e[10]!==c.index.to?(h=f.accessor("to",{header:c.index.to,type:"date",mobileMeta:{displayGroup:c.index.generalInfo}}),e[9]=c.index.generalInfo,e[10]=c.index.to,e[11]=h):h=e[11];let b,j;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=f.accessor("archived",{header:"Archived",type:"boolean",meta:{hidden:!0}}),j=f.accessor("id",{header:"",type:"number",meta:{hidden:!0},size:50}),e[12]=b,e[13]=j):(b=e[12],j=e[13]);let S;e[14]!==x||e[15]!==g||e[16]!==y||e[17]!==h?(S=[x,g,y,h,b,j],e[14]=x,e[15]=g,e[16]=y,e[17]=h,e[18]=S):S=e[18];const N=S;let v;e[19]!==i?(v=L=>we.generatePath(i,{id:L.id.toString()}),e[19]=i,e[20]=v):v=e[20];const C=v;let k;e[21]!==d?(k=d??[],e[21]=d,e[22]=k):k=e[22];let I;e[23]===Symbol.for("react.memo_cache_sentinel")?(I={mode:"enabled"},e[23]=I):I=e[23];let T;return e[24]!==o||e[25]!==N||e[26]!==C||e[27]!==k||e[28]!==a?(T=s.jsx(o,{data:k,columns:N,tableId:a,pagination:I,archiveHighlighting:m,rowNavigation:C}),e[24]=o,e[25]=N,e[26]=C,e[27]=k,e[28]=a,e[29]=T):T=e[29],T},Jd=n=>{const e=l.compilerRuntimeExports.c(41),{InputContainer:t,formField:o,label:a,resetsFields:i,type:r,required:c,hidden:d,disabled:u,withoutLabel:m,hint:p,onChange:f,className:x}=n,g=t===void 0?l.RowLabelInput:t,{control:y,setValue:h}=Se.useFormContext(),{isSubmitted:b}=Se.useFormState();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={falseIfNotInit:!0},e[0]=j):j=e[0];const S=l.useFormDisabledContext(j),[N,v]=w.useState(!1);let C;e[1]!==y||e[2]!==o?(C={name:o,control:y},e[1]=y,e[2]=o,e[3]=C):C=e[3];const{field:k,fieldState:I}=Se.useController(C),{error:T}=I,{onChange:L,onBlur:E,ref:D,value:_,name:P}=k,$=u||S;let R,F;e[4]!==b?(R=()=>{b&&v(!0)},F=[b],e[4]=b,e[5]=R,e[6]=F):(R=e[5],F=e[6]),w.useEffect(R,F);const M=T!==void 0;let O;e[7]!==L||e[8]!==f||e[9]!==i||e[10]!==h||e[11]!==N?(O=le=>{const q=le.target.checked??!1;L(q),i&&i.forEach(oe=>h(oe,null,{shouldDirty:!0,shouldValidate:N})),f&&f(q)},e[7]=L,e[8]=f,e[9]=i,e[10]=h,e[11]=N,e[12]=O):O=e[12];const B=O;let H;e[13]!==E?(H=()=>{E()},e[13]=E,e[14]=H):H=e[14];const z=H,W=a??"",A=`check-${o}`,U=r??"checkbox",K=`${a}${c?" *":""}`,V=_??!1;let G;e[15]!==$||e[16]!==P||e[17]!==D||e[18]!==z||e[19]!==B||e[20]!==d||e[21]!==M||e[22]!==A||e[23]!==U||e[24]!==K||e[25]!==V?(G=s.jsx(l.Form.Check,{id:A,type:U,label:K,name:P,checked:V,onChange:B,onBlur:z,ref:D,isInvalid:M,hidden:d,disabled:$,className:"w-100"}),e[15]=$,e[16]=P,e[17]=D,e[18]=z,e[19]=B,e[20]=d,e[21]=M,e[22]=A,e[23]=U,e[24]=K,e[25]=V,e[26]=G):G=e[26];let Z;e[27]!==T?(Z=T&&s.jsx(l.InvalidFeedback,{message:T.message}),e[27]=T,e[28]=Z):Z=e[28];let X;return e[29]!==g||e[30]!==$||e[31]!==x||e[32]!==d||e[33]!==p||e[34]!==M||e[35]!==c||e[36]!==G||e[37]!==Z||e[38]!==W||e[39]!==m?(X=s.jsxs(g,{isForCheckInput:!0,hidden:d,label:W,required:c,disabled:$,isInvalid:M,withoutLabel:m,hint:p,className:x,children:[G,Z]}),e[29]=g,e[30]=$,e[31]=x,e[32]=d,e[33]=p,e[34]=M,e[35]=c,e[36]=G,e[37]=Z,e[38]=W,e[39]=m,e[40]=X):X=e[40],X},eu=n=>{const e=l.compilerRuntimeExports.c(45),{InputContainer:t,label:o,formField:a,options:i,resetsFields:r,required:c,disabled:d,hidden:u,onChange:m,className:p}=n,f=t===void 0?l.RowLabelInput:t,{control:x,setValue:g}=Se.useFormContext(),{isSubmitted:y}=Se.useFormState();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={falseIfNotInit:!0},e[0]=h):h=e[0];const b=l.useFormDisabledContext(h);let j;e[1]!==x||e[2]!==a?(j={name:a,control:x},e[1]=x,e[2]=a,e[3]=j):j=e[3];const{field:S,fieldState:N}=Se.useController(j),{value:v,onChange:C,onBlur:k,ref:I,name:T}=S,{error:L}=N,[E,D]=w.useState(!1),_=i,P=d||b;let $,R;e[4]!==y?($=()=>{y&&D(!0)},R=[y],e[4]=y,e[5]=$,e[6]=R):($=e[5],R=e[6]),w.useEffect($,R);const F=L!==void 0;let M;e[7]!==C||e[8]!==m||e[9]!==r||e[10]!==g||e[11]!==E?(M=U=>{C(U),r&&r.forEach(K=>g(K,null,{shouldDirty:!0,shouldValidate:E})),m&&m(U===null?null:U.toString())},e[7]=C,e[8]=m,e[9]=r,e[10]=g,e[11]=E,e[12]=M):M=e[12];const O=M,B=!o,H=o??"";let z;if(e[13]!==P||e[14]!==T||e[15]!==k||e[16]!==I||e[17]!==v||e[18]!==O||e[19]!==u||e[20]!==F||e[21]!==_){let U;e[23]!==P||e[24]!==T||e[25]!==k||e[26]!==I||e[27]!==v||e[28]!==O||e[29]!==u||e[30]!==F?(U=(K,V)=>s.jsx(l.Form.Check,{id:`radio-${K.id}`,label:K.name,type:"radio",value:K.id??"",name:T,checked:v===K.id,onChange:()=>O(K.id??null),onBlur:k,ref:V===0?I:void 0,isInvalid:F,hidden:u,disabled:P,className:"w-100"},K.id),e[23]=P,e[24]=T,e[25]=k,e[26]=I,e[27]=v,e[28]=O,e[29]=u,e[30]=F,e[31]=U):U=e[31],z=_.map(U),e[13]=P,e[14]=T,e[15]=k,e[16]=I,e[17]=v,e[18]=O,e[19]=u,e[20]=F,e[21]=_,e[22]=z}else z=e[22];let W;e[32]!==L?(W=L&&s.jsx(l.InvalidFeedback,{message:L.message}),e[32]=L,e[33]=W):W=e[33];let A;return e[34]!==f||e[35]!==P||e[36]!==p||e[37]!==u||e[38]!==F||e[39]!==c||e[40]!==H||e[41]!==z||e[42]!==W||e[43]!==B?(A=s.jsxs(f,{isForRadioInput:!0,hidden:u,withoutLabel:B,label:H,required:c,disabled:P,isInvalid:F,className:p,children:[z,W]}),e[34]=f,e[35]=P,e[36]=p,e[37]=u,e[38]=F,e[39]=c,e[40]=H,e[41]=z,e[42]=W,e[43]=B,e[44]=A):A=e[44],A},tu=n=>{const e=l.compilerRuntimeExports.c(25);let t,o,a,i,r,c,d,u,m;e[0]!==n?({label:c,InputContainer:u,className:t,withoutLabel:m,hidden:r,disabled:a,contactType:o,formField:i,...d}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=i,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m):(t=e[1],o=e[2],a=e[3],i=e[4],r=e[5],c=e[6],d=e[7],u=e[8],m=e[9]);const p=u===void 0?l.RowLabelInput:u;let f;e[10]!==i?(f={name:i},e[10]=i,e[11]=f):f=e[11];const x=Se.useWatch(f);let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g={falseIfNotInit:!0},e[12]=g):g=e[12];const y=l.useFormDisabledContext(g),h=a||y;if(r)return null;let b;e[13]!==p||e[14]!==h||e[15]!==i||e[16]!==d?(b=s.jsx(l.HookFormTextInput,{type:"text",formField:i,InputContainer:p,size:"sm",withoutLabel:!0,className:"flex-grow-1",disabled:h,...d}),e[13]=p,e[14]=h,e[15]=i,e[16]=d,e[17]=b):b=e[17];let j;return e[18]!==t||e[19]!==o||e[20]!==c||e[21]!==b||e[22]!==x||e[23]!==m?(j=s.jsx(Ko,{contactType:o,value:x,withoutLabel:m,label:c,className:t,children:b}),e[18]=t,e[19]=o,e[20]=c,e[21]=b,e[22]=x,e[23]=m,e[24]=j):j=e[24],j},nu=({InputContainer:n=l.RowLabelInput,formField:e,label:t,size:o,defaultSelection:a,resetsFields:i,isNumber:r,required:c,hidden:d,disabled:u,items:m,onSearchQueryChange:p,selectedItemNavigateTo:f,texts:x,dropdownItemsNameWidth:g,isLoading:y,withoutLabel:h,additionalColumns:b,CustomOnChangeComponent:j,icon:S,displayIdAsName:N,onSelect:v,className:C,archiveColumn:k,hint:I,addNewOptionPath:T,refreshOptions:L,MiniDetailComponent:E,miniDetailPlacement:D,suggestedItems:_,suggestedItemsTitle:P})=>{const{control:$,setValue:R}=Se.useFormContext(),{isSubmitted:F}=Se.useFormState(),M=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:O,ref:B,name:H},fieldState:{error:z}}=Se.useController({name:e,control:$}),[W,A]=w.useState(!1),[U,K]=w.useState(!1),V=O??null,G=Se.useWatch({name:`${e}-DropdownName`}),Z=V===(a==null?void 0:a.id)?a==null?void 0:a.name:G,X=w.useMemo(()=>V==null?null:{id:V??null,name:Z??""},[V,Z]),le=w.useCallback(Q=>{if((Q==null?void 0:Q.id)===V)return;if(v&&v(Q),i&&i.forEach(ee=>R(ee,null,{shouldDirty:!0,shouldValidate:U})),Q===null){R(e,null,{shouldDirty:!0,shouldValidate:U}),R(`${e}-DropdownName`,null);return}let ne=null;r?ne=(Q==null?void 0:Q.id)!==null&&(Q==null?void 0:Q.id)!==""?parseInt(Q.id.toString(),10):null:ne=Q.id===null||Q.id===void 0||Q.id===""?null:Q.id,R(e,ne,{shouldDirty:!0,shouldValidate:U}),R(`${e}-DropdownName`,Q.name??"")},[R,e,U,r,i,V,v]),q=w.useCallback(Q=>{A(!1),le(Q)},[le]),oe=w.useCallback(()=>{A(!1)},[]),ce=w.useRef(null),fe=z!==void 0,pe=f!==void 0,J=pe&&X!==null,Y=w.useMemo(()=>u||M,[u,M]);return w.useEffect(()=>{F&&K(!0)},[F]),s.jsx(s.Fragment,{children:s.jsxs(n,{label:t??"",required:c,disabled:Y,hidden:d,withoutLabel:h,isInvalid:fe,inputContainerClassName:l.classNames({"luminus-dropdown-select-open":W}),hint:I,className:C,children:[s.jsxs(l.InputAnchorContainer,{currentSelection:X,selectedItemNavigateTo:f,children:[N&&(X==null?void 0:X.name)&&s.jsx(l.Typography,{variant:"caption",className:"d-flex justify-content-end mt-2 luminus-dropdown-selection-name",children:X.name}),s.jsx("input",{type:"hidden",name:H,value:O??"",ref:B}),s.jsx(l.MiniDetailWrapper,{value:V,MiniDetailComponent:E,miniDetailPlacement:D,children:s.jsx(l.Form.Select,{size:o,onMouseDown:Q=>{Q.currentTarget.focus(),Q.preventDefault()},onClick:()=>{!pe&&!Y&&A(!0)},ref:ce,value:V??"",onChange:()=>{},isInvalid:fe,hidden:d,className:l.classNames("w-100",{"luminus-dropdown-picker-disabled":Y,"luminus-dropdown-picker-link":J}),children:s.jsx("option",{value:V,children:N?V:(Z==null?void 0:Z.length)>0?Z:V})})}),j||!Y&&pe?s.jsxs("div",{className:"custom-picker-button",children:[!j&&!Y&&pe&&s.jsx(l.IconButton,{size:"sm",color:"secondary",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),A(!0)},children:S??s.jsx(l.MdOutlineEdit,{})}),j??null]}):null]}),z&&s.jsx(l.InvalidFeedback,{message:z.message}),ce.current&&s.jsx(l.SimplePicker,{show:W,onCancel:oe,items:m,currentSelection:X,onSelectionChange:q,onSearchQueryChange:p,texts:x,itemsNameWidth:g,additionalColumns:b,displayIdAsName:N,isLoading:y,disabled:Y,inputRef:ce,archiveColumn:k,addNewOptionPath:T,refreshOptions:L,suggestedItems:_,suggestedItemsTitle:P})]})})},su=n=>{const e=l.compilerRuntimeExports.c(51),{InputContainer:t,label:o,formField:a,hidden:i,required:r,placeholder:c,disabled:d,showClearIcon:u,resetsFields:m,multiple:p,accept:f,withoutLabel:x,hint:g,className:y}=n,h=t===void 0?l.RowLabelInput:t,{control:b,setValue:j}=Se.useFormContext(),{isSubmitted:S}=Se.useFormState();let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N={falseIfNotInit:!0},e[0]=N):N=e[0];const v=l.useFormDisabledContext(N);let C;e[1]!==b||e[2]!==a?(C={name:a,control:b},e[1]=b,e[2]=a,e[3]=C):C=e[3];const{field:k,fieldState:I}=Se.useController(C),{onChange:T,ref:L,name:E}=k,{error:D}=I,[_,P]=w.useState(!1),$=w.useRef(null);let R;e[4]!==a||e[5]!==j||e[6]!==_?(R=()=>{j(a,null,{shouldDirty:!0,shouldValidate:_}),$.current&&($.current.value="")},e[4]=a,e[5]=j,e[6]=_,e[7]=R):R=e[7];const F=R;let M;e[8]!==T||e[9]!==m||e[10]!==j||e[11]!==_?(M=ce=>{const fe=ce.target.files;T(fe??null),m&&m.forEach(pe=>j(pe,null,{shouldDirty:!0,shouldValidate:_}))},e[8]=T,e[9]=m,e[10]=j,e[11]=_,e[12]=M):M=e[12];const O=M;let B,H;e[13]!==S?(B=()=>{S&&P(!0)},H=[S],e[13]=S,e[14]=B,e[15]=H):(B=e[14],H=e[15]),w.useEffect(B,H);const z=d||v,W=D!==void 0;let A;e[16]!==a?(A={name:a},e[16]=a,e[17]=A):A=e[17];const U=Se.useWatch(A),K=o??"";let V;e[18]!==f?(V=f.join(", "),e[18]=f,e[19]=V):V=e[19];const G=c??o;let Z;e[20]!==L?(Z=ce=>{L(ce),$.current=ce},e[20]=L,e[21]=Z):Z=e[21];let X;e[22]!==z||e[23]!==E||e[24]!==O||e[25]!==i||e[26]!==W||e[27]!==p||e[28]!==V||e[29]!==G||e[30]!==Z?(X=s.jsx(l.FormControl,{type:"file",multiple:p,accept:V,placeholder:G,isInvalid:W,hidden:i,disabled:z,className:"w-100",name:E,onChange:O,ref:Z}),e[22]=z,e[23]=E,e[24]=O,e[25]=i,e[26]=W,e[27]=p,e[28]=V,e[29]=G,e[30]=Z,e[31]=X):X=e[31];let le;e[32]!==F||e[33]!==U||e[34]!==u?(le=u&&U!=null&&s.jsx("div",{className:"luminus-input-remove-icon",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:F,children:s.jsx(l.MdClear,{})})}),e[32]=F,e[33]=U,e[34]=u,e[35]=le):le=e[35];let q;e[36]!==D?(q=D&&s.jsx(l.InvalidFeedback,{message:D.message}),e[36]=D,e[37]=q):q=e[37];let oe;return e[38]!==h||e[39]!==z||e[40]!==y||e[41]!==i||e[42]!==g||e[43]!==W||e[44]!==r||e[45]!==K||e[46]!==X||e[47]!==le||e[48]!==q||e[49]!==x?(oe=s.jsxs(h,{label:K,required:r,disabled:z,hidden:i,withoutLabel:x,isInvalid:W,hint:g,className:y,children:[X,le,q]}),e[38]=h,e[39]=z,e[40]=y,e[41]=i,e[42]=g,e[43]=W,e[44]=r,e[45]=K,e[46]=X,e[47]=le,e[48]=q,e[49]=x,e[50]=oe):oe=e[50],oe},rl=n=>{const e=l.compilerRuntimeExports.c(7),{children:t,onStorno:o,noSpacer:a}=n,i=pt.useIsFormDirty();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={falseIfNotInit:!0},e[0]=r):r=e[0];const c=l.useFormDisabledContext(r);let d;return e[1]!==t||e[2]!==c||e[3]!==i||e[4]!==a||e[5]!==o?(d=i?s.jsx(bo,{onStorno:o,noSpacer:a,disabled:c,children:t}):null,e[1]=t,e[2]=c,e[3]=i,e[4]=a,e[5]=o,e[6]=d):d=e[6],d},an=({InputContainer:n=l.RowLabelInput,options:e,formField:t,label:o,size:a,resetsFields:i,isNumber:r,required:c,hidden:d,disabled:u,withoutLabel:m,noSortOptions:p,suffixIdToName:f,onSelect:x,className:g,appendCurrentSelectionWithName:y,hint:h,addNewOptionPath:b,refreshOptions:j,MiniDetailComponent:S,miniDetailPlacement:N,selectedItemNavigateTo:v,noRemoveButton:C})=>{const{texts:{customSelect:k}}=w.useContext(l.LuminusComponentsContext),{control:I,setValue:T}=Se.useFormContext(),{isSubmitted:L}=Se.useFormState(),E=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:D,ref:_,name:P},fieldState:{error:$}}=Se.useController({name:t,control:I}),[R,F]=w.useState(!1),[M,O]=w.useState(!1),[B,H]=w.useState(""),z=D,W=w.useMemo(()=>e.find(q=>q.id===z)??null,[e,z]),A=w.useCallback(q=>{if((q==null?void 0:q.id)===z)return;if(x&&x(q),i&&i.forEach(ce=>T(ce,null,{shouldDirty:!0,shouldValidate:M})),q===null){T(t,null,{shouldDirty:!0,shouldValidate:M});return}let oe=null;r?oe=(q==null?void 0:q.id)!==null&&(q==null?void 0:q.id)!==""?parseInt(q.id.toString(),10):null:oe=q.id===null||q.id===void 0||q.id===""?null:q.id,T(t,oe,{shouldDirty:!0,shouldValidate:M})},[T,t,r,i,z,M,x]),U=w.useCallback(q=>{F(!1),A(q)},[A]),K=w.useCallback(q=>{H(q)},[]),V=w.useMemo(()=>u||E,[u,E]);w.useEffect(()=>{L&&O(!0)},[L]);const G=w.useCallback(q=>{var oe;return q===null?"":!q.name||q.name.length===0?((oe=q.id)==null?void 0:oe.toString())??"":f?`${q.name} (${q.id})`:q.name},[f]),Z=w.useMemo(()=>{const q=e?[...e]:[];return y!==void 0&&z&&(q.some(oe=>oe.id===z)||q.push({id:z,name:y})),q.map(oe=>({id:oe.id,name:G(oe)})).filter(oe=>l.stringSearchWithin(oe.name,B)).sort((oe,ce)=>p?0:(oe.name??"").localeCompare(ce.name??""))},[e,p,B,G,y,z]),X=w.useRef(null),le=$!==void 0;return s.jsx(s.Fragment,{children:s.jsxs(n,{label:o??"",required:c,disabled:V,hidden:d,withoutLabel:m,isInvalid:le,inputContainerClassName:l.classNames({"luminus-dropdown-select-open":R}),hint:h,className:g,children:[s.jsxs(l.InputAnchorContainer,{currentSelection:W,selectedItemNavigateTo:v,children:[s.jsx("input",{type:"hidden",name:P,value:D??"",ref:_}),s.jsx(l.MiniDetailWrapper,{value:z,MiniDetailComponent:S,miniDetailPlacement:N,children:s.jsx(l.Form.Select,{size:a,onMouseDown:q=>{q.currentTarget.focus(),q.preventDefault()},onClick:()=>{F(!0)},ref:X,value:z??"",onChange:()=>{},isInvalid:le,hidden:d,disabled:V,className:"w-100",children:s.jsx("option",{value:(W==null?void 0:W.id)??"",children:G(W)})})})]}),$&&s.jsx(l.InvalidFeedback,{message:$.message}),X.current&&s.jsx(l.SimplePicker,{show:R,onCancel:()=>F(!1),items:Z,currentSelection:W??null,onSelectionChange:U,onSearchQueryChange:K,texts:k,disabled:V,inputRef:X,autoHideSearch:!0,allItemsLength:e.length,addNewOptionPath:b,refreshOptions:j,noRemoveButton:C})]})})},ou=n=>{const e=l.compilerRuntimeExports.c(79),{InputContainer:t,formField:o,label:a,placeholder:i,size:r,resetsFields:c,showClearIcon:d,clearValue:u,required:m,hidden:p,disabled:f,withoutLabel:x,step:g,stepperStep:y,className:h,min:b,max:j,onChange:S,hint:N}=n,v=t===void 0?l.RowLabelInput:t,C=y===void 0?1:y,{control:k,setValue:I}=Se.useFormContext(),{isSubmitted:T}=Se.useFormState();let L;e[0]===Symbol.for("react.memo_cache_sentinel")?(L={falseIfNotInit:!0},e[0]=L):L=e[0];const E=l.useFormDisabledContext(L);let D;e[1]!==k||e[2]!==o?(D={name:o,control:k},e[1]=k,e[2]=o,e[3]=D):D=e[3];const{field:_,fieldState:P}=Se.useController(D),{value:$,onChange:R,onBlur:F,ref:M,name:O}=_,{error:B}=P,[H,z]=w.useState(!1);let W;e[4]!==j||e[5]!==b||e[6]!==I?(W=(me,be,ae)=>{I(me,ot.limitNumber(be,b,j),ae)},e[4]=j,e[5]=b,e[6]=I,e[7]=W):W=e[7];const A=W;let U;e[8]!==u||e[9]!==o||e[10]!==A||e[11]!==H?(U=()=>{const me=u??null;A(o,me!==null?Number(me):null,{shouldDirty:!0,shouldValidate:H})},e[8]=u,e[9]=o,e[10]=A,e[11]=H,e[12]=U):U=e[12];const K=U,V=f||E;let G,Z;e[13]!==T?(Z=()=>{T&&z(!0)},G=[T],e[13]=T,e[14]=G,e[15]=Z):(G=e[14],Z=e[15]),w.useEffect(Z,G);const X=B!==void 0;let le;e[16]!==R||e[17]!==j||e[18]!==b||e[19]!==S||e[20]!==c||e[21]!==I||e[22]!==H?(le=me=>{const be=me.target.value,ae=be===""?null:ot.limitNumber(Number(be),b,j);R(ae),c&&c.forEach(ke=>I(ke,null,{shouldDirty:!0,shouldValidate:H})),S&&S(ae===null?null:Number(ae))},e[16]=R,e[17]=j,e[18]=b,e[19]=S,e[20]=c,e[21]=I,e[22]=H,e[23]=le):le=e[23];const q=le,oe=a??"",ce=i??a,fe=$??"";let pe;e[24]!==V||e[25]!==O||e[26]!==F||e[27]!==M||e[28]!==q||e[29]!==p||e[30]!==X||e[31]!==j||e[32]!==b||e[33]!==r||e[34]!==g||e[35]!==ce||e[36]!==fe?(pe=s.jsx(l.Form.Control,{type:"number",placeholder:ce,size:r,name:O,value:fe,onChange:q,onBlur:F,ref:M,isInvalid:X,hidden:p,disabled:V,className:"w-100 luminus-numeric-stepper",step:g,min:b,max:j}),e[24]=V,e[25]=O,e[26]=F,e[27]=M,e[28]=q,e[29]=p,e[30]=X,e[31]=j,e[32]=b,e[33]=r,e[34]=g,e[35]=ce,e[36]=fe,e[37]=pe):pe=e[37];let J;e[38]!==f||e[39]!==$||e[40]!==o||e[41]!==A||e[42]!==H||e[43]!==C?(J=!f&&s.jsx(l.IconButton,{size:"sm",onClick:me=>{me.preventDefault(),me.stopPropagation();const be=($?Number($):0)-C;A(o,be,{shouldDirty:!0,shouldValidate:H})},children:s.jsx(l.FaMinus,{})}),e[38]=f,e[39]=$,e[40]=o,e[41]=A,e[42]=H,e[43]=C,e[44]=J):J=e[44];let Y;e[45]!==J?(Y=s.jsx("div",{className:"stepper-icon left",children:J}),e[45]=J,e[46]=Y):Y=e[46];let Q;e[47]!==f||e[48]!==$||e[49]!==o||e[50]!==A||e[51]!==H||e[52]!==C?(Q=!f&&s.jsx(l.IconButton,{size:"sm",onClick:me=>{me.preventDefault(),me.stopPropagation();const be=($?Number($):0)+C;A(o,be,{shouldDirty:!0,shouldValidate:H})},children:s.jsx(l.FaPlus,{})}),e[47]=f,e[48]=$,e[49]=o,e[50]=A,e[51]=H,e[52]=C,e[53]=Q):Q=e[53];let ne;e[54]!==Q?(ne=s.jsx("div",{className:"stepper-icon right",children:Q}),e[54]=Q,e[55]=ne):ne=e[55];let ee;e[56]!==pe||e[57]!==Y||e[58]!==ne?(ee=s.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[pe,Y,ne]}),e[56]=pe,e[57]=Y,e[58]=ne,e[59]=ee):ee=e[59];let te;e[60]!==K||e[61]!==$||e[62]!==d?(te=d&&$!=null&&s.jsx("div",{className:"luminus-input-remove-icon",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:K,children:s.jsx(l.MdClear,{})})}),e[60]=K,e[61]=$,e[62]=d,e[63]=te):te=e[63];let se;e[64]!==B?(se=B&&s.jsx(l.InvalidFeedback,{message:B.message}),e[64]=B,e[65]=se):se=e[65];let ue;return e[66]!==v||e[67]!==V||e[68]!==h||e[69]!==p||e[70]!==N||e[71]!==X||e[72]!==m||e[73]!==oe||e[74]!==ee||e[75]!==te||e[76]!==se||e[77]!==x?(ue=s.jsxs(v,{label:oe,required:m,disabled:V,hidden:p,withoutLabel:x,isInvalid:X,hint:N,className:h,children:[ee,te,se]}),e[66]=v,e[67]=V,e[68]=h,e[69]=p,e[70]=N,e[71]=X,e[72]=m,e[73]=oe,e[74]=ee,e[75]=te,e[76]=se,e[77]=x,e[78]=ue):ue=e[78],ue},cl=({InputContainer:n=l.RowLabelInput,formField:e,label:t,placeholder:o,resetsFields:a,showClearIcon:i,clearValue:r,required:c,hidden:d,disabled:u,withoutLabel:m,step:p,size:f,CustomOnChangeComponent:x,noSelectOnFocus:g,className:y,decimalScale:h=2,fixedDecimalScale:b=!1,numberPrefix:j,numberSuffix:S,min:N,max:v,onChange:C,hint:k})=>{const{control:I,setValue:T}=Se.useFormContext(),{isSubmitted:L}=Se.useFormState(),E=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:D,onChange:_,onBlur:P,ref:$,name:R},fieldState:{error:F}}=Se.useController({name:e,control:I}),[M,O]=w.useState(!1),B=w.useCallback(()=>{const A=r??null;T(e,A!==null?Number(A):null,{shouldDirty:!0,shouldValidate:M})},[r,T,e,M]),H=w.useMemo(()=>u||E,[u,E]);w.useEffect(()=>{L&&O(!0)},[L]);const z=D;w.useEffect(()=>{v!==void 0&&z>v&&T(e,v),N!==void 0&&z<N&&T(e,N)},[e,z,v,N,T]);const W=F!==void 0;return s.jsxs(n,{label:t??"",required:c,disabled:H,hidden:d,withoutLabel:m,isInvalid:W,hint:k,className:y,children:[s.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[s.jsx(Un,{displayType:"input",thousandSeparator:" ",decimalSeparator:",",decimalScale:h,fixedDecimalScale:b,prefix:j,suffix:S,defaultValue:"",name:R,value:D??"",placeholder:o??t,onFocus:A=>{!g&&A.target.select()},onChange:A=>{var V,G;const U=parseFloat(((G=(V=A.target)==null?void 0:V.value)==null?void 0:G.replaceAll(" ","").replaceAll(",","."))??"0");a&&a.forEach(Z=>T(Z,null,{shouldDirty:!0,shouldValidate:M}));const K=Number.isNaN(U)?null:Number(U);_(K),C&&C(K)},onBlur:()=>P(),hidden:d,disabled:H,className:l.classNames("form-control text-end w-100",{"is-invalid":W},{[`form-control-${f}`]:f}),step:p,getInputRef:$,min:N,max:v}),x&&s.jsx("div",{className:"custom-picker-button",children:x})]}),i&&z!=null&&s.jsx("div",{className:"luminus-input-remove-icon inset",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:B,children:s.jsx(l.MdClear,{})})}),F&&s.jsx(l.InvalidFeedback,{message:F.message})]})},lu=(n,e)=>{const t=l.useAxios(),o=we.useNavigate(),{startLoading:a,stopLoading:i}=w.useContext(l.LoadingContext),{zDateRequired:r,zNumberRequired:c}=l.useZodSchemaTypes(),{addNotification:d}=l.useNotifications(),{refreshAvailableDelegations:u}=w.useContext(l.DelegationContext),{user:m}=w.useContext(l.UserContext),{texts:{substitutions:{detail:p}}}=w.useContext(l.LuminusComponentsContext),f=l.objectType({id:c(),employeeId:c(),substituteId:c(),from:r(),to:r(),roles:l.arrayType(l.stringType())}),x=w.useMemo(()=>({id:(n==null?void 0:n.id)??0,employeeId:(n==null?void 0:n.employeeId)??(m==null?void 0:m.personalNumber)??void 0,substituteId:(n==null?void 0:n.substituteId)??void 0,from:(n==null?void 0:n.from)??l.format(new Date,"yyyy-MM-dd"),to:(n==null?void 0:n.to)??l.format(new Date,"yyyy-MM-dd"),roles:(n==null?void 0:n.roles)??[]}),[n==null?void 0:n.employeeId,n==null?void 0:n.from,n==null?void 0:n.id,n==null?void 0:n.roles,n==null?void 0:n.substituteId,n==null?void 0:n.to,m==null?void 0:m.personalNumber]),g=Se.useForm({resolver:l.t(f),defaultValues:x}),y=w.useCallback(async h=>{a("premissions-substitute-submit");try{await t.post("permissions/substitutions",h),d(p.updateSuccess,"success"),u(),o(e)}catch(b){l.hookFormSetServerErrors(g,b)}finally{i("premissions-substitute-submit")}},[d,t,g,o,u,a,i,e,p]);return w.useEffect(()=>{g.reset(x)},[x,g]),{formSchema:f,onSubmit:y,formMethods:g}},au=n=>{var ye;const e=l.compilerRuntimeExports.c(114),{indexRoute:t,zastupModifyPermission:o}=n,a=o===void 0?"ZASTUP_MODIFY":o,{id:i}=we.useParams(),{user:r}=w.useContext(l.UserContext),c=l.useAxios(),d=we.useNavigate(),{confirm:u}=l.useConfirm(),{texts:m}=w.useContext(l.LuminusComponentsContext),{substitutions:p}=m,{detail:f}=p,x=i!==void 0;let g;e[0]!==x?(g={enabled:x},e[0]=x,e[1]=g):g=e[1];const{data:y}=Fe.useGetApiData(`/permissions/substitutions/${i}`,g),{data:h}=Fe.useGetApiData("/permissions/users"),{onSubmit:b,formMethods:j}=lu(y,t);let S;e[2]!==j.control?(S={control:j.control,name:"employeeId"},e[2]=j.control,e[3]=S):S=e[3];const N=Se.useWatch(S);let v;e[4]!==N||e[5]!==h?(v=(ye=h==null?void 0:h.find(de=>de.employeeId===N))==null?void 0:ye.name,e[4]=N,e[5]=h,e[6]=v):v=e[6];const C=N>0&&!!h;let k;e[7]!==C?(k={enabled:C},e[7]=C,e[8]=k):k=e[8];const{data:I}=Fe.useGetApiData(`/permissions/roles?userName=${v}`,k),{refreshAvailableDelegations:T}=w.useContext(l.DelegationContext),{checkUserHasPermissions:L}=l.usePermissions();let E;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==t||e[13]!==d||e[14]!==T||e[15]!==f.deleteConfirm?(E=async()=>{await u(f.deleteConfirm)&&(await c.delete(`/permissions/substitutions/${i}`),T(),d(t))},e[9]=c,e[10]=u,e[11]=i,e[12]=t,e[13]=d,e[14]=T,e[15]=f.deleteConfirm,e[16]=E):E=e[16];const D=E;r==null||r.personalNumber;let _;e[17]!==L||e[18]!==N||e[19]!==(r==null?void 0:r.personalNumber)||e[20]!==a?(_=N!==(r==null?void 0:r.personalNumber)&&!L([a]),e[17]=L,e[18]=N,e[19]=r==null?void 0:r.personalNumber,e[20]=a,e[21]=_):_=e[21];const P=_;let $;e[22]!==j.control?($={control:j.control,name:"roles"},e[22]=j.control,e[23]=$):$=e[23];const R=Se.useWatch($);let F;e[24]!==I?(F=I==null?void 0:I.filter(iu),e[24]=I,e[25]=F):F=e[25];const M=F;let O;e[26]!==M||e[27]!==R?(O=(M==null?void 0:M.every(de=>R==null?void 0:R.includes(de.name)))??!1,e[26]=M,e[27]=R,e[28]=O):O=e[28];const B=O;let H;if(e[29]!==h){const de=new Set(h==null?void 0:h.map(ru));H=Array.from(de.values()),e[29]=h,e[30]=H}else H=e[30];let z;e[31]!==H||e[32]!==h?(z=H.map(de=>h==null?void 0:h.find(xe=>xe.employeeId===de)).filter(cu).map(du),e[31]=H,e[32]=h,e[33]=z):z=e[33];const W=z;let A;e[34]!==f.title?(A=s.jsx(l.Typography,{variant:"h3",children:f.title}),e[34]=f.title,e[35]=A):A=e[35];let U;e[36]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[36]=U):U=e[36];let K;e[37]!==D?(K=()=>D(),e[37]=D,e[38]=K):K=e[38];let V;e[39]!==K||e[40]!==f.delete?(V=s.jsx(l.Dropdown,{toggle:U,children:s.jsx(l.DropdownItem,{onClick:K,children:f.delete})}),e[39]=K,e[40]=f.delete,e[41]=V):V=e[41];let G;e[42]!==A||e[43]!==V?(G=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[A,V]}),e[42]=A,e[43]=V,e[44]=G):G=e[44];let Z;e[45]!==j||e[46]!==b?(Z=j.handleSubmit(b),e[45]=j,e[46]=b,e[47]=Z):Z=e[47];const X=f.title,le=f.employee;let q;e[48]!==L||e[49]!==a?(q=L([a]),e[48]=L,e[49]=a,e[50]=q):q=e[50];const oe=!q;let ce;e[51]===Symbol.for("react.memo_cache_sentinel")?(ce=["roles"],e[51]=ce):ce=e[51];let fe;e[52]!==W||e[53]!==oe||e[54]!==f.employee?(fe=s.jsx(an,{formField:"employeeId",options:W,label:le,isNumber:!0,required:!0,disabled:oe,resetsFields:ce}),e[52]=W,e[53]=oe,e[54]=f.employee,e[55]=fe):fe=e[55];let pe;e[56]!==W||e[57]!==f.substitute?(pe=s.jsx(an,{formField:"substituteId",options:W,label:f.substitute,isNumber:!0,required:!0}),e[56]=W,e[57]=f.substitute,e[58]=pe):pe=e[58];let J;e[59]!==f.from?(J=s.jsx(l.HookFormTextInput,{formField:"from",label:f.from,type:"date",required:!0}),e[59]=f.from,e[60]=J):J=e[60];let Y;e[61]!==f.to?(Y=s.jsx(l.HookFormTextInput,{formField:"to",label:f.to,type:"date",required:!0}),e[61]=f.to,e[62]=Y):Y=e[62];let Q;e[63]!==fe||e[64]!==pe||e[65]!==J||e[66]!==Y||e[67]!==f.title?(Q=s.jsx(l.Col,{sm:12,md:4,children:s.jsxs(gt,{title:X,children:[fe,pe,J,Y]})}),e[63]=fe,e[64]=pe,e[65]=J,e[66]=Y,e[67]=f.title,e[68]=Q):Q=e[68];let ne;e[69]!==(M==null?void 0:M.length)||e[70]!==(R==null?void 0:R.length)||e[71]!==f?(ne=f.roles(`${(R==null?void 0:R.length)??0}/${(M==null?void 0:M.length)??0}`),e[69]=M==null?void 0:M.length,e[70]=R==null?void 0:R.length,e[71]=f,e[72]=ne):ne=e[72];let ee;e[73]!==B||e[74]!==M||e[75]!==P||e[76]!==j||e[77]!==(R==null?void 0:R.length)||e[78]!==f.checkAllRoles||e[79]!==f.uncheckAllRoles?(ee=P?null:s.jsx("div",{className:"bg-darker",style:{marginLeft:"-12px",marginRight:"-12px",marginTop:"-12px",padding:"0px 12px"},children:s.jsx(Tt,{label:B?f.uncheckAllRoles:f.checkAllRoles,indeterminate:!B&&(R==null?void 0:R.length)>0,value:B,disabled:P,onChange:()=>{j.setValue("roles",B?[]:(M==null?void 0:M.map(uu))??[],{shouldDirty:!0})},InputContainer:l.RowLabelInput})}),e[73]=B,e[74]=M,e[75]=P,e[76]=j,e[77]=R==null?void 0:R.length,e[78]=f.checkAllRoles,e[79]=f.uncheckAllRoles,e[80]=ee):ee=e[80];let te;e[81]===Symbol.for("react.memo_cache_sentinel")?(te={maxHeight:"60vh",marginLeft:"-12px",marginRight:"-12px",padding:"0px 12px"},e[81]=te):te=e[81];let se;e[82]!==P||e[83]!==j||e[84]!==R||e[85]!==I?(se=I==null?void 0:I.map(de=>s.jsx(Tt,{label:de.name,value:(R==null?void 0:R.find(xe=>xe===de.name))!==void 0,disabled:P||!de.canBeRepresented,onChange:xe=>{j.setValue("roles",xe?[...R??[],de.name]:(R==null?void 0:R.filter(je=>je!==de.name))??[],{shouldDirty:!0})},InputContainer:l.RowLabelInput},de.name)),e[82]=P,e[83]=j,e[84]=R,e[85]=I,e[86]=se):se=e[86];let ue;e[87]!==se?(ue=s.jsx("div",{className:"overflow-auto",style:te,children:se}),e[87]=se,e[88]=ue):ue=e[88];let me;e[89]!==ne||e[90]!==ee||e[91]!==ue?(me=s.jsx(l.Col,{sm:12,md:4,children:s.jsxs(gt,{title:ne,className:"h-max-100",contentClassName:"d-flex flex-column overflow-hidden",children:[ee,ue]})}),e[89]=ne,e[90]=ee,e[91]=ue,e[92]=me):me=e[92];let be;e[93]!==Q||e[94]!==me?(be=s.jsxs(On,{className:"h-100 gx-3 gy-3",children:[Q,me]}),e[93]=Q,e[94]=me,e[95]=be):be=e[95];let ae;e[96]!==j?(ae=()=>j.reset(),e[96]=j,e[97]=ae):ae=e[97];let ke;e[98]!==ae||e[99]!==f.save?(ke=s.jsx(rl,{onStorno:ae,children:f.save}),e[98]=ae,e[99]=f.save,e[100]=ke):ke=e[100];let Ne;e[101]!==Z||e[102]!==be||e[103]!==ke?(Ne=s.jsxs(l.Form,{onSubmit:Z,className:"h-100",children:[be,ke]}),e[101]=Z,e[102]=be,e[103]=ke,e[104]=Ne):Ne=e[104];let De;e[105]!==P||e[106]!==Ne?(De=s.jsx(st.FormDisabledProvider,{disabled:P,children:Ne}),e[105]=P,e[106]=Ne,e[107]=De):De=e[107];let re;e[108]!==j||e[109]!==De?(re=s.jsx(Se.FormProvider,{...j,children:De}),e[108]=j,e[109]=De,e[110]=re):re=e[110];let he;return e[111]!==G||e[112]!==re?(he=s.jsx(l.PageContainer,{title:G,children:re}),e[111]=G,e[112]=re,e[113]=he):he=e[113],he};function iu(n){return n.canBeRepresented}function ru(n){return n.employeeId}function cu(n){return n!==void 0}function du(n){return{id:n.employeeId,name:`${n.employeeName} (${n.name})`}}function uu(n){return n.name}const mu=n=>{const e=l.compilerRuntimeExports.c(32),{BnfTableComponent:t,items:o,onEditItem:a,tableIdentifier:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{approval:c}=r;let d;e[0]!==o?(d=o.map(fu),e[0]=o,e[1]=d):d=e[1];const u=d;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=l.u(),e[2]=m):m=e[2];const p=m;let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=p.accessor("id",{header:"Id",type:"number",meta:{filterVariant:"none",hidden:!0}}),e[3]=f):f=e[3];let x;e[4]!==c.delegations.table.approval?(x=p.accessor("approval.name",{header:c.delegations.table.approval,type:"string",meta:{filterVariant:"select"},mobileMeta:{isIdentifier:!0}}),e[4]=c.delegations.table.approval,e[5]=x):x=e[5];let g;e[6]!==c.delegations.table.employee?(g=p.accessor("employee.name",{header:c.delegations.table.employee,type:"string",mobileMeta:{isIdentifier:!0}}),e[6]=c.delegations.table.employee,e[7]=g):g=e[7];let y;e[8]!==c.delegations.table.delegate?(y=p.accessor("delegate.name",{header:c.delegations.table.delegate,type:"string",mobileMeta:{isIdentifier:!0}}),e[8]=c.delegations.table.delegate,e[9]=y):y=e[9];let h;e[10]!==c.delegations.table.dateFrom||e[11]!==c.delegations.table.dateGroup?(h=p.accessor("dateFrom",{header:c.delegations.table.dateFrom,type:"date",mobileMeta:{displayGroup:c.delegations.table.dateGroup}}),e[10]=c.delegations.table.dateFrom,e[11]=c.delegations.table.dateGroup,e[12]=h):h=e[12];let b;e[13]!==c.delegations.table.dateGroup||e[14]!==c.delegations.table.dateTo?(b=p.accessor("dateTo",{header:c.delegations.table.dateTo,type:"date",mobileMeta:{displayGroup:c.delegations.table.dateGroup}}),e[13]=c.delegations.table.dateGroup,e[14]=c.delegations.table.dateTo,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=p.accessor("archive",{header:"",type:"boolean",meta:{hidden:!0}}),e[16]=j):j=e[16];let S;e[17]!==x||e[18]!==g||e[19]!==y||e[20]!==h||e[21]!==b?(S=[f,x,g,y,h,b,j],e[17]=x,e[18]=g,e[19]=y,e[20]=h,e[21]=b,e[22]=S):S=e[22];const N=S;let v;e[23]!==o||e[24]!==a?(v=I=>{a(o.find(T=>T.id===I.id))},e[23]=o,e[24]=a,e[25]=v):v=e[25];const C=v;let k;return e[26]!==t||e[27]!==N||e[28]!==C||e[29]!==i||e[30]!==u?(k=s.jsx(t,{tableId:i,columns:N,data:u,onRowClick:C}),e[26]=t,e[27]=N,e[28]=C,e[29]=i,e[30]=u,e[31]=k):k=e[31],k};function fu(n){return{...n,archive:!!(n.dateTo&&l.isPast(l.parseISO(n.dateTo)))}}const pu=(n,e="/approval/delegation/runningProcess",t="/approval/delegation",o=a=>`/approval/delegation/${a}`)=>{const a=l.useAxios(),{startLoading:i,stopLoading:r}=w.useContext(l.LoadingContext),c=w.useCallback(async(m,p)=>{let f=null;i("getHasRunningProcesses");try{f=(await a.get(`${e}?employeeId=${m}&approvalId=${p}`)).data}finally{r("getHasRunningProcesses")}return f},[a,i,r,e]),d=w.useCallback(async(m,p)=>(i("approvalDelegationPost"),a.post(t,m).then(()=>!0).catch(f=>(l.hookFormSetServerErrors(p,f),!1)).finally(()=>r("approvalDelegationPost"))),[a,i,r,t]),u=w.useCallback(async()=>n!=null&&n.id?(i("approvalDelegationDelete"),a.delete(o(n.id)).then(()=>!0).catch(()=>!1).finally(()=>r("approvalDelegationDelete"))):!1,[a,n,i,r,o]);return{getHasRunningProcesses:c,postEditDelegation:d,postDeleteDelegation:u}},hu=n=>{var J,Y;const e=l.compilerRuntimeExports.c(85),{model:t,handleClose:o,onConfirm:a,apiApprovalDefinitions:i,apiHasRunningProcess:r,apiPostEditDelegation:c,apiDeleteDelegation:d,EmployeePickerComponent:u}=n,{ProjectIconComponent:m,texts:p}=w.useContext(l.LuminusComponentsContext),{approval:f}=p,{zDate:x,zObjectIdIntRequired:g,zDateRequired:y}=l.useZodSchemaTypes(),{addNotification:h}=l.useNotifications(),{confirm:b}=l.useConfirm(),{data:j}=Fe.useGetApiData(i);let S,N;if(e[0]!==x||e[1]!==y||e[2]!==g){const Q=l.objectType({employee:g(),delegate:g(),dateFrom:y(),dateTo:x(),approval:g()});N=Se.useForm,S=l.t(Q),e[0]=x,e[1]=y,e[2]=g,e[3]=S,e[4]=N}else S=e[3],N=e[4];let v;e[5]!==S?(v={resolver:S},e[5]=S,e[6]=v):v=e[6];const C=N(v),{getHasRunningProcesses:k,postEditDelegation:I,postDeleteDelegation:T}=pu(t,r,c,d);let L,E;e[7]!==C||e[8]!==t?(L=()=>{var Q,ne,ee,te,se,ue;t&&(C.reset({...t,employee:{id:((Q=t.employee)==null?void 0:Q.id)??0},delegate:{id:((ne=t.delegate)==null?void 0:ne.id)??0},dateFrom:t.dateFrom??"",approval:{id:((ee=t.approval)==null?void 0:ee.id)??0}},{keepDirty:!1}),(te=t.employee)!=null&&te.id||ot.hookFormSetNull(C,"employee.id"),(se=t.delegate)!=null&&se.id||ot.hookFormSetNull(C,"delegate.id"),(ue=t.approval)!=null&&ue.id||ot.hookFormSetNull(C,"approval.id"))},E=[t,C],e[7]=C,e[8]=t,e[9]=L,e[10]=E):(L=e[9],E=e[10]),w.useEffect(L,E);let D;e[11]!==h||e[12]!==b||e[13]!==C||e[14]!==k||e[15]!==t||e[16]!==a||e[17]!==I||e[18]!==f.delegations.createSuccess||e[19]!==f.delegations.delegateExistingsConfirmMessage||e[20]!==f.delegations.editSuccess?(D=async Q=>{if(!t)return;const ne={...t};Object.assign(ne,Q),l.fixNameIdNulls(ne);const ee=await k(ne.employee.id,ne.approval.id);ne.includeExisting=ee&&!!await b(f.delegations.delegateExistingsConfirmMessage),await I(ne,C)&&(h(t.id?f.delegations.editSuccess:f.delegations.createSuccess,"success"),a())},e[11]=h,e[12]=b,e[13]=C,e[14]=k,e[15]=t,e[16]=a,e[17]=I,e[18]=f.delegations.createSuccess,e[19]=f.delegations.delegateExistingsConfirmMessage,e[20]=f.delegations.editSuccess,e[21]=D):D=e[21];const _=D;let P;e[22]!==h||e[23]!==b||e[24]!==a||e[25]!==T||e[26]!==f.delegations.deleteConfirm||e[27]!==f.delegations.deleteSuccess?(P=async()=>{await b(f.delegations.deleteConfirm)&&await T()&&(h(f.delegations.deleteSuccess,"success"),a())},e[22]=h,e[23]=b,e[24]=a,e[25]=T,e[26]=f.delegations.deleteConfirm,e[27]=f.delegations.deleteSuccess,e[28]=P):P=e[28];const $=P,R=t!==null;let F;e[29]!==o?(F=()=>o(),e[29]=o,e[30]=F):F=e[30];const M=t!=null&&t.id?f.delegations.detailTitle:f.delegations.newTitle;let O;e[31]!==M?(O=s.jsx(l.Modal.Title,{className:"w-100",children:M}),e[31]=M,e[32]=O):O=e[32];let B;e[33]!==m||e[34]!==(t==null?void 0:t.id)||e[35]!==$||e[36]!==f.delegations.delete?(B=t!=null&&t.id?s.jsx(l.Dropdown,{toggle:s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),className:"modalHeaderDropdown",children:s.jsx(l.DropdownItem,{color:"danger",icon:s.jsx(m,{icon:"delete"}),onClick:$,children:f.delegations.delete})}):null,e[33]=m,e[34]=t==null?void 0:t.id,e[35]=$,e[36]=f.delegations.delete,e[37]=B):B=e[37];let H;e[38]!==O||e[39]!==B?(H=s.jsxs(l.Modal.Header,{closeButton:!0,children:[O,B]}),e[38]=O,e[39]=B,e[40]=H):H=e[40];let z;e[41]!==C||e[42]!==_?(z=C.handleSubmit(_),e[41]=C,e[42]=_,e[43]=z):z=e[43];let W;e[44]!==j?(W=j??[],e[44]=j,e[45]=W):W=e[45];let A;e[46]!==W||e[47]!==f.delegations.detail.approval?(A=s.jsx(an,{label:f.delegations.detail.approval,isNumber:!0,formField:"approval.id",options:W,required:!0}),e[46]=W,e[47]=f.delegations.detail.approval,e[48]=A):A=e[48];let U;e[49]!==t?(U=(J=t==null?void 0:t.employee)!=null&&J.id?{id:t.employee.id,name:t.employee.name}:null,e[49]=t,e[50]=U):U=e[50];let K;e[51]!==u||e[52]!==U||e[53]!==f.delegations.detail.employee?(K=s.jsx(u,{label:f.delegations.detail.employee,formField:"employee.id",defaultSelection:U,required:!0}),e[51]=u,e[52]=U,e[53]=f.delegations.detail.employee,e[54]=K):K=e[54];let V;e[55]!==t?(V=(Y=t==null?void 0:t.delegate)!=null&&Y.id?{id:t.delegate.id,name:t.delegate.name}:null,e[55]=t,e[56]=V):V=e[56];let G;e[57]!==u||e[58]!==V||e[59]!==f.delegations.detail.delegate?(G=s.jsx(u,{label:f.delegations.detail.delegate,formField:"delegate.id",defaultSelection:V,required:!0}),e[57]=u,e[58]=V,e[59]=f.delegations.detail.delegate,e[60]=G):G=e[60];let Z;e[61]!==f.delegations.detail.dateFrom?(Z=s.jsx(l.HookFormTextInput,{label:f.delegations.detail.dateFrom,formField:"dateFrom",type:"date",required:!0}),e[61]=f.delegations.detail.dateFrom,e[62]=Z):Z=e[62];let X;e[63]!==f.delegations.detail.dateTo?(X=s.jsx(l.HookFormTextInput,{label:f.delegations.detail.dateTo,formField:"dateTo",type:"date"}),e[63]=f.delegations.detail.dateTo,e[64]=X):X=e[64];let le;e[65]!==A||e[66]!==K||e[67]!==G||e[68]!==Z||e[69]!==X?(le=s.jsxs(l.Modal.Body,{children:[A,K,G,Z,X]}),e[65]=A,e[66]=K,e[67]=G,e[68]=Z,e[69]=X,e[70]=le):le=e[70];const q=t!=null&&t.id?f.delegations.save:f.delegations.create;let oe;e[71]!==q?(oe=s.jsx(l.Modal.Footer,{className:"justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:q})}),e[71]=q,e[72]=oe):oe=e[72];let ce;e[73]!==z||e[74]!==le||e[75]!==oe?(ce=s.jsxs(l.Form,{onSubmit:z,noValidate:!0,children:[le,oe]}),e[73]=z,e[74]=le,e[75]=oe,e[76]=ce):ce=e[76];let fe;e[77]!==C||e[78]!==ce?(fe=s.jsx(Se.FormProvider,{...C,children:ce}),e[77]=C,e[78]=ce,e[79]=fe):fe=e[79];let pe;return e[80]!==F||e[81]!==H||e[82]!==fe||e[83]!==R?(pe=s.jsxs(l.Modal,{show:R,onHide:F,children:[H,fe]}),e[80]=F,e[81]=H,e[82]=fe,e[83]=R,e[84]=pe):pe=e[84],pe},Et={apiApprovalDelegations:"/approval/delegation",apiHasRunningProcess:"/approval/delegation/runningProcess",apiPostEditDelegation:"/approval/delegation",apiDeleteDelegation:n=>`/approval/delegation/${n}`,apiApprovalDefinitions:"/approval/definition"},gu=n=>{const e=l.compilerRuntimeExports.c(38),{apiUrls:t,BnfTableComponent:o,tableIdentifier:a,EmployeePickerComponent:i}=n,{apiApprovalDelegations:r,apiHasRunningProcess:c,apiPostEditDelegation:d,apiDeleteDelegation:u,apiApprovalDefinitions:m}=t===void 0?Et:t,p=r===void 0?Et.apiApprovalDelegations:r,f=c===void 0?Et.apiHasRunningProcess:c,x=d===void 0?Et.apiPostEditDelegation:d,g=u===void 0?Et.apiDeleteDelegation:u,y=m===void 0?Et.apiApprovalDefinitions:m,{texts:h}=w.useContext(l.LuminusComponentsContext),{approval:b}=h,[j,S]=pt.useSearchQueryState("archive",!1),[N,v]=w.useState(null),{data:C,reloadData:k}=Fe.useGetApiData(`${p}?archive=${j}`);let I;e[0]!==b.delegations.title?(I=s.jsx(l.Typography,{variant:"h3",children:b.delegations.title}),e[0]=b.delegations.title,e[1]=I):I=e[1];let T;e[2]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[2]=T):T=e[2];let L;e[3]===Symbol.for("react.memo_cache_sentinel")?(L=()=>v({id:null,employee:null,delegate:null,dateFrom:null,dateTo:null,approval:null,includeExisting:null}),e[3]=L):L=e[3];let E;e[4]!==b.delegations.createDelegation?(E=s.jsx(l.DropdownItem,{onClick:L,children:b.delegations.createDelegation}),e[4]=b.delegations.createDelegation,e[5]=E):E=e[5];let D;e[6]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(l.DropdownDivider,{}),e[6]=D):D=e[6];let _;e[7]!==S||e[8]!==j?(_=()=>S(!j),e[7]=S,e[8]=j,e[9]=_):_=e[9];const P=j?b.delegations.hideArchived:b.delegations.showArchived;let $;e[10]!==_||e[11]!==P?($=s.jsx(l.DropdownItem,{onClick:_,children:P}),e[10]=_,e[11]=P,e[12]=$):$=e[12];let R;e[13]!==E||e[14]!==$?(R=s.jsxs(l.Dropdown,{toggle:T,children:[E,D,$]}),e[13]=E,e[14]=$,e[15]=R):R=e[15];let F;e[16]!==R||e[17]!==I?(F=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[I,R]}),e[16]=R,e[17]=I,e[18]=F):F=e[18];let M;e[19]!==o||e[20]!==C||e[21]!==a?(M=C?s.jsx(mu,{items:C,onEditItem:v,BnfTableComponent:o,tableIdentifier:a}):null,e[19]=o,e[20]=C,e[21]=a,e[22]=M):M=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=()=>v(null),e[23]=O):O=e[23];let B;e[24]!==k?(B=()=>{v(null),k()},e[24]=k,e[25]=B):B=e[25];let H;e[26]!==i||e[27]!==y||e[28]!==g||e[29]!==f||e[30]!==x||e[31]!==N||e[32]!==B?(H=s.jsx(hu,{model:N,handleClose:O,onConfirm:B,EmployeePickerComponent:i,apiApprovalDefinitions:y,apiHasRunningProcess:f,apiPostEditDelegation:x,apiDeleteDelegation:g}),e[26]=i,e[27]=y,e[28]=g,e[29]=f,e[30]=x,e[31]=N,e[32]=B,e[33]=H):H=e[33];let z;return e[34]!==F||e[35]!==M||e[36]!==H?(z=s.jsxs(l.PageContainer,{variant:"fullScreen",title:F,children:[M,H]}),e[34]=F,e[35]=M,e[36]=H,e[37]=z):z=e[37],z},xu=n=>{const e=l.compilerRuntimeExports.c(50),{show:t,handleClose:o,onConfirm:a,currentEmployee:i,approvalApproverId:r,apiPostChangeEmployee:c,EmployeePickerComponent:d}=n,{texts:u}=w.useContext(l.LuminusComponentsContext),{approval:m}=u,{zNumberRequired:p}=l.useZodSchemaTypes(),f=l.useAxios(),{startLoading:x,stopLoading:g}=w.useContext(l.LoadingContext),{addNotification:y}=l.useNotifications();let h,b;if(e[0]!==p){const M=l.z.object({employeeId:p()});b=Se.useForm,h=l.t(M),e[0]=p,e[1]=h,e[2]=b}else h=e[1],b=e[2];let j;e[3]!==h?(j={resolver:h},e[3]=h,e[4]=j):j=e[4];const S=b(j);let N;e[5]!==(i==null?void 0:i.id)||e[6]!==S||e[7]!==t?(N=()=>{t&&(S.reset({employeeId:i==null?void 0:i.id}),!(i!=null&&i.id)&&ot.hookFormSetNull(S,"employeeId"))},e[5]=i==null?void 0:i.id,e[6]=S,e[7]=t,e[8]=N):N=e[8];let v;e[9]!==i||e[10]!==S||e[11]!==t?(v=[t,i,S],e[9]=i,e[10]=S,e[11]=t,e[12]=v):v=e[12],w.useEffect(N,v);let C;e[13]!==c||e[14]!==r||e[15]!==f||e[16]!==S||e[17]!==x||e[18]!==g?(C=async M=>(x("approvalChangeEmployee"),f.post(c,{id:r,employeeId:M}).then(yu).catch(O=>(l.hookFormSetServerErrors(S,O),!1)).finally(()=>g("approvalChangeEmployee"))),e[13]=c,e[14]=r,e[15]=f,e[16]=S,e[17]=x,e[18]=g,e[19]=C):C=e[19];const k=C;let I;e[20]!==y||e[21]!==a||e[22]!==k||e[23]!==m.definitions.changeEmployeeSuccess?(I=async M=>{await k(M.employeeId)&&(y(m.definitions.changeEmployeeSuccess,"success"),a())},e[20]=y,e[21]=a,e[22]=k,e[23]=m.definitions.changeEmployeeSuccess,e[24]=I):I=e[24];const T=I;let L;e[25]!==o?(L=()=>o(),e[25]=o,e[26]=L):L=e[26];let E;e[27]!==m.definitions.changeEmployeeTitle?(E=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.definitions.changeEmployeeTitle})}),e[27]=m.definitions.changeEmployeeTitle,e[28]=E):E=e[28];let D;e[29]!==S||e[30]!==T?(D=S.handleSubmit(T),e[29]=S,e[30]=T,e[31]=D):D=e[31];let _;e[32]!==d||e[33]!==i||e[34]!==m.definitions.changeEmployeeNewEmployee?(_=s.jsx(l.Modal.Body,{children:s.jsx(d,{formField:"employeeId",defaultSelection:i,label:m.definitions.changeEmployeeNewEmployee,required:!0})}),e[32]=d,e[33]=i,e[34]=m.definitions.changeEmployeeNewEmployee,e[35]=_):_=e[35];let P;e[36]!==m.definitions.changeEmployeeConfirm?(P=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:m.definitions.changeEmployeeConfirm})}),e[36]=m.definitions.changeEmployeeConfirm,e[37]=P):P=e[37];let $;e[38]!==D||e[39]!==_||e[40]!==P?($=s.jsxs(l.Form,{onSubmit:D,noValidate:!0,children:[_,P]}),e[38]=D,e[39]=_,e[40]=P,e[41]=$):$=e[41];let R;e[42]!==S||e[43]!==$?(R=s.jsx(Se.FormProvider,{...S,children:$}),e[42]=S,e[43]=$,e[44]=R):R=e[44];let F;return e[45]!==t||e[46]!==E||e[47]!==R||e[48]!==L?(F=s.jsxs(l.Modal,{show:t,onHide:L,children:[E,R]}),e[45]=t,e[46]=E,e[47]=R,e[48]=L,e[49]=F):F=e[49],F};function yu(){return!0}const vu=n=>{var T;const e=l.compilerRuntimeExports.c(33),{level:t,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,EmployeePickerComponent:r}=n,{ProjectIconComponent:c,texts:d}=w.useContext(l.LuminusComponentsContext),{approval:u}=d,[m,p]=w.useState(null);let f;e[0]!==t.index||e[1]!==u.definitions?(f=u.definitions.nthLevel(t.index+1),e[0]=t.index,e[1]=u.definitions,e[2]=f):f=e[2];let x;e[3]!==f?(x=s.jsx(l.Typography,{variant:"body",children:f}),e[3]=f,e[4]=x):x=e[4];let g;e[5]!==t.threshold||e[6]!==u.definitions?(g=u.definitions.levelThresholdInfo(t.threshold),e[5]=t.threshold,e[6]=u.definitions,e[7]=g):g=e[7];let y;e[8]!==g?(y=s.jsx(l.Typography,{variant:"body2",children:g}),e[8]=g,e[9]=y):y=e[9];let h;e[10]!==x||e[11]!==y?(h=s.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[x,y]}),e[10]=x,e[11]=y,e[12]=h):h=e[12];let b;e[13]!==c||e[14]!==a||e[15]!==t.approvers||e[16]!==t.threshold||e[17]!==u.definitions?(b=t.approvers&&t.approvers.length>0?s.jsx("div",{className:"list-group",children:(T=t.approvers)==null?void 0:T.map(L=>s.jsxs("div",{className:"list-group-item ms-3 p-1 px-2 d-flex align-items-center justify-content-between gap-5",children:[s.jsxs(l.Typography,{variant:"body2",className:"d-flex align-items-center justify-content-between gap-2",children:[L.employeeId?s.jsxs(s.Fragment,{children:[s.jsx(c,{icon:"user"}),s.jsx(l.IconButton,{size:"sm",onClick:()=>p({id:L.id,employee:{id:L.employeeId??0,name:L.employeeName}}),children:s.jsx(c,{icon:"edit"})}),s.jsx(we.Link,{to:a(L.employeeId),className:"link",children:L.employeeName})]}):null,L.role?s.jsxs(s.Fragment,{children:[s.jsx(c,{icon:"role"})," ",s.jsx("span",{className:"fw-bold text-uppercase",children:L.role})]}):null]}),s.jsx(l.Typography,{variant:"body2",children:u.definitions.approverThresholdInfo(t.threshold,L.scale)})]}))}):null,e[13]=c,e[14]=a,e[15]=t.approvers,e[16]=t.threshold,e[17]=u.definitions,e[18]=b):b=e[18];const j=(m==null?void 0:m.id)??0,S=(m==null?void 0:m.employee)??null,N=m!==null;let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=()=>p(null),e[19]=v):v=e[19];let C;e[20]!==o?(C=()=>{p(null),o()},e[20]=o,e[21]=C):C=e[21];let k;e[22]!==r||e[23]!==i||e[24]!==N||e[25]!==C||e[26]!==j||e[27]!==S?(k=s.jsx(xu,{approvalApproverId:j,currentEmployee:S,show:N,handleClose:v,onConfirm:C,apiPostChangeEmployee:i,EmployeePickerComponent:r}),e[22]=r,e[23]=i,e[24]=N,e[25]=C,e[26]=j,e[27]=S,e[28]=k):k=e[28];let I;return e[29]!==k||e[30]!==h||e[31]!==b?(I=s.jsxs("div",{className:"bg-white rounded p-2 px-3 d-flex flex-column gap-2 shadow-sm",children:[h,b,k]}),e[29]=k,e[30]=h,e[31]=b,e[32]=I):I=e[32],I},bu=n=>{const e=l.compilerRuntimeExports.c(18),{approval:t,apiApprovalDelegations:o,appEmployeeDetail:a}=n,{ProjectIconComponent:i,texts:r}=w.useContext(l.LuminusComponentsContext),{approval:c}=r,{data:d}=Fe.useGetApiData(o);let u;e[0]!==t||e[1]!==d?(u=d?d.filter(h=>{var b;return((b=h.approval)==null?void 0:b.id)===t.id}):null,e[0]=t,e[1]=d,e[2]=u):u=e[2];const m=u;let p;e[3]!==c.delegations.title?(p=s.jsx(l.Typography,{variant:"body",children:c.delegations.title}),e[3]=c.delegations.title,e[4]=p):p=e[4];let f;e[5]!==i||e[6]!==a||e[7]!==m?(f=m&&m.length>0?s.jsx("div",{className:"list-group",children:m.map(h=>{var b,j,S,N;return s.jsxs("div",{className:"list-group-item p-2 px-3",children:[s.jsxs(l.Typography,{variant:"body2",className:"row g-0",children:[s.jsx("div",{className:"col-5 d-flex align-items-center",children:s.jsx(we.Link,{to:a(((b=h.employee)==null?void 0:b.id)??0),className:"link text-decoration-line-through link-secondary",children:((j=h.employee)==null?void 0:j.name)??"-"})}),s.jsx("div",{className:"col-2 text-center d-flex align-items-center justify-content-center",children:s.jsx(i,{icon:"arrow-right"})}),s.jsx("div",{className:"col-5 text-end d-flex-align-items-center",children:s.jsx(we.Link,{to:a(((S=h.delegate)==null?void 0:S.id)??0),className:"link",children:((N=h.delegate)==null?void 0:N.name)??"-"})})]}),s.jsxs(l.Typography,{variant:"caption",children:[h.dateFrom?l.formatDate(h.dateFrom):"N/A"," -"," ",h.dateTo?l.formatDate(h.dateTo):"N/A"]})]},h.id)})}):null,e[5]=i,e[6]=a,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==f?(x=s.jsx("div",{className:"overflow-auto h-100",children:f}),e[9]=f,e[10]=x):x=e[10];let g;e[11]!==m||e[12]!==c.delegations.noDelegations?(g=m&&m.length===0?s.jsx(l.Alert,{variant:"secondary",size:"sm",children:c.delegations.noDelegations}):null,e[11]=m,e[12]=c.delegations.noDelegations,e[13]=g):g=e[13];let y;return e[14]!==p||e[15]!==x||e[16]!==g?(y=s.jsxs("div",{className:"bg-white rounded border p-2 px-3 d-flex flex-column gap-2 overflow-hidden h-max-100",children:[p,x,g]}),e[14]=p,e[15]=x,e[16]=g,e[17]=y):y=e[17],y},ju=n=>{var S,N;const e=l.compilerRuntimeExports.c(26),{approval:t,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,apiApprovalDelegations:r,EmployeePickerComponent:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{approval:u}=d,m=t.name??"";let p;e[0]!==m?(p=s.jsx(l.Typography,{variant:"h6",children:m}),e[0]=m,e[1]=p):p=e[1];let f;e[2]!==t.lastExecutionDate||e[3]!==u?(f=t.lastExecutionDate?s.jsxs(l.Typography,{variant:"caption",children:[u.definitions.lastExecuted," ",l.formatDate(t.lastExecutionDate)]}):null,e[2]=t.lastExecutionDate,e[3]=u,e[4]=f):f=e[4];let x;e[5]!==p||e[6]!==f?(x=s.jsxs("div",{className:"px-4 pt-1 d-flex align-items-center justify-content-between",children:[p,f]}),e[5]=p,e[6]=f,e[7]=x):x=e[7];let g;e[8]!==c||e[9]!==i||e[10]!==a||e[11]!==t.levels||e[12]!==o?(g=(N=(S=t.levels)==null?void 0:S.sort(Su))==null?void 0:N.map(v=>s.jsx(vu,{level:v,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,EmployeePickerComponent:c},v.id)),e[8]=c,e[9]=i,e[10]=a,e[11]=t.levels,e[12]=o,e[13]=g):g=e[13];let y;e[14]!==g?(y=s.jsx("div",{className:"d-flex flex-column gap-2 overflow-auto h-100 p-3 px-4",children:g}),e[14]=g,e[15]=y):y=e[15];let h;e[16]!==x||e[17]!==y?(h=s.jsx("div",{className:"col-7 overflow-hidden h-100",children:s.jsxs("div",{className:"d-flex flex-column gap-0 overflow-hidden h-100",children:[x,y]})}),e[16]=x,e[17]=y,e[18]=h):h=e[18];let b;e[19]!==r||e[20]!==a||e[21]!==t?(b=s.jsx("div",{className:"col-5 overflow-hidden h-100",children:s.jsx(bu,{approval:t,apiApprovalDelegations:r,appEmployeeDetail:a})}),e[19]=r,e[20]=a,e[21]=t,e[22]=b):b=e[22];let j;return e[23]!==h||e[24]!==b?(j=s.jsxs("div",{className:"row g-0 overflow-hidden h-100",children:[h,b]}),e[23]=h,e[24]=b,e[25]=j):j=e[25],j};function Su(n,e){return n.index-e.index}const At={apiApprovalDefinitions:"/approval/definition",apiApprovalDefinitionDetail:n=>`/approval/definition/${n}`,apiPostChangeEmployee:"/approval/definition/approver/edit",apiApprovalDelegations:"/approval/delegation"},Sn={appApprovalsDelegations:"/approvals/delegations",appEmployeeDetail:n=>`/employees/${n}`},Cu=n=>{const e=l.compilerRuntimeExports.c(43),{appUrls:t,apiUrls:o,EmployeePickerComponent:a}=n,{appApprovalsDelegations:i,appEmployeeDetail:r}=t===void 0?Sn:t,c=i===void 0?Sn.appApprovalsDelegations:i,d=r===void 0?Sn.appEmployeeDetail:r,{apiApprovalDefinitions:u,apiApprovalDefinitionDetail:m,apiPostChangeEmployee:p,apiApprovalDelegations:f}=o===void 0?At:o,x=u===void 0?At.apiApprovalDefinitions:u,g=m===void 0?At.apiApprovalDefinitionDetail:m,y=p===void 0?At.apiPostChangeEmployee:p,h=f===void 0?At.apiApprovalDelegations:f,{ProjectIconComponent:b,texts:j}=w.useContext(l.LuminusComponentsContext),{approval:S}=j,{data:N}=Fe.useGetApiData(x),[v,C]=pt.useSearchQueryState("approval",null),k=v??0;let I;e[0]!==g||e[1]!==k?(I=g(k),e[0]=g,e[1]=k,e[2]=I):I=e[2];const T=v!==null;let L;e[3]!==T?(L={enabled:T},e[3]=T,e[4]=L):L=e[4];const{data:E,reloadData:D}=Fe.useGetApiData(I,L);let _,P;e[5]!==N||e[6]!==v||e[7]!==C?(_=()=>{var U;v||C(((U=N==null?void 0:N.at(0))==null?void 0:U.id)??null)},P=[N,v,C],e[5]=N,e[6]=v,e[7]=C,e[8]=_,e[9]=P):(_=e[8],P=e[9]),w.useEffect(_,P);let $;e[10]!==S.definitions.title?($=s.jsx(l.Typography,{variant:"h3",children:S.definitions.title}),e[10]=S.definitions.title,e[11]=$):$=e[11];let R;e[12]!==b?(R=s.jsx(b,{icon:"link"}),e[12]=b,e[13]=R):R=e[13];let F;e[14]!==c||e[15]!==R||e[16]!==S.definitions.delegationsDefinitions?(F=s.jsx(l.ContextButton,{as:"link",href:c,icon:R,children:S.definitions.delegationsDefinitions}),e[14]=c,e[15]=R,e[16]=S.definitions.delegationsDefinitions,e[17]=F):F=e[17];let M;e[18]!==$||e[19]!==F?(M=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[$,F]}),e[18]=$,e[19]=F,e[20]=M):M=e[20];let O;e[21]!==b||e[22]!==N||e[23]!==v||e[24]!==C?(O=N==null?void 0:N.sort(Nu).map(U=>s.jsxs("div",{role:"button",className:l.classNames("list-group-item list-group-item-action p-2 d-flex gap-3 align-items-center justify-content-between",{"bg-primary text-white":v===U.id}),onClick:()=>C(U.id),children:[s.jsx("span",{children:U.name}),s.jsxs(l.Typography,{variant:"caption",className:"d-flex align-items-center gap-1",children:[s.jsx(b,{icon:"menu"}),U.levelCount]})]},U.id)),e[21]=b,e[22]=N,e[23]=v,e[24]=C,e[25]=O):O=e[25];let B;e[26]!==O?(B=s.jsx("div",{className:"col-2 overflow-hidden h-100",children:s.jsx(l.Typography,{variant:"body2",className:"overflow-x-hidden overflow-y-auto h-100",children:s.jsx("div",{className:"list-group",children:O})})}),e[26]=O,e[27]=B):B=e[27];let H;e[28]!==a||e[29]!==h||e[30]!==y||e[31]!==d||e[32]!==E||e[33]!==D?(H=E?s.jsx(ju,{approval:E,reloadApproval:D,appEmployeeDetail:d,apiPostChangeEmployee:y,EmployeePickerComponent:a,apiApprovalDelegations:h}):null,e[28]=a,e[29]=h,e[30]=y,e[31]=d,e[32]=E,e[33]=D,e[34]=H):H=e[34];let z;e[35]!==H?(z=s.jsx("div",{className:"col-10 overflow-hidden h-100",children:H}),e[35]=H,e[36]=z):z=e[36];let W;e[37]!==B||e[38]!==z?(W=s.jsxs("div",{className:"row g-0 h-max-100 overflow-hidden",children:[B,z]}),e[37]=B,e[38]=z,e[39]=W):W=e[39];let A;return e[40]!==M||e[41]!==W?(A=s.jsx(l.PageContainer,{variant:"fullScreen",title:M,children:W}),e[40]=M,e[41]=W,e[42]=A):A=e[42],A};function Nu(n,e){return(n.name??"").localeCompare(e.name??"")}const wu=({overviewApiPath:n=e=>`/notification/email/overview?date=${e}`})=>{const{ProjectIconComponent:e,texts:{emailOverview:t}}=w.useContext(l.LuminusComponentsContext),[o,a]=pt.useSearchQueryState("date",Rt(new Date,{representation:"date"})),i=w.useMemo(()=>o?l.parseISO(o):new Date,[o]),{data:r}=Fe.useGetApiData(n(Rt(i,{representation:"date"}))),c=w.useCallback(p=>{a(Rt(jl(i,p),{representation:"date"}))},[i,a]),[d,u]=pt.useSearchQueryState("email",null),m=w.useMemo(()=>d?r==null?void 0:r.find(p=>p.id===d):null,[d,r]);return s.jsx(l.PageContainer,{variant:"fullScreen",title:s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"h3",children:t.title}),s.jsxs("div",{className:"d-flex gap-1 align-items-center justify-content-start",children:[s.jsx(l.IconButton,{onClick:()=>c(-1),children:s.jsx(e,{icon:"chevron-left"})}),s.jsx(l.TextInput,{type:"date",withoutLabel:!0,value:o,onChange:p=>a((p==null?void 0:p.toString())??""),size:"sm",className:"mb-1"}),s.jsx(l.IconButton,{onClick:()=>c(1),children:s.jsx(e,{icon:"chevron-right"})})]})]}),children:r!==null&&r.length<1?s.jsx(l.Alert,{variant:"warning",children:t.noMails}):s.jsxs("div",{className:"d-flex overflow-hidden gap-3 h-100",children:[s.jsx("div",{className:"h-100 overflow-y-auto overflow-x-hidden",style:{minWidth:"260px"},children:s.jsx("div",{className:"list-group",children:r==null?void 0:r.map(p=>s.jsxs("div",{role:"button",onClick:()=>u(p.id),className:l.classNames("list-group-item list-group-item-action d-flex gap-3 justify-content-between p-2",{active:d===p.id}),children:[s.jsx(l.Typography,{variant:"body2",children:p.subject}),s.jsx(l.Typography,{variant:"caption",children:l.format(l.parseISO(p.date??""),"HH:mm")})]},p.id))})}),m?s.jsxs("div",{className:"w-100 h-100 overflow-hidden bg-white rounded shadow-sm p-0",children:[s.jsx("div",{className:"mb-3 p-3 bg-darker",children:s.jsxs("div",{className:"row gx-3",children:[s.jsxs("div",{className:"col-8",children:[s.jsx(l.Typography,{variant:"caption",children:l.format(l.parseISO((m==null?void 0:m.date)??""),"dd.MM.yyyy HH:mm")}),s.jsx(l.Typography,{variant:"h6",children:(m==null?void 0:m.subject)??""})]}),s.jsxs("div",{className:"col-4",children:[s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",children:t.from})}),s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",className:"text-end fw-bold",children:(m==null?void 0:m.sender)??"-"})})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",children:t.to})}),s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",className:"text-end fw-bold",children:(m==null?void 0:m.recipient)??"-"})})]})]})]})}),s.jsx("iframe",{title:"email-body",srcDoc:(m==null?void 0:m.body)??"",width:"100%",height:"100%"})]}):null]})})},Iu="_placeholder_1qjhc_5",ku="_small_1qjhc_9",Tu="_medium_1qjhc_12",_u="_large_1qjhc_15",Du="_message_1qjhc_20",Eu="_ai-loading-bubbles_1qjhc_25",Lu="_bubble_1qjhc_28",Ru="_animate-bounceDelay_1qjhc_45",Fu="_animate-bounceDelay200_1qjhc_49",$u="_animate-bounceDelay400_1qjhc_53",ct={placeholder:Iu,small:ku,medium:Tu,large:_u,message:Du,aiLoadingBubbles:Eu,bubble:Lu,animateBounceDelay:Ru,animateBounceDelay200:Fu,animateBounceDelay400:$u},Xt={getHistory:"/documentation/history",deleteHistory:"/documentation/history",postQuestion:"/documentation/aiPrompt"},Pu=n=>{const e=l.compilerRuntimeExports.c(84),{isOpen:t,setIsOpen:o,BIcon:a,documentationUrl:i,apiEndpoints:r}=n,{getHistory:c,deleteHistory:d,postQuestion:u}=r===void 0?Xt:r,m=c===void 0?Xt.getHistory:c,p=d===void 0?Xt.deleteHistory:d,f=u===void 0?Xt.postQuestion:u,x=l.useAxios(),{ProjectIconComponent:g,texts:y}=w.useContext(l.LuminusComponentsContext),{docsAIChat:h}=y;let b;e[0]!==h.greeting?(b=ae=>[{dateTime:!ae||ae.length<1?new Date(Date.now()):Sl(new Date(ae[0].dateTime),-1),message:{foundInDocs:!1,answer:h.greeting,sources:null,links:null},source:"ai"},...(ae==null?void 0:ae.map(Mu))??[]],e[0]=h.greeting,e[1]=b):b=e[1];const j=b;let S;e[2]!==j||e[3]!==t?(S={dataTransformer:j,enabled:t},e[2]=j,e[3]=t,e[4]=S):S=e[4];const{data:N,setData:v,isLoading:C}=Fe.useGetApiData(m,S),[k,I]=w.useState(""),[T,L]=w.useState(!1),E=w.useRef(null);let D;e[5]!==x||e[6]!==f||e[7]!==v?(D=async ae=>{L(!0),x.get(`${f}?question=${ae}`).then(ke=>{v(Ne=>ke.data.answer?[...Ne??[],{dateTime:new Date(Date.now()),message:ke.data,source:"ai"}]:Ne)}).finally(()=>L(!1))},e[5]=x,e[6]=f,e[7]=v,e[8]=D):D=e[8];const _=D;let P;e[9]!==_||e[10]!==k||e[11]!==v?(P=()=>{k.trim()&&(v(ae=>k?[...ae??[],{dateTime:new Date(Date.now()),message:k,source:"user"}]:ae),_(k),I(""))},e[9]=_,e[10]=k,e[11]=v,e[12]=P):P=e[12];const $=P;let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{var ae;E.current&&(E.current.scrollTop=((ae=E.current)==null?void 0:ae.scrollHeight)??0)},e[13]=R):R=e[13];let F;e[14]!==T||e[15]!==N?(F=[T,N],e[14]=T,e[15]=N,e[16]=F):F=e[16],w.useEffect(R,F);const M=w.useRef(null);let O,B;e[17]!==t?(O=()=>{t&&setTimeout(()=>{var ae;(ae=M.current)==null||ae.focus()},300)},B=[t],e[17]=t,e[18]=O,e[19]=B):(O=e[18],B=e[19]),w.useEffect(O,B);let H;e[20]!==x||e[21]!==p||e[22]!==j||e[23]!==v?(H=()=>{x.delete(p).then(()=>{v(j([]))})},e[20]=x,e[21]=p,e[22]=j,e[23]=v,e[24]=H):H=e[24];const z=H;let W;e[25]!==o?(W=()=>o(!1),e[25]=o,e[26]=W):W=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A={marginTop:"2px",marginRight:"-2px"},e[27]=A):A=e[27];let U;e[28]!==a?(U=s.jsx(a,{height:24,style:A}),e[28]=a,e[29]=U):U=e[29];let K;e[30]!==h.title?(K=s.jsx(Lt.Title,{className:"w-100",children:h.title}),e[30]=h.title,e[31]=K):K=e[31];let V;e[32]!==g?(V=s.jsx(g,{icon:"link"}),e[32]=g,e[33]=V):V=e[33];let G;e[34]!==i||e[35]!==V?(G=s.jsx(l.ContextButton,{className:"me-3 text-nowrap",as:"link",href:i,target:"__blank",children:V}),e[34]=i,e[35]=V,e[36]=G):G=e[36];let Z;e[37]!==G||e[38]!==h.docs?(Z=s.jsx(l.SimpleTooltip,{placement:"bottom",text:h.docs,children:G}),e[37]=G,e[38]=h.docs,e[39]=Z):Z=e[39];let X;e[40]!==U||e[41]!==K||e[42]!==Z?(X=s.jsxs(Lt.Header,{closeButton:!0,children:[U,K,Z]}),e[40]=U,e[41]=K,e[42]=Z,e[43]=X):X=e[43];let le;e[44]!==i||e[45]!==C||e[46]!==N?(le=C?s.jsxs(s.Fragment,{children:[s.jsx(dt,{as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.medium)})}),s.jsx(dt,{className:"d-flex justify-content-end",as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.small)})}),s.jsx(dt,{as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.large)})})]}):N==null?void 0:N.sort(Au).map((ae,ke)=>s.jsxs("div",{className:l.classNames(ct.message,"px-3 py-2",{"align-self-start":ae.source==="ai","bg-primary":ae.source==="ai"&&ae.message.foundInDocs,"bg-info":ae.source==="ai"&&!ae.message.foundInDocs,"bg-darker align-self-end":ae.source==="user"}),children:[s.jsx(l.Typography,{variant:"body",className:ae.source==="ai"?"text-white":"",children:ae.source==="ai"?ae.message.answer:ae.message}),ae.source==="ai"&&ae.message.links&&s.jsx("div",{className:"d-flex gap-2 flex-column mt-3",children:ae.message.links.map(Bu)}),ae.source==="ai"&&ae.message.sources&&ae.message.sources.filter(Ou).length>0&&s.jsxs(s.Fragment,{children:[s.jsxs(l.Typography,{variant:"body2",className:"text-white mt-3 pt-2 border-top",children:["Dokumentace (",ae.message.sources.filter(zu).length,")"]}),s.jsx("div",{className:"d-flex gap-2 flex-row flex-wrap my-2",children:ae.message.sources.filter(Hu).map((Ne,De)=>{var re;return s.jsx("a",{href:`${i}/${(re=Ne.filename.split(".").at(0))==null?void 0:re.split("_").join("/")}`,target:"_blank",className:"overflow-hidden",rel:"noreferrer",children:s.jsxs(No,{color:"light",className:"gap-1 overflow-hidden",children:[s.jsx(l.MdOutlineSource,{}),s.jsx("span",{className:"text-truncate",children:Ne.name})]})},De)})})]})]},ke)),e[44]=i,e[45]=C,e[46]=N,e[47]=le):le=e[47];let q;e[48]!==T?(q=T?s.jsx("div",{className:l.classNames("px-3 py-2 align-self-start bg-info",ct.aiLoadingBubbles),children:s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay)}),s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay200)}),s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay400)})]})}):null,e[48]=T,e[49]=q):q=e[49];let oe;e[50]!==le||e[51]!==q?(oe=s.jsxs("div",{ref:E,className:"h-100 d-flex flex-column overflow-auto gap-3 pb-2 pe-2",children:[le,q]}),e[50]=le,e[51]=q,e[52]=oe):oe=e[52];let ce;e[53]===Symbol.for("react.memo_cache_sentinel")?(ce=ae=>I(ae.target.value??""),e[53]=ce):ce=e[53];let fe;e[54]!==$?(fe=ae=>{ae.key==="Enter"&&$()},e[54]=$,e[55]=fe):fe=e[55];let pe;e[56]!==k||e[57]!==fe||e[58]!==h.yourMessage?(pe=s.jsx(l.Form.Control,{ref:M,type:"text",size:"sm",placeholder:h.yourMessage,value:k,onChange:ce,className:"bg-white",autoFocus:!0,onKeyDown:fe}),e[56]=k,e[57]=fe,e[58]=h.yourMessage,e[59]=pe):pe=e[59];let J;e[60]===Symbol.for("react.memo_cache_sentinel")?(J={height:"29px",width:"50px"},e[60]=J):J=e[60];let Y;e[61]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(l.MdOutlineMessage,{}),e[61]=Y):Y=e[61];let Q;e[62]!==$?(Q=s.jsx(l.PrimaryButton,{style:J,onClick:$,size:"sm",children:Y}),e[62]=$,e[63]=Q):Q=e[63];let ne;e[64]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(l.Dropdown$1.Toggle,{split:!0,variant:"outline-primary",className:"py-0 px-2",style:{height:"29px"}}),e[64]=ne):ne=e[64];let ee;e[65]!==h.clearChat?(ee=s.jsx(l.Typography,{variant:"body",children:h.clearChat}),e[65]=h.clearChat,e[66]=ee):ee=e[66];let te;e[67]!==z||e[68]!==ee?(te=s.jsx(l.Dropdown$1.Menu,{className:"p-0 shadow-sm border",children:s.jsx(l.Dropdown$1.Item,{onClick:z,className:"rounded py-2",children:ee})}),e[67]=z,e[68]=ee,e[69]=te):te=e[69];let se;e[70]!==Q||e[71]!==te?(se=s.jsxs(l.Dropdown$1,{as:Xs,children:[Q,ne,te]}),e[70]=Q,e[71]=te,e[72]=se):se=e[72];let ue;e[73]!==pe||e[74]!==se?(ue=s.jsxs("div",{className:"d-flex rounded gap-1 align-items-center p-2 border-top bg-darker mt-2",children:[pe,se]}),e[73]=pe,e[74]=se,e[75]=ue):ue=e[75];let me;e[76]!==oe||e[77]!==ue?(me=s.jsxs(Lt.Body,{className:"offcanvas-wide d-flex flex-column overflow-hidden pt-0 mt-1",children:[oe,ue]}),e[76]=oe,e[77]=ue,e[78]=me):me=e[78];let be;return e[79]!==t||e[80]!==W||e[81]!==X||e[82]!==me?(be=s.jsxs(Lt,{placement:"end",show:t,onHide:W,children:[X,me]}),e[79]=t,e[80]=W,e[81]=X,e[82]=me,e[83]=be):be=e[83],be};function Mu(n){return{dateTime:new Date(n.dateTime),message:n.source==="ai"?JSON.parse(n.message):n.message,source:n.source}}function Au(n,e){return n.dateTime.getTime()-e.dateTime.getTime()}function Bu(n,e){return s.jsx(we.Link,{to:n.path,children:s.jsxs(l.Button,{variant:"light",size:"sm",className:"w-100 d-flex justify-content-between align-items-center gap-1",children:[n.name,s.jsx(l.MdOutlineCallMade,{})]})},e)}function Ou(n){return n.filename.includes("_")}function zu(n){return n.filename.includes("_")}function Hu(n){return n.filename.includes("_")}const Wn=["slice","options","formats","conditions"],Vs=n=>{const e=n.current.flexmonster.getReport({withDefaults:!0});if(typeof e=="string")throw alert("report is string"),new Error("report is string");const t={};return Wn.forEach(o=>{t[o]=e[o]}),JSON.stringify(t)},Vu=n=>{if(n.settings){const e=JSON.parse(n.settings);return Wn.forEach(t=>{e[t]===void 0&&(e[t]=null)}),e}return{}},Uu=n=>{const e={};return Wn.forEach(t=>{e[t]=(n==null?void 0:n[t])??void 0}),e},Wu=n=>n&&n.type==="header"&&n.member&&n.member.caption!=="All"&&n.label==="",Us=(n,e)=>n.hierarchy&&n.hierarchy.uniqueName===e,Ws=n=>!n.member&&!n.isDrillThrough,Gs=(n,e)=>typeof n=="function"?n(e):n.replace(":id",e),dl=({dataSource:n,settings:e,pivotRef:t,localization:o,licenseKey:a,hyperlinkColumn:i,roomPasportization:r,enabled:c=!0})=>{const{texts:{reports:d}}=w.useContext(l.LuminusComponentsContext),[u,m]=w.useState(!1),p=w.useRef(null),f=t??p,x=w.useMemo(()=>({localization:o}),[o]),g=w.useCallback(v=>{const C=v.find(I=>I.id==="fm-tab-export");if((C==null?void 0:C.menu)==null||f.current==null)return v;const k=C.menu.find(I=>I.id==="fm-tab-export-pdf");return k&&(k.handler=()=>{f.current.flexmonster.exportTo("pdf",{useCustomizeCellForData:!0,fontUrl:"https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf"})}),v},[f]),y=w.useCallback(v=>{v=g(v),delete v[0],delete v[1],delete v[2];const C=[{id:"fm-tab-expand",title:d.expandAll,handler:f.current.flexmonster.expandAllData,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'},{id:"fm-tab-collapse",title:d.collapseAll,handler:f.current.flexmonster.collapseAllData,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'}];return v.unshift({id:"fm-tab-expand",title:d.expand,icon:'<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',menu:C,rightGroup:!0}),v},[f,d.collapseAll,d.expand,d.expandAll,g]),h=v=>{const C=v.getTabs();v.getTabs=()=>y(C)},b=w.useMemo(()=>n&&n.mapping?Object.values(n.mapping).filter(v=>v.caption.includes("P:")).map(v=>({uniqueName:v.caption.replace("P:",""),caption:v.caption})):[],[n]),j=w.useMemo(()=>{var C,k,I,T;const v=(C=f.current)==null?void 0:C.flexmonster.getReport();return v&&v.slice?{...v.slice,rows:[...((k=v.slice.rows)==null?void 0:k.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b],columns:[...((I=v.slice.columns)==null?void 0:I.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b],measures:[...((T=v.slice.measures)==null?void 0:T.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b]}:null},[b,f]);w.useEffect(()=>{var v,C,k,I;if(u&&c){if(r&&j){const T=(v=f.current)==null?void 0:v.flexmonster.getReport(),L=T&&T.options?{...T.options,grid:{...(C=T.options)==null?void 0:C.grid,autoSwitchToCompact:!1}}:{};(k=f.current)==null||k.flexmonster.setReport({...T,dataSource:n,slice:j,options:L})}else(I=f.current)==null||I.flexmonster.updateData(n);console.log("Updating flexmonster dataSource to: ",n)}},[n,c,u,b,f,r,j]),w.useEffect(()=>{var I,T,L,E,D;if(!u||!c||e==null)return;const v=(I=f.current)==null?void 0:I.flexmonster.getReport();if(v===void 0||typeof v=="string")return;const C=Uu(e);C.options={...e==null?void 0:e.options,grid:{...(T=e==null?void 0:e.options)==null?void 0:T.grid,autoSwitchToCompact:!1},showFieldListSearch:!0,datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm:ss",timePattern:"HH:mm:ss"},r&&(C.slice={...e==null?void 0:e.slice,rows:[...((E=(L=e==null?void 0:e.slice)==null?void 0:L.rows)==null?void 0:E.filter(_=>{var P;return!((P=_.caption)!=null&&P.includes("P:"))}))??[],...b]});const k={...v,...C};(D=f.current)==null||D.flexmonster.setReport(k)},[c,u,b,f,r,e]);const S=w.useCallback((v,C)=>{var $,R,F;const k=C==null?void 0:C.value,I=C==null?void 0:C.label;if(Wu(C)){v.text=(($=C.member)==null?void 0:$.caption)??"";const M=v.style["padding-left"]??"4px",O=parseInt(M,10);v.style["padding-left"]=O+11+"px"}if(typeof k=="number"&&!Number.isFinite(k)&&C.type==="value"&&((R=C==null?void 0:C.measure)==null?void 0:R.type)==="number"&&(I==="Infinity"||I==="-Infinity"||I==="NaN")&&(v.text=""),!i||!Us(C,i.idColumn)||Ws(C))return;const T=(F=C.escapedLabel)==null?void 0:F.toString();if(T===void 0)return;const L=Gs(i.url,T),E="style='color: #00a45a; text-decoration: underline; cursor: pointer;'",D=C.type==="header"?"onclick='event.stopImmediatePropagation()'":"",_=C.isDrillThrough||C.type==="header"?`href='${L}' target='_blank'`:"";v.style&&(v.style["z-index"]=1);const P=`<a ${_} ${E} ${D}>${C.escapedLabel}</a>`;v.text=P},[i]),N=w.useCallback(v=>{if(!i||!Us(v,i.idColumn)||Ws(v))return;const C=Gs(i.url,v.escapedLabel??"");window.open(C??"","_blank","noreferrer")},[i]);return s.jsx(s.Fragment,{children:s.jsx(yl.Pivot,{ref:f,global:x,licenseKey:a,toolbar:!0,height:"100%",beforetoolbarcreated:h,ready:()=>{m(!0)},width:"100%",customizeCell:S,cellclick:N})})},Gu=(n,e,t,o)=>{const{texts:{reports:a}}=w.useContext(l.LuminusComponentsContext),{prompt:i}=l.usePrompt(),{confirm:r}=l.useConfirm(),c=l.useAxios(),{user:d}=w.useContext(l.UserContext),{startLoading:u,stopLoading:m}=w.useContext(l.LoadingContext),{addNotification:p}=l.useNotifications(),f=w.useCallback(async j=>{u("report-versionSavingAs");try{const S=await c.post("/reports/version",j);p(a.saveSuccessful,"success"),await o(S.data)}finally{m("report-versionSavingAs")}},[p,o,c,a.saveSuccessful,u,m]),x=w.useCallback(async()=>{if(t===null){p("none open","warning");return}if(!await r(a.confirmOverwriteSave))return;const S=Vs(e);f({reportSourceName:n,reportVersionId:t,settings:S})},[p,r,e,n,a.confirmOverwriteSave,f,t]),g=w.useCallback(async()=>{const j=await i(a.enterName,{input:"input",required:!0});if(j===null)return;const S=Vs(e);f({reportSourceName:n,name:j,settings:S})},[e,i,n,a.enterName,f]),y=w.useCallback(async()=>{u("report-versionSavingAs");try{await c.put("/reports/archive",{reportVersionId:t??void 0,reportSourceName:n}),p(a.deleteSuccessful,"success")}finally{m("report-versionSavingAs")}},[p,c,n,a.deleteSuccessful,t,u,m]),h=w.useCallback(async()=>{u("report-versionSavingAs");try{await c.post("/reports/version-restrictions",{reportVersionId:t??void 0,userRestricts:[{employeeId:d.personalNumber,addRights:!1}]}),p(a.detachSuccessful,"success")}finally{m("report-versionSavingAs")}},[p,c,a.detachSuccessful,t,u,m,d.personalNumber]),b=w.useCallback(async j=>{if(t===null){p(a.noReportVersionSelected,"warning");return}u("report-versionRenaming");try{await c.put("/reports/rename",{reportVersionId:t,reportSourceName:n,newName:j}),p(a.renameSuccessful,"success")}finally{m("report-versionRenaming")}},[p,c,a.renameSuccessful,a.noReportVersionSelected,t,n,u,m]);return{saveAs:g,save:x,archive:y,detach:h,rename:b}},Ku=n=>{const e=l.useAxios(),{startLoading:t,stopLoading:o}=w.useContext(l.LoadingContext);return{changeEmployeeRights:w.useCallback(async(i,r)=>{let c=null;t("reportSharing-addPerson");try{c=(await e.post("/reports/version-restrictions",{reportVersionId:n,userRestricts:[{employeeId:i,addRights:r}]})).data}finally{o("reportSharing-addPerson")}return c},[e,n,t,o])}},qu=n=>{const e=l.compilerRuntimeExports.c(50),{isOpen:t,onHide:o,usersData:a,reportVersionId:i,EmployeePicker:r,setReportVersion:c}=n,{ProjectIconComponent:d,texts:u}=w.useContext(l.LuminusComponentsContext),{reports:m}=u,{confirm:p}=l.useConfirm(),[f,x]=w.useState(null),{changeEmployeeRights:g}=Ku(i);let y;e[0]!==c||e[1]!==a?(y=M=>{const O=typeof M=="function"?M(a??[]):M;c(B=>B===null?null:{...B,users:O.filter(Yu)})},e[0]=c,e[1]=a,e[2]=y):y=e[2];const h=y;let b;e[3]!==f||e[4]!==g||e[5]!==h?(b=async()=>{if(f===null)return;const O=(await g(f.id,!0)).map(Qu);h(B=>[...B,...O]),x(null)},e[3]=f,e[4]=g,e[5]=h,e[6]=b):b=e[6];const j=b;let S;e[7]!==g||e[8]!==p||e[9]!==m||e[10]!==h?(S=async M=>{if(!await p(m.removeSharingWith(M)))return;await g(M,!1)&&h(H=>(H==null?void 0:H.filter(z=>z.id!==M))??[])},e[7]=g,e[8]=p,e[9]=m,e[10]=h,e[11]=S):S=e[11];const N=S;let v;e[12]!==m.reportSharing?(v=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.reportSharing})}),e[12]=m.reportSharing,e[13]=v):v=e[13];let C;e[14]!==m.sharedWith?(C=s.jsx(l.Typography,{variant:"h6",children:m.sharedWith}),e[14]=m.sharedWith,e[15]=C):C=e[15];let k;e[16]!==m.noone||e[17]!==a?(k=a&&a.length===0?s.jsx("div",{className:"px-2 text-muted",children:m.noone.toLowerCase()}):null,e[16]=m.noone,e[17]=a,e[18]=k):k=e[18];let I;e[19]!==d||e[20]!==N||e[21]!==a?(I=a==null?void 0:a.map(M=>s.jsxs(l.ListGroupItem,{className:"d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1",children:[M.lastName," ",M.firstName," [",M.id,"]",s.jsx(l.IconButton,{color:"danger",onClick:()=>N(M.id),children:s.jsx(d,{icon:"delete"})})]},M.id)),e[19]=d,e[20]=N,e[21]=a,e[22]=I):I=e[22];let T;e[23]!==k||e[24]!==I?(T=s.jsxs(l.ListGroup,{variant:"flush",children:[k,I]}),e[23]=k,e[24]=I,e[25]=T):T=e[25];let L;e[26]!==m.addSharing?(L=s.jsx(l.Typography,{variant:"h6",className:"mt-2 mb-2",children:m.addSharing}),e[26]=m.addSharing,e[27]=L):L=e[27];let E;e[28]===Symbol.for("react.memo_cache_sentinel")?(E=M=>{if(M===null||typeof M.id!="number"){x(null);return}x(M)},e[28]=E):E=e[28];let D;e[29]!==r||e[30]!==f||e[31]!==m.shareWith?(D=s.jsx("div",{className:"flex-grow-1",children:s.jsx(r,{label:m.shareWith,onSelect:E,value:f})}),e[29]=r,e[30]=f,e[31]=m.shareWith,e[32]=D):D=e[32];const _=f===null;let P;e[33]!==j||e[34]!==m.add||e[35]!==_?(P=s.jsx(l.PrimaryButton,{onClick:j,disabled:_,children:m.add}),e[33]=j,e[34]=m.add,e[35]=_,e[36]=P):P=e[36];let $;e[37]!==D||e[38]!==P?($=s.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[D,P]}),e[37]=D,e[38]=P,e[39]=$):$=e[39];let R;e[40]!==L||e[41]!==$||e[42]!==C||e[43]!==T?(R=s.jsxs(l.Modal.Body,{children:[C,T,L,$]}),e[40]=L,e[41]=$,e[42]=C,e[43]=T,e[44]=R):R=e[44];let F;return e[45]!==t||e[46]!==o||e[47]!==R||e[48]!==v?(F=s.jsxs(l.Modal,{show:t,onHide:o,children:[v,R]}),e[45]=t,e[46]=o,e[47]=R,e[48]=v,e[49]=F):F=e[49],F};function Yu(n){return n.isReportOwner===!1}function Qu(n){return{id:n.user.id,kid:n.user.kid,firstName:n.user.firstName,lastName:n.user.lastName,isReportOwner:!1}}const Zu=(n,e)=>{const t=l.compilerRuntimeExports.c(6),[o,a]=w.useState(null);let i,r;t[0]!==e||t[1]!==n?(i=()=>{n.then(d=>{const{default:u}=d,m=e!==void 0?e(u):u;a(m)})},r=[e,n],t[0]=e,t[1]=n,t[2]=i,t[3]=r):(i=t[2],r=t[3]),w.useEffect(i,r);let c;return t[4]!==o?(c={mappings:o},t[4]=o,t[5]=c):c=t[5],c},Xu=n=>{var Ie;const e=l.compilerRuntimeExports.c(151),{reportType:t,title:o,data:a,filterElements:i,getReportRoute:r,localization:c,licenseKey:d,EmployeePicker:u,localizationJsonFile:m,localizationTransformer:p,hyperlinkColumn:f,roomPasportization:x}=n,g=x===void 0?!1:x,{texts:y}=w.useContext(l.LuminusComponentsContext),{reports:h}=y,{confirm:b}=l.useConfirm(),{prompt:j}=l.usePrompt(),S=we.useNavigate(),[N]=we.useSearchParams(),{id:v}=we.useParams(),C=v===void 0?null:Number(v);let k;e[0]!==r||e[1]!==S||e[2]!==t||e[3]!==N?(k=ve=>{const Be=ve===null?"":ve.toString();S(we.generatePath(r(t),{id:Be})+"?"+N.toString(),{replace:!0,flushSync:!0})},e[0]=r,e[1]=S,e[2]=t,e[3]=N,e[4]=k):k=e[4];const I=k,[T,L]=w.useState(!1),E=w.useRef(null),{user:D}=w.useContext(l.UserContext),{data:_,reloadData:P}=Fe.useGetApiData(`/reports/${t}`),{mappings:$}=Zu(m,p),[R,F]=w.useState(void 0);let M;e[5]!==I?(M=ve=>{const Be=ve.target.value,xt=Be===""?null:Number(Be);I(xt)},e[5]=I,e[6]=M):M=e[6];const O=M;let B;e[7]!==P||e[8]!==I?(B=async ve=>{await P(),I(ve)},e[7]=P,e[8]=I,e[9]=B):B=e[9];const H=B,z=C!==null;let W;e[10]!==z?(W={enabled:z,nullStateBeforeLoad:!1,nullStateOnFail:!0},e[10]=z,e[11]=W):W=e[11];const{data:A,setData:U,isLoading:K,reloadData:V}=Fe.useGetApiData(`/reports/version/${C}`,W);let G,Z;e[12]!==K||e[13]!==A?(G=()=>{var Be;if(K){F(void 0);return}if(A===null){F({});return}const ve=Vu(A)??{};F(ve),(Be=E.current)==null||Be.flexmonster.refresh()},Z=[A,K],e[12]=K,e[13]=A,e[14]=G,e[15]=Z):(G=e[14],Z=e[15]),w.useEffect(G,Z);const{save:X,saveAs:le,archive:q,detach:oe,rename:ce}=Gu(t,E,C,H);let fe;e[16]!==a?(fe=a??[],e[16]=a,e[17]=fe):fe=e[17];const pe=$??void 0;let J;e[18]!==fe||e[19]!==pe?(J={data:fe,mapping:pe},e[18]=fe,e[19]=pe,e[20]=J):J=e[20];const Y=J;let Q;e[21]!==b||e[22]!==Y||e[23]!==h.confirmRevertChanges||e[24]!==R?(Q=async()=>{var Be;await b(h.confirmRevertChanges)&&((Be=E.current)==null||Be.flexmonster.setReport({dataSource:Y,...R}))},e[21]=b,e[22]=Y,e[23]=h.confirmRevertChanges,e[24]=R,e[25]=Q):Q=e[25];const ne=Q;let ee;e[26]!==(A==null?void 0:A.ownerId)||e[27]!==D.personalNumber?(ee=()=>(A==null?void 0:A.ownerId)===D.personalNumber,e[26]=A==null?void 0:A.ownerId,e[27]=D.personalNumber,e[28]=ee):ee=e[28],A==null||A.ownerId;const te=ee();A==null||A.users;let se;e[29]!==(A==null?void 0:A.users)||e[30]!==D.personalNumber?(se=(Ie=A==null?void 0:A.users)==null?void 0:Ie.some(ve=>ve.id===D.personalNumber&&!ve.isReportOwner),e[29]=A==null?void 0:A.users,e[30]=D.personalNumber,e[31]=se):se=e[31];const ue=se;let me;e[32]!==q||e[33]!==b||e[34]!==P||e[35]!==(A==null?void 0:A.name)||e[36]!==h||e[37]!==I?(me=async()=>{await b(h.confirmDelete(A==null?void 0:A.name))&&(await q(),I(null),await P())},e[32]=q,e[33]=b,e[34]=P,e[35]=A==null?void 0:A.name,e[36]=h,e[37]=I,e[38]=me):me=e[38],A==null||A.name;const be=me;let ae;e[39]!==b||e[40]!==oe||e[41]!==P||e[42]!==(A==null?void 0:A.name)||e[43]!==h||e[44]!==I?(ae=async()=>{await b(h.confirmDetach(A==null?void 0:A.name))&&(await oe(),I(null),await P())},e[39]=b,e[40]=oe,e[41]=P,e[42]=A==null?void 0:A.name,e[43]=h,e[44]=I,e[45]=ae):ae=e[45],A==null||A.name;const ke=ae;let Ne;e[46]!==j||e[47]!==P||e[48]!==V||e[49]!==ce||e[50]!==h.enterNewName?(Ne=async()=>{const ve=await j(h.enterNewName,{input:"input",required:!0});ve!==null&&(await ce(ve),await Promise.allSettled([P(),V()]))},e[46]=j,e[47]=P,e[48]=V,e[49]=ce,e[50]=h.enterNewName,e[51]=Ne):Ne=e[51];const De=Ne;let re;e[52]!==(_==null?void 0:_.reportVersions)||e[53]!==C||e[54]!==I?(re=()=>{var ve,Be;C===null&&I(((ve=_==null?void 0:_.reportVersions.find(Ju))==null?void 0:ve.reportVersionId)??((Be=_==null?void 0:_.reportVersions[0])==null?void 0:Be.reportVersionId)??null)},e[52]=_==null?void 0:_.reportVersions,e[53]=C,e[54]=I,e[55]=re):re=e[55];const he=_==null?void 0:_.reportVersions;let ye;e[56]!==C||e[57]!==I||e[58]!==he?(ye=[he,C,I],e[56]=C,e[57]=I,e[58]=he,e[59]=ye):ye=e[59],w.useEffect(re,ye);let de;e[60]!==o?(de=s.jsx(l.Typography,{variant:"h3",children:o}),e[60]=o,e[61]=de):de=e[61];const xe=C??void 0;let je;e[62]!==(_==null?void 0:_.reportVersions)?(je=_==null?void 0:_.reportVersions.filter(em).map(tm),e[62]=_==null?void 0:_.reportVersions,e[63]=je):je=e[63];let $e;e[64]!==h.versionSelectSystem||e[65]!==je?($e=s.jsx("optgroup",{label:h.versionSelectSystem,children:je}),e[64]=h.versionSelectSystem,e[65]=je,e[66]=$e):$e=e[66];let Pe;e[67]!==(_==null?void 0:_.reportVersions)||e[68]!==D.personalNumber?(Pe=_==null?void 0:_.reportVersions.filter(ve=>ve.ownerId===D.personalNumber).map(nm),e[67]=_==null?void 0:_.reportVersions,e[68]=D.personalNumber,e[69]=Pe):Pe=e[69];let ze;e[70]!==h.versionSelectYour||e[71]!==Pe?(ze=s.jsx("optgroup",{label:h.versionSelectYour,children:Pe}),e[70]=h.versionSelectYour,e[71]=Pe,e[72]=ze):ze=e[72];let Ee;e[73]!==(_==null?void 0:_.reportVersions)||e[74]!==D.personalNumber?(Ee=_==null?void 0:_.reportVersions.filter(ve=>ve.isSystem===!1&&ve.ownerId!==D.personalNumber).map(sm),e[73]=_==null?void 0:_.reportVersions,e[74]=D.personalNumber,e[75]=Ee):Ee=e[75];let Me;e[76]!==h.versionSelectSharedWithYou||e[77]!==Ee?(Me=s.jsx("optgroup",{label:h.versionSelectSharedWithYou,children:Ee}),e[76]=h.versionSelectSharedWithYou,e[77]=Ee,e[78]=Me):Me=e[78];let He;e[79]!==O||e[80]!==xe||e[81]!==$e||e[82]!==ze||e[83]!==Me?(He=s.jsxs(l.FormSelect,{size:"sm",value:xe,onChange:O,children:[$e,ze,Me]}),e[79]=O,e[80]=xe,e[81]=$e,e[82]=ze,e[83]=Me,e[84]=He):He=e[84];let Te;e[85]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(l.MdSave,{}),e[85]=Te):Te=e[85];const Le=C===null||(A==null?void 0:A.isSystem)||!te;let Ve;e[86]!==h.save||e[87]!==X||e[88]!==Le?(Ve=s.jsx(l.ContextButton,{icon:Te,onClick:X,disabled:Le,children:h.save}),e[86]=h.save,e[87]=X,e[88]=Le,e[89]=Ve):Ve=e[89];let Ae;e[90]===Symbol.for("react.memo_cache_sentinel")?(Ae=s.jsx(l.MdSaveAs,{}),e[90]=Ae):Ae=e[90];let Ue;e[91]!==h.saveAs||e[92]!==le?(Ue=s.jsx(l.ContextButton,{icon:Ae,onClick:le,className:"flex-shrink-0",children:h.saveAs}),e[91]=h.saveAs,e[92]=le,e[93]=Ue):Ue=e[93];let Xe;e[94]===Symbol.for("react.memo_cache_sentinel")?(Xe=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[94]=Xe):Xe=e[94];let Je;e[95]!==ne||e[96]!==h.revertChanges?(Je=s.jsx(l.DropdownItem,{onClick:ne,children:h.revertChanges}),e[95]=ne,e[96]=h.revertChanges,e[97]=Je):Je=e[97];let et;e[98]===Symbol.for("react.memo_cache_sentinel")?(et=()=>L(!0),e[98]=et):et=e[98];const it=!te||(A==null?void 0:A.isSystem);let We;e[99]!==h.share||e[100]!==it?(We=s.jsx(l.DropdownItem,{onClick:et,disabled:it,children:h.share}),e[99]=h.share,e[100]=it,e[101]=We):We=e[101];let Ge;e[102]!==De||e[103]!==te||e[104]!==(A==null?void 0:A.isSystem)||e[105]!==h.rename?(Ge=te&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{onClick:De,children:h.rename}):null,e[102]=De,e[103]=te,e[104]=A==null?void 0:A.isSystem,e[105]=h.rename,e[106]=Ge):Ge=e[106];let Ke;e[107]!==be||e[108]!==te||e[109]!==(A==null?void 0:A.isSystem)||e[110]!==h.delete?(Ke=te&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{color:"danger",onClick:be,children:h.delete}):null,e[107]=be,e[108]=te,e[109]=A==null?void 0:A.isSystem,e[110]=h.delete,e[111]=Ke):Ke=e[111];let qe;e[112]!==ke||e[113]!==ue||e[114]!==(A==null?void 0:A.isSystem)||e[115]!==h.detach?(qe=ue&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{color:"danger",onClick:ke,children:h.detach}):null,e[112]=ke,e[113]=ue,e[114]=A==null?void 0:A.isSystem,e[115]=h.detach,e[116]=qe):qe=e[116];let tt;e[117]!==Je||e[118]!==We||e[119]!==Ge||e[120]!==Ke||e[121]!==qe?(tt=s.jsxs(l.Dropdown,{toggle:Xe,children:[Je,We,Ge,Ke,qe]}),e[117]=Je,e[118]=We,e[119]=Ge,e[120]=Ke,e[121]=qe,e[122]=tt):tt=e[122];let Ye;e[123]!==He||e[124]!==Ve||e[125]!==Ue||e[126]!==tt?(Ye=s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[He,Ve,Ue,tt]}),e[123]=He,e[124]=Ve,e[125]=Ue,e[126]=tt,e[127]=Ye):Ye=e[127];let Qe;e[128]!==i||e[129]!==de||e[130]!==Ye?(Qe=s.jsxs("div",{className:"d-flex justify-content-start gap-3 align-items-center",children:[de,i,Ye]}),e[128]=i,e[129]=de,e[130]=Ye,e[131]=Qe):Qe=e[131];let Ze;e[132]!==Y||e[133]!==f||e[134]!==d||e[135]!==c||e[136]!==h.emptyReportDataSource||e[137]!==g||e[138]!==R?(Ze=Y.data&&Y.data.length>0?s.jsx("div",{className:"h-100 w-100",children:s.jsx(dl,{dataSource:Y,settings:R,pivotRef:E,enabled:Y.data&&Y.data.length>0,roomPasportization:g,localization:c,licenseKey:d,hyperlinkColumn:f})}):s.jsx(l.Alert,{children:h.emptyReportDataSource}),e[132]=Y,e[133]=f,e[134]=d,e[135]=c,e[136]=h.emptyReportDataSource,e[137]=g,e[138]=R,e[139]=Ze):Ze=e[139];let nt;e[140]!==Qe||e[141]!==Ze?(nt=s.jsx(l.PageContainer,{variant:"fullScreen",title:Qe,children:Ze}),e[140]=Qe,e[141]=Ze,e[142]=nt):nt=e[142];let ge;e[143]!==u||e[144]!==T||e[145]!==A||e[146]!==U?(ge=A!==null?s.jsx(qu,{isOpen:T,onHide:()=>L(!1),usersData:A.users??null,setReportVersion:U,reportVersionId:A==null?void 0:A.reportVersionId,EmployeePicker:u}):null,e[143]=u,e[144]=T,e[145]=A,e[146]=U,e[147]=ge):ge=e[147];let Ce;return e[148]!==nt||e[149]!==ge?(Ce=s.jsxs(s.Fragment,{children:[nt,ge]}),e[148]=nt,e[149]=ge,e[150]=Ce):Ce=e[150],Ce};function Ju(n){return n.isSystem===!0}function em(n){return n.isSystem===!0}function tm(n){return s.jsx("option",{value:n.reportVersionId,children:n.name},n.reportVersionId)}function nm(n){return s.jsx("option",{value:n.reportVersionId,children:n.name},n.reportVersionId)}function sm(n){return s.jsx("option",{value:n.reportVersionId,children:`${n.name} [${n.ownerId}]`},n.reportVersionId)}const om=n=>{const e=l.compilerRuntimeExports.c(2),{cell:t}=n,{value:o}=t;let a;return e[0]!==o?(a=s.jsx(s.Fragment,{children:o?s.jsx(cn,{name:o,size:21,fontSize:12}):s.jsx(s.Fragment,{})}),e[0]=o,e[1]=a):a=e[1],a},lm=n=>{const e=l.compilerRuntimeExports.c(9),{knownTypes:t,typeFilters:o,onChangeTypeFilters:a}=n;let i;if(e[0]!==t||e[1]!==a||e[2]!==o){let c;e[4]!==a||e[5]!==o?(c=d=>s.jsx("div",{role:"button",style:{height:"14px",width:"14px",borderRadius:"50%",border:"2px solid transparent",backgroundColor:"transparent"},className:l.classNames(`border-${d}`,o.includes(d)&&`bg-${d}`),onClick:()=>{o.includes(d)?a(o.filter(u=>u!==d)):a([...o,d])}},d),e[4]=a,e[5]=o,e[6]=c):c=e[6],i=t.map(c),e[0]=t,e[1]=a,e[2]=o,e[3]=i}else i=e[3];let r;return e[7]!==i?(r=s.jsx("div",{className:"mb-1 d-flex justify-content-center gap-2",children:i}),e[7]=i,e[8]=r):r=e[8],r},am=n=>{const e=l.compilerRuntimeExports.c(4),{linksTo:t,onClick:o,children:a}=n;let i;return e[0]!==a||e[1]!==t||e[2]!==o?(i=t?s.jsx(we.Link,{to:t,className:"text-decoration-none",onClick:o,children:a}):s.jsx(s.Fragment,{children:a}),e[0]=a,e[1]=t,e[2]=o,e[3]=i):i=e[3],i},im=n=>{const e=l.compilerRuntimeExports.c(40),{message:t,onDeleteMessage:o,onClickMessage:a,getIcon:i,getLinksTo:r}=n,{ProjectIconComponent:c,localizationContext:d}=w.useContext(l.LuminusComponentsContext),{dateFnsLocale:u}=w.useContext(d);let m;if(e[0]!==u||e[1]!==t.dateTime){const T=t.dateTime?l.parseISO(t.dateTime):null,L=T?Nl(new Date(Date.now()),T):0;m=T&&s.jsx("div",{className:"d-flex justify-content-end",children:s.jsx(l.SimpleTooltip,{text:l.format(T,"dd.MM.yyyy HH:mm"),placement:"left",children:s.jsx("div",{children:s.jsx(l.Typography,{variant:"caption",children:L>2?l.format(T,"dd.MM.yyyy"):Il(T,new Date(Date.now()),{locale:u.code})})})})}),e[0]=u,e[1]=t.dateTime,e[2]=m}else m=e[2];let p;e[3]!==r||e[4]!==t?(p=r(t)??void 0,e[3]=r,e[4]=t,e[5]=p):p=e[5];const f=t.type;let x;e[6]!==i||e[7]!==t?(x=i(t),e[6]=i,e[7]=t,e[8]=x):x=e[8];let g;e[9]!==t.subject?(g=s.jsx(l.Typography,{variant:"body2",className:"fw-bold",children:t.subject}),e[9]=t.subject,e[10]=g):g=e[10];let y;e[11]!==t.id||e[12]!==o?(y=T=>{T.preventDefault(),T.stopPropagation(),o(t.id)},e[11]=t.id,e[12]=o,e[13]=y):y=e[13];let h;e[14]!==c?(h=s.jsx(c,{icon:"delete"}),e[14]=c,e[15]=h):h=e[15];let b;e[16]!==y||e[17]!==h?(b=s.jsx(l.IconButton,{size:"sm",onClick:y,children:h}),e[16]=y,e[17]=h,e[18]=b):b=e[18];let j;e[19]!==g||e[20]!==b?(j=s.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-3",children:[g,b]}),e[19]=g,e[20]=b,e[21]=j):j=e[21];let S;e[22]!==t.text?(S=s.jsx(l.Typography,{variant:"body2",children:t.text}),e[22]=t.text,e[23]=S):S=e[23];let N;e[24]!==S||e[25]!==j?(N=s.jsxs("div",{className:"d-flex flex-column gap-1 w-100",children:[j,S]}),e[24]=S,e[25]=j,e[26]=N):N=e[26];let v;e[27]!==N||e[28]!==x?(v=s.jsxs("div",{className:"d-flex align-items-start gap-2",children:[x,N]}),e[27]=N,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==t.type||e[31]!==v?(C=s.jsx(zo,{level:f,noIcon:!0,children:v}),e[30]=t.type,e[31]=v,e[32]=C):C=e[32];let k;e[33]!==a||e[34]!==C||e[35]!==p?(k=s.jsx(am,{linksTo:p,onClick:a,children:C}),e[33]=a,e[34]=C,e[35]=p,e[36]=k):k=e[36];let I;return e[37]!==m||e[38]!==k?(I=s.jsxs("div",{children:[m,k]}),e[37]=m,e[38]=k,e[39]=I):I=e[39],I},Ks=["info","warning","danger"],qs=n=>{const e=l.compilerRuntimeExports.c(23),{messages:t,isLoading:o,onDeleteMessage:a,onClickMessage:i,getIcon:r,getLinksTo:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{messageBoard:u}=d,[m,p]=w.useState(Ks);let f;if(e[0]!==t||e[1]!==m){let S;e[3]!==m?(S=N=>m.includes(N.type??""),e[3]=m,e[4]=S):S=e[4],f=t.filter(S),e[0]=t,e[1]=m,e[2]=f}else f=e[2];const x=f;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=S=>p(S),e[5]=g):g=e[5];let y;e[6]!==m?(y=s.jsx(lm,{knownTypes:Ks,typeFilters:m,onChangeTypeFilters:g}),e[6]=m,e[7]=y):y=e[7];let h;e[8]!==o?(h=o&&s.jsxs("div",{className:"p-3 w-100",children:[s.jsx(dt,{as:ns.Title,animation:"glow",children:s.jsx(dt,{xs:6})}),s.jsxs(dt,{as:ns.Text,animation:"glow",children:[s.jsx(dt,{xs:7})," ",s.jsx(dt,{xs:4})," ",s.jsx(dt,{xs:4})," ",s.jsx(dt,{xs:6})," ",s.jsx(dt,{xs:8})]})]}),e[8]=o,e[9]=h):h=e[9];let b;e[10]!==x||e[11]!==r||e[12]!==c||e[13]!==o||e[14]!==u||e[15]!==t.length||e[16]!==i||e[17]!==a?(b=!o&&s.jsxs(s.Fragment,{children:[t.length===0&&s.jsx(l.Alert,{variant:"info",size:"sm",className:"mt-2",children:u.noMessages}),s.jsx("div",{className:"h-100 overflow-y-auto d-flex flex-column gap-2 luminus-thin-scrollbar",children:x.map(S=>s.jsx(im,{message:S,onDeleteMessage:a,onClickMessage:i,getIcon:r,getLinksTo:c},S.id))})]}),e[10]=x,e[11]=r,e[12]=c,e[13]=o,e[14]=u,e[15]=t.length,e[16]=i,e[17]=a,e[18]=b):b=e[18];let j;return e[19]!==y||e[20]!==h||e[21]!==b?(j=s.jsxs("div",{className:"h-100 d-flex flex-column overflow-hidden",children:[y,h,b]}),e[19]=y,e[20]=h,e[21]=b,e[22]=j):j=e[22],j},Cn={apiGet:"/messageBoard",apiDelete:"/messageBoard/"},rm=n=>{const e=l.compilerRuntimeExports.c(25),{renderAsNotifPanel:t,notifIcon:o,apiUrls:a,getIcon:i,getLinksTo:r}=n,{apiGet:c,apiDelete:d}=a===void 0?Cn:a,u=c===void 0?Cn.apiGet:c,m=d===void 0?Cn.apiDelete:d,p=l.useAxios();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[x,g]=w.useState(f),[y,h]=w.useState(!1),[b,j]=w.useState(!1),[S,N]=w.useState(!1);let v;e[1]!==u||e[2]!==p?(v=async()=>{j(!0),await p.get(u).then(F=>{const{data:M}=F;g(M),h(!0),j(!1)}).catch(()=>{g([]),j(!1)})},e[1]=u,e[2]=p,e[3]=v):v=e[3];const C=v;let k;e[4]!==m||e[5]!==p?(k=async F=>p.delete(`${m}${F}`).then(cm).catch(dm),e[4]=m,e[5]=p,e[6]=k):k=e[6];const I=k;let T;e[7]!==I||e[8]!==x?(T=F=>{I(F).then(M=>{M&&g(x.filter(O=>O.id!==F))})},e[7]=I,e[8]=x,e[9]=T):T=e[9];const L=T;let E,D;e[10]!==C?(E=()=>{C();const F=setInterval(()=>C(),6e4);return()=>{clearInterval(F)}},D=[C],e[10]=C,e[11]=E,e[12]=D):(E=e[11],D=e[12]),w.useEffect(E,D);let _;e[13]!==x?(_=x.filter(um),e[13]=x,e[14]=_):_=e[14];const P=_.length,$=y?!1:b;let R;return e[15]!==P||e[16]!==$||e[17]!==i||e[18]!==r||e[19]!==x||e[20]!==o||e[21]!==L||e[22]!==t||e[23]!==S?(R=t?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"position-relative",children:[s.jsx(l.IconButton,{size:"md",onClick:()=>N(!S),children:o}),P>0&&s.jsx("div",{className:"badge rounded-pill bg-danger p-1 px-2 text-white",style:{position:"absolute",top:"-6px",right:"-10px",fontSize:"10px"},children:P})]}),s.jsx(Lt,{show:S,onHide:()=>N(!1),placement:"end",children:s.jsx(Lt.Body,{children:s.jsx(qs,{messages:x,isLoading:$,onDeleteMessage:L,onClickMessage:()=>N(!1),getIcon:i,getLinksTo:r})})})]}):s.jsx(qs,{messages:x,isLoading:$,onDeleteMessage:L,getIcon:i,getLinksTo:r}),e[15]=P,e[16]=$,e[17]=i,e[18]=r,e[19]=x,e[20]=o,e[21]=L,e[22]=t,e[23]=S,e[24]=R):R=e[24],R};function cm(){return!0}function dm(){return!1}function um(n){return n.type==="danger"}const mm="_tab-panel_d8l8q_1",fm="_full-height-no-overflow_d8l8q_5",pm="_disabled_d8l8q_12",Nn={tabPanel:mm,fullHeightNoOverflow:fm,disabled:pm},ul=n=>{const e=l.compilerRuntimeExports.c(7),{eventKey:t,activeTab:o,fullHeightNoOverflow:a,disabled:i,className:r,children:c}=n;if(t!==o)return null;let d;e[0]!==r||e[1]!==i||e[2]!==a?(d=l.classNames("luminus-tab-panel",Nn.tabPanel,{[Nn.fullHeightNoOverflow]:a},{disabled:i},{[Nn.disabled]:i},r),e[0]=r,e[1]=i,e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==c||e[5]!==d?(u=s.jsx("div",{className:d,children:c}),e[4]=c,e[5]=d,e[6]=u):u=e[6],u},hm="_join-line_1q9e8_1",gm={joinLine:hm},Gn=n=>{const e=l.compilerRuntimeExports.c(18),{activeTab:t,onSelect:o,children:a,vertical:i,verticalStepper:r}=n;let c;e[0]!==i||e[1]!==r?(c=l.classNames("luminus-tabs d-flex mb-2",{"gap-1":!r},{"gap-0":r},{"flex-column":i||r}),e[0]=i,e[1]=r,e[2]=c):c=e[2];let d;if(e[3]!==t||e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==r){let m;e[9]!==t||e[10]!==a.length||e[11]!==o||e[12]!==i||e[13]!==r?(m=(p,f)=>{const x=p.type,g=p.props;if(!g)return null;const y=g.eventKey,h=g.children,b=g.className,j=g.onClick;return s.jsxs(w.Fragment,{children:[s.jsx(x,{...g,className:l.classNames({active:t===y},b),onClick:()=>{o(y),j&&j(y)},vertical:i||r,children:h}),r&&f<a.length-1&&s.jsx("div",{className:l.classNames("join-line",gm.joinLine)})]},g.eventKey)},e[9]=t,e[10]=a.length,e[11]=o,e[12]=i,e[13]=r,e[14]=m):m=e[14],d=a.map(m),e[3]=t,e[4]=a,e[5]=o,e[6]=i,e[7]=r,e[8]=d}else d=e[8];let u;return e[15]!==c||e[16]!==d?(u=s.jsx("div",{className:c,children:d}),e[15]=c,e[16]=d,e[17]=u):u=e[17],u},xm="_tab_1tbi7_1",ym="_disabled_1tbi7_7",vm="_vertical_1tbi7_13",wn={tab:xm,disabled:ym,vertical:vm},Kn=n=>{const e=l.compilerRuntimeExports.c(15),{eventKey:t,className:o,onClick:a,disabled:i,vertical:r,children:c}=n;let d;e[0]!==o||e[1]!==i||e[2]!==r?(d=l.classNames("luminus-tab text-primary rounded",wn.tab,o,{disabled:i},{[wn.disabled]:i},{vertical:r},{[wn.vertical]:r}),e[0]=o,e[1]=i,e[2]=r,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==t||e[6]!==a?(u=()=>a&&!i&&a(t),e[4]=i,e[5]=t,e[6]=a,e[7]=u):u=e[7];let m;e[8]!==c||e[9]!==r?(m=typeof c=="string"?s.jsx(l.Typography,{variant:r?"body":"h6",className:r?"":"text-primary",children:c}):c,e[8]=c,e[9]=r,e[10]=m):m=e[10];let p;return e[11]!==d||e[12]!==u||e[13]!==m?(p=s.jsx("div",{role:"button",className:d,onClick:u,children:m}),e[11]=d,e[12]=u,e[13]=m,e[14]=p):p=e[14],p},bm=n=>{var p;const e=l.compilerRuntimeExports.c(31);let t,o,a,i;e[0]!==n?({tabs:i,activeTab:t,onSelect:o,...a}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=i):(t=e[1],o=e[2],a=e[3],i=e[4]);const{ProjectIconComponent:r}=w.useContext(l.LuminusComponentsContext),{isMobile:c}=l.useWindowSize();if(c){let f;e[5]!==t||e[6]!==i?(f=((p=i.find(b=>b.id===t))==null?void 0:p.name)??"",e[5]=t,e[6]=i,e[7]=f):f=e[7];let x;e[8]!==r?(x=s.jsx(r,{icon:"chevron-down"}),e[8]=r,e[9]=x):x=e[9];let g;e[10]!==f||e[11]!==x?(g=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle,text:f,icon:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12];let y;if(e[13]!==o||e[14]!==i){let b;e[16]!==o?(b=j=>s.jsx(l.DropdownItem,{onClick:()=>o(j.id),children:j.name},j.id),e[16]=o,e[17]=b):b=e[17],y=i.map(b),e[13]=o,e[14]=i,e[15]=y}else y=e[15];let h;return e[18]!==a||e[19]!==g||e[20]!==y?(h=s.jsx(l.Dropdown,{toggle:g,...a,children:y}),e[18]=a,e[19]=g,e[20]=y,e[21]=h):h=e[21],h}let d;e[22]!==o?(d=f=>o(f),e[22]=o,e[23]=d):d=e[23];let u;e[24]!==i?(u=i.map(jm),e[24]=i,e[25]=u):u=e[25];let m;return e[26]!==t||e[27]!==a||e[28]!==d||e[29]!==u?(m=s.jsx(Gn,{activeTab:t,onSelect:d,...a,children:u}),e[26]=t,e[27]=a,e[28]=d,e[29]=u,e[30]=m):m=e[30],m};function jm(n){return s.jsx(Kn,{eventKey:n.id,children:n.name},n.id)}const Sm="_selection_1dtmm_1",Cm="_selectionBg_1dtmm_10",Nm="_selectionItemsContainer_1dtmm_18",wm="_selectionItems_1dtmm_18",Jt={selection:Sm,selectionBg:Cm,selectionItemsContainer:Nm,selectionItems:wm},qn=n=>{const e=l.compilerRuntimeExports.c(14),{icon:t,setIcon:o,IconComponent:a,IconTypeArray:i}=n,[r,c]=w.useState(!1);let d;e[0]!==o?(d=g=>{o(g),c(!1)},e[0]=o,e[1]=d):d=e[1];const u=d;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>c(!0),e[2]=m):m=e[2];let p;e[3]!==a||e[4]!==t?(p=s.jsx(l.IconButton,{className:"rounded m-1",onClick:m,children:s.jsx(a,{icon:t})}),e[3]=a,e[4]=t,e[5]=p):p=e[5];let f;e[6]!==a||e[7]!==i||e[8]!==u||e[9]!==r?(f=r&&s.jsxs("div",{className:Jt.selection,children:[s.jsx("div",{className:Jt.selectionBg,onClick:()=>c(!1)}),s.jsx("div",{className:Jt.selectionItemsContainer,children:s.jsx("div",{className:Jt.selectionItems,children:i.filter(Im).map(g=>s.jsx(l.IconButton,{className:"rounded",onClick:()=>u(g),children:s.jsx(a,{icon:g})},g))})})]}),e[6]=a,e[7]=i,e[8]=u,e[9]=r,e[10]=f):f=e[10];let x;return e[11]!==p||e[12]!==f?(x=s.jsxs(s.Fragment,{children:[p,f]}),e[11]=p,e[12]=f,e[13]=x):x=e[13],x};function Im(n,e,t){return t.indexOf(n)===e}const Yn=()=>{const n=w.useContext(l.ShortcutLinksContext);if(n===void 0)throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");return n},km=n=>{const e=l.compilerRuntimeExports.c(32),{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteLocation:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(t.icon),[m,p]=w.useState(t.name),f=!(d===t.icon&&m===t.name);let x;e[0]!==t.icon||e[1]!==t.name?(x=()=>{u(t.icon),p(t.name)},e[0]=t.icon,e[1]=t.name,e[2]=x):x=e[2];const g=x;let y;e[3]!==i||e[4]!==d||e[5]!==m||e[6]!==t?(y=()=>{i({...t,icon:d,name:m})},e[3]=i,e[4]=d,e[5]=m,e[6]=t,e[7]=y):y=e[7];const h=y;let b;e[8]!==m?(b=s.jsx("td",{className:"align-middle",children:s.jsx(l.TextInput,{type:"text",maxLength:20,value:m,onChange:p,className:"d-flex-grow-1",InputContainer:l.NoInputContainer,size:"sm"})}),e[8]=m,e[9]=b):b=e[9];let j;e[10]!==o||e[11]!==a||e[12]!==d?(j=s.jsx("td",{className:"align-middle",children:s.jsx("div",{className:"d-flex justify-content-center align-items-center",children:s.jsx(qn,{icon:d,setIcon:u,IconComponent:o,IconTypeArray:a})})}),e[10]=o,e[11]=a,e[12]=d,e[13]=j):j=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S={width:"7em"},e[14]=S):S=e[14];let N;e[15]!==c||e[16]!==g||e[17]!==h||e[18]!==f?(N=f&&s.jsxs(s.Fragment,{children:[s.jsx(l.IconButton,{onClick:g,color:"secondary",className:"d-inline",children:s.jsx(c,{icon:"cancel"})}),s.jsx(l.IconButton,{onClick:h,color:"success",className:"d-inline",children:s.jsx(c,{icon:"check"})})]}),e[15]=c,e[16]=g,e[17]=h,e[18]=f,e[19]=N):N=e[19];let v;e[20]!==c?(v=s.jsx(c,{icon:"delete"}),e[20]=c,e[21]=v):v=e[21];let C;e[22]!==r||e[23]!==v?(C=s.jsx(l.IconButton,{onClick:r,color:"danger",children:v}),e[22]=r,e[23]=v,e[24]=C):C=e[24];let k;e[25]!==N||e[26]!==C?(k=s.jsx("td",{className:"align-middle",style:S,children:s.jsxs("div",{className:"d-flex gap-2 align-items-center justify-content-end",children:[N,C]})}),e[25]=N,e[26]=C,e[27]=k):k=e[27];let I;return e[28]!==b||e[29]!==j||e[30]!==k?(I=s.jsxs(s.Fragment,{children:[b,j,k]}),e[28]=b,e[29]=j,e[30]=k,e[31]=I):I=e[31],I},Tm=n=>{const e=l.compilerRuntimeExports.c(14),{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteShortcutLink:r}=n;let c;e[0]!==r||e[1]!==t.id?(c=()=>{r(t.id)},e[0]=r,e[1]=t.id,e[2]=c):c=e[2];const d=c;let u;e[3]!==t.url?(u=s.jsx("td",{className:"align-middle",children:t.url.length<=23?s.jsx(l.Typography,{variant:"body2",children:t.url}):s.jsx(l.SimpleTooltip,{placement:"bottom",text:t.url,children:s.jsxs(l.Typography,{variant:"body2",children:[t.url.slice(0,21),"..."]})})}),e[3]=t.url,e[4]=u):u=e[4];let m;e[5]!==o||e[6]!==a||e[7]!==d||e[8]!==i||e[9]!==t?(m=s.jsx(km,{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteLocation:d}),e[5]=o,e[6]=a,e[7]=d,e[8]=i,e[9]=t,e[10]=m):m=e[10];let p;return e[11]!==u||e[12]!==m?(p=s.jsx("tr",{className:"mb-3",children:s.jsxs(s.Fragment,{children:[u,m]})}),e[11]=u,e[12]=m,e[13]=p):p=e[13],p},_m=n=>{const e=l.compilerRuntimeExports.c(11),{IconComponent:t,IconTypeArray:o}=n,{texts:a}=w.useContext(l.LuminusComponentsContext),{shortcutLinks:i,editShortcutLink:r,deleteShortcutLink:c}=Yn();let d;return e[0]!==t||e[1]!==o||e[2]!==c||e[3]!==r||e[4]!==i||e[5]!==a.shortcutLinks.addLinksToEditThemHereInfo||e[6]!==a.shortcutLinks.icon||e[7]!==a.shortcutLinks.name||e[8]!==a.shortcutLinks.shortcutLinksSetting||e[9]!==a.shortcutLinks.target?(d=s.jsx(s.Fragment,{children:i!==null&&i.length>0?s.jsxs(vo,{size:"sm",title:a.shortcutLinks.shortcutLinksSetting,children:[s.jsx("thead",{className:"fw-bold",children:s.jsxs("tr",{children:[s.jsx("th",{children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.target})}),s.jsx("th",{children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.name})}),s.jsx("th",{className:"text-center",children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.icon})}),s.jsx("th",{})]})}),s.jsx("tbody",{children:i==null?void 0:i.map(u=>s.jsx(Tm,{shortcutLink:u,IconComponent:t,IconTypeArray:o,editShortcutLink:r,deleteShortcutLink:c},u.id))})]}):s.jsx(l.Alert,{variant:"info",size:"sm",children:a.shortcutLinks.addLinksToEditThemHereInfo})}),e[0]=t,e[1]=o,e[2]=c,e[3]=r,e[4]=i,e[5]=a.shortcutLinks.addLinksToEditThemHereInfo,e[6]=a.shortcutLinks.icon,e[7]=a.shortcutLinks.name,e[8]=a.shortcutLinks.shortcutLinksSetting,e[9]=a.shortcutLinks.target,e[10]=d):d=e[10],d},$n=5,Dm="_linkButton_pnlvi_1",Em="_linkAddButton_pnlvi_31",Lm="_createLinkRow_pnlvi_39",$t={linkButton:Dm,linkAddButton:Em,createLinkRow:Lm},Rm=n=>{const e=l.compilerRuntimeExports.c(9),{shortcutLink:t,IconComponent:o}=n;let a;e[0]!==o||e[1]!==t.icon?(a=s.jsx(o,{icon:t.icon}),e[0]=o,e[1]=t.icon,e[2]=a):a=e[2];let i;e[3]!==t.url||e[4]!==a?(i=s.jsx(we.Link,{to:t.url,className:$t.linkButton,children:a}),e[3]=t.url,e[4]=a,e[5]=i):i=e[5];let r;return e[6]!==t.name||e[7]!==i?(r=s.jsx(l.SimpleTooltip,{text:t.name,placement:"bottom",children:i}),e[6]=t.name,e[7]=i,e[8]=r):r=e[8],r},Fm=n=>{const e=l.compilerRuntimeExports.c(51),{closeModal:t,isOpen:o,createLink:a,pageTitlePrefix:i,IconComponent:r,IconTypeArray:c}=n,d=we.useLocation(),{texts:u}=w.useContext(l.LuminusComponentsContext),[m,p]=w.useState("star-outline");let f;e[0]!==i?(f=i?document.title.replace(i,""):document.title,e[0]=i,e[1]=f):f=e[1];const[x,g]=w.useState(f);let y;e[2]!==t||e[3]!==a||e[4]!==m||e[5]!==d.pathname||e[6]!==d.search||e[7]!==x?(y=async()=>{await a({icon:m,name:x,url:d.pathname+d.search}),t()},e[2]=t,e[3]=a,e[4]=m,e[5]=d.pathname,e[6]=d.search,e[7]=x,e[8]=y):y=e[8];const h=y,b=d.pathname+d.search;let j;e[9]!==u.shortcutLinks.newShortcut?(j=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:u.shortcutLinks.newShortcut})}),e[9]=u.shortcutLinks.newShortcut,e[10]=j):j=e[10];let S;e[11]!==u.shortcutLinks.target?(S=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.target}),e[11]=u.shortcutLinks.target,e[12]=S):S=e[12];let N;e[13]!==b?(N=b.length<=23?b:s.jsx(l.SimpleTooltip,{placement:"bottom",text:b,children:s.jsxs("span",{children:[b.slice(0,21),"..."]})}),e[13]=b,e[14]=N):N=e[14];let v;e[15]!==N?(v=s.jsx("div",{className:"d-flex align-items-middle fw-bold text-muted",children:N}),e[15]=N,e[16]=v):v=e[16];let C;e[17]!==S||e[18]!==v?(C=s.jsxs("div",{className:$t.createLinkRow,children:[S,v]}),e[17]=S,e[18]=v,e[19]=C):C=e[19];let k;e[20]!==u.shortcutLinks.name?(k=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.name}),e[20]=u.shortcutLinks.name,e[21]=k):k=e[21];let I;e[22]!==x?(I=s.jsx("div",{className:"d-flex align-items-middle fw-bold",children:s.jsx(l.TextInput,{type:"text",maxLength:25,value:x,onChange:g,className:"w-100",InputContainer:l.RowLabelInput,withoutLabel:!0})}),e[22]=x,e[23]=I):I=e[23];let T;e[24]!==k||e[25]!==I?(T=s.jsxs("div",{className:$t.createLinkRow,children:[k,I]}),e[24]=k,e[25]=I,e[26]=T):T=e[26];let L;e[27]!==u.shortcutLinks.icon?(L=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.icon}),e[27]=u.shortcutLinks.icon,e[28]=L):L=e[28];let E;e[29]!==r||e[30]!==c||e[31]!==m?(E=s.jsx("div",{className:"d-flex align-items-middle fw-bold",children:s.jsx(qn,{icon:m,setIcon:p,IconComponent:r,IconTypeArray:c})}),e[29]=r,e[30]=c,e[31]=m,e[32]=E):E=e[32];let D;e[33]!==L||e[34]!==E?(D=s.jsxs("div",{className:$t.createLinkRow,children:[L,E]}),e[33]=L,e[34]=E,e[35]=D):D=e[35];let _;e[36]!==T||e[37]!==D||e[38]!==C?(_=s.jsxs(l.Modal.Body,{children:[C,T,D]}),e[36]=T,e[37]=D,e[38]=C,e[39]=_):_=e[39];let P;e[40]!==h||e[41]!==u.shortcutLinks.addShortcut?(P=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{onClick:h,children:u.shortcutLinks.addShortcut})}),e[40]=h,e[41]=u.shortcutLinks.addShortcut,e[42]=P):P=e[42];let $;e[43]!==_||e[44]!==P||e[45]!==j?($=s.jsxs("div",{onKeyDown:$m,children:[j,_,P]}),e[43]=_,e[44]=P,e[45]=j,e[46]=$):$=e[46];let R;return e[47]!==t||e[48]!==o||e[49]!==$?(R=s.jsx(l.Modal,{show:o,onHide:t,size:"sm",children:$}),e[47]=t,e[48]=o,e[49]=$,e[50]=R):R=e[50],R};function $m(n){n.code!=="Escape"&&n.stopPropagation()}const Pm=n=>{const e=l.compilerRuntimeExports.c(17),{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a,createLink:i}=n,{ProjectIconComponent:r,texts:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(!1),[m]=l.a(d,100),p=c.shortcutLinks.addShortcut;let f,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=l.classNames($t.linkButton,$t.linkAddButton),x=()=>u(!0),e[0]=f,e[1]=x):(f=e[0],x=e[1]);let g;e[2]!==r?(g=s.jsx("button",{type:"button",className:f,onClick:x,children:s.jsx(r,{icon:"add"})}),e[2]=r,e[3]=g):g=e[3];let y;e[4]!==g||e[5]!==c.shortcutLinks.addShortcut?(y=s.jsx(l.SimpleTooltip,{text:p,placement:"bottom",children:g}),e[4]=g,e[5]=c.shortcutLinks.addShortcut,e[6]=y):y=e[6];let h;e[7]!==t||e[8]!==o||e[9]!==i||e[10]!==m||e[11]!==d||e[12]!==a?(h=(d||m)&&s.jsx(Fm,{IconComponent:t,IconTypeArray:o,closeModal:()=>u(!1),createLink:i,isOpen:d,pageTitlePrefix:a}),e[7]=t,e[8]=o,e[9]=i,e[10]=m,e[11]=d,e[12]=a,e[13]=h):h=e[13];let b;return e[14]!==y||e[15]!==h?(b=s.jsxs(s.Fragment,{children:[y,h]}),e[14]=y,e[15]=h,e[16]=b):b=e[16],b},Mm=n=>{const e=l.compilerRuntimeExports.c(12),{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a}=n,{shortcutLinks:i,createShortcutLink:r}=Yn(),c=i!==null&&i.length<$n;let d;e[0]!==t||e[1]!==i?(d=i==null?void 0:i.slice(0,$n).map((p,f)=>p!==null?s.jsx(Rm,{shortcutLink:p,IconComponent:t},f):null),e[0]=t,e[1]=i,e[2]=d):d=e[2];let u;e[3]!==t||e[4]!==o||e[5]!==r||e[6]!==c||e[7]!==a?(u=c&&s.jsx(Pm,{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a,createLink:r}),e[3]=t,e[4]=o,e[5]=r,e[6]=c,e[7]=a,e[8]=u):u=e[8];let m;return e[9]!==d||e[10]!==u?(m=s.jsx(s.Fragment,{children:s.jsxs("div",{className:"d-flex gap-2",children:[d,u]})}),e[9]=d,e[10]=u,e[11]=m):m=e[11],m},Am=n=>{const e=l.useAxios(),{startLoading:t,stopLoading:o}=w.useContext(l.LoadingContext),a=w.useCallback(async c=>{t("submit-createShortcutLink");try{await e.post(`/dynamicForms/insert?referenceId=${n}`,c)}finally{o("submit-createShortcutLink")}},[e,n,t,o]),i=w.useCallback(async c=>{t("submit-updateShortcutLink");try{await e.post(`/dynamicForms/update?referenceId=${n}`,c)}finally{o("submit-updateShortcutLink")}},[e,n,t,o]),r=w.useCallback(async c=>{t("delete-deleteShortcutLink");try{await e.delete(`/dynamicForms/delete?referenceId=${n}&pk=${c.toString()}`)}finally{o("delete-deleteShortcutLink")}},[e,n,t,o]);return{create:a,update:i,remove:r}},Bm=n=>{if(n==null)throw new Error("Tried to make operation on null shortcutLinks.");return n},Ys=n=>{if(n==null)throw new Error("Tried to make operation on null shortcutLinks.");return n},Om=n=>{const e=l.compilerRuntimeExports.c(22),{children:t,referenceId:o}=n,{user:a}=w.useContext(l.UserContext),i=Hm,r=a!==null;let c;e[0]!==r?(c={silent:!0,dataTransformer:i,enabled:r},e[0]=r,e[1]=c):c=e[1];const{data:d,reloadData:u}=Fe.useGetApiData(`/dynamicForms/lookup-data-all?referenceId=${o}&employee=${a==null?void 0:a.personalNumber}`,c),{create:m,update:p,remove:f}=Am(o);let x;e[2]!==m||e[3]!==u||e[4]!==d||e[5]!==a?(x=async C=>{const k=Ys(a);if(Bm(d).length>=$n)throw new Error("Cannot add more shortcut links.");await m({...C,employee:k.personalNumber}),await u()},e[2]=m,e[3]=u,e[4]=d,e[5]=a,e[6]=x):x=e[6];const g=x;let y;e[7]!==u||e[8]!==p||e[9]!==a?(y=async C=>{const k=Ys(a);await p({...C,employee:k.personalNumber}),await u()},e[7]=u,e[8]=p,e[9]=a,e[10]=y):y=e[10];const h=y;let b;e[11]!==u||e[12]!==f?(b=async C=>{await f(C),await u()},e[11]=u,e[12]=f,e[13]=b):b=e[13];const j=b;let S;e[14]!==g||e[15]!==j||e[16]!==h||e[17]!==d?(S={shortcutLinks:d,createShortcutLink:g,editShortcutLink:h,deleteShortcutLink:j},e[14]=g,e[15]=j,e[16]=h,e[17]=d,e[18]=S):S=e[18];const N=S;let v;return e[19]!==t||e[20]!==N?(v=s.jsx(l.ShortcutLinksContext.Provider,{value:N,children:t}),e[19]=t,e[20]=N,e[21]=v):v=e[21],v};function zm(n){return{id:n.id,icon:n.icon,name:n.name,url:n.url}}function Hm(n){return n.map(zm)}const Vm=n=>{const e=l.compilerRuntimeExports.c(6),{targets:t,removeNotifTarget:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);let i;e[0]!==a||e[1]!==o||e[2]!==t?(i=t&&t.sort(Um).map(c=>s.jsxs("div",{className:"d-flex gap-2 align-items-center justify-content-between mb-1",children:[s.jsx("div",{className:"text-secondary",children:s.jsx("span",{className:"d-flex gap-2 ",children:c.employeeId&&c.roleName===null?s.jsxs(s.Fragment,{children:[s.jsx(a,{icon:"user"}),s.jsx(l.Typography,{variant:"subtitle",children:c.employeeName})]}):s.jsxs(s.Fragment,{children:[s.jsx(a,{icon:"role"}),s.jsx(l.Typography,{variant:"subtitle",children:c.roleName})]})})}),s.jsx(l.IconButton,{size:"sm",color:"danger",onClick:()=>o(c.id),children:s.jsx(a,{icon:"delete"})})]},c.id)),e[0]=a,e[1]=o,e[2]=t,e[3]=i):i=e[3];let r;return e[4]!==i?(r=s.jsx(s.Fragment,{children:i}),e[4]=i,e[5]=r):r=e[5],r};function Um(n,e){return(n.employeeId??0)-(e.employeeId??0)}const Wm=n=>{const e=l.compilerRuntimeExports.c(45),{show:t,onHide:o,roles:a,onAddTarget:i,EmployeePicker:r,templateId:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{notifCentrum:u}=d,[m,p]=w.useState(null),[f,x]=w.useState(null),[g,y]=w.useState("R");let h;e[0]!==o?(h=()=>{p(null),x(null),o()},e[0]=o,e[1]=h):h=e[1];const b=h;let j;e[2]!==b?(j=()=>b(),e[2]=b,e[3]=j):j=e[3];let S;e[4]!==u.addNewTarget?(S=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:u.addNewTarget})}),e[4]=u.addNewTarget,e[5]=S):S=e[5];let N;e[6]!==u.employee?(N={id:"E",name:u.employee},e[6]=u.employee,e[7]=N):N=e[7];let v;e[8]!==u.role?(v={id:"R",name:u.role},e[8]=u.role,e[9]=v):v=e[9];let C;e[10]!==N||e[11]!==v?(C=[N,v],e[10]=N,e[11]=v,e[12]=C):C=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=P=>y(P),e[13]=k):k=e[13];let I;e[14]!==C||e[15]!==g?(I=s.jsx(sl,{options:C,value:g,onChange:k,InputContainer:l.RowLabelInput}),e[14]=C,e[15]=g,e[16]=I):I=e[16];let T;e[17]!==r||e[18]!==(m==null?void 0:m.id)||e[19]!==(m==null?void 0:m.name)||e[20]!==u.employee||e[21]!==u.role||e[22]!==f||e[23]!==a||e[24]!==g?(T=g==="E"?s.jsx(r,{InputContainer:l.RowLabelInput,label:u.employee,value:{id:(m==null?void 0:m.id)??null,name:(m==null?void 0:m.name)??""},onSelect:P=>p({id:Number(P==null?void 0:P.id)??null,name:(P==null?void 0:P.name)??""})}):s.jsx(l.CustomSelectInput,{InputContainer:l.RowLabelInput,label:u.role,options:a.map(Gm),value:f,onChange:P=>x((P==null?void 0:P.toString())??"")}),e[17]=r,e[18]=m==null?void 0:m.id,e[19]=m==null?void 0:m.name,e[20]=u.employee,e[21]=u.role,e[22]=f,e[23]=a,e[24]=g,e[25]=T):T=e[25];let L;e[26]!==T||e[27]!==I?(L=s.jsxs(l.Modal.Body,{children:[I,T]}),e[26]=T,e[27]=I,e[28]=L):L=e[28];let E;e[29]!==(m==null?void 0:m.id)||e[30]!==(m==null?void 0:m.name)||e[31]!==b||e[32]!==i||e[33]!==f||e[34]!==c?(E=()=>{i({templateId:c??0,targetId:null,employeeId:(m==null?void 0:m.id)??null,roleName:f},(m==null?void 0:m.name)??null),b()},e[29]=m==null?void 0:m.id,e[30]=m==null?void 0:m.name,e[31]=b,e[32]=i,e[33]=f,e[34]=c,e[35]=E):E=e[35];let D;e[36]!==u.add||e[37]!==E?(D=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{onClick:E,children:u.add})}),e[36]=u.add,e[37]=E,e[38]=D):D=e[38];let _;return e[39]!==t||e[40]!==L||e[41]!==D||e[42]!==j||e[43]!==S?(_=s.jsxs(l.Modal,{show:t,onHide:j,children:[S,L,D]}),e[39]=t,e[40]=L,e[41]=D,e[42]=j,e[43]=S,e[44]=_):_=e[44],_};function Gm(n){return{id:n,name:n}}const Km=n=>{const e=l.compilerRuntimeExports.c(19),{templates:t,selectedTemplateId:o,setSelectedTemplateId:a,roles:i,onAddNotifTarget:r,onRemoveNotifTarget:c,EmployeePicker:d}=n,{texts:u,ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),{notifCentrum:p}=u,[f,x]=w.useState(!1);let g;e[0]!==m||e[1]!==p||e[2]!==c||e[3]!==o||e[4]!==a||e[5]!==t?(g=t.length>0?s.jsx(l.ListGroup,{className:"overflow-auto h-max-100 p-2",children:t.map(S=>s.jsxs(l.ListGroup.Item,{action:o!==S.id,className:`p-0 mb-2 border rounded shadow-sm ${o===S.id?"border-1 border-primary":""}`,onClick:()=>a(S.id),children:[s.jsxs("div",{className:"d-flex gap-2 justify-content-between align-items-center border-1 border-bottom border-primary p-2",children:[s.jsx("div",{className:"text-primary",children:S.destinationId===1?s.jsx(m,{icon:"mail-envelope"}):s.jsx(m,{icon:"dashboard"})}),s.jsx(l.Typography,{className:"text-truncate text-primary",variant:"subtitle",children:S.subjectTemplate}),s.jsx(l.IconButton,{size:"sm",onClick:()=>x(!0),children:s.jsx(m,{icon:"add"})})]}),s.jsx("div",{className:"my-2 ps-3 pe-2",children:S.targets.length>0?s.jsx(Vm,{targets:S.targets,removeNotifTarget:c}):s.jsx(l.Alert,{size:"sm",variant:"warning",children:p.noTargets})})]},S.id))}):s.jsx(l.Alert,{size:"sm",variant:"warning",children:p.empty}),e[0]=m,e[1]=p,e[2]=c,e[3]=o,e[4]=a,e[5]=t,e[6]=g):g=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),e[7]=y):y=e[7];let h;e[8]!==i?(h=i??[],e[8]=i,e[9]=h):h=e[9];let b;e[10]!==d||e[11]!==r||e[12]!==o||e[13]!==f||e[14]!==h?(b=s.jsx(Wm,{show:f,onHide:y,roles:h,onAddTarget:r,EmployeePicker:d,templateId:o}),e[10]=d,e[11]=r,e[12]=o,e[13]=f,e[14]=h,e[15]=b):b=e[15];let j;return e[16]!==g||e[17]!==b?(j=s.jsxs(s.Fragment,{children:[g,b]}),e[16]=g,e[17]=b,e[18]=j):j=e[18],j},qm=()=>{const n=l.compilerRuntimeExports.c(1),e=Ym;let t;return n[0]===Symbol.for("react.memo_cache_sentinel")?(t={extractModelPropertiesNested:e},n[0]=t):t=n[0],t};function Ym(n){const e=/@\(\s*Model\.([A-Za-z0-9_.]+)\s*\)/g,t={};let o=e.exec(n);for(;o!==null;){const a=o[1].split(".");let i=t;for(let r=0;r<a.length;r++){const c=a[r];r===a.length-1?i[c]="lorem ipsum":((!i[c]||typeof i[c]!="object")&&(i[c]={}),i=i[c])}o=e.exec(n)}return t}const Qm=n=>{var K,V;const e=l.compilerRuntimeExports.c(49),{show:t,onHide:o,template:a,onEdit:i,onPreview:r,styles:c,entities:d}=n,{extractModelPropertiesNested:u}=qm(),{zStringRequired:m,zNumber:p,zNumberRequired:f}=l.useZodSchemaTypes(),{texts:x}=w.useContext(l.LuminusComponentsContext),{notifCentrum:g,documents:y}=x,[h,b]=w.useState(null),[j,S]=w.useState(null),[N,v]=w.useState(null),[C,k]=w.useState(!1),[I,T]=w.useState(!1),[L,E]=w.useState("");let D,_;if(e[0]!==p||e[1]!==f||e[2]!==m){const G=l.objectType({id:f(),styleId:p(),subjectTemplate:m(),textTemplate:m()});_=Se.useForm,D=l.t(G),e[0]=p,e[1]=f,e[2]=m,e[3]=D,e[4]=_}else D=e[3],_=e[4];let P;e[5]!==D?(P={resolver:D},e[5]=D,e[6]=P):P=e[6];const $=_(P);let R;e[7]!==$||e[8]!==a.id||e[9]!==((K=a.style)==null?void 0:K.id)||e[10]!==a.subjectTemplate||e[11]!==a.textTemplate?(R=()=>{var G;$.reset({id:a.id,styleId:((G=a.style)==null?void 0:G.id)??null,subjectTemplate:a.subjectTemplate??"",textTemplate:a.textTemplate??""}),v(null),T(!1),b(null),S(null)},e[7]=$,e[8]=a.id,e[9]=(V=a.style)==null?void 0:V.id,e[10]=a.subjectTemplate,e[11]=a.textTemplate,e[12]=R):R=e[12];let F;e[13]!==$||e[14]!==a?(F=[$,a],e[13]=$,e[14]=a,e[15]=F):F=e[15],w.useEffect(R,F);let M,O;e[16]!==u||e[17]!==a.textTemplate?(M=()=>{const G=JSON.stringify(u(a.textTemplate));E(G)},O=[u,a.textTemplate],e[16]=u,e[17]=a.textTemplate,e[18]=M,e[19]=O):(M=e[18],O=e[19]),w.useEffect(M,O);let B;e[20]!==i||e[21]!==o?(B=async G=>{await i(G).then(()=>o())},e[20]=i,e[21]=o,e[22]=B):B=e[22];const H=B;let z;e[23]!==j||e[24]!==$||e[25]!==I||e[26]!==L||e[27]!==r||e[28]!==h?(z=async()=>{!I&&!(j&&h)||await r({entityId:j,entityType:(h==null?void 0:h.id)??null,styleId:$.getValues("styleId")??0,body:$.getValues("textTemplate"),subject:$.getValues("subjectTemplate"),jsonData:I?L:null}).then(G=>{v(G)})},e[23]=j,e[24]=$,e[25]=I,e[26]=L,e[27]=r,e[28]=h,e[29]=z):z=e[29];const W=z;let A;e[30]!==y||e[31]!==d||e[32]!==j||e[33]!==$||e[34]!==I||e[35]!==L||e[36]!==g||e[37]!==o||e[38]!==H||e[39]!==W||e[40]!==N||e[41]!==C||e[42]!==h||e[43]!==t||e[44]!==c||e[45]!==a?(A=a&&s.jsxs(l.Modal,{show:t,onHide:o,size:"lg",scrollable:!0,children:[s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:g.editTemplate})}),s.jsx(Se.FormProvider,{...$,children:s.jsxs(l.Form,{onSubmit:$.handleSubmit(H),children:[s.jsx(l.Modal.Body,{className:"d-flex flex-column gap-2",children:C?s.jsxs("div",{className:"d-flex flex-column gap-2",children:[I?s.jsxs("div",{className:"row d-flex align-items-center",children:[s.jsx(qo,{label:"JSON",InputContainer:l.FloatingLabelInput,value:L,onChange:G=>E(G??""),className:"col"}),s.jsx("div",{className:"col-auto",children:s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:W,children:g.templatePreview})})]}):s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[s.jsxs("div",{className:"d-flex gap-3 w-75",children:[s.jsx("div",{className:"w-75",children:s.jsx(l.CustomSelectInput,{label:g.entity,size:"sm",options:d,value:(h==null?void 0:h.id)??"",onChange:G=>b(d.find(Z=>Z.id===G)??null)})}),s.jsx(l.TextInput,{size:"sm",type:"text",label:"ID",value:j,onChange:G=>S((G==null?void 0:G.toString())??null)})]}),s.jsx("div",{children:s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:W,disabled:!j||!h,children:g.templatePreview})})]}),s.jsx("hr",{}),N&&s.jsxs(s.Fragment,{children:[s.jsx(l.Typography,{variant:"h3",children:N.subject}),s.jsx("iframe",{title:"notification",srcDoc:N.body,style:{minHeight:"400px"}})]})]}):s.jsxs(s.Fragment,{children:[a.destinationId===1&&s.jsx(l.HookFormSelectInput,{formField:"styleId",options:c,label:g.style,InputContainer:l.FloatingLabelInput,size:"sm"}),s.jsx(l.HookFormTextInput,{formField:"subjectTemplate",type:"text",label:g.subject,InputContainer:l.FloatingLabelInput}),s.jsx(l.HookFormTextAreaInput,{formField:"textTemplate",label:g.textBody,InputContainer:l.FloatingLabelInput,rows:16,customFormControlProps:{style:{height:"auto"}}})]})}),s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:C?s.jsxs("div",{className:"d-flex gap-3 align-items-center",children:[s.jsx(Tt,{label:g.useJson,value:I,onChange:()=>{T(!I)}}),s.jsx(l.PrimaryButton,{size:"sm",onClick:G=>{G.stopPropagation(),G.preventDefault(),k(!1)},children:y.back})]}):s.jsxs("div",{className:"d-flex gap-2",children:[s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:()=>k(!0),children:g.templatePreview}),s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:g.save})]})})]})})]}),e[30]=y,e[31]=d,e[32]=j,e[33]=$,e[34]=I,e[35]=L,e[36]=g,e[37]=o,e[38]=H,e[39]=W,e[40]=N,e[41]=C,e[42]=h,e[43]=t,e[44]=c,e[45]=a,e[46]=A):A=e[46];let U;return e[47]!==A?(U=s.jsx(s.Fragment,{children:A}),e[47]=A,e[48]=U):U=e[48],U},Zm=n=>{const e=l.compilerRuntimeExports.c(43),{show:t,onHide:o,kind:a,onNotifActionAdd:i,onCreate:r}=n,{zNumberRequired:c,zStringRequired:d}=l.useZodSchemaTypes(),{texts:u}=w.useContext(l.LuminusComponentsContext),{notifCentrum:m,documents:p}=u;let f,x;if(e[0]!==c||e[1]!==d){const $=l.objectType({id:c(),name:d(),kindId:c()});x=Se.useForm,f=l.t($),e[0]=c,e[1]=d,e[2]=f,e[3]=x}else f=e[2],x=e[3];let g;e[4]!==f?(g={resolver:f},e[4]=f,e[5]=g):g=e[5];const y=x(g);let h;e[6]!==a||e[7]!==r||e[8]!==o||e[9]!==i?(h=async $=>{i($.id,$.name,$.kindId).then(()=>{r({...$,kind:a,templates:[]}),o()})},e[6]=a,e[7]=r,e[8]=o,e[9]=i,e[10]=h):h=e[10];const b=h;let j,S;e[11]!==y||e[12]!==a.id?(j=()=>{y.reset({id:0,name:"",kindId:a.id}),ot.hookFormSetNulls(y,["id","name"])},S=[y,a.id],e[11]=y,e[12]=a.id,e[13]=j,e[14]=S):(j=e[13],S=e[14]),w.useEffect(j,S);let N;e[15]!==m.addNotifAction?(N=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.addNotifAction})}),e[15]=m.addNotifAction,e[16]=N):N=e[16];let v;e[17]!==y||e[18]!==b?(v=y.handleSubmit(b),e[17]=y,e[18]=b,e[19]=v):v=e[19];let C;e[20]!==a?(C=[a],e[20]=a,e[21]=C):C=e[21];let k;e[22]!==m.kind||e[23]!==C?(k=s.jsx(l.HookFormSelectInput,{formField:"kindId",options:C,disabled:!0,label:m.kind,InputContainer:l.RowLabelInput,size:"sm"}),e[22]=m.kind,e[23]=C,e[24]=k):k=e[24];let I;e[25]!==p.name?(I=s.jsx(l.HookFormTextInput,{formField:"name",type:"text",label:p.name,InputContainer:l.RowLabelInput,size:"sm",required:!0}),e[25]=p.name,e[26]=I):I=e[26];let T;e[27]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(cl,{formField:"id",label:"ID",InputContainer:l.RowLabelInput,size:"sm",step:1,required:!0}),e[27]=T):T=e[27];let L;e[28]!==k||e[29]!==I?(L=s.jsxs(l.Modal.Body,{className:"d-flex flex-column gap-2",children:[k,I,T]}),e[28]=k,e[29]=I,e[30]=L):L=e[30];let E;e[31]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:"OK"})}),e[31]=E):E=e[31];let D;e[32]!==L||e[33]!==v?(D=s.jsxs(l.Form,{onSubmit:v,children:[L,E]}),e[32]=L,e[33]=v,e[34]=D):D=e[34];let _;e[35]!==y||e[36]!==D?(_=s.jsx(Se.FormProvider,{...y,children:D}),e[35]=y,e[36]=D,e[37]=_):_=e[37];let P;return e[38]!==o||e[39]!==t||e[40]!==_||e[41]!==N?(P=s.jsxs(l.Modal,{show:t,onHide:o,children:[N,_]}),e[38]=o,e[39]=t,e[40]=_,e[41]=N,e[42]=P):P=e[42],P},Xm=n=>{const e=l.compilerRuntimeExports.c(69),{show:t,onHide:o,kind:a,action:i,onNotifTemplateAdd:r,reloadTemplates:c}=n,{zNumber:d,zString:u,zStringRequired:m,zNumberRequired:p}=l.useZodSchemaTypes(),{addNotification:f}=l.useNotifications(),{texts:x}=w.useContext(l.LuminusComponentsContext),{notifCentrum:g,reports:y}=x;let h,b;if(e[0]!==d||e[1]!==p||e[2]!==u||e[3]!==m){const Z=l.objectType({kindId:p(),actionId:p(),destinationId:p(),styleId:d(),subjectTemplate:m(),textTemplate:u(),attachments:l.arrayType(l.objectType({source:u(),sourceType:d()}))});b=Se.useForm,h=l.t(Z),e[0]=d,e[1]=p,e[2]=u,e[3]=m,e[4]=h,e[5]=b}else h=e[4],b=e[5];let j;e[6]!==h?(j={resolver:h},e[6]=h,e[7]=j):j=e[7];const S=b(j);let N;e[8]!==f||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==y?(N=async Z=>{await r({...Z,attachments:[]}).then(async()=>{f(y.saveSuccessful,"success"),await c().then(()=>o())})},e[8]=f,e[9]=o,e[10]=r,e[11]=c,e[12]=y,e[13]=N):N=e[13];const v=N;let C,k;e[14]!==i.id||e[15]!==S||e[16]!==a.id?(C=()=>{S.reset({kindId:a.id,actionId:i.id,destinationId:1,styleId:null,subjectTemplate:"",textTemplate:null,attachments:[]}),ot.hookFormSetNull(S,"subjectTemplate")},k=[i.id,S,a.id],e[14]=i.id,e[15]=S,e[16]=a.id,e[17]=C,e[18]=k):(C=e[17],k=e[18]),w.useEffect(C,k);let I;e[19]!==g.addNotifActionTemplate?(I=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:g.addNotifActionTemplate})}),e[19]=g.addNotifActionTemplate,e[20]=I):I=e[20];let T;e[21]!==S||e[22]!==v?(T=S.handleSubmit(v),e[21]=S,e[22]=v,e[23]=T):T=e[23];let L;e[24]!==a?(L=[a],e[24]=a,e[25]=L):L=e[25];let E;e[26]!==g.kind||e[27]!==L?(E=s.jsx(l.HookFormSelectInput,{formField:"kindId",options:L,disabled:!0,label:g.kind,InputContainer:l.RowLabelInput,size:"sm"}),e[26]=g.kind,e[27]=L,e[28]=E):E=e[28];let D;e[29]!==i?(D=[i],e[29]=i,e[30]=D):D=e[30];let _;e[31]!==g.subkind||e[32]!==D?(_=s.jsx(l.HookFormSelectInput,{formField:"actionId",options:D,disabled:!0,label:g.subkind,InputContainer:l.RowLabelInput,size:"sm"}),e[31]=g.subkind,e[32]=D,e[33]=_):_=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P={id:1,name:"Email"},e[34]=P):P=e[34];let $;e[35]!==g.dashboard?($=[P,{id:2,name:g.dashboard}],e[35]=g.dashboard,e[36]=$):$=e[36];let R;e[37]===Symbol.for("react.memo_cache_sentinel")?(R=["styleId","textTemplate"],e[37]=R):R=e[37];let F;e[38]!==g.destination||e[39]!==$?(F=s.jsx(l.HookFormSelectInput,{formField:"destinationId",options:$,label:g.destination,InputContainer:l.RowLabelInput,size:"sm",required:!0,resetsFields:R}),e[38]=g.destination,e[39]=$,e[40]=F):F=e[40];let M;e[41]!==g.subject?(M=s.jsx(l.HookFormTextInput,{formField:"subjectTemplate",type:"text",label:g.subject,InputContainer:l.RowLabelInput,size:"sm",required:!0}),e[41]=g.subject,e[42]=M):M=e[42];const O=g.textBody;let B;e[43]!==S?(B=S.getValues("destinationId"),e[43]=S,e[44]=B):B=e[44];const H=B===1;let z;e[45]===Symbol.for("react.memo_cache_sentinel")?(z={style:{height:"auto"}},e[45]=z):z=e[45];let W;e[46]!==g.textBody||e[47]!==H?(W=s.jsx(l.HookFormTextAreaInput,{formField:"textTemplate",label:O,InputContainer:l.FloatingLabelInput,size:"sm",hidden:H,rows:4,customFormControlProps:z}),e[46]=g.textBody,e[47]=H,e[48]=W):W=e[48];let A;e[49]!==E||e[50]!==_||e[51]!==F||e[52]!==M||e[53]!==W?(A=s.jsxs(l.Modal.Body,{className:"d-flex flex-column gap-2",children:[E,_,F,M,W]}),e[49]=E,e[50]=_,e[51]=F,e[52]=M,e[53]=W,e[54]=A):A=e[54];let U;e[55]!==g.create?(U=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:g.create})}),e[55]=g.create,e[56]=U):U=e[56];let K;e[57]!==A||e[58]!==U||e[59]!==T?(K=s.jsxs(l.Form,{onSubmit:T,children:[A,U]}),e[57]=A,e[58]=U,e[59]=T,e[60]=K):K=e[60];let V;e[61]!==S||e[62]!==K?(V=s.jsx(Se.FormProvider,{...S,children:K}),e[61]=S,e[62]=K,e[63]=V):V=e[63];let G;return e[64]!==o||e[65]!==t||e[66]!==V||e[67]!==I?(G=s.jsxs(l.Modal,{show:t,onHide:o,children:[I,V]}),e[64]=o,e[65]=t,e[66]=V,e[67]=I,e[68]=G):G=e[68],G},Jm=n=>{var Be,xt,mn,rt;const e=l.compilerRuntimeExports.c(173),{kinds:t,styles:o,entities:a,targetSystem:i,reloadActions:r,reloadHistory:c,reloadRoles:d,onRemoveTarget:u,onPostTarget:m,onTemplateEdit:p,onTemplateDelete:f,onNotifActionAdd:x,onNotifTemplateAdd:g,onPreview:y,EmployeePicker:h}=n,{texts:b,ProjectIconComponent:j}=w.useContext(l.LuminusComponentsContext),{notifCentrum:S}=b,{confirm:N}=l.useConfirm(),[v,C]=w.useState(null),[k,I]=w.useState(null),[T,L]=w.useState(!1),[E,D]=w.useState(!1),[_,P]=w.useState(!1),[$,R]=w.useState(null),[F,M]=Fe.useLocalStorageState("notif-kind-id",null);let O,B;e[0]!==t||e[1]!==M?(O=()=>{var ie;t.length>0?M(((ie=t.at(0))==null?void 0:ie.id)??null):M(null)},B=[t,M],e[0]=t,e[1]=M,e[2]=O,e[3]=B):(O=e[2],B=e[3]),w.useEffect(O,B);let H;e[4]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[4]=H):H=e[4];const[z,W]=w.useState(H);let A,U;e[5]!==r||e[6]!==F?(A=()=>{F&&r(F).then(ie=>{W(ie)}).catch(ie=>{console.log(ie),W([])})},U=[r,F],e[5]=r,e[6]=F,e[7]=A,e[8]=U):(A=e[7],U=e[8]),w.useEffect(A,U);let K;e[9]!==z?(K=((Be=z==null?void 0:z.at(0))==null?void 0:Be.id)??null,e[9]=z,e[10]=K):K=e[10];const[V,G]=Fe.useLocalStorageState("notif-action-id",K);let Z;e[11]===Symbol.for("react.memo_cache_sentinel")?(Z=[],e[11]=Z):Z=e[11];const[X,le]=w.useState(Z);let q;e[12]!==c||e[13]!==V||e[14]!==v?(q=()=>{V===null||v===null||(le([]),c(V,v).then(ie=>{le(ie)}).catch(ie=>{console.log(ie),le([])}))},e[12]=c,e[13]=V,e[14]=v,e[15]=q):q=e[15];let oe;e[16]!==r||e[17]!==c||e[18]!==V||e[19]!==F||e[20]!==v?(oe=[r,c,V,F,v],e[16]=r,e[17]=c,e[18]=V,e[19]=F,e[20]=v,e[21]=oe):oe=e[21],w.useEffect(q,oe);let ce;e[22]===Symbol.for("react.memo_cache_sentinel")?(ce=[],e[22]=ce):ce=e[22];const[fe,pe]=w.useState(ce);let J,Y;e[23]!==d||e[24]!==V?(J=()=>{V!==null&&d(V).then(ie=>{pe(ie)}).catch(ie=>{console.log(ie),pe([])})},Y=[d,V],e[23]=d,e[24]=V,e[25]=J,e[26]=Y):(J=e[25],Y=e[26]),w.useEffect(J,Y);let Q;e:{if(!z||!V){let Re;e[27]===Symbol.for("react.memo_cache_sentinel")?(Re=[],e[27]=Re):Re=e[27],Q=Re;break e}let ie;e[28]!==z||e[29]!==V?(ie=((xt=z.find(Re=>Re.id===V))==null?void 0:xt.templates)??[],e[28]=z,e[29]=V,e[30]=ie):ie=e[30],Q=ie}const ne=Q;let ee;e[31]!==z||e[32]!==m||e[33]!==V||e[34]!==v?(ee=(ie,Re)=>{m(ie,Re).then(yt=>{W(z?[...z.map(_t=>_t.id!==V?_t:{..._t,templates:[..._t.templates.map(Kt=>Kt.id!==v?Kt:{...Kt,targets:[...Kt.targets,yt]})]})]:[])}).catch(ef)},e[31]=z,e[32]=m,e[33]=V,e[34]=v,e[35]=ee):ee=e[35];const te=ee;let se;e[36]!==p||e[37]!==r||e[38]!==F?(se=async ie=>{F&&await p(ie).then(async()=>{W(await r(F))}).catch(tf)},e[36]=p,e[37]=r,e[38]=F,e[39]=se):se=e[39];const ue=se;let me;e[40]!==N||e[41]!==S.confirmTemplateDelete||e[42]!==f||e[43]!==r||e[44]!==F?(me=async ie=>{F&&await N(S.confirmTemplateDelete)&&await f(ie).then(async()=>{W(await r(F))}).catch(nf)},e[40]=N,e[41]=S.confirmTemplateDelete,e[42]=f,e[43]=r,e[44]=F,e[45]=me):me=e[45];const be=me;let ae;e[46]!==z||e[47]!==N||e[48]!==S.confirmTargetDelete||e[49]!==u||e[50]!==V||e[51]!==v?(ae=async ie=>{await N(S.confirmTargetDelete)&&u(ie).then(()=>W(z?[...z.map(Re=>Re.id!==V?Re:{...Re,templates:[...Re.templates.map(yt=>yt.id!==v?yt:{...yt,targets:yt.targets.filter(_t=>_t.id!==ie)})]})]:[]))},e[46]=z,e[47]=N,e[48]=S.confirmTargetDelete,e[49]=u,e[50]=V,e[51]=v,e[52]=ae):ae=e[52];const ke=ae;let Ne;e[53]!==t||e[54]!==i?(Ne=((mn=t.filter(ie=>(ie.targetSystem&i)>0))==null?void 0:mn.map(sf))??[],e[53]=t,e[54]=i,e[55]=Ne):Ne=e[55];const De=F??null;let re;e[56]!==M?(re=ie=>M(Number(ie)),e[56]=M,e[57]=re):re=e[57];let he;e[58]!==S.kind||e[59]!==Ne||e[60]!==De||e[61]!==re?(he=s.jsx("div",{className:"col-2",children:s.jsx(l.CustomSelectInput,{label:S.kind,size:"sm",noEmptyOption:!0,options:Ne,value:De,onChange:re,dropdownWidth:200})}),e[58]=S.kind,e[59]=Ne,e[60]=De,e[61]=re,e[62]=he):he=e[62];let ye;e[63]!==z?(ye=(z==null?void 0:z.map(of))??[],e[63]=z,e[64]=ye):ye=e[64];const de=V??null;let xe;e[65]!==G?(xe=ie=>G(Number(ie)),e[65]=G,e[66]=xe):xe=e[66];let je;e[67]!==S.subkind||e[68]!==ye||e[69]!==de||e[70]!==xe?(je=s.jsx("div",{className:"col-3",children:s.jsx(l.CustomSelectInput,{label:S.subkind,size:"sm",noEmptyOption:!0,options:ye,value:de,onChange:xe,dropdownWidth:250})}),e[67]=S.subkind,e[68]=ye,e[69]=de,e[70]=xe,e[71]=je):je=e[71];let $e;e[72]!==he||e[73]!==je?($e=s.jsxs("div",{className:"row w-100",children:[he,je]}),e[72]=he,e[73]=je,e[74]=$e):$e=e[74];let Pe;e[75]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>D(!0),e[75]=Pe):Pe=e[75];const ze=F===null;let Ee;e[76]!==S.addNotifAction||e[77]!==ze?(Ee=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"notif-action-add",onClick:Pe,disabled:ze,children:S.addNotifAction}),e[76]=S.addNotifAction,e[77]=ze,e[78]=Ee):Ee=e[78];let Me;e[79]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>P(!0),e[79]=Me):Me=e[79];let He;e[80]!==z||e[81]!==V?(He=V===null||z.find(ie=>ie.id===V)===void 0,e[80]=z,e[81]=V,e[82]=He):He=e[82];let Te;e[83]!==j?(Te=s.jsx(j,{icon:"add"}),e[83]=j,e[84]=Te):Te=e[84];let Le;e[85]!==S.addNotifActionTemplate||e[86]!==He||e[87]!==Te?(Le=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"notif-action-template-add",onClick:Me,disabled:He,icon:Te,children:S.addNotifActionTemplate}),e[85]=S.addNotifActionTemplate,e[86]=He,e[87]=Te,e[88]=Le):Le=e[88];let Ve;e[89]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>L(!0),e[89]=Ve):Ve=e[89];let Ae;e[90]!==ne||e[91]!==v?(Ae=v===null||ne.find(ie=>ie.id===v)===void 0,e[90]=ne,e[91]=v,e[92]=Ae):Ae=e[92];let Ue;e[93]!==j?(Ue=s.jsx(j,{icon:"edit"}),e[93]=j,e[94]=Ue):Ue=e[94];let Xe;e[95]!==S.editTemplate||e[96]!==Ae||e[97]!==Ue?(Xe=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"template-edit",onClick:Ve,disabled:Ae,icon:Ue,children:S.editTemplate}),e[95]=S.editTemplate,e[96]=Ae,e[97]=Ue,e[98]=Xe):Xe=e[98];let Je;e[99]!==be||e[100]!==v?(Je=()=>{v&&be(v)},e[99]=be,e[100]=v,e[101]=Je):Je=e[101];let et;e[102]!==ne||e[103]!==v?(et=v===null||ne.find(ie=>ie.id===v)===void 0,e[102]=ne,e[103]=v,e[104]=et):et=e[104];let it;e[105]!==j?(it=s.jsx(j,{icon:"delete"}),e[105]=j,e[106]=it):it=e[106];let We;e[107]!==S.deleteTemplate||e[108]!==Je||e[109]!==et||e[110]!==it?(We=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"template-delete",onClick:Je,color:"danger",disabled:et,icon:it,children:S.deleteTemplate}),e[107]=S.deleteTemplate,e[108]=Je,e[109]=et,e[110]=it,e[111]=We):We=e[111];let Ge;e[112]!==Ee||e[113]!==Le||e[114]!==Xe||e[115]!==We?(Ge=s.jsxs(l.ResponsiveContextDropdown,{children:[Ee,Le,Xe,We]}),e[112]=Ee,e[113]=Le,e[114]=Xe,e[115]=We,e[116]=Ge):Ge=e[116];let Ke;e[117]!==$e||e[118]!==Ge?(Ke=s.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-2",children:[$e,Ge]}),e[117]=$e,e[118]=Ge,e[119]=Ke):Ke=e[119];let qe;e[120]!==fe?(qe=fe??[],e[120]=fe,e[121]=qe):qe=e[121];let tt;e[122]===Symbol.for("react.memo_cache_sentinel")?(tt=ie=>{C(ie),I(null)},e[122]=tt):tt=e[122];let Ye;e[123]!==h||e[124]!==ne||e[125]!==te||e[126]!==ke||e[127]!==v||e[128]!==qe?(Ye=s.jsx("div",{className:"h-75 w-25 overflow-hidden",children:s.jsx(Km,{templates:ne,roles:qe,onAddNotifTarget:te,onRemoveNotifTarget:ke,selectedTemplateId:v,setSelectedTemplateId:tt,EmployeePicker:h})}),e[123]=h,e[124]=ne,e[125]=te,e[126]=ke,e[127]=v,e[128]=qe,e[129]=Ye):Ye=e[129];let Qe;e[130]!==ne||e[131]!==(k==null?void 0:k.message)||e[132]!==v?(Qe=v&&s.jsx("div",{className:"h-75 w-75 overflow-hidden border rounded bg-white",children:s.jsx("iframe",{title:"notification",className:"w-100 h-100",srcDoc:(k==null?void 0:k.message)??((rt=ne.find(ie=>ie.id===v))==null?void 0:rt.templatePreview)})}),e[130]=ne,e[131]=k==null?void 0:k.message,e[132]=v,e[133]=Qe):Qe=e[133];let Ze;e[134]!==$||e[135]!==X||e[136]!==S.empty||e[137]!==S.historyLookup||e[138]!==(k==null?void 0:k.id)||e[139]!==v?(Ze=v&&s.jsx("div",{className:"w-25 h-75 overflow-y-scroll",children:X.length>0?s.jsxs(s.Fragment,{children:[s.jsx(l.TextInput,{type:"text",value:$,onChange:ie=>R((ie==null?void 0:ie.toString())??""),InputContainer:l.FloatingLabelInput,label:S.historyLookup,size:"sm",className:"mb-1"}),s.jsx("div",{children:X.filter(ie=>{var Re;return $?(Re=ie.recipients)==null?void 0:Re.map(lf).join(",").toLocaleLowerCase().includes($):ie}).map(ie=>{var Re;return s.jsxs("div",{role:"button",onClick:()=>I(ie),className:`d-flex flex-column align-items-center bg-white border rounded w-auto p-2 mx-1 mb-1 ${(k==null?void 0:k.id)===ie.id?"border-primary":""}`,children:[s.jsx(l.Typography,{variant:"body",children:l.format(ie.date,"dd.MM.yyyy")}),s.jsx("div",{className:"d-flex gap-1",children:(Re=ie.recipients)==null?void 0:Re.map(af)})]},ie.id)})})]}):s.jsx(l.Alert,{variant:"warning",children:S.empty})}),e[134]=$,e[135]=X,e[136]=S.empty,e[137]=S.historyLookup,e[138]=k==null?void 0:k.id,e[139]=v,e[140]=Ze):Ze=e[140];let nt;e[141]!==ne||e[142]!==a||e[143]!==ue||e[144]!==y||e[145]!==v||e[146]!==T||e[147]!==o?(nt=v&&ne.find(ie=>ie.id===v)!==void 0&&s.jsx(Qm,{show:T,onHide:()=>L(!1),template:ne.find(ie=>ie.id===v),onEdit:ue,styles:o,onPreview:y,entities:a}),e[141]=ne,e[142]=a,e[143]=ue,e[144]=y,e[145]=v,e[146]=T,e[147]=o,e[148]=nt):nt=e[148];let ge;e[149]!==z||e[150]!==t||e[151]!==g||e[152]!==r||e[153]!==V||e[154]!==F||e[155]!==_?(ge=V&&F&&s.jsx(Xm,{show:_,onHide:()=>P(!1),action:{...z.find(ie=>ie.id===V)??{id:V,name:""}},kind:{...t.find(ie=>ie.id===F)??{id:F,name:""}},onNotifTemplateAdd:g,reloadTemplates:async()=>W(await r(F))}),e[149]=z,e[150]=t,e[151]=g,e[152]=r,e[153]=V,e[154]=F,e[155]=_,e[156]=ge):ge=e[156];let Ce;e[157]!==z||e[158]!==t||e[159]!==x||e[160]!==F||e[161]!==E?(Ce=F&&s.jsx(Zm,{show:E,onHide:()=>D(!1),kind:{...t.find(ie=>ie.id===F)??{id:F,name:""}},onNotifActionAdd:x,onCreate:ie=>W([...z,ie])}),e[157]=z,e[158]=t,e[159]=x,e[160]=F,e[161]=E,e[162]=Ce):Ce=e[162];let Ie;e[163]!==Ye||e[164]!==Qe||e[165]!==Ze||e[166]!==nt||e[167]!==ge||e[168]!==Ce?(Ie=s.jsxs("div",{className:"vh-100 overflow-hidden d-flex gap-1",children:[Ye,Qe,Ze,nt,ge,Ce]}),e[163]=Ye,e[164]=Qe,e[165]=Ze,e[166]=nt,e[167]=ge,e[168]=Ce,e[169]=Ie):Ie=e[169];let ve;return e[170]!==Ke||e[171]!==Ie?(ve=s.jsxs("div",{className:"h-100 overflow-hidden",children:[Ke,Ie]}),e[170]=Ke,e[171]=Ie,e[172]=ve):ve=e[172],ve};function ef(n){return console.log(n)}function tf(n){return console.log(n)}function nf(n){return console.log(n)}function sf(n){return{id:n.id,name:n.name}}function of(n){return{id:n.id,name:n.name}}function lf(n){return n.name}function af(n){return s.jsx(l.Typography,{variant:"caption",children:`${n.name}`},n.email)}const rf=n=>{const e=l.compilerRuntimeExports.c(29),{history:t,onClick:o,BnfTableComponent:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{notifCentrum:r}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.u(),e[0]=c):c=e[0];const d=c;let u,m,p,f;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=d.accessor("id",{header:"notificationHistory.id",type:"number",meta:{hidden:!0}}),m=d.accessor("recipientId",{header:"notificationHistory.recipientId",type:"number",meta:{hidden:!0}}),p=d.accessor("recipientFullName",{header:"notificationHistory.recipientFullName",type:"string",meta:{hidden:!0}}),f=d.accessor("actionKindId",{header:"notificationHistory.actionKindId",type:"number",meta:{hidden:!0}}),e[1]=u,e[2]=m,e[3]=p,e[4]=f):(u=e[1],m=e[2],p=e[3],f=e[4]);let x;e[5]!==r.subkind?(x=d.accessor("actionKindName",{header:r.subkind,type:"string",meta:{filterVariant:"select"}}),e[5]=r.subkind,e[6]=x):x=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=d.accessor("actionId",{header:"notificationHistory.actionId",type:"number",meta:{hidden:!0}}),e[7]=g):g=e[7];let y;e[8]!==r.subkind?(y=d.accessor("actionName",{header:r.subkind,type:"string",meta:{filterVariant:"select"}}),e[8]=r.subkind,e[9]=y):y=e[9];let h;e[10]!==r.date?(h=d.accessor("date",{header:r.date,type:"string"}),e[10]=r.date,e[11]=h):h=e[11];let b;e[12]!==r.subject?(b=d.accessor("subject",{header:r.subject,type:"string"}),e[12]=r.subject,e[13]=b):b=e[13];let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=d.accessor("message",{header:"notificationHistory.message",type:"string",meta:{hidden:!0}}),e[14]=j):j=e[14];let S;e[15]!==h||e[16]!==b||e[17]!==x||e[18]!==y?(S=[u,m,p,f,x,g,y,h,b,j],e[15]=h,e[16]=b,e[17]=x,e[18]=y,e[19]=S):S=e[19];const N=S;let v;e[20]!==o?(v=L=>{o(L.id)},e[20]=o,e[21]=v):v=e[21];const C=v;let k,I;e[22]===Symbol.for("react.memo_cache_sentinel")?(k={mode:"enabled"},I={enabled:!1},e[22]=k,e[23]=I):(k=e[22],I=e[23]);let T;return e[24]!==a||e[25]!==N||e[26]!==t||e[27]!==C?(T=s.jsx(a,{columns:N,data:t,pagination:k,fullScreen:I,onRowClick:C}),e[24]=a,e[25]=N,e[26]=t,e[27]=C,e[28]=T):T=e[28],T},cf=n=>{const e=l.compilerRuntimeExports.c(28),{reloadUserHistory:t,EmployeePicker:o,BnfTableComponent:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{notifCentrum:r}=i,[c,d]=w.useState(null),[u,m]=Fe.useLocalStorageState("notif-user",null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[0]=p):p=e[0];const[f,x]=w.useState(p);let g,y;e[1]!==u||e[2]!==t?(g=()=>{u!==null&&t(u.id).then(I=>{x(I)}).catch(I=>{console.log(I),x([])})},y=[u,t],e[1]=u,e[2]=t,e[3]=g,e[4]=y):(g=e[3],y=e[4]),w.useEffect(g,y);let h;e[5]!==m?(h=I=>m(I?{id:Number(I.id),name:I.name}:null),e[5]=m,e[6]=h):h=e[6];let b;e[7]!==o||e[8]!==u||e[9]!==r.employee||e[10]!==h?(b=s.jsx("div",{className:"row",children:s.jsx("div",{className:"col-3",children:s.jsx(o,{label:r.employee,value:u,size:"sm",onSelect:h})})}),e[7]=o,e[8]=u,e[9]=r.employee,e[10]=h,e[11]=b):b=e[11];let j;e[12]!==f?(j=f??[],e[12]=f,e[13]=j):j=e[13];let S;e[14]!==f?(S=I=>d((f==null?void 0:f.find(T=>T.id===I))??null),e[14]=f,e[15]=S):S=e[15];let N;e[16]!==a||e[17]!==j||e[18]!==S?(N=s.jsx("div",{className:"col-5 h-75 overflow-hidden",children:s.jsx(rf,{history:j,onClick:S,BnfTableComponent:a})}),e[16]=a,e[17]=j,e[18]=S,e[19]=N):N=e[19];let v;e[20]!==c?(v=c&&s.jsx("div",{className:"col border rounded bg-white h-75",children:s.jsx("iframe",{title:"notification",className:"w-100 h-100",srcDoc:c==null?void 0:c.message})}),e[20]=c,e[21]=v):v=e[21];let C;e[22]!==v||e[23]!==N?(C=s.jsxs("div",{className:"vh-100 overflow hidden row",children:[N,v]}),e[22]=v,e[23]=N,e[24]=C):C=e[24];let k;return e[25]!==C||e[26]!==b?(k=s.jsxs("div",{className:"h-100 overflow-hidden d-flex flex-column gap-1",children:[b,C]}),e[25]=C,e[26]=b,e[27]=k):k=e[27],k},df=n=>{const e=l.compilerRuntimeExports.c(11),{zNumber:t,zStringRequired:o}=l.useZodSchemaTypes();let a,i;if(e[0]!==t||e[1]!==o){const p=l.objectType({id:t(),name:o(),css:o()});i=Se.useForm,a=l.t(p),e[0]=t,e[1]=o,e[2]=a,e[3]=i}else a=e[2],i=e[3];let r;e[4]!==a?(r={resolver:a},e[4]=a,e[5]=r):r=e[5];const c=i(r);let d;e[6]!==n?(d=async p=>{await n({...p,templatesCount:0})},e[6]=n,e[7]=d):d=e[7];const u=d;let m;return e[8]!==c||e[9]!==u?(m={formMethods:c,onSubmit:u},e[8]=c,e[9]=u,e[10]=m):m=e[10],m},uf=()=>{const n=l.compilerRuntimeExports.c(14),{texts:e}=w.useContext(l.LuminusComponentsContext),{notifCentrum:t}=e;let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.u(),n[0]=o):o=n[0];const a=o;let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.accessor("id",{type:"number",meta:{hidden:!0}}),n[1]=i):i=n[1];let r;n[2]!==t.name?(r=a.accessor("name",{type:"string",header:t.name}),n[2]=t.name,n[3]=r):r=n[3];let c;n[4]!==t.style?(c=a.accessor("css",{type:"string",header:t.style}),n[4]=t.style,n[5]=c):c=n[5];let d;n[6]!==t.templatesCount?(d=a.accessor("templatesCount",{type:"number",header:t.templatesCount}),n[6]=t.templatesCount,n[7]=d):d=n[7];let u;n[8]!==r||n[9]!==c||n[10]!==d?(u=[i,r,c,d],n[8]=r,n[9]=c,n[10]=d,n[11]=u):u=n[11];const m=u;let p;return n[12]!==m?(p={columnsDef:m},n[12]=m,n[13]=p):p=n[13],p},mf=n=>{const e=l.compilerRuntimeExports.c(64),{reloadStyles:t,BnfTableComponent:o,tableIdentifier:a,postStyle:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];const[c,d]=w.useState(r),[u,m]=w.useState(null),[p,f]=w.useState(null),{addNotification:x}=l.useNotifications(),{texts:g,ProjectIconComponent:y}=w.useContext(l.LuminusComponentsContext),{notifCentrum:h,reports:b}=g;let j,S;e[1]!==t?(j=()=>{t().then(ce=>{d(ce)}).catch(ce=>{console.log(ce),d([])})},S=[t],e[1]=t,e[2]=j,e[3]=S):(j=e[2],S=e[3]),w.useEffect(j,S);const{columnsDef:N}=uf();let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=ce=>{m(ce)},e[4]=v):v=e[4];const C=v;let k;e[5]!==x||e[6]!==i||e[7]!==t||e[8]!==b?(k=async ce=>{await i(ce).then(async()=>{x(b.saveSuccessful,"success"),d(await t())})},e[5]=x,e[6]=i,e[7]=t,e[8]=b,e[9]=k):k=e[9];const I=k,{formMethods:T,onSubmit:L}=df(I);let E;e[10]!==T?(E=T.watch("css"),e[10]=T,e[11]=E):E=e[11];const D=E;let _;e[12]!==D||e[13]!==h.templateBodyTagRequired?(_=()=>{f((D??"").includes("<template-body></template-body>")?null:h.templateBodyTagRequired)},e[12]=D,e[13]=h.templateBodyTagRequired,e[14]=_):_=e[14];let P;e[15]!==D||e[16]!==T||e[17]!==h?(P=[D,T,h],e[15]=D,e[16]=T,e[17]=h,e[18]=P):P=e[18],w.useEffect(_,P);let $,R;e[19]!==T||e[20]!==u?($=()=>{T.reset({id:(u==null?void 0:u.id)??0,name:(u==null?void 0:u.name)??"",css:(u==null?void 0:u.css)??""}),u||ot.hookFormSetNulls(T,["name","css"])},R=[T,u],e[19]=T,e[20]=u,e[21]=$,e[22]=R):($=e[21],R=e[22]),w.useEffect($,R);let F;e[23]!==o||e[24]!==N||e[25]!==c||e[26]!==a?(F=s.jsx("div",{className:"w-50 h-100 overflow-hidden",children:s.jsx(o,{tableId:a,columnsDef:N,data:c,onRowClick:C,useScrollableContainer:!0})}),e[23]=o,e[24]=N,e[25]=c,e[26]=a,e[27]=F):F=e[27];let M;e[28]!==T||e[29]!==L?(M=T.handleSubmit(L),e[28]=T,e[29]=L,e[30]=M):M=e[30];let O;e[31]!==h.name?(O=s.jsx(l.HookFormTextInput,{formField:"name",type:"text",className:"col",InputContainer:l.FloatingLabelInput,label:h.name,size:"sm"}),e[31]=h.name,e[32]=O):O=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B={style:{height:"auto"}},e[33]=B):B=e[33];let H;e[34]!==h.markup?(H=s.jsx(l.HookFormTextAreaInput,{formField:"css",label:h.markup,InputContainer:l.FloatingLabelInput,rows:20,customFormControlProps:B,showClearIcon:!0}),e[34]=h.markup,e[35]=H):H=e[35];let z;e[36]!==p?(z=p&&s.jsxs(l.Typography,{variant:"body",className:"text-danger",children:["**",p]}),e[36]=p,e[37]=z):z=e[37];let W;e[38]!==y||e[39]!==h.addNewStyle||e[40]!==u?(W=u&&s.jsx("div",{className:"col-auto",children:s.jsx(l.ContextButton,{onClick:()=>m(null),icon:s.jsx(y,{icon:"add"}),children:h.addNewStyle})}),e[38]=y,e[39]=h.addNewStyle,e[40]=u,e[41]=W):W=e[41];const A=D??"";let U;e[42]!==A?(U=A.includes("<template-body></template-body>"),e[42]=A,e[43]=U):U=e[43];const K=!U,V=u?h.save:h.create;let G;e[44]!==K||e[45]!==V?(G=s.jsx(l.PrimaryButton,{type:"submit",size:"sm",disabled:K,children:V}),e[44]=K,e[45]=V,e[46]=G):G=e[46];let Z;e[47]!==W||e[48]!==G?(Z=s.jsxs("div",{className:"d-flex gap-2 justify-content-end",children:[W,G]}),e[47]=W,e[48]=G,e[49]=Z):Z=e[49];let X;e[50]!==O||e[51]!==H||e[52]!==z||e[53]!==Z?(X=s.jsxs("div",{className:"d-flex flex-column gap-2",children:[O,H,z,Z]}),e[50]=O,e[51]=H,e[52]=z,e[53]=Z,e[54]=X):X=e[54];let le;e[55]!==M||e[56]!==X?(le=s.jsx(l.Form,{onSubmit:M,children:X}),e[55]=M,e[56]=X,e[57]=le):le=e[57];let q;e[58]!==T||e[59]!==le?(q=s.jsx("div",{className:"w-50 h-100 border rounded bg-white p-3",children:s.jsx(Se.FormProvider,{...T,children:le})}),e[58]=T,e[59]=le,e[60]=q):q=e[60];let oe;return e[61]!==F||e[62]!==q?(oe=s.jsxs("div",{className:"d-flex gap-2 h-100",children:[F,q]}),e[61]=F,e[62]=q,e[63]=oe):oe=e[63],oe},ml=n=>{var T,L,E,D,_;const e=l.compilerRuntimeExports.c(37),{result:t,onClose:o,tableIdentifier:a,BnfTableComponent:i}=n,{texts:r,ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),{imports:d}=r;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=l.u(),e[0]=u):u=e[0];const m=u;let p;e[1]!==d.row?(p=m.accessor("row",{header:d.row,type:"number",size:100}),e[1]=d.row,e[2]=p):p=e[2];let f;e[3]!==d.column?(f=m.accessor("column",{header:d.column,type:"number",size:100}),e[3]=d.column,e[4]=f):f=e[4];let x;e[5]!==d.error?(x=m.accessor("error",{header:d.error,type:"string",size:500}),e[5]=d.error,e[6]=x):x=e[6];let g;e[7]!==p||e[8]!==f||e[9]!==x?(g=[p,f,x],e[7]=p,e[8]=f,e[9]=x,e[10]=g):g=e[10];const y=g;if(!t)return null;const h=t.success?"success":"danger",b=t.success?d.importSuccess:d.importFailed;let j;e[11]!==b?(j=s.jsx("div",{className:"w-100 text-center",children:b}),e[11]=b,e[12]=j):j=e[12];let S;e[13]!==d||e[14]!==t.data||e[15]!==t.success?(S=t.success&&((T=t.data)!=null&&T.added||(L=t.data)!=null&&L.updated||(E=t.data)!=null&&E.deleted)?s.jsx("div",{className:"d-flex justify-content-center mt-2",children:s.jsxs("div",{className:"list-group",children:[t.data.added?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importAdded(t.data.added)," "]})}):null,t.data.updated?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importUpdated(t.data.updated)," "]})}):null,t.data.deleted?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importDeleted(t.data.deleted)," "]})}):null]})}):null,e[13]=d,e[14]=t.data,e[15]=t.success,e[16]=S):S=e[16];let N;e[17]!==i||e[18]!==y||e[19]!==t.data||e[20]!==t.success||e[21]!==a?(N=!t.success&&((_=(D=t.data)==null?void 0:D.errors)==null?void 0:_.length)>0?s.jsx("div",{className:"mt-3",children:s.jsx(i,{columns:y,data:t.data.errors,tableId:a})}):null,e[17]=i,e[18]=y,e[19]=t.data,e[20]=t.success,e[21]=a,e[22]=N):N=e[22];let v;e[23]!==S||e[24]!==N||e[25]!==j?(v=s.jsxs("div",{className:"w-100",children:[j,S,N]}),e[23]=S,e[24]=N,e[25]=j,e[26]=v):v=e[26];let C;e[27]!==c||e[28]!==o||e[29]!==t.success?(C=o!==void 0?s.jsx(l.IconButton,{color:t.success?"success":"danger",className:l.classNames("hover-darken",t.success?"bg-success-subtle":"bg-danger-subtle"),onClick:o,children:s.jsx(c,{icon:"close"})}):null,e[27]=c,e[28]=o,e[29]=t.success,e[30]=C):C=e[30];let k;e[31]!==v||e[32]!==C?(k=s.jsxs("div",{className:"d-flex gap-3 align-items-start",children:[v,C]}),e[31]=v,e[32]=C,e[33]=k):k=e[33];let I;return e[34]!==k||e[35]!==h?(I=s.jsx(s.Fragment,{children:s.jsx(l.Alert,{variant:h,size:"sm",className:"mb-2 p-2",children:k})}),e[34]=k,e[35]=h,e[36]=I):I=e[36],I},ff="_upload-box_9ka79_1",pf="_browse-btn_9ka79_15",In={uploadBox:ff,browseBtn:pf},fl=n=>{const e=l.compilerRuntimeExports.c(35),{file:t,onFileChange:o,onImport:a,children:i,multiple:r,accept:c}=n,{ProjectIconComponent:d,texts:u}=w.useContext(l.LuminusComponentsContext),{imports:m}=u;let p;e[0]!==r||e[1]!==o?(p=async T=>{T.length>0&&o(r===!0?[...T]:T[0])},e[0]=r,e[1]=o,e[2]=p):p=e[2];const f=p;let x;e[3]!==f?(x=T=>{var E;T.preventDefault();const L=(E=T.dataTransfer)==null?void 0:E.files;L&&(L==null?void 0:L.length)>0&&f(L)},e[3]=f,e[4]=x):x=e[4];const g=x;let y;e[5]!==i||e[6]!==t||e[7]!==m.start||e[8]!==r||e[9]!==a?(y=t!==null?s.jsxs("div",{className:"d-flex border rounded p-1 ps-2 bg-white justify-content-between align-items-center mb-2",children:[s.jsx(l.Typography,{variant:"body",children:r?t.map(hf).join(", "):t.name}),s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[i??null,s.jsx(l.PrimaryButton,{className:"text-nowrap",size:"sm",disabled:t===null,onClick:a,children:m.start})]})]}):null,e[5]=i,e[6]=t,e[7]=m.start,e[8]=r,e[9]=a,e[10]=y):y=e[10];const h=t!==null;let b;e[11]!==h?(b=l.classNames(In.uploadBox,{[In.active]:h}),e[11]=h,e[12]=b):b=e[12];let j;e[13]!==m.dropHint?(j=s.jsx(l.Typography,{variant:"body",children:m.dropHint}),e[13]=m.dropHint,e[14]=j):j=e[14];let S;e[15]!==f?(S=T=>{var L;return((L=T.target)==null?void 0:L.files)&&f(T.target.files)},e[15]=f,e[16]=S):S=e[16];let N;e[17]!==c||e[18]!==r||e[19]!==S?(N=s.jsx("input",{type:"file",hidden:!0,id:"browse",onChange:S,multiple:r,accept:c}),e[17]=c,e[18]=r,e[19]=S,e[20]=N):N=e[20];let v;e[21]!==d?(v=s.jsx(d,{icon:"file-upload"}),e[21]=d,e[22]=v):v=e[22];let C;e[23]!==m.pickFileHint||e[24]!==v?(C=s.jsx("label",{htmlFor:"browse",className:In.browseBtn,children:s.jsxs(l.Typography,{variant:"body",className:"d-flex gap-2 align-items-center",children:[v,m.pickFileHint]})}),e[23]=m.pickFileHint,e[24]=v,e[25]=C):C=e[25];let k;e[26]!==g||e[27]!==C||e[28]!==b||e[29]!==j||e[30]!==N?(k=s.jsxs("div",{className:b,onDrop:g,onDragOver:gf,children:[j,N,C]}),e[26]=g,e[27]=C,e[28]=b,e[29]=j,e[30]=N,e[31]=k):k=e[31];let I;return e[32]!==k||e[33]!==y?(I=s.jsxs(s.Fragment,{children:[y,k]}),e[32]=k,e[33]=y,e[34]=I):I=e[34],I};function hf(n){return n.name}function gf(n){return n.preventDefault()}const xf=n=>{const e=l.compilerRuntimeExports.c(18),{otherSettingId:t,languageOptions:o,tableIdentifier:a,SettingsOutlet:i,BnfTableComponent:r,importLocalization:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{localizations:u}=d,[m,p]=w.useState(o[0].id),[f,x]=w.useState(null),[g,y]=w.useState(null);let h;e[0]!==c||e[1]!==m||e[2]!==f?(h=async()=>{if(f===null)return;const N=await c({file:f,lang:m});N.status==="success"&&y(N.data)},e[0]=c,e[1]=m,e[2]=f,e[3]=h):h=e[3];const b=h;let j;e[4]!==r||e[5]!==b||e[6]!==m||e[7]!==o||e[8]!==u.importedLanguage||e[9]!==g||e[10]!==f||e[11]!==a?(j=g?s.jsx(ml,{result:g,onClose:()=>y(null),BnfTableComponent:r,tableIdentifier:a}):s.jsx(fl,{file:f,onFileChange:x,onImport:b,children:s.jsx("div",{style:{minWidth:140},children:s.jsx(l.CustomSelectInput,{value:m,onChange:N=>typeof N=="string"?p(N):null,options:o,label:u.importedLanguage})})}),e[4]=r,e[5]=b,e[6]=m,e[7]=o,e[8]=u.importedLanguage,e[9]=g,e[10]=f,e[11]=a,e[12]=j):j=e[12];let S;return e[13]!==i||e[14]!==u.localizationImport||e[15]!==t||e[16]!==j?(S=s.jsx(i,{itemId:t,title:u.localizationImport,children:j}),e[13]=i,e[14]=u.localizationImport,e[15]=t,e[16]=j,e[17]=S):S=e[17],S},yf=(n,e)=>{const t=e.split(".");let o=n;for(let a=0;a<t.length;a++){const i=t[a],r=o[i];if(typeof r=="string")return r;if(r===void 0)return;o=r}},vf=n=>{const e=l.compilerRuntimeExports.c(22),{selLng:t,lngsData:o,localizationKey:a,reloadData:i,saveChanges:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext);let d;if(e[0]!==o||e[1]!==a||e[2]!==t){e:{const N=o.get(t);if(N===void 0){d="";break e}const v=yf(N,a);d=N!==void 0&&v!==void 0?v:""}e[0]=o,e[1]=a,e[2]=t,e[3]=d}else d=e[3];const u=d,[m,p]=w.useState(u);let f;e[4]!==a||e[5]!==i||e[6]!==r||e[7]!==t||e[8]!==m?(f=async()=>{await r([{fileName:t+".json",items:[{key:a,value:m}]}]),await i()},e[4]=a,e[5]=i,e[6]=r,e[7]=t,e[8]=m,e[9]=f):f=e[9];const x=f,g=m!==u,y=t+a;let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=N=>{p(typeof N!="string"?"":N)},e[10]=h):h=e[10];let b;e[11]!==y||e[12]!==m?(b=s.jsx(l.TextInput,{label:y,type:"text",value:m,onChange:h,InputContainer:l.RowLabelInput,withoutLabel:!0,className:"flex-grow-1"}),e[11]=y,e[12]=m,e[13]=b):b=e[13];let j;e[14]!==c||e[15]!==u||e[16]!==x||e[17]!==g?(j=g?s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[s.jsx(l.IconButton,{color:"danger",onClick:()=>p(u),children:s.jsx(c,{icon:"cancel"})}),s.jsx(l.IconButton,{onClick:x,children:s.jsx(c,{icon:"check"})})]}):null,e[14]=c,e[15]=u,e[16]=x,e[17]=g,e[18]=j):j=e[18];let S;return e[19]!==b||e[20]!==j?(S=s.jsxs("div",{className:"d-flex",children:[b,j]}),e[19]=b,e[20]=j,e[21]=S):S=e[21],S},bf="_keysTable_1j6ns_1",jf="_subgrid_1j6ns_14",Sf="_lngSelectRow_1j6ns_19",Cf="_tableItem_1j6ns_26",Nf="_tableFooter_1j6ns_29",wf="_tableFullWidth_1j6ns_35",If="_tableBody_1j6ns_39",kf="_lngSelect_1j6ns_19",Tf="_addLng_1j6ns_52",_f="_fileSelect_1j6ns_57",Df="_searchBox_1j6ns_61",lt={keysTable:bf,subgrid:jf,lngSelectRow:Sf,tableItem:Cf,tableFooter:Nf,tableFullWidth:wf,tableBody:If,lngSelect:kf,addLng:Tf,fileSelect:_f,searchBox:Df},en=50,Ef=(n,e)=>{const t=e.split(".");let o=n;for(let a=0;a<t.length;a++){const i=t[a],r=o[i];if(typeof r=="string")return r;if(r===void 0)return;o=r}},Lf=n=>{const e=l.compilerRuntimeExports.c(173),{languageOptions:t,envMode:o,getOtherSettingsUrl:a,downloadXls:i,saveChanges:r,localizationFilesOptions:c,remoteLocalesRoot:d}=n,{texts:u,ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),{localizations:p}=u,[f,x]=w.useState(1);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[0]=g):g=e[0];const[y,h]=w.useState(g),[b,j]=w.useState(null),[S,N]=w.useState("");let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[1]=v):v=e[1];const[C,k]=w.useState(v);let I;e[2]===Symbol.for("react.memo_cache_sentinel")?(I=ge=>{h(new Map),k(ge)},e[2]=I):I=e[2];const T=I;let L;if(e[3]!==t||e[4]!==C){let ge;e[6]!==C?(ge=Ce=>!C.has(Ce.id),e[6]=C,e[7]=ge):ge=e[7],L=t.filter(ge),e[3]=t,e[4]=C,e[5]=L}else L=e[5];const E=L;let D;e:{if(y.size===0){let Ie;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ie=[],e[8]=Ie):Ie=e[8],D=Ie;break e}let ge;if(e[9]!==y||e[10]!==c||e[11]!==b||e[12]!==C){const Ie=new Set,ve=(rt,ie)=>{const Re=ie===void 0?"":ie;if(typeof rt[1]=="object"){Object.entries(rt[1]).forEach(yt=>ve(yt,Re+rt[0]+"."));return}Ie.add(Re+rt[0])};Array.from(y).forEach(rt=>{Object.entries(rt[1]).forEach(ie=>ve(ie))});const Be=Array.from(Ie),xt=c.find(rt=>rt.path===b);ge=((xt==null?void 0:xt.type)==="report"?Be.filter(Rf):Be).map(rt=>({key:rt,lngData:new Map(Array.from(C).map(ie=>{const Re=y.get(ie);return[ie,(Re===void 0?void 0:Ef(Re,rt))??""]}))})),e[9]=y,e[10]=c,e[11]=b,e[12]=C,e[13]=ge}else ge=e[13];D=ge}const _=D;let P;e[14]!==S||e[15]!==_?(P=_.filter(ge=>l.stringSearchWithin(ge.key,S)||Array.from(ge.lngData).some(Ce=>typeof(Ce==null?void 0:Ce[1])!="string"?!1:l.stringSearchWithin((Ce==null?void 0:Ce[1])??"",S))),e[14]=S,e[15]=_,e[16]=P):P=e[16];const $=P,R=Math.ceil($.length/en);let F;e[17]!==R?(F=ge=>{ge!==null&&x(()=>Math.max(1,Math.min(ge,R)))},e[17]=R,e[18]=F):F=e[18];const M=F;let O;e[19]!==d||e[20]!==b||e[21]!==C?(O=async()=>{if(b===null)return;const ge=Array.from(C).map(Ie=>(async()=>{const ve=await l.axios.get(`${d}${b==null?void 0:b.replace("{{lng}}",Ie)}&v=${new Date().getTime()}`,{responseType:"json"});return[Ie,ve.data]})()),Ce=await Promise.allSettled(ge);h(new Map(Ce.map(Ff)))},e[19]=d,e[20]=b,e[21]=C,e[22]=O):O=e[22];const B=O;let H;e[23]!==B?(H=async()=>{B()},e[23]=B,e[24]=H):H=e[24];const z=H,W=E.length>0,A=C.size+1+(W?1:0);let U;e[25]!==M||e[26]!==f?(U=()=>{M(f)},e[25]=M,e[26]=f,e[27]=U):U=e[27];let K;e[28]!==M||e[29]!==f||e[30]!==$?(K=[M,f,$],e[28]=M,e[29]=f,e[30]=$,e[31]=K):K=e[31],w.useEffect(U,K);let V,G;if(e[32]!==B?(V=()=>{B()},G=[B],e[32]=B,e[33]=V,e[34]=G):(V=e[33],G=e[34]),w.useEffect(V,G),d===void 0){const ge=p.cantRunLocalizationSettings;let Ce,Ie;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx("br",{}),Ie=s.jsx("br",{}),e[35]=Ce,e[36]=Ie):(Ce=e[35],Ie=e[36]);let ve;e[37]!==o||e[38]!==p?(ve=p.envNotConnectedToRemote(o.toUpperCase()),e[37]=o,e[38]=p,e[39]=ve):ve=e[39];let Be;return e[40]!==p.cantRunLocalizationSettings||e[41]!==ve?(Be=s.jsx(l.PageContainer,{children:s.jsxs(l.Alert,{variant:"danger",className:"fw-bold",children:[ge,Ce,Ie,ve]})}),e[40]=p.cantRunLocalizationSettings,e[41]=ve,e[42]=Be):Be=e[42],Be}let Z;e[43]!==p.localizationSettings?(Z=s.jsx("div",{className:"d-flex gap-4",children:s.jsx(l.Typography,{variant:"h3",children:p.localizationSettings})}),e[43]=p.localizationSettings,e[44]=Z):Z=e[44];const X=p.localizationSettings,le=W?1:0;let q;e[45]!==le||e[46]!==A?(q={"--keys-table-columns":A,"--adding-column":le},e[45]=le,e[46]=A,e[47]=q):q=e[47];let oe;e[48]===Symbol.for("react.memo_cache_sentinel")?(oe=l.classNames(lt.tableFullWidth,"d-flex align-items-center justify-content-between gap-2 px-2 mt-1"),e[48]=oe):oe=e[48];let ce;e[49]!==c?(ce=c.map($f),e[49]=c,e[50]=ce):ce=e[50];let fe;e[51]===Symbol.for("react.memo_cache_sentinel")?(fe=ge=>typeof ge!="number"?j(ge):null,e[51]=fe):fe=e[51];let pe;e[52]!==p.localizationFile||e[53]!==b||e[54]!==ce?(pe=s.jsx(l.CustomSelectInput,{options:ce,value:b,onChange:fe,size:"sm",label:p.localizationFile,className:lt.fileSelect,noSortOptions:!0}),e[52]=p.localizationFile,e[53]=b,e[54]=ce,e[55]=pe):pe=e[55];let J;e[56]===Symbol.for("react.memo_cache_sentinel")?(J=l.classNames(lt.searchBox,"d-flex align-items-center gap-2 border rounded"),e[56]=J):J=e[56];let Y;e[57]===Symbol.for("react.memo_cache_sentinel")?(Y={className:"mt- me-n4"},e[57]=Y):Y=e[57];let Q;e[58]!==m?(Q=s.jsx(m,{icon:"search",className:"text-muted",size:18,iconProps:Y}),e[58]=m,e[59]=Q):Q=e[59];let ne;e[60]===Symbol.for("react.memo_cache_sentinel")?(ne=ge=>N(typeof ge=="string"?ge:""),e[60]=ne):ne=e[60];const ee=S!=="";let te;e[61]!==S||e[62]!==ee?(te=s.jsx(l.TextInput,{type:"text",value:S,onChange:ne,size:"sm",showClearIcon:ee,withoutLabel:!0,placeholder:"vyhledávat...",className:"placeholder-muted bg-transparent border-0 my-0 py-0 w-100"}),e[61]=S,e[62]=ee,e[63]=te):te=e[63];let se;e[64]!==Q||e[65]!==te?(se=s.jsxs("div",{className:J,children:[Q,te]}),e[64]=Q,e[65]=te,e[66]=se):se=e[66];let ue;e[67]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(l.FileExtensionIcon,{fileExtension:"xls"}),e[67]=ue):ue=e[67];let me;e[68]!==i||e[69]!==p.xlsExport?(me=s.jsx(l.ResponsiveContextDropdownItem,{cKey:"export",hideOn:"always",onClick:i,icon:ue,children:p.xlsExport}),e[68]=i,e[69]=p.xlsExport,e[70]=me):me=e[70];let be;e[71]!==a?(be=a("localizationImport"),e[71]=a,e[72]=be):be=e[72];let ae;e[73]!==m?(ae=s.jsx(m,{icon:"link"}),e[73]=m,e[74]=ae):ae=e[74];let ke;e[75]!==p.import||e[76]!==be||e[77]!==ae?(ke=s.jsx(l.ResponsiveContextDropdownItem,{cKey:"import",hideOn:"always",to:be,icon:ae,children:p.import}),e[75]=p.import,e[76]=be,e[77]=ae,e[78]=ke):ke=e[78];let Ne;e[79]!==me||e[80]!==ke?(Ne=s.jsxs(l.ResponsiveContextDropdown,{children:[me,ke]}),e[79]=me,e[80]=ke,e[81]=Ne):Ne=e[81];let De;e[82]!==pe||e[83]!==se||e[84]!==Ne?(De=s.jsxs("div",{className:oe,children:[pe,se,Ne]}),e[82]=pe,e[83]=se,e[84]=Ne,e[85]=De):De=e[85];let re;e[86]===Symbol.for("react.memo_cache_sentinel")?(re=l.classNames(lt.subgrid,lt.lngSelectRow),e[86]=re):re=e[86];let he;e[87]!==p.key?(he=s.jsx(l.Typography,{variant:"body",children:p.key}),e[87]=p.key,e[88]=he):he=e[88];let ye;e[89]!==C?(ye=Array.from(C),e[89]=C,e[90]=ye):ye=e[90];let de;e[91]!==t||e[92]!==p.language||e[93]!==C||e[94]!==ye?(de=ye.map((ge,Ce)=>s.jsx(l.CustomSelectInput,{options:t.filter(Ie=>Ie.id===ge||!C.has(Ie.id)),value:ge,onChange:Ie=>T(ve=>Ie===null?(ve.delete(ge),new Set(ve)):(typeof Ie=="string"&&(ve.delete(ge),ve.add(Ie)),new Set(ve))),size:"sm",label:`${p.language} ${Ce+1}`,withoutLabel:!0,InputContainer:l.RowLabelInput,className:l.classNames(lt.lngSelect)},ge)),e[91]=t,e[92]=p.language,e[93]=C,e[94]=ye,e[95]=de):de=e[95];let xe;e[96]!==E||e[97]!==W||e[98]!==p.addLanguage?(xe=W?s.jsx(l.CustomSelectInput,{options:E,value:null,onChange:ge=>T(Ce=>(typeof ge=="string"&&Ce.add(ge),new Set(Ce))),size:"sm",label:p.addLanguage,InputContainer:l.RowLabelInput,className:l.classNames(lt.lngSelect,lt.addLng)}):null,e[96]=E,e[97]=W,e[98]=p.addLanguage,e[99]=xe):xe=e[99];let je;e[100]!==he||e[101]!==de||e[102]!==xe?(je=s.jsxs("div",{className:re,children:[he,de,xe]}),e[100]=he,e[101]=de,e[102]=xe,e[103]=je):je=e[103];let $e;e[104]===Symbol.for("react.memo_cache_sentinel")?($e=l.classNames(lt.subgrid,lt.tableBody),e[104]=$e):$e=e[104];let Pe;e[105]!==p.noDataFiltered||e[106]!==p.noDataLoaded||e[107]!==_.length||e[108]!==$.length?(Pe=_.length===0||$.length===0?s.jsx(l.Alert,{variant:"warning",className:l.classNames(lt.tableFullWidth,lt.emptyTableAlert,"my-n1"),children:_.length===0?p.noDataLoaded:$.length===0?p.noDataFiltered:null}):null,e[105]=p.noDataFiltered,e[106]=p.noDataLoaded,e[107]=_.length,e[108]=$.length,e[109]=Pe):Pe=e[109];let ze;e[110]!==f||e[111]!==$?(ze=$.slice(en*(f-1),en*f),e[110]=f,e[111]=$,e[112]=ze):ze=e[112];let Ee;e[113]!==y||e[114]!==z||e[115]!==r||e[116]!==C||e[117]!==ze?(Ee=ze.map(ge=>s.jsxs("div",{className:l.classNames(lt.subgrid,lt.tableItem),children:[s.jsx(l.Typography,{variant:"form-label",children:ge.key}),Array.from(C).map(Ce=>s.jsx(vf,{localizationKey:ge.key,lngsData:y,selLng:Ce,reloadData:z,saveChanges:r},Ce))]},ge.key)),e[113]=y,e[114]=z,e[115]=r,e[116]=C,e[117]=ze,e[118]=Ee):Ee=e[118];let Me;e[119]!==Pe||e[120]!==Ee?(Me=s.jsxs("div",{className:$e,children:[Pe,Ee]}),e[119]=Pe,e[120]=Ee,e[121]=Me):Me=e[121];let He;e[122]===Symbol.for("react.memo_cache_sentinel")?(He=l.classNames("d-flex align-items-center justify-content-around gap-3 px-2 py-0",lt.tableFooter),e[122]=He):He=e[122];let Te;e[123]!==$.length?(Te=s.jsx("span",{className:"fw-bold",children:$.length}),e[123]=$.length,e[124]=Te):Te=e[124];let Le;e[125]!==p.keyCount||e[126]!==Te?(Le=s.jsx("div",{children:s.jsxs(l.Typography,{variant:"body",children:[p.keyCount,":"," ",Te]})}),e[125]=p.keyCount,e[126]=Te,e[127]=Le):Le=e[127];let Ve;e[128]!==p.page?(Ve=s.jsxs(l.Typography,{variant:"body",children:[p.page,": "]}),e[128]=p.page,e[129]=Ve):Ve=e[129];let Ae;e[130]!==M||e[131]!==f?(Ae=()=>M(f-1),e[130]=M,e[131]=f,e[132]=Ae):Ae=e[132];let Ue;e[133]!==m?(Ue=s.jsx(m,{icon:"minus"}),e[133]=m,e[134]=Ue):Ue=e[134];let Xe;e[135]!==Ae||e[136]!==Ue?(Xe=s.jsx(l.IconButton,{size:"sm",onClick:Ae,children:Ue}),e[135]=Ae,e[136]=Ue,e[137]=Xe):Xe=e[137];let Je;e[138]===Symbol.for("react.memo_cache_sentinel")?(Je={width:30},e[138]=Je):Je=e[138];let et;e[139]!==M||e[140]!==f?(et=s.jsx("div",{style:Je,children:s.jsx(nl,{value:f,onChange:M,InputContainer:l.RowLabelInput,withoutLabel:!0,size:"sm"})}),e[139]=M,e[140]=f,e[141]=et):et=e[141];const it=Math.ceil($.length/en);let We;e[142]!==it?(We=s.jsxs(l.Typography,{variant:"body",children:["/",it]}),e[142]=it,e[143]=We):We=e[143];let Ge;e[144]!==M||e[145]!==f?(Ge=()=>M(f+1),e[144]=M,e[145]=f,e[146]=Ge):Ge=e[146];let Ke;e[147]!==m?(Ke=s.jsx(m,{icon:"plus"}),e[147]=m,e[148]=Ke):Ke=e[148];let qe;e[149]!==Ge||e[150]!==Ke?(qe=s.jsx(l.IconButton,{size:"sm",onClick:Ge,children:Ke}),e[149]=Ge,e[150]=Ke,e[151]=qe):qe=e[151];let tt;e[152]!==Xe||e[153]!==et||e[154]!==We||e[155]!==qe?(tt=s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[Xe,et,We,qe]}),e[152]=Xe,e[153]=et,e[154]=We,e[155]=qe,e[156]=tt):tt=e[156];let Ye;e[157]!==Ve||e[158]!==tt?(Ye=s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[Ve,tt]}),e[157]=Ve,e[158]=tt,e[159]=Ye):Ye=e[159];let Qe;e[160]!==Le||e[161]!==Ye?(Qe=s.jsxs("div",{className:He,children:[Le,Ye]}),e[160]=Le,e[161]=Ye,e[162]=Qe):Qe=e[162];let Ze;e[163]!==q||e[164]!==De||e[165]!==je||e[166]!==Me||e[167]!==Qe?(Ze=s.jsxs("div",{className:lt.keysTable,style:q,children:[De,je,Me,Qe]}),e[163]=q,e[164]=De,e[165]=je,e[166]=Me,e[167]=Qe,e[168]=Ze):Ze=e[168];let nt;return e[169]!==p.localizationSettings||e[170]!==Z||e[171]!==Ze?(nt=s.jsx(l.PageContainer,{title:Z,helmet:X,variant:"fullScreen",children:Ze}),e[169]=p.localizationSettings,e[170]=Z,e[171]=Ze,e[172]=nt):nt=e[172],nt};function Rf(n){const e=n.split(".");return e[e.length-1]==="caption"}function Ff(n){return n.status==="fulfilled"?n.value:["",{}]}function $f(n){return{id:n.path,name:n.nameTranslationKey}}const Qs=3,pl=(n,e,t)=>{var a;if((e==null?void 0:e.customPathBuilder)!==void 0)return e.customPathBuilder(n,e);const o=(a=t.find(i=>i.key===n.type))==null?void 0:a.toPath;return o?`${o}/${n.searchKey}`:"/not-found"},hl=(n,e)=>{var t;return((t=e==null?void 0:e.customNameBuilder)==null?void 0:t.call(e,n))??n.name},gl=(n,e,t,o,a)=>{const i=l.compilerRuntimeExports.c(22),r=l.useAxios(),[c,d]=w.useState(!1);let u;i[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],i[0]=u):u=i[0];const[m,p]=w.useState(u),f=n==="";let x;i[1]!==r||i[2]!==o||i[3]!==f||i[4]!==e||i[5]!==t||i[6]!==n?(x=()=>{p([]),!(e.length<Qs)&&(d(!0),r.get(ot.generateApiPath(t,{path:{query:e},query:{type:f?void 0:n,count:o?void 0:f?5:20}})).then(C=>{const{data:k}=C;p(k),d(!1)}).catch(()=>{d(!1)}))},i[1]=r,i[2]=o,i[3]=f,i[4]=e,i[5]=t,i[6]=n,i[7]=x):x=i[7];const g=x;let y;e:{if(a===void 0){let k;i[8]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[8]=k):k=i[8],y=k;break e}if(e.length<Qs||!["XAP","",null].includes(n)){let k;i[9]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[9]=k):k=i[9],y=k;break e}let C;i[10]!==e||i[11]!==a?(C=[],a.forEach(k=>{const I=k.items.filter(T=>l.stringSearchWithin(T.name,decodeURIComponent(e)));I.length>0&&C.push({key:{...k.key,totalCount:I.length},items:I})}),i[10]=e,i[11]=a,i[12]=C):C=i[12],y=C}const h=y;let b;i[13]!==m||i[14]!==h?(b=h.concat(m),i[13]=m,i[14]=h,i[15]=b):b=i[15];const j=b;let S,N;i[16]!==g?(S=()=>{g()},N=[g],i[16]=g,i[17]=S,i[18]=N):(S=i[17],N=i[18]),w.useEffect(S,N);let v;return i[19]!==c||i[20]!==j?(v={isLoading:c,searchItems:j},i[19]=c,i[20]=j,i[21]=v):v=i[21],v},Pf="_input-group_1hcpm_1",Mf="_input-group-text_1hcpm_5",Af="_left_1hcpm_9",Bf="_right_1hcpm_13",Of="_input_1hcpm_1",zf="_submit-button_1hcpm_20",Ct={inputGroup:Pf,inputGroupText:Mf,left:Af,right:Bf,input:Of,submitButton:zf},Hf=n=>{const e=l.compilerRuntimeExports.c(10),{searchTypes:t,selectedType:o,setSelectedType:a}=n,i=o==null?void 0:o.text;let r;e[0]!==i?(r=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle,icon:null,text:i}),e[0]=i,e[1]=r):r=e[1];let c;if(e[2]!==t||e[3]!==a){let u;e[5]!==a?(u=m=>s.jsx(l.DropdownItem,{icon:null,onClick:()=>a(m.key),children:m.text},m.key),e[5]=a,e[6]=u):u=e[6],c=t.map(u),e[2]=t,e[3]=a,e[4]=c}else c=e[4];let d;return e[7]!==r||e[8]!==c?(d=s.jsx(l.Dropdown,{toggle:r,children:c}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d},Vf="_dropdown_1ddrg_1",Uf="_open_1ddrg_12",Wf="_loading-container_1ddrg_15",Gf="_groups-container_1ddrg_22",Kf="_group_1ddrg_22",qf="_header_1ddrg_26",Yf="_item_1ddrg_33",wt={dropdown:Vf,open:Uf,loadingContainer:Wf,groupsContainer:Gf,group:Kf,header:qf,item:Yf},Qf=n=>{const e=l.compilerRuntimeExports.c(20),{item:t,searchTypes:o,onCancel:a}=n;let i;if(e[0]!==t.type||e[1]!==o){let y;e[3]!==t.type?(y=h=>h.key===t.type,e[3]=t.type,e[4]=y):y=e[4],i=o.find(y),e[0]=t.type,e[1]=o,e[2]=i}else i=e[2];const r=i;let c;e[5]!==t||e[6]!==r||e[7]!==o?(c=pl(t,r,o),e[5]=t,e[6]=r,e[7]=o,e[8]=c):c=e[8];const d=c;let u;e[9]!==t||e[10]!==r?(u=hl(t,r),e[9]=t,e[10]=r,e[11]=u):u=e[11];const m=u;let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=l.classNames("search-item d-flex gap-3 align-items-center justify-content-between",wt.item),e[12]=p):p=e[12];let f;e[13]!==m?(f=s.jsx(l.Typography,{variant:"body2",className:"text-nowrap text-truncate",children:m}),e[13]=m,e[14]=f):f=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:s.jsx(l.MdOutlineArrowOutward,{})}),e[15]=x):x=e[15];let g;return e[16]!==d||e[17]!==a||e[18]!==f?(g=s.jsxs(we.Link,{to:d,className:p,onClick:a,children:[f,x]}),e[16]=d,e[17]=a,e[18]=f,e[19]=g):g=e[19],g},Zf=n=>{const e=l.compilerRuntimeExports.c(13),{show:t,query:o,onCancel:a,groups:i,isLoading:r,searchTypes:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{appSearch:u}=d,m=w.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=[m],e[0]=p):p=e[0],l.useClickOutside(p,a);let f;e[1]!==t?(f=l.classNames("luminus-app-search-dropdown shadow rounded",wt.dropdown,{[wt.open]:t}),e[1]=t,e[2]=f):f=e[2];let x;e[3]!==u||e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==c?(x=r?s.jsx("div",{className:wt.loadingContainer,children:s.jsx(l.Spinner,{animation:"border",variant:"primary"})}):s.jsx("div",{className:wt.groupsContainer,children:i==null?void 0:i.map(y=>{var h;return s.jsxs("div",{className:l.classNames(wt.group),children:[s.jsxs(we.Link,{to:`/search?query=${o}&type=${y.key.category}`,className:l.classNames("group-header",wt.header),onClick:a,children:[s.jsx(l.Typography,{variant:"body",className:"text-primary",children:y.key.categoryName}),s.jsxs(l.Typography,{variant:"caption",children:[y.items.length," ",u.amountFrom," ",y.key.totalCount]})]}),(h=y.items)==null?void 0:h.map((b,j)=>s.jsx(Qf,{item:b,onCancel:a,searchTypes:c},j))]},y.key.category)})}),e[3]=u,e[4]=i,e[5]=r,e[6]=a,e[7]=o,e[8]=c,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=s.jsx("div",{ref:m,className:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g},Xf=n=>{var G;const e=l.compilerRuntimeExports.c(48),{searchTypes:t,navigateFunction:o,currentPath:a,homePath:i,className:r,staticAppItems:c,searchEndpointUri:d}=n,u=i===void 0?"/":i,{texts:m}=w.useContext(l.LuminusComponentsContext),{appSearch:p}=m,[f,x]=w.useState(t.length>0?((G=t.at(0))==null?void 0:G.key)??null:null);let g;e[0]!==t||e[1]!==f?(g=t.find(Z=>Z.key===f)??null,e[0]=t,e[1]=f,e[2]=g):g=e[2];const y=g,[h,b]=w.useState(""),[j]=l.a(h,500),{isLoading:S,searchItems:N}=gl(f,j,d,!1,c),[v,C]=w.useState(!1);let k;e[3]!==o||e[4]!==h||e[5]!==y?(k=Z=>{Z.preventDefault(),Z.stopPropagation(),C(!1),h.length>2&&o(`/search?query=${h}${y&&y.key&&`&type=${y==null?void 0:y.key}`}`)},e[3]=o,e[4]=h,e[5]=y,e[6]=k):k=e[6];const I=k;let T;e[7]!==S||e[8]!==N.length?(T=()=>{(N.length>0||S)&&C(!0)},e[7]=S,e[8]=N.length,e[9]=T):T=e[9];let L;e[10]!==S||e[11]!==N?(L=[N,S],e[10]=S,e[11]=N,e[12]=L):L=e[12],w.useEffect(T,L);const E=w.useRef(null);let D,_;e[13]!==a||e[14]!==u?(D=()=>{var Z;b(""),a===u&&((Z=E.current)==null||Z.focus())},_=[a,u],e[13]=a,e[14]=u,e[15]=D,e[16]=_):(D=e[15],_=e[16]),w.useEffect(D,_);let P;e[17]!==r?(P=l.classNames(Ct.inputGroup,r),e[17]=r,e[18]=P):P=e[18];let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=l.classNames("p-1 rounded",Ct.inputGroupText,Ct.left),e[19]=$):$=e[19];let R;e[20]!==t||e[21]!==y?(R=s.jsx(nn.Text,{className:$,children:s.jsx(Hf,{searchTypes:t,selectedType:y,setSelectedType:x})}),e[20]=t,e[21]=y,e[22]=R):R=e[22];const F=p.searchPlaceholder;let M;e[23]===Symbol.for("react.memo_cache_sentinel")?(M=l.classNames("luminus-app-search-input",Ct.input),e[23]=M):M=e[23];let O;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=Z=>{var X;return b(((X=Z.target)==null?void 0:X.value)??"")},e[24]=O):O=e[24];let B;e[25]!==N.length?(B=()=>N.length>0&&C(!0),e[25]=N.length,e[26]=B):B=e[26];let H;e[27]!==p.searchPlaceholder||e[28]!==h||e[29]!==B?(H=s.jsx(l.Form.Control,{ref:E,placeholder:F,type:"text",size:"sm",className:M,value:h,onChange:O,onFocus:B}),e[27]=p.searchPlaceholder,e[28]=h,e[29]=B,e[30]=H):H=e[30];let z;e[31]===Symbol.for("react.memo_cache_sentinel")?(z=l.classNames("p-0 rounded",Ct.inputGroupText,Ct.right),e[31]=z):z=e[31];let W;e[32]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(nn.Text,{className:z,children:s.jsx("button",{type:"submit",className:l.classNames("text-primary",Ct.submitButton),children:s.jsx(l.FaSearch,{})})}),e[32]=W):W=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=()=>C(!1),e[33]=A):A=e[33];let U;e[34]!==j||e[35]!==S||e[36]!==N||e[37]!==t||e[38]!==v?(U=s.jsx(Zf,{query:j,searchTypes:t,show:v,onCancel:A,groups:N,isLoading:S}),e[34]=j,e[35]=S,e[36]=N,e[37]=t,e[38]=v,e[39]=U):U=e[39];let K;e[40]!==R||e[41]!==H||e[42]!==U||e[43]!==P?(K=s.jsxs(nn,{className:P,children:[R,H,W,U]}),e[40]=R,e[41]=H,e[42]=U,e[43]=P,e[44]=K):K=e[44];let V;return e[45]!==I||e[46]!==K?(V=s.jsx(l.Form,{className:"w-100 d-flex align-items-center justify-content-center",onSubmit:I,children:K}),e[45]=I,e[46]=K,e[47]=V):V=e[47],V},Jf=n=>{const e=l.compilerRuntimeExports.c(20),{item:t,searchTypes:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);let i;if(e[0]!==t.type||e[1]!==o){let g;e[3]!==t.type?(g=y=>y.key===t.type,e[3]=t.type,e[4]=g):g=e[4],i=o.find(g),e[0]=t.type,e[1]=o,e[2]=i}else i=e[2];const r=i;let c;e[5]!==t||e[6]!==r||e[7]!==o?(c=pl(t,r,o),e[5]=t,e[6]=r,e[7]=o,e[8]=c):c=e[8];const d=c;let u;e[9]!==t||e[10]!==r?(u=hl(t,r),e[9]=t,e[10]=r,e[11]=u):u=e[11];const m=u;let p;e[12]!==m?(p=s.jsx(l.Typography,{variant:"body",children:m}),e[12]=m,e[13]=p):p=e[13];let f;e[14]!==a?(f=s.jsx(a,{icon:"chevron-right",className:"text-primary"}),e[14]=a,e[15]=f):f=e[15];let x;return e[16]!==d||e[17]!==p||e[18]!==f?(x=s.jsxs(we.Link,{to:d,className:"text-nowrap list-group-item list-group-item-action d-flex justify-content-between align-items-center",children:[p,f]}),e[16]=d,e[17]=p,e[18]=f,e[19]=x):x=e[19],x},e1=n=>{var h,b;const e=l.compilerRuntimeExports.c(11),{query:t,type:o,appSearchTypes:a,searchEndpointUri:i,staticAppItems:r}=n,{texts:c}=w.useContext(l.LuminusComponentsContext),{appSearch:d}=c,[u,m]=w.useState(""),{searchItems:p,isLoading:f}=gl(o,t,i,!0,r);let x,g;if(e[0]!==u||e[1]!==p?(x=()=>{var j;u||p===null||p.length===0||m(((j=p[0].key)==null?void 0:j.category)??"")},g=[p,u],e[0]=u,e[1]=p,e[2]=x,e[3]=g):(x=e[2],g=e[3]),w.useEffect(x,g),p===null)return null;let y;return e[4]!==u||e[5]!==d||e[6]!==a||e[7]!==f||e[8]!==t||e[9]!==p?(y=s.jsx(l.PageContainer,{variant:"fullScreen",children:f?s.jsx(st.Loading,{}):p.length===0?s.jsx("div",{className:"alert alert-warning",children:s.jsx(l.Typography,{variant:"body",children:d.noResultsFor(t)})}):s.jsxs(s.Fragment,{children:[s.jsx(Gn,{activeTab:u,onSelect:j=>m((j==null?void 0:j.toString())??""),children:p.map(t1)}),s.jsx(ul,{eventKey:u,activeTab:u,fullHeightNoOverflow:!0,children:s.jsx("div",{className:"list-group h-100 overflow-auto",children:(b=(h=p.find(j=>j.key.category===u))==null?void 0:h.items)==null?void 0:b.map((j,S)=>s.jsx(Jf,{item:j,searchTypes:a},S))})})]})}),e[4]=u,e[5]=d,e[6]=a,e[7]=f,e[8]=t,e[9]=p,e[10]=y):y=e[10],y};function t1(n){var e,t;return s.jsx(Kn,{eventKey:((e=n.key)==null?void 0:e.category)??"",children:((t=n.key)==null?void 0:t.categoryName)??""},n.key.category)}const n1=()=>{const n=l.compilerRuntimeExports.c(7),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,[o,a]=Fe.useLocalStorageState("file-download-try-opening",!0),i=o===void 0?!0:o;let r;n[0]!==a||n[1]!==i||n[2]!==t.tryOpenFileLabel?(r=s.jsx(Tt,{type:"switch",value:i,onChange:a,label:t.tryOpenFileLabel}),n[0]=a,n[1]=i,n[2]=t.tryOpenFileLabel,n[3]=r):r=n[3];let c;return n[4]!==r||n[5]!==t.downloads?(c=s.jsx(gt,{collapsible:!0,title:t.downloads,defaultOpen:!0,children:r}),n[4]=r,n[5]=t.downloads,n[6]=c):c=n[6],c},s1=n=>{const e=l.compilerRuntimeExports.c(52),{show:t,handleClose:o,onConfirm:a,apiCreateBackup:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{userSettings:c}=r,{zStringRequired:d}=l.useZodSchemaTypes(),{addNotification:u}=l.useNotifications(),m=l.useAxios(),{startLoading:p,stopLoading:f}=w.useContext(l.LoadingContext),[x,g]=w.useState(null);let y,h;if(e[0]!==d){const B=l.z.object({name:d()});h=Se.useForm,y=l.t(B),e[0]=d,e[1]=y,e[2]=h}else y=e[1],h=e[2];let b;e[3]!==y?(b={resolver:y},e[3]=y,e[4]=b):b=e[4];const j=h(b);let S;e[5]!==i||e[6]!==m||e[7]!==p||e[8]!==f?(S=async(B,H)=>(p("localStorageSettingPost"),m.post(i,{name:B,setting:H}).then(o1).catch(l1).finally(()=>f("localStorageSettingPost"))),e[5]=i,e[6]=m,e[7]=p,e[8]=f,e[9]=S):S=e[9];const N=S;let v;e[10]!==u||e[11]!==x||e[12]!==a||e[13]!==N||e[14]!==c.localStorageCreateBackupSuccess?(v=async B=>{await N(B.name,JSON.stringify(x))&&(u(c.localStorageCreateBackupSuccess,"success"),a())},e[10]=u,e[11]=x,e[12]=a,e[13]=N,e[14]=c.localStorageCreateBackupSuccess,e[15]=v):v=e[15];const C=v;let k,I;e[16]!==t?(k=()=>{t&&g(ot.dumpLocalStorage())},I=[t],e[16]=t,e[17]=k,e[18]=I):(k=e[17],I=e[18]),w.useEffect(k,I);let T;e[19]!==o?(T=()=>o(),e[19]=o,e[20]=T):T=e[20];let L;e[21]!==c.localStorageCreateBackup?(L=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:c.localStorageCreateBackup})}),e[21]=c.localStorageCreateBackup,e[22]=L):L=e[22];let E;e[23]!==j||e[24]!==C?(E=j.handleSubmit(C),e[23]=j,e[24]=C,e[25]=E):E=e[25];let D;if(e[26]!==x||e[27]!==c){let B;e[29]!==x?(B=Object.keys(x||{}),e[29]=x,e[30]=B):B=e[30],D=c.localStorageCreateBackupInfo(B.length),e[26]=x,e[27]=c,e[28]=D}else D=e[28];let _;e[31]!==D?(_=s.jsx(l.Alert,{variant:"info",size:"sm",children:D}),e[31]=D,e[32]=_):_=e[32];let P;e[33]!==c.localStorageCreateBackupName?(P=s.jsx(l.HookFormTextInput,{required:!0,label:c.localStorageCreateBackupName,formField:"name",type:"text"}),e[33]=c.localStorageCreateBackupName,e[34]=P):P=e[34];let $;e[35]!==_||e[36]!==P?($=s.jsxs(l.Modal.Body,{children:[_,P]}),e[35]=_,e[36]=P,e[37]=$):$=e[37];let R;e[38]!==c.localStorageCreateBackupSave?(R=s.jsx(l.Modal.Footer,{className:"justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:c.localStorageCreateBackupSave})}),e[38]=c.localStorageCreateBackupSave,e[39]=R):R=e[39];let F;e[40]!==E||e[41]!==$||e[42]!==R?(F=s.jsxs(l.Form,{onSubmit:E,noValidate:!0,children:[$,R]}),e[40]=E,e[41]=$,e[42]=R,e[43]=F):F=e[43];let M;e[44]!==j||e[45]!==F?(M=s.jsx(Se.FormProvider,{...j,children:F}),e[44]=j,e[45]=F,e[46]=M):M=e[46];let O;return e[47]!==t||e[48]!==L||e[49]!==M||e[50]!==T?(O=s.jsxs(l.Modal,{show:t,onHide:T,children:[L,M]}),e[47]=t,e[48]=L,e[49]=M,e[50]=T,e[51]=O):O=e[51],O};function o1(){return!0}function l1(){return!1}const tn={apiGetBackups:"/localStorageSettings",apiCreateBackup:"/localStorageSettings",apiDeleteBackup:"/localStorageSettings"},a1=n=>{const e=l.compilerRuntimeExports.c(39),{apiUrls:t}=n,{apiGetBackups:o,apiCreateBackup:a,apiDeleteBackup:i}=t===void 0?tn:t,r=o===void 0?tn.apiGetBackups:o,c=a===void 0?tn.apiCreateBackup:a,d=i===void 0?tn.apiDeleteBackup:i,{ProjectIconComponent:u,texts:m}=w.useContext(l.LuminusComponentsContext),{userSettings:p}=m,{confirm:f}=l.useConfirm(),x=l.useAxios(),{startLoading:g,stopLoading:y}=w.useContext(l.LoadingContext),{addNotification:h}=l.useNotifications(),[b,j]=w.useState(!1),{data:S,setData:N,reloadData:v}=Fe.useGetApiData(r);let C;e[0]!==d||e[1]!==x||e[2]!==g||e[3]!==y?(C=async O=>(g("localStorageSettingDelete"),x.delete(`${d}/${O}`).then(i1).catch(r1).finally(()=>y("localStorageSettingDelete"))),e[0]=d,e[1]=x,e[2]=g,e[3]=y,e[4]=C):C=e[4];const k=C;let I;e[5]!==h||e[6]!==f||e[7]!==k||e[8]!==N||e[9]!==p.localStorageDeleteBackupConfirm||e[10]!==p.localStorageDeleteBackupSuccess?(I=async O=>{await f(p.localStorageDeleteBackupConfirm)&&await k(O)&&(h(p.localStorageDeleteBackupSuccess,"success"),N(B=>(B==null?void 0:B.filter(H=>H.id!==O))??null))},e[5]=h,e[6]=f,e[7]=k,e[8]=N,e[9]=p.localStorageDeleteBackupConfirm,e[10]=p.localStorageDeleteBackupSuccess,e[11]=I):I=e[11];const T=I;let L;e[12]!==h||e[13]!==f||e[14]!==p.localStorageLoadBackup||e[15]!==p.localStorageLoadBackupError||e[16]!==p.localStorageLoadBackupSuccess?(L=async O=>{O.setting&&await f(p.localStorageLoadBackup)&&(ot.restoreLocalStorage(O.setting)?h(p.localStorageLoadBackupSuccess,"success"):h(p.localStorageLoadBackupError,"danger"))},e[12]=h,e[13]=f,e[14]=p.localStorageLoadBackup,e[15]=p.localStorageLoadBackupError,e[16]=p.localStorageLoadBackupSuccess,e[17]=L):L=e[17];const E=L;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=()=>j(!0),e[18]=D):D=e[18];let _;e[19]!==p.localStorageCreateBackup?(_=s.jsx(l.ContextButton,{className:"mb-2",onClick:D,children:p.localStorageCreateBackup}),e[19]=p.localStorageCreateBackup,e[20]=_):_=e[20];let P;e[21]!==u||e[22]!==S||e[23]!==T||e[24]!==E||e[25]!==p.localStorageNoBackups?(P=S&&S.length>0?s.jsx("div",{className:"list-group",children:S.map((O,B)=>s.jsxs("div",{role:"button",className:"list-group-item list-group-item-action d-flex justify-content-between align-items-center",onClick:()=>E(O),children:[s.jsx(l.Typography,{variant:"body2",children:O.name}),s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"body2",className:"text-muted",children:O.date?l.formatDate(O.date):""}),s.jsx(l.IconButton,{size:"sm",color:"danger",onClick:H=>{H.stopPropagation(),T(O.id)},children:s.jsx(u,{icon:"delete"})})]})]},B))}):S?s.jsx(l.Alert,{variant:"secondary",size:"sm",children:p.localStorageNoBackups}):null,e[21]=u,e[22]=S,e[23]=T,e[24]=E,e[25]=p.localStorageNoBackups,e[26]=P):P=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=()=>j(!1),e[27]=$):$=e[27];let R;e[28]!==v?(R=()=>{j(!1),v()},e[28]=v,e[29]=R):R=e[29];let F;e[30]!==c||e[31]!==b||e[32]!==R?(F=s.jsx(s1,{show:b,handleClose:$,onConfirm:R,apiCreateBackup:c}),e[30]=c,e[31]=b,e[32]=R,e[33]=F):F=e[33];let M;return e[34]!==_||e[35]!==P||e[36]!==F||e[37]!==p.localStorage?(M=s.jsxs(gt,{collapsible:!0,title:p.localStorage,defaultOpen:!0,children:[_,P,F]}),e[34]=_,e[35]=P,e[36]=F,e[37]=p.localStorage,e[38]=M):M=e[38],M};function i1(){return!0}function r1(){return!1}const c1=()=>{const n=l.compilerRuntimeExports.c(7),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,[o,a]=Fe.useLocalStorageState("search-use-asterisk",!0),i=o===void 0?!0:o;let r;n[0]!==a||n[1]!==i||n[2]!==t.searchSettingsUseAsterisk?(r=s.jsx(Tt,{type:"switch",value:i,onChange:a,label:t.searchSettingsUseAsterisk}),n[0]=a,n[1]=i,n[2]=t.searchSettingsUseAsterisk,n[3]=r):r=n[3];let c;return n[4]!==r||n[5]!==t.searchSettings?(c=s.jsx(gt,{collapsible:!0,title:t.searchSettings,defaultOpen:!0,children:r}),n[4]=r,n[5]=t.searchSettings,n[6]=c):c=n[6],c},d1=()=>{const n=l.compilerRuntimeExports.c(9),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,{localizationContext:o}=w.useContext(l.LuminusComponentsContext),{language:a,setLanguage:i}=w.useContext(o);let r;if(n[0]!==i){const f=x=>{i(x)};r=(x,g)=>{f(g),x.stopPropagation()},n[0]=i,n[1]=r}else r=n[1];const c=r;let d;n[2]===Symbol.for("react.memo_cache_sentinel")?(d=["cz","en","de"],n[2]=d):d=n[2];const u=d;let m;n[3]!==a||n[4]!==c?(m=s.jsx(l.ListGroup,{children:u.map(f=>s.jsxs(l.ListGroupItem,{className:"p-1 px-2 d-flex gap-2 align-items-center",action:!0,onClick:x=>c(x,f),children:[s.jsx(l.Form.Check,{readOnly:!0,checked:a===f}),s.jsx(l.Typography,{variant:"body2",className:l.classNames("text-uppercase",{"fw-bold":a===f}),children:f})]}))}),n[3]=a,n[4]=c,n[5]=m):m=n[5];let p;return n[6]!==m||n[7]!==t.languageSettings?(p=s.jsx(gt,{collapsible:!0,title:t.languageSettings,defaultOpen:!0,children:m}),n[6]=m,n[7]=t.languageSettings,n[8]=p):p=n[8],p};exports.Alert=l.Alert;exports.Backdrop=l.Backdrop;exports.ContextButton=l.ContextButton;exports.Documents=l.Documents;exports.Dropdown=l.Dropdown;exports.DropdownDivider=l.DropdownDivider;exports.DropdownItem=l.DropdownItem;exports.DropdownToggle=l.DropdownToggle;exports.FileExtensionIcon=l.FileExtensionIcon;exports.FloatingLabelInput=l.FloatingLabelInput;exports.HookFormTextAreaInput=l.HookFormTextAreaInput;exports.HookFormTextInput=l.HookFormTextInput;exports.HtmlTooltip=l.HtmlTooltip;exports.IconButton=l.IconButton;exports.InvalidFeedback=l.InvalidFeedback;exports.NoInputContainer=l.NoInputContainer;exports.PrimaryButton=l.PrimaryButton;exports.ResponsiveContextDropdown=l.ResponsiveContextDropdown;exports.ResponsiveContextDropdownItem=l.ResponsiveContextDropdownItem;exports.RowLabelInput=l.RowLabelInput;exports.SelectInput=l.CustomSelectInput;exports.SimplePicker=l.SimplePicker;exports.SimpleToggle=l.SimpleDropdownToggle;exports.SimpleTooltip=l.SimpleTooltip;exports.TextInput=l.TextInput;exports.Typography=l.Typography;exports.Loading=st.Loading;exports.AlertItem=zo;exports.ApiFileDownloadButton=bl;exports.AppSearch=Xf;exports.Approval=zd;exports.Approvals=Cu;exports.ApprovalsDelegations=gu;exports.AuthTemplate=rr;exports.AvatarIcon=cn;exports.Badge=No;exports.BarChart=yd;exports.Card=gt;exports.CheckInput=Tt;exports.Collapse=Ot;exports.ColumnResizer=al;exports.ContactButtonQrModal=Wo;exports.ContactInput=zr;exports.ContactsLink=Go;exports.DisabledRowLabelLink=md;exports.DocsAIChat=Pu;exports.DropdownPicker=Hr;exports.DynamicForm=ld;exports.EmailOverview=wu;exports.EmployeeSmallPhoto=hd;exports.ErrorBoundary=Ho;exports.FileDownloadUS=n1;exports.FileUploadButton=Hl;exports.FileUploadContextButton=zn;exports.FileUploadDropdownItem=Da;exports.Flexmonster=dl;exports.FloatingActionContainer=Vo;exports.FloatingFormSubmit=bo;exports.FromToDatePicker=Cc;exports.HomeDashboard=va;exports.HookFormCheckInput=Jd;exports.HookFormContactInput=tu;exports.HookFormDropdownPicker=nu;exports.HookFormFileInput=su;exports.HookFormFloatingSubmit=rl;exports.HookFormNumericStepperInput=ou;exports.HookFormNumericTextInput=cl;exports.HookFormRadioInput=eu;exports.HookFormSelectInput=an;exports.HrWithText=il;exports.IconPicker=qn;exports.ImgApi=Fn;exports.ImgBlob=Lr;exports.ImgDirect=Hn;exports.ImportFilePicker=fl;exports.ImportResult=ml;exports.LanguageSettingsUS=d1;exports.LanguageSwitch=fd;exports.LineChart=Tc;exports.LoadingBlock=Zs;exports.LocalStorageBackupUS=a1;exports.LocalizationImport=xf;exports.LocalizationSettings=Lf;exports.MessageBoard=rm;exports.MiniDetailTooltip=Ad;exports.MiniDetailValueItem=Bd;exports.MonthPicker=jo;exports.MonthPickerSearchParams=Nc;exports.NotifStyles=mf;exports.NotificationActions=Jm;exports.NotificationUsers=cf;exports.NumericFormat=xd;exports.NumericStepperInput=Vr;exports.NumericTextInput=nl;exports.PermissionSubstituteDetail=au;exports.PermissionSubstituteTable=Xd;exports.PhotoLibrary=Oo;exports.PhotoLightbox=Bo;exports.PieChart=Ic;exports.RadioInput=sl;exports.ReportPage=Xu;exports.ReportsIndexPage=Fd;exports.ResponsiveTabs=bm;exports.RouteLink=Od;exports.SearchBox=gd;exports.SearchPage=e1;exports.SearchSettingsUS=c1;exports.SettingsFormPicker=id;exports.ShortcutLinks=Mm;exports.ShortcutLinksProvider=Om;exports.ShortcutLinksSetup=_m;exports.StateToggle=Zd;exports.Tab=Kn;exports.TabPanel=ul;exports.Tabs=Gn;exports.TextAreaInput=qo;exports.Timeline=Uo;exports.TypedFormGroup=pd;exports.UserAvatarToggle=_a;exports.UserAvatarValueFormat=om;exports.VersionInfo=hr;exports.WidgetCard=Rn;exports.YearPicker=So;exports.YearPickerSearchParams=wc;exports.useShortcutLinksContext=Yn;
|
|
24
|
+
`),i=!1),Object.assign(Object.assign({},n),{allowNegative:i})}function mc(n){n=uc(n),n.decimalSeparator,n.allowedDecimalSeparators,n.thousandsGroupStyle;var e=n.suffix,t=n.allowNegative,o=n.allowLeadingZeros,a=n.onKeyDown;a===void 0&&(a=bt);var i=n.onBlur;i===void 0&&(i=bt);var r=n.thousandSeparator,c=n.decimalScale,d=n.fixedDecimalScale,u=n.prefix;u===void 0&&(u="");var m=n.defaultValue,p=n.value,f=n.valueIsNumericString,x=n.onValueChange,g=Yo(n,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),y=un(n),h=y.decimalSeparator,b=y.allowedDecimalSeparators,j=function(R){return Ts(R,n)},S=function(R,F){return cc(R,F,n)},N=Ft(p)?m:p,v=f??rc(N,u,e);Ft(p)?Ft(m)||(v=v||typeof m=="number"):v=v||typeof p=="number";var C=function(R){return Qo(R)?R:(typeof R=="number"&&(R=Jo(R)),v&&typeof c=="number"?Is(R,c,!!d):R)},k=tl(C(p),C(m),!!v,j,S,x),I=k[0],T=I.numAsString,L=I.formattedValue,E=k[1],D=function(R){var F=R.target,M=R.key,O=F.selectionStart,B=F.selectionEnd,H=F.value;if(H===void 0&&(H=""),(M==="Backspace"||M==="Delete")&&B<u.length){R.preventDefault();return}if(O!==B){a(R);return}M==="Backspace"&&H[0]==="-"&&O===u.length+1&&t&&It(F,1),c&&d&&(M==="Backspace"&&H[O-1]===h?(It(F,O-1),R.preventDefault()):M==="Delete"&&H[O]===h&&R.preventDefault()),b!=null&&b.includes(M)&&H[O]===h&&It(F,O+1);var z=r===!0?",":r;M==="Backspace"&&H[O-1]===z&&It(F,O-1),M==="Delete"&&H[O]===z&&It(F,O+1),a(R)},_=function(R){var F=T;if(F.match(/\d/g)||(F=""),o||(F=Yr(F)),d&&c&&(F=Is(F,c,d)),F!==T){var M=Ts(F,n);E({formattedValue:M,value:F,floatValue:parseFloat(F)},{event:R,source:Ut.event})}i(R)},P=function(R){return R===h?!0:Wt(R)},$=function(R){var F=R.currentValue,M=R.lastValue,O=R.formattedValue,B=R.currentValueIndex,H=R.formattedValueIndex,z=F[B],W=O[H],A=el(M,F),U=A.to,K=function(V){return S(V).indexOf(".")+u.length};return p===0&&d&&c&&F[U.start]===h&&K(F)<B&&K(O)>H?!1:B>=U.start&&B<U.end&&b&&b.includes(z)&&W===h?!0:z===W};return Object.assign(Object.assign({},g),{value:L,valueIsNumericString:!1,isValidInputCharacter:P,isCharacterSame:$,onValueChange:E,format:j,removeFormatting:S,getCaretBoundary:function(R){return dc(R,n)},onKeyDown:D,onBlur:_})}function Un(n){var e=mc(n);return w.createElement(lc,Object.assign({},e))}const nl=({InputContainer:n=l.FloatingLabelInput,value:e,onChange:t,debounceMs:o,label:a,withoutLabel:i,placeholder:r,size:c,hidden:d,disabled:u,showClearIcon:m,clearValue:p,className:f,step:x,noSelectOnFocus:g,decimalScale:y,fixedDecimalScale:h=!1,numberPrefix:b,numberSuffix:j,min:S,max:N,hint:v})=>{const C=w.useCallback(()=>{if(!t)return;const D=p??null;t(D?Number(D):null)},[p,t]),k=w.useRef(null),[I,T]=w.useState((e==null?void 0:e.toString())??""),L=w.useCallback(D=>{const _=D;t&&t(_==null||_===""?null:Number(_))},[t]),E=w.useCallback(D=>{var P,$;let _=parseFloat((($=(P=D.target)==null?void 0:P.value)==null?void 0:$.replaceAll(" ","").replaceAll(",","."))??0);if(Number.isNaN(_)&&(_=0),!o){L(_.toString());return}T(_.toString()),k.current!==null&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{L(_.toString())},o)},[o,L]);return w.useEffect(()=>{T(e===null?"":e.toString())},[N,S,e]),w.useEffect(()=>{N!==void 0&&Number(I)>N&&T(N.toString()),S!==void 0&&Number(I)<S&&T(S.toString())},[I,N,S,T]),w.useEffect(()=>{!t||e===null||(N!==void 0&&e>N&&t(N),S!==void 0&&e<S&&t(S))},[e,N,S,t]),s.jsxs(n,{withoutLabel:i,label:a??"",hidden:d,className:f,hint:v,disabled:u,children:[s.jsx(Un,{displayType:"input",thousandSeparator:" ",decimalSeparator:",",decimalScale:y,fixedDecimalScale:h,prefix:b,suffix:j,defaultValue:"",value:o?I:(e==null?void 0:e.toString())??"",placeholder:r??a,onFocus:D=>{!g&&D.target.select()},onChange:E,hidden:d,disabled:u,className:l.classNames("form-control text-end w-100",{[`form-control-${c}`]:c}),step:x,min:S,max:N}),m&&e!==null&&t&&!u&&s.jsx("div",{className:"luminus-input-remove-icon inset",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:C,children:s.jsx(l.MdClear,{})})})]})},sl=n=>{const e=l.compilerRuntimeExports.c(21),{InputContainer:t,label:o,options:a,disabled:i,hidden:r,className:c,value:d,onChange:u}=n,m=t===void 0?l.RowLabelInput:t;let p;e[0]!==u?(p=b=>{u&&u(b.target.value)},e[0]=u,e[1]=p):p=e[1];const f=p,x=!o,g=`${o}`;let y;if(e[2]!==i||e[3]!==f||e[4]!==r||e[5]!==a||e[6]!==d){let b;e[8]!==i||e[9]!==f||e[10]!==r||e[11]!==d?(b=j=>s.jsx(l.Form.Check,{id:`radio-${j.id}`,label:j.name,type:"radio",value:j.id??"",checked:d===j.id,onChange:f,hidden:r,disabled:i,className:"w-100"},j.id),e[8]=i,e[9]=f,e[10]=r,e[11]=d,e[12]=b):b=e[12],y=a.map(b),e[2]=i,e[3]=f,e[4]=r,e[5]=a,e[6]=d,e[7]=y}else y=e[7];let h;return e[13]!==m||e[14]!==c||e[15]!==i||e[16]!==r||e[17]!==x||e[18]!==g||e[19]!==y?(h=s.jsx(m,{isForRadioInput:!0,hidden:r,withoutLabel:x,label:g,className:c,disabled:i,children:y}),e[13]=m,e[14]=c,e[15]=i,e[16]=r,e[17]=x,e[18]=g,e[19]=y,e[20]=h):h=e[20],h},fc=n=>{const e=l.compilerRuntimeExports.c(9),{ref:t,onClick:o,text:a}=n;let i;e[0]!==o?(i=u=>{u.preventDefault(),o(u)},e[0]=o,e[1]=i):i=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"mt-",children:"…"}),e[2]=r):r=e[2];let c;e[3]!==a?(c=s.jsxs("div",{className:"d-flex flex-column align-items-center",children:[r,s.jsx("div",{className:"mt-1 middle-letter",children:a})]}),e[3]=a,e[4]=c):c=e[4];let d;return e[5]!==t||e[6]!==i||e[7]!==c?(d=s.jsx("div",{ref:t,onClick:i,role:"button",className:"middle-div",children:c}),e[5]=t,e[6]=i,e[7]=c,e[8]=d):d=e[8],d},_s=[["D","day"],["M","month"],["Y","year"],["C","custom"]],pc="_wrapper_qfqux_1",hc="_lg_qfqux_7",gc="_sm_qfqux_11",xc="_md_qfqux_14",Ds={wrapper:pc,lg:hc,sm:gc,md:xc},on=n=>{const e=new Date(n),t=l.trimIsoDate(e.toISOString());e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(e.getUTCDate()-1);const o=l.trimIsoDate(e.toISOString());return{from:t,to:o}},ln=n=>{const e=new Date(n),t=l.trimIsoDate(e.toISOString());e.setUTCFullYear(e.getUTCFullYear()+1),e.setUTCDate(e.getUTCDate()-1);const o=l.trimIsoDate(e.toISOString());return{from:t,to:o}},yc=(n,e)=>{if(n===null||e===null)return"C";if(n===e)return"D";const t=new Date(n);return on(t).to===e?"M":ln(t).to===e?"Y":"C"},vc=(n,e,t)=>{const o=l.compilerRuntimeExports.c(14);let a;o[0]!==n||o[1]!==t||o[2]!==e?(a=(p,f)=>{if(n==="C"){t(x=>({...x,[p]:f}));return}e:switch(p){case"from":{t(x=>{if(f===null)return x;const g=new Date(f);if(n==="D"){const y=l.trimIsoDate(g.toISOString());return{from:y,to:y}}return n==="M"?on(g):n==="Y"?ln(g):x});break e}case"to":{e("C"),t(x=>({...x,[p]:f}));break e}}},o[0]=n,o[1]=t,o[2]=e,o[3]=a):a=o[3];const i=a;let r;o[4]!==n||o[5]!==t?(r=p=>{t(f=>{if(f.from===null||f.to===null)return f;const x=new Date(f.from);x.setHours(x.getHours()-x.getTimezoneOffset()/60);const g=new Date(f.to);if(n==="D"){x.setDate(x.getDate()+p);const y=l.trimIsoDate(x.toISOString());return{from:y,to:y}}return n==="M"?(x.setMonth(x.getMonth()+p),on(x)):n==="Y"?(x.setFullYear(x.getFullYear()+p),ln(x)):{from:l.trimIsoDate(x.toISOString()),to:l.trimIsoDate(g.toISOString())}})},o[4]=n,o[5]=t,o[6]=r):r=o[6];const c=r;let d;o[7]!==t||o[8]!==e?(d=p=>{p==="D"?t(bc):p==="M"?t(jc):p==="Y"&&t(Sc),e(p)},o[7]=t,o[8]=e,o[9]=d):d=o[9];const u=d;let m;return o[10]!==c||o[11]!==u||o[12]!==i?(m={setFromToProp:i,handleArrowClick:c,handleRangeChange:u},o[10]=c,o[11]=u,o[12]=i,o[13]=m):m=o[13],m};function bc(n){return{from:n.from,to:n.from}}function jc(n){if(n.from===null)return n;const e=l.getFirstDayOfMonth(n.from);return on(e)}function Sc(n){if(n.from===null)return n;const e=l.getFirstDayOfYear(new Date(n.from).getFullYear());return ln(e)}const Cc=n=>{const e=l.compilerRuntimeExports.c(55),{fromtoState:t,className:o,size:a}=n,[i,r]=t,{texts:c,ProjectIconComponent:d}=w.useContext(l.LuminusComponentsContext),{date:u}=c,[m,p]=w.useState("C"),{handleArrowClick:f,handleRangeChange:x,setFromToProp:g}=vc(m,p,r),y=m==="C",h=w.useRef(!0);let b,j;e[0]!==i.from||e[1]!==i.to?(b=()=>{if(h.current){const z=yc(i.from,i.to);p(z),h.current=!1}},j=[i.from,i.to],e[0]=i.from,e[1]=i.to,e[2]=b,e[3]=j):(b=e[2],j=e[3]),w.useEffect(b,j);const S=Ds[a??"md"];let N;e[4]!==o||e[5]!==S?(N=l.classNames("d-inline-flex align-items-center gap-1",Ds.wrapper,S,o),e[4]=o,e[5]=S,e[6]=N):N=e[6];let v;e[7]!==f?(v=()=>{f(-1)},e[7]=f,e[8]=v):v=e[8];let C;e[9]!==d?(C=s.jsx(d,{icon:"chevron-left"}),e[9]=d,e[10]=C):C=e[10];let k;e[11]!==y||e[12]!==v||e[13]!==C?(k=s.jsx(l.IconButton,{disabled:y,onClick:v,children:C}),e[11]=y,e[12]=v,e[13]=C,e[14]=k):k=e[14];let I;e[15]!==g?(I=z=>g("from",z===null?null:z.toString()),e[15]=g,e[16]=I):I=e[16];let T;e[17]!==i.from||e[18]!==a||e[19]!==I?(T=s.jsx(l.TextInput,{type:"date",value:i.from,onChange:I,InputContainer:l.NoInputContainer,size:a}),e[17]=i.from,e[18]=a,e[19]=I,e[20]=T):T=e[20];const L=u[_s.find(z=>z[0]===m)[1]];let E;e[21]!==L?(E=L.substring(0,1),e[21]=L,e[22]=E):E=e[22];let D;e[23]!==E?(D=s.jsx(l.DropdownToggle,{text:E,as:fc}),e[23]=E,e[24]=D):D=e[24];let _;e[25]!==u||e[26]!==x||e[27]!==m?(_=_s.map(z=>s.jsx(l.DropdownItem,{disabled:z[0]===m,className:l.classNames(z[0]===m?"text-black-50":""),onClick:()=>x(z[0]),role:"button",children:u[z[1]]},z[0])),e[25]=u,e[26]=x,e[27]=m,e[28]=_):_=e[28];let P;e[29]!==D||e[30]!==_?(P=s.jsx(l.Dropdown,{toggle:D,children:_}),e[29]=D,e[30]=_,e[31]=P):P=e[31];let $;e[32]!==g?($=z=>g("to",z===null?null:z.toString()),e[32]=g,e[33]=$):$=e[33];let R;e[34]!==i.to||e[35]!==a||e[36]!==$?(R=s.jsx(l.TextInput,{type:"date",value:i.to,onChange:$,InputContainer:l.NoInputContainer,size:a}),e[34]=i.to,e[35]=a,e[36]=$,e[37]=R):R=e[37];let F;e[38]!==T||e[39]!==P||e[40]!==R?(F=s.jsx("div",{children:s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[T,P,R]})}),e[38]=T,e[39]=P,e[40]=R,e[41]=F):F=e[41];let M;e[42]!==f?(M=()=>{f(1)},e[42]=f,e[43]=M):M=e[43];let O;e[44]!==d?(O=s.jsx(d,{icon:"chevron-right"}),e[44]=d,e[45]=O):O=e[45];let B;e[46]!==y||e[47]!==M||e[48]!==O?(B=s.jsx(l.IconButton,{disabled:y,onClick:M,children:O}),e[46]=y,e[47]=M,e[48]=O,e[49]=B):B=e[49];let H;return e[50]!==F||e[51]!==B||e[52]!==N||e[53]!==k?(H=s.jsxs("div",{className:N,children:[k,F,B]}),e[50]=F,e[51]=B,e[52]=N,e[53]=k,e[54]=H):H=e[54],H},Nc=n=>{const e=l.compilerRuntimeExports.c(13),{defaultMonth:t,searchKey:o,yearMin:a,yearMax:i}=n,r=o===void 0?"monthFrom":o,{localizationContext:c}=w.useContext(l.LuminusComponentsContext),{dateFnsLocale:d}=w.useContext(c),{searchParams:u,setSearch:m}=pt.useSearchQuery();let p;if(e[0]!==t||e[1]!==r||e[2]!==u){const h=u.get(r);p=h?l.parseISO(h):t,e[0]=t,e[1]=r,e[2]=u,e[3]=p}else p=e[3];const f=p;let x;e[4]!==r||e[5]!==m?(x=h=>{m(r,Rt(h,{representation:"date"}))},e[4]=r,e[5]=m,e[6]=x):x=e[6];const g=x;let y;return e[7]!==d||e[8]!==f||e[9]!==g||e[10]!==i||e[11]!==a?(y=s.jsx(jo,{month:f,onChangeMonth:g,locale:d,yearMin:a,yearMax:i}),e[7]=d,e[8]=f,e[9]=g,e[10]=i,e[11]=a,e[12]=y):y=e[12],y},wc=n=>{const e=l.compilerRuntimeExports.c(15);let t,o,a;e[0]!==n?({defaultYear:t,searchKey:a,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);const i=a===void 0?"yearFrom":a;let r;e[4]!==t?(r=Rt(t,{representation:"date"}),e[4]=t,e[5]=r):r=e[5];const[c,d]=pt.useSearchQueryState(i,r);let u;e[6]!==t||e[7]!==c?(u=c?l.parseISO(c):t,e[6]=t,e[7]=c,e[8]=u):u=e[8];const m=u;let p;e[9]!==d?(p=g=>{d(Rt(g,{representation:"date"}))},e[9]=d,e[10]=p):p=e[10];const f=p;let x;return e[11]!==f||e[12]!==o||e[13]!==m?(x=s.jsx(So,{year:m,onChangeYear:f,...o}),e[11]=f,e[12]=o,e[13]=m,e[14]=x):x=e[14],x},Ic=n=>{const e=l.compilerRuntimeExports.c(17),{data:t,showLegend:o,legendPosition:a,onClick:i}=n,r=o===void 0?!1:o,c=a===void 0?"left":a,{chartColorPalette:d}=w.useContext(l.LuminusComponentsContext),u=r&&c==="right"?200:100,m=r&&c==="left"?200:100;let p;e[0]!==u||e[1]!==m?(p={top:50,right:u,bottom:50,left:m},e[0]=u,e[1]=m,e[2]=p):p=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={from:"color",modifiers:[["darker",.5]]},e[3]=f):f=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x={from:"color",modifiers:[["darker",.5]]},e[4]=x):x=e[4];let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g={from:"color"},e[5]=g):g=e[5];let y;e[6]!==c||e[7]!==r?(y=r?[{anchor:c,direction:c==="left"||c==="right"?"column":"row",justify:!1,translateX:c==="left"?-200:c==="right"?200:0,translateY:c==="top"?-50:c==="bottom"?50:0,itemsSpacing:4,itemWidth:120,itemHeight:18,itemTextColor:"#1e2832",itemDirection:"left-to-right",itemOpacity:1,symbolSize:18,symbolShape:"circle",padding:10}]:[],e[6]=c,e[7]=r,e[8]=y):y=e[8];let h;e[9]!==i?(h=j=>i&&i(j.data),e[9]=i,e[10]=h):h=e[10];let b;return e[11]!==d||e[12]!==t||e[13]!==h||e[14]!==p||e[15]!==y?(b=s.jsx(l.te,{data:t,margin:p,innerRadius:.4,padAngle:4,cornerRadius:2,activeOuterRadiusOffset:10,borderWidth:2,borderColor:f,colors:d,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:x,arcLinkLabelsThickness:2,arcLinkLabelsColor:g,enableArcLabels:!1,legends:y,onClick:h}),e[11]=d,e[12]=t,e[13]=h,e[14]=p,e[15]=y,e[16]=b):b=e[16],b},kc=n=>{var k,I;const e=l.compilerRuntimeExports.c(23),{val:t,translateKey:o,data:a,unit:i}=n,r=t.point.id.split("."),c=r[0],d=Number(r[1]),u=t.point.x<100?"56%":"-56%",m=t.point.y<60?"70px":"8px",p=`translate(${u}, ${m})`;let f;e[0]!==p?(f={transform:p},e[0]=p,e[1]=f):f=e[1];const x=f;let g;e[2]!==o||e[3]!==t.point.seriesId?(g=o(t.point.seriesId),e[2]=o,e[3]=t.point.seriesId,e[4]=g):g=e[4];let y;e[5]!==g?(y=s.jsx(l.Typography,{variant:"body",children:g}),e[5]=g,e[6]=y):y=e[6];let h;e[7]!==t.point.data.x?(h=(k=t.point.data.x)==null?void 0:k.toString(),e[7]=t.point.data.x,e[8]=h):h=e[8];let b;e[9]!==h?(b=s.jsxs(l.Typography,{variant:"body",className:"pe-1",children:[h,":"]}),e[9]=h,e[10]=b):b=e[10];const j=(I=a==null?void 0:a[d])==null?void 0:I[c];let S;e[11]!==i?(S=i&&s.jsx("span",{className:"ms-1",children:i}),e[11]=i,e[12]=S):S=e[12];let N;e[13]!==j||e[14]!==S?(N=s.jsxs(l.Typography,{variant:"body",className:"fw-bold",children:[j,S]}),e[13]=j,e[14]=S,e[15]=N):N=e[15];let v;e[16]!==b||e[17]!==N?(v=s.jsxs("div",{className:"d-flex",children:[b,N]}),e[16]=b,e[17]=N,e[18]=v):v=e[18];let C;return e[19]!==x||e[20]!==v||e[21]!==y?(C=s.jsxs("div",{className:"bg-white shadow-sm px-2 py-1 rounded",style:x,children:[y,v]}),e[19]=x,e[20]=v,e[21]=y,e[22]=C):C=e[22],C},Tc=n=>{var ne;const e=l.compilerRuntimeExports.c(68),{data:t,xKey:o,yKeys:a,translateKey:i,usePercentageValue:r,variant:c,legendPosition:d,noSort:u,unit:m}=n,p=r===void 0?!1:r,f=c===void 0?"default":c,x=u===void 0?!1:u,{confirm:g}=l.useConfirm(),{chartColorPalette:y,texts:h}=w.useContext(l.LuminusComponentsContext),{chart:b}=h;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,e[0]=j):j=e[0];const[S,N]=w.useState(j),v=w.useRef(null);let C;e[1]!==b||e[2]!==g?(C=async()=>{var te;const ee=(te=v.current)==null?void 0:te.querySelector("svg");if(ee&&await g(b.confirmExport)){const se=ee.cloneNode(!0);se.setAttribute("fill","none");const me=new XMLSerializer().serializeToString(se);l.saveFile(new Blob([me],{type:"image/svg+xml"}),"graf.svg")}},e[1]=b,e[2]=g,e[3]=C):C=e[3];const k=C;let I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I=ee=>{N(te=>{const se=new Set(te);return se.has(ee.id)?se.delete(ee.id):se.add(ee.id),se})},e[4]=I):I=e[4];const T=I;let L;e[5]!==t||e[6]!==x||e[7]!==o?(L=x?t:t.toSorted((ee,te)=>{var se;return typeof te[o]=="number"&&typeof ee[o]=="number"?ee[o]-te[o]:(ee[o]??"").toString().localeCompare(((se=te[o])==null?void 0:se.toString())??"")}),e[5]=t,e[6]=x,e[7]=o,e[8]=L):L=e[8];const E=L;let D;e[9]!==E||e[10]!==p||e[11]!==o||e[12]!==a?(D=[],a.forEach(ee=>{if(p){const te=Math.max(...E.map(ue=>ue[ee.key]??-1/0));if(te===-1/0)return;const se=[];E.forEach(ue=>{ue[ee.key]!=null&&se.push({x:ue[o],y:te===0?0:ue[ee.key]/te})}),D.push({id:ee.key,data:se})}else D.push({id:ee.key,data:E.map(te=>({x:te[o],y:te[ee.key]}))})}),e[9]=E,e[10]=p,e[11]=o,e[12]=a,e[13]=D):D=e[13];const _=D;let P;e[14]!==E||e[15]!==i||e[16]!==m||e[17]!==a?(P=ee=>{var te;return s.jsx(kc,{data:E,translateKey:i,val:ee,unit:((te=a.find(se=>{var ue;return se.key===((ue=ee.point)==null?void 0:ue.seriesId)}))==null?void 0:te.unit)??m??void 0})},e[14]=E,e[15]=i,e[16]=m,e[17]=a,e[18]=P):P=e[18];const $=P;let R;if(e[19]!==t||e[20]!==o){let ee;e[22]!==o?(ee=te=>te[o]??1/0,e[22]=o,e[23]=ee):ee=e[23],R=Math.min(...t.map(ee)),e[19]=t,e[20]=o,e[21]=R}else R=e[21];const F=R;let M;if(e[24]!==t||e[25]!==o){let ee;e[27]!==o?(ee=te=>te[o]??-1/0,e[27]=o,e[28]=ee):ee=e[28],M=Math.max(...t.map(ee)),e[24]=t,e[25]=o,e[26]=M}else M=e[26];const O=M,B=typeof((ne=t==null?void 0:t[0])==null?void 0:ne[o]),H=d??(f==="sideContent"?"bottom":"right"),z=!p&&f!=="sideContent";let W;e[29]!==O||e[30]!==F?(W=[F,O],e[29]=O,e[30]=F,e[31]=W):W=e[31];const A=W;let U;e[32]!==k?(U=()=>k(),e[32]=k,e[33]=U):U=e[33];let K;e[34]!==F||e[35]!==B?(K=B==="string"?{type:"point"}:{type:"linear",min:F},e[34]=F,e[35]=B,e[36]=K):K=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V={type:"linear",nice:!0},e[37]=V):V=e[37];let G;e[38]!==z||e[39]!==p?(G=z?{tickSize:5,tickPadding:5,tickRotation:0,legend:p?"%":"count",legendOffset:-40,legendPosition:"middle",truncateTickAt:0}:null,e[38]=z,e[39]=p,e[40]=G):G=e[40];const Z=f==="sideContent"?A:void 0;let X;e[41]!==Z?(X={tickValues:Z},e[41]=Z,e[42]=X):X=e[42];let le;e[43]!==f?(le=f==="sideContent"?[0]:void 0,e[43]=f,e[44]=le):le=e[44];let q;e[45]!==y||e[46]!==S||e[47]!==H||e[48]!==i||e[49]!==a?(q=H!=="none"?[{data:a.map((ee,te)=>({id:ee.key,label:i(ee.key),color:y==null?void 0:y[te],hidden:S.has(ee.key)})),onClick:T,anchor:H,direction:H==="right"?"column":"row",toggleSerie:!0,justify:!1,translateX:H==="right"?120:void 0,translateY:H==="right"?0:H==="bottom"?44:void 0,itemsSpacing:0,itemDirection:"left-to-right",itemWidth:100,itemHeight:20,itemOpacity:.75,symbolSize:12,symbolShape:"circle",effects:[{on:"hover",style:{itemBackground:"rgba(0, 0, 0, .04)",itemOpacity:1,symbolSize:14}}]}]:void 0,e[45]=y,e[46]=S,e[47]=H,e[48]=i,e[49]=a,e[50]=q):q=e[50];let oe;e[51]===Symbol.for("react.memo_cache_sentinel")?(oe={theme:"background"},e[51]=oe):oe=e[51];let ce;e[52]===Symbol.for("react.memo_cache_sentinel")?(ce={from:"serieColor"},e[52]=ce):ce=e[52];const fe=H==="right"?130:20,pe=H==="bottom"?44:20,J=z?50:20;let Y;e[53]!==fe||e[54]!==pe||e[55]!==J?(Y={top:10,right:fe,bottom:pe,left:J},e[53]=fe,e[54]=pe,e[55]=J,e[56]=Y):Y=e[56];let Q;return e[57]!==y||e[58]!==_||e[59]!==U||e[60]!==K||e[61]!==G||e[62]!==X||e[63]!==le||e[64]!==q||e[65]!==Y||e[66]!==$?(Q=s.jsx("div",{ref:v,className:"d-flex h-100 w-100",children:s.jsx(l.Me,{onClick:U,data:_,xScale:K,yScale:V,axisLeft:G,axisBottom:X,gridYValues:le,legends:q,pointSize:6,pointColor:oe,pointBorderWidth:2,pointBorderColor:ce,margin:Y,colors:y,isInteractive:!0,enableCrosshair:!0,enableTouchCrosshair:!0,useMesh:!0,animate:!1,tooltip:$})}),e[57]=y,e[58]=_,e[59]=U,e[60]=K,e[61]=G,e[62]=X,e[63]=le,e[64]=q,e[65]=Y,e[66]=$,e[67]=Q):Q=e[67],Q},_c=n=>{const e=l.compilerRuntimeExports.c(9),{errors:t,schema:o}=n;let a;e[0]!==o?(a=d=>{var u,m;return d.toLowerCase()==="others"?"Obecné":((m=(u=o.columns)==null?void 0:u.find(p=>p.field===d))==null?void 0:m.caption)??d},e[0]=o,e[1]=a):a=e[1];const i=a;let r;if(e[2]!==t||e[3]!==i){let d;e[5]!==i?(d=u=>s.jsxs("tr",{children:[s.jsx("td",{className:"fw-bold pe-2",children:s.jsxs(l.Typography,{variant:"body",children:[i(u.name),":"]})}),s.jsx("td",{className:"",children:s.jsx(l.Typography,{variant:"body",children:u.errors})})]},u.name),e[5]=i,e[6]=d):d=e[6],r=t.map(d),e[2]=t,e[3]=i,e[4]=r}else r=e[4];let c;return e[7]!==r?(c=s.jsx("div",{className:"alert alert-danger w-100 m-0 p-2",children:s.jsx("table",{children:s.jsx("tbody",{children:r})})}),e[7]=r,e[8]=c):c=e[8],c},ol=n=>{const e={};return Object.keys(n).forEach(t=>{if(n[t].value===!0){e[t]=1;return}if(n[t].value===!1){e[t]=0;return}e[t]=n[t].value}),e},Es=(n,e)=>{const t={};return Object.keys(n).forEach(o=>{var r;const a=n[o],i=(r=e.columns)==null?void 0:r.find(c=>c.field===o);if((i==null?void 0:i.type)==="BIT"&&(a===1||a===0)){t[o]={value:a===1,defaultValue:a===1};return}t[o]={value:a,defaultValue:a}}),t},Dc="_table_1klfy_1",Ec="_table-header_1klfy_10",Lc="_table-row_1klfy_10",Rc="_table-head_1klfy_10",Fc="_filters-row_1klfy_19",$c="_table-body_1klfy_30",Pc="_table-cell_1klfy_30",Mc="_action-column_1klfy_43",Ac="_sticky-top_1klfy_47",Bc="_sticky-first_1klfy_54",Oc="_sticky-last_1klfy_61",_e={table:Dc,tableHeader:Ec,tableRow:Lc,tableHead:Rc,filtersRow:Fc,tableBody:$c,tableCell:Pc,actionColumn:Mc,stickyTop:Ac,stickyFirst:Bc,stickyLast:Oc},zc="_input_pxkkh_1",ht={input:zc},Hc="_multiselect_134m5_1",Vc="_multiselect-menu_134m5_10",Uc="_dropdown-item_134m5_18",Wc="_special-option_134m5_24",Dt={multiselect:Hc,multiselectMenu:Vc,dropdownItem:Uc,specialOption:Wc},Ls=10,Rs=({value:n,field:e,disabled:t,valuesForSelect:o,onChangeHandler:a,separator:i})=>{var h,b,j,S;const{texts:{dynamicForms:r}}=w.useContext(l.LuminusComponentsContext),[c,d]=w.useState("");o==null||o.sort((N,v)=>(N.name??"").localeCompare(v.name??""));const u=w.useMemo(()=>{var N;return n?(N=n==null?void 0:n.toString())==null?void 0:N.split(i):[]},[n,i]),m=w.useCallback((N,v)=>{const C=N.split(i),k=v?C.every(I=>u.includes(I))&&u.length===C.length?null:C:N===""?void 0:u.includes(N)?u.filter(I=>I!==N):[...u,N];a(k!=null&&k.length?k.join(i):null)},[a,u,i]),p=w.useMemo(()=>{const N=[{value:o.map(v=>{var C;return((C=v.id)==null?void 0:C.toString())??""}).join(i),label:r.allOptionsMultiselect,specialOption:!0}];return o.forEach(v=>{var C,k;N.push({value:((C=v.id)==null?void 0:C.toString())??"",label:((k=v.name)==null?void 0:k.toString())??"",specialOption:!1})}),N},[o,r,i]),f=w.useRef(null),x=w.useRef(null),[g,y]=w.useState(!1);return w.useEffect(()=>{g&&x.current&&x.current.focus()},[g]),w.useEffect(()=>{p.length<Ls&&d("")},[p]),s.jsxs(l.Dropdown$1,{autoClose:"outside",onToggle:N=>y(N),children:[s.jsx(l.Dropdown$1.Toggle,{variant:"light",ref:f,id:`multiselect-${e}`,size:"sm",className:l.classNames("bg-white border",Dt.multiselect),onKeyDown:N=>{t||N.key==="Escape"&&a(null)},children:u.length>1||u.length===0?r.xValuesMultiselect(u.length):u.length===1?(h=p.find(N=>N.value===u.at(0)))==null?void 0:h.label:r.allOptionsMultiselect}),s.jsxs(l.Dropdown$1.Menu,{className:l.classNames(Dt.multiselectMenu),style:{left:(b=f.current)==null?void 0:b.getBoundingClientRect().left,top:(j=f.current)==null?void 0:j.getBoundingClientRect().bottom,maxWidth:`max(300px, ${(S=f.current)==null?void 0:S.getBoundingClientRect().width}px)`},children:[p.length>=Ls?s.jsx(l.Dropdown$1.Item,{className:l.classNames("rounded",Dt.dropdownItem,Dt.searchItem),children:s.jsx(l.Form.Control,{ref:x,type:"search",size:"sm",value:c,onChange:N=>d(N.target.value??""),className:"w-100"})}):null,p.filter(N=>N.specialOption?!0:c?l.stringSearchWithin(N.value,c):!0).map(N=>s.jsx(l.Dropdown$1.Item,{onClick:()=>!t&&m(N.value,N.specialOption),disabled:t,className:l.classNames("rounded",Dt.dropdownItem,{[Dt.specialOption]:N.specialOption},{"text-muted":t}),children:s.jsx(l.Form.Check,{disabled:t,label:N.label,checked:N.specialOption?u.length===N.value.split(i).length&&u.every(v=>N.value.split(i).includes(v)):u.includes(N.value),onChange:()=>{}})},N.value))]})]})},ll=n=>{var S;const e=l.compilerRuntimeExports.c(106),{type:t,value:o,field:a,isPrimary:i,isReadonly:r,primaryEditable:c,valuesForSelect:d,addValueToValuesForSelect:u,onChangeHandler:m,hideClearIcon:p,clearValue:f,customPickers:x,isMultiChoice:g,multiChoiceSeparator:y,disabled:h}=n,j=h||r?!0:i?!(c===void 0?!1:c):!1;switch(t){case"NUM":{if(d&&d.length>0){if(!g){let D;e[0]!==o?(D=(o==null?void 0:o.toString())??"",e[0]=o,e[1]=D):D=e[1];let _;e[2]!==a||e[3]!==m?(_=R=>m(a,R===null?null:Number(R)),e[2]=a,e[3]=m,e[4]=_):_=e[4];const P=!p;let $;return e[5]!==f||e[6]!==j||e[7]!==D||e[8]!==_||e[9]!==P||e[10]!==d?($=s.jsx(l.CustomSelectInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",value:D,onChange:_,options:d,disabled:j,showClearIcon:P,clearValue:f,dropdownWidth:200}),e[5]=f,e[6]=j,e[7]=D,e[8]=_,e[9]=P,e[10]=d,e[11]=$):$=e[11],$}let I;e[12]!==o?(I=(o==null?void 0:o.toString())??"",e[12]=o,e[13]=I):I=e[13];const T=y??",";let L;e[14]!==a||e[15]!==m?(L=D=>m(a,D),e[14]=a,e[15]=m,e[16]=L):L=e[16];let E;return e[17]!==a||e[18]!==j||e[19]!==I||e[20]!==T||e[21]!==L||e[22]!==d?(E=s.jsx(Rs,{field:a,value:I,separator:T,onChangeHandler:L,valuesForSelect:d,disabled:j}),e[17]=a,e[18]=j,e[19]=I,e[20]=T,e[21]=L,e[22]=d,e[23]=E):E=e[23],E}const N=o===null?null:Number(o);let v;e[24]!==a||e[25]!==m?(v=I=>m(a,I===null?null:Number(I)),e[24]=a,e[25]=m,e[26]=v):v=e[26];const C=!p;let k;return e[27]!==f||e[28]!==j||e[29]!==N||e[30]!==v||e[31]!==C?(k=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",type:"number",value:N,onChange:v,disabled:j,showClearIcon:C,clearValue:f}),e[27]=f,e[28]=j,e[29]=N,e[30]=v,e[31]=C,e[32]=k):k=e[32],k}case"STR":{if(d&&d.length>0){if(!g){let _;e[33]!==o?(_=(o==null?void 0:o.toString())??"",e[33]=o,e[34]=_):_=e[34];let P;e[35]!==a||e[36]!==m?(P=F=>m(a,(F==null?void 0:F.toString())??null),e[35]=a,e[36]=m,e[37]=P):P=e[37];const $=!p;let R;return e[38]!==f||e[39]!==j||e[40]!==_||e[41]!==P||e[42]!==$||e[43]!==d?(R=s.jsx(l.CustomSelectInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",value:_,onChange:P,options:d,disabled:j,showClearIcon:$,clearValue:f,dropdownWidth:200}),e[38]=f,e[39]=j,e[40]=_,e[41]=P,e[42]=$,e[43]=d,e[44]=R):R=e[44],R}let T;e[45]!==o?(T=(o==null?void 0:o.toString())??"",e[45]=o,e[46]=T):T=e[46];const L=y??",";let E;e[47]!==a||e[48]!==m?(E=_=>{m(a,_)},e[47]=a,e[48]=m,e[49]=E):E=e[49];let D;return e[50]!==a||e[51]!==j||e[52]!==T||e[53]!==L||e[54]!==E||e[55]!==d?(D=s.jsx(Rs,{field:a,value:T,separator:L,onChangeHandler:E,valuesForSelect:d,disabled:j}),e[50]=a,e[51]=j,e[52]=T,e[53]=L,e[54]=E,e[55]=d,e[56]=D):D=e[56],D}let N;e[57]===Symbol.for("react.memo_cache_sentinel")?(N=l.classNames(ht.input,ht.longer),e[57]=N):N=e[57];let v;e[58]!==o?(v=(o==null?void 0:o.toString())??"",e[58]=o,e[59]=v):v=e[59];let C;e[60]!==a||e[61]!==m?(C=T=>m(a,(T==null?void 0:T.toString())??null),e[60]=a,e[61]=m,e[62]=C):C=e[62];const k=!p;let I;return e[63]!==f||e[64]!==j||e[65]!==v||e[66]!==C||e[67]!==k?(I=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:N,size:"sm",type:"text",value:v,onChange:C,disabled:j,showClearIcon:k,clearValue:f}),e[63]=f,e[64]=j,e[65]=v,e[66]=C,e[67]=k,e[68]=I):I=e[68],I}case"BIT":{const N=o===!0;let v;e[69]!==a||e[70]!==m?(v=k=>m(a,k),e[69]=a,e[70]=m,e[71]=v):v=e[71];let C;return e[72]!==j||e[73]!==N||e[74]!==v?(C=s.jsx(Tt,{InputContainer:l.NoInputContainer,className:ht.input,value:N,onChange:v,disabled:j}),e[72]=j,e[73]=N,e[74]=v,e[75]=C):C=e[75],C}case"DT":{let N;e[76]!==o?(N=o?o.toString().split("T")[0]??"":"",e[76]=o,e[77]=N):N=e[77];let v;e[78]!==a||e[79]!==m?(v=I=>m(a,(I==null?void 0:I.toString())??null),e[78]=a,e[79]=m,e[80]=v):v=e[80];const C=!p;let k;return e[81]!==f||e[82]!==j||e[83]!==N||e[84]!==v||e[85]!==C?(k=s.jsx(l.TextInput,{withoutLabel:!0,InputContainer:l.NoInputContainer,className:ht.input,size:"sm",type:"date",value:N,onChange:v,disabled:j,showClearIcon:C,clearValue:f}),e[81]=f,e[82]=j,e[83]=N,e[84]=v,e[85]=C,e[86]=k):k=e[86],k}default:{let N;e[87]!==x||e[88]!==t?(N=x==null?void 0:x.find(E=>E.type===t),e[87]=x,e[88]=t,e[89]=N):N=e[89];const v=N;if(!v){let E;return e[90]!==t?(E=s.jsx("div",{className:"alert alert-warning p-1 m-0",children:s.jsxs(l.Typography,{variant:"body",children:["Neznámý typ ",t]})}),e[90]=t,e[91]=E):E=e[91],E}const C=v.picker;let k;e[92]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames(ht.input,ht.longer),e[92]=k):k=e[92];let I;e[93]!==o||e[94]!==d?(I=o?{id:(o==null?void 0:o.toString())??null,name:((S=d==null?void 0:d.find(E=>{var D;return((D=E.id)==null?void 0:D.toString())===(o==null?void 0:o.toString())}))==null?void 0:S.name)??""}:null,e[93]=o,e[94]=d,e[95]=I):I=e[95];let T;e[96]!==u||e[97]!==a||e[98]!==m||e[99]!==d?(T=E=>{var D;m(a,(E==null?void 0:E.id)??null),console.log(E,d==null?void 0:d.some(_=>{var P,$;return((P=_.id)==null?void 0:P.toString())===(($=E==null?void 0:E.id)==null?void 0:$.toString())}),u),E&&!(d!=null&&d.some(_=>{var P,$;return((P=_.id)==null?void 0:P.toString())===(($=E==null?void 0:E.id)==null?void 0:$.toString())}))&&u&&(console.log("adding to values for select"),u({id:((D=E.id)==null?void 0:D.toString())??"",name:E.name}))},e[96]=u,e[97]=a,e[98]=m,e[99]=d,e[100]=T):T=e[100];let L;return e[101]!==v.picker||e[102]!==j||e[103]!==I||e[104]!==T?(L=s.jsx(C,{className:k,value:I,onChange:T,disabled:j}),e[101]=v.picker,e[102]=j,e[103]=I,e[104]=T,e[105]=L):L=e[105],L}}},Gc=n=>{const e=l.compilerRuntimeExports.c(39),{schema:t,columns:o,setColumns:a,initialItem:i,onEdit:r,onDelete:c,customPickers:d,appDetail:u}=n,{ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),[p,f]=w.useState(i);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=(D,_)=>{console.log("changeValue",D,_),f(P=>({...P,[D]:{...P[D],value:_}}))},e[0]=x):x=e[0];const g=x,y=Kc;let h;e[1]!==p?(h=()=>Object.keys(p).some(D=>y(p[D])),e[1]=p,e[2]=h):h=e[2];const b=h;let j,S;e[3]!==i?(j=()=>{f(i)},S=[i],e[3]=i,e[4]=j,e[5]=S):(j=e[4],S=e[5]),w.useEffect(j,S);let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=l.classNames("table-row",_e.tableRow),e[6]=N):N=e[6];let v;e[7]!==m||e[8]!==b||e[9]!==p||e[10]!==r||e[11]!==t.userCanModify?(v=t.userCanModify&&s.jsx("td",{className:l.classNames("table-cell",_e.tableCell,_e.stickyFirst),children:b()&&s.jsx(l.IconButton,{color:"success",onClick:()=>r(ol(p)),children:s.jsx(m,{icon:"check"})})}),e[7]=m,e[8]=b,e[9]=p,e[10]=r,e[11]=t.userCanModify,e[12]=v):v=e[12];let C;e[13]!==o||e[14]!==d||e[15]!==p||e[16]!==t.id||e[17]!==t.primaryKey||e[18]!==t.userCanModify||e[19]!==a?(C=o.map(D=>{var _,P;return s.jsx("td",{className:l.classNames("table-cell",_e.tableCell),children:s.jsx(ll,{type:D.type,value:(_=p[D.field??""])==null?void 0:_.value,field:D.field,isReadonly:D.readOnly,isPrimary:t.primaryKey===D.field,valuesForSelect:D.valuesForSelect,addValueToValuesForSelect:$=>{a(o.map(R=>R.field===D.field?{...R,valuesForSelect:[...R.valuesForSelect??[],$]}:R))},onChangeHandler:g,hideClearIcon:!y(p[D.field??""]),clearValue:(P=p[D.field??""].defaultValue)==null?void 0:P.toString(),customPickers:d,isMultiChoice:D.multiChoice??!1,multiChoiceSeparator:D.multiChoiceSeparator??null,disabled:!t.userCanModify})},`${t.id}-${D.field}`)}),e[13]=o,e[14]=d,e[15]=p,e[16]=t.id,e[17]=t.primaryKey,e[18]=t.userCanModify,e[19]=a,e[20]=C):C=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames("table-cell d-flex gap-1",_e.tableCell,_e.stickyLast),e[21]=k):k=e[21];let I;e[22]!==u||e[23]!==p||e[24]!==t.slaves?(I=t!=null&&t.slaves&&t.slaves.length>0?t.slaves.map((D,_)=>{var P,$;return s.jsx(l.IconButton,{as:"link",href:`${we.generatePath(u,{id:(P=D.id)==null?void 0:P.toString()})}?type=dynamic-form&masterId=${($=p.id)==null?void 0:$.value}`,children:s.jsx(l.SimpleTooltip,{text:D.name??"",placement:"left",children:s.jsx("div",{children:s.jsxs(l.Typography,{variant:"body",className:"d-flex align-items-center text-primary",children:[t.slaves.length>1?s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:_+1}):null,s.jsx(l.MdOutlineSubdirectoryArrowRight,{})]})})})},D.id)}):null,e[22]=u,e[23]=p,e[24]=t.slaves,e[25]=I):I=e[25];let T;e[26]!==m||e[27]!==p||e[28]!==c||e[29]!==t.primaryKey||e[30]!==t.userCanModify?(T=t.userCanModify&&s.jsx(l.IconButton,{color:"danger",onClick:()=>c(p[t.primaryKey??""].value),children:s.jsx(m,{icon:"delete"})}),e[26]=m,e[27]=p,e[28]=c,e[29]=t.primaryKey,e[30]=t.userCanModify,e[31]=T):T=e[31];let L;e[32]!==T||e[33]!==I?(L=s.jsxs("td",{className:k,children:[I,T]}),e[32]=T,e[33]=I,e[34]=L):L=e[34];let E;return e[35]!==L||e[36]!==v||e[37]!==C?(E=s.jsxs("tr",{className:N,children:[v,C,L]}),e[35]=L,e[36]=v,e[37]=C,e[38]=E):E=e[38],E};function Kc(n){return(n==null?void 0:n.value)!==(n==null?void 0:n.defaultValue)}const qc=n=>{const e=l.compilerRuntimeExports.c(14),{schema:t,columns:o,setColumns:a,onCreate:i,customPickers:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(null);let m;e[0]!==t.columns?(m=()=>{var h;const y={};(h=t.columns)==null||h.forEach(b=>{const j=b.type==="BIT"?!1:b.type==="NUM"?null:b.type==="STR"?"":null;y[b.field??""]={value:j,defaultValue:j}}),u(y)},e[0]=t.columns,e[1]=m):m=e[1];const p=m;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=(y,h)=>{u(b=>b&&{...b,[y]:{...b[y],value:h}})},e[2]=f):f=e[2];const x=f;let g;return e[3]!==c||e[4]!==o||e[5]!==r||e[6]!==p||e[7]!==d||e[8]!==i||e[9]!==t.id||e[10]!==t.primaryKey||e[11]!==t.userCanModify||e[12]!==a?(g=d?s.jsxs("tr",{className:"sticky-bottom shadow",children:[t.userCanModify&&s.jsx("td",{className:"sticky-first",children:s.jsx(l.IconButton,{color:"success",onClick:async()=>{const y=ol(d);y&&await i(y)&&u(null)},children:s.jsx(c,{icon:"check"})})}),o.map(y=>s.jsx("td",{children:s.jsx(ll,{type:y.type,value:d[y.field??""].value,field:y.field,isReadonly:y.readOnly,isPrimary:t.primaryKey===y.field,valuesForSelect:y.valuesForSelect,addValueToValuesForSelect:h=>{a(o.map(b=>b.field===y.field?{...b,valuesForSelect:[...b.valuesForSelect??[],h]}:b))},onChangeHandler:x,primaryEditable:!0,customPickers:r,isMultiChoice:y.multiChoice??!1,multiChoiceSeparator:y.multiChoiceSeparator??null,disabled:!t.userCanModify})},`${t.id}-${y.field}`)),t.userCanModify&&s.jsx("td",{className:"sticky-last",children:s.jsx(l.IconButton,{color:"danger",onClick:()=>u(null),children:s.jsx(c,{icon:"cancel"})})})]}):t.userCanModify&&s.jsxs("tr",{className:"sticky-bottom shadow",children:[s.jsx("td",{className:"sticky-first",children:s.jsx(l.IconButton,{onClick:p,children:s.jsx(c,{icon:"add"})})}),s.jsx("td",{colSpan:o.length+1})]}),e[3]=c,e[4]=o,e[5]=r,e[6]=p,e[7]=d,e[8]=i,e[9]=t.id,e[10]=t.primaryKey,e[11]=t.userCanModify,e[12]=a,e[13]=g):g=e[13],g},Yc="_resizer_ref0b_1",Qc="_content_ref0b_11",Zc="_dragging_ref0b_16",Yt={resizer:Yc,content:Qc,dragging:Zc},al=n=>{const e=l.compilerRuntimeExports.c(20),{cellRef:t,defaultWidth:o}=n,[a,i]=w.useState(o),[,r]=w.useState(null);let c,d;e[0]!==o?(c=()=>{i(o)},d=[o],e[0]=o,e[1]=c,e[2]=d):(c=e[1],d=e[2]),w.useEffect(c,d);let u,m;e[3]!==t||e[4]!==a?(u=()=>{t.current&&(t.current.style.minWidth=`${a}px`)},m=[a,t],e[3]=t,e[4]=a,e[5]=u,e[6]=m):(u=e[5],m=e[6]),w.useEffect(u,m);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=l.classNames("luminus-column-resizer",Yt.resizer),e[7]=p):p=e[7];let f;e[8]!==r?(f=b=>{r(b.currentTarget.getBoundingClientRect().x),b.currentTarget.classList.add(Yt.dragging)},e[8]=r,e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==r?(x=b=>{r(j=>(t.current&&i(S=>S+b.clientX-(j??0)),b.clientX))},e[10]=t,e[11]=r,e[12]=x):x=e[12];let g;e[13]!==r?(g=b=>{r(null),b.currentTarget.classList.remove(Yt.dragging)},e[13]=r,e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:l.classNames("content",Yt.content)}),e[15]=y):y=e[15];let h;return e[16]!==f||e[17]!==x||e[18]!==g?(h=s.jsx("div",{className:p,draggable:!0,onDragStart:f,onDrag:x,onDragEnd:g,children:y}),e[16]=f,e[17]=x,e[18]=g,e[19]=h):h=e[19],h},Xc=n=>{const e=l.compilerRuntimeExports.c(10),{column:t,children:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);if(t.description){const r=t.description??"";let c;e[0]!==a?(c=s.jsx(a,{icon:"info"}),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==o||e[3]!==c?(d=s.jsxs("div",{className:"d-flex justify-content-between",children:[o,c]}),e[2]=o,e[3]=c,e[4]=d):d=e[4];let u;return e[5]!==r||e[6]!==d?(u=s.jsx(l.SimpleTooltip,{placement:"bottom",text:r,children:d}),e[5]=r,e[6]=d,e[7]=u):u=e[7],u}let i;return e[8]!==o?(i=s.jsx(s.Fragment,{children:o}),e[8]=o,e[9]=i):i=e[9],i},Jc=n=>{const e=l.compilerRuntimeExports.c(23),{column:t,sortByField:o,sortByType:a,setSortBy:i}=n,{ProjectIconComponent:r}=w.useContext(l.LuminusComponentsContext),c=w.useRef(null);let d;e:{if(t.valuesForSelect&&t.valuesForSelect.length>0){d=200;break e}switch(t.type){case"NUM":{d=80;break e}case"STR":{d=200;break e}case"BIT":{d=50;break e}case"DT":{d=100;break e}default:d=100}}const u=d;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=l.classNames("table-head",_e.tableHead),e[0]=m):m=e[0];let p;e[1]!==t.field||e[2]!==i||e[3]!==o||e[4]!==a?(p=()=>{const b=o===t.field?a:null;if(b==="asc"){i(t.field,"desc");return}if(b==="desc"){i(t.field,null);return}i(t.field,"asc")},e[1]=t.field,e[2]=i,e[3]=o,e[4]=a,e[5]=p):p=e[5];let f;e[6]!==r||e[7]!==t.field||e[8]!==o||e[9]!==a?(f=o===t.field&&s.jsx(r,{icon:a==="asc"?"chevron-up":"chevron-down"}),e[6]=r,e[7]=t.field,e[8]=o,e[9]=a,e[10]=f):f=e[10];let x;e[11]!==t.label||e[12]!==f?(x=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[t.label,f]}),e[11]=t.label,e[12]=f,e[13]=x):x=e[13];let g;e[14]!==t||e[15]!==x?(g=s.jsx(Xc,{column:t,children:x}),e[14]=t,e[15]=x,e[16]=g):g=e[16];let y;e[17]!==u?(y=s.jsx(al,{cellRef:c,defaultWidth:u}),e[17]=u,e[18]=y):y=e[18];let h;return e[19]!==p||e[20]!==g||e[21]!==y?(h=s.jsxs("th",{ref:c,className:m,onClick:p,children:[g,y]}),e[19]=p,e[20]=g,e[21]=y,e[22]=h):h=e[22],h},ed=n=>{const e=l.compilerRuntimeExports.c(80),{schema:t,items:o,onEditItem:a,onDeleteItem:i,onCreateItem:r,filters:c,setFilter:d,sortByField:u,sortByType:m,setSortBy:p,selectedMaster:f,customPickers:x,appDetail:g}=n,{texts:y}=w.useContext(l.LuminusComponentsContext),{dynamicForms:h}=y;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const[j,S]=w.useState(b);let N;e[1]!==t.columns||e[2]!==t.masterReference||e[3]!==t.masterReferenceColumn||e[4]!==f?(N=()=>{var U,K,V;S([...((V=(K=(U=t.columns)==null?void 0:U.filter(td))==null?void 0:K.filter(G=>t.masterReference?G.field!==t.masterReferenceColumn:!0))==null?void 0:V.map(G=>{var Z;return{label:G.caption??"",width:100,description:G.description??null,field:G.field??"",type:G.type,readOnly:G.readOnly,valuesForSelect:((Z=G.values)==null?void 0:Z.filter(X=>G.valuesFilteredByMaster?X.masterValue===f:!0).map(nd))??void 0,multiChoice:G.multiChoice??!1,multiChoiceSeparator:G.multiChoiceSeparator??null}}))??[]])},e[1]=t.columns,e[2]=t.masterReference,e[3]=t.masterReferenceColumn,e[4]=f,e[5]=N):N=e[5];let v;e[6]!==t||e[7]!==f?(v=[t,f],e[6]=t,e[7]=f,e[8]=v):v=e[8],w.useEffect(N,v);const C=`dynamic-table-${t.id}`;let k,I,T;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=l.classNames("table table-borderless luminus-df-table",_e.table),I=l.classNames("text-nowrap table-header",_e.stickyTop,_e.tableHeader),T=l.classNames("table-row",_e.tableRow),e[9]=k,e[10]=I,e[11]=T):(k=e[9],I=e[10],T=e[11]);let L;e[12]!==t.userCanModify?(L=t.userCanModify&&s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyFirst)}),e[12]=t.userCanModify,e[13]=L):L=e[13];let E;if(e[14]!==j||e[15]!==t.id||e[16]!==p||e[17]!==u||e[18]!==m){let U;e[20]!==t.id||e[21]!==p||e[22]!==u||e[23]!==m?(U=K=>s.jsx(Jc,{column:K,sortByField:u,sortByType:m,setSortBy:p},`${t.id}-${K.field}`),e[20]=t.id,e[21]=p,e[22]=u,e[23]=m,e[24]=U):U=e[24],E=j.map(U),e[14]=j,e[15]=t.id,e[16]=p,e[17]=u,e[18]=m,e[19]=E}else E=e[19];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyLast)}),e[25]=D):D=e[25];let _;e[26]!==E||e[27]!==L?(_=s.jsxs("tr",{className:T,children:[L,E,D]}),e[26]=E,e[27]=L,e[28]=_):_=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=l.classNames("table-row filters-row",_e.tableRow,_e.filtersRow),e[29]=P):P=e[29];let $;e[30]!==t.userCanModify?($=t.userCanModify&&s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyFirst)}),e[30]=t.userCanModify,e[31]=$):$=e[31];let R;if(e[32]!==j||e[33]!==h||e[34]!==c||e[35]!==t.id||e[36]!==d){let U;e[38]!==h||e[39]!==c||e[40]!==t.id||e[41]!==d?(U=K=>s.jsx("th",{className:l.classNames("table-head",_e.tableHead),children:K.valuesForSelect&&K.valuesForSelect.length>0||K.type==="BIT"?s.jsx(s.Fragment,{children:s.jsx(l.CustomSelectInput,{InputContainer:l.NoInputContainer,withoutLabel:!0,size:"sm",value:c[K.field]??"",onChange:V=>d(K.field,(V==null?void 0:V.toString())??null),options:K.type==="BIT"?[{id:1,name:h.yes},{id:0,name:h.no}]:K.valuesForSelect??[],isNumber:K.type==="BIT",showClearIcon:!0,dropdownWidth:200})}):s.jsx(s.Fragment,{children:s.jsx(l.TextInput,{InputContainer:l.NoInputContainer,withoutLabel:!0,size:"sm",type:K.type==="NUM"?"number":K.type==="DT"?"date":"text",value:c[K.field]??"",onChange:V=>d(K.field,(V==null?void 0:V.toString())??null)})})},`${t.id}-${K.field}`),e[38]=h,e[39]=c,e[40]=t.id,e[41]=d,e[42]=U):U=e[42],R=j.map(U),e[32]=j,e[33]=h,e[34]=c,e[35]=t.id,e[36]=d,e[37]=R}else R=e[37];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("th",{className:l.classNames("table-head",_e.tableHead,_e.actionColumn,_e.stickyLast)}),e[43]=F):F=e[43];let M;e[44]!==$||e[45]!==R?(M=s.jsxs("tr",{className:P,children:[$,R,F]}),e[44]=$,e[45]=R,e[46]=M):M=e[46];let O;e[47]!==_||e[48]!==M?(O=s.jsxs("thead",{className:I,children:[_,M]}),e[47]=_,e[48]=M,e[49]=O):O=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=l.classNames("table-body",_e.tableBody),e[50]=B):B=e[50];let H;if(e[51]!==g||e[52]!==j||e[53]!==x||e[54]!==o||e[55]!==i||e[56]!==a||e[57]!==t){let U;e[59]!==t.primaryKey?(U=V=>V[t.primaryKey??""],e[59]=t.primaryKey,e[60]=U):U=e[60];let K;e[61]!==g||e[62]!==j||e[63]!==x||e[64]!==i||e[65]!==a||e[66]!==t?(K=V=>s.jsx(Gc,{schema:t,columns:j,setColumns:S,initialItem:V,onEdit:a,onDelete:i,customPickers:x,appDetail:g},`${t.id}-${V[t.primaryKey??""].value}`),e[61]=g,e[62]=j,e[63]=x,e[64]=i,e[65]=a,e[66]=t,e[67]=K):K=e[67],H=o.filter(U).map(K),e[51]=g,e[52]=j,e[53]=x,e[54]=o,e[55]=i,e[56]=a,e[57]=t,e[58]=H}else H=e[58];let z;e[68]!==j||e[69]!==x||e[70]!==r||e[71]!==t?(z=s.jsx(qc,{schema:t,columns:j,setColumns:S,onCreate:r,customPickers:x}),e[68]=j,e[69]=x,e[70]=r,e[71]=t,e[72]=z):z=e[72];let W;e[73]!==H||e[74]!==z?(W=s.jsxs("tbody",{className:B,children:[H,z]}),e[73]=H,e[74]=z,e[75]=W):W=e[75];let A;return e[76]!==O||e[77]!==W||e[78]!==C?(A=s.jsxs("table",{id:C,className:k,children:[O,W]}),e[76]=O,e[77]=W,e[78]=C,e[79]=A):A=e[79],A};function td(n){return!n.hidden}function nd(n){return{id:n.id??"",name:n.name}}const sd=n=>{const e=l.compilerRuntimeExports.c(8),{master:t,onChange:o,options:a,label:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={minWidth:"200px"},e[0]=r):r=e[0];let c;e[1]!==o?(c=u=>o(u?u.toString():null),e[1]=o,e[2]=c):c=e[2];let d;return e[3]!==i||e[4]!==t||e[5]!==a||e[6]!==c?(d=s.jsx("div",{style:r,children:s.jsx(l.CustomSelectInput,{label:i,value:t,onChange:c,options:a,size:"sm"})}),e[3]=i,e[4]=t,e[5]=a,e[6]=c,e[7]=d):d=e[7],d},od="_pagination_gujwe_1",Fs={pagination:od},$s={appDetail:"/settings/:id"},St={apiSchemaGet:"/dynamicForms/schema",apiDataGet:"/dynamicForms/data",apiItemPost:"/dynamicForms/update",apiItemDelete:"/dynamicForms/delete",apiItemCreate:"/dynamicForms/insert",apiExportGet:"/dynamicForms/export"},ld=({id:n,page:e,setPage:t,filters:o,setFilter:a,sortByField:i,sortByType:r,setSortBy:c,appUrls:{appDetail:d=$s.appDetail}=$s,apiUrls:{apiSchemaGet:u=St.apiSchemaGet,apiDataGet:m=St.apiDataGet,apiItemPost:p=St.apiItemPost,apiItemDelete:f=St.apiItemDelete,apiItemCreate:x=St.apiItemCreate,apiExportGet:g=St.apiExportGet}=St,customPickers:y})=>{var ue,me,be,ae,ke,Ne,De;const{texts:{dynamicForms:h},ProjectIconComponent:b}=w.useContext(l.LuminusComponentsContext),j=l.useAxios(),{startLoading:S,stopLoading:N}=w.useContext(l.LoadingContext),[v,C]=w.useState(null),[k,I]=w.useState(null),[T,L]=w.useState(null),[E,D]=w.useState(null),[_,P]=w.useState(!1),{addNotification:$}=l.useNotifications(),[R,F]=w.useState([]),{confirm:M}=l.useConfirm(),O=20,B=O+1,H=E?Math.ceil(E.length/O):1,z=e?e>1:!1,W=e?e<H:!1,A=e?(e-1)*O:0,U=e?e*O:O,K=w.useMemo(()=>E?E.length>B:!1,[E,B]),V=w.useMemo(()=>K?(E==null?void 0:E.slice(A,U))??null:E??null,[K,E,A,U]),[G,Z]=pt.useSearchQueryState("masterId",null,"string"),[X,le]=w.useState(G);w.useEffect(()=>{C(null),I(null),P(!1),F([])},[n]),w.useEffect(()=>{G!==null&&(le(G),Z(null))},[G,n,Z]);const q=w.useCallback(async()=>{S("dynamicFormSchema"),await j.get(`${u}?id=${n}`).then(({data:re})=>{C(re),N("dynamicFormSchema")}).catch(()=>N("dynamicFormSchema"))},[j,n,S,N,u]),oe=w.useCallback(async()=>{var re;if(!(v===null||((re=v.id)==null?void 0:re.toString())!==n)){if(v.masterReference&&!X){I([]);return}S("dynamicFormData"),await j.get(`${m}?id=${n}&showArchive=${_}${v.masterReference?`&master=${X}`:""}`).then(({data:he})=>{const ye=he.map(de=>{var xe;return Object.fromEntries(((xe=v.columns)==null?void 0:xe.filter(je=>je.field).map(je=>[je.field,{value:de[je.field??""],defaultValue:de[je.field??""]}]))??[])});I(ye),N("dynamicFormData")}).catch(()=>N("dynamicFormData"))}},[j,n,v,S,N,_,X,m]),ce=w.useCallback(async()=>{var re;v===null||((re=v.id)==null?void 0:re.toString())!==n||v.masterReference&&!X||(S("dynamicFormExport"),await j.get(`${g}?id=${n}&showArchive=${_}${v.masterReference?`&master=${X}`:""}`,{responseType:"blob"}).then(he=>l.saveFileFromResponse(he,{fallbackName:`export-${n}`})).finally(()=>N("dynamicFormExport")))},[j,n,v,S,N,_,X,g]),fe=w.useCallback(async re=>(S("dynamicFormEdit"),j.post(`${p}?id=${n}`,re).then(({data:he})=>(N("dynamicFormEdit"),F([]),he)).catch(he=>(N("dynamicFormEdit"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,p]),pe=w.useCallback(async re=>(S("dynamicFormDelete"),j.delete(`${f}?id=${n}&pk=${re}`).then(({data:he})=>(N("dynamicFormDelete"),F([]),he)).catch(he=>(N("dynamicFormDelete"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,f]),J=w.useCallback(async re=>(S("dynamicFormCreate"),j.post(`${x}?id=${n}`,re).then(({data:he})=>(N("dynamicFormCreate"),F([]),he)).catch(he=>(N("dynamicFormCreate"),F(l.extractErrorsFromResponse(he.response.data)),null))),[j,n,S,N,x]),Y=w.useCallback(async re=>{if(!v)return;const he=await fe(v.masterReference?{...re,[v.masterReferenceColumn??""]:X}:re);if(he!==null){if($(h.editSuccess,"success"),he.affectedOtherRowsByTrigger){oe();return}I(ye=>ye&&ye.map(de=>{var xe;return((xe=de[(v==null?void 0:v.primaryKey)??""])==null?void 0:xe.value)===re[(v==null?void 0:v.primaryKey)??""]?Es(re,v):de}))}},[$,fe,v,X,h,oe]),Q=w.useCallback(async re=>{if(await M(h.deleteConfirm)){const he=await pe(re);if(he!==null){if($(h.deleteSuccess,"success"),he.affectedOtherRowsByTrigger){oe();return}I(ye=>ye&&ye.filter(de=>{var xe;return((xe=de[(v==null?void 0:v.primaryKey)??""])==null?void 0:xe.value)!==re}))}}},[$,pe,h,M,v,oe]),ne=w.useCallback(async re=>{if(!v)return!1;const he=await J(v.masterReference?{...re,[v.masterReferenceColumn??""]:X}:re);if(he!==null){if($(h.createSuccess,"success"),he.affectedOtherRowsByTrigger)return oe(),!0;const ye=Es(re,v);return ye[(v==null?void 0:v.primaryKey)??""]={value:he.primaryKey,defaultValue:he.primaryKey},I(de=>[...de??[],ye]),!0}return!1},[$,J,h,v,X,oe]),ee=re=>{re>H?t(H):re<1&&t(1),t(re)},te=w.useCallback(()=>{if(!k||!v){L(null);return}const re=k.filter(he=>Object.entries(o).every(([ye,de])=>{var ze,Ee,Me;if(de===null)return!0;const xe=(ze=he[ye])==null?void 0:ze.value;if(xe==null)return!1;const je=(Ee=v.columns)==null?void 0:Ee.find(He=>He.field===ye),$e=je==null?void 0:je.type,Pe=(je==null?void 0:je.values)&&((Me=je==null?void 0:je.values)==null?void 0:Me.length)>0;if(!$e)return!1;switch($e){case"STR":return Pe?xe===de:xe.toString().toLowerCase().includes(de.toLowerCase());case"NUM":return Pe?Number(xe)===Number(de):xe.toString().toLowerCase().includes(de.toLowerCase());case"DT":return xe.toString().toLowerCase().includes(de.toLowerCase());case"BIT":return Number(xe)===Number(de);default:return xe.toString().toLowerCase().includes(de.toLowerCase())}}));L(re)},[k,o,v]),se=w.useCallback(()=>{if(!T||!v){D([]);return}if(!i){D(T);return}D([...T].sort((re,he)=>{var $e,Pe,ze,Ee,Me,He;const ye=((Pe=($e=re[i])==null?void 0:$e.value)==null?void 0:Pe.toString())??"",de=((Ee=(ze=he[i])==null?void 0:ze.value)==null?void 0:Ee.toString())??"",xe=v.columns.find(Te=>Te.field===i),je=xe==null?void 0:xe.type;if(!xe||!je||!ye&&!de)return 0;if(!ye)return 1;if(!de)return-1;if(xe.values&&xe.values.length>0){const Te=((Me=xe.values.find(Ve=>{var Ae;return((Ae=Ve.id)==null?void 0:Ae.toString())===ye}))==null?void 0:Me.name)??"",Le=((He=xe.values.find(Ve=>{var Ae;return((Ae=Ve.id)==null?void 0:Ae.toString())===de}))==null?void 0:He.name)??"";return r==="asc"?Te.localeCompare(Le):Le.localeCompare(Te)}if(je==="NUM"){const Te=Number(ye),Le=Number(de);return r==="asc"?Te-Le:Le-Te}if(je==="DT"){const Te=l.parseISO(ye==null?void 0:ye.toString()).getTime(),Le=l.parseISO(de==null?void 0:de.toString()).getTime();return r==="asc"?Te-Le:Le-Te}return r==="asc"?ye.toString().localeCompare(de.toString()):de.toString().localeCompare(ye.toString())}))},[T,v,i,r]);return w.useEffect(()=>{q()},[q]),w.useEffect(()=>{oe()},[oe]),w.useEffect(()=>{te()},[te]),w.useEffect(()=>{se()},[se]),w.useEffect(()=>{K?e||t(1):E&&t(null)},[E,K,e,t]),w.useEffect(()=>{!K||!e||(e>H&&t(H),e<1&&t(1))},[e,K,H,t]),s.jsxs("div",{className:"h-100 w-100 d-flex flex-column",children:[s.jsxs("div",{className:"mb-3 d-flex justify-content-between align-items-start",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"h3",children:(v==null?void 0:v.name)??""}),(v==null?void 0:v.masterReference)&&s.jsx(sd,{label:((me=(ue=v.columns)==null?void 0:ue.find(re=>re.field===v.masterReferenceColumn))==null?void 0:me.caption)??"",options:((ae=(be=v.columns)==null?void 0:be.find(re=>re.field===v.masterReferenceColumn))==null?void 0:ae.values)??[],master:X,onChange:re=>le(re)})]}),s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[(ke=v==null?void 0:v.slaves)==null?void 0:ke.map((re,he)=>{var ye;return s.jsxs(l.ContextButton,{as:"link",href:`${we.generatePath(d,{id:(ye=re.id)==null?void 0:ye.toString()})}?type=dynamic-form`,children:[s.jsxs("div",{className:"d-flex align-items-center",children:[v.slaves.length>1?s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:he+1}):null,s.jsx(l.MdOutlineSubdirectoryArrowRight,{})]}),re.name]},re.id)}),s.jsxs(l.Dropdown,{toggle:s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),children:[s.jsx(l.DropdownItem,{onClick:()=>P(!_),children:_?h.hideArchived:h.showArchived}),s.jsx(l.DropdownDivider,{}),s.jsx(l.DropdownItem,{onClick:ce,icon:s.jsx(b,{icon:"file-download"}),children:h.downloadExport})]})]})]}),(v==null?void 0:v.description)&&s.jsx(l.Typography,{variant:"body2",className:"mb-3",children:v==null?void 0:v.description}),v!=null&&v.masterReference&&!X?s.jsx(l.Alert,{variant:"warning",children:h.selectMaster(((De=(Ne=v.columns)==null?void 0:Ne.find(re=>re.field===v.masterReferenceColumn))==null?void 0:De.caption)??"").toLowerCase()}):s.jsxs(s.Fragment,{children:[v&&R.length>0&&s.jsx("div",{className:"mb-2",children:s.jsx(_c,{errors:R,schema:v})}),v&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:l.classNames("rounded border overflow-auto",Fs.tableContainer),children:s.jsx(ed,{schema:v,items:!K&&E&&(E==null?void 0:E.length)>B?[]:(K?V:E)??[],onEditItem:Y,onDeleteItem:Q,onCreateItem:ne,filters:o,setFilter:a,sortByField:i,sortByType:r,setSortBy:c,selectedMaster:(X==null?void 0:X.toString())??null,customPickers:y,appDetail:d})}),K&&e&&s.jsxs("div",{className:l.classNames(Fs.pagination,"d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"),children:[s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(1),disabled:!z,children:s.jsx(b,{icon:"chevron-double-left"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(e-1),disabled:!z,children:s.jsx(b,{icon:"chevron-left"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(e+1),disabled:!W,children:s.jsx(b,{icon:"chevron-right"})}),s.jsx(l.IconButton,{color:"primary",onClick:()=>ee(H),disabled:!W,children:s.jsx(b,{icon:"chevron-double-right"})})]}),s.jsxs(l.Typography,{variant:"body",children:[h.tablePage," ",e," ",h.tablePageFrom," ",H]})]})]})]})]})},Ps={appDetail:"/settings/:id"},Ms={apiDynamicFormsGet:"/dynamicForms"},ad=n=>{const e=l.compilerRuntimeExports.c(7),{item:t,children:o}=n;if(t.description){const i=t.description??"";let r;e[0]!==o?(r=s.jsx("div",{children:o}),e[0]=o,e[1]=r):r=e[1];let c;return e[2]!==i||e[3]!==r?(c=s.jsx(l.SimpleTooltip,{placement:"left",text:i,children:r}),e[2]=i,e[3]=r,e[4]=c):c=e[4],c}let a;return e[5]!==o?(a=s.jsx(s.Fragment,{children:o}),e[5]=o,e[6]=a):a=e[6],a},As=n=>{const e=l.compilerRuntimeExports.c(8);let t,o,a;e[0]!==n?({disabled:t,style:a,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let i;return e[4]!==t||e[5]!==o||e[6]!==a?(i=t?s.jsx("span",{"aria-disabled":!0,style:{...a??{},cursor:"not-allowed",opacity:.4},...o}):s.jsx(we.Link,{...o}),e[4]=t,e[5]=o,e[6]=a,e[7]=i):i=e[7],i},Bs=({item:n,fullSize:e,appDetail:t,search:o,activeId:a,disabled:i})=>{var r,c,d,u;return e?s.jsxs(As,{disabled:!!i,to:`${we.generatePath(t,{id:(r=n.id)==null?void 0:r.toString()})}?type=${n.type}&search=${o??""}`,className:`text-nowrap list-group-item list-group-item-action ${(a==null?void 0:a.toString())===((c=n.id)==null?void 0:c.toString())?"active":""}`,children:[s.jsx(l.Typography,{variant:"body",children:n.name}),n.description&&s.jsx(l.Typography,{variant:"body2",className:"text-muted mt-2",children:n.description})]}):s.jsx(ad,{item:n,children:s.jsx(As,{disabled:!!i,to:`${we.generatePath(t,{id:(d=n.id)==null?void 0:d.toString()})}?type=${n.type}&search=${o??""}`,className:`text-nowrap list-group-item list-group-item-action ${(a==null?void 0:a.toString())===((u=n.id)==null?void 0:u.toString())?"active":""}`,children:s.jsx(l.Typography,{variant:"body2",children:n.name})})},n.id)},id=n=>{const e=l.compilerRuntimeExports.c(33),{activeId:t,anchoredForms:o,otherForms:a,groupsDefs:i,searchQuery:r,fullSize:c,appUrls:d,apiUrls:u}=n;let m;e[0]!==a?(m=a===void 0?[]:a,e[0]=a,e[1]=m):m=e[1];const p=m;let f;e[2]!==i?(f=i===void 0?[]:i,e[2]=i,e[3]=f):f=e[3];const x=f,{appDetail:g}=d===void 0?Ps:d,y=g===void 0?Ps.appDetail:g,{apiDynamicFormsGet:h}=u===void 0?Ms:u,b=h===void 0?Ms.apiDynamicFormsGet:h,j=l.useAxios(),{startLoading:S,stopLoading:N}=w.useContext(l.LoadingContext),[v,C]=w.useState(null),[k]=pt.useSearchQueryState("search","");let I;e[4]!==o||e[5]!==r?(I=(o==null?void 0:o.filter(O=>l.stringSearchWithin(O.name,r)||l.stringSearchWithin(O.description,r)).sort(rd))??[],e[4]=o,e[5]=r,e[6]=I):I=e[6];const T=I;let L;e[7]!==v||e[8]!==p||e[9]!==r?(L=[...(v==null?void 0:v.map(cd))??[],...p].filter(O=>l.stringSearchWithin(O.name,r)||l.stringSearchWithin(O.description,r)).sort(dd)??[],e[7]=v,e[8]=p,e[9]=r,e[10]=L):L=e[10];const E=L;let D;if(e[11]!==E||e[12]!==x){let O;e[14]!==E?(O=B=>({id:B.id,name:B.name??"",items:E.filter(H=>H.group===B.id)}),e[14]=E,e[15]=O):O=e[15],D=x.map(O).filter(ud),e[11]=E,e[12]=x,e[13]=D}else D=e[13];const _=D;let P;e[16]!==b||e[17]!==j||e[18]!==S||e[19]!==N?(P=async()=>{S("dynamicForms"),await j.get(b).then(O=>{const{data:B}=O;C(B),N("dynamicForms")}).catch(()=>N("dynamicForms"))},e[16]=b,e[17]=j,e[18]=S,e[19]=N,e[20]=P):P=e[20];const $=P;let R,F;e[21]!==v||e[22]!==$?(R=()=>{!v&&$()},F=[$,v],e[21]=v,e[22]=$,e[23]=R,e[24]=F):(R=e[23],F=e[24]),w.useEffect(R,F);let M;return e[25]!==t||e[26]!==y||e[27]!==T||e[28]!==_||e[29]!==E||e[30]!==c||e[31]!==k?(M=[...T,...E].length>0?s.jsx(s.Fragment,{children:s.jsxs("div",{className:"w-auto list-group forms-items overflow-x-hidden",children:[T.length>0?s.jsxs(s.Fragment,{children:[T.map(O=>s.jsx(Bs,{item:O,fullSize:c??!1,appDetail:y,search:k,activeId:t,disabled:!O.userCanModify&&!O.userCanSelect},O.id)),s.jsx("hr",{className:"mb-0"})]}):null,_.map(O=>s.jsx(Ot,{title:O.name,defaultOpen:!0,children:O.items.map(B=>s.jsx(Bs,{item:B,fullSize:c??!1,appDetail:y,search:k,activeId:t,disabled:!B.userCanSelect&&!B.userCanModify},B.id))},O.id))]})}):null,e[25]=t,e[26]=y,e[27]=T,e[28]=_,e[29]=E,e[30]=c,e[31]=k,e[32]=M):M=e[32],M};function rd(n,e){return(n.name??"").localeCompare(e.name??"")}function cd(n){return{...n,type:"dynamic-form"}}function dd(n,e){return(n.name??"").localeCompare(e.name??"")}function ud(n){return n.items.length>0}const md=n=>{const e=l.compilerRuntimeExports.c(7),{label:t,to:o,value:a}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("input",{disabled:!0,className:"form-control d-none"}),e[0]=i):i=e[0];let r;e[1]!==o||e[2]!==a?(r=o?s.jsx(we.Link,{to:o,className:"border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center",children:a}):s.jsx("div",{className:"luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center",children:a}),e[1]=o,e[2]=a,e[3]=r):r=e[3];let c;return e[4]!==t||e[5]!==r?(c=s.jsxs(l.RowLabelInput,{label:t,children:[i,r]}),e[4]=t,e[5]=r,e[6]=c):c=e[6],c},fd=()=>{const n=l.compilerRuntimeExports.c(27),{localizationContext:e}=w.useContext(l.LuminusComponentsContext),{language:t,setLanguage:o}=w.useContext(e);let a;if(n[0]!==o){const S=N=>{o(N)};a=(N,v)=>{S(v),N.stopPropagation()},n[0]=o,n[1]=a}else a=n[1];const i=a;let r;n[2]!==i?(r=S=>i(S,"cz"),n[2]=i,n[3]=r):r=n[3];const c=t==="cz";let d;n[4]!==c?(d=l.classNames("w-100 border-end border-primary text-center",{"fw-bold":c}),n[4]=c,n[5]=d):d=n[5];let u;n[6]!==r||n[7]!==d?(u=s.jsx("span",{role:"button",onClick:r,className:d,children:"CZ"}),n[6]=r,n[7]=d,n[8]=u):u=n[8];let m;n[9]!==i?(m=S=>i(S,"en"),n[9]=i,n[10]=m):m=n[10];const p=t==="en";let f;n[11]!==p?(f=l.classNames("w-100 border-end border-primary text-center",{"fw-bold":p}),n[11]=p,n[12]=f):f=n[12];let x;n[13]!==m||n[14]!==f?(x=s.jsx("span",{role:"button",onClick:m,className:f,children:"EN"}),n[13]=m,n[14]=f,n[15]=x):x=n[15];let g;n[16]!==i?(g=S=>i(S,"de"),n[16]=i,n[17]=g):g=n[17];const y=t==="de";let h;n[18]!==y?(h=l.classNames("w-100 text-center",{"fw-bold":y}),n[18]=y,n[19]=h):h=n[19];let b;n[20]!==h||n[21]!==g?(b=s.jsx("span",{role:"button",onClick:g,className:h,children:"DE"}),n[20]=h,n[21]=g,n[22]=b):b=n[22];let j;return n[23]!==b||n[24]!==u||n[25]!==x?(j=s.jsx(l.DropdownItem,{children:s.jsxs("div",{className:"w-100 d-flex align-items-center",children:[u,x,b]})}),n[23]=b,n[24]=u,n[25]=x,n[26]=j):j=n[26],j},pd=n=>{const e=l.compilerRuntimeExports.c(6);let t,o;e[0]!==n?({controlId:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;return e[3]!==t||e[4]!==o?(a=s.jsx(l.Form.Group,{controlId:t,...o}),e[3]=t,e[4]=o,e[5]=a):a=e[5],a},hd=n=>{const e=l.compilerRuntimeExports.c(11),{employeeId:t,alt:o,noPhotoImage:a,cafmApiUrl:i,showLargeInLightBox:r}=n,c=r===void 0?!1:r,{user:d}=w.useContext(l.UserContext),{photoPath:u,photoPathSm:m}=pt.useEmployeePhotoPath(t);let p;e[0]!==o||e[1]!==i||e[2]!==t||e[3]!==a||e[4]!==u||e[5]!==m||e[6]!==c||e[7]!==d?(p=t&&s.jsx(s.Fragment,{children:c?s.jsx(Oo,{baseUrl:i,customToken:d.cafmToken??void 0,photos:[{id:t.toString(),alt:o??"",isDefault:!0,smSrc:m,lgSrc:u}],placeholder:a,ImgComponent:Fn}):s.jsx(Fn,{baseUrl:i,customToken:d.cafmToken??void 0,src:m,alt:o,placeholder:a,className:"rounded w-100"})}),e[0]=o,e[1]=i,e[2]=t,e[3]=a,e[4]=u,e[5]=m,e[6]=c,e[7]=d,e[8]=p):p=e[8];let f;return e[9]!==p?(f=s.jsx(s.Fragment,{children:p}),e[9]=p,e[10]=f):f=e[10],f},gd=n=>{const e=l.compilerRuntimeExports.c(21),{text:t,setText:o,onSearchButtonClick:a,className:i}=n;let r;e[0]!==o?(r=h=>{o(h)},e[0]=o,e[1]=r):r=e[1];const c=r,d=`${i}`;let u;e[2]!==o?(u=h=>o(h.target.value),e[2]=o,e[3]=u):u=e[3];let m;e[4]!==u||e[5]!==t?(m=s.jsx(l.Form.Control,{value:t,onChange:u}),e[4]=u,e[5]=t,e[6]=m):m=e[6];let p;e[7]!==c||e[8]!==t?(p=t&&s.jsx(l.Button,{onClick:()=>c(""),variant:"link",className:"border text-muted",children:s.jsx(l.MdClear,{})}),e[7]=c,e[8]=t,e[9]=p):p=e[9];let f;e[10]!==a||e[11]!==t?(f=()=>a&&a(t),e[10]=a,e[11]=t,e[12]=f):f=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(l.MdSearch,{}),e[13]=x):x=e[13];let g;e[14]!==f?(g=s.jsx(l.Button,{onClick:f,variant:"link",className:"border",children:x}),e[14]=f,e[15]=g):g=e[15];let y;return e[16]!==d||e[17]!==m||e[18]!==p||e[19]!==g?(y=s.jsxs(nn,{className:d,children:[m,p,g]}),e[16]=d,e[17]=m,e[18]=p,e[19]=g,e[20]=y):y=e[20],y},xd=n=>{const e=l.compilerRuntimeExports.c(7),{value:t,numberPrefix:o,numberSuffix:a,decimalScale:i,fixedDecimalScale:r,className:c}=n,d=i===void 0?2:i,u=r===void 0?!1:r;let m;return e[0]!==c||e[1]!==d||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==t?(m=s.jsx(Un,{value:t,displayType:"text",thousandSeparator:" ",decimalScale:d,fixedDecimalScale:u,defaultValue:"",prefix:o,suffix:a,className:c,decimalSeparator:","}),e[0]=c,e[1]=d,e[2]=u,e[3]=o,e[4]=a,e[5]=t,e[6]=m):m=e[6],m},yd=n=>{const e=l.compilerRuntimeExports.c(12),{data:t,keys:o,colors:a,tooltipLabel:i}=n;let r;e[0]!==t?(r=t.map(vd),e[0]=t,e[1]=r):r=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={top:20,right:50,bottom:30,left:150},e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={from:"color",modifiers:[["darker",.5]]},e[3]=d):d=e[3];let u,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={tickSize:5,tickPadding:5,tickRotation:0},m={tickSize:5,tickPadding:5,tickRotation:0},e[4]=u,e[5]=m):(u=e[4],m=e[5]);let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={from:"color",modifiers:[["darker",1.6]]},e[6]=p):p=e[6];let f;return e[7]!==a||e[8]!==o||e[9]!==r||e[10]!==i?(f=s.jsx(l.Xe,{data:r,indexBy:"name",keys:o,margin:c,layout:"horizontal",colors:a,padding:.2,borderRadius:2,borderWidth:2,borderColor:d,axisTop:null,axisRight:null,axisBottom:u,axisLeft:m,labelSkipWidth:12,labelSkipHeight:12,labelTextColor:p,tooltipLabel:i}),e[7]=a,e[8]=o,e[9]=r,e[10]=i,e[11]=f):f=e[11],f};function vd(n){return{name:n.name,...n.values}}const bd="_hrText_xxish_1",jd={hrText:bd},il=n=>{const e=l.compilerRuntimeExports.c(3),{text:t}=n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.classNames(jd.hrText),e[0]=o):o=e[0];let a;return e[1]!==t?(a=s.jsx("hr",{className:o,"data-content":t}),e[1]=t,e[2]=a):a=e[2],a},Sd=n=>{const e=l.compilerRuntimeExports.c(9),{reportsLastUsedGet:t,getReportRoute:o,getReportName:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{reports:r}=i,{data:c}=Fe.useGetApiData(t);let d;e[0]!==a||e[1]!==o||e[2]!==c?(d=c&&c.map(p=>p.versions.map(f=>s.jsxs(l.ListGroupItem,{as:we.Link,to:o(p,f.id),className:"p-1 px-2",action:!0,children:[s.jsx(l.Typography,{variant:"body2",className:"text-uppercase",children:a(p)}),s.jsxs(l.Typography,{variant:"caption",className:"d-flex justify-content-between align-items-center gap-3 text-dark",children:[f.name,s.jsx(l.Typography,{variant:"caption",className:"text-end opacity-50",children:l.formatDate(f.lastUsedDate)})]})]}))),e[0]=a,e[1]=o,e[2]=c,e[3]=d):d=e[3];let u;e[4]!==d?(u=s.jsx(l.ListGroup,{children:d}),e[4]=d,e[5]=u):u=e[5];let m;return e[6]!==r.index.lastUsedReports||e[7]!==u?(m=s.jsx(s.Fragment,{children:s.jsx(Ot,{defaultOpen:!0,title:r.index.lastUsedReports,children:u})}),e[6]=r.index.lastUsedReports,e[7]=u,e[8]=m):m=e[8],m},Cd="_cards-group_163sq_1",Nd="_group-title_163sq_1",wd="_group-content_163sq_8",Id="_report-card_163sq_12",kd="_card-title-link_163sq_22",Td="_disabled_163sq_28",kt={cardsGroup:Cd,groupTitle:Nd,groupContent:wd,reportCard:Id,cardTitleLink:kd,disabled:Td},Os=n=>{const e=l.compilerRuntimeExports.c(9),{reportVersion:t,getReportRoute:o,report:a}=n;let i;e[0]!==o||e[1]!==a||e[2]!==t.id?(i=o(a,t.id),e[0]=o,e[1]=a,e[2]=t.id,e[3]=i):i=e[3];let r;e[4]!==t.name?(r=s.jsx(l.Typography,{variant:"body2",className:"d-flex justify-content-between align-items-center gap-3",children:s.jsx("div",{className:"link",children:t.name})}),e[4]=t.name,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==r?(c=s.jsx(l.ListGroupItem,{as:we.Link,to:i,className:"p-1 px-2",action:!0,children:r}),e[6]=i,e[7]=r,e[8]=c):c=e[8],c},Qt=5,zs=n=>{const e=l.compilerRuntimeExports.c(25),{versionsList:t,getReportRoute:o,report:a}=n,{ProjectIconComponent:i}=w.useContext(l.LuminusComponentsContext),[r,c]=w.useState(!0);let d;e:{if(t.length<=Qt){d=t;break e}let h;e[0]!==t?(h=t.slice(0,Qt-1),e[0]=t,e[1]=h):h=e[1],d=h}const u=d;let m;e:{if(t.length<=Qt){let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[2]=b):b=e[2],m=b;break e}let h;e[3]!==t?(h=t.slice(Qt-1),e[3]=t,e[4]=h):h=e[4],m=h}const p=m;let f;if(e[5]!==u||e[6]!==o||e[7]!==a){let h;e[9]!==o||e[10]!==a?(h=b=>s.jsx(Os,{reportVersion:b,getReportRoute:o,report:a}),e[9]=o,e[10]=a,e[11]=h):h=e[11],f=u.map(h),e[5]=u,e[6]=o,e[7]=a,e[8]=f}else f=e[8];let x;e[12]!==r||e[13]!==o||e[14]!==p||e[15]!==a?(x=r?null:p.map(h=>s.jsx(Os,{reportVersion:h,getReportRoute:o,report:a})),e[12]=r,e[13]=o,e[14]=p,e[15]=a,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==r||e[19]!==p.length?(g=p.length>0&&s.jsx(l.ListGroupItem,{onClick:()=>c(_d),className:"py-0 d-flex justify-content-center",children:r?s.jsx(i,{icon:"chevron-down"}):s.jsx(i,{icon:"chevron-up"})}),e[17]=i,e[18]=r,e[19]=p.length,e[20]=g):g=e[20];let y;return e[21]!==f||e[22]!==x||e[23]!==g?(y=s.jsx(s.Fragment,{children:s.jsxs(l.ListGroup,{children:[f,x,g]})}),e[21]=f,e[22]=x,e[23]=g,e[24]=y):y=e[24],y};function _d(n){return!n}const Dd=n=>{const e=l.compilerRuntimeExports.c(35),{report:t,getReportRoute:o,getReportName:a,getReportDescription:i}=n;let r;e:{if(t.versionsCustom.length===0){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={xs:12},e[0]=v):v=e[0],r=v;break e}let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N={xs:12,sm:6,md:12,lg:12,xl:12,xxl:6},e[1]=N):N=e[1],r=N}const c=r;let d;e[2]!==o||e[3]!==t?(d=o(t),e[2]=o,e[3]=t,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=l.classNames(kt.cardTitleLink,"w-100 text-uppercase fw-normal"),e[5]=u):u=e[5];let m;e[6]!==a||e[7]!==t?(m=a(t),e[6]=a,e[7]=t,e[8]=m):m=e[8];let p;e[9]!==d||e[10]!==m?(p=s.jsx(we.Link,{to:d,className:u,children:m}),e[9]=d,e[10]=m,e[11]=p):p=e[11];const f=!t.userHasPermission;let x;e[12]!==f?(x=l.classNames(kt.reportCard,"shadow h-100 d-flex flex-column",{[kt.disabled]:f}),e[12]=f,e[13]=x):x=e[13];let g;e[14]!==i||e[15]!==t?(g=i(t),e[14]=i,e[15]=t,e[16]=g):g=e[16];let y;e[17]!==g?(y=s.jsx(l.Typography,{variant:"body2",className:"px-2",children:g}),e[17]=g,e[18]=y):y=e[18];let h;e[19]!==o||e[20]!==t||e[21]!==c?(h=t.versions&&t.versions.length>0?s.jsx(l.Col,{...c,children:s.jsx(zs,{versionsList:t.versions,getReportRoute:o,report:t})}):null,e[19]=o,e[20]=t,e[21]=c,e[22]=h):h=e[22];let b;e[23]!==o||e[24]!==t||e[25]!==c?(b=t.versionsCustom&&t.versionsCustom.length>0?s.jsx(l.Col,{...c,children:s.jsx(zs,{versionsList:t.versionsCustom,getReportRoute:o,report:t})}):null,e[23]=o,e[24]=t,e[25]=c,e[26]=b):b=e[26];let j;e[27]!==h||e[28]!==b?(j=s.jsxs(On,{className:"h-100 g-2",children:[h,b]}),e[27]=h,e[28]=b,e[29]=j):j=e[29];let S;return e[30]!==j||e[31]!==p||e[32]!==x||e[33]!==y?(S=s.jsx("div",{className:"col-12 col-lg-4",children:s.jsxs(gt,{title:p,headerClassName:"bg-darker",className:x,contentClassName:"d-flex flex-column gap-2 h-100",children:[y,j]})}),e[30]=j,e[31]=p,e[32]=x,e[33]=y,e[34]=S):S=e[34],S},Ed=n=>{const e=l.compilerRuntimeExports.c(26),{searchQuery:t,setSearchQuery:o,reportsTexts:a,filteredGroups:i,filteredReports:r,getGroupTitle:c,getReportRoute:d,getReportName:u,getReportDescription:m}=n,{isMobile:p}=l.useWindowSize();let f;e[0]!==o?(f=b=>{var j;return o(((j=b.target)==null?void 0:j.value)??"")},e[0]=o,e[1]=f):f=e[1];let x;e[2]!==a.index.search||e[3]!==t||e[4]!==f?(x=s.jsx("div",{children:s.jsx(l.Form.Control,{className:"mb-3",type:"search",value:t,onChange:f,placeholder:a.index.search})}),e[2]=a.index.search,e[3]=t,e[4]=f,e[5]=x):x=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==c||e[9]!==m||e[10]!==u||e[11]!==d||e[12]!==p){let b;e[14]!==r||e[15]!==c||e[16]!==m||e[17]!==u||e[18]!==d||e[19]!==p?(b=j=>s.jsxs("div",{className:l.classNames(kt.cardsGroup,{[kt.mobile]:p}),children:[s.jsx("div",{className:l.classNames("group-title z-1",kt.groupTitle),children:s.jsx(il,{text:c(j)})}),s.jsx("div",{className:l.classNames(kt.groupContent),children:s.jsx("div",{className:l.classNames("row gx-3 gy-3"),children:r[j].map(S=>s.jsx(Dd,{report:S,getReportRoute:d,getReportName:u,getReportDescription:m},S.id))})})]},j),e[14]=r,e[15]=c,e[16]=m,e[17]=u,e[18]=d,e[19]=p,e[20]=b):b=e[20],g=i.map(b),e[6]=i,e[7]=r,e[8]=c,e[9]=m,e[10]=u,e[11]=d,e[12]=p,e[13]=g}else g=e[13];let y;e[21]!==g?(y=s.jsx("div",{className:"overflow-x-hidden luminus-thin-scrollbar luminus-reports-index",children:g}),e[21]=g,e[22]=y):y=e[22];let h;return e[23]!==x||e[24]!==y?(h=s.jsxs(s.Fragment,{children:[x,y]}),e[23]=x,e[24]=y,e[25]=h):h=e[25],h},Ld=(n,e,t,o,a)=>{const i=l.compilerRuntimeExports.c(18),{data:r}=Fe.useGetApiData(n),{data:c}=Fe.useGetApiData(e);let d;e:{if(r===null||c===null){let g;i[0]===Symbol.for("react.memo_cache_sentinel")?(g={},i[0]=g):g=i[0],d=g;break e}let x;i[1]!==a||i[2]!==o||i[3]!==t||i[4]!==c||i[5]!==r?(x={},c.forEach(g=>{x[g.id]=r.filter(y=>y.groupId===g.id&&(l.stringSearchWithin(t(y),a)||l.stringSearchWithin(o(y),a)||y.versions.some(h=>l.stringSearchWithin(h.name,a))||y.versionsCustom.some(h=>l.stringSearchWithin(h.name,a)))).map(y=>({...y,groupId:!y.groupId||y.groupId===0||!c.some(h=>h.id===y.groupId)?999:y.groupId}))}),i[1]=a,i[2]=o,i[3]=t,i[4]=c,i[5]=r,i[6]=x):x=i[6],d=x}const u=d;let m;e:{if(u===null||c===null){let g;i[7]===Symbol.for("react.memo_cache_sentinel")?(g=[],i[7]=g):g=i[7],m=g;break e}let x;if(i[8]!==u||i[9]!==c){let g;i[11]!==u?(g=y=>{var h;return((h=u[y.id])==null?void 0:h.length)>0},i[11]=u,i[12]=g):g=i[12],x=c.filter(g).map(Rd),i[8]=u,i[9]=c,i[10]=x}else x=i[10];m=x}const p=m;let f;return i[13]!==p||i[14]!==u||i[15]!==c||i[16]!==r?(f={reports:r,groupsData:c,filteredReports:u,filteredGroups:p},i[13]=p,i[14]=u,i[15]=c,i[16]=r,i[17]=f):f=i[17],f};function Rd(n){return n.id}const Zt={reportsGet:"/reports",reportsLastUsedGet:"/reports/last-used",groupsGet:"/reports/groups"},Fd=n=>{const e=l.compilerRuntimeExports.c(16),{apiUrls:t,getReportName:o,getReportDescription:a,getGroupTitle:i,getReportRoute:r}=n,{reportsGet:c,reportsLastUsedGet:d,groupsGet:u}=t===void 0?Zt:t,m=c===void 0?Zt.reportsGet:c,p=d===void 0?Zt.reportsLastUsedGet:d,f=u===void 0?Zt.groupsGet:u,{texts:x}=w.useContext(l.LuminusComponentsContext),{reports:g}=x,[y,h]=w.useState(""),[b]=l.a(y,500),{filteredReports:j,filteredGroups:S}=Ld(m,f,o,a,b);let N;e[0]!==o||e[1]!==r||e[2]!==p?(N=s.jsx(Sd,{reportsLastUsedGet:p,getReportName:o,getReportRoute:r}),e[0]=o,e[1]=r,e[2]=p,e[3]=N):N=e[3];let v;e[4]!==S||e[5]!==j||e[6]!==i||e[7]!==a||e[8]!==o||e[9]!==r||e[10]!==g||e[11]!==y?(v=s.jsx(Ed,{searchQuery:y,setSearchQuery:h,reportsTexts:g,filteredGroups:S,filteredReports:j,getGroupTitle:i,getReportRoute:r,getReportName:o,getReportDescription:a}),e[4]=S,e[5]=j,e[6]=i,e[7]=a,e[8]=o,e[9]=r,e[10]=g,e[11]=y,e[12]=v):v=e[12];let C;return e[13]!==N||e[14]!==v?(C=s.jsx(l.PageContainer,{unavailableOnMobile:!0,variant:"fullScreen",sideContent:N,children:v}),e[13]=N,e[14]=v,e[15]=C):C=e[15],C},$d="_mini-detail-popover_obryf_1",Pd="_sm_obryf_5",Md="_lg_obryf_9",Hs={"mini-detail-popover":"_mini-detail-popover_obryf_1",miniDetailPopover:$d,sm:Pd,lg:Md},Ad=({children:n,useMiniDetail:e,miniDetailProps:t,placement:o="bottom",trigger:a=["hover"],delayMs:i=500})=>{const{user:r}=w.useContext(l.UserContext),[c,d]=w.useState(!1),{isLoading:u,detail:m,heading:p,tooltipWidth:f}=e({...t,enabled:c&&!(r!=null&&r.external)}),x=w.useRef(null);return s.jsx("div",{onMouseEnter:()=>{x.current=window.setTimeout(()=>d(!0),i)},onMouseLeave:()=>{x.current&&clearTimeout(x.current),d(!1)},children:c&&!(r!=null&&r.external)?s.jsx(l.HtmlTooltip,{heading:u?s.jsx(l.Typography,{variant:"body2",className:"placeholder-glow",children:s.jsx("span",{className:"placeholder bg-primary col-6"})}):p,content:s.jsx(s.Fragment,{children:u?s.jsxs(l.Typography,{variant:"body2",className:"placeholder-glow",children:[s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-5"}),s.jsx("span",{className:"placeholder col-4"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-3"}),s.jsx("span",{className:"placeholder col-2"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-4"}),s.jsx("span",{className:"placeholder col-6"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-4"}),s.jsx("span",{className:"placeholder col-3"})]}),s.jsxs("div",{className:"d-flex justify-content-between py-1",children:[s.jsx("span",{className:"placeholder col-5"}),s.jsx("span",{className:"placeholder col-4"})]})]}):m}),placement:o,trigger:a,popoverClassName:l.classNames(Hs.miniDetailPopover,Hs[f]),children:s.jsx("div",{children:n})}):s.jsx(s.Fragment,{children:n})})},Bd=n=>{const e=l.compilerRuntimeExports.c(7),{label:t,value:o}=n;let a;e[0]!==t?(a=s.jsx(l.Typography,{variant:"caption",children:t}),e[0]=t,e[1]=a):a=e[1];const i=o??"-";let r;e[2]!==i?(r=s.jsx(l.Typography,{variant:"body2",className:"text-end",children:i}),e[2]=i,e[3]=r):r=e[3];let c;return e[4]!==a||e[5]!==r?(c=s.jsxs("div",{className:"py-1 border-bottom d-flex gap-3 align-items-center justify-content-between",children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6],c},Od=n=>{const e=l.compilerRuntimeExports.c(21),{route:t,variant:o,children:a,className:i,disabled:r,routeParams:c}=n,d=o===void 0?"link":o,u=r===void 0?!1:r,{checkUserHasPermissions:m}=l.usePermissions(),p=u||!(t.permissions===void 0||m(t.permissions)),f=a??t.name;let x;e:switch(d){case"primaryButton":{x=l.PrimaryButton;break e}case"contextButton":{x=l.ContextButton;break e}case"iconButton":{x=l.IconButton;break e}default:x=w.Fragment}const g=x;if(d==="link"){let S;e[0]!==t.route||e[1]!==c?(S=ot.generateApiPath(t.route,c),e[0]=t.route,e[1]=c,e[2]=S):S=e[2];const N=p?"disabled":void 0;let v;e[3]!==i||e[4]!==N?(v=l.classNames("link font-size-14",N,i),e[3]=i,e[4]=N,e[5]=v):v=e[5];let C;return e[6]!==f||e[7]!==S||e[8]!==v?(C=s.jsx(we.Link,{to:S,className:v,children:f}),e[6]=f,e[7]=S,e[8]=v,e[9]=C):C=e[9],C}let y;e[10]!==t.route||e[11]!==c?(y=ot.generateApiPath(t.route,c),e[10]=t.route,e[11]=c,e[12]=y):y=e[12];const h=p?"disabled":void 0;let b;e[13]!==i||e[14]!==h?(b=l.classNames(h,i),e[13]=i,e[14]=h,e[15]=b):b=e[15];let j;return e[16]!==g||e[17]!==f||e[18]!==y||e[19]!==b?(j=s.jsx(g,{as:"link",href:y,className:b,children:f}),e[16]=g,e[17]=f,e[18]=y,e[19]=b,e[20]=j):j=e[20],j},zd=n=>{var x;const e=l.compilerRuntimeExports.c(17),{id:t,getTimelineApiPath:o}=n,{texts:a,ProjectIconComponent:i}=w.useContext(l.LuminusComponentsContext),{approval:r}=a;let c;e[0]!==o||e[1]!==t?(c=o(t),e[0]=o,e[1]=t,e[2]=c):c=e[2];const{data:d}=Fe.useGetApiData(c);let u;e[3]!==i||e[4]!==r?(u=(g,y)=>{const h=y===void 0?!1:y;switch(g){case l.ApprovalState.Zamitnuto:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateRejected,children:s.jsx("div",{children:s.jsx(i,{icon:"cancel-simple",className:h?"text-danger":"bg-danger rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Nevyrizeno:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateUnrealized,children:s.jsx("div",{children:s.jsx(i,{icon:"pending",className:h?"text-secondary":"bg-secondary rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Odebrano:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateRemoved,children:s.jsx("div",{children:s.jsx(i,{icon:"cancel-simple",className:h?"text-warning":"bg-warning rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});case l.ApprovalState.Schvaleno:return s.jsx(l.SimpleTooltip,{placement:"left",text:r.stateApproved,children:s.jsx("div",{children:s.jsx(i,{icon:"check-simple",className:h?"text-success":"bg-success rounded-circle p-1",iconProps:{fontSize:"14px",color:h?void 0:"white"}})})});default:return null}},e[3]=i,e[4]=r,e[5]=u):u=e[5];const m=u;let p;e[6]!==r||e[7]!==d?(p=d!=null&&d.startDate?{date:l.parseISO(d.startDate),title:s.jsx(l.Typography,{variant:"body2",children:r.startDate}),dateFormat:"date"}:null,e[6]=r,e[7]=d,e[8]=p):p=e[8];let f;if(e[9]!==r||e[10]!==m||e[11]!==p||e[12]!==d){let g;e[14]!==r||e[15]!==d?(g=d!=null&&d.finishedDate?{date:l.parseISO(d.finishedDate),title:s.jsx(l.Typography,{variant:"body2",children:r.finishedDate}),dateFormat:"date"}:null,e[14]=r,e[15]=d,e[16]=g):g=e[16],f=s.jsx("div",{children:s.jsx(Uo,{dontSort:!0,steps:[p,...((x=d==null?void 0:d.approvalLevels)==null?void 0:x.map(y=>{var h;return{date:void 0,title:s.jsxs("div",{className:"d-flex align-items-center justify-content-between w-100",children:[s.jsx(l.Typography,{variant:"body",className:"fw-bold",children:r.getLevelText(y.index)}),s.jsx(l.Typography,{variant:"caption",className:"text-end",children:r.getThresholdText(y.threshold)})]}),icon:m(y.state),text:y.approvers&&((h=y.approvers)==null?void 0:h.length)>0?s.jsx("div",{className:"list-group",children:y.approvers.map(b=>s.jsx("div",{className:"list-group-item p-1",children:s.jsxs("div",{className:"d-flex justify-content-between align-items-center gap-2",children:[b.automaticApproval?s.jsx(l.SimpleTooltip,{placement:"left",text:r.autoApproved,children:s.jsx("div",{children:s.jsx("div",{className:"text-success",style:{fontSize:"14px"},children:"A"})})}):m(b.state,!0),s.jsxs("div",{className:"text-end",children:[s.jsx(l.Typography,{variant:"body2",children:b.delegatedApprover?b.delegatedApprover.name:b.approver.name}),b.responseDate?s.jsx(l.Typography,{variant:"caption",children:l.formatDate(b.responseDate)}):null]})]})},b.id))}):null}}))??[],g].filter(Hd).map(Vd)})}),e[9]=r,e[10]=m,e[11]=p,e[12]=d,e[13]=f}else f=e[13];return f};function Hd(n){return n!==null}function Vd(n){return n}const Ud="_state-switch_uc6su_1",Wd="_switch-button_uc6su_7",Gd="_bg-layer_uc6su_17",Kd="_text-layer_uc6su_26",qd="_left_uc6su_38",Yd="_right_uc6su_41",Qd="_active_uc6su_44",mt={stateSwitch:Ud,switchButton:Wd,bgLayer:Gd,textLayer:Kd,left:qd,right:Yd,active:Qd},Zd=n=>{const e=l.compilerRuntimeExports.c(21),{isLeftStateActive:t,toggleState:o,leftStateLabel:a,rightStateLabel:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=l.classNames("gap-1",mt.stateSwitch),e[0]=r):r=e[0];let c;e[1]!==t?(c=l.classNames(mt.switchButton,mt.left,{[mt.active]:t}),e[1]=t,e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:mt.bgLayer}),e[3]=d):d=e[3];let u;e[4]!==a?(u=s.jsx("div",{className:mt.textLayer,children:a}),e[4]=a,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==u?(m=s.jsxs(l.Typography,{variant:"body2",className:c,children:[d,u]}),e[6]=c,e[7]=u,e[8]=m):m=e[8];const p=!t;let f;e[9]!==p?(f=l.classNames(mt.switchButton,mt.right,{[mt.active]:p}),e[9]=p,e[10]=f):f=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:mt.bgLayer}),e[11]=x):x=e[11];let g;e[12]!==i?(g=s.jsx("div",{className:mt.textLayer,children:i}),e[12]=i,e[13]=g):g=e[13];let y;e[14]!==f||e[15]!==g?(y=s.jsxs(l.Typography,{variant:"body2",className:f,children:[x,g]}),e[14]=f,e[15]=g,e[16]=y):y=e[16];let h;return e[17]!==y||e[18]!==m||e[19]!==o?(h=s.jsxs("div",{role:"button",className:r,onClick:o,children:[m,y]}),e[17]=y,e[18]=m,e[19]=o,e[20]=h):h=e[20],h},Xd=n=>{const e=l.compilerRuntimeExports.c(30),{showArchived:t,BnfTableComponent:o,tableIdentifier:a,detailRoute:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{substitutions:c}=r,{data:d}=Fe.useGetApiData(`/permissions/substitutions?archived=${t}`);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={enable:!0,column:"archived"},e[0]=u):u=e[0];const m=u;let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=l.u(),e[1]=p):p=e[1];const f=p;let x;e[2]!==c.index.employeeName?(x=f.accessor("employeeName",{header:c.index.employeeName,type:"string",mobileMeta:{isIdentifier:!0}}),e[2]=c.index.employeeName,e[3]=x):x=e[3];let g;e[4]!==c.index.substitute?(g=f.accessor("substituteName",{header:c.index.substitute,type:"string",mobileMeta:{isIdentifier:!0}}),e[4]=c.index.substitute,e[5]=g):g=e[5];let y;e[6]!==c.index.from||e[7]!==c.index.generalInfo?(y=f.accessor("from",{header:c.index.from,type:"date",mobileMeta:{displayGroup:c.index.generalInfo}}),e[6]=c.index.from,e[7]=c.index.generalInfo,e[8]=y):y=e[8];let h;e[9]!==c.index.generalInfo||e[10]!==c.index.to?(h=f.accessor("to",{header:c.index.to,type:"date",mobileMeta:{displayGroup:c.index.generalInfo}}),e[9]=c.index.generalInfo,e[10]=c.index.to,e[11]=h):h=e[11];let b,j;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=f.accessor("archived",{header:"Archived",type:"boolean",meta:{hidden:!0}}),j=f.accessor("id",{header:"",type:"number",meta:{hidden:!0},size:50}),e[12]=b,e[13]=j):(b=e[12],j=e[13]);let S;e[14]!==x||e[15]!==g||e[16]!==y||e[17]!==h?(S=[x,g,y,h,b,j],e[14]=x,e[15]=g,e[16]=y,e[17]=h,e[18]=S):S=e[18];const N=S;let v;e[19]!==i?(v=L=>we.generatePath(i,{id:L.id.toString()}),e[19]=i,e[20]=v):v=e[20];const C=v;let k;e[21]!==d?(k=d??[],e[21]=d,e[22]=k):k=e[22];let I;e[23]===Symbol.for("react.memo_cache_sentinel")?(I={mode:"enabled"},e[23]=I):I=e[23];let T;return e[24]!==o||e[25]!==N||e[26]!==C||e[27]!==k||e[28]!==a?(T=s.jsx(o,{data:k,columns:N,tableId:a,pagination:I,archiveHighlighting:m,rowNavigation:C}),e[24]=o,e[25]=N,e[26]=C,e[27]=k,e[28]=a,e[29]=T):T=e[29],T},Jd=n=>{const e=l.compilerRuntimeExports.c(41),{InputContainer:t,formField:o,label:a,resetsFields:i,type:r,required:c,hidden:d,disabled:u,withoutLabel:m,hint:p,onChange:f,className:x}=n,g=t===void 0?l.RowLabelInput:t,{control:y,setValue:h}=Se.useFormContext(),{isSubmitted:b}=Se.useFormState();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={falseIfNotInit:!0},e[0]=j):j=e[0];const S=l.useFormDisabledContext(j),[N,v]=w.useState(!1);let C;e[1]!==y||e[2]!==o?(C={name:o,control:y},e[1]=y,e[2]=o,e[3]=C):C=e[3];const{field:k,fieldState:I}=Se.useController(C),{error:T}=I,{onChange:L,onBlur:E,ref:D,value:_,name:P}=k,$=u||S;let R,F;e[4]!==b?(R=()=>{b&&v(!0)},F=[b],e[4]=b,e[5]=R,e[6]=F):(R=e[5],F=e[6]),w.useEffect(R,F);const M=T!==void 0;let O;e[7]!==L||e[8]!==f||e[9]!==i||e[10]!==h||e[11]!==N?(O=le=>{const q=le.target.checked??!1;L(q),i&&i.forEach(oe=>h(oe,null,{shouldDirty:!0,shouldValidate:N})),f&&f(q)},e[7]=L,e[8]=f,e[9]=i,e[10]=h,e[11]=N,e[12]=O):O=e[12];const B=O;let H;e[13]!==E?(H=()=>{E()},e[13]=E,e[14]=H):H=e[14];const z=H,W=a??"",A=`check-${o}`,U=r??"checkbox",K=`${a}${c?" *":""}`,V=_??!1;let G;e[15]!==$||e[16]!==P||e[17]!==D||e[18]!==z||e[19]!==B||e[20]!==d||e[21]!==M||e[22]!==A||e[23]!==U||e[24]!==K||e[25]!==V?(G=s.jsx(l.Form.Check,{id:A,type:U,label:K,name:P,checked:V,onChange:B,onBlur:z,ref:D,isInvalid:M,hidden:d,disabled:$,className:"w-100"}),e[15]=$,e[16]=P,e[17]=D,e[18]=z,e[19]=B,e[20]=d,e[21]=M,e[22]=A,e[23]=U,e[24]=K,e[25]=V,e[26]=G):G=e[26];let Z;e[27]!==T?(Z=T&&s.jsx(l.InvalidFeedback,{message:T.message}),e[27]=T,e[28]=Z):Z=e[28];let X;return e[29]!==g||e[30]!==$||e[31]!==x||e[32]!==d||e[33]!==p||e[34]!==M||e[35]!==c||e[36]!==G||e[37]!==Z||e[38]!==W||e[39]!==m?(X=s.jsxs(g,{isForCheckInput:!0,hidden:d,label:W,required:c,disabled:$,isInvalid:M,withoutLabel:m,hint:p,className:x,children:[G,Z]}),e[29]=g,e[30]=$,e[31]=x,e[32]=d,e[33]=p,e[34]=M,e[35]=c,e[36]=G,e[37]=Z,e[38]=W,e[39]=m,e[40]=X):X=e[40],X},eu=n=>{const e=l.compilerRuntimeExports.c(45),{InputContainer:t,label:o,formField:a,options:i,resetsFields:r,required:c,disabled:d,hidden:u,onChange:m,className:p}=n,f=t===void 0?l.RowLabelInput:t,{control:x,setValue:g}=Se.useFormContext(),{isSubmitted:y}=Se.useFormState();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={falseIfNotInit:!0},e[0]=h):h=e[0];const b=l.useFormDisabledContext(h);let j;e[1]!==x||e[2]!==a?(j={name:a,control:x},e[1]=x,e[2]=a,e[3]=j):j=e[3];const{field:S,fieldState:N}=Se.useController(j),{value:v,onChange:C,onBlur:k,ref:I,name:T}=S,{error:L}=N,[E,D]=w.useState(!1),_=i,P=d||b;let $,R;e[4]!==y?($=()=>{y&&D(!0)},R=[y],e[4]=y,e[5]=$,e[6]=R):($=e[5],R=e[6]),w.useEffect($,R);const F=L!==void 0;let M;e[7]!==C||e[8]!==m||e[9]!==r||e[10]!==g||e[11]!==E?(M=U=>{C(U),r&&r.forEach(K=>g(K,null,{shouldDirty:!0,shouldValidate:E})),m&&m(U===null?null:U.toString())},e[7]=C,e[8]=m,e[9]=r,e[10]=g,e[11]=E,e[12]=M):M=e[12];const O=M,B=!o,H=o??"";let z;if(e[13]!==P||e[14]!==T||e[15]!==k||e[16]!==I||e[17]!==v||e[18]!==O||e[19]!==u||e[20]!==F||e[21]!==_){let U;e[23]!==P||e[24]!==T||e[25]!==k||e[26]!==I||e[27]!==v||e[28]!==O||e[29]!==u||e[30]!==F?(U=(K,V)=>s.jsx(l.Form.Check,{id:`radio-${K.id}`,label:K.name,type:"radio",value:K.id??"",name:T,checked:v===K.id,onChange:()=>O(K.id??null),onBlur:k,ref:V===0?I:void 0,isInvalid:F,hidden:u,disabled:P,className:"w-100"},K.id),e[23]=P,e[24]=T,e[25]=k,e[26]=I,e[27]=v,e[28]=O,e[29]=u,e[30]=F,e[31]=U):U=e[31],z=_.map(U),e[13]=P,e[14]=T,e[15]=k,e[16]=I,e[17]=v,e[18]=O,e[19]=u,e[20]=F,e[21]=_,e[22]=z}else z=e[22];let W;e[32]!==L?(W=L&&s.jsx(l.InvalidFeedback,{message:L.message}),e[32]=L,e[33]=W):W=e[33];let A;return e[34]!==f||e[35]!==P||e[36]!==p||e[37]!==u||e[38]!==F||e[39]!==c||e[40]!==H||e[41]!==z||e[42]!==W||e[43]!==B?(A=s.jsxs(f,{isForRadioInput:!0,hidden:u,withoutLabel:B,label:H,required:c,disabled:P,isInvalid:F,className:p,children:[z,W]}),e[34]=f,e[35]=P,e[36]=p,e[37]=u,e[38]=F,e[39]=c,e[40]=H,e[41]=z,e[42]=W,e[43]=B,e[44]=A):A=e[44],A},tu=n=>{const e=l.compilerRuntimeExports.c(25);let t,o,a,i,r,c,d,u,m;e[0]!==n?({label:c,InputContainer:u,className:t,withoutLabel:m,hidden:r,disabled:a,contactType:o,formField:i,...d}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=i,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m):(t=e[1],o=e[2],a=e[3],i=e[4],r=e[5],c=e[6],d=e[7],u=e[8],m=e[9]);const p=u===void 0?l.RowLabelInput:u;let f;e[10]!==i?(f={name:i},e[10]=i,e[11]=f):f=e[11];const x=Se.useWatch(f);let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g={falseIfNotInit:!0},e[12]=g):g=e[12];const y=l.useFormDisabledContext(g),h=a||y;if(r)return null;let b;e[13]!==p||e[14]!==h||e[15]!==i||e[16]!==d?(b=s.jsx(l.HookFormTextInput,{type:"text",formField:i,InputContainer:p,size:"sm",withoutLabel:!0,className:"flex-grow-1",disabled:h,...d}),e[13]=p,e[14]=h,e[15]=i,e[16]=d,e[17]=b):b=e[17];let j;return e[18]!==t||e[19]!==o||e[20]!==c||e[21]!==b||e[22]!==x||e[23]!==m?(j=s.jsx(Ko,{contactType:o,value:x,withoutLabel:m,label:c,className:t,children:b}),e[18]=t,e[19]=o,e[20]=c,e[21]=b,e[22]=x,e[23]=m,e[24]=j):j=e[24],j},nu=({InputContainer:n=l.RowLabelInput,formField:e,label:t,size:o,defaultSelection:a,resetsFields:i,isNumber:r,required:c,hidden:d,disabled:u,items:m,onSearchQueryChange:p,selectedItemNavigateTo:f,texts:x,dropdownItemsNameWidth:g,isLoading:y,withoutLabel:h,additionalColumns:b,CustomOnChangeComponent:j,icon:S,displayIdAsName:N,onSelect:v,className:C,archiveColumn:k,hint:I,addNewOptionPath:T,refreshOptions:L,MiniDetailComponent:E,miniDetailPlacement:D,suggestedItems:_,suggestedItemsTitle:P})=>{const{control:$,setValue:R}=Se.useFormContext(),{isSubmitted:F}=Se.useFormState(),M=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:O,ref:B,name:H},fieldState:{error:z}}=Se.useController({name:e,control:$}),[W,A]=w.useState(!1),[U,K]=w.useState(!1),V=O??null,G=Se.useWatch({name:`${e}-DropdownName`}),Z=V===(a==null?void 0:a.id)?a==null?void 0:a.name:G,X=w.useMemo(()=>V==null?null:{id:V??null,name:Z??""},[V,Z]),le=w.useCallback(Q=>{if((Q==null?void 0:Q.id)===V)return;if(v&&v(Q),i&&i.forEach(ee=>R(ee,null,{shouldDirty:!0,shouldValidate:U})),Q===null){R(e,null,{shouldDirty:!0,shouldValidate:U}),R(`${e}-DropdownName`,null);return}let ne=null;r?ne=(Q==null?void 0:Q.id)!==null&&(Q==null?void 0:Q.id)!==""?parseInt(Q.id.toString(),10):null:ne=Q.id===null||Q.id===void 0||Q.id===""?null:Q.id,R(e,ne,{shouldDirty:!0,shouldValidate:U}),R(`${e}-DropdownName`,Q.name??"")},[R,e,U,r,i,V,v]),q=w.useCallback(Q=>{A(!1),le(Q)},[le]),oe=w.useCallback(()=>{A(!1)},[]),ce=w.useRef(null),fe=z!==void 0,pe=f!==void 0,J=pe&&X!==null,Y=w.useMemo(()=>u||M,[u,M]);return w.useEffect(()=>{F&&K(!0)},[F]),s.jsx(s.Fragment,{children:s.jsxs(n,{label:t??"",required:c,disabled:Y,hidden:d,withoutLabel:h,isInvalid:fe,inputContainerClassName:l.classNames({"luminus-dropdown-select-open":W}),hint:I,className:C,children:[s.jsxs(l.InputAnchorContainer,{currentSelection:X,selectedItemNavigateTo:f,children:[N&&(X==null?void 0:X.name)&&s.jsx(l.Typography,{variant:"caption",className:"d-flex justify-content-end mt-2 luminus-dropdown-selection-name",children:X.name}),s.jsx("input",{type:"hidden",name:H,value:O??"",ref:B}),s.jsx(l.MiniDetailWrapper,{value:V,MiniDetailComponent:E,miniDetailPlacement:D,children:s.jsx(l.Form.Select,{size:o,onMouseDown:Q=>{Q.currentTarget.focus(),Q.preventDefault()},onClick:()=>{!pe&&!Y&&A(!0)},ref:ce,value:V??"",onChange:()=>{},isInvalid:fe,hidden:d,className:l.classNames("w-100",{"luminus-dropdown-picker-disabled":Y,"luminus-dropdown-picker-link":J}),children:s.jsx("option",{value:V,children:N?V:(Z==null?void 0:Z.length)>0?Z:V})})}),j||!Y&&pe?s.jsxs("div",{className:"custom-picker-button",children:[!j&&!Y&&pe&&s.jsx(l.IconButton,{size:"sm",color:"secondary",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),A(!0)},children:S??s.jsx(l.MdOutlineEdit,{})}),j??null]}):null]}),z&&s.jsx(l.InvalidFeedback,{message:z.message}),ce.current&&s.jsx(l.SimplePicker,{show:W,onCancel:oe,items:m,currentSelection:X,onSelectionChange:q,onSearchQueryChange:p,texts:x,itemsNameWidth:g,additionalColumns:b,displayIdAsName:N,isLoading:y,disabled:Y,inputRef:ce,archiveColumn:k,addNewOptionPath:T,refreshOptions:L,suggestedItems:_,suggestedItemsTitle:P})]})})},su=n=>{const e=l.compilerRuntimeExports.c(51),{InputContainer:t,label:o,formField:a,hidden:i,required:r,placeholder:c,disabled:d,showClearIcon:u,resetsFields:m,multiple:p,accept:f,withoutLabel:x,hint:g,className:y}=n,h=t===void 0?l.RowLabelInput:t,{control:b,setValue:j}=Se.useFormContext(),{isSubmitted:S}=Se.useFormState();let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N={falseIfNotInit:!0},e[0]=N):N=e[0];const v=l.useFormDisabledContext(N);let C;e[1]!==b||e[2]!==a?(C={name:a,control:b},e[1]=b,e[2]=a,e[3]=C):C=e[3];const{field:k,fieldState:I}=Se.useController(C),{onChange:T,ref:L,name:E}=k,{error:D}=I,[_,P]=w.useState(!1),$=w.useRef(null);let R;e[4]!==a||e[5]!==j||e[6]!==_?(R=()=>{j(a,null,{shouldDirty:!0,shouldValidate:_}),$.current&&($.current.value="")},e[4]=a,e[5]=j,e[6]=_,e[7]=R):R=e[7];const F=R;let M;e[8]!==T||e[9]!==m||e[10]!==j||e[11]!==_?(M=ce=>{const fe=ce.target.files;T(fe??null),m&&m.forEach(pe=>j(pe,null,{shouldDirty:!0,shouldValidate:_}))},e[8]=T,e[9]=m,e[10]=j,e[11]=_,e[12]=M):M=e[12];const O=M;let B,H;e[13]!==S?(B=()=>{S&&P(!0)},H=[S],e[13]=S,e[14]=B,e[15]=H):(B=e[14],H=e[15]),w.useEffect(B,H);const z=d||v,W=D!==void 0;let A;e[16]!==a?(A={name:a},e[16]=a,e[17]=A):A=e[17];const U=Se.useWatch(A),K=o??"";let V;e[18]!==f?(V=f.join(", "),e[18]=f,e[19]=V):V=e[19];const G=c??o;let Z;e[20]!==L?(Z=ce=>{L(ce),$.current=ce},e[20]=L,e[21]=Z):Z=e[21];let X;e[22]!==z||e[23]!==E||e[24]!==O||e[25]!==i||e[26]!==W||e[27]!==p||e[28]!==V||e[29]!==G||e[30]!==Z?(X=s.jsx(l.FormControl,{type:"file",multiple:p,accept:V,placeholder:G,isInvalid:W,hidden:i,disabled:z,className:"w-100",name:E,onChange:O,ref:Z}),e[22]=z,e[23]=E,e[24]=O,e[25]=i,e[26]=W,e[27]=p,e[28]=V,e[29]=G,e[30]=Z,e[31]=X):X=e[31];let le;e[32]!==F||e[33]!==U||e[34]!==u?(le=u&&U!=null&&s.jsx("div",{className:"luminus-input-remove-icon",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:F,children:s.jsx(l.MdClear,{})})}),e[32]=F,e[33]=U,e[34]=u,e[35]=le):le=e[35];let q;e[36]!==D?(q=D&&s.jsx(l.InvalidFeedback,{message:D.message}),e[36]=D,e[37]=q):q=e[37];let oe;return e[38]!==h||e[39]!==z||e[40]!==y||e[41]!==i||e[42]!==g||e[43]!==W||e[44]!==r||e[45]!==K||e[46]!==X||e[47]!==le||e[48]!==q||e[49]!==x?(oe=s.jsxs(h,{label:K,required:r,disabled:z,hidden:i,withoutLabel:x,isInvalid:W,hint:g,className:y,children:[X,le,q]}),e[38]=h,e[39]=z,e[40]=y,e[41]=i,e[42]=g,e[43]=W,e[44]=r,e[45]=K,e[46]=X,e[47]=le,e[48]=q,e[49]=x,e[50]=oe):oe=e[50],oe},rl=n=>{const e=l.compilerRuntimeExports.c(7),{children:t,onStorno:o,noSpacer:a}=n,i=pt.useIsFormDirty();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={falseIfNotInit:!0},e[0]=r):r=e[0];const c=l.useFormDisabledContext(r);let d;return e[1]!==t||e[2]!==c||e[3]!==i||e[4]!==a||e[5]!==o?(d=i?s.jsx(bo,{onStorno:o,noSpacer:a,disabled:c,children:t}):null,e[1]=t,e[2]=c,e[3]=i,e[4]=a,e[5]=o,e[6]=d):d=e[6],d},an=({InputContainer:n=l.RowLabelInput,options:e,formField:t,label:o,size:a,resetsFields:i,isNumber:r,required:c,hidden:d,disabled:u,withoutLabel:m,noSortOptions:p,suffixIdToName:f,onSelect:x,className:g,appendCurrentSelectionWithName:y,hint:h,addNewOptionPath:b,refreshOptions:j,MiniDetailComponent:S,miniDetailPlacement:N,selectedItemNavigateTo:v,noRemoveButton:C})=>{const{texts:{customSelect:k}}=w.useContext(l.LuminusComponentsContext),{control:I,setValue:T}=Se.useFormContext(),{isSubmitted:L}=Se.useFormState(),E=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:D,ref:_,name:P},fieldState:{error:$}}=Se.useController({name:t,control:I}),[R,F]=w.useState(!1),[M,O]=w.useState(!1),[B,H]=w.useState(""),z=D,W=w.useMemo(()=>e.find(q=>q.id===z)??null,[e,z]),A=w.useCallback(q=>{if((q==null?void 0:q.id)===z)return;if(x&&x(q),i&&i.forEach(ce=>T(ce,null,{shouldDirty:!0,shouldValidate:M})),q===null){T(t,null,{shouldDirty:!0,shouldValidate:M});return}let oe=null;r?oe=(q==null?void 0:q.id)!==null&&(q==null?void 0:q.id)!==""?parseInt(q.id.toString(),10):null:oe=q.id===null||q.id===void 0||q.id===""?null:q.id,T(t,oe,{shouldDirty:!0,shouldValidate:M})},[T,t,r,i,z,M,x]),U=w.useCallback(q=>{F(!1),A(q)},[A]),K=w.useCallback(q=>{H(q)},[]),V=w.useMemo(()=>u||E,[u,E]);w.useEffect(()=>{L&&O(!0)},[L]);const G=w.useCallback(q=>{var oe;return q===null?"":!q.name||q.name.length===0?((oe=q.id)==null?void 0:oe.toString())??"":f?`${q.name} (${q.id})`:q.name},[f]),Z=w.useMemo(()=>{const q=e?[...e]:[];return y!==void 0&&z&&(q.some(oe=>oe.id===z)||q.push({id:z,name:y})),q.map(oe=>({id:oe.id,name:G(oe)})).filter(oe=>l.stringSearchWithin(oe.name,B)).sort((oe,ce)=>p?0:(oe.name??"").localeCompare(ce.name??""))},[e,p,B,G,y,z]),X=w.useRef(null),le=$!==void 0;return s.jsx(s.Fragment,{children:s.jsxs(n,{label:o??"",required:c,disabled:V,hidden:d,withoutLabel:m,isInvalid:le,inputContainerClassName:l.classNames({"luminus-dropdown-select-open":R}),hint:h,className:g,children:[s.jsxs(l.InputAnchorContainer,{currentSelection:W,selectedItemNavigateTo:v,children:[s.jsx("input",{type:"hidden",name:P,value:D??"",ref:_}),s.jsx(l.MiniDetailWrapper,{value:z,MiniDetailComponent:S,miniDetailPlacement:N,children:s.jsx(l.Form.Select,{size:a,onMouseDown:q=>{q.currentTarget.focus(),q.preventDefault()},onClick:()=>{F(!0)},ref:X,value:z??"",onChange:()=>{},isInvalid:le,hidden:d,disabled:V,className:"w-100",children:s.jsx("option",{value:(W==null?void 0:W.id)??"",children:G(W)})})})]}),$&&s.jsx(l.InvalidFeedback,{message:$.message}),X.current&&s.jsx(l.SimplePicker,{show:R,onCancel:()=>F(!1),items:Z,currentSelection:W??null,onSelectionChange:U,onSearchQueryChange:K,texts:k,disabled:V,inputRef:X,autoHideSearch:!0,allItemsLength:e.length,addNewOptionPath:b,refreshOptions:j,noRemoveButton:C})]})})},ou=n=>{const e=l.compilerRuntimeExports.c(79),{InputContainer:t,formField:o,label:a,placeholder:i,size:r,resetsFields:c,showClearIcon:d,clearValue:u,required:m,hidden:p,disabled:f,withoutLabel:x,step:g,stepperStep:y,className:h,min:b,max:j,onChange:S,hint:N}=n,v=t===void 0?l.RowLabelInput:t,C=y===void 0?1:y,{control:k,setValue:I}=Se.useFormContext(),{isSubmitted:T}=Se.useFormState();let L;e[0]===Symbol.for("react.memo_cache_sentinel")?(L={falseIfNotInit:!0},e[0]=L):L=e[0];const E=l.useFormDisabledContext(L);let D;e[1]!==k||e[2]!==o?(D={name:o,control:k},e[1]=k,e[2]=o,e[3]=D):D=e[3];const{field:_,fieldState:P}=Se.useController(D),{value:$,onChange:R,onBlur:F,ref:M,name:O}=_,{error:B}=P,[H,z]=w.useState(!1);let W;e[4]!==j||e[5]!==b||e[6]!==I?(W=(me,be,ae)=>{I(me,ot.limitNumber(be,b,j),ae)},e[4]=j,e[5]=b,e[6]=I,e[7]=W):W=e[7];const A=W;let U;e[8]!==u||e[9]!==o||e[10]!==A||e[11]!==H?(U=()=>{const me=u??null;A(o,me!==null?Number(me):null,{shouldDirty:!0,shouldValidate:H})},e[8]=u,e[9]=o,e[10]=A,e[11]=H,e[12]=U):U=e[12];const K=U,V=f||E;let G,Z;e[13]!==T?(Z=()=>{T&&z(!0)},G=[T],e[13]=T,e[14]=G,e[15]=Z):(G=e[14],Z=e[15]),w.useEffect(Z,G);const X=B!==void 0;let le;e[16]!==R||e[17]!==j||e[18]!==b||e[19]!==S||e[20]!==c||e[21]!==I||e[22]!==H?(le=me=>{const be=me.target.value,ae=be===""?null:ot.limitNumber(Number(be),b,j);R(ae),c&&c.forEach(ke=>I(ke,null,{shouldDirty:!0,shouldValidate:H})),S&&S(ae===null?null:Number(ae))},e[16]=R,e[17]=j,e[18]=b,e[19]=S,e[20]=c,e[21]=I,e[22]=H,e[23]=le):le=e[23];const q=le,oe=a??"",ce=i??a,fe=$??"";let pe;e[24]!==V||e[25]!==O||e[26]!==F||e[27]!==M||e[28]!==q||e[29]!==p||e[30]!==X||e[31]!==j||e[32]!==b||e[33]!==r||e[34]!==g||e[35]!==ce||e[36]!==fe?(pe=s.jsx(l.Form.Control,{type:"number",placeholder:ce,size:r,name:O,value:fe,onChange:q,onBlur:F,ref:M,isInvalid:X,hidden:p,disabled:V,className:"w-100 luminus-numeric-stepper",step:g,min:b,max:j}),e[24]=V,e[25]=O,e[26]=F,e[27]=M,e[28]=q,e[29]=p,e[30]=X,e[31]=j,e[32]=b,e[33]=r,e[34]=g,e[35]=ce,e[36]=fe,e[37]=pe):pe=e[37];let J;e[38]!==f||e[39]!==$||e[40]!==o||e[41]!==A||e[42]!==H||e[43]!==C?(J=!f&&s.jsx(l.IconButton,{size:"sm",onClick:me=>{me.preventDefault(),me.stopPropagation();const be=($?Number($):0)-C;A(o,be,{shouldDirty:!0,shouldValidate:H})},children:s.jsx(l.FaMinus,{})}),e[38]=f,e[39]=$,e[40]=o,e[41]=A,e[42]=H,e[43]=C,e[44]=J):J=e[44];let Y;e[45]!==J?(Y=s.jsx("div",{className:"stepper-icon left",children:J}),e[45]=J,e[46]=Y):Y=e[46];let Q;e[47]!==f||e[48]!==$||e[49]!==o||e[50]!==A||e[51]!==H||e[52]!==C?(Q=!f&&s.jsx(l.IconButton,{size:"sm",onClick:me=>{me.preventDefault(),me.stopPropagation();const be=($?Number($):0)+C;A(o,be,{shouldDirty:!0,shouldValidate:H})},children:s.jsx(l.FaPlus,{})}),e[47]=f,e[48]=$,e[49]=o,e[50]=A,e[51]=H,e[52]=C,e[53]=Q):Q=e[53];let ne;e[54]!==Q?(ne=s.jsx("div",{className:"stepper-icon right",children:Q}),e[54]=Q,e[55]=ne):ne=e[55];let ee;e[56]!==pe||e[57]!==Y||e[58]!==ne?(ee=s.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[pe,Y,ne]}),e[56]=pe,e[57]=Y,e[58]=ne,e[59]=ee):ee=e[59];let te;e[60]!==K||e[61]!==$||e[62]!==d?(te=d&&$!=null&&s.jsx("div",{className:"luminus-input-remove-icon",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:K,children:s.jsx(l.MdClear,{})})}),e[60]=K,e[61]=$,e[62]=d,e[63]=te):te=e[63];let se;e[64]!==B?(se=B&&s.jsx(l.InvalidFeedback,{message:B.message}),e[64]=B,e[65]=se):se=e[65];let ue;return e[66]!==v||e[67]!==V||e[68]!==h||e[69]!==p||e[70]!==N||e[71]!==X||e[72]!==m||e[73]!==oe||e[74]!==ee||e[75]!==te||e[76]!==se||e[77]!==x?(ue=s.jsxs(v,{label:oe,required:m,disabled:V,hidden:p,withoutLabel:x,isInvalid:X,hint:N,className:h,children:[ee,te,se]}),e[66]=v,e[67]=V,e[68]=h,e[69]=p,e[70]=N,e[71]=X,e[72]=m,e[73]=oe,e[74]=ee,e[75]=te,e[76]=se,e[77]=x,e[78]=ue):ue=e[78],ue},cl=({InputContainer:n=l.RowLabelInput,formField:e,label:t,placeholder:o,resetsFields:a,showClearIcon:i,clearValue:r,required:c,hidden:d,disabled:u,withoutLabel:m,step:p,size:f,CustomOnChangeComponent:x,noSelectOnFocus:g,className:y,decimalScale:h=2,fixedDecimalScale:b=!1,numberPrefix:j,numberSuffix:S,min:N,max:v,onChange:C,hint:k})=>{const{control:I,setValue:T}=Se.useFormContext(),{isSubmitted:L}=Se.useFormState(),E=l.useFormDisabledContext({falseIfNotInit:!0}),{field:{value:D,onChange:_,onBlur:P,ref:$,name:R},fieldState:{error:F}}=Se.useController({name:e,control:I}),[M,O]=w.useState(!1),B=w.useCallback(()=>{const A=r??null;T(e,A!==null?Number(A):null,{shouldDirty:!0,shouldValidate:M})},[r,T,e,M]),H=w.useMemo(()=>u||E,[u,E]);w.useEffect(()=>{L&&O(!0)},[L]);const z=D;w.useEffect(()=>{v!==void 0&&z>v&&T(e,v),N!==void 0&&z<N&&T(e,N)},[e,z,v,N,T]);const W=F!==void 0;return s.jsxs(n,{label:t??"",required:c,disabled:H,hidden:d,withoutLabel:m,isInvalid:W,hint:k,className:y,children:[s.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[s.jsx(Un,{displayType:"input",thousandSeparator:" ",decimalSeparator:",",decimalScale:h,fixedDecimalScale:b,prefix:j,suffix:S,defaultValue:"",name:R,value:D??"",placeholder:o??t,onFocus:A=>{!g&&A.target.select()},onChange:A=>{var V,G;const U=parseFloat(((G=(V=A.target)==null?void 0:V.value)==null?void 0:G.replaceAll(" ","").replaceAll(",","."))??"0");a&&a.forEach(Z=>T(Z,null,{shouldDirty:!0,shouldValidate:M}));const K=Number.isNaN(U)?null:Number(U);_(K),C&&C(K)},onBlur:()=>P(),hidden:d,disabled:H,className:l.classNames("form-control text-end w-100",{"is-invalid":W},{[`form-control-${f}`]:f}),step:p,getInputRef:$,min:N,max:v}),x&&s.jsx("div",{className:"custom-picker-button",children:x})]}),i&&z!=null&&s.jsx("div",{className:"luminus-input-remove-icon inset",children:s.jsx(l.IconButton,{color:"secondary",size:"sm",onClick:B,children:s.jsx(l.MdClear,{})})}),F&&s.jsx(l.InvalidFeedback,{message:F.message})]})},lu=(n,e)=>{const t=l.useAxios(),o=we.useNavigate(),{startLoading:a,stopLoading:i}=w.useContext(l.LoadingContext),{zDateRequired:r,zNumberRequired:c}=l.useZodSchemaTypes(),{addNotification:d}=l.useNotifications(),{refreshAvailableDelegations:u}=w.useContext(l.DelegationContext),{user:m}=w.useContext(l.UserContext),{texts:{substitutions:{detail:p}}}=w.useContext(l.LuminusComponentsContext),f=l.objectType({id:c(),employeeId:c(),substituteId:c(),from:r(),to:r(),roles:l.arrayType(l.stringType())}),x=w.useMemo(()=>({id:(n==null?void 0:n.id)??0,employeeId:(n==null?void 0:n.employeeId)??(m==null?void 0:m.personalNumber)??void 0,substituteId:(n==null?void 0:n.substituteId)??void 0,from:(n==null?void 0:n.from)??l.format(new Date,"yyyy-MM-dd"),to:(n==null?void 0:n.to)??l.format(new Date,"yyyy-MM-dd"),roles:(n==null?void 0:n.roles)??[]}),[n==null?void 0:n.employeeId,n==null?void 0:n.from,n==null?void 0:n.id,n==null?void 0:n.roles,n==null?void 0:n.substituteId,n==null?void 0:n.to,m==null?void 0:m.personalNumber]),g=Se.useForm({resolver:l.t(f),defaultValues:x}),y=w.useCallback(async h=>{a("premissions-substitute-submit");try{await t.post("permissions/substitutions",h),d(p.updateSuccess,"success"),u(),o(e)}catch(b){l.hookFormSetServerErrors(g,b)}finally{i("premissions-substitute-submit")}},[d,t,g,o,u,a,i,e,p]);return w.useEffect(()=>{g.reset(x)},[x,g]),{formSchema:f,onSubmit:y,formMethods:g}},au=n=>{var ye;const e=l.compilerRuntimeExports.c(114),{indexRoute:t,zastupModifyPermission:o}=n,a=o===void 0?"ZASTUP_MODIFY":o,{id:i}=we.useParams(),{user:r}=w.useContext(l.UserContext),c=l.useAxios(),d=we.useNavigate(),{confirm:u}=l.useConfirm(),{texts:m}=w.useContext(l.LuminusComponentsContext),{substitutions:p}=m,{detail:f}=p,x=i!==void 0;let g;e[0]!==x?(g={enabled:x},e[0]=x,e[1]=g):g=e[1];const{data:y}=Fe.useGetApiData(`/permissions/substitutions/${i}`,g),{data:h}=Fe.useGetApiData("/permissions/users"),{onSubmit:b,formMethods:j}=lu(y,t);let S;e[2]!==j.control?(S={control:j.control,name:"employeeId"},e[2]=j.control,e[3]=S):S=e[3];const N=Se.useWatch(S);let v;e[4]!==N||e[5]!==h?(v=(ye=h==null?void 0:h.find(de=>de.employeeId===N))==null?void 0:ye.name,e[4]=N,e[5]=h,e[6]=v):v=e[6];const C=N>0&&!!h;let k;e[7]!==C?(k={enabled:C},e[7]=C,e[8]=k):k=e[8];const{data:I}=Fe.useGetApiData(`/permissions/roles?userName=${v}`,k),{refreshAvailableDelegations:T}=w.useContext(l.DelegationContext),{checkUserHasPermissions:L}=l.usePermissions();let E;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==t||e[13]!==d||e[14]!==T||e[15]!==f.deleteConfirm?(E=async()=>{await u(f.deleteConfirm)&&(await c.delete(`/permissions/substitutions/${i}`),T(),d(t))},e[9]=c,e[10]=u,e[11]=i,e[12]=t,e[13]=d,e[14]=T,e[15]=f.deleteConfirm,e[16]=E):E=e[16];const D=E;r==null||r.personalNumber;let _;e[17]!==L||e[18]!==N||e[19]!==(r==null?void 0:r.personalNumber)||e[20]!==a?(_=N!==(r==null?void 0:r.personalNumber)&&!L([a]),e[17]=L,e[18]=N,e[19]=r==null?void 0:r.personalNumber,e[20]=a,e[21]=_):_=e[21];const P=_;let $;e[22]!==j.control?($={control:j.control,name:"roles"},e[22]=j.control,e[23]=$):$=e[23];const R=Se.useWatch($);let F;e[24]!==I?(F=I==null?void 0:I.filter(iu),e[24]=I,e[25]=F):F=e[25];const M=F;let O;e[26]!==M||e[27]!==R?(O=(M==null?void 0:M.every(de=>R==null?void 0:R.includes(de.name)))??!1,e[26]=M,e[27]=R,e[28]=O):O=e[28];const B=O;let H;if(e[29]!==h){const de=new Set(h==null?void 0:h.map(ru));H=Array.from(de.values()),e[29]=h,e[30]=H}else H=e[30];let z;e[31]!==H||e[32]!==h?(z=H.map(de=>h==null?void 0:h.find(xe=>xe.employeeId===de)).filter(cu).map(du),e[31]=H,e[32]=h,e[33]=z):z=e[33];const W=z;let A;e[34]!==f.title?(A=s.jsx(l.Typography,{variant:"h3",children:f.title}),e[34]=f.title,e[35]=A):A=e[35];let U;e[36]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[36]=U):U=e[36];let K;e[37]!==D?(K=()=>D(),e[37]=D,e[38]=K):K=e[38];let V;e[39]!==K||e[40]!==f.delete?(V=s.jsx(l.Dropdown,{toggle:U,children:s.jsx(l.DropdownItem,{onClick:K,children:f.delete})}),e[39]=K,e[40]=f.delete,e[41]=V):V=e[41];let G;e[42]!==A||e[43]!==V?(G=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[A,V]}),e[42]=A,e[43]=V,e[44]=G):G=e[44];let Z;e[45]!==j||e[46]!==b?(Z=j.handleSubmit(b),e[45]=j,e[46]=b,e[47]=Z):Z=e[47];const X=f.title,le=f.employee;let q;e[48]!==L||e[49]!==a?(q=L([a]),e[48]=L,e[49]=a,e[50]=q):q=e[50];const oe=!q;let ce;e[51]===Symbol.for("react.memo_cache_sentinel")?(ce=["roles"],e[51]=ce):ce=e[51];let fe;e[52]!==W||e[53]!==oe||e[54]!==f.employee?(fe=s.jsx(an,{formField:"employeeId",options:W,label:le,isNumber:!0,required:!0,disabled:oe,resetsFields:ce}),e[52]=W,e[53]=oe,e[54]=f.employee,e[55]=fe):fe=e[55];let pe;e[56]!==W||e[57]!==f.substitute?(pe=s.jsx(an,{formField:"substituteId",options:W,label:f.substitute,isNumber:!0,required:!0}),e[56]=W,e[57]=f.substitute,e[58]=pe):pe=e[58];let J;e[59]!==f.from?(J=s.jsx(l.HookFormTextInput,{formField:"from",label:f.from,type:"date",required:!0}),e[59]=f.from,e[60]=J):J=e[60];let Y;e[61]!==f.to?(Y=s.jsx(l.HookFormTextInput,{formField:"to",label:f.to,type:"date",required:!0}),e[61]=f.to,e[62]=Y):Y=e[62];let Q;e[63]!==fe||e[64]!==pe||e[65]!==J||e[66]!==Y||e[67]!==f.title?(Q=s.jsx(l.Col,{sm:12,md:4,children:s.jsxs(gt,{title:X,children:[fe,pe,J,Y]})}),e[63]=fe,e[64]=pe,e[65]=J,e[66]=Y,e[67]=f.title,e[68]=Q):Q=e[68];let ne;e[69]!==(M==null?void 0:M.length)||e[70]!==(R==null?void 0:R.length)||e[71]!==f?(ne=f.roles(`${(R==null?void 0:R.length)??0}/${(M==null?void 0:M.length)??0}`),e[69]=M==null?void 0:M.length,e[70]=R==null?void 0:R.length,e[71]=f,e[72]=ne):ne=e[72];let ee;e[73]!==B||e[74]!==M||e[75]!==P||e[76]!==j||e[77]!==(R==null?void 0:R.length)||e[78]!==f.checkAllRoles||e[79]!==f.uncheckAllRoles?(ee=P?null:s.jsx("div",{className:"bg-darker",style:{marginLeft:"-12px",marginRight:"-12px",marginTop:"-12px",padding:"0px 12px"},children:s.jsx(Tt,{label:B?f.uncheckAllRoles:f.checkAllRoles,indeterminate:!B&&(R==null?void 0:R.length)>0,value:B,disabled:P,onChange:()=>{j.setValue("roles",B?[]:(M==null?void 0:M.map(uu))??[],{shouldDirty:!0})},InputContainer:l.RowLabelInput})}),e[73]=B,e[74]=M,e[75]=P,e[76]=j,e[77]=R==null?void 0:R.length,e[78]=f.checkAllRoles,e[79]=f.uncheckAllRoles,e[80]=ee):ee=e[80];let te;e[81]===Symbol.for("react.memo_cache_sentinel")?(te={maxHeight:"60vh",marginLeft:"-12px",marginRight:"-12px",padding:"0px 12px"},e[81]=te):te=e[81];let se;e[82]!==P||e[83]!==j||e[84]!==R||e[85]!==I?(se=I==null?void 0:I.map(de=>s.jsx(Tt,{label:de.name,value:(R==null?void 0:R.find(xe=>xe===de.name))!==void 0,disabled:P||!de.canBeRepresented,onChange:xe=>{j.setValue("roles",xe?[...R??[],de.name]:(R==null?void 0:R.filter(je=>je!==de.name))??[],{shouldDirty:!0})},InputContainer:l.RowLabelInput},de.name)),e[82]=P,e[83]=j,e[84]=R,e[85]=I,e[86]=se):se=e[86];let ue;e[87]!==se?(ue=s.jsx("div",{className:"overflow-auto",style:te,children:se}),e[87]=se,e[88]=ue):ue=e[88];let me;e[89]!==ne||e[90]!==ee||e[91]!==ue?(me=s.jsx(l.Col,{sm:12,md:4,children:s.jsxs(gt,{title:ne,className:"h-max-100",contentClassName:"d-flex flex-column overflow-hidden",children:[ee,ue]})}),e[89]=ne,e[90]=ee,e[91]=ue,e[92]=me):me=e[92];let be;e[93]!==Q||e[94]!==me?(be=s.jsxs(On,{className:"h-100 gx-3 gy-3",children:[Q,me]}),e[93]=Q,e[94]=me,e[95]=be):be=e[95];let ae;e[96]!==j?(ae=()=>j.reset(),e[96]=j,e[97]=ae):ae=e[97];let ke;e[98]!==ae||e[99]!==f.save?(ke=s.jsx(rl,{onStorno:ae,children:f.save}),e[98]=ae,e[99]=f.save,e[100]=ke):ke=e[100];let Ne;e[101]!==Z||e[102]!==be||e[103]!==ke?(Ne=s.jsxs(l.Form,{onSubmit:Z,className:"h-100",children:[be,ke]}),e[101]=Z,e[102]=be,e[103]=ke,e[104]=Ne):Ne=e[104];let De;e[105]!==P||e[106]!==Ne?(De=s.jsx(st.FormDisabledProvider,{disabled:P,children:Ne}),e[105]=P,e[106]=Ne,e[107]=De):De=e[107];let re;e[108]!==j||e[109]!==De?(re=s.jsx(Se.FormProvider,{...j,children:De}),e[108]=j,e[109]=De,e[110]=re):re=e[110];let he;return e[111]!==G||e[112]!==re?(he=s.jsx(l.PageContainer,{title:G,children:re}),e[111]=G,e[112]=re,e[113]=he):he=e[113],he};function iu(n){return n.canBeRepresented}function ru(n){return n.employeeId}function cu(n){return n!==void 0}function du(n){return{id:n.employeeId,name:`${n.employeeName} (${n.name})`}}function uu(n){return n.name}const mu=n=>{const e=l.compilerRuntimeExports.c(32),{BnfTableComponent:t,items:o,onEditItem:a,tableIdentifier:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{approval:c}=r;let d;e[0]!==o?(d=o.map(fu),e[0]=o,e[1]=d):d=e[1];const u=d;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=l.u(),e[2]=m):m=e[2];const p=m;let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=p.accessor("id",{header:"Id",type:"number",meta:{filterVariant:"none",hidden:!0}}),e[3]=f):f=e[3];let x;e[4]!==c.delegations.table.approval?(x=p.accessor("approval.name",{header:c.delegations.table.approval,type:"string",meta:{filterVariant:"select"},mobileMeta:{isIdentifier:!0}}),e[4]=c.delegations.table.approval,e[5]=x):x=e[5];let g;e[6]!==c.delegations.table.employee?(g=p.accessor("employee.name",{header:c.delegations.table.employee,type:"string",mobileMeta:{isIdentifier:!0}}),e[6]=c.delegations.table.employee,e[7]=g):g=e[7];let y;e[8]!==c.delegations.table.delegate?(y=p.accessor("delegate.name",{header:c.delegations.table.delegate,type:"string",mobileMeta:{isIdentifier:!0}}),e[8]=c.delegations.table.delegate,e[9]=y):y=e[9];let h;e[10]!==c.delegations.table.dateFrom||e[11]!==c.delegations.table.dateGroup?(h=p.accessor("dateFrom",{header:c.delegations.table.dateFrom,type:"date",mobileMeta:{displayGroup:c.delegations.table.dateGroup}}),e[10]=c.delegations.table.dateFrom,e[11]=c.delegations.table.dateGroup,e[12]=h):h=e[12];let b;e[13]!==c.delegations.table.dateGroup||e[14]!==c.delegations.table.dateTo?(b=p.accessor("dateTo",{header:c.delegations.table.dateTo,type:"date",mobileMeta:{displayGroup:c.delegations.table.dateGroup}}),e[13]=c.delegations.table.dateGroup,e[14]=c.delegations.table.dateTo,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=p.accessor("archive",{header:"",type:"boolean",meta:{hidden:!0}}),e[16]=j):j=e[16];let S;e[17]!==x||e[18]!==g||e[19]!==y||e[20]!==h||e[21]!==b?(S=[f,x,g,y,h,b,j],e[17]=x,e[18]=g,e[19]=y,e[20]=h,e[21]=b,e[22]=S):S=e[22];const N=S;let v;e[23]!==o||e[24]!==a?(v=I=>{a(o.find(T=>T.id===I.id))},e[23]=o,e[24]=a,e[25]=v):v=e[25];const C=v;let k;return e[26]!==t||e[27]!==N||e[28]!==C||e[29]!==i||e[30]!==u?(k=s.jsx(t,{tableId:i,columns:N,data:u,onRowClick:C}),e[26]=t,e[27]=N,e[28]=C,e[29]=i,e[30]=u,e[31]=k):k=e[31],k};function fu(n){return{...n,archive:!!(n.dateTo&&l.isPast(l.parseISO(n.dateTo)))}}const pu=(n,e="/approval/delegation/runningProcess",t="/approval/delegation",o=a=>`/approval/delegation/${a}`)=>{const a=l.useAxios(),{startLoading:i,stopLoading:r}=w.useContext(l.LoadingContext),c=w.useCallback(async(m,p)=>{let f=null;i("getHasRunningProcesses");try{f=(await a.get(`${e}?employeeId=${m}&approvalId=${p}`)).data}finally{r("getHasRunningProcesses")}return f},[a,i,r,e]),d=w.useCallback(async(m,p)=>(i("approvalDelegationPost"),a.post(t,m).then(()=>!0).catch(f=>(l.hookFormSetServerErrors(p,f),!1)).finally(()=>r("approvalDelegationPost"))),[a,i,r,t]),u=w.useCallback(async()=>n!=null&&n.id?(i("approvalDelegationDelete"),a.delete(o(n.id)).then(()=>!0).catch(()=>!1).finally(()=>r("approvalDelegationDelete"))):!1,[a,n,i,r,o]);return{getHasRunningProcesses:c,postEditDelegation:d,postDeleteDelegation:u}},hu=n=>{var J,Y;const e=l.compilerRuntimeExports.c(85),{model:t,handleClose:o,onConfirm:a,apiApprovalDefinitions:i,apiHasRunningProcess:r,apiPostEditDelegation:c,apiDeleteDelegation:d,EmployeePickerComponent:u}=n,{ProjectIconComponent:m,texts:p}=w.useContext(l.LuminusComponentsContext),{approval:f}=p,{zDate:x,zObjectIdIntRequired:g,zDateRequired:y}=l.useZodSchemaTypes(),{addNotification:h}=l.useNotifications(),{confirm:b}=l.useConfirm(),{data:j}=Fe.useGetApiData(i);let S,N;if(e[0]!==x||e[1]!==y||e[2]!==g){const Q=l.objectType({employee:g(),delegate:g(),dateFrom:y(),dateTo:x(),approval:g()});N=Se.useForm,S=l.t(Q),e[0]=x,e[1]=y,e[2]=g,e[3]=S,e[4]=N}else S=e[3],N=e[4];let v;e[5]!==S?(v={resolver:S},e[5]=S,e[6]=v):v=e[6];const C=N(v),{getHasRunningProcesses:k,postEditDelegation:I,postDeleteDelegation:T}=pu(t,r,c,d);let L,E;e[7]!==C||e[8]!==t?(L=()=>{var Q,ne,ee,te,se,ue;t&&(C.reset({...t,employee:{id:((Q=t.employee)==null?void 0:Q.id)??0},delegate:{id:((ne=t.delegate)==null?void 0:ne.id)??0},dateFrom:t.dateFrom??"",approval:{id:((ee=t.approval)==null?void 0:ee.id)??0}},{keepDirty:!1}),(te=t.employee)!=null&&te.id||ot.hookFormSetNull(C,"employee.id"),(se=t.delegate)!=null&&se.id||ot.hookFormSetNull(C,"delegate.id"),(ue=t.approval)!=null&&ue.id||ot.hookFormSetNull(C,"approval.id"))},E=[t,C],e[7]=C,e[8]=t,e[9]=L,e[10]=E):(L=e[9],E=e[10]),w.useEffect(L,E);let D;e[11]!==h||e[12]!==b||e[13]!==C||e[14]!==k||e[15]!==t||e[16]!==a||e[17]!==I||e[18]!==f.delegations.createSuccess||e[19]!==f.delegations.delegateExistingsConfirmMessage||e[20]!==f.delegations.editSuccess?(D=async Q=>{if(!t)return;const ne={...t};Object.assign(ne,Q),l.fixNameIdNulls(ne);const ee=await k(ne.employee.id,ne.approval.id);ne.includeExisting=ee&&!!await b(f.delegations.delegateExistingsConfirmMessage),await I(ne,C)&&(h(t.id?f.delegations.editSuccess:f.delegations.createSuccess,"success"),a())},e[11]=h,e[12]=b,e[13]=C,e[14]=k,e[15]=t,e[16]=a,e[17]=I,e[18]=f.delegations.createSuccess,e[19]=f.delegations.delegateExistingsConfirmMessage,e[20]=f.delegations.editSuccess,e[21]=D):D=e[21];const _=D;let P;e[22]!==h||e[23]!==b||e[24]!==a||e[25]!==T||e[26]!==f.delegations.deleteConfirm||e[27]!==f.delegations.deleteSuccess?(P=async()=>{await b(f.delegations.deleteConfirm)&&await T()&&(h(f.delegations.deleteSuccess,"success"),a())},e[22]=h,e[23]=b,e[24]=a,e[25]=T,e[26]=f.delegations.deleteConfirm,e[27]=f.delegations.deleteSuccess,e[28]=P):P=e[28];const $=P,R=t!==null;let F;e[29]!==o?(F=()=>o(),e[29]=o,e[30]=F):F=e[30];const M=t!=null&&t.id?f.delegations.detailTitle:f.delegations.newTitle;let O;e[31]!==M?(O=s.jsx(l.Modal.Title,{className:"w-100",children:M}),e[31]=M,e[32]=O):O=e[32];let B;e[33]!==m||e[34]!==(t==null?void 0:t.id)||e[35]!==$||e[36]!==f.delegations.delete?(B=t!=null&&t.id?s.jsx(l.Dropdown,{toggle:s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),className:"modalHeaderDropdown",children:s.jsx(l.DropdownItem,{color:"danger",icon:s.jsx(m,{icon:"delete"}),onClick:$,children:f.delegations.delete})}):null,e[33]=m,e[34]=t==null?void 0:t.id,e[35]=$,e[36]=f.delegations.delete,e[37]=B):B=e[37];let H;e[38]!==O||e[39]!==B?(H=s.jsxs(l.Modal.Header,{closeButton:!0,children:[O,B]}),e[38]=O,e[39]=B,e[40]=H):H=e[40];let z;e[41]!==C||e[42]!==_?(z=C.handleSubmit(_),e[41]=C,e[42]=_,e[43]=z):z=e[43];let W;e[44]!==j?(W=j??[],e[44]=j,e[45]=W):W=e[45];let A;e[46]!==W||e[47]!==f.delegations.detail.approval?(A=s.jsx(an,{label:f.delegations.detail.approval,isNumber:!0,formField:"approval.id",options:W,required:!0}),e[46]=W,e[47]=f.delegations.detail.approval,e[48]=A):A=e[48];let U;e[49]!==t?(U=(J=t==null?void 0:t.employee)!=null&&J.id?{id:t.employee.id,name:t.employee.name}:null,e[49]=t,e[50]=U):U=e[50];let K;e[51]!==u||e[52]!==U||e[53]!==f.delegations.detail.employee?(K=s.jsx(u,{label:f.delegations.detail.employee,formField:"employee.id",defaultSelection:U,required:!0}),e[51]=u,e[52]=U,e[53]=f.delegations.detail.employee,e[54]=K):K=e[54];let V;e[55]!==t?(V=(Y=t==null?void 0:t.delegate)!=null&&Y.id?{id:t.delegate.id,name:t.delegate.name}:null,e[55]=t,e[56]=V):V=e[56];let G;e[57]!==u||e[58]!==V||e[59]!==f.delegations.detail.delegate?(G=s.jsx(u,{label:f.delegations.detail.delegate,formField:"delegate.id",defaultSelection:V,required:!0}),e[57]=u,e[58]=V,e[59]=f.delegations.detail.delegate,e[60]=G):G=e[60];let Z;e[61]!==f.delegations.detail.dateFrom?(Z=s.jsx(l.HookFormTextInput,{label:f.delegations.detail.dateFrom,formField:"dateFrom",type:"date",required:!0}),e[61]=f.delegations.detail.dateFrom,e[62]=Z):Z=e[62];let X;e[63]!==f.delegations.detail.dateTo?(X=s.jsx(l.HookFormTextInput,{label:f.delegations.detail.dateTo,formField:"dateTo",type:"date"}),e[63]=f.delegations.detail.dateTo,e[64]=X):X=e[64];let le;e[65]!==A||e[66]!==K||e[67]!==G||e[68]!==Z||e[69]!==X?(le=s.jsxs(l.Modal.Body,{children:[A,K,G,Z,X]}),e[65]=A,e[66]=K,e[67]=G,e[68]=Z,e[69]=X,e[70]=le):le=e[70];const q=t!=null&&t.id?f.delegations.save:f.delegations.create;let oe;e[71]!==q?(oe=s.jsx(l.Modal.Footer,{className:"justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:q})}),e[71]=q,e[72]=oe):oe=e[72];let ce;e[73]!==z||e[74]!==le||e[75]!==oe?(ce=s.jsxs(l.Form,{onSubmit:z,noValidate:!0,children:[le,oe]}),e[73]=z,e[74]=le,e[75]=oe,e[76]=ce):ce=e[76];let fe;e[77]!==C||e[78]!==ce?(fe=s.jsx(Se.FormProvider,{...C,children:ce}),e[77]=C,e[78]=ce,e[79]=fe):fe=e[79];let pe;return e[80]!==F||e[81]!==H||e[82]!==fe||e[83]!==R?(pe=s.jsxs(l.Modal,{show:R,onHide:F,children:[H,fe]}),e[80]=F,e[81]=H,e[82]=fe,e[83]=R,e[84]=pe):pe=e[84],pe},Et={apiApprovalDelegations:"/approval/delegation",apiHasRunningProcess:"/approval/delegation/runningProcess",apiPostEditDelegation:"/approval/delegation",apiDeleteDelegation:n=>`/approval/delegation/${n}`,apiApprovalDefinitions:"/approval/definition"},gu=n=>{const e=l.compilerRuntimeExports.c(38),{apiUrls:t,BnfTableComponent:o,tableIdentifier:a,EmployeePickerComponent:i}=n,{apiApprovalDelegations:r,apiHasRunningProcess:c,apiPostEditDelegation:d,apiDeleteDelegation:u,apiApprovalDefinitions:m}=t===void 0?Et:t,p=r===void 0?Et.apiApprovalDelegations:r,f=c===void 0?Et.apiHasRunningProcess:c,x=d===void 0?Et.apiPostEditDelegation:d,g=u===void 0?Et.apiDeleteDelegation:u,y=m===void 0?Et.apiApprovalDefinitions:m,{texts:h}=w.useContext(l.LuminusComponentsContext),{approval:b}=h,[j,S]=pt.useSearchQueryState("archive",!1),[N,v]=w.useState(null),{data:C,reloadData:k}=Fe.useGetApiData(`${p}?archive=${j}`);let I;e[0]!==b.delegations.title?(I=s.jsx(l.Typography,{variant:"h3",children:b.delegations.title}),e[0]=b.delegations.title,e[1]=I):I=e[1];let T;e[2]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[2]=T):T=e[2];let L;e[3]===Symbol.for("react.memo_cache_sentinel")?(L=()=>v({id:null,employee:null,delegate:null,dateFrom:null,dateTo:null,approval:null,includeExisting:null}),e[3]=L):L=e[3];let E;e[4]!==b.delegations.createDelegation?(E=s.jsx(l.DropdownItem,{onClick:L,children:b.delegations.createDelegation}),e[4]=b.delegations.createDelegation,e[5]=E):E=e[5];let D;e[6]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(l.DropdownDivider,{}),e[6]=D):D=e[6];let _;e[7]!==S||e[8]!==j?(_=()=>S(!j),e[7]=S,e[8]=j,e[9]=_):_=e[9];const P=j?b.delegations.hideArchived:b.delegations.showArchived;let $;e[10]!==_||e[11]!==P?($=s.jsx(l.DropdownItem,{onClick:_,children:P}),e[10]=_,e[11]=P,e[12]=$):$=e[12];let R;e[13]!==E||e[14]!==$?(R=s.jsxs(l.Dropdown,{toggle:T,children:[E,D,$]}),e[13]=E,e[14]=$,e[15]=R):R=e[15];let F;e[16]!==R||e[17]!==I?(F=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[I,R]}),e[16]=R,e[17]=I,e[18]=F):F=e[18];let M;e[19]!==o||e[20]!==C||e[21]!==a?(M=C?s.jsx(mu,{items:C,onEditItem:v,BnfTableComponent:o,tableIdentifier:a}):null,e[19]=o,e[20]=C,e[21]=a,e[22]=M):M=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=()=>v(null),e[23]=O):O=e[23];let B;e[24]!==k?(B=()=>{v(null),k()},e[24]=k,e[25]=B):B=e[25];let H;e[26]!==i||e[27]!==y||e[28]!==g||e[29]!==f||e[30]!==x||e[31]!==N||e[32]!==B?(H=s.jsx(hu,{model:N,handleClose:O,onConfirm:B,EmployeePickerComponent:i,apiApprovalDefinitions:y,apiHasRunningProcess:f,apiPostEditDelegation:x,apiDeleteDelegation:g}),e[26]=i,e[27]=y,e[28]=g,e[29]=f,e[30]=x,e[31]=N,e[32]=B,e[33]=H):H=e[33];let z;return e[34]!==F||e[35]!==M||e[36]!==H?(z=s.jsxs(l.PageContainer,{variant:"fullScreen",title:F,children:[M,H]}),e[34]=F,e[35]=M,e[36]=H,e[37]=z):z=e[37],z},xu=n=>{const e=l.compilerRuntimeExports.c(50),{show:t,handleClose:o,onConfirm:a,currentEmployee:i,approvalApproverId:r,apiPostChangeEmployee:c,EmployeePickerComponent:d}=n,{texts:u}=w.useContext(l.LuminusComponentsContext),{approval:m}=u,{zNumberRequired:p}=l.useZodSchemaTypes(),f=l.useAxios(),{startLoading:x,stopLoading:g}=w.useContext(l.LoadingContext),{addNotification:y}=l.useNotifications();let h,b;if(e[0]!==p){const M=l.z.object({employeeId:p()});b=Se.useForm,h=l.t(M),e[0]=p,e[1]=h,e[2]=b}else h=e[1],b=e[2];let j;e[3]!==h?(j={resolver:h},e[3]=h,e[4]=j):j=e[4];const S=b(j);let N;e[5]!==(i==null?void 0:i.id)||e[6]!==S||e[7]!==t?(N=()=>{t&&(S.reset({employeeId:i==null?void 0:i.id}),!(i!=null&&i.id)&&ot.hookFormSetNull(S,"employeeId"))},e[5]=i==null?void 0:i.id,e[6]=S,e[7]=t,e[8]=N):N=e[8];let v;e[9]!==i||e[10]!==S||e[11]!==t?(v=[t,i,S],e[9]=i,e[10]=S,e[11]=t,e[12]=v):v=e[12],w.useEffect(N,v);let C;e[13]!==c||e[14]!==r||e[15]!==f||e[16]!==S||e[17]!==x||e[18]!==g?(C=async M=>(x("approvalChangeEmployee"),f.post(c,{id:r,employeeId:M}).then(yu).catch(O=>(l.hookFormSetServerErrors(S,O),!1)).finally(()=>g("approvalChangeEmployee"))),e[13]=c,e[14]=r,e[15]=f,e[16]=S,e[17]=x,e[18]=g,e[19]=C):C=e[19];const k=C;let I;e[20]!==y||e[21]!==a||e[22]!==k||e[23]!==m.definitions.changeEmployeeSuccess?(I=async M=>{await k(M.employeeId)&&(y(m.definitions.changeEmployeeSuccess,"success"),a())},e[20]=y,e[21]=a,e[22]=k,e[23]=m.definitions.changeEmployeeSuccess,e[24]=I):I=e[24];const T=I;let L;e[25]!==o?(L=()=>o(),e[25]=o,e[26]=L):L=e[26];let E;e[27]!==m.definitions.changeEmployeeTitle?(E=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.definitions.changeEmployeeTitle})}),e[27]=m.definitions.changeEmployeeTitle,e[28]=E):E=e[28];let D;e[29]!==S||e[30]!==T?(D=S.handleSubmit(T),e[29]=S,e[30]=T,e[31]=D):D=e[31];let _;e[32]!==d||e[33]!==i||e[34]!==m.definitions.changeEmployeeNewEmployee?(_=s.jsx(l.Modal.Body,{children:s.jsx(d,{formField:"employeeId",defaultSelection:i,label:m.definitions.changeEmployeeNewEmployee,required:!0})}),e[32]=d,e[33]=i,e[34]=m.definitions.changeEmployeeNewEmployee,e[35]=_):_=e[35];let P;e[36]!==m.definitions.changeEmployeeConfirm?(P=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:m.definitions.changeEmployeeConfirm})}),e[36]=m.definitions.changeEmployeeConfirm,e[37]=P):P=e[37];let $;e[38]!==D||e[39]!==_||e[40]!==P?($=s.jsxs(l.Form,{onSubmit:D,noValidate:!0,children:[_,P]}),e[38]=D,e[39]=_,e[40]=P,e[41]=$):$=e[41];let R;e[42]!==S||e[43]!==$?(R=s.jsx(Se.FormProvider,{...S,children:$}),e[42]=S,e[43]=$,e[44]=R):R=e[44];let F;return e[45]!==t||e[46]!==E||e[47]!==R||e[48]!==L?(F=s.jsxs(l.Modal,{show:t,onHide:L,children:[E,R]}),e[45]=t,e[46]=E,e[47]=R,e[48]=L,e[49]=F):F=e[49],F};function yu(){return!0}const vu=n=>{var T;const e=l.compilerRuntimeExports.c(33),{level:t,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,EmployeePickerComponent:r}=n,{ProjectIconComponent:c,texts:d}=w.useContext(l.LuminusComponentsContext),{approval:u}=d,[m,p]=w.useState(null);let f;e[0]!==t.index||e[1]!==u.definitions?(f=u.definitions.nthLevel(t.index+1),e[0]=t.index,e[1]=u.definitions,e[2]=f):f=e[2];let x;e[3]!==f?(x=s.jsx(l.Typography,{variant:"body",children:f}),e[3]=f,e[4]=x):x=e[4];let g;e[5]!==t.threshold||e[6]!==u.definitions?(g=u.definitions.levelThresholdInfo(t.threshold),e[5]=t.threshold,e[6]=u.definitions,e[7]=g):g=e[7];let y;e[8]!==g?(y=s.jsx(l.Typography,{variant:"body2",children:g}),e[8]=g,e[9]=y):y=e[9];let h;e[10]!==x||e[11]!==y?(h=s.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[x,y]}),e[10]=x,e[11]=y,e[12]=h):h=e[12];let b;e[13]!==c||e[14]!==a||e[15]!==t.approvers||e[16]!==t.threshold||e[17]!==u.definitions?(b=t.approvers&&t.approvers.length>0?s.jsx("div",{className:"list-group",children:(T=t.approvers)==null?void 0:T.map(L=>s.jsxs("div",{className:"list-group-item ms-3 p-1 px-2 d-flex align-items-center justify-content-between gap-5",children:[s.jsxs(l.Typography,{variant:"body2",className:"d-flex align-items-center justify-content-between gap-2",children:[L.employeeId?s.jsxs(s.Fragment,{children:[s.jsx(c,{icon:"user"}),s.jsx(l.IconButton,{size:"sm",onClick:()=>p({id:L.id,employee:{id:L.employeeId??0,name:L.employeeName}}),children:s.jsx(c,{icon:"edit"})}),s.jsx(we.Link,{to:a(L.employeeId),className:"link",children:L.employeeName})]}):null,L.role?s.jsxs(s.Fragment,{children:[s.jsx(c,{icon:"role"})," ",s.jsx("span",{className:"fw-bold text-uppercase",children:L.role})]}):null]}),s.jsx(l.Typography,{variant:"body2",children:u.definitions.approverThresholdInfo(t.threshold,L.scale)})]}))}):null,e[13]=c,e[14]=a,e[15]=t.approvers,e[16]=t.threshold,e[17]=u.definitions,e[18]=b):b=e[18];const j=(m==null?void 0:m.id)??0,S=(m==null?void 0:m.employee)??null,N=m!==null;let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=()=>p(null),e[19]=v):v=e[19];let C;e[20]!==o?(C=()=>{p(null),o()},e[20]=o,e[21]=C):C=e[21];let k;e[22]!==r||e[23]!==i||e[24]!==N||e[25]!==C||e[26]!==j||e[27]!==S?(k=s.jsx(xu,{approvalApproverId:j,currentEmployee:S,show:N,handleClose:v,onConfirm:C,apiPostChangeEmployee:i,EmployeePickerComponent:r}),e[22]=r,e[23]=i,e[24]=N,e[25]=C,e[26]=j,e[27]=S,e[28]=k):k=e[28];let I;return e[29]!==k||e[30]!==h||e[31]!==b?(I=s.jsxs("div",{className:"bg-white rounded p-2 px-3 d-flex flex-column gap-2 shadow-sm",children:[h,b,k]}),e[29]=k,e[30]=h,e[31]=b,e[32]=I):I=e[32],I},bu=n=>{const e=l.compilerRuntimeExports.c(18),{approval:t,apiApprovalDelegations:o,appEmployeeDetail:a}=n,{ProjectIconComponent:i,texts:r}=w.useContext(l.LuminusComponentsContext),{approval:c}=r,{data:d}=Fe.useGetApiData(o);let u;e[0]!==t||e[1]!==d?(u=d?d.filter(h=>{var b;return((b=h.approval)==null?void 0:b.id)===t.id}):null,e[0]=t,e[1]=d,e[2]=u):u=e[2];const m=u;let p;e[3]!==c.delegations.title?(p=s.jsx(l.Typography,{variant:"body",children:c.delegations.title}),e[3]=c.delegations.title,e[4]=p):p=e[4];let f;e[5]!==i||e[6]!==a||e[7]!==m?(f=m&&m.length>0?s.jsx("div",{className:"list-group",children:m.map(h=>{var b,j,S,N;return s.jsxs("div",{className:"list-group-item p-2 px-3",children:[s.jsxs(l.Typography,{variant:"body2",className:"row g-0",children:[s.jsx("div",{className:"col-5 d-flex align-items-center",children:s.jsx(we.Link,{to:a(((b=h.employee)==null?void 0:b.id)??0),className:"link text-decoration-line-through link-secondary",children:((j=h.employee)==null?void 0:j.name)??"-"})}),s.jsx("div",{className:"col-2 text-center d-flex align-items-center justify-content-center",children:s.jsx(i,{icon:"arrow-right"})}),s.jsx("div",{className:"col-5 text-end d-flex-align-items-center",children:s.jsx(we.Link,{to:a(((S=h.delegate)==null?void 0:S.id)??0),className:"link",children:((N=h.delegate)==null?void 0:N.name)??"-"})})]}),s.jsxs(l.Typography,{variant:"caption",children:[h.dateFrom?l.formatDate(h.dateFrom):"N/A"," -"," ",h.dateTo?l.formatDate(h.dateTo):"N/A"]})]},h.id)})}):null,e[5]=i,e[6]=a,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==f?(x=s.jsx("div",{className:"overflow-auto h-100",children:f}),e[9]=f,e[10]=x):x=e[10];let g;e[11]!==m||e[12]!==c.delegations.noDelegations?(g=m&&m.length===0?s.jsx(l.Alert,{variant:"secondary",size:"sm",children:c.delegations.noDelegations}):null,e[11]=m,e[12]=c.delegations.noDelegations,e[13]=g):g=e[13];let y;return e[14]!==p||e[15]!==x||e[16]!==g?(y=s.jsxs("div",{className:"bg-white rounded border p-2 px-3 d-flex flex-column gap-2 overflow-hidden h-max-100",children:[p,x,g]}),e[14]=p,e[15]=x,e[16]=g,e[17]=y):y=e[17],y},ju=n=>{var S,N;const e=l.compilerRuntimeExports.c(26),{approval:t,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,apiApprovalDelegations:r,EmployeePickerComponent:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{approval:u}=d,m=t.name??"";let p;e[0]!==m?(p=s.jsx(l.Typography,{variant:"h6",children:m}),e[0]=m,e[1]=p):p=e[1];let f;e[2]!==t.lastExecutionDate||e[3]!==u?(f=t.lastExecutionDate?s.jsxs(l.Typography,{variant:"caption",children:[u.definitions.lastExecuted," ",l.formatDate(t.lastExecutionDate)]}):null,e[2]=t.lastExecutionDate,e[3]=u,e[4]=f):f=e[4];let x;e[5]!==p||e[6]!==f?(x=s.jsxs("div",{className:"px-4 pt-1 d-flex align-items-center justify-content-between",children:[p,f]}),e[5]=p,e[6]=f,e[7]=x):x=e[7];let g;e[8]!==c||e[9]!==i||e[10]!==a||e[11]!==t.levels||e[12]!==o?(g=(N=(S=t.levels)==null?void 0:S.sort(Su))==null?void 0:N.map(v=>s.jsx(vu,{level:v,reloadApproval:o,appEmployeeDetail:a,apiPostChangeEmployee:i,EmployeePickerComponent:c},v.id)),e[8]=c,e[9]=i,e[10]=a,e[11]=t.levels,e[12]=o,e[13]=g):g=e[13];let y;e[14]!==g?(y=s.jsx("div",{className:"d-flex flex-column gap-2 overflow-auto h-100 p-3 px-4",children:g}),e[14]=g,e[15]=y):y=e[15];let h;e[16]!==x||e[17]!==y?(h=s.jsx("div",{className:"col-7 overflow-hidden h-100",children:s.jsxs("div",{className:"d-flex flex-column gap-0 overflow-hidden h-100",children:[x,y]})}),e[16]=x,e[17]=y,e[18]=h):h=e[18];let b;e[19]!==r||e[20]!==a||e[21]!==t?(b=s.jsx("div",{className:"col-5 overflow-hidden h-100",children:s.jsx(bu,{approval:t,apiApprovalDelegations:r,appEmployeeDetail:a})}),e[19]=r,e[20]=a,e[21]=t,e[22]=b):b=e[22];let j;return e[23]!==h||e[24]!==b?(j=s.jsxs("div",{className:"row g-0 overflow-hidden h-100",children:[h,b]}),e[23]=h,e[24]=b,e[25]=j):j=e[25],j};function Su(n,e){return n.index-e.index}const At={apiApprovalDefinitions:"/approval/definition",apiApprovalDefinitionDetail:n=>`/approval/definition/${n}`,apiPostChangeEmployee:"/approval/definition/approver/edit",apiApprovalDelegations:"/approval/delegation"},Sn={appApprovalsDelegations:"/approvals/delegations",appEmployeeDetail:n=>`/employees/${n}`},Cu=n=>{const e=l.compilerRuntimeExports.c(43),{appUrls:t,apiUrls:o,EmployeePickerComponent:a}=n,{appApprovalsDelegations:i,appEmployeeDetail:r}=t===void 0?Sn:t,c=i===void 0?Sn.appApprovalsDelegations:i,d=r===void 0?Sn.appEmployeeDetail:r,{apiApprovalDefinitions:u,apiApprovalDefinitionDetail:m,apiPostChangeEmployee:p,apiApprovalDelegations:f}=o===void 0?At:o,x=u===void 0?At.apiApprovalDefinitions:u,g=m===void 0?At.apiApprovalDefinitionDetail:m,y=p===void 0?At.apiPostChangeEmployee:p,h=f===void 0?At.apiApprovalDelegations:f,{ProjectIconComponent:b,texts:j}=w.useContext(l.LuminusComponentsContext),{approval:S}=j,{data:N}=Fe.useGetApiData(x),[v,C]=pt.useSearchQueryState("approval",null),k=v??0;let I;e[0]!==g||e[1]!==k?(I=g(k),e[0]=g,e[1]=k,e[2]=I):I=e[2];const T=v!==null;let L;e[3]!==T?(L={enabled:T},e[3]=T,e[4]=L):L=e[4];const{data:E,reloadData:D}=Fe.useGetApiData(I,L);let _,P;e[5]!==N||e[6]!==v||e[7]!==C?(_=()=>{var U;v||C(((U=N==null?void 0:N.at(0))==null?void 0:U.id)??null)},P=[N,v,C],e[5]=N,e[6]=v,e[7]=C,e[8]=_,e[9]=P):(_=e[8],P=e[9]),w.useEffect(_,P);let $;e[10]!==S.definitions.title?($=s.jsx(l.Typography,{variant:"h3",children:S.definitions.title}),e[10]=S.definitions.title,e[11]=$):$=e[11];let R;e[12]!==b?(R=s.jsx(b,{icon:"link"}),e[12]=b,e[13]=R):R=e[13];let F;e[14]!==c||e[15]!==R||e[16]!==S.definitions.delegationsDefinitions?(F=s.jsx(l.ContextButton,{as:"link",href:c,icon:R,children:S.definitions.delegationsDefinitions}),e[14]=c,e[15]=R,e[16]=S.definitions.delegationsDefinitions,e[17]=F):F=e[17];let M;e[18]!==$||e[19]!==F?(M=s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[$,F]}),e[18]=$,e[19]=F,e[20]=M):M=e[20];let O;e[21]!==b||e[22]!==N||e[23]!==v||e[24]!==C?(O=N==null?void 0:N.sort(Nu).map(U=>s.jsxs("div",{role:"button",className:l.classNames("list-group-item list-group-item-action p-2 d-flex gap-3 align-items-center justify-content-between",{"bg-primary text-white":v===U.id}),onClick:()=>C(U.id),children:[s.jsx("span",{children:U.name}),s.jsxs(l.Typography,{variant:"caption",className:"d-flex align-items-center gap-1",children:[s.jsx(b,{icon:"menu"}),U.levelCount]})]},U.id)),e[21]=b,e[22]=N,e[23]=v,e[24]=C,e[25]=O):O=e[25];let B;e[26]!==O?(B=s.jsx("div",{className:"col-2 overflow-hidden h-100",children:s.jsx(l.Typography,{variant:"body2",className:"overflow-x-hidden overflow-y-auto h-100",children:s.jsx("div",{className:"list-group",children:O})})}),e[26]=O,e[27]=B):B=e[27];let H;e[28]!==a||e[29]!==h||e[30]!==y||e[31]!==d||e[32]!==E||e[33]!==D?(H=E?s.jsx(ju,{approval:E,reloadApproval:D,appEmployeeDetail:d,apiPostChangeEmployee:y,EmployeePickerComponent:a,apiApprovalDelegations:h}):null,e[28]=a,e[29]=h,e[30]=y,e[31]=d,e[32]=E,e[33]=D,e[34]=H):H=e[34];let z;e[35]!==H?(z=s.jsx("div",{className:"col-10 overflow-hidden h-100",children:H}),e[35]=H,e[36]=z):z=e[36];let W;e[37]!==B||e[38]!==z?(W=s.jsxs("div",{className:"row g-0 h-max-100 overflow-hidden",children:[B,z]}),e[37]=B,e[38]=z,e[39]=W):W=e[39];let A;return e[40]!==M||e[41]!==W?(A=s.jsx(l.PageContainer,{variant:"fullScreen",title:M,children:W}),e[40]=M,e[41]=W,e[42]=A):A=e[42],A};function Nu(n,e){return(n.name??"").localeCompare(e.name??"")}const wu=({overviewApiPath:n=e=>`/notification/email/overview?date=${e}`})=>{const{ProjectIconComponent:e,texts:{emailOverview:t}}=w.useContext(l.LuminusComponentsContext),[o,a]=pt.useSearchQueryState("date",Rt(new Date,{representation:"date"})),i=w.useMemo(()=>o?l.parseISO(o):new Date,[o]),{data:r}=Fe.useGetApiData(n(Rt(i,{representation:"date"}))),c=w.useCallback(p=>{a(Rt(jl(i,p),{representation:"date"}))},[i,a]),[d,u]=pt.useSearchQueryState("email",null),m=w.useMemo(()=>d?r==null?void 0:r.find(p=>p.id===d):null,[d,r]);return s.jsx(l.PageContainer,{variant:"fullScreen",title:s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"h3",children:t.title}),s.jsxs("div",{className:"d-flex gap-1 align-items-center justify-content-start",children:[s.jsx(l.IconButton,{onClick:()=>c(-1),children:s.jsx(e,{icon:"chevron-left"})}),s.jsx(l.TextInput,{type:"date",withoutLabel:!0,value:o,onChange:p=>a((p==null?void 0:p.toString())??""),size:"sm",className:"mb-1"}),s.jsx(l.IconButton,{onClick:()=>c(1),children:s.jsx(e,{icon:"chevron-right"})})]})]}),children:r!==null&&r.length<1?s.jsx(l.Alert,{variant:"warning",children:t.noMails}):s.jsxs("div",{className:"d-flex overflow-hidden gap-3 h-100",children:[s.jsx("div",{className:"h-100 overflow-y-auto overflow-x-hidden",style:{minWidth:"260px"},children:s.jsx("div",{className:"list-group",children:r==null?void 0:r.map(p=>s.jsxs("div",{role:"button",onClick:()=>u(p.id),className:l.classNames("list-group-item list-group-item-action d-flex gap-3 justify-content-between p-2",{active:d===p.id}),children:[s.jsx(l.Typography,{variant:"body2",children:p.subject}),s.jsx(l.Typography,{variant:"caption",children:l.format(l.parseISO(p.date??""),"HH:mm")})]},p.id))})}),m?s.jsxs("div",{className:"w-100 h-100 overflow-hidden bg-white rounded shadow-sm p-0",children:[s.jsx("div",{className:"mb-3 p-3 bg-darker",children:s.jsxs("div",{className:"row gx-3",children:[s.jsxs("div",{className:"col-8",children:[s.jsx(l.Typography,{variant:"caption",children:l.format(l.parseISO((m==null?void 0:m.date)??""),"dd.MM.yyyy HH:mm")}),s.jsx(l.Typography,{variant:"h6",children:(m==null?void 0:m.subject)??""})]}),s.jsxs("div",{className:"col-4",children:[s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",children:t.from})}),s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",className:"text-end fw-bold",children:(m==null?void 0:m.sender)??"-"})})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",children:t.to})}),s.jsx("div",{className:"col-6",children:s.jsx(l.Typography,{variant:"body2",className:"text-end fw-bold",children:(m==null?void 0:m.recipient)??"-"})})]})]})]})}),s.jsx("iframe",{title:"email-body",srcDoc:(m==null?void 0:m.body)??"",width:"100%",height:"100%"})]}):null]})})},Iu="_placeholder_1qjhc_5",ku="_small_1qjhc_9",Tu="_medium_1qjhc_12",_u="_large_1qjhc_15",Du="_message_1qjhc_20",Eu="_ai-loading-bubbles_1qjhc_25",Lu="_bubble_1qjhc_28",Ru="_animate-bounceDelay_1qjhc_45",Fu="_animate-bounceDelay200_1qjhc_49",$u="_animate-bounceDelay400_1qjhc_53",ct={placeholder:Iu,small:ku,medium:Tu,large:_u,message:Du,aiLoadingBubbles:Eu,bubble:Lu,animateBounceDelay:Ru,animateBounceDelay200:Fu,animateBounceDelay400:$u},Xt={getHistory:"/documentation/history",deleteHistory:"/documentation/history",postQuestion:"/documentation/aiPrompt"},Pu=n=>{const e=l.compilerRuntimeExports.c(84),{isOpen:t,setIsOpen:o,BIcon:a,documentationUrl:i,apiEndpoints:r}=n,{getHistory:c,deleteHistory:d,postQuestion:u}=r===void 0?Xt:r,m=c===void 0?Xt.getHistory:c,p=d===void 0?Xt.deleteHistory:d,f=u===void 0?Xt.postQuestion:u,x=l.useAxios(),{ProjectIconComponent:g,texts:y}=w.useContext(l.LuminusComponentsContext),{docsAIChat:h}=y;let b;e[0]!==h.greeting?(b=ae=>[{dateTime:!ae||ae.length<1?new Date(Date.now()):Sl(new Date(ae[0].dateTime),-1),message:{foundInDocs:!1,answer:h.greeting,sources:null,links:null},source:"ai"},...(ae==null?void 0:ae.map(Mu))??[]],e[0]=h.greeting,e[1]=b):b=e[1];const j=b;let S;e[2]!==j||e[3]!==t?(S={dataTransformer:j,enabled:t},e[2]=j,e[3]=t,e[4]=S):S=e[4];const{data:N,setData:v,isLoading:C}=Fe.useGetApiData(m,S),[k,I]=w.useState(""),[T,L]=w.useState(!1),E=w.useRef(null);let D;e[5]!==x||e[6]!==f||e[7]!==v?(D=async ae=>{L(!0),x.get(`${f}?question=${ae}`).then(ke=>{v(Ne=>ke.data.answer?[...Ne??[],{dateTime:new Date(Date.now()),message:ke.data,source:"ai"}]:Ne)}).finally(()=>L(!1))},e[5]=x,e[6]=f,e[7]=v,e[8]=D):D=e[8];const _=D;let P;e[9]!==_||e[10]!==k||e[11]!==v?(P=()=>{k.trim()&&(v(ae=>k?[...ae??[],{dateTime:new Date(Date.now()),message:k,source:"user"}]:ae),_(k),I(""))},e[9]=_,e[10]=k,e[11]=v,e[12]=P):P=e[12];const $=P;let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{var ae;E.current&&(E.current.scrollTop=((ae=E.current)==null?void 0:ae.scrollHeight)??0)},e[13]=R):R=e[13];let F;e[14]!==T||e[15]!==N?(F=[T,N],e[14]=T,e[15]=N,e[16]=F):F=e[16],w.useEffect(R,F);const M=w.useRef(null);let O,B;e[17]!==t?(O=()=>{t&&setTimeout(()=>{var ae;(ae=M.current)==null||ae.focus()},300)},B=[t],e[17]=t,e[18]=O,e[19]=B):(O=e[18],B=e[19]),w.useEffect(O,B);let H;e[20]!==x||e[21]!==p||e[22]!==j||e[23]!==v?(H=()=>{x.delete(p).then(()=>{v(j([]))})},e[20]=x,e[21]=p,e[22]=j,e[23]=v,e[24]=H):H=e[24];const z=H;let W;e[25]!==o?(W=()=>o(!1),e[25]=o,e[26]=W):W=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A={marginTop:"2px",marginRight:"-2px"},e[27]=A):A=e[27];let U;e[28]!==a?(U=s.jsx(a,{height:24,style:A}),e[28]=a,e[29]=U):U=e[29];let K;e[30]!==h.title?(K=s.jsx(Lt.Title,{className:"w-100",children:h.title}),e[30]=h.title,e[31]=K):K=e[31];let V;e[32]!==g?(V=s.jsx(g,{icon:"link"}),e[32]=g,e[33]=V):V=e[33];let G;e[34]!==i||e[35]!==V?(G=s.jsx(l.ContextButton,{className:"me-3 text-nowrap",as:"link",href:i,target:"__blank",children:V}),e[34]=i,e[35]=V,e[36]=G):G=e[36];let Z;e[37]!==G||e[38]!==h.docs?(Z=s.jsx(l.SimpleTooltip,{placement:"bottom",text:h.docs,children:G}),e[37]=G,e[38]=h.docs,e[39]=Z):Z=e[39];let X;e[40]!==U||e[41]!==K||e[42]!==Z?(X=s.jsxs(Lt.Header,{closeButton:!0,children:[U,K,Z]}),e[40]=U,e[41]=K,e[42]=Z,e[43]=X):X=e[43];let le;e[44]!==i||e[45]!==C||e[46]!==N?(le=C?s.jsxs(s.Fragment,{children:[s.jsx(dt,{as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.medium)})}),s.jsx(dt,{className:"d-flex justify-content-end",as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.small)})}),s.jsx(dt,{as:"div",animation:"glow",children:s.jsx(dt,{className:l.classNames(ct.placeholder,ct.large)})})]}):N==null?void 0:N.sort(Au).map((ae,ke)=>s.jsxs("div",{className:l.classNames(ct.message,"px-3 py-2",{"align-self-start":ae.source==="ai","bg-primary":ae.source==="ai"&&ae.message.foundInDocs,"bg-info":ae.source==="ai"&&!ae.message.foundInDocs,"bg-darker align-self-end":ae.source==="user"}),children:[s.jsx(l.Typography,{variant:"body",className:ae.source==="ai"?"text-white":"",children:ae.source==="ai"?ae.message.answer:ae.message}),ae.source==="ai"&&ae.message.links&&s.jsx("div",{className:"d-flex gap-2 flex-column mt-3",children:ae.message.links.map(Bu)}),ae.source==="ai"&&ae.message.sources&&ae.message.sources.filter(Ou).length>0&&s.jsxs(s.Fragment,{children:[s.jsxs(l.Typography,{variant:"body2",className:"text-white mt-3 pt-2 border-top",children:["Dokumentace (",ae.message.sources.filter(zu).length,")"]}),s.jsx("div",{className:"d-flex gap-2 flex-row flex-wrap my-2",children:ae.message.sources.filter(Hu).map((Ne,De)=>{var re;return s.jsx("a",{href:`${i}/${(re=Ne.filename.split(".").at(0))==null?void 0:re.split("_").join("/")}`,target:"_blank",className:"overflow-hidden",rel:"noreferrer",children:s.jsxs(No,{color:"light",className:"gap-1 overflow-hidden",children:[s.jsx(l.MdOutlineSource,{}),s.jsx("span",{className:"text-truncate",children:Ne.name})]})},De)})})]})]},ke)),e[44]=i,e[45]=C,e[46]=N,e[47]=le):le=e[47];let q;e[48]!==T?(q=T?s.jsx("div",{className:l.classNames("px-3 py-2 align-self-start bg-info",ct.aiLoadingBubbles),children:s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay)}),s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay200)}),s.jsx("span",{className:l.classNames(ct.bubble,ct.animateBounceDelay400)})]})}):null,e[48]=T,e[49]=q):q=e[49];let oe;e[50]!==le||e[51]!==q?(oe=s.jsxs("div",{ref:E,className:"h-100 d-flex flex-column overflow-auto gap-3 pb-2 pe-2",children:[le,q]}),e[50]=le,e[51]=q,e[52]=oe):oe=e[52];let ce;e[53]===Symbol.for("react.memo_cache_sentinel")?(ce=ae=>I(ae.target.value??""),e[53]=ce):ce=e[53];let fe;e[54]!==$?(fe=ae=>{ae.key==="Enter"&&$()},e[54]=$,e[55]=fe):fe=e[55];let pe;e[56]!==k||e[57]!==fe||e[58]!==h.yourMessage?(pe=s.jsx(l.Form.Control,{ref:M,type:"text",size:"sm",placeholder:h.yourMessage,value:k,onChange:ce,className:"bg-white",autoFocus:!0,onKeyDown:fe}),e[56]=k,e[57]=fe,e[58]=h.yourMessage,e[59]=pe):pe=e[59];let J;e[60]===Symbol.for("react.memo_cache_sentinel")?(J={height:"29px",width:"50px"},e[60]=J):J=e[60];let Y;e[61]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(l.MdOutlineMessage,{}),e[61]=Y):Y=e[61];let Q;e[62]!==$?(Q=s.jsx(l.PrimaryButton,{style:J,onClick:$,size:"sm",children:Y}),e[62]=$,e[63]=Q):Q=e[63];let ne;e[64]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(l.Dropdown$1.Toggle,{split:!0,variant:"outline-primary",className:"py-0 px-2",style:{height:"29px"}}),e[64]=ne):ne=e[64];let ee;e[65]!==h.clearChat?(ee=s.jsx(l.Typography,{variant:"body",children:h.clearChat}),e[65]=h.clearChat,e[66]=ee):ee=e[66];let te;e[67]!==z||e[68]!==ee?(te=s.jsx(l.Dropdown$1.Menu,{className:"p-0 shadow-sm border",children:s.jsx(l.Dropdown$1.Item,{onClick:z,className:"rounded py-2",children:ee})}),e[67]=z,e[68]=ee,e[69]=te):te=e[69];let se;e[70]!==Q||e[71]!==te?(se=s.jsxs(l.Dropdown$1,{as:Xs,children:[Q,ne,te]}),e[70]=Q,e[71]=te,e[72]=se):se=e[72];let ue;e[73]!==pe||e[74]!==se?(ue=s.jsxs("div",{className:"d-flex rounded gap-1 align-items-center p-2 border-top bg-darker mt-2",children:[pe,se]}),e[73]=pe,e[74]=se,e[75]=ue):ue=e[75];let me;e[76]!==oe||e[77]!==ue?(me=s.jsxs(Lt.Body,{className:"offcanvas-wide d-flex flex-column overflow-hidden pt-0 mt-1",children:[oe,ue]}),e[76]=oe,e[77]=ue,e[78]=me):me=e[78];let be;return e[79]!==t||e[80]!==W||e[81]!==X||e[82]!==me?(be=s.jsxs(Lt,{placement:"end",show:t,onHide:W,children:[X,me]}),e[79]=t,e[80]=W,e[81]=X,e[82]=me,e[83]=be):be=e[83],be};function Mu(n){return{dateTime:new Date(n.dateTime),message:n.source==="ai"?JSON.parse(n.message):n.message,source:n.source}}function Au(n,e){return n.dateTime.getTime()-e.dateTime.getTime()}function Bu(n,e){return s.jsx(we.Link,{to:n.path,children:s.jsxs(l.Button,{variant:"light",size:"sm",className:"w-100 d-flex justify-content-between align-items-center gap-1",children:[n.name,s.jsx(l.MdOutlineCallMade,{})]})},e)}function Ou(n){return n.filename.includes("_")}function zu(n){return n.filename.includes("_")}function Hu(n){return n.filename.includes("_")}const Wn=["slice","options","formats","conditions"],Vs=n=>{const e=n.current.flexmonster.getReport({withDefaults:!0});if(typeof e=="string")throw alert("report is string"),new Error("report is string");const t={};return Wn.forEach(o=>{t[o]=e[o]}),JSON.stringify(t)},Vu=n=>{if(n.settings){const e=JSON.parse(n.settings);return Wn.forEach(t=>{e[t]===void 0&&(e[t]=null)}),e}return{}},Uu=n=>{const e={};return Wn.forEach(t=>{e[t]=(n==null?void 0:n[t])??void 0}),e},Wu=n=>n&&n.type==="header"&&n.member&&n.member.caption!=="All"&&n.label==="",Us=(n,e)=>n.hierarchy&&n.hierarchy.uniqueName===e,Ws=n=>!n.member&&!n.isDrillThrough,Gs=(n,e)=>typeof n=="function"?n(e):n.replace(":id",e),dl=({dataSource:n,settings:e,pivotRef:t,localization:o,licenseKey:a,hyperlinkColumn:i,roomPasportization:r,enabled:c=!0})=>{const{texts:{reports:d}}=w.useContext(l.LuminusComponentsContext),[u,m]=w.useState(!1),p=w.useRef(null),f=t??p,x=w.useMemo(()=>({localization:o}),[o]),g=w.useCallback(v=>{const C=v.find(I=>I.id==="fm-tab-export");if((C==null?void 0:C.menu)==null||f.current==null)return v;const k=C.menu.find(I=>I.id==="fm-tab-export-pdf");return k&&(k.handler=()=>{f.current.flexmonster.exportTo("pdf",{useCustomizeCellForData:!0,fontUrl:"https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf"})}),v},[f]),y=w.useCallback(v=>{v=g(v),delete v[0],delete v[1],delete v[2];const C=[{id:"fm-tab-expand",title:d.expandAll,handler:f.current.flexmonster.expandAllData,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'},{id:"fm-tab-collapse",title:d.collapseAll,handler:f.current.flexmonster.collapseAllData,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'}];return v.unshift({id:"fm-tab-expand",title:d.expand,icon:'<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',menu:C,rightGroup:!0}),v},[f,d.collapseAll,d.expand,d.expandAll,g]),h=v=>{const C=v.getTabs();v.getTabs=()=>y(C)},b=w.useMemo(()=>n&&n.mapping?Object.values(n.mapping).filter(v=>v.caption.includes("P:")).map(v=>({uniqueName:v.caption.replace("P:",""),caption:v.caption})):[],[n]),j=w.useMemo(()=>{var C,k,I,T;const v=(C=f.current)==null?void 0:C.flexmonster.getReport();return v&&v.slice?{...v.slice,rows:[...((k=v.slice.rows)==null?void 0:k.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b],columns:[...((I=v.slice.columns)==null?void 0:I.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b],measures:[...((T=v.slice.measures)==null?void 0:T.filter(L=>{var E;return!((E=L.caption)!=null&&E.includes("P:"))}))??[],...b]}:null},[b,f]);w.useEffect(()=>{var v,C,k,I;if(u&&c){if(r&&j){const T=(v=f.current)==null?void 0:v.flexmonster.getReport(),L=T&&T.options?{...T.options,grid:{...(C=T.options)==null?void 0:C.grid,autoSwitchToCompact:!1}}:{};(k=f.current)==null||k.flexmonster.setReport({...T,dataSource:n,slice:j,options:L})}else(I=f.current)==null||I.flexmonster.updateData(n);console.log("Updating flexmonster dataSource to: ",n)}},[n,c,u,b,f,r,j]),w.useEffect(()=>{var I,T,L,E,D;if(!u||!c||e==null)return;const v=(I=f.current)==null?void 0:I.flexmonster.getReport();if(v===void 0||typeof v=="string")return;const C=Uu(e);C.options={...e==null?void 0:e.options,grid:{...(T=e==null?void 0:e.options)==null?void 0:T.grid,autoSwitchToCompact:!1},showFieldListSearch:!0,datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm:ss",timePattern:"HH:mm:ss"},r&&(C.slice={...e==null?void 0:e.slice,rows:[...((E=(L=e==null?void 0:e.slice)==null?void 0:L.rows)==null?void 0:E.filter(_=>{var P;return!((P=_.caption)!=null&&P.includes("P:"))}))??[],...b]});const k={...v,...C};(D=f.current)==null||D.flexmonster.setReport(k)},[c,u,b,f,r,e]);const S=w.useCallback((v,C)=>{var $,R,F;const k=C==null?void 0:C.value,I=C==null?void 0:C.label;if(Wu(C)){v.text=(($=C.member)==null?void 0:$.caption)??"";const M=v.style["padding-left"]??"4px",O=parseInt(M,10);v.style["padding-left"]=O+11+"px"}if(typeof k=="number"&&!Number.isFinite(k)&&C.type==="value"&&((R=C==null?void 0:C.measure)==null?void 0:R.type)==="number"&&(I==="Infinity"||I==="-Infinity"||I==="NaN")&&(v.text=""),!i||!Us(C,i.idColumn)||Ws(C))return;const T=(F=C.escapedLabel)==null?void 0:F.toString();if(T===void 0)return;const L=Gs(i.url,T),E="style='color: #00a45a; text-decoration: underline; cursor: pointer;'",D=C.type==="header"?"onclick='event.stopImmediatePropagation()'":"",_=C.isDrillThrough||C.type==="header"?`href='${L}' target='_blank'`:"";v.style&&(v.style["z-index"]=1);const P=`<a ${_} ${E} ${D}>${C.escapedLabel}</a>`;v.text=P},[i]),N=w.useCallback(v=>{if(!i||!Us(v,i.idColumn)||Ws(v))return;const C=Gs(i.url,v.escapedLabel??"");window.open(C??"","_blank","noreferrer")},[i]);return s.jsx(s.Fragment,{children:s.jsx(yl.Pivot,{ref:f,global:x,licenseKey:a,toolbar:!0,height:"100%",beforetoolbarcreated:h,ready:()=>{m(!0)},width:"100%",customizeCell:S,cellclick:N})})},Gu=(n,e,t,o)=>{const{texts:{reports:a}}=w.useContext(l.LuminusComponentsContext),{prompt:i}=l.usePrompt(),{confirm:r}=l.useConfirm(),c=l.useAxios(),{user:d}=w.useContext(l.UserContext),{startLoading:u,stopLoading:m}=w.useContext(l.LoadingContext),{addNotification:p}=l.useNotifications(),f=w.useCallback(async j=>{u("report-versionSavingAs");try{const S=await c.post("/reports/version",j);p(a.saveSuccessful,"success"),await o(S.data)}finally{m("report-versionSavingAs")}},[p,o,c,a.saveSuccessful,u,m]),x=w.useCallback(async()=>{if(t===null){p("none open","warning");return}if(!await r(a.confirmOverwriteSave))return;const S=Vs(e);f({reportSourceName:n,reportVersionId:t,settings:S})},[p,r,e,n,a.confirmOverwriteSave,f,t]),g=w.useCallback(async()=>{const j=await i(a.enterName,{input:"input",required:!0});if(j===null)return;const S=Vs(e);f({reportSourceName:n,name:j,settings:S})},[e,i,n,a.enterName,f]),y=w.useCallback(async()=>{u("report-versionSavingAs");try{await c.put("/reports/archive",{reportVersionId:t??void 0,reportSourceName:n}),p(a.deleteSuccessful,"success")}finally{m("report-versionSavingAs")}},[p,c,n,a.deleteSuccessful,t,u,m]),h=w.useCallback(async()=>{u("report-versionSavingAs");try{await c.post("/reports/version-restrictions",{reportVersionId:t??void 0,userRestricts:[{employeeId:d.personalNumber,addRights:!1}]}),p(a.detachSuccessful,"success")}finally{m("report-versionSavingAs")}},[p,c,a.detachSuccessful,t,u,m,d.personalNumber]),b=w.useCallback(async j=>{if(t===null){p(a.noReportVersionSelected,"warning");return}u("report-versionRenaming");try{await c.put("/reports/rename",{reportVersionId:t,reportSourceName:n,newName:j}),p(a.renameSuccessful,"success")}finally{m("report-versionRenaming")}},[p,c,a.renameSuccessful,a.noReportVersionSelected,t,n,u,m]);return{saveAs:g,save:x,archive:y,detach:h,rename:b}},Ku=n=>{const e=l.useAxios(),{startLoading:t,stopLoading:o}=w.useContext(l.LoadingContext);return{changeEmployeeRights:w.useCallback(async(i,r)=>{let c=null;t("reportSharing-addPerson");try{c=(await e.post("/reports/version-restrictions",{reportVersionId:n,userRestricts:[{employeeId:i,addRights:r}]})).data}finally{o("reportSharing-addPerson")}return c},[e,n,t,o])}},qu=n=>{const e=l.compilerRuntimeExports.c(50),{isOpen:t,onHide:o,usersData:a,reportVersionId:i,EmployeePicker:r,setReportVersion:c}=n,{ProjectIconComponent:d,texts:u}=w.useContext(l.LuminusComponentsContext),{reports:m}=u,{confirm:p}=l.useConfirm(),[f,x]=w.useState(null),{changeEmployeeRights:g}=Ku(i);let y;e[0]!==c||e[1]!==a?(y=M=>{const O=typeof M=="function"?M(a??[]):M;c(B=>B===null?null:{...B,users:O.filter(Yu)})},e[0]=c,e[1]=a,e[2]=y):y=e[2];const h=y;let b;e[3]!==f||e[4]!==g||e[5]!==h?(b=async()=>{if(f===null)return;const O=(await g(f.id,!0)).map(Qu);h(B=>[...B,...O]),x(null)},e[3]=f,e[4]=g,e[5]=h,e[6]=b):b=e[6];const j=b;let S;e[7]!==g||e[8]!==p||e[9]!==m||e[10]!==h?(S=async M=>{if(!await p(m.removeSharingWith(M)))return;await g(M,!1)&&h(H=>(H==null?void 0:H.filter(z=>z.id!==M))??[])},e[7]=g,e[8]=p,e[9]=m,e[10]=h,e[11]=S):S=e[11];const N=S;let v;e[12]!==m.reportSharing?(v=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.reportSharing})}),e[12]=m.reportSharing,e[13]=v):v=e[13];let C;e[14]!==m.sharedWith?(C=s.jsx(l.Typography,{variant:"h6",children:m.sharedWith}),e[14]=m.sharedWith,e[15]=C):C=e[15];let k;e[16]!==m.noone||e[17]!==a?(k=a&&a.length===0?s.jsx("div",{className:"px-2 text-muted",children:m.noone.toLowerCase()}):null,e[16]=m.noone,e[17]=a,e[18]=k):k=e[18];let I;e[19]!==d||e[20]!==N||e[21]!==a?(I=a==null?void 0:a.map(M=>s.jsxs(l.ListGroupItem,{className:"d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1",children:[M.lastName," ",M.firstName," [",M.id,"]",s.jsx(l.IconButton,{color:"danger",onClick:()=>N(M.id),children:s.jsx(d,{icon:"delete"})})]},M.id)),e[19]=d,e[20]=N,e[21]=a,e[22]=I):I=e[22];let T;e[23]!==k||e[24]!==I?(T=s.jsxs(l.ListGroup,{variant:"flush",children:[k,I]}),e[23]=k,e[24]=I,e[25]=T):T=e[25];let L;e[26]!==m.addSharing?(L=s.jsx(l.Typography,{variant:"h6",className:"mt-2 mb-2",children:m.addSharing}),e[26]=m.addSharing,e[27]=L):L=e[27];let E;e[28]===Symbol.for("react.memo_cache_sentinel")?(E=M=>{if(M===null||typeof M.id!="number"){x(null);return}x(M)},e[28]=E):E=e[28];let D;e[29]!==r||e[30]!==f||e[31]!==m.shareWith?(D=s.jsx("div",{className:"flex-grow-1",children:s.jsx(r,{label:m.shareWith,onSelect:E,value:f})}),e[29]=r,e[30]=f,e[31]=m.shareWith,e[32]=D):D=e[32];const _=f===null;let P;e[33]!==j||e[34]!==m.add||e[35]!==_?(P=s.jsx(l.PrimaryButton,{onClick:j,disabled:_,children:m.add}),e[33]=j,e[34]=m.add,e[35]=_,e[36]=P):P=e[36];let $;e[37]!==D||e[38]!==P?($=s.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[D,P]}),e[37]=D,e[38]=P,e[39]=$):$=e[39];let R;e[40]!==L||e[41]!==$||e[42]!==C||e[43]!==T?(R=s.jsxs(l.Modal.Body,{children:[C,T,L,$]}),e[40]=L,e[41]=$,e[42]=C,e[43]=T,e[44]=R):R=e[44];let F;return e[45]!==t||e[46]!==o||e[47]!==R||e[48]!==v?(F=s.jsxs(l.Modal,{show:t,onHide:o,children:[v,R]}),e[45]=t,e[46]=o,e[47]=R,e[48]=v,e[49]=F):F=e[49],F};function Yu(n){return n.isReportOwner===!1}function Qu(n){return{id:n.user.id,kid:n.user.kid,firstName:n.user.firstName,lastName:n.user.lastName,isReportOwner:!1}}const Zu=(n,e)=>{const t=l.compilerRuntimeExports.c(6),[o,a]=w.useState(null);let i,r;t[0]!==e||t[1]!==n?(i=()=>{n.then(d=>{const{default:u}=d,m=e!==void 0?e(u):u;a(m)})},r=[e,n],t[0]=e,t[1]=n,t[2]=i,t[3]=r):(i=t[2],r=t[3]),w.useEffect(i,r);let c;return t[4]!==o?(c={mappings:o},t[4]=o,t[5]=c):c=t[5],c},Xu=n=>{var Ie;const e=l.compilerRuntimeExports.c(151),{reportType:t,title:o,data:a,filterElements:i,getReportRoute:r,localization:c,licenseKey:d,EmployeePicker:u,localizationJsonFile:m,localizationTransformer:p,hyperlinkColumn:f,roomPasportization:x}=n,g=x===void 0?!1:x,{texts:y}=w.useContext(l.LuminusComponentsContext),{reports:h}=y,{confirm:b}=l.useConfirm(),{prompt:j}=l.usePrompt(),S=we.useNavigate(),[N]=we.useSearchParams(),{id:v}=we.useParams(),C=v===void 0?null:Number(v);let k;e[0]!==r||e[1]!==S||e[2]!==t||e[3]!==N?(k=ve=>{const Be=ve===null?"":ve.toString();S(we.generatePath(r(t),{id:Be})+"?"+N.toString(),{replace:!0,flushSync:!0})},e[0]=r,e[1]=S,e[2]=t,e[3]=N,e[4]=k):k=e[4];const I=k,[T,L]=w.useState(!1),E=w.useRef(null),{user:D}=w.useContext(l.UserContext),{data:_,reloadData:P}=Fe.useGetApiData(`/reports/${t}`),{mappings:$}=Zu(m,p),[R,F]=w.useState(void 0);let M;e[5]!==I?(M=ve=>{const Be=ve.target.value,xt=Be===""?null:Number(Be);I(xt)},e[5]=I,e[6]=M):M=e[6];const O=M;let B;e[7]!==P||e[8]!==I?(B=async ve=>{await P(),I(ve)},e[7]=P,e[8]=I,e[9]=B):B=e[9];const H=B,z=C!==null;let W;e[10]!==z?(W={enabled:z,nullStateBeforeLoad:!1,nullStateOnFail:!0},e[10]=z,e[11]=W):W=e[11];const{data:A,setData:U,isLoading:K,reloadData:V}=Fe.useGetApiData(`/reports/version/${C}`,W);let G,Z;e[12]!==K||e[13]!==A?(G=()=>{var Be;if(K){F(void 0);return}if(A===null){F({});return}const ve=Vu(A)??{};F(ve),(Be=E.current)==null||Be.flexmonster.refresh()},Z=[A,K],e[12]=K,e[13]=A,e[14]=G,e[15]=Z):(G=e[14],Z=e[15]),w.useEffect(G,Z);const{save:X,saveAs:le,archive:q,detach:oe,rename:ce}=Gu(t,E,C,H);let fe;e[16]!==a?(fe=a??[],e[16]=a,e[17]=fe):fe=e[17];const pe=$??void 0;let J;e[18]!==fe||e[19]!==pe?(J={data:fe,mapping:pe},e[18]=fe,e[19]=pe,e[20]=J):J=e[20];const Y=J;let Q;e[21]!==b||e[22]!==Y||e[23]!==h.confirmRevertChanges||e[24]!==R?(Q=async()=>{var Be;await b(h.confirmRevertChanges)&&((Be=E.current)==null||Be.flexmonster.setReport({dataSource:Y,...R}))},e[21]=b,e[22]=Y,e[23]=h.confirmRevertChanges,e[24]=R,e[25]=Q):Q=e[25];const ne=Q;let ee;e[26]!==(A==null?void 0:A.ownerId)||e[27]!==D.personalNumber?(ee=()=>(A==null?void 0:A.ownerId)===D.personalNumber,e[26]=A==null?void 0:A.ownerId,e[27]=D.personalNumber,e[28]=ee):ee=e[28],A==null||A.ownerId;const te=ee();A==null||A.users;let se;e[29]!==(A==null?void 0:A.users)||e[30]!==D.personalNumber?(se=(Ie=A==null?void 0:A.users)==null?void 0:Ie.some(ve=>ve.id===D.personalNumber&&!ve.isReportOwner),e[29]=A==null?void 0:A.users,e[30]=D.personalNumber,e[31]=se):se=e[31];const ue=se;let me;e[32]!==q||e[33]!==b||e[34]!==P||e[35]!==(A==null?void 0:A.name)||e[36]!==h||e[37]!==I?(me=async()=>{await b(h.confirmDelete(A==null?void 0:A.name))&&(await q(),I(null),await P())},e[32]=q,e[33]=b,e[34]=P,e[35]=A==null?void 0:A.name,e[36]=h,e[37]=I,e[38]=me):me=e[38],A==null||A.name;const be=me;let ae;e[39]!==b||e[40]!==oe||e[41]!==P||e[42]!==(A==null?void 0:A.name)||e[43]!==h||e[44]!==I?(ae=async()=>{await b(h.confirmDetach(A==null?void 0:A.name))&&(await oe(),I(null),await P())},e[39]=b,e[40]=oe,e[41]=P,e[42]=A==null?void 0:A.name,e[43]=h,e[44]=I,e[45]=ae):ae=e[45],A==null||A.name;const ke=ae;let Ne;e[46]!==j||e[47]!==P||e[48]!==V||e[49]!==ce||e[50]!==h.enterNewName?(Ne=async()=>{const ve=await j(h.enterNewName,{input:"input",required:!0});ve!==null&&(await ce(ve),await Promise.allSettled([P(),V()]))},e[46]=j,e[47]=P,e[48]=V,e[49]=ce,e[50]=h.enterNewName,e[51]=Ne):Ne=e[51];const De=Ne;let re;e[52]!==(_==null?void 0:_.reportVersions)||e[53]!==C||e[54]!==I?(re=()=>{var ve,Be;C===null&&I(((ve=_==null?void 0:_.reportVersions.find(Ju))==null?void 0:ve.reportVersionId)??((Be=_==null?void 0:_.reportVersions[0])==null?void 0:Be.reportVersionId)??null)},e[52]=_==null?void 0:_.reportVersions,e[53]=C,e[54]=I,e[55]=re):re=e[55];const he=_==null?void 0:_.reportVersions;let ye;e[56]!==C||e[57]!==I||e[58]!==he?(ye=[he,C,I],e[56]=C,e[57]=I,e[58]=he,e[59]=ye):ye=e[59],w.useEffect(re,ye);let de;e[60]!==o?(de=s.jsx(l.Typography,{variant:"h3",children:o}),e[60]=o,e[61]=de):de=e[61];const xe=C??void 0;let je;e[62]!==(_==null?void 0:_.reportVersions)?(je=_==null?void 0:_.reportVersions.filter(em).map(tm),e[62]=_==null?void 0:_.reportVersions,e[63]=je):je=e[63];let $e;e[64]!==h.versionSelectSystem||e[65]!==je?($e=s.jsx("optgroup",{label:h.versionSelectSystem,children:je}),e[64]=h.versionSelectSystem,e[65]=je,e[66]=$e):$e=e[66];let Pe;e[67]!==(_==null?void 0:_.reportVersions)||e[68]!==D.personalNumber?(Pe=_==null?void 0:_.reportVersions.filter(ve=>ve.ownerId===D.personalNumber).map(nm),e[67]=_==null?void 0:_.reportVersions,e[68]=D.personalNumber,e[69]=Pe):Pe=e[69];let ze;e[70]!==h.versionSelectYour||e[71]!==Pe?(ze=s.jsx("optgroup",{label:h.versionSelectYour,children:Pe}),e[70]=h.versionSelectYour,e[71]=Pe,e[72]=ze):ze=e[72];let Ee;e[73]!==(_==null?void 0:_.reportVersions)||e[74]!==D.personalNumber?(Ee=_==null?void 0:_.reportVersions.filter(ve=>ve.isSystem===!1&&ve.ownerId!==D.personalNumber).map(sm),e[73]=_==null?void 0:_.reportVersions,e[74]=D.personalNumber,e[75]=Ee):Ee=e[75];let Me;e[76]!==h.versionSelectSharedWithYou||e[77]!==Ee?(Me=s.jsx("optgroup",{label:h.versionSelectSharedWithYou,children:Ee}),e[76]=h.versionSelectSharedWithYou,e[77]=Ee,e[78]=Me):Me=e[78];let He;e[79]!==O||e[80]!==xe||e[81]!==$e||e[82]!==ze||e[83]!==Me?(He=s.jsxs(l.FormSelect,{size:"sm",value:xe,onChange:O,children:[$e,ze,Me]}),e[79]=O,e[80]=xe,e[81]=$e,e[82]=ze,e[83]=Me,e[84]=He):He=e[84];let Te;e[85]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(l.MdSave,{}),e[85]=Te):Te=e[85];const Le=C===null||(A==null?void 0:A.isSystem)||!te;let Ve;e[86]!==h.save||e[87]!==X||e[88]!==Le?(Ve=s.jsx(l.ContextButton,{icon:Te,onClick:X,disabled:Le,children:h.save}),e[86]=h.save,e[87]=X,e[88]=Le,e[89]=Ve):Ve=e[89];let Ae;e[90]===Symbol.for("react.memo_cache_sentinel")?(Ae=s.jsx(l.MdSaveAs,{}),e[90]=Ae):Ae=e[90];let Ue;e[91]!==h.saveAs||e[92]!==le?(Ue=s.jsx(l.ContextButton,{icon:Ae,onClick:le,className:"flex-shrink-0",children:h.saveAs}),e[91]=h.saveAs,e[92]=le,e[93]=Ue):Ue=e[93];let Xe;e[94]===Symbol.for("react.memo_cache_sentinel")?(Xe=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle}),e[94]=Xe):Xe=e[94];let Je;e[95]!==ne||e[96]!==h.revertChanges?(Je=s.jsx(l.DropdownItem,{onClick:ne,children:h.revertChanges}),e[95]=ne,e[96]=h.revertChanges,e[97]=Je):Je=e[97];let et;e[98]===Symbol.for("react.memo_cache_sentinel")?(et=()=>L(!0),e[98]=et):et=e[98];const it=!te||(A==null?void 0:A.isSystem);let We;e[99]!==h.share||e[100]!==it?(We=s.jsx(l.DropdownItem,{onClick:et,disabled:it,children:h.share}),e[99]=h.share,e[100]=it,e[101]=We):We=e[101];let Ge;e[102]!==De||e[103]!==te||e[104]!==(A==null?void 0:A.isSystem)||e[105]!==h.rename?(Ge=te&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{onClick:De,children:h.rename}):null,e[102]=De,e[103]=te,e[104]=A==null?void 0:A.isSystem,e[105]=h.rename,e[106]=Ge):Ge=e[106];let Ke;e[107]!==be||e[108]!==te||e[109]!==(A==null?void 0:A.isSystem)||e[110]!==h.delete?(Ke=te&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{color:"danger",onClick:be,children:h.delete}):null,e[107]=be,e[108]=te,e[109]=A==null?void 0:A.isSystem,e[110]=h.delete,e[111]=Ke):Ke=e[111];let qe;e[112]!==ke||e[113]!==ue||e[114]!==(A==null?void 0:A.isSystem)||e[115]!==h.detach?(qe=ue&&!(A!=null&&A.isSystem)?s.jsx(l.DropdownItem,{color:"danger",onClick:ke,children:h.detach}):null,e[112]=ke,e[113]=ue,e[114]=A==null?void 0:A.isSystem,e[115]=h.detach,e[116]=qe):qe=e[116];let tt;e[117]!==Je||e[118]!==We||e[119]!==Ge||e[120]!==Ke||e[121]!==qe?(tt=s.jsxs(l.Dropdown,{toggle:Xe,children:[Je,We,Ge,Ke,qe]}),e[117]=Je,e[118]=We,e[119]=Ge,e[120]=Ke,e[121]=qe,e[122]=tt):tt=e[122];let Ye;e[123]!==He||e[124]!==Ve||e[125]!==Ue||e[126]!==tt?(Ye=s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[He,Ve,Ue,tt]}),e[123]=He,e[124]=Ve,e[125]=Ue,e[126]=tt,e[127]=Ye):Ye=e[127];let Qe;e[128]!==i||e[129]!==de||e[130]!==Ye?(Qe=s.jsxs("div",{className:"d-flex justify-content-start gap-3 align-items-center",children:[de,i,Ye]}),e[128]=i,e[129]=de,e[130]=Ye,e[131]=Qe):Qe=e[131];let Ze;e[132]!==Y||e[133]!==f||e[134]!==d||e[135]!==c||e[136]!==h.emptyReportDataSource||e[137]!==g||e[138]!==R?(Ze=Y.data&&Y.data.length>0?s.jsx("div",{className:"h-100 w-100",children:s.jsx(dl,{dataSource:Y,settings:R,pivotRef:E,enabled:Y.data&&Y.data.length>0,roomPasportization:g,localization:c,licenseKey:d,hyperlinkColumn:f})}):s.jsx(l.Alert,{children:h.emptyReportDataSource}),e[132]=Y,e[133]=f,e[134]=d,e[135]=c,e[136]=h.emptyReportDataSource,e[137]=g,e[138]=R,e[139]=Ze):Ze=e[139];let nt;e[140]!==Qe||e[141]!==Ze?(nt=s.jsx(l.PageContainer,{variant:"fullScreen",title:Qe,children:Ze}),e[140]=Qe,e[141]=Ze,e[142]=nt):nt=e[142];let ge;e[143]!==u||e[144]!==T||e[145]!==A||e[146]!==U?(ge=A!==null?s.jsx(qu,{isOpen:T,onHide:()=>L(!1),usersData:A.users??null,setReportVersion:U,reportVersionId:A==null?void 0:A.reportVersionId,EmployeePicker:u}):null,e[143]=u,e[144]=T,e[145]=A,e[146]=U,e[147]=ge):ge=e[147];let Ce;return e[148]!==nt||e[149]!==ge?(Ce=s.jsxs(s.Fragment,{children:[nt,ge]}),e[148]=nt,e[149]=ge,e[150]=Ce):Ce=e[150],Ce};function Ju(n){return n.isSystem===!0}function em(n){return n.isSystem===!0}function tm(n){return s.jsx("option",{value:n.reportVersionId,children:n.name},n.reportVersionId)}function nm(n){return s.jsx("option",{value:n.reportVersionId,children:n.name},n.reportVersionId)}function sm(n){return s.jsx("option",{value:n.reportVersionId,children:`${n.name} [${n.ownerId}]`},n.reportVersionId)}const om=n=>{const e=l.compilerRuntimeExports.c(2),{cell:t}=n,{value:o}=t;let a;return e[0]!==o?(a=s.jsx(s.Fragment,{children:o?s.jsx(cn,{name:o,size:21,fontSize:12}):s.jsx(s.Fragment,{})}),e[0]=o,e[1]=a):a=e[1],a},lm=n=>{const e=l.compilerRuntimeExports.c(9),{knownTypes:t,typeFilters:o,onChangeTypeFilters:a}=n;let i;if(e[0]!==t||e[1]!==a||e[2]!==o){let c;e[4]!==a||e[5]!==o?(c=d=>s.jsx("div",{role:"button",style:{height:"14px",width:"14px",borderRadius:"50%",border:"2px solid transparent",backgroundColor:"transparent"},className:l.classNames(`border-${d}`,o.includes(d)&&`bg-${d}`),onClick:()=>{o.includes(d)?a(o.filter(u=>u!==d)):a([...o,d])}},d),e[4]=a,e[5]=o,e[6]=c):c=e[6],i=t.map(c),e[0]=t,e[1]=a,e[2]=o,e[3]=i}else i=e[3];let r;return e[7]!==i?(r=s.jsx("div",{className:"mb-1 d-flex justify-content-center gap-2",children:i}),e[7]=i,e[8]=r):r=e[8],r},am=n=>{const e=l.compilerRuntimeExports.c(4),{linksTo:t,onClick:o,children:a}=n;let i;return e[0]!==a||e[1]!==t||e[2]!==o?(i=t?s.jsx(we.Link,{to:t,className:"text-decoration-none",onClick:o,children:a}):s.jsx(s.Fragment,{children:a}),e[0]=a,e[1]=t,e[2]=o,e[3]=i):i=e[3],i},im=n=>{const e=l.compilerRuntimeExports.c(40),{message:t,onDeleteMessage:o,onClickMessage:a,getIcon:i,getLinksTo:r}=n,{ProjectIconComponent:c,localizationContext:d}=w.useContext(l.LuminusComponentsContext),{dateFnsLocale:u}=w.useContext(d);let m;if(e[0]!==u||e[1]!==t.dateTime){const T=t.dateTime?l.parseISO(t.dateTime):null,L=T?Nl(new Date(Date.now()),T):0;m=T&&s.jsx("div",{className:"d-flex justify-content-end",children:s.jsx(l.SimpleTooltip,{text:l.format(T,"dd.MM.yyyy HH:mm"),placement:"left",children:s.jsx("div",{children:s.jsx(l.Typography,{variant:"caption",children:L>2?l.format(T,"dd.MM.yyyy"):Il(T,new Date(Date.now()),{locale:u.code})})})})}),e[0]=u,e[1]=t.dateTime,e[2]=m}else m=e[2];let p;e[3]!==r||e[4]!==t?(p=r(t)??void 0,e[3]=r,e[4]=t,e[5]=p):p=e[5];const f=t.type;let x;e[6]!==i||e[7]!==t?(x=i(t),e[6]=i,e[7]=t,e[8]=x):x=e[8];let g;e[9]!==t.subject?(g=s.jsx(l.Typography,{variant:"body2",className:"fw-bold",children:t.subject}),e[9]=t.subject,e[10]=g):g=e[10];let y;e[11]!==t.id||e[12]!==o?(y=T=>{T.preventDefault(),T.stopPropagation(),o(t.id)},e[11]=t.id,e[12]=o,e[13]=y):y=e[13];let h;e[14]!==c?(h=s.jsx(c,{icon:"delete"}),e[14]=c,e[15]=h):h=e[15];let b;e[16]!==y||e[17]!==h?(b=s.jsx(l.IconButton,{size:"sm",onClick:y,children:h}),e[16]=y,e[17]=h,e[18]=b):b=e[18];let j;e[19]!==g||e[20]!==b?(j=s.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-3",children:[g,b]}),e[19]=g,e[20]=b,e[21]=j):j=e[21];let S;e[22]!==t.text?(S=s.jsx(l.Typography,{variant:"body2",children:t.text}),e[22]=t.text,e[23]=S):S=e[23];let N;e[24]!==S||e[25]!==j?(N=s.jsxs("div",{className:"d-flex flex-column gap-1 w-100",children:[j,S]}),e[24]=S,e[25]=j,e[26]=N):N=e[26];let v;e[27]!==N||e[28]!==x?(v=s.jsxs("div",{className:"d-flex align-items-start gap-2",children:[x,N]}),e[27]=N,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==t.type||e[31]!==v?(C=s.jsx(zo,{level:f,noIcon:!0,children:v}),e[30]=t.type,e[31]=v,e[32]=C):C=e[32];let k;e[33]!==a||e[34]!==C||e[35]!==p?(k=s.jsx(am,{linksTo:p,onClick:a,children:C}),e[33]=a,e[34]=C,e[35]=p,e[36]=k):k=e[36];let I;return e[37]!==m||e[38]!==k?(I=s.jsxs("div",{children:[m,k]}),e[37]=m,e[38]=k,e[39]=I):I=e[39],I},Ks=["info","warning","danger"],qs=n=>{const e=l.compilerRuntimeExports.c(23),{messages:t,isLoading:o,onDeleteMessage:a,onClickMessage:i,getIcon:r,getLinksTo:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{messageBoard:u}=d,[m,p]=w.useState(Ks);let f;if(e[0]!==t||e[1]!==m){let S;e[3]!==m?(S=N=>m.includes(N.type??""),e[3]=m,e[4]=S):S=e[4],f=t.filter(S),e[0]=t,e[1]=m,e[2]=f}else f=e[2];const x=f;let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=S=>p(S),e[5]=g):g=e[5];let y;e[6]!==m?(y=s.jsx(lm,{knownTypes:Ks,typeFilters:m,onChangeTypeFilters:g}),e[6]=m,e[7]=y):y=e[7];let h;e[8]!==o?(h=o&&s.jsxs("div",{className:"p-3 w-100",children:[s.jsx(dt,{as:ns.Title,animation:"glow",children:s.jsx(dt,{xs:6})}),s.jsxs(dt,{as:ns.Text,animation:"glow",children:[s.jsx(dt,{xs:7})," ",s.jsx(dt,{xs:4})," ",s.jsx(dt,{xs:4})," ",s.jsx(dt,{xs:6})," ",s.jsx(dt,{xs:8})]})]}),e[8]=o,e[9]=h):h=e[9];let b;e[10]!==x||e[11]!==r||e[12]!==c||e[13]!==o||e[14]!==u||e[15]!==t.length||e[16]!==i||e[17]!==a?(b=!o&&s.jsxs(s.Fragment,{children:[t.length===0&&s.jsx(l.Alert,{variant:"info",size:"sm",className:"mt-2",children:u.noMessages}),s.jsx("div",{className:"h-100 overflow-y-auto d-flex flex-column gap-2 luminus-thin-scrollbar",children:x.map(S=>s.jsx(im,{message:S,onDeleteMessage:a,onClickMessage:i,getIcon:r,getLinksTo:c},S.id))})]}),e[10]=x,e[11]=r,e[12]=c,e[13]=o,e[14]=u,e[15]=t.length,e[16]=i,e[17]=a,e[18]=b):b=e[18];let j;return e[19]!==y||e[20]!==h||e[21]!==b?(j=s.jsxs("div",{className:"h-100 d-flex flex-column overflow-hidden",children:[y,h,b]}),e[19]=y,e[20]=h,e[21]=b,e[22]=j):j=e[22],j},Cn={apiGet:"/messageBoard",apiDelete:"/messageBoard/"},rm=n=>{const e=l.compilerRuntimeExports.c(25),{renderAsNotifPanel:t,notifIcon:o,apiUrls:a,getIcon:i,getLinksTo:r}=n,{apiGet:c,apiDelete:d}=a===void 0?Cn:a,u=c===void 0?Cn.apiGet:c,m=d===void 0?Cn.apiDelete:d,p=l.useAxios();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[x,g]=w.useState(f),[y,h]=w.useState(!1),[b,j]=w.useState(!1),[S,N]=w.useState(!1);let v;e[1]!==u||e[2]!==p?(v=async()=>{j(!0),await p.get(u).then(F=>{const{data:M}=F;g(M),h(!0),j(!1)}).catch(()=>{g([]),j(!1)})},e[1]=u,e[2]=p,e[3]=v):v=e[3];const C=v;let k;e[4]!==m||e[5]!==p?(k=async F=>p.delete(`${m}${F}`).then(cm).catch(dm),e[4]=m,e[5]=p,e[6]=k):k=e[6];const I=k;let T;e[7]!==I||e[8]!==x?(T=F=>{I(F).then(M=>{M&&g(x.filter(O=>O.id!==F))})},e[7]=I,e[8]=x,e[9]=T):T=e[9];const L=T;let E,D;e[10]!==C?(E=()=>{C();const F=setInterval(()=>C(),6e4);return()=>{clearInterval(F)}},D=[C],e[10]=C,e[11]=E,e[12]=D):(E=e[11],D=e[12]),w.useEffect(E,D);let _;e[13]!==x?(_=x.filter(um),e[13]=x,e[14]=_):_=e[14];const P=_.length,$=y?!1:b;let R;return e[15]!==P||e[16]!==$||e[17]!==i||e[18]!==r||e[19]!==x||e[20]!==o||e[21]!==L||e[22]!==t||e[23]!==S?(R=t?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"position-relative",children:[s.jsx(l.IconButton,{size:"md",onClick:()=>N(!S),children:o}),P>0&&s.jsx("div",{className:"badge rounded-pill bg-danger p-1 px-2 text-white",style:{position:"absolute",top:"-6px",right:"-10px",fontSize:"10px"},children:P})]}),s.jsx(Lt,{show:S,onHide:()=>N(!1),placement:"end",children:s.jsx(Lt.Body,{children:s.jsx(qs,{messages:x,isLoading:$,onDeleteMessage:L,onClickMessage:()=>N(!1),getIcon:i,getLinksTo:r})})})]}):s.jsx(qs,{messages:x,isLoading:$,onDeleteMessage:L,getIcon:i,getLinksTo:r}),e[15]=P,e[16]=$,e[17]=i,e[18]=r,e[19]=x,e[20]=o,e[21]=L,e[22]=t,e[23]=S,e[24]=R):R=e[24],R};function cm(){return!0}function dm(){return!1}function um(n){return n.type==="danger"}const mm="_tab-panel_d8l8q_1",fm="_full-height-no-overflow_d8l8q_5",pm="_disabled_d8l8q_12",Nn={tabPanel:mm,fullHeightNoOverflow:fm,disabled:pm},ul=n=>{const e=l.compilerRuntimeExports.c(7),{eventKey:t,activeTab:o,fullHeightNoOverflow:a,disabled:i,className:r,children:c}=n;if(t!==o)return null;let d;e[0]!==r||e[1]!==i||e[2]!==a?(d=l.classNames("luminus-tab-panel",Nn.tabPanel,{[Nn.fullHeightNoOverflow]:a},{disabled:i},{[Nn.disabled]:i},r),e[0]=r,e[1]=i,e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==c||e[5]!==d?(u=s.jsx("div",{className:d,children:c}),e[4]=c,e[5]=d,e[6]=u):u=e[6],u},hm="_join-line_1q9e8_1",gm={joinLine:hm},Gn=n=>{const e=l.compilerRuntimeExports.c(18),{activeTab:t,onSelect:o,children:a,vertical:i,verticalStepper:r}=n;let c;e[0]!==i||e[1]!==r?(c=l.classNames("luminus-tabs d-flex mb-2",{"gap-1":!r},{"gap-0":r},{"flex-column":i||r}),e[0]=i,e[1]=r,e[2]=c):c=e[2];let d;if(e[3]!==t||e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==r){let m;e[9]!==t||e[10]!==a.length||e[11]!==o||e[12]!==i||e[13]!==r?(m=(p,f)=>{const x=p.type,g=p.props;if(!g)return null;const y=g.eventKey,h=g.children,b=g.className,j=g.onClick;return s.jsxs(w.Fragment,{children:[s.jsx(x,{...g,className:l.classNames({active:t===y},b),onClick:()=>{o(y),j&&j(y)},vertical:i||r,children:h}),r&&f<a.length-1&&s.jsx("div",{className:l.classNames("join-line",gm.joinLine)})]},g.eventKey)},e[9]=t,e[10]=a.length,e[11]=o,e[12]=i,e[13]=r,e[14]=m):m=e[14],d=a.map(m),e[3]=t,e[4]=a,e[5]=o,e[6]=i,e[7]=r,e[8]=d}else d=e[8];let u;return e[15]!==c||e[16]!==d?(u=s.jsx("div",{className:c,children:d}),e[15]=c,e[16]=d,e[17]=u):u=e[17],u},xm="_tab_1tbi7_1",ym="_disabled_1tbi7_7",vm="_vertical_1tbi7_13",wn={tab:xm,disabled:ym,vertical:vm},Kn=n=>{const e=l.compilerRuntimeExports.c(15),{eventKey:t,className:o,onClick:a,disabled:i,vertical:r,children:c}=n;let d;e[0]!==o||e[1]!==i||e[2]!==r?(d=l.classNames("luminus-tab text-primary rounded",wn.tab,o,{disabled:i},{[wn.disabled]:i},{vertical:r},{[wn.vertical]:r}),e[0]=o,e[1]=i,e[2]=r,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==t||e[6]!==a?(u=()=>a&&!i&&a(t),e[4]=i,e[5]=t,e[6]=a,e[7]=u):u=e[7];let m;e[8]!==c||e[9]!==r?(m=typeof c=="string"?s.jsx(l.Typography,{variant:r?"body":"h6",className:r?"":"text-primary",children:c}):c,e[8]=c,e[9]=r,e[10]=m):m=e[10];let p;return e[11]!==d||e[12]!==u||e[13]!==m?(p=s.jsx("div",{role:"button",className:d,onClick:u,children:m}),e[11]=d,e[12]=u,e[13]=m,e[14]=p):p=e[14],p},bm=n=>{var p;const e=l.compilerRuntimeExports.c(31);let t,o,a,i;e[0]!==n?({tabs:i,activeTab:t,onSelect:o,...a}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=i):(t=e[1],o=e[2],a=e[3],i=e[4]);const{ProjectIconComponent:r}=w.useContext(l.LuminusComponentsContext),{isMobile:c}=l.useWindowSize();if(c){let f;e[5]!==t||e[6]!==i?(f=((p=i.find(b=>b.id===t))==null?void 0:p.name)??"",e[5]=t,e[6]=i,e[7]=f):f=e[7];let x;e[8]!==r?(x=s.jsx(r,{icon:"chevron-down"}),e[8]=r,e[9]=x):x=e[9];let g;e[10]!==f||e[11]!==x?(g=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle,text:f,icon:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12];let y;if(e[13]!==o||e[14]!==i){let b;e[16]!==o?(b=j=>s.jsx(l.DropdownItem,{onClick:()=>o(j.id),children:j.name},j.id),e[16]=o,e[17]=b):b=e[17],y=i.map(b),e[13]=o,e[14]=i,e[15]=y}else y=e[15];let h;return e[18]!==a||e[19]!==g||e[20]!==y?(h=s.jsx(l.Dropdown,{toggle:g,...a,children:y}),e[18]=a,e[19]=g,e[20]=y,e[21]=h):h=e[21],h}let d;e[22]!==o?(d=f=>o(f),e[22]=o,e[23]=d):d=e[23];let u;e[24]!==i?(u=i.map(jm),e[24]=i,e[25]=u):u=e[25];let m;return e[26]!==t||e[27]!==a||e[28]!==d||e[29]!==u?(m=s.jsx(Gn,{activeTab:t,onSelect:d,...a,children:u}),e[26]=t,e[27]=a,e[28]=d,e[29]=u,e[30]=m):m=e[30],m};function jm(n){return s.jsx(Kn,{eventKey:n.id,children:n.name},n.id)}const Sm="_selection_1dtmm_1",Cm="_selectionBg_1dtmm_10",Nm="_selectionItemsContainer_1dtmm_18",wm="_selectionItems_1dtmm_18",Jt={selection:Sm,selectionBg:Cm,selectionItemsContainer:Nm,selectionItems:wm},qn=n=>{const e=l.compilerRuntimeExports.c(14),{icon:t,setIcon:o,IconComponent:a,IconTypeArray:i}=n,[r,c]=w.useState(!1);let d;e[0]!==o?(d=g=>{o(g),c(!1)},e[0]=o,e[1]=d):d=e[1];const u=d;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>c(!0),e[2]=m):m=e[2];let p;e[3]!==a||e[4]!==t?(p=s.jsx(l.IconButton,{className:"rounded m-1",onClick:m,children:s.jsx(a,{icon:t})}),e[3]=a,e[4]=t,e[5]=p):p=e[5];let f;e[6]!==a||e[7]!==i||e[8]!==u||e[9]!==r?(f=r&&s.jsxs("div",{className:Jt.selection,children:[s.jsx("div",{className:Jt.selectionBg,onClick:()=>c(!1)}),s.jsx("div",{className:Jt.selectionItemsContainer,children:s.jsx("div",{className:Jt.selectionItems,children:i.filter(Im).map(g=>s.jsx(l.IconButton,{className:"rounded",onClick:()=>u(g),children:s.jsx(a,{icon:g})},g))})})]}),e[6]=a,e[7]=i,e[8]=u,e[9]=r,e[10]=f):f=e[10];let x;return e[11]!==p||e[12]!==f?(x=s.jsxs(s.Fragment,{children:[p,f]}),e[11]=p,e[12]=f,e[13]=x):x=e[13],x};function Im(n,e,t){return t.indexOf(n)===e}const Yn=()=>{const n=w.useContext(l.ShortcutLinksContext);if(n===void 0)throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");return n},km=n=>{const e=l.compilerRuntimeExports.c(32),{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteLocation:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(t.icon),[m,p]=w.useState(t.name),f=!(d===t.icon&&m===t.name);let x;e[0]!==t.icon||e[1]!==t.name?(x=()=>{u(t.icon),p(t.name)},e[0]=t.icon,e[1]=t.name,e[2]=x):x=e[2];const g=x;let y;e[3]!==i||e[4]!==d||e[5]!==m||e[6]!==t?(y=()=>{i({...t,icon:d,name:m})},e[3]=i,e[4]=d,e[5]=m,e[6]=t,e[7]=y):y=e[7];const h=y;let b;e[8]!==m?(b=s.jsx("td",{className:"align-middle",children:s.jsx(l.TextInput,{type:"text",maxLength:20,value:m,onChange:p,className:"d-flex-grow-1",InputContainer:l.NoInputContainer,size:"sm"})}),e[8]=m,e[9]=b):b=e[9];let j;e[10]!==o||e[11]!==a||e[12]!==d?(j=s.jsx("td",{className:"align-middle",children:s.jsx("div",{className:"d-flex justify-content-center align-items-center",children:s.jsx(qn,{icon:d,setIcon:u,IconComponent:o,IconTypeArray:a})})}),e[10]=o,e[11]=a,e[12]=d,e[13]=j):j=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S={width:"7em"},e[14]=S):S=e[14];let N;e[15]!==c||e[16]!==g||e[17]!==h||e[18]!==f?(N=f&&s.jsxs(s.Fragment,{children:[s.jsx(l.IconButton,{onClick:g,color:"secondary",className:"d-inline",children:s.jsx(c,{icon:"cancel"})}),s.jsx(l.IconButton,{onClick:h,color:"success",className:"d-inline",children:s.jsx(c,{icon:"check"})})]}),e[15]=c,e[16]=g,e[17]=h,e[18]=f,e[19]=N):N=e[19];let v;e[20]!==c?(v=s.jsx(c,{icon:"delete"}),e[20]=c,e[21]=v):v=e[21];let C;e[22]!==r||e[23]!==v?(C=s.jsx(l.IconButton,{onClick:r,color:"danger",children:v}),e[22]=r,e[23]=v,e[24]=C):C=e[24];let k;e[25]!==N||e[26]!==C?(k=s.jsx("td",{className:"align-middle",style:S,children:s.jsxs("div",{className:"d-flex gap-2 align-items-center justify-content-end",children:[N,C]})}),e[25]=N,e[26]=C,e[27]=k):k=e[27];let I;return e[28]!==b||e[29]!==j||e[30]!==k?(I=s.jsxs(s.Fragment,{children:[b,j,k]}),e[28]=b,e[29]=j,e[30]=k,e[31]=I):I=e[31],I},Tm=n=>{const e=l.compilerRuntimeExports.c(14),{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteShortcutLink:r}=n;let c;e[0]!==r||e[1]!==t.id?(c=()=>{r(t.id)},e[0]=r,e[1]=t.id,e[2]=c):c=e[2];const d=c;let u;e[3]!==t.url?(u=s.jsx("td",{className:"align-middle",children:t.url.length<=23?s.jsx(l.Typography,{variant:"body2",children:t.url}):s.jsx(l.SimpleTooltip,{placement:"bottom",text:t.url,children:s.jsxs(l.Typography,{variant:"body2",children:[t.url.slice(0,21),"..."]})})}),e[3]=t.url,e[4]=u):u=e[4];let m;e[5]!==o||e[6]!==a||e[7]!==d||e[8]!==i||e[9]!==t?(m=s.jsx(km,{shortcutLink:t,IconComponent:o,IconTypeArray:a,editShortcutLink:i,deleteLocation:d}),e[5]=o,e[6]=a,e[7]=d,e[8]=i,e[9]=t,e[10]=m):m=e[10];let p;return e[11]!==u||e[12]!==m?(p=s.jsx("tr",{className:"mb-3",children:s.jsxs(s.Fragment,{children:[u,m]})}),e[11]=u,e[12]=m,e[13]=p):p=e[13],p},_m=n=>{const e=l.compilerRuntimeExports.c(11),{IconComponent:t,IconTypeArray:o}=n,{texts:a}=w.useContext(l.LuminusComponentsContext),{shortcutLinks:i,editShortcutLink:r,deleteShortcutLink:c}=Yn();let d;return e[0]!==t||e[1]!==o||e[2]!==c||e[3]!==r||e[4]!==i||e[5]!==a.shortcutLinks.addLinksToEditThemHereInfo||e[6]!==a.shortcutLinks.icon||e[7]!==a.shortcutLinks.name||e[8]!==a.shortcutLinks.shortcutLinksSetting||e[9]!==a.shortcutLinks.target?(d=s.jsx(s.Fragment,{children:i!==null&&i.length>0?s.jsxs(vo,{size:"sm",title:a.shortcutLinks.shortcutLinksSetting,children:[s.jsx("thead",{className:"fw-bold",children:s.jsxs("tr",{children:[s.jsx("th",{children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.target})}),s.jsx("th",{children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.name})}),s.jsx("th",{className:"text-center",children:s.jsx(l.Typography,{variant:"body2",children:a.shortcutLinks.icon})}),s.jsx("th",{})]})}),s.jsx("tbody",{children:i==null?void 0:i.map(u=>s.jsx(Tm,{shortcutLink:u,IconComponent:t,IconTypeArray:o,editShortcutLink:r,deleteShortcutLink:c},u.id))})]}):s.jsx(l.Alert,{variant:"info",size:"sm",children:a.shortcutLinks.addLinksToEditThemHereInfo})}),e[0]=t,e[1]=o,e[2]=c,e[3]=r,e[4]=i,e[5]=a.shortcutLinks.addLinksToEditThemHereInfo,e[6]=a.shortcutLinks.icon,e[7]=a.shortcutLinks.name,e[8]=a.shortcutLinks.shortcutLinksSetting,e[9]=a.shortcutLinks.target,e[10]=d):d=e[10],d},$n=5,Dm="_linkButton_pnlvi_1",Em="_linkAddButton_pnlvi_31",Lm="_createLinkRow_pnlvi_39",$t={linkButton:Dm,linkAddButton:Em,createLinkRow:Lm},Rm=n=>{const e=l.compilerRuntimeExports.c(9),{shortcutLink:t,IconComponent:o}=n;let a;e[0]!==o||e[1]!==t.icon?(a=s.jsx(o,{icon:t.icon}),e[0]=o,e[1]=t.icon,e[2]=a):a=e[2];let i;e[3]!==t.url||e[4]!==a?(i=s.jsx(we.Link,{to:t.url,className:$t.linkButton,children:a}),e[3]=t.url,e[4]=a,e[5]=i):i=e[5];let r;return e[6]!==t.name||e[7]!==i?(r=s.jsx(l.SimpleTooltip,{text:t.name,placement:"bottom",children:i}),e[6]=t.name,e[7]=i,e[8]=r):r=e[8],r},Fm=n=>{const e=l.compilerRuntimeExports.c(51),{closeModal:t,isOpen:o,createLink:a,pageTitlePrefix:i,IconComponent:r,IconTypeArray:c}=n,d=we.useLocation(),{texts:u}=w.useContext(l.LuminusComponentsContext),[m,p]=w.useState("star-outline");let f;e[0]!==i?(f=i?document.title.replace(i,""):document.title,e[0]=i,e[1]=f):f=e[1];const[x,g]=w.useState(f);let y;e[2]!==t||e[3]!==a||e[4]!==m||e[5]!==d.pathname||e[6]!==d.search||e[7]!==x?(y=async()=>{await a({icon:m,name:x,url:d.pathname+d.search}),t()},e[2]=t,e[3]=a,e[4]=m,e[5]=d.pathname,e[6]=d.search,e[7]=x,e[8]=y):y=e[8];const h=y,b=d.pathname+d.search;let j;e[9]!==u.shortcutLinks.newShortcut?(j=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:u.shortcutLinks.newShortcut})}),e[9]=u.shortcutLinks.newShortcut,e[10]=j):j=e[10];let S;e[11]!==u.shortcutLinks.target?(S=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.target}),e[11]=u.shortcutLinks.target,e[12]=S):S=e[12];let N;e[13]!==b?(N=b.length<=23?b:s.jsx(l.SimpleTooltip,{placement:"bottom",text:b,children:s.jsxs("span",{children:[b.slice(0,21),"..."]})}),e[13]=b,e[14]=N):N=e[14];let v;e[15]!==N?(v=s.jsx("div",{className:"d-flex align-items-middle fw-bold text-muted",children:N}),e[15]=N,e[16]=v):v=e[16];let C;e[17]!==S||e[18]!==v?(C=s.jsxs("div",{className:$t.createLinkRow,children:[S,v]}),e[17]=S,e[18]=v,e[19]=C):C=e[19];let k;e[20]!==u.shortcutLinks.name?(k=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.name}),e[20]=u.shortcutLinks.name,e[21]=k):k=e[21];let I;e[22]!==x?(I=s.jsx("div",{className:"d-flex align-items-middle fw-bold",children:s.jsx(l.TextInput,{type:"text",maxLength:25,value:x,onChange:g,className:"w-100",InputContainer:l.RowLabelInput,withoutLabel:!0})}),e[22]=x,e[23]=I):I=e[23];let T;e[24]!==k||e[25]!==I?(T=s.jsxs("div",{className:$t.createLinkRow,children:[k,I]}),e[24]=k,e[25]=I,e[26]=T):T=e[26];let L;e[27]!==u.shortcutLinks.icon?(L=s.jsx(l.Typography,{variant:"form-label",className:"pe-3 text-end",children:u.shortcutLinks.icon}),e[27]=u.shortcutLinks.icon,e[28]=L):L=e[28];let E;e[29]!==r||e[30]!==c||e[31]!==m?(E=s.jsx("div",{className:"d-flex align-items-middle fw-bold",children:s.jsx(qn,{icon:m,setIcon:p,IconComponent:r,IconTypeArray:c})}),e[29]=r,e[30]=c,e[31]=m,e[32]=E):E=e[32];let D;e[33]!==L||e[34]!==E?(D=s.jsxs("div",{className:$t.createLinkRow,children:[L,E]}),e[33]=L,e[34]=E,e[35]=D):D=e[35];let _;e[36]!==T||e[37]!==D||e[38]!==C?(_=s.jsxs(l.Modal.Body,{children:[C,T,D]}),e[36]=T,e[37]=D,e[38]=C,e[39]=_):_=e[39];let P;e[40]!==h||e[41]!==u.shortcutLinks.addShortcut?(P=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{onClick:h,children:u.shortcutLinks.addShortcut})}),e[40]=h,e[41]=u.shortcutLinks.addShortcut,e[42]=P):P=e[42];let $;e[43]!==_||e[44]!==P||e[45]!==j?($=s.jsxs("div",{onKeyDown:$m,children:[j,_,P]}),e[43]=_,e[44]=P,e[45]=j,e[46]=$):$=e[46];let R;return e[47]!==t||e[48]!==o||e[49]!==$?(R=s.jsx(l.Modal,{show:o,onHide:t,size:"sm",children:$}),e[47]=t,e[48]=o,e[49]=$,e[50]=R):R=e[50],R};function $m(n){n.code!=="Escape"&&n.stopPropagation()}const Pm=n=>{const e=l.compilerRuntimeExports.c(17),{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a,createLink:i}=n,{ProjectIconComponent:r,texts:c}=w.useContext(l.LuminusComponentsContext),[d,u]=w.useState(!1),[m]=l.a(d,100),p=c.shortcutLinks.addShortcut;let f,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=l.classNames($t.linkButton,$t.linkAddButton),x=()=>u(!0),e[0]=f,e[1]=x):(f=e[0],x=e[1]);let g;e[2]!==r?(g=s.jsx("button",{type:"button",className:f,onClick:x,children:s.jsx(r,{icon:"add"})}),e[2]=r,e[3]=g):g=e[3];let y;e[4]!==g||e[5]!==c.shortcutLinks.addShortcut?(y=s.jsx(l.SimpleTooltip,{text:p,placement:"bottom",children:g}),e[4]=g,e[5]=c.shortcutLinks.addShortcut,e[6]=y):y=e[6];let h;e[7]!==t||e[8]!==o||e[9]!==i||e[10]!==m||e[11]!==d||e[12]!==a?(h=(d||m)&&s.jsx(Fm,{IconComponent:t,IconTypeArray:o,closeModal:()=>u(!1),createLink:i,isOpen:d,pageTitlePrefix:a}),e[7]=t,e[8]=o,e[9]=i,e[10]=m,e[11]=d,e[12]=a,e[13]=h):h=e[13];let b;return e[14]!==y||e[15]!==h?(b=s.jsxs(s.Fragment,{children:[y,h]}),e[14]=y,e[15]=h,e[16]=b):b=e[16],b},Mm=n=>{const e=l.compilerRuntimeExports.c(12),{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a}=n,{shortcutLinks:i,createShortcutLink:r}=Yn(),c=i!==null&&i.length<$n;let d;e[0]!==t||e[1]!==i?(d=i==null?void 0:i.slice(0,$n).map((p,f)=>p!==null?s.jsx(Rm,{shortcutLink:p,IconComponent:t},f):null),e[0]=t,e[1]=i,e[2]=d):d=e[2];let u;e[3]!==t||e[4]!==o||e[5]!==r||e[6]!==c||e[7]!==a?(u=c&&s.jsx(Pm,{IconComponent:t,IconTypeArray:o,pageTitlePrefix:a,createLink:r}),e[3]=t,e[4]=o,e[5]=r,e[6]=c,e[7]=a,e[8]=u):u=e[8];let m;return e[9]!==d||e[10]!==u?(m=s.jsx(s.Fragment,{children:s.jsxs("div",{className:"d-flex gap-2",children:[d,u]})}),e[9]=d,e[10]=u,e[11]=m):m=e[11],m},Am=n=>{const e=l.useAxios(),{startLoading:t,stopLoading:o}=w.useContext(l.LoadingContext),a=w.useCallback(async c=>{t("submit-createShortcutLink");try{await e.post(`/dynamicForms/insert?referenceId=${n}`,c)}finally{o("submit-createShortcutLink")}},[e,n,t,o]),i=w.useCallback(async c=>{t("submit-updateShortcutLink");try{await e.post(`/dynamicForms/update?referenceId=${n}`,c)}finally{o("submit-updateShortcutLink")}},[e,n,t,o]),r=w.useCallback(async c=>{t("delete-deleteShortcutLink");try{await e.delete(`/dynamicForms/delete?referenceId=${n}&pk=${c.toString()}`)}finally{o("delete-deleteShortcutLink")}},[e,n,t,o]);return{create:a,update:i,remove:r}},Bm=n=>{if(n==null)throw new Error("Tried to make operation on null shortcutLinks.");return n},Ys=n=>{if(n==null)throw new Error("Tried to make operation on null shortcutLinks.");return n},Om=n=>{const e=l.compilerRuntimeExports.c(22),{children:t,referenceId:o}=n,{user:a}=w.useContext(l.UserContext),i=Hm,r=a!==null;let c;e[0]!==r?(c={silent:!0,dataTransformer:i,enabled:r},e[0]=r,e[1]=c):c=e[1];const{data:d,reloadData:u}=Fe.useGetApiData(`/dynamicForms/lookup-data-all?referenceId=${o}&employee=${a==null?void 0:a.personalNumber}`,c),{create:m,update:p,remove:f}=Am(o);let x;e[2]!==m||e[3]!==u||e[4]!==d||e[5]!==a?(x=async C=>{const k=Ys(a);if(Bm(d).length>=$n)throw new Error("Cannot add more shortcut links.");await m({...C,employee:k.personalNumber}),await u()},e[2]=m,e[3]=u,e[4]=d,e[5]=a,e[6]=x):x=e[6];const g=x;let y;e[7]!==u||e[8]!==p||e[9]!==a?(y=async C=>{const k=Ys(a);await p({...C,employee:k.personalNumber}),await u()},e[7]=u,e[8]=p,e[9]=a,e[10]=y):y=e[10];const h=y;let b;e[11]!==u||e[12]!==f?(b=async C=>{await f(C),await u()},e[11]=u,e[12]=f,e[13]=b):b=e[13];const j=b;let S;e[14]!==g||e[15]!==j||e[16]!==h||e[17]!==d?(S={shortcutLinks:d,createShortcutLink:g,editShortcutLink:h,deleteShortcutLink:j},e[14]=g,e[15]=j,e[16]=h,e[17]=d,e[18]=S):S=e[18];const N=S;let v;return e[19]!==t||e[20]!==N?(v=s.jsx(l.ShortcutLinksContext.Provider,{value:N,children:t}),e[19]=t,e[20]=N,e[21]=v):v=e[21],v};function zm(n){return{id:n.id,icon:n.icon,name:n.name,url:n.url}}function Hm(n){return n.map(zm)}const Vm=n=>{const e=l.compilerRuntimeExports.c(6),{targets:t,removeNotifTarget:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);let i;e[0]!==a||e[1]!==o||e[2]!==t?(i=t&&t.sort(Um).map(c=>s.jsxs("div",{className:"d-flex gap-2 align-items-center justify-content-between mb-1",children:[s.jsx("div",{className:"text-secondary",children:s.jsx("span",{className:"d-flex gap-2 ",children:c.employeeId&&c.roleName===null?s.jsxs(s.Fragment,{children:[s.jsx(a,{icon:"user"}),s.jsx(l.Typography,{variant:"subtitle",children:c.employeeName})]}):s.jsxs(s.Fragment,{children:[s.jsx(a,{icon:"role"}),s.jsx(l.Typography,{variant:"subtitle",children:c.roleName})]})})}),s.jsx(l.IconButton,{size:"sm",color:"danger",onClick:()=>o(c.id),children:s.jsx(a,{icon:"delete"})})]},c.id)),e[0]=a,e[1]=o,e[2]=t,e[3]=i):i=e[3];let r;return e[4]!==i?(r=s.jsx(s.Fragment,{children:i}),e[4]=i,e[5]=r):r=e[5],r};function Um(n,e){return(n.employeeId??0)-(e.employeeId??0)}const Wm=n=>{const e=l.compilerRuntimeExports.c(45),{show:t,onHide:o,roles:a,onAddTarget:i,EmployeePicker:r,templateId:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{notifCentrum:u}=d,[m,p]=w.useState(null),[f,x]=w.useState(null),[g,y]=w.useState("R");let h;e[0]!==o?(h=()=>{p(null),x(null),o()},e[0]=o,e[1]=h):h=e[1];const b=h;let j;e[2]!==b?(j=()=>b(),e[2]=b,e[3]=j):j=e[3];let S;e[4]!==u.addNewTarget?(S=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:u.addNewTarget})}),e[4]=u.addNewTarget,e[5]=S):S=e[5];let N;e[6]!==u.employee?(N={id:"E",name:u.employee},e[6]=u.employee,e[7]=N):N=e[7];let v;e[8]!==u.role?(v={id:"R",name:u.role},e[8]=u.role,e[9]=v):v=e[9];let C;e[10]!==N||e[11]!==v?(C=[N,v],e[10]=N,e[11]=v,e[12]=C):C=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=P=>y(P),e[13]=k):k=e[13];let I;e[14]!==C||e[15]!==g?(I=s.jsx(sl,{options:C,value:g,onChange:k,InputContainer:l.RowLabelInput}),e[14]=C,e[15]=g,e[16]=I):I=e[16];let T;e[17]!==r||e[18]!==(m==null?void 0:m.id)||e[19]!==(m==null?void 0:m.name)||e[20]!==u.employee||e[21]!==u.role||e[22]!==f||e[23]!==a||e[24]!==g?(T=g==="E"?s.jsx(r,{InputContainer:l.RowLabelInput,label:u.employee,value:{id:(m==null?void 0:m.id)??null,name:(m==null?void 0:m.name)??""},onSelect:P=>p({id:Number(P==null?void 0:P.id)??null,name:(P==null?void 0:P.name)??""})}):s.jsx(l.CustomSelectInput,{InputContainer:l.RowLabelInput,label:u.role,options:a.map(Gm),value:f,onChange:P=>x((P==null?void 0:P.toString())??"")}),e[17]=r,e[18]=m==null?void 0:m.id,e[19]=m==null?void 0:m.name,e[20]=u.employee,e[21]=u.role,e[22]=f,e[23]=a,e[24]=g,e[25]=T):T=e[25];let L;e[26]!==T||e[27]!==I?(L=s.jsxs(l.Modal.Body,{children:[I,T]}),e[26]=T,e[27]=I,e[28]=L):L=e[28];let E;e[29]!==(m==null?void 0:m.id)||e[30]!==(m==null?void 0:m.name)||e[31]!==b||e[32]!==i||e[33]!==f||e[34]!==c?(E=()=>{i({templateId:c??0,targetId:null,employeeId:(m==null?void 0:m.id)??null,roleName:f},(m==null?void 0:m.name)??null),b()},e[29]=m==null?void 0:m.id,e[30]=m==null?void 0:m.name,e[31]=b,e[32]=i,e[33]=f,e[34]=c,e[35]=E):E=e[35];let D;e[36]!==u.add||e[37]!==E?(D=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{onClick:E,children:u.add})}),e[36]=u.add,e[37]=E,e[38]=D):D=e[38];let _;return e[39]!==t||e[40]!==L||e[41]!==D||e[42]!==j||e[43]!==S?(_=s.jsxs(l.Modal,{show:t,onHide:j,children:[S,L,D]}),e[39]=t,e[40]=L,e[41]=D,e[42]=j,e[43]=S,e[44]=_):_=e[44],_};function Gm(n){return{id:n,name:n}}const Km=n=>{const e=l.compilerRuntimeExports.c(19),{templates:t,selectedTemplateId:o,setSelectedTemplateId:a,roles:i,onAddNotifTarget:r,onRemoveNotifTarget:c,EmployeePicker:d}=n,{texts:u,ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),{notifCentrum:p}=u,[f,x]=w.useState(!1);let g;e[0]!==m||e[1]!==p||e[2]!==c||e[3]!==o||e[4]!==a||e[5]!==t?(g=t.length>0?s.jsx(l.ListGroup,{className:"overflow-auto h-max-100 p-2",children:t.map(S=>s.jsxs(l.ListGroup.Item,{action:o!==S.id,className:`p-0 mb-2 border rounded shadow-sm ${o===S.id?"border-1 border-primary":""}`,onClick:()=>a(S.id),children:[s.jsxs("div",{className:"d-flex gap-2 justify-content-between align-items-center border-1 border-bottom border-primary p-2",children:[s.jsx("div",{className:"text-primary",children:S.destinationId===1?s.jsx(m,{icon:"mail-envelope"}):s.jsx(m,{icon:"dashboard"})}),s.jsx(l.Typography,{className:"text-truncate text-primary",variant:"subtitle",children:S.subjectTemplate}),s.jsx(l.IconButton,{size:"sm",onClick:()=>x(!0),children:s.jsx(m,{icon:"add"})})]}),s.jsx("div",{className:"my-2 ps-3 pe-2",children:S.targets.length>0?s.jsx(Vm,{targets:S.targets,removeNotifTarget:c}):s.jsx(l.Alert,{size:"sm",variant:"warning",children:p.noTargets})})]},S.id))}):s.jsx(l.Alert,{size:"sm",variant:"warning",children:p.empty}),e[0]=m,e[1]=p,e[2]=c,e[3]=o,e[4]=a,e[5]=t,e[6]=g):g=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),e[7]=y):y=e[7];let h;e[8]!==i?(h=i??[],e[8]=i,e[9]=h):h=e[9];let b;e[10]!==d||e[11]!==r||e[12]!==o||e[13]!==f||e[14]!==h?(b=s.jsx(Wm,{show:f,onHide:y,roles:h,onAddTarget:r,EmployeePicker:d,templateId:o}),e[10]=d,e[11]=r,e[12]=o,e[13]=f,e[14]=h,e[15]=b):b=e[15];let j;return e[16]!==g||e[17]!==b?(j=s.jsxs(s.Fragment,{children:[g,b]}),e[16]=g,e[17]=b,e[18]=j):j=e[18],j},qm=()=>{const n=l.compilerRuntimeExports.c(1),e=Ym;let t;return n[0]===Symbol.for("react.memo_cache_sentinel")?(t={extractModelPropertiesNested:e},n[0]=t):t=n[0],t};function Ym(n){const e=/@\(\s*Model\.([A-Za-z0-9_.]+)\s*\)/g,t={};let o=e.exec(n);for(;o!==null;){const a=o[1].split(".");let i=t;for(let r=0;r<a.length;r++){const c=a[r];r===a.length-1?i[c]="lorem ipsum":((!i[c]||typeof i[c]!="object")&&(i[c]={}),i=i[c])}o=e.exec(n)}return t}const Qm=n=>{var K,V;const e=l.compilerRuntimeExports.c(49),{show:t,onHide:o,template:a,onEdit:i,onPreview:r,styles:c,entities:d}=n,{extractModelPropertiesNested:u}=qm(),{zStringRequired:m,zNumber:p,zNumberRequired:f}=l.useZodSchemaTypes(),{texts:x}=w.useContext(l.LuminusComponentsContext),{notifCentrum:g,documents:y}=x,[h,b]=w.useState(null),[j,S]=w.useState(null),[N,v]=w.useState(null),[C,k]=w.useState(!1),[I,T]=w.useState(!1),[L,E]=w.useState("");let D,_;if(e[0]!==p||e[1]!==f||e[2]!==m){const G=l.objectType({id:f(),styleId:p(),subjectTemplate:m(),textTemplate:m()});_=Se.useForm,D=l.t(G),e[0]=p,e[1]=f,e[2]=m,e[3]=D,e[4]=_}else D=e[3],_=e[4];let P;e[5]!==D?(P={resolver:D},e[5]=D,e[6]=P):P=e[6];const $=_(P);let R;e[7]!==$||e[8]!==a.id||e[9]!==((K=a.style)==null?void 0:K.id)||e[10]!==a.subjectTemplate||e[11]!==a.textTemplate?(R=()=>{var G;$.reset({id:a.id,styleId:((G=a.style)==null?void 0:G.id)??null,subjectTemplate:a.subjectTemplate??"",textTemplate:a.textTemplate??""}),v(null),T(!1),b(null),S(null)},e[7]=$,e[8]=a.id,e[9]=(V=a.style)==null?void 0:V.id,e[10]=a.subjectTemplate,e[11]=a.textTemplate,e[12]=R):R=e[12];let F;e[13]!==$||e[14]!==a?(F=[$,a],e[13]=$,e[14]=a,e[15]=F):F=e[15],w.useEffect(R,F);let M,O;e[16]!==u||e[17]!==a.textTemplate?(M=()=>{const G=JSON.stringify(u(a.textTemplate));E(G)},O=[u,a.textTemplate],e[16]=u,e[17]=a.textTemplate,e[18]=M,e[19]=O):(M=e[18],O=e[19]),w.useEffect(M,O);let B;e[20]!==i||e[21]!==o?(B=async G=>{await i(G).then(()=>o())},e[20]=i,e[21]=o,e[22]=B):B=e[22];const H=B;let z;e[23]!==j||e[24]!==$||e[25]!==I||e[26]!==L||e[27]!==r||e[28]!==h?(z=async()=>{!I&&!(j&&h)||await r({entityId:j,entityType:(h==null?void 0:h.id)??null,styleId:$.getValues("styleId")??0,body:$.getValues("textTemplate"),subject:$.getValues("subjectTemplate"),jsonData:I?L:null}).then(G=>{v(G)})},e[23]=j,e[24]=$,e[25]=I,e[26]=L,e[27]=r,e[28]=h,e[29]=z):z=e[29];const W=z;let A;e[30]!==y||e[31]!==d||e[32]!==j||e[33]!==$||e[34]!==I||e[35]!==L||e[36]!==g||e[37]!==o||e[38]!==H||e[39]!==W||e[40]!==N||e[41]!==C||e[42]!==h||e[43]!==t||e[44]!==c||e[45]!==a?(A=a&&s.jsxs(l.Modal,{show:t,onHide:o,size:"lg",scrollable:!0,children:[s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:g.editTemplate})}),s.jsx(Se.FormProvider,{...$,children:s.jsxs(l.Form,{onSubmit:$.handleSubmit(H),children:[s.jsx(l.Modal.Body,{className:"d-flex flex-column gap-2",children:C?s.jsxs("div",{className:"d-flex flex-column gap-2",children:[I?s.jsxs("div",{className:"row d-flex align-items-center",children:[s.jsx(qo,{label:"JSON",InputContainer:l.FloatingLabelInput,value:L,onChange:G=>E(G??""),className:"col"}),s.jsx("div",{className:"col-auto",children:s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:W,children:g.templatePreview})})]}):s.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[s.jsxs("div",{className:"d-flex gap-3 w-75",children:[s.jsx("div",{className:"w-75",children:s.jsx(l.CustomSelectInput,{label:g.entity,size:"sm",options:d,value:(h==null?void 0:h.id)??"",onChange:G=>b(d.find(Z=>Z.id===G)??null)})}),s.jsx(l.TextInput,{size:"sm",type:"text",label:"ID",value:j,onChange:G=>S((G==null?void 0:G.toString())??null)})]}),s.jsx("div",{children:s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:W,disabled:!j||!h,children:g.templatePreview})})]}),s.jsx("hr",{}),N&&s.jsxs(s.Fragment,{children:[s.jsx(l.Typography,{variant:"h3",children:N.subject}),s.jsx("iframe",{title:"notification",srcDoc:N.body,style:{minHeight:"400px"}})]})]}):s.jsxs(s.Fragment,{children:[a.destinationId===1&&s.jsx(l.HookFormSelectInput,{formField:"styleId",options:c,label:g.style,InputContainer:l.FloatingLabelInput,size:"sm"}),s.jsx(l.HookFormTextInput,{formField:"subjectTemplate",type:"text",label:g.subject,InputContainer:l.FloatingLabelInput}),s.jsx(l.HookFormTextAreaInput,{formField:"textTemplate",label:g.textBody,InputContainer:l.FloatingLabelInput,rows:16,customFormControlProps:{style:{height:"auto"}}})]})}),s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:C?s.jsxs("div",{className:"d-flex gap-3 align-items-center",children:[s.jsx(Tt,{label:g.useJson,value:I,onChange:()=>{T(!I)}}),s.jsx(l.PrimaryButton,{size:"sm",onClick:G=>{G.stopPropagation(),G.preventDefault(),k(!1)},children:y.back})]}):s.jsxs("div",{className:"d-flex gap-2",children:[s.jsx(l.PrimaryButton,{color:"secondary",variant:"outlined",size:"sm",onClick:()=>k(!0),children:g.templatePreview}),s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:g.save})]})})]})})]}),e[30]=y,e[31]=d,e[32]=j,e[33]=$,e[34]=I,e[35]=L,e[36]=g,e[37]=o,e[38]=H,e[39]=W,e[40]=N,e[41]=C,e[42]=h,e[43]=t,e[44]=c,e[45]=a,e[46]=A):A=e[46];let U;return e[47]!==A?(U=s.jsx(s.Fragment,{children:A}),e[47]=A,e[48]=U):U=e[48],U},Zm=n=>{const e=l.compilerRuntimeExports.c(43),{show:t,onHide:o,kind:a,onNotifActionAdd:i,onCreate:r}=n,{zNumberRequired:c,zStringRequired:d}=l.useZodSchemaTypes(),{texts:u}=w.useContext(l.LuminusComponentsContext),{notifCentrum:m,documents:p}=u;let f,x;if(e[0]!==c||e[1]!==d){const $=l.objectType({id:c(),name:d(),kindId:c()});x=Se.useForm,f=l.t($),e[0]=c,e[1]=d,e[2]=f,e[3]=x}else f=e[2],x=e[3];let g;e[4]!==f?(g={resolver:f},e[4]=f,e[5]=g):g=e[5];const y=x(g);let h;e[6]!==a||e[7]!==r||e[8]!==o||e[9]!==i?(h=async $=>{i($.id,$.name,$.kindId).then(()=>{r({...$,kind:a,templates:[]}),o()})},e[6]=a,e[7]=r,e[8]=o,e[9]=i,e[10]=h):h=e[10];const b=h;let j,S;e[11]!==y||e[12]!==a.id?(j=()=>{y.reset({id:0,name:"",kindId:a.id}),ot.hookFormSetNulls(y,["id","name"])},S=[y,a.id],e[11]=y,e[12]=a.id,e[13]=j,e[14]=S):(j=e[13],S=e[14]),w.useEffect(j,S);let N;e[15]!==m.addNotifAction?(N=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:m.addNotifAction})}),e[15]=m.addNotifAction,e[16]=N):N=e[16];let v;e[17]!==y||e[18]!==b?(v=y.handleSubmit(b),e[17]=y,e[18]=b,e[19]=v):v=e[19];let C;e[20]!==a?(C=[a],e[20]=a,e[21]=C):C=e[21];let k;e[22]!==m.kind||e[23]!==C?(k=s.jsx(l.HookFormSelectInput,{formField:"kindId",options:C,disabled:!0,label:m.kind,InputContainer:l.RowLabelInput,size:"sm"}),e[22]=m.kind,e[23]=C,e[24]=k):k=e[24];let I;e[25]!==p.name?(I=s.jsx(l.HookFormTextInput,{formField:"name",type:"text",label:p.name,InputContainer:l.RowLabelInput,size:"sm",required:!0}),e[25]=p.name,e[26]=I):I=e[26];let T;e[27]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(cl,{formField:"id",label:"ID",InputContainer:l.RowLabelInput,size:"sm",step:1,required:!0}),e[27]=T):T=e[27];let L;e[28]!==k||e[29]!==I?(L=s.jsxs(l.Modal.Body,{className:"d-flex flex-column gap-2",children:[k,I,T]}),e[28]=k,e[29]=I,e[30]=L):L=e[30];let E;e[31]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:"OK"})}),e[31]=E):E=e[31];let D;e[32]!==L||e[33]!==v?(D=s.jsxs(l.Form,{onSubmit:v,children:[L,E]}),e[32]=L,e[33]=v,e[34]=D):D=e[34];let _;e[35]!==y||e[36]!==D?(_=s.jsx(Se.FormProvider,{...y,children:D}),e[35]=y,e[36]=D,e[37]=_):_=e[37];let P;return e[38]!==o||e[39]!==t||e[40]!==_||e[41]!==N?(P=s.jsxs(l.Modal,{show:t,onHide:o,children:[N,_]}),e[38]=o,e[39]=t,e[40]=_,e[41]=N,e[42]=P):P=e[42],P},Xm=n=>{const e=l.compilerRuntimeExports.c(69),{show:t,onHide:o,kind:a,action:i,onNotifTemplateAdd:r,reloadTemplates:c}=n,{zNumber:d,zString:u,zStringRequired:m,zNumberRequired:p}=l.useZodSchemaTypes(),{addNotification:f}=l.useNotifications(),{texts:x}=w.useContext(l.LuminusComponentsContext),{notifCentrum:g,reports:y}=x;let h,b;if(e[0]!==d||e[1]!==p||e[2]!==u||e[3]!==m){const Z=l.objectType({kindId:p(),actionId:p(),destinationId:p(),styleId:d(),subjectTemplate:m(),textTemplate:u(),attachments:l.arrayType(l.objectType({source:u(),sourceType:d()}))});b=Se.useForm,h=l.t(Z),e[0]=d,e[1]=p,e[2]=u,e[3]=m,e[4]=h,e[5]=b}else h=e[4],b=e[5];let j;e[6]!==h?(j={resolver:h},e[6]=h,e[7]=j):j=e[7];const S=b(j);let N;e[8]!==f||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==y?(N=async Z=>{await r({...Z,attachments:[]}).then(async()=>{f(y.saveSuccessful,"success"),await c().then(()=>o())})},e[8]=f,e[9]=o,e[10]=r,e[11]=c,e[12]=y,e[13]=N):N=e[13];const v=N;let C,k;e[14]!==i.id||e[15]!==S||e[16]!==a.id?(C=()=>{S.reset({kindId:a.id,actionId:i.id,destinationId:1,styleId:null,subjectTemplate:"",textTemplate:null,attachments:[]}),ot.hookFormSetNull(S,"subjectTemplate")},k=[i.id,S,a.id],e[14]=i.id,e[15]=S,e[16]=a.id,e[17]=C,e[18]=k):(C=e[17],k=e[18]),w.useEffect(C,k);let I;e[19]!==g.addNotifActionTemplate?(I=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:g.addNotifActionTemplate})}),e[19]=g.addNotifActionTemplate,e[20]=I):I=e[20];let T;e[21]!==S||e[22]!==v?(T=S.handleSubmit(v),e[21]=S,e[22]=v,e[23]=T):T=e[23];let L;e[24]!==a?(L=[a],e[24]=a,e[25]=L):L=e[25];let E;e[26]!==g.kind||e[27]!==L?(E=s.jsx(l.HookFormSelectInput,{formField:"kindId",options:L,disabled:!0,label:g.kind,InputContainer:l.RowLabelInput,size:"sm"}),e[26]=g.kind,e[27]=L,e[28]=E):E=e[28];let D;e[29]!==i?(D=[i],e[29]=i,e[30]=D):D=e[30];let _;e[31]!==g.subkind||e[32]!==D?(_=s.jsx(l.HookFormSelectInput,{formField:"actionId",options:D,disabled:!0,label:g.subkind,InputContainer:l.RowLabelInput,size:"sm"}),e[31]=g.subkind,e[32]=D,e[33]=_):_=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P={id:1,name:"Email"},e[34]=P):P=e[34];let $;e[35]!==g.dashboard?($=[P,{id:2,name:g.dashboard}],e[35]=g.dashboard,e[36]=$):$=e[36];let R;e[37]===Symbol.for("react.memo_cache_sentinel")?(R=["styleId","textTemplate"],e[37]=R):R=e[37];let F;e[38]!==g.destination||e[39]!==$?(F=s.jsx(l.HookFormSelectInput,{formField:"destinationId",options:$,label:g.destination,InputContainer:l.RowLabelInput,size:"sm",required:!0,resetsFields:R}),e[38]=g.destination,e[39]=$,e[40]=F):F=e[40];let M;e[41]!==g.subject?(M=s.jsx(l.HookFormTextInput,{formField:"subjectTemplate",type:"text",label:g.subject,InputContainer:l.RowLabelInput,size:"sm",required:!0}),e[41]=g.subject,e[42]=M):M=e[42];const O=g.textBody;let B;e[43]!==S?(B=S.getValues("destinationId"),e[43]=S,e[44]=B):B=e[44];const H=B===1;let z;e[45]===Symbol.for("react.memo_cache_sentinel")?(z={style:{height:"auto"}},e[45]=z):z=e[45];let W;e[46]!==g.textBody||e[47]!==H?(W=s.jsx(l.HookFormTextAreaInput,{formField:"textTemplate",label:O,InputContainer:l.FloatingLabelInput,size:"sm",hidden:H,rows:4,customFormControlProps:z}),e[46]=g.textBody,e[47]=H,e[48]=W):W=e[48];let A;e[49]!==E||e[50]!==_||e[51]!==F||e[52]!==M||e[53]!==W?(A=s.jsxs(l.Modal.Body,{className:"d-flex flex-column gap-2",children:[E,_,F,M,W]}),e[49]=E,e[50]=_,e[51]=F,e[52]=M,e[53]=W,e[54]=A):A=e[54];let U;e[55]!==g.create?(U=s.jsx(l.Modal.Footer,{className:"d-flex justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",size:"sm",children:g.create})}),e[55]=g.create,e[56]=U):U=e[56];let K;e[57]!==A||e[58]!==U||e[59]!==T?(K=s.jsxs(l.Form,{onSubmit:T,children:[A,U]}),e[57]=A,e[58]=U,e[59]=T,e[60]=K):K=e[60];let V;e[61]!==S||e[62]!==K?(V=s.jsx(Se.FormProvider,{...S,children:K}),e[61]=S,e[62]=K,e[63]=V):V=e[63];let G;return e[64]!==o||e[65]!==t||e[66]!==V||e[67]!==I?(G=s.jsxs(l.Modal,{show:t,onHide:o,children:[I,V]}),e[64]=o,e[65]=t,e[66]=V,e[67]=I,e[68]=G):G=e[68],G},Jm=n=>{var Be,xt,mn,rt;const e=l.compilerRuntimeExports.c(173),{kinds:t,styles:o,entities:a,targetSystem:i,reloadActions:r,reloadHistory:c,reloadRoles:d,onRemoveTarget:u,onPostTarget:m,onTemplateEdit:p,onTemplateDelete:f,onNotifActionAdd:x,onNotifTemplateAdd:g,onPreview:y,EmployeePicker:h}=n,{texts:b,ProjectIconComponent:j}=w.useContext(l.LuminusComponentsContext),{notifCentrum:S}=b,{confirm:N}=l.useConfirm(),[v,C]=w.useState(null),[k,I]=w.useState(null),[T,L]=w.useState(!1),[E,D]=w.useState(!1),[_,P]=w.useState(!1),[$,R]=w.useState(null),[F,M]=Fe.useLocalStorageState("notif-kind-id",null);let O,B;e[0]!==t||e[1]!==M?(O=()=>{var ie;t.length>0?M(((ie=t.at(0))==null?void 0:ie.id)??null):M(null)},B=[t,M],e[0]=t,e[1]=M,e[2]=O,e[3]=B):(O=e[2],B=e[3]),w.useEffect(O,B);let H;e[4]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[4]=H):H=e[4];const[z,W]=w.useState(H);let A,U;e[5]!==r||e[6]!==F?(A=()=>{F&&r(F).then(ie=>{W(ie)}).catch(ie=>{console.log(ie),W([])})},U=[r,F],e[5]=r,e[6]=F,e[7]=A,e[8]=U):(A=e[7],U=e[8]),w.useEffect(A,U);let K;e[9]!==z?(K=((Be=z==null?void 0:z.at(0))==null?void 0:Be.id)??null,e[9]=z,e[10]=K):K=e[10];const[V,G]=Fe.useLocalStorageState("notif-action-id",K);let Z;e[11]===Symbol.for("react.memo_cache_sentinel")?(Z=[],e[11]=Z):Z=e[11];const[X,le]=w.useState(Z);let q;e[12]!==c||e[13]!==V||e[14]!==v?(q=()=>{V===null||v===null||(le([]),c(V,v).then(ie=>{le(ie)}).catch(ie=>{console.log(ie),le([])}))},e[12]=c,e[13]=V,e[14]=v,e[15]=q):q=e[15];let oe;e[16]!==r||e[17]!==c||e[18]!==V||e[19]!==F||e[20]!==v?(oe=[r,c,V,F,v],e[16]=r,e[17]=c,e[18]=V,e[19]=F,e[20]=v,e[21]=oe):oe=e[21],w.useEffect(q,oe);let ce;e[22]===Symbol.for("react.memo_cache_sentinel")?(ce=[],e[22]=ce):ce=e[22];const[fe,pe]=w.useState(ce);let J,Y;e[23]!==d||e[24]!==V?(J=()=>{V!==null&&d(V).then(ie=>{pe(ie)}).catch(ie=>{console.log(ie),pe([])})},Y=[d,V],e[23]=d,e[24]=V,e[25]=J,e[26]=Y):(J=e[25],Y=e[26]),w.useEffect(J,Y);let Q;e:{if(!z||!V){let Re;e[27]===Symbol.for("react.memo_cache_sentinel")?(Re=[],e[27]=Re):Re=e[27],Q=Re;break e}let ie;e[28]!==z||e[29]!==V?(ie=((xt=z.find(Re=>Re.id===V))==null?void 0:xt.templates)??[],e[28]=z,e[29]=V,e[30]=ie):ie=e[30],Q=ie}const ne=Q;let ee;e[31]!==z||e[32]!==m||e[33]!==V||e[34]!==v?(ee=(ie,Re)=>{m(ie,Re).then(yt=>{W(z?[...z.map(_t=>_t.id!==V?_t:{..._t,templates:[..._t.templates.map(Kt=>Kt.id!==v?Kt:{...Kt,targets:[...Kt.targets,yt]})]})]:[])}).catch(ef)},e[31]=z,e[32]=m,e[33]=V,e[34]=v,e[35]=ee):ee=e[35];const te=ee;let se;e[36]!==p||e[37]!==r||e[38]!==F?(se=async ie=>{F&&await p(ie).then(async()=>{W(await r(F))}).catch(tf)},e[36]=p,e[37]=r,e[38]=F,e[39]=se):se=e[39];const ue=se;let me;e[40]!==N||e[41]!==S.confirmTemplateDelete||e[42]!==f||e[43]!==r||e[44]!==F?(me=async ie=>{F&&await N(S.confirmTemplateDelete)&&await f(ie).then(async()=>{W(await r(F))}).catch(nf)},e[40]=N,e[41]=S.confirmTemplateDelete,e[42]=f,e[43]=r,e[44]=F,e[45]=me):me=e[45];const be=me;let ae;e[46]!==z||e[47]!==N||e[48]!==S.confirmTargetDelete||e[49]!==u||e[50]!==V||e[51]!==v?(ae=async ie=>{await N(S.confirmTargetDelete)&&u(ie).then(()=>W(z?[...z.map(Re=>Re.id!==V?Re:{...Re,templates:[...Re.templates.map(yt=>yt.id!==v?yt:{...yt,targets:yt.targets.filter(_t=>_t.id!==ie)})]})]:[]))},e[46]=z,e[47]=N,e[48]=S.confirmTargetDelete,e[49]=u,e[50]=V,e[51]=v,e[52]=ae):ae=e[52];const ke=ae;let Ne;e[53]!==t||e[54]!==i?(Ne=((mn=t.filter(ie=>(ie.targetSystem&i)>0))==null?void 0:mn.map(sf))??[],e[53]=t,e[54]=i,e[55]=Ne):Ne=e[55];const De=F??null;let re;e[56]!==M?(re=ie=>M(Number(ie)),e[56]=M,e[57]=re):re=e[57];let he;e[58]!==S.kind||e[59]!==Ne||e[60]!==De||e[61]!==re?(he=s.jsx("div",{className:"col-2",children:s.jsx(l.CustomSelectInput,{label:S.kind,size:"sm",noEmptyOption:!0,options:Ne,value:De,onChange:re,dropdownWidth:200})}),e[58]=S.kind,e[59]=Ne,e[60]=De,e[61]=re,e[62]=he):he=e[62];let ye;e[63]!==z?(ye=(z==null?void 0:z.map(of))??[],e[63]=z,e[64]=ye):ye=e[64];const de=V??null;let xe;e[65]!==G?(xe=ie=>G(Number(ie)),e[65]=G,e[66]=xe):xe=e[66];let je;e[67]!==S.subkind||e[68]!==ye||e[69]!==de||e[70]!==xe?(je=s.jsx("div",{className:"col-3",children:s.jsx(l.CustomSelectInput,{label:S.subkind,size:"sm",noEmptyOption:!0,options:ye,value:de,onChange:xe,dropdownWidth:250})}),e[67]=S.subkind,e[68]=ye,e[69]=de,e[70]=xe,e[71]=je):je=e[71];let $e;e[72]!==he||e[73]!==je?($e=s.jsxs("div",{className:"row w-100",children:[he,je]}),e[72]=he,e[73]=je,e[74]=$e):$e=e[74];let Pe;e[75]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>D(!0),e[75]=Pe):Pe=e[75];const ze=F===null;let Ee;e[76]!==S.addNotifAction||e[77]!==ze?(Ee=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"notif-action-add",onClick:Pe,disabled:ze,children:S.addNotifAction}),e[76]=S.addNotifAction,e[77]=ze,e[78]=Ee):Ee=e[78];let Me;e[79]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>P(!0),e[79]=Me):Me=e[79];let He;e[80]!==z||e[81]!==V?(He=V===null||z.find(ie=>ie.id===V)===void 0,e[80]=z,e[81]=V,e[82]=He):He=e[82];let Te;e[83]!==j?(Te=s.jsx(j,{icon:"add"}),e[83]=j,e[84]=Te):Te=e[84];let Le;e[85]!==S.addNotifActionTemplate||e[86]!==He||e[87]!==Te?(Le=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"notif-action-template-add",onClick:Me,disabled:He,icon:Te,children:S.addNotifActionTemplate}),e[85]=S.addNotifActionTemplate,e[86]=He,e[87]=Te,e[88]=Le):Le=e[88];let Ve;e[89]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>L(!0),e[89]=Ve):Ve=e[89];let Ae;e[90]!==ne||e[91]!==v?(Ae=v===null||ne.find(ie=>ie.id===v)===void 0,e[90]=ne,e[91]=v,e[92]=Ae):Ae=e[92];let Ue;e[93]!==j?(Ue=s.jsx(j,{icon:"edit"}),e[93]=j,e[94]=Ue):Ue=e[94];let Xe;e[95]!==S.editTemplate||e[96]!==Ae||e[97]!==Ue?(Xe=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"template-edit",onClick:Ve,disabled:Ae,icon:Ue,children:S.editTemplate}),e[95]=S.editTemplate,e[96]=Ae,e[97]=Ue,e[98]=Xe):Xe=e[98];let Je;e[99]!==be||e[100]!==v?(Je=()=>{v&&be(v)},e[99]=be,e[100]=v,e[101]=Je):Je=e[101];let et;e[102]!==ne||e[103]!==v?(et=v===null||ne.find(ie=>ie.id===v)===void 0,e[102]=ne,e[103]=v,e[104]=et):et=e[104];let it;e[105]!==j?(it=s.jsx(j,{icon:"delete"}),e[105]=j,e[106]=it):it=e[106];let We;e[107]!==S.deleteTemplate||e[108]!==Je||e[109]!==et||e[110]!==it?(We=s.jsx(l.ResponsiveContextDropdownItem,{hideOn:"always",cKey:"template-delete",onClick:Je,color:"danger",disabled:et,icon:it,children:S.deleteTemplate}),e[107]=S.deleteTemplate,e[108]=Je,e[109]=et,e[110]=it,e[111]=We):We=e[111];let Ge;e[112]!==Ee||e[113]!==Le||e[114]!==Xe||e[115]!==We?(Ge=s.jsxs(l.ResponsiveContextDropdown,{children:[Ee,Le,Xe,We]}),e[112]=Ee,e[113]=Le,e[114]=Xe,e[115]=We,e[116]=Ge):Ge=e[116];let Ke;e[117]!==$e||e[118]!==Ge?(Ke=s.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-2",children:[$e,Ge]}),e[117]=$e,e[118]=Ge,e[119]=Ke):Ke=e[119];let qe;e[120]!==fe?(qe=fe??[],e[120]=fe,e[121]=qe):qe=e[121];let tt;e[122]===Symbol.for("react.memo_cache_sentinel")?(tt=ie=>{C(ie),I(null)},e[122]=tt):tt=e[122];let Ye;e[123]!==h||e[124]!==ne||e[125]!==te||e[126]!==ke||e[127]!==v||e[128]!==qe?(Ye=s.jsx("div",{className:"h-75 w-25 overflow-hidden",children:s.jsx(Km,{templates:ne,roles:qe,onAddNotifTarget:te,onRemoveNotifTarget:ke,selectedTemplateId:v,setSelectedTemplateId:tt,EmployeePicker:h})}),e[123]=h,e[124]=ne,e[125]=te,e[126]=ke,e[127]=v,e[128]=qe,e[129]=Ye):Ye=e[129];let Qe;e[130]!==ne||e[131]!==(k==null?void 0:k.message)||e[132]!==v?(Qe=v&&s.jsx("div",{className:"h-75 w-75 overflow-hidden border rounded bg-white",children:s.jsx("iframe",{title:"notification",className:"w-100 h-100",srcDoc:(k==null?void 0:k.message)??((rt=ne.find(ie=>ie.id===v))==null?void 0:rt.templatePreview)})}),e[130]=ne,e[131]=k==null?void 0:k.message,e[132]=v,e[133]=Qe):Qe=e[133];let Ze;e[134]!==$||e[135]!==X||e[136]!==S.empty||e[137]!==S.historyLookup||e[138]!==(k==null?void 0:k.id)||e[139]!==v?(Ze=v&&s.jsx("div",{className:"w-25 h-75 overflow-y-scroll",children:X.length>0?s.jsxs(s.Fragment,{children:[s.jsx(l.TextInput,{type:"text",value:$,onChange:ie=>R((ie==null?void 0:ie.toString())??""),InputContainer:l.FloatingLabelInput,label:S.historyLookup,size:"sm",className:"mb-1"}),s.jsx("div",{children:X.filter(ie=>{var Re;return $?(Re=ie.recipients)==null?void 0:Re.map(lf).join(",").toLocaleLowerCase().includes($):ie}).map(ie=>{var Re;return s.jsxs("div",{role:"button",onClick:()=>I(ie),className:`d-flex flex-column align-items-center bg-white border rounded w-auto p-2 mx-1 mb-1 ${(k==null?void 0:k.id)===ie.id?"border-primary":""}`,children:[s.jsx(l.Typography,{variant:"body",children:l.format(ie.date,"dd.MM.yyyy")}),s.jsx("div",{className:"d-flex gap-1",children:(Re=ie.recipients)==null?void 0:Re.map(af)})]},ie.id)})})]}):s.jsx(l.Alert,{variant:"warning",children:S.empty})}),e[134]=$,e[135]=X,e[136]=S.empty,e[137]=S.historyLookup,e[138]=k==null?void 0:k.id,e[139]=v,e[140]=Ze):Ze=e[140];let nt;e[141]!==ne||e[142]!==a||e[143]!==ue||e[144]!==y||e[145]!==v||e[146]!==T||e[147]!==o?(nt=v&&ne.find(ie=>ie.id===v)!==void 0&&s.jsx(Qm,{show:T,onHide:()=>L(!1),template:ne.find(ie=>ie.id===v),onEdit:ue,styles:o,onPreview:y,entities:a}),e[141]=ne,e[142]=a,e[143]=ue,e[144]=y,e[145]=v,e[146]=T,e[147]=o,e[148]=nt):nt=e[148];let ge;e[149]!==z||e[150]!==t||e[151]!==g||e[152]!==r||e[153]!==V||e[154]!==F||e[155]!==_?(ge=V&&F&&s.jsx(Xm,{show:_,onHide:()=>P(!1),action:{...z.find(ie=>ie.id===V)??{id:V,name:""}},kind:{...t.find(ie=>ie.id===F)??{id:F,name:""}},onNotifTemplateAdd:g,reloadTemplates:async()=>W(await r(F))}),e[149]=z,e[150]=t,e[151]=g,e[152]=r,e[153]=V,e[154]=F,e[155]=_,e[156]=ge):ge=e[156];let Ce;e[157]!==z||e[158]!==t||e[159]!==x||e[160]!==F||e[161]!==E?(Ce=F&&s.jsx(Zm,{show:E,onHide:()=>D(!1),kind:{...t.find(ie=>ie.id===F)??{id:F,name:""}},onNotifActionAdd:x,onCreate:ie=>W([...z,ie])}),e[157]=z,e[158]=t,e[159]=x,e[160]=F,e[161]=E,e[162]=Ce):Ce=e[162];let Ie;e[163]!==Ye||e[164]!==Qe||e[165]!==Ze||e[166]!==nt||e[167]!==ge||e[168]!==Ce?(Ie=s.jsxs("div",{className:"vh-100 overflow-hidden d-flex gap-1",children:[Ye,Qe,Ze,nt,ge,Ce]}),e[163]=Ye,e[164]=Qe,e[165]=Ze,e[166]=nt,e[167]=ge,e[168]=Ce,e[169]=Ie):Ie=e[169];let ve;return e[170]!==Ke||e[171]!==Ie?(ve=s.jsxs("div",{className:"h-100 overflow-hidden",children:[Ke,Ie]}),e[170]=Ke,e[171]=Ie,e[172]=ve):ve=e[172],ve};function ef(n){return console.log(n)}function tf(n){return console.log(n)}function nf(n){return console.log(n)}function sf(n){return{id:n.id,name:n.name}}function of(n){return{id:n.id,name:n.name}}function lf(n){return n.name}function af(n){return s.jsx(l.Typography,{variant:"caption",children:`${n.name}`},n.email)}const rf=n=>{const e=l.compilerRuntimeExports.c(29),{history:t,onClick:o,BnfTableComponent:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{notifCentrum:r}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.u(),e[0]=c):c=e[0];const d=c;let u,m,p,f;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=d.accessor("id",{header:"notificationHistory.id",type:"number",meta:{hidden:!0}}),m=d.accessor("recipientId",{header:"notificationHistory.recipientId",type:"number",meta:{hidden:!0}}),p=d.accessor("recipientFullName",{header:"notificationHistory.recipientFullName",type:"string",meta:{hidden:!0}}),f=d.accessor("actionKindId",{header:"notificationHistory.actionKindId",type:"number",meta:{hidden:!0}}),e[1]=u,e[2]=m,e[3]=p,e[4]=f):(u=e[1],m=e[2],p=e[3],f=e[4]);let x;e[5]!==r.subkind?(x=d.accessor("actionKindName",{header:r.subkind,type:"string",meta:{filterVariant:"select"}}),e[5]=r.subkind,e[6]=x):x=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=d.accessor("actionId",{header:"notificationHistory.actionId",type:"number",meta:{hidden:!0}}),e[7]=g):g=e[7];let y;e[8]!==r.subkind?(y=d.accessor("actionName",{header:r.subkind,type:"string",meta:{filterVariant:"select"}}),e[8]=r.subkind,e[9]=y):y=e[9];let h;e[10]!==r.date?(h=d.accessor("date",{header:r.date,type:"string"}),e[10]=r.date,e[11]=h):h=e[11];let b;e[12]!==r.subject?(b=d.accessor("subject",{header:r.subject,type:"string"}),e[12]=r.subject,e[13]=b):b=e[13];let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=d.accessor("message",{header:"notificationHistory.message",type:"string",meta:{hidden:!0}}),e[14]=j):j=e[14];let S;e[15]!==h||e[16]!==b||e[17]!==x||e[18]!==y?(S=[u,m,p,f,x,g,y,h,b,j],e[15]=h,e[16]=b,e[17]=x,e[18]=y,e[19]=S):S=e[19];const N=S;let v;e[20]!==o?(v=L=>{o(L.id)},e[20]=o,e[21]=v):v=e[21];const C=v;let k,I;e[22]===Symbol.for("react.memo_cache_sentinel")?(k={mode:"enabled"},I={enabled:!1},e[22]=k,e[23]=I):(k=e[22],I=e[23]);let T;return e[24]!==a||e[25]!==N||e[26]!==t||e[27]!==C?(T=s.jsx(a,{columns:N,data:t,pagination:k,fullScreen:I,onRowClick:C}),e[24]=a,e[25]=N,e[26]=t,e[27]=C,e[28]=T):T=e[28],T},cf=n=>{const e=l.compilerRuntimeExports.c(28),{reloadUserHistory:t,EmployeePicker:o,BnfTableComponent:a}=n,{texts:i}=w.useContext(l.LuminusComponentsContext),{notifCentrum:r}=i,[c,d]=w.useState(null),[u,m]=Fe.useLocalStorageState("notif-user",null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[0]=p):p=e[0];const[f,x]=w.useState(p);let g,y;e[1]!==u||e[2]!==t?(g=()=>{u!==null&&t(u.id).then(I=>{x(I)}).catch(I=>{console.log(I),x([])})},y=[u,t],e[1]=u,e[2]=t,e[3]=g,e[4]=y):(g=e[3],y=e[4]),w.useEffect(g,y);let h;e[5]!==m?(h=I=>m(I?{id:Number(I.id),name:I.name}:null),e[5]=m,e[6]=h):h=e[6];let b;e[7]!==o||e[8]!==u||e[9]!==r.employee||e[10]!==h?(b=s.jsx("div",{className:"row",children:s.jsx("div",{className:"col-3",children:s.jsx(o,{label:r.employee,value:u,size:"sm",onSelect:h})})}),e[7]=o,e[8]=u,e[9]=r.employee,e[10]=h,e[11]=b):b=e[11];let j;e[12]!==f?(j=f??[],e[12]=f,e[13]=j):j=e[13];let S;e[14]!==f?(S=I=>d((f==null?void 0:f.find(T=>T.id===I))??null),e[14]=f,e[15]=S):S=e[15];let N;e[16]!==a||e[17]!==j||e[18]!==S?(N=s.jsx("div",{className:"col-5 h-75 overflow-hidden",children:s.jsx(rf,{history:j,onClick:S,BnfTableComponent:a})}),e[16]=a,e[17]=j,e[18]=S,e[19]=N):N=e[19];let v;e[20]!==c?(v=c&&s.jsx("div",{className:"col border rounded bg-white h-75",children:s.jsx("iframe",{title:"notification",className:"w-100 h-100",srcDoc:c==null?void 0:c.message})}),e[20]=c,e[21]=v):v=e[21];let C;e[22]!==v||e[23]!==N?(C=s.jsxs("div",{className:"vh-100 overflow hidden row",children:[N,v]}),e[22]=v,e[23]=N,e[24]=C):C=e[24];let k;return e[25]!==C||e[26]!==b?(k=s.jsxs("div",{className:"h-100 overflow-hidden d-flex flex-column gap-1",children:[b,C]}),e[25]=C,e[26]=b,e[27]=k):k=e[27],k},df=n=>{const e=l.compilerRuntimeExports.c(11),{zNumber:t,zStringRequired:o}=l.useZodSchemaTypes();let a,i;if(e[0]!==t||e[1]!==o){const p=l.objectType({id:t(),name:o(),css:o()});i=Se.useForm,a=l.t(p),e[0]=t,e[1]=o,e[2]=a,e[3]=i}else a=e[2],i=e[3];let r;e[4]!==a?(r={resolver:a},e[4]=a,e[5]=r):r=e[5];const c=i(r);let d;e[6]!==n?(d=async p=>{await n({...p,templatesCount:0})},e[6]=n,e[7]=d):d=e[7];const u=d;let m;return e[8]!==c||e[9]!==u?(m={formMethods:c,onSubmit:u},e[8]=c,e[9]=u,e[10]=m):m=e[10],m},uf=()=>{const n=l.compilerRuntimeExports.c(14),{texts:e}=w.useContext(l.LuminusComponentsContext),{notifCentrum:t}=e;let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.u(),n[0]=o):o=n[0];const a=o;let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.accessor("id",{type:"number",meta:{hidden:!0}}),n[1]=i):i=n[1];let r;n[2]!==t.name?(r=a.accessor("name",{type:"string",header:t.name}),n[2]=t.name,n[3]=r):r=n[3];let c;n[4]!==t.style?(c=a.accessor("css",{type:"string",header:t.style,meta:{hidden:!0}}),n[4]=t.style,n[5]=c):c=n[5];let d;n[6]!==t.templatesCount?(d=a.accessor("templatesCount",{type:"number",header:t.templatesCount}),n[6]=t.templatesCount,n[7]=d):d=n[7];let u;n[8]!==r||n[9]!==c||n[10]!==d?(u=[i,r,c,d],n[8]=r,n[9]=c,n[10]=d,n[11]=u):u=n[11];const m=u;let p;return n[12]!==m?(p={columnsDef:m},n[12]=m,n[13]=p):p=n[13],p},mf=n=>{const e=l.compilerRuntimeExports.c(64),{reloadStyles:t,BnfTableComponent:o,tableIdentifier:a,postStyle:i}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];const[c,d]=w.useState(r),[u,m]=w.useState(null),[p,f]=w.useState(null),{addNotification:x}=l.useNotifications(),{texts:g,ProjectIconComponent:y}=w.useContext(l.LuminusComponentsContext),{notifCentrum:h,reports:b}=g;let j,S;e[1]!==t?(j=()=>{t().then(ce=>{d(ce)}).catch(ce=>{console.log(ce),d([])})},S=[t],e[1]=t,e[2]=j,e[3]=S):(j=e[2],S=e[3]),w.useEffect(j,S);const{columnsDef:N}=uf();let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=ce=>{m(ce)},e[4]=v):v=e[4];const C=v;let k;e[5]!==x||e[6]!==i||e[7]!==t||e[8]!==b?(k=async ce=>{await i(ce).then(async()=>{x(b.saveSuccessful,"success"),d(await t())})},e[5]=x,e[6]=i,e[7]=t,e[8]=b,e[9]=k):k=e[9];const I=k,{formMethods:T,onSubmit:L}=df(I);let E;e[10]!==T?(E=T.watch("css"),e[10]=T,e[11]=E):E=e[11];const D=E;let _;e[12]!==D||e[13]!==h.templateBodyTagRequired?(_=()=>{f((D??"").includes("<template-body></template-body>")?null:h.templateBodyTagRequired)},e[12]=D,e[13]=h.templateBodyTagRequired,e[14]=_):_=e[14];let P;e[15]!==D||e[16]!==T||e[17]!==h?(P=[D,T,h],e[15]=D,e[16]=T,e[17]=h,e[18]=P):P=e[18],w.useEffect(_,P);let $,R;e[19]!==T||e[20]!==u?($=()=>{T.reset({id:(u==null?void 0:u.id)??0,name:(u==null?void 0:u.name)??"",css:(u==null?void 0:u.css)??""}),u||ot.hookFormSetNulls(T,["name","css"])},R=[T,u],e[19]=T,e[20]=u,e[21]=$,e[22]=R):($=e[21],R=e[22]),w.useEffect($,R);let F;e[23]!==o||e[24]!==N||e[25]!==c||e[26]!==a?(F=s.jsx("div",{className:"w-50 h-100 overflow-hidden",children:s.jsx(o,{tableId:a,columns:N,data:c,onRowClick:C})}),e[23]=o,e[24]=N,e[25]=c,e[26]=a,e[27]=F):F=e[27];let M;e[28]!==T||e[29]!==L?(M=T.handleSubmit(L),e[28]=T,e[29]=L,e[30]=M):M=e[30];let O;e[31]!==h.name?(O=s.jsx(l.HookFormTextInput,{formField:"name",type:"text",className:"col",InputContainer:l.FloatingLabelInput,label:h.name,size:"sm"}),e[31]=h.name,e[32]=O):O=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B={style:{height:"auto"}},e[33]=B):B=e[33];let H;e[34]!==h.markup?(H=s.jsx(l.HookFormTextAreaInput,{formField:"css",label:h.markup,InputContainer:l.FloatingLabelInput,rows:20,customFormControlProps:B,showClearIcon:!0}),e[34]=h.markup,e[35]=H):H=e[35];let z;e[36]!==p?(z=p&&s.jsxs(l.Typography,{variant:"body",className:"text-danger",children:["**",p]}),e[36]=p,e[37]=z):z=e[37];let W;e[38]!==y||e[39]!==h.addNewStyle||e[40]!==u?(W=u&&s.jsx("div",{className:"col-auto",children:s.jsx(l.ContextButton,{onClick:()=>m(null),icon:s.jsx(y,{icon:"add"}),children:h.addNewStyle})}),e[38]=y,e[39]=h.addNewStyle,e[40]=u,e[41]=W):W=e[41];const A=D??"";let U;e[42]!==A?(U=A.includes("<template-body></template-body>"),e[42]=A,e[43]=U):U=e[43];const K=!U,V=u?h.save:h.create;let G;e[44]!==K||e[45]!==V?(G=s.jsx(l.PrimaryButton,{type:"submit",size:"sm",disabled:K,children:V}),e[44]=K,e[45]=V,e[46]=G):G=e[46];let Z;e[47]!==W||e[48]!==G?(Z=s.jsxs("div",{className:"d-flex gap-2 justify-content-end",children:[W,G]}),e[47]=W,e[48]=G,e[49]=Z):Z=e[49];let X;e[50]!==O||e[51]!==H||e[52]!==z||e[53]!==Z?(X=s.jsxs("div",{className:"d-flex flex-column gap-2",children:[O,H,z,Z]}),e[50]=O,e[51]=H,e[52]=z,e[53]=Z,e[54]=X):X=e[54];let le;e[55]!==M||e[56]!==X?(le=s.jsx(l.Form,{onSubmit:M,children:X}),e[55]=M,e[56]=X,e[57]=le):le=e[57];let q;e[58]!==T||e[59]!==le?(q=s.jsx("div",{className:"w-50 h-100 border rounded bg-white p-3",children:s.jsx(Se.FormProvider,{...T,children:le})}),e[58]=T,e[59]=le,e[60]=q):q=e[60];let oe;return e[61]!==F||e[62]!==q?(oe=s.jsxs("div",{className:"d-flex gap-2 h-100",children:[F,q]}),e[61]=F,e[62]=q,e[63]=oe):oe=e[63],oe},ml=n=>{var T,L,E,D,_;const e=l.compilerRuntimeExports.c(37),{result:t,onClose:o,tableIdentifier:a,BnfTableComponent:i}=n,{texts:r,ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext),{imports:d}=r;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=l.u(),e[0]=u):u=e[0];const m=u;let p;e[1]!==d.row?(p=m.accessor("row",{header:d.row,type:"number",size:100}),e[1]=d.row,e[2]=p):p=e[2];let f;e[3]!==d.column?(f=m.accessor("column",{header:d.column,type:"number",size:100}),e[3]=d.column,e[4]=f):f=e[4];let x;e[5]!==d.error?(x=m.accessor("error",{header:d.error,type:"string",size:500}),e[5]=d.error,e[6]=x):x=e[6];let g;e[7]!==p||e[8]!==f||e[9]!==x?(g=[p,f,x],e[7]=p,e[8]=f,e[9]=x,e[10]=g):g=e[10];const y=g;if(!t)return null;const h=t.success?"success":"danger",b=t.success?d.importSuccess:d.importFailed;let j;e[11]!==b?(j=s.jsx("div",{className:"w-100 text-center",children:b}),e[11]=b,e[12]=j):j=e[12];let S;e[13]!==d||e[14]!==t.data||e[15]!==t.success?(S=t.success&&((T=t.data)!=null&&T.added||(L=t.data)!=null&&L.updated||(E=t.data)!=null&&E.deleted)?s.jsx("div",{className:"d-flex justify-content-center mt-2",children:s.jsxs("div",{className:"list-group",children:[t.data.added?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importAdded(t.data.added)," "]})}):null,t.data.updated?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importUpdated(t.data.updated)," "]})}):null,t.data.deleted?s.jsx("div",{className:"list-group-item p-1 px-3",children:s.jsxs(l.Typography,{variant:"body2",className:"d-flex gap-2 align-items-center",children:[d.importDeleted(t.data.deleted)," "]})}):null]})}):null,e[13]=d,e[14]=t.data,e[15]=t.success,e[16]=S):S=e[16];let N;e[17]!==i||e[18]!==y||e[19]!==t.data||e[20]!==t.success||e[21]!==a?(N=!t.success&&((_=(D=t.data)==null?void 0:D.errors)==null?void 0:_.length)>0?s.jsx("div",{className:"mt-3",children:s.jsx(i,{columns:y,data:t.data.errors,tableId:a})}):null,e[17]=i,e[18]=y,e[19]=t.data,e[20]=t.success,e[21]=a,e[22]=N):N=e[22];let v;e[23]!==S||e[24]!==N||e[25]!==j?(v=s.jsxs("div",{className:"w-100",children:[j,S,N]}),e[23]=S,e[24]=N,e[25]=j,e[26]=v):v=e[26];let C;e[27]!==c||e[28]!==o||e[29]!==t.success?(C=o!==void 0?s.jsx(l.IconButton,{color:t.success?"success":"danger",className:l.classNames("hover-darken",t.success?"bg-success-subtle":"bg-danger-subtle"),onClick:o,children:s.jsx(c,{icon:"close"})}):null,e[27]=c,e[28]=o,e[29]=t.success,e[30]=C):C=e[30];let k;e[31]!==v||e[32]!==C?(k=s.jsxs("div",{className:"d-flex gap-3 align-items-start",children:[v,C]}),e[31]=v,e[32]=C,e[33]=k):k=e[33];let I;return e[34]!==k||e[35]!==h?(I=s.jsx(s.Fragment,{children:s.jsx(l.Alert,{variant:h,size:"sm",className:"mb-2 p-2",children:k})}),e[34]=k,e[35]=h,e[36]=I):I=e[36],I},ff="_upload-box_9ka79_1",pf="_browse-btn_9ka79_15",In={uploadBox:ff,browseBtn:pf},fl=n=>{const e=l.compilerRuntimeExports.c(35),{file:t,onFileChange:o,onImport:a,children:i,multiple:r,accept:c}=n,{ProjectIconComponent:d,texts:u}=w.useContext(l.LuminusComponentsContext),{imports:m}=u;let p;e[0]!==r||e[1]!==o?(p=async T=>{T.length>0&&o(r===!0?[...T]:T[0])},e[0]=r,e[1]=o,e[2]=p):p=e[2];const f=p;let x;e[3]!==f?(x=T=>{var E;T.preventDefault();const L=(E=T.dataTransfer)==null?void 0:E.files;L&&(L==null?void 0:L.length)>0&&f(L)},e[3]=f,e[4]=x):x=e[4];const g=x;let y;e[5]!==i||e[6]!==t||e[7]!==m.start||e[8]!==r||e[9]!==a?(y=t!==null?s.jsxs("div",{className:"d-flex border rounded p-1 ps-2 bg-white justify-content-between align-items-center mb-2",children:[s.jsx(l.Typography,{variant:"body",children:r?t.map(hf).join(", "):t.name}),s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[i??null,s.jsx(l.PrimaryButton,{className:"text-nowrap",size:"sm",disabled:t===null,onClick:a,children:m.start})]})]}):null,e[5]=i,e[6]=t,e[7]=m.start,e[8]=r,e[9]=a,e[10]=y):y=e[10];const h=t!==null;let b;e[11]!==h?(b=l.classNames(In.uploadBox,{[In.active]:h}),e[11]=h,e[12]=b):b=e[12];let j;e[13]!==m.dropHint?(j=s.jsx(l.Typography,{variant:"body",children:m.dropHint}),e[13]=m.dropHint,e[14]=j):j=e[14];let S;e[15]!==f?(S=T=>{var L;return((L=T.target)==null?void 0:L.files)&&f(T.target.files)},e[15]=f,e[16]=S):S=e[16];let N;e[17]!==c||e[18]!==r||e[19]!==S?(N=s.jsx("input",{type:"file",hidden:!0,id:"browse",onChange:S,multiple:r,accept:c}),e[17]=c,e[18]=r,e[19]=S,e[20]=N):N=e[20];let v;e[21]!==d?(v=s.jsx(d,{icon:"file-upload"}),e[21]=d,e[22]=v):v=e[22];let C;e[23]!==m.pickFileHint||e[24]!==v?(C=s.jsx("label",{htmlFor:"browse",className:In.browseBtn,children:s.jsxs(l.Typography,{variant:"body",className:"d-flex gap-2 align-items-center",children:[v,m.pickFileHint]})}),e[23]=m.pickFileHint,e[24]=v,e[25]=C):C=e[25];let k;e[26]!==g||e[27]!==C||e[28]!==b||e[29]!==j||e[30]!==N?(k=s.jsxs("div",{className:b,onDrop:g,onDragOver:gf,children:[j,N,C]}),e[26]=g,e[27]=C,e[28]=b,e[29]=j,e[30]=N,e[31]=k):k=e[31];let I;return e[32]!==k||e[33]!==y?(I=s.jsxs(s.Fragment,{children:[y,k]}),e[32]=k,e[33]=y,e[34]=I):I=e[34],I};function hf(n){return n.name}function gf(n){return n.preventDefault()}const xf=n=>{const e=l.compilerRuntimeExports.c(18),{otherSettingId:t,languageOptions:o,tableIdentifier:a,SettingsOutlet:i,BnfTableComponent:r,importLocalization:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{localizations:u}=d,[m,p]=w.useState(o[0].id),[f,x]=w.useState(null),[g,y]=w.useState(null);let h;e[0]!==c||e[1]!==m||e[2]!==f?(h=async()=>{if(f===null)return;const N=await c({file:f,lang:m});N.status==="success"&&y(N.data)},e[0]=c,e[1]=m,e[2]=f,e[3]=h):h=e[3];const b=h;let j;e[4]!==r||e[5]!==b||e[6]!==m||e[7]!==o||e[8]!==u.importedLanguage||e[9]!==g||e[10]!==f||e[11]!==a?(j=g?s.jsx(ml,{result:g,onClose:()=>y(null),BnfTableComponent:r,tableIdentifier:a}):s.jsx(fl,{file:f,onFileChange:x,onImport:b,children:s.jsx("div",{style:{minWidth:140},children:s.jsx(l.CustomSelectInput,{value:m,onChange:N=>typeof N=="string"?p(N):null,options:o,label:u.importedLanguage})})}),e[4]=r,e[5]=b,e[6]=m,e[7]=o,e[8]=u.importedLanguage,e[9]=g,e[10]=f,e[11]=a,e[12]=j):j=e[12];let S;return e[13]!==i||e[14]!==u.localizationImport||e[15]!==t||e[16]!==j?(S=s.jsx(i,{itemId:t,title:u.localizationImport,children:j}),e[13]=i,e[14]=u.localizationImport,e[15]=t,e[16]=j,e[17]=S):S=e[17],S},yf=(n,e)=>{const t=e.split(".");let o=n;for(let a=0;a<t.length;a++){const i=t[a],r=o[i];if(typeof r=="string")return r;if(r===void 0)return;o=r}},vf=n=>{const e=l.compilerRuntimeExports.c(22),{selLng:t,lngsData:o,localizationKey:a,reloadData:i,saveChanges:r}=n,{ProjectIconComponent:c}=w.useContext(l.LuminusComponentsContext);let d;if(e[0]!==o||e[1]!==a||e[2]!==t){e:{const N=o.get(t);if(N===void 0){d="";break e}const v=yf(N,a);d=N!==void 0&&v!==void 0?v:""}e[0]=o,e[1]=a,e[2]=t,e[3]=d}else d=e[3];const u=d,[m,p]=w.useState(u);let f;e[4]!==a||e[5]!==i||e[6]!==r||e[7]!==t||e[8]!==m?(f=async()=>{await r([{fileName:t+".json",items:[{key:a,value:m}]}]),await i()},e[4]=a,e[5]=i,e[6]=r,e[7]=t,e[8]=m,e[9]=f):f=e[9];const x=f,g=m!==u,y=t+a;let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=N=>{p(typeof N!="string"?"":N)},e[10]=h):h=e[10];let b;e[11]!==y||e[12]!==m?(b=s.jsx(l.TextInput,{label:y,type:"text",value:m,onChange:h,InputContainer:l.RowLabelInput,withoutLabel:!0,className:"flex-grow-1"}),e[11]=y,e[12]=m,e[13]=b):b=e[13];let j;e[14]!==c||e[15]!==u||e[16]!==x||e[17]!==g?(j=g?s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[s.jsx(l.IconButton,{color:"danger",onClick:()=>p(u),children:s.jsx(c,{icon:"cancel"})}),s.jsx(l.IconButton,{onClick:x,children:s.jsx(c,{icon:"check"})})]}):null,e[14]=c,e[15]=u,e[16]=x,e[17]=g,e[18]=j):j=e[18];let S;return e[19]!==b||e[20]!==j?(S=s.jsxs("div",{className:"d-flex",children:[b,j]}),e[19]=b,e[20]=j,e[21]=S):S=e[21],S},bf="_keysTable_1j6ns_1",jf="_subgrid_1j6ns_14",Sf="_lngSelectRow_1j6ns_19",Cf="_tableItem_1j6ns_26",Nf="_tableFooter_1j6ns_29",wf="_tableFullWidth_1j6ns_35",If="_tableBody_1j6ns_39",kf="_lngSelect_1j6ns_19",Tf="_addLng_1j6ns_52",_f="_fileSelect_1j6ns_57",Df="_searchBox_1j6ns_61",lt={keysTable:bf,subgrid:jf,lngSelectRow:Sf,tableItem:Cf,tableFooter:Nf,tableFullWidth:wf,tableBody:If,lngSelect:kf,addLng:Tf,fileSelect:_f,searchBox:Df},en=50,Ef=(n,e)=>{const t=e.split(".");let o=n;for(let a=0;a<t.length;a++){const i=t[a],r=o[i];if(typeof r=="string")return r;if(r===void 0)return;o=r}},Lf=n=>{const e=l.compilerRuntimeExports.c(173),{languageOptions:t,envMode:o,getOtherSettingsUrl:a,downloadXls:i,saveChanges:r,localizationFilesOptions:c,remoteLocalesRoot:d}=n,{texts:u,ProjectIconComponent:m}=w.useContext(l.LuminusComponentsContext),{localizations:p}=u,[f,x]=w.useState(1);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[0]=g):g=e[0];const[y,h]=w.useState(g),[b,j]=w.useState(null),[S,N]=w.useState("");let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[1]=v):v=e[1];const[C,k]=w.useState(v);let I;e[2]===Symbol.for("react.memo_cache_sentinel")?(I=ge=>{h(new Map),k(ge)},e[2]=I):I=e[2];const T=I;let L;if(e[3]!==t||e[4]!==C){let ge;e[6]!==C?(ge=Ce=>!C.has(Ce.id),e[6]=C,e[7]=ge):ge=e[7],L=t.filter(ge),e[3]=t,e[4]=C,e[5]=L}else L=e[5];const E=L;let D;e:{if(y.size===0){let Ie;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ie=[],e[8]=Ie):Ie=e[8],D=Ie;break e}let ge;if(e[9]!==y||e[10]!==c||e[11]!==b||e[12]!==C){const Ie=new Set,ve=(rt,ie)=>{const Re=ie===void 0?"":ie;if(typeof rt[1]=="object"){Object.entries(rt[1]).forEach(yt=>ve(yt,Re+rt[0]+"."));return}Ie.add(Re+rt[0])};Array.from(y).forEach(rt=>{Object.entries(rt[1]).forEach(ie=>ve(ie))});const Be=Array.from(Ie),xt=c.find(rt=>rt.path===b);ge=((xt==null?void 0:xt.type)==="report"?Be.filter(Rf):Be).map(rt=>({key:rt,lngData:new Map(Array.from(C).map(ie=>{const Re=y.get(ie);return[ie,(Re===void 0?void 0:Ef(Re,rt))??""]}))})),e[9]=y,e[10]=c,e[11]=b,e[12]=C,e[13]=ge}else ge=e[13];D=ge}const _=D;let P;e[14]!==S||e[15]!==_?(P=_.filter(ge=>l.stringSearchWithin(ge.key,S)||Array.from(ge.lngData).some(Ce=>typeof(Ce==null?void 0:Ce[1])!="string"?!1:l.stringSearchWithin((Ce==null?void 0:Ce[1])??"",S))),e[14]=S,e[15]=_,e[16]=P):P=e[16];const $=P,R=Math.ceil($.length/en);let F;e[17]!==R?(F=ge=>{ge!==null&&x(()=>Math.max(1,Math.min(ge,R)))},e[17]=R,e[18]=F):F=e[18];const M=F;let O;e[19]!==d||e[20]!==b||e[21]!==C?(O=async()=>{if(b===null)return;const ge=Array.from(C).map(Ie=>(async()=>{const ve=await l.axios.get(`${d}${b==null?void 0:b.replace("{{lng}}",Ie)}&v=${new Date().getTime()}`,{responseType:"json"});return[Ie,ve.data]})()),Ce=await Promise.allSettled(ge);h(new Map(Ce.map(Ff)))},e[19]=d,e[20]=b,e[21]=C,e[22]=O):O=e[22];const B=O;let H;e[23]!==B?(H=async()=>{B()},e[23]=B,e[24]=H):H=e[24];const z=H,W=E.length>0,A=C.size+1+(W?1:0);let U;e[25]!==M||e[26]!==f?(U=()=>{M(f)},e[25]=M,e[26]=f,e[27]=U):U=e[27];let K;e[28]!==M||e[29]!==f||e[30]!==$?(K=[M,f,$],e[28]=M,e[29]=f,e[30]=$,e[31]=K):K=e[31],w.useEffect(U,K);let V,G;if(e[32]!==B?(V=()=>{B()},G=[B],e[32]=B,e[33]=V,e[34]=G):(V=e[33],G=e[34]),w.useEffect(V,G),d===void 0){const ge=p.cantRunLocalizationSettings;let Ce,Ie;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx("br",{}),Ie=s.jsx("br",{}),e[35]=Ce,e[36]=Ie):(Ce=e[35],Ie=e[36]);let ve;e[37]!==o||e[38]!==p?(ve=p.envNotConnectedToRemote(o.toUpperCase()),e[37]=o,e[38]=p,e[39]=ve):ve=e[39];let Be;return e[40]!==p.cantRunLocalizationSettings||e[41]!==ve?(Be=s.jsx(l.PageContainer,{children:s.jsxs(l.Alert,{variant:"danger",className:"fw-bold",children:[ge,Ce,Ie,ve]})}),e[40]=p.cantRunLocalizationSettings,e[41]=ve,e[42]=Be):Be=e[42],Be}let Z;e[43]!==p.localizationSettings?(Z=s.jsx("div",{className:"d-flex gap-4",children:s.jsx(l.Typography,{variant:"h3",children:p.localizationSettings})}),e[43]=p.localizationSettings,e[44]=Z):Z=e[44];const X=p.localizationSettings,le=W?1:0;let q;e[45]!==le||e[46]!==A?(q={"--keys-table-columns":A,"--adding-column":le},e[45]=le,e[46]=A,e[47]=q):q=e[47];let oe;e[48]===Symbol.for("react.memo_cache_sentinel")?(oe=l.classNames(lt.tableFullWidth,"d-flex align-items-center justify-content-between gap-2 px-2 mt-1"),e[48]=oe):oe=e[48];let ce;e[49]!==c?(ce=c.map($f),e[49]=c,e[50]=ce):ce=e[50];let fe;e[51]===Symbol.for("react.memo_cache_sentinel")?(fe=ge=>typeof ge!="number"?j(ge):null,e[51]=fe):fe=e[51];let pe;e[52]!==p.localizationFile||e[53]!==b||e[54]!==ce?(pe=s.jsx(l.CustomSelectInput,{options:ce,value:b,onChange:fe,size:"sm",label:p.localizationFile,className:lt.fileSelect,noSortOptions:!0}),e[52]=p.localizationFile,e[53]=b,e[54]=ce,e[55]=pe):pe=e[55];let J;e[56]===Symbol.for("react.memo_cache_sentinel")?(J=l.classNames(lt.searchBox,"d-flex align-items-center gap-2 border rounded"),e[56]=J):J=e[56];let Y;e[57]===Symbol.for("react.memo_cache_sentinel")?(Y={className:"mt- me-n4"},e[57]=Y):Y=e[57];let Q;e[58]!==m?(Q=s.jsx(m,{icon:"search",className:"text-muted",size:18,iconProps:Y}),e[58]=m,e[59]=Q):Q=e[59];let ne;e[60]===Symbol.for("react.memo_cache_sentinel")?(ne=ge=>N(typeof ge=="string"?ge:""),e[60]=ne):ne=e[60];const ee=S!=="";let te;e[61]!==S||e[62]!==ee?(te=s.jsx(l.TextInput,{type:"text",value:S,onChange:ne,size:"sm",showClearIcon:ee,withoutLabel:!0,placeholder:"vyhledávat...",className:"placeholder-muted bg-transparent border-0 my-0 py-0 w-100"}),e[61]=S,e[62]=ee,e[63]=te):te=e[63];let se;e[64]!==Q||e[65]!==te?(se=s.jsxs("div",{className:J,children:[Q,te]}),e[64]=Q,e[65]=te,e[66]=se):se=e[66];let ue;e[67]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(l.FileExtensionIcon,{fileExtension:"xls"}),e[67]=ue):ue=e[67];let me;e[68]!==i||e[69]!==p.xlsExport?(me=s.jsx(l.ResponsiveContextDropdownItem,{cKey:"export",hideOn:"always",onClick:i,icon:ue,children:p.xlsExport}),e[68]=i,e[69]=p.xlsExport,e[70]=me):me=e[70];let be;e[71]!==a?(be=a("localizationImport"),e[71]=a,e[72]=be):be=e[72];let ae;e[73]!==m?(ae=s.jsx(m,{icon:"link"}),e[73]=m,e[74]=ae):ae=e[74];let ke;e[75]!==p.import||e[76]!==be||e[77]!==ae?(ke=s.jsx(l.ResponsiveContextDropdownItem,{cKey:"import",hideOn:"always",to:be,icon:ae,children:p.import}),e[75]=p.import,e[76]=be,e[77]=ae,e[78]=ke):ke=e[78];let Ne;e[79]!==me||e[80]!==ke?(Ne=s.jsxs(l.ResponsiveContextDropdown,{children:[me,ke]}),e[79]=me,e[80]=ke,e[81]=Ne):Ne=e[81];let De;e[82]!==pe||e[83]!==se||e[84]!==Ne?(De=s.jsxs("div",{className:oe,children:[pe,se,Ne]}),e[82]=pe,e[83]=se,e[84]=Ne,e[85]=De):De=e[85];let re;e[86]===Symbol.for("react.memo_cache_sentinel")?(re=l.classNames(lt.subgrid,lt.lngSelectRow),e[86]=re):re=e[86];let he;e[87]!==p.key?(he=s.jsx(l.Typography,{variant:"body",children:p.key}),e[87]=p.key,e[88]=he):he=e[88];let ye;e[89]!==C?(ye=Array.from(C),e[89]=C,e[90]=ye):ye=e[90];let de;e[91]!==t||e[92]!==p.language||e[93]!==C||e[94]!==ye?(de=ye.map((ge,Ce)=>s.jsx(l.CustomSelectInput,{options:t.filter(Ie=>Ie.id===ge||!C.has(Ie.id)),value:ge,onChange:Ie=>T(ve=>Ie===null?(ve.delete(ge),new Set(ve)):(typeof Ie=="string"&&(ve.delete(ge),ve.add(Ie)),new Set(ve))),size:"sm",label:`${p.language} ${Ce+1}`,withoutLabel:!0,InputContainer:l.RowLabelInput,className:l.classNames(lt.lngSelect)},ge)),e[91]=t,e[92]=p.language,e[93]=C,e[94]=ye,e[95]=de):de=e[95];let xe;e[96]!==E||e[97]!==W||e[98]!==p.addLanguage?(xe=W?s.jsx(l.CustomSelectInput,{options:E,value:null,onChange:ge=>T(Ce=>(typeof ge=="string"&&Ce.add(ge),new Set(Ce))),size:"sm",label:p.addLanguage,InputContainer:l.RowLabelInput,className:l.classNames(lt.lngSelect,lt.addLng)}):null,e[96]=E,e[97]=W,e[98]=p.addLanguage,e[99]=xe):xe=e[99];let je;e[100]!==he||e[101]!==de||e[102]!==xe?(je=s.jsxs("div",{className:re,children:[he,de,xe]}),e[100]=he,e[101]=de,e[102]=xe,e[103]=je):je=e[103];let $e;e[104]===Symbol.for("react.memo_cache_sentinel")?($e=l.classNames(lt.subgrid,lt.tableBody),e[104]=$e):$e=e[104];let Pe;e[105]!==p.noDataFiltered||e[106]!==p.noDataLoaded||e[107]!==_.length||e[108]!==$.length?(Pe=_.length===0||$.length===0?s.jsx(l.Alert,{variant:"warning",className:l.classNames(lt.tableFullWidth,lt.emptyTableAlert,"my-n1"),children:_.length===0?p.noDataLoaded:$.length===0?p.noDataFiltered:null}):null,e[105]=p.noDataFiltered,e[106]=p.noDataLoaded,e[107]=_.length,e[108]=$.length,e[109]=Pe):Pe=e[109];let ze;e[110]!==f||e[111]!==$?(ze=$.slice(en*(f-1),en*f),e[110]=f,e[111]=$,e[112]=ze):ze=e[112];let Ee;e[113]!==y||e[114]!==z||e[115]!==r||e[116]!==C||e[117]!==ze?(Ee=ze.map(ge=>s.jsxs("div",{className:l.classNames(lt.subgrid,lt.tableItem),children:[s.jsx(l.Typography,{variant:"form-label",children:ge.key}),Array.from(C).map(Ce=>s.jsx(vf,{localizationKey:ge.key,lngsData:y,selLng:Ce,reloadData:z,saveChanges:r},Ce))]},ge.key)),e[113]=y,e[114]=z,e[115]=r,e[116]=C,e[117]=ze,e[118]=Ee):Ee=e[118];let Me;e[119]!==Pe||e[120]!==Ee?(Me=s.jsxs("div",{className:$e,children:[Pe,Ee]}),e[119]=Pe,e[120]=Ee,e[121]=Me):Me=e[121];let He;e[122]===Symbol.for("react.memo_cache_sentinel")?(He=l.classNames("d-flex align-items-center justify-content-around gap-3 px-2 py-0",lt.tableFooter),e[122]=He):He=e[122];let Te;e[123]!==$.length?(Te=s.jsx("span",{className:"fw-bold",children:$.length}),e[123]=$.length,e[124]=Te):Te=e[124];let Le;e[125]!==p.keyCount||e[126]!==Te?(Le=s.jsx("div",{children:s.jsxs(l.Typography,{variant:"body",children:[p.keyCount,":"," ",Te]})}),e[125]=p.keyCount,e[126]=Te,e[127]=Le):Le=e[127];let Ve;e[128]!==p.page?(Ve=s.jsxs(l.Typography,{variant:"body",children:[p.page,": "]}),e[128]=p.page,e[129]=Ve):Ve=e[129];let Ae;e[130]!==M||e[131]!==f?(Ae=()=>M(f-1),e[130]=M,e[131]=f,e[132]=Ae):Ae=e[132];let Ue;e[133]!==m?(Ue=s.jsx(m,{icon:"minus"}),e[133]=m,e[134]=Ue):Ue=e[134];let Xe;e[135]!==Ae||e[136]!==Ue?(Xe=s.jsx(l.IconButton,{size:"sm",onClick:Ae,children:Ue}),e[135]=Ae,e[136]=Ue,e[137]=Xe):Xe=e[137];let Je;e[138]===Symbol.for("react.memo_cache_sentinel")?(Je={width:30},e[138]=Je):Je=e[138];let et;e[139]!==M||e[140]!==f?(et=s.jsx("div",{style:Je,children:s.jsx(nl,{value:f,onChange:M,InputContainer:l.RowLabelInput,withoutLabel:!0,size:"sm"})}),e[139]=M,e[140]=f,e[141]=et):et=e[141];const it=Math.ceil($.length/en);let We;e[142]!==it?(We=s.jsxs(l.Typography,{variant:"body",children:["/",it]}),e[142]=it,e[143]=We):We=e[143];let Ge;e[144]!==M||e[145]!==f?(Ge=()=>M(f+1),e[144]=M,e[145]=f,e[146]=Ge):Ge=e[146];let Ke;e[147]!==m?(Ke=s.jsx(m,{icon:"plus"}),e[147]=m,e[148]=Ke):Ke=e[148];let qe;e[149]!==Ge||e[150]!==Ke?(qe=s.jsx(l.IconButton,{size:"sm",onClick:Ge,children:Ke}),e[149]=Ge,e[150]=Ke,e[151]=qe):qe=e[151];let tt;e[152]!==Xe||e[153]!==et||e[154]!==We||e[155]!==qe?(tt=s.jsxs("div",{className:"d-flex align-items-center gap-1",children:[Xe,et,We,qe]}),e[152]=Xe,e[153]=et,e[154]=We,e[155]=qe,e[156]=tt):tt=e[156];let Ye;e[157]!==Ve||e[158]!==tt?(Ye=s.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[Ve,tt]}),e[157]=Ve,e[158]=tt,e[159]=Ye):Ye=e[159];let Qe;e[160]!==Le||e[161]!==Ye?(Qe=s.jsxs("div",{className:He,children:[Le,Ye]}),e[160]=Le,e[161]=Ye,e[162]=Qe):Qe=e[162];let Ze;e[163]!==q||e[164]!==De||e[165]!==je||e[166]!==Me||e[167]!==Qe?(Ze=s.jsxs("div",{className:lt.keysTable,style:q,children:[De,je,Me,Qe]}),e[163]=q,e[164]=De,e[165]=je,e[166]=Me,e[167]=Qe,e[168]=Ze):Ze=e[168];let nt;return e[169]!==p.localizationSettings||e[170]!==Z||e[171]!==Ze?(nt=s.jsx(l.PageContainer,{title:Z,helmet:X,variant:"fullScreen",children:Ze}),e[169]=p.localizationSettings,e[170]=Z,e[171]=Ze,e[172]=nt):nt=e[172],nt};function Rf(n){const e=n.split(".");return e[e.length-1]==="caption"}function Ff(n){return n.status==="fulfilled"?n.value:["",{}]}function $f(n){return{id:n.path,name:n.nameTranslationKey}}const Qs=3,pl=(n,e,t)=>{var a;if((e==null?void 0:e.customPathBuilder)!==void 0)return e.customPathBuilder(n,e);const o=(a=t.find(i=>i.key===n.type))==null?void 0:a.toPath;return o?`${o}/${n.searchKey}`:"/not-found"},hl=(n,e)=>{var t;return((t=e==null?void 0:e.customNameBuilder)==null?void 0:t.call(e,n))??n.name},gl=(n,e,t,o,a)=>{const i=l.compilerRuntimeExports.c(22),r=l.useAxios(),[c,d]=w.useState(!1);let u;i[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],i[0]=u):u=i[0];const[m,p]=w.useState(u),f=n==="";let x;i[1]!==r||i[2]!==o||i[3]!==f||i[4]!==e||i[5]!==t||i[6]!==n?(x=()=>{p([]),!(e.length<Qs)&&(d(!0),r.get(ot.generateApiPath(t,{path:{query:e},query:{type:f?void 0:n,count:o?void 0:f?5:20}})).then(C=>{const{data:k}=C;p(k),d(!1)}).catch(()=>{d(!1)}))},i[1]=r,i[2]=o,i[3]=f,i[4]=e,i[5]=t,i[6]=n,i[7]=x):x=i[7];const g=x;let y;e:{if(a===void 0){let k;i[8]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[8]=k):k=i[8],y=k;break e}if(e.length<Qs||!["XAP","",null].includes(n)){let k;i[9]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[9]=k):k=i[9],y=k;break e}let C;i[10]!==e||i[11]!==a?(C=[],a.forEach(k=>{const I=k.items.filter(T=>l.stringSearchWithin(T.name,decodeURIComponent(e)));I.length>0&&C.push({key:{...k.key,totalCount:I.length},items:I})}),i[10]=e,i[11]=a,i[12]=C):C=i[12],y=C}const h=y;let b;i[13]!==m||i[14]!==h?(b=h.concat(m),i[13]=m,i[14]=h,i[15]=b):b=i[15];const j=b;let S,N;i[16]!==g?(S=()=>{g()},N=[g],i[16]=g,i[17]=S,i[18]=N):(S=i[17],N=i[18]),w.useEffect(S,N);let v;return i[19]!==c||i[20]!==j?(v={isLoading:c,searchItems:j},i[19]=c,i[20]=j,i[21]=v):v=i[21],v},Pf="_input-group_1hcpm_1",Mf="_input-group-text_1hcpm_5",Af="_left_1hcpm_9",Bf="_right_1hcpm_13",Of="_input_1hcpm_1",zf="_submit-button_1hcpm_20",Ct={inputGroup:Pf,inputGroupText:Mf,left:Af,right:Bf,input:Of,submitButton:zf},Hf=n=>{const e=l.compilerRuntimeExports.c(10),{searchTypes:t,selectedType:o,setSelectedType:a}=n,i=o==null?void 0:o.text;let r;e[0]!==i?(r=s.jsx(l.DropdownToggle,{as:l.SimpleDropdownToggle,icon:null,text:i}),e[0]=i,e[1]=r):r=e[1];let c;if(e[2]!==t||e[3]!==a){let u;e[5]!==a?(u=m=>s.jsx(l.DropdownItem,{icon:null,onClick:()=>a(m.key),children:m.text},m.key),e[5]=a,e[6]=u):u=e[6],c=t.map(u),e[2]=t,e[3]=a,e[4]=c}else c=e[4];let d;return e[7]!==r||e[8]!==c?(d=s.jsx(l.Dropdown,{toggle:r,children:c}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d},Vf="_dropdown_1ddrg_1",Uf="_open_1ddrg_12",Wf="_loading-container_1ddrg_15",Gf="_groups-container_1ddrg_22",Kf="_group_1ddrg_22",qf="_header_1ddrg_26",Yf="_item_1ddrg_33",wt={dropdown:Vf,open:Uf,loadingContainer:Wf,groupsContainer:Gf,group:Kf,header:qf,item:Yf},Qf=n=>{const e=l.compilerRuntimeExports.c(20),{item:t,searchTypes:o,onCancel:a}=n;let i;if(e[0]!==t.type||e[1]!==o){let y;e[3]!==t.type?(y=h=>h.key===t.type,e[3]=t.type,e[4]=y):y=e[4],i=o.find(y),e[0]=t.type,e[1]=o,e[2]=i}else i=e[2];const r=i;let c;e[5]!==t||e[6]!==r||e[7]!==o?(c=pl(t,r,o),e[5]=t,e[6]=r,e[7]=o,e[8]=c):c=e[8];const d=c;let u;e[9]!==t||e[10]!==r?(u=hl(t,r),e[9]=t,e[10]=r,e[11]=u):u=e[11];const m=u;let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=l.classNames("search-item d-flex gap-3 align-items-center justify-content-between",wt.item),e[12]=p):p=e[12];let f;e[13]!==m?(f=s.jsx(l.Typography,{variant:"body2",className:"text-nowrap text-truncate",children:m}),e[13]=m,e[14]=f):f=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(l.Typography,{variant:"caption",className:"text-primary",children:s.jsx(l.MdOutlineArrowOutward,{})}),e[15]=x):x=e[15];let g;return e[16]!==d||e[17]!==a||e[18]!==f?(g=s.jsxs(we.Link,{to:d,className:p,onClick:a,children:[f,x]}),e[16]=d,e[17]=a,e[18]=f,e[19]=g):g=e[19],g},Zf=n=>{const e=l.compilerRuntimeExports.c(13),{show:t,query:o,onCancel:a,groups:i,isLoading:r,searchTypes:c}=n,{texts:d}=w.useContext(l.LuminusComponentsContext),{appSearch:u}=d,m=w.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=[m],e[0]=p):p=e[0],l.useClickOutside(p,a);let f;e[1]!==t?(f=l.classNames("luminus-app-search-dropdown shadow rounded",wt.dropdown,{[wt.open]:t}),e[1]=t,e[2]=f):f=e[2];let x;e[3]!==u||e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==c?(x=r?s.jsx("div",{className:wt.loadingContainer,children:s.jsx(l.Spinner,{animation:"border",variant:"primary"})}):s.jsx("div",{className:wt.groupsContainer,children:i==null?void 0:i.map(y=>{var h;return s.jsxs("div",{className:l.classNames(wt.group),children:[s.jsxs(we.Link,{to:`/search?query=${o}&type=${y.key.category}`,className:l.classNames("group-header",wt.header),onClick:a,children:[s.jsx(l.Typography,{variant:"body",className:"text-primary",children:y.key.categoryName}),s.jsxs(l.Typography,{variant:"caption",children:[y.items.length," ",u.amountFrom," ",y.key.totalCount]})]}),(h=y.items)==null?void 0:h.map((b,j)=>s.jsx(Qf,{item:b,onCancel:a,searchTypes:c},j))]},y.key.category)})}),e[3]=u,e[4]=i,e[5]=r,e[6]=a,e[7]=o,e[8]=c,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=s.jsx("div",{ref:m,className:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g},Xf=n=>{var G;const e=l.compilerRuntimeExports.c(48),{searchTypes:t,navigateFunction:o,currentPath:a,homePath:i,className:r,staticAppItems:c,searchEndpointUri:d}=n,u=i===void 0?"/":i,{texts:m}=w.useContext(l.LuminusComponentsContext),{appSearch:p}=m,[f,x]=w.useState(t.length>0?((G=t.at(0))==null?void 0:G.key)??null:null);let g;e[0]!==t||e[1]!==f?(g=t.find(Z=>Z.key===f)??null,e[0]=t,e[1]=f,e[2]=g):g=e[2];const y=g,[h,b]=w.useState(""),[j]=l.a(h,500),{isLoading:S,searchItems:N}=gl(f,j,d,!1,c),[v,C]=w.useState(!1);let k;e[3]!==o||e[4]!==h||e[5]!==y?(k=Z=>{Z.preventDefault(),Z.stopPropagation(),C(!1),h.length>2&&o(`/search?query=${h}${y&&y.key&&`&type=${y==null?void 0:y.key}`}`)},e[3]=o,e[4]=h,e[5]=y,e[6]=k):k=e[6];const I=k;let T;e[7]!==S||e[8]!==N.length?(T=()=>{(N.length>0||S)&&C(!0)},e[7]=S,e[8]=N.length,e[9]=T):T=e[9];let L;e[10]!==S||e[11]!==N?(L=[N,S],e[10]=S,e[11]=N,e[12]=L):L=e[12],w.useEffect(T,L);const E=w.useRef(null);let D,_;e[13]!==a||e[14]!==u?(D=()=>{var Z;b(""),a===u&&((Z=E.current)==null||Z.focus())},_=[a,u],e[13]=a,e[14]=u,e[15]=D,e[16]=_):(D=e[15],_=e[16]),w.useEffect(D,_);let P;e[17]!==r?(P=l.classNames(Ct.inputGroup,r),e[17]=r,e[18]=P):P=e[18];let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=l.classNames("p-1 rounded",Ct.inputGroupText,Ct.left),e[19]=$):$=e[19];let R;e[20]!==t||e[21]!==y?(R=s.jsx(nn.Text,{className:$,children:s.jsx(Hf,{searchTypes:t,selectedType:y,setSelectedType:x})}),e[20]=t,e[21]=y,e[22]=R):R=e[22];const F=p.searchPlaceholder;let M;e[23]===Symbol.for("react.memo_cache_sentinel")?(M=l.classNames("luminus-app-search-input",Ct.input),e[23]=M):M=e[23];let O;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=Z=>{var X;return b(((X=Z.target)==null?void 0:X.value)??"")},e[24]=O):O=e[24];let B;e[25]!==N.length?(B=()=>N.length>0&&C(!0),e[25]=N.length,e[26]=B):B=e[26];let H;e[27]!==p.searchPlaceholder||e[28]!==h||e[29]!==B?(H=s.jsx(l.Form.Control,{ref:E,placeholder:F,type:"text",size:"sm",className:M,value:h,onChange:O,onFocus:B}),e[27]=p.searchPlaceholder,e[28]=h,e[29]=B,e[30]=H):H=e[30];let z;e[31]===Symbol.for("react.memo_cache_sentinel")?(z=l.classNames("p-0 rounded",Ct.inputGroupText,Ct.right),e[31]=z):z=e[31];let W;e[32]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(nn.Text,{className:z,children:s.jsx("button",{type:"submit",className:l.classNames("text-primary",Ct.submitButton),children:s.jsx(l.FaSearch,{})})}),e[32]=W):W=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=()=>C(!1),e[33]=A):A=e[33];let U;e[34]!==j||e[35]!==S||e[36]!==N||e[37]!==t||e[38]!==v?(U=s.jsx(Zf,{query:j,searchTypes:t,show:v,onCancel:A,groups:N,isLoading:S}),e[34]=j,e[35]=S,e[36]=N,e[37]=t,e[38]=v,e[39]=U):U=e[39];let K;e[40]!==R||e[41]!==H||e[42]!==U||e[43]!==P?(K=s.jsxs(nn,{className:P,children:[R,H,W,U]}),e[40]=R,e[41]=H,e[42]=U,e[43]=P,e[44]=K):K=e[44];let V;return e[45]!==I||e[46]!==K?(V=s.jsx(l.Form,{className:"w-100 d-flex align-items-center justify-content-center",onSubmit:I,children:K}),e[45]=I,e[46]=K,e[47]=V):V=e[47],V},Jf=n=>{const e=l.compilerRuntimeExports.c(20),{item:t,searchTypes:o}=n,{ProjectIconComponent:a}=w.useContext(l.LuminusComponentsContext);let i;if(e[0]!==t.type||e[1]!==o){let g;e[3]!==t.type?(g=y=>y.key===t.type,e[3]=t.type,e[4]=g):g=e[4],i=o.find(g),e[0]=t.type,e[1]=o,e[2]=i}else i=e[2];const r=i;let c;e[5]!==t||e[6]!==r||e[7]!==o?(c=pl(t,r,o),e[5]=t,e[6]=r,e[7]=o,e[8]=c):c=e[8];const d=c;let u;e[9]!==t||e[10]!==r?(u=hl(t,r),e[9]=t,e[10]=r,e[11]=u):u=e[11];const m=u;let p;e[12]!==m?(p=s.jsx(l.Typography,{variant:"body",children:m}),e[12]=m,e[13]=p):p=e[13];let f;e[14]!==a?(f=s.jsx(a,{icon:"chevron-right",className:"text-primary"}),e[14]=a,e[15]=f):f=e[15];let x;return e[16]!==d||e[17]!==p||e[18]!==f?(x=s.jsxs(we.Link,{to:d,className:"text-nowrap list-group-item list-group-item-action d-flex justify-content-between align-items-center",children:[p,f]}),e[16]=d,e[17]=p,e[18]=f,e[19]=x):x=e[19],x},e1=n=>{var h,b;const e=l.compilerRuntimeExports.c(11),{query:t,type:o,appSearchTypes:a,searchEndpointUri:i,staticAppItems:r}=n,{texts:c}=w.useContext(l.LuminusComponentsContext),{appSearch:d}=c,[u,m]=w.useState(""),{searchItems:p,isLoading:f}=gl(o,t,i,!0,r);let x,g;if(e[0]!==u||e[1]!==p?(x=()=>{var j;u||p===null||p.length===0||m(((j=p[0].key)==null?void 0:j.category)??"")},g=[p,u],e[0]=u,e[1]=p,e[2]=x,e[3]=g):(x=e[2],g=e[3]),w.useEffect(x,g),p===null)return null;let y;return e[4]!==u||e[5]!==d||e[6]!==a||e[7]!==f||e[8]!==t||e[9]!==p?(y=s.jsx(l.PageContainer,{variant:"fullScreen",children:f?s.jsx(st.Loading,{}):p.length===0?s.jsx("div",{className:"alert alert-warning",children:s.jsx(l.Typography,{variant:"body",children:d.noResultsFor(t)})}):s.jsxs(s.Fragment,{children:[s.jsx(Gn,{activeTab:u,onSelect:j=>m((j==null?void 0:j.toString())??""),children:p.map(t1)}),s.jsx(ul,{eventKey:u,activeTab:u,fullHeightNoOverflow:!0,children:s.jsx("div",{className:"list-group h-100 overflow-auto",children:(b=(h=p.find(j=>j.key.category===u))==null?void 0:h.items)==null?void 0:b.map((j,S)=>s.jsx(Jf,{item:j,searchTypes:a},S))})})]})}),e[4]=u,e[5]=d,e[6]=a,e[7]=f,e[8]=t,e[9]=p,e[10]=y):y=e[10],y};function t1(n){var e,t;return s.jsx(Kn,{eventKey:((e=n.key)==null?void 0:e.category)??"",children:((t=n.key)==null?void 0:t.categoryName)??""},n.key.category)}const n1=()=>{const n=l.compilerRuntimeExports.c(7),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,[o,a]=Fe.useLocalStorageState("file-download-try-opening",!0),i=o===void 0?!0:o;let r;n[0]!==a||n[1]!==i||n[2]!==t.tryOpenFileLabel?(r=s.jsx(Tt,{type:"switch",value:i,onChange:a,label:t.tryOpenFileLabel}),n[0]=a,n[1]=i,n[2]=t.tryOpenFileLabel,n[3]=r):r=n[3];let c;return n[4]!==r||n[5]!==t.downloads?(c=s.jsx(gt,{collapsible:!0,title:t.downloads,defaultOpen:!0,children:r}),n[4]=r,n[5]=t.downloads,n[6]=c):c=n[6],c},s1=n=>{const e=l.compilerRuntimeExports.c(52),{show:t,handleClose:o,onConfirm:a,apiCreateBackup:i}=n,{texts:r}=w.useContext(l.LuminusComponentsContext),{userSettings:c}=r,{zStringRequired:d}=l.useZodSchemaTypes(),{addNotification:u}=l.useNotifications(),m=l.useAxios(),{startLoading:p,stopLoading:f}=w.useContext(l.LoadingContext),[x,g]=w.useState(null);let y,h;if(e[0]!==d){const B=l.z.object({name:d()});h=Se.useForm,y=l.t(B),e[0]=d,e[1]=y,e[2]=h}else y=e[1],h=e[2];let b;e[3]!==y?(b={resolver:y},e[3]=y,e[4]=b):b=e[4];const j=h(b);let S;e[5]!==i||e[6]!==m||e[7]!==p||e[8]!==f?(S=async(B,H)=>(p("localStorageSettingPost"),m.post(i,{name:B,setting:H}).then(o1).catch(l1).finally(()=>f("localStorageSettingPost"))),e[5]=i,e[6]=m,e[7]=p,e[8]=f,e[9]=S):S=e[9];const N=S;let v;e[10]!==u||e[11]!==x||e[12]!==a||e[13]!==N||e[14]!==c.localStorageCreateBackupSuccess?(v=async B=>{await N(B.name,JSON.stringify(x))&&(u(c.localStorageCreateBackupSuccess,"success"),a())},e[10]=u,e[11]=x,e[12]=a,e[13]=N,e[14]=c.localStorageCreateBackupSuccess,e[15]=v):v=e[15];const C=v;let k,I;e[16]!==t?(k=()=>{t&&g(ot.dumpLocalStorage())},I=[t],e[16]=t,e[17]=k,e[18]=I):(k=e[17],I=e[18]),w.useEffect(k,I);let T;e[19]!==o?(T=()=>o(),e[19]=o,e[20]=T):T=e[20];let L;e[21]!==c.localStorageCreateBackup?(L=s.jsx(l.Modal.Header,{closeButton:!0,children:s.jsx(l.Modal.Title,{children:c.localStorageCreateBackup})}),e[21]=c.localStorageCreateBackup,e[22]=L):L=e[22];let E;e[23]!==j||e[24]!==C?(E=j.handleSubmit(C),e[23]=j,e[24]=C,e[25]=E):E=e[25];let D;if(e[26]!==x||e[27]!==c){let B;e[29]!==x?(B=Object.keys(x||{}),e[29]=x,e[30]=B):B=e[30],D=c.localStorageCreateBackupInfo(B.length),e[26]=x,e[27]=c,e[28]=D}else D=e[28];let _;e[31]!==D?(_=s.jsx(l.Alert,{variant:"info",size:"sm",children:D}),e[31]=D,e[32]=_):_=e[32];let P;e[33]!==c.localStorageCreateBackupName?(P=s.jsx(l.HookFormTextInput,{required:!0,label:c.localStorageCreateBackupName,formField:"name",type:"text"}),e[33]=c.localStorageCreateBackupName,e[34]=P):P=e[34];let $;e[35]!==_||e[36]!==P?($=s.jsxs(l.Modal.Body,{children:[_,P]}),e[35]=_,e[36]=P,e[37]=$):$=e[37];let R;e[38]!==c.localStorageCreateBackupSave?(R=s.jsx(l.Modal.Footer,{className:"justify-content-end",children:s.jsx(l.PrimaryButton,{type:"submit",children:c.localStorageCreateBackupSave})}),e[38]=c.localStorageCreateBackupSave,e[39]=R):R=e[39];let F;e[40]!==E||e[41]!==$||e[42]!==R?(F=s.jsxs(l.Form,{onSubmit:E,noValidate:!0,children:[$,R]}),e[40]=E,e[41]=$,e[42]=R,e[43]=F):F=e[43];let M;e[44]!==j||e[45]!==F?(M=s.jsx(Se.FormProvider,{...j,children:F}),e[44]=j,e[45]=F,e[46]=M):M=e[46];let O;return e[47]!==t||e[48]!==L||e[49]!==M||e[50]!==T?(O=s.jsxs(l.Modal,{show:t,onHide:T,children:[L,M]}),e[47]=t,e[48]=L,e[49]=M,e[50]=T,e[51]=O):O=e[51],O};function o1(){return!0}function l1(){return!1}const tn={apiGetBackups:"/localStorageSettings",apiCreateBackup:"/localStorageSettings",apiDeleteBackup:"/localStorageSettings"},a1=n=>{const e=l.compilerRuntimeExports.c(39),{apiUrls:t}=n,{apiGetBackups:o,apiCreateBackup:a,apiDeleteBackup:i}=t===void 0?tn:t,r=o===void 0?tn.apiGetBackups:o,c=a===void 0?tn.apiCreateBackup:a,d=i===void 0?tn.apiDeleteBackup:i,{ProjectIconComponent:u,texts:m}=w.useContext(l.LuminusComponentsContext),{userSettings:p}=m,{confirm:f}=l.useConfirm(),x=l.useAxios(),{startLoading:g,stopLoading:y}=w.useContext(l.LoadingContext),{addNotification:h}=l.useNotifications(),[b,j]=w.useState(!1),{data:S,setData:N,reloadData:v}=Fe.useGetApiData(r);let C;e[0]!==d||e[1]!==x||e[2]!==g||e[3]!==y?(C=async O=>(g("localStorageSettingDelete"),x.delete(`${d}/${O}`).then(i1).catch(r1).finally(()=>y("localStorageSettingDelete"))),e[0]=d,e[1]=x,e[2]=g,e[3]=y,e[4]=C):C=e[4];const k=C;let I;e[5]!==h||e[6]!==f||e[7]!==k||e[8]!==N||e[9]!==p.localStorageDeleteBackupConfirm||e[10]!==p.localStorageDeleteBackupSuccess?(I=async O=>{await f(p.localStorageDeleteBackupConfirm)&&await k(O)&&(h(p.localStorageDeleteBackupSuccess,"success"),N(B=>(B==null?void 0:B.filter(H=>H.id!==O))??null))},e[5]=h,e[6]=f,e[7]=k,e[8]=N,e[9]=p.localStorageDeleteBackupConfirm,e[10]=p.localStorageDeleteBackupSuccess,e[11]=I):I=e[11];const T=I;let L;e[12]!==h||e[13]!==f||e[14]!==p.localStorageLoadBackup||e[15]!==p.localStorageLoadBackupError||e[16]!==p.localStorageLoadBackupSuccess?(L=async O=>{O.setting&&await f(p.localStorageLoadBackup)&&(ot.restoreLocalStorage(O.setting)?h(p.localStorageLoadBackupSuccess,"success"):h(p.localStorageLoadBackupError,"danger"))},e[12]=h,e[13]=f,e[14]=p.localStorageLoadBackup,e[15]=p.localStorageLoadBackupError,e[16]=p.localStorageLoadBackupSuccess,e[17]=L):L=e[17];const E=L;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=()=>j(!0),e[18]=D):D=e[18];let _;e[19]!==p.localStorageCreateBackup?(_=s.jsx(l.ContextButton,{className:"mb-2",onClick:D,children:p.localStorageCreateBackup}),e[19]=p.localStorageCreateBackup,e[20]=_):_=e[20];let P;e[21]!==u||e[22]!==S||e[23]!==T||e[24]!==E||e[25]!==p.localStorageNoBackups?(P=S&&S.length>0?s.jsx("div",{className:"list-group",children:S.map((O,B)=>s.jsxs("div",{role:"button",className:"list-group-item list-group-item-action d-flex justify-content-between align-items-center",onClick:()=>E(O),children:[s.jsx(l.Typography,{variant:"body2",children:O.name}),s.jsxs("div",{className:"d-flex align-items-center gap-3",children:[s.jsx(l.Typography,{variant:"body2",className:"text-muted",children:O.date?l.formatDate(O.date):""}),s.jsx(l.IconButton,{size:"sm",color:"danger",onClick:H=>{H.stopPropagation(),T(O.id)},children:s.jsx(u,{icon:"delete"})})]})]},B))}):S?s.jsx(l.Alert,{variant:"secondary",size:"sm",children:p.localStorageNoBackups}):null,e[21]=u,e[22]=S,e[23]=T,e[24]=E,e[25]=p.localStorageNoBackups,e[26]=P):P=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=()=>j(!1),e[27]=$):$=e[27];let R;e[28]!==v?(R=()=>{j(!1),v()},e[28]=v,e[29]=R):R=e[29];let F;e[30]!==c||e[31]!==b||e[32]!==R?(F=s.jsx(s1,{show:b,handleClose:$,onConfirm:R,apiCreateBackup:c}),e[30]=c,e[31]=b,e[32]=R,e[33]=F):F=e[33];let M;return e[34]!==_||e[35]!==P||e[36]!==F||e[37]!==p.localStorage?(M=s.jsxs(gt,{collapsible:!0,title:p.localStorage,defaultOpen:!0,children:[_,P,F]}),e[34]=_,e[35]=P,e[36]=F,e[37]=p.localStorage,e[38]=M):M=e[38],M};function i1(){return!0}function r1(){return!1}const c1=()=>{const n=l.compilerRuntimeExports.c(7),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,[o,a]=Fe.useLocalStorageState("search-use-asterisk",!0),i=o===void 0?!0:o;let r;n[0]!==a||n[1]!==i||n[2]!==t.searchSettingsUseAsterisk?(r=s.jsx(Tt,{type:"switch",value:i,onChange:a,label:t.searchSettingsUseAsterisk}),n[0]=a,n[1]=i,n[2]=t.searchSettingsUseAsterisk,n[3]=r):r=n[3];let c;return n[4]!==r||n[5]!==t.searchSettings?(c=s.jsx(gt,{collapsible:!0,title:t.searchSettings,defaultOpen:!0,children:r}),n[4]=r,n[5]=t.searchSettings,n[6]=c):c=n[6],c},d1=()=>{const n=l.compilerRuntimeExports.c(9),{texts:e}=w.useContext(l.LuminusComponentsContext),{userSettings:t}=e,{localizationContext:o}=w.useContext(l.LuminusComponentsContext),{language:a,setLanguage:i}=w.useContext(o);let r;if(n[0]!==i){const f=x=>{i(x)};r=(x,g)=>{f(g),x.stopPropagation()},n[0]=i,n[1]=r}else r=n[1];const c=r;let d;n[2]===Symbol.for("react.memo_cache_sentinel")?(d=["cz","en","de"],n[2]=d):d=n[2];const u=d;let m;n[3]!==a||n[4]!==c?(m=s.jsx(l.ListGroup,{children:u.map(f=>s.jsxs(l.ListGroupItem,{className:"p-1 px-2 d-flex gap-2 align-items-center",action:!0,onClick:x=>c(x,f),children:[s.jsx(l.Form.Check,{readOnly:!0,checked:a===f}),s.jsx(l.Typography,{variant:"body2",className:l.classNames("text-uppercase",{"fw-bold":a===f}),children:f})]}))}),n[3]=a,n[4]=c,n[5]=m):m=n[5];let p;return n[6]!==m||n[7]!==t.languageSettings?(p=s.jsx(gt,{collapsible:!0,title:t.languageSettings,defaultOpen:!0,children:m}),n[6]=m,n[7]=t.languageSettings,n[8]=p):p=n[8],p};exports.Alert=l.Alert;exports.Backdrop=l.Backdrop;exports.ContextButton=l.ContextButton;exports.Documents=l.Documents;exports.Dropdown=l.Dropdown;exports.DropdownDivider=l.DropdownDivider;exports.DropdownItem=l.DropdownItem;exports.DropdownToggle=l.DropdownToggle;exports.FileExtensionIcon=l.FileExtensionIcon;exports.FloatingLabelInput=l.FloatingLabelInput;exports.HookFormTextAreaInput=l.HookFormTextAreaInput;exports.HookFormTextInput=l.HookFormTextInput;exports.HtmlTooltip=l.HtmlTooltip;exports.IconButton=l.IconButton;exports.InvalidFeedback=l.InvalidFeedback;exports.NoInputContainer=l.NoInputContainer;exports.PrimaryButton=l.PrimaryButton;exports.ResponsiveContextDropdown=l.ResponsiveContextDropdown;exports.ResponsiveContextDropdownItem=l.ResponsiveContextDropdownItem;exports.RowLabelInput=l.RowLabelInput;exports.SelectInput=l.CustomSelectInput;exports.SimplePicker=l.SimplePicker;exports.SimpleToggle=l.SimpleDropdownToggle;exports.SimpleTooltip=l.SimpleTooltip;exports.TextInput=l.TextInput;exports.Typography=l.Typography;exports.Loading=st.Loading;exports.AlertItem=zo;exports.ApiFileDownloadButton=bl;exports.AppSearch=Xf;exports.Approval=zd;exports.Approvals=Cu;exports.ApprovalsDelegations=gu;exports.AuthTemplate=rr;exports.AvatarIcon=cn;exports.Badge=No;exports.BarChart=yd;exports.Card=gt;exports.CheckInput=Tt;exports.Collapse=Ot;exports.ColumnResizer=al;exports.ContactButtonQrModal=Wo;exports.ContactInput=zr;exports.ContactsLink=Go;exports.DisabledRowLabelLink=md;exports.DocsAIChat=Pu;exports.DropdownPicker=Hr;exports.DynamicForm=ld;exports.EmailOverview=wu;exports.EmployeeSmallPhoto=hd;exports.ErrorBoundary=Ho;exports.FileDownloadUS=n1;exports.FileUploadButton=Hl;exports.FileUploadContextButton=zn;exports.FileUploadDropdownItem=Da;exports.Flexmonster=dl;exports.FloatingActionContainer=Vo;exports.FloatingFormSubmit=bo;exports.FromToDatePicker=Cc;exports.HomeDashboard=va;exports.HookFormCheckInput=Jd;exports.HookFormContactInput=tu;exports.HookFormDropdownPicker=nu;exports.HookFormFileInput=su;exports.HookFormFloatingSubmit=rl;exports.HookFormNumericStepperInput=ou;exports.HookFormNumericTextInput=cl;exports.HookFormRadioInput=eu;exports.HookFormSelectInput=an;exports.HrWithText=il;exports.IconPicker=qn;exports.ImgApi=Fn;exports.ImgBlob=Lr;exports.ImgDirect=Hn;exports.ImportFilePicker=fl;exports.ImportResult=ml;exports.LanguageSettingsUS=d1;exports.LanguageSwitch=fd;exports.LineChart=Tc;exports.LoadingBlock=Zs;exports.LocalStorageBackupUS=a1;exports.LocalizationImport=xf;exports.LocalizationSettings=Lf;exports.MessageBoard=rm;exports.MiniDetailTooltip=Ad;exports.MiniDetailValueItem=Bd;exports.MonthPicker=jo;exports.MonthPickerSearchParams=Nc;exports.NotifStyles=mf;exports.NotificationActions=Jm;exports.NotificationUsers=cf;exports.NumericFormat=xd;exports.NumericStepperInput=Vr;exports.NumericTextInput=nl;exports.PermissionSubstituteDetail=au;exports.PermissionSubstituteTable=Xd;exports.PhotoLibrary=Oo;exports.PhotoLightbox=Bo;exports.PieChart=Ic;exports.RadioInput=sl;exports.ReportPage=Xu;exports.ReportsIndexPage=Fd;exports.ResponsiveTabs=bm;exports.RouteLink=Od;exports.SearchBox=gd;exports.SearchPage=e1;exports.SearchSettingsUS=c1;exports.SettingsFormPicker=id;exports.ShortcutLinks=Mm;exports.ShortcutLinksProvider=Om;exports.ShortcutLinksSetup=_m;exports.StateToggle=Zd;exports.Tab=Kn;exports.TabPanel=ul;exports.Tabs=Gn;exports.TextAreaInput=qo;exports.Timeline=Uo;exports.TypedFormGroup=pd;exports.UserAvatarToggle=_a;exports.UserAvatarValueFormat=om;exports.VersionInfo=hr;exports.WidgetCard=Rn;exports.YearPicker=So;exports.YearPickerSearchParams=wc;exports.useShortcutLinksContext=Yn;
|