@zydon/common-csr 2.1.10 → 2.1.12

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.
@@ -0,0 +1,12 @@
1
+ import { useState } from 'react';
2
+ import c from '@mui/material/Stack';
3
+ import m from '@mui/material/Typography';
4
+ import v from '@zydon/common/components/form/Field';
5
+ import { styled } from '@mui/material/styles';
6
+ import d from '@mui/material/ToggleButton';
7
+ import s from '@mui/material/ToggleButtonGroup';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
10
+ var p=styled(d)(({theme:r})=>({width:"100%","&.Mui-selected":{backgroundColor:r.palette.primary.main,color:r.palette.common.white,"&:hover":{backgroundColor:r.palette.primary.main}}})),g=styled(s)(()=>({display:"flex",justifyContent:"space-between"}));var f=({initialMode:r,rules:a,setRuleType:l})=>{let[i,u]=useState(r);return jsxs(c,{gap:2,children:[jsx(v,{name:"name",label:"Nome da regra",required:!0,rules:{required:{value:!0,message:"Nome da regra \xE9 obrigat\xF3rio"}}}),jsx(m,{color:"text.disabled",variant:"overline",children:"Selecione a regra"}),a&&jsx(g,{color:"primary",value:i,size:"small",exclusive:!0,onChange:(e,o)=>{if(o!==null&&(u(o),l))return l(o)},children:a.map((e,o)=>jsx(p,{value:e.value,size:"small",color:"primary",children:jsx(m,{variant:"body2",children:e.toggleTitle})},o))}),a&&a.map((e,o)=>e.value===i?jsx("div",{children:e.component},o):null)]})},q=f;
11
+
12
+ export { q as a };
@@ -0,0 +1,10 @@
1
+ import { sql } from '@codemirror/lang-sql';
2
+ import d from '@mui/material/FormHelperText';
3
+ import s from '@uiw/react-codemirror';
4
+ import p from '@mui/material/Stack';
5
+ import { styled } from '@mui/material/styles';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var t=styled(p,{shouldForwardProp:r=>r!=="error"})(({theme:r,error:o})=>({width:"100%",borderRadius:8,overflow:"hidden",backgroundColor:r.palette.background.paper,"& .cm-theme-light":{border:`solid 1px ${r.palette.divider}`,padding:r.spacing(2),borderRadius:8,...o&&{borderColor:r.palette.error.main},"&:hover":{borderColor:r.palette.text.primary}},"& .cm-focused":{outline:"none"},"& .cm-scroller":{fontFamily:"inherit",lineHeight:"22px",fontSize:12}}));var m=({sx:r,error:o,helperText:e,...n})=>jsxs(t,{sx:r,error:o,children:[jsx(s,{extensions:[sql()],minHeight:"200px",basicSetup:{foldGutter:!1,lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1},...n}),e&&jsx(d,{error:o,sx:{px:2},children:e})]}),S=m;
9
+
10
+ export { S as a };
@@ -1,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { E as EditorProps } from '../../types-59de9124.js';
2
+ import { E as EditorProps } from '../../types-3f189095.js';
3
3
  import { BaseField } from '../../types/baseField.js';
4
+ import 'react-hook-form';
4
5
  import '@mui/material/styles';
5
6
  import '@tiptap/react';
6
- import 'react-hook-form';
7
7
 
8
8
  type EditorFieldProps = BaseField<EditorProps>;
9
9
 
@@ -1 +1 @@
1
- export { a as default } from '../../chunk-QEBDIM2F.js';
1
+ export { a as default } from '../../chunk-EMY7JTZP.js';
@@ -1,4 +1,4 @@
1
- import { a as a$1 } from '../../chunk-QEBDIM2F.js';
1
+ import { a as a$1 } from '../../chunk-EMY7JTZP.js';
2
2
  import { useFormContext, Controller } from 'react-hook-form';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -2,7 +2,8 @@ import * as react from 'react';
2
2
  import * as _mui_system from '@mui/system';
3
3
  import * as _mui_material from '@mui/material';
4
4
  import * as _tiptap_react from '@tiptap/react';
5
- export { c as EditorCodeHighlightBlockProps, E as EditorProps, b as EditorToolbarItemProps, a as EditorToolbarProps } from '../../types-59de9124.js';
5
+ export { c as EditorCodeHighlightBlockProps, E as EditorProps, b as EditorToolbarItemProps, a as EditorToolbarProps } from '../../types-3f189095.js';
6
+ import 'react-hook-form';
6
7
  import '@mui/material/styles';
7
8
 
8
9
  declare const editorClasses: {
@@ -1,32 +1,32 @@
1
1
  import { a } from '../../../chunk-BKBZNJGC.js';
2
2
  import { useState } from 'react';
3
3
  import { useFormContext, useFieldArray } from 'react-hook-form';
4
- import ro from '@mui/material/Button';
5
- import we from '@mui/material/ToggleButtonGroup';
6
- import Q from '@zydon/common/components/Icon';
4
+ import to from '@mui/material/Button';
5
+ import Te from '@mui/material/ToggleButtonGroup';
6
+ import V from '@zydon/common/components/Icon';
7
7
  import Wo from '@zydon/common/hooks/usePopover';
8
- import Be from '@zydon/common/hooks/useToggle';
8
+ import Re from '@zydon/common/hooks/useToggle';
9
9
  import Ro from '@mui/material/Popover';
10
- import B from '@mui/material/Stack';
10
+ import R from '@mui/material/Stack';
11
11
  import No from '@mui/material/TextField';
12
- import po from '@mui/material/Typography';
13
- import wo from '@mui/material/IconButton';
12
+ import so from '@mui/material/Typography';
13
+ import To from '@mui/material/IconButton';
14
14
  import { styled, alpha } from '@mui/material/styles';
15
15
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
16
16
  import 'ace-builds/src-noconflict/ace';
17
17
  import 'ace-builds/src-noconflict/ext-language_tools';
18
18
  import 'ace-builds/src-noconflict/mode-sql';
19
19
  import 'ace-builds/src-noconflict/theme-chrome';
20
- import mo from 'react-ace';
20
+ import po from 'react-ace';
21
21
  import Zo from '@zydon/common/components/SearchInput';
22
22
  import qo from '@zydon/common/components/Scrollbar';
23
23
  import ee from '@zydon/common/components/DataGrid';
24
24
  import ve from '@zydon/common/components/ActionButton';
25
25
  import Ce from '@zydon/common/components/ExpandableGroup';
26
- import $ from '@zydon/common/components/form/Autocomplete';
26
+ import z from '@zydon/common/components/form/Autocomplete';
27
27
  import pe from '@zydon/common/components/form/Field';
28
- import Le from '@mui/material/ToggleButton';
28
+ import Ee from '@mui/material/ToggleButton';
29
29
 
30
- var N=styled(B)(({theme:o})=>({borderBottom:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(o.palette.grey[500],.32)}`,padding:16})),oo=styled(B)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:o.palette.grey[100]}})),eo=styled(B)(({theme:o})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:"#fff",padding:"8px 16px",borderRadius:8,border:`1px solid ${alpha(o.palette.grey[500],.24)}`,cursor:"pointer",color:o.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${o.palette.primary.main}`,backgroundColor:alpha(o.palette.primary.main,.05)}})),to=styled(B)(({theme:o})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(o.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:o.palette.text.disabled,fontSize:12}}})),H=styled(wo)({padding:0});var zo=({openPopover:o,handleClose:t,argumentsValues:l,filter:n,onExecute:i})=>{let[p,c]=useState([]),m=(a,e)=>{if(e&&e!=="")p.filter(u=>u.name===a).length>0?c(p.map(u=>u.name===a?{name:a,value:e}:u)):c([...p||[],{name:a,value:e}]);else {let d=p.filter(u=>u.name===a);c(d);}},f=()=>{let a=n||"";return p.forEach(e=>{a=a.replace(`$ARG[${e.name}]`,`'${e.value}'`);}),a};return jsxs(Ro,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,title:"Pr\xE9-visualizar",children:[jsx(po,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(N,{children:l?.map((a,e)=>jsx(No,{name:a,label:a,size:"small",onChange:d=>m(a,d.target.value),required:!0},e))}),jsxs(B,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ro,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(ro,{variant:"contained",color:"primary",size:"small",startIcon:jsx(Q,{icon:"PLAY_SIMPLE"}),onClick:()=>i(f()),disabled:p.length<l.length,children:"Executar"})]})]})},io=zo;var Ho=({openPopover:o,handleClose:t,addItem:l})=>{let[n,i]=useState("");return jsxs(Ro,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(po,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(N,{children:jsx(No,{value:n,onChange:c=>i(c.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(B,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ro,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(ro,{variant:"contained",color:"primary",size:"small",startIcon:jsx(Q,{icon:"SAVE_MARK"}),disabled:!n||n==="",onClick:()=>{l(n),t(),i("");},children:"Salvar"})]})]})},so=Ho;var Ko=({label:o,itens:t,argumentsValues:l,fields:n,context:i,addItem:p,removeItem:c,insertItemSQL:m})=>{let[f,a]=useState(!1),e=Wo(),d=()=>{a(!f);},u=(s,S)=>{s.stopPropagation(),c&&c(S);},b=s=>{m(l?` $ARG[${s}]`:n?` this.${s}`:i?` $ctx[${s}]`:` ${s}`);};return jsxs(B,{children:[jsxs(B,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(H,{edge:"end",onClick:d,children:jsx(Q,{icon:f?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(po,{variant:"overline",color:"text.primary",children:o}),p&&jsxs(Fragment,{children:[jsx(H,{edge:"end",onClick:e.onOpen,children:jsx(Q,{icon:"SIMPLE_ADD"})}),jsx(so,{addItem:p,handleClose:e.onClose,openPopover:e.open})]})]}),f&&jsx(B,{spacing:.5,children:jsx(qo,{sx:{maxHeight:150},children:t?.map((s,S)=>jsxs(eo,{direction:"row",justifyContent:"space-between",onClick:()=>b(s),children:[jsx(po,{variant:"caption",textAlign:"center",width:"100%",children:s}),c&&jsx(wo,{edge:"end",onClick:x=>u(x,s),children:jsx(Q,{icon:"DELETE_MARK_BUTTON_02"})})]},S))})})]})},w=Ko;var jo=({fieldsSelect:o,argumentsValues:t,onChangeArguments:l,sql:n,setSql:i,setFilterRule:p})=>{let c=mo.default||mo,[m,f]=useState(),{setValue:a}=useFormContext(),[e,d]=useState(1),[u,b]=useState(),s=r=>{u.session.insert(e,` ${r} `);},S=r=>{l([...t||[],r]);},x=r=>{l(t?.filter(D=>D!==r));},A=r=>{i(r),p(r),a("groups",void 0);},P=m?o.filter(r=>r.id.toString().toLocaleLowerCase().includes(m)||r.description.toString().toLocaleLowerCase().includes(m)||r.name?.toString().toLocaleLowerCase().includes(m)):o;return jsxs(B,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(oo,{children:[jsx(Zo,{value:m,trigger:"change",onSearch:r=>f(r?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(w,{label:"Campos",fields:!0,itens:P.map(r=>r.name),insertItemSQL:s}),jsx(w,{label:"Argumentos",argumentsValues:!0,itens:t,addItem:S,removeItem:x,insertItemSQL:s}),jsx(w,{label:"Operadores",insertItemSQL:s,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(w,{label:"Filtros",fields:!0,insertItemSQL:s,itens:P.map(r=>r.name)}),jsx(w,{label:"Contexto",context:!0,insertItemSQL:s,itens:["Vendedor.CODIGO","Empresa.CODIGO","Parceiro.CODIGO"]})]}),jsx(to,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(c,{width:"100%",mode:"sql",theme:"chrome",name:"rule",fontSize:14,onChange:A,onCursorChange:r=>d(r.getCursor()),value:n,onLoad:r=>b(r),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},co=jo;var te=({data:o,fields:t,isLoading:l,isError:n})=>jsxs(B,{gap:2,children:[jsx(po,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),n&&jsx(B,{children:"Falha ao gerar resultado"}),o&&jsx(B,{height:400,children:jsx(ee,{columns:t?.map(i=>({field:i,headerName:i,width:150,type:"string",resizable:!0})),loading:l,rows:o,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})})]}),uo=te;var go=styled(B)(({theme:o})=>({border:`1px solid ${alpha(o.palette.primary.main,.32)}`,backgroundColor:alpha(o.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),vo=styled(wo)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),z=styled($)(()=>({width:230}));var ce=({index:o,indexGroup:t,removeConditional:l,fieldsSelect:n})=>{let{watch:i}=useFormContext(),p=`groups.[${t}].conditionals[${o}].field`,c=`groups.[${t}].conditionals[${o}].conditional`,m=`groups.[${t}].conditionals[${o}].type`,f=`groups.[${t}].conditionals[${o}].value`,a=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],e=i(m);return jsxs(B,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx($,{label:"Se",name:p,size:"small",fullWidth:!0,options:n?.map(d=>({value:d.name,label:d.description}))}),jsx($,{label:"Estado",name:c,size:"small",fullWidth:!0,options:a}),jsx($,{label:"Objetivo",name:`groups.[${t}].conditionals[${o}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),e==="value"?jsx(pe,{label:"Valor",name:f,size:"small",fullWidth:!0}):jsx($,{label:"Se",name:f,size:"small",fullWidth:!0,options:n?.map(d=>({value:d.name,label:d.description}))}),jsx(vo,{color:"error",onClick:()=>{l(o);},children:jsx(Q,{icon:"DELETE_MARK_BUTTON_02"})})]})},Co=ce;var Ie=({index:o,removeGroup:t,fieldsSelect:l})=>{let{control:n}=useFormContext(),i=`groups.[${o}].operator`,{fields:p,append:c,remove:m}=useFieldArray({name:`groups.${o}.conditionals`,control:n});return jsx(Ce,{name:`GRUPO ${o+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(z,{name:i,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>t(o),children:jsxs(B,{spacing:1.5,alignItems:"flex-start",children:[p.map((f,a)=>jsx(Co,{index:a,indexGroup:o,removeConditional:e=>m(e),fieldsSelect:l},f.id)),jsx(ve,{actionType:"NEW",onClick:()=>c({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},Io=Ie;var Ae=({fieldsSelect:o})=>{let{control:t}=useFormContext(),{fields:l,append:n,remove:i}=useFieldArray({name:"groups",control:t});return jsxs(B,{gap:1.5,children:[jsxs(go,{direction:"row",spacing:1.5,children:[jsx(po,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(B,{children:jsx(z,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(po,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),l.map((p,c)=>jsx(Io,{index:c,removeGroup:m=>i(m),fieldsSelect:o},p.id)),jsx(ro,{size:"large",color:"inherit",startIcon:jsx(Q,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{n({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},So=Ae;var yo=styled(B)(({theme:o})=>({border:`1px solid ${alpha(o.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),xo=styled(B)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),J=styled(Le)(()=>({lineHeight:"1em"})),Ao=styled(B)(()=>({padding:12}));var Ne=({argumentsValues:o,onChangeArguments:t,fieldsSelect:l,onChangeRule:n,onChangeSqlProcessed:i,defaultMode:p,defaultFilter:c,dataPreview:m,errorPreview:f,loadingPreview:a$1})=>{let[e,d]=useState(c||""),[u,b]=Be(),[s,S]=useState(p||"simple"),{watch:x}=useFormContext(),A=Wo(),P=x("operator"),r=x("groups"),D=(C,E)=>{if(E==="advanced"){let U=a(r,P);d(U),i(U),n(U);}else E==="simple"&&e&&(n(e),i(e));E!==null&&S(E);},To=C=>{if(s==="simple"){let E=a(r,P);i(E);}else i(e);u||s==="simple"||o.length===0?b():A.onOpen(C);},ko=C=>{b(),i(C);};return jsx(Fragment,{children:jsxs(yo,{children:[jsxs(xo,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(we,{color:"primary",value:s,size:"small",exclusive:!0,onChange:D,children:[jsx(J,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(J,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(ro,{variant:"outlined",color:"inherit",onClick:C=>To(C),startIcon:!u&&jsx(Q,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:u?"Voltar":"Executar"}),!!A.open&&jsx(io,{handleClose:A.onClose,openPopover:A.open,argumentsValues:o,filter:e,onExecute:C=>ko(C)})]}),jsx(Ao,{children:u?jsx(uo,{fields:l.map(C=>C.name),data:m,isError:f,isLoading:a$1}):jsx(Fragment,{children:s==="simple"?jsx(So,{fieldsSelect:l,sql:e,setSql:d}):jsx(co,{fieldsSelect:l,argumentsValues:o,onChangeArguments:t,sql:e,setSql:d,setFilterRule:n})})})]})})},wr=Ne;
30
+ var B=styled(R)(({theme:o})=>({borderBottom:`1px solid ${o.palette.divider}`,borderTop:`1px solid ${o.palette.divider}`,padding:16})),j=styled(R)(({theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:o.palette.background.neutral}})),oo=styled(R)(({theme:o})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:o.palette.background.paper,padding:"8px 16px",borderRadius:8,border:`1px solid ${o.palette.divider}`,cursor:"pointer",color:o.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${o.palette.primary.main}`,backgroundColor:alpha(o.palette.primary.main,.05)}})),eo=styled(R)(({theme:o})=>({width:"100%","& fieldset":{border:`1px solid ${o.palette.divider}`,borderRadius:8,"& legend":{color:o.palette.text.disabled,fontSize:12}}})),_=styled(To)({padding:0});var zo=({openPopover:o,handleClose:t,argumentsValues:l,filter:n,onExecute:i})=>{let[p,c]=useState([]),m=(a,e)=>{if(e&&e!=="")p.filter(u=>u.name===a).length>0?c(p.map(u=>u.name===a?{name:a,value:e}:u)):c([...p||[],{name:a,value:e}]);else {let d=p.filter(u=>u.name===a);c(d);}},f=()=>{let a=n||"";return p.forEach(e=>{a=a.replace(`$ARG[${e.name}]`,`'${e.value}'`);}),a};return jsxs(Ro,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,title:"Pr\xE9-visualizar",children:[jsx(so,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(B,{children:l?.map((a,e)=>jsx(No,{name:a,label:a,size:"small",onChange:d=>m(a,d.target.value),required:!0},e))}),jsxs(R,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(to,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(to,{variant:"contained",color:"primary",size:"small",startIcon:jsx(V,{icon:"PLAY_SIMPLE"}),onClick:()=>i(f()),disabled:p.length<l.length,children:"Executar"})]})]})},no=zo;var Ho=({openPopover:o,handleClose:t,addItem:l})=>{let[n,i]=useState("");return jsxs(Ro,{open:!!o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,onClose:t,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(so,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(B,{children:jsx(No,{value:n,onChange:c=>i(c.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(R,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(to,{variant:"outlined",color:"inherit",size:"small",onClick:t,children:"Cancelar"}),jsx(to,{variant:"contained",color:"primary",size:"small",startIcon:jsx(V,{icon:"SAVE_MARK"}),disabled:!n||n==="",onClick:()=>{l(n),t(),i("");},children:"Salvar"})]})]})},lo=Ho;var Ko=({label:o,itens:t,argumentsValues:l,fields:n,context:i,addItem:p,removeItem:c,insertItemSQL:m})=>{let[f,a]=useState(!1),e=Wo(),d=()=>{a(!f);},u=(s,S)=>{s.stopPropagation(),c&&c(S);},h=s=>{m(l?` $ARG[${s}]`:n?` this.${s}`:i?` $ctx[${s}]`:` ${s}`);};return jsxs(R,{children:[jsxs(R,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(_,{edge:"end",onClick:d,children:jsx(V,{icon:f?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(so,{variant:"overline",color:"text.primary",children:o}),p&&jsxs(Fragment,{children:[jsx(_,{edge:"end",onClick:e.onOpen,children:jsx(V,{icon:"SIMPLE_ADD"})}),jsx(lo,{addItem:p,handleClose:e.onClose,openPopover:e.open})]})]}),f&&jsx(R,{spacing:.5,children:jsx(qo,{sx:{maxHeight:150},children:t?.map((s,S)=>jsxs(oo,{direction:"row",justifyContent:"space-between",onClick:()=>h(s),children:[jsx(so,{variant:"caption",textAlign:"center",width:"100%",children:s}),c&&jsx(To,{edge:"end",onClick:x=>u(x,s),children:jsx(V,{icon:"DELETE_MARK_BUTTON_02"})})]},S))})})]})},T=Ko;var jo=({fieldsSelect:o,argumentsValues:t,onChangeArguments:l,sql:n,setSql:i,setFilterRule:p})=>{let c=po.default||po,[m,f]=useState(),{setValue:a}=useFormContext(),[e,d]=useState(1),[u,h]=useState(),s=r=>{u.session.insert(e,` ${r} `);},S=r=>{l([...t||[],r]);},x=r=>{l(t?.filter(G=>G!==r));},A=r=>{i(r),p(r),a("groups",void 0);},w=m?o.filter(r=>r.id.toString().toLocaleLowerCase().includes(m)||r.description.toString().toLocaleLowerCase().includes(m)||r.name?.toString().toLocaleLowerCase().includes(m)):o;return jsxs(R,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(j,{children:[jsx(Zo,{value:m,trigger:"change",onSearch:r=>f(r?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(T,{label:"Campos",fields:!0,itens:w.map(r=>r.name),insertItemSQL:s}),jsx(T,{label:"Argumentos",argumentsValues:!0,itens:t,addItem:S,removeItem:x,insertItemSQL:s}),jsx(T,{label:"Operadores",insertItemSQL:s,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(T,{label:"Filtros",fields:!0,insertItemSQL:s,itens:w.map(r=>r.name)}),jsx(T,{label:"Contexto",context:!0,insertItemSQL:s,itens:["Vendedor.CODIGO","Empresa.CODIGO","Parceiro.CODIGO"]})]}),jsx(eo,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(c,{width:"100%",mode:"sql",theme:"chrome",name:"rule",fontSize:14,onChange:A,onCursorChange:r=>d(r.getCursor()),value:n,onLoad:r=>h(r),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},mo=jo;var te=({data:o,fields:t,isLoading:l,isError:n})=>jsxs(R,{gap:2,children:[jsx(so,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),n&&jsx(R,{children:"Falha ao gerar resultado"}),o&&jsx(R,{height:400,children:jsx(ee,{columns:t?.map(i=>({field:i,headerName:i,width:150,type:"string",resizable:!0})),loading:l,rows:o,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})})]}),co=te;var fo=styled(R)(({theme:o})=>({border:`1px solid ${alpha(o.palette.primary.main,.32)}`,backgroundColor:alpha(o.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),go=styled(To)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),O=styled(z)(()=>({width:230}));var ce=({index:o,indexGroup:t,removeConditional:l,fieldsSelect:n})=>{let{watch:i}=useFormContext(),p=`groups.[${t}].conditionals[${o}].field`,c=`groups.[${t}].conditionals[${o}].conditional`,m=`groups.[${t}].conditionals[${o}].type`,f=`groups.[${t}].conditionals[${o}].value`,a=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],e=i(m);return jsxs(R,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(z,{label:"Se",name:p,size:"small",fullWidth:!0,options:n?.map(d=>({value:d.name,label:d.description}))}),jsx(z,{label:"Estado",name:c,size:"small",fullWidth:!0,options:a}),jsx(z,{label:"Objetivo",name:`groups.[${t}].conditionals[${o}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),e==="value"?jsx(pe,{label:"Valor",name:f,size:"small",fullWidth:!0}):jsx(z,{label:"Se",name:f,size:"small",fullWidth:!0,options:n?.map(d=>({value:d.name,label:d.description}))}),jsx(go,{color:"error",onClick:()=>{l(o);},children:jsx(V,{icon:"DELETE_MARK_BUTTON_02"})})]})},vo=ce;var Ie=({index:o,removeGroup:t,fieldsSelect:l})=>{let{control:n}=useFormContext(),i=`groups.[${o}].operator`,{fields:p,append:c,remove:m}=useFieldArray({name:`groups.${o}.conditionals`,control:n});return jsx(Ce,{name:`GRUPO ${o+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(O,{name:i,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>t(o),children:jsxs(R,{spacing:1.5,alignItems:"flex-start",children:[p.map((f,a)=>jsx(vo,{index:a,indexGroup:o,removeConditional:e=>m(e),fieldsSelect:l},f.id)),jsx(ve,{actionType:"NEW",onClick:()=>c({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},Co=Ie;var Ae=({fieldsSelect:o})=>{let{control:t}=useFormContext(),{fields:l,append:n,remove:i}=useFieldArray({name:"groups",control:t});return jsxs(R,{gap:1.5,children:[jsxs(fo,{direction:"row",spacing:1.5,children:[jsx(so,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(R,{children:jsx(O,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(so,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),l.map((p,c)=>jsx(Co,{index:c,removeGroup:m=>i(m),fieldsSelect:o},p.id)),jsx(to,{size:"large",color:"inherit",startIcon:jsx(V,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{n({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},ho=Ae;var So=styled(R)(({theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:8,marginTop:24})),yo=styled(R)(({theme:o})=>({padding:12,borderBottom:`1px solid ${o.palette.divider}`})),Z=styled(Ee)(()=>({lineHeight:"1em"})),xo=styled(R)(()=>({padding:12}));var Be=({argumentsValues:o,onChangeArguments:t,fieldsSelect:l,onChangeRule:n,onChangeSqlProcessed:i,defaultMode:p,defaultFilter:c,dataPreview:m,errorPreview:f,loadingPreview:a$1})=>{let[e,d]=useState(c||""),[u,h]=Re(),[s,S]=useState(p||"simple"),{watch:x}=useFormContext(),A=Wo(),w=x("operator"),r=x("groups"),G=(C,E)=>{if(E==="advanced"){let D=a(r,w);d(D),i(D),n(D);}else E==="simple"&&e&&(n(e),i(e));E!==null&&S(E);},Lo=C=>{if(s==="simple"){let E=a(r,w);i(E);}else i(e);u||s==="simple"||o.length===0?h():A.onOpen(C);},ko=C=>{h(),i(C);};return jsx(Fragment,{children:jsxs(So,{children:[jsxs(yo,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(Te,{color:"primary",value:s,size:"small",exclusive:!0,onChange:G,children:[jsx(Z,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(Z,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(to,{variant:"outlined",color:"inherit",onClick:C=>Lo(C),startIcon:!u&&jsx(V,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:u?"Voltar":"Executar"}),!!A.open&&jsx(no,{handleClose:A.onClose,openPopover:A.open,argumentsValues:o,filter:e,onExecute:C=>ko(C)})]}),jsx(xo,{children:u?jsx(co,{fields:l.map(C=>C.name),data:m,isError:f,isLoading:a$1}):jsx(Fragment,{children:s==="simple"?jsx(ho,{fieldsSelect:l,sql:e,setSql:d}):jsx(mo,{fieldsSelect:l,argumentsValues:o,onChangeArguments:t,sql:e,setSql:d,setFilterRule:n})})})]})})},Tr=Be;
31
31
 
32
- export { wr as default };
32
+ export { Tr as default };
@@ -1 +1 @@
1
- export { a as default } from '../../../chunk-A3XAR6MQ.js';
1
+ export { a as default } from '../../../chunk-4OQQY3LQ.js';
@@ -1,4 +1,4 @@
1
- import { a } from '../../../chunk-A3XAR6MQ.js';
1
+ import { a } from '../../../chunk-4OQQY3LQ.js';
2
2
  import { useFormContext } from 'react-hook-form';
3
3
  import g from '@mui/material/Button';
4
4
  import C from '@zydon/common/components/ActionButton';
@@ -1,9 +1,9 @@
1
1
  import { forwardRef } from 'react';
2
2
  import { LazyLoadImage } from 'react-lazy-load-image-component';
3
- import A from '@mui/material/Box';
3
+ import s from '@mui/material/Box';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
7
- var e={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var I=styled(A)({overflow:"hidden",position:"relative",display:"inline-block",[`& .${e.wrapper}`]:{width:"100%",height:"100%",backgroundSize:"cover !important"}}),b=styled("span")({top:0,left:0,zIndex:1,width:"100%",height:"100%",position:"absolute"}),O=forwardRef(({ratio:r,disabledEffect:t=!1,alt:i,src:l,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,effect:w="blur",visibleByDefault:o,wrapperClassName:D,useIntersectionObserver:v,slotProps:a,sx:y,...x},C)=>{let F=jsx(A,{component:LazyLoadImage,alt:i,src:l,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,visibleByDefault:o,effect:o||t?void 0:w,useIntersectionObserver:v,wrapperClassName:D||e.wrapper,placeholderSrc:o||t?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=":"data:image/svg+xml,%3Csvg%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%3CradialGradient%20id%3D%22a%22%20cx%3D%2250%25%22%20cy%3D%2246.801102%25%22%20r%3D%2295.497112%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%20%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23919eab%22%20stop-opacity%3D%22.48%22%20%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cpath%20d%3D%22m88%2086h512v512h-512z%22%20fill%3D%22url(%23a)%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate(-88%20-86)%22%20%2F%3E%0A%3C%2Fsvg%3E%0A",sx:{width:1,height:1,objectFit:"cover",verticalAlign:"bottom",aspectRatio:r}});return jsxs(I,{ref:C,component:"span",className:e.root,sx:{...!!r&&{width:1},...y},...x,children:[a?.overlay&&jsx(b,{className:e.overlay,sx:a?.overlay}),F]})});
7
+ var o={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var _=styled(s)({overflow:"hidden",position:"relative",display:"inline-block",[`& .${o.wrapper}`]:{width:"100%",height:"100%",backgroundSize:"cover !important"}}),E=styled("span")({top:0,left:0,zIndex:1,width:"100%",height:"100%",position:"absolute"}),O=forwardRef(({ratio:a,disabledEffect:r=!1,alt:i,src:l,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,effect:w="blur",visibleByDefault:e,wrapperClassName:y,useIntersectionObserver:D,slotProps:t,sx:v,...C},x)=>{let F=jsx(s,{component:LazyLoadImage,alt:i,src:l,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,visibleByDefault:e,effect:e||r?void 0:w,useIntersectionObserver:D,wrapperClassName:y||o.wrapper,placeholderSrc:e||r?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=":"data:image/svg+xml,%3Csvg%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%3CradialGradient%20id%3D%22a%22%20cx%3D%2250%25%22%20cy%3D%2246.801102%25%22%20r%3D%2295.497112%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%20%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23919eab%22%20stop-opacity%3D%22.48%22%20%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cpath%20d%3D%22m88%2086h512v512h-512z%22%20fill%3D%22url(%23a)%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate(-88%20-86)%22%20%2F%3E%0A%3C%2Fsvg%3E%0A",style:{width:"100%",height:"100%",objectFit:"cover",verticalAlign:"bottom",aspectRatio:a}});return jsxs(_,{ref:x,component:"span",className:o.root,sx:{...!!a&&{width:1},...v},...C,children:[t?.overlay&&jsx(E,{className:o.overlay,sx:t?.overlay}),F]})});
8
8
 
9
- export { O as Image, e as imageClasses };
9
+ export { O as Image, o as imageClasses };
@@ -168,6 +168,7 @@ type NavItemBaseProps = {
168
168
  slotProps?: NavItemSlotProps;
169
169
  icon?: string | React.ReactNode;
170
170
  info?: string[] | React.ReactNode;
171
+ hidden?: boolean;
171
172
  };
172
173
  type NavItemProps = ButtonBaseProps & NavItemStateProps & NavItemBaseProps;
173
174
  type NavItemButtonProps = ButtonBaseProps & NavItemStateProps & NavItemBaseProps & {
@@ -205,10 +206,12 @@ type NavGroupProps = Omit<NavListProps, 'data' | 'depth'> & {
205
206
  };
206
207
  type NavButtonGroupProps = Omit<NavListProps, 'data' | 'depth'> & {
207
208
  subheader?: string;
209
+ hiddenSubheader?: boolean;
208
210
  items: NavItemBaseProps[];
209
211
  onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
210
212
  pathname: string;
211
213
  renderEmptyView?: () => React.ReactNode;
214
+ hidden?: boolean;
212
215
  };
213
216
  type NavSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
214
217
  sx?: SxProps<Theme>;
@@ -219,11 +222,15 @@ type NavSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
219
222
  };
220
223
  type NavButtonSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
221
224
  sx?: SxProps<Theme>;
222
- data: {
225
+ data: ({
223
226
  subheader?: string;
227
+ hiddenSubheader?: boolean;
224
228
  renderEmptyView?: () => React.ReactNode;
225
229
  items: NavItemBaseProps[];
226
- }[];
230
+ hidden?: boolean;
231
+ } | {
232
+ divider: React.ReactNode;
233
+ })[];
227
234
  onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
228
235
  pathname: string;
229
236
  };
@@ -4,7 +4,7 @@ import q from '@mui/material/Box';
4
4
  import De from '@mui/material/ButtonBase';
5
5
  import { styled, useTheme } from '@mui/material/styles';
6
6
  import qe from '@mui/material/Tooltip';
7
- import be from '@zydon/common/components/Icon';
7
+ import ge from '@zydon/common/components/Icon';
8
8
  import Te from '@mui/material/Collapse';
9
9
  import We from '@mui/material/Typography';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -15,6 +15,6 @@ import oo from '@mui/material/Paper';
15
15
  import to from '@mui/material/Popover';
16
16
  import Yo from '@mui/material/Divider';
17
17
 
18
- var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var fe={dark:"#282F37",light:"#EDEFF2"};function Z(e,i){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":o.primary.light,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...Z(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...Z(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function Me(e){let{shape:i,spacing:o}=e;return {...Z(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function b({sx:e,children:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var ge=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:ge,href:e},g=null;i&&r?.navIcon&&typeof i=="string"?g=r?.navIcon[i]:g=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:c,baseProps:d,renderIcon:g,renderInfo:f}}var ee=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:c,slotProps:p,externalLink:d,enabledRootRedirect:g,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:c,externalLink:d,enabledRootRedirect:g});return jsxs(Ke,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,children:jsx(be,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),c&&jsx(be,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Ke=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function oe(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return oe(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=oe(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function te({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&g();},[n]);let d=useCallback(()=>{e.children&&p(!0);},[e.children]),g=useCallback(()=>{p(!1);},[]),f=jsx(ee,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:d,onMouseLeave:g});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(b,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:c,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:d,onMouseLeave:g,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(io,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(b,{disabled:e.disabled,children:f})}function io({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(te,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function dn({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(lo,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(so,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(po,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function po({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(b,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(te,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var ne=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:c,slotProps:p,externalLink:d,enabledRootRedirect:g,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:c,externalLink:d,enabledRootRedirect:g});return jsxs(bo,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(be,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}),bo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ie=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&g();},[n]);let d=useCallback(()=>{e.children&&p(!0);},[e.children]),g=useCallback(()=>{p(!1);},[]),f=jsx(ne,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:d,onMouseLeave:g});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(b,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:c,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:d,onMouseLeave:g,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Lo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(b,{disabled:e.disabled,children:f})};function Lo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ie,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var Yn=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx($o,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},$o=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(b,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ie,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function Y({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,c=!v,p=Number(a)>2,g=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:c,rootItem:v,subDeepItem:p,baseProps:g,renderIcon:f,renderInfo:x}}var se=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:c,slotProps:p,externalLink:d,enabledRootRedirect:g,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:c,externalLink:d,enabledRootRedirect:g,onNavigate:f}),K=!(m===1),ue=jsxs(Oo,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(be,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return ue}),Oo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),c=I(e.path),p=W(e.path),d=!!matchPath({path:p||"",end:!c},n),g=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!c},n)):d,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(se,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:g,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(b,{disabled:e.disabled,children:[E,jsx(to,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Ko,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(b,{disabled:e.disabled,children:E})};function Ko({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(me,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var zi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.map(c=>jsxs(Fragment,{children:[c.subheader&&jsx(Fragment,{children:jsx(Yo,{sx:{my:2},flexItem:!0})}),jsx(et,{render:o,cssVars:v,items:c.items,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n})]},c.subheader??c.items[0].title))})})},et=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r,onNavigate:s,pathname:m})=>jsx(b,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(me,{depth:1,data:n,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a,onNavigate:s,pathname:m},n.title))})});var le=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:c,slotProps:p,externalLink:d,enabledRootRedirect:g,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:c,externalLink:d,enabledRootRedirect:g});return jsxs(mt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),c&&jsx(be,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),mt=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||c();},[s]);let v=useCallback(()=>{e.children&&l(d=>!d);},[e.children]),c=useCallback(()=>{l(!1);},[]),p=jsx(le,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:m,disabled:e.disabled,hasChild:!!e.children,open:e.children&&n,externalLink:I(e.path),enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(b,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[p,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ct,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(b,{disabled:e.disabled,children:p})},ct=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(pe,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var ba=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(bt,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},bt=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(pe,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(b,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var ce=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:c,slotProps:p,externalLink:d,enabledRootRedirect:g,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:c,externalLink:d,enabledRootRedirect:g,onNavigate:f});return jsxs(Ct,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),c&&jsx(be,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}),Ct=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),c=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[p,d]=useState(c);useEffect(()=>{c||f();},[m]);let g=useCallback(()=>{e.children&&d(h=>!h);},[e.children]),f=useCallback(()=>{d(!1);},[]),x=jsx(ce,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:c,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:g,onNavigate:s});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(b,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[x,jsx(X,{"data-group":e.title,in:p,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Rt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(b,{disabled:e.disabled,children:x})},Rt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Za=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(c=>jsx(Wt,{subheader:c.subheader,items:c.items,render:o,renderEmptyView:c.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},c.subheader??c.items[0].title))})})},Wt=({items:e,render:i,renderEmptyView:o,subheader:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let[l,v]=useState(!0),c=useCallback(()=>{v(d=>!d);},[]),p=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n},d.title))});return jsx(b,{children:a?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:l,onClick:c,sx:r?.subheader,children:a}),jsx(Te,{in:l,children:p})]}):p})};
18
+ var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var fe={dark:"#282F37",light:"#EDEFF2"};function Z(e,i){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":e.palette.primary.contrastText,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...Z(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...Z(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function Me(e){let{shape:i,spacing:o}=e;return {...Z(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function g({sx:e,children:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var be=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,p=Number(a)>2,b=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:be,href:e},d=null;i&&r?.navIcon&&typeof i=="string"?d=r?.navIcon[i]:d=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:p,baseProps:b,renderIcon:d,renderInfo:f}}var ee=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(Ke,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Ke=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function oe(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return oe(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=oe(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function te({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ee,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(io,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})}function io({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(te,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function un({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(lo,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(so,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(po,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function po({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(te,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var ne=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(go,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}),go=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ie=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ne,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Lo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})};function Lo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ie,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var Yn=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(Bo,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},Bo=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ie,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function Y({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,p=!v,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:p,rootItem:v,subDeepItem:c,baseProps:d,renderIcon:f,renderInfo:x}}var se=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f}),K=!(m===1),de=jsxs(Oo,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return de}),Oo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),p=I(e.path),c=W(e.path),b=!!matchPath({path:c||"",end:!p},n),d=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!p},n)):b,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(se,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:d,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[E,jsx(to,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Ko,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(g,{disabled:e.disabled,children:E})};function Ko({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(me,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var zi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsxs(Fragment,{children:[p.subheader&&jsx(Fragment,{children:jsx(Yo,{sx:{my:2},flexItem:!0})}),jsx(et,{render:o,cssVars:v,items:p.items,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden})]},p.subheader??p.items[0]?.title??c))})})},et=({items:e,render:i,renderEmptyView:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(v=>!v.hidden).map(v=>jsx(me,{depth:1,data:v,render:i,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},v.title))});return jsx(g,{children:l})};var le=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(mt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),mt=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||p();},[s]);let v=useCallback(()=>{e.children&&l(b=>!b);},[e.children]),p=useCallback(()=>{l(!1);},[]),c=jsx(le,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:m,disabled:e.disabled,hasChild:!!e.children,open:e.children&&n,externalLink:I(e.path),enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[c,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ct,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:c})},ct=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(pe,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var ga=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(gt,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},gt=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(pe,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var ce=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f});return jsxs(Ct,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}),Ct=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),p=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[c,b]=useState(p);useEffect(()=>{p||f();},[m]);let d=useCallback(()=>{e.children&&b(h=>!h);},[e.children]),f=useCallback(()=>{b(!1);},[]),x=jsx(ce,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:p,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:d,onNavigate:s});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[x,jsx(X,{"data-group":e.title,in:c,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Rt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(g,{disabled:e.disabled,children:x})},Rt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Za=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsx(Wt,{subheader:p.subheader,items:p.items,render:o,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden,hiddenSubheader:p.hiddenSubheader},p.subheader??p.items[0]?.title??c))})})},Wt=({items:e,render:i,renderEmptyView:o,subheader:a,hiddenSubheader:r,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l})=>{let[v,p]=useState(!0),c=useCallback(()=>{p(d=>!d);},[]),b=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(d=>!d.hidden).map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l},d.title))});return jsx(g,{children:a&&!r?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:v,onClick:c,sx:s?.subheader,children:a}),jsx(Te,{in:v,children:b})]}):b})};
19
19
 
20
- export { X as NavCollapse, b as NavLi, dn as NavSectionHorizontal, ee as NavSectionHorizontalItem, Yn as NavSectionMini, se as NavSectionMiniButtonItem, ne as NavSectionMiniItem, zi as NavSectionMiniWithButtons, ba as NavSectionVertical, ce as NavSectionVerticalButtonItem, le as NavSectionVerticalItem, Za as NavSectionVerticalWithButtons, N as NavUl, Q as Subheader, fe as bulletColor, t as navSectionClasses, k as navSectionCssVars, u as sharedStyles, S as stateClasses, M as useNavItem };
20
+ export { X as NavCollapse, g as NavLi, un as NavSectionHorizontal, ee as NavSectionHorizontalItem, Yn as NavSectionMini, se as NavSectionMiniButtonItem, ne as NavSectionMiniItem, zi as NavSectionMiniWithButtons, ga as NavSectionVertical, ce as NavSectionVerticalButtonItem, le as NavSectionVerticalItem, Za as NavSectionVerticalWithButtons, N as NavUl, Q as Subheader, fe as bulletColor, t as navSectionClasses, k as navSectionCssVars, u as sharedStyles, S as stateClasses, M as useNavItem };
@@ -17,7 +17,7 @@ declare const useDatagrid: ({ prefix, ...initialState }?: Config) => {
17
17
  sort: string;
18
18
  dir: "desc" | "asc" | undefined;
19
19
  apiRef: MutableRefObject<GridApiPremium>;
20
- handlePaginationModelChange: ({ page, pageSize }: {
20
+ handlePaginationModelChange: ({ page, pageSize, }: {
21
21
  page?: number | undefined;
22
22
  pageSize?: number | undefined;
23
23
  }) => void;
@@ -1,5 +1,6 @@
1
+ import { DeepPartial } from 'react-hook-form';
1
2
  import { SxProps, Theme } from '@mui/material/styles';
2
- import { EditorOptions, Editor, Extension } from '@tiptap/react';
3
+ import { EditorOptions, Editor, NodeViewProps, Extension } from '@tiptap/react';
3
4
 
4
5
  type EditorProps = Partial<EditorOptions> & {
5
6
  value?: string;
@@ -26,7 +27,7 @@ type EditorToolbarItemProps = {
26
27
  active?: boolean;
27
28
  disabled?: boolean;
28
29
  };
29
- type EditorCodeHighlightBlockProps = {
30
+ type EditorCodeHighlightBlockProps = NodeViewProps & HTMLElement & DeepPartial<{
30
31
  extension: Extension;
31
32
  updateAttributes: (attributes: Record<string, any>) => void;
32
33
  node: {
@@ -34,6 +35,6 @@ type EditorCodeHighlightBlockProps = {
34
35
  language: string;
35
36
  };
36
37
  };
37
- };
38
+ }>;
38
39
 
39
40
  export { EditorProps as E, EditorToolbarProps as a, EditorToolbarItemProps as b, EditorCodeHighlightBlockProps as c };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.10",
2
+ "version": "2.1.12",
3
3
  "name": "@zydon/common-csr",
4
4
  "description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
5
5
  "license": "MIT",
@@ -60,7 +60,7 @@
60
60
  "@types/react-lazy-load-image-component": "^1.6.4",
61
61
  "@typescript-eslint/eslint-plugin": "^6.4.1",
62
62
  "@typescript-eslint/parser": "^6.4.1",
63
- "@zydon/common": "^2.0.56",
63
+ "@zydon/common": "^2.6.79",
64
64
  "autoprefixer": "^10.4.20",
65
65
  "eslint": "^8.47.0",
66
66
  "eslint-config-prettier": "^9.0.0",
@@ -1,12 +0,0 @@
1
- import { useState } from 'react';
2
- import c from '@mui/material/Stack';
3
- import m from '@mui/material/Typography';
4
- import v from '@zydon/common/components/form/Field';
5
- import { styled } from '@mui/material/styles';
6
- import s from '@mui/material/ToggleButton';
7
- import d from '@mui/material/ToggleButtonGroup';
8
- import { jsxs, jsx } from 'react/jsx-runtime';
9
-
10
- var p=styled(s)(({theme:r})=>({width:"100%","&.Mui-selected":{backgroundColor:r.palette.primary.main,color:r.palette.common.white,"&:hover":{backgroundColor:r.palette.primary.main}}})),g=styled(d)(()=>({display:"flex",justifyContent:"space-between"}));var f=({initialMode:r,rules:a,setRuleType:l})=>{let[i,u]=useState(r);return jsxs(c,{gap:2,children:[jsx(v,{name:"name",label:"Nome da regra",required:!0,rules:{required:{value:!0,message:"Nome da regra \xE9 obrigat\xF3rio"}}}),jsx(m,{color:"grey.500",variant:"overline",children:"Selecione a regra"}),a&&jsx(g,{color:"primary",value:i,size:"small",exclusive:!0,onChange:(e,o)=>{if(o!==null&&(u(o),l))return l(o)},children:a.map((e,o)=>jsx(p,{value:e.value,size:"small",color:"primary",children:jsx(m,{variant:"body2",children:e.toggleTitle})},o))}),a&&a.map((e,o)=>e.value===i?jsx("div",{children:e.component},o):null)]})},q=f;
11
-
12
- export { q as a };
@@ -1,10 +0,0 @@
1
- import { sql } from '@codemirror/lang-sql';
2
- import s from '@mui/material/FormHelperText';
3
- import m from '@uiw/react-codemirror';
4
- import l from '@mui/material/Stack';
5
- import { styled, alpha } from '@mui/material/styles';
6
- import { jsxs, jsx } from 'react/jsx-runtime';
7
-
8
- var t=styled(l,{shouldForwardProp:r=>r!=="error"})(({theme:r,error:o})=>({width:"100%",borderRadius:8,overflow:"hidden",backgroundColor:"#fff","& .cm-theme-light":{border:`solid 1px ${alpha(r.palette.grey[500],.32)}`,padding:r.spacing(2),borderRadius:8,...o&&{borderColor:r.palette.error.main},"&:hover":{borderColor:r.palette.text.primary}},"& .cm-focused":{outline:"none"},"& .cm-scroller":{fontFamily:"inherit",lineHeight:"22px",fontSize:12}}));var f=({sx:r,error:o,helperText:e,...n})=>jsxs(t,{sx:r,error:o,children:[jsx(m,{extensions:[sql()],minHeight:"200px",basicSetup:{foldGutter:!1,lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1},...n}),e&&jsx(s,{error:o,sx:{px:2},children:e})]}),L=f;
9
-
10
- export { L as a };