@zydon/common 2.8.64 → 2.8.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3XECTDUZ.js → chunk-2MCLMTFV.js} +2 -2
- package/dist/chunk-2MCLMTFV.js.map +1 -0
- package/dist/{chunk-KYN54T4U.js → chunk-3ELMAXMX.js} +2 -2
- package/dist/{chunk-JT4DYZAT.js → chunk-5PUQMKA5.js} +4 -4
- package/dist/{chunk-WZFHXFZZ.js → chunk-7JCGMZ6E.js} +2 -2
- package/dist/{chunk-AVPFUSEB.js → chunk-7LBBLVDC.js} +1 -1
- package/dist/{chunk-AVPFUSEB.js.map → chunk-7LBBLVDC.js.map} +1 -1
- package/dist/{chunk-TJAQH6MS.js → chunk-DGCPCUVB.js} +2 -2
- package/dist/chunk-DGCPCUVB.js.map +1 -0
- package/dist/{chunk-XCCDYZLG.js → chunk-EPMAHRQO.js} +2 -2
- package/dist/chunk-FBVAHVU3.js +11 -0
- package/dist/chunk-FBVAHVU3.js.map +1 -0
- package/dist/{chunk-JRDGTK34.js → chunk-FQOV5EGQ.js} +2 -2
- package/dist/{chunk-A2GUNNNS.js → chunk-GODJQLB7.js} +3 -3
- package/dist/chunk-JSL5OEWZ.js +7 -0
- package/dist/chunk-JSL5OEWZ.js.map +1 -0
- package/dist/{chunk-O7B4K34H.js → chunk-KZFKHQ5P.js} +2 -2
- package/dist/{chunk-KYV74QIT.js → chunk-LNESYSHP.js} +1 -1
- package/dist/chunk-LNESYSHP.js.map +1 -0
- package/dist/{chunk-BNBE2OMA.js → chunk-LZQ7OFKO.js} +1 -1
- package/dist/{chunk-BNBE2OMA.js.map → chunk-LZQ7OFKO.js.map} +1 -1
- package/dist/{chunk-2LLPCOAG.js → chunk-N2UR3W55.js} +2 -2
- package/dist/{chunk-IDFJFFIV.js → chunk-NMGWHSNZ.js} +2 -2
- package/dist/{chunk-LJ5JKDMG.js → chunk-NWT5TUJO.js} +2 -2
- package/dist/chunk-NWT5TUJO.js.map +1 -0
- package/dist/{chunk-3XLPNBQU.js → chunk-PODYWSY7.js} +2 -2
- package/dist/{chunk-PKEBJI2J.js → chunk-PWR4GBUH.js} +2 -2
- package/dist/{chunk-3WFLKIPF.js → chunk-Q2AVS24Z.js} +2 -2
- package/dist/chunk-QDYHWRND.js +18 -0
- package/dist/chunk-QDYHWRND.js.map +1 -0
- package/dist/{chunk-YZIBDCPM.js → chunk-QMFFV7WM.js} +3 -3
- package/dist/{chunk-ITMUJKVT.js → chunk-SDS77DQQ.js} +3 -3
- package/dist/{chunk-F64NQ3BY.js → chunk-T53CFFZY.js} +2 -2
- package/dist/{chunk-DAFN2ILN.js → chunk-TBFQ5PEL.js} +6 -6
- package/dist/{chunk-7OV7UPWM.js → chunk-U4I7JPER.js} +1 -1
- package/dist/{chunk-7OV7UPWM.js.map → chunk-U4I7JPER.js.map} +1 -1
- package/dist/{chunk-T6UNWMMX.js → chunk-UJMWTYPH.js} +2 -2
- package/dist/{chunk-FZBK5B3G.js → chunk-Y3TJIK6E.js} +2 -2
- package/dist/{chunk-3JZOHMCP.js → chunk-YKLRB3EJ.js} +2 -2
- package/dist/components/ActionButton/index.js +3 -3
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/AutocompleteDetailed/index.js +1 -1
- package/dist/components/AvatarButton/index.js +7 -7
- package/dist/components/BuilderLayout/index.js +3 -3
- package/dist/components/BuilderSidebar/index.js +2 -2
- package/dist/components/BulkEditModal/index.js +4 -4
- package/dist/components/CardBrand/index.js +2 -2
- package/dist/components/Common/index.js +5 -5
- package/dist/components/Common/index.js.map +1 -1
- package/dist/components/CopyButton/index.js +4 -4
- package/dist/components/DataCards/index.js +1 -1
- package/dist/components/DataGrid/index.js +2 -2
- package/dist/components/DataView/index.js +6 -6
- package/dist/components/DragButton/index.js +3 -3
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/DynamicDataView/index.js +8 -8
- package/dist/components/DynamicDataView/index.js.map +1 -1
- package/dist/components/EasyCropModal/index.js +4 -4
- package/dist/components/EmptyContent/index.js +1 -1
- package/dist/components/Error/index.js +2 -2
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FileUpload/index.js +8 -8
- package/dist/components/FrameSkeleton/index.js +2 -2
- package/dist/components/HelpButton/index.js +3 -3
- package/dist/components/Icon/index.js +2 -2
- package/dist/components/IconButton/index.js +3 -3
- package/dist/components/ImageCropModal/index.js +3 -3
- package/dist/components/Incrementer/index.js +3 -3
- package/dist/components/InfoCircle/index.js +3 -3
- package/dist/components/Label/index.js +1 -1
- package/dist/components/ListBundles/index.js +3 -3
- package/dist/components/MenuItem/index.js +2 -2
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/MoreMenu/index.js +2 -2
- package/dist/components/NotFound/index.js +2 -2
- package/dist/components/PasswordRules/index.js +2 -2
- package/dist/components/PopoverSelect/index.js +2 -2
- package/dist/components/SearchInput/index.js +3 -3
- package/dist/components/SelectList/index.js +5 -5
- package/dist/components/SelectableCards/index.js +4 -4
- package/dist/components/SeoPreview/index.js +2 -2
- package/dist/components/SplashScreen/index.js.map +1 -1
- package/dist/components/StateDisplay/index.js +3 -3
- package/dist/components/Steps/index.js +2 -2
- package/dist/components/StyledTab/index.js +2 -2
- package/dist/components/SwapList/index.js +3 -3
- package/dist/components/ToggleTheme/index.js +5 -5
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/WebhookCard/index.js +3 -3
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/form/Address/index.js +4 -4
- package/dist/components/form/Autocomplete/index.js +4 -4
- package/dist/components/form/AutocompleteDetailed/index.js +1 -1
- package/dist/components/form/Codes/index.js +2 -2
- package/dist/components/form/Codes/index.js.map +1 -1
- package/dist/components/form/FileUpload/index.js +8 -8
- package/dist/components/form/Incrementer/index.js +3 -3
- package/dist/components/form/Password/index.js +2 -2
- package/dist/components/form/SelectList/index.js +5 -5
- package/dist/components/form/SelectableCards/index.js +4 -4
- package/dist/components/form/Webhook/index.js +5 -5
- package/dist/components/lightbox/index.js +2 -2
- package/dist/components/table/index.js +3 -3
- package/dist/hooks/useThemeToggle.js +4 -4
- package/dist/index.js +4 -4
- package/dist/theme/theme-provider.js +3 -3
- package/dist/theme/with-settings/index.js +2 -2
- package/dist/types/icon.d.ts +1 -0
- package/dist/types/icon.js +1 -1
- package/dist/utils/color.js +1 -1
- package/eslint-shared-rules.cjs +25 -0
- package/package.json +11 -5
- package/scripts/eslint-rules/mui-icon-button-has-label.cjs +135 -0
- package/scripts/eslint-rules/tooltip-child-has-wrapper.cjs +101 -0
- package/dist/chunk-3C7RDPW6.js +0 -18
- package/dist/chunk-3C7RDPW6.js.map +0 -1
- package/dist/chunk-3XECTDUZ.js.map +0 -1
- package/dist/chunk-7QKCCB23.js +0 -7
- package/dist/chunk-7QKCCB23.js.map +0 -1
- package/dist/chunk-KYV74QIT.js.map +0 -1
- package/dist/chunk-LJ5JKDMG.js.map +0 -1
- package/dist/chunk-TJAQH6MS.js.map +0 -1
- package/dist/chunk-YAAMDKRR.js +0 -11
- package/dist/chunk-YAAMDKRR.js.map +0 -1
- /package/dist/{chunk-KYN54T4U.js.map → chunk-3ELMAXMX.js.map} +0 -0
- /package/dist/{chunk-JT4DYZAT.js.map → chunk-5PUQMKA5.js.map} +0 -0
- /package/dist/{chunk-WZFHXFZZ.js.map → chunk-7JCGMZ6E.js.map} +0 -0
- /package/dist/{chunk-XCCDYZLG.js.map → chunk-EPMAHRQO.js.map} +0 -0
- /package/dist/{chunk-JRDGTK34.js.map → chunk-FQOV5EGQ.js.map} +0 -0
- /package/dist/{chunk-A2GUNNNS.js.map → chunk-GODJQLB7.js.map} +0 -0
- /package/dist/{chunk-O7B4K34H.js.map → chunk-KZFKHQ5P.js.map} +0 -0
- /package/dist/{chunk-2LLPCOAG.js.map → chunk-N2UR3W55.js.map} +0 -0
- /package/dist/{chunk-IDFJFFIV.js.map → chunk-NMGWHSNZ.js.map} +0 -0
- /package/dist/{chunk-3XLPNBQU.js.map → chunk-PODYWSY7.js.map} +0 -0
- /package/dist/{chunk-PKEBJI2J.js.map → chunk-PWR4GBUH.js.map} +0 -0
- /package/dist/{chunk-3WFLKIPF.js.map → chunk-Q2AVS24Z.js.map} +0 -0
- /package/dist/{chunk-YZIBDCPM.js.map → chunk-QMFFV7WM.js.map} +0 -0
- /package/dist/{chunk-ITMUJKVT.js.map → chunk-SDS77DQQ.js.map} +0 -0
- /package/dist/{chunk-F64NQ3BY.js.map → chunk-T53CFFZY.js.map} +0 -0
- /package/dist/{chunk-DAFN2ILN.js.map → chunk-TBFQ5PEL.js.map} +0 -0
- /package/dist/{chunk-T6UNWMMX.js.map → chunk-UJMWTYPH.js.map} +0 -0
- /package/dist/{chunk-FZBK5B3G.js.map → chunk-Y3TJIK6E.js.map} +0 -0
- /package/dist/{chunk-3JZOHMCP.js.map → chunk-YKLRB3EJ.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a } from './chunk-W3CK33IH.js';
|
|
2
2
|
import { f } from './chunk-OF6623HG.js';
|
|
3
|
-
import { a as a$1 } from './chunk-
|
|
3
|
+
import { a as a$1 } from './chunk-FBVAHVU3.js';
|
|
4
4
|
import { forwardRef, useState, useRef, useMemo, useCallback } from 'react';
|
|
5
5
|
import T from '@mui/material/IconButton';
|
|
6
6
|
import R from '@mui/material/InputAdornment';
|
|
@@ -9,4 +9,4 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var C=forwardRef(({name:M,increment:e=1,updadteForMultiple:P,allowNegative:u=!1,value:m,onChange:c,minValue:r,maxValue:o,decimalScale:p,disabled:i,tabIndex:w,labelIncrementer:B,labelDecrementer:O,placeholder:z,InputProps:y,...E},L)=>{let[N,_]=useState(`incrementer-input-${Date.now()}`),I=useRef(null),s=Number(m||0),b=()=>{I.current&&(clearTimeout(I.current),I.current=null);},$=useMemo(()=>{let n=s-e;return typeof r=="number"&&n<r?!0:i||!u&&n<0},[i,s,e,r,u]),G=useMemo(()=>{let n=s+e;return typeof o=="number"&&n>o?!0:i},[i,s,e,o]),H=useCallback(()=>{if(b(),!u&&s-e<0)return;let n=s-e,t=r!==void 0&&n<r?r:f(n,p);c(t);},[s,e,r,p,c,u]),K=n=>r!==void 0&&n<r?r:o!==void 0&&n>o?o:f(n,p),U=useCallback(()=>{b();let n=s+e,t=K(n);c(t);},[s,e,o,r,p,c]),W=useCallback(n=>{b();let t=Number(n.target.value||0);(e!==1||P)&&(t=t+e/2,t-=t%e),!u&&t<0&&(t=0),typeof r=="number"&&t<r&&(t=r),typeof o=="number"&&t>o&&(t=o),t=f(t,p),(!t||t===m)&&(I.current=setTimeout(()=>{_(`incrementer-input-${Date.now()}`);},600)),c(t);},[m,e,r,o,p,c,P,u]);return jsx(a,{ref:L,name:M,value:m,minValue:r,maxValue:o,allowNegative:u,decimalScale:p,InputProps:{...y,startAdornment:jsx(R,{position:"start",sx:{ml:-1},children:jsx(T,{onClick:H,disabled:$,size:"small","aria-label":O||"Decrementa",sx:{p:.5},children:jsx(a$1,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:jsx(R,{position:"end",sx:{mr:-1},children:jsx(T,{onClick:U,disabled:G,size:"small","aria-label":B||"Incrementa",sx:{p:.5},children:jsx(a$1,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{...y?.inputProps,style:{...y?.inputProps?.style,textAlign:"center"},sx:{mx:-2.5}}},inputProps:{tabIndex:w},onChange:W,disabled:i,placeholder:z,...E},N)});C.displayName="Incrementer";var x=C;
|
|
10
10
|
|
|
11
11
|
export { x as a };
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-FQOV5EGQ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a } from './chunk-RUABKHIV.js';
|
|
2
|
-
import { a as a$1 } from './chunk-
|
|
2
|
+
import { a as a$1 } from './chunk-Y3TJIK6E.js';
|
|
3
3
|
import { a as a$3 } from './chunk-IJZCVZ32.js';
|
|
4
4
|
import { a as a$4 } from './chunk-6U5LS7MP.js';
|
|
5
|
-
import { a as a$2 } from './chunk-
|
|
5
|
+
import { a as a$2 } from './chunk-N2UR3W55.js';
|
|
6
6
|
import { useMemo, useCallback } from 'react';
|
|
7
7
|
import B from '@mui/material/Checkbox';
|
|
8
8
|
import H from '@mui/material/FormControlLabel';
|
|
@@ -17,4 +17,4 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
17
17
|
var A=styled(i)(({theme:r})=>({flexDirection:"row",minHeight:48,alignItems:"flex-start",justifyContent:"flex-start",padding:r.spacing(1.5,0),borderBottom:`1px dashed ${r.palette.divider}`,"& label":{marginInline:0,userSelect:"none",alignItems:"flex-start","& .MuiFormControlLabel-label":{minHeight:36,display:"flex",alignItems:"center"}}}));var $=Array.from({length:12},(r,p)=>jsx(a,{height:48},p)),q=({value:r,multiple:p,options:l,onChange:c,pagination:n,onSearch:f,onAdd:g,total:m=0,label:h,loading:b,loadingView:O,fetching:S,fetchingView:v,emptyView:M,error:N,helperText:k})=>{let s=p&&Array.isArray(r),C=useMemo(()=>Math.ceil(m/(n?.perPage||1)),[m,n?.perPage]),_=useMemo(()=>l.map(e=>e.value),[l]),j=s&&m>0&&_.every(e=>r.includes(e)),z=useCallback(()=>{if(!s)return;let e=l.filter(o=>!o.disabled).map(o=>o.value),a=e.every(o=>r.includes(o));c(a?r.filter(o=>!e.includes(o)):[...r,...e.filter(o=>!r.includes(o))]);},[s,r,c,l]),y=useCallback((e,a)=>{if(!s){c(e);return}c(a?[...r,e]:r.filter(o=>o!==e));},[s,r,c]),E=useCallback(e=>s?jsx(B,{checked:r.includes(e.value),onChange:(a,o)=>y(e.value,o),disabled:e.disabled}):jsx(K,{checked:r===e.value,onChange:()=>y(e.value,!0),disabled:e.disabled}),[s,r,y]);return jsxs(i,{gap:2,width:1,children:[h&&jsx(u,{variant:"overline",color:"text.secondary",children:h}),s&&jsxs(i,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",gap:1,children:[jsx(H,{label:"Selecionar todos",control:jsx(B,{checked:j,onChange:z}),componentsProps:{typography:{color:"text.secondary",ml:.5,sx:{fontSize:"12px !important"}}}}),m>0&&jsxs(u,{variant:"caption",color:"text.secondary",children:[jsx("strong",{children:r.length})," de ",jsx("strong",{children:m})," ","selecionados"]})]}),(f||g)&&jsxs(i,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",gap:1,children:[jsx(i,{maxWidth:280,flex:1,children:f&&jsx(a$1,{onSearch:f,trigger:"click",size:"small",fullWidth:!0,placeholder:"Buscar",iconPosition:"start"})}),g&&jsx(a$2,{actionType:"NEW",onClick:g,size:"small",variant:"text",children:"Adicionar"})]}),jsx(i,{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:1,children:jsx(a$3,{isFetching:S,fetching:v||jsx(a$4,{}),isLoading:b,loading:O||$,children:l.map(e=>jsxs(A,{minHeight:48,justifyContent:"center",p:1.5,children:[e.startContent&&jsx(i,{children:e.startContent}),jsx(H,{label:e.label,control:E(e),componentsProps:{typography:{ml:.5}}})]},e.value))})}),k&&jsx(D,{error:N,children:k}),!b&&!S&&l.length===0&&(M||jsx(u,{variant:"body1",color:"text.secondary",align:"center",my:3,children:"Nenhum resultado encontrado"})),n&&C>1&&jsx(G,{page:n.page+1,count:C,onChange:(e,a)=>n.onChange(a-1,n.perPage),variant:"soft",sx:{mx:"auto"}})]})},me=q;
|
|
18
18
|
|
|
19
19
|
export { me as a };
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-GODJQLB7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/index.tsx"],"names":["MuiTooltip","jsx","Tooltip","children","props","Tooltip_default"],"mappings":"AAAA,OAAOA,MAAkC,wBAIrC,cAAAC,MAAA,oBAFJ,IAAMC,EAAU,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAM,IAElCH,EAACD,EAAA,CAAY,GAAGI,EACb,SAAAD,EACH,EAIGE,EAAQH","sourcesContent":["import MuiTooltip, { TooltipProps } from '@mui/material/Tooltip';\n\nconst Tooltip = ({ children, ...props }: TooltipProps) => {\n return (\n <MuiTooltip {...props}>\n {children}\n </MuiTooltip>\n );\n};\n\nexport default Tooltip;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-FBVAHVU3.js';
|
|
2
2
|
import M from '@mui/material/Dialog';
|
|
3
3
|
import k from '@mui/material/DialogTitle';
|
|
4
4
|
import B from '@mui/material/IconButton';
|
|
@@ -11,4 +11,4 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
11
11
|
var l=styled(P)(({theme:o})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${o.palette.divider}`,button:{marginRight:24}})),p=styled(D)({padding:24}),c=styled(x)(({theme:o})=>({borderTop:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.background.paper}));var h=({children:o,actionsProps:i})=>jsx(c,{"data-testid":"modal-actions",...i,children:o}),m=h;var O=({actions:o,actionsProps:i,children:A,dialogContentProps:b,dialogTitle:r,dialogTitleProps:g,onClose:e,id:a$1,...C})=>{let u=a$1||"actions",s="caixa de di\xE1logo";return jsxs(M,{"aria-label":r?`${s}: ${r}`:s,id:a$1,scroll:"body",...C,onClose:e,children:[jsxs(l,{children:[r&&jsx(k,{variant:"subtitle1",...g,children:r}),jsx(B,{onClick:e,"aria-label":"Fechar caixa de di\xE1logo","data-testid":"close-modal-btn",children:jsx(a,{icon:"CLOSE_MARK_BUTTON"})})]}),jsx(p,{"data-testid":"modal-content",...b,children:A}),o&&jsx(m,{actionsProps:{...i,id:u},children:o})]})},K=O;
|
|
12
12
|
|
|
13
13
|
export { K as a };
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-KZFKHQ5P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/color.ts"],"names":["Color","getLuminosity","color","getContrastTextColor","colors_default","normalizeHexColor"],"mappings":"wCAAA,OAAOA,MAAW,QAGX,IAAMC,EAAiBC,GAAkBF,EAAME,CAAK,EAAE,WAAW,EAE3DC,EAAwBD,GAChBD,EAAcC,CAAK,EAElB,GAAME,EAAO,KAAK,GAAG,EAAI,UAGlCC,EAAqBH,GAC3BA,EAEE,IADSA,EAAM,QAAQ,MAAO,EAAE,IADpB","sourcesContent":["import Color from 'color';\nimport COLORS from 'theme/core/colors.json';\n\nexport const getLuminosity = (color: string) => Color(color).luminosity();\n\nexport const getContrastTextColor = (color: string) => {\n const luminosity = getLuminosity(color);\n\n return luminosity > 0.5 ? COLORS.grey[800] : '#FFFFFF';\n};\n\nexport const normalizeHexColor = (color: string): string => {\n if (!color) return '#000000';\n const cleaned = color.replace(/^#+/, '');\n return `#${cleaned}`;\n};\n"]}
|
|
@@ -10,4 +10,4 @@ Migra\xE7\xE3o: import StateDisplay from "@zydon/common/components/StateDisplay"
|
|
|
10
10
|
O StateDisplay oferece melhor flexibilidade para empty states, success screens e outros estados.`);var f=({sx:c,imgUrl:n,action:a$1,filled:l,slotProps:e,description:p,title:m="No data",...d})=>jsxs(x,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{px:3,height:1,...l&&{borderRadius:2,bgcolor:o=>k(o.vars.palette.grey["500Channel"],.04),border:o=>`dashed 1px ${k(o.vars.palette.grey["500Channel"],.08)}`},...c},...d,children:[n?jsx(y,{component:"img",alt:"empty content",src:n,sx:{width:1,maxWidth:160,...e?.img}}):jsx(a,{}),m&&jsx(i,{variant:"h6",component:"span",sx:{mt:1,textAlign:"center",...e?.title,color:"text.disabled"},children:m}),p&&jsx(i,{variant:"caption",sx:{mt:1,textAlign:"center",color:"text.disabled",...e?.description},children:p}),a$1&&a$1]}),D=f;
|
|
11
11
|
|
|
12
12
|
export { D as a };
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-LZQ7OFKO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/EmptyContent/index.tsx"],"names":["Box","Stack","Typography","jsx","jsxs","EmptyContent","sx","imgUrl","action","filled","slotProps","description","title","other","theme","varAlpha","EmptyContent_default"],"mappings":"gFAAA,OAAOA,MAAS,oBAChB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BA2BnB,OAmBI,OAAAC,EAnBJ,QAAAC,MAAA,oBApBA,QAAQ,IAAI,WAAa,eAE3B,QAAQ,KACN;AAAA;AAAA,iGAGF,EAGF,IAAMC,EAAe,CAAC,CACpB,GAAAC,EACA,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,YAAAC,EACA,MAAAC,EAAQ,UACR,GAAGC,CACL,IAEIT,EAACH,EAAA,CACC,SAAU,EACV,WAAW,SACX,eAAe,SACf,GAAI,CACF,GAAI,EACJ,OAAQ,EACR,GAAIQ,GAAU,CACZ,aAAc,EACd,QAASK,GACPC,EAASD,EAAM,KAAK,QAAQ,KAAK,YAAY,EAAG,GAAI,EACtD,OAAQA,GACN,cAAcC,EAASD,EAAM,KAAK,QAAQ,KAAK,YAAY,EAAG,GAAI,GACtE,EACA,GAAGR,CACL,EACC,GAAGO,EAEH,UAAAN,EACCJ,EAACH,EAAA,CACC,UAAU,MACV,IAAI,gBACJ,IAAKO,EACL,GAAI,CAAE,MAAO,EAAG,SAAU,IAAK,GAAGG,GAAW,GAAI,EACnD,EAEAP,EAACa,EAAA,EAAgB,EAGlBJ,GACCT,EAACD,EAAA,CACC,QAAQ,KACR,UAAU,OACV,GAAI,CACF,GAAI,EACJ,UAAW,SACX,GAAGQ,GAAW,MACd,MAAO,eACT,EAEC,SAAAE,EACH,EAGDD,GACCR,EAACD,EAAA,CACC,QAAQ,UACR,GAAI,CACF,GAAI,EACJ,UAAW,SACX,MAAO,gBACP,GAAGQ,GAAW,WAChB,EAEC,SAAAC,EACH,EAGDH,GAAUA,GACb,EAIGQ,EAAQX","sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\
|
|
1
|
+
{"version":3,"sources":["../src/components/EmptyContent/index.tsx"],"names":["Box","Stack","Typography","jsx","jsxs","EmptyContent","sx","imgUrl","action","filled","slotProps","description","title","other","theme","varAlpha","EmptyContent_default"],"mappings":"gFAAA,OAAOA,MAAS,oBAChB,OAAOC,MAAW,sBAClB,OAAOC,MAAgB,2BA2BnB,OAmBI,OAAAC,EAnBJ,QAAAC,MAAA,oBApBA,QAAQ,IAAI,WAAa,eAE3B,QAAQ,KACN;AAAA;AAAA,iGAGF,EAGF,IAAMC,EAAe,CAAC,CACpB,GAAAC,EACA,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,YAAAC,EACA,MAAAC,EAAQ,UACR,GAAGC,CACL,IAEIT,EAACH,EAAA,CACC,SAAU,EACV,WAAW,SACX,eAAe,SACf,GAAI,CACF,GAAI,EACJ,OAAQ,EACR,GAAIQ,GAAU,CACZ,aAAc,EACd,QAASK,GACPC,EAASD,EAAM,KAAK,QAAQ,KAAK,YAAY,EAAG,GAAI,EACtD,OAAQA,GACN,cAAcC,EAASD,EAAM,KAAK,QAAQ,KAAK,YAAY,EAAG,GAAI,GACtE,EACA,GAAGR,CACL,EACC,GAAGO,EAEH,UAAAN,EACCJ,EAACH,EAAA,CACC,UAAU,MACV,IAAI,gBACJ,IAAKO,EACL,GAAI,CAAE,MAAO,EAAG,SAAU,IAAK,GAAGG,GAAW,GAAI,EACnD,EAEAP,EAACa,EAAA,EAAgB,EAGlBJ,GACCT,EAACD,EAAA,CACC,QAAQ,KACR,UAAU,OACV,GAAI,CACF,GAAI,EACJ,UAAW,SACX,GAAGQ,GAAW,MACd,MAAO,eACT,EAEC,SAAAE,EACH,EAGDD,GACCR,EAACD,EAAA,CACC,QAAQ,UACR,GAAI,CACF,GAAI,EACJ,UAAW,SACX,MAAO,gBACP,GAAGQ,GAAW,WAChB,EAEC,SAAAC,EACH,EAGDH,GAAUA,GACb,EAIGQ,EAAQX","sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { varAlpha } from 'theme/styles';\n\nimport EmptyContentSVG from 'assets/illustrations/EmptyContent';\n\nimport { EmptyContentProps } from './props';\n\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '⚠️ DEPRECATED: EmptyContent está depreciado. Use StateDisplay do @zydon/common em seu lugar.\\n' +\n 'Migração: import StateDisplay from \"@zydon/common/components/StateDisplay\";\\n' +\n 'O StateDisplay oferece melhor flexibilidade para empty states, success screens e outros estados.',\n );\n}\n\nconst EmptyContent = ({\n sx,\n imgUrl,\n action,\n filled,\n slotProps,\n description,\n title = 'No data',\n ...other\n}: EmptyContentProps) => {\n return (\n <Stack\n flexGrow={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n sx={{\n px: 3,\n height: 1,\n ...(filled && {\n borderRadius: 2,\n bgcolor: theme =>\n varAlpha(theme.vars.palette.grey['500Channel'], 0.04),\n border: theme =>\n `dashed 1px ${varAlpha(theme.vars.palette.grey['500Channel'], 0.08)}`,\n }),\n ...sx,\n }}\n {...other}\n >\n {imgUrl ? (\n <Box\n component=\"img\"\n alt=\"empty content\"\n src={imgUrl}\n sx={{ width: 1, maxWidth: 160, ...slotProps?.img }}\n />\n ) : (\n <EmptyContentSVG />\n )}\n\n {title && (\n <Typography\n variant=\"h6\"\n component=\"span\"\n sx={{\n mt: 1,\n textAlign: 'center',\n ...slotProps?.title,\n color: 'text.disabled',\n }}\n >\n {title}\n </Typography>\n )}\n\n {description && (\n <Typography\n variant=\"caption\"\n sx={{\n mt: 1,\n textAlign: 'center',\n color: 'text.disabled',\n ...slotProps?.description,\n }}\n >\n {description}\n </Typography>\n )}\n\n {action && action}\n </Stack>\n );\n};\n\nexport default EmptyContent;\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-FBVAHVU3.js';
|
|
2
2
|
import c from '@mui/lab/LoadingButton';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var i=({actionType:n,children:E,...r})=>{let A={SAVE:"SAVE_MARK",NEW:"SIMPLE_ADD",CREATE:"SAVE_MARK",SETTINGS:"SETTINGS",EDIT:"SAVE_MARK",DELETE:"DELETE_MARK_BUTTON_02",VIEW:"SHARE_BUTTON_MARK",CANCEL:"CANCEL_CIRCLE",CONFIRM:"SIMPLE_CHECK"}[n];return jsx(c,{startIcon:jsx(a,{icon:A}),variant:"contained",color:"primary",...r,children:E})},C=i;
|
|
6
6
|
|
|
7
7
|
export { C as a };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-N2UR3W55.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a } from './chunk-6U5LS7MP.js';
|
|
2
|
-
import { a as a$1 } from './chunk-
|
|
2
|
+
import { a as a$1 } from './chunk-LZQ7OFKO.js';
|
|
3
3
|
import { a as a$2 } from './chunk-RBTYTONM.js';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { GRID_CHECKBOX_SELECTION_COL_DEF, DataGridPremium, GridToolbarContainer, GridToolbarColumnsButton, GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExport } from '@mui/x-data-grid-premium';
|
|
@@ -9,4 +9,4 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var H=({showToolbar:i,disableExport:r,setFilterButtonEl:l,toolbarContent:n})=>{if(i)return jsxs(GridToolbarContainer,{children:[jsx(GridToolbarColumnsButton,{slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarFilterButton,{ref:l,slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarDensitySelector,{slotProps:{button:{color:"inherit"}}}),!r&&jsx(GridToolbarExport,{slotProps:{button:{color:"inherit"}}}),jsx(x,{sx:{flexGrow:1}}),n]})},m=H;var _=({columns:i,rows:r=[],loading:l,fetching:n,hideFooter:p,sx:u,showToolbar:d,disableExport:b,columnHeaderHeight:f=56,rowHeight:h=76,rowSpacingType:C="margin",getRowSpacing:G=()=>({top:0,bottom:0}),autoHeight:c=!1,toolbarContent:P,slots:g,...T})=>{let[E,S]=useState(null),w=[{...GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...i];return jsxs(Fragment,{children:[n&&jsx(a,{sx:{zIndex:1}}),jsx(DataGridPremium,{columns:w,rows:r,loading:l,autoHeight:c,hideFooter:r.length===0?!0:p,rowHeight:h,columnHeaderHeight:f,getRowSpacing:G,rowSpacingType:C,slots:{toolbar:m,noRowsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),noResultsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),loadingOverlay:a$2,...g},slotProps:{panel:{anchorEl:E},toolbar:{setFilterButtonEl:S,showQuickFilter:!0,disableExport:b,showToolbar:d,toolbarContent:P}},sx:u,...T})]})},Z=_;
|
|
10
10
|
|
|
11
11
|
export { Z as a };
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-NMGWHSNZ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from './chunk-373WGZZL.js';
|
|
2
2
|
import { c, b as b$1 } from './chunk-BX2DSNRV.js';
|
|
3
3
|
import { a as a$1, e } from './chunk-X4F3O7PX.js';
|
|
4
|
-
import { a as a$3, b } from './chunk-
|
|
4
|
+
import { a as a$3, b } from './chunk-Q2AVS24Z.js';
|
|
5
5
|
import { p, r, a as a$2 } from './chunk-YPL4KIKN.js';
|
|
6
6
|
import { a as a$5 } from './chunk-WUFEPE2G.js';
|
|
7
7
|
import { d, a as a$4 } from './chunk-GLRLKFPS.js';
|
|
@@ -14,4 +14,4 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
14
14
|
var W=t=>({lighter:lighten(t,.815),light:lighten(t,.225),main:t,dark:darken(t,.15),darker:darken(t,.35),contrastText:"#000"});function x(t,o,r$1="app"){let e$1=W(o.primaryColor),m=F(p);a(m,"dark.palette.primary",e$1),a(m,"light.palette.primary",e$1);let a$4={mode:o.colorScheme,colorSchemes:m,shadows:a$1(o.colorScheme),customShadows:r(o.colorScheme,e$1.main),shape:{borderRadius:8},components:a$2,typography:{...e,fontFamily:d(o.fontFamily)},cssVarPrefix:r$1,shouldSkipGeneratingVar:I},s=a$3(a$4,o);return experimental_extendTheme(s,t,b(o))}function I(t,o){let r=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography","colorSchemes"],e={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(t[0]==="palette"){let a=t[1],s=e[a]||e.global;return t.some(i=>s?.includes(i))}return t.some(a=>r?.includes(a))}var $=({children:t,primaryColor:o="#4E5BEC",cssVarPrefix:r="app"})=>{let{settings:e}=b$1();useEffect(()=>{localStorage.setItem(`${e.storageKey}`,e.colorScheme),localStorage.setItem(`${e.storageKey}-light`,"light"),localStorage.setItem(`${e.storageKey}-dark`,"dark");},[e.storageKey,e.colorScheme]);let m=useMemo(()=>{let s=x(a$5[1].systemValue,{primaryColor:o,colorScheme:e.colorScheme,contrast:e.contrast,navLayout:e.navLayout,navColor:e.navColor,compactLayout:e.compactLayout,fontFamily:e.fontFamily,storageKey:e.storageKey},r);return s.palette=s.colorSchemes?.[e.colorScheme]?.palette,s},[e,o,r]),a=useMemo(()=>({theme:m,mode:e.colorScheme,defaultMode:e.colorScheme,defaultColorScheme:e.colorScheme,modeStorageKey:e.storageKey,colorSchemeStorageKey:e.storageKey,attribute:a$4.ATTRIBUTE}),[m,e.colorScheme,e.storageKey]);return jsxs(Experimental_CssVarsProvider,{...a,children:[jsx(M,{enableColorScheme:!0}),jsx(B,{children:t})]})},B=({children:t})=>{let{settings:o,updateSettings:r}=b$1(),{mode:e,setMode:m}=useColorScheme();return useEffect(()=>{let a=o.colorScheme;document?.documentElement.setAttribute(a$4.ATTRIBUTE,a),m(a);},[o.colorScheme,m]),useEffect(()=>{e!==o.colorScheme&&r({colorScheme:e==="system"?o.colorScheme:e});},[e,o.colorScheme,r]),t},w=({children:t,cssVarPrefix:o,primaryColor:r="#4E5BEC",fontFamily:e="Public Sans",compactLayout:m=!0,contrast:a="default",navColor:s="integrate",navLayout:i="vertical",colorScheme:A="light"})=>{let k=`${o?`${o}-`:""}${a$4.STORAGE_KEY}`;return jsx(c,{primaryColor:r,fontFamily:e,compactLayout:m,contrast:a,navColor:s,navLayout:i,colorScheme:A,cssVarPrefix:o,storageKey:k,children:jsx($,{primaryColor:r,cssVarPrefix:o,children:t})})};var te=w;
|
|
15
15
|
|
|
16
16
|
export { x as a, te as b };
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-NWT5TUJO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme/theme-provider.tsx","../src/theme/create-theme.ts"],"names":["useEffect","useMemo","CssBaseline","CssVarsProvider","useColorScheme","darken","extendTheme","lighten","cloneDeep","buildPrimaryColors","color","createTheme","localeComponents","settings","cssVarPrefix","primaryColors","localColorSchemes","colorSchemes","setNestedProperty","initialTheme","shadows","customShadows","components","typography","setFont","shouldSkipGeneratingVar","updateTheme","updateCoreWithSettings","updateComponentsWithSettings","keys","_","skipGlobalKeys","skipPaletteKeys","paletteType","skipKeys","key","jsx","jsxs","ThemeProviderCore","children","primaryColor","useSettingsContext","theme","baseTheme","allLangs","cssVarsConfig","THEME_CONFIG","ModeWrapper","updateSettings","mode","setMode","colorScheme","ThemeProvider","fontFamily","compactLayout","contrast","navColor","navLayout","storageKey","sett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EACnB,UAAAT,EAAClC,EAAA,CAAY,kBAAiB,GAAC,EAC/BkC,EAACW,EAAA,CAAa,SAAAR,EAAS,GACzB,CAEJ,EAEMQ,EAAc,CAAC,CAAE,SAAAR,CAAS,IAAyB,CACvD,GAAM,CAAE,SAAA1B,EAAU,eAAAmC,CAAe,EAAIP,EAAmB,EAClD,CAAE,KAAAQ,EAAM,QAAAC,CAAQ,EAAI9C,EAAe,EAEzC,OAAAJ,EAAU,IAAM,CACd,IAAMmD,EAActC,EAAS,YAC7B,UAAU,gBAAgB,aAAaiC,EAAa,UAAWK,CAAW,EAC1ED,EAAQC,CAAW,CACrB,EAAG,CAACtC,EAAS,YAAaqC,CAAO,CAAC,EAElClD,EAAU,IAAM,CACViD,IAASpC,EAAS,aACtBmC,EAAe,CACb,YAAaC,IAAS,SAAWpC,EAAS,YAAcoC,CAC1D,CAAC,CACH,EAAG,CAACA,EAAMpC,EAAS,YAAamC,CAAc,CAAC,EAExCT,CACT,EAEMa,EAAgB,CAAC,CACrB,SAAAb,EACA,aAAAzB,EACA,aAAA0B,EAAe,UACf,WAAAa,EAAa,cACb,cAAAC,EAAgB,GAChB,SAAAC,EAAW,UACX,SAAAC,EAAW,YACX,UAAAC,EAAY,WACZ,YAAAN,EAAc,OAChB,IAA0B,CACxB,IAAMO,EAAa,GAAG5C,EAAe,GAAGA,KAAkB,KAAKgC,EAAa,cAE5E,OACEV,EAACuB,EAAA,CACC,aAAcnB,EACd,WAAYa,EACZ,cAAeC,EACf,SAAUC,EACV,SAAUC,EACV,UAAWC,EACX,YAAaN,EACb,aAAcrC,EACd,WAAY4C,EAEZ,SAAAtB,EAACE,EAAA,CACC,aAAcE,EACd,aAAc1B,EAEb,SAAAyB,EACH,EACF,CAEJ,EAIA,IAAOqB,GAAQR","sourcesContent":["import { PropsWithChildren, useEffect, useMemo } from 'react';\nimport type {} from '@mui/lab/themeAugmentation';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport {\n Experimental_CssVarsProvider as CssVarsProvider,\n useColorScheme,\n} from '@mui/material/styles';\nimport type {} from '@mui/material/themeCssVarsAugmentation';\nimport type {} from '@mui/x-data-grid/themeAugmentation';\nimport type {} from '@mui/x-date-pickers-pro/themeAugmentation';\nimport { allLangs } from 'locales/all-langs';\n\nimport { createTheme } from './create-theme';\nimport { ThemeProviderProps } from './props';\nimport { THEME_CONFIG } from './scheme-config';\nimport SettingsProvider from './settings-provider';\nimport { useSettingsContext } from './settings-provider';\n\nconst ThemeProviderCore = ({\n children,\n primaryColor = '#4E5BEC',\n cssVarPrefix = 'app',\n}: PropsWithChildren<ThemeProviderProps>) => {\n const { settings } = useSettingsContext();\n\n useEffect(() => {\n localStorage.setItem(`${settings.storageKey}`, settings.colorScheme);\n localStorage.setItem(`${settings.storageKey}-light`, 'light');\n localStorage.setItem(`${settings.storageKey}-dark`, 'dark');\n }, [settings.storageKey, settings.colorScheme]);\n\n const theme = useMemo(() => {\n const baseTheme = createTheme(\n allLangs[1].systemValue,\n {\n primaryColor,\n colorScheme: settings.colorScheme,\n contrast: settings.contrast,\n navLayout: settings.navLayout,\n navColor: settings.navColor,\n compactLayout: settings.compactLayout,\n fontFamily: settings.fontFamily,\n storageKey: settings.storageKey,\n },\n cssVarPrefix,\n );\n\n baseTheme.palette = baseTheme.colorSchemes?.[settings.colorScheme]?.palette;\n\n return baseTheme;\n }, [settings, primaryColor, cssVarPrefix]);\n\n const cssVarsConfig = useMemo(() => {\n const config = {\n theme,\n mode: settings.colorScheme,\n defaultMode: settings.colorScheme,\n defaultColorScheme: settings.colorScheme,\n modeStorageKey: settings.storageKey,\n colorSchemeStorageKey: settings.storageKey,\n attribute: THEME_CONFIG.ATTRIBUTE,\n };\n\n return config;\n }, [theme, settings.colorScheme, settings.storageKey]);\n\n return (\n <CssVarsProvider {...cssVarsConfig}>\n <CssBaseline enableColorScheme />\n <ModeWrapper>{children}</ModeWrapper>\n </CssVarsProvider>\n );\n};\n\nconst ModeWrapper = ({ children }: PropsWithChildren) => {\n const { settings, updateSettings } = useSettingsContext();\n const { mode, setMode } = useColorScheme();\n\n useEffect(() => {\n const colorScheme = settings.colorScheme;\n document?.documentElement.setAttribute(THEME_CONFIG.ATTRIBUTE, colorScheme);\n setMode(colorScheme);\n }, [settings.colorScheme, setMode]);\n\n useEffect(() => {\n if (mode === settings.colorScheme) return;\n updateSettings({\n colorScheme: mode === 'system' ? settings.colorScheme : mode,\n });\n }, [mode, settings.colorScheme, updateSettings]);\n\n return children;\n};\n\nconst ThemeProvider = ({\n children,\n cssVarPrefix,\n primaryColor = '#4E5BEC',\n fontFamily = 'Public Sans',\n compactLayout = true,\n contrast = 'default',\n navColor = 'integrate',\n navLayout = 'vertical',\n colorScheme = 'light',\n}: ThemeProviderProps) => {\n const storageKey = `${cssVarPrefix ? `${cssVarPrefix}-` : ''}${THEME_CONFIG.STORAGE_KEY}`;\n\n return (\n <SettingsProvider\n primaryColor={primaryColor}\n fontFamily={fontFamily}\n compactLayout={compactLayout}\n contrast={contrast}\n navColor={navColor}\n navLayout={navLayout}\n colorScheme={colorScheme}\n cssVarPrefix={cssVarPrefix}\n storageKey={storageKey}\n >\n <ThemeProviderCore\n primaryColor={primaryColor}\n cssVarPrefix={cssVarPrefix}\n >\n {children}\n </ThemeProviderCore>\n </SettingsProvider>\n );\n};\n\nexport { THEME_CONFIG };\nexport { useSettingsContext } from './settings-provider';\nexport default ThemeProvider;\n","import type { Theme } from '@mui/material/styles';\nimport {\n darken,\n experimental_extendTheme as extendTheme,\n lighten,\n} from '@mui/material/styles';\nimport cloneDeep from 'lodash/cloneDeep';\n\nimport { SettingsState } from 'types/settings';\nimport { setNestedProperty } from 'utils/object';\n\nimport { setFont } from './styles/utils';\nimport {\n updateComponentsWithSettings,\n updateCoreWithSettings,\n} from './with-settings/update-theme';\nimport {\n colorSchemes,\n components,\n customShadows,\n shadows,\n typography,\n} from './core';\nimport type { ThemeLocaleComponents } from './types';\n\nconst buildPrimaryColors = (color: string) => ({\n lighter: lighten(color, 0.815),\n light: lighten(color, 0.225),\n main: color,\n dark: darken(color, 0.15),\n darker: darken(color, 0.35),\n contrastText: '#000',\n});\n\nexport function createTheme(\n localeComponents: ThemeLocaleComponents,\n settings: SettingsState,\n cssVarPrefix = 'app',\n): Theme {\n const primaryColors = buildPrimaryColors(settings.primaryColor);\n\n const localColorSchemes = cloneDeep(colorSchemes);\n setNestedProperty(localColorSchemes, 'dark.palette.primary', primaryColors);\n setNestedProperty(localColorSchemes, 'light.palette.primary', primaryColors);\n\n const initialTheme = {\n mode: settings.colorScheme,\n colorSchemes: localColorSchemes,\n shadows: shadows(settings.colorScheme),\n customShadows: customShadows(settings.colorScheme, primaryColors.main),\n shape: { borderRadius: 8 },\n components,\n typography: {\n ...typography,\n fontFamily: setFont(settings.fontFamily),\n },\n cssVarPrefix,\n shouldSkipGeneratingVar,\n };\n\n const updateTheme = updateCoreWithSettings(initialTheme, settings);\n\n const theme = extendTheme(\n updateTheme,\n localeComponents,\n updateComponentsWithSettings(settings),\n );\n\n return theme;\n}\n\n// ----------------------------------------------------------------------\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction shouldSkipGeneratingVar(keys: string[], _: string | number): boolean {\n const skipGlobalKeys = [\n 'mixins',\n 'overlays',\n 'direction',\n 'breakpoints',\n 'cssVarPrefix',\n 'unstable_sxConfig',\n 'typography',\n 'colorSchemes',\n ];\n\n const skipPaletteKeys: {\n [key: string]: string[];\n } = {\n global: ['tonalOffset', 'dividerChannel', 'contrastThreshold'],\n grey: ['A100', 'A200', 'A400', 'A700'],\n text: ['icon'],\n };\n\n const isPaletteKey = keys[0] === 'palette';\n\n if (isPaletteKey) {\n const paletteType = keys[1];\n const skipKeys = skipPaletteKeys[paletteType] || skipPaletteKeys.global;\n\n return keys.some(key => skipKeys?.includes(key));\n }\n\n return keys.some(key => skipGlobalKeys?.includes(key));\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-FBVAHVU3.js';
|
|
2
2
|
import p from '@mui/material/Button';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var e=({link:o,...n})=>jsx(p,{...n,startIcon:jsx(a$1,{icon:"HELP_CIRCLE"}),variant:"outlined",color:"inherit",...o&&{href:o,target:"_blank"},children:"Ajuda"}),a=e;
|
|
6
6
|
|
|
7
7
|
export { a };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-PODYWSY7.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as a$1 } from './chunk-KGLU4CR2.js';
|
|
2
|
-
import { a } from './chunk-
|
|
2
|
+
import { a } from './chunk-KZFKHQ5P.js';
|
|
3
3
|
import { b } from './chunk-RPO7AI5K.js';
|
|
4
4
|
import P from '@mui/lab/LoadingButton';
|
|
5
5
|
import k from '@mui/material/Button';
|
|
@@ -13,4 +13,4 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
13
13
|
var w=({imageSrc:c,aspectRatio:p,cropShape:g,cropSize:u,onInitialized:h})=>{let[i,n]=useState(1),[t,m]=useState({x:0,y:0}),[y,l]=useState(0);return jsxs(r,{gap:2,children:[jsx(a$1,{imageSrc:c,aspectRatio:p,cropShape:g,zoom:i,crop:t,onZoomChange:n,onCropChange:m,onInitialized:h,rotation:y,onRotationChange:l,cropSize:u}),jsxs(r,{gap:1.5,children:[jsxs(r,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(d,{component:"label",htmlFor:"zoom-slider",width:85,color:"textSecondary",variant:"body2",children:"Zoom"}),jsx(I,{id:"zoom-slider",value:i,onChange:(e,C)=>n(Array.isArray(C)?C[0]:C),min:.1,max:4,size:"medium",step:.0125}),jsx(S,{size:"small",id:"zoom-slider",type:"number",value:i,onChange:e=>n(Number(e.target.value)),inputProps:{step:.0125},sx:{width:130}})]}),jsxs(r,{direction:"row",gap:4,justifyContent:"flex-start",children:[jsx(d,{component:"label",htmlFor:"rotation-slider",width:"45px",color:"textSecondary",variant:"body2",lineHeight:"39px",children:"Position"}),jsxs(r,{direction:"row",alignItems:"center",gap:3,children:[jsx(d,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"Y"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.y,onChange:e=>m({...t,y:Number(e.target.value)}),sx:{width:90}})]}),jsxs(r,{gap:3,direction:"row",alignItems:"center",children:[jsx(d,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"X"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.x,onChange:e=>m({...t,x:Number(e.target.value)}),sx:{width:90}})]})]})]})]})},v=w;var M=({open:c,onClose:p,label:g,onSave:u,imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m,loading:y})=>{let l=b("down","sm");return jsx(a,{open:c,onClose:p,dialogTitle:g,actions:jsxs(Fragment,{children:[jsx(k,{variant:"outlined",size:"medium",onClick:p,color:"inherit",children:"Cancelar"}),jsx(P,{variant:"contained",size:"medium",onClick:u,loading:y,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",fullScreen:l,PaperProps:{sx:l?{borderRadius:0,m:0}:void 0},dialogContentProps:{sx:l?{p:0}:void 0},children:jsx(v,{imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m})})},q=M;
|
|
14
14
|
|
|
15
15
|
export { q as a };
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-PWR4GBUH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-LNESYSHP.js';
|
|
2
2
|
import { r, b, a as a$2 } from './chunk-YPL4KIKN.js';
|
|
3
3
|
import { h as h$1, j } from './chunk-GLRLKFPS.js';
|
|
4
4
|
import a$1 from 'color';
|
|
@@ -6,4 +6,4 @@ import a$1 from 'color';
|
|
|
6
6
|
function P(t,e){let{colorSchemes:r$1,customShadows:o}=t;return {...t,colorSchemes:{...r$1,light:{palette:{...r$1?.light?.palette,primary:d(e.primaryColor),background:{...r$1?.light?.palette?.background,default:h(e.contrast),defaultChannel:h$1(h(e.contrast))}}},dark:{palette:{...r$1?.dark?.palette,primary:d(e.primaryColor)}}},customShadows:{...o,primary:r("light",e.primaryColor).primary}}}function T(t){let e={};if(t.contrast==="hight"){let r={styleOverrides:{root:({theme:o,ownerState:c})=>{let i={};return typeof a$2?.MuiCard?.styleOverrides?.root=="function"&&(i=a$2.MuiCard.styleOverrides.root({ownerState:c,theme:o})??{}),{...i,boxShadow:o.customShadows.z1}}}};e.MuiCard=r;}return {components:e}}function d(t){let e=f(t);return j(e)}function h(t){return t==="default"?"#FFFFFF":b[200]}function f(t){let e=a(t);return {lighter:a$1(t).lighten(.55).hex(),light:a$1(t).lighten(.225).hex(),main:t,dark:a$1(t).darken(.15).hex(),darker:a$1(t).darken(.35).hex(),contrastText:e<=.55?"#ffffff":"#3E3E3E"}}
|
|
7
7
|
|
|
8
8
|
export { P as a, T as b, f as c };
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-Q2AVS24Z.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a } from './chunk-VR3K2Y2C.js';
|
|
2
|
+
import { b } from './chunk-RPO7AI5K.js';
|
|
3
|
+
import $, { memo, useMemo, forwardRef, useCallback, useState, useDeferredValue, useRef, useEffect } from 'react';
|
|
4
|
+
import Ue, { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
5
|
+
import Se from '@mui/material/CircularProgress';
|
|
6
|
+
import Ce from '@mui/material/TextField';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
import { VariableSizeList } from 'react-window';
|
|
9
|
+
import He from '@mui/material/ListSubheader';
|
|
10
|
+
import te from '@mui/material/Typography';
|
|
11
|
+
import k from '@mui/material/Stack';
|
|
12
|
+
import Ee from '@mui/material/Popper';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
|
|
15
|
+
var X=memo(({params:e,name:r,placeholder:o,error:t,helperText:n,label:i,required:a,loading:p,tabIndex:m})=>jsx(Ce,{...e,name:r,placeholder:o,fullWidth:!0,error:!!t,helperText:n,label:i,required:a,InputProps:{...e.InputProps,endAdornment:jsxs(Fragment,{children:[p?jsx(Se,{color:"primary",size:20}):null,e.InputProps.endAdornment]})},inputProps:{...e.inputProps,name:r,tabIndex:m}}));X.displayName="AutocompleteDetailedInput";var q=X;var J=styled(Ee)({[`& .${autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}}),K=styled(k)(({theme:e})=>({flex:1,width:"100%",gap:6,[e.breakpoints.down("md")]:{flexDirection:"column"},[e.breakpoints.up("md")]:{flexDirection:"row"}})),M=styled(k)(({theme:e})=>({flex:1,maxWidth:"100%",gap:6,[e.breakpoints.up("md")]:{flex:"1 1 calc(50% - 8px)",width:"calc(50% - 8px)",minWidth:"calc(50% - 8px)",maxWidth:"calc(50% - 8px)"}})),Q=styled(k)(({theme:e})=>({position:"relative",alignItems:"center",justifyContent:"center",width:68,height:68,borderRadius:8,overflow:"hidden",img:{position:"absolute",width:"100%",height:"100%",objectFit:"cover"},[e.breakpoints.down("sm")]:{display:"none"}})),Y=styled("hr")(({theme:e})=>({borderStyle:"dashed",position:"absolute",bottom:0,width:"100%",margin:0,borderColor:e.palette.divider,borderWidth:"0 0 thin"}));var ke={width:68,height:68,borderRadius:1},re=memo(({option:e})=>{let r=useMemo(()=>Object.keys(e).filter(t=>t.startsWith("field")).map((t,n)=>{let i=e[t];if(i&&typeof i=="object"){let a="label"in i?i.label:null,p="value"in i?i.value:null;return jsxs(te,{component:"span",variant:"body2",color:"textPrimary",noWrap:!0,children:[a,": ",p]},`${t}:${n}`)}}),[e]),o=useMemo(()=>e.image?jsx("img",{alt:"Imagem",src:e.image}):jsx(a,{alt:e.label||e.value.toString(),name:e.label||e.value.toString(),sx:ke}),[e]);return jsxs(Fragment,{children:[jsxs(k,{direction:"row",gap:2,margin:2,children:[jsx(Q,{children:o}),jsxs(k,{flex:1,overflow:"hidden",children:[jsxs(te,{variant:"subtitle2",color:"textPrimary",noWrap:!0,flex:1,children:[e.value," - ",e.label]}),r.length>0&&jsxs(K,{width:1,children:[jsxs(M,{children:[r[0]?r[0]:void 0,r[1]?r[1]:void 0]}),(r[2]||r[3])&&jsxs(M,{children:[r[2]?r[2]:void 0,r[3]?r[3]:void 0]})]})]})]}),jsx(Y,{className:"border"})]})});re.displayName="ListItem";var x=re;var H=8,oe=memo(e=>{let{data:r,index:o,style:t}=e,n=r[o],i={...t,top:t.top+H,paddingTop:8,display:"block"};if(Object.prototype.hasOwnProperty.call(n,"group")){let m=n;return jsx(He,{component:"div",style:i,children:m.group},`list-box-item-group-${m.group}`)}let a=n,p=a.props?.children?.props;return jsx(te,{component:"li",...a.props,noWrap:!0,style:i,children:jsx(x,{...p})})});oe.displayName="ListboxRow";var ne=oe;var se=$.createContext({}),pe=forwardRef((e,r)=>{let o=$.useContext(se);return jsx("div",{ref:r,...e,...o})});pe.displayName="OuterElementType";var We=e=>{let r=$.useRef(null);return useEffect(()=>{r.current!=null&&r.current.resetAfterIndex(0,!0);},[e]),r},Ve=forwardRef(function(r,o){let{children:t,"data-item-height":n,...i}=r,a=useMemo(()=>{let l=[];return t.forEach(c=>{l.push(c),Object.prototype.hasOwnProperty.call(c,"children")&&Array.isArray(c.children)&&l.push(...c.children);}),l},[t]),p=a.length,m=n>112?n:112,f=useCallback(l=>Object.prototype.hasOwnProperty.call(l,"group")?48:m,[m]),g=useMemo(()=>p>8?8*m:a.map(f).reduce((l,c)=>l+c,0),[p,m,a,f]),v=We(p),S=useCallback(l=>f(a[l]),[a,f]);return jsx("div",{ref:o,children:jsx(se.Provider,{value:i,children:jsx(VariableSizeList,{itemData:a,height:g+2*H,width:"100%",ref:v,outerElementType:pe,innerElementType:"ul",itemSize:S,overscanCount:5,itemCount:p,children:ne})})})}),me=Ve;var Xe=e=>e&&typeof e=="object"?e.value.toString():e.toString(),qe=e=>e,Je=(e,r)=>{let o=r.inputValue.toLocaleUpperCase();return e.filter(t=>`${t.field1?.value} ${t.field1?.label} ${t.field2?.label} ${t.field2?.value} ${t.field3?.label} ${t.field3?.value} ${t.field4?.label} ${t.field4?.value} ${t.field5?.label} ${t.field5?.value} ${t.label}${t.value}`.toLocaleUpperCase().includes(o))},Ke=({key:e,...r},o)=>jsx("li",{...r,style:{display:"block"},children:jsx(x,{option:o})},e),ce=memo(forwardRef(({name:e,label:r,value:o,options:t=[],loading:n,noOptionsText:i="Nenhum resultado encontrado.",loadingText:a="Carregando op\xE7\xF5es...",error:p,helperText:m,placeholder:f,onChange:g,groupBy:v,disabled:S,multiple:l,required:c,renderOption:de,tabIndex:N,onSearch:C,onInputChange:O,onBlur:T,...fe},be)=>{let[z,w]=useState(""),[W,E]=useState(null),D=useDeferredValue(z),y=useRef(!1),V=b("down","md"),ge=useMemo(()=>l?(Array.isArray(o)?o:[]).reduce((u,Le)=>{let j=t.find(Ie=>Ie.value.toString()===Le.toString());return j?[...u,j]:[...u]},[]):t.find(s=>s.value.toString()===o?.toString())||null,[t,o,l]),B=useMemo(()=>V&&t[0]?Object.keys(t[0]).length*24:void 0,[V,t]),he=useCallback((b,s,u)=>{if(O&&O(b,s,u),u==="input"){y.current=!0,E(u),C&&C(s),w(s);return}if(u==="reset"){if(y.current)return;E(u),w(s);return}u==="clear"&&(y.current=!1,E(u),w(""));},[O,C]),ye=useCallback((b,s)=>{if(y.current=!1,!s){g(l?[]:null);return}if(Array.isArray(s)){g(s.map(Xe));return}g(typeof s=="string"?s.toString():s.value.toString());},[g,l]),Re=useMemo(()=>({"data-item-height":B}),[B]),xe=useCallback(b=>jsx(q,{params:b,name:e,placeholder:f,error:p,helperText:m,label:r,required:c,loading:n,tabIndex:N}),[e,f,p,m,r,c,n,N]),Pe=useCallback(b=>{T&&T(b);},[T]),Ae=useMemo(()=>!D||W==="reset"?t:Je(t,{inputValue:D}),[t,D,W]);return jsx(Ue,{ref:be,value:ge,inputValue:z,onInputChange:he,options:Ae,loading:n,noOptionsText:i,loadingText:a,disabled:n||S,disableListWrap:!0,PopperComponent:J,ListboxProps:Re,ListboxComponent:de?void 0:me,onChange:ye,renderOption:Ke,renderGroup:qe,groupBy:v,multiple:l,renderInput:xe,onBlur:Pe,...fe})}));ce.displayName="Autocomplete";var $t=ce;
|
|
16
|
+
|
|
17
|
+
export { $t as a };
|
|
18
|
+
//# sourceMappingURL=chunk-QDYHWRND.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AutocompleteDetailed/index.tsx","../src/components/AutocompleteDetailed/AutocompleteDetailedInput.tsx","../src/components/AutocompleteDetailed/Listbox.tsx","../src/components/AutocompleteDetailed/ListboxRow.tsx","../src/components/AutocompleteDetailed/ListItem.tsx","../src/components/AutocompleteDetailed/styles.ts"],"names":["forwardRef","memo","useCallback","useDeferredValue","useMemo","useRef","useState","MuiAutocomplete","CircularProgress","TextField","Fragment","jsx","jsxs","AutocompleteDetailedInput","params","name","placeholder","error","helperText","label","required","loading","tabIndex","AutocompleteDetailedInput_default","React","useEffect","VariableSizeList","ListSubheader","Typography","Stack","autocompleteClasses","Popper","styled","StyledPopper","OptionBox","theme","OptionContent","ImageContainer","DividerStyled","AVATAR_SX","ListItem","option","options","key","index","data","value","image","CustomAvatar_default","ListItem_default","LISTBOX_PADDING","ListboxRow","props","style","dataSet","inlineStyle","groupItem","element","listItemProps","ListboxRow_default","OuterElementContext","OuterElementType","ref","outerProps","useResetCache","ListboxComponent","children","dataItemHeight","other","itemData","item","itemCount","itemSize","getChildSize","child","getHeight","a","b","gridRef","getItemSize","Listbox_default","getOptionValue","optionValue","renderGroup","filterOptions","opts","state","searchValue","opt","renderOptionListItem","AutocompleteDetailed","noOptionsText","loadingText","onChange","groupBy","disabled","multiple","renderOption","onSearch","onInputChange","onBlur","inputValue","setInputValue","inputReason","setInputReason","deferredInputValue","isTypingRef","mdDown","useResponsive_default","formattedValue","acc","curr","optionHeight","handleInputChange","event","eventValue","reason","handleChange","_","listboxProps","memoizedRenderInput","handleBlur","filteredOptions","AutocompleteDetailed_default"],"mappings":"gFAAA,OACE,cAAAA,GAEA,QAAAC,GAEA,eAAAC,EACA,oBAAAC,GACA,WAAAC,EACA,UAAAC,GACA,YAAAC,OACK,QACP,OAAOC,OAGA,6BCdP,OAAS,QAAAN,OAAY,QACrB,OAAOO,OAAsB,iCAC7B,OAAOC,OAAe,0BA4BZ,mBAAAC,GACa,OAAAC,EADb,QAAAC,OAAA,oBAxBV,IAAMC,EAA4BZ,GAChC,CAAC,CACC,OAAAa,EACA,KAAAC,EACA,YAAAC,EACA,MAAAC,EACA,WAAAC,EACA,MAAAC,EACA,SAAAC,EACA,QAAAC,EACA,SAAAC,CACF,IACEX,EAACF,GAAA,CACE,GAAGK,EACJ,KAAMC,EACN,YAAaC,EACb,UAAS,GACT,MAAO,CAAC,CAACC,EACT,WAAYC,EACZ,MAAOC,EACP,SAAUC,EACV,WAAY,CACV,GAAGN,EAAO,WACV,aACEF,GAAAF,GAAA,CACG,UAAAW,EAAUV,EAACH,GAAA,CAAiB,MAAM,UAAU,KAAM,GAAI,EAAK,KAC3DM,EAAO,WAAW,cACrB,CAEJ,EACA,WAAY,CACV,GAAGA,EAAO,WACV,KAAAC,EACA,SAAAO,CACF,EACF,CAEJ,EAEAT,EAA0B,YAAc,4BAExC,IAAOU,EAAQV,EC/Cf,OAAOW,GACL,cAAAxB,GAEA,eAAAE,GACA,aAAAuB,GACA,WAAArB,OACK,QACP,OAAS,oBAAAsB,OAAwB,eCPjC,OAAS,QAAAzB,OAAY,QAGrB,OAAO0B,OAAmB,8BAC1B,OAAOC,OAAgB,2BCJvB,OAAS,QAAA3B,GAAM,WAAAG,MAAe,QAC9B,OAAOyB,OAAW,sBAClB,OAAO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ent":["import {\n forwardRef,\n HTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n useDeferredValue,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport MuiAutocomplete, {\n AutocompleteRenderGroupParams,\n AutocompleteRenderInputParams,\n} from '@mui/material/Autocomplete';\n\nimport useResponsive from 'hooks/useResponsive';\nimport { Option } from 'types/option';\n\nimport AutocompleteDetailedInput from './AutocompleteDetailedInput';\nimport ListboxComponent from './Listbox';\nimport ListItem from './ListItem';\nimport { AutocompleteDetailedProps } from './props';\nimport { StyledPopper } from './styles';\n\nconst getOptionValue = (optionValue: Option | string | number): string =>\n optionValue && typeof optionValue === 'object'\n ? optionValue.value.toString()\n : optionValue.toString();\n\nconst renderGroup = (params: AutocompleteRenderGroupParams) =>\n params as unknown as ReactNode;\n\nconst filterOptions = (opts: Option[], state: { inputValue: string }) => {\n const searchValue = state.inputValue.toLocaleUpperCase();\n return opts.filter(opt => {\n const search = `${opt.field1?.value} ${opt.field1?.label} ${opt.field2?.label} ${opt.field2?.value} ${opt.field3?.label} ${opt.field3?.value} ${opt.field4?.label} ${opt.field4?.value} ${opt.field5?.label} ${opt.field5?.value} ${opt.label}${opt.value}`;\n return search.toLocaleUpperCase().includes(searchValue);\n });\n};\n\nconst renderOptionListItem = (\n { key, ...props }: React.HTMLAttributes<HTMLLIElement> & { key: string },\n option: Option,\n) => {\n return (\n <li key={key} {...props} style={{ display: 'block' }}>\n <ListItem option={option} />\n </li>\n );\n};\n\nconst AutocompleteDetailed = memo(\n forwardRef<unknown, AutocompleteDetailedProps>(\n (\n {\n name,\n label,\n value,\n options = [],\n loading,\n noOptionsText = 'Nenhum resultado encontrado.',\n loadingText = 'Carregando opções...',\n error,\n helperText,\n placeholder,\n onChange,\n groupBy,\n disabled,\n multiple,\n required,\n renderOption,\n tabIndex,\n onSearch,\n onInputChange,\n onBlur,\n ...other\n },\n ref,\n ) => {\n const [inputValue, setInputValue] = useState<string>('');\n const [inputReason, setInputReason] = useState<\n 'input' | 'reset' | 'clear' | null\n >(null);\n const deferredInputValue = useDeferredValue(inputValue);\n const isTypingRef = useRef(false);\n\n const mdDown = useResponsive('down', 'md');\n\n const formattedValue = useMemo(() => {\n if (multiple) {\n const values = Array.isArray(value) ? value : [];\n\n return values.reduce<Option[]>((acc, curr) => {\n const item = options.find(\n opt => opt.value.toString() === curr.toString(),\n );\n\n if (item) return [...acc, item];\n\n return [...acc];\n }, []);\n }\n\n const item = options.find(\n opt => opt.value.toString() === value?.toString(),\n );\n\n return item || null;\n }, [options, value, multiple]);\n\n const optionHeight = useMemo(\n () =>\n mdDown && options[0]\n ? Object.keys(options[0]).length * 24\n : undefined,\n [mdDown, options],\n );\n\n const handleInputChange = useCallback(\n (\n event: React.SyntheticEvent,\n eventValue: string,\n reason: 'input' | 'reset' | 'clear',\n ) => {\n if (onInputChange) onInputChange(event, eventValue, reason);\n\n if (reason === 'input') {\n isTypingRef.current = true;\n setInputReason(reason);\n if (onSearch) onSearch(eventValue);\n setInputValue(eventValue);\n\n return;\n }\n\n if (reason === 'reset') {\n if (isTypingRef.current) {\n return;\n }\n setInputReason(reason);\n setInputValue(eventValue);\n return;\n }\n\n if (reason === 'clear') {\n isTypingRef.current = false;\n setInputReason(reason);\n setInputValue('');\n }\n },\n [onInputChange, onSearch],\n );\n\n const handleChange = useCallback(\n (\n _: React.SyntheticEvent,\n option: Option | (string | Option)[] | string | null,\n ) => {\n isTypingRef.current = false;\n\n if (!option) {\n onChange(multiple ? [] : null);\n return;\n }\n\n if (Array.isArray(option)) {\n onChange(option.map(getOptionValue));\n return;\n }\n\n onChange(\n typeof option === 'string'\n ? option.toString()\n : option.value.toString(),\n );\n },\n [onChange, multiple],\n );\n\n const listboxProps = useMemo(\n () =>\n ({\n 'data-item-height': optionHeight,\n }) as HTMLAttributes<HTMLUListElement>,\n [optionHeight],\n );\n\n const memoizedRenderInput = useCallback(\n (params: AutocompleteRenderInputParams) => (\n <AutocompleteDetailedInput\n params={params}\n name={name}\n placeholder={placeholder}\n error={error}\n helperText={helperText}\n label={label}\n required={required}\n loading={loading}\n tabIndex={tabIndex}\n />\n ),\n [\n name,\n placeholder,\n error,\n helperText,\n label,\n required,\n loading,\n tabIndex,\n ],\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n if (onBlur) onBlur(event);\n },\n [onBlur],\n );\n\n const filteredOptions = useMemo(() => {\n if (!deferredInputValue || inputReason === 'reset') return options;\n return filterOptions(options, { inputValue: deferredInputValue });\n }, [options, deferredInputValue, inputReason]);\n\n return (\n <MuiAutocomplete\n ref={ref}\n value={formattedValue}\n inputValue={inputValue}\n onInputChange={handleInputChange}\n options={filteredOptions}\n loading={loading}\n noOptionsText={noOptionsText}\n loadingText={loadingText}\n disabled={loading || disabled}\n disableListWrap\n PopperComponent={StyledPopper}\n ListboxProps={listboxProps}\n ListboxComponent={renderOption ? undefined : ListboxComponent}\n onChange={handleChange}\n renderOption={renderOptionListItem}\n renderGroup={renderGroup}\n groupBy={groupBy}\n multiple={multiple}\n renderInput={memoizedRenderInput}\n onBlur={handleBlur}\n {...other}\n />\n );\n },\n ),\n);\n\nAutocompleteDetailed.displayName = 'Autocomplete';\n\nexport default AutocompleteDetailed;\n","import { memo } from 'react';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TextField from '@mui/material/TextField';\n\nimport { AutocompleteDetailedInputProps } from './props';\n\nconst AutocompleteDetailedInput = memo(\n ({\n params,\n name,\n placeholder,\n error,\n helperText,\n label,\n required,\n loading,\n tabIndex,\n }: AutocompleteDetailedInputProps) => (\n <TextField\n {...params}\n name={name}\n placeholder={placeholder}\n fullWidth\n error={!!error}\n helperText={helperText}\n label={label}\n required={required}\n InputProps={{\n ...params.InputProps,\n endAdornment: (\n <>\n {loading ? <CircularProgress color=\"primary\" size={20} /> : null}\n {params.InputProps.endAdornment}\n </>\n ),\n }}\n inputProps={{\n ...params.inputProps,\n name,\n tabIndex,\n }}\n />\n ),\n);\n\nAutocompleteDetailedInput.displayName = 'AutocompleteDetailedInput';\n\nexport default AutocompleteDetailedInput;\n","import React, {\n forwardRef,\n HTMLAttributes,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { VariableSizeList } from 'react-window';\nimport { AutocompleteRenderGroupParams } from '@mui/material/Autocomplete';\n\nimport ListboxRow, { LISTBOX_PADDING } from './ListboxRow';\n\nconst OuterElementContext = React.createContext({});\n\nconst OuterElementType = forwardRef<HTMLDivElement>((props, ref) => {\n const outerProps = React.useContext(OuterElementContext);\n return <div ref={ref} {...props} {...outerProps} />;\n});\n\nOuterElementType.displayName = 'OuterElementType';\n\nconst useResetCache = (data: number) => {\n const ref = React.useRef<VariableSizeList>(null);\n\n useEffect(() => {\n if (ref.current != null) {\n ref.current.resetAfterIndex(0, true);\n }\n }, [data]);\n\n return ref;\n};\n\nconst ListboxComponent = forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLElement>\n>(function ListboxComponent(props, ref) {\n const {\n children,\n // eslint-disable-next-line react/prop-types\n 'data-item-height': dataItemHeight,\n ...other\n } = props as { 'data-item-height': number } & HTMLAttributes<HTMLElement>;\n\n const itemData: (React.ReactElement | AutocompleteRenderGroupParams)[] =\n useMemo(() => {\n const data: (React.ReactElement | AutocompleteRenderGroupParams)[] = [];\n (\n children as (React.ReactElement | AutocompleteRenderGroupParams)[]\n ).forEach(item => {\n data.push(item);\n if (\n Object.prototype.hasOwnProperty.call(item, 'children') &&\n Array.isArray((item as AutocompleteRenderGroupParams).children)\n ) {\n data.push(\n ...((item as AutocompleteRenderGroupParams)\n .children as React.ReactElement[]),\n );\n }\n });\n return data;\n }, [children]);\n const itemCount = itemData.length;\n const itemSize = dataItemHeight > 112 ? dataItemHeight : 112;\n\n const getChildSize = useCallback(\n (child: React.ReactElement | AutocompleteRenderGroupParams) => {\n if (Object.prototype.hasOwnProperty.call(child, 'group')) {\n return 48;\n }\n\n return itemSize;\n },\n [itemSize],\n );\n\n const getHeight = useMemo(() => {\n if (itemCount > 8) {\n return 8 * itemSize;\n }\n return itemData.map(getChildSize).reduce((a, b) => a + b, 0);\n }, [itemCount, itemSize, itemData, getChildSize]);\n\n const gridRef = useResetCache(itemCount);\n\n const getItemSize = useCallback(\n (index: number) => {\n return getChildSize(itemData[index]);\n },\n [itemData, getChildSize],\n );\n\n return (\n <div ref={ref}>\n <OuterElementContext.Provider value={other}>\n <VariableSizeList\n itemData={itemData}\n height={getHeight + 2 * LISTBOX_PADDING}\n width=\"100%\"\n ref={gridRef}\n outerElementType={OuterElementType}\n innerElementType=\"ul\"\n itemSize={getItemSize}\n overscanCount={5}\n itemCount={itemCount}\n >\n {ListboxRow}\n </VariableSizeList>\n </OuterElementContext.Provider>\n </div>\n );\n});\n\nexport default ListboxComponent;\n","import { memo } from 'react';\nimport { ListChildComponentProps } from 'react-window';\nimport { AutocompleteRenderGroupParams } from '@mui/material/Autocomplete';\nimport ListSubheader from '@mui/material/ListSubheader';\nimport Typography from '@mui/material/Typography';\n\nimport ListItem from './ListItem';\nimport { ListItemProps } from './props';\n\nconst LISTBOX_PADDING = 8;\n\nconst ListboxRow = memo((props: ListChildComponentProps) => {\n const { data, index, style } = props;\n const dataSet = data[index] as\n | React.ReactElement\n | AutocompleteRenderGroupParams;\n\n const inlineStyle = {\n ...style,\n top: (style.top as number) + LISTBOX_PADDING,\n paddingTop: 8,\n display: 'block',\n };\n\n if (Object.prototype.hasOwnProperty.call(dataSet, 'group')) {\n const groupItem = dataSet as AutocompleteRenderGroupParams;\n return (\n <ListSubheader\n key={`list-box-item-group-${groupItem.group}`}\n component=\"div\"\n style={inlineStyle}\n >\n {groupItem.group}\n </ListSubheader>\n );\n }\n\n const element = dataSet as React.ReactElement;\n const listItemProps = element.props?.children?.props as ListItemProps;\n\n return (\n <Typography component=\"li\" {...element.props} noWrap style={inlineStyle}>\n <ListItem {...listItemProps} />\n </Typography>\n );\n});\n\nListboxRow.displayName = 'ListboxRow';\n\nexport { LISTBOX_PADDING };\nexport default ListboxRow;\n","import { memo, useMemo } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport CustomAvatar from 'components/CustomAvatar';\n\nimport { ListItemProps } from './props';\nimport {\n DividerStyled,\n ImageContainer,\n OptionBox,\n OptionContent,\n} from './styles';\n\nconst AVATAR_SX = { width: 68, height: 68, borderRadius: 1 };\n\nconst ListItem = memo(({ option }: ListItemProps) => {\n const options = useMemo(\n () =>\n Object.keys(option)\n .filter(key => key.startsWith('field'))\n .map((key, index) => {\n const data = option[key];\n\n if (data && typeof data === 'object') {\n const label = ('label' in data ? data.label : null) as string;\n const value = ('value' in data ? data.value : null) as string;\n\n return (\n <Typography\n key={`${key}:${index}`}\n component=\"span\"\n variant=\"body2\"\n color=\"textPrimary\"\n noWrap\n >\n {label}: {value}\n </Typography>\n );\n }\n }),\n [option],\n );\n\n const image = useMemo(\n () =>\n option.image ? (\n <img alt=\"Imagem\" src={option.image} />\n ) : (\n <CustomAvatar\n alt={option.label || option.value.toString()}\n name={option.label || option.value.toString()}\n sx={AVATAR_SX}\n />\n ),\n [option],\n );\n\n return (\n <>\n <Stack direction=\"row\" gap={2} margin={2}>\n <ImageContainer>{image}</ImageContainer>\n\n <Stack flex={1} overflow=\"hidden\">\n <Typography variant=\"subtitle2\" color=\"textPrimary\" noWrap flex={1}>\n {option.value} - {option.label}\n </Typography>\n\n {options.length > 0 && (\n <OptionBox width={1}>\n <OptionContent>\n {options[0] ? options[0] : undefined}\n {options[1] ? options[1] : undefined}\n </OptionContent>\n\n {(options[2] || options[3]) && (\n <OptionContent>\n {options[2] ? options[2] : undefined}\n {options[3] ? options[3] : undefined}\n </OptionContent>\n )}\n </OptionBox>\n )}\n </Stack>\n </Stack>\n\n <DividerStyled className=\"border\" />\n </>\n );\n});\n\nListItem.displayName = 'ListItem';\n\nexport default ListItem;\n","import { autocompleteClasses } from '@mui/material/Autocomplete';\nimport Popper from '@mui/material/Popper';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\n\nexport const StyledPopper = styled(Popper)({\n [`& .${autocompleteClasses.listbox}`]: {\n boxSizing: 'border-box',\n '& ul': {\n padding: 0,\n margin: 0,\n },\n },\n});\n\nexport const OptionBox = styled(Stack)(({ theme }) => ({\n flex: 1,\n width: '100%',\n gap: 6,\n\n [theme.breakpoints.down('md')]: {\n flexDirection: 'column',\n },\n\n [theme.breakpoints.up('md')]: {\n flexDirection: 'row',\n },\n}));\n\nexport const OptionContent = styled(Stack)(({ theme }) => ({\n flex: 1,\n maxWidth: '100%',\n gap: 6,\n\n [theme.breakpoints.up('md')]: {\n flex: '1 1 calc(50% - 8px)',\n width: 'calc(50% - 8px)',\n minWidth: 'calc(50% - 8px)',\n maxWidth: 'calc(50% - 8px)',\n },\n}));\n\nexport const ImageContainer = styled(Stack)(({ theme }) => ({\n position: 'relative',\n alignItems: 'center',\n justifyContent: 'center',\n width: 68,\n height: 68,\n borderRadius: 8,\n overflow: 'hidden',\n\n img: {\n position: 'absolute',\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n },\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n}));\n\nexport const DividerStyled = styled('hr')(({ theme }) => ({\n borderStyle: 'dashed',\n position: 'absolute',\n bottom: 0,\n width: '100%',\n margin: 0,\n borderColor: theme.palette.divider,\n borderWidth: '0 0 thin',\n}));\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$2 } from './chunk-
|
|
2
|
-
import { a as a$3 } from './chunk-
|
|
1
|
+
import { a as a$2 } from './chunk-JSL5OEWZ.js';
|
|
2
|
+
import { a as a$3 } from './chunk-FBVAHVU3.js';
|
|
3
3
|
import { a as a$1 } from './chunk-IAOMC4C4.js';
|
|
4
4
|
import { a } from './chunk-CFNATBO2.js';
|
|
5
5
|
import { memo } from 'react';
|
|
@@ -9,4 +9,4 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var l=({label:t="Copiar conte\xFAdo",message:c="Conte\xFAdo copiado!",toCopy:m})=>{let{copy:e}=a(),{success:s}=a$1();return jsx(a$2,{title:t,arrow:!0,children:jsx(C,{"aria-label":t,size:"small",onClick:()=>{e(m),s(c);},children:jsx(a$3,{icon:"COPY_CONTENT",color:"text.secondary",width:16})})})},I=memo(l);
|
|
10
10
|
|
|
11
11
|
export { I as a };
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-QMFFV7WM.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as a$4 } from './chunk-6ZSTKYGL.js';
|
|
2
|
-
import { a as a$1 } from './chunk-
|
|
2
|
+
import { a as a$1 } from './chunk-Y3TJIK6E.js';
|
|
3
3
|
import { a as a$3 } from './chunk-IJZCVZ32.js';
|
|
4
4
|
import { a as a$2 } from './chunk-F65ZXAGV.js';
|
|
5
|
-
import { a } from './chunk-
|
|
5
|
+
import { a } from './chunk-FBVAHVU3.js';
|
|
6
6
|
import { memo, useCallback, useState, useMemo } from 'react';
|
|
7
7
|
import J from '@mui/material/Button';
|
|
8
8
|
import Q from '@mui/material/CircularProgress';
|
|
@@ -16,4 +16,4 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
16
16
|
var P=styled(N,{shouldForwardProp:r=>r!=="active"&&r!=="disabled"})(({theme:r,active:a,disabled:i})=>({boxShadow:"none",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:a?r.palette.primary.main:r.palette.grey[300],color:r.palette.primary.main,backgroundColor:a?alpha(r.palette.primary.main,.04):"white","&:hover":{borderColor:r.palette.primary.main},...i?{opacity:.6,cursor:"default"}:{opacity:1,cursor:"pointer"}}));var L=memo(({item:r,isSelected:a$1,disabled:i,onSelectItem:n})=>{let o=useCallback(()=>{n(r);},[r,n]);return jsx(j,{item:!0,xs:4,children:jsx(P,{active:a$1,onClick:o,disabled:i,children:jsxs(d,{padding:1.5,width:"100%",children:[jsxs(d,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[jsx(h,{color:a$1?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:r.title}),a$1&&jsx(a,{icon:"CHECK_CIRCLE",width:24})]}),r.options.map(l=>jsx(h,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${l.label}: ${l.value}`},l.label))]})})},r.title)});L.displayName="CardItem";var D=L;var X=new Intl.PluralRules("pt-BR"),Y=new Map([["one","selecionado"],["other","selecionados"]]),Z=r=>{let a=X.select(r),i=Y.get(a);return `${r} ${i}`},rr=({title:r,action:a,loading:i,items:n,values:o,onChange:l,disabled:s=!1})=>{let[c,O]=useState(),C=useMemo(()=>new Set(o),[o]),y=useCallback(t=>C.has(t),[C]),$=useMemo(()=>{if(!c)return n;let t=c.toLowerCase();return n.filter(u=>u.title.toLowerCase().includes(t))},[n,c]),A=useCallback(t=>{if(s)return;let u=y(t.value),g;u?g=o.filter(M=>M!==t.value):g=[...o,t.value],l(g);},[s,y,l,o]),b=useMemo(()=>n.map(t=>t.value),[n]),B=useCallback(()=>{s||(o.length===n.length?l([]):l(b));},[s,n.length,l,o.length,b]),G=useCallback(t=>O(t),[]),K=t=>{t.key==="Enter"&&t.preventDefault();},W=useMemo(()=>o.length===0?"nenhum selecionado":Z(o.length),[o.length]),z=useMemo(()=>typeof r=="string"?jsx(h,{variant:"overline",color:"text.disabled",children:r}):r,[r]);return jsxs(d,{gap:1.5,height:450,children:[jsxs(d,{direction:"row",justifyContent:"space-between",children:[z,jsx(h,{variant:"overline",color:"text.disabled",children:W})]}),jsxs(d,{direction:"row",alignItems:"center",spacing:1.5,children:[jsx(a$1,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:G,onKeyDown:K}),a?jsx(Fragment,{children:a}):jsx(J,{onClick:B,size:"small",disabled:s,children:jsx(h,{variant:"overline",children:"TODOS"})})]}),jsx(a$2,{children:jsx(d,{flex:1,mb:2,children:jsx(a$3,{isLoading:i,loading:jsx(d,{alignItems:"center",mt:3,children:jsx(Q,{})}),isEmpty:n.length===0,empty:jsx(a$4,{sx:{svg:{height:140}},text:c?`N\xE3o foi possivel encontrar o item "${c}"`:"Nenhum item dispon\xEDvel"}),children:jsx(j,{container:!0,spacing:1.5,children:$.map(t=>jsx(D,{item:t,isSelected:y(t.value),disabled:s,onSelectItem:A},t.value))})})})})]})},vr=rr;
|
|
17
17
|
|
|
18
18
|
export { vr as a };
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-SDS77DQQ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-EPMAHRQO.js';
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var f=({name:t,helperText:s,rules:u,onSelectOption:r,InputLabelProps:m,onBlur:n,...p})=>{let{control:c}=useFormContext(),C=e=>o=>{r&&r(o,e.value),e.onChange(o);};return jsx(Controller,{name:t,control:c,rules:u,render:({field:e,fieldState:{error:o}})=>{let g=h=>{e.onBlur(),n&&n(h);};return jsx(a,{"data-intercom-target":t,...e,...p,onChange:C(e),onBlur:g,error:!!o,helperText:o?.message||s,InputLabelProps:m})}})},B=f;
|
|
6
6
|
|
|
7
7
|
export { B as a };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-T53CFFZY.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
2
|
-
import { a as a$5 } from './chunk-
|
|
3
|
-
import { a as a$2 } from './chunk-
|
|
1
|
+
import { a } from './chunk-3ELMAXMX.js';
|
|
2
|
+
import { a as a$5 } from './chunk-PWR4GBUH.js';
|
|
3
|
+
import { a as a$2 } from './chunk-YKLRB3EJ.js';
|
|
4
4
|
import { e } from './chunk-OF6623HG.js';
|
|
5
5
|
import { a as a$6 } from './chunk-6U5LS7MP.js';
|
|
6
|
-
import { a as a$3 } from './chunk-
|
|
6
|
+
import { a as a$3 } from './chunk-JSL5OEWZ.js';
|
|
7
7
|
import { j } from './chunk-2A4XOLBZ.js';
|
|
8
|
-
import { a as a$4 } from './chunk-
|
|
8
|
+
import { a as a$4 } from './chunk-FBVAHVU3.js';
|
|
9
9
|
import { a as a$7 } from './chunk-SVX7EWV4.js';
|
|
10
10
|
import { a as a$1 } from './chunk-XNKYJHNL.js';
|
|
11
11
|
import { memo, forwardRef, useMemo, useLayoutEffect, useCallback, useState, useRef, useEffect, useId } from 'react';
|
|
@@ -31,4 +31,4 @@ import ri from '@mui/material/CircularProgress';
|
|
|
31
31
|
var pr=({helperText:e,disabled:o,isError:r})=>e?jsx(sr,{error:r,sx:a=>({mx:"14px",color:o?a.palette.grey[500]:void 0}),children:e}):null,S=memo(pr);var Ce=styled(he)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ke=styled(he)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),lo=styled(ze,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:a})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`dashed 1px ${e.palette.divider}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...a&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}})),so=styled(cr)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Xe=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),po=styled(he,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),co=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),mo=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),fo=styled(ze,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:a})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...a&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),uo=styled(ze)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover .single-file-preview-img":{filter:"blur(3px)",transition:"all 0.1s ease-in-out"},"&:hover .single-file-preview-hover-overlay":{opacity:1}})),go=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"&&e!=="fill"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:a,isLoading:t,isUploading:s,fill:n})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,backgroundColor:e.palette.background.paper,...n&&{width:"100%",height:"100%"},...!n&&Math.abs(o)>=1&&{maxWidth:r,maxHeight:a,aspectRatio:Math.abs(o),width:"calc(100% - 16px)",height:void 0},...!n&&Math.abs(o)<1&&{maxWidth:r,maxHeight:a,aspectRatio:Math.abs(o),width:void 0,height:"calc(100% - 16px)"},transition:"all 0.3s ease-in-out",...t||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{}})),xo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),ho=styled(he)(({theme:e})=>({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:alpha(e.palette.primary.darker,.75),zIndex:2,pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease-in-out"})),bo=styled(he)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(mr)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var qe=styled(ze,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),Io=styled(he)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(he)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.divider,color:e.palette.text.disabled,height:160}));var Po=styled(ze,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:a,hasFile:t})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${e.palette.divider}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...a&&{borderColor:"error.main"},...t&&{...a&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),vo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),Fo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var xr=({onRemove:e,sx:o,file:r,disableDrag:a,attributes:t,listeners:s,innerWidth:n,isDragging:d})=>{let c=r?.id;return c?jsx(gr,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(co,{width:n,isDragging:d,"data-testid":`preview-multi-img-${c}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:a,...t,...s}),jsx(Ee,{imageView:!0,file:r}),jsx(ke,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(Fo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${c}`):null},Eo=memo(xr);var Fr=({file:e$1,thumbnail:o,onRemove:r,sx:a$1,disableDrag:t=!1,disableTransitions:s=!1})=>{let n=e$1.size||0,d=e$1.name||e$1.id,c=e$1.id,m=typeof e$1=="string",l=t?70:80,{attributes:x,listeners:b,setNodeRef:v,transform:M,transition:E,isDragging:k}=useSortable({id:c,disabled:t}),z={transform:s?void 0:CSS.Transform.toString(M),transition:s?"none":E,opacity:s?.2:1,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${l+8}px`,height:"68px"};return o&&e$1?jsx(Xe,{ref:v,style:z,children:jsx(Eo,{innerWidth:l,isDragging:k,sx:a$1,file:e$1,disableDrag:t,attributes:x,listeners:b,onRemove:r})}):jsx(Xe,{ref:v,style:{...z,height:"80px",width:`${l+38}px`},children:jsxs(po,{width:l+30,isDragging:k,"data-testid":`preview-multi-img-${c}`,...j().inUp,sx:a$1,children:[jsx(a$2,{disableDrag:t,...x,...b}),e$1&&jsx(Ee,{file:e$1}),jsxs(he,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:d,children:jsx(eo,{variant:"subtitle2",noWrap:!0,children:d})}),jsx(eo,{variant:"caption",sx:{color:"text.secondary"},children:m?"":e(n)})]}),jsx(ke,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},Ao=memo(Fr);var kr=({thumbnail:e,files:o,onRemove:r,onReorder:a,sx:t})=>{let[s,n]=useState(!1),d=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),c=useCallback(l=>{let{active:x,over:b}=l;if(!(!x||!b||x.id===b.id)&&a){let v=o.findIndex(({id:E})=>E===x.id),M=o.findIndex(({id:E})=>E===b.id);v!==-1&&M!==-1&&(a(v,M,o),n(!0),setTimeout(()=>{n(!1);},300));}},[o,a]),m=jsx(AnimatePresence,{initial:!1,children:o.map(l=>jsx(Ao,{sx:t,id:`preview-file-${l.id}`,file:l,onRemove:r,thumbnail:e,disableDrag:!a,disableTransitions:s},`preview-file-${l.id}`))});return a?jsx(DndContext,{sensors:d,collisionDetection:closestCenter,onDragEnd:c,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(l=>l.id),strategy:horizontalListSortingStrategy,children:m})}):m},De=memo(kr);var Mo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...a},t)=>{let{maxWidth:s,maxHeight:n}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof t=="object"&&t?.current?e?.(!t.current.complete):e?.(!1);},[t,e]);let d=useCallback(()=>{e?.(!1);},[e]);return jsx(go,{...a,maxWidth:s,maxHeight:n,ref:t,aspectRatio:o,onLoad:d,onError:d})});Mo.displayName="LoadingPreviewImage";var Do=Mo;var $r=({file:e,aspectRatio:o=1,isUploading:r,isLoading:a,onLoading:t,cropSize:s,maxWidth:n,maxHeight:d,hoverAlt:c,fill:m})=>{let l=useRef(null),x=e?.id||"",b=e?.name||"",v=URL.createObjectURL(e);return x?jsxs(uo,{className:"single-file-preview-box",children:[jsx(Do,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:a,isUploading:r,alt:b,src:v,ref:l,loading:"lazy",onLoading:t,onLoad:()=>t?.(!1),onError:()=>t?.(!1),maxWidth:n,maxHeight:d,fill:m},`image-preview-${x}`),jsx(xo,{className:"single-file-preview-bg",alt:b,src:v,isLoading:a,isUploading:r}),c&&jsx(ho,{className:"single-file-preview-hover-overlay",children:c})]}):null},Ke=memo($r);var yo=["pdf"],_o=["txt"],Lo=["psd"],So=["doc","docx"],Oo=["xls","xlsx"],To=["zip","rar","iso"],Uo=["ai","eps"],Co=["ppt","pptx"],ko=["wav","aif","mp3","aac"],No=["jpg","jpeg","gif","bmp","png","svg","webp"],Bo=["m4v","avi","mpg","mp4","webm"];function qr(e){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e==="application/pdf"?"pdf":e==="text/plain"?"txt":e==="application/msword"||e==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"word":e==="application/vnd.ms-excel"||e==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"excel":e==="application/vnd.ms-powerpoint"||e==="application/vnd.openxmlformats-officedocument.presentationml.presentation"?"powerpoint":e==="application/zip"||e==="application/x-rar-compressed"||e==="application/x-iso9660-image"?"zip":e==="image/vnd.adobe.photoshop"?"photoshop":e==="application/illustrator"||e==="application/postscript"?"illustrator":null}function Wo(e,o){if(o){let a=qr(o);if(a)return a}let r=jo(e);return _o.includes(r)?"txt":To.includes(r)?"zip":ko.includes(r)?"audio":No.includes(r)?"image":Bo.includes(r)?"video":So.includes(r)?"word":Oo.includes(r)?"excel":Co.includes(r)?"powerpoint":yo.includes(r)?"pdf":Lo.includes(r)?"photoshop":Uo.includes(r)?"illustrator":"file"}function Vr(e){let o=jo(e);return _o.includes(o)?"txt":To.includes(o)?"zip":ko.includes(o)?"audio":No.includes(o)?"image":Bo.includes(o)?"video":So.includes(o)?"word":Oo.includes(o)?"excel":Co.includes(o)?"powerpoint":yo.includes(o)?"pdf":Lo.includes(o)?"photoshop":Uo.includes(o)?"illustrator":e?.startsWith("http")?"image":o||"file"}function Go(e){let o;switch(Vr(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function jo(e){return e&&e.split(".").pop()||""}function ga(e){return e.split("/").pop()}var Be={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Ee=({sx:e,file:o,tooltip:r,onRemove:a,imageView:t,slotProps:s,onDownload:n,...d})=>{let c=o.size>0?URL.createObjectURL(o):o.url,m=o?.name||"",l=Wo(m,o.type),x=jsx(ze,{component:"img",src:c,className:Be.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),b=jsx(a$4,{icon:Go(l),sx:{width:32,height:32,flexShrink:0,...e}}),v=jsxs(he,{component:"span",className:Be.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...d,children:[l==="image"&&t?x:b,a&&jsx(Jr,{"aria-label":"Remover arquivo",onClick:a,className:Be.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),n&&jsx(cr,{"aria-label":"Baixar arquivo",onClick:n,className:Be.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(et,{arrow:!0,title:m,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:v}):v};var Aa=e=>e.startsWith("image/"),Zo=(e,o=.8)=>new Promise((r,a)=>{let t=document.createElement("canvas"),s=t.getContext("2d"),n=new Image;n.onload=()=>{t.width=n.width,t.height=n.height,s?(s.drawImage(n,0,0),t.toBlob(d=>{if(d){let c=new File([d],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(c);}else a(new Error("Falha ao converter para WebP"));},"image/webp",o)):a(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},n.onerror=()=>a(new Error("Falha ao carregar imagem")),n.src=URL.createObjectURL(e);}),Ho=(e,o=.8,r,a)=>new Promise((t,s)=>{let n=document.createElement("canvas"),d=n.getContext("2d"),c=new Image;c.onload=()=>{let{width:m,height:l}=c;r&&m>r&&(l=l*r/m,m=r),a&&l>a&&(m=m*a/l,l=a),n.width=m,n.height=l,d?(d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(c,0,0,m,l),n.toBlob(x=>{if(x){let b=new File([x],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});t(b);}else s(new Error("Falha ao comprimir imagem"));},"image/webp",o)):s(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},c.onerror=()=>s(new Error("Falha ao carregar imagem")),c.src=URL.createObjectURL(e);}),$o=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""},Xo=e=>`UTF-8''${encodeURIComponent(e)}`;var nt=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:a,uploadFiles:t,filesPreview:s,dropzoneOptions:n,enableCrop:d=!1,customAspectRatio:c,convertToWebp:m=!0,cropSize:l,maxFiles:x,compressionQuality:b=.8,maxCompressedWidth:v,maxCompressedHeight:M})=>{let{showErrorMessage:E}=a$7(),k=useMemo(()=>c||(l&&typeof l!="number"?l.width/l.height:1),[c,l]),[z,I]=useState([]),[R,u]=useState(!1),[A,T]=useState(null),[C,P]=useState(null),[f,w]=useState(""),[D,U]=useState(!1),[y,_]=useState([]),[W,K]=useState(0),[re,Z]=useState(0),se=g=>{if(g.length<1)return;let h=g[0];T(h),K(L=>L+1);let F=new FileReader;F.onload=()=>{w(F.result),u(!0);},F.readAsDataURL(h);},ge=(g,h)=>{P(h);},pe=async g=>!A||!C?null:new Promise(h=>{let F=document.createElement("canvas"),L=F.getContext("2d"),N=new Image;N.onload=async()=>{let{width:G,height:ce,x:ye,y:ir}=C,ar=Math.abs(k),_e=G,Le=ce;l&&typeof l=="object"?(_e=l.width,Le=l.height):l&&typeof l=="number"&&(_e=l,Le=l/ar),F.width=_e,F.height=Le,L?(L.drawImage(N,ye,ir,G,ce,0,0,_e,Le),F.toBlob(async io=>{if(io){let $e=new File([io],A.name,{type:A.type,lastModified:Date.now()});if(m)try{$e=await Zo($e,b);}catch(nr){E(nr,"Erro ao converter para WebP");}let ao=$e;ao.id=g,h(ao);}else h(null);},"image/png")):h(null);},N.src=f;}),de=async()=>{if(!(!A||!C||y.length===0)){U(!0);try{let g=y[0],h=await pe(g.id);if(h){let L=await t([h]);L&&(!e$1&&!o&&I(N=>[...N,...L]),e$1?.([...s||[],...L]),o?.(h));}u(!1),U(!1),w(""),T(null);let F=y.slice(1);_(F),se(F);}catch(g){E(g,"Erro ao processar imagem"),U(!1);}}},H=()=>{u(!1),U(!1),w(""),T(null),_([]),K(0),Z(0);},J=async g=>{if(g.length===0)return;let h=Object.keys(n?.accept||{}).some(L=>L.includes("image/")),F=z.length+g.length;if(x&&F>x){E(new Error(`M\xE1ximo de ${x} arquivos`),"Erro ao fazer upload");return}try{if(h&&d){let N=g.filter(G=>G.type.startsWith("image/")).map((G,ce)=>{let ye=G;return ye.id=`temp-crop-${Date.now()}-${ce}`,ye});Z(N.length),K(0),_(N),se(N);}else {let L=[];for(let G of g)if(G.type.startsWith("image/")&&m)try{let ce=await Ho(G,b,v,M);L.push(ce);}catch(ce){E(ce,"Erro ao comprimir imagem"),L.push(G);}else L.push(G);let N=await t(L);N&&(!e$1&&!o&&I(G=>[...G,...N]),e$1?.([...s||[],...N]),o?.(N[0]));}}catch(L){E(L,"Erro ao processar arquivos");}},Q=g=>{if(!g.length)return;let h=g[0]?.errors[0]?.code,F=n?.maxSize||3145728;E(h==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(F)}`):h==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):g[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:te,getInputProps:ie,isDragActive:p,isDragReject:ae,fileRejections:Y}=useDropzone({onDrop:J,onDropRejected:Q,...n}),Ie=g=>{if(!g){a||I([]),a?.(void 0);return}let h=z.filter(F=>F.id!==g.id);a||I(h),a?.(g);},we=(g,h,F)=>{r?.(g,h,F);},xe=useRef("");return useEffect(()=>{let g=s?.map(h=>h.id).join(",")||"";g!==xe.current&&(xe.current=g,I(s||[]));},[s]),{file:z?.[0],files:z,aspectRatio:k,dropzoneProps:{getRootProps:te,getInputProps:ie,isDragActive:p,isDragReject:ae,fileRejections:Y},cropState:{cropModalOpen:R,imagePreview:f,cropLoading:D,setCropModalOpen:u,onCropInitialized:ge,handleCropSave:de,handleCropCancel:H,currentImageIndex:W,totalPendingImages:re},setInitialFiles:I,handleRemove:Ie,handleReorder:we}},X=nt;var Je=(p=>(p.APPLICATION_OCTET_STREAM="application/octet-stream",p.IMAGE_JPEG="image/jpeg",p.IMAGE_JPG="image/jpg",p.IMAGE_PNG="image/png",p.IMAGE_GIF="image/gif",p.IMAGE_WEBP="image/webp",p.IMAGE_SVG="image/svg+xml",p.IMAGE_BMP="image/bmp",p.IMAGE_TIFF="image/tiff",p.IMAGE_ICO="image/x-icon",p.IMAGE_AVIF="image/avif",p.APPLICATION_PDF="application/pdf",p.TEXT_PLAIN="text/plain",p.TEXT_CSV="text/csv",p.APPLICATION_RTF="application/rtf",p.APPLICATION_MSWORD="application/msword",p.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",p.APPLICATION_MSEXCEL="application/vnd.ms-excel",p.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",p.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",p.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",p.APPLICATION_ODT="application/vnd.oasis.opendocument.text",p.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",p.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",p.APPLICATION_XML="application/xml",p.TEXT_XML="text/xml",p.TEXT_HTML="text/html",p.TEXT_CSS="text/css",p.APPLICATION_JSON="application/json",p.TEXT_JAVASCRIPT="text/javascript",p.APPLICATION_ZIP="application/zip",p.APPLICATION_GZIP="application/gzip",p.APPLICATION_RAR="application/vnd.rar",p.APPLICATION_7Z="application/x-7z-compressed",p.AUDIO_MPEG="audio/mpeg",p.AUDIO_WAV="audio/wav",p.AUDIO_OGG="audio/ogg",p.AUDIO_WEBM="audio/webm",p.AUDIO_AAC="audio/aac",p.VIDEO_MP4="video/mp4",p.VIDEO_MPEG="video/mpeg",p.VIDEO_OGG="video/ogg",p.VIDEO_WEBM="video/webm",p.VIDEO_QUICKTIME="video/quicktime",p))(Je||{}),We=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(We||{});var dt=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$7(),[a,t]=useState(!1),[s,n]=useState(!1),[d,c]=useState(null),[m,l]=useState([]),x=useMemo(()=>m?.[0],[m]),b=s||a,v=useCallback(async I=>{if(!I.length){l([]),n(!1);return}n(!0);try{let u=(await Promise.all(I.map(async({url:A,id:T,name:C})=>{try{if(!A)return null;let P=await fetch(A);if(!P.ok)throw new Error(P.statusText);let f=await P.blob(),w=null;if(!C){let y=P.headers.get("content-disposition")||void 0;if(y){let _=$o(y);if(_)try{w=decodeURIComponent(_);}catch{w=_;}}}let D=w||C||T,U=new File([f],D,{type:f.type});return U.id=T,U.url=A,U}catch{return null}}))).filter(Boolean);l(u),n(!1);}catch(R){r(R,"Erro ao carregar arquivos"),l([]),n(!1);}},[r]),M=useRef("");useEffect(()=>{let I=o?.map(({id:R})=>R).join(",")||"";I!==M.current&&(async()=>(M.current=I,await v(o)))();},[o,v]);let E=async I=>{if(!I||!Array.isArray(I))throw new Error("Arquivos inv\xE1lidos");let R=I.filter(u=>u instanceof File);if(R?.length){t(!0);try{let u=R.map(P=>{let f=P.type||"application/octet-stream",w=We[f];if(!w)throw new Error(`Tipo de arquivo n\xE3o suportado: ${f}`);return {file:P,mimeType:f,contentTypeEnum:w}}),A=await e({files:u.map(({file:P,contentTypeEnum:f})=>({content_type:f,name:P.name}))}).unwrap(),T=A.files.map((P,f)=>{let w=u[f].file,D=w;return D.id=P.id,D.url=URL.createObjectURL(w),D});return await(await Promise.all(A.files.map((P,f)=>{let{mimeType:w}=u[f],D=T[f];return fetch(P.url,{method:"PUT",headers:{"Content-Type":w,"Content-Disposition":`inline; filename*=${Xo(D.name)}`,"X-File-Id":P.id},body:D})}))).forEach(async P=>{if(!P.ok)throw new Error("Erro no upload do arquivo.")}),T}catch(u){throw c(u),r(u,"Erro no upload"),u}finally{t(!1);}}},k=useMemo(()=>d&&d instanceof Error?d.message:d,[d]),z=useMemo(()=>o.filter(I=>!m.some(R=>R.id===I.id)),[o,m]);return {setFilesPreview:l,uploadFiles:E,filesPreview:m,filePreview:x,isLoadingPreview:s,isUploadingFiles:a,isUploadOrLoadingFiles:b,uploadErrorText:k,invalidFiles:z}},q=dt;var mt=({sx:e,id:o,name:r,tabIndex:a,uploading:t,getRootProps:s,getInputProps:n,isDragActive:d,isError:c,disabled:m,dropZoneSxProps:l,dropZoneContent:x,children:b,...v})=>jsxs(Ce,{children:[t&&jsx(a$6,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(ze,{sx:{width:1,position:"relative",...e},children:[jsxs(lo,{...s(),"data-testid":"drop-zone-styled-area",isError:c,isDragActive:d,disabled:!!m,sx:l,...v,children:[jsx("input",{...n(),id:o,tabIndex:a,name:r}),x]}),b]})]}),me=mt;function Ko(){let e=useTheme(),o=useId(),r=e.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:o,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:r}),jsx("stop",{offset:"100%",stopColor:r,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${o})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function It({hideBackground:e,sx:o,...r}){let a=useTheme(),t=a.vars.palette.primary.main,s=a.vars.palette.primary.dark,n=a.vars.palette.primary.darker;return jsxs(ze,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...o},...r,children:[!e&&jsx(Ko,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:n,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:t,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:s,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:t,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:n,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:t,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:t,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:t,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:t,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:s,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:s,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var Qo=memo(It);var Ft=({header:e,description:o,sx:r,...a})=>jsxs(he,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...a,children:[jsx(Qo,{sx:{width:220}}),jsxs("div",{children:[jsx(eo,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(eo,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(eo,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),fe=memo(Ft);var zt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:a,filesDetails:t=[],id:s,disabled:n,error:d,helperText:c,thumbnail:m,dropZoneSxProps:l,uploading:x,tabIndex:b,maxFiles:v,placeholderAlt:M,placeholderProps:E,...k})=>{let{filesPreview:z,isUploadOrLoadingFiles:I,uploadErrorText:R,uploadFiles:u}=q({createFilesMutation:a,filesDetails:t}),{files:A,dropzoneProps:T,handleRemove:C,handleReorder:P}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:z,dropzoneOptions:{multiple:!0,disabled:n,...k},maxFiles:v,uploadFiles:u}),{getRootProps:f,getInputProps:w,isDragActive:D,isDragReject:U}=T,y=!!A?.filter(W=>!!W.id).length,_=U||!!d||!!R;return jsxs(me,{id:s,uploading:x||I,disabled:n,dropZoneSxProps:l,tabIndex:b,getRootProps:f,getInputProps:w,isDragActive:D,isError:_,dropZoneContent:jsx(Fragment,{children:M?jsx(he,{children:M}):jsx(fe,{header:E?.header,description:E?.description})}),children:[jsx(S,{disabled:n,helperText:c,isError:_}),d?jsx(S,{helperText:d,isError:!0}):null,R?jsx(S,{helperText:R,isError:!0}):null,y&&jsx(ze,{sx:{my:3},children:jsx(De,{files:A,thumbnail:!!m,onRemove:e?C:void 0,onReorder:o?P:void 0})})]})},Mt=memo(zt);var Ot=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:a,filesDetails:t=[],id:s,disabled:n,error:d,helperText:c,dropZoneSxProps:m,placeholderProps:l,placeholderAlt:x,uploading:b,tabIndex:v,maxFiles:M,aspectRatio:E,enableCrop:k=!0,convertToWebp:z=!0,cropSize:I,name:R,label:u,keepInvalidFiles:A=!1,...T})=>{let{filesPreview:C,isUploadOrLoadingFiles:P,uploadErrorText:f,uploadFiles:w,invalidFiles:D}=q({createFilesMutation:a,filesDetails:t}),U=b||P,{files:y,dropzoneProps:_,cropState:W,aspectRatio:K,handleRemove:re,handleReorder:Z}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:C,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:n,...T},enableCrop:k,customAspectRatio:E,convertToWebp:z,maxFiles:M,cropSize:I,uploadFiles:w}),{getRootProps:se,getInputProps:ge,isDragActive:pe,isDragReject:de}=_,{cropModalOpen:H,imagePreview:J,cropLoading:Q,onCropInitialized:te,handleCropSave:ie,handleCropCancel:p,currentImageIndex:ae,totalPendingImages:Y}=W,Ie=useMemo(()=>{if(!A)return y;let h=D.map(F=>({...new File([],F.name??"invalid-file"),id:F.id,url:"url.invalid"}));return [...y,...h]},[A,y,D]),we=!!Ie?.filter(h=>!!h.id).length,xe=de||!!d||!!f,g=useMemo(()=>{let h=u??"Ajustar Imagem",F=Y>1||ae>1?` (${ae} de ${Y})`:"";return `${h}${F}`},[u,Y,ae]);return jsxs(me,{id:s,name:R,uploading:U,disabled:n,dropZoneSxProps:m,tabIndex:v,getRootProps:se,getInputProps:ge,isDragActive:pe,isError:xe,dropZoneContent:jsx(Fragment,{children:x?jsx(he,{children:x}):jsx(fe,{header:l?.header,description:l?.description})}),children:[jsx(S,{disabled:n,helperText:c,isError:xe}),d?jsx(S,{helperText:d,isError:!0}):null,f?jsx(S,{helperText:f,isError:!0}):null,we&&jsx(ze,{sx:{my:3,ml:.5},children:jsx(De,{files:Ie,thumbnail:!0,onRemove:re,onReorder:o?Z:void 0})}),jsx(a$5,{open:H,onClose:p,label:g,imageSrc:J,aspectRatio:K,onInitialized:te,onSave:ie,loading:Q,cropSize:I})]})},Tt=memo(Ot);var Wt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:a,id:t,disabled:s,error:n,helperText:d,sx:c,dropZoneSxProps:m$1,uploading:l,tabIndex:x,placeholderAlt:b,placeholderProps:v,...M})=>{let{filesPreview:E,isUploadOrLoadingFiles:k,uploadErrorText:z,uploadFiles:I}=q({createFilesMutation:r,filesDetails:a?[a]:[]}),R=k||l,{file:u,dropzoneProps:A,handleRemove:T}=X({uploadFiles:I,onFileSelect:e$1,onRemove:o,filesPreview:E,dropzoneOptions:{multiple:!1,disabled:s,...M}}),{getRootProps:C,getInputProps:P,isDragActive:f,isDragReject:w}=A,D=useCallback(W=>{W.stopPropagation(),T(u||void 0);},[u,T]),U=!!u,y=typeof u=="string",_=w||!!n||!!z;return jsxs(me,{id:t,uploading:R,disabled:s,dropZoneSxProps:m$1,tabIndex:x,getRootProps:C,getInputProps:P,isDragActive:f,isError:_,dropZoneContent:jsxs(Fragment,{children:[!U&&(b?jsx(he,{...v,children:b}):jsx(fe,{})),U&&jsxs(he,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:W=>`solid 1px ${W.palette.divider}`,...c},children:[jsx(Ee,{file:u}),jsxs(he,{flexGrow:1,sx:{minWidth:0},children:[jsx(eo,{variant:"subtitle2",noWrap:!0,children:y?u:u.name}),jsx(eo,{variant:"caption",sx:{color:"text.secondary"},children:y?"":e(u.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(so,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:D,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(S,{disabled:s,helperText:d,isError:_}),n?jsx(S,{helperText:n,isError:!0}):null,z?jsx(S,{helperText:z,isError:!0}):null]})},Gt=memo(Wt);var Vt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:a,id:t,disabled:s,error:n,helperText:d,dropZoneSxProps:c,placeholderProps:m,placeholderAlt:l,hoverAlt:x,uploading:b,tabIndex:v,aspectRatio:M,enableCrop:E=!0,convertToWebp:k=!0,name:z,label:I,cropSize:R,sx:u,maxWidth:A,maxHeight:T,compressionQuality:C=.8,maxCompressedWidth:P,maxCompressedHeight:f,fill:w,...D})=>{let{filesPreview:U,isUploadOrLoadingFiles:y,uploadErrorText:_,uploadFiles:W}=q({createFilesMutation:r,filesDetails:a?[a]:[]}),[K,re]=useState(!1),{file:Z,dropzoneProps:se,cropState:ge,handleRemove:pe,aspectRatio:de}=X({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...D},filesPreview:U,enableCrop:E,customAspectRatio:M,convertToWebp:k,cropSize:R,uploadFiles:W,compressionQuality:C,maxCompressedWidth:P,maxCompressedHeight:f}),{getRootProps:H,getInputProps:J,isDragActive:Q,isDragReject:te}=se,{cropModalOpen:ie,imagePreview:p,cropLoading:ae,onCropInitialized:Y,handleCropSave:Ie,handleCropCancel:we}=ge,xe=useCallback(()=>{pe(Z||void 0);},[Z,pe]),g=!!Z,h=te||!!n||!!_,F=b||y,L=g?{opacity:0}:{opacity:1},N=c?.width;return useEffect(()=>{g||re(!1);},[g]),jsxs(Ce,{sx:{...u,...N&&{width:N}},children:[(F||K)&&jsx(a$6,{}),jsxs(me,{id:t,uploading:F,disabled:s,dropZoneSxProps:c,tabIndex:v,getRootProps:H,getInputProps:J,isDragActive:Q,isError:h,name:z,dropZoneContent:jsxs(Fragment,{children:[l?jsx(he,{sx:L,children:l}):jsx(fe,{sx:L,header:m?.title,description:m?.description}),g&&jsx(Ke,{file:Z,cropSize:R,isLoading:K,isUploading:F,onLoading:re,aspectRatio:de,maxWidth:A,maxHeight:T,hoverAlt:x,fill:w})]}),children:[jsx(S,{disabled:s,helperText:d,isError:h}),n?jsx(S,{helperText:n,isError:!0}):null,_?jsx(S,{helperText:_,isError:!0}):null,g&&e&&jsx(mo,{size:"small",onClick:xe,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$5,{open:ie,onClose:we,label:I??"Ajustar Imagem",imageSrc:p,aspectRatio:de,onInitialized:Y,onSave:Ie,loading:ae,cropSize:R})]})]})},Kt=memo(Vt);var ti=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:a,disabled:t,label:s,id:n,tabIndex:d,error:c,helperText:m,sx:l,name:x,maxSize:b,uploading:v,aspectRatio:M=1,enableCrop:E=!0,convertToWebp:k=!0,cropSize:z,...I})=>{let[R,u]=useState(!1),{filesPreview:A,isUploadOrLoadingFiles:T,uploadErrorText:C,uploadFiles:P}=q({createFilesMutation:r,filesDetails:a?[a]:[]}),{file:f,dropzoneProps:w,cropState:D,handleRemove:U}=X({filesPreview:A,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:t,maxSize:b,...I},enableCrop:E,customAspectRatio:M,convertToWebp:k,cropSize:z,uploadFiles:P}),{getRootProps:y,getInputProps:_,isDragActive:W,isDragReject:K}=w,{cropModalOpen:re,imagePreview:Z,cropLoading:se,onCropInitialized:ge,handleCropSave:pe,handleCropCancel:de}=D,H=K||!!c||!!C,J=R||T||v,Q=!!e,te=useRef(a?.url||""),ie=useRef(void 0);useEffect(()=>{if(!f){te.current="",ie.current=void 0;return}if(ie.current===f.id)return;ie.current=f.id,u(!0);let Y=URL.createObjectURL(f);return te.current=Y,()=>{URL.revokeObjectURL(Y);}},[f]);let p=()=>{u(!1);},ae=useCallback(()=>Q&&f?()=>U(f):y().onClick,[Q,f,y,U]);return jsxs(Fragment,{children:[jsxs(he,{sx:{alignItems:"center"},children:[jsxs(Po,{sx:l,isError:H,isDragActive:W,hasFile:!!f,...y(),onClick:ae(),children:[jsxs(bo,{children:[J&&jsx(Io,{children:jsx(ri,{size:135,thickness:2,color:"primary"})}),f&&jsx(vo,{alt:"Avatar Preview",src:te.current,onLoad:p,...J&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!f&&!J&&jsxs(qe,{isError:H,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(eo,{variant:"caption",textAlign:"center",sx:{color:H?"error.main":"text.disabled"},children:"Adicionar foto"})]}),f&&!J&&jsxs(qe,{isError:H,hasFile:!0,children:[jsx(a$4,{icon:Q?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(eo,{variant:"caption",textAlign:"center",sx:{color:H?"error.main":"common.white"},children:Q?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:x,id:n,tabIndex:d,..._()})]}),jsx(he,{sx:{alignItems:"center",mt:-.5},children:jsx(S,{helperText:m,disabled:t,isError:H})}),C?jsx(S,{helperText:C,isError:!0}):null,c?jsx(S,{helperText:c,isError:!0}):null]}),re&&Z&&jsx(a$5,{open:re,onClose:de,label:s??"Ajustar Imagem",imageSrc:Z,aspectRatio:M,onInitialized:ge,onSave:pe,loading:se,cropSize:z,cropShape:"round"})]})},ii=memo(ti);var si=({error:e,name:o,disabled:r,sx:a,...t})=>{let{getRootProps:s,getInputProps:n,isDragActive:d,isDragReject:c}=useDropzone({disabled:r,...t}),m=c||e;return jsxs(fo,{...s(),isDragActive:d,hasError:!!m,disabled:!!r,sx:a,"data-testid":"upload-box",children:[jsx("input",{name:o,...n()}),"Selecionar arquivo"]})},pi=memo(si);
|
|
32
32
|
|
|
33
33
|
export { S as a, De as b, Ke as c, qr as d, Wo as e, Vr as f, Go as g, jo as h, ga as i, Be as j, Ee as k, Aa as l, Zo as m, Ho as n, $o as o, Xo as p, X as q, Je as r, We as s, q as t, Mt as u, Tt as v, Gt as w, Kt as x, ii as y, pi as z };
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-TBFQ5PEL.js.map
|
|
@@ -4,4 +4,4 @@ import { useColorScheme } from '@mui/material/styles';
|
|
|
4
4
|
var S=()=>{let{setMode:m}=useColorScheme(),{settings:c,updateSettings:h}=b(),e=c.colorScheme!=="light"?"dark":"light",t=o=>{m(o),h({colorScheme:o});};return {colorScheme:e,mode:e,isDark:e==="dark",toggleTheme:()=>{t(e==="light"?"dark":"light");},setColorScheme:t}};
|
|
5
5
|
|
|
6
6
|
export { S as a };
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-U4I7JPER.js.map
|