@zydon/common 2.7.16 → 2.7.17

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.
@@ -1,39 +1,18 @@
1
- import { a as a$5 } from '../../chunk-H5L4ARDB.js';
2
- import { a } from '../../chunk-3X7KMUN3.js';
3
- import { e } from '../../chunk-ANAHA3L6.js';
4
- import { a as a$3 } from '../../chunk-2FXBVVBD.js';
5
- import { a as a$6 } from '../../chunk-KA6PGKWV.js';
1
+ export { p as ContentType, q as FileContentType, i as FileThumbnail, a as HelperText, b as MultiFilePreview, s as MultipleFileUpload, t as MultipleImageUpload, c as SingleFilePreview, u as SingleFileUpload, v as SingleImageUpload, w as UploadAvatar, x as UploadSimpleBox, l as compressImageWithoutCrop, k as convertToWebP, n as encodeFilenameForHeader, d as fileFormat, g as fileNameByUrl, e as fileThumb, h as fileThumbnailClasses, f as fileTypeByUrl, m as getFileNameFromContentDisposition, j as isImageFile, o as useDropzoneUploader, r as useFileUploadService } from '../../chunk-JALBND3K.js';
2
+ import '../../chunk-H5L4ARDB.js';
3
+ import '../../chunk-3X7KMUN3.js';
4
+ import '../../chunk-ANAHA3L6.js';
5
+ import '../../chunk-2FXBVVBD.js';
6
+ import '../../chunk-KA6PGKWV.js';
6
7
  import '../../chunk-GZ4UBWZJ.js';
7
8
  import '../../chunk-7AZX7L27.js';
8
- import { a as a$2 } from '../../chunk-DUFPX4QZ.js';
9
- import { x } from '../../chunk-2P4CXK3O.js';
10
- import { a as a$7 } from '../../chunk-FK7DDO5L.js';
11
- import { j } from '../../chunk-DMQW3LDF.js';
12
- import { a as a$4 } from '../../chunk-WIJV4EHZ.js';
9
+ import '../../chunk-DUFPX4QZ.js';
10
+ import '../../chunk-2P4CXK3O.js';
11
+ import '../../chunk-FK7DDO5L.js';
12
+ import '../../chunk-DMQW3LDF.js';
13
+ import '../../chunk-WIJV4EHZ.js';
13
14
  import '../../chunk-FO7JCJ76.js';
14
15
  import '../../chunk-C2JZG45F.js';
15
16
  import '../../chunk-ILHUUK4X.js';
16
- import { a as a$8 } from '../../chunk-GFJT57TO.js';
17
- import { a as a$1 } from '../../chunk-S7QQBC4I.js';
18
- import { memo, forwardRef, useMemo, useLayoutEffect, useState, useCallback, useRef, useEffect } from 'react';
19
- import $o from '@mui/material/FormHelperText';
20
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
- import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
22
- import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
23
- import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy } from '@dnd-kit/sortable';
24
- import { m, AnimatePresence } from 'framer-motion';
25
- import de from '@mui/material/Stack';
26
- import Qe from '@mui/material/Typography';
27
- import De from '@mui/material/Box';
28
- import Vo from '@mui/material/IconButton';
29
- import Ko from '@mui/material/Paper';
30
- import { styled, alpha } from '@mui/material/styles';
31
- import Yo from '@mui/material/Badge';
32
- import Gr from '@mui/material/ButtonBase';
33
- import Hr from '@mui/material/Tooltip';
34
- import { useDropzone } from 'react-dropzone';
35
- import Wt from '@mui/material/CircularProgress';
36
-
37
- var Xo=({helperText:e,disabled:o,isError:r})=>e?jsx($o,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,y=memo(Xo);var Me=styled(de)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ke=styled(de)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),no=styled(De,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({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},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(de)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:e.palette.background.paper}}}));var so=styled(Vo)(({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]}})),He=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),lo=styled(de,{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)"})),po=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)}})),co=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({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"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),go=styled(De)(({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}})),uo=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:t,isLoading:l,isUploading:s,fill:i})=>({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,...i&&{width:"100%",height:"100%"},...!i&&Math.abs(o)>=1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:"calc(100% - 16px)",height:void 0},...!i&&Math.abs(o)<1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:void 0,height:"calc(100% - 16px)"},transition:"all 0.3s ease-in-out",...l||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{}})),fo=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)"}})),xo=styled(de)(({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"})),ho=styled(de)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Ko)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var $e=styled(De,{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)}})),bo=styled(de)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(de)(({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 Io=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:l})=>({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"},...t&&{borderColor:"error.main"},...l&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),Po=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),vo=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 er=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:l,listeners:s,innerWidth:i,isDragging:p})=>{let d=r?.id;return d?jsx(Yo,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(po,{width:i,isDragging:p,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...l,...s}),jsx(Ee,{imageView:!0,file:r}),jsx(ke,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(vo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${d}`):null},Eo=memo(er);var ar=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:l=!1,disableTransitions:s=!1})=>{let i=e$1.size||0,p=e$1.name||e$1.id,d=e$1.id,m=typeof e$1=="string",a$1=l?70:80,{attributes:g,listeners:h,setNodeRef:P,transform:w,transition:b,isDragging:C}=useSortable({id:d,disabled:l}),I={transform:s?void 0:x.Transform.toString(w),transition:s?"none":b,opacity:s?.2:1,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${a$1+8}px`,height:"68px"};return o&&e$1?jsx(He,{ref:P,style:I,children:jsx(Eo,{innerWidth:a$1,isDragging:C,sx:t,file:e$1,disableDrag:l,attributes:g,listeners:h,onRemove:r})}):jsx(He,{ref:P,style:{...I,height:"80px",width:`${a$1+38}px`},children:jsxs(lo,{width:a$1+30,isDragging:C,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:l,...g,...h}),e$1&&jsx(Ee,{file:e$1}),jsxs(de,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:p,children:jsx(Qe,{variant:"subtitle2",noWrap:!0,children:p})}),jsx(Qe,{variant:"caption",sx:{color:"text.secondary"},children:m?"":e(i)})]}),jsx(ke,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},Ao=memo(ar);var vr=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:l})=>{let[s,i]=useState(!1),p=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),d=useCallback(a=>{let{active:g,over:h}=a;if(!(!g||!h||g.id===h.id)&&t){let P=o.findIndex(({id:b})=>b===g.id),w=o.findIndex(({id:b})=>b===h.id);P!==-1&&w!==-1&&(t(P,w,o),i(!0),setTimeout(()=>{i(!1);},300));}},[o,t]),m=jsx(AnimatePresence,{initial:!1,children:o.map(a=>jsx(Ao,{sx:l,id:`preview-file-${a.id}`,file:a,onRemove:r,thumbnail:e,disableDrag:!t,disableTransitions:s},`preview-file-${a.id}`))});return t?jsx(DndContext,{sensors:p,collisionDetection:closestCenter,onDragEnd:d,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(a=>a.id),strategy:horizontalListSortingStrategy,children:m})}):m},_e=memo(vr);var Ro=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},l)=>{let{maxWidth:s,maxHeight:i}=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 l=="object"&&l?.current?e?.(!l.current.complete):e?.(!1);},[l,e]);function p(){e?.(!1);}return jsx(uo,{...t,maxWidth:s,maxHeight:i,ref:l,aspectRatio:o,onLoad:p,onError:p})});Ro.displayName="LoadingPreviewImage";var _o=Ro;var _r=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:l,cropSize:s,maxWidth:i,maxHeight:p,hoverAlt:d,fill:m})=>{let a=useRef(null),g=e?.id||"",h=e?.name||"",P=URL.createObjectURL(e);return g?jsxs(go,{className:"single-file-preview-box",children:[jsx(_o,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:h,src:P,ref:a,loading:"lazy",onLoading:l,onLoad:()=>l?.(!1),onError:()=>l?.(!1),maxWidth:i,maxHeight:p,fill:m},`image-preview-${g}`),jsx(fo,{className:"single-file-preview-bg",alt:h,src:P,isLoading:t,isUploading:r}),d&&jsx(xo,{className:"single-file-preview-hover-overlay",children:d})]}):null},qe=memo(_r);var Tr=["pdf"],Or=["txt"],yr=["psd"],Ur=["doc","docx"],Cr=["xls","xlsx"],Lr=["zip","rar","iso"],Mr=["ai","eps"],kr=["ppt","pptx"],zr=["wav","aif","mp3","aac"],Nr=["jpg","jpeg","gif","bmp","png","svg","webp"],Br=["m4v","avi","mpg","mp4","webm"];function Ve(e){let o,r=So(e);return Or.includes(r)?o="txt":Lr.includes(r)?o="zip":zr.includes(r)?o="audio":Nr.includes(r)?o="image":Br.includes(r)?o="video":Ur.includes(r)?o="word":Cr.includes(r)?o="excel":kr.includes(r)?o="powerpoint":Tr.includes(r)?o="pdf":yr.includes(r)?o="photoshop":Mr.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=So(e),o}function To(e){let o;switch(Ve(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 So(e){return e&&e.split(".").pop()||""}function oa(e){return e.split("/").pop()}var Ne={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:t,imageView:l,slotProps:s,onDownload:i,...p})=>{let d=URL.createObjectURL(o),m=o?.name||"",g=o.type.startsWith("image/")?"image":Ve(d),h=jsx(De,{component:"img",src:d,className:Ne.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),P=jsx(a$4,{icon:To(g),sx:{width:32,height:32,flexShrink:0,...e}}),w=jsxs(de,{component:"span",className:Ne.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...p,children:[g==="image"&&l?h:P,t&&jsx(Gr,{onClick:t,className:Ne.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),i&&jsx(Vo,{onClick:i,className:Ne.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(Hr,{arrow:!0,title:m,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:w}):w};var ca=e=>e.startsWith("image/"),Oo=(e,o=.8)=>new Promise((r,t)=>{let l=document.createElement("canvas"),s=l.getContext("2d"),i=new Image;i.onload=()=>{l.width=i.width,l.height=i.height,s?(s.drawImage(i,0,0),l.toBlob(p=>{if(p){let d=new File([p],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(d);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},i.onerror=()=>t(new Error("Falha ao carregar imagem")),i.src=URL.createObjectURL(e);}),yo=(e,o=.8,r,t)=>new Promise((l,s)=>{let i=document.createElement("canvas"),p=i.getContext("2d"),d=new Image;d.onload=()=>{let{width:m,height:a}=d;r&&m>r&&(a=a*r/m,m=r),t&&a>t&&(m=m*t/a,a=t),i.width=m,i.height=a,p?(p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(d,0,0,m,a),i.toBlob(g=>{if(g){let h=new File([g],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});l(h);}else s(new Error("Falha ao comprimir imagem"));},"image/webp",o)):s(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},d.onerror=()=>s(new Error("Falha ao carregar imagem")),d.src=URL.createObjectURL(e);}),Uo=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""},Co=e=>`UTF-8''${encodeURIComponent(e)}`;var Jr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:l,filesPreview:s,dropzoneOptions:i,enableCrop:p=!1,customAspectRatio:d,convertToWebp:m=!0,cropSize:a,maxFiles:g,compressionQuality:h=.8,maxCompressedWidth:P,maxCompressedHeight:w})=>{let{showErrorMessage:b}=a$8(),C=useMemo(()=>d||(a&&typeof a!="number"?a.width/a.height:1),[d,a]),[I,u]=useState([]),[v,A]=useState(!1),[S,L]=useState(null),[f,E]=useState(null),[c,D]=useState(""),[M,U]=useState(!1),[T,N]=useState([]),[ee,q]=useState(0),[oe,G]=useState(0),ne=x=>{if(x.length<1)return;let F=x[0];L(F),q(O=>O+1);let R=new FileReader;R.onload=()=>{D(R.result),A(!0);},R.readAsDataURL(F);},ue=(x,F)=>{E(F);},se=async x=>!S||!f?null:new Promise(F=>{let R=document.createElement("canvas"),O=R.getContext("2d"),k=new Image;k.onload=async()=>{let{width:B,height:pe,x:Se,y:Go}=f,jo=Math.abs(C),Te=B,Oe=pe;a&&typeof a=="object"?(Te=a.width,Oe=a.height):a&&typeof a=="number"&&(Te=a,Oe=a/jo),R.width=Te,R.height=Oe,O?(O.drawImage(k,Se,Go,B,pe,0,0,Te,Oe),R.toBlob(async oo=>{if(oo){let Ze=new File([oo],S.name,{type:S.type,lastModified:Date.now()});if(m)try{Ze=await Oo(Ze,h);}catch(Zo){b(Zo,"Erro ao converter para WebP");}let ro=Ze;ro.id=x,F(ro);}else F(null);},"image/png")):F(null);},k.src=c;}),le=async()=>{if(!(!S||!f||T.length===0)){U(!0);try{let x=T[0],F=await se(x.id);if(F){let O=await l([F]);O&&(!e$1&&!o&&u(k=>[...k,...O]),e$1?.([...s||[],...O]),o?.(F));}A(!1),U(!1),D(""),L(null);let R=T.slice(1);N(R),ne(R);}catch(x){b(x,"Erro ao processar imagem"),U(!1);}}},j=()=>{A(!1),U(!1),D(""),L(null),N([]),q(0),G(0);},V=async x=>{if(x.length===0)return;let F=Object.keys(i?.accept||{}).some(O=>O.includes("image/")),R=I.length+x.length;if(g&&R>g){b(new Error(`M\xE1ximo de ${g} arquivos`),"Erro ao fazer upload");return}try{if(F&&p){let k=x.filter(B=>B.type.startsWith("image/")).map((B,pe)=>{let Se=B;return Se.id=`temp-crop-${Date.now()}-${pe}`,Se});G(k.length),q(0),N(k),ne(k);}else {let O=[];for(let B of x)if(B.type.startsWith("image/")&&m)try{let pe=await yo(B,h,P,w);O.push(pe);}catch(pe){b(pe,"Erro ao comprimir imagem"),O.push(B);}else O.push(B);let k=await l(O);k&&(!e$1&&!o&&u(B=>[...B,...k]),e$1?.([...s||[],...k]),o?.(k[0]));}}catch(O){b(O,"Erro ao processar arquivos");}},K=x=>{if(!x.length)return;let F=x[0]?.errors[0]?.code,R=i?.maxSize||3145728;b(F==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(R)}`):F==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):x[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:re,getInputProps:Z,isDragActive:n,isDragReject:fe,fileRejections:te}=useDropzone({onDrop:V,onDropRejected:K,...i}),we=x=>{if(!x){t||u([]),t?.(void 0);return}let F=I.filter(R=>R.id!==x.id);t||u(F),t?.(x);},xe=(x,F,R)=>{r?.(x,F,R);},be=useRef("");return useEffect(()=>{let x=s?.map(F=>F.id).join(",")||"";x!==be.current&&(be.current=x,u(s||[]));},[s]),{file:I?.[0],files:I,aspectRatio:C,dropzoneProps:{getRootProps:re,getInputProps:Z,isDragActive:n,isDragReject:fe,fileRejections:te},cropState:{cropModalOpen:v,imagePreview:c,cropLoading:M,setCropModalOpen:A,onCropInitialized:ue,handleCropSave:le,handleCropCancel:j,currentImageIndex:ee,totalPendingImages:oe},setInitialFiles:u,handleRemove:we,handleReorder:xe}},$=Jr;var Ke=(n=>(n.APPLICATION_OCTET_STREAM="application/octet-stream",n.IMAGE_JPEG="image/jpeg",n.IMAGE_JPG="image/jpg",n.IMAGE_PNG="image/png",n.IMAGE_GIF="image/gif",n.IMAGE_WEBP="image/webp",n.IMAGE_SVG="image/svg+xml",n.IMAGE_BMP="image/bmp",n.IMAGE_TIFF="image/tiff",n.IMAGE_ICO="image/x-icon",n.IMAGE_AVIF="image/avif",n.APPLICATION_PDF="application/pdf",n.TEXT_PLAIN="text/plain",n.TEXT_CSV="text/csv",n.APPLICATION_RTF="application/rtf",n.APPLICATION_MSWORD="application/msword",n.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",n.APPLICATION_MSEXCEL="application/vnd.ms-excel",n.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",n.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",n.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",n.APPLICATION_ODT="application/vnd.oasis.opendocument.text",n.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",n.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",n.APPLICATION_XML="application/xml",n.TEXT_XML="text/xml",n.TEXT_HTML="text/html",n.TEXT_CSS="text/css",n.APPLICATION_JSON="application/json",n.TEXT_JAVASCRIPT="text/javascript",n.APPLICATION_ZIP="application/zip",n.APPLICATION_GZIP="application/gzip",n.APPLICATION_RAR="application/vnd.rar",n.APPLICATION_7Z="application/x-7z-compressed",n.AUDIO_MPEG="audio/mpeg",n.AUDIO_WAV="audio/wav",n.AUDIO_OGG="audio/ogg",n.AUDIO_WEBM="audio/webm",n.AUDIO_AAC="audio/aac",n.VIDEO_MP4="video/mp4",n.VIDEO_MPEG="video/mpeg",n.VIDEO_OGG="video/ogg",n.VIDEO_WEBM="video/webm",n.VIDEO_QUICKTIME="video/quicktime",n))(Ke||{}),Be=(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))(Be||{});var ot=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$8(),[t,l]=useState(!1),[s,i]=useState(!1),[p,d]=useState(null),[m,a]=useState([]),g=useMemo(()=>m?.[0],[m]),h=s||t,P=useCallback(async I=>{if(!I.length){a([]),i(!1);return}i(!0);try{let v=(await Promise.all(I.map(async({url:A,id:S,name:L})=>{try{if(!A)return null;let f=await fetch(A);if(!f.ok)throw new Error(f.statusText);let E=await f.blob(),c=null;if(!L){let U=f.headers.get("content-disposition")||void 0;if(U){let T=Uo(U);if(T)try{c=decodeURIComponent(T);}catch{c=T;}}}let D=c||L||S,M=new File([E],D,{type:E.type});return M.id=S,M.url=A,M}catch{return null}}))).filter(Boolean);a(v),i(!1);}catch(u){r(u,"Erro ao carregar arquivos"),a([]),i(!1);}},[r]),w=useRef("");useEffect(()=>{let I=o?.map(({id:u})=>u).join(",")||"";I!==w.current&&(async()=>(w.current=I,await P(o)))();},[o,P]);let b=async I=>{if(!I||!Array.isArray(I))throw new Error("Arquivos inv\xE1lidos");let u=I.filter(v=>v instanceof File);if(u?.length){l(!0);try{let v=u.map(f=>{let E=f.type||"application/octet-stream",c=Be[E];if(!c)throw new Error(`Tipo de arquivo n\xE3o suportado: ${E}`);return {file:f,mimeType:E,contentTypeEnum:c}}),A=await e({files:v.map(({file:f,contentTypeEnum:E})=>({content_type:E,name:f.name}))}).unwrap(),S=A.files.map((f,E)=>{let c=v[E].file,D=c;return D.id=f.id,D.url=URL.createObjectURL(c),D});return await(await Promise.all(A.files.map((f,E)=>{let{mimeType:c}=v[E],D=S[E];return fetch(f.url,{method:"PUT",headers:{"Content-Type":c,"Content-Disposition":`inline; filename*=${Co(D.name)}`,"X-File-Id":f.id},body:D})}))).forEach(async f=>{if(!f.ok)throw new Error("Erro no upload do arquivo.")}),S}catch(v){throw d(v),r(v,"Erro no upload"),v}finally{l(!1);}}},C=useMemo(()=>p&&p instanceof Error?p.message:p,[p]);return {setFilesPreview:a,uploadFiles:b,filesPreview:m,filePreview:g,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:h,uploadErrorText:C}},X=ot;var tt=({sx:e,id:o,name:r,tabIndex:t,uploading:l,getRootProps:s,getInputProps:i,isDragActive:p,isError:d,disabled:m,dropZoneSxProps:a,dropZoneContent:g,children:h,...P})=>jsxs(Me,{children:[l&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(De,{sx:{width:1,position:"relative",...e},children:[jsxs(no,{...s(),"data-testid":"drop-zone-styled-area",isError:d,isDragActive:p,disabled:!!m,sx:a,...P,children:[jsx("input",{...i(),id:o,tabIndex:t,name:r}),g]}),h]})]}),me=tt;var nt=({header:e,description:o,sx:r,...t})=>jsxs(de,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(Qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(Qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(Qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),ce=memo(nt);var mt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,thumbnail:m,dropZoneSxProps:a,uploading:g,tabIndex:h,maxFiles:P,placeholderAlt:w,placeholderProps:b,...C})=>{let{filesPreview:I,isUploadOrLoadingFiles:u,uploadErrorText:v,uploadFiles:A}=X({createFilesMutation:t,filesDetails:l}),{files:S,dropzoneProps:L,handleRemove:f,handleReorder:E}=$({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:I,dropzoneOptions:{multiple:!0,disabled:i,...C},maxFiles:P,uploadFiles:A}),{getRootProps:c,getInputProps:D,isDragActive:M,isDragReject:U}=L,T=!!S?.filter(ee=>!!ee.id).length,N=U||!!p||!!v;return jsxs(me,{id:s,uploading:g||u,disabled:i,dropZoneSxProps:a,tabIndex:h,getRootProps:c,getInputProps:D,isDragActive:M,isError:N,dropZoneContent:jsx(Fragment,{children:w?jsx(de,{children:w}):jsx(ce,{header:b?.header,description:b?.description})}),children:[jsx(y,{disabled:i,helperText:d,isError:N}),p?jsx(y,{helperText:p,isError:!0}):null,v?jsx(y,{helperText:v,isError:!0}):null,T&&jsx(De,{sx:{my:3},children:jsx(_e,{files:S,thumbnail:!!m,onRemove:e?f:void 0,onReorder:o?E:void 0})})]})},ct=memo(mt);var It=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,dropZoneSxProps:m,placeholderProps:a,placeholderAlt:g,uploading:h,tabIndex:P,maxFiles:w,aspectRatio:b,enableCrop:C=!0,convertToWebp:I=!0,cropSize:u,name:v,label:A,...S})=>{let{filesPreview:L,isUploadOrLoadingFiles:f,uploadErrorText:E,uploadFiles:c}=X({createFilesMutation:t,filesDetails:l}),D=h||f,{files:M,dropzoneProps:U,cropState:T,aspectRatio:N,handleRemove:ee,handleReorder:q}=$({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:L,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:i,...S},enableCrop:C,customAspectRatio:b,convertToWebp:I,maxFiles:w,cropSize:u,uploadFiles:c}),{getRootProps:oe,getInputProps:G,isDragActive:ne,isDragReject:ue}=U,{cropModalOpen:se,imagePreview:le,cropLoading:j,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:Z,totalPendingImages:n}=T,fe=!!M?.filter(xe=>!!xe.id).length,te=ue||!!p||!!E,we=useMemo(()=>{let xe=A??"Ajustar Imagem",be=n>1||Z>1?` (${Z} de ${n})`:"";return `${xe}${be}`},[A,n,Z]);return jsxs(me,{id:s,name:v,uploading:D,disabled:i,dropZoneSxProps:m,tabIndex:P,getRootProps:oe,getInputProps:G,isDragActive:ne,isError:te,dropZoneContent:jsx(Fragment,{children:g?jsx(de,{children:g}):jsx(ce,{header:a?.header,description:a?.description})}),children:[jsx(y,{disabled:i,helperText:d,isError:te}),p?jsx(y,{helperText:p,isError:!0}):null,E?jsx(y,{helperText:E,isError:!0}):null,fe&&jsx(De,{sx:{my:3,ml:.5},children:jsx(_e,{files:M,thumbnail:!0,onRemove:ee,onReorder:o?q:void 0})}),jsx(a$6,{open:se,onClose:re,label:we,imageSrc:le,aspectRatio:N,onInitialized:V,onSave:K,loading:j,cropSize:u})]})},Pt=memo(It);var Dt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,sx:d,dropZoneSxProps:m$1,uploading:a,tabIndex:g,...h})=>{let{filesPreview:P,isUploadOrLoadingFiles:w,uploadErrorText:b,uploadFiles:C}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),I=w||a,{file:u,dropzoneProps:v,handleRemove:A}=$({uploadFiles:C,onFileSelect:e$1,onRemove:o,filesPreview:P,dropzoneOptions:{multiple:!1,disabled:s,...h}}),{getRootProps:S,getInputProps:L,isDragActive:f,isDragReject:E}=v,c=useCallback(T=>{T.stopPropagation(),A(u||void 0);},[u,A]),D=!!u,M=typeof u=="string",U=E||!!i||!!b;return jsxs(me,{id:l,uploading:I,disabled:s,dropZoneSxProps:m$1,tabIndex:g,getRootProps:S,getInputProps:L,isDragActive:f,isError:U,dropZoneContent:jsxs(Fragment,{children:[!D&&jsx(ce,{}),D&&jsxs(de,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:T=>`solid 1px ${T.palette.divider}`,...d},children:[jsx(Ee,{file:u}),jsxs(de,{flexGrow:1,sx:{minWidth:0},children:[jsx(Qe,{variant:"subtitle2",noWrap:!0,children:M?u:u.name}),jsx(Qe,{variant:"caption",sx:{color:"text.secondary"},children:M?"":e(u.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(so,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:c,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(y,{disabled:s,helperText:p,isError:U}),i?jsx(y,{helperText:i,isError:!0}):null,b?jsx(y,{helperText:b,isError:!0}):null]})},Rt=memo(Dt);var Ct=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,dropZoneSxProps:d,placeholderProps:m,placeholderAlt:a,hoverAlt:g,uploading:h,tabIndex:P,aspectRatio:w,enableCrop:b=!0,convertToWebp:C=!0,name:I,label:u,cropSize:v,sx:A,maxWidth:S,maxHeight:L,compressionQuality:f=.8,maxCompressedWidth:E,maxCompressedHeight:c,fill:D,...M})=>{let{filesPreview:U,isUploadOrLoadingFiles:T,uploadErrorText:N,uploadFiles:ee}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),[q,oe]=useState(!1),{file:G,dropzoneProps:ne,cropState:ue,handleRemove:se,aspectRatio:le}=$({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...M},filesPreview:U,enableCrop:b,customAspectRatio:w,convertToWebp:C,cropSize:v,uploadFiles:ee,compressionQuality:f,maxCompressedWidth:E,maxCompressedHeight:c}),{getRootProps:j,getInputProps:V,isDragActive:K,isDragReject:re}=ne,{cropModalOpen:Z,imagePreview:n,cropLoading:fe,onCropInitialized:te,handleCropSave:we,handleCropCancel:xe}=ue,be=useCallback(()=>{se(G||void 0);},[G,se]),x=!!G,F=re||!!i||!!N,R=h||T,O=x?{opacity:0}:{opacity:1},k=d?.width;return useEffect(()=>{x||oe(!1);},[x]),jsxs(Me,{sx:{...A,...k&&{width:k}},children:[(R||q)&&jsx(a$7,{}),jsxs(me,{id:l,uploading:R,disabled:s,dropZoneSxProps:d,tabIndex:P,getRootProps:j,getInputProps:V,isDragActive:K,isError:F,name:I,dropZoneContent:jsxs(Fragment,{children:[a?jsx(de,{sx:O,children:a}):jsx(ce,{sx:O,header:m?.title,description:m?.description}),x&&jsx(qe,{file:G,cropSize:v,isLoading:q,isUploading:R,onLoading:oe,aspectRatio:le,maxWidth:S,maxHeight:L,hoverAlt:g,fill:D})]}),children:[jsx(y,{disabled:s,helperText:p,isError:F}),i?jsx(y,{helperText:i,isError:!0}):null,N?jsx(y,{helperText:N,isError:!0}):null,x&&e&&jsx(mo,{size:"small",onClick:be,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:Z,onClose:xe,label:u??"Ajustar Imagem",imageSrc:n,aspectRatio:le,onInitialized:te,onSave:we,loading:fe,cropSize:v})]})]})},Lt=memo(Ct);var Gt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:l,label:s,id:i,tabIndex:p,error:d,helperText:m,sx:a,name:g,maxSize:h,uploading:P,aspectRatio:w=1,enableCrop:b=!0,convertToWebp:C=!0,cropSize:I,...u})=>{let[v,A]=useState(!1),{filesPreview:S,isUploadOrLoadingFiles:L,uploadErrorText:f,uploadFiles:E}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:c,dropzoneProps:D,cropState:M,handleRemove:U}=$({filesPreview:S,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:l,maxSize:h,...u},enableCrop:b,customAspectRatio:w,convertToWebp:C,cropSize:I,uploadFiles:E}),{getRootProps:T,getInputProps:N,isDragActive:ee,isDragReject:q}=D,{cropModalOpen:oe,imagePreview:G,cropLoading:ne,onCropInitialized:ue,handleCropSave:se,handleCropCancel:le}=M,j=q||!!d||!!f,V=v||L||P,K=!!e,re=useRef(t?.url||""),Z=useRef();useEffect(()=>{if(!c){re.current="",Z.current=void 0;return}if(Z.current===c.id)return;Z.current=c.id,A(!0);let te=URL.createObjectURL(c);return re.current=te,()=>{URL.revokeObjectURL(te);}},[c]);let n=()=>{A(!1);},fe=useCallback(()=>K&&c?()=>U(c):T().onClick,[K,c,T,U]);return jsxs(Fragment,{children:[jsxs(de,{sx:{alignItems:"center"},children:[jsxs(Io,{sx:a,isError:j,isDragActive:ee,hasFile:!!c,...T(),onClick:fe(),children:[jsxs(ho,{children:[V&&jsx(bo,{children:jsx(Wt,{size:135,thickness:2,color:"primary"})}),c&&jsx(Po,{alt:"Avatar Preview",src:re.current,onLoad:n,...V&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!c&&!V&&jsxs($e,{isError:j,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(Qe,{variant:"caption",textAlign:"center",sx:{color:j?"error.main":"text.disabled"},children:"Adicionar foto"})]}),c&&!V&&jsxs($e,{isError:j,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(Qe,{variant:"caption",textAlign:"center",sx:{color:j?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:g,id:i,tabIndex:p,...N()})]}),jsx(de,{sx:{alignItems:"center",mt:-.5},children:jsx(y,{helperText:m,disabled:l,isError:j})}),f?jsx(y,{helperText:f,isError:!0}):null,d?jsx(y,{helperText:d,isError:!0}):null]}),oe&&G&&jsx(a$6,{open:oe,onClose:le,label:s??"Ajustar Imagem",imageSrc:G,aspectRatio:w,onInitialized:ue,onSave:se,loading:ne,cropSize:I,cropShape:"round"})]})},jt=memo(Gt);var Xt=({error:e,name:o,disabled:r,sx:t,...l})=>{let{getRootProps:s,getInputProps:i,isDragActive:p,isDragReject:d}=useDropzone({disabled:r,...l}),m=d||e;return jsxs(co,{...s(),isDragActive:p,hasError:!!m,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...i()}),"Selecionar arquivo"]})},qt=memo(Xt);
38
-
39
- export { Ke as ContentType, Be as FileContentType, Ee as FileThumbnail, y as HelperText, _e as MultiFilePreview, ct as MultipleFileUpload, Pt as MultipleImageUpload, qe as SingleFilePreview, Rt as SingleFileUpload, Lt as SingleImageUpload, jt as UploadAvatar, qt as UploadSimpleBox, yo as compressImageWithoutCrop, Oo as convertToWebP, Co as encodeFilenameForHeader, Ve as fileFormat, oa as fileNameByUrl, To as fileThumb, Ne as fileThumbnailClasses, So as fileTypeByUrl, Uo as getFileNameFromContentDisposition, ca as isImageFile, $ as useDropzoneUploader, X as useFileUploadService };
17
+ import '../../chunk-GFJT57TO.js';
18
+ import '../../chunk-S7QQBC4I.js';
@@ -0,0 +1,240 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { RegisterOptions } from 'react-hook-form';
3
+ import { F as FileGetResponse, S as SingleImageUploadProps, M as MultiImageUploadProps, a as SingleFileUploadProps, b as MultiFileUploadProps } from '../../../types-90c7bcee.js';
4
+ import '@mui/material/Stack';
5
+ import '@mui/material/styles';
6
+ import 'react-dropzone';
7
+ import 'react-easy-crop';
8
+ import '@dnd-kit/core';
9
+
10
+ /**
11
+ * Tipo para busca de arquivo individual
12
+ * Recebe um ID e retorna FileGetResponse
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * const getFileQuery = async (id: string): Promise<FileGetResponse> => {
17
+ * const response = await api.get(`/files/${id}`);
18
+ * return response.data;
19
+ * };
20
+ * ```
21
+ */
22
+ type GetFileQuery = (id: string) => Promise<FileGetResponse> | FileGetResponse;
23
+ /**
24
+ * Props base para componentes de upload integrados ao form
25
+ */
26
+ interface BaseFormUploadProps {
27
+ name: string;
28
+ rules?: RegisterOptions;
29
+ getFileQuery: GetFileQuery;
30
+ disableRemove?: boolean;
31
+ disableReorder?: boolean;
32
+ }
33
+ /**
34
+ * Props para SingleImageUpload integrado ao form
35
+ * Retorna apenas o resource_file_id no campo do formulário
36
+ */
37
+ interface FormSingleImageUploadProps extends Omit<SingleImageUploadProps, 'fileDetails' | 'onFileSelect' | 'onRemove' | 'name'>, BaseFormUploadProps {
38
+ }
39
+ /**
40
+ * Props para MultiImageUpload integrado ao form
41
+ * Retorna array de resource_file_ids no campo do formulário
42
+ */
43
+ interface FormMultiImageUploadProps extends Omit<MultiImageUploadProps, 'filesDetails' | 'onFilesSelect' | 'onRemove' | 'onRemoveAll' | 'name'>, BaseFormUploadProps {
44
+ }
45
+ /**
46
+ * Props para SingleFileUpload integrado ao form
47
+ * Retorna apenas o resource_file_id no campo do formulário
48
+ */
49
+ interface FormSingleFileUploadProps extends Omit<SingleFileUploadProps, 'fileDetails' | 'onFileSelect' | 'onRemove' | 'name'>, BaseFormUploadProps {
50
+ }
51
+ /**
52
+ * Props para MultiFileUpload integrado ao form
53
+ * Retorna array de resource_file_ids no campo do formulário
54
+ */
55
+ interface FormMultiFileUploadProps extends Omit<MultiFileUploadProps, 'filesDetails' | 'onFilesSelect' | 'onRemove' | 'onRemoveAll' | 'name'>, BaseFormUploadProps {
56
+ }
57
+
58
+ /**
59
+ * AvatarUpload integrado ao React Hook Form
60
+ * Componente especializado para upload de avatar (imagem circular de perfil)
61
+ * Gerencia automaticamente o estado do arquivo e retorna apenas o resource_file_id
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * import { Form } from 'components/form';
66
+ * import { AvatarUpload } from 'components/form/FileUpload';
67
+ * import { useCreateFilesMutation, useGetFileQuery } from 'services/filesApi';
68
+ *
69
+ * interface FormData {
70
+ * avatar_id: string | null;
71
+ * }
72
+ *
73
+ * const ProfileForm = () => {
74
+ * const createFilesMutation = useCreateFilesMutation();
75
+ * const getFileQuery = useGetFileQuery();
76
+ * const methods = useForm<FormData>();
77
+ *
78
+ * return (
79
+ * <Form methods={methods} onSubmit={handleSubmit}>
80
+ * <AvatarUpload
81
+ * name="avatar_id"
82
+ * createFilesMutation={createFilesMutation}
83
+ * getFileQuery={getFileQuery}
84
+ * />
85
+ * </Form>
86
+ * );
87
+ * };
88
+ * ```
89
+ */
90
+ declare const AvatarUpload: ({ name, rules, createFilesMutation, getFileQuery, disableRemove, aspectRatio, enableCrop, maxSize, ...other }: FormSingleImageUploadProps) => react_jsx_runtime.JSX.Element;
91
+
92
+ /**
93
+ * MultiFileUpload integrado ao React Hook Form
94
+ * Gerencia automaticamente o estado dos arquivos e retorna array de resource_file_ids
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * import { Form } from 'components/form';
99
+ * import { MultiFileUpload } from 'components/form/FileUpload';
100
+ * import { useCreateFilesMutation } from 'services/filesApi';
101
+ *
102
+ * const FormExample = () => {
103
+ * const createFilesMutation = useCreateFilesMutation();
104
+ * const methods = useForm({
105
+ * defaultValues: {
106
+ * document_ids: [],
107
+ * },
108
+ * });
109
+ *
110
+ * const handleSubmit = (data: any) => {
111
+ * console.log(data.document_ids); // Array de IDs
112
+ * };
113
+ *
114
+ * return (
115
+ * <Form methods={methods} onSubmit={handleSubmit}>
116
+ * <MultiFileUpload
117
+ * name="document_ids"
118
+ * label="Documentos"
119
+ * createFilesMutation={createFilesMutation}
120
+ * maxFiles={5}
121
+ * />
122
+ * </Form>
123
+ * );
124
+ * };
125
+ * ```
126
+ */
127
+ declare const MultiFileUpload: ({ name, rules, createFilesMutation, getFileQuery, disableRemove, disableReorder, ...other }: FormMultiFileUploadProps) => react_jsx_runtime.JSX.Element;
128
+
129
+ /**
130
+ * MultiImageUpload integrado ao React Hook Form
131
+ * Gerencia automaticamente o estado dos arquivos e retorna array de resource_file_ids
132
+ *
133
+ * @example
134
+ * ```tsx
135
+ * import { Form } from 'components/form';
136
+ * import { MultiImageUpload } from 'components/form/FileUpload';
137
+ * import { useCreateFilesMutation } from 'services/filesApi';
138
+ *
139
+ * const FormExample = () => {
140
+ * const createFilesMutation = useCreateFilesMutation();
141
+ * const methods = useForm({
142
+ * defaultValues: {
143
+ * image_ids: [],
144
+ * },
145
+ * });
146
+ *
147
+ * const handleSubmit = (data: any) => {
148
+ * console.log(data.image_ids); // Array de IDs
149
+ * };
150
+ *
151
+ * return (
152
+ * <Form methods={methods} onSubmit={handleSubmit}>
153
+ * <MultiImageUpload
154
+ * name="image_ids"
155
+ * label="Imagens"
156
+ * createFilesMutation={createFilesMutation}
157
+ * maxFiles={5}
158
+ * />
159
+ * </Form>
160
+ * );
161
+ * };
162
+ * ```
163
+ */
164
+ declare const MultiImageUpload: ({ name, rules, createFilesMutation, getFileQuery, disableRemove, disableReorder, ...other }: FormMultiImageUploadProps) => react_jsx_runtime.JSX.Element;
165
+
166
+ /**
167
+ * SingleFileUpload integrado ao React Hook Form
168
+ * Gerencia automaticamente o estado do arquivo e retorna apenas o resource_file_id
169
+ *
170
+ * @example
171
+ * ```tsx
172
+ * import { Form } from 'components/form';
173
+ * import { SingleFileUpload } from 'components/form/FileUpload';
174
+ * import { useCreateFilesMutation } from 'services/filesApi';
175
+ *
176
+ * const FormExample = () => {
177
+ * const createFilesMutation = useCreateFilesMutation();
178
+ * const methods = useForm({
179
+ * defaultValues: {
180
+ * document_id: null,
181
+ * },
182
+ * });
183
+ *
184
+ * const handleSubmit = (data: any) => {
185
+ * console.log(data.document_id); // ID do arquivo
186
+ * };
187
+ *
188
+ * return (
189
+ * <Form methods={methods} onSubmit={handleSubmit}>
190
+ * <SingleFileUpload
191
+ * name="document_id"
192
+ * label="Documento"
193
+ * createFilesMutation={createFilesMutation}
194
+ * maxSize={1024 * 1024 * 10}
195
+ * />
196
+ * </Form>
197
+ * );
198
+ * };
199
+ * ```
200
+ */
201
+ declare const SingleFileUpload: ({ name, rules, createFilesMutation, getFileQuery, disableRemove, ...other }: FormSingleFileUploadProps) => react_jsx_runtime.JSX.Element;
202
+
203
+ /**
204
+ * SingleImageUpload integrado ao React Hook Form
205
+ * Gerencia automaticamente o estado do arquivo e retorna apenas o resource_file_id
206
+ *
207
+ * @example
208
+ * ```tsx
209
+ * import { Form } from 'components/form';
210
+ * import { SingleImageUpload } from 'components/form/FileUpload';
211
+ * import { useCreateFilesMutation } from 'services/filesApi';
212
+ *
213
+ * const FormExample = () => {
214
+ * const createFilesMutation = useCreateFilesMutation();
215
+ * const methods = useForm({
216
+ * defaultValues: {
217
+ * resource_id: null,
218
+ * },
219
+ * });
220
+ *
221
+ * const handleSubmit = (data: any) => {
222
+ * console.log(data.resource_id); // ID do arquivo
223
+ * };
224
+ *
225
+ * return (
226
+ * <Form methods={methods} onSubmit={handleSubmit}>
227
+ * <SingleImageUpload
228
+ * name="resource_id"
229
+ * label="Imagem"
230
+ * createFilesMutation={createFilesMutation}
231
+ * maxSize={1024 * 1024 * 5}
232
+ * />
233
+ * </Form>
234
+ * );
235
+ * };
236
+ * ```
237
+ */
238
+ declare const SingleImageUpload: ({ name, rules, createFilesMutation, getFileQuery, disableRemove, ...other }: FormSingleImageUploadProps) => react_jsx_runtime.JSX.Element;
239
+
240
+ export { AvatarUpload, FileGetResponse, FormMultiFileUploadProps, FormMultiImageUploadProps, FormSingleFileUploadProps, FormSingleImageUploadProps, GetFileQuery, MultiFileUpload, MultiImageUpload, SingleFileUpload, SingleImageUpload };
@@ -0,0 +1,25 @@
1
+ import { v, s, t, u } from '../../../chunk-JALBND3K.js';
2
+ import '../../../chunk-H5L4ARDB.js';
3
+ import '../../../chunk-3X7KMUN3.js';
4
+ import '../../../chunk-ANAHA3L6.js';
5
+ import '../../../chunk-2FXBVVBD.js';
6
+ import '../../../chunk-KA6PGKWV.js';
7
+ import '../../../chunk-GZ4UBWZJ.js';
8
+ import '../../../chunk-7AZX7L27.js';
9
+ import '../../../chunk-DUFPX4QZ.js';
10
+ import '../../../chunk-2P4CXK3O.js';
11
+ import '../../../chunk-FK7DDO5L.js';
12
+ import '../../../chunk-DMQW3LDF.js';
13
+ import '../../../chunk-WIJV4EHZ.js';
14
+ import '../../../chunk-FO7JCJ76.js';
15
+ import '../../../chunk-C2JZG45F.js';
16
+ import '../../../chunk-ILHUUK4X.js';
17
+ import '../../../chunk-GFJT57TO.js';
18
+ import '../../../chunk-S7QQBC4I.js';
19
+ import { useFormContext, Controller } from 'react-hook-form';
20
+ import { useState, useEffect, useMemo, useRef } from 'react';
21
+ import { jsx } from 'react/jsx-runtime';
22
+
23
+ var h=(e,r)=>{let{setValue:l,watch:a}=useFormContext(),t=a(e),[o,i]=useState();return useEffect(()=>{if(!t){i(void 0);return}(async()=>{try{let s=await r(t);i({id:s.id,url:s.url,name:s.name});}catch{i({id:t,url:""});}})();},[t,r]),{fileDetails:o,handleFileSelect:d=>{l(e,d.id,{shouldValidate:!0,shouldDirty:!0});},handleRemove:()=>{l(e,null,{shouldValidate:!0,shouldDirty:!0});}}},R=(e,r)=>{let{setValue:l,watch:a}=useFormContext(),t=a(e),o=useMemo(()=>t||[],[t]),[i,n]=useState([]),u=useRef(new Map);return useEffect(()=>{if(!o||o.length===0){n([]);return}(async()=>{try{let p=[...new Set(o)],c=u.current,F=p.filter(S=>!c.has(S));if(F.length>0){let S=F.map(async U=>{try{let g=await r(U),M={id:g.id,url:g.url,name:g.name};return c.set(U,M),M}catch{let g={id:U,url:""};return c.set(U,g),g}});await Promise.all(S);}let Q=p.map(S=>c.get(S));n(Q);}catch{n(o.map(p=>({id:p,url:""})));}})();},[o,r]),{currentValue:o,filesDetails:i,handleFilesSelect:m=>{let p=m.map(F=>F.id),c=[...new Set([...o,...p])];l(e,c,{shouldValidate:!0,shouldDirty:!0});},handleRemove:m=>{if(!m)return;let p=o.filter(c=>c!==m.id);l(e,p,{shouldValidate:!0,shouldDirty:!0});},handleReorder:(m,p)=>{let c=[...o],[F]=c.splice(m,1);c.splice(p,0,F),l(e,c,{shouldValidate:!0,shouldDirty:!0});}}};var B=({name:e,rules:r,createFilesMutation:l,getFileQuery:a,disableRemove:t,aspectRatio:o=1,enableCrop:i=!0,maxSize:n=5242880,...u})=>{let{control:d}=useFormContext(),{fileDetails:s,handleFileSelect:f,handleRemove:m}=h(e,a);return jsx(Controller,{name:e,control:d,rules:r,render:({fieldState:{error:p}})=>jsx(v,{name:e,fileDetails:s,createFilesMutation:l,onFileSelect:f,onRemove:t?void 0:m,aspectRatio:o,enableCrop:i,maxSize:n,error:p?.message,...u})})},H=B;var L=({name:e,rules:r,createFilesMutation:l,getFileQuery:a,disableRemove:t,disableReorder:o,...i})=>{let{control:n}=useFormContext(),{filesDetails:u,handleFilesSelect:d,handleRemove:s$1,handleReorder:f}=R(e,a);return jsx(Controller,{name:e,control:n,rules:r,render:({fieldState:{error:m}})=>jsx(s,{name:e,filesDetails:u,createFilesMutation:l,onFilesSelect:d,onRemove:t?void 0:s$1,onReorder:o?void 0:f,error:m?.message,...i})})},N=L;var W=({name:e,rules:r,createFilesMutation:l,getFileQuery:a,disableRemove:t$1,disableReorder:o,...i})=>{let{control:n}=useFormContext(),{filesDetails:u,handleFilesSelect:d,handleRemove:s,handleReorder:f}=R(e,a);return jsx(Controller,{name:e,control:n,rules:r,render:({fieldState:{error:m}})=>jsx(t,{name:e,filesDetails:u,createFilesMutation:l,onFilesSelect:d,onRemove:t$1?void 0:s,onReorder:o?void 0:f,error:m?.message,...i})})},X=W;var _=({name:e,rules:r,createFilesMutation:l,getFileQuery:a,disableRemove:t,...o})=>{let{control:i}=useFormContext(),{fileDetails:n,handleFileSelect:u$1,handleRemove:d}=h(e,a);return jsx(Controller,{name:e,control:i,rules:r,render:({fieldState:{error:s}})=>jsx(u,{name:e,fileDetails:n,createFilesMutation:l,onFileSelect:u$1,onRemove:t?void 0:d,error:s?.message,...o})})},$=_;var oe=({name:e,rules:r,createFilesMutation:l,getFileQuery:a,disableRemove:t,...o})=>{let{control:i}=useFormContext(),{fileDetails:n,handleFileSelect:u,handleRemove:d}=h(e,a);return jsx(Controller,{name:e,control:i,rules:r,render:({fieldState:{error:s}})=>jsx(v,{name:e,fileDetails:n,createFilesMutation:l,onFileSelect:u,onRemove:t?void 0:d,error:s?.message,...o})})},te=oe;
24
+
25
+ export { H as AvatarUpload, N as MultiFileUpload, X as MultiImageUpload, $ as SingleFileUpload, te as SingleImageUpload };
@@ -445,7 +445,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
445
445
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
446
446
  zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "reset" | "normal")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
- animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
448
+ animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
449
449
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
450
450
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
451
451
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -729,7 +729,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
729
729
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
730
730
  WebkitUserSelect?: csstype.Property.UserSelect | readonly NonNullable<csstype.Property.UserSelect | undefined>[] | readonly csstype.Property.UserSelect[] | undefined;
731
731
  WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
732
- MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
732
+ MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
733
733
  MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
734
734
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
735
735
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
@@ -741,7 +741,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
741
741
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
742
742
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
743
743
  msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
744
- WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
744
+ WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
745
745
  WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
746
746
  WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
747
747
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
@@ -831,7 +831,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
831
831
  MozTransitionTimingFunction?: readonly string[] | csstype.Property.TransitionTimingFunction | readonly csstype.Property.TransitionTimingFunction[] | undefined;
832
832
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
833
833
  msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
834
- OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
834
+ OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto" | "none" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
835
835
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
836
836
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
837
837
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;